@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/noto-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/noto-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/material-symbols.woff2) format('woff2');
}

:root {
  color-scheme: light;
  --t-bg: #F6F2E9;
  --t-card: #FFFDF8;
  --t-panel: #F8F4EC;
  --t-fg: #241F15;
  --t-fg2: #635A4B;
  --t-fg3: #766C5C;
  --t-border: #E2DAC9;
  --t-line: #ECE5D6;
  --t-primary: #F2B24F;
  --t-primary-hover: #E9A43A;
  --t-primary-soft: #F6ECD6;
  --t-primary-ink: #7F5A12;
  --t-on-primary: #2A1D05;
  --t-link: #8A5A08;
  --t-link-hover: #6E4806;
  --t-track: #EBE3D2;
  --t-eyebrow: #7F5A12;
  --t-hero: #F6EAD2;
  --t-hero-fg: #241F15;
  --t-hero-border: #E8D5AA;
  --t-hero-ghost: rgba(36, 31, 21, 0.25);
  --t-honey: #F2B24F;
  --t-honey-ink: #7F5A12;
  --t-honey-soft: #F6ECD6;
  --t-success: #4A7330;
  --t-success-soft: #E9F1E1;
  --t-danger: #B0452C;
  --t-danger-soft: #F9E7E1;
  --t-shadow: 0 1px 2px rgba(36, 31, 21, 0.05), 0 4px 16px rgba(36, 31, 21, 0.05);
  --t-shadow-lift: 0 4px 24px rgba(36, 31, 21, 0.10);
  --t-tab-active: #F6ECD6;
  --t-tab-active-fg: #7F5A12;
  --t-topbar: #FFFDF8;
  --t-tabbar: #FFFDF8;
  --t-tabbar-border: #ECE5D6;
  --t-streak-border: #E0C48A;
  --cta: #F2B24F;
  --cta-hover: #E9A43A;
  --cta-ink: #2A1D05;
  --font: 'Noto Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --top: 64px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --t-bg: #16140F;
  --t-card: #1D1A14;
  --t-panel: #221F18;
  --t-fg: #F3EDE2;
  --t-fg2: #A39B8A;
  --t-fg3: #8C8473;
  --t-border: #2A261E;
  --t-line: #2A261E;
  --t-primary: #F2B24F;
  --t-primary-hover: #F6C372;
  --t-primary-soft: #2A2316;
  --t-primary-ink: #C9A35B;
  --t-on-primary: #2A1D05;
  --t-link: #F2B24F;
  --t-link-hover: #F6C372;
  --t-track: #2D2920;
  --t-eyebrow: #C9A35B;
  --t-hero: #262013;
  --t-hero-fg: #F3EDE2;
  --t-hero-border: #3A3020;
  --t-hero-ghost: rgba(243, 237, 226, 0.22);
  --t-honey: #F2B24F;
  --t-honey-ink: #C9A35B;
  --t-honey-soft: #2A2316;
  --t-success: #8FB573;
  --t-success-soft: rgba(143, 181, 115, 0.14);
  --t-danger: #D9735A;
  --t-danger-soft: rgba(217, 115, 90, 0.14);
  --t-shadow: none;
  --t-shadow-lift: 0 10px 30px rgba(0, 0, 0, 0.5);
  --t-tab-active: #2A2316;
  --t-tab-active-fg: #F2B24F;
  --t-topbar: #131109;
  --t-tabbar: #131109;
  --t-tabbar-border: #2A261E;
  --t-streak-border: #5A4A2A;
  --cta: #F2B24F;
  --cta-hover: #F6C372;
  --cta-ink: #2A1D05;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --t-bg: #16140F;
    --t-card: #1D1A14;
    --t-panel: #221F18;
    --t-fg: #F3EDE2;
    --t-fg2: #A39B8A;
    --t-fg3: #8C8473;
    --t-border: #2A261E;
    --t-line: #2A261E;
    --t-primary: #F2B24F;
    --t-primary-hover: #F6C372;
    --t-primary-soft: #2A2316;
    --t-primary-ink: #C9A35B;
    --t-on-primary: #2A1D05;
    --t-link: #F2B24F;
    --t-link-hover: #F6C372;
    --t-track: #2D2920;
    --t-eyebrow: #C9A35B;
    --t-hero: #262013;
    --t-hero-fg: #F3EDE2;
    --t-hero-border: #3A3020;
    --t-hero-ghost: rgba(243, 237, 226, 0.22);
    --t-honey: #F2B24F;
    --t-honey-ink: #C9A35B;
    --t-honey-soft: #2A2316;
    --t-success: #8FB573;
    --t-success-soft: rgba(143, 181, 115, 0.14);
    --t-danger: #D9735A;
    --t-danger-soft: rgba(217, 115, 90, 0.14);
    --t-shadow: none;
    --t-shadow-lift: 0 10px 30px rgba(0, 0, 0, 0.5);
    --t-tab-active: #2A2316;
    --t-tab-active-fg: #F2B24F;
    --t-topbar: #131109;
    --t-tabbar: #131109;
    --t-tabbar-border: #2A261E;
    --t-streak-border: #5A4A2A;
    --cta: #F2B24F;
    --cta-hover: #F6C372;
    --cta-ink: #2A1D05;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 16px); }
body {
  margin: 0;
  background: var(--t-bg);
  color: var(--t-fg);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background 0.2s ease, color 0.2s ease;
}
a { color: var(--t-link); text-decoration: none; }
a:hover { color: var(--t-link-hover); }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--t-primary); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
kbd { font: 700 11px var(--font); padding: 1px 6px; border-radius: 6px; border: 1px solid currentColor; opacity: 0.55; }
em { font-style: italic; }

.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  display: inline-block;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  flex: none;
  overflow: hidden;
  width: 1em;
}

.muted { color: var(--t-fg2); }
.small { font-size: 13px; }
.display, .page-title { font-weight: 700; letter-spacing: -0.5px; line-height: 1.15; }
.eyebrow, .label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t-eyebrow);
}
.label { margin-bottom: 6px; }
.kicker { font-size: 13px; font-weight: 600; color: var(--t-fg2); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plain { letter-spacing: 0; text-transform: none; font-weight: 600; }

.mob-only, .mob-only-flex, .mob-only-inline { display: none !important; }

.wordmark-square { display: inline-block; border-radius: 7px; background: var(--t-honey); flex: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 32px;
  background: var(--t-topbar);
  border-bottom: 1px solid var(--t-tabbar-border);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--t-fg); font-weight: 700; font-size: 17px; letter-spacing: -0.2px; }
.brand:hover { color: var(--t-fg); }
.tabs { display: flex; gap: 4px; flex: 1; min-width: 0; }
.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  color: var(--t-fg2);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.tabs a:hover { color: var(--t-fg); background: var(--t-panel); }
.tabs a.active { background: var(--t-tab-active); color: var(--t-tab-active-fg); font-weight: 700; }
.top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--t-link);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--t-streak-border);
  white-space: nowrap;
}
.streak.cold { background: transparent; border-color: var(--t-border); color: var(--t-fg2); }
.sync { width: 8px; height: 8px; border-radius: 50%; background: var(--t-primary); opacity: 0.9; margin: 0 4px; }
.sync.off { background: var(--t-danger); }
.icon-btn {
  min-width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: none;
  background: none;
  color: var(--t-fg2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { color: var(--t-fg); background: var(--t-panel); }

.bottombar, .more-sheet, .sheet-backdrop { display: none; }

.view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 32px 120px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--t-card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--t-shadow);
  min-width: 0;
  position: relative;
}
.card.flush { padding: 0; overflow: hidden; }
.card .pad, .card-head.pad { padding: 20px 24px 14px; }
.card h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
.card.link { color: var(--t-fg); display: block; transition: background 0.15s ease; }
.card.link:hover { background: var(--t-panel); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.card-title { font-size: 17px; font-weight: 700; margin-top: 2px; line-height: 1.3; }
.card-text { font-size: 14px; color: var(--t-fg2); margin-top: 6px; line-height: 1.5; }
.btn-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { font-size: 17px; font-weight: 700; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--t-border);
  background: var(--t-card);
  color: var(--t-fg);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.4px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.btn:hover { background: var(--t-panel); color: var(--t-fg); }
.btn:disabled { opacity: 0.38; cursor: default; }
.btn.outline { background: transparent; }
.btn.outline:hover { background: var(--t-panel); }
.btn.sm { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.btn.primary { background: var(--t-primary); border-color: var(--t-primary); color: var(--t-on-primary); }
.btn.primary:hover { background: var(--t-primary-hover); border-color: var(--t-link-hover); color: var(--t-on-primary); }
.btn.cta { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); padding: 12px 20px; font-size: 15px; }
.btn.cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--t-fg2); }
.btn.ghost:hover { color: var(--t-fg); background: var(--t-panel); }
.btn.good { background: var(--t-success-soft); border-color: transparent; color: var(--t-success); }
.btn.bad { background: var(--t-danger-soft); border-color: transparent; color: var(--t-danger); }
.btn.done { background: var(--t-success-soft); border-color: transparent; color: var(--t-success); }
.btn.big { min-height: 52px; padding: 0 22px; font-size: 15px; }
.btn.wide { width: 100%; }
.btn kbd { margin-left: 2px; }
.link-btn { background: none; border: none; padding: 0; color: var(--t-link); font-weight: 700; font-size: 13px; cursor: pointer; min-height: 32px; }
.link-btn:hover { color: var(--t-link-hover); }

.chip, .fchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--t-border);
  background: transparent;
  color: var(--t-fg2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.chip span { font-size: 11.5px; color: var(--t-fg3); font-weight: 700; }
.chip:hover, .fchip:hover { color: var(--t-fg); background: var(--t-panel); }
.chip.active, .fchip.active { background: var(--t-tab-active); border-color: var(--t-tab-active); color: var(--t-tab-active-fg); font-weight: 700; }
.chip.active span { color: inherit; opacity: 0.7; }
.chip.big { min-height: 42px; padding: 0 18px; color: var(--t-fg); }
.chips, .chips-row, .filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.small .chip { min-height: 32px; padding: 4px 12px; }

.tag, .lchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--t-primary-ink);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--t-primary-soft);
  border: 1px solid var(--t-border);
  white-space: nowrap;
}
.tag.good { color: var(--t-success); background: var(--t-success-soft); border-color: transparent; }
.tag.big { font-size: 13px; padding: 8px 14px; }
.hchip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--t-honey-soft); color: var(--t-honey-ink); white-space: nowrap; }
.current-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--t-primary-soft); color: var(--t-primary-ink); border: 1px solid var(--t-primary); white-space: nowrap; }

.bar { display: block; height: 6px; border-radius: 999px; background: var(--t-track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--t-primary); transition: width 0.4s ease; }
.bar.small { height: 6px; width: 64px; display: inline-block; vertical-align: middle; }

.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--t-border); }
.dots.seen i:first-child:not(.on) { background: var(--t-honey); }
.dots i.on { background: var(--t-success); }

.unconfirmed {
  display: inline;
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--t-honey-soft);
  color: var(--t-honey-ink);
  white-space: nowrap;
}

.greeting { display: flex; flex-direction: column; }
.greet-line { font-size: 13px; font-weight: 600; color: var(--t-fg2); }
.page-title { font-size: 36px; margin-top: 4px; }
.page-sub { font-size: 14px; color: var(--t-fg2); margin-top: 6px; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.side-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.hero-card {
  background: var(--t-hero);
  color: var(--t-hero-fg);
  border: 1px solid var(--t-hero-border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-height: 200px;
}
.hero-card .eyebrow { color: var(--t-eyebrow); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.hero-headline { font-size: 28px; font-weight: 700; margin-top: 6px; line-height: 1.2; letter-spacing: -0.3px; }
.hero-sub { font-size: 14px; opacity: 0.85; margin-top: 6px; }
.hero-stats { display: flex; gap: 20px; text-align: right; flex-shrink: 0; }
.hero-stats b { display: block; font-size: 24px; font-weight: 700; line-height: 1.2; }
.hero-stats span { font-size: 12px; opacity: 0.75; }
.hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.btn.ghost-hero { background: transparent; color: var(--t-hero-fg); border: 1px solid var(--t-hero-ghost); }
.btn.ghost-hero:hover { background: var(--t-primary-soft); color: var(--t-hero-fg); }

.vocab-card { display: flex; flex-direction: column; gap: 14px; }
.big-stat { display: flex; align-items: baseline; gap: 8px; }
.big-stat b { font-size: 32px; font-weight: 700; line-height: 1; }
.big-stat span { font-size: 14px; color: var(--t-fg2); }
.stack-bar { height: 8px; border-radius: 999px; background: var(--t-track); overflow: hidden; display: flex; }
.stack-bar span { display: block; height: 100%; transition: width 0.4s ease; }
.stack-bar .ok { background: var(--t-success); }
.stack-bar .work { background: var(--t-primary); }
.legend-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--t-fg2); }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw.ok { background: var(--t-success); }
.sw.work { background: var(--t-primary); }
.sw.open { background: var(--t-track); border: 1px solid var(--t-border); }
.footnote { font-size: 12px; color: var(--t-fg3); margin-top: auto; }

.shaky-list { list-style: none; margin: 0; padding: 0; }
.shaky-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--t-line); }
.shaky-list li.extra { display: none; }
.shaky-list.show-all li.extra { display: grid; }
.shaky-main { min-width: 0; display: flex; flex-direction: column; }
.shaky-main b { font-size: 15px; font-weight: 700; }
.shaky-main span { font-size: 13px; color: var(--t-fg2); margin-top: 2px; }
.shaky-meta { display: flex; gap: 8px; align-items: center; }
.shaky-state { font-size: 12px; font-weight: 600; color: var(--t-fg3); white-space: nowrap; }
.more-row { padding-top: 12px; border-top: 1px solid var(--t-line); width: 100%; text-align: left; }
.empty-note { font-size: 14px; color: var(--t-fg2); padding: 12px 0 4px; border-top: 1px solid var(--t-line); }

.last-card .card-title { margin-top: 8px; }
.cover-link { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }

.questions-card { display: flex; flex-direction: column; gap: 12px; }
.q-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.q-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.q-list li > .ms { color: var(--t-link); margin-top: 2px; }
.q-list li > span:not(.ms) { flex: 1; min-width: 0; }
.q-done { border: none; background: none; color: var(--t-fg3); cursor: pointer; padding: 2px; border-radius: 8px; min-width: 32px; min-height: 32px; display: grid; place-items: center; }
.q-done:hover { color: var(--t-success); background: var(--t-success-soft); }
.q-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--t-border);
  background: var(--t-panel);
  color: var(--t-fg3);
  transition: border-color 0.15s ease;
}
.q-form:focus-within { border-color: var(--t-fg); }
.q-form input { flex: 1; min-width: 0; border: none; outline: none; background: none; color: var(--t-fg); font-size: 14px; padding: 2px 0; }
.q-form input::placeholder { color: var(--t-fg3); }

.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head.row { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-head h1 { font-size: 36px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.15; }
.page-head > p.muted { font-size: 14px; }

.lesson-table { padding: 0; }
.lt-head, .lt-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) 220px 120px; gap: 20px; align-items: center; }
.lt-head { padding: 12px 24px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t-fg3); border-bottom: 1px solid var(--t-line); }
.lt-row { padding: 18px 24px; border-bottom: 1px solid var(--t-line); cursor: pointer; transition: background 0.15s ease; }
.lt-row:last-child { border-bottom: none; }
.lt-row:hover { background: var(--t-panel); }
.lnum { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; background: var(--t-honey-soft); color: var(--t-honey-ink); }
.lt-main { min-width: 0; }
.lt-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lt-title a { font-size: 16px; font-weight: 700; color: var(--t-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-topics { font-size: 13px; color: var(--t-fg2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-progress { display: flex; flex-direction: column; gap: 6px; }
.lt-nums { display: flex; justify-content: space-between; font-size: 12px; color: var(--t-fg2); font-weight: 600; }
.lt-mbar { align-items: center; gap: 8px; margin-top: 6px; }
.lt-mbar .bar { flex: 1; height: 5px; }
.lt-mbar > span:last-child { font-size: 11px; color: var(--t-fg2); font-weight: 600; flex-shrink: 0; }

.cs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.cs-card { background: var(--t-card); border-radius: 16px; padding: 20px 24px; box-shadow: var(--t-shadow); break-inside: avoid; min-width: 0; }
.cs-head-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; border: none; background: none; padding: 0; margin-bottom: 0; text-align: left; cursor: pointer; color: var(--t-fg); }
.cs-card.open .cs-head-row { margin-bottom: 8px; }
.cs-body { display: none; }
.cs-card.open .cs-body { display: block; }
.page-head .cs-actions { display: flex; gap: 8px; }
.cs-cat { display: flex; flex-direction: column; gap: 12px; }
.cs-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; border: none; border-bottom: 1px solid var(--t-border); background: none; padding: 10px 2px; cursor: pointer; color: var(--t-fg); text-align: left; }
.cs-cat-title { font-size: 20px; font-weight: 700; }
.cs-count { font-size: 12px; font-weight: 700; color: var(--t-fg3); }
.cs-cat > .cs-grid { display: none; }
.cs-cat.open > .cs-grid { display: grid; }
.cs-row.c4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.cs-title { font-size: 16px; font-weight: 700; }
.cs-right { display: flex; gap: 8px; align-items: center; }
.cs-chevron { color: var(--t-fg2); }
.cs-table + .cs-table { margin-top: 10px; }
.cs-row { display: grid; gap: 12px; padding: 8px 0; border-top: 1px solid var(--t-line); font-size: 14px; line-height: 1.4; }
.cs-row.c2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.cs-row.c3 { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 1fr); }
.cs-row > span:first-child { font-weight: 700; }
.cs-row > span:not(:first-child) { color: var(--t-fg2); }
.cs-row.cs-head { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t-fg3); padding: 6px 0; }
.cs-row.cs-head > span { color: var(--t-fg3); font-weight: 700; }
.cs-note { font-size: 12px; color: var(--t-fg3); margin-top: 10px; font-style: italic; }
.cs-note em { font-style: normal; font-weight: 600; }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--t-fg2); font-weight: 600; font-size: 14px; width: fit-content; }
.back:hover { color: var(--t-fg); }
.back.as-btn { background: none; border: none; padding: 0; cursor: pointer; }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.lesson-head { display: flex; flex-direction: column; gap: 10px; margin-top: -6px; }
.lesson-head h1 { font-size: 36px; font-weight: 700; letter-spacing: -0.5px; line-height: 1.15; max-width: 24ch; }
.lesson-head .lead { font-size: 16px; color: var(--t-fg2); }
.goals { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.goals li { display: flex; gap: 6px; align-items: center; color: var(--t-fg2); font-size: 14px; }
.goals .ms { color: var(--t-success); }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.lesson-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lesson-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 8px; }
.toc { position: sticky; top: calc(var(--top) + 20px); display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - var(--top) - 40px); overflow: auto; }
.toc .label { margin-bottom: 8px; }
.toc a { color: var(--t-fg2); font-size: 14px; padding: 6px 10px; border-left: 2px solid var(--t-line); line-height: 1.35; }
.toc a:hover { color: var(--t-fg); }
.toc a.active { color: var(--t-fg); border-left-color: var(--t-primary); font-weight: 600; }
.lesson-content { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lesson-section { background: var(--t-card); border-radius: 16px; padding: 24px; box-shadow: var(--t-shadow); min-width: 0; }
.lesson-section > h2, .lesson-section summary h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 14px; }
.lesson-section.notes { background: var(--t-panel); box-shadow: none; border: 1px solid var(--t-line); }
.notes summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary h2 { margin-bottom: 0; }
.notes summary::after { content: '+'; margin-left: auto; font-weight: 700; font-size: 20px; color: var(--t-fg2); }
.notes details[open] summary::after { content: '−'; }
.notes details[open] summary { margin-bottom: 14px; }
.source { padding: 0 6px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pager .card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.pager .right { text-align: right; }

.prose { display: flex; flex-direction: column; gap: 14px; color: var(--t-fg2); min-width: 0; font-size: 15px; }
.prose h3, .prose h4 { font-size: 16px; font-weight: 700; color: var(--t-fg); margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.prose li > * + * { margin-top: 8px; }
.prose strong { color: var(--t-fg); font-weight: 700; }
.prose em { color: var(--t-fg); }
.prose code { font-size: 13.5px; background: var(--t-panel); border: 1px solid var(--t-line); border-radius: 6px; padding: 1px 5px; }
.prose pre { margin: 0; background: var(--t-panel); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.prose pre code { background: none; border: none; padding: 0; }
.prose hr { border: none; border-top: 1px solid var(--t-line); margin: 4px 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--t-line); border-radius: 12px; background: var(--t-card); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t-fg3);
  background: var(--t-panel);
  padding: 10px 14px;
  border-bottom: 1px solid var(--t-line);
  white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--t-line); vertical-align: top; color: var(--t-fg2); }
tr:last-child td { border-bottom: none; }
td.tl, td:first-child { color: var(--t-fg); font-weight: 700; }
.card.flush .table-wrap { border: none; border-top: 1px solid var(--t-line); border-radius: 0; }
.verb-table td small { display: block; font-size: 12px; color: var(--t-fg3); font-weight: 400; }
.verb-table td.confirmed { color: var(--t-fg); font-weight: 700; }
.verb-table td.derived { color: var(--t-fg3); }
.verb-table .tag { margin-left: 6px; }
.legend { padding: 12px 24px 18px; color: var(--t-fg2); }
.legend .confirmed { color: var(--t-fg); font-weight: 700; }
.legend .derived { color: var(--t-fg3); text-decoration: underline dotted; }

blockquote { margin: 0; padding: 14px 18px; border-left: 3px solid var(--t-border); color: var(--t-fg2); }
blockquote.reading { background: var(--t-honey-soft); border-left-color: var(--t-honey); border-radius: 0 12px 12px 0; color: var(--t-fg); font-size: 16px; line-height: 1.7; }

.dialog { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 82%; padding: 9px 14px 10px; border-radius: 16px; background: var(--t-panel); color: var(--t-fg); }
.bubble.left { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.right { align-self: flex-end; background: var(--t-primary-soft); border: 1px solid var(--t-line); border-bottom-right-radius: 6px; }
.bubble .who { display: block; font-size: 11px; font-weight: 700; color: var(--t-fg3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }
.gap-dialog { display: flex; flex-direction: column; gap: 12px; }
.gap-input { color: var(--t-fg); background: var(--t-card); border: 1px solid var(--t-border); border-radius: 8px; padding: 2px 8px; min-width: 0; max-width: 100%; }
.gap-input:focus { outline: none; border-color: var(--t-fg); }
.gap-input.good { border-color: var(--t-success); background: var(--t-success-soft); }
.gap-input.bad { border-color: var(--t-danger); background: var(--t-danger-soft); }

.qa { display: flex; flex-direction: column; gap: 16px; margin: 4px 0 20px; }
.qa-q { display: flex; flex-direction: column; gap: 6px; }
.qa-text { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.qa-text .tl { font-weight: 600; }
.qa-input { padding: 8px 10px; font-size: 16px; width: 100%; }
.qa-sol summary { cursor: pointer; color: var(--t-link); font-size: 14px; }
.qa-sol p { margin: 4px 0 0; font-weight: 600; }
.mc { display: flex; flex-direction: column; gap: 18px; }
.mc-q { display: flex; flex-direction: column; gap: 10px; }
.mc-text { color: var(--t-fg); font-weight: 700; }
.mc .choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mc .choice { min-height: 46px; font-size: 15px; }

.filters { display: flex; flex-direction: column; gap: 12px; }
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--t-border);
  background: var(--t-card);
  color: var(--t-fg3);
}
.search:focus-within { border-color: var(--t-fg); }
.search input { flex: 1; border: none; outline: none; background: none; font-size: 15px; color: var(--t-fg); min-width: 0; }
.search input::placeholder { color: var(--t-fg3); }

.vgroup { display: flex; flex-direction: column; gap: 10px; }
.group-title { font-size: 17px; font-weight: 700; display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.group-title span { font-size: 12px; font-weight: 600; color: var(--t-fg3); }
.vlist { list-style: none; margin: 0; padding: 0; background: var(--t-card); border-radius: 16px; box-shadow: var(--t-shadow); overflow: hidden; }
.vrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 16px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--t-line); }
.vrow:last-child { border-bottom: none; }
.v-tl { font-weight: 700; color: var(--t-fg); font-size: 15px; }
.v-de { color: var(--t-fg2); display: flex; flex-direction: column; font-size: 14px; }
.v-de span { color: var(--t-fg3); font-size: 13px; }
.v-meta { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }

.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.topic-card { display: flex; flex-direction: column; gap: 6px; min-height: 164px; }
.topic-num { font-size: 12px; font-weight: 700; color: var(--t-fg3); }
.topic-card h2 { font-size: 19px; font-weight: 700; margin-top: 4px; }
.topic-card p { font-size: 14px; }
.topic-meta { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.topic-parts { display: flex; flex-direction: column; gap: 16px; }
.part { display: flex; flex-direction: column; gap: 12px; }
.part-source { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--t-fg3); text-transform: uppercase; }
.part-source:hover { color: var(--t-link); }
.sticky-cta { position: sticky; bottom: 20px; display: flex; justify-content: center; pointer-events: none; z-index: 5; }
.sticky-cta .btn { pointer-events: auto; box-shadow: var(--t-shadow-lift); }

.today { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px; }
.card.accent { background: var(--t-hero); color: var(--t-hero-fg); border: 1px solid var(--t-hero-border); }
.card.accent .label { color: var(--t-eyebrow); }
.card.accent .small { color: inherit; opacity: 0.85; }
.today-numbers { display: flex; gap: 32px; margin-top: 4px; }
.today-numbers div { display: flex; flex-direction: column; }
.today-numbers b { font-size: 32px; font-weight: 700; line-height: 1.1; }
.today-numbers span { opacity: 0.75; font-size: 13px; margin-top: 2px; }
.today .small { margin-top: 10px; }
.card.accent .btn.primary { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.card.accent .btn.primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }

.settings { display: flex; flex-direction: column; gap: 20px; }
.settings-shared { display: flex; flex-direction: column; gap: 20px; padding-top: 20px; border-top: 1px solid var(--t-line); }
.trainer-mode .seg button { padding: 10px 22px; font-size: 15px; }
.setting .label { margin-bottom: 10px; }
.setting.off { opacity: 0.38; pointer-events: none; }
.setting .small { margin-top: 8px; }
.select { position: relative; display: block; max-width: 460px; }
.select select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  border-radius: 12px;
  border: 1px solid var(--t-border);
  background: var(--t-panel);
  color: var(--t-fg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.select::after { content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--t-fg2); border-bottom: 2px solid var(--t-fg2); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select:focus { outline: none; border-color: var(--t-fg); }
.seg { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; border-radius: 12px; background: var(--t-panel); border: 1px solid var(--t-line); }
.seg button { border: none; background: none; padding: 8px 14px; min-height: 36px; border-radius: 9px; color: var(--t-fg2); font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button:hover { color: var(--t-fg); }
.seg button.active { background: var(--t-tab-active); color: var(--t-tab-active-fg); font-weight: 700; }

.boxes { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin: 18px 0 12px; }
.box-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.box-bar { width: 100%; max-width: 46px; height: 110px; border-radius: 10px; background: var(--t-track); display: flex; align-items: flex-end; overflow: hidden; }
.box-bar i { display: block; width: 100%; background: var(--t-primary); border-radius: 8px 8px 0 0; }
.box-col:first-child .box-bar i { background: var(--t-border); }
.box-col b { font-size: 15px; font-weight: 700; }
.box-col span { font-size: 11px; font-weight: 600; color: var(--t-fg3); }

.path-progress { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--t-fg2); max-width: 420px; }
.path-progress .bar { flex: 1; }
.path { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; position: relative; }
.path-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 12px; }
.path-step::before { content: ''; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--t-line); }
.path-step:last-child::before { display: none; }
.path-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--t-card);
  border: 2px solid var(--t-border);
  font-weight: 700;
  font-size: 15px;
  color: var(--t-fg2);
  position: relative;
  z-index: 1;
}
.path-step.done .path-dot { background: var(--t-success); border-color: var(--t-success); color: var(--t-card); }
.path-step.done::before { background: var(--t-success); opacity: 0.5; }
.path-step.current .path-dot { border-color: var(--t-primary); color: var(--t-link); box-shadow: 0 0 0 5px var(--t-primary-soft); }
.path-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  grid-template-areas: 'kind title bar' 'kind meta bar';
  align-items: center;
  gap: 2px 14px;
  text-align: left;
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: var(--t-card);
  box-shadow: var(--t-shadow);
  cursor: pointer;
  color: var(--t-fg);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.path-card:hover { background: var(--t-panel); }
.path-step.current .path-card { border-color: var(--t-primary); }
.path-kind { grid-area: kind; justify-self: start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 8px; border-radius: 8px; background: var(--t-panel); color: var(--t-fg2); }
.path-kind.rule { background: var(--t-primary-soft); color: var(--t-primary-ink); }
.path-kind.sentences { background: var(--t-honey-soft); color: var(--t-honey-ink); }
.path-kind.verbs { background: var(--t-panel); color: var(--t-fg2); border: 1px solid var(--t-border); }
.path-title { grid-area: title; font-size: 16px; font-weight: 700; }
.path-meta { grid-area: meta; font-size: 13px; color: var(--t-fg2); }
.path-card .bar { grid-area: bar; width: 72px; }

.quiz { max-width: 680px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.quiz-top { display: flex; align-items: center; gap: 14px; }
.quiz-progress { flex: 1; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--t-fg2); }
.quiz-progress .bar { flex: 1; height: 8px; }
.quiz-title { font-size: 12px; font-weight: 700; color: var(--t-fg2); text-transform: uppercase; letter-spacing: 0.08em; }
.quiz-card {
  background: var(--t-card);
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--t-shadow-lift);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s ease;
}
.quiz-card.is-good { border-color: var(--t-success); }
.quiz-card.is-bad { border-color: var(--t-danger); }
.q-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t-fg2); }
.q-label .retry { color: var(--t-honey-ink); }
.q-visual { display: flex; justify-content: center; padding: 6px 0; }
.q-prompt { font-size: clamp(26px, 5vw, 36px); font-weight: 700; line-height: 1.18; letter-spacing: -0.5px; color: var(--t-fg); overflow-wrap: anywhere; }
.q-prompt .gap { display: inline-block; min-width: 2.4em; border-bottom: 3px solid var(--t-primary); color: transparent; }
.q-sub { color: var(--t-fg2); font-size: 16px; margin-top: -6px; }
.q-sub b { color: var(--t-fg); }
.answer-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.answer-input {
  height: 58px;
  border-radius: 12px;
  border: 1px solid var(--t-border);
  background: var(--t-panel);
  padding: 0 18px;
  font-size: 19px;
  font-weight: 600;
  color: var(--t-fg);
  outline: none;
  width: 100%;
}
.answer-input:focus { border-color: var(--t-fg); background: var(--t-card); }
.answer-input::placeholder { color: var(--t-fg3); font-weight: 400; }
.answer-hint { color: var(--t-honey-ink); font-size: 14px; }
.answer-hint:empty { display: none; }
.answer-actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.answer-actions.center { justify-content: center; }
.answer-actions .btn.primary { margin-left: auto; }
.answer-actions.center .btn.primary { margin-left: 0; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.choices.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--t-border);
  background: var(--t-card);
  font-weight: 700;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  color: var(--t-fg);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.choice:hover { border-color: var(--t-primary); background: var(--t-primary-soft); }
.choice kbd { opacity: 0.45; }
.choice.correct { border-color: var(--t-success); background: var(--t-success-soft); color: var(--t-success); }
.choice.wrong { border-color: var(--t-danger); background: var(--t-danger-soft); color: var(--t-danger); }
.choices.dim .choice { cursor: default; min-height: 44px; font-size: 15px; justify-content: center; }
.choices.dim .choice:not(.correct):not(.wrong) { opacity: 0.45; }
.choices.dim .choice:hover:not(.correct):not(.wrong) { border-color: var(--t-border); background: var(--t-card); }
.tiles-answer { min-height: 64px; padding: 10px; border-radius: 12px; border: 1.5px dashed var(--t-border); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.tiles-answer.empty { justify-content: center; }
.tiles-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 46px; }
.tile { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--t-border); border-bottom-width: 3px; background: var(--t-card); color: var(--t-fg); font-weight: 700; font-size: 16px; cursor: pointer; }
.tile:hover { border-color: var(--t-primary); }
.tiles-answer .tile { background: var(--t-primary-soft); }
.feedback { border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.feedback.good { background: var(--t-success-soft); }
.feedback.bad { background: var(--t-danger-soft); }
.feedback.neutral { background: var(--t-panel); }
.fb-head { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.feedback.good .fb-head { color: var(--t-success); }
.feedback.bad .fb-head { color: var(--t-danger); }
.fb-given { color: var(--t-fg2); font-size: 14px; }
.fb-answer { font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--t-fg); }
.fb-answer mark { background: var(--t-honey-soft); color: var(--t-honey-ink); padding: 0 4px; border-radius: 6px; }
.fb-answer .muted { font-weight: 400; font-size: 16px; }
.fb-note { color: var(--t-fg2); font-size: 14px; }
.clock .face { fill: var(--t-panel); stroke: var(--t-border); stroke-width: 1.5; }
.clock .tick { stroke: var(--t-fg3); stroke-width: 1.2; stroke-linecap: round; }
.clock .tick.major { stroke: var(--t-fg); stroke-width: 2.2; }
.clock .hand { stroke-linecap: round; }
.clock .hand.hour { stroke: var(--t-fg); stroke-width: 4.5; }
.clock .hand.minute { stroke: var(--t-primary); stroke-width: 3; }
.clock .pin { fill: var(--t-honey); }

.quiz-end { align-items: center; }
.end-card { width: 100%; background: var(--t-card); border-radius: 20px; padding: 34px 28px 28px; box-shadow: var(--t-shadow-lift); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; position: relative; }
.ring { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--t-track); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--t-primary); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.ring-label { position: absolute; top: 34px; height: 148px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label b { font-size: 32px; font-weight: 700; }
.ring-label span { font-size: 13px; color: var(--t-fg2); }
.end-card h2 { font-size: 26px; font-weight: 700; margin-top: 8px; }
.end-wrong { width: 100%; text-align: left; margin-top: 12px; }
.end-wrong h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--t-fg2); margin-bottom: 8px; }
.end-wrong ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--t-line); border-radius: 12px; overflow: hidden; }
.end-wrong li { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--t-line); font-size: 15px; }
.end-wrong li:last-child { border-bottom: none; }
.end-wrong li span:first-child { color: var(--t-fg2); }
.end-wrong li span:last-child { font-weight: 700; }
.end-card .answer-actions { margin-top: 14px; }

.empty-state { padding: 60px 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-state.small { padding: 30px 0; }
.loading { display: grid; place-items: center; padding: 120px 0; }
.loading .wordmark-square { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

body.in-quiz .tabs, body.in-quiz .bottombar { display: none !important; }
body.in-quiz .view { padding-bottom: 40px; }

.login-page { background: var(--t-bg); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; background: var(--t-card); border-radius: 16px; padding: 32px 28px 28px; box-shadow: var(--t-shadow); display: flex; flex-direction: column; gap: 10px; }
.login-card .brand { margin-bottom: 8px; }
.login-card h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--t-fg2); }
.field input { height: 48px; border-radius: 8px; border: 1px solid var(--t-border); background: var(--t-panel); padding: 0 14px; font-size: 16px; color: var(--t-fg); outline: none; }
.field input:focus { border-color: var(--t-fg); }
.error { color: var(--t-danger); font-size: 14px; min-height: 1.4em; }

@media print {
  .topbar, .bottombar, .page-head .btn, .filter-chips, .more-sheet, .sheet-backdrop { display: none !important; }
  body { background: #fff; color: #000; }
  .view { padding: 0; max-width: none; gap: 10px; }
  .cs-grid { display: block; columns: 3; column-gap: 12px; }
  .cs-card { box-shadow: none; border: 1px solid #ccc; padding: 8px 10px; margin-bottom: 10px; break-inside: avoid; }
  .cs-body, .cs-cat > .cs-grid { display: block !important; }
  .cs-cat-head .cs-chevron, .cs-card .cs-chevron { display: none; }
  .cs-row { font-size: 11px; padding: 3px 0; }
}

@media (max-width: 1080px) {
  .tabs a { padding: 8px 10px; }
  .tabs a span:not(.ms) { display: none; }
  .tabs a.active span:not(.ms) { display: inline; }
}

@media (max-width: 960px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}

@media (max-width: 900px) {
  .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lt-head, .lt-row { grid-template-columns: 56px minmax(0, 1fr) 160px 104px; }
}

@media (max-width: 760px) {
  :root { --top: 60px; }
  .desk-only, .desk-only-flex, .desk-only-grid, .desk-only-inline { display: none !important; }
  .mob-only, .mob-only-inline { display: inline !important; }
  .mob-only-flex { display: flex !important; }
  .topbar { padding: 0 20px; gap: 12px; border-bottom: none; background: var(--t-bg); }
  .brand { font-size: 16px; gap: 8px; }
  .brand .wordmark-square { width: 18px !important; height: 18px !important; border-radius: 6px; }
  .tabs { display: none; }
  .streak { padding: 4px 10px; font-size: 12px; }
  .bottombar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    min-height: 72px;
    background: var(--t-tabbar);
    border-top: 1px solid var(--t-tabbar-border);
  }
  .bottombar a, .bottombar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 48px;
    color: var(--t-fg2);
    font-size: 11px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
  }
  .bottombar .active { color: var(--t-link); font-weight: 700; }
  .sheet-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.5); }
  .more-sheet:not([hidden]) {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 41;
    padding: 8px;
    border-radius: 16px;
    background: var(--t-card);
    box-shadow: var(--t-shadow-lift);
  }
  .more-sheet a, .more-sheet button {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 12px;
    border: none;
    background: none;
    color: var(--t-fg);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
  }
  .more-sheet a:hover, .more-sheet button:hover { background: var(--t-panel); }
  .more-sheet .ms { color: var(--t-fg2); }

  .view { padding: 12px 20px calc(110px + env(safe-area-inset-bottom)); gap: 14px; }
  .page-title, .page-head h1 { font-size: 24px; letter-spacing: -0.3px; }
  .greeting .page-title { font-size: 28px; }
  .greet-line { font-size: 12px; }
  .page-sub { font-size: 12px; margin-top: 2px; }
  .lesson-head h1 { font-size: 26px; max-width: none; }
  .home-grid, .grid-2, .lesson-grid, .topic-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .side-col { gap: 14px; }
  .card { padding: 18px; }
  .hero-card { padding: 20px; gap: 16px; min-height: 0; }
  .hero-top { flex-direction: column; gap: 10px; }
  .hero-headline { font-size: 22px; }
  .hero-stats { text-align: left; gap: 20px; }
  .hero-stats div { display: flex; align-items: baseline; gap: 5px; }
  .hero-stats b { display: inline; font-size: 16px; }
  .hero-stats span { font-size: 13px; opacity: 0.85; }
  .hero-actions .btn.cta { width: 100%; min-height: 52px; font-size: 16px; }
  .vocab-card { gap: 10px; }
  .shaky-list li { padding: 10px 0; }
  .shaky-list li.mob-extra { display: none !important; }
  .shaky-main b { font-size: 14px; }
  .shaky-main span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card-top { margin-bottom: 6px; }
  .last-card .card-title { font-size: 15px; margin-top: 6px; }
  .page-head.row { flex-direction: row; align-items: center; }

  .lesson-table { background: none; box-shadow: none; overflow: visible; display: flex; flex-direction: column; gap: 10px; }
  .lt-row { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 16px; background: var(--t-card); border-radius: 16px; box-shadow: var(--t-shadow); border-bottom: none; }
  .lnum { width: 40px; height: 40px; border-radius: 10px; font-size: 14px; }
  .lt-title a { font-size: 14px; }

  .filter-chips { flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin: 0 -20px; padding: 0 20px 2px; scrollbar-width: none; }
  .filter-chips::-webkit-scrollbar { display: none; }
  .fchip { padding: 6px 12px; font-size: 12px; min-height: 32px; flex-shrink: 0; }
  .cs-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cs-card { padding: 16px; }
  .cs-head-row { min-height: 24px; margin-bottom: 0; cursor: pointer; }
  .cs-card.open .cs-head-row { margin-bottom: 8px; }
  .cs-title { font-size: 15px; }
  .cs-row { padding: 9px 0; gap: 10px; }
  .cs-row.c2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }

  .lesson-section { padding: 18px; }
  .lesson-actions .btn { flex: 1 1 auto; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .right { text-align: left; }
  .vrow { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
  .v-tl { grid-column: 1; }
  .v-de { grid-column: 1; grid-row: 2; }
  .v-meta { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; align-items: flex-end; gap: 6px; }
  .today { flex-direction: column; align-items: stretch; padding: 20px; }
  .today-numbers { gap: 24px; }
  .today-numbers b { font-size: 26px; }
  .today .btn { width: 100%; }
  .quiz-card { padding: 22px 18px; }
  .choices.many, .mc .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bubble { max-width: 92%; }
  .boxes { gap: 6px; }
  .box-bar { height: 80px; }
  .sticky-cta { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .answer-actions .btn { flex: 1 1 auto; }
  .end-wrong li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  td, th { padding: 9px 12px; }
  table { font-size: 14px; }
  .path-card { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'kind bar' 'title title' 'meta meta'; padding: 12px 14px; }
}
