/* V2 owns this stylesheet. No legacy reset, Tailwind bundle, or page CSS is loaded.
   Tokens -> layout primitives -> semantic components -> page compositions. */
:root {
  color-scheme: light;
  --v2-bg: #f7f5f2; --v2-brand-bg: #efd0cd; --v2-surface: #fffefd; --v2-soft: #efebe6;
  --v2-brand: #b3362f; --v2-on-brand: #fff;
  --v2-text: #141414; --v2-muted: #48453f; --v2-border: #9d978c; --v2-control-border: #69645b;
  --v2-pinyin: #5b554f;
  --v2-accent: #064a91; --v2-accent-hover: #053a72; --v2-tint: #e9e3dd; --v2-on-accent: #fff;
  --v2-action: #1264c4; --v2-action-hover: #0c519f; --v2-on-action: #fff; --v2-progress-fill: #168254;
  --v2-success: #1b6a40; --v2-success-bg: #e8f5ed; --v2-error: #9d3b40; --v2-error-bg: #fff0f0;
  --v2-on-success: #fff;
  --v2-mastery: #55318f;
  --v2-activity-recall: #12695c; --v2-activity-reading: #6741a5; --v2-activity-listening: #185ca5;
  --v2-activity-speaking: #a33362; --v2-activity-writing: #8a4d10;
  --v2-practice: #90600d; --v2-card-shadow: 0 2px 4px #00000005, 0 8px 24px #00000008, inset 0 1px 0 #ffffffb3;
  --v2-radius: 8px; --v2-control-radius: 6px; --v2-shadow: 0 24px 70px #00000012;
  --v2-input: #fff; --v2-input-shadow: inset 0 1px 2px #0000002e; --v2-control-shadow: 0 1px 2px #00000038, inset 0 1px 0 #ffffff80;
  --v2-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --v2-size-xs: .75rem; --v2-size-sm: .8125rem; --v2-size-md: .875rem; --v2-size-base: 1rem;
  --v2-size-lg: 1.125rem; --v2-size-xl: 1.25rem; --v2-size-2xl: 1.5rem; --v2-size-3xl: 1.75rem;
  --v2-space-1: .25rem; --v2-space-2: .5rem; --v2-space-3: .75rem; --v2-space-4: 1rem;
  --v2-space-5: 1.5rem; --v2-space-6: 2rem; --v2-space-7: 3rem; --v2-space-8: 5rem;
  --v2-page-padding: var(--v2-space-4); --v2-page-header-gap: var(--v2-space-3); --v2-page-content-gap: var(--v2-space-5);
  --v2-page-title-size: clamp(1.875rem, 3vw, 2.5rem);
  --v2-gutter: clamp(1rem, 3vw, 2.5rem); --v2-gap: clamp(.75rem, 2vw, 1.5rem);
  --v2-container: 1240px; --v2-reading: 760px; --v2-header: 80px;
  --v2-motion: 160ms; --v2-font: "Noto Sans", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  --v2-chinese: "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --v2-pinyin-font: "Segoe UI", "Noto Sans", Arial, system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark; --v2-bg: #1b1a18; --v2-brand-bg: #3a2a2c; --v2-surface: #2f2f2f; --v2-soft: #242424;
  --v2-brand: #c2413a; --v2-on-brand: #fff;
  --v2-text: #f3f2ef; --v2-muted: #c4c4c4; --v2-border: #595959; --v2-control-border: #9a9a9a;
  --v2-pinyin: #bcb9b2;
  --v2-accent: #8bc4ff; --v2-accent-hover: #b9dcff; --v2-on-accent: #142234; --v2-tint: #434343;
  --v2-action: #1771d8; --v2-action-hover: #0f63be; --v2-progress-fill: #59cf98;
  --v2-success: #79d8a7; --v2-success-bg: #183b2f; --v2-error: #ffb0b1; --v2-error-bg: #482b35;
  --v2-on-success: #123423;
  --v2-mastery: #a98bf5;
  --v2-activity-recall: #85d8c6; --v2-activity-reading: #c7b0ff; --v2-activity-listening: #92c7ff;
  --v2-activity-speaking: #ffaccd; --v2-activity-writing: #f1c089;
  --v2-practice: #f0c079; --v2-card-shadow: 0 2px 4px #00000014, 0 8px 24px #00000026, inset 0 1px 0 #ffffff0a;
  --v2-shadow: 0 24px 70px #0003;
  --v2-input: #1d1d1d; --v2-input-shadow: inset 0 1px 3px #0000008c; --v2-control-shadow: 0 1px 2px #00000080, inset 0 1px 0 #ffffff1f;
  --v2-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f2ef' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.v2, .v2 * { box-sizing: border-box; }
.v2 { margin: 0; background: var(--v2-bg); color: var(--v2-text); font: 400 1rem/1.6 var(--v2-font); -webkit-font-smoothing: antialiased; }
.v2 [hidden] { display: none !important; }
.v2 h1, .v2 h2, .v2 h3, .v2 p { margin: 0; }
.v2 h1, .v2 h2, .v2 h3 { line-height: 1.15; letter-spacing: -.035em; font-weight: 600; text-wrap: balance; }
.v2 h1 { font-size: clamp(2.8rem, 4.6vw, 4.6rem); }
.v2 h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.v2 h3, .v2 .v2-h3 { font-size: var(--v2-size-xl); line-height: 1.3; letter-spacing: -.025em; }
.v2 p + p { margin-top: .75rem; }
.v2 a { color: var(--v2-accent); text-underline-offset: .2em; }
.v2 button, .v2 input, .v2 select { font: inherit; }
.v2 .v2-button { font-size: var(--v2-size-md); line-height: 1.4; font-weight: 600; }
.v2 button, .v2 a, .v2 input, .v2 select, .v2 summary { -webkit-tap-highlight-color: transparent; }
.v2 :focus-visible { outline: 3px solid var(--v2-accent); outline-offset: 4px; }
.v2 section[id] { scroll-margin-top: calc(var(--v2-header) + 1rem); }
.v2 ::selection { background: var(--v2-accent); color: var(--v2-on-accent); }
.v2 [lang^="zh"] { font-family: var(--v2-chinese); letter-spacing: .025em; }
.v2 :is(.v2-pinyin, .v2-fc-pinyin, .v2-practice-word__pinyin, .v2-phonetic-label, .v2-phonetics-sound, rt) { font-family: var(--v2-pinyin-font); }
.v2-container { width: min(100%, calc(var(--v2-container) + 2 * var(--v2-gutter))); padding-inline: var(--v2-gutter); margin-inline: auto; }
.v2-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--v2-gap); }
.v2-grid > * { min-width: 0; }
.v2-sync-console { gap: var(--v2-space-3); }
.v2-sync-coverage { min-width: 0; display: grid; gap: var(--v2-space-2); }
.v2 .v2-sync-coverage .v2-data-table.v2-sync-report { font-size: var(--v2-size-sm); min-width: 50rem; }
.v2-sync-coverage .v2-sync-report td, .v2-sync-coverage .v2-sync-report th { min-width: 5rem; }
.v2-sync-coverage .v2-sync-report .v2-button { font-size: var(--v2-size-xs); }
.v2-sync-coverage summary { cursor: pointer; min-height: 44px; }
.v2-sync-control__state .v2-sync-recovery { color: var(--v2-text); }
.v2-sync-controls { position: sticky; top: calc(var(--v2-header) + env(safe-area-inset-top)); z-index: 15; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-3); padding: var(--v2-space-3); background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); max-height: 52dvh; overflow: auto; }
.v2--native .v2-sync-controls { top: calc(var(--v2-header) + env(safe-area-inset-top)); }
.v2-sync-control { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(7rem, 12rem); gap: var(--v2-space-2); align-items: start; }
.v2-sync-control + .v2-sync-control { border-inline-start: 1px solid var(--v2-border); padding-inline-start: var(--v2-space-3); }
.v2-sync-control__state, .v2-sync-control__actions, .v2-sync-start { min-width: 0; display: grid; gap: var(--v2-space-1); }
.v2-sync-control__state { font-size: var(--v2-size-md); }
.v2-sync-control__state .v2-h3 { font-size: var(--v2-size-base); }
.v2-sync-control__state small { display: block; color: var(--v2-muted); font-size: var(--v2-size-xs); line-height: 1.35; }
.v2-sync-control__actions .v2-button { width: 100%; min-height: 40px; padding: var(--v2-space-2) var(--v2-space-2); font-size: var(--v2-size-sm); }
.v2-sync-options { min-width: 0; font-size: var(--v2-size-sm); }
.v2-sync-options summary { cursor: pointer; min-height: 36px; padding-block: var(--v2-space-1); }
.v2-sync-options label { display: block; overflow-wrap: anywhere; }
.v2-sync-options input[type=number] { width: 4rem; min-height: 40px; }
.v2-sync-options select { width: 100%; max-width: 100%; }
.v2-sync-options fieldset { min-width: 0; padding: var(--v2-space-2); }
.v2-sync-readiness, .v2-sync-live { grid-column: 1 / -1; }
.v2-sync-live { font-size: var(--v2-size-xs); color: var(--v2-muted); }
.v2-sync-console #course-report, .v2-sync-console #practice-history-sync { scroll-margin-top: calc(var(--v2-header) + var(--v2-sync-controls-height, 18rem) + 1rem); }
@media (max-width: 900px) {
  .v2-sync-controls { grid-template-columns: 1fr; }
  .v2-sync-control + .v2-sync-control { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--v2-border); padding-top: var(--v2-space-2); }
}
@media (max-width: 600px) {
  .v2-sync-controls { max-height: 45dvh; padding: var(--v2-space-2); gap: var(--v2-space-2); }
  .v2-sync-control { grid-template-columns: minmax(0, 1fr) 7rem; }
  .v2-sync-control__state { font-size: var(--v2-size-xs); line-height: 1.3; }
  .v2-sync-control__state .v2-h3 { font-size: var(--v2-size-md); }
  .v2-sync-control__state small { font-size: var(--v2-size-xs); }
  .v2-sync-control .v2-sync-next-action, .v2-sync-live { display: none; }
  .v2-sync-live[data-sync-error="true"] { display: block; color: var(--v2-error); }
}
.v2-sync-summary { width: auto; border-collapse: collapse; font-size: var(--v2-size-md); }
.v2-sync-summary th, .v2-sync-summary td { padding: var(--v2-space-1) var(--v2-space-2); border-bottom: 1px solid var(--v2-border); text-align: end; }
.v2-sync-summary th:first-child { text-align: start; }
.v2 .v2-data-table.v2-sync-report { min-width: 100%; width: 100%; font-size: var(--v2-size-md); }
.v2 .v2-data-table.v2-sync-report th, .v2 .v2-data-table.v2-sync-report td { padding: var(--v2-space-2) var(--v2-space-2); min-width: 6rem; max-width: 25rem; line-height: 1.35; overflow-wrap: anywhere; }
.v2-sync-report small { display: block; color: var(--v2-muted); font-size: var(--v2-size-xs); }
.v2-sync-report .v2-button { min-height: 44px; padding-block: var(--v2-space-1); }
.v2-sync-report caption { text-align: start; font-weight: 600; padding-block: var(--v2-space-1); }
.v2-span-3, .v2-span-4, .v2-span-6, .v2-span-8 { grid-column: span 4; }
.v2-span-12 { grid-column: 1 / -1; }
.v2-stack { display: flex; flex-direction: column; gap: var(--v2-space-4); }
.v2-fc-tabs { padding-bottom: 0; }
.v2-fc-tabs a { padding: var(--v2-space-2) var(--v2-space-3); text-decoration: none; }
.v2-fc-tabs a[aria-current="page"] { background: var(--v2-action); color: var(--v2-on-action); }
.v2-fc-summary { gap: var(--v2-space-2); }
.v2-practice-landing > .v2-panel,.v2-practice-landing form.v2-stack { gap: var(--v2-space-4); }
.v2-launch-skills { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--v2-space-2); border: 0; padding: 0; margin: 0; }
.v2-launch-skills legend { margin-bottom: var(--v2-space-2); font-size: var(--v2-size-md); font-weight: 600; }
.v2-launch-skills label { display: flex; align-items: center; gap: var(--v2-space-2); padding: var(--v2-space-3); min-height: 48px; background: var(--v2-soft); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); font-size: var(--v2-size-md); cursor: pointer; }
.v2-launch-skills label:has(input:checked) { border-color: var(--v2-accent); background: var(--v2-tint); }
.v2-launch-skills input { accent-color: var(--v2-action); flex-shrink: 0; }
.v2-launch-skills .v2-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.v2-launch-options summary { cursor: pointer; font-size: var(--v2-size-md); padding-block: var(--v2-space-2); }
.v2-launch-options .v2-field { max-width: 16rem; margin-top: var(--v2-space-3); }
.v2-launch-options .v2-caption { margin-top: var(--v2-space-2); }
.v2-launch-action { display: flex; justify-content: flex-end; }
.v2-launch-action .v2-button { min-width: 180px; }
.v2-speaking-landing .v2-speaking-book-choice { max-width: 28rem; }
.v2-writing-landing { max-width: calc(920px + 2 * var(--v2-gutter)); }
.v2-speaking-landing [data-v2-speaking-landing-target="status"]:empty { display: none; }
.v2-speaking-landing [data-v2-speaking-landing-target="reload"] { align-self: flex-start; }
@media (max-width: 699px) {
  .v2-launch-skills { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .v2-launch-skills label { gap: var(--v2-space-2); padding: var(--v2-space-2) var(--v2-space-2); font-size: var(--v2-size-sm); }
  .v2-launch-action .v2-button { width: 100%; }
}
@media (max-width: 360px) {
  .v2-launch-skills .v2-icon { display: none; }
  .v2-launch-skills label { font-size: var(--v2-size-xs); gap: var(--v2-space-1); }
}
.v2-fc-flow { scroll-margin-top: calc(var(--v2-header) + env(safe-area-inset-top)); }
.v2-fc-meter { appearance: none; width: 100%; height: 7px; border: 0; background: var(--v2-border); border-radius: 3px; overflow: hidden; }
.v2-fc-meter::-webkit-progress-bar { background: var(--v2-border); }
.v2-fc-meter::-webkit-progress-value { background: var(--v2-progress-fill); }
.v2-fc-meter::-moz-progress-bar { background: var(--v2-progress-fill); }
.v2-fc-sticky { position: sticky; top: var(--v2-header); z-index: 10; padding-block: var(--v2-space-4); background: var(--v2-bg); gap: var(--v2-space-3); }
.v2-fc-hanzi { font-size: 2.5rem; }
.v2-fc-pinyin { font-size: var(--v2-size-2xl); color: var(--v2-pinyin); }
.v2-fc-success { color: var(--v2-success); }
.v2-fc-ratings { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--v2-space-2); }
.v2-fc-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .v2-fc-form textarea { background: var(--v2-surface); color: var(--v2-text); border: 1px solid var(--v2-border); padding: var(--v2-space-2); font: inherit; min-width: 0; max-width: 100%; border-radius: var(--v2-control-radius); }
.v2-fc-form input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--v2-action); }
.v2-fc-word-row { padding-block: var(--v2-space-3); border-bottom: 1px solid var(--v2-border); overflow-wrap: anywhere; }
.v2-fc-import { margin-top: var(--v2-space-4); }
.v2-fc-import pre { white-space: pre-wrap; }
@media (max-width: 480px) { .v2-fc-ratings { grid-template-columns: repeat(2, 1fr); } }
.v2-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-3); }
.v2-game-card { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr); gap: var(--v2-space-5); align-items: center; }
.v2-game-card > * { margin: 0; min-width: 0; }
.v2-game-art { display: block; overflow: hidden; border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-soft); }
.v2-game-art img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.v2-game-copy { gap: var(--v2-space-2); }
.v2-game-launch { gap: var(--v2-space-3); }
.v2-game-launch__controls { align-items: end; }
.v2-game-launch .v2-field { width: auto; min-width: 8rem; }
.v2-game-checkbox { min-height: 44px; font-size: var(--v2-size-md); cursor: pointer; }
.v2-game-checkbox input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--v2-action); }
.v2-game-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--v2-space-5); align-items: start; }
.v2-game-instructions { margin: 0; padding-left: var(--v2-space-4); }
.v2-game-instructions li + li { margin-top: var(--v2-space-3); }
.v2-game-scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--v2-space-5); }
.v2-game-score-list { margin: 0; padding-left: var(--v2-space-5); }
.v2-game-score-list li { padding: var(--v2-space-2); border-bottom: 1px solid var(--v2-border); }
.v2-game-score-list time { display: block; }
@media (max-width: 699px) {
  .v2-game-card, .v2-game-detail, .v2-game-scores { grid-template-columns: minmax(0, 1fr); }
}
/* Games catalog cards: the artwork across the top, copy and launch controls
   under it. The attribute keeps them apart from the Review game's cards of
   the same name. */
.v2-game-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--v2-space-4); }
.v2-game-card[data-game-card] { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; text-align: left; touch-action: auto; transition: none; }
.v2-game-card[data-game-card] > .v2-game-art { flex-shrink: 0; border: 0; border-bottom: 1px solid var(--v2-border); border-radius: 0; }
.v2-game-card[data-game-card] > .v2-game-body { flex: 1; padding: var(--v2-space-4); }
.v2-badge.v2-badge--new { border-color: var(--v2-accent); background: var(--v2-accent); color: var(--v2-on-accent); }
@media (max-width: 699px) {
  /* Phone: a shallower crop keeps more than one card in view. */
  .v2-game-card[data-game-card] > .v2-game-art img { aspect-ratio: 2 / 1; }
}
.v2-between { justify-content: space-between; }
.v2-muted { color: var(--v2-muted); }
.v2-caption { font-size: var(--v2-size-sm); line-height: 1.5; color: var(--v2-muted); }
.v2-eyebrow { color: var(--v2-accent); font-size: var(--v2-size-xs); font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }
.v2-page-title { font-size: var(--v2-page-title-size) !important; }
.v2-lead { font-size: var(--v2-size-lg); line-height: 1.85; color: var(--v2-muted); max-width: 49ch; }
.v2-icon { width: 20px; height: 20px; flex: 0 0 20px; vertical-align: middle; }
.v2-round-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--v2-tint); color: var(--v2-accent); flex-shrink: 0; }
.v2-button { display: inline-flex; align-items: center; justify-content: center; gap: var(--v2-space-2); min-height: 44px; max-width: 100%; padding: var(--v2-space-2) var(--v2-space-4); border: 1px solid transparent; border-radius: var(--v2-control-radius); font-size: var(--v2-size-md); line-height: 1.4; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; transition: background var(--v2-motion), border-color var(--v2-motion), box-shadow var(--v2-motion); }
.v2 .v2-button--primary { background: var(--v2-action); color: var(--v2-on-action); border-color: var(--v2-action); box-shadow: 0 2px 0 #0002; }
.v2 .v2-button--primary:hover { background: var(--v2-action-hover); }
.v2 .v2-button--secondary { background: transparent; color: var(--v2-text); border-color: var(--v2-border); }
.v2-button--secondary:hover, .v2-button--quiet:hover { background: var(--v2-tint); border-color: var(--v2-accent); }
.v2 .v2-button--quiet { background: transparent; color: var(--v2-accent); }
.v2 .v2-button--danger { background: var(--v2-error-bg); color: var(--v2-error); border-color: var(--v2-error); }
.v2-button:disabled { opacity: .5; cursor: not-allowed; }
.v2-button[aria-busy="true"] { opacity: .75; cursor: progress; }
.v2-badge { display: inline-flex; align-items: center; width: fit-content; padding: var(--v2-space-1) var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); font-size: var(--v2-size-xs); font-weight: 600; color: var(--v2-muted); }
.v2-skip { position: fixed; left: 1rem; top: -100px; z-index: 100; padding: var(--v2-space-3); background: var(--v2-surface); }
.v2-skip:focus { top: 1rem; }
.v2-header { --v2-header: 80px; position: sticky; top: 0; z-index: 20; background: var(--v2-brand-bg); border-bottom: 1px solid var(--v2-border); padding-top: env(safe-area-inset-top); }
.v2-header__inner { min-height: var(--v2-header); display: flex; align-items: center; justify-content: space-between; gap: var(--v2-space-4); }
.v2 .v2-brand { display: inline-flex; align-items: center; gap: var(--v2-space-2); font-size: var(--v2-size-lg); font-weight: 650; letter-spacing: -.04em; color: var(--v2-text); text-decoration: none; white-space: nowrap; }
.v2-desktop-nav { display: flex; gap: clamp(.75rem, 2vw, 1.6rem); }
.v2 .v2-nav-link { display: inline-flex; align-items: center; gap: var(--v2-space-2); min-height: 44px; color: var(--v2-muted); font-size: var(--v2-size-sm); font-weight: 550; text-decoration: none; }
.v2-nav-link:hover, .v2 .v2-nav-link[aria-current="page"] { color: var(--v2-accent); }
.v2-hero { padding-block: clamp(2rem, 4vw, 4rem); align-items: center; gap: clamp(1.5rem, 4vw, 3rem); }
.v2-hero__copy { display: flex; flex-direction: column; gap: var(--v2-space-5); }
.v2-hero__copy h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; line-height: 1.08; letter-spacing: -.05em; }
.v2-hero__copy em { color: var(--v2-accent); font-weight: 400; }
.v2-hero__actions { margin-top: var(--v2-space-1); }
.v2-hero__visual { padding-top: var(--v2-space-2); }
.v2-learning-window { border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); box-shadow: var(--v2-shadow); overflow: hidden; }
.v2-learning-window__top { display: flex; justify-content: space-between; gap: var(--v2-space-4); padding: var(--v2-space-4) var(--v2-space-5); border-bottom: 1px solid var(--v2-border); }
.v2-learning-window__top .v2-eyebrow { font-size: var(--v2-size-xs); }
.v2-window-lesson { padding: clamp(.75rem, 2vw, 1.5rem); }
.v2-hanzi-display { font-size: clamp(1.6rem, 2.7vw, 2.3rem); line-height: 1.6; font-weight: 500; margin-block: var(--v2-space-4) var(--v2-space-2); overflow-wrap: anywhere; }
.v2-pinyin { color: var(--v2-pinyin); font-size: var(--v2-size-base); letter-spacing: .02em; }
.v2-token-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-2) var(--v2-space-4); background: var(--v2-tint); border-radius: var(--v2-control-radius); padding: var(--v2-space-3) var(--v2-space-4); margin-top: var(--v2-space-6); font-size: var(--v2-size-sm); color: var(--v2-muted); }
.v2-token-line > :first-child { color: var(--v2-accent); font-size: var(--v2-size-xl); }
.v2-window-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--v2-space-4); padding: var(--v2-space-4) var(--v2-space-5); border-top: 1px solid var(--v2-border); }
.v2-window-bottom strong { display: block; font-size: var(--v2-size-sm); font-weight: 600; }
.v2-window-bottom small { font-size: var(--v2-size-xs); color: var(--v2-muted); }
.v2-icon-link { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid var(--v2-border); border-radius: 50%; }
.v2-number { font-family: Georgia, serif; font-size: var(--v2-size-xl); color: var(--v2-accent); }
.v2-section { padding-block: clamp(1.5rem, 3vw, 3rem); }
/* Shared page-header contract: the component owns heading/tab gaps; existing
   stacks retain their body density instead of doubling the header margin. */
.v2-section:has(> .v2-page-header) { padding-block: var(--v2-page-padding); }
.v2-page-header { display: flex; flex-direction: column; gap: var(--v2-page-header-gap); margin: 0 0 var(--v2-page-content-gap); min-width: 0; }
.v2-stack > .v2-page-header { margin-bottom: 0; }
.v2-page-header__main { display: flex; align-items: end; justify-content: space-between; gap: var(--v2-space-5); min-width: 0; }
.v2-page-header__copy { display: grid; gap: var(--v2-space-2); min-width: 0; }
.v2-page-header .v2-page-title { margin: 0; font-size: var(--v2-page-title-size) !important; overflow-wrap: anywhere; }
.v2-page-header .v2-breadcrumbs { margin: 0; }
.v2-page-header--compact .v2-page-title { font-size: var(--v2-size-3xl) !important; }
.v2-page-header__copy > .v2-muted { max-width: 62ch; }
.v2-page-header__actions { display: flex; flex-wrap: wrap; gap: var(--v2-space-3); flex-shrink: 0; }
.v2-page-tabs.v2-tabs { margin: 0; gap: var(--v2-space-2); }
.v2-page-tabs > a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; padding: var(--v2-space-2) var(--v2-space-3); }
@media (max-width: 699px) { .v2-page-header__main { flex-wrap: wrap; align-items: start; } }
.v2-section-heading { display: flex; justify-content: space-between; gap: var(--v2-space-5); align-items: end; margin-bottom: var(--v2-space-5); }
.v2-section-heading .v2-eyebrow { margin-bottom: var(--v2-space-2); }
.v2-section-heading h1 + p { margin-top: var(--v2-space-2); max-width: 62ch; }
.v2-section-heading > p { flex-shrink: 0; font-size: var(--v2-size-md); }
.v2 { display: flex; flex-direction: column; min-height: 100dvh; }
.v2-content { flex: 1 0 auto; }
.v2-footer { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--v2-space-1) var(--v2-space-5); border-top: 1px solid var(--v2-border); padding-block: var(--v2-space-3); }
.v2-footer p { font-size: var(--v2-size-sm); color: var(--v2-muted); }
.v2-footer nav { display: flex; flex-wrap: wrap; gap: var(--v2-space-1) var(--v2-space-4); }
.v2-footer nav a { font-size: var(--v2-size-sm); display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--v2-muted); text-decoration: none; }
.v2-footer nav a:hover { color: var(--v2-accent); }
.v2-footer nav a[aria-current="page"] { color: var(--v2-accent); text-decoration: underline; }
.v2-info { max-width: calc(var(--v2-reading) + 2 * var(--v2-gutter)); }
.v2-info-section { gap: var(--v2-space-3); }
.v2-info-section ul { margin: 0; padding-left: var(--v2-space-4); }
.v2-info-section li + li { margin-top: var(--v2-space-2); }
.v2-info a { overflow-wrap: anywhere; }
.v2-panel { padding: clamp(.75rem, 2vw, 1.25rem); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); min-width: 0; }
.v2-panel--tinted { background: var(--v2-tint); }
.v2-video-page { max-width: 960px; }
.v2-video-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--v2-space-4); }
.v2-video-heading .v2-video-title { font-size: clamp(1.35rem, 2.4vw, 1.85rem) !important; line-height: 1.25; margin: var(--v2-space-1) 0 0; overflow-wrap: anywhere; }
.v2-video-context { display: flex; flex-wrap: wrap; gap: var(--v2-space-3) var(--v2-space-6); margin: 0; font-size: var(--v2-size-md); }
.v2-video-context dt { color: var(--v2-muted); font-size: var(--v2-size-xs); }
.v2-video-context dd { margin: var(--v2-space-1) 0 0; }
.v2-video-fallback { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--v2-size-md); }
.v2-video-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--v2-space-5); align-items: start; }
.v2-video-layout > * { min-width: 0; }
.v2-video-player { position: relative; aspect-ratio: 16/9; min-height: 200px; background: #111; border-radius: var(--v2-radius); overflow: hidden; }
.v2-video-player iframe { display: block; position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.v2-video-actions { display: flex; flex-wrap: wrap; gap: var(--v2-space-3); }
.v2-video-plain { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 850px) {
  .v2-video-layout { grid-template-columns: minmax(0, 1fr); }
  .v2-video-actions .v2-button { flex: 1 1 140px; gap: var(--v2-space-2); padding-inline: var(--v2-space-3); white-space: nowrap; }
}
.v2-panel > * + * { margin-top: var(--v2-space-3); }
.v2-panel__heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--v2-space-4); margin-bottom: var(--v2-space-5); }
.v2-detail-list { margin: 0; font-size: var(--v2-size-sm); }
.v2-detail-list > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--v2-space-2); border-bottom: 1px solid var(--v2-border); padding-block: var(--v2-space-3); }
.v2-detail-list dt { color: var(--v2-muted); }
.v2-detail-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.v2-lesson-list { padding: 0; margin: 0; list-style: none; }
.v2-lesson-row { display: flex; align-items: center; gap: var(--v2-space-4); padding-block: var(--v2-space-4); }
.v2-lesson-row + .v2-lesson-row { border-top: 1px solid var(--v2-border); }
.v2-lesson-row h3 { font-size: var(--v2-size-base); letter-spacing: -.01em; }
.v2-lesson-row p { font-size: var(--v2-size-sm); color: var(--v2-muted); margin-top: var(--v2-space-1); }
.v2-lesson-row > div { flex: 1; }
.v2-lesson-number { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--v2-border); color: var(--v2-muted); font-size: var(--v2-size-sm); flex-shrink: 0; }
.v2-lesson-number--active { color: var(--v2-on-accent); background: var(--v2-accent); border-color: var(--v2-accent); }
.v2-study-layout { max-width: calc(var(--v2-reading) + 2 * var(--v2-gutter)); }
.v2-run.v2-study-layout { max-width: calc(920px + 2 * var(--v2-gutter)); }
.v2-study-top { display: flex; justify-content: space-between; gap: var(--v2-space-4); align-items: center; }
.v2-study-context { text-align: center; padding-block: var(--v2-space-6); }
.v2-study-context > * + * { margin-top: var(--v2-space-3); }
.v2-study-card { background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); }
.v2-dialogue { padding: clamp(.75rem, 3vw, 1.5rem); }
.v2-dialogue__reply { border-top: 1px solid var(--v2-border); padding-top: var(--v2-space-5); margin-top: var(--v2-space-5); }
.v2-exercise { border-top: 1px solid var(--v2-border); padding: clamp(.75rem, 3vw, 1.5rem); }
.v2-exercise fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.v2-exercise legend { font-weight: 600; font-size: var(--v2-size-lg); line-height: 1.5; padding: 0; }
.v2-exercise fieldset > p { font-size: var(--v2-size-md); margin-top: var(--v2-space-2); }
.v2-options { margin-block: var(--v2-space-5); gap: var(--v2-space-3); }
.v2-choice { display: flex; align-items: center; gap: var(--v2-space-4); padding: var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); cursor: pointer; font-size: var(--v2-size-xl); }
.v2-choice:has(input:checked) { border-color: var(--v2-accent); background: var(--v2-tint); }
.v2-choice input { accent-color: var(--v2-accent); width: 18px; height: 18px; }
.v2-study-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--v2-space-4); padding-top: var(--v2-space-5); }
.v2-feedback { padding: var(--v2-space-4) var(--v2-space-4); border-radius: var(--v2-control-radius); border: 1px solid currentColor; font-size: var(--v2-size-md); }
.v2-feedback--success { color: var(--v2-success); background: var(--v2-success-bg); }
.v2-feedback--error { color: var(--v2-error); background: var(--v2-error-bg); }
.v2-feedback p { margin-top: var(--v2-space-2); font-size: var(--v2-size-md); }
.v2-notice { display: flex; align-items: start; gap: var(--v2-space-3); background: var(--v2-soft); border-radius: var(--v2-control-radius); padding: var(--v2-space-4); color: var(--v2-muted); font-size: var(--v2-size-md); }
.v2-workbench { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--v2-gap); align-items: start; }
.v2-design-preview { border: 1px solid var(--v2-border); border-radius: var(--v2-radius); min-width: 0; }
.v2-design-preview__label { padding: var(--v2-space-3) var(--v2-gutter); border-bottom: 1px solid var(--v2-border); border-radius: calc(var(--v2-radius) - 1px) calc(var(--v2-radius) - 1px) 0 0; background: var(--v2-soft); }
.v2-workbench__controls { position: sticky; top: calc(var(--v2-header) + 1.5rem); }
.v2-field { display: flex; flex-direction: column; gap: var(--v2-space-1); min-width: 0; }
.v2-field label { font-size: var(--v2-size-md); font-weight: 600; }
.v2-field input, .v2-field select, .v2-field textarea { width: 100%; min-height: 44px; padding: var(--v2-space-2) var(--v2-space-3); background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); color: var(--v2-text); font: inherit; }
.v2-field textarea { resize: vertical; }
.v2-choice-editor { padding: var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); }
.v2-token-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-3); padding-block: var(--v2-space-3); border-bottom: 1px solid var(--v2-border); }
.v2-field small { color: var(--v2-muted); font-size: var(--v2-size-xs); line-height: 1.5; }
.v2-field input[aria-invalid="true"] { border-color: var(--v2-error); }
.v2-field input[aria-invalid="true"] + small { color: var(--v2-error); }
.v2-grid-example > div { min-height: 70px; display: grid; place-items: center; padding: var(--v2-space-3); border: 1px dashed var(--v2-accent); background: var(--v2-tint); border-radius: var(--v2-control-radius); color: var(--v2-accent); font-size: var(--v2-size-sm); }
.v2-dialog { width: min(480px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); color: var(--v2-text); padding: var(--v2-space-5); box-shadow: var(--v2-shadow); }
.v2-dialog::backdrop { background: #101b2a80; }
.v2-dialog__heading { display: flex; align-items: start; justify-content: space-between; gap: var(--v2-space-4); margin-bottom: var(--v2-space-4); }
.v2-dialog__heading h2 { font-size: var(--v2-size-2xl); margin-top: var(--v2-space-2); }
.v2-dialog > .v2-muted { font-size: var(--v2-size-md); margin-bottom: var(--v2-space-5); }
.v2-dialog__footer { display: flex; justify-content: end; border-top: 1px solid var(--v2-border); padding-top: var(--v2-space-4); margin-top: var(--v2-space-5); }
.v2--app { padding-bottom: env(safe-area-inset-bottom); }
.v2--app .v2-container { max-width: 1160px; }
.v2-app-nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 20; display: flex; justify-content: center; gap: 0; padding: .5rem .5rem calc(.5rem + env(safe-area-inset-bottom)); background: var(--v2-surface); border-top: 1px solid var(--v2-border); }
.v2-app-nav .v2-nav-link { display: flex; flex-direction: column; gap: .15rem; flex: 1; max-width: 140px; min-width: 0; font-size: var(--v2-size-xs); }
.v2-native-tools { position: sticky; top: 0; z-index: 20; display: flex; justify-content: end; padding-block: var(--v2-space-1); background: var(--v2-brand-bg); border-bottom: 1px solid var(--v2-border); }
@media (min-width: 700px) {
  .v2-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .v2-span-8, .v2-span-4 { grid-column: span 8; }
  .v2-span-6, .v2-span-3 { grid-column: span 4; }
}
@media (min-width: 1080px) {
  .v2-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .v2-span-3 { grid-column: span 3; } .v2-span-4 { grid-column: span 4; }
  .v2-span-6 { grid-column: span 6; } .v2-span-8 { grid-column: span 8; }
}
@media (max-width: 1079px) {
  .v2-hero { gap: var(--v2-space-6); }
  .v2-hero h1 { font-size: clamp(2.7rem, 4.9vw, 4rem); }
  .v2-section-heading { align-items: start; }
  .v2-workbench { grid-template-columns: 240px minmax(0, 1fr); }
}
@media (max-width: 699px) {
  :root { --v2-header: 68px; }
  .v2-header__inner { gap: var(--v2-space-2); }
  .v2-header__actions { flex-wrap: nowrap; gap: var(--v2-space-1); }
  .v2-settings-button { width: 44px; padding-inline: var(--v2-space-2); }
  .v2-settings-button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .v2 .v2-brand { font-size: var(--v2-size-base); gap: var(--v2-space-2); }
  .v2-hero { padding-top: var(--v2-space-6); }
  .v2-hero__copy { gap: var(--v2-space-4); }
  .v2-lead { font-size: var(--v2-size-base); }
  .v2-section-heading { flex-direction: column; }
  .v2-workbench { grid-template-columns: 1fr; }
  .v2-workbench__controls { position: static; }
  .v2-dialog { width: 100%; max-width: none; max-height: calc(100dvh - 1rem); margin: auto 0 0; border-bottom: 0; border-radius: var(--v2-radius) var(--v2-radius) 0 0; padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); }
  .v2-lesson-row { gap: var(--v2-space-3); flex-wrap: wrap; }
  .v2-lesson-row > div { min-width: 130px; }
  .v2-lesson-row > .v2-button { padding-inline: var(--v2-space-2); }
  .v2-study-top { gap: var(--v2-space-2); }
  .v2-study-top > .v2-caption { font-size: var(--v2-size-xs); }
  .v2-study-actions > .v2-caption { width: 100%; }
  .v2-study-actions > .v2-button { width: 100%; }
  .v2-window-bottom { padding-inline: var(--v2-space-4); }
}
@media (prefers-reduced-motion: reduce) {
  .v2 *, .v2 *::before, .v2 *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
/* Persistent product navigation and account controls share one menu contract. */
.v2-logo { display: block; width: 142px; height: auto; border-radius: 2px; }
.v2-logo--light { mix-blend-mode: normal; }
.v2-logo--dark { display: none; }
:root[data-theme="dark"] .v2-logo--light { display: none; }
:root[data-theme="dark"] .v2-logo--dark { display: block; }
.v2-header__actions { flex-wrap: nowrap; flex-shrink: 0; }
.v2-menu { position: relative; }
.v2-menu > summary { display: flex; align-items: center; justify-content: center; gap: var(--v2-space-2); min-width: 44px; min-height: 44px; padding: var(--v2-space-2) var(--v2-space-2); list-style: none; cursor: pointer; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); font-size: var(--v2-size-sm); }
.v2-menu > summary::-webkit-details-marker { display: none; }
.v2-menu > summary:hover, .v2-menu[open] > summary { background: var(--v2-tint); border-color: var(--v2-accent); }
.v2-menu__panel { position: absolute; z-index: 25; right: 0; top: calc(100% + .65rem); width: 272px; max-width: calc(100vw - 2 * var(--v2-gutter)); max-height: calc(100dvh - var(--v2-header) - 2rem); overflow: auto; padding: var(--v2-space-4); background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); box-shadow: var(--v2-shadow); }
.v2-menu__panel--site { width: 400px; display: grid; grid-template-columns: 1fr 1fr; gap: var(--v2-space-4); }
.v2--app .v2-menu__panel { max-height: calc(100dvh - var(--v2-header) - 6rem - env(safe-area-inset-bottom)); }
.v2-menu__panel nav { display: flex; flex-direction: column; min-width: 0; }
.v2-menu__panel .v2-nav-link, .v2-menu__panel .v2-button { width: 100%; justify-content: start; border-radius: var(--v2-control-radius); padding: var(--v2-space-2) var(--v2-space-2); font-size: var(--v2-size-md); }
.v2-menu__panel .v2-nav-link:hover { background: var(--v2-tint); }
.v2-menu__label { padding: 0 var(--v2-space-2) var(--v2-space-2); color: var(--v2-muted); font-size: var(--v2-size-xs); text-transform: uppercase; letter-spacing: .08em; }
.v2-menu__tools { grid-column: 1 / -1; border-top: 1px solid var(--v2-border); padding-top: var(--v2-space-2); }
.v2-menu__identity { padding: var(--v2-space-1) var(--v2-space-2) var(--v2-space-3); border-bottom: 1px solid var(--v2-border); margin-bottom: var(--v2-space-2); }
.v2-menu__identity strong { display: block; overflow-wrap: anywhere; font-size: var(--v2-size-md); font-weight: 600; }
.v2-account-trigger { position: relative; }
.v2-account-trigger::after { position: absolute; left: 25px; top: 25px; display: grid; place-items: center; width: 13px; height: 13px; border: 1px solid var(--v2-surface); border-radius: 50%; background: var(--v2-soft); color: var(--v2-muted); font: 650 .6rem/1 var(--v2-font); }
.v2-account-trigger[data-account-state="signed_in"]::after { content: "✓"; background: var(--v2-success); color: var(--v2-surface); }
.v2-account-trigger[data-account-state="guest"]::after { content: "G"; border-color: var(--v2-control-border); }
.v2-account-trigger[data-account-state="signed_out"]::after { content: "−"; border-color: var(--v2-control-border); }
.v2-account-copy { min-width: 0; }
.v2-account-copy strong, .v2-account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-account-copy strong { font-size: var(--v2-size-sm); font-weight: 600; line-height: 1.35; }
.v2-account-copy small { margin-top: .15rem; color: var(--v2-muted); font-size: var(--v2-size-xs); font-weight: 400; line-height: 1.3; }
.v2-menu__signout { background: transparent; border: 0; font: inherit; cursor: pointer; text-align: left; }
.v2-page-notice { padding-block: var(--v2-space-2); background: var(--v2-soft); color: var(--v2-muted); font-size: var(--v2-size-sm); }
.v2-breadcrumbs { margin-bottom: var(--v2-space-5); font-size: var(--v2-size-sm); }
.v2-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--v2-space-2) 0; list-style: none; margin: 0; padding: 0; }
.v2-breadcrumbs li { display: flex; align-items: center; min-height: 32px; }
.v2-breadcrumbs li + li::before { content: "/"; margin-inline: var(--v2-space-2); color: var(--v2-muted); }
.v2-breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; }
.v2-breadcrumbs [aria-current] { color: var(--v2-muted); }
.v2-tabs { display: flex; flex-wrap: wrap; gap: var(--v2-space-2); margin-bottom: var(--v2-space-5); }
.v2-tabs [aria-current="page"] { background: var(--v2-action); color: var(--v2-on-action); border-radius: var(--v2-control-radius); }
.v2-list-heading { margin-bottom: var(--v2-space-4) !important; }
.v2 .v2-destination { display: block; color: var(--v2-text); text-decoration: none; }
.v2-destination:hover { border-color: var(--v2-accent); }
.v2-row-meta { display: flex; align-items: center; justify-content: space-between; font-size: var(--v2-size-md); color: var(--v2-accent); }
.v2 .v2-content-row { display: flex; align-items: center; gap: var(--v2-space-4); color: var(--v2-text); text-decoration: none; padding-block: var(--v2-space-4); }
.v2-content-row + .v2-content-row { border-top: 1px solid var(--v2-border); margin-top: 0; }
.v2-content-row > span:not(.v2-lesson-number):not(.v2-round-icon):not(.v2-caption):not(.v2-row-action) { flex: 1; min-width: 0; }
.v2-content-row > .v2-caption:first-child { flex: 0 0 2.5ch; text-align: right; }
.v2-content-row strong { font-size: var(--v2-size-base); font-weight: 600; }
.v2-content-row small { display: block; color: var(--v2-muted); margin-top: var(--v2-space-1); font-size: var(--v2-size-sm); }
.v2 .v2-content-row--lesson { flex-wrap: nowrap; padding-block: var(--v2-space-3); min-height: 44px; }
.v2-content-row--lesson .v2-row-body { overflow-wrap: anywhere; }
a.v2-content-row:hover strong { color: var(--v2-accent); }
.v2-empty { border-block: 1px solid var(--v2-border); padding-block: var(--v2-space-6); color: var(--v2-muted); }
.v2-empty p { margin-top: var(--v2-space-3); font-size: var(--v2-size-md); }
.v2-auth-layout { max-width: 540px; }
.v2-google-signin { width: 100%; }
.v2-google-signin svg { flex-shrink: 0; }
.v2-auth-divider { display: flex; align-items: center; gap: var(--v2-space-4); color: var(--v2-muted); font-size: var(--v2-size-sm); }
.v2-auth-divider::before, .v2-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--v2-border); }
.v2-check { display: flex; align-items: center; gap: var(--v2-space-3); min-height: 44px; font-size: var(--v2-size-md); cursor: pointer; }
.v2-check input { width: 18px; height: 18px; accent-color: var(--v2-accent); }
.v2-after-note { margin-top: var(--v2-space-4) !important; }
.v2-pagination { margin-top: var(--v2-space-5); }
.v2-lesson-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-4); }
.v2-lesson-navigation [rel="prev"] { justify-self: start; }
.v2-lesson-navigation [rel="next"] { grid-column: 2; justify-self: end; }
.v2-run { padding-block: var(--v2-space-5) var(--v2-space-6); }
.v2-run-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--v2-space-4); }
.v2-run-heading .v2-caption { flex-shrink: 0; }
.v2-progress { width: 100%; height: 6px; accent-color: var(--v2-accent); margin-block: var(--v2-space-4) var(--v2-space-5); }
.v2-player-content { padding: clamp(.75rem, 3vw, 1.25rem); }
.v2-player-content > * + * { margin-top: var(--v2-space-5); }
.v2-fc-section .v2-player-content.v2-stack > * + *, .v2-practice-landing .v2-player-content.v2-stack > * + * { margin-top: 0; }
.v2 .v2-player-prompt { font-size: clamp(1.3rem, 3vw, 1.6rem); line-height: 1.5; letter-spacing: -.02em; }
.v2-audio { display: block; width: 100%; max-width: 100%; min-height: 44px; }
.v2-support { border-block: 1px solid var(--v2-border); padding-block: var(--v2-space-2); }
.v2-support summary { min-height: 44px; cursor: pointer; padding-block: var(--v2-space-2); font-size: var(--v2-size-md); color: var(--v2-accent); }
.v2-support > p, .v2-support > audio { margin-top: var(--v2-space-3); }
.v2-answer-form > * + * { margin-top: var(--v2-space-4); }
.v2-answer-options { border: 0; padding: 0; min-width: 0; display: grid; gap: var(--v2-space-3); }
.v2-answer-options legend { margin-bottom: var(--v2-space-3); }
.v2-answer-options .v2-choice { font-size: var(--v2-size-base); }
.v2-answer-options .v2-choice [lang^="zh"] { font-size: var(--v2-size-2xl); }
.v2-run-actions { display: flex; flex-wrap: wrap; gap: var(--v2-space-3); padding-top: var(--v2-space-4); }
.v2-run-actions .v2-button { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.v2-completion-actions { margin-bottom: var(--v2-space-4); }
.v2-token-bank { display: flex; flex-wrap: wrap; gap: var(--v2-space-2); padding-block: var(--v2-space-4); }
.v2-token-answer { min-height: 82px; align-items: flex-start; align-content: flex-start; border-bottom: 2px solid var(--v2-border); margin-bottom: var(--v2-space-4); }
.v2-answer-parts { display: inline-flex; flex-wrap: wrap; gap: var(--v2-space-2); margin-block: var(--v2-space-2); vertical-align: middle; max-width: 100%; }
.v2-answer-part { display: inline-block; min-width: 0; max-width: 100%; color: var(--v2-text); background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); padding: var(--v2-space-2) var(--v2-space-2); font-size: var(--v2-size-lg); line-height: 1.6; overflow-wrap: anywhere; }
.v2-answer-part.is-in-order { border-color: var(--v2-success); }
.v2-answer-part.is-moved { border-color: var(--v2-error); border-style: dashed; border-width: 2px; }
.v2 .v2-feedback.v2-feedback--builder { color: var(--v2-text); background: var(--v2-surface); border-color: var(--v2-border); }
/* An authored clause is one draggable part, but its text must wrap. Native ruby
   keeps the entire base/annotation unbroken, so stack these two wrapping rows. */
.v2-answer-part ruby, .v2-builder ruby { display: inline-flex; flex-direction: column-reverse; min-width: 0; max-width: 100%; text-align: center; }
.v2-answer-part ruby > *, .v2-builder ruby > *, .v2-token > span { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.v2-builder rt, .v2-answer-part rt { font-size: .65em; }
.v2-token { min-width: 0; overflow-wrap: anywhere; }
/* Override the shared button label size only for Chinese sentence parts. */
.v2 .v2-builder .v2-token { font-size: clamp(1.6rem, 3.5vw, 2rem); line-height: 1.45; padding: var(--v2-space-2) var(--v2-space-3); border-width: 2px; }
.v2 .v2-player-prompt.v2-builder-prompt { font-size: var(--v2-size-base); line-height: 1.5; letter-spacing: normal; font-weight: 500; }
.v2-builder .v2-builder-retry { margin-bottom: var(--v2-space-3); color: var(--v2-text); font-size: var(--v2-size-base); }
.v2 .v2-builder .v2-token.is-in-order { border-color: var(--v2-success); }
.v2 .v2-builder .v2-token.is-moved { border-color: var(--v2-error); border-style: dashed; border-width: 2px; }
.v2-content[data-pinyin="false"] .v2-builder rt, .v2-content[data-pinyin="false"] .v2-feedback--builder rt, .v2-content[data-pinyin="false"] .v2-builder-solution rt, .v2-content[data-pinyin="false"] .v2-result-row[data-result-kind="arrange"] .v2-answer-part rt { display: none; }
.v2-content[data-pinyin="false"] .v2-builder .v2-token { font-size: clamp(1.85rem, 4vw, 2.25rem); }
.v2-feedback--builder .v2-answer-part, .v2-builder-solution .v2-answer-part, .v2-result-row[data-result-kind="arrange"] .v2-answer-part { font-size: clamp(1.6rem, 3.5vw, 2rem); }
.v2 .v2-token--used:disabled { color: var(--v2-muted); background: var(--v2-tint); border-color: var(--v2-border); cursor: default; }
.v2-token-answer .v2-token { background: var(--v2-tint); }
.v2-builder .v2-token:not(:disabled) { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.v2-builder .is-drag-source { opacity: .45; }
.v2-builder .is-drop-before { box-shadow: -4px 0 var(--v2-accent); }
.v2-token-answer.is-drop-end { border-bottom-color: var(--v2-accent); }
.v2-token-source { min-height: 82px; border: 2px dashed var(--v2-border); padding: var(--v2-space-3); }
.v2-token-source.is-drop-end { border-color: var(--v2-accent); background: var(--v2-tint); }
.v2-builder-drag-token { position: fixed; z-index: 60; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); max-width: min(28rem, 75vw); box-shadow: 0 5px 20px #0004; }
.v2-reading-tokens { line-height: 1.8; }
.v2-reading-tokens [title] { border-bottom: 1px dotted var(--v2-border); }
[data-v2-body-script="traditional"] { display: none; }
:root[data-script="traditional"] [data-v2-body-script="traditional"] { display: block; }
:root[data-script="traditional"] [data-v2-body-script="simplified"] { display: none; }
.v2-review-pinyin { font-size: var(--v2-size-2xl); }
.v2-review-meaning { font-size: var(--v2-size-xl); }
.v2-review-prompt { display: grid; gap: var(--v2-space-3); padding-block: var(--v2-space-4); }
.v2-review-prompt, .v2-flip-card { overflow-wrap: anywhere; }
.v2-answer-choice { display: flex; align-items: center; gap: var(--v2-space-3); width: 100%; text-align: left; font: inherit; color: var(--v2-text); background: var(--v2-surface); cursor: pointer; }
.v2-answer-choice:hover { border-color: var(--v2-accent); background: var(--v2-tint); }
.v2-answer-choice .v2-hanzi-display { font-size: var(--v2-size-2xl); }
.v2-answer-choice .v2-review-pinyin, .v2-answer-choice .v2-review-meaning { font-size: var(--v2-size-lg); }
.v2-option-key { color: var(--v2-muted); font-size: var(--v2-size-sm); min-width: 1rem; }
.v2-previous { margin-top: var(--v2-space-5); font-size: var(--v2-size-md); }
.v2-previous > * + * { margin-top: var(--v2-space-2); }
.v2-word-results { padding-left: var(--v2-space-4); line-height: 2; }
.v2-prose { line-height: 1.8; overflow-wrap: anywhere; }
/* Block Markdown owns its rhythm. Include the shell so these rules beat the
   element-specific reset above; inline rich text must remain unaffected. */
.v2 .v2-prose > * { margin-block: 0; }
.v2 .v2-prose > * + * { margin-top: var(--v2-space-4); }
.v2 .v2-prose > :is(h1, h2, h3, h4, h5, h6):not(:first-child) { margin-top: var(--v2-space-6); }
.v2 .v2-prose > :is(h1, h2, h3, h4, h5, h6) + * { margin-top: var(--v2-space-2); }
.v2-prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: var(--v2-size-md); }
.v2-prose th, .v2-prose td { padding: var(--v2-space-2); border: 1px solid var(--v2-border); }
/* Reviewed bilingual examples: the same labeled record on both shells.
   Scope stays separate from matching/answer trays and recall placeholders. */
.v2-examples { list-style: none; padding: 0; margin: 0 0 var(--v2-space-4); }
.v2-examples__row + .v2-examples__row { border-top: 1px solid var(--v2-border); }
.v2-examples__row > dl { display: flex; flex-direction: column; gap: var(--v2-space-4); margin: 0; padding-block: var(--v2-space-5); }
.v2-examples__field { min-width: 0; }
.v2-examples dt { margin-bottom: var(--v2-space-2); color: var(--v2-muted); font-size: var(--v2-size-xs); line-height: 1.5; }
.v2-examples dd { margin: 0; min-width: 0; max-width: 100%; line-height: 2.05; overflow-wrap: anywhere; overflow-x: auto; }
.v2-table-frame { min-width: 0; max-width: 100%; }
.v2-table-hint { margin-bottom: var(--v2-space-2); }
.v2-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); }
.v2 .v2-data-table { display: table; overflow: visible; border-collapse: separate; border-spacing: 0; width: max-content; min-width: max(100%, calc(var(--v2-table-columns) * 10rem)); font-size: inherit; }
.v2 .v2-data-table th, .v2 .v2-data-table td { min-width: 10rem; max-width: 22rem; padding: var(--v2-space-4); border: 0; border-bottom: 1px solid var(--v2-border); border-inline-end: 1px solid var(--v2-border); text-align: start; vertical-align: top; line-height: 2.15; overflow-wrap: normal; }
.v2-data-table thead th { background: var(--v2-soft); }
.v2-data-table[data-row-labels="true"] th:first-child { position: sticky; inset-inline-start: 0; z-index: 1; box-shadow: 1px 0 var(--v2-border); }
.v2-data-table[data-row-labels="true"] th[scope="row"] { background: var(--v2-surface); min-width: 7rem; max-width: 9rem; font-weight: 500; }
.v2-data-table th:last-child, .v2-data-table td:last-child { border-inline-end: 0; }
.v2-data-table tbody tr:last-child > * { border-bottom: 0; }
.v2-examples ruby.v2-ruby-wrap, .v2-data-table ruby.v2-ruby-wrap { display: inline-flex; flex-direction: column-reverse; align-items: stretch; vertical-align: bottom; max-width: 100%; width: fit-content; text-align: start; line-height: 1.9; }
.v2-examples ruby.v2-ruby-wrap > span, .v2-data-table ruby.v2-ruby-wrap > span { display: block; white-space: normal; overflow-wrap: anywhere; }
.v2-examples ruby.v2-ruby-wrap > rt, .v2-data-table ruby.v2-ruby-wrap > rt { display: block; white-space: normal; overflow-wrap: anywhere; text-align: start; line-height: 1.65; padding-bottom: var(--v2-space-2); }
@media (min-width: 700px) {
  .v2-examples__row > dl { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--v2-space-5); }
}
.v2-choice small { display: block; font-size: var(--v2-size-sm); color: var(--v2-muted); }
@keyframes v2-reveal { from { opacity: .65; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 699px) {
  .v2-logo { width: 120px; }
  .v2-account-label { display: none; }
  .v2-menu__panel { position: fixed; inset-inline: var(--v2-gutter); top: calc(var(--v2-header) + env(safe-area-inset-top) + .5rem); width: auto; max-width: none; }
  .v2-menu__panel--site { gap: var(--v2-space-2); }
  .v2--native .v2-menu__panel { top: calc(var(--v2-header) + env(safe-area-inset-top)); }
  .v2-content-row { flex-wrap: wrap; }
}

/* Shared input, media, and study states. Keep all themes on semantic tokens. */
.v2-settings-button { width: 44px; padding-inline: var(--v2-space-2); }
.v2 .v2-counterpart { color: var(--v2-muted); border-color: var(--v2-border); }
.v2 .v2-counterpart:hover { color: var(--v2-text); background: var(--v2-soft); border-color: var(--v2-muted); }
.v2 .v2-counterpart[aria-pressed="true"], .v2 .v2-counterpart[aria-pressed="true"]:hover { color: var(--v2-error); background: var(--v2-error-bg); border-color: var(--v2-error); box-shadow: inset 0 -3px 0 var(--v2-error); }
.v2-settings-button > span, .v2-segmented input, .v2-toggle input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.v2-segmented-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.v2-segmented-field legend { margin-bottom: var(--v2-space-2); font-size: var(--v2-size-md); font-weight: 600; }
.v2-segmented { display: flex; padding: 3px; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-segmented label { flex: 1; min-width: 0; position: relative; cursor: pointer; }
.v2-segmented span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: var(--v2-space-2); font-size: var(--v2-size-md); text-align: center; border-radius: var(--v2-control-radius); }
.v2-field .v2-segmented input { min-height: 0; padding: 0; border: 0; }
.v2-field .v2-segmented label { font-weight: 400; }
.v2-field-label { font-size: var(--v2-size-md); font-weight: 600; }
.v2-flashcard-general .v2-field-label, .v2-flashcard-priority .v2-field-label { font-size: var(--v2-size-xs); }
.v2-flashcard-decks > .v2-field-label { font-size: var(--v2-size-md); }
.v2-decks-more[open] > summary { background: var(--v2-tint); }
.v2-segmented input:checked + span { background: var(--v2-action); color: var(--v2-on-action); font-weight: 600; }
.v2-segmented input:focus-visible + span, .v2-toggle input:focus-visible + span { outline: 3px solid var(--v2-accent); outline-offset: 3px; }
.v2-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--v2-space-3); min-height: 44px; cursor: pointer; font-size: var(--v2-size-md); }
.v2-toggle__track { display: block; position: relative; width: 40px; height: 24px; flex: 0 0 40px; border: 1px solid var(--v2-muted); border-radius: 20px; background: var(--v2-soft); transition: background var(--v2-motion); }
.v2-toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--v2-muted); transition: transform var(--v2-motion); }
.v2-toggle input:checked + .v2-toggle__track { background: var(--v2-accent); border-color: var(--v2-accent); }
.v2-toggle input:checked + .v2-toggle__track::after { transform: translateX(16px); background: var(--v2-on-accent); }
.v2-toggle:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.v2-toggle--stacked { flex-direction: column; justify-content: start; gap: var(--v2-space-2); text-align: center; padding: var(--v2-space-1); }
.v2-toggle--stacked .v2-toggle__track { flex-basis: 24px; }
.v2-toggle--icon { position: relative; display: inline-flex; flex: 0 0 40px; width: 40px; min-width: 0; min-height: 40px; gap: 0; }
.v2-toggle__icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); color: var(--v2-muted); background: var(--v2-surface); }
.v2-toggle input:checked + .v2-toggle__icon { background: var(--v2-action); border-color: var(--v2-action); color: var(--v2-on-action); }
/* Touch must not retain the hover treatment after switching off. */
@media (hover: hover) and (pointer: fine) {
  .v2-toggle--icon:hover .v2-toggle__icon { border-color: var(--v2-accent); }
}
/* The Pinyin button communicates state independently of pointer or keyboard focus. */
.v2-toggle--pinyin { -webkit-tap-highlight-color: transparent; }
.v2-toggle--pinyin .v2-toggle__icon { background: transparent; color: var(--v2-muted); box-shadow: none; }
.v2-toggle--pinyin input:checked + .v2-toggle__icon { background: var(--v2-action); border-color: var(--v2-action); color: var(--v2-on-action); box-shadow: none; }
.v2-toggle--pinyin input:focus:not(:focus-visible) + .v2-toggle__icon { outline: none; }
.v2-toggle--pinyin input:focus-visible + .v2-toggle__icon { outline: 3px solid var(--v2-accent); outline-offset: 3px; }
/* Anchor the hidden live region inside its player, including scrollable tables. */
.v2-audio-player { position: relative; min-width: 0; }
.v2-audio-player:has(.v2-audio-controls:not([hidden])) > audio { display: none; }
.v2-audio-controls { display: flex; align-items: center; gap: var(--v2-space-2); padding: var(--v2-space-1) var(--v2-space-2) var(--v2-space-1) var(--v2-space-1); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-audio-controls input[type="range"] { width: 0; min-width: 0; flex: 1; accent-color: var(--v2-accent); cursor: pointer; height: 32px; }
.v2-audio-time { font-variant-numeric: tabular-nums; min-inline-size: 4ch; text-align: center; }
.v2-audio-button { position: relative; inline-size: 44px; min-inline-size: 44px; block-size: 44px; min-block-size: 44px; padding: 0; border-radius: var(--v2-control-radius); flex: 0 0 auto; gap: var(--v2-space-1); }
.v2-audio-glyph { position: relative; display: grid; place-items: center; inline-size: 20px; block-size: 20px; flex: 0 0 20px; }
.v2-audio-glyph > span { display: none; place-items: center; }
.v2-audio-button[data-state="idle"] [data-audio-icon="idle"],
.v2-audio-button[data-state="playing"] [data-audio-icon="playing"],
.v2-audio-button[data-state="loading"] [data-audio-icon="loading"],
.v2-audio-button[data-state="error"] [data-audio-icon="error"] { display: grid; }
.v2-audio-button[data-state="loading"] .v2-audio-glyph::after { content: ""; position: absolute; inset: -5px; border: 2px solid var(--v2-border); border-block-start-color: currentColor; border-radius: 50%; animation: v2-audio-loading 1s linear infinite; }
.v2-audio-button[data-state="loading"] .v2-icon { width: 14px; height: 14px; }
.v2-audio-button[data-state="playing"] { background: var(--v2-tint); color: var(--v2-accent); border-color: var(--v2-accent); }
.v2-audio-button[data-state="error"] { color: var(--v2-error); border-color: var(--v2-error); }
.v2-audio-split, .v2-audio-single { display: inline-flex; flex-shrink: 0; align-items: center; gap: var(--v2-space-1); }
.v2-audio-slow:has(> span + span) { inline-size: auto; padding-inline: var(--v2-space-2); font-size: var(--v2-size-xs); white-space: nowrap; }
@keyframes v2-audio-loading { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .v2-audio-button[data-state="loading"] .v2-audio-glyph::after { animation: none; } }
.v2-row-body { flex: 1; min-width: 0; }
.v2 .v2-content-row > .v2-row-action { flex: 0 0 auto; margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: var(--v2-space-1); font-size: var(--v2-size-sm); color: var(--v2-accent); }
.v2-course-progress { margin-block: var(--v2-space-3); }
.v2-progress-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--v2-space-1) var(--v2-space-3); font-size: var(--v2-size-xs); color: var(--v2-muted); }
.v2-course-progress .v2-progress { margin-block: var(--v2-space-2); height: 6px; }
.v2-course-progress.is-complete .v2-progress::-webkit-progress-value { background: var(--v2-success); }
.v2-course-progress.is-complete .v2-progress::-moz-progress-bar { background: var(--v2-success); }
.v2-score { font-variant-numeric: tabular-nums; color: var(--v2-text); }
.v2-activity-frame { display: block; overflow-anchor: none; }
/* First entry keeps the player's footprint while the saved attempt opens. */
.v2-skeleton { display: block; background: var(--v2-border); border-radius: var(--v2-radius); animation: v2-skeleton-pulse 1.6s ease-in-out infinite alternate; }
.v2-skeleton--progress { height: 8px; margin-bottom: var(--v2-space-2); border-radius: 99px; }
.v2-skeleton--line { width: 65%; height: 14px; }
.v2-skeleton--tools { width: 160px; max-width: 60%; height: 36px; }
.v2-skeleton--control { height: 44px; width: 100%; }
.v2-skeleton--word { width: 88px; height: 16px; margin: var(--v2-space-1) auto; }
.v2-skeleton--character { width: 96px; height: 56px; margin: var(--v2-space-1) auto; }
.v2-skeleton--prompt { width: 55%; height: 48px; margin: var(--v2-space-4) auto; }
.v2-opening-toolbar, .v2-opening-content { display: grid; gap: var(--v2-space-4); }
.v2-opening-content { min-height: 280px; align-content: space-between; }
.v2-opening-lines { display: grid; gap: var(--v2-space-4); padding-block: var(--v2-space-4); }
.v2-opening-lines .v2-skeleton { width: 100%; }
.v2-opening-lines .v2-skeleton:nth-child(2n) { width: 85%; }
.v2-opening-lines .v2-skeleton:last-child { width: 60%; }
.v2-opening-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-2); }
.v2-activity-opening > form { margin: 0; }
@keyframes v2-skeleton-pulse { from { opacity: .4; } to { opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .v2-skeleton { animation: none; opacity: .6; } }
.v2-audio-player--compact { width: fit-content; }
.v2-phonetic-embed { display: inline-flex; align-items: center; gap: var(--v2-space-1); vertical-align: middle; }
.v2-phonetic-label { white-space: nowrap; color: var(--v2-pinyin); }
.v2-audio-player--compact .v2-audio-controls { border: 0; padding: 0; background: transparent; }
.v2-progress { display: block; height: 8px; appearance: none; border: 0; border-radius: var(--v2-radius); overflow: hidden; background: var(--v2-border); }
.v2-progress::-webkit-progress-bar { background: var(--v2-border); border-radius: var(--v2-radius); }
.v2-progress::-webkit-progress-value { background: var(--v2-progress-fill); border-radius: var(--v2-radius); transition: width var(--v2-motion); }
.v2-progress::-moz-progress-bar { background: var(--v2-progress-fill); border-radius: var(--v2-radius); }
.v2-flip-card { display: grid; position: relative; width: 100%; border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-soft); overflow-wrap: anywhere; }
.v2-flip-card.is-revealed { background: var(--v2-tint); }
.v2 .v2-recall-content > * + * { margin-top: var(--v2-space-4); }
.v2-recall-instruction { color: var(--v2-muted); font-size: var(--v2-size-base); }
.v2-recall-row { padding: var(--v2-space-2) var(--v2-space-4); text-align: center; }
.v2-recall-row + .v2-recall-row { border-top: 1px solid var(--v2-border); }
.v2-recall-label { display: block; margin-bottom: var(--v2-space-1); }
.v2-recall-slot { display: grid; }
.v2-recall-value, .v2-recall-placeholder { grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--v2-space-2); min-height: 2.75rem; }
.v2-recall-value .v2-pinyin { font-size: var(--v2-size-xl); }
.v2-recall-value .v2-hanzi-display { line-height: 1.3; margin: 0; }
.v2-recall-value .v2-review-meaning { margin: 0; }
.v2-recall-blank { width: min(6rem, 60%); border-bottom: 2px solid var(--v2-border); }
.v2-recall-reveal { width: 100%; }
.v2-recall-content .v2-card-ratings { padding-top: 0; }
.v2-recall-rating-prompt { flex-basis: 100%; text-align: center; }
.v2 .is-hidden { visibility: hidden; pointer-events: none; }
.v2-answer-options:has(.v2-answer-choice) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.v2-answer-options:has(.v2-picture-answer) { grid-template-columns: minmax(0, 1fr); }
.v2-answer-choice:has(.v2-picture-answer) > .v2-rich-text { flex: 1; }
.v2-answer-choice { overflow-wrap: anywhere; min-width: 0; }
.v2-answer-options--review .v2-answer-choice:disabled { opacity: 1; cursor: default; }
.v2-answer-options--review .v2-answer-choice:hover:where(:not(.v2-answer--success, .v2-answer--error)) { background: var(--v2-surface); border-color: var(--v2-control-border); }
.v2-answer-review-label { margin-left: auto; max-width: 9rem; text-align: right; color: inherit; }
.v2-inline-blank { display: inline-block; width: 3em; max-width: 100%; height: .85em; margin-inline: .15em; border-bottom: 2px solid currentColor; vertical-align: baseline; }
.v2-answer-choice.v2-answer--success, .v2-button.v2-answer--success { background: var(--v2-success-bg); color: var(--v2-success); border-color: var(--v2-success); box-shadow: inset 0 0 0 1px var(--v2-success); }
.v2-answer-choice.v2-answer--error, .v2-button.v2-answer--error { background: var(--v2-error-bg); color: var(--v2-error); border-color: var(--v2-error); box-shadow: inset 0 0 0 1px var(--v2-error); }
.v2-answer--success .v2-option-key, .v2-answer--error .v2-option-key { color: inherit; }
.v2-result-text--success { color: var(--v2-success); }
.v2-result-text--error { color: var(--v2-error); }
.v2-result-text--practice { color: var(--v2-practice); }
.v2-result-text--neutral { color: var(--v2-muted); }
.v2-results-list, .v2-variation-list { list-style: none; padding: 0; margin: 0; }
.v2-result-row { padding-block: var(--v2-space-4); border-top: 1px solid var(--v2-border); font-size: var(--v2-size-md); overflow-wrap: anywhere; }
.v2-result-row:first-child { padding-top: 0; border-top: 0; }
.v2-result-row:last-child { padding-bottom: 0; }
.v2-result-row > * + * { margin-top: var(--v2-space-2); }
.v2-result-answers { font-size: var(--v2-size-md); }
.v2-result-answers p + p { margin-top: var(--v2-space-1); }
.v2-result-explanation summary { width: fit-content; color: var(--v2-muted); cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: var(--v2-space-2); }
.v2-result-explanation summary::before { content: "+"; }
.v2-result-explanation[open] summary::before { content: "−"; }
.v2-variation-list > li { padding-block: var(--v2-space-2); border-top: 1px solid var(--v2-border); }
.v2-variation-list > li:last-child { padding-bottom: 0; }
.v2-variation-list .v2-result-answers { margin-top: var(--v2-space-1); }
.v2-type-badge { color: var(--v2-accent); background: var(--v2-tint); border-color: transparent; border-radius: var(--v2-control-radius); }
.v2-activity-meta { margin-bottom: var(--v2-space-2); }
.v2-activity-notes { margin-bottom: var(--v2-space-4); }
.v2-activity-notes > summary { cursor: pointer; min-height: 44px; font-weight: 600; }
.v2-rich-text ruby { ruby-align: center; }
.v2-rich-text rt { font-size: max(.85rem, .6em); font-weight: 400; line-height: 1.45; padding-bottom: .25em; color: var(--v2-pinyin); }
.v2 .v2-player-prompt { line-height: 2.15; }
.v2-answer-choice > .v2-rich-text { font-size: var(--v2-size-xl); line-height: 2; padding-block: var(--v2-space-1); min-width: 0; }
.v2-run .v2-answer-options .v2-answer-choice > .v2-rich-text:not(:has([data-simplified], [lang^="zh"], img, svg)) { font-size: var(--v2-size-base); line-height: 1.5; }
.v2-task-instruction { padding: var(--v2-space-3) var(--v2-space-4); margin-block: 0 var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-task-instruction p { margin-top: var(--v2-space-1); font-size: var(--v2-size-base); line-height: 1.5; }
.v2-context-tabs { display: flex; gap: var(--v2-space-1); padding: .15rem; margin-bottom: var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-context-tabs [role="tab"] { flex: 1; border: 0; border-radius: var(--v2-control-radius); padding: var(--v2-space-1) var(--v2-space-2); min-height: 36px; color: var(--v2-text); background: transparent; font: inherit; font-size: var(--v2-size-md); cursor: pointer; }
.v2-context-tabs [aria-selected="true"] { background: var(--v2-action); color: var(--v2-on-action); font-weight: 600; }
.v2 [role="tabpanel"][hidden] { display: none; }
.v2-results-source { background: var(--v2-soft); padding: var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); }
.v2-results-sentence { font-size: var(--v2-size-xl); }
.v2-results-source:has(> .v2-results-passage-line) { gap: 0; padding: 0; background: var(--v2-surface); }
.v2-results-source:has(> .v2-results-passage-line) > h3 { padding: var(--v2-space-4); }
.v2-quiz-passage { font-size: var(--v2-size-xl); line-height: 2.3; }
.v2-quiz-audio-line { padding-block: var(--v2-space-2); border-top: 1px solid var(--v2-border); }
.v2-content[data-pinyin="false"] .v2-rich-text rt { visibility: hidden; }
.v2-result-row .v2-prose > :last-child, .v2-previous .v2-prose > :last-child { margin-bottom: 0; }
.v2-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.is-answering { pointer-events: none; }
.is-answering .is-pressed:not(.v2-answer--success):not(.v2-answer--error) { border-color: var(--v2-accent); box-shadow: inset 0 0 0 1px var(--v2-accent); }
.v2-study-sticky { position: sticky; top: calc(var(--v2-header) + env(safe-area-inset-top)); z-index: 10; padding-block: var(--v2-space-2); margin-block: var(--v2-space-2); background: var(--v2-bg); }
.v2-study-sticky .v2-progress { margin: 0 0 var(--v2-space-2); }
.v2-study-sticky .v2-progress:last-child { margin-bottom: 0; }
.v2-activity-toolbar { position: sticky; top: calc(var(--v2-header) + env(safe-area-inset-top)); z-index: 10; display: flex; flex-wrap: wrap; gap: .1rem var(--v2-space-4); padding: var(--v2-space-2) var(--v2-space-3); margin-bottom: var(--v2-space-4); background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); }
.v2-study-sticky .v2-activity-toolbar { position: static; margin-bottom: 0; }
.v2-activity-toolbar > .v2-toggle:not(.v2-toggle--icon) { min-width: 90px; }
.v2-reader-toolbar { align-items: center; gap: var(--v2-space-2); min-width: 0; }
.v2-reader-settings-group { display: flex; align-items: center; gap: var(--v2-space-1); }
.v2-reader-playback { display: flex; align-items: center; gap: 0; padding-inline-start: var(--v2-space-1); border-inline-start: 1px solid var(--v2-border); }
.v2-compact-control { width: 40px; min-width: 40px; min-height: 40px; padding: var(--v2-space-2); }
.v2-compact-control.v2-slow-control { width: auto; min-width: 44px; min-height: 44px; gap: var(--v2-space-1); font-size: var(--v2-size-xs); white-space: nowrap; }
.v2-audio-group-controls { display: inline-flex; align-items: center; gap: .1rem; }
.v2-audio-group-controls > .v2-caption { margin-inline-end: var(--v2-space-1); }
.v2--native .v2-study-sticky, .v2--native .v2-activity-toolbar { top: calc(var(--v2-header) + env(safe-area-inset-top)); }
.v2-reader-lines { display: grid; gap: 0; background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); }
.v2-reader-line, .v2-results-passage-line { --v2-reader-inset: clamp(.75rem, 2vw, 1rem); min-width: 0; padding: 0 var(--v2-reader-inset) var(--v2-space-2); }
.v2-reader-line + .v2-reader-line, .v2-results-passage-line { border-top: 1px solid var(--v2-border); }
.v2-reader-line { scroll-margin-top: calc(var(--v2-header) + env(safe-area-inset-top) + var(--v2-tray-height, 140px) + 1rem); }
.v2--native .v2-reader-line { scroll-margin-top: calc(var(--v2-header) + env(safe-area-inset-top) + var(--v2-tray-height, 140px) + 1rem); }
.v2-reader-line > .v2-audio-player { margin-block: var(--v2-space-2) var(--v2-space-2); }
.v2-reader-line-heading, .v2-results-passage-line > .v2-reader-speaker { margin-inline: calc(-1 * var(--v2-reader-inset)); padding: var(--v2-space-2) var(--v2-reader-inset); background: var(--v2-soft); }
.v2-reader-lines > .v2-reader-line:first-of-type > .v2-reader-line-heading { border-radius: calc(var(--v2-radius) - 1px) calc(var(--v2-radius) - 1px) 0 0; }
.v2-reader-speaker { display: flex; align-items: center; gap: var(--v2-space-2); min-width: 0; font-size: var(--v2-size-base); color: var(--v2-speaker); }
.v2-reader-speaker strong { overflow-wrap: anywhere; }
.v2-reader-avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: color-mix(in srgb, var(--v2-speaker) 12%, var(--v2-surface)); border: 1px solid color-mix(in srgb, var(--v2-speaker) 40%, var(--v2-border)); }
.v2-reader-avatar .v2-icon { width: 24px; height: 24px; }
.v2-reader-cast { display: inline-flex; flex-wrap: wrap; flex: 0 0 auto; gap: var(--v2-space-1); }
.v2-reader-portrait { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
[data-speaker-tone="teal"] { --v2-speaker: #226c64; }
[data-speaker-tone="amber"] { --v2-speaker: #85580f; }
[data-speaker-tone="violet"] { --v2-speaker: #0963b7; }
[data-speaker-tone="olive"] { --v2-speaker: #586e24; }
:root[data-theme="dark"] [data-speaker-tone="teal"] { --v2-speaker: #93d3c5; }
:root[data-theme="dark"] [data-speaker-tone="amber"] { --v2-speaker: #e5c17b; }
:root[data-theme="dark"] [data-speaker-tone="violet"] { --v2-speaker: #68b5ff; }
:root[data-theme="dark"] [data-speaker-tone="olive"] { --v2-speaker: #c3d88c; }
.v2-reader-line.is-playing { border-color: var(--v2-accent); outline: 2px solid var(--v2-accent); outline-offset: -2px; }
.v2-reading-tokens { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .2em; padding-block: var(--v2-space-2); line-height: 1.6; }
.v2-reading-tokens ruby { ruby-align: center; }
.v2-reading-tokens rt { font-family: var(--v2-pinyin-font); font-size: max(.85rem, .42em); line-height: 1.45; padding-bottom: .25em; color: var(--v2-pinyin); visibility: hidden; }
.v2-content[data-pinyin="true"] .v2-reading-tokens rt { visibility: visible; }
.v2-content[data-pinyin="false"] .v2-reading-tokens rt { visibility: hidden; }
.v2-reader-translation { display: none; }
[data-controller~="v2-reader"][data-english="true"] .v2-reader-translation { display: block; }
.v2-reader-copy { font-size: clamp(1.3rem, 2.3vw, 1.65rem); gap: .08em; padding-block: var(--v2-space-2); line-height: 1.6; letter-spacing: 0; }
.v2-content[data-pinyin="false"] .v2-reader-copy rt { display: none; }
.v2-reader-translation { font-size: var(--v2-size-md); color: var(--v2-muted); margin-bottom: var(--v2-space-2); }
@media (max-width: 359px) {
  .v2-reader-toolbar { gap: var(--v2-space-1); }
  .v2-reader-playback { padding-inline-start: .15rem; }
  .v2-reader-settings-group { gap: .1rem; }
}
@media (prefers-reduced-motion: reduce) { .v2 *, .v2 *::after { animation: none !important; transition: none !important; } }

@media (max-width: 539px) { .v2-answer-options:has(.v2-answer-choice) { grid-template-columns: 1fr; } }

/* Activity navigation and grammar notes share one anchored tray. */
.v2-study-toolbar { display: block; padding: var(--v2-space-2); }
.v2-study-settings { display: flex; align-items: center; gap: var(--v2-space-1); }
.v2-study-settings > .v2-toggle { margin-inline: .15rem; }
.v2-listening-tools { display: flex; align-items: center; flex-wrap: wrap; gap: var(--v2-space-2); margin-block-start: var(--v2-space-2); font-size: var(--v2-size-sm); }
.v2-listening-tools label { display: inline-flex; align-items: center; gap: var(--v2-space-2); }
.v2-listening-tools select { width: auto; min-height: 44px; padding: var(--v2-space-1) var(--v2-space-2); border: 1px solid var(--v2-control-border); border-radius: var(--v2-control-radius); background: var(--v2-surface); color: var(--v2-text); }
.v2-listening-tools .v2-button { min-height: 44px; padding: var(--v2-space-1) var(--v2-space-2); font-size: inherit; }
.v2-settings-controls { display: flex; flex-wrap: wrap; flex: 1; padding: 0; margin: 0; }
.v2-activity-controls { display: flex; flex-shrink: 0; gap: var(--v2-space-1); margin-left: auto; align-self: flex-start; }
.v2-activity-controls .v2-restart-form { margin: 0; }
.v2-study-settings .v2-settings-button { width: 40px; min-height: 40px; padding: var(--v2-space-2); }
.v2-study-toolbar .v2-context-tabs { margin: var(--v2-space-2) 0 0; }
.v2-run [role="tabpanel"] { scroll-margin-top: calc(var(--v2-header) + env(safe-area-inset-top) + var(--v2-tray-height, 140px) + 1rem); }
.v2--native .v2-run [role="tabpanel"] { scroll-margin-top: calc(var(--v2-header) + env(safe-area-inset-top) + var(--v2-tray-height, 140px) + 1rem); }
.v2-lesson-notes { font-size: var(--v2-size-base); }
.v2-lesson-notes h1 { font-size: var(--v2-size-3xl); line-height: 1.6; }
.v2-lesson-notes h2 { font-size: var(--v2-size-2xl); line-height: 1.5; }
.v2-lesson-notes h3 { font-size: var(--v2-size-lg); }
.v2-lesson-notes [data-v2-text] { font-size: 1.25em; }
.v2-lesson-notes rt { font-size: var(--v2-size-md); }
.v2-lesson-notes table { font-size: var(--v2-size-base); width: 100%; }
.v2-lesson-notes th, .v2-lesson-notes td { padding: var(--v2-space-3) var(--v2-space-2); line-height: 2.15; }
.v2-question-source { padding: var(--v2-space-4); margin-bottom: var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-question-source-text { font-size: var(--v2-size-2xl); }

.v2-interaction-link { display: grid; gap: var(--v2-space-1); text-decoration: none; }
.v2-interaction-link strong { color: var(--v2-text); font-size: var(--v2-size-base); line-height: 1.7; }
.v2-interaction-row { gap: var(--v2-space-4); align-items: center; }
.v2-interaction-row form { flex: 0 0 auto; }
.v2-editor-section { border: 0; border-top: 1px solid var(--v2-border); padding: var(--v2-space-4) 0 0; margin: 0; min-width: 0; }
.v2-reference-picker { gap: var(--v2-space-2); font-size: var(--v2-size-md); }
.v2-reference-selection { display: grid; grid-template-columns: 1fr auto; gap: var(--v2-space-1) var(--v2-space-2); padding: var(--v2-space-3); border: 1px solid var(--v2-border); background: var(--v2-soft); border-radius: var(--v2-control-radius); }
.v2-reference-selection small { grid-column: 1; color: var(--v2-muted); overflow-wrap: anywhere; }
.v2-reference-selection button { grid-column: 2; grid-row: 1 / 3; }
.v2-reference-picker summary { min-height: 44px; cursor: pointer; padding-block: var(--v2-space-2); color: var(--v2-accent); }
.v2-reference-search { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--v2-space-3); margin-bottom: var(--v2-space-2); }
.v2-reference-results { list-style: none; margin: var(--v2-space-2) 0 0; padding: 0; max-height: 320px; overflow: auto; }
.v2-reference-results button { display: grid; gap: var(--v2-space-1); width: 100%; text-align: left; font: inherit; padding: var(--v2-space-3); color: var(--v2-text); border: 1px solid var(--v2-border); background: var(--v2-surface); cursor: pointer; }
.v2-reference-results button:hover { background: var(--v2-soft); }
.v2-reference-results span, .v2-reference-results small { font-size: var(--v2-size-sm); color: var(--v2-muted); overflow-wrap: anywhere; }
@media (max-width: 539px) { .v2-reference-search { grid-template-columns: 1fr; } }

/* Release navigation: Learn and a shared Practice disclosure in every shell. */
.v2-menu__panel--site { width: 260px; grid-template-columns: 1fr; }
.v2-navigation-group { position: relative; }
.v2-navigation-group > summary { list-style: none; cursor: pointer; user-select: none; }
.v2-navigation-group > summary::-webkit-details-marker { display: none; }
.v2-navigation-group > summary > .v2-icon:last-child { width: 1rem; height: 1rem; margin-left: auto; transition: transform .15s; }
.v2-navigation-group[open] > summary > .v2-icon:last-child { transform: rotate(90deg); }
.v2-navigation-group.is-active > summary { color: var(--v2-accent); }
.v2-navigation-group > summary:focus-visible { outline: 2px solid var(--v2-accent); outline-offset: 2px; }
.v2-navigation-group__links { display: grid; gap: .15rem; padding-left: var(--v2-space-3); margin-left: var(--v2-space-2); border-left: 1px solid var(--v2-border); }
.v2-menu__panel .v2-navigation-group > summary { display: flex; width: 100%; padding-inline: var(--v2-space-2); }
.v2-menu__panel .v2-navigation-group__links .v2-nav-link { padding-inline: var(--v2-space-2); }
.v2-app-nav > .v2-navigation-group { flex: 1; max-width: 140px; min-width: 0; }
.v2-app-nav .v2-navigation-group > summary { max-width: none; }
.v2-app-nav .v2-navigation-group > summary > .v2-icon:last-child { display: none; }
.v2-app-nav .v2-navigation-group__links { position: absolute; bottom: calc(100% + .75rem); left: 50%; width: max-content; min-width: 180px; max-width: calc(100vw - 2rem); transform: translateX(-50%); margin: 0; padding: var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-surface); box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .14); }
.v2-app-nav .v2-navigation-group__links .v2-nav-link { flex-direction: row; justify-content: start; max-width: none; padding-inline: var(--v2-space-2); gap: var(--v2-space-2); font-size: var(--v2-size-sm); }
.v2-navigation-group__links .v2-nav-link[aria-current="page"] { color: var(--v2-accent); background: var(--v2-tint); }
.v2-edition-note { display: flex; flex-wrap: wrap; gap: var(--v2-space-2); padding-top: var(--v2-space-3); font-size: var(--v2-size-sm); color: var(--v2-muted); }
.v2-edition-switch { background: none; border: 0; color: var(--v2-accent); text-decoration: underline; font: inherit; cursor: pointer; padding: var(--v2-space-2); }
@media (max-width: 600px) {
  .v2-header .v2-logo { width: 104px; }
  .v2-app-nav .v2-nav-link { padding-inline: var(--v2-space-1); }
  .v2-menu__panel--site { position: fixed; right: var(--v2-gutter); top: calc(var(--v2-header) + .5rem); }
}

@media (max-width: 359px) { .v2-header .v2-logo { width: 80px; } }

/* Book-first catalog and compact, freely selectable lesson activities. */
.v2-text-button { border: 0; padding: var(--v2-space-1); background: none; color: var(--v2-accent); font: inherit; text-decoration: underline; cursor: pointer; }
.v2-catalog-standard { max-width: 24rem; display: grid; gap: var(--v2-space-2); }
.v2-catalog-standard .button_to { margin: 0; }
.v2 [data-v2-course-choice][aria-pressed="true"] { background: var(--v2-action); border-color: var(--v2-action); color: var(--v2-on-action); }
.v2-catalog { padding-block: var(--v2-space-6); }
.v2-catalog > .v2-section-heading { margin-bottom: var(--v2-space-4); }
.v2-catalog-courses { display: grid; gap: var(--v2-space-5); }
.v2 .v2-catalog-course__title { margin: 0 0 var(--v2-space-2); font-size: var(--v2-size-xl); }
.v2 .v2-catalog-course__link { display: inline-flex; align-items: center; min-height: 44px; color: var(--v2-text); text-decoration: none; }
.v2-catalog-course__link:hover { color: var(--v2-accent); }
.v2-catalog-books { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--v2-space-2); }
.v2-catalog-book { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--v2-space-4); padding: var(--v2-space-3) var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); }
.v2-catalog-book__content { min-width: 0; }
.v2-catalog-book__heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem var(--v2-space-4); }
.v2 .v2-catalog-book__title { margin: 0; font-size: var(--v2-size-base); overflow-wrap: anywhere; }
.v2 .v2-catalog-book__link { color: inherit; text-decoration: none; }
.v2-catalog-book__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--v2-radius); }
.v2-catalog-book__link:hover { color: var(--v2-accent); }
.v2 .v2-catalog-book__link:focus-visible { outline: none; }
.v2-catalog-book__link:focus-visible::after { outline: 3px solid var(--v2-accent); outline-offset: 3px; }
.v2-catalog-book .v2-course-progress { margin: var(--v2-space-2) 0 0; }
.v2-catalog-book .v2-progress { margin: var(--v2-space-1) 0 0; }
.v2-catalog-book__action { position: relative; z-index: 2; min-width: 7.5rem; padding: var(--v2-space-2) var(--v2-space-3); gap: var(--v2-space-2); }
.v2-catalog-empty { margin: 0; padding: var(--v2-space-3) var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); font-size: var(--v2-size-md); }
@media (max-width: 599px) {
  .v2-catalog-book { gap: var(--v2-space-3); padding: var(--v2-space-3); }
  .v2-catalog-book__heading { display: grid; gap: .1rem; }
  .v2-catalog-book__action { min-width: 6rem; padding-inline: var(--v2-space-2); gap: var(--v2-space-2); }
}
.v2-course-books + .v2-course-books { margin-top: var(--v2-space-6); }
.v2-activity-list { list-style: none; padding: 0; margin: var(--v2-space-4) 0 0; display: grid; gap: var(--v2-space-2); }
.v2-activity-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto 1rem; gap: var(--v2-space-3); align-items: center; padding: var(--v2-space-2) var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); color: var(--v2-text); text-decoration: none; min-height: 64px; }
.v2-activity-row:hover { border-color: var(--v2-accent); background: var(--v2-soft); }
.v2-activity-state { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--v2-border); border-radius: 50%; font-size: var(--v2-size-xs); color: var(--v2-muted); }
.v2-activity-row.is-complete .v2-activity-state { color: var(--v2-success); border-color: currentColor; }
.v2-activity-row.is-started .v2-activity-state { position: relative; border: 0; color: var(--v2-accent); }
.v2-activity-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); fill: none; stroke-width: 2.5; }
.v2-activity-ring-track { stroke: var(--v2-border); }
.v2-activity-ring-fill { stroke: currentColor; }
.v2-activity-ring-label { position: relative; font-size: var(--v2-size-xs); font-variant-numeric: tabular-nums; }
.v2-activity-ring-label small { font-size: var(--v2-size-xs); }
/* A numbered ring per lesson, drawn round by its progress. Done is a solid disc; the current lesson's centre is the action colour. */
.v2 .v2-lesson-ring { position: relative; display: grid; place-items: center; width: 100%; max-width: 48px; aspect-ratio: 1; border-radius: 50%; color: var(--v2-muted); font-size: var(--v2-size-sm); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; text-decoration: none; }
.v2-lesson-ring > span { position: relative; }
.v2-lesson-ring .v2-activity-ring { stroke-width: 3.5; }
.v2-lesson-ring .v2-activity-ring-track { stroke: var(--v2-control-border); opacity: .45; }
.v2-lesson-ring .v2-activity-ring-fill { stroke: var(--v2-progress-fill); stroke-linecap: round; }
.v2 .v2-lesson-ring:not([data-fill="0"]), .v2 a.v2-lesson-ring:hover { color: var(--v2-text); }
a.v2-lesson-ring:hover .v2-activity-ring-track { opacity: 1; }
.v2-lesson-ring:focus-visible { outline: 3px solid var(--v2-accent); outline-offset: 2px; }
.v2 .v2-lesson-ring.is-done { background: var(--v2-progress-fill); color: var(--v2-on-success); }
.v2-lesson-ring.is-done .v2-activity-ring { display: none; }
.v2 .v2-lesson-ring.is-current { background: radial-gradient(circle closest-side, var(--v2-action) calc(100% - 8px), transparent calc(100% - 7px)); color: var(--v2-on-action); }
.v2-activity-row.is-started { border-color: var(--v2-accent); }
.v2-activity-title { display: flex; flex-wrap: wrap; gap: var(--v2-space-1) var(--v2-space-3); align-items: baseline; }
.v2-activity-title strong { font-size: var(--v2-size-md); }
.v2-activity-status { font-size: var(--v2-size-xs); text-align: right; color: var(--v2-muted); }
.v2-activity-status small { display: block; }
@media (max-width: 599px) {
  .v2-activity-row { gap: var(--v2-space-2); padding: var(--v2-space-2); grid-template-columns: 1.8rem minmax(0, 1fr) auto; }
  .v2-activity-row > .v2-icon { display: none; }
  .v2-activity-title { display: grid; gap: var(--v2-space-1); }
  .v2-activity-status { max-width: 6rem; }
}

.v2-quiz-picture { margin: 0 auto var(--v2-space-4); max-width: 28rem; }
.v2-quiz-picture img { display: block; width: 100%; max-height: 21rem; object-fit: contain; border-radius: var(--v2-radius); }

/* Matching shares the activity tray and renders one board with independent slots. */
.v2-matching-heading { margin-bottom: var(--v2-space-4); }
.v2-matching-heading p { margin: var(--v2-space-2) 0; }
.v2-matching-board { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(14rem, 1fr); gap: var(--v2-space-4); align-items: start; }
.v2-run:has(.v2-matching) { max-width: 1240px; }
.v2-matching-prompts { display: grid; gap: var(--v2-space-3); min-width: 0; }
.v2-matching-prompt { min-width: 0; padding: var(--v2-space-4); }
.v2-matching-prompt h3 { margin: 0 0 var(--v2-space-2); color: var(--v2-muted); }
.v2-matching-sentence { font-size: var(--v2-size-xl); line-height: 2.6; white-space: pre-line; overflow-wrap: anywhere; }
.v2-matching-sentence .v2-rich-text { display: contents; }
.v2-matching-sentence ruby { white-space: normal; }
.v2-matching-sentence rt { font-size: var(--v2-size-xs); }
.v2-content[data-pinyin="false"] .v2-matching rt { display: none; }
.v2-matching-slot { display: inline-block; vertical-align: baseline; min-width: 7rem; max-width: 100%; min-height: 46px; margin: .15rem var(--v2-space-1); padding: var(--v2-space-1) var(--v2-space-2); border: 1px dashed var(--v2-accent); border-radius: var(--v2-control-radius); background: var(--v2-soft); color: var(--v2-text); font: inherit; line-height: 1.9; cursor: pointer; }
.v2-matching-slot:not(.is-filled) { font-size: var(--v2-size-sm); color: var(--v2-muted); }
.v2-matching-slot.is-filled { border-style: solid; }
.v2-matching-slot.is-correct { border-color: var(--v2-success); }
.v2-matching-slot.is-incorrect { border-color: var(--v2-error); }
/* A right choice lights its blank; a refused one shakes it. */
.v2-matching-slot.is-lit { animation: v2-board-lit .5s ease; }
.v2-matching-slot.is-refused { animation: v2-match-wrong .35s ease; }
@media (prefers-reduced-motion: reduce) { .v2-matching-slot.is-lit, .v2-matching-slot.is-refused { animation: none; } }
.v2-matching-slot:disabled { opacity: 1; cursor: default; }
.v2-matching-slot img { width: clamp(8rem, 16vw, 12rem); max-width: 100%; height: clamp(8rem, 16vw, 12rem); display: block; object-fit: contain; }
.v2-matching-slot.is-selected { outline: 3px solid var(--v2-accent); outline-offset: 2px; background: color-mix(in srgb, var(--v2-accent) 24%, var(--v2-surface)); }
.v2-matching-picture { display: block; width: 100%; max-height: 12rem; object-fit: contain; border-radius: var(--v2-control-radius); margin-bottom: var(--v2-space-2); }
.v2-matching-tray { position: sticky; top: calc(var(--v2-header) + env(safe-area-inset-top) + var(--v2-tray-height, 105px) + .5rem); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); min-width: 0; }
@media (min-width: 600px) {
  .v2--native .v2-matching-tray { top: calc(var(--v2-header) + env(safe-area-inset-top) + var(--v2-tray-height, 105px) + .5rem); }
}
.v2-matching-tray-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--v2-space-2); padding: .15rem var(--v2-space-2); }
.v2-matching-tray-toggle { display: flex; align-items: center; gap: var(--v2-space-1); min-height: 40px; padding: var(--v2-space-1); cursor: pointer; color: var(--v2-text); background: transparent; border: 0; font: inherit; font-weight: 600; }
.v2-matching-tray-toggle[aria-expanded=false] > span { transform: rotate(-90deg); }
.v2-matching-choices { padding: var(--v2-space-2); max-height: calc(100dvh - var(--v2-header) - 260px); overflow-y: auto; }
.v2-matching-choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-2); }
.v2-matching-scroll-strip { display: none; }
.v2-matching-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; min-width: 0; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-matching-choice-select { display: flex; align-items: center; justify-content: center; padding: var(--v2-space-2) var(--v2-space-2); width: 100%; min-height: 48px; color: var(--v2-text); background: transparent; border: 0; border-radius: inherit; cursor: grab; font: inherit; }
.v2-matching-choice-select[aria-pressed=true] { outline: 3px solid var(--v2-accent); outline-offset: 2px; background: color-mix(in srgb, var(--v2-accent) 24%, var(--v2-surface)); }
.v2-matching-choice-content { font-size: var(--v2-size-lg); line-height: 1.9; overflow-wrap: anywhere; }
.v2-matching-choice-content img { width: 100%; height: clamp(9rem, 16vw, 12rem); object-fit: contain; display: block; }
.v2-matching-choice-row:has(.v2-matching-choice--picture) { grid-template-columns: minmax(0, 1fr); }
.v2-matching-choice--picture .v2-matching-choice-content { width: 100%; }
.v2-matching-choice .v2-audio-player { grid-column: 1 / -1; margin: 0; padding: var(--v2-space-1); }
.v2-matching-choice .v2-audio-controls { justify-content: center; }
.v2-matching-selection { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-1); padding: var(--v2-space-1) var(--v2-space-2); border-top: 1px solid var(--v2-border); }
.v2-matching-selection .v2-button { min-height: 44px; padding: var(--v2-space-1) var(--v2-space-2); font-size: var(--v2-size-sm); }
.v2-matching-selection > .v2-caption { flex: 1; }
.v2-matching-slot-wrap { display: inline-flex; vertical-align: middle; flex-direction: column; align-items: center; max-width: 100%; }
.v2-matching-slot-controls { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }
.v2-matching-drag-handle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; align-self: start; width: 36px; min-height: 44px; padding: var(--v2-space-1); border: 0; border-radius: var(--v2-control-radius); color: var(--v2-muted); background: transparent; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.v2-matching-drag-handle:disabled { cursor: default; }
.v2-matching-drag-handle .v2-icon { stroke-width: 3; }
.v2-matching-drag-handle:hover, .v2-matching-drag-handle:focus-visible { color: var(--v2-accent); background: var(--v2-tint); }
.v2-matching-slot-audio { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--v2-space-1); }
.v2-matching-slot-audio:empty { display: none; }
.v2-matching-slot-audio .v2-button:not(.v2-audio-button) { min-height: 34px; padding: var(--v2-space-1) var(--v2-space-2); }
.v2-matching-slot.is-filled:not(:disabled), .v2-matching-choice-select:not(:disabled) { touch-action: auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: grab; }
.v2-matching-slot.is-destination, .v2-matching-choice-select.is-destination { border: 2px dashed var(--v2-accent); background: color-mix(in srgb, var(--v2-accent) 9%, var(--v2-surface)); cursor: pointer; }
.v2-matching-prompt.is-destination { outline: 2px dashed var(--v2-accent); outline-offset: -2px; }
.v2-matching-choices.is-destination { outline: 2px dashed var(--v2-accent); outline-offset: -4px; }
.v2-matching-empty { grid-column: 1 / -1; margin: .15rem; color: var(--v2-muted); }
.v2-matching .is-drop-hover { outline: 3px solid var(--v2-accent); outline-offset: -3px; background: color-mix(in srgb, var(--v2-accent) 24%, var(--v2-surface)); }
.v2-matching .is-drag-source { opacity: .45; }
.v2-matching-drag-token { position: fixed; z-index: 60; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); max-width: 160px; padding: var(--v2-space-2) var(--v2-space-2); background: var(--v2-surface); color: var(--v2-text); border: 2px solid var(--v2-accent); border-radius: var(--v2-control-radius); box-shadow: 0 5px 20px #0004; }
.v2-matching-drag-token img { max-width: 100px; max-height: 80px; object-fit: contain; }
.v2-matching-actions { display: flex; justify-content: flex-end; gap: var(--v2-space-2); margin-top: var(--v2-space-4); }
.v2-matching-correction { padding: var(--v2-space-2); background: var(--v2-soft); border: 1px solid var(--v2-success); border-radius: var(--v2-control-radius); }
.v2-matching-correction > span { display: block; }
.v2-activity-row { grid-template-columns: 2rem minmax(0, 1fr) 14rem 9.5rem 1rem; }
.v2-activity-type { text-align: right; }
.v2-activity-row.is-started { padding-inline-start: calc(1rem - 2px); }
/* Course-only variant: type colors are confined to the labeled badges;
   completion and score remain separate signals. Other milestone lists retain
   their existing presentation. */
.v2 .v2-activity-row--course {
  --v2-activity-color: var(--v2-activity-recall);
  padding-inline-start: var(--v2-space-4);
  border-inline-start: 1px solid var(--v2-border);
  background: var(--v2-surface);
  color: var(--v2-text);
}
.v2-activity-row--course[data-activity-kind="reading"], .v2-activity-row--course[data-activity-kind="video"] { --v2-activity-color: var(--v2-activity-reading); }
.v2-activity-row--course[data-activity-kind="choice"], .v2-activity-row--course[data-activity-kind="listening"] { --v2-activity-color: var(--v2-activity-listening); }
.v2-activity-row--course[data-activity-kind="speaking"], .v2-activity-row--course[data-activity-kind="conversation"] { --v2-activity-color: var(--v2-activity-speaking); }
.v2-activity-row--course[data-activity-kind="arrange"], .v2-activity-row--course[data-activity-kind="typing"], .v2-activity-row--course[data-activity-kind="composition"] { --v2-activity-color: var(--v2-activity-writing); }
.v2-activity-row--course.is-outline, .v2-activity-row--course.is-skipped { --v2-activity-color: var(--v2-muted); }
.v2 .v2-activity-row--course:hover { border-color: var(--v2-control-border); background: var(--v2-soft); }
.v2 .v2-activity-row--course:focus-visible { outline-color: var(--v2-control-border); }
.v2-activity-row--course .v2-activity-type {
  justify-self: end; max-width: 100%; padding: var(--v2-space-1) var(--v2-space-2);
  border-radius: var(--v2-control-radius); color: var(--v2-activity-color);
  background: color-mix(in srgb, var(--v2-activity-color) 12%, var(--v2-surface));
  font-weight: 600; line-height: 1.4; overflow-wrap: anywhere;
}
.v2-activity-row--course.is-complete .v2-activity-state { background: var(--v2-success); border-color: var(--v2-success); color: var(--v2-on-success); }
.v2-activity-row--course.is-complete .v2-activity-state .v2-icon { stroke-width: 2.5; }
.v2-activity-row--course .v2-activity-status { display: grid; justify-items: end; gap: var(--v2-space-1); }
.v2-activity-status .v2-activity-score { display: inline-flex; padding: var(--v2-space-1) var(--v2-space-2); border-radius: var(--v2-control-radius); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-activity-score.v2-result-text--success { background: var(--v2-success-bg); }
.v2-activity-score.v2-result-text--practice { background: color-mix(in srgb, var(--v2-practice) 12%, var(--v2-surface)); }
.v2-activity-score.v2-result-text--error { background: var(--v2-error-bg); }
.v2-activity-score.v2-result-text--neutral { background: var(--v2-soft); }
/* Compact milestone collections omit the lesson activity-type column. Keep
   state, content and action on one row at every breakpoint. */
.v2-activity-row.v2-activity-row--compact { grid-template-columns: 2rem minmax(0, 1fr) auto; }
.v2-activity-row--compact > .v2-activity-state { grid-row: 1; }
.v2-activity-row--compact > .v2-activity-status { grid-column: 3; grid-row: 1; max-width: 8rem; }
.v2-activity-row--compact > .v2-row-body small { display: block; overflow-wrap: anywhere; }
.v2-activity-row--compact.is-complete { border-color: var(--v2-success); }
.v2-activity-row--compact.is-complete .v2-activity-status { color: var(--v2-success); }
.v2-activity-list.v2-activity-list--flush { margin-block: 0; gap: 0; }
@media (max-width: 799px) {
  .v2-activity-row { grid-template-columns: 2rem minmax(0, 1fr) 10rem 7rem 1rem; }
}
@media (max-width: 599px) {
  .v2-activity-row { grid-template-columns: 1.8rem minmax(0, 1fr) 6rem; gap: var(--v2-space-1) var(--v2-space-2); }
  .v2-activity-state { grid-row: 1 / 3; }
  .v2-activity-title { grid-column: 2 / 4; }
  .v2-activity-type { grid-column: 2; grid-row: 2; font-size: var(--v2-size-xs); }
  .v2-activity-status { grid-column: 3; grid-row: 2; }
  .v2-activity-row.is-started { padding-inline-start: calc(.65rem - 2px); }
  .v2 .v2-activity-row--course { padding-inline-start: var(--v2-space-2); }
  .v2-activity-row--course .v2-activity-type { justify-self: start; text-align: left; }
  .v2-matching-board { display: flex; flex-direction: column; }
  .v2-matching-prompts { width: 100%; }
  .v2-matching { padding-bottom: calc(var(--matching-tray-height, 180px) + 1rem); }
  .v2-matching-tray { position: fixed; display: grid; grid-template-columns: auto minmax(0, 1fr); inset-inline: 0; bottom: var(--matching-bottom, 0px); top: auto; width: auto; z-index: 12; border-radius: 0; border-inline: 0; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -3px 12px #0002; }
  .v2--app .v2-matching-tray { padding-bottom: 0; }
  .v2-matching-choices { grid-column: 1 / -1; overflow: auto; max-height: calc(min(23dvh, 9rem) + 2rem); padding: var(--v2-space-1) 0 0; scroll-padding-inline: .55rem; }
  .v2-matching-choice-row { display: flex; align-items: stretch; width: max-content; min-width: 100%; padding: 0 var(--v2-space-2) var(--v2-space-2); }
  /* This strip belongs to the native scroller and has no answer drag action. */
  .v2-matching-scroll-strip { display: flex; align-items: center; justify-content: center; gap: var(--v2-space-2); position: sticky; inset-inline-start: 0; bottom: 0; min-height: 32px; width: 100%; border-top: 1px solid var(--v2-border); background: var(--v2-tint); color: var(--v2-accent); font-size: var(--v2-size-xs); touch-action: pan-x; user-select: none; -webkit-user-select: none; }
  .v2-matching-choice { flex: 0 0 auto; min-width: 5.5rem; max-width: 10rem; }
  .v2-matching-choice-select { padding: var(--v2-space-1) var(--v2-space-2); }
  .v2-matching-choice-content { font-size: var(--v2-size-base); line-height: 1.7; }
  .v2-matching-choice--picture { width: 13rem; max-width: 13rem; }
  .v2-matching-choice-content img { height: 8rem; }
  .v2-matching-choices:has(.v2-matching-choice--picture) { max-height: calc(min(32dvh, 14rem) + 2rem); }
  .v2-matching-choice .v2-audio-player { padding: 0 .15rem .15rem; }
  .v2-matching-tray-heading { grid-column: 1 / -1; padding-block: 0; }
  .v2-matching-tray:has(.v2-matching-selection:not([hidden])) .v2-matching-tray-heading { grid-column: 1; grid-row: 1; }
  .v2-matching-tray:has(.v2-matching-selection:not([hidden])) .v2-matching-tray-heading > .v2-caption { display: none; }
  .v2-matching-tray-toggle { min-height: 36px; }
  .v2-matching-selection { grid-column: 2; grid-row: 1; padding-block: var(--v2-space-1); border: 0; justify-content: flex-end; min-width: 0; }
  .v2-matching-slot { scroll-margin-block: 180px 230px; }
  .v2-matching-sentence { font-size: var(--v2-size-lg); }
  .v2-matching-prompt { padding: var(--v2-space-3); }
  .v2-matching-slot { min-width: 6rem; }
}

.v2 .v2-matching-prompt h3 { font-size: var(--v2-size-sm); font-weight: 500; }
.v2-matching-sentence { white-space: normal; }
.v2-response-card { padding: clamp(.75rem, 3vw, 1.25rem); gap: var(--v2-space-4); }
.v2-response-situation { padding: var(--v2-space-3) var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-response-partner { padding: var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); }
.v2-response-partner-text { font-size: var(--v2-size-2xl); line-height: 1.7; }
.v2-response-image { margin: 0; display: grid; place-items: center; }
.v2-response-image img { width: min(100%, 24rem); max-height: 22rem; object-fit: contain; border-radius: var(--v2-radius); }
.v2-response-input textarea { min-height: 7rem; font-size: var(--v2-size-xl); line-height: 1.6; resize: vertical; width: 100%; }
.v2-response-input > button { justify-self: start; }
.v2-response-template { font-size: var(--v2-size-xl); line-height: 1.8; }
.v2-response-feedback { padding: var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); }
.v2-response-answer { font-size: var(--v2-size-2xl); line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.v2-response-criteria { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--v2-space-2); }
.v2-response-criteria li { display: flex; align-items: center; gap: var(--v2-space-2); }
.v2-response-recap { border-block: 1px solid var(--v2-border); padding-block: var(--v2-space-5); }
.v2-response-recap audio { width: 100%; }
@media (max-width: 599px) { .v2-response-partner { padding: var(--v2-space-3); } .v2-response-image img { max-height: 16rem; } .v2-response-card .v2-run-actions { flex-wrap: wrap; } }
.v2-matching-prompt.is-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, 1fr); gap: var(--v2-space-2) var(--v2-space-4); align-items: center; }
.v2-matching-prompt.is-pair h3 { grid-column: 1 / -1; margin: 0; }
.v2-matching-prompt.is-pair .v2-matching-picture { height: clamp(9rem, 18vw, 14rem); max-height: none; margin: 0; }
.v2-matching-prompt.is-pair .v2-matching-sentence { line-height: 2.3; }
.v2-matching-prompt.is-pair:not(:has(.v2-matching-picture, .v2-audio-player)) .v2-matching-sentence { grid-column: 1 / -1; }
.v2-matching-prompt.is-pair > p, .v2-matching-prompt.is-pair > .v2-matching-correction { grid-column: 1 / -1; }
.v2-matching-audio-group { grid-column: 1 / -1; min-width: 0; }
.v2-matching-audio-group > .v2-caption { margin-block: var(--v2-space-2); }
.v2-audio-group-clips { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: var(--v2-space-2); }
@media (max-width: 599px) { .v2-matching-prompt.is-pair { gap: var(--v2-space-1) var(--v2-space-2); grid-template-columns: minmax(0, 1fr) minmax(7rem, 1fr); } }
@media (max-width: 599px) { .v2-matching-prompt.is-pair:has(img, .v2-audio-player) { grid-template-columns: minmax(0, 1fr); } }

/* Keep identification and conversation work in a compact, stable console. */
.v2-phonetics-card .v2-player-content { padding: var(--v2-space-4) var(--v2-space-4); }
.v2-phonetics-card .v2-player-content > * + * { margin-top: var(--v2-space-4); }
.v2-phonetics-card .v2-player-prompt { line-height: 1.4; }
.v2-phonetics-card .v2-choice { padding: var(--v2-space-2) var(--v2-space-3); min-height: 54px; }
.v2-tone-options:has(.v2-answer-choice) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.v2-tone-options .v2-choice { gap: var(--v2-space-2); }
.v2-tone-contour { display: inline-block; width: 80px; height: 50px; vertical-align: middle; fill: none; stroke: currentColor; }
.v2-tone-guide { stroke-width: 1; opacity: .17; }
.v2-tone-line { stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.v2-phonetics-result { padding-block: var(--v2-space-2); }
.v2-phonetics-sound { min-width: 3.5rem; font-size: var(--v2-size-lg); color: var(--v2-pinyin); }
.v2-phonetics-answer-summary { display: flex; align-items: center; flex-wrap: wrap; gap: var(--v2-space-1) var(--v2-space-2); font-size: var(--v2-size-md); }
.v2-phonetics-answer-summary .v2-tone-contour { width: 38px; height: 26px; }
.v2-response-card { padding: var(--v2-space-4) var(--v2-space-4); gap: var(--v2-space-4); }
.v2-response-card .v2-stack { gap: var(--v2-space-3); }
.v2-response-card p { margin-block: 0; }
.v2-response-partner { padding: var(--v2-space-3) var(--v2-space-4); display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--v2-space-1) var(--v2-space-3); }
.v2-response-partner > .v2-eyebrow { grid-column: 1 / -1; }
.v2-response-partner-text { font-size: var(--v2-size-2xl); line-height: 1.5; }
.v2-response-input textarea { min-height: 4.6rem; }
.v2-response-form .v2-run-actions { margin-top: var(--v2-space-1); padding-top: var(--v2-space-1); }
.v2-response-form .v2-response-capture-actions:not(:has(button:not([hidden]))), .v2-response-form .v2-response-start:not(:has(button:not([hidden]))), .v2-response-form [data-v2-response-target="status"]:empty { display: none; }
.v2-response-feedback { padding: var(--v2-space-3); }
.v2-response-live { padding: var(--v2-space-3) var(--v2-space-4); border: 1px solid var(--v2-accent); border-radius: var(--v2-radius); background: var(--v2-tint); }
.v2-response-live p { font-size: var(--v2-size-xl); min-height: 2rem; overflow-wrap: anywhere; }
.v2-recording-label { display: inline-flex; align-items: center; gap: var(--v2-space-2); font-weight: 600; }
.v2-recording-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--v2-error); }
.v2-voice-meter { height: 4px; margin-block: var(--v2-space-2); background: var(--v2-border); overflow: hidden; border-radius: var(--v2-control-radius); }
.v2-voice-meter span { display: block; height: 100%; background: var(--v2-accent); transform-origin: left; transform: scaleX(0); transition: transform 80ms; }
.v2-response-stop { background: var(--v2-error-bg); color: var(--v2-error); border: 2px solid var(--v2-error); min-width: 12rem; }
.v2-response-stop:hover { filter: brightness(1.15); }
.v2-conversation-card .v2-eyebrow { color: var(--v2-muted); }
.v2-conversation-card .v2-response-situation { border-color: var(--v2-border); }
.v2-conversation-card .v2-response-form { padding: var(--v2-space-3); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-bg); }
.v2-conversation-card [data-v2-response-target="record"] { background: var(--v2-tint); border: 2px solid var(--v2-accent); color: var(--v2-accent); min-width: 12rem; }
.v2-conversation-card [data-v2-response-target="record"]:hover { filter: brightness(1.12); }
.v2-conversation-card .v2-response-live { padding: 0; border: 0; background: transparent; }
.v2-conversation-card .v2-response-live[data-phase="recording"] .v2-recording-label { color: var(--v2-error); }
.v2-response-live[data-phase="reviewing"] .v2-recording-label { color: var(--v2-practice); }
.v2-response-live[data-phase="reviewing"] .v2-recording-dot { background: transparent; border: 2px solid currentColor; border-right-color: transparent; animation: v2-response-spin 1s linear infinite; }
.v2-response-live[data-phase="reviewing"] .v2-voice-meter { visibility: hidden; }
.v2-response-form .v2-run-actions:not(:has(button:not([hidden]))) { display: none; }
.v2-response-input:has(> [data-v2-response-target="editor"][hidden]):not(:has(button:not([hidden]))) { display: none; }
@keyframes v2-response-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .v2-response-live[data-phase="reviewing"] .v2-recording-dot { animation: none; } }
@media (max-width: 599px) {
  .v2-tone-options:has(.v2-answer-choice) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-response-card, .v2-phonetics-card .v2-player-content { padding: var(--v2-space-3); }
  .v2-response-partner { padding: var(--v2-space-2); }
  .v2-response-partner-text { font-size: var(--v2-size-xl); }
  .v2-response-start > .v2-button--primary, .v2-response-stop { flex: 1; }
}
/* Action hierarchy shared by activity players, with status reserved for feedback. */
.v2-button:focus-visible, .v2-audio-player button:focus-visible { outline: 3px solid var(--v2-accent); outline-offset: 3px; }
.v2-response-feedback--success { border-color: var(--v2-success); background: var(--v2-success-bg); }
.v2-response-feedback--practice { border-color: var(--v2-practice); }
.v2-response-feedback--error { border-color: var(--v2-error); }
.v2-response-criteria li { font-size: var(--v2-size-md); }
.v2-response-criteria .v2-icon { flex-shrink: 0; stroke-width: 2.5; }
.v2-completion-heading { display: flex; align-items: center; gap: var(--v2-space-4); }
.v2-completion-heading h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
.v2-completion-heading p { margin: var(--v2-space-2) 0 0; }
.v2-completion-mark { display: grid; place-items: center; flex: 0 0 3rem; height: 3rem; border-radius: 50%; background: var(--v2-success-bg); color: var(--v2-success); border: 1px solid currentColor; }
.v2-response-feedback--success, .v2-completion-mark { animation: v2-arrive 220ms ease-out; }
@keyframes v2-arrive { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .v2-response-feedback--success, .v2-completion-mark { animation: none; } }
.v2-results-list:has([data-result-kind="conversation"]) { display: grid; gap: var(--v2-space-4); }
.v2-result-row[data-result-kind="conversation"] { padding: var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-bg); }
.v2-result-row[data-result-kind="conversation"] > * + * { margin-top: var(--v2-space-2); }
.v2-result-row[data-result-kind="conversation"] p { margin-block: 0; }
.v2-result-row[data-result-kind="conversation"] .v2-prose { margin-block: var(--v2-space-2); }
.v2-response-review { gap: var(--v2-space-2); }
.v2-response-review .v2-support { padding-block: var(--v2-space-2); }
.v2-review-answer { padding: var(--v2-space-2) var(--v2-space-3); border-left: 3px solid var(--v2-border); background: var(--v2-surface); }
.v2-review-answer [lang="zh"] { font-size: var(--v2-size-lg); }
.v2-response-recap { padding: var(--v2-space-4); background: var(--v2-soft); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); gap: var(--v2-space-3); }

/* Existing site / V2 Beta switch; mirrored in the host layout's navigation/_site_toggle. */
.v2-site-toggle { display: inline-flex; align-items: center; flex-shrink: 0; margin-inline-end: var(--v2-space-2); padding: 3px; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-surface); font-size: var(--v2-size-xs); font-weight: 600; line-height: 1; }
.v2-site-toggle__option { display: inline-flex; align-items: center; min-height: 30px; padding: 0 var(--v2-space-2); border-radius: var(--v2-control-radius); color: var(--v2-muted); text-decoration: none; white-space: nowrap; }
a.v2-site-toggle__option:hover { color: var(--v2-text); background: var(--v2-tint); }
.v2-site-toggle__option--current { color: var(--v2-on-accent); background: var(--v2-accent); }
.v2-feedback-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.v2-activity-report { margin-top: var(--v2-space-4); }
.v2-activity-report > summary { display: list-item; width: fit-content; min-height: 44px; padding-block: var(--v2-space-2); font-size: var(--v2-size-sm); color: var(--v2-accent); cursor: pointer; }
.v2-activity-report turbo-frame { display: block; }
/* Help and feedback: chat beside the report form. */
.v2-support { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--v2-page-content-gap); align-items: start; }
@media (min-width: 900px) {
  .v2-support { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .v2-support-chat > .v2-panel { flex: 1; }
  .v2-support-chat .v2-support-log { flex: 1 1 0; max-height: none; }
}
.v2-support h2 { margin: 0; }
/* No rules: under page tabs or beside other panels. */
.v2-support--plain { border-block: 0; padding-block: 0; }
/* Top menu in three groups: Learn | Practice | Progress. Practice is one menu except on a very wide window;
   below 860px the whole bar gives way to the menu behind the logo. */
.v2-nav-divider { align-self: center; flex: 0 0 1px; width: 1px; height: 1.25rem; background: var(--v2-control-border); opacity: .45; }
.v2-desktop-nav > .v2-nav-folded { display: none; }
@media (max-width: 1399px) {
  .v2-desktop-nav > .v2-nav-link.v2-nav-inline { display: none; }
  .v2-desktop-nav > .v2-nav-folded { display: block; }
}
@media (max-width: 859px) { .v2-desktop-nav { display: none; } }
.v2--topbar .v2-desktop-nav > .v2-nav-link.v2-nav-progress > .v2-icon { display: block; width: 20px; height: 20px; flex-basis: 20px; }
.v2-menu__heading { margin: var(--v2-space-3) 0 var(--v2-space-1); padding-inline: var(--v2-space-2); font-size: var(--v2-size-xs); font-weight: 600; color: var(--v2-muted); }
/* Account menu: the learner's own progress leads the list. */
.v2-menu__panel .v2-menu__feature { align-items: center; gap: var(--v2-space-3); margin-bottom: var(--v2-space-2); padding: var(--v2-space-3); border: 1px solid var(--v2-border); background: var(--v2-soft); }
.v2-menu__feature .v2-icon { flex: 0 0 auto; color: var(--v2-practice); }
.v2-menu__feature > span { display: grid; }
.v2-menu__feature small { font-size: var(--v2-size-xs); color: var(--v2-muted); }
.v2-profile-name { margin-block: var(--v2-space-4); }
/* Admin priority queue. */
.v2 .v2-counterpart { position: relative; }
.v2-counterpart:not(.v2-counterpart--header) .v2-attention-dot { position: static; margin-left: auto; }
.v2-attention-dot { position: absolute; top: 2px; right: 0; min-width: 1.15rem; padding: 0 .25rem; border-radius: 999px; background: var(--v2-error); color: var(--v2-surface); font-size: .68rem; font-weight: 700; line-height: 1.15rem; text-align: center; }
.v2-attention-level { flex: 0 0 4.75rem; justify-content: center; }
.v2-attention-level--critical { color: var(--v2-error); border-color: currentColor; }
.v2-attention-level--high { color: var(--v2-practice); border-color: currentColor; }
.v2-attention-level--normal { color: var(--v2-accent); border-color: currentColor; }
.v2-attention-count { flex: 0 0 auto; min-width: 2ch; text-align: right; font-size: var(--v2-size-xl); font-weight: 700; font-variant-numeric: tabular-nums; }
.v2-attention-clear ul, .v2-attention-problems { margin: var(--v2-space-2) 0 0; padding-left: var(--v2-space-5); font-size: var(--v2-size-sm); }
.v2-attention-problems li + li { margin-top: var(--v2-space-2); }
.v2-attention-problems .v2-caption { display: block; }
.v2-attention-book { display: block; padding-block: var(--v2-space-3); }
.v2-attention-book + .v2-attention-book { border-top: 1px solid var(--v2-border); }
.v2-attention-book form { margin: 0; }
.v2-attention-recent p { margin: 0; }
/* Reviews: five stars, shown and chosen. */
.v2-rating { display: inline-flex; gap: .1em; font-size: 1.25rem; line-height: 1; color: var(--v2-control-border); }
.v2-rating .is-on { color: var(--v2-practice); }
.v2-rating-input { display: inline-flex; }
.v2-rating-input label { position: relative; display: grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: var(--v2-control-radius); font-size: 1.75rem; line-height: 1; color: var(--v2-control-border); cursor: pointer; }
.v2-rating-input label:has(input:checked), .v2-rating-input label:has(~ label input:checked),
.v2-rating-input label:hover, .v2-rating-input label:has(~ label:hover) { color: var(--v2-practice); }
.v2-rating-input:hover label:not(:hover):not(:has(~ label:hover)) { color: var(--v2-control-border); }
.v2-rating-input label:has(input:focus-visible) { outline: 2px solid var(--v2-accent); outline-offset: -2px; }
.v2-review p { margin: 0; }
/* Carousel: a sideways row that snaps to each slide. */
.v2-carousel__track { position: relative; display: flex; gap: var(--v2-space-4); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: var(--v2-space-1); }
.v2-carousel__track::-webkit-scrollbar { display: none; }
.v2-carousel__slide { flex: 0 0 min(100%, 26rem); display: flex; flex-direction: column; gap: var(--v2-space-3); margin: 0; scroll-snap-align: start; }
.v2-carousel__slide blockquote { margin: 0; }
.v2-carousel__slide figcaption { margin-top: auto; }
.v2-carousel__controls { justify-content: flex-end; margin-top: var(--v2-space-2); }
.v2-support-log { display: flex; flex-direction: column; gap: var(--v2-space-2); min-height: 12rem; max-height: 26rem; overflow-y: auto; padding: var(--v2-space-3); background: var(--v2-soft); border-radius: var(--v2-control-radius); }
.v2-support-message { max-width: 88%; margin: 0; padding: var(--v2-space-2) var(--v2-space-3); border-radius: var(--v2-control-radius); font-size: var(--v2-size-md); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.v2-support-message--assistant { align-self: flex-start; background: var(--v2-surface); border: 1px solid var(--v2-border); }
.v2-support-message--user { align-self: flex-end; background: var(--v2-tint); }
.v2-support-message--pending { color: var(--v2-muted); }
.v2-support-message--error { color: var(--v2-error); border-color: currentColor; }
.v2-support-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--v2-space-2); align-items: end; }
.v2-support-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: var(--v2-space-3); align-items: end; }
.v2-support-details .v2-field:has(.v2-segmented) { grid-column: 1 / -1; }
.v2-support-details .v2-segmented span { padding-inline: var(--v2-space-5); }
.v2-support-details .v2-segmented { width: fit-content; }
.v2-support-details .v2-segmented span { white-space: nowrap; }
.v2-report-chat p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.v2-report-chat p + p { margin-top: var(--v2-space-2); }
.v2-report blockquote.v2-feedback-body { margin: 0; padding-left: var(--v2-space-4); border-left: 3px solid var(--v2-border); }
.v2-report-context { display: grid; gap: var(--v2-space-1); padding: var(--v2-space-3) var(--v2-space-4); background: var(--v2-soft); border-radius: var(--v2-radius); }
.v2-report-context p { margin: 0; }
.v2-report-status--open { color: var(--v2-practice); border-color: currentColor; }
.v2-report-status--reviewing { color: var(--v2-accent); border-color: currentColor; }
.v2-report-status--resolved { color: var(--v2-success); border-color: currentColor; }
.v2-app-nav { grid-template-columns: repeat(3, 1fr); }

/* Reader sentence and token help popups. */
.v2-reader-line-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--v2-space-2); }
.v2-reader-info { display: inline-grid; place-items: center; flex: 0 0 2.25rem; width: 2.25rem; height: 2.25rem; padding: var(--v2-space-2); color: var(--v2-muted); background: transparent; border: 1px solid var(--v2-border); border-radius: 50%; cursor: pointer; }
.v2-reader-info:hover, .v2-reader-info:focus-visible { color: var(--v2-text); background: var(--v2-tint); }
.v2-reader-info .v2-icon { width: 1.15rem; height: 1.15rem; }
.v2-reader-sentence-dialog { width: min(32rem, calc(100vw - 2rem)); max-width: none; max-height: min(80vh, 40rem); padding: 0; overflow: auto; color: var(--v2-text); background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); box-shadow: 0 1rem 3rem rgb(0 0 0 / .24); }
.v2-reader-sentence-dialog::backdrop { background: rgb(0 0 0 / .48); }
.v2-reader-help-card { display: grid; gap: var(--v2-space-2); padding: var(--v2-space-4); }
.v2-reader-help-card > * { margin: 0; }
.v2-reader-help-card .v2-between { align-items: center; }
.v2-reader-help-close { min-width: 2.5rem; min-height: 2.5rem; padding: var(--v2-space-2); }
.v2-reader-help-chinese { font-size: var(--v2-size-xl); }
.v2-reader-token { display: inline; padding: 0; border: 0; color: inherit; font: inherit; background: transparent; cursor: pointer; border-radius: .2rem; }
/* The lookup cue paints inside the token so adjacent characters remain clear. */
.v2-reader-token[aria-expanded="true"] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v2-accent) 66%, transparent); }
.v2 .v2-reader-token:focus-visible { outline: 2px solid var(--v2-accent); outline-offset: -2px; }
.v2 .v2-reader-token[aria-expanded="true"]:focus-visible { box-shadow: none; }
@media (forced-colors: active) {
  .v2-reader-token[aria-expanded="true"] { outline: 1px solid Highlight; outline-offset: -1px; }
  .v2 .v2-reader-token:focus-visible { outline-color: Highlight; }
}
.v2-reader-token-popover { position: fixed; z-index: 1000; display: grid; gap: var(--v2-space-1); width: max-content; max-width: min(18rem, calc(100vw - 1rem)); padding: var(--v2-space-2) var(--v2-space-3); color: var(--v2-text); background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .2); overflow-wrap: anywhere; }
.v2-reader-token-popover[hidden] { display: none; }
.v2-reader-token-popover { max-height: calc(100dvh - 1rem); overflow: auto; }
/* Word tooltip: reading in the pinyin colour, the word large, then its meaning. */
.v2-reader-token-popover { gap: 2px; max-width: min(16rem, calc(100vw - 1rem)); padding: var(--v2-space-2) var(--v2-space-3) var(--v2-space-3); line-height: 1.35; }
.v2-reader-token-popover .v2-pinyin { color: var(--v2-accent); font-size: var(--v2-size-md); }
.v2-reader-token-popover [data-v2-reader-help-target="popoverChinese"] { font-family: var(--v2-chinese); font-size: var(--v2-size-3xl); line-height: 1.25; }
.v2-reader-token-popover > :last-child { color: var(--v2-text); font-size: var(--v2-size-md); }
@media (prefers-reduced-motion: reduce) { .v2-reader-token-popover, .v2-reader-sentence-dialog { scroll-behavior: auto; } }
.v2-plan-grid { display: grid; gap: var(--v2-gap); grid-template-columns: 1fr; }
.v2-plan-grid > .v2-panel > * + * { margin-top: 0; }
.v2-purchase-list { list-style: none; margin: 0; padding: 0; }
.v2-purchase-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--v2-space-4); padding-block: var(--v2-space-4); border-bottom: 1px solid var(--v2-border); }
.v2-purchase-row strong { font-size: var(--v2-size-md); }
@media (min-width: 700px) {
  .v2-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Center desktop web workspaces without widening reading or forms. The header
   keeps the full container width on every page; only the content narrows.
   App routes retain their existing container and native-shell rules. */
@media (min-width: 1080px) {
  .v2--web { --v2-gutter: 40px; }
  .v2--web .v2-content .v2-container,
  .v2--web .v2-page-notice .v2-container,
  .v2--web .v2-footer { margin-inline: auto; }
  .v2--web:not(.v2--sidebar) .v2-header__inner {
    width: min(100%, calc(var(--v2-container) + 2 * var(--v2-gutter)));
    margin-inline: auto;
  }
}
@media (max-width: 499px) {
  .v2-content-row { gap: var(--v2-space-2) !important; }
  .v2 .v2-content-row > .v2-row-action { font-size: var(--v2-size-xs); gap: var(--v2-space-1); }
  .v2-content-row > .v2-row-body strong { font-size: var(--v2-size-md); }
  .v2-content-row .v2-progress-meta { flex-wrap: wrap; }
}

/* Word practice: shared by SRS, course Review, and course Flashcards. */
.v2-practice-section, .v2-run:has(.v2-practice-card) { padding-block: var(--v2-space-4); container-type: inline-size; container-name: practice; }
.v2-fc-flow { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--v2-space-3); }
.v2-practice-section .v2-fc-sticky { padding-block: var(--v2-space-2); display: grid; gap: var(--v2-space-1); top: calc(var(--v2-header) + env(safe-area-inset-top)); }
.v2--native .v2-practice-section .v2-fc-sticky { top: calc(var(--v2-header) + env(safe-area-inset-top)); }
.v2-practice-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-1) var(--v2-space-3); font-size: var(--v2-size-md); }
.v2-practice-status h1 { margin-right: auto; }
.v2-practice-header { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px 40px; gap: var(--v2-space-1); align-items: center; }
.v2-practice-header h1 { font-size: var(--v2-size-base); }
.v2-practice-counts { display: grid; font-size: var(--v2-size-xs); line-height: 1.5; padding-inline: var(--v2-space-1); color: var(--v2-muted); }
.v2-practice-counts strong { color: var(--v2-text); }
.v2-practice-counts--live { gap: .15rem; }
.v2-practice-counts--live > span { white-space: nowrap; }
.v2-practice-counts--live strong { display: inline-block; min-inline-size: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 539px) {
  .v2-practice-header:has(.v2-practice-counts--live) { grid-template-columns: minmax(0, 1fr) 44px 44px; }
  .v2-practice-header:has(.v2-practice-counts--live) h1, .v2-practice-header:has(.v2-practice-counts--live) .v2-practice-icon { grid-row: 1; }
  .v2-practice-header:has(.v2-practice-counts--live) h1 { grid-column: 1; }
  .v2-practice-counts--live { grid-column: 1 / -1; grid-row: 2; padding-top: var(--v2-space-1); }
}
.v2-practice-icon { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: var(--v2-radius); }
.v2-practice-icon:hover { background: var(--v2-tint); }
.v2-practice-section .v2-fc-sticky--compact { padding-block: 0; }
.v2-fc-sticky--compact .v2-practice-header { grid-template-columns: minmax(0, 1fr) repeat(3, 44px); min-height: 44px; }
.v2-fc-compact-progress { display: grid; gap: var(--v2-space-2); padding-inline-end: var(--v2-space-3); }
.v2-fc-compact-progress .v2-fc-meter { display: block; height: 4px; margin: 0; }
.v2-fc-compact-progress .v2-caption { margin: 0; }
.v2-practice-complete { padding: var(--v2-space-4); scroll-margin-top: calc(var(--v2-header) + 110px + env(safe-area-inset-top)); }
.v2-practice-complete:focus { outline: none; }
.v2-practice-complete input { max-width: 10rem; }
.v2-practice-status > a { font-size: var(--v2-size-sm); padding-block: var(--v2-space-2); }
.v2-practice-stats { position: relative; }
.v2-practice-stats summary { cursor: pointer; }
.v2-practice-stats p { position: absolute; z-index: 12; width: min(300px, 80vw); padding: var(--v2-space-3); border: 1px solid var(--v2-border); background: var(--v2-surface); box-shadow: var(--v2-shadow); }
.v2-run:has(.v2-practice-card) .v2-breadcrumbs { margin-bottom: var(--v2-space-2); }
.v2-run:has(.v2-practice-card) .v2-study-sticky { padding-block: var(--v2-space-1); }
.v2-practice-card { display: grid; gap: var(--v2-space-3); padding: var(--v2-space-4); min-width: 0; }
.v2-practice-caption { display: flex; justify-content: space-between; align-items: center; gap: var(--v2-space-2); min-height: 36px; font-size: var(--v2-size-sm); color: var(--v2-muted); }
.v2-practice-caption > form { margin: 0; }
.v2-course-flashcard-caption { flex-wrap: wrap; }
.v2-practice-caption .v2-button { min-height: 36px; padding: var(--v2-space-1); }
.v2-practice-word { display: grid; grid-template-columns: minmax(0, auto) auto; justify-content: center; align-items: center; gap: var(--v2-space-4); min-height: 164px; padding: var(--v2-space-2); }
.v2-practice-word:not(:has(.v2-practice-word__audio)) { grid-template-columns: minmax(0, 1fr); }
.v2-practice-word__text { display: grid; gap: .15rem; text-align: center; min-width: 0; }
.v2-practice-word__part { display: grid; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.v2-practice-word__value, .v2-practice-word__blank { grid-area: 1 / 1; }
.v2-practice-word__blank { color: var(--v2-muted); font-size: var(--v2-size-base); }
.v2-practice-word__placeholder { display: block; width: 3.5rem; max-width: 100%; height: .55rem; margin-inline: auto; border-radius: 3px; background: var(--v2-border); opacity: .45; }
.v2-practice-word__part.is-focus-target .v2-practice-word__placeholder { width: 4.5rem; height: .9rem; border: 1px solid var(--v2-accent); border-bottom-width: 3px; border-radius: var(--v2-control-radius); background: var(--v2-accent); opacity: 1; }
.v2-practice-word__pinyin { font-size: var(--v2-size-lg); line-height: 1.4; color: var(--v2-pinyin); }
.v2-practice-word__hanzi { font-size: 3rem; line-height: 1.25; }
.v2-practice-word__meaning { font-size: var(--v2-size-base); line-height: 1.4; }
.v2-practice-word__audio { align-self: center; }
.v2-practice-word__audio .v2-audio-player { margin: 0; }
.v2-practice-word--inline-audio { grid-template-columns: minmax(0, 1fr); }
.v2-practice-word__reading { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: var(--v2-space-2); }
.v2-practice-word__reading .v2-audio-player { display: flex; align-items: center; flex-wrap: wrap; gap: var(--v2-space-2); margin: 0; }
/* Flashcards render compact controls before controller connection; the shared
   screen-reader status never occupies a row or shifts the centered controls. */
.v2-practice-word__reading .v2-audio-player--flashcard { inline-size: fit-content; flex: 0 0 auto; }
.v2-audio-player--flashcard .v2-audio-play { block-size: 44px; }
/* Flashcards keep one quiet answer field beneath a more prominent prompt.
   Concealed values still reserve their full wrapped space before reveal. */
.v2-practice-word--single-answer .v2-practice-word__text { grid-template-rows: minmax(10rem, auto) minmax(7rem, auto); gap: var(--v2-space-3); }
.v2-practice-word__prompt { display: grid; align-content: center; gap: var(--v2-space-1); min-width: 0; }
.v2-practice-word__answer { display: grid; align-content: start; gap: var(--v2-space-1); min-width: 0; padding: var(--v2-space-2) var(--v2-space-3); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); }
.v2-practice-word__answer-label { font-size: var(--v2-size-xs); line-height: 1.4; color: var(--v2-muted); }
.v2-practice-word__answer .v2-practice-word__part { min-height: 4.5rem; }
.v2-practice-word--single-answer .is-focus-prompt.v2-practice-word__hanzi { font-size: 4rem; }
.v2-practice-word--single-answer .is-focus-prompt.v2-practice-word__pinyin { font-size: var(--v2-size-3xl); }
.v2-practice-word--single-answer .is-focus-prompt.v2-practice-word__meaning { font-size: var(--v2-size-2xl); }
@media (max-width: 539px) {
  .v2-practice-card:has(.v2-practice-word--single-answer) .v2-answer-options:has(.v2-answer-choice) { grid-template-columns: minmax(0, 1fr); }
}
.v2-practice-response { display: grid; gap: var(--v2-space-2); align-content: center; min-width: 0; }
.v2-practice-recall-prompt { display: grid; text-align: center; }
.v2-practice-recall-prompt > p { grid-area: 1 / 1; }
.v2-practice-action-slot { display: grid; }
.v2-practice-action-slot > button, .v2-practice-action-slot > form { grid-area: 1 / 1; margin: 0; width: 100%; }
.v2-practice-ratings { display: grid; grid-template-columns: 1fr 1fr; gap: var(--v2-space-2); }
.v2-practice-card .v2-button { min-height: 44px; }
.v2-practice-card .v2-answer-options:has(.v2-answer-choice) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-2); margin: 0; padding: 0; }
.v2-practice-card .v2-answer-choice { padding: var(--v2-space-2) var(--v2-space-2); min-height: 54px; gap: var(--v2-space-2); line-height: 1.35; }
.v2-practice-card .v2-answer-choice .v2-hanzi-display { margin: 0; font-size: var(--v2-size-2xl); line-height: 1.35; }
.v2-practice-card .v2-answer-choice .v2-review-pinyin, .v2-practice-card .v2-answer-choice .v2-review-meaning { margin: 0; font-size: var(--v2-size-base); line-height: 1.35; }
.v2-practice-card .v2-answer-choice:disabled { opacity: 1; cursor: default; }
.v2-practice-result { display: flex; align-items: center; flex-wrap: wrap; gap: var(--v2-space-2) var(--v2-space-2); min-height: 44px; font-size: var(--v2-size-md); }
.v2-practice-result form { margin-left: auto; }
.v2-practice-result .v2-button { padding: var(--v2-space-2) var(--v2-space-2); font-size: var(--v2-size-md); }
.v2-practice-audio-notice { grid-column: 1 / -1; }
.v2-practice-previous { border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); padding: var(--v2-space-3); display: grid; gap: var(--v2-space-2); font-size: var(--v2-size-md); }
.v2-practice-previous__word, .v2-practice-previous__result, .v2-practice-adjustments { display: flex; align-items: center; flex-wrap: wrap; gap: var(--v2-space-1) var(--v2-space-2); }
.v2-practice-previous__word > strong { font-size: var(--v2-size-xl); }
.v2-practice-previous__word .v2-pinyin { font-size: var(--v2-size-base); }
.v2-practice-adjustments .v2-cluster { gap: var(--v2-space-2); }
.v2-practice-adjustments .v2-button { min-height: 44px; padding: var(--v2-space-2) var(--v2-space-2); font-size: var(--v2-size-md); }
.v2-run:has(.v2-practice-card) .v2-previous { padding: var(--v2-space-3); margin-top: var(--v2-space-3); font-size: var(--v2-size-md); }
.v2-run:has(.v2-practice-card) .v2-previous > * + * { margin-top: var(--v2-space-2); }
.v2-run:has(.v2-practice-card) .v2-previous .v2-pinyin { font-size: var(--v2-size-base); }
@container practice (min-width: 600px) {
  .v2-practice-card--quiz { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: center; }
  .v2-practice-card--quiz .v2-practice-caption { grid-column: 1 / -1; }
}
@media (max-width: 539px) {
  .v2-practice-card { padding: var(--v2-space-3); gap: var(--v2-space-2); }
  .v2-practice-status { gap: var(--v2-space-1) var(--v2-space-2); }
  .v2-practice-status .v2-h3 { font-size: var(--v2-size-base); }
  .v2-practice-status strong { font-size: var(--v2-size-sm); }
  .v2-practice-status .v2-caption { font-size: var(--v2-size-xs); }
  .v2-key-hint { display: none; }
}

.v2-metrics header > p { margin-top: var(--v2-space-2); }
.v2-metrics-explainer { padding: var(--v2-space-3) var(--v2-space-4); font-size: var(--v2-size-md); }
.v2-metrics-explainer summary { cursor: pointer; font-weight: 600; }
.v2-metrics-filters { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr auto auto; gap: var(--v2-space-3); align-items: end; }
.v2-metrics-filters > div { min-width: 0; }
.v2-metrics-filters label { display: block; font-size: var(--v2-size-md); margin-bottom: var(--v2-space-1); }
.v2-metrics-filters > a { padding-block: var(--v2-space-3); }
.v2-metrics-list { display: grid; gap: var(--v2-space-3); }
.v2-metrics-word { padding: var(--v2-space-4); }
.v2-metrics-word__heading { display: flex; justify-content: space-between; gap: var(--v2-space-3); }
.v2-metrics-word__heading h2 { font-size: var(--v2-size-3xl); display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--v2-space-2); }
.v2-metrics-word__heading h2 .v2-pinyin { font-size: var(--v2-size-base); }
.v2-metrics-word__state { display: grid; align-content: start; gap: .15rem; font-size: var(--v2-size-md); text-align: right; }
.v2-metrics-word__state > span:first-child { color: var(--v2-accent); font-size: var(--v2-size-xl); }
.v2-metrics-locations { margin-block: var(--v2-space-2); }
.v2-metrics-skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--v2-space-3); }
.v2-metrics-skill { display: grid; align-content: start; gap: var(--v2-space-1); padding: var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); }
.v2-metrics-skill h3 { font-size: var(--v2-size-sm); line-height: 1.4; min-height: 2.8em; }
.v2-metrics-skill .v2-caption { font-size: var(--v2-size-xs); }
.v2-metrics-skill .v2-fc-meter { margin: 0; width: 100%; }
@media (max-width: 899px) {
  .v2-metrics-filters { grid-template-columns: 1fr 1fr; }
  .v2-metrics-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 539px) {
  .v2-metrics-word { padding: var(--v2-space-3); }
  .v2-metrics-word__heading { flex-wrap: wrap; }
  .v2-metrics-word__state { text-align: left; }
  .v2-metrics-skills { gap: var(--v2-space-2); }
}

/* Shared web/app chrome follows document travel without changing flow height. */
.v2-header__brand { display: contents; }
.v2-brand-mark, .v2-sidebar-account-label { display: none; }
.v2--topbar { --v2-header: 0px; }
.v2--topbar .v2-header { position: sticky; background: var(--v2-brand-bg); }
.v2--topbar .v2-header__inner { min-height: 80px; }
.v2--topbar .v2-desktop-nav { align-items: center; gap: var(--v2-space-2); }
.v2--topbar .v2-desktop-nav .v2-nav-link { padding: var(--v2-space-2) var(--v2-space-3); border-radius: var(--v2-control-radius); white-space: nowrap; font-size: var(--v2-size-base); }
.v2--topbar .v2-header__actions .v2-icon { width: 24px; height: 24px; flex-basis: 24px; }
.v2--topbar .v2-desktop-nav .v2-navigation-group__links .v2-icon { width: 22px; height: 22px; flex-basis: 22px; }
.v2--topbar .v2-desktop-nav .v2-navigation-group > summary > .v2-icon:last-child { width: 18px; height: 18px; flex-basis: 18px; transform: rotate(90deg); }
.v2--topbar .v2-desktop-nav .v2-navigation-group[open] > summary > .v2-icon:last-child { transform: rotate(270deg); }
.v2--topbar .v2-desktop-nav > .v2-nav-link > .v2-icon,
.v2--topbar .v2-desktop-nav > .v2-navigation-group > summary > .v2-icon:first-child { display: none; }
.v2--topbar .v2-desktop-nav .v2-navigation-group__links { position: absolute; z-index: 25; inset: calc(100% + .5rem) auto auto 0; width: 220px; max-height: calc(100dvh - 100px); overflow: auto; margin: 0; padding: var(--v2-space-2); background: var(--v2-surface); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); box-shadow: var(--v2-shadow); }
.v2--topbar .v2-desktop-nav .v2-navigation-group__links .v2-nav-link { width: 100%; }
.v2--topbar .v2-desktop-nav .v2-nav-link:hover { background: var(--v2-tint); }
.v2--topbar .v2-desktop-nav .is-active > summary { background: var(--v2-brand); color: var(--v2-on-brand); }
.v2--topbar .v2-desktop-nav .is-active > summary:hover { background: var(--v2-brand); }
.v2--topbar .v2-desktop-nav .is-active > summary:focus-visible { outline: 2px solid var(--v2-on-brand); outline-offset: -5px; }
@media (min-width: 860px) { .v2--topbar .v2-site-menu { display: none; } }
.v2-site-menu--brand > summary { gap: var(--v2-space-1); padding: var(--v2-space-1) var(--v2-space-2); }
.v2-site-menu--brand > summary > .v2-icon { width: 14px; height: 14px; flex-basis: 14px; transform: rotate(90deg); }
.v2-site-menu--brand[open] > summary > .v2-icon { transform: rotate(270deg); }
.v2-site-menu--brand .v2-menu__panel--site { left: 0; right: auto; grid-template-columns: 1fr; }
.v2-header--compact { --v2-header: 64px; }
.v2-header--compact .v2-header__inner { min-height: 64px; }
.v2-header--compact .v2-header__actions .v2-icon { width: 24px; height: 24px; flex-basis: 24px; }
.v2--app, .v2--native, .v2:has(> .v2-header) { --v2-header: 0px; }
.v2:has(> .v2-header) { --v2-header: var(--v2-visible-header-height, 65px); }
/* Direct scroll displacement has no easing, delay or extra motion, including
   with reduced motion. Dependent sticky controls use the same visible height. */
.v2-header { transform: translateY(var(--v2-header-offset, 0px)); }
.v2-header--compact .v2-menu { position: static; }
.v2-header--compact .v2-menu__panel { position: absolute; inset-inline: var(--v2-gutter); top: calc(100% + .5rem); width: auto; max-width: none; max-height: calc(100dvh - 80px - env(safe-area-inset-top)); }
@media (max-width: 859px) {
  .v2--topbar .v2-header__brand, .v2--topbar .v2-counterpart--header { display: none; }
  .v2--topbar .v2-header { position: sticky; top: 0; }
  .v2--topbar .v2-header__inner { min-height: 64px; }
  .v2--topbar .v2-menu { position: static; }
  .v2--topbar .v2-menu__panel { position: absolute; inset-inline: var(--v2-gutter); top: calc(100% + .5rem); width: auto; max-width: none; max-height: calc(100dvh - 80px - env(safe-area-inset-top)); }
  .v2--topbar .v2-site-menu--brand .v2-menu__panel--site { inset-inline: var(--v2-gutter); }
}
@media (max-width: 699px) {
  .v2--topbar .v2-header__inner { min-height: 64px; }
  .v2-header .v2-brand { min-width: 44px; min-height: 44px; }
  .v2-header .v2-brand .v2-logo { display: none; }
  .v2-header .v2-brand-mark { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
}
@media (max-width: 600px) {
  /* The in-flow web header has no retained sticky offset. Anchor its menu to
     that header so the trigger remains visible and the panel scrolls with it. */
  .v2--topbar .v2-site-menu { position: static; }
  .v2--topbar .v2-menu__panel--site { position: absolute; top: calc(100% + .5rem); max-height: calc(100dvh - 68px - env(safe-area-inset-top) - 1.5rem); }
  .v2--topbar .v2-site-menu--brand .v2-menu__panel--site { inset-inline: var(--v2-gutter); }
}
/* A dense library: book > lesson > deck, with pool actions on every row. */
.v2-decks-heading p { margin: 0; max-width: 65ch; }
#v2_deck_library { display: block; overflow-anchor: none; }
.v2-decks-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--v2-space-1) var(--v2-space-4); }
.v2-decks-status { min-height: 1.4em; margin: var(--v2-space-1) 0 var(--v2-space-2); }
.v2-decks-library { border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); }
.v2-decks-group { position: relative; }
.v2-decks-book + .v2-decks-book, .v2-decks-personal { border-top: 1px solid var(--v2-border); }
.v2-decks-group > details > summary { display: flex; align-items: center; gap: var(--v2-space-2); min-height: 70px; padding: var(--v2-space-2) 190px var(--v2-space-2) var(--v2-space-4); cursor: pointer; list-style: none; }
.v2-decks-group > details > summary::-webkit-details-marker { display: none; }
.v2-decks-group > details > summary::before { content: '›'; font-size: var(--v2-size-xl); width: .7rem; flex: 0 0 .7rem; transition: transform .15s; }
.v2-decks-group > details[open] > summary::before { transform: rotate(90deg); }
.v2-decks-group summary small, .v2-decks-name small { display: block; font-size: var(--v2-size-xs); color: var(--v2-muted); font-weight: normal; }
.v2-decks-group > .v2-decks-controls { position: absolute; right: .65rem; top: 13px; }
.v2-decks-lessons { border-top: 1px solid var(--v2-border); padding-left: var(--v2-space-4); }
.v2-decks-lesson + .v2-decks-lesson { border-top: 1px solid var(--v2-border); }
.v2-decks-lesson > details > summary { font-size: var(--v2-size-md); }
.v2-decks-table { padding: 0 var(--v2-space-2) var(--v2-space-2) var(--v2-space-5); }
.v2-decks-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--v2-space-2); align-items: center; min-height: 58px; padding: var(--v2-space-2) 0; border-top: 1px solid var(--v2-border); }
.v2-decks-name { min-width: 0; overflow-wrap: anywhere; font-size: var(--v2-size-md); }
.v2-decks-controls, .v2-decks-controls form { display: flex; align-items: center; gap: var(--v2-space-2); margin: 0; }
.v2-decks-count { text-align: right; font-size: var(--v2-size-sm); min-width: 42px; line-height: 1.25; }
.v2-decks-count small { display: block; font-size: var(--v2-size-xs); color: var(--v2-muted); }
.v2-decks-controls .v2-button { padding: var(--v2-space-2) var(--v2-space-2); min-height: 40px; font-size: var(--v2-size-sm); }
.v2-decks-controls > form > .v2-button { min-width: 65px; }
.v2-decks-more { position: relative; }
.v2-decks-more > summary { list-style: none; cursor: pointer; padding: var(--v2-space-2); min-height: 40px; display: flex; align-items: center; border-radius: var(--v2-control-radius); }
.v2-decks-more > summary::-webkit-details-marker { display: none; }
.v2-decks-more > summary:hover { background: var(--v2-surface); }
.v2-decks-menu { position: absolute; right: 0; top: 100%; z-index: 5; min-width: 165px; border: 1px solid var(--v2-border); background: var(--v2-surface); padding: var(--v2-space-1); box-shadow: 0 4px 12px #0002; border-radius: var(--v2-control-radius); }
.v2-decks-menu .v2-button { width: 100%; justify-content: flex-start; }
.v2-decks-personal > h2 { font-size: var(--v2-size-base); margin: var(--v2-space-4); }
.v2-decks-personal .v2-decks-table { padding-left: var(--v2-space-4); }
.v2-decks-create > summary { cursor: pointer; font-weight: 600; }
.v2-decks-create-form { display: flex; flex-wrap: wrap; align-items: end; gap: var(--v2-space-3); margin-top: var(--v2-space-4); }
.v2-decks-create-form .v2-field { flex: 1 1 200px; }
#v2_deck_library.is-saving-pool form { pointer-events: none; opacity: .65; }
@media (max-width: 599px) {
  .v2-decks-group > details > summary { padding-left: var(--v2-space-2); padding-right: 160px; min-height: 78px; }
  .v2-decks-group > .v2-decks-controls { right: .35rem; top: 17px; }
  .v2-decks-lessons { padding-left: var(--v2-space-1); }
  .v2-decks-table { padding-left: var(--v2-space-2); padding-right: var(--v2-space-1); }
  .v2-decks-controls { gap: var(--v2-space-1); }
  .v2-decks-controls .v2-button { padding: var(--v2-space-2) var(--v2-space-2); min-height: 44px; }
  .v2-decks-controls > form > .v2-button { min-width: 57px; }
  .v2-decks-more > summary { min-height: 44px; }
}


.v2-competency-label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--v2-space-1); }
.v2-word-sheet-heading { text-align: center; margin: 0 0 var(--v2-space-4); }
.v2-word-sheet-heading p { margin: var(--v2-space-1) 0; }
.v2-word-sheet-heading h1 { font-size: 3rem; line-height: 1.2; margin: var(--v2-space-1) 0; }
.v2-attributes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-3); margin-top: var(--v2-space-3); }
.v2-attribute { border: 1px solid var(--v2-border); background: var(--v2-surface); border-radius: var(--v2-control-radius); padding: var(--v2-space-4); display: flex; flex-direction: column; gap: var(--v2-space-2); min-width: 0; }
.v2-attribute h2 { display: flex; gap: var(--v2-space-2); align-items: center; font-size: var(--v2-size-base); margin: 0; }
.v2-attribute p { margin: 0; }
.v2-attribute strong small { font-size: var(--v2-size-xs); font-weight: normal; color: var(--v2-muted); }
.v2-attribute form { margin-top: auto; }
.v2-attribute .v2-button { min-height: 40px; padding: var(--v2-space-2) var(--v2-space-2); font-size: var(--v2-size-sm); }
.v2-word-options { margin-top: var(--v2-space-4); }
.v2-word-options summary, .v2-inline-sheet summary { cursor: pointer; font-size: var(--v2-size-sm); color: var(--v2-muted); }
.v2-inline-sheet { width: 100%; }
.v2-session-report { border-top: 1px solid var(--v2-border); padding-top: var(--v2-space-2); margin-top: var(--v2-space-2); font-size: var(--v2-size-md); }
.v2-session-report p { margin: var(--v2-space-1) 0 var(--v2-space-2); }
.v2-session-skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--v2-space-2); }
.v2-session-skills > div { display: flex; flex-direction: column; gap: var(--v2-space-1); min-width: 0; font-size: var(--v2-size-sm); }
.v2-session-skills .v2-icon { width: 16px; height: 16px; vertical-align: middle; }
.v2-session-skills small { color: var(--v2-muted); }
.v2-competency-choice { display: flex; gap: var(--v2-space-2); align-items: center; cursor: pointer; }
.v2-competency-choice small { display: block; color: var(--v2-muted); }
@media (max-width: 599px) {
  .v2-session-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-attribute { padding: var(--v2-space-2); }
  .v2-attribute h2 { font-size: var(--v2-size-md); gap: var(--v2-space-1); }
  .v2-attribute .v2-icon { width: 17px; height: 17px; }
  .v2-attributes { gap: var(--v2-space-2); }
  .v2-practice-status { font-size: var(--v2-size-xs); }
}
.v2-competency-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-2); }
.v2-direction-group { padding: var(--v2-space-2) var(--v2-space-3); display: grid; gap: var(--v2-space-1); }
.v2-direction-group + .v2-direction-group { border-top: 1px solid var(--v2-border); }
.v2-direction-group h3 { font-size: var(--v2-size-base); display: flex; align-items: center; gap: var(--v2-space-2); }
.v2-direction-power { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.v2-direction-power input[type=checkbox] { appearance: none; width: 44px; height: 24px; margin: 0; border: 1px solid var(--v2-control-border); border-radius: var(--v2-radius); background: var(--v2-muted); cursor: pointer; }
.v2-direction-power input::before { content: ""; display: block; width: 18px; height: 18px; margin: 2px; border-radius: 50%; background: var(--v2-surface); transition: transform var(--v2-motion); }
.v2-direction-power input:checked { background: var(--v2-action); border-color: var(--v2-action); }
.v2-direction-power input:checked::before { transform: translateX(20px); background: var(--v2-on-action); }
.v2-direction-layout { display: grid; gap: var(--v2-space-1); min-width: 0; }
.v2-direction-flow, .v2-direction-flow-headings { display: grid; grid-template-columns: minmax(0, 1.2fr) 48px minmax(0, .8fr); gap: var(--v2-space-2); }
.v2-direction-flow-headings { color: var(--v2-muted); font-size: var(--v2-size-xs); line-height: 1.3; }
.v2-direction-flow-headings > :first-child { padding-inline-start: var(--v2-space-2); }
.v2-direction-flow-headings > :last-child { grid-column: 3; text-align: center; }
.v2-direction-inputs { display: grid; gap: var(--v2-space-2); min-width: 0; }
.v2-direction-input { display: flex; align-items: center; gap: var(--v2-space-2); min-width: 0; min-height: 44px; padding: var(--v2-space-1) var(--v2-space-2); border: 1px solid var(--v2-control-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); cursor: pointer; }
.v2-direction-input:has(:checked) { border-color: var(--v2-accent); background: var(--v2-tint); }
.v2-direction-input:not(:has(:checked)) { color: var(--v2-muted); }
.v2-direction-input:focus-within { outline: 2px solid var(--v2-action); outline-offset: 2px; }
.v2-direction-input input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--v2-action); }
.v2-direction-prompt { display: inline-flex; align-items: center; gap: var(--v2-space-2); font-size: var(--v2-size-lg); line-height: 1.3; }
.v2-direction-prompt[lang=zh] { font-size: var(--v2-size-2xl); }
.v2-direction-prompt .v2-icon, .v2-direction-example .v2-icon { width: 18px; height: 18px; flex: 0 0 18px; color: var(--v2-muted); }
.v2-direction-connector { width: 100%; height: 100%; min-height: 94px; color: var(--v2-muted); }
.v2-direction-group:has([data-direction-input][value=hanzi]:not(:checked)) [data-direction-path=hanzi],
.v2-direction-group:has([data-direction-input][value=pinyin]:not(:checked)) [data-direction-path=pinyin],
.v2-direction-group:has([data-direction-input][value=meaning]:not(:checked)) [data-direction-path=meaning] { opacity: .3; }
.v2-direction-output { display: grid; align-content: center; justify-items: center; min-width: 0; padding: var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); text-align: center; }
.v2-direction-example { display: inline-flex; align-items: center; gap: var(--v2-space-2); font-size: var(--v2-size-xl); line-height: 1.3; }
.v2-direction-example[lang=zh] { font-size: var(--v2-size-3xl); }
.v2-direction-group.is-paused .v2-direction-flow { opacity: .6; }
.v2-direction-overrides { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--v2-space-2); margin-top: var(--v2-space-2); }
/* Skill cards keep each direction choice next to its answer mode. */
.v2-flashcard-options { display: grid; gap: var(--v2-space-3); min-width: 0; }
.v2-flashcard-options > .v2-fc-field-heading { justify-content: space-between; }
.v2-flashcard-options > .v2-fc-field-heading > .v2-caption { font-weight: 600; color: var(--v2-text); }
.v2-flashcard-competency { border: 1px solid var(--v2-border); border-radius: var(--v2-radius); padding: var(--v2-space-4); background: var(--v2-surface); }
.v2-flashcard-competency-body { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--v2-space-4); align-items: start; }
.v2-flashcard-competency-title { display: grid; gap: var(--v2-space-2); font-size: var(--v2-size-md); padding-top: var(--v2-space-1); }
.v2-flashcard-skill-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--v2-control-radius); color: var(--v2-accent); background: var(--v2-tint); font-size: var(--v2-size-lg); font-weight: 600; }
.v2-flashcard-competency-options { display: grid; gap: var(--v2-space-2); min-width: 0; }
.v2-flashcard-competency .v2-direction-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-2); }
.v2-flashcard-competency .v2-direction-choice { font-size: var(--v2-size-sm); padding: var(--v2-space-2); border-radius: var(--v2-control-radius); }
.v2-answer-competency { display: grid; grid-template-columns: 5.75rem minmax(0, 1fr); align-items: center; gap: var(--v2-space-2); min-width: 0; }
.v2-answer-competency-label > span { font-size: var(--v2-size-xs); color: var(--v2-muted); }
.v2-answer-competency .v2-segmented { border-radius: var(--v2-control-radius); }
.v2-answer-competency .v2-segmented span { height: 100%; overflow-wrap: anywhere; border-radius: var(--v2-control-radius); }
.v2-flashcard-general, .v2-flashcard-priority { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--v2-space-4); align-items: center; padding: var(--v2-space-2) var(--v2-space-4); }
.v2-flashcard-general h3, .v2-flashcard-priority h2, .v2-flashcard-priority h4 { margin: 0; font-size: var(--v2-size-md); font-weight: 600; }
.v2-flashcard-general .v2-flashcard-pacing { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--v2-space-3); align-items: end; }
.v2-flashcard-general .v2-field, .v2-flashcard-priority .v2-field { grid-column: auto; gap: var(--v2-space-1); }
.v2-flashcard-general .v2-field > label, .v2-flashcard-general .v2-field label, .v2-flashcard-priority label { font-size: var(--v2-size-xs); }
.v2-flashcard-priority > .v2-grid { grid-template-columns: minmax(0, 1fr); gap: var(--v2-space-3); }
.v2-flashcard-decks { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--v2-space-4); align-items: center; padding: var(--v2-space-2) var(--v2-space-4); }
.v2-flashcard-decks > label { font-size: var(--v2-size-md); }
/* Settings read top-down: what to practise, which cards, session, this device. */
.v2-fc-settings-group { display: grid; gap: var(--v2-space-2); padding-top: var(--v2-space-3); border-top: 1px solid var(--v2-border); }
.v2-fc-settings-group > h3, .v2-fc-settings-form .v2-flashcard-options > .v2-fc-field-heading > .v2-caption { margin: 0; font-size: var(--v2-size-base); font-weight: 600; color: var(--v2-text); }
.v2-flashcard-row-label, .v2-flashcard-priority h4 { margin: 0; font-size: var(--v2-size-md); font-weight: 600; }
.v2-fc-settings-group > .v2-fc-batch-row { padding: var(--v2-space-1) var(--v2-space-4); }
@media (max-width: 699px) { .v2-fc-settings-group > .v2-fc-batch-row { padding: var(--v2-space-1) 0; } }
.v2-direction-presets { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-2); }
.v2-direction-presets .v2-button { min-height: 44px; padding: var(--v2-space-1) var(--v2-space-3); font-size: var(--v2-size-sm); }
.v2-direction-from { font-size: var(--v2-size-xs); color: var(--v2-muted); }
.v2-direction-count { margin-inline-start: auto; padding: .15rem var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); font-size: var(--v2-size-xs); color: var(--v2-muted); white-space: nowrap; }
/* Directions are a compact list of rows; one shared panel previews the chosen row. */
.v2-flashcard-options { container-type: inline-size; }
.v2-direction-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--v2-space-3); align-items: start; }
.v2-direction-groups > .v2-flashcard-competency { padding: 0; border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); box-shadow: var(--v2-card-shadow); overflow: hidden; }
.v2-flashcard-competency > .v2-flashcard-competency-title { display: flex; align-items: center; gap: var(--v2-space-2); padding: var(--v2-space-2) var(--v2-space-3); border-bottom: 1px solid var(--v2-border); background: var(--v2-soft); }
.v2-direction-chip { display: inline-flex; align-items: center; gap: var(--v2-space-2); font-size: var(--v2-size-md); font-weight: 600; }
.v2-direction-chip .v2-flashcard-skill-icon { flex: none; width: 26px; height: 26px; border-radius: var(--v2-control-radius); font-size: var(--v2-size-md); }
.v2-flashcard-competency .v2-direction-choices { grid-template-columns: minmax(0, 1fr); gap: 0; }
.v2-direction-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--v2-space-2); min-width: 0; padding: var(--v2-space-2) var(--v2-space-2) var(--v2-space-2) var(--v2-space-3); transition: background var(--v2-motion); }
.v2-direction-card + .v2-direction-card { border-top: 1px solid var(--v2-border); }
.v2-direction-card::before { content: ""; position: absolute; inset-block: .55rem; inset-inline-start: 0; width: 4px; border-radius: 0 4px 4px 0; background: transparent; transition: background var(--v2-motion); }
.v2-direction-card:has(.v2-direction-choice input:checked)::before { background: transparent; }
.v2-direction-card.is-previewing { background: var(--v2-tint); }
.v2-direction-card :is(.v2-direction-choice, .v2-direction-cue, .v2-direction-chip, .v2-direction-chip > span:last-child) { min-width: 0; white-space: normal; }
.v2-flashcard-competency .v2-direction-card .v2-direction-choice { min-height: 44px; padding: var(--v2-space-1) 0; gap: var(--v2-space-2); border: 0; background: none; font-size: var(--v2-size-md); }
.v2-direction-card .v2-direction-choice input[type=checkbox] { appearance: none; display: grid; place-items: center; flex: none; width: 22px; height: 22px; margin: 0; border: 2px solid var(--v2-control-border); border-radius: var(--v2-control-radius); background: var(--v2-surface); cursor: pointer; transition: background var(--v2-motion), border-color var(--v2-motion); }
.v2-direction-card .v2-direction-choice input[type=checkbox]:checked { border-color: var(--v2-action); background: var(--v2-action); }
.v2-direction-card .v2-direction-choice input[type=checkbox]:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--v2-on-action); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.v2-direction-card .v2-direction-choice input[type=checkbox]:focus-visible { outline: 3px solid var(--v2-accent); outline-offset: 2px; }
.v2-direction-card .v2-answer-competency { display: block; }
.v2-direction-card .v2-segmented { padding: 3px; border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-direction-card .v2-segmented span { min-width: 44px; min-height: 38px; padding: var(--v2-space-1); border-radius: var(--v2-control-radius); color: var(--v2-muted); transition: background var(--v2-motion), color var(--v2-motion); }
.v2-direction-card .v2-segmented input:checked + span { background: var(--v2-action); color: var(--v2-on-action); box-shadow: 0 1px 3px #0000004d; }
.v2-direction-row:not(:has(.v2-direction-choice input:checked)) .v2-answer-competency { opacity: .45; }
.v2-direction-row:not(:has(.v2-direction-choice input:checked)) .v2-direction-chip { font-weight: 500; color: var(--v2-muted); }
.v2-direction-row:not(:has(.v2-direction-choice input:checked)) .v2-flashcard-skill-icon { color: var(--v2-muted); background: var(--v2-soft); }
.v2 .v2-direction-try { display: inline-flex; align-items: center; gap: var(--v2-space-1); min-height: 44px; padding: var(--v2-space-1) var(--v2-space-3); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-surface); color: var(--v2-accent); font-size: var(--v2-size-sm); font-weight: 600; cursor: pointer; transition: background var(--v2-motion), color var(--v2-motion), border-color var(--v2-motion); }
.v2 .v2-direction-try:hover { border-color: var(--v2-accent); }
.v2 .v2-direction-try[aria-pressed=true] { border-color: var(--v2-accent); background: var(--v2-accent); color: var(--v2-on-accent); }
.v2-direction-try .v2-icon { width: 16px; height: 16px; }
/* The shared preview: a raised sample card for whichever row was chosen. */
.v2-direction-panel { display: grid; gap: var(--v2-space-2); min-width: 0; padding: var(--v2-space-3); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-soft); box-shadow: var(--v2-card-shadow); }
.v2-direction-panel[data-open=false] { display: none; }
.v2-direction-panel-head { display: flex; align-items: center; gap: var(--v2-space-2); min-height: 32px; }
.v2-direction-panel-label { padding: .15rem var(--v2-space-2); border-radius: var(--v2-control-radius); background: var(--v2-tint); font-size: var(--v2-size-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.v2-direction-panel-title { margin-inline-end: auto; font-size: var(--v2-size-base); }
.v2 .v2-direction-panel-close { display: grid; place-items: center; width: 44px; height: 44px; margin: -.5rem -.5rem -.5rem 0; border: 0; border-radius: var(--v2-control-radius); background: none; color: var(--v2-muted); cursor: pointer; }
.v2 .v2-direction-panel-close:hover { background: var(--v2-tint); color: var(--v2-text); }
.v2-direction-preview { display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--v2-space-2); min-height: 17rem; padding: var(--v2-space-3); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); box-shadow: var(--v2-card-shadow); }
.v2-direction-preview[hidden] { display: none; }
.v2-direction-preview-prompt { display: grid; justify-items: center; align-content: center; gap: var(--v2-space-1); min-height: 5rem; text-align: center; }
.v2-direction-preview-prompt small, .v2-direction-preview-answer small { font-size: var(--v2-size-sm); color: var(--v2-muted); text-align: center; }
.v2-direction-preview-word { font-size: var(--v2-size-2xl); font-weight: 600; }
.v2-direction-preview-word--hanzi { font-size: 2.2rem; }
.v2-direction-preview-play { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--v2-border); border-radius: 50%; background: var(--v2-soft); color: var(--v2-accent); }
.v2-direction-preview-answer { display: none; align-content: end; gap: var(--v2-space-2); }
/* The sample is a working toy: real controls, brief feedback, nothing saved. */
.v2 .v2-direction-preview-option, .v2 .v2-direction-preview-input { min-width: 0; min-height: 46px; padding: var(--v2-space-1) var(--v2-space-2); border: 1px solid var(--v2-control-border); border-radius: var(--v2-radius); background: var(--v2-surface); color: var(--v2-text); font-size: var(--v2-size-md); text-align: center; overflow-wrap: anywhere; }
.v2 .v2-direction-preview-option { cursor: pointer; transition: border-color var(--v2-motion), background var(--v2-motion); }
.v2 .v2-direction-preview-option:hover { border-color: var(--v2-accent); background: var(--v2-soft); }
.v2 .v2-direction-preview-input { width: 100%; text-align: start; }
.v2-direction-preview-typed { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--v2-space-2); }
.v2-direction-preview-solution { font-size: var(--v2-size-xl); text-align: center; }
.v2-direction-preview-rate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--v2-space-2); }
.v2 .v2-direction-preview .is-correct { border-color: var(--v2-success); background: var(--v2-success-bg); color: var(--v2-success); }
.v2 .v2-direction-preview .is-wrong { border-color: var(--v2-error); background: var(--v2-error-bg); color: var(--v2-error); }
.v2-direction-preview-status { min-height: 1.25rem; margin: 0; font-size: var(--v2-size-sm); line-height: 1.5; text-align: center; color: var(--v2-muted); }
.v2-direction-preview [hidden] { display: none; }
.v2-direction-preview[data-mode=quiz] [data-preview=quiz],
.v2-direction-preview[data-mode=recall] [data-preview=recall],
.v2-direction-preview[data-mode=typed] [data-preview=typed] { display: grid; }
.v2-direction-mode { display: flex; align-items: center; gap: var(--v2-space-2); margin: 0; font-size: var(--v2-size-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--v2-muted); }
.v2-direction-mode > span { display: none; }
.v2-direction-mode > .v2-direction-mode-label { display: inline; }
.v2-direction-mode-label::after { content: "·"; margin-inline-start: var(--v2-space-2); }
.v2-direction-preview[data-mode=quiz] [data-mode-name=quiz],
.v2-direction-preview[data-mode=recall] [data-mode-name=recall],
.v2-direction-preview[data-mode=typed] [data-mode-name=typed] { display: inline; }
.v2-flashcard-off { display: none; width: fit-content; padding: .1rem var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); font-size: var(--v2-size-xs); font-weight: 500; color: var(--v2-muted); }
.v2-flashcard-competency:not(:has(.v2-direction-choice input:checked)) .v2-flashcard-off { display: inline-block; }
/* With room, the preview stays beside the list instead of opening below a group. */
@container (min-width: 46rem) {
  .v2-direction-groups { grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 1fr); column-gap: var(--v2-space-4); }
  .v2-direction-groups > .v2-flashcard-competency { grid-column: 1; }
  .v2-direction-panel, .v2-direction-panel[data-open=false] { display: grid; grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 1rem; }
  .v2 .v2-direction-panel-close { display: none; }
}
@container (max-width: 26rem) {
  .v2-direction-card { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-direction-card .v2-answer-competency { grid-column: 1; grid-row: 2; justify-self: start; }
  .v2-direction-card .v2-direction-try { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 699px) {
  .v2-flashcard-competency { padding: var(--v2-space-3); }
  .v2-flashcard-competency-body { grid-template-columns: minmax(0, 1fr); gap: var(--v2-space-2); }
  .v2-flashcard-competency-title { display: flex; align-items: center; padding: 0; }
  .v2-flashcard-competency .v2-direction-choices { grid-template-columns: minmax(0, 1fr); }
  .v2-answer-competency { grid-template-columns: minmax(0, 1fr); gap: var(--v2-space-1); }
  .v2-flashcard-general, .v2-flashcard-priority, .v2-flashcard-decks { grid-template-columns: minmax(0, 1fr); padding: var(--v2-space-1) 0; gap: var(--v2-space-2); }
}
.v2-fc-settings-form { gap: var(--v2-space-3); padding: var(--v2-space-4); }
.v2-fc-batch-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--v2-space-2) var(--v2-space-4); }
.v2-fc-batch-field { flex: 0 0 8rem; gap: var(--v2-space-1); }
.v2-fc-batch-row > .v2-caption { flex: 1 1 12rem; max-width: 26rem; }
.v2-fc-restart { min-height: 44px; cursor: pointer; font-size: var(--v2-size-md); }
.v2-fc-start { min-height: 56px; font-size: var(--v2-size-base); font-weight: 600; }
.v2-fc-start[aria-disabled="true"] { opacity: .65; cursor: not-allowed; }
.v2-fc-batch-options > summary { min-height: 44px; }
@media (min-width: 1100px) {
  .v2-direction-group + .v2-direction-group { border-top: 0; border-inline-start: 1px solid var(--v2-border); }
  .v2-direction-flow, .v2-direction-flow-headings { grid-template-columns: minmax(0, 1.2fr) 30px minmax(0, .8fr); gap: var(--v2-space-2); }
}
@media (max-width: 699px) {
  .v2-direction-group { padding-inline: var(--v2-space-3); }
  .v2-direction-flow, .v2-direction-flow-headings { grid-template-columns: minmax(0, 1.2fr) 30px minmax(0, .8fr); gap: var(--v2-space-2); }
  .v2-direction-input { padding: var(--v2-space-2) var(--v2-space-2); gap: var(--v2-space-2); }
  .v2-direction-flow-headings > :first-child { padding-inline-start: var(--v2-space-2); }
  .v2-direction-output { padding-inline: var(--v2-space-1); }
  .v2-direction-overrides { grid-template-columns: minmax(0, 1fr); }
  .v2-answer-competency { grid-template-columns: minmax(0, 1fr); gap: var(--v2-space-1); }
}
.v2-direction-gain { margin: var(--v2-space-1) 0; min-height: 1.25rem; }
.v2-word-direction-group { border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); padding: var(--v2-space-2); min-width: 0; }
.v2-word-direction-group > summary { min-height: 44px; cursor: pointer; }
.v2-word-direction-group > summary > strong { float: right; font-variant-numeric: tabular-nums; }
.v2-word-direction-group .v2-attribute { margin-top: var(--v2-space-2); }
.v2-word-direction-group .v2-attribute h3 { font-size: var(--v2-size-md); }
.v2-competency-settings .v2-competency-choice { padding: var(--v2-space-1) 0; }
@media (max-width: 420px) { .v2-competency-settings { grid-template-columns: 1fr; } }

/* Dense competency progress: one row per word or skill. */
.v2-metrics-scroll { overflow-x: auto; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); margin: var(--v2-space-3) 0; background: var(--v2-surface); }
.v2-metrics-table { width: 100%; border-collapse: collapse; font-size: var(--v2-size-sm); }
.v2-metrics-table th, .v2-metrics-table td { padding: var(--v2-space-2) var(--v2-space-2); border-bottom: 1px solid var(--v2-border); text-align: left; vertical-align: middle; }
.v2-metrics-table thead th { white-space: nowrap; font-size: var(--v2-size-xs); }
.v2-metrics-table td[data-competency] { min-width: 125px; }
.v2-metrics-table small { display: block; color: var(--v2-muted); font-size: var(--v2-size-xs); font-weight: normal; margin-top: var(--v2-space-1); }
.v2-metrics-word-cell { min-width: 190px; max-width: 280px; font-weight: normal; }
.v2-word-link { font-size: var(--v2-size-2xl); font-weight: 600; text-decoration: none !important; }
.v2-word-link:hover { color: var(--v2-text); }
.v2-word-meaning { display: block; line-height: 1.3; }
.v2-metric-value { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.v2-metric-score { display: inline-flex; align-items: center; gap: var(--v2-space-1); }
.v2-metric-readiness { position: relative; display: inline-flex; }
.v2-metric-ready { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; min-height: 24px; color: var(--v2-muted); border-radius: var(--v2-control-radius); }
.v2-metric-ready .v2-icon { width: .85rem; height: .85rem; }
.v2-metric-ready:focus-visible { outline: 2px solid var(--v2-accent); outline-offset: 2px; }
.v2-metric-ready-tooltip { position: absolute; top: calc(100% + .2rem); left: 0; z-index: 2; padding: var(--v2-space-1) var(--v2-space-2); background: var(--v2-text); color: var(--v2-surface); border-radius: var(--v2-control-radius); font-size: var(--v2-size-xs); white-space: nowrap; visibility: hidden; pointer-events: none; }
.v2-metric-ready:is(:hover, :focus-visible) + .v2-metric-ready-tooltip { visibility: visible; }
.v2-metric-toggle { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--v2-control-radius); background: transparent; color: var(--v2-accent); cursor: pointer; }
.v2-metric-toggle:hover, .v2-metric-toggle[aria-pressed="true"] { background: var(--v2-soft); }
.v2-metric-toggle .v2-icon { width: 16px; height: 16px; }
.v2-metrics-table .v2-button { font-size: var(--v2-size-xs); padding: var(--v2-space-2) var(--v2-space-2); min-height: 36px; white-space: nowrap; }
.v2-word-sheet-heading { margin-bottom: var(--v2-space-2); }
.v2-attributes { display: block; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); overflow: hidden; }
.v2-attribute { display: grid; grid-template-columns: 145px minmax(0, 1fr) auto; align-items: center; gap: var(--v2-space-3); border: 0; border-bottom: 1px solid var(--v2-border); border-radius: 0; padding: var(--v2-space-2) var(--v2-space-3); }
.v2-attribute:last-child { border-bottom: 0; }
.v2-attribute h2 { font-size: var(--v2-size-md); }
.v2-attribute-progress { min-width: 0; }
.v2-attribute-progress .v2-cluster { gap: var(--v2-space-1); }
.v2-attribute-progress .v2-caption { font-size: var(--v2-size-xs); }
.v2-attribute .v2-button { min-height: 36px; }
.v2-practice-ratings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.v2-practice-ratings .v2-button { padding-inline: var(--v2-space-2); }
.v2-practice-previous__result form { margin-left: auto; }
.v2-practice-previous__result .v2-button { min-height: 34px; padding: var(--v2-space-1) var(--v2-space-2); font-size: var(--v2-size-xs); }
.v2-previous-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: var(--v2-space-2); margin-top: var(--v2-space-2); }
.v2-previous-skills span { display: flex; justify-content: space-between; gap: var(--v2-space-1); font-size: var(--v2-size-xs); color: var(--v2-muted); }
.v2-previous-skills .is-tested span { color: var(--v2-text); font-weight: 600; }
.v2-session-skills { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.v2-fc-flow .v2-session-skills { grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); }
.v2-competency-preferences { width: 100%; border-collapse: collapse; }
.v2-competency-preferences th, .v2-competency-preferences td { padding: var(--v2-space-2) var(--v2-space-2); border-bottom: 1px solid var(--v2-border); }
.v2-competency-preferences th { text-align: left; font-size: var(--v2-size-md); }
.v2-competency-preferences td { text-align: center; width: 70px; }
.v2-competency-preferences small { display: block; font-weight: normal; font-size: var(--v2-size-xs); color: var(--v2-muted); margin-top: .15rem; }
.v2-competency-power { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); color: var(--v2-muted); cursor: pointer; }
.v2-competency-power:has(:checked) { color: var(--v2-accent); border-color: var(--v2-accent); background: var(--v2-tint); }
.v2-competency-power:has(:focus-visible) { outline: 3px solid var(--v2-accent); outline-offset: 3px; }
.v2-competency-preferences tr:has([data-competency-option="visible"]:not(:checked)) { background: var(--v2-soft); }
.v2-competency-preferences tr:has([data-competency-option="visible"]:not(:checked)) > th,
.v2-competency-preferences tr:has([data-competency-option="visible"]:not(:checked)) > td:first-of-type { color: var(--v2-muted); opacity: .55; }
@media (max-width: 600px) {
  .v2-attribute { grid-template-columns: minmax(0, 1fr) auto; gap: var(--v2-space-2) var(--v2-space-2); padding: var(--v2-space-2); }
  .v2-attribute h2 { grid-column: 1; }
  .v2-attribute-progress { grid-row: 2; grid-column: 1; }
  .v2-attribute form { grid-column: 2; grid-row: 1 / 3; }
  .v2-metrics-table td[data-competency] { min-width: 115px; }
  .v2-metrics-word-cell { min-width: 140px; }
  .v2-metric-toggle { width: 40px; height: 40px; }
}
.v2-metrics { gap: var(--v2-space-3); }
.v2-metrics-explainer { padding: var(--v2-space-2) 0; }
.v2-metrics-table { line-height: 1.35; }
.v2-metrics-table th, .v2-metrics-table td { padding-block: var(--v2-space-2); }
.v2-previous-skills { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.v2-practice-previous__result { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--v2-space-1) var(--v2-space-2); }
.v2-practice-previous__result .v2-caption { line-height: 1.35; }
.v2-practice-previous__result form { margin: 0; }
@media (max-width: 539px) {
  .v2-fc-flow .v2-practice-word { min-height: 120px; padding: var(--v2-space-1); }
  .v2-fc-flow .v2-practice-caption { min-height: 24px; line-height: 1.4; }
  .v2-fc-flow .v2-practice-result { min-height: 26px; }
  .v2-practice-previous { padding: var(--v2-space-2); }
  .v2-previous-skills { gap: var(--v2-space-2) var(--v2-space-2); margin-top: var(--v2-space-1); }
  .v2-previous-skills span { display: block; }
  .v2-previous-skills strong { margin-left: .15rem; }
  .v2-practice-previous__result > strong { font-size: var(--v2-size-sm); }
}
.v2-word-sheet-heading { display: flex; align-items: center; justify-content: center; gap: var(--v2-space-4); }
.v2-attribute-progress .v2-fc-meter, .v2-previous-skills .v2-fc-meter { display: block; margin-top: var(--v2-space-1); }
.v2-metrics-table .v2-metrics-word-cell { position: sticky; left: 0; z-index: 1; background: var(--v2-surface); }

/* Launch selection and previous-answer controls. */
.v2-launch-modes { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--v2-space-2); }
.v2-launch-modes legend { margin-bottom: var(--v2-space-2); font-weight: 600; }
.v2-launch-modes label { display: flex; align-items: center; gap: var(--v2-space-2); padding: var(--v2-space-2) var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); cursor: pointer; font-size: var(--v2-size-md); }
.v2-launch-modes label:has(:checked) { background: var(--v2-tint); border-color: var(--v2-accent); }
.v2-launch-modes input { accent-color: var(--v2-action); width: 18px; height: 18px; }
.v2-launch-modes .v2-icon { width: 17px; height: 17px; }
.v2 .v2-launch-mode-hidden { display: flex; align-items: center; gap: var(--v2-space-2); padding: var(--v2-space-2) var(--v2-space-2); border: 1px dashed var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); color: var(--v2-muted); font-size: var(--v2-size-md); text-decoration: none; }
.v2 .v2-launch-mode-hidden:hover { border-color: var(--v2-accent); color: var(--v2-accent); }
#competencies { scroll-margin-top: calc(var(--v2-header) + 1rem); }
.v2-previous-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--v2-space-3); }
.v2-previous-word { min-width: 0; }
.v2-previous-word > div { display: grid; justify-items: center; gap: var(--v2-space-1); text-align: center; min-width: 0; overflow-wrap: anywhere; }
.v2-previous-reading { display: grid; text-align: center; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.v2-previous-reading .v2-pinyin { font-size: var(--v2-size-sm); }
.v2-previous-pinyin { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--v2-space-1); }
.v2-previous-pinyin [data-previous-recording] { display: inline-flex; max-width: 100%; }
.v2-previous-pinyin .v2-audio-player { position: relative; inline-size: fit-content; }
.v2-previous-reading strong { font-size: var(--v2-size-3xl); line-height: 1.3; }
.v2-previous-meaning { font-size: var(--v2-size-md); line-height: 1.35; }
.v2-previous-outcome { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 0 var(--v2-space-1); text-align: right; font-size: var(--v2-size-md); }
.v2-previous-outcome small { grid-column: 1 / -1; font-size: var(--v2-size-xs); color: var(--v2-muted); max-width: 150px; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous { border-width: 2px; }
.v2-practice-previous:has(.v2-previous-outcome--correct) { border-color: var(--v2-success); }
.v2-practice-previous:has(.v2-previous-outcome--incorrect) { border-color: var(--v2-error); }
.v2-previous-outcome--correct > :is(span, strong) { color: var(--v2-success); }
.v2-previous-outcome--incorrect > :is(span, strong) { color: var(--v2-error); }
.v2-previous-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-2); }
.v2-previous-answer { display: grid; gap: var(--v2-space-1); align-content: start; min-width: 0; min-height: 3.5rem; padding: var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); overflow-wrap: anywhere; }
.v2-previous-answer:only-child { grid-column: 1 / -1; }
.v2-previous-answer small { color: var(--v2-muted); font-size: var(--v2-size-xs); }
.v2-previous-answer--correct { border-color: var(--v2-success); }
.v2-previous-answer--correct strong { color: var(--v2-success); }
.v2-previous-answer--incorrect strong { color: var(--v2-error); }
/* The current card tests the previous word again. */
[data-previous-masked] :is(.v2-previous-word > div, .v2-previous-answers, [data-previous-answer]) { display: none; }
.v2-score-change { font-weight: 600; }
.v2-feedback-skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--v2-space-2); margin-top: var(--v2-space-2); }
.v2-feedback-skill { min-width: 0; }
.v2-direction-meter { --v2-direction-label-width: 3.8em; position: relative; min-width: 0; margin: var(--v2-space-1) 0; font-size: var(--v2-size-xs); line-height: 1.2; }
.v2-direction-track { display: grid; grid-template-columns: var(--v2-direction-label-width) minmax(0, 1fr); align-items: center; gap: var(--v2-space-1); min-height: 13px; }
.v2-direction-track > span { color: var(--v2-muted); }
.v2-direction-track.is-tested > span { color: var(--v2-text); font-weight: 700; }
.v2-direction-track progress { appearance: none; display: block; width: 100%; height: 5px; border: 0; border-radius: 2px; overflow: hidden; background: var(--v2-soft); }
.v2-direction-track progress::-webkit-progress-bar { background: var(--v2-soft); border-radius: 2px; }
.v2-direction-track progress::-webkit-progress-value { background: var(--v2-muted); border-radius: 2px; }
.v2-direction-track progress::-moz-progress-bar { background: var(--v2-muted); border-radius: 2px; }
.v2-direction-average-lane { position: absolute; inset: 0 0 0 calc(var(--v2-direction-label-width) + .3rem); pointer-events: none; }
.v2-direction-average { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--v2-text); box-shadow: 0 0 0 1px var(--v2-surface); transform: translateX(-50%); }
.v2-feedback-skill > div:first-child { display: flex; gap: var(--v2-space-1); align-items: baseline; font-size: var(--v2-size-xs); }
.v2-feedback-skill strong { margin-left: auto; }
.v2-feedback-skill .v2-score-change { white-space: nowrap; font-size: var(--v2-size-xs); }
.v2-feedback-skill.is-tested > div:first-child { font-weight: 600; }
.v2-feedback-before { color: var(--v2-muted); font-size: var(--v2-size-xs); }
.v2-change-meter { position: relative; height: 8px; border-radius: 3px; background: var(--v2-soft); margin: var(--v2-space-1) 0; overflow: hidden; }
.v2-change-meter i { position: absolute; top: 0; height: 100%; }
.v2-change-base { left: 0; background: var(--v2-accent); opacity: .55; }
.v2-change-gain { background: #16a34a; }
.v2-change-loss { background: #dc2626; }
.v2-change-meter .v2-change-before { width: 2px; background: var(--v2-text); transform: translateX(-1px); }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-feedback-skills { grid-template-columns: minmax(0, 1fr); gap: var(--v2-space-1); }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-feedback-skill > div:first-child { flex-wrap: nowrap; min-height: 1.2rem; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-previous-actions .v2-button { min-height: 44px; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-feedback-skill .v2-score-change { flex-basis: auto; min-width: 3.5rem; text-align: right; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-feedback-before { display: block; min-height: 1rem; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-change-meter { height: 10px; border: 1px solid var(--v2-muted); background: var(--v2-bg); }
@media (max-width: 539px) {
  .v2-feedback-skills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-2); }
  .v2-feedback-skill > div:first-child { flex-wrap: wrap; }
  .v2-feedback-skill .v2-score-change { flex-basis: 100%; }
}
.v2-previous-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--v2-space-2); }
.v2-previous-actions .v2-cluster, .v2-previous-word-actions { display: flex; gap: var(--v2-space-1); }
.v2-previous-word-actions { margin-left: auto; }
.v2-previous-actions .v2-button { min-height: 36px; padding: var(--v2-space-1) var(--v2-space-2); font-size: var(--v2-size-xs); }
.v2-previous-actions .v2-button[role="radio"][aria-checked="true"] { background: var(--v2-action); border-color: var(--v2-action); color: var(--v2-on-action); }
.v2-metrics-pinyin { display: block; color: var(--v2-muted); font-size: var(--v2-size-xs); }
.v2 .v2-word-link { color: var(--v2-text); display: inline-block; }
.v2 .v2-word-link:hover { color: var(--v2-accent); }
/* A bounded scroll region keeps the same column headings visible on both axes. */
.v2-metrics-scroll { max-height: calc(100dvh - var(--v2-header) - 2rem); overflow: auto; }
.v2--native .v2-metrics-scroll { max-height: calc(100dvh - 150px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.v2-metrics-table thead th { position: sticky; top: 0; z-index: 2; background: var(--v2-surface); box-shadow: 0 1px var(--v2-border); }
.v2-metrics-table thead th:first-child { left: 0; z-index: 3; }
@media (max-width: 600px) {
  .v2-metrics-word-cell { min-width: 112px; max-width: 145px; }
  .v2-previous-heading { gap: var(--v2-space-2); }
  .v2-previous-outcome small { max-width: 115px; }
}

/* Keep recorded speaking controls steady while permission and grading resolve. */
.v2-speech-practice { display: grid; gap: var(--v2-space-2); }
.v2-speech-practice p { margin: 0; }
.v2-speech-status { min-height: 2.8em; }

/* Level overview charts share the word table's theme and Turbo updates. */
.v2-metrics-overview { border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); padding: var(--v2-space-4); margin-block: var(--v2-space-3) var(--v2-space-4); background: var(--v2-surface); }
.v2-metrics-overview > summary { cursor: pointer; font-weight: 600; }
.v2-metrics-overview > p { margin-block: var(--v2-space-2); }
.v2-overview-totals { display: flex; flex-wrap: wrap; gap: var(--v2-space-2) var(--v2-space-5); font-size: var(--v2-size-md); }
.v2-overview-totals strong { font-size: var(--v2-size-2xl); margin-right: var(--v2-space-1); }
.v2-overview-chart { margin-block: var(--v2-space-4); }
.v2-overview-chart .v2-h3 { font-size: var(--v2-size-base); margin-bottom: var(--v2-space-2); }
.v2-chart-legend { display: flex; flex-wrap: wrap; gap: var(--v2-space-3); margin-bottom: var(--v2-space-3); }
.v2-chart-legend span::before { content: ""; display: inline-block; width: .65rem; height: .65rem; margin-right: var(--v2-space-1); background: var(--chart-color); border-radius: 2px; }
.v2-metrics-overview .is-complete { --chart-color: var(--v2-success, #43874e); }
.v2-metrics-overview .is-learning { --chart-color: var(--v2-accent); }
.v2-metrics-overview .is-unstarted { --chart-color: var(--v2-border); }
.v2-level-coverage { display: grid; grid-template-columns: 110px minmax(0, 1fr) 45px; gap: var(--v2-space-3); align-items: center; margin-block: var(--v2-space-3); }
.v2-level-name { font-size: var(--v2-size-md); }
.v2-level-name small, .v2-level-count small { display: block; color: var(--v2-muted); font-size: var(--v2-size-xs); font-weight: 400; }
.v2-level-count { text-align: right; }
.v2-word-chart { display: flex; height: 17px; border-radius: 3px; overflow: hidden; }
.v2-word-chart span { background: var(--chart-color); }
.v2-level-coverage small { font-size: var(--v2-size-xs); }
.v2-level-competencies { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: var(--v2-space-3); padding-block: var(--v2-space-3); border-bottom: 1px solid var(--v2-border); }
.v2-level-skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: var(--v2-space-3); }
.v2-level-skill { min-width: 0; font-size: var(--v2-size-xs); }
.v2-level-skill > small { display: block; color: var(--v2-muted); font-size: var(--v2-size-xs); }
.v2-average-bar { display: flex; align-items: center; gap: var(--v2-space-2); margin-block: var(--v2-space-1); }
.v2-average-bar progress { width: 100%; min-width: 0; flex: 1; }
.v2-average-bar strong { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .v2-metrics-overview { padding: var(--v2-space-3); }
  .v2-level-coverage { grid-template-columns: 65px minmax(0, 1fr) 30px; gap: var(--v2-space-2); }
  .v2-level-competencies { grid-template-columns: 1fr; gap: var(--v2-space-2); }
  .v2-level-skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.v2-overview-notes { margin-top: var(--v2-space-2); }
.v2-overview-notes summary { cursor: pointer; }
@media (max-width: 600px) {
  .v2-overview-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--v2-space-2); }
  .v2-overview-totals strong { display: block; }
}

/* Flashcard pages share one width; the tab's content no longer chooses it. */
.v2-flashcards-workspace .v2-fc-section { width: 100%; max-width: calc(var(--v2-container) + 2 * var(--v2-gutter)); padding-block: var(--v2-page-padding); }
.v2--app .v2-flashcards-workspace .v2-fc-section { max-width: 1160px; }
.v2-flashcards-workspace .v2-fc-section.v2-practice-section { padding-block: var(--v2-space-3); }
.v2 .v2-flashcards-title { font-size: var(--v2-size-3xl); line-height: 1.25; margin: 0; }
.v2-flashcards-workspace .v2-flashcards-subtitle { font-size: var(--v2-size-2xl); line-height: 1.3; margin: 0; }
.v2-flashcards-workspace .v2-fc-tabs { margin-top: var(--v2-space-2); }
.v2-previous-actions .v2-button[aria-pressed="true"] { background: var(--v2-action); border-color: var(--v2-action); color: var(--v2-on-action); }
.v2-nudge-selected { align-self: center; }
.v2-previous-actions .v2-cluster { flex-wrap: wrap; }
.v2-practice-word__part { border: 1px solid transparent; border-radius: var(--v2-control-radius); padding: .12rem var(--v2-space-2); }
.v2-metrics-filters { grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto; }
.v2-help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-4); }
.v2-help-section { border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); padding: var(--v2-space-4); background: var(--v2-surface); scroll-margin-top: calc(var(--v2-header) + 1rem); }
.v2-help-section h3 { font-size: var(--v2-size-lg); }
.v2-help-section p, .v2-help-section ul, .v2-help-definitions { margin-block: var(--v2-space-3); font-size: var(--v2-size-md); line-height: 1.6; }
.v2-help-section ul { padding-left: var(--v2-space-4); }
.v2-help-section li + li { margin-top: var(--v2-space-2); }
.v2-help-definitions dt { font-weight: 600; }
.v2-help-definitions dd { margin: 0 0 var(--v2-space-2); }
@media (max-width: 900px) { .v2-metrics-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .v2-help-grid { grid-template-columns: 1fr; } }

html:has(.v2-flashcards-workspace) { scrollbar-gutter: stable; }

/* Beta landing: available features and future migrations. */
.v2-beta-landing { display: grid; gap: var(--v2-space-6); padding-block: var(--v2-space-6); }
.v2-beta-intro { display: grid; gap: var(--v2-space-3); }
.v2 .v2-beta-intro h1 { font-size: clamp(2rem, 3.6vw, 3.4rem); }
.v2-beta-intro .v2-lead { max-width: 70ch; font-size: var(--v2-size-base); line-height: 1.6; }
.v2 .v2-beta-section-title { font-size: var(--v2-size-lg); letter-spacing: -.015em; margin-bottom: var(--v2-space-3); }
.v2-beta-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-4); }
.v2-beta-feature { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--v2-space-4); grid-column: 1 / -1; padding: var(--v2-space-5); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); }
.v2-beta-feature--course { border-color: var(--v2-accent); border-left-width: 4px; }
.v2-beta-check { display: grid; place-items: center; align-self: start; width: 28px; height: 28px; border-radius: 50%; color: var(--v2-success); background: var(--v2-success-bg); }
.v2-beta-feature-copy { display: grid; gap: var(--v2-space-2); }
.v2 .v2-beta-feature h3 { font-size: var(--v2-size-2xl); }
.v2 .v2-beta-feature--course h3 { font-size: var(--v2-size-3xl); }
.v2-beta-feature p { font-size: var(--v2-size-md); line-height: 1.6; max-width: 75ch; }
.v2 .v2-beta-free { margin-top: var(--v2-space-1); color: var(--v2-accent); }
.v2-beta-feature--support { grid-column: span 1; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.v2-beta-feature-copy .v2-button { justify-self: start; margin-top: var(--v2-space-1); }
.v2-beta-coming { display: grid; gap: var(--v2-space-4); border-top: 1px solid var(--v2-border); padding-top: var(--v2-space-5); font-size: var(--v2-size-md); }
.v2-beta-pending { display: flex; flex-wrap: wrap; gap: var(--v2-space-3) var(--v2-space-6); list-style: none; padding: 0; margin: 0; color: var(--v2-muted); }
.v2-beta-pending li { display: flex; align-items: center; gap: var(--v2-space-2); }
.v2-beta-pending-mark { width: 14px; height: 14px; border: 1px solid var(--v2-muted); border-radius: 3px; flex-shrink: 0; }
.v2-beta-ai { color: var(--v2-muted); }
.v2-beta-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--v2-space-3) var(--v2-space-5); font-size: var(--v2-size-md); }
@media (max-width: 700px) {
  .v2-beta-landing { padding-block: var(--v2-space-5); gap: var(--v2-space-5); }
  .v2-beta-checklist { grid-template-columns: 1fr; }
  .v2-beta-feature { grid-template-columns: auto minmax(0, 1fr); padding: var(--v2-space-4); gap: var(--v2-space-3); }
  .v2-beta-feature > .v2-button { grid-column: 2; justify-self: start; }
  .v2-beta-pending { display: grid; gap: var(--v2-space-2); }
}
@media (max-width: 600px) {
  .v2-flashcards-workspace .v2-fc-tabs { gap: 0; flex-wrap: nowrap; }
  .v2-flashcards-workspace .v2-fc-tabs a { flex: 1; padding: var(--v2-space-3) var(--v2-space-1); text-align: center; font-size: var(--v2-size-sm); }
}

/* Android beta page composition; shared container and activity widths stay shared. */
.v2:has(.v2-android-beta) .v2-header__inner { flex-wrap: wrap; }
.v2:has(.v2-android-beta) .v2-header__actions { flex-wrap: wrap; flex-shrink: 1; min-width: 0; }
.v2-android-beta__screenshots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--v2-gap); max-width: 60rem; }
.v2-android-beta__screenshot { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: var(--v2-space-3); margin: 0; min-width: 0; }
.v2-android-beta__screenshot figcaption { align-self: end; text-align: center; overflow-wrap: anywhere; }
.v2-android-beta__screenshot a { display: block; width: fit-content; max-width: 100%; margin-inline: auto; border-radius: var(--v2-radius); }
.v2-android-beta__screenshot img { display: block; width: 100%; max-width: 160px; height: auto; border: 1px solid var(--v2-border); border-radius: var(--v2-radius); }
.v2-android-beta__appearance[hidden] { display: none; }
.v2-android-beta__appearance [aria-pressed="true"] { background: var(--v2-surface-raised, var(--v2-surface)); color: var(--v2-text); border-color: currentColor; }
.v2-screenshot-viewer { width: min(40rem, calc(100vw - 2rem)); max-width: none; margin: auto; padding: var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); }
.v2-screenshot-viewer__image { display: block; width: auto; max-width: 100%; height: auto; max-height: 65dvh; object-fit: contain; margin-inline: auto; }
.v2-screenshot-viewer__controls { gap: var(--v2-space-2); }
@media (max-width: 600px) {
  .v2-android-beta__screenshots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.v2-save-state { position: fixed; right: var(--v2-space-4); bottom: calc(max(env(safe-area-inset-bottom, 0px), var(--v2-save-navigation-height, 0px)) + var(--v2-space-4)); z-index: 19; max-width: min(28rem, calc(100vw - 2 * var(--v2-space-4))); max-height: calc(100dvh - var(--v2-save-navigation-height, 0px) - 2 * var(--v2-space-4)); overflow: auto; padding: var(--v2-space-2) var(--v2-space-3); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); box-shadow: var(--v2-shadow); }
.v2-save-state[hidden] { display: none; }
.v2-save-state__details { display: grid; gap: var(--v2-space-2); overflow-wrap: anywhere; }
.v2-save-state__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-2); }
.v2-save-state .v2-button { min-width: 44px; min-height: 44px; }

/* Web Practice links remain visible, including in the collapsed icon rail. */
.v2-navigation-group--static { margin-block: 4px; }
.v2-navigation-group--static.v2-navigation-group--practice { padding-block: 6px; border-block: 1px solid var(--v2-border); }
.v2-navigation-group__heading { padding: var(--v2-space-2) var(--v2-space-2) var(--v2-space-1); color: var(--v2-muted); font-size: var(--v2-size-xs); font-weight: 600; }
.v2--web .v2-menu__panel [data-v2-course-navigation] > span { font-weight: 600; }
.v2-menu__panel .v2-navigation-group--static .v2-navigation-group__links { margin: 0; padding: 0; border: 0; }

/* One selected-section treatment for the web top bar and site menu. */
.v2--web :is(.v2-desktop-nav, .v2-site-menu) .v2-nav-link[aria-current="page"] { background: var(--v2-brand); color: var(--v2-on-brand); border-color: var(--v2-brand); }
.v2--web :is(.v2-desktop-nav, .v2-site-menu) .v2-nav-link[aria-current="page"] > .v2-icon { color: inherit; }
.v2--web :is(.v2-desktop-nav, .v2-site-menu) .v2-nav-link[aria-current="page"]:hover { background: var(--v2-brand); border-color: var(--v2-brand); }
.v2--web :is(.v2-desktop-nav, .v2-site-menu) .v2-nav-link[aria-current="page"]:focus-visible { outline: 2px solid var(--v2-on-brand); outline-offset: -5px; }

/* Shared visual hierarchy: raised learning surfaces, quiet utilities, semantic feedback.
   Keep component geometry and activity-specific interactions unchanged. */
.v2 :is(.v2-panel, .v2-study-card, .v2-catalog-book, .v2-practice-previous) { box-shadow: var(--v2-card-shadow); }
.v2 :is(.v2-button--secondary, .v2-choice):where(:not(.v2-answer--success, .v2-answer--error, [aria-pressed="true"], [aria-selected="true"], :has(input:checked))) { border-color: var(--v2-control-border); }
.v2 .v2-field :is(input, select, textarea):where(:not([aria-invalid="true"])) { border-color: var(--v2-control-border); }
.v2 .v2-button--secondary:where(:not(.v2-answer--success, .v2-answer--error, [aria-pressed="true"], [aria-selected="true"])) { background: var(--v2-surface); }
.v2 .v2-button--secondary:hover:where(:not(.v2-answer--success, .v2-answer--error)), .v2 .v2-button--quiet:hover { background: var(--v2-tint); border-color: var(--v2-accent); }
.v2 .v2-button--primary:where(:not(.v2-answer--success, .v2-answer--error)) { box-shadow: 0 2px 0 #00000026, inset 0 1px 0 #ffffff26; }
.v2 :is(.v2-practice-previous, .v2-previous) { background: var(--v2-soft); }
.v2 .v2-practice-caption { color: var(--v2-text); font-weight: 600; }
.v2 .v2-practice-action-slot > button.v2-button--secondary { background: var(--v2-action); color: var(--v2-on-action); border-color: var(--v2-action); }
.v2 .v2-practice-action-slot > button.v2-button--secondary:hover { background: var(--v2-action-hover); }
.v2 .v2-reader-line.is-playing { background: var(--v2-tint); }
.v2 .v2-speaking-stage:has(.v2-speaking-assessment[data-tone="high"]) { background: var(--v2-success-bg); border-color: var(--v2-success); }
.v2 .v2-feedback--success { border-color: var(--v2-success); }


/* Compact admin audio table. Rows retain their Turbo identity; native playback
   remains mounted during unchanged polls. All five columns share one grid. */
.v2-audio-table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); scroll-margin-top: calc(var(--v2-header) + var(--v2-space-4)); }
.v2-audio-table { min-width: 58rem; --v2-audio-columns: minmax(12rem, 1.6fr) minmax(7rem, .85fr) minmax(7rem, .85fr) 15rem 8rem; }
.v2 .v2-audio-row, .v2-audio-table-head { display: grid; grid-template-columns: var(--v2-audio-columns); gap: var(--v2-space-3); padding: var(--v2-space-2) var(--v2-space-3); align-items: start; }
.v2-audio-table-head { align-items: center; background: var(--v2-soft); border-bottom: 1px solid var(--v2-border); color: var(--v2-muted); font-size: var(--v2-size-xs); font-weight: 600; }
.v2 .v2-audio-row { margin: 0; font-size: var(--v2-size-sm); scroll-margin-top: calc(var(--v2-header) + var(--v2-space-4)); }
.v2-audio-row [id^="audio-"] { scroll-margin-top: calc(var(--v2-header) + var(--v2-space-4)); }
.v2-audio-row > [role] { min-width: 0; display: flex; flex-direction: column; gap: var(--v2-space-1); overflow-wrap: anywhere; }
.v2-audio-row small { margin: 0; font-size: var(--v2-size-xs); line-height: 1.4; }
.v2-audio-row .v2-audio-text > strong { font-size: var(--v2-size-base); }
.v2-audio-row .v2-audio-state strong { font-size: var(--v2-size-sm); }
.v2-audio-row .v2-audio-row-actions { gap: 0; }
.v2-audio-row-actions form, .v2-audio-approval { margin: 0; }
.v2-audio-row .v2-button { min-height: 44px; padding: var(--v2-space-2) var(--v2-space-2); font-size: var(--v2-size-xs); }
.v2-audio-row-actions .v2-button { width: 100%; }
.v2-audio-row audio { display: block; width: 100%; height: 32px; }
.v2-audio-empty { display: flex; align-items: center; height: 32px; color: var(--v2-muted); }
.v2-audio-approval { display: flex; align-items: center; gap: var(--v2-space-2); }
.v2-audio-approval label { display: flex; align-items: center; gap: var(--v2-space-1); min-height: 44px; white-space: nowrap; color: var(--v2-text); }
.v2-audio-approval input[type="checkbox"] { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.v2-audio-source-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.v2-audio-source-link[aria-disabled="true"] { color: var(--v2-muted); cursor: wait; }
.v2-audio-row-details summary, .v2-audio-help summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; font-size: var(--v2-size-xs); }
.v2-audio-row-details > div { display: grid; gap: var(--v2-space-2); padding-bottom: var(--v2-space-2); }
.v2 .v2-audio-page-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-2) var(--v2-space-5); padding: var(--v2-space-3); }
.v2-audio-page-tools > .v2-cluster { flex: 1 1 100%; justify-content: space-between; }
.v2-audio-page-tools p { margin: 0; font-size: var(--v2-size-sm); }
.v2-audio-page-tools .v2-audio-help { flex: 1 1 14rem; }
.v2-audio-page-tools #audio-page-status:empty { display: none; }
.v2-audio-filters { align-items: flex-end; gap: var(--v2-space-2); }
.v2-audio-filters .v2-field { flex: 1 1 10rem; }
.v2-audio-filters label, .v2-audio-filters input, .v2-audio-filters select { font-size: var(--v2-size-sm); }
.v2-audio-row [hidden] { display: none !important; }
.v2-audio-scroll-hint { display: none; }
.v2-audio-empty-results { padding: var(--v2-space-3); }
/* Flashcards share one compact prompt above two columns of answers.
   Course Review retains its teaching layout; each player owns its progression. */
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) { grid-template-columns: minmax(0, 1fr); padding: var(--v2-space-3); gap: var(--v2-space-2); }
/* The device preference reserves this row even before a batch card connects. */
.v2 .v2-flashcard-continue { display: none; }
html[data-flashcard-advance="manual"] .v2-flashcard-continue { display: inline-flex; }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards)[data-fc-outcome="correct"] { background: var(--v2-success-bg); border-color: var(--v2-success); box-shadow: 0 0 0 4px var(--v2-success); }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards)[data-fc-outcome="incorrect"] { background: var(--v2-error-bg); border-color: var(--v2-error); box-shadow: 0 0 0 4px var(--v2-error); }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards)[data-fc-outcome="practice"] { border-color: var(--v2-practice); }
/* Restore V1's outcome ring and small new-card pulse with V2 theme tokens.
   Transforms preserve slot geometry; reduced motion disables these animations. */
.v2-practice-card--standalone.v2-flashcard-exit { animation: v2-flashcard-depart 80ms ease-in both; }
.v2-practice-card--standalone.v2-flashcard-exit-fast { animation: v2-flashcard-depart 40ms ease-in both; }
.v2-practice-card--standalone.v2-flashcard-enter,
.v2-practice-card--standalone.v2-flashcard-enter-fast { animation: v2-flashcard-arrive 800ms ease-in-out both; }
@keyframes v2-flashcard-depart { from { opacity: 1; transform: translateY(0); } to { opacity: .9; transform: translateY(-3px); } }
@keyframes v2-flashcard-arrive {
  0%, 100% { transform: scale(1); box-shadow: var(--v2-card-shadow); }
  50% { transform: scale(1.02); box-shadow: 0 0 20px color-mix(in srgb, var(--v2-accent) 50%, transparent); }
}
.v2-flashcard-instruction { color: var(--v2-accent); text-align: center; font-size: var(--v2-size-md); font-weight: 600; }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word { min-height: 0; padding: 0; inline-size: 100%; max-inline-size: 36rem; justify-self: center; }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__text { block-size: 11.75rem; grid-template-rows: 4.25rem 4.5rem 3rem; gap: 0; }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__part { min-height: 0; padding-block: 0; overflow: auto; }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__pinyin { font-size: var(--v2-size-xl); }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__meaning { font-size: var(--v2-size-base); }
/* One large clue before reveal; the same area holds all three values afterward.
   Two clues (course Review) keep the three-row layout so nothing moves on reveal.
   Empty concealed parts overlap the clue's grid cell without exposing content. */
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__text:has(> .v2-practice-word__part.is-hidden):not(:has(> .v2-practice-word__part:not(.is-hidden) ~ .v2-practice-word__part:not(.is-hidden))) { grid-template-rows: minmax(0, 1fr); }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__text:has(> .v2-practice-word__part.is-hidden):not(:has(> .v2-practice-word__part:not(.is-hidden) ~ .v2-practice-word__part:not(.is-hidden))) > .v2-practice-word__part { grid-area: 1 / 1; }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__text:has(> .v2-practice-word__part.is-hidden):not(:has(> .v2-practice-word__part:not(.is-hidden) ~ .v2-practice-word__part:not(.is-hidden))) > .v2-practice-word__hanzi { font-size: clamp(3rem, 5vw, 4rem); }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__text:has(> .v2-practice-word__part.is-hidden):not(:has(> .v2-practice-word__part:not(.is-hidden) ~ .v2-practice-word__part:not(.is-hidden))) > .v2-practice-word__pinyin { font-size: clamp(1.65rem, 3vw, 2rem); }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__text:has(> .v2-practice-word__part.is-hidden):not(:has(> .v2-practice-word__part:not(.is-hidden) ~ .v2-practice-word__part:not(.is-hidden))) > .v2-practice-word__meaning { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.35; }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__reading { flex-wrap: nowrap; }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-word__reading > span { min-width: 0; }
.v2-direction-cue { white-space: nowrap; }
.v2-direction-audio { display: inline-flex; vertical-align: middle; color: var(--v2-muted); }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-practice-response { inline-size: 100%; max-inline-size: 42rem; justify-self: center; }
.v2-practice-card:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-answer-options:has(.v2-answer-choice) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-answer-choice { display: grid; grid-template-columns: 1rem minmax(0, 1fr) 1rem; align-items: center; text-align: center; }
:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-answer-choice > span:last-child { grid-column: 2; min-width: 0; }
.v2-practice-card--standalone .v2-practice-ratings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 599px) {
  :is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-answer-choice { grid-template-columns: .65rem minmax(0, 1fr) .65rem; gap: var(--v2-space-1); padding-inline: var(--v2-space-2); }
  .v2-practice-card:is(.v2-practice-card--standalone, .v2-practice-card--course-flashcards) .v2-answer-options--long-labels:has(.v2-answer-choice) { grid-template-columns: minmax(0, 1fr); }
}
.v2-flashcard-pacing { grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); align-items: end; }
.v2-flashcard-pacing select { min-width: 0; min-height: 44px; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous { text-align: center; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-previous-heading { grid-template-columns: minmax(0, 1fr); }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-previous-outcome { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; text-align: center; gap: var(--v2-space-1) var(--v2-space-2); }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-previous-outcome small { max-width: 100%; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-previous-actions, :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-previous-actions .v2-cluster { justify-content: center; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-feedback-tested > div:first-child { justify-content: center; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-feedback-tested strong { margin-left: 0; }
.v2-flashcard-directions { border: 0; padding: 0; margin: 0; min-width: 0; }
.v2-flashcard-directions legend { font-weight: 600; margin-bottom: var(--v2-space-2); }
.v2-direction-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--v2-space-2); }
.v2-direction-choice { display: flex; align-items: center; gap: var(--v2-space-2); min-height: 44px; padding: var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); cursor: pointer; }
.v2-direction-choice:has(input:checked) { background: var(--v2-tint); border-color: var(--v2-accent); }
.v2-direction-choice input { accent-color: var(--v2-action); }
.v2-flashcard-dialog { width: min(52rem, calc(100vw - 2rem)); border-radius: var(--v2-radius); }
.v2-flashcard-dialog > header { margin-bottom: var(--v2-space-3); }
.v2-flashcard-dialog > turbo-frame { display: block; }
.v2-batch-boundary { gap: var(--v2-space-4); }
.v2-batch-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 5rem), 1fr)); gap: var(--v2-space-2); margin: var(--v2-space-2) 0 0; }
.v2-batch-results > div { display: flex; flex-direction: column-reverse; justify-content: end; min-width: 0; }
.v2-batch-results dt { font-size: var(--v2-size-sm); color: var(--v2-muted); }
.v2-batch-results dd { margin: 0; font-size: var(--v2-size-2xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-batch-message { min-block-size: 3.75rem; }
.v2-batch-loader { height: 10px; border-radius: var(--v2-control-radius); background: var(--v2-border); overflow: hidden; }
.v2-batch-loader > span { display: block; width: 40%; height: 100%; border-radius: var(--v2-control-radius); background: var(--v2-progress-fill); animation: v2-batch-loading 1.4s ease-in-out infinite; }
.v2-batch-boundary:not([data-state="starting"], [data-state="loading"], [data-state="saving"]) .v2-batch-loader { visibility: hidden; }
@keyframes v2-batch-loading { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.v2-batch-recap { display: grid; gap: var(--v2-space-1) var(--v2-space-3); grid-template-columns: auto minmax(0, 1fr) auto; margin: var(--v2-space-2) 0 0; padding: 0; list-style: none; }
.v2-batch-recap > li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: baseline; padding-block: var(--v2-space-1); border-top: 1px solid var(--v2-border); }
.v2-batch-recap-word { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--v2-space-2); font-weight: 600; }
.v2-batch-recap-word .v2-pinyin { font-weight: 400; }
.v2-batch-recap-meaning { min-width: 0; overflow: hidden; color: var(--v2-muted); text-overflow: ellipsis; white-space: nowrap; }
.v2-batch-recap-outcome { font-size: var(--v2-size-md); white-space: nowrap; }
.v2-batch-message > p { margin-top: var(--v2-space-2); }
.v2-batch-action { display: flex; align-items: start; min-block-size: 46px; }
.v2-batch-action [data-idle="true"] { visibility: hidden; }
.v2-batch-action .v2-button[aria-disabled="true"], .v2-fc-settings-form .v2-button[aria-disabled="true"] { opacity: .65; cursor: default; }
.v2-help-tip { display: inline-flex; vertical-align: middle; font-weight: normal; }
.v2-help-trigger { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--v2-control-radius); background: transparent; color: var(--v2-muted); cursor: pointer; font: inherit; }
.v2-help-trigger > span { display: inline-grid; place-items: center; width: 18px; height: 18px; min-height: 0; padding: 0; border: 1px solid currentColor; border-radius: 50%; font-size: var(--v2-size-xs); line-height: 1; }
.v2-help-trigger:hover, .v2-help-trigger[aria-expanded="true"] { color: var(--v2-text); background: var(--v2-tint); }
.v2-help-trigger:focus-visible { outline: 3px solid var(--v2-accent); outline-offset: 2px; }
.v2-help-popup { position: fixed; inset: auto; z-index: 100; width: max-content; max-width: min(20rem, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow: auto; margin: 0; padding: var(--v2-space-3); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-surface); color: var(--v2-text); box-shadow: var(--v2-card-shadow); font-size: var(--v2-size-md); font-weight: normal; line-height: 1.5; text-align: left; white-space: normal; }
.v2-fc-field-heading { display: flex; align-items: center; gap: var(--v2-space-1); }
.v2-fc-batch-field { flex: 0 1 15rem; max-width: 100%; }
.v2-fc-field-heading > label { min-width: 0; }
.v2-fc-preferences { display: flex; flex-wrap: wrap; align-items: center; }
.v2-fc-preferences .v2-button { min-width: 0; flex: 1 1 8rem; }
.v2-flashcard-dialog .v2-fc-settings-form { border: 0; padding: 0; background: transparent; box-shadow: none; }
.v2-flashcard-dialog > .v2-button { margin-top: var(--v2-space-3); }
@media (max-width: 699px) {
  .v2-flashcard-dialog { width: 100%; }
}
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-feedback-tested { padding: 0; border: 0; }
:is(.v2-fc-flow, .v2-run--course-flashcards) .v2-feedback-tested > div:first-child { flex-wrap: wrap; }
.v2-feedback-tested > div:first-child > span { min-width: 0; overflow-wrap: anywhere; }
.v2-feedback-tested progress { accent-color: var(--v2-progress-fill); }
.v2-feedback-tested.is-mastered { color: var(--v2-mastery); }
.v2-feedback-tested.is-mastered progress { accent-color: var(--v2-mastery); }
.v2-feedback-tested progress::-webkit-progress-value { background: var(--v2-progress-fill); }
.v2-feedback-tested.is-mastered progress::-webkit-progress-value { background: var(--v2-mastery); }
.v2-feedback-tested.is-mastered progress::-moz-progress-bar { background: var(--v2-mastery); }
.v2-previous-actions .v2-nudge, .v2-practice-ratings .v2-nudge { --nudge-color: var(--v2-accent); min-width: 44px; color: var(--nudge-color); border-color: var(--nudge-color); }
.v2-previous-actions .v2-nudge--hard, .v2-practice-ratings .v2-nudge--hard { --nudge-color: var(--v2-practice); }
.v2-previous-actions .v2-nudge--easy, .v2-practice-ratings .v2-nudge--easy { --nudge-color: var(--v2-success); }
.v2-previous-actions .v2-nudge--mastery, .v2-practice-ratings .v2-nudge--mastery { --nudge-color: var(--v2-mastery); }
.v2 .v2-previous-actions .v2-nudge[aria-pressed="true"], .v2 .v2-practice-ratings .v2-nudge.is-pressed { background: var(--nudge-color); color: var(--v2-on-accent); border-color: var(--nudge-color); box-shadow: none; opacity: 1; }
.v2-fc-flow .v2-answer-choice.v2-answer--success { background: var(--v2-success); color: var(--v2-on-success); border-color: var(--v2-success); opacity: 1; }
.v2-fc-flow .v2-answer-choice.v2-answer--error { background: var(--v2-error); color: var(--v2-on-accent); border-color: var(--v2-error); opacity: 1; }
/* One score axis: an open starting marker, a solid answer bar, nudge rails
   above and below it, and a firm current tick. Overlapping moves remain visible. */
.v2-feedback-tested .v2-score-meter { position: relative; display: block; height: 18px; margin-top: var(--v2-space-1); border-radius: 2px; }
.v2-score-meter::before { content: ""; position: absolute; inset: 8px 0 auto; height: 2px; background: var(--v2-border); }
.v2-score-fill { position: absolute; left: 0; top: 8px; height: 2px; background: var(--v2-control-border); }
.v2-score-segment { position: absolute; top: 6px; height: 6px; box-sizing: border-box; color: var(--v2-success); background: currentColor; }
.v2-score-segment--nudge { top: 2px; height: 14px; background: transparent; border-block: 2px solid currentColor; }
.v2-score-segment.is-loss { color: var(--v2-error); }
.v2-score-start { position: absolute; top: 5px; width: 8px; height: 8px; border: 2px solid var(--v2-text); border-radius: 50%; background: var(--v2-surface); transform: translateX(-50%); }
.v2-score-position { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--v2-text); transform: translateX(-50%); }
.v2-score-override { position: absolute; top: 5px; height: 8px; box-sizing: border-box; border-radius: 4px 0 0 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--v2-mastery) 30%, transparent), var(--v2-mastery)); }
.v2-score-mastery { position: absolute; right: 0; top: 0; width: 18px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-mastery) 35%, transparent); background: var(--v2-mastery); color: var(--v2-on-accent); font-size: 13px; line-height: 18px; font-weight: 700; text-align: center; }
.v2-mastery-override { color: var(--v2-mastery); border: 1px solid currentColor; border-radius: 3px; padding: 0 var(--v2-space-1); font-size: var(--v2-size-xs); font-weight: 600; }
.v2-score-start, .v2-score-position { z-index: 1; }
.v2-score-meter:focus-visible { outline: 2px solid var(--v2-accent); outline-offset: 4px; }
.v2-score-meter:focus-visible::after { content: attr(title); position: absolute; inset: auto 0 calc(100% + .5rem); padding: var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-surface); color: var(--v2-text); font-size: var(--v2-size-xs); line-height: 1.4; z-index: 2; }
@media (max-width: 499px) {
  .v2-previous-heading { grid-template-columns: minmax(0, 1fr); }
  .v2-previous-outcome { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; text-align: center; gap: var(--v2-space-1) var(--v2-space-2); }
  .v2-previous-outcome small { max-width: 100%; }
}
.v2-previous-deck { margin: 0; min-width: 0; font-size: var(--v2-size-sm); overflow-wrap: anywhere; }
.v2-previous-deck small { margin-right: var(--v2-space-1); color: var(--v2-muted); font-size: var(--v2-size-xs); }
/* Wide Previous: word, result and ratings share one row above the full-width track. */
@media (min-width: 760px) {
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; grid-template-areas: "word outcome actions" "word deck actions" "answers answers answers" "skills skills skills"; align-items: center; gap: var(--v2-space-1) var(--v2-space-4); padding: var(--v2-space-3) var(--v2-space-4); text-align: left; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-heading, :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-reading { display: contents; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-word { grid-area: word; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-word > div { grid-template-columns: fit-content(60%) minmax(0, 1fr); grid-template-areas: "hanzi pinyin" "hanzi meaning"; justify-items: start; align-items: center; gap: 0 var(--v2-space-3); text-align: left; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-reading strong { grid-area: hanzi; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-pinyin { grid-area: pinyin; justify-content: flex-start; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-meaning { grid-area: meaning; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-outcome { grid-area: outcome; align-self: end; justify-content: flex-start; text-align: left; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous:not(:has(.v2-previous-deck)) .v2-previous-outcome { grid-row: 1 / span 2; align-self: center; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-deck { grid-area: deck; align-self: start; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-actions { grid-area: actions; justify-content: flex-end; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-actions .v2-cluster { justify-content: flex-end; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-previous-answers { grid-area: answers; margin-top: var(--v2-space-2); }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-feedback-skills { grid-area: skills; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-feedback-tested > div:first-child { justify-content: flex-start; }
  :is(.v2-fc-flow, .v2-run--course-flashcards) .v2-practice-previous .v2-feedback-tested > div:first-child > strong { margin-left: auto; }
}
@media (max-width: 1100px) {
  .v2-audio-scroll-hint { display: block; margin-bottom: calc(-1 * var(--v2-space-3)); }
  .v2-audio-row audio { height: 44px; }
}
@media (max-width: 499px) {
  .v2 .v2-audio-row { gap: var(--v2-space-3) !important; }
}

/* Single-row activity settings. Extra options open above content, never as a
   second sticky row. A row has at most five 44px controls at narrow widths. */
.v2-settings-row, .v2-study-toolbar.v2-settings-row { display:flex; flex-wrap:nowrap; align-items:center; gap:4px; min-width:0; padding:6px; }
.v2-settings-row > * { min-width:0; }
.v2-settings-row .v2-reader-toolbar, .v2-settings-row .v2-settings-controls { flex:0 0 auto; flex-wrap:nowrap; gap:4px; padding:0; margin:0; }
.v2-settings-row .v2-reader-settings-group, .v2-settings-row .v2-reader-playback,
.v2-settings-menu__panel .v2-reader-settings-group, .v2-settings-menu__panel .v2-reader-playback { flex-wrap:nowrap; gap:4px; padding:0; border:0; }
.v2-settings-row .v2-toggle--icon, .v2-settings-menu__panel .v2-toggle--icon, .v2-fc-sticky--compact .v2-toggle--icon { flex:0 0 44px; width:44px; min-height:44px; margin:0; }
.v2-settings-row .v2-toggle__icon, .v2-settings-menu__panel .v2-toggle__icon, .v2-fc-sticky--compact .v2-toggle__icon { width:44px; height:44px; }
.v2-icon-control, .v2-settings-row .v2-compact-control, .v2-settings-menu__panel .v2-compact-control,
.v2-settings-menu__panel .v2-settings-button { display:inline-flex; justify-content:center; align-items:center; flex:0 0 44px; width:44px; min-width:44px; height:44px; min-height:44px; padding:8px; gap:0; }
.v2-icon-control > span:not(.v2-icon), .v2-settings-menu__panel .v2-settings-button > span { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.v2-settings-row .v2-context-tabs--icons { flex:0 0 auto; gap:2px; padding:0; margin:0 0 0 auto; }
.v2-context-tabs--icons [role="tab"] { display:inline-flex; align-items:center; justify-content:center; flex:0 0 44px; width:44px; min-width:44px; min-height:44px; padding:8px; }
.v2-settings-menu { position:relative; flex:0 0 44px; margin:0 0 0 auto; }
.v2-context-tabs--icons + .v2-settings-menu { margin-left:0; }
.v2-settings-menu > summary { list-style:none; cursor:pointer; border:1px solid var(--v2-border); border-radius:var(--v2-control-radius); color:var(--v2-muted); background:var(--v2-surface); }
.v2-settings-menu > summary::-webkit-details-marker { display:none; }
.v2-settings-menu > summary:hover, .v2-settings-menu[open] > summary { color:var(--v2-accent); border-color:var(--v2-accent); }
.v2-settings-menu__panel { position:absolute; z-index:25; inset-inline-end:0; top:calc(100% + 8px); display:flex; flex-wrap:wrap; align-items:center; gap:8px; width:max-content; max-width:calc(100vw - 32px); max-height:min(55dvh,320px); overflow:auto; padding:12px; border:1px solid var(--v2-border); border-radius:var(--v2-radius); background:var(--v2-surface); box-shadow:var(--v2-shadow); }
.v2-settings-menu__panel > *, .v2-settings-menu__panel .v2-activity-controls,
.v2-settings-menu__panel .v2-listening-tools { margin:0; }
.v2-settings-menu__panel .v2-reader-toolbar { flex:0 0 auto; flex-wrap:wrap; gap:4px; }
.v2-settings-menu__panel .v2-activity-controls { gap:4px; align-self:center; }
.v2-settings-menu__panel .v2-listening-tools { padding:0; }
.v2-icon-select { position:relative; display:inline-flex; flex:0 0 44px; width:44px; height:44px; align-items:center; justify-content:center; border:1px solid var(--v2-border); border-radius:var(--v2-control-radius); color:var(--v2-accent); background:var(--v2-surface); }
.v2-icon-select select { position:absolute; inset:-1px; z-index:1; width:calc(100% + 2px); height:calc(100% + 2px); min-height:44px; padding:0; opacity:0; cursor:pointer; }
.v2-icon-select::after { content:""; position:absolute; right:3px; bottom:3px; border:3px solid transparent; border-top-color:currentColor; }
.v2-icon-select:focus-within { outline:2px solid var(--v2-accent); outline-offset:2px; }
.v2-icon-select > span:not(.v2-sr-only) { display:none; pointer-events:none; }
.v2-icon-select:has(option[value="off"]:checked) { color:var(--v2-muted); }
.v2-icon-select:has(option[value="off"]:checked) .v2-icon-select__off,
.v2-icon-select:has(option[value="normal"]:checked) .v2-icon-select__normal,
.v2-icon-select:has(option[value="slow"]:checked) .v2-icon-select__slow,
.v2-icon-select:has(option[value="cross"]:checked) .v2-icon-select__cross,
.v2-icon-select:has(option[value="diagonal"]:checked) .v2-icon-select__diagonal,
.v2-icon-select:has(option[value="nine"]:checked) .v2-icon-select__nine { display:inline-flex; }

/* Direct-first activity controls. Adjustments stay left, source/questions form
   a distinct middle group, and activity actions stay right. Only controls that
   do not fit move into the same labelled sections in one flat More panel. */
.v2-settings-toolbar.v2-settings-row { --v2-toolbar-item-gap:4px; gap:12px; }
.v2-settings-toolbar:not(.is-enhanced) { flex-wrap:wrap; }
.v2-settings-toolbar__direct { display:contents; }
.v2-settings-toolbar__group { position:static; display:flex; flex:0 0 auto; align-items:center; gap:var(--v2-toolbar-item-gap); min-width:0; }
.v2-settings-toolbar__group--actions { margin-inline-start:auto; }
/* The zero-net-width separator uses the inter-group gap, without becoming
   a containing block for the toolbar-anchored keyboard-focus label. */
.v2-settings-toolbar__group.is-separated::before { content:""; position:relative; inset-inline-start:-7px; flex:0 0 1px; height:24px; margin-inline-end:-5px; background:var(--v2-border); }
.v2-settings-toolbar__group[hidden], .v2-settings-toolbar__section[hidden] { display:none; }
.v2-settings-toolbar:not(.is-enhanced) .v2-settings-toolbar__group { flex-wrap:wrap; max-width:100%; }
.v2-settings-toolbar .v2-toolbar-item { position:static; display:flex; flex:0 0 auto; width:44px; min-width:44px; align-items:center; }
.v2-settings-toolbar .v2-toolbar-item[data-width="92"] { width:92px; }
.v2-toolbar-item__label, .v2-toolbar-choices { display:none; }
.v2-toolbar-item__control { display:flex; flex:0 0 auto; align-items:center; min-width:0; }
.v2-toolbar-item__control > form, .v2-toolbar-item__control > .v2-listening-tools { margin:0; padding:0; }
.v2-settings-toolbar .v2-settings-button { display:inline-flex; align-items:center; justify-content:center; width:44px; min-width:44px; height:44px; min-height:44px; padding:8px; }
.v2-settings-toolbar .v2-context-tabs--icons { margin:0; }
.v2-study-sticky .v2-settings-toolbar { position:relative; top:auto; }
.v2-settings-toolbar > .v2-settings-menu { position:static; margin-inline-start:auto; }
.v2-settings-toolbar > .v2-settings-menu[hidden] { display:none; }
.v2-settings-toolbar__direct:has(.v2-settings-toolbar__group--actions:not([hidden])) + .v2-settings-menu { margin-inline-start:0; }
.v2-settings-toolbar .v2-settings-menu__panel { box-sizing:border-box; width:min(19rem,100%); max-width:100%; padding:8px; }
.v2-settings-toolbar__overflow { display:flex; flex-direction:column; align-items:stretch; width:100%; gap:12px; }
.v2-settings-toolbar__section { margin:0; }
.v2-settings-toolbar__section:not([hidden]) ~ .v2-settings-toolbar__section:not([hidden]) { border-top:1px solid var(--v2-border); padding-top:8px; }
.v2-settings-toolbar__section-label { padding:0 4px 4px; color:var(--v2-muted); font-size:var(--v2-size-xs); font-weight:600; }
.v2-settings-toolbar__section-items { display:flex; flex-direction:column; gap:4px; }
.v2-settings-toolbar .v2-toolbar-item.is-overflow { display:flex; justify-content:space-between; gap:12px; width:100%; min-width:0; padding:2px 4px; border-radius:var(--v2-control-radius); }
.v2-toolbar-item.is-overflow .v2-toolbar-item__label { display:block; min-width:0; font-size:var(--v2-size-md); overflow-wrap:anywhere; }
.v2-toolbar-item.is-overflow:has(select) { flex-wrap:wrap; }
.v2-toolbar-item.is-overflow:has(select) > .v2-toolbar-item__control { display:none; }
.v2-toolbar-item.is-overflow .v2-toolbar-choices { display:flex; flex-wrap:wrap; gap:4px; width:100%; }
.v2-toolbar-choices .v2-button { flex:1 1 auto; min-width:44px; min-height:44px; padding:8px; }
.v2-toolbar-choices .v2-button[aria-pressed="true"] { background:var(--v2-accent); color:var(--v2-on-accent); border-color:var(--v2-accent); }
.v2-toolbar-item:not(.is-overflow):focus-within::after { content:attr(data-control-label); position:absolute; top:calc(100% + 8px); left:0; z-index:26; width:max-content; max-width:min(12rem,100%); padding:6px 8px; border:1px solid var(--v2-border); border-radius:var(--v2-control-radius); color:var(--v2-text); background:var(--v2-surface); font-size:var(--v2-size-sm); line-height:1.4; box-shadow:var(--v2-card-shadow); pointer-events:none; }
.v2-toolbar-item:has(dialog[open])::after { display:none; }
/* Shared admin workspace: current site header above a scalable tool directory. */
.v2-admin-shell { display: grid; gap: var(--v2-space-5); align-items: start; }
.v2-admin-sidebar { min-width: 0; padding-top: var(--v2-page-padding); }
.v2-admin-workspace { min-width: 0; }
.v2-admin-workspace > .v2-container,
.v2-admin-workspace > turbo-frame > .v2-container { width: 100%; max-width: none; padding-inline: 0; }
.v2-admin-drawer { border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-surface); }
.v2-admin-drawer > summary { min-height: 44px; padding: var(--v2-space-3); cursor: pointer; font-weight: 600; }
.v2-admin-navigation { padding: var(--v2-space-3); }
.v2-admin-navigation__title { display: block; min-height: 44px; padding: var(--v2-space-2); font-weight: 600; }
.v2-admin-navigation__group { margin-top: var(--v2-space-4); padding-top: var(--v2-space-4); border-top: 1px solid var(--v2-border); }
.v2 .v2-admin-navigation__heading { margin: 0 0 var(--v2-space-2); padding-inline: var(--v2-space-2); color: var(--v2-text); font-size: var(--v2-size-xs); line-height: 1.5; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.v2-admin-navigation__links { margin-left: var(--v2-space-3); padding-left: var(--v2-space-1); border-left: 2px solid var(--v2-border); }
.v2-admin-navigation .v2-nav-link { display: flex; min-height: 44px; padding: var(--v2-space-2) var(--v2-space-3); white-space: normal; font-size: var(--v2-size-md); line-height: 1.4; }
.v2-admin-navigation .v2-nav-link[aria-current="page"] { color: var(--v2-on-accent); background: var(--v2-accent); border-radius: var(--v2-control-radius); }
.v2-admin-directory { display: grid; gap: var(--v2-space-4); }
.v2-admin-directory > .v2-panel { padding: var(--v2-space-4); }
@media (min-width: 1000px) {
  .v2--web .v2-admin-shell { grid-template-columns: 14rem minmax(0, 1fr); }
  .v2--web .v2-admin-sidebar { position: sticky; top: var(--v2-header); max-height: calc(100dvh - var(--v2-header)); overflow-y: auto; }
  .v2--web .v2-admin-drawer { border: 0; background: none; }
  .v2--web .v2-admin-drawer > summary { display: none; }
  .v2--web .v2-admin-navigation { padding: 0 var(--v2-space-3) 0 0; border-right: 1px solid var(--v2-border); }
  .v2-admin-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 999px) {
  .v2-admin-shell { gap: 0; }
}
/* Context is page navigation, not a sticky presentation setting. */
.v2-context-tabs--inline { position:static; margin:0 0 var(--v2-space-4); }
.v2-context-tabs--inline [role="tab"] { display:flex; align-items:center; justify-content:center; gap:var(--v2-space-2); min-width:0; min-height:44px; padding:8px 12px; overflow-wrap:anywhere; }
.v2-context-tabs--inline .v2-icon { flex:0 0 auto; }
/* In the settings bar: the open view is its icon, the other is a short word. */
.v2-settings-toolbar .v2-context-tabs--compact { flex:0 0 auto; gap:2px; padding:0; margin:0 auto; }
.v2-context-tabs--compact [role="tab"] { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; min-width:42px; min-height:42px; padding:6px 10px; font-size:var(--v2-size-sm); white-space:nowrap; }
.v2-context-tabs--compact [aria-selected="true"] { padding:6px; }
.v2-context-tabs--compact [aria-selected="true"] > span, .v2-context-tabs--compact [aria-selected="false"] > .v2-icon { display:none; }
.v2-settings-toolbar__direct:has(> .v2-context-tabs--compact) > .v2-settings-toolbar__group--actions { margin-inline-start:0; }

/* Playback belongs beside its content; preferences keep their distinct icons. */
.v2-content-playback { display:flex; flex-wrap:wrap; align-items:center; gap:2px; margin:0 0 var(--v2-space-2); }
.v2-content-playback > .v2-button { min-width:44px; min-height:44px; padding:8px 6px; gap:4px; }
.v2-content-playback > .v2-button svg { flex:0 0 20px; width:20px; height:20px; }
.v2-content-playback--stop { justify-content:flex-start; }
.v2-icon-select.v2-autoplay-select > span.v2-autoplay-select__icon { display:inline-flex; }

/* A full-size vector speaker keeps the autoplay symbol clear at normal zoom. */
.v2 .v2-icon.v2-icon--autoplay { width:24px; height:24px; flex:0 0 24px; }

/* More contrast with neutral colours: solid shapes rather than hairline accents. */
.v2 h1, .v2 h2 { font-weight: 700; }
.v2 .v2-button--secondary { background: var(--v2-tint); border-color: transparent; }
.v2 .v2-button--secondary:hover { border-color: var(--v2-accent); }
.v2-eyebrow { display: inline-flex; align-items: center; gap: var(--v2-space-1); width: fit-content; padding: var(--v2-space-1) var(--v2-space-2); border-radius: var(--v2-control-radius); background: var(--v2-tint); color: var(--v2-text); letter-spacing: .08em; }
/* Pinyin sits above the first line, so text after a label needs room for it. */
.v2-eyebrow + :is(.v2-rich-text, .v2-player-prompt, .v2-reading-tokens):has(rt) { margin-top: var(--v2-space-3); }
.v2-lesson-number { background: var(--v2-tint); border-color: transparent; color: var(--v2-text); font-weight: 600; }
.v2-progress, .v2-fc-meter { height: 10px; background: var(--v2-tint); }
.v2-progress::-webkit-progress-bar, .v2-fc-meter::-webkit-progress-bar { background: var(--v2-tint); }
.v2-activity-row:hover { background: var(--v2-tint); }

/* Admin Texts console: one panel per sentence with inline disclosures. */
.v2-text-book > summary, .v2-text-disclosure > summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; }
.v2-text-disclosure > summary { font-size: var(--v2-size-md); font-weight: 600; color: var(--v2-muted); }
.v2-text-disclosure[open] > summary { color: var(--v2-text); margin-bottom: var(--v2-space-3); }
.v2-text-disclosure > form + form { margin-top: var(--v2-space-3); }
.v2-text-lesson { margin-top: var(--v2-space-4); font-size: var(--v2-size-sm); font-weight: 600; color: var(--v2-muted); }
.v2-text-row { gap: var(--v2-space-3); }
.v2-text-row > * + * { margin-top: 0; }
.v2-text-row-chinese { font-size: var(--v2-size-xl); line-height: 1.6; overflow-wrap: anywhere; }
.v2-text-flag { color: var(--v2-error); border-color: currentColor; }
.v2-text-tokens { display: flex; flex-wrap: wrap; gap: var(--v2-space-1); }
.v2-text-token { display: inline-flex; flex-direction: column; align-items: center; padding: var(--v2-space-1) var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); line-height: 1.3; }
.v2-text-token small { color: var(--v2-pinyin); font-size: var(--v2-size-xs); min-height: 1em; }
.v2-text-token--unlinked { border-style: dashed; }
.v2-text-audio audio { display: block; height: 36px; max-width: 16rem; }
.v2-text-token-editor { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); border: 0; border-bottom: 1px solid var(--v2-border); }
.v2-text-token-editor legend { font-size: var(--v2-size-lg); font-weight: 600; }
.v2-text-row-actions { justify-content: flex-end; }
@media (max-width: 640px) { .v2-text-token-editor { grid-template-columns: minmax(0, 1fr); } }
/* Pressed feedback. Touch has no hover and the tap highlight is off. */
.v2-button:active:not(:disabled, [aria-disabled="true"]) { filter: brightness(.88); }
:root[data-theme="dark"] .v2-button:active:not(:disabled, [aria-disabled="true"]) { filter: brightness(1.25); }
.v2 .v2-button--secondary:active:not(:disabled, [aria-disabled="true"]), .v2 .v2-button--quiet:active:not(:disabled, [aria-disabled="true"]) { background: var(--v2-tint); border-color: var(--v2-accent); }
.v2-menu > summary:active, .v2-settings-menu > summary:active, .v2-decks-more > summary:active, .v2-practice-icon:active,
.v2-menu__panel .v2-nav-link:active, .v2-segmented label:active > span, .v2-toggle:active > .v2-toggle__icon,
.v2-choice:active, .v2-decks-group > details > summary:active { background: var(--v2-tint); }
.v2-settings-menu[open] > summary { background: var(--v2-tint); }
/* Wide screens: header menus drop from their own trigger at a fixed width. */
@media (min-width: 700px) {
  .v2 .v2-header .v2-menu { position: relative; }
  .v2 .v2-header .v2-menu > .v2-menu__panel { inset-inline: auto 0; top: calc(100% + var(--v2-space-2)); width: 272px; max-width: calc(100vw - 2 * var(--v2-gutter)); }
  .v2 .v2-header .v2-site-menu > .v2-menu__panel--site { inset-inline: 0 auto; width: 400px; }
  .v2 .v2-header .v2-site-menu--brand > .v2-menu__panel--site { width: 300px; }
}
/* Tabs sit flush on a baseline rule, so they read as a view switch, not as action buttons. */
.v2 .v2-tabs, .v2 .v2-fc-tabs { display: flex; flex-wrap: nowrap; gap: 0; width: 100%; padding: 0; overflow-x: auto; border: 0; border-bottom: 2px solid var(--v2-brand); border-radius: 0; background: none; }
.v2 .v2-tabs > a, .v2 .v2-fc-tabs > a { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 44px; padding: var(--v2-space-1) var(--v2-space-5); border-radius: var(--v2-control-radius) var(--v2-control-radius) 0 0; color: var(--v2-muted); font-size: var(--v2-size-md); font-weight: 600; text-decoration: none; white-space: nowrap; }
.v2 .v2-tabs > a:hover, .v2 .v2-fc-tabs > a:hover, .v2 .v2-tabs > a:active, .v2 .v2-fc-tabs > a:active { background: var(--v2-tint); color: var(--v2-text); }
.v2 .v2-tabs > a[aria-current="page"], .v2 .v2-fc-tabs > a[aria-current="page"] { background: var(--v2-brand); color: var(--v2-on-brand); }
@media (max-width: 599px) {
  .v2 .v2-tabs > a, .v2 .v2-fc-tabs > a { flex: 1 1 auto; padding-inline: var(--v2-space-3); }
}
/* Links turn blue on hover without gaining or keeping an underline. */
.v2 a:hover { text-decoration: none; }
/* Flashcard direction picker: one card per direction with its own counts. */
.v2 .v2-flashcard-competency > .v2-flashcard-competency-title { display: none; }
.v2 .v2-direction-groups > .v2-flashcard-competency { border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.v2 .v2-flashcard-competency .v2-direction-choices { gap: var(--v2-space-3); }
.v2 .v2-direction-card { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: var(--v2-space-2); padding: var(--v2-space-3); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-soft); }
.v2 .v2-direction-card + .v2-direction-card { border-top: 1px solid var(--v2-border); }
.v2 .v2-direction-card:has(.v2-direction-choice input:checked) { border-color: var(--v2-action); }
.v2-direction-cue { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-2); }
.v2-direction-arrow { color: var(--v2-muted); }
.v2-direction-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--v2-space-1) var(--v2-space-3); font-size: var(--v2-size-sm); color: var(--v2-muted); }
.v2-direction-stats strong { color: var(--v2-success); font-size: var(--v2-size-base); }
.v2-direction-mastered { display: inline-flex; align-items: center; gap: var(--v2-space-1); color: var(--v2-mastery); }
.v2-direction-mastered .v2-icon { width: 14px; height: 14px; flex-basis: 14px; }
.v2-direction-stats-bar { flex: 1 0 100%; display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--v2-tint); }
.v2-direction-stats-bar > span { flex: 0 1 0; min-width: 0; order: 1; }
/* Left to right: ready, not ready, mastered. */
.v2-direction-stats-bar > .is-ready { order: 0; }
.v2-direction-stats-bar > .is-mastered { order: 2; }
.v2-direction-stats-bar > .is-mastered { background: var(--v2-mastery); }
.v2-direction-stats-bar > .is-ready { background: var(--v2-progress-fill); }
@media (max-width: 699px) {
  .v2 .v2-direction-card { grid-template-columns: minmax(0, 1fr) auto; }
  .v2 .v2-direction-card .v2-direction-choice { grid-column: 1 / -1; grid-row: 1; }
  .v2 .v2-direction-card .v2-answer-competency { grid-column: 1; grid-row: 2; justify-self: start; }
  .v2 .v2-direction-card .v2-direction-try { grid-column: 2; grid-row: 2; justify-self: end; }
  .v2 .v2-direction-card .v2-direction-stats { grid-row: 3; }
}
/* Direction progress: one coloured bar per direction, no average marker. */
.v2-direction-average-lane { display: none; }
.v2-direction-track { min-height: 16px; }
.v2-direction-track progress { height: 8px; border-radius: 3px; background: var(--v2-tint); }
.v2-direction-track progress::-webkit-progress-bar { background: var(--v2-tint); border-radius: 3px; }
.v2-direction-track progress::-webkit-progress-value { background: var(--v2-action); border-radius: 3px; }
.v2-direction-track progress::-moz-progress-bar { background: var(--v2-action); border-radius: 3px; }
.v2-direction-track progress[value="1000"]::-webkit-progress-value { background: var(--v2-progress-fill); }
.v2-direction-track progress[value="1000"]::-moz-progress-bar { background: var(--v2-progress-fill); }
/* The direction preview opens only on request and can be closed again. */
.v2 .v2-direction-panel[data-open=false] { display: none; }
.v2 .v2-direction-panel-close { display: grid; }
.v2 .v2-direction-groups:has(> .v2-direction-panel[data-open=false]) { grid-template-columns: minmax(0, 1fr); }
/* Feedback and Android app: header icons, moved into the account menu on phones. */
.v2 .v2-header-link[aria-current="page"] { background: var(--v2-brand); color: var(--v2-on-brand); border-color: var(--v2-brand); }
.v2 .v2-menu__panel .v2-menu__compact { display: none; }
@media (max-width: 559px) {
  .v2-header__actions:has(.v2-account-menu) .v2-header-link { display: none; }
  .v2 .v2-menu__panel .v2-menu__compact { display: inline-flex; }
}
/* A wrong answer without a guess, under the choices. */
.v2 .v2-answer-options .v2-answer-unknown { grid-column: 1 / -1; justify-self: center; }
/* Admin console rows (Texts, Decks): content beside its recordings, tools below. */
.v2-console-list { display: grid; gap: var(--v2-space-2); }
.v2 .v2-console-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem); gap: var(--v2-space-2) var(--v2-space-4); align-items: start; padding: var(--v2-space-3) var(--v2-space-4); }
.v2-console-row > * { margin: 0; min-width: 0; }
.v2-console-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--v2-space-2); }
.v2-console-message { color: var(--v2-success); font-size: var(--v2-size-sm); font-weight: 600; }
.v2-console-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-1); }
.v2 .v2-console-actions .v2-button { min-width: 44px; padding-inline: var(--v2-space-2); }
.v2 .v2-console-delete { color: var(--v2-error); }
.v2-console-word > p + p, .v2-console-word > .v2-text-tokens { margin-top: var(--v2-space-1); }
.v2-console-audio { display: grid; gap: var(--v2-space-2); justify-items: start; }
.v2-console-audio audio { display: block; width: 100%; height: 36px; }
.v2-console-audio > form, .v2-console-player { width: 100%; }
.v2-console-player { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); align-items: center; gap: var(--v2-space-2); }
.v2-console-voice { display: flex; flex-wrap: wrap; gap: var(--v2-space-2); }
.v2-console-voice select { flex: 1 1 9rem; min-width: 0; }
.v2-console-edit { grid-column: 1 / -1; }
.v2-console-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--v2-space-1) var(--v2-space-4); }
.v2-console-tools > details[open] { flex: 1 1 100%; order: 2; }
.v2-console-tools > .v2-console-actions { margin-left: auto; }
.v2-console-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--v2-space-2) var(--v2-space-3); align-items: end; }
.v2-console-fields > .v2-button { justify-self: start; }
.v2-console-bar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--v2-space-3); padding: var(--v2-space-3) var(--v2-space-4); }
.v2-console-bar > .v2-console-fields { flex: 1 1 28rem; }
@media (max-width: 760px) { .v2 .v2-console-row { grid-template-columns: minmax(0, 1fr); } }
.v2 .v2-console-top { gap: var(--v2-space-1); padding: var(--v2-space-3) var(--v2-space-4); }
/* Reader: words taught by this lesson's decks, and multi-line word help. */
.v2-reader-token--new { box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--v2-accent) 65%, transparent); }
.v2-reader-token-popover [data-v2-reader-help-target="popoverMeaning"] { white-space: pre-line; }

/* Course Review tour: one small step per card, then grades by word. */
.v2-tour-card { display: grid; gap: var(--v2-space-4); padding: var(--v2-space-5); }
.v2-tour-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--v2-space-2) var(--v2-space-4); }
.v2-tour-skip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-2); }
.v2-tour-skip-all { display: inline-flex; align-items: center; gap: var(--v2-space-1); min-height: 44px; color: var(--v2-muted); font-size: var(--v2-size-sm); cursor: pointer; }
.v2-tour-skip-all input, .v2-tour-grades input { accent-color: var(--v2-action); }
.v2-tour-quiz-prompt { display: grid; place-items: center; min-height: 7rem; font-size: var(--v2-size-2xl); text-align: center; }
.v2-tour-quiz-prompt [lang^="zh"] { font-family: var(--v2-chinese); font-size: 3.5rem; line-height: 1.2; }
.v2-tour-quiz-prompt .v2-pinyin { font-size: 2rem; }
.v2-tour-answer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--v2-space-1) var(--v2-space-3); margin: 0; }
.v2-tour-answer [lang^="zh"] { font-size: var(--v2-size-xl); }
.v2-tour .v2-answer-choice:disabled { cursor: default; opacity: 1; }
.v2-tour .v2-answer-choice.v2-answer--success { background: var(--v2-success); color: var(--v2-on-success, var(--v2-on-accent)); border-color: var(--v2-success); }
.v2-tour .v2-answer-choice.v2-answer--error { background: var(--v2-error); color: var(--v2-on-accent); border-color: var(--v2-error); }
.v2-tour-profile { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); align-items: start; }
.v2-tour-profile > .v2-tour-actions { grid-column: 1 / -1; }
.v2-tour-profile-board { display: grid; gap: var(--v2-space-2); justify-items: center; }
.v2-tour-board { display: block; width: 100%; aspect-ratio: 1; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background-color: var(--v2-soft); background-image: linear-gradient(90deg, transparent 49.8%, var(--v2-border) 50%, transparent 50.2%), linear-gradient(transparent 49.8%, var(--v2-border) 50%, transparent 50.2%); }
/* Component colours: far apart in hue, and none of them the action blue. */
.v2-tour, .v2-writing-console { --v2-part-0: #b4530a; --v2-part-1: #0b7a70; --v2-part-2: #a81f6e; --v2-part-3: #5f6400; }
:root[data-theme="dark"] :is(.v2-tour, .v2-writing-console) { --v2-part-0: #ff9a4a; --v2-part-1: #3fd1c1; --v2-part-2: #f781c3; --v2-part-3: #dbd04f; }
.v2-tour-parts { fill: var(--v2-text); }
.v2-tour-parts.is-dimmed { opacity: .18; }
.v2-tour-animation { fill: var(--v2-text); pointer-events: none; }
.v2-tour-parts path[data-part="0"], .v2-tour-parts-list [data-part="0"] strong { fill: var(--v2-part-0); color: var(--v2-part-0); }
.v2-tour-parts path[data-part="1"], .v2-tour-parts-list [data-part="1"] strong { fill: var(--v2-part-1); color: var(--v2-part-1); }
.v2-tour-parts path[data-part="2"], .v2-tour-parts-list [data-part="2"] strong { fill: var(--v2-part-2); color: var(--v2-part-2); }
.v2-tour-parts path[data-part="3"], .v2-tour-parts-list [data-part="3"] strong { fill: var(--v2-part-3); color: var(--v2-part-3); }
.v2-tour-profile-word { display: flex; align-items: center; gap: var(--v2-space-3); margin: 0; }
.v2-tour-profile-word > strong { font-family: var(--v2-chinese); font-size: 3rem; line-height: 1.1; }
.v2-tour-profile-word > span, .v2-tour-parts-list li > span { display: grid; min-width: 0; }
.v2-tour-target-character { color: var(--v2-accent); background: transparent; text-decoration: underline; text-decoration-thickness: .07em; text-underline-offset: .16em; }
.v2-tour-profile-word .v2-pinyin { font-size: var(--v2-size-lg); }
.v2-tour-parts-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--v2-space-2); }
.v2-tour-parts-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: start; gap: 0 var(--v2-space-2); padding: var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); font-size: var(--v2-size-sm); line-height: 1.35; }
.v2-tour-parts-list li > strong { font-family: var(--v2-chinese); font-size: var(--v2-size-3xl); line-height: 1.1; }
.v2-tour-parts-list li > small { grid-column: 1 / -1; color: var(--v2-muted); font-size: var(--v2-size-xs); }
.v2-tour-facts { display: flex; flex-wrap: wrap; gap: var(--v2-space-2) var(--v2-space-5); margin: 0; }
.v2-tour-facts dt { color: var(--v2-muted); font-size: var(--v2-size-xs); }
.v2-tour-facts dd { margin: 0; font-weight: 600; }
.v2-tour-hint { margin: 0; }
.v2-tour-grades { width: 100%; border-collapse: collapse; }
.v2-tour-grades th, .v2-tour-grades td { padding: var(--v2-space-2); border-bottom: 1px solid var(--v2-border); text-align: left; vertical-align: middle; font-weight: 400; }
.v2-tour-grades thead th { font-size: var(--v2-size-sm); font-weight: 600; }
.v2-tour-grades thead label, .v2-tour-grade { display: inline-flex; align-items: center; gap: var(--v2-space-2); min-height: 44px; cursor: pointer; }
.v2-tour-grades tbody th > * { margin-right: var(--v2-space-2); }
.v2-tour-grades tbody th [lang^="zh"] { font-size: var(--v2-size-xl); font-weight: 600; }
.v2-tour-grade-meaning { color: var(--v2-muted); font-size: var(--v2-size-sm); }
.v2-tour-grade.is-high strong { color: var(--v2-success); }
@media (max-width: 599px) {
  .v2-tour-card { padding: var(--v2-space-3); }
  .v2-tour-profile { grid-template-columns: minmax(0, 1fr); }
  .v2-tour-profile-board { max-width: 240px; justify-self: center; }
}

/* Drawing steps in Course Review and Writing (trace, starting points, missing strokes, from memory). */
.v2-tour-draw { justify-items: center; text-align: center; }
.v2-tour-draw .v2-tour-profile-word { text-align: left; }
.v2-tour-draw .v2-flashcard-instruction, .v2-tour-draw-status { margin: 0; }
.v2-tour-draw-status { min-height: 1.5rem; }
.v2-tour-draw-board { width: min(100%, 320px); color: var(--v2-text); touch-action: none; user-select: none; cursor: crosshair; }
/* Stats pages: the score first, as a row of numbers. */
.v2-stat-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--v2-space-3); margin: 0; }
.v2-stat-summary > div { min-width: 0; padding: var(--v2-space-3) var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-radius); background: var(--v2-surface); }
.v2-stat-summary dt { color: var(--v2-muted); font-size: var(--v2-size-sm); }
.v2-stat-summary dd { margin: var(--v2-space-1) 0 0; font-size: var(--v2-size-3xl); line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-stat-summary small { color: var(--v2-muted); font-size: var(--v2-size-sm); font-weight: 400; }
/* Board controls: neutral squares change the drawing, accent squares give help. */
.v2 .v2-stroke-tool { color: var(--v2-text); border-color: var(--v2-border); }
.v2 .v2-stroke-help { color: var(--v2-accent); border-color: var(--v2-accent); }
.v2 .v2-stroke-help[aria-pressed="true"] { background: var(--v2-accent); color: var(--v2-on-accent); }
.v2-stroke-guide path, .v2-stroke-given path { stroke: none; }
.v2-stroke-given { fill: var(--v2-muted); pointer-events: none; }
.v2-stroke-guide { fill: color-mix(in srgb, var(--v2-text) 22%, var(--v2-surface)); pointer-events: none; }
.v2-stroke-guide path[hidden] { display: none; }
.v2-stroke-guide path.is-done { fill: var(--v2-text); }
.v2-stroke-guide path.is-missed { fill: color-mix(in srgb, var(--v2-error) 60%, var(--v2-surface)); }
.v2-stroke-guide path.is-next { fill: color-mix(in srgb, var(--v2-action) 45%, var(--v2-surface)); }
.v2-stroke-guide path.is-snapped { animation: v2-tour-snap .5s ease-out; }
@keyframes v2-tour-snap { from { fill: var(--v2-action); } to { fill: var(--v2-text); } }
@media (prefers-reduced-motion: reduce) { .v2-stroke-guide path.is-snapped { animation: none; } }
.v2-stroke-starts polyline { fill: none; stroke: var(--v2-action); stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 44; pointer-events: none; }
/* The first stretch of a stroke is solid, to show which way it runs. */
.v2-stroke-starts polyline.is-lead { stroke-dasharray: none; stroke-width: 22; }
.v2-stroke-starts circle { fill: var(--v2-action); stroke: var(--v2-surface); stroke-width: 8; pointer-events: none; }
.v2-stroke-ink path { fill: none; stroke: var(--v2-text); stroke-width: 18; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.v2-stroke-ink path.is-rejected { stroke: var(--v2-error); }
/* Missing strokes start whole; Start hides the character and returns it with strokes gone. */
.v2 [data-waiting] .v2-stroke-guide path[hidden] { display: inline !important; fill: var(--v2-action); }
[data-waiting] .v2-stroke-board { cursor: pointer; }
.v2-stroke-board > g { transition: opacity .3s ease; }
.v2-stroke-board.is-away > g { opacity: 0; }
.v2-stroke-board.is-back { animation: v2-tour-back .35s ease-out; }
@keyframes v2-tour-back { from { transform: scale(.9); } 60% { transform: scale(1.04); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .v2-stroke-board > g { transition: none; } }
/* Course Review progress map: one group per word, one box per step. */
.v2-tour-map { display: grid; gap: var(--v2-space-1); }
.v2-tour-map ol { display: flex; flex-wrap: wrap; gap: var(--v2-space-2) var(--v2-space-4); margin: 0; padding: 0; list-style: none; }
.v2-tour-map-word { display: flex; align-items: center; gap: var(--v2-space-2); font-size: var(--v2-size-md); }
.v2-tour-map-steps { display: flex; gap: 3px; }
.v2-tour-map-step { width: 14px; height: 14px; border: 1px solid var(--v2-control-border); border-radius: 3px; background: var(--v2-soft); }
.v2-tour-map-step:is([data-kind="meet"], [data-kind="quiz"]) { border-radius: 50%; }
.v2-tour-map-step.is-done { border-color: var(--v2-progress-fill); background: var(--v2-progress-fill); }
/* Skipped: an empty dashed box with a slash, so it never reads as done. */
.v2-tour-map-step.is-skipped { border-style: dashed; border-color: var(--v2-muted); background: linear-gradient(to top right, transparent calc(50% - 1px), var(--v2-muted) calc(50% - 1px), var(--v2-muted) calc(50% + 1px), transparent calc(50% + 1px)); }
/* Current: an open green ring, the outline of the solid green it becomes when done. */
.v2-tour-map-step.is-current { border: 2px solid var(--v2-progress-fill); background: transparent; box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-progress-fill) 30%, transparent); }
.v2-tour-map .v2-caption { margin: 0; }
.v2-tour-quiz-status { min-height: 1.5rem; margin: 0; text-align: center; }
/* Choice labels keep their own colours elsewhere; on a filled result they follow the button. */
.v2-tour .v2-answer-choice:is(.v2-answer--success, .v2-answer--error) * { color: inherit; }
/* Course Review Speak step: the shared recorder inside a step card, without its page chrome. */
.v2-tour-speak { justify-items: stretch; }
.v2-tour-speak .v2-flashcard-instruction { margin: 0; text-align: center; }
.v2-tour-speak turbo-frame { display: block; min-height: 12rem; }
.v2 .v2-tour-speak .v2-speaking { width: auto; padding: 0; }
.v2-tour-speak :is(.v2-study-sticky, .v2-speaking-instructions, form[action$="/skip"]) { display: none; }
.v2-tour-speak .v2-speaking-console { border: 0; background: transparent; box-shadow: none; padding: 0; }
.v2-tour-map-step[data-kind="speak"] { border-radius: 50%; }
/* Course Review word screen: the profile layout, for the whole word. */
.v2-tour-word-tile { display: grid; place-items: center; background-image: none; font-family: var(--v2-chinese); font-size: 9rem; line-height: 1; overflow: hidden; }
.v2-tour-word-tile[data-length="2"] { font-size: 6.5rem; }
.v2-tour-word-tile[data-length="3"] { font-size: 4.5rem; }
.v2-tour-word-tile[data-length="4"] { font-size: 3.25rem; }
.v2-tour-meet-word { display: grid; gap: var(--v2-space-1); margin: 0; }
.v2-tour-meet-word .v2-pinyin { font-size: var(--v2-size-2xl); }
.v2-tour-meet-word strong { font-size: var(--v2-size-xl); line-height: 1.3; }
/* Map: the steps for one character sit together in a frame. */
.v2-tour-map-steps--character { align-items: center; padding: 2px 4px; border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); font-size: var(--v2-size-sm); }
.v2-tour-map-steps--character > [lang] { margin-right: 2px; color: var(--v2-muted); }
@media (max-width: 599px) {
  .v2-tour-word-tile { font-size: 7rem; }
  .v2-tour-word-tile[data-length="2"] { font-size: 5rem; }
  .v2-tour-word-tile[data-length="3"] { font-size: 3.5rem; }
  .v2-tour-word-tile[data-length="4"] { font-size: 2.6rem; }
}
.v2-tour-known { margin: 0; justify-self: start; }
/* Course Review: one header line names every step in the same place. */
.v2-tour-now { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-2); margin: 0; min-height: 1.75rem; }
.v2-tour-now .v2-caption { margin: 0; }
/* Drawing board states the learner can read at a glance: ready to draw, then done. */
.v2-tour-draw-stage { position: relative; width: min(100%, 320px); }
.v2-tour-draw-stage .v2-tour-draw-board { width: 100%; transition: border-color .2s ease, box-shadow .2s ease; }
.v2-tour-draw-badge { position: absolute; top: calc(-1 * var(--v2-space-2)); left: 50%; z-index: 1; display: inline-flex; align-items: center; gap: var(--v2-space-1); padding: 2px var(--v2-space-2); border-radius: var(--v2-control-radius); background: var(--v2-action); color: var(--v2-on-action); font-size: var(--v2-size-xs); font-weight: 600; white-space: nowrap; transform: translate(-50%, -50%); animation: v2-tour-badge .35s ease-out; }
.v2-tour-draw-badge svg { width: 14px; height: 14px; }
@keyframes v2-tour-badge { from { opacity: 0; transform: translate(-50%, 20%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.v2-tour-draw[data-ready] .v2-tour-draw-board, .v2-tour-draw[data-tour-step="trace"] .v2-tour-draw-board { border-color: var(--v2-action); box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-action) 35%, transparent); }
.v2-tour-draw[data-complete] .v2-tour-draw-board { border-color: var(--v2-success); box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-success) 45%, transparent); }
.v2-tour-draw[data-waiting] .v2-tour-actions { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .v2-tour-draw-badge { animation: none; } }
/* Course Review map as stages: one labelled block per stage, filling as its steps finish. */
.v2-tour-toggles { display: flex; flex-wrap: wrap; align-items: center; gap: var(--v2-space-2) var(--v2-space-5); }
.v2-tour-map-stages { display: flex; gap: 3px; }
.v2-tour-map-stage { min-width: 2.25rem; padding: 2px var(--v2-space-2); border: 1px solid var(--v2-control-border); border-radius: var(--v2-control-radius); color: var(--v2-muted); font-size: var(--v2-size-xs); font-weight: 600; line-height: 1.5; text-align: center; white-space: nowrap; background: linear-gradient(color-mix(in srgb, var(--v2-progress-fill) 40%, transparent), color-mix(in srgb, var(--v2-progress-fill) 40%, transparent)) left / var(--fill, 0%) 100% no-repeat var(--v2-soft); }
.v2-tour-map-stage.is-done { border-color: var(--v2-progress-fill); background: var(--v2-progress-fill); color: var(--v2-on-success); }
.v2-tour-map-stage.is-skipped { border-style: dashed; border-color: var(--v2-muted); background: transparent; color: var(--v2-muted); text-decoration: line-through; }
.v2-tour-map-stage.is-current { border-color: var(--v2-progress-fill); color: var(--v2-text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-progress-fill) 45%, transparent); }
/* A stage whose switch is off: plainly out of the run, before it is reached. */
.v2-tour-map-stage.is-off { border-style: dashed; border-color: var(--v2-border); background: transparent; color: var(--v2-muted); text-decoration: line-through; opacity: .55; box-shadow: none; }
/* Results: each cell carries its level; a level gained this round stands out. */
.v2-tour-level { padding: 1px var(--v2-space-2); border: 1px solid var(--v2-control-border); border-radius: var(--v2-control-radius); color: var(--v2-muted); font-size: var(--v2-size-xs); font-weight: 600; white-space: nowrap; }
.v2-tour-level.is-up { border-color: var(--v2-progress-fill); background: var(--v2-progress-fill); color: var(--v2-on-success); animation: v2-tour-level-up .6s ease-out; }
@keyframes v2-tour-level-up { from { transform: scale(.7); } 60% { transform: scale(1.15); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .v2-tour-level.is-up { animation: none; } }
/* Speaking level 2 and up: the prompt shows the characters without pinyin. */
.v2 .v2-tour-speak[data-pinyin="hidden"] .v2-speaking-prompt-text :is(rt, .v2-speaking-pinyin-line, .v2-speaking-pinyin-only) { display: none !important; }
/* Drawing from memory: the character is blurred wherever it appears; press to peek. */
.v2-tour .is-veiled { filter: blur(.42em); cursor: pointer; user-select: none; transition: filter .15s ease; }
.v2-tour .is-veiled.is-peeking { filter: none; }
@media (prefers-reduced-motion: reduce) { .v2-tour .is-veiled { transition: none; } }
/* Results: Writing climbs stroke by stroke, Speaking earns stars. */
.v2-tour-climb { display: inline-flex; align-items: center; gap: var(--v2-space-1); color: var(--v2-muted); font-size: var(--v2-size-xs); font-weight: 600; white-space: nowrap; }
.v2-tour-climb progress { width: 4rem; height: 8px; accent-color: var(--v2-progress-fill); }
.v2-tour-climb.is-top { color: var(--v2-success); }
.v2-tour-stars { display: inline-flex; gap: 1px; color: var(--v2-control-border); font-size: var(--v2-size-base); line-height: 1; }
.v2-tour-stars .is-earned { color: var(--v2-practice); }
:is(.v2-tour-climb, .v2-tour-stars).is-up { animation: v2-tour-level-up .6s ease-out; }
@media (prefers-reduced-motion: reduce) { :is(.v2-tour-climb, .v2-tour-stars).is-up { animation: none; } }
/* Stages are buttons: press one to open it from its first step. */
button.v2-tour-map-stage { font-family: inherit; cursor: pointer; }
button.v2-tour-map-stage:hover { border-color: var(--v2-text); color: var(--v2-text); opacity: 1; }
button.v2-tour-map-stage:focus-visible { outline: 3px solid var(--v2-accent); outline-offset: 2px; }
button.v2-tour-map-stage.is-opening { border-color: var(--v2-progress-fill); box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-progress-fill) 45%, transparent); }
.v2-stroke-starts polygon { fill: var(--v2-action); pointer-events: none; }
/* Results column headings: the name, and a text button for the whole column (not another checkbox). */
.v2-tour-column { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: var(--v2-space-1) var(--v2-space-3); }
.v2-tour-column-all { padding: 0; border: 0; background: none; color: var(--v2-accent); font: inherit; font-size: var(--v2-size-xs); font-weight: 600; text-decoration: underline; cursor: pointer; }
.v2-tour-column-all:focus-visible { outline: 3px solid var(--v2-accent); outline-offset: 2px; }
/* Results: keep reviewing on the left, finish on the right, equal weight in width. */
.v2-tour-finish { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-3); }
.v2-tour-finish > * { width: 100%; justify-content: center; }
.v2-tour-back { margin: 0; text-align: right; font-size: var(--v2-size-sm); }

/* Control depth: fields are wells set into the card, buttons sit above it. */
.v2 .v2-field :is(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color]), select, textarea) { background-color: var(--v2-input); box-shadow: var(--v2-input-shadow); transition: border-color var(--v2-motion), box-shadow var(--v2-motion); }
.v2 .v2-field :is(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color]), select, textarea):hover:not(:disabled, :focus) { border-color: var(--v2-text); }
.v2 .v2-field :is(input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color]), select, textarea):focus { outline: none; border-color: var(--v2-action); box-shadow: var(--v2-input-shadow), 0 0 0 3px color-mix(in srgb, var(--v2-action) 45%, transparent); }
.v2 .v2-field :is(input, select, textarea)::placeholder { color: var(--v2-muted); opacity: .75; }
.v2 .v2-field select:not([multiple], [size]) { appearance: none; padding-inline-end: calc(var(--v2-space-3) * 2 + 1rem); background-image: var(--v2-select-arrow); background-repeat: no-repeat; background-position: right var(--v2-space-3) center; background-size: 1rem; text-overflow: ellipsis; cursor: pointer; }
.v2 .v2-button--primary { box-shadow: 0 1px 2px #00000059, inset 0 1px 0 #ffffff38; }
.v2 .v2-button--secondary { box-shadow: var(--v2-control-shadow); }
.v2 .v2-button:active:not(:disabled, [aria-disabled="true"]) { box-shadow: inset 0 1px 3px #00000059; }
.v2-segmented { box-shadow: var(--v2-input-shadow); }
.v2-segmented input:checked + span { box-shadow: 0 1px 2px #00000059, inset 0 1px 0 #ffffff38; }
/* Course Review map: one stage for each word, then components and the quiz. */
.v2-tour-map ol { gap: var(--v2-space-1); }
.v2-tour-map-stage--word { padding: 0 var(--v2-space-2); font-size: var(--v2-size-md); font-weight: 500; line-height: 1.6; }
/* Course Review: build a word on the Writing drag board (same classes as the Writing board). */
.v2-tour-build { justify-items: stretch; }
.v2-writing-instruction { margin: 0; }
/* Each word's characters sit together under its reading and meaning. */
.v2-tour-build-words { display: flex; flex-wrap: wrap; gap: var(--v2-space-3); }
/* Each word is one framed unit, so a word of several characters reads as one word. */
.v2-tour-build-group { display: grid; gap: var(--v2-space-2); align-content: start; padding: var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-tour-build-group .v2-writing-cells { gap: var(--v2-space-1); }
.v2-tour-build-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--v2-space-2); margin: 0; color: var(--v2-muted); font-size: var(--v2-size-sm); }
.v2-tour-build-label .v2-pinyin { font-size: var(--v2-size-md); }
.v2-tour-build-label > span:last-child { color: var(--v2-text); font-size: var(--v2-size-md); font-weight: 700; }
.v2-tour-build-group .v2-writing-cells { flex-wrap: nowrap; }
.v2-tour-build-group { max-width: 100%; }
.v2-tour-build-group .v2-writing-cell { flex: 0 1 180px; width: auto; min-width: 0; }
.v2-tour-parts-intro .v2-tour-profile-word:not(:first-child) { margin-top: var(--v2-space-4); }
.v2-writing-status { min-height: 1.5rem; margin: 0; }
.v2-tour-build[data-result="passed"] .v2-writing-status { color: var(--v2-success); font-weight: 700; }
.v2-writing-cells { display: flex; flex-wrap: wrap; gap: .75rem; }
.v2-writing-cell { margin: 0; width: min(200px, 44vw); display: grid; gap: .3rem; }
.v2-writing-board { touch-action: none; user-select: none; }
.v2-writing-cell.is-active .v2-writing-board { border-color: var(--v2-accent); }
.v2-writing-cell figcaption { display: grid; font-size: .8rem; line-height: 1.35; }
.v2-writing-cell figcaption strong { font-family: var(--v2-pinyin-font); color: var(--v2-pinyin); }
.v2-writing-cell figcaption span { color: var(--v2-muted); }
.v2-writing-placed { fill: var(--v2-text); }
.v2-writing-placed [data-piece] { cursor: grab; outline: none; }
.v2-writing-placed [data-piece][aria-pressed="true"] { fill: var(--v2-action); }
.v2-writing-placed [data-piece]:focus-visible { fill: var(--v2-action); }
.v2-writing-placed [data-piece].is-wrong { fill: var(--v2-error); }
.v2-writing-cell.is-complete .v2-writing-placed { display: none; }
.v2-writing-cell.is-complete .v2-writing-outline { display: inline; fill: var(--v2-text); }
.v2-writing-outline { display: none; fill: color-mix(in srgb, var(--v2-text) 16%, var(--v2-surface)); pointer-events: none; }
.v2-writing-cell.is-outlined:not(.is-complete) .v2-writing-outline { display: inline; }
.v2-writing-cell.is-complete .v2-writing-board { border-color: var(--v2-success); }
/* A look at the answer after a miss: the character with each part in its colour, the pool out of sight. */
.v2-writing-cell.is-shown .v2-writing-placed { display: none; }
.v2-writing-cell.is-shown .v2-writing-outline { display: inline; fill: var(--v2-text); }
.v2-writing-cell.is-shown .v2-writing-outline path[data-part="0"] { fill: var(--v2-part-0); }
.v2-writing-cell.is-shown .v2-writing-outline path[data-part="1"] { fill: var(--v2-part-1); }
.v2-writing-cell.is-shown .v2-writing-outline path[data-part="2"] { fill: var(--v2-part-2); }
.v2-writing-cell.is-shown .v2-writing-outline path[data-part="3"] { fill: var(--v2-part-3); }
.v2-writing-cell.is-shown .v2-writing-board { border-color: var(--v2-error); }
.v2-writing-tiles[data-away] { visibility: hidden; }
.v2-writing-tiles { display: flex; flex-wrap: wrap; gap: .5rem; padding: .6rem; min-height: 92px; border: 1px dashed var(--v2-control-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2 .v2-writing-tile { width: 76px; height: 76px; padding: 4px; border: 1px solid var(--v2-control-border); border-radius: var(--v2-control-radius); background: var(--v2-surface); color: var(--v2-text); cursor: grab; touch-action: none; }
.v2 .v2-writing-tile svg { display: block; width: 100%; height: 100%; fill: currentColor; pointer-events: none; }
.v2 .v2-writing-tile:disabled { visibility: hidden; }
.v2-writing-ghost { position: fixed; z-index: 1000; pointer-events: none; color: var(--v2-action); opacity: .85; }
.v2-writing-ghost svg { display: block; width: 100%; height: 100%; overflow: visible; fill: currentColor; }
.v2-tour-components { display: flex; flex-wrap: wrap; gap: 0 var(--v2-space-3); }
.v2-tour-components [lang] { font-family: var(--v2-chinese); font-size: var(--v2-size-md); color: var(--v2-text); }
/* Course Review results: one line per section, with its own Redo. */
.v2-tour-results { display: grid; margin: 0; padding: 0; list-style: none; }
.v2-tour-result { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--v2-space-2) var(--v2-space-4); padding: var(--v2-space-3) 0; border-bottom: 1px solid var(--v2-border); }
.v2-tour-result-name { display: grid; gap: 2px; min-width: 0; }
.v2-tour-result-name strong { font-size: var(--v2-size-lg); }
.v2-tour-result-name small { color: var(--v2-muted); font-size: var(--v2-size-sm); }
.v2-tour-result-name small [lang] { margin-left: var(--v2-space-1); color: var(--v2-text); font-size: var(--v2-size-md); }
.v2-tour-result-score { min-width: 4.5rem; text-align: right; white-space: nowrap; }
.v2-tour-result-score strong { font-size: var(--v2-size-xl); }
.v2-tour-result-score.is-high strong { color: var(--v2-success); }
.v2-tour-results-heading { margin: var(--v2-space-4) 0 0; color: var(--v2-muted); }
.v2-tour-result-done { color: var(--v2-success); font-weight: 700; }
.v2-tour-result-done::before { content: "\2713\00a0"; }
.v2-tour-result-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--v2-space-2); }
.v2-tour-tests .v2-tour-results-heading { margin-top: 0; }
.v2-quiz-tally { display: inline-flex; gap: var(--v2-space-3); margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.v2-quiz-tally-right { color: var(--v2-success); }
.v2-quiz-tally-wrong { color: var(--v2-error); }
.v2-quiz-score { display: flex; align-items: center; gap: var(--v2-space-4); }
.v2-quiz-score-value { font-size: clamp(2.5rem, 8vw, 3.5rem); line-height: 1; font-variant-numeric: tabular-nums; }
.v2-quiz-score h2 { font-size: var(--v2-size-xl); }
.v2-quiz-score p { margin: var(--v2-space-1) 0 0; }
.v2-run-end { display: flex; justify-content: center; margin-top: var(--v2-space-2); }
.v2-tour-related { display: grid; gap: var(--v2-space-2); margin: 0; }
.v2-tour-related dt { color: var(--v2-muted); font-size: var(--v2-size-xs); }
.v2-tour-related dt [lang] { color: var(--v2-text); font-size: var(--v2-size-md); }
.v2-tour-related dd { margin: var(--v2-space-1) 0 0; }
.v2-tour-related-words { display: flex; flex-wrap: wrap; gap: var(--v2-space-1) var(--v2-space-2); }
.v2-tour-parts-list li > .v2-tour-related-words { grid-column: 1 / -1; margin-top: var(--v2-space-2); }
.v2-tour-related-word { display: inline-flex; align-items: baseline; gap: var(--v2-space-1); padding: 2px var(--v2-space-2); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); font-size: var(--v2-size-sm); }
.v2-tour-related-word strong { font-size: var(--v2-size-md); }
.v2-tour-related-word.is-later { border-style: dashed; }
.v2-tour-quiz-words tr.is-current th, .v2-tour-quiz-words tr.is-current td { background: var(--v2-soft); }
.v2-tour-words { padding-block: var(--v2-space-2); }
/* Review game: a card is recalled, shown, then sent left (again) or right (got it). */
.v2-tour { overflow-x: clip; }
.v2-game-piles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; color: var(--v2-muted); font-size: var(--v2-size-sm); }
.v2-game-pile:nth-child(2) { text-align: center; }
.v2-game-pile:nth-child(3) { text-align: right; }
.v2-game-pile strong { margin-left: var(--v2-space-1); color: var(--v2-text); font-size: var(--v2-size-lg); }
.v2-game-pile--again strong { color: var(--v2-error); }
.v2-game-pile--got strong { color: var(--v2-success); }
.v2-game-card { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; touch-action: pan-y; transition: transform .25s ease, opacity .25s ease, border-color .15s ease; }
.v2-game-card.is-dragging { transition: border-color .15s ease; cursor: grabbing; user-select: none; }
.v2-game-card[data-lean="left"] { border-color: var(--v2-error); }
.v2-game-card[data-lean="right"] { border-color: var(--v2-success); }
.v2-game-card.is-left { transform: translateX(-110%) rotate(-10deg); opacity: 0; }
.v2-game-card.is-right { transform: translateX(110%) rotate(10deg); opacity: 0; }
.v2-game-blanks { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; align-items: center; gap: var(--v2-space-2); min-height: 6.5rem; margin: 0; }
.v2-game-blank { min-width: 8rem; padding: var(--v2-space-2) var(--v2-space-4); border: 1px dashed var(--v2-border); border-radius: var(--v2-control-radius); color: var(--v2-muted); font-size: var(--v2-size-sm); }
.v2-game-blank b { margin-left: var(--v2-space-1); color: var(--v2-text); font-size: var(--v2-size-lg); }
.v2-game-card:has(.v2-game-answer[open]) .v2-game-blanks { display: none; }
.v2-game-answer { width: 100%; max-width: 28rem; text-align: center; }
.v2-game-answer > summary { display: flex; justify-content: center; list-style: none; cursor: pointer; }
.v2-game-answer > summary::-webkit-details-marker { display: none; }
.v2-game-answer[open] > summary { display: none; }
.v2-game-reveal { display: grid; gap: var(--v2-space-4); }
.v2-game-back { display: grid; align-content: center; gap: var(--v2-space-1); min-height: 6.5rem; margin: 0; font-size: var(--v2-size-xl); }
.v2-game-back small { color: var(--v2-muted); font-size: var(--v2-size-md); }
.v2-game-back small [lang^="zh"] { font-size: var(--v2-size-xl); }
.v2-game-asked [lang^="zh"] { font-family: var(--v2-chinese); font-size: 2.5rem; line-height: 1.2; }
.v2-game-sort { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--v2-space-3); }
.v2-game-sort > * { justify-content: center; }
@media (prefers-reduced-motion: reduce) { .v2-game-card { transition: none; } }
/* Review game matching board: pinyin tiles are dragged onto each word's row. */
.v2-match-rows { display: grid; gap: var(--v2-space-2); margin: 0; padding: 0; list-style: none; }
.v2-match-row { display: grid; grid-template-columns: 5.5rem minmax(7rem, 11rem) minmax(0, 1fr); align-items: center; gap: var(--v2-space-3); padding: var(--v2-space-2) var(--v2-space-3); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-match-row.is-over { border-color: var(--v2-action); }
.v2-match-row.is-done { border-color: var(--v2-success); }
.v2-match-row.is-wrong { animation: v2-match-wrong .35s ease; }
@keyframes v2-match-wrong { 25% { transform: translateX(-6px); border-color: var(--v2-error); } 75% { transform: translateX(6px); border-color: var(--v2-error); } }
.v2-match-hanzi { font-family: var(--v2-chinese); font-size: var(--v2-size-2xl); font-weight: 400; white-space: nowrap; }
.v2-match-other--meaning { font-weight: 700; }
.v2-match-slot { min-height: 2.5rem; padding: var(--v2-space-1) var(--v2-space-3); border: 1px dashed var(--v2-border); border-radius: var(--v2-control-radius); background: transparent; color: var(--v2-muted); font: inherit; font-size: var(--v2-size-sm); cursor: pointer; }
.v2-match-row.is-done .v2-match-slot { border-style: solid; border-color: transparent; color: var(--v2-text); font-size: var(--v2-size-lg); cursor: default; }
.v2-match-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--v2-space-2); min-height: 3.25rem; padding: var(--v2-space-2); border: 1px dashed var(--v2-border); border-radius: var(--v2-control-radius); }
.v2-match-tile { padding: var(--v2-space-2) var(--v2-space-4); border: 1px solid var(--v2-border); border-radius: var(--v2-control-radius); background: var(--v2-surface); font: inherit; font-size: var(--v2-size-lg); cursor: grab; touch-action: none; user-select: none; }
.v2-match-tile.is-picked { border-color: var(--v2-action); box-shadow: 0 0 0 2px var(--v2-action); }
.v2-match-tile.is-dragging { position: relative; z-index: 5; cursor: grabbing; }
@media (max-width: 599px) { .v2-match-row { grid-template-columns: auto minmax(0, 1fr); } .v2-match-other { grid-column: 1 / -1; } }
.v2-tour-words tbody tr { cursor: pointer; }
.v2-tour-words-open { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
/* Review boards: a character lights up when whole, a refused drop shakes, then Again or Got it. */
.v2-tour-build .v2-writing-cell.is-complete .v2-writing-board { border-color: var(--v2-success); animation: v2-board-lit .5s ease; }
/* A refused card is marked as it lands back in its pool, then the mark fades. */
.is-returned { animation: v2-returned 1.8s ease-out; }
@keyframes v2-returned { 0%, 35% { border-color: var(--v2-error); background-color: var(--v2-error-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-error) 35%, transparent); } }
@keyframes v2-board-lit { 40% { transform: scale(1.04); box-shadow: 0 0 0 4px var(--v2-success-bg); } }
.v2-tour-build-group.is-done { border-color: var(--v2-success); }
.v2-writing-cell.is-refused { animation: v2-match-wrong .35s ease; }
.v2-board-review { width: 100%; max-width: 28rem; margin-inline: auto; }
.v2-board-review[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .v2-tour-build .v2-writing-cell.is-complete .v2-writing-board, .v2-writing-cell.is-refused, .v2-match-row.is-wrong { animation: none; } }
.v2-board-score { display: flex; align-items: baseline; justify-content: center; gap: var(--v2-space-2); margin: 0; color: var(--v2-muted); font-size: var(--v2-size-sm); }
.v2-board-score strong { color: var(--v2-text); font-size: var(--v2-size-lg); }
.v2-board-score.is-final strong { color: var(--v2-error); font-size: var(--v2-size-xl); }
.v2-board-score.is-clean strong { color: var(--v2-success); font-size: var(--v2-size-xl); }
.v2-tour-used-in { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--v2-space-1) var(--v2-space-2); margin: 0; padding: var(--v2-space-2) var(--v2-space-3); border-left: 3px solid var(--v2-accent); border-radius: var(--v2-control-radius); background: var(--v2-soft); }
.v2-tour-used-in strong { font-family: var(--v2-chinese); font-size: var(--v2-size-xl); font-weight: 400; }
.v2-tour-finish--single { grid-template-columns: minmax(0, 1fr); }
/* Course Review: a word's characters with their components named, before it is built. */
.v2-tour-parts-rows { display: grid; gap: var(--v2-space-3); }
.v2-tour-parts-row { display: grid; grid-template-columns: minmax(0, 9rem) minmax(0, 1fr); align-items: center; gap: var(--v2-space-3); }
@media (max-width: 599px) { .v2-tour-parts-row { grid-template-columns: minmax(0, 6rem) minmax(0, 1fr); } }
/* Speaker avatars: a filled bust on a tinted disc, no ring. */
.v2-reader-avatar { width: 28px; height: 28px; flex-basis: 28px; border: 0; background: color-mix(in srgb, var(--v2-speaker) 18%, var(--v2-surface)); }
.v2-reader-avatar .v2-icon { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.v2-reader-info { flex-basis: 2rem; width: 2rem; height: 2rem; padding: 0; }
.v2-reader-info .v2-icon { width: 1.25rem; height: 1.25rem; stroke-width: 2.2; }
/* Results: a shorter heading, and the reading text as compact lines with their recordings. */
.v2-completion-heading { gap: var(--v2-space-3); }
.v2-completion-heading h2 { font-size: var(--v2-size-xl); }
.v2-completion-heading p { margin-top: 2px; font-size: var(--v2-size-md); }
.v2-completion-mark { flex-basis: 2.25rem; height: 2.25rem; }
.v2-completion-mark .v2-icon { width: 1.1rem; height: 1.1rem; }
.v2-completion-actions { margin-bottom: var(--v2-space-2); }
.v2-results-source:has(> .v2-results-passage-line) > h3 { padding: var(--v2-space-2) var(--v2-space-3); font-size: var(--v2-size-md); }
.v2-results-passage-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px var(--v2-space-3); padding: var(--v2-space-2) var(--v2-space-3); }
.v2-results-passage-line > * { grid-column: 1; }
.v2-results-passage-line > .v2-reader-speaker { margin: 0; padding: 0; background: transparent; font-size: var(--v2-size-sm); }
.v2-results-passage-line > .v2-reader-speaker .v2-reader-avatar { width: 20px; height: 20px; flex-basis: 20px; }
.v2-results-passage-line > .v2-reader-speaker .v2-reader-avatar .v2-icon { width: 13px; height: 13px; }
.v2-results-passage-line > .v2-audio-player { grid-column: 2; grid-row: 1 / span 2; }
.v2-results-passage-line .v2-results-sentence { font-size: var(--v2-size-lg); }
/* Course Review results: the quiz word by word. */
.v2-tour-results-heading { margin: var(--v2-space-3) 0 0; }
.v2-tour-quiz-words { width: 100%; border-collapse: collapse; font-size: var(--v2-size-md); }
.v2-tour-quiz-words th, .v2-tour-quiz-words td { padding: 3px var(--v2-space-3) 3px 0; border-bottom: 1px solid var(--v2-border); text-align: left; vertical-align: middle; font-weight: 400; }
.v2-tour-quiz-words thead th { color: var(--v2-muted); font-size: var(--v2-size-sm); font-weight: 500; }
.v2-tour-quiz-audio { width: 1%; }
.v2-tour-quiz-hanzi { width: 1%; white-space: nowrap; font-family: var(--v2-chinese); font-size: var(--v2-size-lg); }
.v2-tour-quiz-pinyin { width: 1%; white-space: nowrap; }
.v2-tour-quiz-meaning { color: var(--v2-muted); }
.v2-tour-quiz-words .v2-tour-quiz-mark { width: 6.5rem; padding-right: 0; text-align: center; white-space: nowrap; }
.v2-tour-quiz-mark.is-right { color: var(--v2-success); font-weight: 700; }
.v2-tour-quiz-mark.is-wrong { color: var(--v2-error); font-weight: 700; }
.v2-tour-quiz-mark small { color: var(--v2-muted); font-size: var(--v2-size-sm); font-weight: 400; }
.v2-tour-quiz-mark.is-skipped { color: var(--v2-muted); }
@media (max-width: 599px) { .v2-tour-quiz-meaning { display: none; } .v2-tour-quiz-words .v2-tour-quiz-mark { width: 4.5rem; white-space: normal; } }
/* Course Writing gauntlet: a path of gates per character, seals, points and a streak. */
.v2-gauntlet { --v2-seal: #b3261e; --v2-seal-bronze: #a0623a; --v2-seal-silver: #7d8792; --v2-seal-gold: #b98a12; }
:root[data-theme="dark"] .v2-gauntlet { --v2-seal-bronze: #d08a5c; --v2-seal-silver: #b4bdc7; --v2-seal-gold: #ecc04d; }
.v2-gauntlet-map { display: grid; gap: var(--v2-space-2); }
.v2-gauntlet-map ol { display: flex; flex-wrap: wrap; gap: var(--v2-space-2); margin: 0; padding: 0; list-style: none; }
.v2-gauntlet-stage { display: grid; justify-items: center; gap: 3px; min-width: 2.5rem; padding: 3px var(--v2-space-2) 5px; border: 1px solid var(--v2-control-border); border-radius: var(--v2-control-radius); background: var(--v2-soft); color: var(--v2-muted); }
.v2-gauntlet-stage.is-current { border-color: var(--v2-progress-fill); color: var(--v2-text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-progress-fill) 45%, transparent); }
.v2-gauntlet-stage.is-sealed { color: var(--v2-text); }
.v2-gauntlet-stage.is-bronze { border-color: var(--v2-seal-bronze); }
.v2-gauntlet-stage.is-silver { border-color: var(--v2-seal-silver); }
.v2-gauntlet-stage.is-gold { border-color: var(--v2-seal-gold); background: color-mix(in srgb, var(--v2-seal-gold) 14%, var(--v2-surface)); }
.v2-gauntlet-stage.is-none { border-style: dashed; color: var(--v2-muted); }
.v2-gauntlet-stage-name { font-size: var(--v2-size-md); font-weight: 600; line-height: 1.2; }
.v2-gauntlet-stage-name[lang="zh"] { font-family: var(--v2-chinese); font-size: var(--v2-size-lg); }
.v2-gauntlet-marks { display: flex; gap: 3px; }
.v2-gauntlet-marks i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--v2-control-border); background: transparent; }
.v2-gauntlet-marks .is-current { border-color: var(--v2-progress-fill); box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-progress-fill) 35%, transparent); }
.v2-gauntlet-marks .is-p3 { border-color: var(--v2-progress-fill); background: var(--v2-progress-fill); }
.v2-gauntlet-marks .is-p2 { border-color: var(--v2-progress-fill); background: color-mix(in srgb, var(--v2-progress-fill) 55%, transparent); }
.v2-gauntlet-marks .is-p1 { border-color: var(--v2-practice); background: color-mix(in srgb, var(--v2-practice) 55%, transparent); }
.v2-gauntlet-marks .is-skipped { border-style: dashed; border-color: var(--v2-muted); }
.v2-gauntlet-hud { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--v2-space-1) var(--v2-space-4); margin: 0; font-size: var(--v2-size-sm); color: var(--v2-muted); }
.v2-gauntlet-hud .v2-eyebrow { margin-right: auto; }
.v2-gauntlet-hud strong { font-variant-numeric: tabular-nums; }
.v2-gauntlet-points strong, .v2-gauntlet-streak strong { color: var(--v2-text); font-size: var(--v2-size-md); }
.v2-gauntlet-streak.is-hot, .v2-gauntlet-streak.is-hot strong { color: var(--v2-practice); }
/* Gate 1: strokes pressed in order. */
.v2-gauntlet-order-board { touch-action: manipulation; cursor: pointer; }
.v2-gauntlet-strokes path { fill: color-mix(in srgb, var(--v2-text) 22%, var(--v2-surface)); stroke: none; transition: fill .15s ease; }
.v2-gauntlet-strokes path.is-done { fill: var(--v2-text); }
.v2-gauntlet-strokes path.is-wrong { fill: var(--v2-error); }
.v2-gauntlet-strokes path.is-hint { fill: color-mix(in srgb, var(--v2-action) 55%, var(--v2-surface)); }
[data-watching] .v2-gauntlet-strokes path { fill: color-mix(in srgb, var(--v2-text) 10%, var(--v2-surface)); }
.v2-gauntlet-demo path { fill: var(--v2-action); stroke: none; pointer-events: none; }
.v2-gauntlet-order[data-complete] .v2-gauntlet-order-board, .v2-gauntlet-build[data-result="passed"] .v2-writing-board { border-color: var(--v2-progress-fill); box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-progress-fill) 35%, transparent); }
.v2-gauntlet-build { justify-items: center; }
.v2-gauntlet-build .v2-writing-cells, .v2-gauntlet-build .v2-writing-tiles { justify-content: center; }
/* A character with its seal. */
.v2-gauntlet-seal { justify-items: center; text-align: center; }
.v2-gauntlet-sealed { position: relative; width: min(100%, 200px); }
.v2-gauntlet-glyph { display: grid; place-items: center; font-family: var(--v2-chinese); font-size: clamp(4rem, 28vw, 7.5rem); line-height: 1; background-image: none; }
.v2-gauntlet-ink { background-image: none; }
.v2-gauntlet-ink polyline { fill: none; stroke: var(--v2-text); stroke-width: 34; stroke-linecap: round; stroke-linejoin: round; }
.v2-gauntlet-stamp { position: absolute; right: -10px; bottom: -10px; display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid currentColor; border-radius: var(--v2-control-radius); background: var(--v2-surface); color: var(--v2-seal-bronze); font-family: var(--v2-chinese); font-size: 1.5rem; font-weight: 700; line-height: 1; transform: rotate(-8deg); animation: v2-gauntlet-stamp .35s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
.v2-gauntlet-stamp.is-silver { color: var(--v2-seal-silver); }
.v2-gauntlet-stamp.is-gold { color: var(--v2-seal-gold); background: color-mix(in srgb, var(--v2-seal-gold) 16%, var(--v2-surface)); }
.v2-gauntlet-stamp.is-none { border-style: dashed; color: var(--v2-muted); animation: none; }
@keyframes v2-gauntlet-stamp { from { opacity: 0; transform: rotate(-8deg) scale(1.9); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .v2-gauntlet-stamp { animation: none; } }
.v2-gauntlet-tally { margin: 0; color: var(--v2-muted); font-variant-numeric: tabular-nums; }
.v2-gauntlet-tally strong { color: var(--v2-text); font-size: var(--v2-size-xl); }
.v2-button.v2-gauntlet-gold { border-color: var(--v2-seal-gold); }
.v2-gauntlet-seals { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--v2-space-4) var(--v2-space-3); margin: 0; padding: 0 var(--v2-space-2) var(--v2-space-2) 0; list-style: none; }
.v2-gauntlet-seals li { display: grid; justify-items: center; gap: 2px; min-width: 0; text-align: center; }
.v2-gauntlet-seals .v2-gauntlet-sealed { width: 88px; margin-bottom: var(--v2-space-2); }
.v2-gauntlet-seals .v2-gauntlet-glyph { font-size: 3.25rem; }
.v2-gauntlet-seals .v2-gauntlet-stamp { width: 32px; height: 32px; font-size: 1.05rem; right: -8px; bottom: -8px; }
.v2-gauntlet-word { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: var(--v2-space-1) var(--v2-space-3); margin: 0; }
.v2-gauntlet-word [lang="zh"] { font-family: var(--v2-chinese); font-size: var(--v2-size-2xl); }

/* Question instructions stay body-sized; only Chinese benefits from display sizing. */
.v2 .v2-player-prompt.v2-question-prompt { font-size: var(--v2-size-base); line-height: 1.5; letter-spacing: normal; font-weight: 500; }
.v2 .v2-question-prompt:not(.v2-builder-prompt) [data-simplified] { font-size: clamp(1.3rem, 3vw, 1.6rem); }
