/* ───────────────────────── Reelish · 影语 — design tokens ───────────────────────── */
:root {
  --bg: #faf7f2;
  --bg-2: #f3eee6;
  --surface: #ffffff;
  --surface-2: #f5f1ea;
  --text: #1c1915;
  --text-2: #3d3830;
  --muted: #7a7266;
  --border: #e8e1d6;
  --border-strong: #d8cfc1;
  --accent: #d9480f;
  --accent-2: #b93a0a;
  --accent-ink: #fff8f2;
  --accent-soft: #fdeee4;
  --mark: rgba(255, 196, 61, .42);
  --danger: #c92a2a;
  --wechat: #07c160;
  --fav: #e8a400;
  --on-chip: #ffffff;
  --c-orig: #3b6fd8;
  --c-user: #e8590c;
  --player-bg: #0b0b0c;
  --shadow-sm: 0 1px 2px rgba(60, 40, 10, .06);
  --shadow: 0 1px 2px rgba(60, 40, 10, .05), 0 8px 24px -8px rgba(60, 40, 10, .12);
  --shadow-lg: 0 2px 4px rgba(60, 40, 10, .05), 0 24px 48px -16px rgba(60, 40, 10, .22);
  --cat-tense: #2f6fdb; --cat-modal: #8046d6; --cat-clause: #d9480f; --cat-verb: #0c8a6c;
  --cat-adj: #c2255c; --cat-noun: #a07400; --cat-sentence: #5b6573;
  --radius: 14px;
  --radius-lg: 22px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Songti SC", "STSong", "Noto Serif SC", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
/* Dark "cinema" palette — follows the system unless the user chose Light, or is forced via the switcher. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e0d; --bg-2: #161412; --surface: #191715; --surface-2: #221f1c; --text: #f2ede6; --text-2: #d6cfc4;
    --muted: #958c80; --border: #2c2824; --border-strong: #3a352f; --accent: #ff7a3d; --accent-2: #ff9a66;
    --accent-ink: #1a0d05; --accent-soft: #33190c; --mark: rgba(255, 186, 61, .28); --danger: #ff6b6b;
    --fav: #ffc23d; --on-chip: #141210; --c-orig: #74a3ff; --c-user: #ff8f4d;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 28px 56px -18px rgba(0, 0, 0, .75);
    --cat-tense: #79a6ff; --cat-modal: #b794ff; --cat-clause: #ff8f5e; --cat-verb: #45c9a1;
    --cat-adj: #ff7eab; --cat-noun: #e0bb4a; --cat-sentence: #a9b1bd;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0e0d; --bg-2: #161412; --surface: #191715; --surface-2: #221f1c; --text: #f2ede6; --text-2: #d6cfc4;
  --muted: #958c80; --border: #2c2824; --border-strong: #3a352f; --accent: #ff7a3d; --accent-2: #ff9a66;
  --accent-ink: #1a0d05; --accent-soft: #33190c; --mark: rgba(255, 186, 61, .28); --danger: #ff6b6b;
  --fav: #ffc23d; --on-chip: #141210; --c-orig: #74a3ff; --c-user: #ff8f4d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 28px 56px -18px rgba(0, 0, 0, .75);
  --cat-tense: #79a6ff; --cat-modal: #b794ff; --cat-clause: #ff8f5e; --cat-verb: #45c9a1;
  --cat-adj: #ff7eab; --cat-noun: #e0bb4a; --cat-sentence: #a9b1bd;
  color-scheme: dark;
}

/* ───────────────────────── Base ───────────────────────── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column;
  transition: background-color .25s, color .25s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
code, pre { font: 12.5px/1.5 var(--font-mono); white-space: pre-wrap; word-break: break-all; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.serif, .display { font-family: var(--font-serif); }
.display { font-weight: 600; letter-spacing: -.015em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
}
.ico { flex: none; vertical-align: -.2em; }
mark { background: linear-gradient(transparent 12%, var(--mark) 12%, var(--mark) 92%, transparent 92%); color: inherit; border-radius: 2px; padding: 0 .06em; }
kbd {
  font: 600 .72rem var(--font-mono); color: var(--muted); border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: 6px; padding: 1px 6px; background: var(--surface);
}

/* ───────────────────────── Top bar ───────────────────────── */
#header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: .7rem 20px; display: flex; align-items: center; gap: 1.4rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); flex: none; }
.brand:hover { color: var(--text); }
.logo-mark { display: block; filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--accent) 35%, transparent)); }
.wordmark { font: 700 1.28rem/1 var(--font-serif); letter-spacing: -.02em; display: inline-flex; align-items: baseline; gap: .35rem; }
.wordmark small { font: 500 .78rem var(--font-sans); color: var(--muted); letter-spacing: .08em; }
.brand.small .wordmark { font-size: 1.05rem; }
.mainnav { display: flex; gap: .2rem; }
.mainnav a {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 999px; color: var(--muted);
  font-size: .92rem; font-weight: 550; transition: color .15s, background .15s; white-space: nowrap;
}
.mainnav a:hover { color: var(--text); background: var(--surface-2); }
.mainnav a.active { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border); }
.mainnav a.active .ico { color: var(--accent); }
.top-search, .top-search-spacer { flex: 1; max-width: 360px; margin-left: auto; }
.top-search {
  display: flex; align-items: center; gap: .5rem; padding: 0 .4rem 0 .8rem; height: 38px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid transparent; color: var(--muted); transition: .15s;
}
.top-search:focus-within { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.top-search input { border: 0; background: none; padding: 0; height: 100%; flex: 1; min-width: 0; color: var(--text); box-shadow: none !important; }
.tools { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.top-search + .tools, .top-search-spacer + .tools { margin-left: 0; }
.tool {
  display: inline-flex; align-items: center; gap: .35rem; height: 36px; min-width: 36px; padding: 0 .55rem; justify-content: center;
  border: 1px solid transparent; background: transparent; color: var(--text-2); border-radius: 999px; cursor: pointer; font: 600 .82rem var(--font-sans);
}
.tool:hover { background: var(--surface-2); border-color: var(--border); }
.me-link { position: relative; display: inline-flex; margin-left: .2rem; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--border-strong); }
.vip-dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, #ffd66b, #e0a100); border: 2px solid var(--bg); }

main { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.6rem 20px 4rem; transition: opacity .2s; }
main.loading { opacity: .5; }

/* ───────────────────────── Controls ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; height: 40px; padding: 0 1rem; border-radius: 999px;
  font: 600 .9rem var(--font-sans); cursor: pointer; white-space: nowrap; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 34px; padding: 0 .85rem; font-size: .85rem; }
.btn-block { width: 100%; height: 46px; }
.btn-wechat { width: 100%; height: 48px; background: var(--wechat); border-color: var(--wechat); color: #fff; font-size: 1rem; }
.btn-wechat:hover { background: #06ad56; border-color: #06ad56; color: #fff; }
.btn-rec { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-rec:hover { color: #fff; border-color: var(--danger); filter: brightness(1.08); }
.btn-rec.on { animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 55%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); color: var(--text-2);
  background: var(--surface); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn.disabled { opacity: .35; pointer-events: none; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; display: inline-flex; align-items: center; gap: .3rem; }
.link.danger { color: var(--danger); font-size: .82rem; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
  padding: .6rem .85rem; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
textarea { resize: vertical; min-height: 64px; }
input[type=checkbox] { width: auto; }
label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--text-2); }
.select {
  width: auto; height: 38px; padding: 0 2rem 0 .9rem; border-radius: 999px; font-size: .88rem; font-weight: 550; cursor: pointer; appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center;
  border: 1px solid var(--border-strong); display: inline-flex; align-items: center; color: var(--text);
}
summary.select { list-style: none; user-select: none; }
summary.select::-webkit-details-marker { display: none; }
.notice {
  display: flex; gap: .5rem; align-items: center; padding: .7rem .9rem; border-radius: 12px; font-size: .88rem;
  background: var(--accent-soft); color: var(--text-2); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.notice.error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.back { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .9rem; font-weight: 550; margin-bottom: 1rem; }
.back:hover { color: var(--text); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.35rem 1.4rem; box-shadow: var(--shadow-sm); }
.panel.narrow { max-width: 460px; margin: 2rem auto; display: grid; gap: 1.1rem; }
.panel-title { display: flex; align-items: center; gap: .5rem; font: 700 .78rem var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.panel-title .ico { color: var(--accent); }
.section-title { font: 600 1.45rem var(--font-serif); letter-spacing: -.01em; display: flex; align-items: center; gap: .6rem; }
.empty-state { grid-column: 1 / -1; display: grid; place-items: center; gap: .8rem; padding: 4rem 1rem; color: var(--muted); text-align: center; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty-state .ico { color: var(--border-strong); }

/* Chips & category colors */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
/* Fixed-height, single-line pills: long labels truncate with an ellipsis instead of wrapping. */
.chip {
  --c: var(--cat-sentence);
  display: inline-block; box-sizing: border-box; height: 26px; line-height: 24px; padding: 0 .7rem; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
  font: 600 .76rem/24px var(--font-sans); border-radius: 999px; cursor: pointer;
  color: color-mix(in srgb, var(--c) 85%, var(--text)); background: color-mix(in srgb, var(--c) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); transition: background .15s; position: relative; z-index: 1;
}
.chip:hover { background: color-mix(in srgb, var(--c) 20%, transparent); color: color-mix(in srgb, var(--c) 85%, var(--text)); }
.chip small { opacity: .65; font-weight: 500; }
.chip.selected { background: var(--c); color: var(--on-chip); border-color: var(--c); }
.chip.chip-more { --c: var(--muted); cursor: default; }
.cat-tense { --c: var(--cat-tense); } .cat-modal { --c: var(--cat-modal); } .cat-clause { --c: var(--cat-clause); }
.cat-verb { --c: var(--cat-verb); } .cat-adj { --c: var(--cat-adj); } .cat-noun { --c: var(--cat-noun); } .cat-sentence { --c: var(--cat-sentence); }

/* ───────────────────────── Home ───────────────────────── */
.hero {
  position: relative; margin: -.4rem 0 2.2rem; padding: 3.8rem 1.5rem 2.8rem; text-align: center; border-radius: 28px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60% 80% at 15% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(50% 70% at 100% 100%, color-mix(in srgb, var(--cat-tense) 12%, transparent), transparent 70%),
    var(--bg-2);
  border: 1px solid var(--border);
}
/* Film-strip perforations along the top and bottom edges. */
.hero::before, .hero::after {
  content: ""; position: absolute; left: 0; right: 0; height: 7px; z-index: -1; opacity: .7;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 14px, transparent 14px 30px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.hero::before { top: 14px; }
.hero::after { bottom: 14px; }
.hero.compact { padding: 1.7rem 1.2rem; margin-bottom: 1.6rem; }
.hero-inner { max-width: 780px; margin: 0 auto; display: grid; gap: 1.1rem; justify-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); line-height: 1.05; }
.lede { font-size: 1.1rem; color: var(--text-2); max-width: 600px; }
.hero-search {
  width: 100%; max-width: 680px; display: flex; align-items: center; gap: .6rem; margin-top: .6rem; padding: .45rem .45rem .45rem 1.15rem;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: var(--shadow-lg); color: var(--muted);
  transition: border-color .15s, box-shadow .15s;
}
.hero.compact .hero-search { margin-top: 0; }
.hero-search:focus-within { border-color: var(--accent); box-shadow: var(--shadow-lg), 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent); }
.hero-search input { border: 0; padding: .4rem 0; font-size: 1.12rem; background: none; box-shadow: none !important; flex: 1; min-width: 0; }
.hero-search input::-webkit-search-cancel-button { display: none; }
.hero-search .btn { width: 46px; height: 46px; padding: 0; flex: none; }
.popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem; max-width: 720px; }
.popular .label { font-size: .8rem; color: var(--muted); margin-right: .2rem; }
.stats { display: flex; gap: 2.6rem; margin: .8rem 0 0; flex-wrap: wrap; justify-content: center; }
.stats div { text-align: center; }
.stats dt { font: 600 2rem/1 var(--font-serif); }
.stats dt small { font-size: 1rem; color: var(--muted); }
.stats dd { margin: .3rem 0 0; font-size: .8rem; color: var(--muted); }

.featured {
  display: grid; grid-template-columns: 1.15fr 1fr; margin-bottom: 3rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.featured-media { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--player-bg); overflow: hidden; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.featured-media:hover img { transform: scale(1.03); }
.featured-text { padding: 2rem 2.2rem; display: flex; flex-direction: column; justify-content: center; gap: .8rem; align-items: flex-start; }
.quote { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.3; }
.featured-text .zh { color: var(--text-2); font-size: 1.05rem; }
.featured-text .movie { color: var(--muted); font: italic .92rem var(--font-serif); text-transform: none; letter-spacing: 0; }

.browse-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.popover { position: relative; }
.popover-body {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(560px, 90vw); max-height: 360px; overflow: auto; padding: .9rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.active-filters { align-items: center; margin: -.3rem 0 1.1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.more { display: flex; margin: 1.8rem auto 0; }

/* Scene card */
.scene-card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, border-color .2s;
}
.scene-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card-link { position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, #1a1a1a), #111); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.scene-card:hover .thumb img { transform: scale(1.05); }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .45), transparent 45%); pointer-events: none; }
.thumb-play {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  background: rgba(255, 255, 255, .92); color: #111; padding-left: 3px; opacity: 0; transform: scale(.85); transition: .2s; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.thumb-play.big { width: 68px; height: 68px; margin: -34px 0 0 -34px; opacity: 1; transform: none; }
.scene-card:hover .thumb-play { opacity: 1; transform: none; }
/* Inline playback inside cards */
.thumb[data-inline] { z-index: 1; cursor: pointer; container-type: inline-size; }
.thumb .thumb-play { z-index: 3; }
.inline-layer { position: absolute; inset: 0; z-index: 2; background: #000; }
.inline-layer video { width: 100%; height: 100%; object-fit: cover; display: block; }
.inline-subs {
  position: absolute; left: 5%; right: 5%; bottom: 10%; display: grid; justify-items: center; gap: 2px; text-align: center; pointer-events: none;
}
.inline-subs span { padding: 1px 7px; border-radius: 5px; background: rgba(8, 8, 8, .6); color: #fff; line-height: 1.3; }
.inline-subs .ie { font: 600 max(11px, 4.4cqw) var(--font-sans); }
.inline-subs .iz { font-size: max(10px, 3.8cqw); color: #ffe3a3; }
.thumb.big .inline-subs .ie { font-size: max(13px, 3.4cqw); }
.thumb.big .inline-subs .iz { font-size: max(12px, 2.9cqw); }
.inline-open {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; transition: opacity .15s;
}
.inline-open:hover { color: #fff; background: rgba(0, 0, 0, .8); }
.inline-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .2); }
.inline-progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.thumb.playing .thumb-play { opacity: 0; }
.thumb.playing:hover .thumb-play, .thumb.paused .thumb-play, .thumb.ended .thumb-play { opacity: 1; transform: none; }
.thumb.playing:hover .inline-open, .thumb.paused .inline-open, .thumb.ended .inline-open { opacity: 1; }
.thumb.playing .ts, .thumb.paused .ts, .thumb.ended .ts { display: none; }
.thumb.playing::after, .thumb.paused::after, .thumb.ended::after { display: none; }
.featured-media.thumb { cursor: pointer; }
.ts { position: absolute; right: .55rem; bottom: .5rem; z-index: 1; font: 600 .72rem var(--font-mono); color: #fff; background: rgba(0, 0, 0, .55); padding: 2px 7px; border-radius: 6px; }
.scene-body { padding: .95rem 1.05rem 1rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.movie { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.scene-card .en { font-size: 1.12rem; line-height: 1.38; font-weight: 600; color: var(--text); }
.scene-card .zh { color: var(--muted); font-size: .92rem; }
.scene-card .chips { margin-top: .15rem; }
.scene-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: .35rem; font-size: .82rem; }
.fav-btn {
  position: relative; z-index: 1; display: inline-grid; place-items: center; background: none; border: 0; padding: 4px; border-radius: 50%; cursor: pointer;
  color: var(--muted); transition: color .15s, transform .15s;
}
.fav-btn:hover { color: var(--fav); transform: scale(1.12); }
.fav-btn.on { color: var(--fav); }
.btn.fav-btn { display: inline-flex; border-radius: 999px; padding: 0 1rem; border: 1px solid var(--border-strong); }
.btn.fav-btn:hover { transform: none; }
.btn.fav-btn.on { border-color: color-mix(in srgb, var(--fav) 55%, transparent); background: color-mix(in srgb, var(--fav) 12%, transparent); }

/* ───────────────────────── Grammar library ───────────────────────── */
.page-head { margin: .8rem 0 2rem; display: grid; gap: .7rem; justify-items: start; }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.filter-box {
  display: flex; flex-direction: row; align-items: center; gap: .5rem; width: min(420px, 100%); margin-top: .4rem; padding: 0 .9rem;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted);
}
.filter-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.filter-box input { border: 0; background: none; box-shadow: none !important; padding: .65rem 0; }
.library { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.2rem; align-items: start; }
.lib-nav { position: sticky; top: 90px; display: grid; gap: .15rem; }
.lib-nav button {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 0; background: none; border-radius: 10px; cursor: pointer;
  font: 550 .9rem var(--font-sans); color: var(--text-2); text-align: left;
}
.lib-nav button:hover { background: var(--surface-2); color: var(--text); }
.lib-nav button span { margin-left: auto; font-size: .75rem; color: var(--muted); }
.lib-nav i, .section-title i, .grammar-hero .eyebrow i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex: none; }
.grammar-cat { margin-bottom: 2.6rem; }
.grammar-cat .section-title { margin-bottom: 1rem; }
.grammar-cat .section-title .muted { font: 500 .9rem var(--font-sans); }
.grammar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .9rem; }
.grammar-card {
  position: relative; display: flex; flex-direction: column; gap: .3rem; padding: 1.05rem 1.1rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden;
}
.grammar-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.grammar-card:hover { color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--c) 45%, var(--border)); }
.g-title { font: 600 1.08rem/1.3 var(--font-serif); }
.g-sub { color: var(--c); font-size: .84rem; font-weight: 600; }
.g-desc { color: var(--muted); font-size: .86rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.g-meter { height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: auto; overflow: hidden; }
.grammar-card .g-meter { margin-top: .6rem; }
.g-meter span { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.g-count { font-size: .76rem; font-weight: 700; color: var(--c); }
.g-count.zero { color: var(--muted); font-weight: 500; }

.grammar-hero {
  position: relative; padding: 2.4rem 2.2rem; margin-bottom: 2.4rem; border-radius: var(--radius-lg); overflow: hidden;
  background: radial-gradient(70% 120% at 0% 0%, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%), var(--bg-2);
  border: 1px solid color-mix(in srgb, var(--c) 25%, var(--border));
}
.grammar-hero .eyebrow { color: var(--c); }
.grammar-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-top: .5rem; }
.zh-title { font: 600 1.35rem var(--font-serif); color: var(--c); margin-top: .3rem; }
.explain { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.6rem; }
.explain > div { background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.explain p { margin-top: .5rem; color: var(--text-2); }
.lang-tag { font: 700 .68rem var(--font-sans); letter-spacing: .1em; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: 3px 8px; border-radius: 999px; }

/* ───────────────────────── Scene page ───────────────────────── */
.crumbs { display: flex; align-items: center; gap: .35rem; font-size: .86rem; color: var(--muted); margin-bottom: 1rem; flex-wrap: wrap; }
.crumbs a { color: var(--muted); font-weight: 550; }
.crumbs a:hover { color: var(--text); }
.crumbs span { color: var(--text); font-family: var(--font-mono); font-size: .8rem; }
.scene-top { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: stretch; }
.player-col { display: grid; gap: .6rem; align-content: start; }
.script { display: flex; flex-direction: column; padding: 1.1rem .7rem 1.1rem 1.1rem; height: 0; min-height: 100%; }
.clip-lines { list-style: none; padding: 0 .3rem 0 0; margin: 0; display: grid; gap: .2rem; overflow: auto; align-content: start; flex: 1; }
.clip-lines a { display: grid; grid-template-columns: 2.6rem 1fr; gap: .4rem; padding: .55rem .6rem; border-radius: 10px; color: var(--text-2); font-size: .9rem; transition: background .15s; }
.clip-lines a:hover { background: var(--surface-2); color: var(--text); }
.clip-lines .t { color: var(--muted); font: .75rem var(--font-mono); padding-top: .2rem; }
.clip-lines .en, .clip-lines .zh { display: block; }
.clip-lines .zh { color: var(--muted); font-size: .8rem; margin-top: .1rem; }
.clip-lines li.current a { background: var(--accent-soft); color: var(--text); }
.clip-lines li.current .t { color: var(--accent); }
.clip-lines li.playing a { box-shadow: inset 3px 0 0 var(--accent); }

.scene-body-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; margin-top: 1.2rem; }
.col-main { display: grid; gap: 1.2rem; min-width: 0; }
.col-side { position: sticky; top: 84px; }
.line-card { padding: 1.2rem 0 .4rem; }
.line-nav { display: flex; align-items: center; gap: .7rem; font-size: .82rem; margin-bottom: .9rem; }
.line-en { font-size: clamp(1.6rem, 3.2vw, 2.35rem); line-height: 1.28; font-weight: 600; }
.line-en .w { color: inherit; border-radius: 4px; transition: background .12s, color .12s; }
.line-en .w:hover { color: var(--accent); background: var(--accent-soft); }
.line-zh { font: 1.2rem var(--font-serif); color: var(--text-2); margin-top: .6rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 1rem; display: flex; gap: .4rem 1rem; flex-wrap: wrap; }
.kbd-hint { font-family: var(--font-mono); font-size: .74rem; }

.breakdown .grammar-explain { display: grid; gap: .6rem; }
.g-item { position: relative; padding: .8rem .9rem .8rem 1.05rem; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; transition: .15s; outline: none; }
.g-item::before { content: ""; position: absolute; left: 0; top: .8rem; bottom: .8rem; width: 3px; border-radius: 3px; background: var(--c); }
.g-item:hover, .g-item.active { background: color-mix(in srgb, var(--c) 9%, var(--surface)); border-color: color-mix(in srgb, var(--c) 30%, transparent); }
.g-item-head { display: flex; align-items: center; }
.g-name { font: 600 1rem var(--font-serif); color: var(--text); }
.g-name:hover { color: var(--c); }
.x { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.15rem; line-height: 1; }
.snippet { font: italic .9rem var(--font-serif); color: var(--c); margin: .2rem 0; }
.g-item .g-desc { -webkit-line-clamp: unset; }
.more-link { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 600; margin-top: .35rem; color: var(--c); }
.link-grammar { margin-top: .9rem; width: 100%; }

/* Player */
.player { position: relative; background: var(--player-bg); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.stage { position: relative; aspect-ratio: 1920 / 1040; container-type: inline-size; background: var(--player-bg); }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.ktv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.subs { position: absolute; left: 5%; right: 5%; bottom: 6%; text-align: center; pointer-events: none; display: grid; gap: .5cqw; }
.subs.empty { display: none; }
.subs > div { justify-self: center; padding: .12em .5em; border-radius: 6px; background: rgba(8, 8, 8, .55); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.sub-en { font: 600 max(14px, 3cqw)/1.3 var(--font-sans); }
.sub-zh { font-size: max(12px, 2.5cqw); color: #ffe3a3 !important; }
.subs > div:empty { display: none; }
.ktv-zh { position: absolute; top: 4%; left: 0; right: 0; text-align: center; color: #fff; font-size: max(12px, 2.4cqw); text-shadow: 0 0 4px #000, 0 0 2px #000; pointer-events: none; }
.big-play {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); color: #111; padding-left: 5px; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); transition: transform .15s;
}
.big-play:hover { transform: scale(1.06); }
.controls { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; background: linear-gradient(#121212, #0b0b0b); color: #ddd; }
.controls .ctl {
  background: rgba(255, 255, 255, .06); color: #e8e8e8; border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; height: 32px;
  padding: 0 .7rem; width: auto; font-size: .8rem; cursor: pointer;
}
.controls .ctl:hover { background: rgba(255, 255, 255, .12); }
.controls .ctl:focus { box-shadow: none; border-color: rgba(255, 255, 255, .35); }
.controls .icon-btn { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.controls select.ctl option { color: #000; }
.seek-wrap { position: relative; flex: 1; min-width: 60px; height: 20px; display: flex; align-items: center; }
.seek-marks { position: absolute; left: 7px; right: 7px; top: 50%; height: 4px; margin-top: -2px; pointer-events: none; }
.seek-marks i { position: absolute; top: 0; height: 100%; background: rgba(255, 255, 255, .22); border-radius: 2px; }
.controls .seek { position: relative; width: 100%; accent-color: var(--accent); padding: 0; border: 0; background: none; box-shadow: none; margin: 0; }
.controls .time { font: .75rem var(--font-mono); white-space: nowrap; color: #aaa; }
.player:fullscreen { display: flex; flex-direction: column; border-radius: 0; }
.player:fullscreen .stage { flex: 1; aspect-ratio: auto !important; }

/* Practice */
.shadow-controls { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.shadow-result { display: grid; grid-template-columns: 128px 1fr; gap: 1.3rem; margin-top: 1.2rem; align-items: center; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.score-ring {
  --p: 0; width: 128px; height: 128px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--surface) 80%, transparent 81%), conic-gradient(var(--c-user) calc(var(--p) * 1%), var(--surface-2) 0);
}
.score-num { font: 600 2.4rem/1 var(--font-serif); }
.score-ring small { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.contour-wrap { display: grid; gap: .5rem; }
.contour { width: 100%; height: 120px; background: var(--surface-2); border-radius: 12px; }
.legend { display: flex; gap: 1rem; font-size: .8rem; align-items: center; }
.legend .link { margin-left: auto; }
.lg::before { content: ""; display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lg.orig::before { background: var(--c-orig); } .lg.user::before { background: var(--c-user); }
.contour-wrap audio { width: 100%; height: 36px; }

/* Discussion */
.count-badge { font: 700 .72rem var(--font-sans); background: var(--surface-2); color: var(--text-2); padding: 1px 8px; border-radius: 999px; letter-spacing: 0; }
.count-badge:empty { display: none; }
.composer { display: flex; gap: .8rem; margin-bottom: .6rem; }
.composer-body { flex: 1; display: grid; gap: .55rem; }
.composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; }
.attach { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; color: var(--c-user); font-weight: 700; }
.comment { display: flex; gap: .8rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: .5rem; font-size: .9rem; flex-wrap: wrap; }
.comment-head .muted { font-size: .78rem; }
.comment-head .link { margin-left: auto; }
.comment-text { white-space: pre-wrap; word-wrap: break-word; margin-top: .25rem; color: var(--text-2); }
.comment-audio { display: flex; align-items: center; gap: .7rem; margin-top: .5rem; }
.comment-audio audio { height: 36px; max-width: 320px; width: 100%; }
.score-pill { --p: 0; font: 800 .8rem var(--font-sans); padding: .25rem .6rem; border-radius: 999px; color: #fff; background: hsl(calc(var(--p) * 1.2) 62% 42%); }
.empty-line { padding: .6rem 0; }

/* Avatars & badges */
.avatar { width: var(--s); height: var(--s); border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); display: block; }
.avatar.initials { display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: calc(var(--s) * .44); background: linear-gradient(135deg, hsl(var(--h) 60% 55%), hsl(calc(var(--h) + 30) 55% 42%)); }
.vip-badge {
  display: inline-flex; align-items: center; gap: 3px; background: linear-gradient(135deg, #ffe08a, #e2a514); color: #4a3200;
  font: 800 .66rem var(--font-sans); letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; vertical-align: middle;
}

/* ───────────────────────── Auth ───────────────────────── */
.auth-split {
  display: grid; grid-template-columns: 1fr 1fr; max-width: 940px; margin: 1.5rem auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg);
}
.auth-art {
  position: relative; padding: 3rem 2.6rem; display: flex; flex-direction: column; justify-content: flex-end; gap: 1rem; color: #f6efe6; min-height: 480px;
  background: radial-gradient(80% 60% at 20% 10%, rgba(255, 122, 61, .55), transparent 70%), radial-gradient(70% 60% at 100% 100%, rgba(80, 120, 255, .35), transparent 70%), #141210;
}
.auth-art .logo-mark { position: absolute; top: 2.2rem; left: 2.6rem; }
.auth-art blockquote { margin: 0; font-size: 1.8rem; line-height: 1.3; }
.auth-art p { color: rgba(246, 239, 230, .75); font: 1.05rem var(--font-serif); }
.auth-art .chip { --c: #ffb38a; color: #ffd8c2; }
.auth-art .chip.cat-clause { --c: #9fb7ff; color: #d3deff; }
.auth-form-col { padding: 3rem 2.6rem; display: grid; gap: 1rem; align-content: center; }
.auth-form-col h1 { font-size: 2rem; }
.auth-form, .nick-form { display: grid; gap: .9rem; }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .8rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.switch { justify-self: center; font-size: .9rem; }
.wx-head { display: flex; align-items: center; gap: .6rem; }
.wx-head h1 { font-size: 1.2rem; }
.wx-logo { color: var(--wechat); display: inline-flex; }
.avatar-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.avatar-pick button { border: 2px solid transparent; background: none; border-radius: 16px; padding: 3px; cursor: pointer; transition: .15s; }
.avatar-pick button.on { border-color: var(--wechat); transform: scale(1.04); }
.avatar-pick img { width: 100%; display: block; border-radius: 12px; }
.profile-head { display: flex; gap: 1.1rem; align-items: center; }
.profile-head h1 { font-size: 1.8rem; margin-bottom: .2rem; }

/* ───────────────────────── Studio (admin) ───────────────────────── */
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: .2rem; }
.tile b { font: 600 2.1rem/1 var(--font-serif); }
.tile span { font-size: .8rem; color: var(--muted); }
.tile.busy b { color: var(--accent); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 1.2rem; }
.admin-grid .toolbar { margin-top: 1rem; }
.sync-out { margin-top: .9rem; color: var(--text-2); }
.drop {
  display: grid; place-items: center; gap: .5rem; margin-top: .9rem; padding: 1.8rem 1rem; text-align: center; cursor: pointer; color: var(--muted);
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); transition: .15s; font-weight: 500;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.upload-list { list-style: none; padding: 0; margin: .6rem 0 0; font-size: .85rem; }
.upload-list li { display: flex; gap: .6rem; align-items: center; padding: .25rem 0; }
.upload-list li.error { color: var(--danger); }
.upload-list progress { width: 140px; accent-color: var(--accent); }
.users { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.switch-toggle { display: inline-flex; position: relative; cursor: pointer; }
.switch-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch-toggle i { width: 36px; height: 21px; border-radius: 999px; background: var(--border-strong); position: relative; transition: .2s; }
.switch-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.switch-toggle input:checked + i { background: var(--accent); }
.switch-toggle input:checked + i::after { left: 18px; }
.switch-toggle input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ───────────────────────── Footer & toast ───────────────────────── */
#footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 1.8rem 20px; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; font-size: .86rem; color: var(--text-2); }
.footer-inner .muted { margin-left: auto; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; transition: .25s; z-index: 60;
  background: var(--text); color: var(--bg); padding: .7rem 1.1rem; border-radius: 999px; font-size: .9rem; font-weight: 550; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 1000px) {
  .scene-top, .scene-body-layout { grid-template-columns: minmax(0, 1fr); }
  .script { height: auto; min-height: 0; max-height: 320px; }
  .col-side { position: static; }
  .featured { grid-template-columns: 1fr; }
  .library { grid-template-columns: minmax(0, 1fr); }
  .lib-nav { position: static; display: flex; flex-wrap: wrap; gap: .3rem; }
  .lib-nav button { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .35rem .75rem; font-size: .82rem; }
  .lib-nav button span { margin-left: .2rem; }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; gap: .6rem 1rem; padding: .6rem 16px; }
  .mainnav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .mainnav a { padding: .4rem .7rem; font-size: .86rem; }
  .top-search, .top-search-spacer { display: none; }
  .tools { margin-left: auto !important; }
  .wordmark small { display: none; }
  main { padding: 1.1rem 16px 3rem; }
  .hero { padding: 2.6rem 1rem 2rem; border-radius: 22px; }
  .hero-search kbd { display: none; }
  .stats { gap: 1.6rem; }
  .featured-text { padding: 1.4rem; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .explain { grid-template-columns: 1fr; }
  .grammar-hero { padding: 1.6rem 1.3rem; }
  .shadow-result { grid-template-columns: 1fr; justify-items: center; }
  .contour-wrap { width: 100%; }
  .controls .rate, .controls .time { display: none; }
  .controls { gap: .4rem; padding: .45rem .55rem; }
  .controls .mode { max-width: 7.5rem; }
  .auth-split { grid-template-columns: 1fr; border-radius: 22px; }
  .auth-art { min-height: 260px; padding: 2rem 1.6rem; }
  .auth-art .logo-mark { top: 1.6rem; left: 1.6rem; }
  .auth-art blockquote { font-size: 1.35rem; }
  .auth-form-col { padding: 2rem 1.6rem; }
  .stat-tiles { gap: .6rem; }
  .tile { padding: .9rem; }
  .tile b { font-size: 1.6rem; }
  .footer-inner .muted { margin-left: 0; }
  .hint .kbd-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
