.topic-loading { width:min(1100px,100%); min-height:65vh; margin:auto; padding:64px 28px; }
.topic-loading p { color:var(--ink-muted); }
.topic-workspace { min-height:calc(100vh - 72px); padding:22px max(22px,calc((100vw - 1460px)/2)) 172px; }
.topic-crumb { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; color:var(--ink-weak); font-size:13px; }
.topic-crumb a { text-decoration:none; }
.topic-grid { display:grid; grid-template-columns:270px minmax(0,1fr) 230px; gap:24px; align-items:start; }
.topic-chapter-rail { position:sticky; top:88px; max-height:calc(100vh - 110px); overflow:auto; padding:16px 10px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface); }
.topic-rail-heading { padding:2px 9px 13px; border-bottom:1px solid var(--line); }
.topic-rail-heading strong,.topic-rail-heading span { display:block; }
.topic-rail-heading strong { font-size:14px; line-height:1.45; }
.topic-rail-heading span { margin-top:4px; color:var(--ink-weak); font-size:12px; }
.chapter-select { display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:9px; width:100%; min-height:54px; padding:8px; border:0; border-radius:10px; color:var(--ink-muted); background:transparent; text-align:left; cursor:pointer; }
.chapter-select:hover { background:var(--surface-soft); }
.chapter-select[aria-current="true"] { color:var(--ink); background:var(--accent-soft); }
.chapter-select .chapter-number { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; color:var(--accent); background:var(--surface); font-size:11px; font-weight:750; }
.chapter-select .chapter-name { overflow:hidden; font-size:12px; line-height:1.45; text-overflow:ellipsis; }
.chapter-select small { color:var(--ink-weak); font-size:10px; white-space:nowrap; }
.topic-center { min-width:0; }
.topic-title-block { margin-bottom:18px; }
.topic-title-block h1 { margin:6px 0 8px; font-size:clamp(26px,3vw,38px); line-height:1.2; letter-spacing:-.035em; }
.topic-title-block p { max-width:760px; margin:0; color:var(--ink-muted); }
.topic-title-meta { display:flex; flex-wrap:wrap; gap:8px 14px; margin-top:12px; color:var(--ink-weak); font-size:12px; }
.topic-chapter-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; padding:17px 0 14px; border-top:1px solid var(--line); }
.topic-chapter-heading h2 { margin:4px 0 0; font-size:clamp(21px,2vw,27px); line-height:1.3; }
.topic-chapter-heading .chapter-index { color:var(--accent); font-size:11px; font-weight:760; letter-spacing:.12em; text-transform:uppercase; }
.topic-mode-tabs { display:flex; gap:4px; width:max-content; max-width:100%; margin:0 0 11px; padding:4px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); }
.topic-mode-tabs button { min-height:40px; padding:0 14px; border:0; border-radius:8px; color:var(--ink-muted); background:transparent; font-size:13px; cursor:pointer; }
.topic-mode-tabs button[aria-pressed="true"] { color:var(--ink); background:var(--surface); box-shadow:var(--shadow-1); font-weight:700; }
.topic-mode-note { min-height:42px; margin:0 0 16px; color:var(--ink-muted); font-size:13px; }
.topic-audio-choice { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin:0 0 14px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.topic-audio-choice > span { margin-right:5px; color:var(--ink-muted); font-size:12px; font-weight:700; }
.topic-audio-choice button { min-height:38px; padding:0 13px; border:1px solid var(--line-strong); border-radius:9px; color:var(--ink-muted); background:var(--surface); font-size:13px; cursor:pointer; }
.topic-audio-choice button[aria-pressed="true"] { border-color:var(--accent); color:var(--accent); background:var(--accent-soft); font-weight:750; }
.topic-audio-choice button:disabled { opacity:.45; cursor:not-allowed; }
.topic-vocabulary { margin:18px 0 24px; padding:16px; border:1px solid var(--line); border-radius:16px; background:var(--surface-raised,var(--surface)); }
.topic-section-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:13px; }
.topic-section-heading h3 { margin:3px 0 0; font-size:19px; }
.topic-section-heading > span { color:var(--ink-weak); font-size:12px; }
.topic-vocabulary-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr)); gap:10px; }
.topic-vocabulary-card { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; padding:13px; border:1px solid var(--line); border-radius:12px; background:var(--surface); transition:border-color var(--motion-fast),background var(--motion-fast); }
.topic-vocabulary-card[aria-current="true"] { border-color:var(--accent); background:var(--accent-soft); }
.topic-vocabulary-copy { display:grid; grid-template-columns:auto 1fr; align-items:baseline; gap:3px 9px; min-width:0; }
.topic-vocabulary-copy h4 { grid-column:1/-1; margin:0; color:var(--ink); font-size:17px; }
.topic-word-ipa { color:var(--accent); font-family:ui-monospace,monospace; font-size:12px; }
.topic-word-pos { color:var(--ink-weak); font-size:11px; }
.topic-vocabulary-copy p { grid-column:1/-1; margin:2px 0 0; color:var(--ink-muted); font-size:13px; line-height:1.55; }
.topic-word-play { display:grid; flex:0 0 48px; place-items:center; gap:2px; width:48px; height:48px; border:1px solid var(--line); border-radius:12px; color:var(--accent); background:var(--surface); cursor:pointer; }
.topic-word-play span { font-size:9px; }
.topic-word-play:disabled { opacity:.45; cursor:not-allowed; }
.topic-inline-word { display:inline; padding:0 1px; border:0; border-bottom:1px dotted var(--accent); color:inherit; background:transparent; font:inherit; cursor:pointer; }
.topic-inline-word:hover,.topic-inline-word:focus-visible { color:var(--accent); background:var(--accent-soft); }
.topic-transcript { display:grid; gap:8px; }
.topic-sentence { display:grid; grid-template-columns:36px minmax(0,1fr) 42px; gap:12px; align-items:center; padding:15px 16px; border:1px solid transparent; border-radius:12px; background:var(--surface); transition:background var(--motion-fast),border-color var(--motion-fast); }
.topic-sentence[aria-current="true"] { border-color:#aebfae; background:var(--accent-soft); }
.topic-sentence-number { align-self:start; padding-top:4px; color:var(--ink-weak); font-size:11px; font-variant-numeric:tabular-nums; }
.topic-sentence-copy { min-width:0; }
.topic-speaker { display:block; margin-bottom:3px; color:var(--accent); font-size:11px; font-weight:700; }
.topic-sentence-en { color:var(--ink); font-size:clamp(18px,1.55vw,22px); line-height:1.45; overflow-wrap:anywhere; }
.topic-sentence-zh { margin-top:4px; color:var(--ink-muted); font-size:14px; line-height:1.6; }
.topic-sentence-note { margin-top:5px; }
.topic-sentence-note summary { display:flex; align-items:center; width:max-content; min-height:44px; color:var(--accent); font-size:13px; cursor:pointer; }
.topic-sentence-note p { max-width:62ch; margin:0 0 6px; padding:8px 12px; border-left:2px solid var(--line-strong); color:var(--ink-muted); background:var(--surface-raised,var(--surface)); font-size:13px; line-height:1.65; }
.topic-sentence-tools { display:flex; flex-wrap:wrap; gap:5px 13px; margin-top:9px; }
.topic-sentence-tools button { min-height:32px; padding:0; border:0; color:var(--accent); background:transparent; font-size:12px; cursor:pointer; }
.topic-sentence-tools button[aria-pressed="true"] { color:var(--warning); font-weight:700; }
.topic-sentence-tools small { align-self:center; color:var(--ink-weak); font-size:11px; }
.topic-play-line { display:grid; place-items:center; width:40px; height:40px; border:1px solid var(--line-strong); border-radius:50%; color:var(--accent); background:var(--surface); cursor:pointer; }
.topic-play-line:disabled { color:var(--ink-weak); opacity:.55; cursor:not-allowed; }
.topic-empty-callout { padding:18px; border:1px dashed var(--line-strong); border-radius:12px; color:var(--ink-muted); background:var(--surface); }
.topic-aside { position:sticky; top:88px; }
.topic-aside-card { padding:16px; border:1px solid var(--line); border-radius:var(--radius-md); background:var(--surface); }
.topic-aside-card + .topic-aside-card { margin-top:12px; }
.topic-aside-card h3 { margin:0 0 10px; font-size:14px; }
.topic-aside-card p { margin:0; color:var(--ink-muted); font-size:12px; line-height:1.65; }
.topic-stat-list { display:grid; gap:9px; margin-top:12px; }
.topic-stat { display:flex; justify-content:space-between; gap:10px; color:var(--ink-muted); font-size:12px; }
.topic-stat strong { color:var(--ink); }
.topic-audio-status { margin-top:12px !important; }
.topic-player { position:fixed; z-index:30; right:24px; bottom:18px; left:24px; display:grid; grid-template-columns:minmax(150px,1.1fr) auto minmax(220px,2fr) minmax(250px,1.4fr); align-items:center; gap:16px; max-width:1200px; min-height:94px; margin:0 auto; padding:14px 20px; border:1px solid #ffffff22; border-radius:18px; color:var(--player-ink); background:var(--player); box-shadow:0 18px 54px #17282433; }
.topic-player-track { min-width:0; }
.topic-player-track strong,.topic-player-track span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topic-player-track strong { color:#f2eddb; font-size:13px; }
.topic-player-track span { margin-top:4px; color:#c4cdc4; font-size:11px; }
.topic-player-controls { display:flex; align-items:center; gap:8px; }
.topic-player button { flex:0 0 auto; display:grid; place-items:center; min-width:42px; min-height:42px; border:1px solid #ffffff35; border-radius:50%; color:var(--player-ink); background:transparent; cursor:pointer; }
.topic-player button:disabled { opacity:.42; cursor:not-allowed; }
.topic-player button.primary-play { width:48px; height:48px; border:0; color:var(--player); background:var(--player-progress); font-size:17px; }
.topic-player-progress { min-width:0; }
.topic-player-progress input[type="range"] { display:block; width:100%; accent-color:var(--player-progress); }
.topic-player-time { display:flex; justify-content:space-between; color:#c4cdc4; font-size:10px; font-variant-numeric:tabular-nums; }
.topic-player-options { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:7px; }
.topic-player-options select,.topic-player-options button { min-height:36px; padding:0 9px; border:1px solid #ffffff35; border-radius:8px; color:var(--player-ink); background:#ffffff0a; font-size:11px; }
.topic-player-options select option { color:var(--ink); }
.topic-player-options button { min-width:auto; border-radius:18px; }
.topic-player-options button[aria-pressed="true"] { border-color:var(--player-progress); color:var(--player-progress); }
.topic-volume { display:flex; align-items:center; gap:5px; color:#c4cdc4; font-size:11px; }
.topic-volume input { width:66px; accent-color:var(--player-progress); }
.topic-mobile-bar { display:none; }
.topic-drawer-backdrop { position:fixed; z-index:50; inset:0; display:grid; align-items:end; background:#15231dcc; }
.topic-drawer-backdrop[hidden] { display:none; }
.topic-drawer { width:100%; max-height:min(78vh,720px); overflow:auto; padding:20px 16px calc(22px + env(safe-area-inset-bottom)); border-radius:20px 20px 0 0; background:var(--surface); }
.topic-drawer-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.topic-drawer-head h2 { margin:0; font-size:20px; }
.topic-feedback { position:fixed; z-index:60; left:50%; bottom:130px; max-width:min(440px,calc(100vw - 32px)); transform:translateX(-50%); padding:11px 15px; border:1px solid #ffffff26; border-radius:10px; color:white; background:var(--player); box-shadow:var(--shadow-2); font-size:13px; }
.topic-feedback[hidden] { display:none; }
.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; }
@media (max-width:1180px) {
  .topic-grid { grid-template-columns:240px minmax(0,1fr); gap:18px; }
  .topic-aside { display:none; }
  .topic-player { grid-template-columns:minmax(150px,1fr) auto minmax(220px,1.4fr) auto; gap:11px; }
  .topic-volume { display:none; }
}
@media (max-width:760px) {
  .topic-workspace { min-height:calc(100vh - 60px); padding:12px 14px 190px; }
  .topic-crumb { margin-bottom:13px; }
  .topic-grid { display:block; }
  .topic-chapter-rail { display:none; }
  .topic-title-block { margin-bottom:14px; }
  .topic-title-block h1 { font-size:25px; }
  .topic-title-block p { font-size:14px; }
  .topic-title-meta { font-size:11px; }
  .topic-chapter-heading { align-items:flex-start; padding:15px 0 11px; }
  .topic-chapter-heading h2 { font-size:20px; }
  .topic-mode-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
  .topic-mode-tabs button { padding:0 5px; font-size:12px; }
  .topic-mode-note { font-size:12px; }
  .topic-audio-choice { align-items:stretch; }
  .topic-audio-choice > span { flex-basis:100%; }
  .topic-audio-choice button { flex:1; padding:0 8px; }
  .topic-vocabulary { padding:12px; }
  .topic-transcript { gap:7px; }
  .topic-sentence { grid-template-columns:25px minmax(0,1fr) 40px; gap:8px; padding:13px 10px; }
  .topic-sentence-en { font-size:18px; }
  .topic-sentence-zh { font-size:13px; }
  .topic-sentence-tools { gap:2px 12px; }
  .topic-player { display:none; }
  .topic-mobile-bar { position:fixed; z-index:31; right:0; bottom:calc(58px + env(safe-area-inset-bottom)); left:0; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 10px; align-items:center; min-height:84px; padding:9px 14px 8px; border-top:1px solid #ffffff24; color:var(--player-ink); background:var(--player); box-shadow:0 -8px 24px #1728241c; }
  .topic-mobile-track { min-width:0; }
  .topic-mobile-track strong,.topic-mobile-track span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .topic-mobile-track strong { color:#f2eddb; font-size:12px; }
  .topic-mobile-track span { margin-top:2px; color:#c4cdc4; font-size:10px; }
  .topic-mobile-play { display:grid; place-items:center; width:46px; height:46px; border:0; border-radius:50%; color:var(--player); background:var(--player-progress); font-size:16px; }
  .topic-mobile-seek { grid-column:1 / -1; width:100%; height:14px; margin:0; accent-color:var(--player-progress); }
  .topic-mobile-tools { display:flex; grid-column:1 / -1; justify-content:space-between; align-items:center; gap:8px; }
  .topic-mobile-tools button,.topic-mobile-tools select { min-height:32px; padding:0 9px; border:1px solid #ffffff35; border-radius:8px; color:var(--player-ink); background:transparent; font-size:11px; }
  .topic-mobile-tools select option { color:var(--ink); }
  .topic-drawer-backdrop { bottom:calc(58px + env(safe-area-inset-bottom)); }
  .topic-feedback { bottom:calc(210px + env(safe-area-inset-bottom)); }
  .mobile-nav { z-index:35; }
}
@media (max-width:360px) {
  .topic-workspace { padding-right:10px; padding-left:10px; }
  .topic-player-options button:nth-of-type(n+2) { display:none; }
  .topic-mobile-tools button { padding:0 6px; font-size:10px; }
}
.topic-practice-links{display:flex;flex-wrap:wrap;gap:var(--space-2,8px);margin-top:var(--space-3,12px)}
@media (max-width:760px) {
  .topic-workspace { padding-bottom:300px; }
  .topic-mobile-bar { grid-template-columns:minmax(0,1fr) auto auto; }
  .topic-mobile-expand { min-height:44px; padding:0 10px; border:1px solid #ffffff35; border-radius:9px; color:var(--player-ink); background:transparent; font-size:11px; }
  .topic-mobile-tools { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .topic-mobile-tools button,.topic-mobile-tools select { min-height:44px; }
  .topic-mobile-expanded { display:grid; grid-column:1/-1; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; }
  .topic-mobile-expanded button,.topic-mobile-volume { display:flex; align-items:center; justify-content:center; min-width:0; min-height:44px; padding:4px 7px; border:1px solid #ffffff35; border-radius:8px; color:var(--player-ink); background:transparent; font:inherit; font-size:11px; }
  .topic-mobile-expanded button[aria-pressed="true"] { border-color:var(--player-progress); color:var(--player-progress); }
  .topic-mobile-volume { flex-direction:column; gap:2px; }
  .topic-mobile-volume input { width:100%; max-width:100px; accent-color:var(--player-progress); }
}
@media (max-width:360px) {
  .topic-mobile-expanded { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
