:root {
  color-scheme: dark;
  --ink-950: #081116;
  --ink-900: #0d1b22;
  --ink-850: #11252d;
  --ink-800: #172f37;
  --panel: rgba(18, 38, 46, 0.92);
  --panel-raised: rgba(24, 49, 58, 0.96);
  --line: rgba(177, 213, 205, 0.18);
  --line-strong: rgba(177, 213, 205, 0.34);
  --text: #f5f3ea;
  --muted: #a7b8b7;
  --faint: #71898d;
  --mint: #8ed7c9;
  --mint-bright: #b4f0df;
  --amber: #f3b766;
  --amber-soft: #ffe2a8;
  --coral: #f08b7c;
  --good: #85d7a3;
  --bad: #f09a8d;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  --focus: 0 0 0 3px rgba(142, 215, 201, 0.48);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html { min-width: 320px; background: var(--ink-950); }

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(20, 52, 56, 0.55), transparent 38%),
    linear-gradient(320deg, rgba(111, 60, 38, 0.24), transparent 42%),
    var(--ink-950);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(190, 225, 216, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(190, 225, 216, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 15%, #000, transparent 86%);
}

button, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a { cursor: pointer; }
a { color: inherit; text-decoration: none; }

button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

button:disabled { cursor: not-allowed; opacity: 0.48; }

.micro-catch-app {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 0 0 16px;
}

.catch-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(240px, 1.35fr) minmax(180px, 0.8fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  margin: 0;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(177, 213, 205, 0.16);
  background: rgba(8, 17, 22, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand-link { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(243, 183, 102, 0.4);
  border-radius: 8px;
  background: linear-gradient(145deg, #245b63, #b0703c);
  color: #fff0cf;
  font-family: Georgia, serif;
  font-size: 17px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}
.brand-copy { min-width: 0; }
.brand-copy strong, .brand-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy strong { font-size: 14px; line-height: 1.2; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: 0.02em; }

.lesson-identity { min-width: 0; text-align: center; }
.eyebrow, .section-kicker, .toolbar-label, .caption-label {
  color: var(--mint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lesson-identity h1 { margin: 2px 0 0; overflow: hidden; font-family: Georgia, "Times New Roman", serif; font-size: clamp(17px, 1.7vw, 23px); font-weight: 500; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.lesson-identity p { margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-width: 0; }
.top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(142, 215, 201, 0.34);
  border-radius: var(--radius);
  background: rgba(142, 215, 201, 0.09);
  color: var(--mint-bright);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.top-link:hover { border-color: var(--mint); background: rgba(142, 215, 201, 0.16); }
.top-link.is-muted { border-color: var(--line); background: transparent; color: var(--muted); }

.challenge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
}
.main-column, .right-column { min-width: 0; }
.main-column { display: grid; gap: 8px; align-content: start; }
.right-column { display: none; }

.video-card, .word-catch-card, .rail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.video-card { overflow: hidden; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.video-stage {
  position: relative;
  isolation: isolate;
  min-height: clamp(580px, calc(100dvh - 174px), 940px);
  overflow: hidden;
  background: #0b151b;
}
.video-stage video { display: block; width: 100%; height: 100%; min-height: inherit; object-fit: cover; background: #0b151b; }
.stage-scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(5, 13, 17, 0.56), transparent 31%, transparent 53%, rgba(4, 12, 16, 0.78)); }
.stage-topline { position: absolute; top: 14px; left: 16px; right: 16px; z-index: 2; display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--muted); font-size: 10px; }
.live-chip { display: inline-flex; align-items: center; gap: 7px; color: var(--amber-soft); font-size: 10px; font-weight: 800; letter-spacing: 0.13em; }
.live-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(240, 139, 124, 0.18); }
.segment-position { padding: 5px 8px; border: 1px solid rgba(177, 213, 205, 0.25); border-radius: 999px; background: rgba(8, 17, 22, 0.46); font-variant-numeric: tabular-nums; }
.segment-jump-rail { position: absolute; top: 60px; right: 16px; z-index: 4; display: grid; gap: 6px; }
.segment-jump-rail button { width: 44px; min-height: 44px; border: 1px solid rgba(177, 213, 205, 0.34); border-radius: 50%; background: rgba(8, 17, 22, 0.72); color: var(--muted); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease; }
.segment-jump-rail button:hover, .segment-jump-rail button:focus-visible { border-color: var(--amber); background: rgba(243, 183, 102, 0.2); color: var(--amber-soft); transform: scale(1.05); }
.segment-jump-rail button.is-active { border-color: var(--good); background: rgba(65, 135, 108, 0.42); color: var(--mint-bright); }
.caption-layer { position: absolute; right: 20px; bottom: 18px; left: 20px; z-index: 2; text-align: center; pointer-events: none; }
.caption-label { display: block; margin-bottom: 8px; color: rgba(180, 240, 223, 0.72); font-size: 9px; }
.current-caption { max-width: 1040px; margin: 0 auto; color: #fffaf0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 3.2vw, 44px); line-height: 1.16; text-shadow: 0 3px 16px rgba(0, 0, 0, 0.72); }
.target-hud { position: relative; z-index: 1; display: grid; min-width: min(285px, calc(100% - 36px)); padding: 13px 22px 15px; border: 1px solid rgba(243, 183, 102, 0.62); border-radius: 8px; background: rgba(10, 26, 32, 0.86); box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.08); text-align: center; transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease; }
.hud-label { color: var(--amber); font-size: 10px; font-weight: 800; letter-spacing: 0.12em; }
.target-hud strong { margin: 5px 0 2px; color: var(--amber-soft); font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4.1vw, 56px); font-weight: 500; line-height: 1.05; }
.target-word { min-height: 16px; color: var(--mint-bright); font-size: 13px; font-weight: 750; letter-spacing: 0.02em; }
.target-word:empty { display: none; }
.target-status { min-height: 17px; color: var(--muted); font-size: 12px; }
.target-hud[data-state="caught"] { border-color: var(--good); background: rgba(17, 58, 51, 0.9); }
.target-hud[data-state="caught"] strong { color: var(--mint-bright); }
.target-hud[data-state="preview"] { border-color: var(--mint); background: rgba(12, 42, 45, 0.9); }
.target-hud[data-state="preview"] strong { color: var(--mint-bright); }
.target-hud[data-state="wrong"], .target-hud[data-state="missed"] { border-color: var(--coral); }
.target-hud[data-state="wrong"] { animation: hud-shake 220ms ease; }

.catch-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: clamp(12px, 2vw, 22px) 82px clamp(36px, 4vw, 56px);
  pointer-events: none;
}
.catch-overlay > * { pointer-events: auto; }
.catch-stream-shell {
  display: grid;
  gap: 8px;
  width: min(1240px, 100%);
  padding: 12px 18px 14px;
  border: 1px solid rgba(142, 215, 201, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(8, 19, 24, 0.66), rgba(8, 19, 24, 0.38));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.catch-stream-shell .stream-state {
  justify-self: center;
  padding: 0 10px;
  border: 1px solid rgba(177, 213, 205, 0.16);
  border-radius: 999px;
  background: rgba(8, 17, 22, 0.48);
  color: var(--amber-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.catch-stream-shell .word-stream {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 10px;
  min-height: 104px;
  margin: 0;
  padding: 10px 6px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.catch-stream-shell .live-feedback {
  min-height: 17px;
  margin: 0;
  color: var(--amber-soft);
  font-size: 11px;
  text-align: center;
}
.catch-stream-shell .live-feedback:empty { visibility: hidden; }
.catch-stream-shell .word-stream-hint {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}

.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 7px 12px; border-top: 1px solid var(--line); background: rgba(9, 23, 29, 0.78); }
.player-actions, .player-options { display: flex; align-items: center; gap: 9px; min-width: 0; }
.primary-control, .secondary-control, .tool-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(36, 67, 73, 0.8);
  color: var(--text);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
}
.primary-control { border-color: var(--amber); background: var(--amber); color: #172127; }
.primary-control:hover, .primary-control:focus-visible { border-color: var(--amber-soft); background: var(--amber-soft); color: #172127; }
.secondary-control:hover, .secondary-control:focus-visible, .tool-button:hover, .tool-button:focus-visible { border-color: var(--mint); background: rgba(142, 215, 201, 0.16); }
.primary-control:active, .secondary-control:active, .tool-button:active { transform: translateY(1px); }
.control-icon { position: relative; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 8px solid currentColor; }
.control-icon.icon-pause { width: 11px; height: 13px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.icon-replay { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.icon-replay::after { position: absolute; top: -4px; left: -3px; content: ""; border-top: 4px solid currentColor; border-right: 4px solid transparent; }
.playback-state { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.playback-state[data-tone="good"] { color: var(--mint-bright); }
.playback-state[data-tone="bad"] { color: var(--bad); }
.player-options { justify-content: flex-end; }
.select-control { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.select-control select { min-height: 34px; border: 1px solid var(--line); border-radius: 6px; background: var(--ink-800); color: var(--text); padding: 0 8px; }
.elapsed-label { min-width: 42px; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }

.progress-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px auto; align-items: center; gap: 8px; padding: 6px 12px 8px; background: rgba(6, 17, 22, 0.72); }
.time-label, .progress-value { color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.progress-value { min-width: 33px; text-align: right; }
.progress-track, .target-progress { position: relative; overflow: hidden; height: 6px; border-radius: 999px; background: rgba(177, 213, 205, 0.16); }
.progress-track span, .target-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--amber)); transition: width 180ms linear; }

.word-catch-card { padding: 18px 18px 14px; }
.panel-heading, .rail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-heading h2, .rail-heading h2 { margin: 4px 0 0; font-size: 17px; line-height: 1.2; }
.stream-state { padding-top: 3px; color: var(--faint); font-size: 11px; white-space: nowrap; }
.word-stream { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 7px; min-height: 88px; margin: 17px 0 10px; padding: 16px 12px; border: 1px solid rgba(142, 215, 201, 0.2); border-radius: var(--radius); background: rgba(7, 20, 25, 0.65); }
.word-token { min-height: 52px; border: 1px solid rgba(177, 213, 205, 0.28); border-radius: 7px; background: rgba(39, 72, 78, 0.78); color: #eaf8f2; padding: 0 17px; font-size: clamp(22px, 2.15vw, 34px); font-weight: 700; line-height: 1; transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 140ms ease, opacity 140ms ease; }
.word-token:not(:disabled):hover, .word-token:not(:disabled):focus-visible { border-color: var(--amber); background: rgba(243, 183, 102, 0.18); color: var(--amber-soft); transform: translateY(-2px); }
.word-token.is-current { border-color: var(--amber); background: rgba(243, 183, 102, 0.26); color: var(--amber-soft); box-shadow: 0 0 0 2px rgba(243, 183, 102, 0.13); }
.word-token.is-caught { border-color: var(--good); background: rgba(65, 135, 108, 0.4); color: var(--mint-bright); }
.word-token.is-missed { border-color: var(--coral); background: rgba(136, 55, 54, 0.33); color: var(--bad); opacity: 0.62; }
.word-token.is-wrong { border-color: var(--coral); background: rgba(240, 139, 124, 0.22); animation: token-shake 220ms ease; }
.word-token.is-placeholder { border-color: transparent; background: transparent; color: var(--faint); font-size: 13px; font-weight: 500; }
.word-stream-hint { margin: 0; color: var(--faint); font-size: 11px; text-align: center; }
.live-feedback { min-height: 17px; margin: 0 0 5px; color: var(--amber-soft); font-size: 11px; text-align: center; }
.live-feedback:empty { visibility: hidden; }

/* Runtime-generated word nodes use the catch-* class names so the engine
   can be shared with a compact embed of this page. */
.word-stream .catch-word-button {
  min-height: 52px;
  border: 1px solid rgba(177, 213, 205, 0.28);
  border-radius: 7px;
  background: rgba(39, 72, 78, 0.78);
  color: #eaf8f2;
  padding: 0 17px;
  cursor: pointer;
  font-size: clamp(22px, 2.15vw, 34px);
  font-weight: 700;
  line-height: 1;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 140ms ease, opacity 140ms ease;
}
.word-stream .catch-word-button:hover,
.word-stream .catch-word-button:focus-visible {
  border-color: var(--amber);
  background: rgba(243, 183, 102, 0.18);
  color: var(--amber-soft);
  transform: translateY(-2px);
}
.word-stream .catch-word-button.is-correct { border-color: var(--good); background: rgba(65, 135, 108, 0.4); color: var(--mint-bright); }
.word-stream .catch-word-button.is-missed { border-color: var(--coral); background: rgba(136, 55, 54, 0.33); color: var(--bad); opacity: 0.62; }
.word-stream .catch-word-button.is-wrong { border-color: var(--coral); background: rgba(240, 139, 124, 0.22); animation: token-shake 220ms ease; }
.word-stream .catch-word-text, .word-stream .catch-punctuation { color: #eaf8f2; font-size: clamp(22px, 2.15vw, 34px); line-height: 1; }
.word-stream .catch-punctuation { color: var(--muted); }

.practice-toolbar { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 2px; }
.difficulty-wrap { display: flex; align-items: center; gap: 8px; }
.toolbar-label { color: var(--muted); font-size: 10px; letter-spacing: 0.05em; white-space: nowrap; }
.difficulty-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: rgba(15, 35, 41, 0.86); }
.difficulty-switch button { min-height: 32px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); padding: 0 11px; font-size: 11px; font-weight: 750; }
.difficulty-switch button[aria-pressed="true"] { border-color: rgba(243, 183, 102, 0.55); background: rgba(243, 183, 102, 0.16); color: var(--amber-soft); }
.auto-pause-toggle { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(15, 35, 41, 0.72); color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 800; transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease; }
.auto-pause-toggle:hover, .auto-pause-toggle:focus-within { border-color: rgba(243, 183, 102, 0.55); background: rgba(243, 183, 102, 0.11); color: var(--amber-soft); }
.auto-pause-toggle:active { transform: translateY(1px); }
.auto-pause-toggle input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.auto-pause-track { position: relative; width: 32px; height: 18px; flex: 0 0 auto; border: 1px solid rgba(177, 213, 205, 0.24); border-radius: 999px; background: rgba(6, 17, 22, 0.78); transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
.auto-pause-track span { position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); transition: transform 180ms ease, background-color 180ms ease; }
.auto-pause-toggle.is-on { border-color: rgba(243, 183, 102, 0.58); background: rgba(243, 183, 102, 0.14); color: var(--amber-soft); }
.auto-pause-toggle.is-on .auto-pause-track { border-color: rgba(243, 183, 102, 0.7); background: rgba(243, 183, 102, 0.24); box-shadow: 0 0 0 3px rgba(243, 183, 102, 0.08); }
.auto-pause-toggle.is-on .auto-pause-track span { transform: translateX(14px); background: var(--amber-soft); }
.auto-pause-toggle input:focus-visible + .auto-pause-track { outline: 2px solid var(--amber); outline-offset: 3px; }
.auto-pause-label { white-space: nowrap; }
.tool-button { min-height: 36px; padding: 0 11px; font-size: 11px; }
.toolbar-note { margin-left: auto; color: var(--faint); font-size: 11px; text-align: right; }

.rail-card { padding: 12px; }
.rail-heading h2 { font-size: 14px; }
.rail-count { color: var(--amber-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.target-progress { height: 4px; margin: 10px 0 9px; }
.target-list { display: grid; gap: 6px; max-height: min(54vh, 560px); margin: 0; padding: 0 2px 0 0; overflow-y: auto; list-style: none; scrollbar-color: var(--line-strong) transparent; }
.target-item { display: grid; grid-template-columns: 23px minmax(0, 1fr) 14px; align-items: center; gap: 6px; min-height: 45px; padding: 6px 7px 6px 6px; border: 1px solid transparent; border-radius: 7px; background: rgba(9, 25, 31, 0.42); }
.target-item.is-current { border-color: rgba(243, 183, 102, 0.46); background: rgba(243, 183, 102, 0.1); }
.target-item.is-caught { border-color: rgba(133, 215, 163, 0.32); background: rgba(65, 135, 108, 0.15); }
.target-item.is-missed { border-color: rgba(240, 139, 124, 0.3); background: rgba(136, 55, 54, 0.12); }
.target-index { display: grid; width: 21px; height: 21px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.target-item.is-current .target-index { border-color: var(--amber); color: var(--amber-soft); }
.target-item.is-caught .target-index { border-color: var(--good); color: var(--good); }
.target-copy { min-width: 0; }
.target-copy strong, .target-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.target-copy strong { color: var(--text); font-size: 11px; }
.target-copy small { margin-top: 1px; color: var(--faint); font-size: 9px; }
.target-mark { color: var(--faint); font-size: 16px; line-height: 1; text-align: center; }
.target-item.is-caught .target-mark { color: var(--good); }
.target-item.is-missed .target-mark { color: var(--coral); }

.stats-card { padding-bottom: 14px; }
.status-dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 4px rgba(113, 137, 141, 0.14); }
.status-dot.is-live { background: var(--good); box-shadow: 0 0 0 4px rgba(133, 215, 163, 0.15); }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--line); }
.stat-cell { min-width: 0; padding: 9px 6px 8px; background: rgba(9, 25, 31, 0.72); }
.stat-cell span, .stat-cell small { display: block; color: var(--muted); font-size: 10px; }
.stat-cell strong { display: block; margin: 2px 0 1px; color: var(--amber-soft); font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-cell small { color: var(--faint); }
.stat-cell small b { color: var(--mint); font-weight: 700; }
.stat-combo strong { color: var(--mint-bright); }

.missed-card { min-height: 120px; }
.missed-list { display: flex; flex-wrap: wrap; gap: 5px; min-height: 42px; margin-top: 10px; align-content: flex-start; }
.empty-state { width: 100%; margin: 0; color: var(--faint); font-size: 11px; line-height: 1.5; }
.missed-word { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 8px; border: 1px solid rgba(240, 139, 124, 0.3); border-radius: 6px; background: rgba(136, 55, 54, 0.16); }
.missed-word strong { color: #ffd4cb; font-size: 12px; }
.missed-word small { color: var(--bad); font-size: 10px; }
.catch-review-empty { width: 100%; margin: 0; color: var(--faint); font-size: 11px; line-height: 1.5; }
.catch-review-item {
  display: inline-grid;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(240, 139, 124, 0.3);
  border-radius: 6px;
  background: rgba(136, 55, 54, 0.16);
  color: var(--text);
  text-align: left;
}
.catch-review-item:hover, .catch-review-item:focus-visible { border-color: var(--coral); background: rgba(136, 55, 54, 0.28); }
.catch-review-item strong { overflow: hidden; color: #ffd4cb; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.catch-review-item span { overflow: hidden; color: var(--bad); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.catch-review-item small { color: var(--faint); font-size: 9px; }

.completion-panel { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.completion-backdrop { position: absolute; inset: 0; background: rgba(3, 9, 12, 0.78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.completion-dialog { position: relative; width: min(600px, 100%); max-height: min(90dvh, 760px); overflow-y: auto; padding: 30px clamp(20px, 5vw, 44px) 26px; border: 1px solid rgba(243, 183, 102, 0.5); border-radius: var(--radius); background: linear-gradient(145deg, #18343b, #102129 70%); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48); text-align: center; }
.completion-kicker, .completion-subheading span { color: var(--amber); font-size: 10px; font-weight: 800; letter-spacing: 0.15em; }
.completion-icon { display: grid; width: 46px; height: 46px; margin: 13px auto 10px; place-items: center; border: 1px solid var(--good); border-radius: 50%; color: var(--good); font-size: 23px; }
.completion-dialog h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 500; }
.completion-summary { margin: 9px auto 0; max-width: 420px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.completion-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 22px 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--line); }
.completion-metrics span { padding: 12px 7px; background: rgba(7, 22, 27, 0.7); }
.completion-metrics strong, .completion-metrics small { display: block; }
.completion-metrics strong { color: var(--amber-soft); font-size: 22px; font-variant-numeric: tabular-nums; }
.completion-metrics small { margin-top: 3px; color: var(--faint); font-size: 10px; }
.completion-missed-block { padding: 13px 14px; border: 1px solid var(--line); border-radius: 7px; background: rgba(6, 20, 25, 0.5); text-align: left; }
.completion-subheading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.completion-subheading strong { font-size: 13px; }
.completion-missed-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 25px; margin-top: 10px; }
.completion-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 20px; }
.text-action { min-height: 40px; display: inline-flex; align-items: center; padding: 0 8px; color: var(--muted); font-size: 12px; }
.text-action:hover { color: var(--mint-bright); }

@keyframes token-shake { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(-4px); } 70% { transform: translateX(4px); } }
@keyframes hud-shake { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(-4px); } 70% { transform: translateX(4px); } }

@media (max-width: 1120px) {
  .catch-topbar { grid-template-columns: minmax(170px, 1fr) minmax(230px, 1.2fr) minmax(190px, 1fr); gap: 10px; }
  .top-link.is-muted { display: none; }
  .video-stage { min-height: clamp(500px, calc(100dvh - 170px), 760px); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .micro-catch-app { padding-right: 8px; padding-left: 8px; }
  .catch-topbar { grid-template-columns: minmax(0, 1fr) auto; margin: 0 -8px; padding-right: 8px; padding-left: 8px; }
  .lesson-identity { display: none; }
  .challenge-layout { padding-top: 0; }
  .video-stage { min-height: min(72dvh, 620px); }
  .catch-overlay { padding-right: 62px; padding-left: 18px; }
  .segment-jump-rail { right: 10px; gap: 4px; }
}

@media (max-width: 560px) {
  .micro-catch-app { padding-bottom: 24px; }
  .catch-topbar { min-height: 64px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-copy strong { font-size: 14px; }
  .top-link { min-height: 36px; padding: 0 9px; font-size: 11px; }
  .top-link span:first-child { font-size: 16px; }
  .video-stage { min-height: 62dvh; max-height: none; }
  .stage-topline { top: 11px; left: 12px; right: 12px; }
  .segment-position { padding: 4px 6px; font-size: 10px; }
  .caption-layer { right: 12px; bottom: 14px; left: 12px; }
  .current-caption { font-size: clamp(17px, 5vw, 25px); }
  .catch-overlay { gap: 8px; padding: 12px 52px 32px 12px; }
  .target-hud { min-width: min(245px, calc(100% - 24px)); padding: 11px 14px 12px; }
  .target-hud strong { font-size: 32px; }
  .catch-stream-shell { width: min(100%, 540px); gap: 7px; padding: 10px 12px 11px; border-radius: 16px; }
  .catch-stream-shell .word-stream { min-height: 76px; padding: 8px 4px 0; gap: 7px 7px; }
  .catch-stream-shell .word-stream-hint, .catch-stream-shell .live-feedback { font-size: 10px; line-height: 1.35; }
  .player-bar { align-items: stretch; flex-direction: column; gap: 9px; padding: 9px 10px; }
  .player-actions, .player-options { justify-content: space-between; }
  .primary-control { min-width: 106px; }
  .progress-row { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 6px; padding-right: 10px; padding-left: 10px; }
  .progress-value { display: none; }
  .word-token, .word-stream .catch-word-button { min-height: 44px; padding: 0 10px; font-size: clamp(17px, 5vw, 23px); }
  .word-stream .catch-word-text, .word-stream .catch-punctuation { font-size: clamp(17px, 5vw, 23px); }
  .practice-toolbar { flex-wrap: wrap; gap: 9px; min-height: 0; padding-top: 1px; }
  .toolbar-note { width: 100%; margin-left: 0; text-align: left; }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-cell { padding: 10px 5px; text-align: center; }
  .stat-cell strong { font-size: 18px; }
  .stat-cell span, .stat-cell small { font-size: 9px; }
  .completion-panel { padding: 12px; }
  .completion-dialog { padding: 24px 14px 18px; }
  .completion-dialog h2 { font-size: 26px; }
  .completion-metrics { gap: 0; margin: 17px 0; }
  .completion-metrics strong { font-size: 18px; }
  .completion-metrics small { font-size: 9px; }
  .completion-actions .primary-control, .completion-actions .secondary-control { flex: 1 1 44%; }
  .completion-actions .text-action { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
