@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Noto+Sans+TC:wght@400;500;600;700;800&display=swap');

body[data-theme="light"]{--bg:#f5faf5;--surface:#fff;--soft:#eaf3ed;--ink:#173936;--muted:#627f77;--accent:#217d70;--line:#d7e7dc;--hero:#d9eee2;--shadow:0 18px 45px #17443b12}
body[data-theme="dark"]{--bg:#0f1417;--surface:#1a2224;--soft:#253032;--ink:#f2f8f6;--muted:#a4bcb4;--accent:#7cdbc3;--line:#354a45;--hero:#1b2b2b;--shadow:0 22px 60px #0005}
body{min-height:100vh;background:var(--bg);color:var(--ink);font-family:'DM Sans','Noto Sans TC','Microsoft JhengHei',sans-serif;transition:background .2s,color .2s}
a{color:inherit}.topbar{height:auto;min-height:76px;background:var(--bg);border:0;box-shadow:none;color:var(--ink);gap:26px}
.brand{display:inline-flex;align-items:center;gap:9px;color:var(--ink);font-size:20px;letter-spacing:-.04em;text-decoration:none;white-space:nowrap}
.brand-symbol{display:grid;place-items:center;width:35px;height:35px;border-radius:11px;background:var(--accent);color:var(--surface);font-size:23px;line-height:1}
.topbar nav{margin-right:auto}.topbar nav a{color:var(--accent);text-decoration:none;font-weight:700;font-size:14px}
.theme-toggle{margin-left:auto;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);padding:10px 15px;font-family:inherit;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.theme-toggle:hover,.theme-toggle:focus-visible{border-color:var(--accent);outline-color:var(--accent)}
.catalog-return{margin-left:auto;color:var(--accent)}.catalog-return+.theme-toggle{margin-left:0}
.shell{max-width:1440px;padding:22px 28px 80px}.focus-layout .shell{padding-top:16px}
.eyebrow,.card-meta{color:var(--accent)}
.hero{min-height:430px;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:50px;background:var(--hero);border-radius:24px;padding:52px clamp(30px,5vw,78px);margin:0 0 44px;overflow:hidden}
.hero-copy h1{font-size:clamp(34px,4.5vw,62px);line-height:1.12;letter-spacing:-.045em;margin:16px 0 22px;max-width:650px}
.hero-copy h1 em{display:block;color:var(--accent);font-style:normal}.hero-copy p:not(.eyebrow){color:var(--muted);font-size:15px;line-height:1.8;max-width:540px}
.hero-start{display:inline-block;margin-top:22px;background:var(--accent);color:var(--surface);border-radius:13px;padding:15px 21px;text-decoration:none;font-weight:800;box-shadow:var(--shadow)}
.hero-start:hover{transform:translateY(-2px)}.hero-note{display:inline-block;color:var(--muted);font-size:12px;margin-left:16px}
.hero-visual{position:relative;display:block;max-width:570px;aspect-ratio:16/9;border-radius:20px;overflow:hidden;transform:rotate(-2deg);box-shadow:0 28px 60px #17393638;background:#142b30}
.hero-visual img{width:100%;height:100%;object-fit:cover}.hero-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:65px;height:65px;border-radius:50%;background:#fffdf1df;color:#173936;font-size:23px;padding-left:4px}
.filters,.card,.empty,.settings,.analysis,.explain,.transcript{background:var(--surface);border-color:var(--line);color:var(--ink);box-shadow:var(--shadow)}
.filters,.card,.empty,.settings,.analysis,.explain,.transcript{border-radius:20px}.filters{padding:18px 20px}
.search input,.filter-row select,.topics button,.import,.settings summary{background:var(--surface);border-color:var(--line);color:var(--ink)}
.topics button[aria-pressed="true"],.start,.layout-controls button,.stage-header button{background:var(--accent);border-color:var(--accent);color:var(--surface)}
.card:hover{border-color:var(--accent);box-shadow:0 22px 44px #17443b22}.card-image{aspect-ratio:16/9}.card-body{padding:20px}.card h3 a,.results-head h2,.intro h1{color:var(--ink)}
.card-description,.progress,.results-head p,.hero p:last-child,.intro p,.muted,.count,.translation,.meaning,.grammar{color:var(--muted)}
.card-bottom{border-top:1px solid var(--line);padding-top:15px}.start{border-radius:10px}.start:hover{filter:brightness(1.1)}
.sentence-row{background:var(--surface);color:var(--ink)}.sentence-row:hover,.sentence-row.active{background:var(--soft);border-color:var(--accent)}.word{background:var(--soft);color:var(--accent)}
.settings summary,.catalog-return,.player-actions a{color:var(--accent)}.player-actions button{background:var(--surface);border-color:var(--line);color:var(--ink)}
.study-stage{background:#102623;border-radius:18px}.study-stage .stage-header{color:#e1f2ed}.study-stage .player-frame{border-radius:0}.study-stage .stage-subtitles p{background:rgba(8,24,24,.5)}
.study-stage .typing-card,.study-stage .explain{background:rgba(8,24,24,.5);backdrop-filter:blur(12px);border-color:#ffffff85}.study-stage .typing-card .eyebrow,.study-stage .explain .eyebrow,.study-stage .typing-card .typing-target-line strong,.study-stage .typing-card #typing-timer{color:#bff3de}
.narration-panel{background:#173936}.study-stage:fullscreen{background:#081b1a}
.transcript-head{border-color:var(--line)}
.stamp,.time,.control-label,.learning-summary,.shortcut-hint{color:var(--muted)}
.mode-button,.typing-entry input{background:var(--surface);border-color:var(--line);color:var(--ink)}
.mode-button.selected{background:var(--soft);border-color:var(--accent);color:var(--accent)}
.segment-break{background:var(--soft);border-color:var(--line);color:var(--ink)}
.segment-break strong{color:var(--accent)}.segment-break.current{outline-color:var(--accent)}
.sentence-row:focus-visible,.topics button:focus-visible,.mode-button:focus-visible,.player-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}


@media(prefers-reduced-motion:reduce){body{transition:none}.hero-start:hover{transform:none}}
