
  :root {
    --bg: #0a0a0b;
    --surface: #121214;
    --card: #161618;
    --ink: #f5f5f7;
    --muted: #8e8e93;
    --faint: #636366;
    --accent: #ff9f0a;
    --accent-soft: rgba(255,159,10,.14);
    --ok: #30d158;
    --ok-soft: rgba(48,209,88,.12);
    --line: rgba(255,255,255,.06);
    --line-strong: rgba(255,255,255,.12);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; }
  body {
    background: #050506;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
    color: var(--ink);
    display: flex; justify-content: center; align-items: stretch;
    padding: 0;
    -webkit-font-smoothing: antialiased;
  }
  @media (min-width: 420px) {
    body { padding: env(safe-area-inset-top, 6px) 6px env(safe-area-inset-bottom, 6px); }
  }
  .phone {
    width: 100%; max-width: 390px;
    background: var(--bg);
    border-radius: 0;
    overflow: hidden;
    border: none;
    height: 100vh;
    max-height: 844px;
    display: flex; flex-direction: column;
    box-shadow: none;
    position: relative;
  }
  @media (min-width: 420px) {
    .phone {
      border-radius: 32px;
      border: 1px solid var(--line-strong);
      height: min(844px, calc(100vh - 12px));
      box-shadow: 0 24px 80px rgba(0,0,0,.55);
    }
  }

  .top {
    flex: 0 0 auto;
    padding: 12px 18px 8px;
  }
  .title { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }

  .scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex; flex-direction: column;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }
  .scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }

  .hero {
    position: relative;
    flex: 0 0 auto;
    height: clamp(260px, 42vh, 320px);
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: #111;
  }
  .hero.compact {
    height: 120px;
    margin: 0 16px;
    border-radius: 16px;
  }
  .hero img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    filter: brightness(.78) saturate(1.05);
  }
  .hero .veil {
    position: absolute; inset: 0;
    background:
      linear-gradient(180deg, rgba(10,10,11,.18) 0%, transparent 28%, rgba(10,10,11,.55) 62%, rgba(10,10,11,.92) 100%);
    pointer-events: none;
  }
  .hero-float {
    position: absolute; left: 18px; right: 18px; bottom: 18px;
    z-index: 2;
    display: flex; flex-direction: column; gap: 6px;
    pointer-events: none;
  }
  .hero-float .who {
    font-size: 11px; font-weight: 600; letter-spacing: .06em;
    text-transform: uppercase; color: rgba(255,159,10,.88);
    text-shadow: 0 1px 8px rgba(0,0,0,.35);
  }
  .hero-float .npc-line {
    display: flex; align-items: flex-start; gap: 8px;
    pointer-events: auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    width: fit-content; max-width: 100%;
  }
  .hero-float .npc-line .glyph {
    flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px;
    color: rgba(245,245,247,.55);
    display: grid; place-items: center;
    filter: drop-shadow(0 1px 6px rgba(0,0,0,.4));
  }
  .hero-float .npc-line svg { width: 18px; height: 18px; }
  .hero-float .npc-line.playing .glyph { color: var(--accent); }
  .hero-float .npc-line .en {
    font-size: 17px; font-weight: 560; line-height: 1.35;
    letter-spacing: -.015em; color: rgba(245,245,247,.96);
    text-shadow: 0 2px 16px rgba(0,0,0,.45);
  }
  .hero-float .npc-line:active { opacity: .88; }
  .hero-float .npc-line.playing .en { color: #fff; }
  .hero-float .npc-zh {
    font-size: 12px; line-height: 1.4;
    color: rgba(245,245,247,.42);
    text-shadow: 0 1px 8px rgba(0,0,0,.35);
    max-width: 92%;
    padding-left: 28px;
  }

  .body {
    padding: 12px 16px 20px;
    display: flex; flex-direction: column; gap: 14px;
  }

  .speak-line {
    display: flex; align-items: flex-start; gap: 8px;
    cursor: pointer; border-radius: 10px;
    padding: 2px 0; margin: 0 -2px;
    transition: background .15s ease;
    -webkit-tap-highlight-color: transparent;
    flex: 1; min-width: 0;
  }
  .speak-line:active { background: rgba(255,255,255,.03); }
  .speak-line .glyph {
    flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px;
    color: var(--faint); display: grid; place-items: center;
    transition: color .2s ease;
  }
  .speak-line.playing .glyph { color: var(--accent); }
  .speak-line .en {
    flex: 1; font-size: 15px; font-weight: 560; line-height: 1.45;
    letter-spacing: -.01em; min-width: 0;
  }
  .speak-line.playing .en { color: #fff; }

  .section-label {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; font-weight: 600; color: var(--muted);
    letter-spacing: .01em;
  }
  .section-label .sub { font-weight: 400; color: var(--faint); font-size: 11px; }

  .choices { display: flex; flex-direction: column; gap: 8px; }
  .choice {
    text-align: left;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 48px 12px 14px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .12s ease;
    -webkit-tap-highlight-color: transparent;
    appearance: none; font: inherit; color: inherit;
  }
  .choice:active { transform: scale(.985); }
  .choice.selected {
    border-color: rgba(255,159,10,.55);
    background: var(--accent-soft);
  }
  .choice .tip {
    font-size: 11px; color: var(--faint); margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
  }
  .choice.selected .tip { color: var(--accent); }
  .choice .tip .dot {
    width: 5px; height: 5px; border-radius: 99px;
    background: currentColor; opacity: .6;
  }
  .choice-row {
    display: block;
    width: 100%; min-width: 0;
    padding-right: 0;
  }
  .choice .speak-line { width: 100%; }
  .choice .speak-line .en {
    font-size: 14px; font-weight: 560;
    overflow-wrap: anywhere; word-break: break-word;
  }
  .choice .zh {
    font-size: 12px; color: var(--muted); margin-top: 6px;
    padding-left: 26px; line-height: 1.35;
  }

  .mic-btn {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    width: 36px; height: 36px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: rgba(255,255,255,.07);
    border: 1px solid var(--line-strong);
    color: var(--muted);
    cursor: pointer;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .12s ease;
    -webkit-tap-highlight-color: transparent;
    appearance: none; padding: 0;
    z-index: 2;
  }
  .mic-btn:active { transform: translateY(-50%) scale(.94); }
  .mic-btn svg { width: 18px; height: 18px; display: block; }
  .choice.selected .mic-btn {
    color: var(--ok);
    background: var(--ok-soft);
    border-color: rgba(48,209,88,.35);
  }
  .mic-btn:hover { color: var(--ink); background: rgba(255,255,255,.1); }

  button {
    appearance: none; border: none; cursor: pointer; font: inherit; color: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  button:disabled { opacity: .35; cursor: not-allowed; }
  .btn {
    border-radius: 14px; padding: 14px 16px; font-size: 15px; font-weight: 600;
    letter-spacing: -.01em; transition: opacity .15s ease, transform .12s ease;
  }
  .btn:active:not(:disabled) { transform: scale(.985); }
  .btn.primary { background: var(--ink); color: #0a0a0b; }
  .btn.block { width: 100%; }

  .pass {
    background: var(--ok-soft);
    border: 1px solid rgba(48,209,88,.22);
    border-radius: 18px; padding: 20px 18px;
    cursor: pointer;
    transition: transform .12s ease, background .2s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .pass:active { transform: scale(.985); }
  .pass .badge {
    font-size: 11px; font-weight: 700; color: var(--ok);
    letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px;
  }
  .pass .reaction { font-size: 15px; line-height: 1.5; font-weight: 500; }
  .pass .said { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.4; }
  .pass .continue {
    margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(48,209,88,.18);
    font-size: 12px; color: var(--ok); font-weight: 500;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    opacity: .85;
  }
  .pass .continue svg { width: 14px; height: 14px; }

  .done {
    flex: 1; padding: 40px 24px; text-align: center;
    display: flex; flex-direction: column; gap: 12px;
    align-items: center; justify-content: center;
  }
  .done .emoji { font-size: 48px; line-height: 1; margin-bottom: 4px; }
  .done .title { font-size: 24px; font-weight: 650; letter-spacing: -.03em; }
  .done .hint { font-size: 13px; color: var(--muted); line-height: 1.55; max-width: 260px; }
  .done .xp { font-size: 13px; color: var(--accent); font-weight: 600; margin: 4px 0 12px; }

  .toast {
    position: absolute; left: 50%; top: 52px; transform: translateX(-50%);
    background: #2c2c2e; color: var(--ink); font-size: 12px;
    padding: 8px 14px; border-radius: 999px; opacity: 0; pointer-events: none;
    transition: opacity .2s ease; z-index: 10; white-space: nowrap;
    border: 1px solid var(--line-strong);
  }
  .toast.show { opacity: 1; }

  .wave {
    display: inline-flex; gap: 2px; height: 12px; align-items: flex-end;
    margin-left: 4px; vertical-align: middle;
  }
  .wave span {
    width: 2px; background: var(--accent); border-radius: 1px;
    animation: bounce .75s ease-in-out infinite;
  }
  .wave span:nth-child(2){ animation-delay:.1s }
  .wave span:nth-child(3){ animation-delay:.2s }
  .wave span:nth-child(4){ animation-delay:.3s }
  @keyframes bounce {
    0%,100% { height: 3px; opacity: .4 }
    50% { height: 11px; opacity: 1 }
  }

  .glyph svg { width: 14px; height: 14px; display: block; }

/* V7: one phone canvas on every screen, using the supplied demo's layout. */
body{align-items:center;overflow:hidden}button{font:inherit;color:inherit}button:disabled{cursor:default;opacity:.55}button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.phone{height:100dvh}.top{display:flex;align-items:center;justify-content:space-between;min-height:54px;padding:7px 14px;border-bottom:1px solid var(--line)}.top-left{display:flex;align-items:center;gap:5px;min-width:0}.top .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:272px}.icon-btn{border:0;background:none;display:grid;place-items:center;width:36px;height:40px;flex-shrink:0;color:var(--muted)}svg{width:20px;height:20px;flex-shrink:0}.speak-line{border:0;background:none;color:inherit;text-align:left;font:inherit}.speak-line:disabled{opacity:.65}.hero img{object-position:center 38%}.hero-float .npc-line{padding:0;margin:0}.hero-float .npc-line .en{font-size:17px}.hero-float .npc-zh{color:rgba(245,245,247,.66)}.hero.compact img{filter:brightness(.8)}.choice{cursor:default;padding-right:54px}.choice .mic-btn{width:40px;height:44px;right:7px}.choice .tip{line-height:1.4}.choice .speak-line{margin:0;padding:3px 0;min-height:30px}.choice .zh{color:#a5a5ab}.body{gap:12px}.scene-goal{font-size:11px;line-height:1.6;color:var(--muted);margin-top:2px}.eyebrow{font-size:10px;letter-spacing:1.5px;color:var(--accent);font-weight:600}.library-intro{padding:27px 20px 22px;background:radial-gradient(ellipse at 90% 0,rgba(255,159,10,.08),transparent 65%)}.library-intro h1{font-size:29px;line-height:1.5;letter-spacing:-.8px;margin:10px 0 12px;font-weight:650}.library-intro p{font-size:13px;line-height:1.85;color:var(--muted)}.library-meta{margin-top:20px;display:flex;justify-content:space-between;font-size:11px;color:var(--faint)}.collection-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:12px 16px 15px;background:var(--bg);position:sticky;top:0;z-index:5}.collection-tabs button{border:1px solid var(--line-strong);background:none;color:var(--muted);border-radius:9px;min-height:36px;padding:6px 2px;font-size:12px;white-space:nowrap}.collection-tabs button.active{color:var(--accent);background:var(--accent-soft);border-color:rgba(255,159,10,.28)}.lesson-list{padding:0 16px;display:flex;flex-direction:column;gap:10px}.lesson-card{width:100%;display:flex;align-items:center;gap:13px;padding:10px;background:var(--card);border:1px solid var(--line);border-radius:14px;text-align:left;cursor:pointer}.lesson-card:active{border-color:var(--accent)}.lesson-card img{width:82px;height:100px;object-fit:cover;object-position:50% 35%;border-radius:8px;flex-shrink:0;background:#222}.lesson-copy{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}.lesson-copy strong{font-size:15px;font-weight:600;line-height:1.4}.lesson-tag{font-size:10px;color:var(--faint)}.lesson-copy>span:not(.lesson-tag):not(.lesson-state){font-size:11px;color:var(--muted);line-height:1.5}.lesson-state{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--accent);margin-top:3px}.lesson-state.complete{color:var(--ok)}.lesson-state svg{width:12px;height:12px}.lesson-card>svg{width:14px;color:var(--faint)}.library-foot{text-align:center;font-size:10px;line-height:1.9;color:var(--faint);padding:26px 15px 30px}.resume{display:flex;align-items:center;justify-content:space-between;margin:0 16px 6px;padding:13px 15px;background:var(--accent-soft);border:1px solid rgba(255,159,10,.18);border-radius:12px;text-align:left;color:var(--accent)}.resume span{font-size:10px}.resume strong{display:block;font-size:14px;color:var(--ink);margin-top:5px}.lesson-subbar{padding:7px 18px;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;color:var(--faint);font-size:10px}.lesson-subbar button{border:0;background:none;color:var(--muted);font-size:10px;padding:4px;min-height:26px}.primary-btn{display:flex;align-items:center;justify-content:center;gap:9px;border:0;border-radius:12px;background:var(--accent);color:#15110a;padding:14px 16px;width:100%;font-size:14px;font-weight:650;min-height:48px;cursor:pointer}.primary-btn svg{width:17px;height:17px}.text-btn{background:none;border:0;color:var(--muted);font-size:12px;min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px;cursor:pointer}.text-btn svg{width:14px;height:14px}.self-panel{display:flex;flex-direction:column;text-align:center;gap:2px;padding:12px 0 0;border-top:1px solid var(--line);color:var(--faint);font-size:11px}.self-panel .text-btn{color:var(--accent)}.record-panel{padding:18px 15px;border:1px solid rgba(255,159,10,.24);border-radius:14px;background:var(--accent-soft);text-align:center;scroll-margin:16px}.record-panel p{font-size:12px;color:var(--muted);line-height:1.7;margin:10px 0 15px}.record-panel>.text-btn{width:100%;margin-top:5px}.record-status{display:flex;align-items:center;justify-content:center;gap:8px;font-size:13px;color:var(--ink)}.record-dot{width:7px;height:7px;background:#ff6257;border-radius:50%;animation:record-pulse 1.3s ease infinite}#record-clock{font-variant-numeric:tabular-nums;color:var(--muted)}@keyframes record-pulse{50%{opacity:.35}}.review{padding-top:23px;gap:14px}.review-label{color:var(--ok);font-size:12px;display:flex;align-items:center;gap:7px}.review-label svg{width:17px;height:17px}.review>.speak-line .en{font-size:20px;line-height:1.6}.review-zh{font-size:13px;color:var(--muted);padding-left:26px;line-height:1.7;margin-top:-6px}.own-audio{display:flex;align-items:center;gap:9px;padding:16px 13px;background:var(--card);border:1px solid var(--line-strong);border-radius:12px;font-size:13px;text-align:left}.own-audio small{margin-left:auto;color:var(--faint);font-size:11px}.own-audio.playing{border-color:var(--accent);color:var(--accent)}.review-note{font-size:12px;line-height:1.8;color:var(--muted);margin:10px 0 0}.review-actions{display:flex;justify-content:space-between}.review-actions .text-btn{min-width:100px}.completion{padding-top:24px;gap:16px}.completion h1{font-size:24px;line-height:1.5;font-weight:650}.completion>.speak-line .en{font-size:16px}.completion-zh{font-size:13px;line-height:1.8;color:var(--muted)}.completion-count{display:flex;align-items:center;gap:15px;border-block:1px solid var(--line);padding:18px 0}.completion-count strong{font-size:38px;font-weight:500;color:var(--accent)}.completion-count span{font-size:12px;line-height:1.8}.completion-count small{font-size:10px;color:var(--faint)}.said-list h2{font-size:12px;font-weight:500;color:var(--muted);margin-bottom:8px}.said-item{display:flex;gap:10px;border-bottom:1px solid var(--line);padding:14px 0}.said-item>span{font-size:10px;color:var(--faint);padding-top:7px}.said-item>div{flex:1;min-width:0}.said-item .en{font-size:14px}.said-item p{padding-left:26px;font-size:11px;line-height:1.7;color:var(--muted);margin:4px 0}.said-item small{font-size:9px;color:var(--faint);padding-left:26px}.muted{color:var(--muted)}#help{margin:auto;width:min(358px,calc(100vw - 32px));max-height:calc(100dvh - 50px);overflow:auto;border:1px solid var(--line-strong);border-radius:18px;background:#161618;color:var(--ink);padding:30px 24px;font-size:13px;line-height:1.9}#help::backdrop{background:rgba(0,0,0,.7)}#help h2{font-size:23px;margin:7px 0 16px}#help ol{padding-left:20px}#help li{margin-bottom:10px}#help p{font-size:12px;margin:16px 0}#help .primary-btn{margin-top:24px}.help-close{position:absolute;right:12px;top:6px;font-size:24px;color:var(--muted);border:0;background:none;width:36px;height:40px}.toast{position:fixed;left:50%;bottom:30px;top:auto;width:min(350px,calc(100vw - 32px));max-width:350px;margin:0;transform:translate(-50%,10px);z-index:100;line-height:1.7;font-size:12px;pointer-events:none}.toast.show{transform:translate(-50%,0)}
@media(min-width:420px){.phone{height:min(844px,calc(100dvh - 12px))}}@media(max-width:360px){.hero-float .npc-line .en{font-size:16px}.choice .speak-line .en{font-size:13px}.library-intro h1{font-size:27px}.top .title{max-width:220px}.lesson-card{gap:10px}.lesson-card img{width:72px}.lesson-copy strong{font-size:14px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Recording stays in the current response card; no scene replacement or automatic scroll. */
.scroll{overflow-anchor:none}.choice .mic-btn{top:30px;transform:none}.choice .mic-btn:active{transform:scale(.94)}.choice.is-recording .mic-btn{color:#ff6257;background:rgba(255,98,87,.13);border-color:rgba(255,98,87,.5)}.inline-practice:empty{display:none}.inline-practice{margin-right:-40px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line-strong)}.inline-status{font-size:11px;line-height:1.7;color:var(--muted);display:flex;align-items:center;gap:6px}.inline-status svg{width:14px;height:14px}.recording-status{color:#ff8a81;flex-wrap:wrap}.recording-status #record-clock{margin-left:auto;font-size:10px}.recorded-status{color:var(--ok)}.inline-actions{display:flex;align-items:center;gap:8px;margin-top:7px}.inline-link{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:40px;background:none;border:0;padding:4px 2px;font-size:12px;color:var(--muted);cursor:pointer}.inline-link svg{width:14px;height:14px}.inline-practice .own-audio{border:0;background:none;padding:4px 2px;min-height:40px;border-radius:5px;font-size:12px}.inline-confirm{display:flex;align-items:center;justify-content:center;gap:3px;margin-left:auto;background:var(--accent);color:#17110a;border:0;border-radius:8px;min-height:40px;padding:8px 12px;font-size:12px;font-weight:600;cursor:pointer}.inline-confirm svg{width:13px;height:13px}.inline-error{font-size:11px;line-height:1.8;color:#ffb5ac}.choice.has-recording{border-color:rgba(48,209,88,.35)}

/* 1.1: one accessible hit area covers speaker, both captions and their padding. */
.hero-float.npc-audio-area{left:0;right:0;bottom:0;padding:18px;border:0;border-radius:0;background:transparent;color:inherit;text-align:left;align-items:stretch;pointer-events:auto;cursor:pointer;appearance:none;-webkit-tap-highlight-color:transparent}.npc-audio-area .npc-line{width:100%;max-width:100%;margin:0;padding:0}.npc-audio-area .who,.npc-audio-area .npc-zh{display:block}.npc-audio-area.playing .glyph{color:var(--accent)}.npc-audio-area.playing .en{color:#fff}.npc-audio-area:active{background:rgba(255,255,255,.025)}.npc-audio-area:focus-visible{outline:2px solid var(--accent);outline-offset:-5px}.npc-audio-area:disabled{cursor:default;opacity:1}.app-version{display:block;font-size:9px;letter-spacing:.7px;color:var(--faint);margin-top:8px}

/* 1.1: automatic recording, inline ASR feedback and phone-sized actions. */
.inline-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}
.inline-actions .inline-link,.inline-actions .inline-confirm{width:100%;min-height:50px;margin:0;padding:10px 4px;border:1px solid #626269;border-radius:10px;background:#28282c;color:#f5f5f7;font-size:14px;font-weight:600;gap:6px;white-space:nowrap}
.inline-actions .inline-confirm{background:var(--accent);border-color:var(--accent);color:#17110a}
.inline-actions .own-audio.playing{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.inline-actions svg{width:17px;height:17px}.recording-status #record-clock{color:#ffb1aa;font-size:12px}
.score-feedback{margin-top:10px;padding:12px;border:1px solid rgba(255,255,255,.12);background:rgba(0,0,0,.18);border-radius:10px}
.score-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--ink);font-size:12px}.score-heading strong{font-size:26px;color:var(--accent);font-variant-numeric:tabular-nums;line-height:1.2}.score-heading small{font-size:11px;color:#aaaab0;font-weight:400}
.recognized-line{margin-top:10px;font-size:13px;line-height:1.65;overflow-wrap:anywhere;color:var(--ink)}.recognized-line>span{display:block;color:#a5a5ab;font-size:10px;margin-bottom:3px}.score-hint{margin-top:8px;font-size:11px;line-height:1.7;color:#c0c0c7}.score-note{display:block;margin-top:8px;font-size:9px;color:#9999a1}.score-pending,.score-unavailable{font-size:12px;line-height:1.8;margin-top:10px;color:#c4c4cb}.record-disclosure{font-size:10px;line-height:1.7;color:#9999a1}
@media(max-width:360px){.inline-actions{gap:6px}.inline-actions .inline-link,.inline-actions .inline-confirm{font-size:13px;gap:4px}}
.feedback-title{font-size:14px;color:var(--ink);font-weight:600;line-height:1.6}.score-not-enabled .score-hint{margin-top:4px}

/* 1.1: use the scene image for the compact progress strip and feather into replies. */
.top{gap:6px;padding-inline:10px}.top-left{flex:1;overflow:hidden}.top .title{min-width:0;max-width:none}.top-actions{display:flex;align-items:center;gap:2px;flex-shrink:0}
.translation-toggle{border:0;background:none;color:#b1b1b8;font-size:11px;min-height:40px;padding:8px 5px;white-space:nowrap;border-radius:8px;cursor:pointer}
.top-actions .icon-btn{width:32px}.lesson-progress{position:absolute;z-index:3;top:12px;left:16px;right:16px;display:flex;gap:6px;height:4px;pointer-events:none}
.progress-segment{display:block;flex:1;min-width:0;height:4px;margin:0;padding:0;background:rgba(255,255,255,.28);border-radius:3px;box-shadow:0 1px 4px rgba(0,0,0,.35)}.progress-segment.is-done{background:var(--accent)}.progress-segment.is-current{background:#ffd58b}
.hero:not(.compact){height:clamp(280px,46dvh,360px);background:var(--bg)}.hero:not(.compact) img{filter:brightness(.87) saturate(1.05)}
.hero:not(.compact) .veil{background:linear-gradient(180deg,rgba(10,10,11,.23) 0%,rgba(10,10,11,0) 26%,rgba(10,10,11,.08) 43%,rgba(10,10,11,.62) 73%,var(--bg) 100%)}
.hero-float.npc-audio-area{padding:32px 18px 18px}.scene-responses{padding-top:0}.hero.compact .lesson-progress{left:12px;right:12px;top:10px}
@media(max-width:360px){.top{padding-inline:7px;gap:3px}.top-left{gap:2px}.top .title{font-size:15px}.translation-toggle{padding-inline:3px;font-size:10px}.top-actions .icon-btn{width:28px}.hero-float.npc-audio-area{padding-inline:16px}}

/* 1.1: one to three stars for recognized content; no percentage in the feedback. */
.score-stars{display:inline-flex;gap:5px;font-size:29px;line-height:1.2;letter-spacing:0}.score-stars>span{color:#55535a}.score-stars>span.lit{color:var(--accent)}

/* 1.1: the response label, both languages and padding share a native audio button. */
.choice{padding:0}.response-audio-area{display:block;width:100%;min-width:0;padding:12px 54px 12px 14px;border:0;border-radius:15px;background:transparent;color:inherit;text-align:left;appearance:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.response-audio-area .zh{display:block;padding-left:0}.response-audio-area:focus-visible{outline-offset:-3px}.response-audio-area:disabled{opacity:1;cursor:default}.response-audio-area.playing .en{color:#ffd58b}
.choice>.inline-practice{margin:0 14px 12px;padding-top:10px}.choice>.inline-practice:empty{margin:0}
.choice:active{transform:none}.response-audio-area:active{background:rgba(255,255,255,.025)}

/* 1.1: feedback is only an ellipsis followed by stars. */
.score-feedback{display:flex;align-items:center;justify-content:center;min-height:42px;margin:0;padding:0;border:0;border-radius:0;background:none}.score-feedback.score-pending{margin:0;color:var(--accent);font-size:28px;line-height:1.2;letter-spacing:.1em}.score-unavailable{margin:0;min-height:42px;display:flex;align-items:center;justify-content:center;font-size:12px;color:var(--muted)}

/* 1.1: homepage practice status is color, with one shared legend. */
.lesson-card.is-unpracticed{border-color:rgba(255,159,10,.45);background:var(--card)}.lesson-card.is-practiced{border-color:rgba(48,209,88,.3);background:rgba(48,209,88,.11)}.status-key,.status-key>span{display:inline-flex;align-items:center;gap:5px}.status-key{gap:12px;color:#aaaab1;font-size:10px}.status-swatch{display:inline-block;width:10px;height:10px;border-radius:3px;flex-shrink:0}.status-swatch.untouched{border:1px solid rgba(255,159,10,.7);background:transparent}.status-swatch.practiced{border:1px solid rgba(48,209,88,.4);background:rgba(48,209,88,.48)}

/* Portrait art keeps the speaker's full face above the dialogue overlay. */
.hero[data-lesson="project-trailer"] img,.hero[data-lesson="haircut"] img{object-position:50% 22%}

/* A small cached cover remains visible until the decoded scene picture is ready. */
.hero img.scene-preview{filter:blur(3px) brightness(.72)}

/* 1.23: each scene carries its light, paper and accent colors into the dialogue. */
:root[data-palette="sunlight"]{
 --bg:#fff3e7;--surface:#fff9f1;--card:#fffaf3;--ink:#432a1b;--muted:#80695b;--faint:#80695b;--accent:#ae542d;--accent-soft:#ffe1c7;--ok:#3c7652;--ok-soft:#dcebd9;--line:#ead8c8;--line-strong:#d6bba5;--scene-rgb:255,243,231;--outside:#eee4d9;--shadow:rgba(110,67,34,.11);
}
:root[data-palette="seafoam"]{
 --bg:#edf8f3;--surface:#f5fcf8;--card:#f8fcf9;--ink:#213f3b;--muted:#58756d;--faint:#58756d;--accent:#316d66;--accent-soft:#cfeae1;--ok:#3c7652;--ok-soft:#d8eadb;--line:#d2e7dc;--line-strong:#a8cbbd;--scene-rgb:237,248,243;--outside:#dbeae4;--shadow:rgba(37,91,71,.1);
}
:root[data-palette="lilac"]{
 --bg:#f4effb;--surface:#fbf8ff;--card:#fdfaff;--ink:#3f3451;--muted:#786788;--faint:#786788;--accent:#755097;--accent-soft:#e6d9f5;--ok:#447753;--ok-soft:#dcebdc;--line:#e2d7ed;--line-strong:#c6afd9;--scene-rgb:244,239,251;--outside:#e8e0ef;--shadow:rgba(89,58,115,.1);
}
:root[data-palette="coral"]{
 --bg:#fff0ec;--surface:#fff8f4;--card:#fffaf7;--ink:#523329;--muted:#85695e;--faint:#85695e;--accent:#ad5545;--accent-soft:#fbd8cd;--ok:#3f7653;--ok-soft:#dcebdc;--line:#eed4ca;--line-strong:#dab0a0;--scene-rgb:255,240,236;--outside:#f0ded7;--shadow:rgba(127,67,48,.1);
}
:root[data-palette="twilight"]{
 --bg:#211c31;--surface:#292237;--card:#30283f;--ink:#f7efff;--muted:#c3b2d1;--faint:#b9a5c9;--accent:#efbd83;--accent-soft:#49394b;--ok:#a8d3b4;--ok-soft:#30483e;--line:#493b59;--line-strong:#6d567f;--scene-rgb:33,28,49;--outside:#161322;--shadow:rgba(0,0,0,.2);
}
:root[data-palette="slate"]{
 --bg:#182831;--surface:#1e323c;--card:#233a44;--ink:#eaf6f6;--muted:#aac5cc;--faint:#a0bec8;--accent:#91d4ca;--accent-soft:#294d53;--ok:#a7d7b7;--ok-soft:#2b4c43;--line:#35535f;--line-strong:#527887;--scene-rgb:24,40,49;--outside:#101d24;--shadow:rgba(0,0,0,.2);
}
body{background:var(--outside,#eee4d9);transition:background-color .2s ease;color:var(--ink)}
.phone{background:var(--bg);box-shadow:0 20px 70px var(--shadow);border-color:var(--line-strong)}
.top{background:var(--bg);border-bottom-color:var(--line);position:relative;z-index:6}
.top .title{font-weight:650;letter-spacing:-.03em}.icon-btn,.translation-toggle{color:var(--muted)}
.collection-tabs{padding-top:14px;padding-bottom:16px;gap:7px;background:var(--bg)}
.collection-tabs button{min-height:39px;border-radius:12px;background:var(--surface);border-color:var(--line);color:var(--muted)}
.collection-tabs button.active{background:var(--accent-soft);border-color:var(--line-strong);color:var(--accent);box-shadow:0 2px 6px var(--shadow)}
.lesson-list{gap:12px}.lesson-card{border-radius:19px;background:var(--card);color:var(--ink);box-shadow:0 4px 12px var(--shadow);padding:10px 11px}
.lesson-card img{border-radius:12px}.lesson-card.is-unpracticed{border-color:var(--line-strong);background:var(--card)}
.lesson-card.is-practiced{border-color:var(--ok);background:var(--ok-soft)}
.lesson-copy strong{letter-spacing:-.02em}.lesson-copy>span:not(.lesson-tag):not(.lesson-state){color:var(--muted)}
.lesson-tag{color:var(--accent)}.lesson-card>svg{color:var(--muted)}
.hero:not(.compact){height:clamp(330px,51dvh,420px);background:var(--bg)}
.hero:not(.compact) img{filter:brightness(1.04) saturate(1.04);object-position:50% 27%}
.hero:not(.compact) img.scene-preview{filter:blur(3px) brightness(1.04) saturate(1.04)}
.hero:not(.compact) .veil{background:linear-gradient(180deg,rgba(var(--scene-rgb),.04) 0%,rgba(var(--scene-rgb),0) 35%,rgba(var(--scene-rgb),.08) 45%,rgba(var(--scene-rgb),.68) 68%,rgba(var(--scene-rgb),.97) 88%,var(--bg) 100%)}
.hero-float.npc-audio-area{padding:28px 18px 20px;gap:7px;background:transparent;color:var(--ink)}
.npc-meta{display:flex;align-items:center;position:relative;min-height:28px;width:100%;padding-right:54px}
.hero-float .who{color:var(--accent);text-shadow:none;font-size:10px;letter-spacing:.08em;line-height:1.5}
.hero-float .npc-line{gap:8px}.hero-float .npc-line .glyph{color:var(--accent);filter:none;opacity:.8;margin-top:3px}
.hero-float .npc-line .en{color:var(--ink);text-shadow:none;font-size:18px;font-weight:650;line-height:1.38;letter-spacing:-.02em}
.hero-float .npc-zh{color:var(--muted);text-shadow:none;line-height:1.5;font-size:12px;max-width:100%;padding-left:28px}
.npc-audio-area.playing .en{color:var(--accent)}.npc-audio-area:active{background:rgba(var(--scene-rgb),.12)}
.scene-responses{padding-top:0;padding-inline:16px;gap:10px}.choices{gap:10px}
.choice{--reply:#ac5937;--reply-soft:#fff6eb;--reply-line:#edcbb2;border-radius:18px;border-color:var(--reply-line);background:var(--reply-soft);box-shadow:0 4px 11px var(--shadow);overflow:visible}
.choice:nth-child(2){--reply:#4f7757;--reply-soft:#f5faf1;--reply-line:#c9ddc2}
.choice:nth-child(3){--reply:#7b5b99;--reply-soft:#fcf6ff;--reply-line:#dfcaef}
.choice.selected{border-color:var(--reply);background:var(--reply-soft);box-shadow:0 0 0 1px var(--reply-line),0 5px 13px var(--shadow)}
.response-audio-area{padding:11px 59px 13px 14px;border-radius:17px}
.choice .tip{min-height:29px;margin-bottom:5px;position:relative;padding-right:46px;color:var(--muted);font-size:10px;gap:5px}
.choice .tip .dot{width:4px;height:4px;opacity:.7}.choice.selected .tip{color:var(--reply)}
.tip-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.choice .speak-line{padding:0;margin:0;min-height:22px}
.choice .speak-line .en{font-size:15px;line-height:1.43;font-weight:600;letter-spacing:-.015em}
.response-audio-area.playing .en{color:var(--reply)}
.choice .zh{color:var(--muted);font-size:11px;line-height:1.5;margin-top:7px}
.choice .mic-btn{top:40px;right:10px;width:40px;height:44px;border-radius:50%;color:var(--reply);border-color:var(--reply-line);background:var(--reply-soft);box-shadow:inset 0 0 0 1px var(--reply-line)}
.choice.selected .mic-btn{color:var(--reply);border-color:var(--reply);background:var(--reply-soft)}
.choice .mic-btn:hover{color:var(--reply);background:var(--reply-line)}
.choice.is-recording .mic-btn{color:#aa3c35;background:#ffded7;border-color:#b9564d;box-shadow:0 0 0 3px rgba(185,86,77,.1)}
.choice.has-recording{border-color:var(--ok)}
.choice>.inline-practice{margin:0 13px 12px;border-top-color:var(--reply-line)}
.inline-status,#record-clock,.inline-error,.score-unavailable{color:var(--muted)}
.recording-status,.recording-status #record-clock{color:#a54034}.inline-error{color:#a54034}
.inline-actions{gap:7px}.inline-actions .inline-link,.inline-actions .inline-confirm{border-color:var(--line-strong);background:var(--surface);color:var(--ink);min-height:48px;border-radius:12px;font-size:13px}
.inline-actions .inline-confirm{background:var(--accent);border-color:var(--accent);color:var(--bg)}
.inline-actions .own-audio.playing{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.score-stars>span{color:var(--line-strong)}.score-stars>span.lit{color:var(--accent)}
.scene-goal{color:var(--muted);font-size:10px;line-height:1.6;margin-top:3px;opacity:.85}
.primary-btn{color:var(--bg)}
#help{background:var(--surface);color:var(--ink);border-color:var(--line-strong);box-shadow:0 20px 80px var(--shadow)}
#help::backdrop{background:rgba(26,21,23,.48)}
.toast{background:var(--surface);color:var(--ink);border-color:var(--line-strong);box-shadow:0 8px 30px var(--shadow)}
:root[data-palette="twilight"] .hero:not(.compact) img,:root[data-palette="slate"] .hero:not(.compact) img{filter:brightness(.98) saturate(1.06)}
:root[data-palette="twilight"] .hero:not(.compact) img.scene-preview,:root[data-palette="slate"] .hero:not(.compact) img.scene-preview{filter:blur(3px) brightness(.98) saturate(1.06)}
:root[data-palette="twilight"] .choice{--reply:#efbd83;--reply-soft:#362b42;--reply-line:#6b4c65}
:root[data-palette="twilight"] .choice:nth-child(2){--reply:#a9d2b4;--reply-soft:#2c3a3d;--reply-line:#496b63}
:root[data-palette="twilight"] .choice:nth-child(3){--reply:#ceb0ed;--reply-soft:#362c49;--reply-line:#72558e}
:root[data-palette="slate"] .choice{--reply:#e8b58b;--reply-soft:#313d44;--reply-line:#716255}
:root[data-palette="slate"] .choice:nth-child(2){--reply:#9fd4c3;--reply-soft:#243f43;--reply-line:#49756e}
:root[data-palette="slate"] .choice:nth-child(3){--reply:#c5b7e6;--reply-soft:#303d50;--reply-line:#63708f}
:root[data-palette="twilight"] .choice.is-recording .mic-btn,:root[data-palette="slate"] .choice.is-recording .mic-btn{color:#ffb6a8;background:#583943;border-color:#dd8c82}
:root[data-palette="twilight"] .recording-status,:root[data-palette="twilight"] .recording-status #record-clock,:root[data-palette="slate"] .recording-status,:root[data-palette="slate"] .recording-status #record-clock,:root[data-palette="twilight"] .inline-error,:root[data-palette="slate"] .inline-error{color:#ffb6a8}
@media(max-width:360px){
 .hero:not(.compact){height:clamp(330px,52dvh,390px)}.hero-float.npc-audio-area{padding-inline:16px}
 .hero-float .npc-line .en{font-size:16px}.hero-float .npc-zh{font-size:11px}
 .response-audio-area{padding-left:12px;padding-right:57px}.choice .speak-line .en{font-size:14px}.choice .zh{font-size:10px}.choice .mic-btn{right:8px;width:38px;height:42px}.inline-actions .inline-link,.inline-actions .inline-confirm{font-size:12px;gap:4px}
}



/* 1.24 preview: homepage color communicates practice state only. */
:root[data-palette="home"]{
 --bg:#f8f7f3;--surface:#fffefa;--card:#fffefa;--ink:#30362f;--muted:#74766d;--faint:#74766d;--accent:#776445;--accent-soft:#ede8dd;--ok:#417349;--ok-soft:#deeddc;--line:#e5e2d9;--line-strong:#c6b99f;--scene-rgb:248,247,243;--outside:#eeede9;--shadow:rgba(49,53,40,.06);
}
.phone[data-view="home"]{box-shadow:0 14px 45px rgba(49,53,40,.06)}
.phone[data-view="home"] .top{border-bottom-color:#e7e4dc}
.phone[data-view="home"] .collection-tabs{padding-bottom:10px;gap:7px}
.phone[data-view="home"] .collection-tabs button{
 background:var(--tab-tint,#fffefa);border-color:var(--tab-line,#dfdbd0);
 border-radius:10px;box-shadow:none;color:var(--tab-ink,#77756c)
}
.phone[data-view="home"] .collection-tabs button[data-filter="journey"]{
 --tab-ink:#8d5929;--tab-tint:#fbf3e7;--tab-line:#d9c09e;
 --tab-active:#f0d5ac;--tab-active-line:#b17b3d;--tab-selected-ink:#704317;
}
.phone[data-view="home"] .collection-tabs button[data-filter="everyday"]{
 --tab-ink:#326c60;--tab-tint:#eff7f2;--tab-line:#b9d7c8;
 --tab-active:#cce6d9;--tab-active-line:#568c73;--tab-selected-ink:#245846;
}
.phone[data-view="home"] .collection-tabs button[data-filter="campus"]{
 --tab-ink:#456a93;--tab-tint:#f0f5fb;--tab-line:#bfd1e5;
 --tab-active:#d8e6f5;--tab-active-line:#6488b1;--tab-selected-ink:#315377;
}
.phone[data-view="home"] .collection-tabs button[data-filter="imagination"]{
 --tab-ink:#76548f;--tab-tint:#f7f1fc;--tab-line:#d9c8e8;
 --tab-active:#e8d9f3;--tab-active-line:#9672b0;--tab-selected-ink:#5c3b77;
}
.phone[data-view="home"] .collection-tabs button.active{
 background:var(--tab-active,#ede8dd);border-color:var(--tab-active-line,#bcae94);
 color:var(--tab-selected-ink,#554932);font-weight:650;
 box-shadow:inset 0 0 0 1px var(--tab-active-line,#bcae94)
}
.phone[data-view="home"] .collection-tabs button:focus-visible{outline-color:var(--tab-active-line,#bcae94)}
.practice-key{display:flex;justify-content:flex-end;align-items:center;gap:14px;padding:0 18px 11px;font-size:10px;color:#74766d;line-height:1.4}
.practice-key>span{display:inline-flex;align-items:center;gap:5px}
.practice-swatch{display:inline-block;width:9px;height:9px;border-radius:2px;flex:none}
.practice-swatch.is-new{background:#fffefa;border:1px solid #b9a47d}
.practice-swatch.is-done{background:#9bbd98;border:1px solid #65956a}
.phone[data-view="home"] .lesson-list{gap:10px}
.phone[data-view="home"] .lesson-card{border-radius:14px;box-shadow:none;color:#30362f}
.phone[data-view="home"] .lesson-card.is-unpracticed{background:#fffefa;border-color:#c9b895}
.phone[data-view="home"] .lesson-card.is-practiced{background:#deeddc;border-color:#6f9d74}
.phone[data-view="home"] .lesson-card img{border-radius:9px}
.phone[data-view="home"] .lesson-tag{color:#74766d}
.phone[data-view="home"] .lesson-copy>span:not(.lesson-tag):not(.lesson-state){color:#74766d}
.phone[data-view="home"] .lesson-card>svg{color:#9a9c91}
.practice-check{display:grid;place-items:center;width:22px;height:22px;flex:none;color:#417349}
.practice-check svg{width:18px;height:18px;stroke-width:2.3}
/* Inline symbols carry the line's meaning without changing spoken source text. */
.inline-emoji{display:inline;font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;font-size:.94em;font-style:normal;font-weight:400;line-height:1;vertical-align:-.03em;margin-inline-start:.12em;white-space:nowrap}
.npc-meta{min-height:15px;padding-right:0}
.choice .tip{min-height:15px;padding-right:0;margin-bottom:7px}
.choice .mic-btn{top:29px}
@media(max-width:360px){.practice-key{padding-inline:16px}.choice .mic-btn{top:28px}}

/* Local concept A: two clear actions; the whole text area still plays the sentence. */
.choice .response-audio-area{padding:11px 14px 4px}.choice-tools{display:flex;justify-content:flex-end;gap:8px;padding:2px 12px 11px}.choice .choice-tools .mic-btn,.choice .choice-tools .slow-btn{position:static;transform:none;display:inline-flex;align-items:center;justify-content:center;gap:5px;width:auto;height:44px;min-width:82px;padding:0 12px;border:1px solid var(--reply-line);border-radius:12px;background:transparent;color:var(--reply);box-shadow:none;font-size:12px;font-weight:650;white-space:nowrap;cursor:pointer}.choice .choice-tools .mic-btn{background:var(--reply-soft)}.choice .choice-tools .mic-btn svg,.choice .choice-tools .slow-btn svg{width:16px;height:16px}.choice .choice-tools .slow-btn[aria-pressed="true"]{background:var(--reply);border-color:var(--reply);color:var(--reply-soft)}.choice .choice-tools .mic-btn:disabled,.choice .choice-tools .slow-btn:disabled{opacity:.45}.choice.is-recording .choice-tools .mic-btn{background:#ffded7;border-color:#b9564d;color:#a54034}.choice .slow-word{border-radius:4px;transition:background .12s,color .12s}.choice .slow-word.is-speaking{background:var(--reply);color:var(--reply-soft);box-shadow:0 0 0 1px var(--reply)}
@media(max-width:360px){.choice-tools{padding-inline:10px;gap:7px}.choice .choice-tools .mic-btn,.choice .choice-tools .slow-btn{min-width:80px;padding-inline:10px}}

/* A compact action rail beside the sentence, with one touch target per action. */
.choice{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}
.choice .response-audio-area{grid-column:1;min-height:68px;padding:13px 4px 13px 14px}
.choice-tools{grid-column:2;display:flex;align-items:center;justify-content:center;gap:0;padding:0 7px 0 3px}
.choice .choice-tools .slow-btn,.choice .choice-tools .mic-btn{position:static;transform:none;width:44px;height:44px;min-width:44px;padding:0;border:0;border-radius:11px;box-shadow:none;background:transparent;color:var(--reply)}
.choice .choice-tools .slow-btn{width:54px;min-width:54px;font-size:12px;font-weight:650}
.choice .choice-tools .mic-btn{border-left:1px solid var(--reply-line);border-radius:0 11px 11px 0}
.choice .choice-tools .mic-btn svg{width:19px;height:19px}
.choice .choice-tools .slow-btn[aria-pressed="true"]{background:var(--reply);color:var(--reply-soft)}
.choice.is-recording .choice-tools .mic-btn{background:#ffded7;color:#a54034;border-left-color:#b9564d}
.choice>.inline-practice{grid-column:1 / -1;width:auto;min-width:0}
@media(max-width:360px){.choice .response-audio-area{padding-left:12px}.choice-tools{padding-right:5px}.choice .choice-tools .slow-btn{width:51px;min-width:51px;font-size:12px}}

/* Paired phrase highlights support different English and Chinese word order. */
.choice .phrase-mark{border-radius:4px;transition:background .12s,color .12s}
.choice .phrase-mark.is-speaking{background:var(--reply);color:var(--reply-soft);box-shadow:0 0 0 1px var(--reply)}

/* Recording countdown: a shrinking ring replaces the microphone until recording ends. */
.choice.is-recording .choice-tools .mic-btn{background:transparent;color:#a54034;border-left-color:var(--reply-line)}
.record-ring{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:conic-gradient(#bf5d48 var(--remaining),#efd2c8 0);padding:3px;flex:none}
.record-ring-number{display:grid;place-items:center;width:100%;height:100%;border-radius:50%;background:var(--reply-soft);font-size:14px;font-weight:750;line-height:1;color:#9e4433;font-variant-numeric:tabular-nums}
.recording-strip{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:30px}
.recording-strip .inline-link{min-height:32px;padding:0 4px;color:var(--muted)}
:root[data-palette="twilight"] .record-ring-number,:root[data-palette="slate"] .record-ring-number{color:#ffd0c4}

/* The selected response alone exposes its practice controls. */
.choice:not(.selected) .choice-tools{display:none}

/* Progress is drawn continuously clockwise from the top while seconds count down. */
.record-ring{padding:0;background:none}
.choice .choice-tools .mic-btn .record-ring-svg{grid-area:1 / 1;width:38px;height:38px;transform:rotate(-90deg);overflow:visible}
.record-ring-track,.record-ring-progress{fill:none;stroke-width:3}
.record-ring-track{stroke:#efd2c8}
.record-ring-progress{stroke:#bf5d48;stroke-linecap:round;stroke-dasharray:100.530965;stroke-dashoffset:100.530965;animation:record-circle var(--record-duration) linear var(--record-delay) forwards}
.record-ring-number{grid-area:1 / 1;width:30px;height:30px}
@keyframes record-circle{from{stroke-dashoffset:100.530965}to{stroke-dashoffset:0}}

/* 1.25 visual refinement: let the scene image lead, with one restrained accent. */
:root[data-palette="coral"]{
 --bg:#141311;--surface:#1b1a18;--card:#201e1b;--ink:#f3eee6;--muted:#bdb5aa;--faint:#9c9489;
 --accent:#d2a071;--accent-soft:#352b22;--ok:#bfb5a5;--ok-soft:#302d27;
 --line:#35322d;--line-strong:#66584a;--scene-rgb:20,19,17;--outside:#0e0d0c;--shadow:rgba(0,0,0,.15);
}
:root[data-palette="coral"] .hero:not(.compact) img{filter:brightness(.98) saturate(.96)}
:root[data-palette="coral"] .hero:not(.compact) img.scene-preview{filter:blur(3px) brightness(.98) saturate(.96)}
:root[data-palette="coral"] .hero:not(.compact) .veil{background:linear-gradient(180deg,rgba(20,19,17,.16) 0%,rgba(20,19,17,0) 45%,rgba(20,19,17,.18) 60%,rgba(20,19,17,.79) 82%,#141311 100%)}
.phone[data-view="lesson"] .hero-float .npc-line .en{font-weight:560}
.phone[data-view="lesson"] .hero-float .npc-zh{font-size:12px}
.phone[data-view="lesson"] .choice,
.phone[data-view="lesson"] .choice:nth-child(2),
.phone[data-view="lesson"] .choice:nth-child(3){--reply:var(--accent);--reply-soft:var(--card);--reply-line:var(--line-strong);background:var(--card);border:1px solid var(--line);box-shadow:none;border-radius:15px}
.phone[data-view="lesson"] .choice.selected,
.phone[data-view="lesson"] .choice.has-recording{border-color:var(--line-strong);box-shadow:none;background:var(--card)}
.phone[data-view="lesson"] .choice .speak-line .en{font-weight:500}
.phone[data-view="lesson"] .choice .zh{font-size:12px;color:var(--muted)}
.phone[data-view="lesson"] .choice>.inline-practice{border-top-color:var(--line)}
.phone[data-view="lesson"] .score-feedback{justify-content:flex-start;min-height:28px}
.phone[data-view="lesson"] .score-stars{font-size:19px;gap:4px;line-height:1}
.phone[data-view="lesson"] .score-stars>span{color:var(--line-strong)}
.phone[data-view="lesson"] .score-stars>span.lit{color:var(--accent)}
.phone[data-view="lesson"] .inline-actions{display:flex;align-items:center;gap:4px;margin-top:7px}
.phone[data-view="lesson"] .inline-actions .inline-link{width:auto;min-width:58px;min-height:44px;padding:0 6px;border:0;border-radius:8px;background:transparent;box-shadow:none;color:var(--muted);font-size:12px;font-weight:500}
.phone[data-view="lesson"] .inline-actions .inline-confirm{width:auto;min-width:94px;min-height:44px;margin-left:auto;padding:0 14px;border:0;border-radius:10px;background:var(--accent);color:var(--bg);font-size:13px;font-weight:650}
.phone[data-view="lesson"] .inline-actions .inline-link:focus-visible,.phone[data-view="lesson"] .inline-actions .inline-confirm:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.phone[data-view="lesson"] .inline-actions .own-audio.playing{background:var(--accent-soft);color:var(--accent)}
.phone[data-view="lesson"] .recording-status{color:var(--accent)}
.phone[data-view="lesson"] .record-dot{background:currentColor}
.phone[data-view="lesson"] .record-ring-track{stroke:var(--line-strong)}
.phone[data-view="lesson"] .record-ring-progress{stroke:var(--accent)}
.phone[data-view="lesson"] .record-ring-number{background:var(--card);color:var(--ink)}
.phone[data-view="lesson"] .choice.is-recording .choice-tools .mic-btn{background:transparent;color:var(--accent);border-left-color:var(--line-strong)}

/* Light scenes keep their photographs clear until the lower edge, fading only behind the dialogue. */
:root[data-palette="sunlight"] .hero:not(.compact) .veil,
:root[data-palette="seafoam"] .hero:not(.compact) .veil,
:root[data-palette="lilac"] .hero:not(.compact) .veil{background:linear-gradient(180deg,rgba(var(--scene-rgb),.03) 0%,rgba(var(--scene-rgb),0) 52%,rgba(var(--scene-rgb),.08) 60%,rgba(var(--scene-rgb),.78) 78%,var(--bg) 96%)}

/* Image-matched scene themes; Radix Sand Dark neutral scale for warm night photography. */
:root[data-palette="coral"]{
 --bg:#111110;--surface:#191918;--card:#222221;--ink:#eeeeec;--muted:#b4b2ac;--faint:#b4b2ac;
 --accent:#d2a071;--accent-soft:#352b22;--ok:#b4b2ac;--ok-soft:#31312e;
 --line:#3b3a37;--line-strong:#7c7a73;--scene-rgb:17,17,16;--outside:#0d0d0c;
}
:root[data-palette="coral"] .hero:not(.compact) .veil{background:linear-gradient(180deg,rgba(17,17,16,.16) 0%,rgba(17,17,16,0) 45%,rgba(17,17,16,.18) 60%,rgba(17,17,16,.79) 82%,#111110 100%)}
:root[data-palette="coral"] .inline-error{color:#ffb6a8}
/* A quiet protective strip keeps progress readable on photographs of any brightness. */
.lesson-progress{isolation:isolate}
.lesson-progress::before{content:"";position:absolute;inset:-4px -6px;border-radius:7px;background:#181713;z-index:-1;pointer-events:none}
.progress-segment{background:#77736e;box-shadow:none}
.progress-segment.is-done,.progress-segment.is-current{background:#ffd58b}
/* Small labels remain readable in both untouched and practiced cards. */
.phone[data-view="home"] .practice-key{font-size:12px;color:#62665c}
.phone[data-view="home"] .practice-swatch{width:11px;height:11px}
.phone[data-view="home"] .lesson-tag,.phone[data-view="home"] .lesson-copy>span:not(.lesson-tag):not(.lesson-state){color:#62665c;font-size:12px}
.phone[data-view="home"] .lesson-card>svg{color:#777a6c}
.phone[data-view="lesson"] .scene-goal{font-size:12px;color:var(--muted);opacity:1}

/* Keep dialogue on a stable surface, with a short transition instead of a full-image haze. */
.phone[data-view="lesson"] .hero:not(.compact) .veil{background:none}
.phone[data-view="lesson"] .hero-float.npc-audio-area{background:var(--bg);padding:14px 18px 18px}
.phone[data-view="lesson"] .hero-float.npc-audio-area::before{content:"";position:absolute;left:0;right:0;top:-30px;height:30px;background:linear-gradient(to bottom,rgba(var(--scene-rgb),0),var(--bg));pointer-events:none}
.phone[data-view="lesson"] .hero-float.npc-audio-area:active{background:var(--bg)}

/* Cantonese annotation sits under the target line, within the English 2.0 layout. */
.phone[data-view="home"] .collection-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
.canto-jp,.npc-jp{display:block;color:var(--muted);font:10px/1.55 ui-monospace,SFMono-Regular,monospace;letter-spacing:0;overflow-wrap:anywhere}
.canto-jp{margin-top:4px}.npc-jp{padding-left:28px}.canto-feedback{font-size:11px;line-height:1.7;color:var(--muted);margin:4px 0 8px}
