:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #1d2320;
  --muted: #66706b;
  --line: #e3e0d6;
  --green: #0b6b48;
  --green-soft: #e3f1ea;
  --yellow: #f2b51b;
  --yellow-soft: #fdf3d6;
  --red: #b8312f;
  --red-soft: #f8e4e3;
  --blue: #2f6db3;
  --blue-soft: #e4eef9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 16px rgba(0, 0, 0, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131714;
    --surface: #1c221e;
    --ink: #e8ece9;
    --muted: #9aa59f;
    --line: #2d3530;
    --green: #3fb382;
    --green-soft: #1d3329;
    --yellow: #f2c14b;
    --yellow-soft: #3a3220;
    --red: #e0605d;
    --red-soft: #3b2423;
    --blue: #6ea4e6;
    --blue-soft: #1f2c3c;
    --shadow: none;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--green); }
kbd { font: 11px/1 inherit; border: 1px solid currentColor; border-radius: 4px; padding: 2px 4px; opacity: .55; margin-left: 6px; }
@media (hover: none) { kbd { display: none; } }

.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.flag { display: inline-flex; flex-direction: column; width: 20px; height: 14px; border-radius: 3px; overflow: hidden; }
.flag i { flex: 1; }
.flag i:nth-child(1) { background: #fdb913; }
.flag i:nth-child(2) { background: #006a44; }
.flag i:nth-child(3) { background: #c1272d; }
nav { display: flex; gap: 4px; }
nav a { padding: 6px 10px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 15px; }
nav a.active { background: var(--green-soft); color: var(--green); font-weight: 600; }
body.in-session .top { display: none; }

main { max-width: 680px; margin: 0 auto; padding: 16px 16px 48px; }
.card, .hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
h2 { margin: 0 0 12px; font-size: 22px; }
h3 { margin: 18px 0 10px; font-size: 16px; }
.card > h3:first-child { margin-top: 0; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.banner { background: var(--yellow-soft); border: 1px solid var(--yellow); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.banner.warn { background: var(--red-soft); border-color: var(--red); }

.hero-top { display: flex; justify-content: space-between; margin-bottom: 18px; }
.hero-top .right { text-align: right; }
.kicker { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.big { font-size: 28px; font-weight: 700; line-height: 1.2; }
.plan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 16px; }
.plan > div { background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; }
.plan b { display: block; font-size: 24px; }
.plan span { font-size: 13px; color: var(--muted); }
.today-line { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.danger { background: var(--red); color: #fff; }
.btn.link { background: none; color: var(--muted); font-weight: 400; text-decoration: underline; min-height: 0; padding: 4px; }
.btn.big-btn { width: 100%; font-size: 18px; min-height: 54px; }
.btn.round { width: 88px; height: 88px; border-radius: 50%; font-size: 36px; background: var(--green-soft); }
.btn.file { position: relative; overflow: hidden; }
.btn.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.meter { display: flex; height: 12px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.m-known { background: var(--green); }
.m-learning { background: var(--yellow); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 8px 0 12px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.lesson { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg); color: var(--ink); text-decoration: none; font-size: 14px; }
.lesson .mini { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.lesson .mini div { height: 100%; background: var(--green); }
.lesson small { color: var(--muted); }

/* session */
.sbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.sbar .close { text-decoration: none; color: var(--muted); font-size: 20px; padding: 4px 8px; }
.sprog { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
#sprog-fill { height: 100%; width: 0; background: var(--green); transition: width .3s; }
#stime { font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }
.flash { text-align: center; padding: 24px 20px; }
.tag { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 14px; }
.word { font-size: 34px; font-weight: 700; line-height: 1.25; margin: 6px 0; overflow-wrap: anywhere; }
.word .fem { font-weight: 600; }
.g-ico { display: inline-flex; align-items: center; vertical-align: -.08em; margin-right: 6px; }
.g-ico svg { height: .82em; width: auto; fill: currentColor; display: block; }
.g-m { color: var(--blue); }
.g-f { color: #c4457b; }
@media (prefers-color-scheme: dark) { .g-f { color: #e87aa8; } }
.pos { color: var(--muted); font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.decl { display: inline-block; font-size: 15px; font-weight: 700; padding: 5px 14px; border-radius: 999px; letter-spacing: .01em; }
.decl-1 { background: var(--blue-soft); color: var(--blue); }
.decl-2 { background: var(--green-soft); color: var(--green); }
.decl-3 { background: var(--yellow-soft); color: #8a6100; }
.decl-4 { background: #efe8fb; color: #6b3fa0; }
.decl-5 { background: var(--red-soft); color: var(--red); }
.decl-0 { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) {
  .decl-3 { color: var(--yellow); }
  .decl-4 { background: #2d233d; color: #b993f2; }
}
.ru { font-size: 22px; margin: 12px 0 4px; }
.ru.prompt { font-size: 28px; font-weight: 600; }
.note { background: var(--blue-soft); color: var(--ink); border-radius: 10px; padding: 8px 12px; margin: 12px auto; font-size: 14px; max-width: 460px; }
.forms { margin: 14px auto; border-collapse: collapse; font-size: 15px; }
.forms th { text-align: right; color: var(--muted); font-weight: 400; padding: 5px 10px; vertical-align: top; line-height: 1.4; white-space: nowrap; }
.forms td { text-align: left; padding: 5px 10px; font-weight: 600; vertical-align: top; line-height: 1.4; }
.forms-extra { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 4px; }
.forms .stem { color: var(--muted); font-weight: 500; }
.forms .end { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.fem-box { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 4px auto 12px; padding: 6px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.fem-box .g-ico { margin-right: 2px; }
.fem-box .g-ico svg { height: 1.05em; }
.fem-box .decl { font-size: 13px; padding: 3px 10px; }
.fem-box .fem-rod { color: var(--muted); }
.fem-box .stem { color: var(--muted); font-weight: 500; }
.fem-box .end { color: var(--ink); font-weight: 700; }
.example { margin: 14px auto 4px; max-width: 480px; border-top: 1px solid var(--line); padding-top: 12px; }
.ex-lt { font-size: 18px; font-style: italic; }
.ex-ru { color: var(--muted); font-size: 15px; }
.speak { border: none; background: none; cursor: pointer; font-size: .7em; padding: 2px 4px; vertical-align: middle; opacity: .8; }
.forms .speak, .ex-lt .speak, .form-ex .speak { font-size: 14px; }
.form-ex { display: block; margin-top: 2px; padding: 1px 0 3px; font-weight: 400; }
.fem-box .form-ex { flex-basis: 100%; width: 100%; text-align: center; margin-top: 4px; }
.form-ex-lt { font-size: 14px; font-style: italic; color: var(--ink); }
.form-ex-lt b { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--blue); }
.form-ex-text[data-ru] { position: relative; cursor: help; border-bottom: 1px dotted var(--muted); outline: none; }
.form-ex-text[data-ru]::after {
  content: attr(data-ru);
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  z-index: 50;
  min-width: 160px;
  max-width: min(300px, 75vw);
  width: max-content;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-style: normal;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease;
}
.form-ex-text[data-ru]:hover::after,
.form-ex-text[data-ru]:focus::after {
  opacity: 1;
  visibility: visible;
}
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.grades { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 6px; margin-top: 20px; }
.grade { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; min-width: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.grade small { color: var(--muted); font-size: 12px; }
.grade kbd { margin: 2px 0 0; }
.grade.again { border-color: var(--red); background: var(--red-soft); }
.grade.hard { border-color: var(--yellow); background: var(--yellow-soft); }
.grade.good { border-color: var(--green); background: var(--green-soft); }
.grade.easy { border-color: var(--blue); background: var(--blue-soft); }
#ans, #g-ans { margin-top: 18px; }
#inp, #g-inp { width: 100%; font: inherit; font-size: 24px; text-align: center; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); }
#inp:focus, #g-inp:focus { outline: none; border-color: var(--green); }
.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.key { min-width: 40px; min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 18px; cursor: pointer; }
.listen { margin: 10px 0; }
.listen .hint { color: var(--muted); font-size: 13px; margin-top: 8px; }
.verdict { font-size: 22px; font-weight: 700; padding: 8px; border-radius: 10px; margin-bottom: 8px; }
.verdict.correct { color: var(--green); background: var(--green-soft); }
.verdict.almost, .verdict.other { color: #8a6100; background: var(--yellow-soft); }
.verdict.wrong { color: var(--red); background: var(--red-soft); }
@media (prefers-color-scheme: dark) { .verdict.almost, .verdict.other { color: var(--yellow); } }
.typed { color: var(--muted); }

/* words */
.filters { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-bottom: 8px; }
.filters input, .filters select, .settings input, .settings select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); min-width: 0; }
@media (max-width: 520px) { .filters { grid-template-columns: 1fr 1fr; } .filters input { grid-column: 1 / -1; } }
.wlist { list-style: none; padding: 0; margin: 8px 0 0; }
.wlist li { display: flex; gap: 10px; align-items: baseline; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.wlist li:hover { background: var(--bg); }
.wlist b { white-space: nowrap; }
.wru { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dot.learning { background: var(--yellow); }
.dot.known { background: var(--green); }
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 20; padding: 16px; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; text-align: center; }
.sheet .close { position: absolute; top: 10px; right: 10px; border: none; background: none; font-size: 20px; color: var(--muted); cursor: pointer; }
@media (min-width: 700px) { .modal { align-items: center; } }

/* progress */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.stats > div { background: var(--bg); border-radius: 10px; padding: 10px; text-align: center; }
.stats b { display: block; font-size: 22px; }
.stats span { font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar div { width: 100%; background: var(--green); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar small { font-size: 11px; color: var(--muted); }
.settings { display: grid; gap: 12px; }
.settings label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.settings label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.settings input[type="range"] { padding: 0; }
details { margin-top: 16px; }
summary { cursor: pointer; color: var(--muted); font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 30; font-size: 14px; max-width: calc(100% - 32px); }

/* grammar */
.gram-line { text-align: center; color: var(--muted); font-size: 14px; margin: -8px 0 12px; }
.g-sentence { font-size: 26px; font-weight: 600; line-height: 1.35; margin: 8px 0; }
.blank { display: inline-block; min-width: 3.5em; border-bottom: 3px solid var(--green); color: var(--green); }
.g-base { font-size: 18px; margin-top: 4px; }
.g-ru { color: var(--muted); font-size: 15px; margin-top: 6px; }
.g-full { font-size: 20px; font-style: italic; margin: 8px 0; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.opt { position: relative; min-height: 52px; padding: 10px 10px 10px 36px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 18px; cursor: pointer; }
.opt kbd { position: absolute; left: 8px; top: 6px; margin: 0; }
.opt:hover:not(:disabled) { border-color: var(--green); }
.opt.right { background: var(--green-soft); border-color: var(--green); font-weight: 700; }
.opt.wrong { background: var(--red-soft); border-color: var(--red); text-decoration: line-through; }
.topics { list-style: none; padding: 0; margin: 0; }
.topics li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.topics li:last-child { border-bottom: none; }
.t-head { display: flex; flex-direction: column; }
.t-head .muted { font-size: 13px; }
.t-score { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.t-score .mini { width: 70px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.t-score .mini div { height: 100%; }
.t-score .ok { background: var(--green); } .t-score .mid { background: var(--yellow); } .t-score .low { background: var(--red); }
.t-score small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.t-actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn.sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.rule { text-align: left; }
.rule h2 { margin-top: 4px; margin-bottom: 2px; }
.rule ul { padding-left: 20px; }
.rule li { margin: 4px 0; }
.rule-t { border-collapse: collapse; margin: 12px 0; font-size: 14px; width: 100%; }
.rule-t th, .rule-t td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; }
.rule-t th { background: var(--bg); font-weight: 600; }


/* reading & listening */
nav { overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
@media (max-width: 600px) {
  .brand { font-size: 16px; gap: 8px; }
  nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line);
        display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  nav a { text-align: center; padding: 9px 2px; font-size: 12.5px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  main { padding-bottom: 88px; }
  body.in-session nav { display: none; }
}
.seg { display: flex; gap: 4px; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.seg a { flex: 1; text-align: center; padding: 8px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg a.on { background: var(--surface); color: var(--green); box-shadow: var(--shadow); }
.next-up { font-size: 14px; margin-bottom: 10px; }
.filters.one { grid-template-columns: 1fr; }
.tlist { list-style: none; padding: 0; margin: 0 0 8px; }
.tlist li a { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tlist li a:hover { background: var(--bg); }
.t-kind { grid-column: 1; font-size: 12px; color: var(--muted); }
.tlist b { grid-column: 1; font-weight: 600; }
.badge { grid-column: 2; grid-row: 1 / span 2; font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.mid { background: var(--yellow-soft); color: #8a6100; }
.text-lt { white-space: pre-wrap; font-size: 18px; line-height: 1.6; margin-top: 14px; }
.text-ru { white-space: pre-wrap; color: var(--muted); border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; font-size: 15px; }
.q-lt { font-size: 20px; font-weight: 600; margin-top: 6px; }
.q-ru { font-size: 14px; margin-bottom: 4px; }
.options.one { grid-template-columns: 1fr; }
.player { display: flex; align-items: center; gap: 12px; margin: 14px 0 8px; }
.btn.round-sm { width: 56px; height: 56px; border-radius: 50%; padding: 0; font-size: 20px; flex: none; }
.p-track { flex: 1; }
.p-track input { width: 100%; accent-color: var(--green); }
.p-time { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.p-ctl { margin-top: 6px; }
.dialog-sheet { text-align: left; }
.dialog-sheet h3 { margin: 8px 0 12px; }
.d-body { display: grid; gap: 8px; font-size: 16px; line-height: 1.55; }
.d-line { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 6px 12px; align-items: baseline; }
.d-spk { font-weight: 600; color: var(--muted); white-space: nowrap; }
.d-sep { text-align: center; color: var(--muted); margin: 4px 0; letter-spacing: 2px; }
@media (max-width: 480px) { .d-line { grid-template-columns: 1fr; gap: 1px; } }
.skill h3 { margin-top: 0; }

/* writing & speaking */
.persona { background: var(--blue-soft); border-radius: 10px; padding: 12px 14px; margin: 10px 0 16px; }
.lt-form { display: grid; gap: 12px; }
.lt-form label { display: grid; gap: 4px; }
.lt-form input { font: inherit; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.lt-form input:focus, #w-text:focus { outline: none; border-color: var(--green); }
.ff-res { font-size: 13px; min-height: 1em; }
.good { color: var(--green); } .mid { color: #8a6100; } .bad { color: var(--red); }
@media (prefers-color-scheme: dark) { .mid { color: var(--yellow); } }
.checks { list-style: none; padding: 0; margin: 4px 0 10px; }
.checks li { margin: 4px 0; }
.checks label { display: flex; gap: 8px; align-items: baseline; }
.phrases { margin: 8px 0 12px; }
.phrases ul { padding-left: 0; list-style: none; margin: 8px 0 0; }
.phrases li { margin: 5px 0; }
.phrase { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 15px; cursor: pointer; text-align: left; }
.phrase:hover { border-color: var(--green); }
#w-text { width: 100%; font: inherit; font-size: 17px; line-height: 1.5; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); resize: vertical; }
.w-bar { display: flex; justify-content: space-between; font-size: 14px; margin-top: 6px; }
.model { background: var(--green-soft); border-radius: 10px; padding: 12px; font-size: 16px; }
.exam-box { background: var(--bg); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.exam-box ol { padding-left: 20px; margin: 8px 0 12px; font-size: 14px; }
.speaking .big-q { font-size: 24px; }
.timer { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; margin: 14px 0 4px; color: var(--green); }
.timer.low { color: var(--red); }
.points { padding-left: 20px; }
.points li { margin: 5px 0; font-size: 17px; }
.rec { margin: 10px 0; text-align: center; }
.rec-btn.recording { border-color: var(--red); color: var(--red); }
.rec-out audio, .rec-item audio, .center audio { width: 100%; margin-top: 8px; }
.rec-item { text-align: left; margin: 10px 0; }
.sample { margin-top: 10px; text-align: left; }
.check-line { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.seg a { padding: 8px 4px; }

/* ---------- mock exam ---------- */
.exam-bar { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0; }
.ex-timer { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 18px;  }
.ex-timer.low { color: var(--red); }
.ex-text { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.ex-text h4 { margin: 2px 0 8px; }
.eq { margin: 12px 0; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; }
.eq.ok { border-color: var(--green); background: var(--green-soft); }
.eq.bad { border-color: var(--red); background: var(--red-soft); }
.eq-q { font-weight: 600; margin-bottom: 6px; }
.eq-opts { display: flex; flex-direction: column; gap: 6px; }
.eq-opts label { display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.eq-opts label.right { font-weight: 700; color: var(--green); }
#ex-letter { width: 100%; box-sizing: border-box; font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: inherit; }
.big-btn { font-size: 18px; padding: 14px 28px; }
.results { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.res-row { display: grid; grid-template-columns: 124px 1fr 48px; gap: 4px 10px; align-items: center; }
.res-row small { grid-column: 2 / -1; }
.mini.big { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.mini.big div { height: 100%; background: var(--green); }
.mini.big div.low, .exam-bars .bar div.low { background: var(--red); }
.weak li { margin: 6px 0; }
.hist td.good { color: var(--green); font-weight: 600; }
.hist td.bad { color: var(--red); font-weight: 600; }
.hist { font-size: 14px; }
.exam-bars { position: relative; margin-bottom: 12px; }
.pass-line { position: absolute; left: 0; right: 0; bottom: 86px; border-top: 2px dashed var(--muted); opacity: .6; pointer-events: none; }
.self { margin-top: 16px; text-align: left; }
.self-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.self-opts { display: flex; gap: 12px; }
.self-opts label { display: flex; gap: 4px; align-items: center; cursor: pointer; }
@media (max-width: 600px) { .res-row { grid-template-columns: 116px 1fr 44px; } .hist { font-size: 12px; } }
.hist-wrap { overflow-x: auto; margin: 8px 0; }
.hist th, .hist td { padding: 4px 6px; white-space: nowrap; }
.exam-bars { justify-content: flex-start; }
.exam-bars .bar { flex: 0 1 48px; }
