/* Oʻzbekcha — mobile-first. Кобальт + бирюза, спокойная бумага, шрифт Golos Text. */
@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(/fonts/golos-text-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Golos"; font-weight: 500; font-display: swap; src: url(/fonts/golos-text-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Golos"; font-weight: 600; font-display: swap; src: url(/fonts/golos-text-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Golos"; font-weight: 700; font-display: swap; src: url(/fonts/golos-text-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(/fonts/golos-text-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF; }
@font-face { font-family: "Golos"; font-weight: 600; font-display: swap; src: url(/fonts/golos-text-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF; }
@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(/fonts/golos-text-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos"; font-weight: 500; font-display: swap; src: url(/fonts/golos-text-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos"; font-weight: 600; font-display: swap; src: url(/fonts/golos-text-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos"; font-weight: 700; font-display: swap; src: url(/fonts/golos-text-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos"; font-weight: 400; font-display: swap; src: url(/fonts/golos-text-cyrillic-ext-400-normal.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F; }
@font-face { font-family: "Golos"; font-weight: 600; font-display: swap; src: url(/fonts/golos-text-cyrillic-ext-600-normal.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F; }
@font-face { font-family: "Golos"; font-weight: 700; font-display: swap; src: url(/fonts/golos-text-cyrillic-ext-700-normal.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F; }

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --ink: #0F1B2D;
  --ink-2: #33455C;
  --muted: #687891;
  --line: #E1E7EF;
  --line-2: #EDF1F6;
  --primary: #1D4FB0;
  --primary-ink: #FFFFFF;
  --primary-soft: #EAF0FB;
  --ok: #0B7F6A;
  --ok-soft: #E3F4EF;
  --bad: #C0392F;
  --bad-soft: #FCEBEA;
  --warn: #A96A08;
  --warn-soft: #FBF1DD;
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 4px 16px -8px rgba(15, 27, 45, .12);
  --font: "Golos", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --r: 14px;
  --r-s: 10px;
  --tab-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1522; --surface: #132033; --surface-2: #17263B; --ink: #E8EEF6; --ink-2: #C1CEDD; --muted: #8D9DB2;
    --line: #243852; --line-2: #1C2E44; --primary: #7FA8F0; --primary-ink: #0C1522; --primary-soft: #1A2F4F;
    --ok: #42C7A8; --ok-soft: #10332D; --bad: #F08A83; --bad-soft: #3A1B1B; --warn: #E5B253; --warn-soft: #33270F;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px -10px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1522; --surface: #132033; --surface-2: #17263B; --ink: #E8EEF6; --ink-2: #C1CEDD; --muted: #8D9DB2;
  --line: #243852; --line-2: #1C2E44; --primary: #7FA8F0; --primary-ink: #0C1522; --primary-soft: #1A2F4F;
  --ok: #42C7A8; --ok-soft: #10332D; --bad: #F08A83; --bad-soft: #3A1B1B; --warn: #E5B253; --warn-soft: #33270F;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px -10px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.06rem; margin-top: 1.4em; }
p { margin: 0 0 .75em; }
img { max-width: 100%; }
code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
[hidden] { display: none !important; }
button { font: inherit; }

.wrap { max-width: 880px; margin: 0 auto; padding: 20px 16px calc(var(--tab-h) + 32px + env(safe-area-inset-bottom)); }
.wrap.wide { max-width: 1120px; }
@media (min-width: 900px) { .wrap { padding: 32px 24px 64px; } h1 { font-size: 2rem; } }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.lede { font-size: 1.04rem; color: var(--ink-2); max-width: 62ch; }
.eyebrow { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 .35em; font-weight: 600; }
.eyebrow a { color: inherit; text-decoration: none; }
.empty { color: var(--muted); padding: 28px 0; text-align: center; }
.alert { background: var(--bad-soft); color: var(--bad); padding: 12px 14px; border-radius: var(--r-s); }
.ok { background: var(--ok-soft); color: var(--ok); padding: 12px 14px; border-radius: var(--r-s); }
.plain { list-style: none; padding: 0; margin: 0; }
.plain > li + li { margin-top: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.center { justify-content: center; }
.two { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 16px 0; }
h2.sub { margin-top: 1.6em; font-size: 1.05rem; color: var(--ink-2); }
.page-head { margin-bottom: 18px; }
.page-head h1 { margin-bottom: .2em; }

/* ───── top bar (desktop) + tab bar (mobile) ───── */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand i { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-style: normal; font-size: .95rem; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a { position: relative; display: flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: .93rem; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { color: var(--primary); background: var(--primary-soft); }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.dot { font-style: normal; font-size: .68rem; font-weight: 700; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; }
.me { display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.me form { margin: 0; }
.me-name { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish.danger { color: var(--bad); }
.top-help { display: none; }
.nav a.mob { display: none; }

@media (max-width: 899px) {
  .top-in { height: 52px; }
  .me { display: none; }
  .top-help { display: grid; margin-left: auto; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: var(--ink-2); }
  .nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding: 6px 4px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); justify-content: space-around; z-index: 30; }
  .nav a { flex-direction: column; justify-content: center; gap: 3px; flex: 1; min-width: 0; padding: 4px 2px; font-size: .7rem; border-radius: 12px; }
  .nav a.on { background: transparent; }
  .nav a.on .ico { background: var(--primary-soft); border-radius: 12px; padding: 2px 14px; box-sizing: content-box; }
  .nav a.desk { display: none; }
  .nav a.mob { display: flex; }
  .nav .ico { width: 23px; height: 23px; }
  .nav .dot { position: absolute; top: 0; left: calc(50% + 6px); }
}

/* focus mode (lesson, review, practice): no chrome, fixed bottom action bar */
body.focus .top, body.focus .nav { display: none; }
body.focus .wrap { padding: 0 16px calc(150px + env(safe-area-inset-bottom)); max-width: 720px; }

/* ───── buttons, forms ───── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .98rem/1 var(--font); text-decoration: none; cursor: pointer; transition: background .12s, border-color .12s, transform .06s; user-select: none; }
.btn:hover { border-color: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .opt:focus-visible, .tile:focus-visible, .say:focus-visible, .lrow:focus-visible { outline: 3px solid var(--primary-soft); outline-offset: 2px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 0 12px; }
.btn.ghost:hover { color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .86rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn.rec .rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.btn.rec.on { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.btn.on { border-color: var(--bad); color: var(--bad); }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: .9rem; color: var(--ink-2); font-weight: 500; }
.form .row label { flex: 1; min-width: 180px; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; font-size: 16px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--ink); font-size: .98rem; }
.check input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--primary); }
.form > .btn, .form > button { justify-self: start; }
.inline { display: inline; }

.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--primary); }
.card + .card { margin-top: 14px; }
.card h2 { margin-top: 0; }
@media (min-width: 900px) { .card { padding: 22px; } }

/* ───── login ───── */
.guest .wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 380px; }
.login .form { margin-top: 24px; }
.login .btn { width: 100%; }
.login-mark { width: 60px; height: 60px; border-radius: 18px; background: var(--primary); color: var(--primary-ink); font: 700 1.7rem/60px var(--font); text-align: center; margin-bottom: 18px; }
.login-foot { margin-top: 28px; color: var(--muted); font-size: .9rem; }

/* ───── home ───── */
.hello { margin-bottom: 16px; }
.hello .eyebrow { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ok); font-weight: 600; }
.plan { padding: 0 !important; overflow: hidden; }
.plan-head { padding: 18px 18px 4px; }
.plan-head h2 { margin: 0 0 2px; }
.plan-list { list-style: none; margin: 0; padding: 6px 8px 4px; }
.plan-item { display: flex; align-items: center; gap: 14px; padding: 12px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); }
a.plan-item:hover { background: var(--surface-2); }
.plan-num { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.plan-item.done .plan-num { background: var(--ok); color: #fff; }
.plan-item.done .plan-title { color: var(--muted); }
.plan-body { flex: 1; min-width: 0; }
.plan-title { display: block; font-weight: 600; }
.plan-sub { display: block; font-size: .86rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-go { color: var(--muted); }
.plan-cta { padding: 6px 18px 18px; }
.plan-cta .btn { width: 100%; }
.home-grid { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .home-grid { grid-template-columns: 1fr 1fr; } .home-grid .wide-cell { grid-column: 1 / -1; } }
.home-grid .card { margin: 0; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats-row strong { display: block; font-size: 1.6rem; line-height: 1.1; }
.stats-row strong small { font-size: .95rem; color: var(--muted); font-weight: 500; }
.stats-row span { font-size: .78rem; color: var(--muted); }
.week { display: flex; gap: 6px; margin-top: 14px; }
.week i { flex: 1; height: 34px; border-radius: 8px; background: var(--line-2); display: grid; place-items: center; font-style: normal; }
.week i b { font-size: .68rem; color: var(--muted); font-weight: 500; }
.week i.on { background: var(--ok); }
.week i.on b { color: #fff; }
.week i.today { box-shadow: inset 0 0 0 2px var(--primary); }
.phrase-uz { display: flex; gap: 12px; align-items: center; font-size: 1.2rem; margin: 6px 0; }
.phrase-uz > span { display: flex; flex-direction: column; line-height: 1.3; }
.more-list { list-style: none; margin: 0; padding: 0; }
.more-list a, .more-list button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 4px; border: 0; border-bottom: 1px solid var(--line-2); background: none; color: var(--ink); text-decoration: none; font-weight: 500; text-align: left; cursor: pointer; font-size: 1rem; }
.more-list li:last-child a, .more-list li:last-child button { border-bottom: 0; }
.more-list .ico { color: var(--primary); }
.more-list .dot { margin-left: auto; }
.more-list .chev { margin-left: auto; color: var(--muted); }
.more-list .dot + .chev { margin-left: 8px; }

/* ───── Uzbek text ───── */
.uz { font-weight: 600; }
.uzw { display: inline-flex; flex-direction: column; line-height: 1.3; }
.uzw .cyr, .cyr { font-size: .8em; color: var(--muted); font-weight: 400; }
span.uz + .cyr { display: block; }
.uzw.big .uz { font-size: 2rem; font-weight: 700; letter-spacing: -.01em; }
.uzw.mid .uz { font-size: 1.12rem; }

.say { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--primary); display: inline-grid; place-items: center; cursor: pointer; padding: 0; vertical-align: middle; }
.say svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.say:hover { border-color: var(--primary); background: var(--primary-soft); }
.say.playing { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.say.big { width: 60px; height: 60px; }
.say.big svg { width: 27px; height: 27px; }
.say.slow { color: var(--ok); }

/* ───── course map ───── */
.modules { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.module { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.module > summary { list-style: none; display: flex; gap: 14px; align-items: center; padding: 16px; cursor: pointer; }
.module > summary::-webkit-details-marker { display: none; }
.module > summary h2 { margin: 0 0 2px; font-size: 1.04rem; }
.module > summary p { margin: 0; font-size: .84rem; }
.module .chev { margin-left: auto; color: var(--muted); transition: transform .15s; }
.module[open] .chev { transform: rotate(90deg); }
.mnum { flex: none; width: 46px; height: 46px; display: grid; place-items: center; font-weight: 700; color: var(--primary); position: relative; }
.mnum svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.mnum circle { fill: none; stroke-width: 4; }
.mnum .track { stroke: var(--line-2); }
.mnum .val { stroke: var(--ok); stroke-linecap: round; }
.module.done .mnum { color: var(--ok); }
.lessons { list-style: none; padding: 4px 8px 10px; margin: 0; border-top: 1px solid var(--line-2); }
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; }
a.lrow:hover { background: var(--surface-2); }
.lnum { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--muted); }
.ltitle { flex: 1; min-width: 0; }
.ltitle small { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }
.score { font-size: .85rem; color: var(--ok); font-weight: 700; }
.lessons .done .lnum { background: var(--ok); border-color: var(--ok); color: #fff; }
.lessons .open .lnum { border-color: var(--primary); background: var(--primary); color: var(--primary-ink); }
.lessons .open .ltitle { font-weight: 600; }
.lessons .locked .lrow { color: var(--muted); cursor: default; }

/* ───── lesson player ───── */
.player { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.lp-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 0; background: var(--bg); }
.lp-close { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); text-decoration: none; font-size: 1.7rem; line-height: 1; }
.lp-close:hover { background: var(--surface); color: var(--ink); }
.lp-bar { flex: 1; height: 12px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.lp-bar i { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 6px; transition: width .35s ease; }
.lp-count { font-size: .8rem; color: var(--muted); min-width: 40px; text-align: right; font-weight: 600; }
.lp-body { flex: 1; outline: none; padding-top: 6px; }
.lp-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.lp-foot-in { max-width: 720px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.lp-foot-in .btn.primary, .lp-foot-in .btn.ok, .lp-foot-in .btn.bad { flex: 1; }
@media (min-width: 720px) { .lp-foot-in .btn.primary, .lp-foot-in .btn.ok, .lp-foot-in .btn.bad { flex: 0 0 260px; margin-left: auto; } }
.lp-foot.ok { background: var(--ok-soft); border-top-color: transparent; }
.lp-foot.bad { background: var(--bad-soft); border-top-color: transparent; }
.fb { max-width: 720px; margin: 0 auto 12px; }
.fb strong { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.lp-foot.ok .fb strong { color: var(--ok); }
.lp-foot.bad .fb strong { color: var(--bad); }
.fb p { margin: 6px 0 0; color: var(--ink-2); }
.fb-answer { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fb-answer .say { width: 34px; height: 34px; }

.hint { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); background: var(--primary-soft); border-radius: 12px; padding: 10px 12px; margin: 0 0 16px; }
.hint .ico { color: var(--primary); width: 18px; height: 18px; margin-top: 2px; }
.step-title { font-size: 1.45rem; }
.intro { padding: 20px 0 8px; }
.intro h1 { font-size: 1.9rem; margin-bottom: .15em; }
.intro-uz { font-size: 1.15rem; color: var(--ok); font-weight: 600; margin-bottom: 14px; }
.intro-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.intro-list li { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.intro-list .ico { color: var(--primary); }
.intro-list b { margin-left: auto; font-weight: 600; color: var(--muted); font-size: .9rem; }
.tag { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: var(--line-2); color: var(--muted); margin: 0 4px 4px 0; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.edit { background: var(--warn-soft); color: var(--warn); }
.tag.lvl { background: var(--primary-soft); color: var(--primary); }

.prose { max-width: 64ch; }
.prose b { color: var(--primary); }
.prose i { color: var(--ink-2); }
.prose p:last-child { margin-bottom: 0; }
.ex-line { font-size: 1.15rem; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
td b { color: var(--ok); }
table.list td.bad { color: var(--bad); }
.mistake { background: var(--warn-soft); border-radius: 12px; padding: 12px 14px; margin: 14px 0; }
.mistake p:last-child { margin: 0; }
.examples { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; }
.examples li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.examples li > .muted { grid-column: 2; font-size: .92rem; }
.examples li > .say { grid-row: span 2; }
@media (min-width: 620px) {
  .examples li { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
  .examples li > .muted { grid-column: 3; }
  .examples li > .say { grid-row: auto; }
}
.examples.compact li { padding: 6px 10px; }

.letter-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.letter { display: grid; grid-template-columns: 76px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.letter-big { font-weight: 700; font-size: 1.9rem; line-height: 1; color: var(--primary); display: flex; flex-direction: column; gap: 6px; }
.letter-big small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.letter p { margin-bottom: 8px; }
.letter .examples { margin: 0; }
@media (max-width: 520px) { .letter { grid-template-columns: 1fr; } .letter-big { flex-direction: row; align-items: baseline; gap: 10px; } }

.wcard { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.wimg { width: 180px; height: 180px; object-fit: contain; }
.wimg.none { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); border-radius: 50%; font-weight: 700; font-size: 2.6rem; width: 140px; height: 140px; }
.wline { display: flex; gap: 8px; margin-bottom: 12px; }
.wru { font-size: 1.15rem; margin: 10px 0 0; color: var(--ink-2); }
.wnote { font-size: .92rem; color: var(--ink-2); background: var(--warn-soft); padding: 10px 12px; border-radius: 10px; margin: 14px 0 0; }
@media (max-width: 560px) {
  .wcard { grid-template-columns: 1fr; text-align: center; padding: 22px 18px; gap: 12px; }
  .wimg { width: 128px; height: 128px; margin: 0 auto; }
  .wimg.none { width: 110px; height: 110px; margin: 0 auto; }
  .wline { justify-content: center; }
  .wcard .uzw { align-items: center; }
}
.dots { display: flex; gap: 6px; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--ok); }
.all-words { margin-top: 12px; }
.all-words summary { cursor: pointer; color: var(--muted); font-size: .92rem; padding: 6px 0; }

.phrase-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.phrase-list li { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.pl-btns { display: flex; flex-direction: column; gap: 6px; }
.pl-ru { margin: 4px 0 0; color: var(--ink-2); }

.scene { font-style: italic; color: var(--ink-2); }
.dialog { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.bubble { max-width: 90%; }
.bubble.r { justify-self: end; }
.bubble .who { display: block; font-size: .76rem; color: var(--muted); margin: 0 0 3px 8px; font-weight: 600; }
.bubble.r .who { text-align: right; margin-right: 8px; }
.b-in { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 10px 14px 10px 10px; }
.bubble.r .b-in { background: var(--primary-soft); border-color: transparent; border-radius: 18px 18px 6px 18px; }
.bubble.now .b-in { box-shadow: 0 0 0 2px var(--ok); }
.b-ru { margin: 4px 0 0; font-size: .92rem; color: var(--muted); }
.no-ru .b-ru { display: none; }

.story-lines { list-style: none; padding: 0; display: grid; gap: 6px; margin: 16px 0; }
.story-lines li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.story-lines li.now { box-shadow: 0 0 0 2px var(--ok); }

.vid { margin: 0 0 20px; }
.vid video, .yt { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); background: #000; }
.yt iframe { width: 100%; height: 100%; border: 0; border-radius: var(--r); }
.vid figcaption { font-size: .9rem; color: var(--muted); margin-top: 6px; }

/* ───── exercises ───── */
.ex-title { font-size: 1.35rem; margin-bottom: .6em; }
.ex-q { font-size: 1.08rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ex-big { font-size: 1.3rem; margin: 6px 0 4px; }
.ex-big .uzw .uz { font-size: 1.9rem; }
.ex-img { width: 120px; height: 120px; object-fit: contain; display: block; margin: 6px 0 12px; }
.ex-ru { font-size: 1.1rem; color: var(--ink-2); }
.ex-ru.big { font-size: 1.4rem; font-weight: 600; color: var(--ink); }
.options { display: grid; gap: 10px; margin-top: 16px; }
.opt { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; min-height: 58px; padding: 12px 16px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: var(--surface); color: var(--ink); font: 500 1.04rem var(--font); cursor: pointer; }
.opt:hover { border-color: var(--primary); }
.opt kbd { flex: none; font: 600 .74rem var(--font); color: var(--muted); border: 1.5px solid var(--line); border-radius: 6px; width: 24px; height: 24px; display: grid; place-items: center; }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.opt.sel kbd { border-color: var(--primary); color: var(--primary); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.options[data-locked] .opt { cursor: default; }
.listen-btns { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 12px 0 8px; }
.listen-btns .say.big { width: 96px; height: 96px; border-width: 2px; }
.listen-btns .say.big svg { width: 40px; height: 40px; }
.ex-sentence { font-size: 1.5rem; font-weight: 600; margin: 12px 0; line-height: 1.5; }
.gap { display: inline-block; min-width: 56px; border-bottom: 3px solid var(--primary); color: var(--primary); margin: 0 1px; text-align: center; }
.build-line { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; padding: 10px 0; border-bottom: 2px solid var(--line); margin: 12px 0 18px; }
.build-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tile { min-height: 48px; padding: 0 16px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 12px; background: var(--surface); color: var(--ink); font: 600 1.04rem var(--font); cursor: pointer; }
.tile:hover { border-color: var(--primary); }
.tile.small { min-height: 40px; font-size: .95rem; padding: 0 14px; }
.tile.sel { border-color: var(--primary); background: var(--primary-soft); }
.tile.done { opacity: .35; border-color: var(--ok); cursor: default; }
.tile.shake { border-color: var(--bad); background: var(--bad-soft); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .tile.shake { animation: none; } .lp-bar i { transition: none; } }
.ex-input { font-size: 1.2rem; padding: 16px; margin-top: 8px; }
.charbar { display: flex; gap: 8px; margin: 10px 0; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.match-col { display: grid; gap: 10px; align-content: start; }
.match .tile { width: 100%; font-weight: 500; min-height: 56px; padding: 6px 10px; line-height: 1.25; }
.ex-reply .bubble { max-width: 100%; margin-bottom: 8px; }

.speak { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-top: 12px; }
.speak-phrase { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.speak-ctrl { display: flex; gap: 10px; flex-wrap: wrap; }
.speak-status { margin: 14px 0 4px; }
.heard { font-style: italic; color: var(--ink-2); min-height: 1.2em; }
.meter { height: 10px; border-radius: 5px; background: var(--line-2); overflow: hidden; max-width: 360px; }
.meter i { display: block; height: 100%; border-radius: 5px; transition: width .4s; }
.meter.good i { background: var(--ok); }
.meter.mid i { background: var(--warn); }
.meter.low i { background: var(--bad); }

.finish { text-align: center; padding: 40px 0; }
.finish h1 { font-size: 2.6rem; color: var(--ok); }
.finish .lede { margin: 0 auto 20px; }
.finish-stats { display: flex; gap: 12px; justify-content: center; margin: 20px 0 28px; flex-wrap: wrap; }
.finish-stats div { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; min-width: 120px; }
.finish-stats strong { font-size: 1.9rem; }
.finish-stats span { color: var(--muted); font-size: .85rem; }
.finish details { text-align: left; max-width: 520px; margin: 0 auto 24px; }
.finish summary { cursor: pointer; font-weight: 600; }
.finish .row .btn { min-width: 200px; }

/* ───── dictionary, grammar, records ───── */
.search { margin: 4px 0 16px; }
.dict { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dict li { display: grid; grid-template-columns: 44px minmax(0, 1.2fr) minmax(0, 1fr) 64px; gap: 14px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.dict img, .dict .noimg { width: 44px; height: 44px; object-fit: contain; }
.d-uz { display: flex; gap: 10px; align-items: center; }
.strength { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.strength i { display: block; height: 100%; background: var(--ok); }
@media (max-width: 560px) {
  .dict li { grid-template-columns: 40px 1fr; gap: 4px 12px; }
  .dict img, .dict .noimg { width: 40px; height: 40px; grid-row: span 3; }
  .d-ru { font-size: .92rem; color: var(--muted); }
}
.tabs { display: flex; gap: 6px; margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: none; padding: 8px 14px; border-radius: 20px; text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); font-size: .9rem; font-weight: 500; }
.tabs a.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.g-section { margin-top: 22px; }
.g-section h2 { font-size: 1.05rem; color: var(--ink-2); margin-bottom: 10px; }
.g-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.g-list a { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.g-list a:hover { border-color: var(--primary); }
.g-list .g-main { flex: 1; min-width: 0; }
.g-list strong { display: block; font-weight: 600; }
.g-list small { display: block; color: var(--muted); font-size: .84rem; }
.g-list .chev { color: var(--muted); }
.g-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 20px; }
.toc a { font-size: .84rem; padding: 5px 11px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; background: var(--surface); }
.rule h2 { margin-top: 0; }
.recs { list-style: none; padding: 0; margin: 0; }
.rec.fresh { border-left: 4px solid var(--warn); }
.rec-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.rec-head h2 { margin: 0; }
.rec-audio { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
audio { height: 40px; max-width: 100%; }
.reply { background: var(--ok-soft); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.reply p:last-child { margin-bottom: 0; }
.stars { color: var(--warn); letter-spacing: 2px; }
.rating { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; }
.rating legend { margin-bottom: 6px; }
.rating label { display: inline-flex !important; }
.rating input { position: absolute; opacity: 0; width: 1px; }
.rating span { width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 700; }
.rating input:checked + span { background: var(--warn); border-color: var(--warn); color: #fff; }
.rating input:focus-visible + span { outline: 3px solid var(--primary-soft); }
.inline-form { margin-top: 12px; }
.task.done { opacity: .75; }

/* ───── homework ───── */
.hw-row { display: flex !important; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hw-main { display: flex; flex-direction: column; gap: 2px; }
.hw-side { display: flex; gap: 10px; align-items: center; }
.tag.st { margin: 0; }
.st-new .tag.st, .tag.st-new { background: var(--primary-soft); color: var(--primary); }
.st-late .tag.st, .tag.st-late { background: var(--bad-soft); color: var(--bad); }
.st-submitted .tag.st, .tag.st-submitted { background: var(--warn-soft); color: var(--warn); }
.st-checked .tag.st, .tag.st-checked { background: var(--ok-soft); color: var(--ok); }
.hw-row.st-new, .hw-row.st-late { border-left: 4px solid var(--primary); }
.hw-row.st-submitted { border-left: 4px solid var(--warn); }
.hw-part h2 { margin-top: 0; }
.task-text { font-size: 1.04rem; }
.answer-box { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.score-big { font-size: 1.5rem; color: var(--ok); }
.reply-card { border-left: 4px solid var(--ok); }
.big-stars .stars { font-size: 1.6rem; }
.hw-form .card { margin-top: 14px; }
.hw-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.new-hw { margin: 20px 0; }
.new-hw summary, .edit-hw summary { cursor: pointer; }
.new-hw .form, .edit-hw .form { margin-top: 16px; }
.edit-hw { margin-top: 20px; }
.edit-hw > form:last-child { margin-top: 12px; }

/* ───── onboarding / help ───── */
.welcome { max-width: 560px; margin: 0 auto; padding: 16px 0; }
.welcome-steps { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; }
.welcome-steps li { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.welcome-steps .n { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; }
.welcome-steps p { margin: 4px 0 0; color: var(--ink-2); font-size: .95rem; }
.help .card h3 { margin-top: 0; }

/* ───── teacher editor ───── */
.save-bar { position: sticky; bottom: 0; background: var(--surface); padding: 14px 0; border-top: 1px solid var(--line); display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.ed-step { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin: 0 0 16px; }
.ed-step legend { font-weight: 700; padding: 0 6px; color: var(--primary); }
.ed-field { display: grid; grid-template-columns: 140px 1fr auto; gap: 10px; align-items: center; margin: 6px 0; }
.ed-field textarea { font-size: .9rem; }
.ed-label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.ed-list { padding-left: 22px; margin: 8px 0; }
.ed-list > li { border-top: 1px dashed var(--line); padding: 8px 0; }
.ed-sub { margin-left: 16px; padding-left: 12px; border-left: 2px solid var(--line-2); }
.uz-in { font-weight: 600; }
.ed-voice { display: flex; gap: 6px; align-items: center; }
.ed-voice .say { width: 34px; height: 34px; }
.mic { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--bad); cursor: pointer; font-size: .9rem; }
.mic.on { background: var(--bad); color: #fff; }
.mic.has { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.ed-table { display: grid; gap: 4px; margin: 6px 0 10px; overflow-x: auto; }
.ed-trow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(120px, 1fr); gap: 4px; }
.ed-trow input { font-size: .85rem; padding: 6px 8px; }
.media-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
progress { width: 160px; }
@media (max-width: 700px) { .ed-field { grid-template-columns: 1fr; } }

/* ───── AI conversation ───── */
.talk-topic { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.talk-topic:hover:not(:disabled) { border-color: var(--primary); }
.talk-topic:disabled { opacity: .6; cursor: default; }
.talk-topic .chev { color: var(--muted); }
.talk-title { display: flex; flex-direction: column; line-height: 1.25; }
.talk-title small { color: var(--muted); }
.chat { margin-top: 8px; }
.chat .bubble.r .b-in { flex-direction: column; }
.fix { background: var(--warn-soft); border-radius: 12px; padding: 8px 12px; margin-top: 6px; }
.fix p { margin: 0 0 4px; }
.fix .say { width: 32px; height: 32px; }
.talk-bar { align-items: flex-end; }
.talk-input { flex: 1; resize: none; min-height: 48px; max-height: 120px; padding: 12px 14px; line-height: 1.35; }
.talk-bar .btn.primary { flex: 0 0 auto !important; margin-left: 0 !important; }
.talk-mic { width: 48px; padding: 0; flex: none; }
.talk-mic.on { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.lp-foot .charbar { margin: 8px 0 0; align-items: center; width: 100%; }
.lp-foot .charbar .btn.ghost { margin-left: auto; }
.talk-status { max-width: 720px; margin: 6px auto 0; min-height: 1em; }
.chips { max-width: 720px; margin: 0 auto 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--primary); background: var(--primary-soft); color: var(--ink); border-radius: 20px; padding: 8px 14px; font: 500 .95rem var(--font); cursor: pointer; text-align: left; }
.dots3 { display: inline-flex; gap: 4px; padding: 6px 4px; }
.dots3 i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.dots3 i:nth-child(2) { animation-delay: .2s; } .dots3 i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots3 i { animation: none; opacity: .6; } }
.talk-end { text-align: center; color: var(--ok); font-weight: 600; }
body.focus .talk { padding-bottom: 120px; }
.readonly .lp-head { position: static; }
