/* Listen & Shadow — premium tutor player (cream/pastel family) */
:root{
  --cream:#FFF9F0;--panel:#fff;--ink:#1e3a5f;--muted:#5b6b7c;
  --line:#ffe4c4;--peach:#FFD6A5;--coral:#FF4D6D;--sky:#0EA5E9;
  --teal:#2DD4BF;--amber:#FFD166;--violet:#A78BFA;--mint:#86EFAC;
  --player-h:0px;--focus:#0EA5E9;--good:#10B981;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;min-height:100vh;min-height:100dvh;color:var(--ink);
  font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,-apple-system,sans-serif;
  background:var(--cream);
  background-image:
    radial-gradient(circle at 8% 4%,#FFD6A566 0 14px,transparent 15px),
    radial-gradient(circle at 94% 8%,#A5F3FC55 0 12px,transparent 13px),
    radial-gradient(circle at 86% 96%,#FBCFE855 0 12px,transparent 13px),
    radial-gradient(900px 380px at 0% -8%,#BAE6FD88,transparent 55%),
    radial-gradient(760px 360px at 100% 0%,#FECDD388,transparent 55%);
  padding-bottom:calc(var(--player-h) + 12px + env(safe-area-inset-bottom));
}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer;border:none;touch-action:manipulation;background:none;color:inherit}
.hide{display:none!important}
.wrap{max-width:720px;margin:0 auto;padding:0 14px}

/* —— top —— */
.ls-top{
  position:sticky;top:0;z-index:40;
  background:linear-gradient(#fffffffA,#fff9f0f2);backdrop-filter:blur(14px);
  border-bottom:2px solid var(--line);padding-top:env(safe-area-inset-top);
}
.ls-top-in{display:flex;align-items:center;gap:8px;padding:8px 14px;max-width:720px;margin:0 auto}
.ls-back{
  width:40px;height:40px;border-radius:14px;background:#FFF7ED;border:2px solid var(--peach);
  display:flex;align-items:center;justify-content:center;font-size:17px;flex:none;
  box-shadow:0 2px 0 #ffd6a588;
}
.ls-brand{flex:1;min-width:0}
.ls-brand b{display:block;font-size:14px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ls-brand span{display:block;font-size:11px;color:var(--muted);font-weight:700}
.ls-prog{
  flex:none;min-width:72px;text-align:right;
  font-size:12px;font-weight:900;color:#0369A1;line-height:1.2;
}
.ls-prog em{display:block;font-style:normal;font-size:18px;color:var(--ink);letter-spacing:-.02em}
.ls-prog-bar{
  height:4px;background:#ffe4c4;border-radius:99px;overflow:hidden;margin-top:4px;
}
.ls-prog-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#2DD4BF,#0EA5E9);border-radius:99px;transition:width .25s ease}

/* slim lesson strip */
.ls-strip{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:10px 0 4px;
}
.ls-strip .kicker{
  font-size:12px;font-weight:800;padding:4px 10px;border-radius:999px;
  background:#E0F2FE;border:2px solid #7DD3FC;color:#0369A1;
}
.ls-strip .zh{font-size:13px;font-weight:800;color:var(--muted)}
.ls-strip .meta{margin-left:auto;font-size:11px;font-weight:800;color:#94a3b8}

/* —— focus card (hero of attention) —— */
.focus-card{
  position:relative;background:#fff;
  border:3px solid var(--line);border-radius:26px;
  box-shadow:0 10px 0 #ffd6a566,0 18px 36px -22px #0ea5e944;
  overflow:hidden;margin:8px 0 12px;
}
.focus-wash{
  position:absolute;inset:0;pointer-events:none;opacity:.55;
  background:linear-gradient(160deg,#E0F2FE 0%,#FEF3C7 50%,#FCE7F3 100%);
  transition:background .35s ease;
}
.focus-body{position:relative;padding:16px 16px 14px;text-align:center}
.focus-top{
  display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;
}
.spk-chip{
  display:inline-flex;align-items:center;gap:7px;
  padding:4px 10px 4px 4px;border-radius:999px;
  background:#fff;border:2px solid #e2e8f0;font-size:12px;font-weight:800;
  box-shadow:0 2px 0 #0001;
}
.spk-chip .av{
  width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:15px;background:#e0f2fe;
}
.focus-idx{
  font-size:12px;font-weight:900;color:#64748b;
  background:#fff;border:2px solid #e2e8f0;border-radius:999px;padding:4px 10px;
}
.sent-en{
  font-family:Georgia,"Times New Roman","Songti SC",serif;
  font-size:clamp(22px,6.2vw,30px);font-weight:700;line-height:1.4;
  padding:10px 8px 4px;min-height:2.8em;
  color:var(--ink);letter-spacing:.01em;
}
.sent-en.hl{animation:pulseTxt .45s ease}
@keyframes pulseTxt{0%{transform:scale(1)}45%{transform:scale(1.015)}100%{transform:scale(1)}}
.sent-zh{
  font-size:14px;color:var(--muted);font-weight:700;
  padding:0 8px 8px;min-height:1.35em;transition:opacity .2s;
}
.sent-zh.off{opacity:0;height:0;min-height:0;padding:0;overflow:hidden}
.focus-tools{
  display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;
  padding-top:4px;
}
.tool-btn{
  min-height:34px;padding:6px 12px;border-radius:999px;font-size:12px;font-weight:800;
  background:#fff;border:2px solid var(--line);color:#475569;
}
.tool-btn.on{background:#FEF3C7;border-color:#FCD34D;color:#92400E}
.score-chip{
  display:inline-flex;align-items:center;gap:4px;padding:5px 11px;border-radius:999px;
  background:#ECFDF5;border:2px solid #86EFAC;font-size:12px;font-weight:900;color:#047857;
}
.score-chip.empty{background:#F8FAFC;border-color:#E2E8F0;color:#94a3b8}

/* progress dots under focus */
.dots{
  display:flex;flex-wrap:wrap;justify-content:center;gap:5px;padding:2px 0 8px;
}
.dots button{
  width:11px;height:11px;border-radius:50%;background:#ffd6a5;border:2px solid transparent;
  transition:transform .15s,background .15s;
}
.dots button.on{background:linear-gradient(135deg,#38BDF8,#0EA5E9);transform:scale(1.3);border-color:#7DD3FC}
.dots button.done{background:#FCD34D;border-color:#F59E0B}
.dots button.scored{background:#34D399;border-color:#10B981}

/* —— sticky player —— */
.player{
  position:fixed;left:0;right:0;bottom:0;z-index:50;
  background:linear-gradient(180deg,#fffffffC,#FFF9F0);
  border-top:3px solid var(--line);
  box-shadow:0 -14px 40px -18px #0ea5e955;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));
}
.player-in{max-width:720px;margin:0 auto}
.rail{
  display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;
}
.seg{
  display:inline-flex;background:#FFF7ED;border:2px solid var(--peach);border-radius:999px;
  padding:3px;gap:2px;box-shadow:0 2px 0 #ffd6a555;
}
.seg button{
  min-height:34px;padding:6px 11px;border-radius:999px;font-size:12px;font-weight:800;
  color:#9A3412;white-space:nowrap;
}
.seg button.on{
  background:linear-gradient(135deg,#38BDF8,#0EA5E9);color:#fff;
  box-shadow:0 2px 0 #0284c766;
}
.spd-mini{display:inline-flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.spd-btn{
  min-height:34px;min-width:40px;padding:6px 8px;border-radius:12px;font-size:12px;font-weight:800;
  background:#fff;border:2px solid #e2e8f0;color:#64748b;
}
.spd-btn.on{background:#E0F2FE;border-color:#38BDF8;color:#0369A1}

.ctrl-row{
  display:flex;align-items:center;justify-content:center;gap:18px;margin:2px 0 8px;
}
.ctrl-nav{
  width:52px;height:52px;border-radius:50%;background:#fff;border:2px solid var(--line);
  font-size:20px;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 0 #ffd6a588;
}
.ctrl-play{
  width:72px;height:72px;border-radius:50%;
  background:linear-gradient(145deg,#5EEAD4 0%,#0EA5E9 100%);color:#fff;font-size:30px;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 7px 0 #0284c788,0 14px 28px -10px #0ea5e9aa;
  transition:transform .12s;
}
.ctrl-play:active{transform:scale(.96)}
.ctrl-play.playing{
  background:linear-gradient(145deg,#FB7185,#E11D48);
  box-shadow:0 7px 0 #be123c88,0 14px 28px -10px #ff4d6daa;
}

.action-row{
  display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;
}
.btn-shadow{
  flex:1;max-width:240px;min-height:48px;padding:10px 16px;border-radius:999px;
  font-size:15px;font-weight:900;color:#fff;
  background:linear-gradient(135deg,#A78BFA,#7C3AED);
  box-shadow:0 4px 0 #5b21b888;display:inline-flex;align-items:center;justify-content:center;gap:6px;
}
.btn-shadow.rec{
  background:linear-gradient(135deg,#FB7185,#E11D48);
  box-shadow:0 4px 0 #be123c88;animation:recPulse 1s infinite;
}
.btn-shadow.wait{
  background:linear-gradient(135deg,#FDBA74,#FB923C);
  box-shadow:0 4px 0 #ea580c88;
}
.btn-ghost{
  min-height:44px;padding:8px 14px;border-radius:999px;font-size:13px;font-weight:800;
  background:#fff;color:var(--ink);border:2px solid var(--peach);box-shadow:0 3px 0 #ffd6a588;
}
@keyframes recPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.03)}}
.mic-hint{
  text-align:center;font-size:12px;color:var(--muted);font-weight:700;
  margin-top:6px;min-height:18px;line-height:1.35;
}
.mic-hint.cue{color:#7C3AED;font-weight:900}
.mic-hint.ok{color:#047857}
.phase-dots{display:inline-flex;gap:4px;vertical-align:middle;margin-right:4px}
.phase-dots i{width:6px;height:6px;border-radius:50%;background:#c4b5fd;opacity:.35}
.phase-dots i.on{opacity:1;background:#7C3AED}

/* —— transcript list (secondary) —— */
.list-head{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  margin:14px 0 8px;padding:0 2px;
}
.list-head h2{margin:0;font-size:15px;font-weight:900;color:#64748b}
.list-head .tip{font-size:11px;color:#94a3b8;font-weight:700}
.pill-tap{
  font-size:11px;font-weight:800;padding:5px 9px;border-radius:999px;
  background:#F1F5F9;border:2px solid #E2E8F0;color:#64748b;white-space:nowrap;
}
.sec-title{
  margin:12px 0 6px;font-size:12px;font-weight:900;color:#64748b;
  display:flex;align-items:center;gap:8px;
}
.sec-title::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,#ffe4c4,#0000)}

.s-item{
  display:flex;gap:10px;align-items:flex-start;background:#fffcf8;
  border:2px solid #f3e8d8;border-radius:16px;padding:10px 11px;margin-bottom:7px;
  box-shadow:none;text-align:left;width:100%;
  transition:border-color .15s,background .15s,transform .12s;opacity:.88;
}
.s-item:active{transform:scale(.99)}
.s-item.on{
  opacity:1;background:#F0F9FF;border-color:#38BDF8;
  box-shadow:0 0 0 3px #bae6fd88;
}
.s-item.done{border-color:#A7F3D0}
.s-av{
  width:34px;height:34px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;
  font-size:16px;border:2px solid #fff;box-shadow:0 1px 0 #0001;
}
.s-body{flex:1;min-width:0}
.s-role{font-size:10px;font-weight:900;letter-spacing:.04em;color:#94a3b8}
.s-en{font-family:Georgia,serif;font-size:15px;font-weight:700;line-height:1.35;margin-top:1px;color:#334155}
.s-item.on .s-en{color:var(--ink);font-size:16px}
.s-zh{font-size:11px;color:#94a3b8;font-weight:700;margin-top:2px}
.s-score{
  flex:none;min-width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:900;background:#F8FAFC;color:#94a3b8;border:2px solid #E2E8F0;
}
.s-score.good{background:#ECFDF5;border-color:#86EFAC;color:#047857}
.s-score.mid{background:#FFFBEB;border-color:#FCD34D;color:#B45309}
.s-score.low{background:#FFF1F2;border-color:#FDA4AF;color:#BE123C}

.note-box{
  margin:12px 0 20px;padding:10px 12px;border-radius:14px;background:#F8FAFC;
  border:1px dashed #cbd5e1;font-size:11px;color:#64748b;font-weight:600;line-height:1.5;
}

/* overlays */
.overlay{
  position:fixed;inset:0;z-index:80;background:#1e3a5f66;
  display:flex;align-items:flex-end;justify-content:center;padding:0;
}
@media(min-width:700px){.overlay{align-items:center;padding:20px}}
.sheet{
  background:linear-gradient(180deg,#fff,#FFF9F0);border:3px solid var(--peach);
  width:100%;max-width:480px;border-radius:28px 28px 0 0;padding:22px 18px;
  padding-bottom:calc(22px + env(safe-area-inset-bottom));
  box-shadow:0 28px 60px -20px #0ea5e955;text-align:center;
  animation:up .28s ease-out;
}
@media(min-width:700px){.sheet{border-radius:28px}}
@keyframes up{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
.sheet .stars{font-size:40px;margin-bottom:4px}
.sheet h3{margin:0;font-size:22px;font-weight:900}
.sheet .big-score{
  font-size:56px;font-weight:900;line-height:1;margin:10px 0;
  background:linear-gradient(135deg,#0EA5E9,#7C3AED);-webkit-background-clip:text;background-clip:text;color:transparent;
}
.sheet p{margin:6px 0;color:var(--muted);font-weight:700;font-size:14px}
.sheet .actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:14px}
.sheet .btn{
  min-height:46px;padding:11px 18px;border-radius:999px;font-weight:800;font-size:15px;color:#fff;
}
.sheet .btn.pri{background:linear-gradient(135deg,#38BDF8,#0EA5E9);box-shadow:0 4px 0 #0284c788}
.sheet .btn.ok{background:linear-gradient(135deg,#6EE7B7,#10B981);box-shadow:0 4px 0 #05966988}
.sheet .btn.ghost{background:#fff;color:var(--ink);border:2px solid var(--peach);box-shadow:0 3px 0 #ffd6a588}
.per-list{text-align:left;max-height:160px;overflow:auto;margin:10px 0;padding:0}
.per-list li{list-style:none;display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px dashed #ffe4c4;font-size:13px;font-weight:700}
.rate-row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:10px}
.rate-btn{
  min-width:64px;min-height:48px;border-radius:16px;font-weight:900;font-size:14px;
  background:#fff;border:2px solid var(--peach);box-shadow:0 3px 0 #ffd6a588;
}

@media(min-width:700px){
  .ctrl-play{width:80px;height:80px;font-size:32px}
  .sent-en{font-size:30px}
}
@media(max-height:780px),(max-width:430px){
  .player{padding:8px 10px calc(8px + env(safe-area-inset-bottom))}
  .seg button{min-height:32px;padding:5px 9px;font-size:11px}
  .spd-btn{min-height:32px;min-width:36px;padding:5px 6px;font-size:11px}
  .ctrl-row{gap:14px;margin:0 0 6px}
  .ctrl-nav{width:46px;height:46px}
  .ctrl-play{width:64px;height:64px;font-size:26px}
  .btn-shadow{min-height:44px;font-size:14px}
  .sent-en{font-size:clamp(20px,5.6vw,26px);min-height:2.5em;padding:6px 4px 2px}
  .focus-body{padding:12px 12px 10px}
  .mic-hint{margin-top:4px;font-size:11px}
}
