:root {
  --ink: #102a36;
  --muted: #526773;
  --paper: #f5f1e7;
  --cream: #fffaf0;
  --teal: #0d7f78;
  --teal-dark: #075c59;
  --coral: #e66d4e;
  --gold: #d7a63f;
  --line: rgba(16, 42, 54, .14);
  --shadow: 0 24px 70px rgba(24, 53, 63, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 6%, rgba(42, 181, 168, .12), transparent 28rem),
    radial-gradient(circle at 92% 16%, rgba(230, 109, 78, .11), transparent 30rem),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}

button, input { font: inherit; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.liaison-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid rgba(16, 42, 54, .1); background: rgba(250, 247, 239, .92); backdrop-filter: blur(18px); }
.liaison-header__inner { min-height: 76px; padding: 0 clamp(18px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.liaison-header__actions { display: flex; align-items: center; gap: 10px; }
.account-pill, .student-pill { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, .72); font-size: 13px; font-weight: 800; }
.student-pill { color: var(--teal-dark); }
.header-button, .quiet-button { min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: rgba(255, 255, 255, .78); font-weight: 800; cursor: pointer; }
.header-button:hover, .quiet-button:hover { border-color: var(--teal); color: var(--teal-dark); }

.view { width: min(1240px, calc(100% - 32px)); margin: 0 auto; }
.login-view { min-height: calc(100vh - 76px); padding: clamp(36px, 7vw, 96px) 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .75fr); align-items: center; gap: clamp(30px, 7vw, 100px); }
.login-visual { position: relative; min-height: 540px; padding: clamp(32px, 5vw, 70px); overflow: hidden; border-radius: 42px; color: #e9fffb; background: linear-gradient(145deg, #0b3e48 0%, #0a706c 58%, #37a890 100%); box-shadow: var(--shadow); }
.login-visual::before { content: ""; position: absolute; width: 370px; height: 370px; right: -110px; top: -120px; border: 70px solid rgba(255, 255, 255, .08); border-radius: 50%; }
.login-visual p { position: relative; margin: 0; font-size: 13px; font-weight: 900; letter-spacing: .22em; }
.login-visual > strong { position: absolute; right: 42px; bottom: 24px; color: rgba(255,255,255,.13); font: 900 clamp(120px, 18vw, 240px)/1 Georgia, serif; }
.login-sound-path { position: absolute; inset: 35% 9% auto; display: grid; grid-template-columns: 1fr 70px 1fr; align-items: center; gap: 10px; }
.login-sound-path > span { height: 130px; padding: 25px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 2px solid rgba(255,255,255,.28); border-radius: 28px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.login-sound-path i { width: 11px; border-radius: 999px; background: #e5fff8; animation: pulse 1.1s ease-in-out infinite alternate; }
.login-sound-path i:nth-child(1) { height: 28px; }
.login-sound-path i:nth-child(2) { height: 66px; animation-delay: -.3s; }
.login-sound-path i:nth-child(3) { height: 43px; animation-delay: -.6s; }
.login-sound-path b { height: 4px; border-radius: 999px; background: linear-gradient(90deg, rgba(255,255,255,.2), #ffd075, rgba(255,255,255,.2)); }
@keyframes pulse { to { transform: scaleY(.55); opacity: .55; } }

.login-panel { padding: clamp(12px, 3vw, 36px); }
.eyebrow, .section-label { margin: 0 0 12px; color: var(--teal-dark); font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.login-panel h1, .hero h1 { margin: 0; font: 800 clamp(58px, 8vw, 92px)/.9 Georgia, "Times New Roman", serif; letter-spacing: -.045em; }
.login-panel h1 span, .hero h1 span { display: block; margin-top: 18px; font: 900 clamp(27px, 4vw, 46px)/1.08 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif; letter-spacing: -.04em; }
.login-intro { max-width: 520px; margin: 28px 0; color: var(--muted); font-size: 18px; line-height: 1.75; }
.login-panel form { display: grid; gap: 17px; }
.login-panel label { display: grid; gap: 8px; font-weight: 850; }
.login-panel input { width: 100%; min-height: 56px; padding: 0 16px; border: 2px solid rgba(16,42,54,.18); border-radius: 15px; color: var(--ink); background: rgba(255,255,255,.86); outline: none; }
.login-panel input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13,127,120,.12); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 78px; }
.password-field button { position: absolute; right: 8px; top: 8px; min-height: 40px; padding: 0 13px; border: 0; border-radius: 10px; color: var(--teal-dark); background: #e2f3ef; font-weight: 850; cursor: pointer; }
.login-status { min-height: 22px; margin: -3px 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.login-status[data-state="error"] { color: #a43d2e; }
.primary-button { min-height: 52px; padding: 0 22px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--teal-dark), var(--teal)); box-shadow: 0 10px 26px rgba(13,127,120,.2); font-weight: 900; cursor: pointer; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(13,127,120,.27); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.account-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }

.practice-view { padding: 40px 0 100px; }
.hero { min-height: 520px; padding: clamp(34px, 6vw, 78px); display: grid; grid-template-columns: 1.05fr .8fr; align-items: center; gap: clamp(30px, 5vw, 70px); overflow: hidden; border: 1px solid rgba(255,255,255,.72); border-radius: 42px; background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(233,248,244,.86)); box-shadow: var(--shadow); }
.hero-copy > p:not(.eyebrow) { max-width: 650px; margin: 28px 0; color: var(--muted); font-size: 18px; line-height: 1.75; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-demo { position: relative; min-height: 350px; display: flex; align-items: center; justify-content: center; gap: 14px; }
.hero-demo::before { content: ""; position: absolute; width: 390px; height: 390px; border-radius: 50%; background: radial-gradient(circle, rgba(13,127,120,.17), transparent 68%); }
.demo-block { position: relative; width: 170px; min-height: 190px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; border: 2px solid rgba(7,92,89,.25); border-radius: 27px; background: linear-gradient(150deg, #fafffd, #d7f1eb); box-shadow: 0 20px 45px rgba(16,42,54,.12); transform: rotate(-4deg); }
.demo-block.is-second { transform: rotate(5deg); background: linear-gradient(150deg, #fffdf8, #ffe4d8); }
.demo-block small { color: var(--muted); font-weight: 900; }
.demo-block strong { font: 900 34px/1 Georgia, serif; }
.demo-bridge { position: relative; z-index: 2; color: var(--coral); font-size: 40px; font-weight: 900; }
.wave { height: 38px; display: flex; align-items: center; gap: 5px; }
.wave i { width: 5px; border-radius: 9px; background: var(--teal); }
.wave i:nth-child(1) { height: 13px; }.wave i:nth-child(2) { height: 29px; }.wave i:nth-child(3) { height: 38px; }.wave i:nth-child(4) { height: 23px; }.wave i:nth-child(5) { height: 10px; }

.how-it-works { margin: 34px 0; padding: 34px clamp(24px, 4vw, 48px); display: grid; grid-template-columns: .65fr 2.35fr; gap: 30px; align-items: center; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.68); }
.how-it-works h2, .question-heading h2, .completion-card h2 { margin: 0; font: 800 clamp(30px, 4vw, 48px)/1.05 Georgia, serif; }
.how-it-works ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; list-style: none; }
.how-it-works li { min-height: 116px; padding: 18px; display: grid; grid-template-columns: 36px 1fr; align-content: center; column-gap: 10px; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(16,42,54,.06); }
.how-it-works li > span { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--coral); font-weight: 900; }
.how-it-works li strong { font-size: 16px; }.how-it-works li small { margin-top: 4px; color: var(--muted); }

.progress-dock { position: sticky; top: 86px; z-index: 20; margin: 26px 0; padding: 16px 22px; border: 1px solid rgba(16,42,54,.1); border-radius: 18px; background: rgba(255,250,240,.92); box-shadow: 0 12px 35px rgba(16,42,54,.1); backdrop-filter: blur(14px); }
.progress-dock > div:first-child { display: flex; justify-content: space-between; font-weight: 900; }
.progress-track { height: 9px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: rgba(16,42,54,.1); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #40b89e, var(--gold)); transition: width .35s ease; }

.question-section { padding-top: 24px; }
.question-heading { margin: 0 0 26px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.question-heading > p { max-width: 530px; margin: 0; color: var(--muted); line-height: 1.65; }
.question-list { display: grid; gap: 24px; }
.question-card { padding: clamp(24px, 4vw, 42px); scroll-margin-top: 160px; border: 1px solid rgba(16,42,54,.11); border-radius: 30px; background: rgba(255,255,255,.82); box-shadow: 0 14px 42px rgba(16,42,54,.07); }
.question-card.is-complete { border-color: rgba(13,127,120,.42); background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(222,247,240,.82)); }
.question-meta { display: flex; justify-content: space-between; gap: 18px; color: var(--teal-dark); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.phrase-row { margin: 18px 0 10px; display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.phrase-row h3 { margin: 0; font: 800 clamp(30px, 4vw, 46px)/1.08 Georgia, serif; }
.play-phrase, .sound-play, .record-button { min-height: 42px; padding: 0 14px; border: 1px solid rgba(13,127,120,.25); border-radius: 12px; color: var(--teal-dark); background: #e5f6f2; font-weight: 900; cursor: pointer; }
.play-phrase:hover, .sound-play:hover, .record-button:hover { border-color: var(--teal); background: #d9f1eb; }
.question-focus { margin: 0 0 18px; color: var(--muted); font-size: 14px; font-weight: 750; }
.question-prompt { margin: 0 0 17px; font-size: 18px; font-weight: 850; line-height: 1.55; }
.sound-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sound-option { position: relative; min-height: 170px; padding: 19px; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; border: 2px solid rgba(16,42,54,.13); border-radius: 22px; color: var(--ink); background: #fff; transition: border .18s ease, transform .18s ease, box-shadow .18s ease; }
.sound-option:hover { transform: translateY(-2px); box-shadow: 0 13px 30px rgba(16,42,54,.09); }
.sound-option[data-selected="true"] { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(13,127,120,.11); }
.sound-option__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sound-option__number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: #edf1f1; font-size: 13px; font-weight: 900; }
.sound-option[data-selected="true"] .sound-option__number { color: #fff; background: var(--teal); }
.sound-option__select { padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.sound-option__select strong { display: block; margin-bottom: 8px; font-size: 17px; line-height: 1.3; }
.sound-option__select span { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; }
.sound-option .wave { height: 24px; }.sound-option .wave i { background: var(--coral); }.sound-option .wave i:nth-child(3) { height: 24px; }.sound-option .wave i:nth-child(2) { height: 18px; }.sound-option .wave i:nth-child(4) { height: 15px; }
.question-actions { margin-top: 19px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.check-button { min-height: 46px; padding: 0 20px; border: 0; border-radius: 13px; color: #fff; background: var(--ink); font-weight: 900; cursor: pointer; }
.check-button:disabled { opacity: .42; cursor: not-allowed; }
.answer-status { color: var(--muted); font-size: 14px; font-weight: 800; }
.feedback { margin-top: 18px; padding: 18px 20px; border-left: 5px solid var(--gold); border-radius: 0 16px 16px 0; background: #fff7df; line-height: 1.6; }
.feedback[data-state="correct"] { border-color: var(--teal); background: #e2f5ef; }
.feedback strong { display: block; margin-bottom: 4px; }
.practice-tools { margin-top: 16px; padding-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid rgba(16,42,54,.1); }
.practice-tools small { flex-basis: 100%; color: var(--muted); }
.practice-tools audio { width: min(100%, 330px); height: 42px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.lesson-card { overflow: hidden; }
.lesson-status { padding: 7px 11px; border-radius: 999px; color: var(--teal-dark); background: #e2f5ef; font-size: 12px; font-weight: 900; }
.lesson-stepper { margin: 24px 0 0; display: grid; grid-template-columns: repeat(7, minmax(105px, 1fr)); gap: 7px; overflow-x: auto; padding: 3px 2px 10px; scrollbar-width: thin; }
.step-pill { min-height: 86px; padding: 10px 8px; display: grid; justify-items: center; align-content: center; gap: 3px; border: 1px solid var(--line); border-radius: 15px; color: var(--muted); background: rgba(255,255,255,.78); cursor: pointer; }
.step-pill > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #edf1ef; font-size: 11px; font-weight: 900; }
.step-pill strong { font-size: 12px; line-height: 1.2; text-align: center; }
.step-pill small { font-size: 9px; text-align: center; }
.step-pill[data-current="true"] { border-color: var(--teal); color: var(--teal-dark); background: #e5f6f2; box-shadow: 0 0 0 3px rgba(13,127,120,.1); }
.step-pill[data-current="true"] > span, .step-pill[data-complete="true"] > span { color: #fff; background: var(--teal); }
.step-pill:disabled { opacity: .45; cursor: not-allowed; }
.lesson-stage { margin: 22px -42px -42px; padding: clamp(24px, 4vw, 42px); border-top: 1px solid var(--line); background: rgba(255,250,240,.64); }
.stage-intro { max-width: 820px; margin-bottom: 22px; }
.stage-intro > span { color: var(--coral); font-size: 11px; font-weight: 950; letter-spacing: .14em; }
.stage-intro h4 { margin: 7px 0 8px; font: 800 clamp(25px, 3vw, 36px)/1.1 Georgia, serif; }
.stage-intro p { margin: 0; color: var(--muted); line-height: 1.65; }
.stage-question { margin: 20px 0 13px; font-size: 17px; font-weight: 900; line-height: 1.5; }
.stage-status { min-height: 24px; margin: 14px 0 0; color: var(--teal-dark); font-size: 14px; font-weight: 800; line-height: 1.5; }
.stage-status[data-state="error"] { color: #b93f28; }
.stage-next, .stage-check { min-height: 46px; margin-top: 18px; padding: 0 20px; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(135deg, var(--teal-dark), var(--teal)); font-weight: 900; cursor: pointer; }
.stage-check { background: var(--ink); }
.stage-check:disabled { opacity: .38; cursor: not-allowed; }
.context-card { max-width: 780px; padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.context-card small, .transfer-card small, .record-target small { color: var(--coral); font-weight: 950; letter-spacing: .12em; }
.context-card p { margin: 8px 0 12px; color: var(--muted); line-height: 1.6; }
.context-card blockquote { margin: 0; font: 800 27px/1.25 Georgia, serif; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.choice-grid.compact { max-width: 760px; }
.choice-button { min-height: 70px; padding: 15px; border: 2px solid rgba(16,42,54,.12); border-radius: 16px; color: var(--ink); background: #fff; text-align: left; font-weight: 800; line-height: 1.45; cursor: pointer; }
.choice-button:hover:not(:disabled), .choice-button:focus-visible { border-color: var(--teal); background: #effaf7; }
.choice-button:disabled { opacity: .5; cursor: not-allowed; }
.choice-button strong, .choice-button span { display: block; }
.choice-button span { margin-top: 5px; color: var(--muted); font-size: 13px; font-weight: 650; }
.boundary-choice { text-align: center; font-family: Georgia, serif; font-size: 19px; }
.spot-panel { margin-top: 22px; padding: 20px; border-radius: 20px; background: #fff; }
.spot-panel__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spot-panel__actions span { color: var(--muted); font-size: 13px; font-weight: 800; }
.play-control, .tile-play, .shadow-confirm { min-height: 40px; padding: 0 13px; border: 1px solid rgba(13,127,120,.25); border-radius: 11px; color: var(--teal-dark); background: #e5f6f2; font-weight: 900; cursor: pointer; }
.word-boundary-row { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.word-chip { min-height: 50px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #fffaf0; font: 800 20px/1 Georgia, serif; }
.word-chip:not(:disabled) { border-color: var(--teal); cursor: pointer; }
.boundary-tap { width: 38px; height: 38px; border: 1px dashed var(--coral); border-radius: 50%; color: var(--coral); background: #fff6ef; font-size: 23px; cursor: pointer; }
.boundary-tap:disabled { opacity: .28; cursor: not-allowed; }
.version-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.version-card { min-height: 120px; padding: 17px; display: grid; align-content: center; gap: 9px; border: 2px solid var(--line); border-radius: 17px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.version-card strong, .version-card span { display: block; }
.version-card span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.version-card[data-heard="true"] { border-color: var(--teal); background: #edf9f5; }
.build-lane { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(210px, 1.4fr) minmax(110px, .7fr); align-items: stretch; gap: 10px; }
.edge-block, .build-slot { min-height: 112px; padding: 17px; display: grid; place-items: center; align-content: center; gap: 6px; border-radius: 18px; text-align: center; }
.edge-block { border: 1px solid var(--line); background: #fff; }
.edge-block small { color: var(--muted); font-weight: 800; }
.edge-block strong { font: 900 24px/1 Georgia, serif; }
.build-slot { border: 2px dashed rgba(13,127,120,.45); color: var(--muted); background: rgba(226,245,239,.55); font-weight: 850; }
.build-slot[data-filled="true"] { border-style: solid; color: var(--teal-dark); background: #dff5ed; }
.build-slot small { color: var(--muted); line-height: 1.4; }
.sound-unit-palette { margin-top: 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.sound-unit { min-height: 130px; padding: 14px; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 17px; background: #fff; cursor: grab; }
.sound-unit[data-selected="true"] { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,127,120,.1); }
.sound-unit__grip { color: var(--muted); font-size: 22px; }
.build-tile { min-height: 80px; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.build-tile strong, .build-tile span { display: block; }
.build-tile span { margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.chunk-ladder { display: grid; gap: 10px; }
.chunk-row { padding: 13px; display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.chunk-row > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--coral); font-weight: 900; }
.chunk-row small, .chunk-row strong { display: block; }
.chunk-row small { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.chunk-row strong { margin-top: 3px; font: 800 20px/1.2 Georgia, serif; }
.chunk-row[data-complete="true"] { border-color: rgba(13,127,120,.35); background: #effaf7; }
.shadow-confirm { background: #fff; }
.record-target { max-width: 760px; padding: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.record-target strong { flex: 1; min-width: 180px; font: 800 27px/1.2 Georgia, serif; }
.record-console { margin: 15px 0; display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.record-console span { color: var(--muted); font-size: 13px; font-weight: 800; }
.lesson-stage audio { width: min(100%, 460px); }
.feedback-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.feedback-metric { min-height: 112px; padding: 16px; display: grid; grid-template-columns: 30px 1fr; gap: 9px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.feedback-metric > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--gold); font-weight: 900; }
.feedback-metric[data-state="pass"] { border-color: rgba(13,127,120,.35); background: #effaf7; }
.feedback-metric[data-state="pass"] > span { background: var(--teal); }
.feedback-metric[data-state="coach"] { border-color: rgba(230,109,78,.35); background: #fff3ed; }
.feedback-metric[data-state="coach"] > span { background: var(--coral); }
.feedback-metric strong { display: block; }
.feedback-metric p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.analysis-note, .fallback-note { max-width: 820px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.fallback-note { padding: 15px; border-radius: 14px; background: #fff3ed; }
.transfer-card { max-width: 780px; padding: 19px; display: flex; align-items: center; gap: 13px; flex-wrap: wrap; border-radius: 18px; color: #ecfffa; background: linear-gradient(135deg, var(--teal-dark), var(--teal)); }
.transfer-card small { color: #b8f1e4; }
.transfer-card strong { flex: 1; min-width: 220px; font: 800 28px/1.2 Georgia, serif; }
.transfer-card .play-control { color: var(--ink); background: #fff; }
.review-scheduler { margin-top: 20px; padding: 19px; border: 1px solid rgba(13,127,120,.25); border-radius: 18px; background: #e7f7f2; }
.review-scheduler h5 { margin: 0 0 12px; font-size: 16px; }
.review-scheduler > div { display: flex; gap: 9px; flex-wrap: wrap; }
.review-scheduler button { min-height: 42px; padding: 0 15px; border: 1px solid rgba(13,127,120,.3); border-radius: 11px; color: var(--teal-dark); background: #fff; font-weight: 900; cursor: pointer; }
.review-scheduler p { margin: 13px 0 0; color: var(--teal-dark); font-weight: 850; }
.lesson-complete-note { margin-top: 17px; padding: 15px; display: flex; justify-content: space-between; gap: 10px; border-radius: 14px; color: #fff; background: var(--teal-dark); }

.completion-card { margin-top: 34px; padding: clamp(34px, 7vw, 80px); text-align: center; border-radius: 34px; color: #e9fffb; background: linear-gradient(145deg, #0a4f58, #0d7f78); box-shadow: var(--shadow); }
.completion-card .section-label { color: #9ee9d9; }
.completion-card p:not(.section-label) { max-width: 650px; margin: 20px auto 28px; color: rgba(255,255,255,.82); line-height: 1.7; }
.completion-card .primary-button { color: var(--ink); background: #fff4cf; box-shadow: none; }
.noscript { padding: 30px; text-align: center; }

@media (max-width: 900px) {
  .login-view, .hero { grid-template-columns: 1fr; }
  .login-visual { min-height: 330px; }
  .login-sound-path { inset: 32% 8% auto; }
  .hero-demo { min-height: 280px; }
  .how-it-works { grid-template-columns: 1fr; }
  .question-heading { align-items: flex-start; flex-direction: column; }
  .sound-options { grid-template-columns: 1fr; }
  .sound-option { min-height: 138px; }
  .lesson-stage { margin-left: -24px; margin-right: -24px; margin-bottom: -24px; }
  .version-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sound-unit-palette, .choice-grid { grid-template-columns: 1fr; }
  .chunk-row { grid-template-columns: 32px 1fr; }
  .chunk-row .play-control, .chunk-row .shadow-confirm { grid-column: 2; }
}

@media (max-width: 620px) {
  .liaison-header__inner { min-height: 68px; padding: 0 12px; }
  .account-pill { display: none; }
  .student-pill { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .view { width: min(100% - 20px, 1240px); }
  .login-view { padding: 18px 0 50px; }
  .login-visual { min-height: 260px; border-radius: 26px; }
  .login-sound-path { grid-template-columns: 1fr 36px 1fr; }
  .login-sound-path > span { height: 95px; padding: 16px; }
  .login-panel { padding: 16px 5px; }
  .login-panel h1, .hero h1 { font-size: 52px; }
  .practice-view { padding-top: 16px; }
  .hero { min-height: 0; padding: 28px 22px; border-radius: 26px; }
  .hero-demo { gap: 5px; }
  .demo-block { width: 132px; min-height: 155px; padding: 18px; }
  .demo-block strong { font-size: 28px; }
  .how-it-works { padding: 24px 18px; }
  .how-it-works ol { grid-template-columns: 1fr; }
  .progress-dock { top: 74px; }
  .question-card { padding: 24px 18px; border-radius: 23px; }
  .phrase-row h3 { font-size: 31px; }
  .lesson-stage { margin: 18px -18px -24px; padding: 24px 18px; }
  .lesson-stepper { grid-template-columns: repeat(7, 102px); }
  .build-lane { grid-template-columns: 1fr; }
  .build-slot { order: 3; }
  .edge-block:last-child { order: 2; }
  .version-grid, .feedback-grid { grid-template-columns: 1fr; }
  .lesson-complete-note { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* Simplified Liaison flow — 2026-11-26 */
.module-hero { min-height: 610px; grid-template-columns: .85fr 1.15fr; }
.module-copy h1 { max-width: 680px; margin: 0 0 32px; font: 800 clamp(38px, 5vw, 68px)/1.06 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.module-card { min-height: 220px; padding: 24px; display: grid; align-content: space-between; gap: 18px; border: 2px solid rgba(13,127,120,.18); border-radius: 25px; color: var(--ink); background: linear-gradient(145deg, #fafffd, #dff4ef); text-align: left; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.module-card.is-paragraph { border-color: rgba(230,109,78,.22); background: linear-gradient(145deg, #fffdf9, #ffe7dc); }
.module-card:hover, .module-card:focus-visible { transform: translateY(-4px); border-color: var(--teal); box-shadow: 0 18px 42px rgba(16,42,54,.13); }
.module-card > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); font-weight: 900; }
.module-card.is-paragraph > span { background: var(--coral); }
.module-card strong { font: 850 clamp(25px, 3vw, 34px)/1.1 Georgia, serif; }
.module-card small { color: var(--muted); font-size: 15px; font-weight: 750; line-height: 1.5; }
.back-button, .clear-selection { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--teal-dark); background: rgba(255,255,255,.8); font-weight: 850; cursor: pointer; }
.question-section { scroll-margin-top: 92px; }
.question-heading h2 { margin-top: 16px; }
.lesson-stepper { grid-template-columns: repeat(6, minmax(112px, 1fr)); }
.letter-picker { max-width: 920px; padding: 20px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px; border: 1px solid var(--line); border-radius: 20px; background: #fff; font: 800 clamp(25px, 4vw, 39px)/1.2 Georgia, serif; }
.letter-picker > span { white-space: pre; }
.letter-key { min-width: 32px; min-height: 50px; padding: 0 4px; border: 0; border-bottom: 3px solid transparent; border-radius: 8px; color: var(--ink); background: transparent; font: inherit; cursor: pointer; touch-action: manipulation; }
.letter-key:hover, .letter-key:focus-visible { color: var(--teal-dark); background: #edf9f5; }
.letter-key[data-selected="true"] { color: #fff; background: var(--coral); border-bottom-color: #a8402b; transform: translateY(-2px); }
.letter-key:disabled { opacity: 1; cursor: default; }
.picker-actions { margin-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.picker-actions .stage-check, .picker-actions .clear-selection { margin-top: 0; }
.phrase-audio-controls { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.phrase-audio-controls button { min-height: 38px; padding: 0 12px; border: 1px solid rgba(13,127,120,.25); border-radius: 10px; color: var(--teal-dark); background: #e5f6f2; font-size: 12px; font-weight: 900; cursor: pointer; }
.phrase-audio-controls button:hover, .phrase-audio-controls button:focus-visible { border-color: var(--teal); background: #d8f0e9; }
.speed-controls { display: flex; gap: 12px; flex-wrap: wrap; }
.speed-controls button { min-height: 54px; padding: 0 22px; border: 1px solid rgba(13,127,120,.28); border-radius: 14px; color: var(--teal-dark); background: #e5f6f2; font-weight: 900; cursor: pointer; }
.speed-controls button:hover, .speed-controls button:focus-visible { border-color: var(--teal); background: #d8f0e9; }
.context-card .translation { margin: 15px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink); font-size: 18px; font-weight: 800; }
.transfer-card { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.transfer-card > small, .transfer-card > p { grid-column: 1 / -1; }
.transfer-card > p { margin: 0; color: rgba(255,255,255,.84); line-height: 1.6; }
.transfer-card .speed-controls { justify-content: flex-end; }
.paragraph-card h3 { margin: 18px 0 14px; font: 800 30px/1.15 Georgia, serif; }
.paragraph-card blockquote { margin: 0 0 15px; font: 750 clamp(23px, 3vw, 34px)/1.45 Georgia, serif; }
.paragraph-card > p { margin: 0 0 22px; color: var(--muted); font-size: 17px; line-height: 1.7; }

@media (max-width: 900px) {
  .module-hero { grid-template-columns: 1fr; }
  .module-copy { order: 2; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 170px; }
}

@media (max-width: 620px) {
  .module-hero { padding: 24px 18px; }
  .module-copy h1 { font-size: 39px; }
  .lesson-stepper { grid-template-columns: repeat(6, 105px); }
  .letter-picker { padding: 15px 10px; gap: 1px; font-size: 27px; }
  .letter-key { min-width: 25px; min-height: 44px; }
  .phrase-audio-controls { width: 100%; margin-left: 0; }
  .transfer-card { grid-template-columns: 1fr; }
  .transfer-card > * { grid-column: 1 !important; }
  .transfer-card .speed-controls { justify-content: flex-start; }
}
