@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(fonts/nunito-latin-wght-normal.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: 'Nunito'; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(fonts/nunito-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: italic; font-display: swap; font-weight: 200 1000;
  src: url(fonts/nunito-latin-wght-italic.woff2) format('woff2'); }
:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #efebe4;
  --ink: #1b1d2a;
  --ink-2: #555a6e;
  --muted: #8a8e9e;
  --line: #e4dfd6;
  --brand: #1a4fd6;
  --brand-ink: #ffffff;
  --brand-soft: #e3ebfd;
  --accent: #f2603a;
  --accent-soft: #ffe8df;
  --good: #16a06a;
  --good-soft: #dcf4e9;
  --bad: #e0453a;
  --bad-soft: #fde3e0;
  --star: #f5a524;
  --shadow: 0 1px 2px rgba(27, 29, 42, .06), 0 6px 20px rgba(27, 29, 42, .06);
  --radius: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161f; --surface: #1d2030; --surface-2: #262a3d; --ink: #eef0f7; --ink-2: #b4b8ca;
    --muted: #8187a0; --line: #2e3248; --brand: #6ea2ff; --brand-ink: #0d1526; --brand-soft: #1c2b52;
    --accent: #ff8a63; --accent-soft: #3d2620; --good: #3ccf8e; --good-soft: #173a2c; --bad: #ff6b60;
    --bad-soft: #3e1f1d; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14161f; --surface: #1d2030; --surface-2: #262a3d; --ink: #eef0f7; --ink-2: #b4b8ca;
  --muted: #8187a0; --line: #2e3248; --brand: #6ea2ff; --brand-ink: #0d1526; --brand-soft: #1c2b52;
  --accent: #ff8a63; --accent-soft: #3d2620; --good: #3ccf8e; --good-soft: #173a2c; --bad: #ff6b60;
  --bad-soft: #3e1f1d; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 6px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo img { width: 34px; height: 34px; display: block; border-radius: 10px; }
.brand-name { font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.icon-btn { background: none; border: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }

/* Search */
.search-wrap { position: sticky; top: 0; z-index: 5; padding: 8px 16px 10px; background: var(--bg); }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 0 8px 0 14px; height: 54px; box-shadow: var(--shadow); color: var(--muted); transition: border-color .15s; }
.search:focus-within { border-color: var(--brand); color: var(--brand); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 18px; color: var(--ink); height: 100%; }
.search input::-webkit-search-cancel-button { display: none; }
.clear { border: 0; background: var(--surface-2); color: var(--ink-2); width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }

main { padding: 4px 16px 24px; outline: none; }
.section-title { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 2px 10px; display: flex; justify-content: space-between; align-items: center; }
.section-title button { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 14px; background: none; border: 0; color: var(--brand); cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Word of the day */
.wotd { position: relative; overflow: hidden; display: block; padding: 20px; color: #fff; background: linear-gradient(135deg, #0a9cf0 0%, #1846d0 50%, #5b23cf 100%); border-radius: 22px; box-shadow: 0 10px 30px rgba(24, 70, 208, .25); }
.wotd .tag { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.wotd .w { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 0; line-height: 1.15; }
.wotd .u { font-size: 18px; opacity: .92; margin-top: 2px; }
.wotd .ex { margin-top: 12px; font-size: 15px; opacity: .9; font-style: italic; }
.wotd .emoji { position: absolute; right: 14px; top: 10px; font-size: 64px; opacity: .95; transform: rotate(8deg); }
.wotd .speak { position: absolute; right: 16px; bottom: 16px; background: rgba(255,255,255,.2); color: #fff; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 15px; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chip.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); font-weight: 600; }

/* Stats row */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { padding: 14px 12px; text-align: center; }
.stat b { display: block; font-size: 24px; font-weight: 800; }
.stat span { font-size: 13px; color: var(--muted); }

/* Result list */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.row:hover { background: var(--surface-2); }
.list li:first-child .row { border-radius: var(--radius) var(--radius) 0 0; }
.list li:last-child .row { border-radius: 0 0 var(--radius) var(--radius); }
.list li:only-child .row { border-radius: var(--radius); }
.row .em { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); border-radius: 12px; }
.row .txt { flex: 1; min-width: 0; }
.row .w { font-weight: 700; font-size: 17px; }
.row .u { color: var(--ink-2); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row mark { background: none; color: var(--brand); }
.row .lvl { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.row .star { color: var(--star); font-size: 18px; }

.empty { text-align: center; padding: 34px 18px; }
.empty .big { font-size: 48px; }
.empty h3 { margin: 8px 0 4px; font-size: 20px; }
.empty p { margin: 0 0 16px; color: var(--ink-2); }

/* Buttons */
.btn { border: 0; border-radius: 14px; padding: 12px 18px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.round { border: 0; width: 46px; height: 46px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; background: var(--brand-soft); color: var(--brand); flex: none; }
.round.sm { width: 36px; height: 36px; }
.round.on { background: var(--star); color: #fff; }

/* Word page */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 600; background: none; border: 0; padding: 6px 0; cursor: pointer; }
.hero { padding: 20px; margin-top: 6px; }
.hero-top { display: flex; align-items: flex-start; gap: 14px; }
.hero .emoji { font-size: 52px; line-height: 1; }
.hero h1 { margin: 0; font-size: 36px; line-height: 1.1; letter-spacing: -.02em; word-break: break-word; }
.ipa { color: var(--ink-2); font-size: 17px; margin-top: 4px; font-family: "Charis SIL", "Lucida Sans Unicode", "Segoe UI", sans-serif; }
.pos { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 8px; margin-right: 6px; }
.uz { margin-top: 14px; padding: 12px 14px; background: var(--brand-soft); border-radius: 14px; display: flex; gap: 10px; align-items: baseline; }
.uz .flag { font-size: 12px; font-weight: 800; color: var(--brand); letter-spacing: .05em; }
.uz .t { font-size: 20px; font-weight: 700; color: var(--ink); }
.speak-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.speak-row .btn { padding: 10px 14px; font-size: 15px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pill { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.pill.ai { background: var(--accent-soft); color: var(--accent); }

.block { padding: 16px 18px; margin-top: 12px; }
.block h2 { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.defs { margin: 0; padding: 0; list-style: none; counter-reset: d; }
.defs li { counter-increment: d; position: relative; padding-left: 28px; margin: 10px 0; }
.defs li::before { content: counter(d); position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); font-size: 12px; font-weight: 700; display: grid; place-items: center; color: var(--ink-2); }
.defs .eg { color: var(--ink-2); font-style: italic; margin-top: 2px; }
.ex { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; }
.ex + .ex { border-top: 1px dashed var(--line); }
.ex .lv { flex: none; font-size: 11px; font-weight: 800; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; margin-top: 3px; width: 58px; text-align: center; }
.lv.easy { background: var(--good-soft); color: var(--good); }
.lv.normal { background: var(--brand-soft); color: var(--brand); }
.lv.hard { background: var(--accent-soft); color: var(--accent); }
.lv.more { background: var(--surface-2); color: var(--ink-2); }
.ex p { margin: 0; flex: 1; font-size: 16px; }
.ex p b { color: var(--brand); }
.ex .round { width: 32px; height: 32px; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; padding: 6px 0; }
.spin { width: 18px; height: 18px; border: 2.5px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-box { padding: 18px; margin-top: 12px; border: 2px dashed var(--line); background: transparent; box-shadow: none; text-align: center; }
.ai-box p { margin: 0 0 12px; color: var(--ink-2); }

/* Saved */
.tools { display: flex; gap: 8px; margin: 6px 0 12px; }

/* Flashcards */
.fc-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.progress { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-bottom: 16px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--accent)); border-radius: 8px; transition: width .3s; }
.flash { perspective: 1200px; height: 340px; cursor: pointer; }
.flash .inner { position: relative; width: 100%; height: 100%; transition: transform .45s cubic-bezier(.2,.7,.3,1); transform-style: preserve-3d; }
.flash.flipped .inner { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); }
.face.back { transform: rotateY(180deg); }
.face .emoji { font-size: 64px; }
.face .big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin-top: 8px; }
.face .hint { position: absolute; bottom: 16px; font-size: 13px; color: var(--muted); }
.face .exs { margin-top: 14px; color: var(--ink-2); font-style: italic; font-size: 15px; }
.face .round { position: absolute; top: 14px; right: 14px; }
.grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.grade .btn { padding: 16px; font-size: 17px; }
.btn.again { background: var(--bad-soft); color: var(--bad); }
.btn.good { background: var(--good-soft); color: var(--good); }
.dir { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 3px; }
.dir button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.dir button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { position: relative; flex: 1; max-width: 186px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.tabs a.on { color: var(--brand); }
.badge { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 800; }

/* Settings */
dialog { border: 0; border-radius: 22px; padding: 0; width: min(92vw, 400px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(10, 12, 20, .45); }
dialog form { padding: 22px; }
dialog h2 { margin: 0 0 6px; }
.set-label { font-weight: 700; margin: 16px 0 8px; }
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; }
.seg label { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px 6px; border-radius: 9px; font-weight: 600; font-size: 15px; cursor: pointer; }
.seg input:checked + span { background: var(--surface); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }
dialog .muted { margin: 18px 0 14px; }

.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 30; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Practice hub */
.fc-entry { display: flex; align-items: center; gap: 14px; padding: 16px; }
.fc-entry .em.big { font-size: 34px; }
.fc-entry .txt { flex: 1; display: flex; flex-direction: column; }
.fc-entry b { font-size: 18px; }
.pill-count { background: var(--accent); color: #fff; border-radius: 999px; min-width: 30px; height: 30px; display: grid; place-items: center; padding: 0 8px; }
.src { padding: 12px; }
.dir.wide { display: flex; width: 100%; }
.dir.wide button { flex: 1; padding: 9px 8px; font-size: 15px; }
.pick { display: flex; gap: 8px; margin-top: 10px; }
.pick select { flex: 1; min-width: 0; font: inherit; font-weight: 600; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.games { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.game { position: relative; padding: 14px; display: flex; flex-direction: column; gap: 2px; min-height: 118px; transition: transform .12s; }
.game:active { transform: scale(.97); }
.game .gi { font-size: 30px; line-height: 1.2; margin-bottom: 4px; }
.game b { font-size: 16px; line-height: 1.25; }
.game .best { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 800; color: var(--star); }
.game.off { opacity: .45; pointer-events: none; }
.games .game:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 0; }

/* Playing */
.play-head { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.play-head .score { font-weight: 800; color: var(--star); min-width: 44px; text-align: right; }
.qcard { padding: 24px 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.qhint { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.qword { font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; word-break: break-word; }
.qword.qu { color: var(--brand); font-size: 26px; background: var(--brand-soft); border-radius: 14px; padding: 8px 16px; margin-top: 6px; }
.qeq { font-size: 22px; color: var(--muted); font-weight: 700; }
.big-say { padding: 16px 26px; font-size: 18px; margin-top: 8px; }
.opts { display: grid; gap: 10px; margin-top: 14px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opt { border: 2px solid var(--line); background: var(--surface); border-radius: 16px; padding: 15px 16px; font-size: 17px; font-weight: 700; text-align: left; cursor: pointer; box-shadow: var(--shadow); color: var(--ink); }
.opts.two .opt { text-align: center; font-size: 19px; }
.opt:hover:not(:disabled) { border-color: var(--brand); }
.opt.right { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.opt.dim { opacity: .5; }
.tinput { width: 100%; margin-top: 14px; font-size: 22px; font-weight: 700; text-align: center; padding: 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); outline: none; }
.tinput:focus { border-color: var(--brand); }
.tinput.right { border-color: var(--good); background: var(--good-soft); }
.tinput.wrong { border-color: var(--bad); background: var(--bad-soft); text-decoration: line-through; }
.letters { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.letters .lc, .letters .lt { width: 34px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; font-weight: 800; text-transform: lowercase; }
.letters .lc { background: var(--surface-2); }
.letters .lt { border: 2px solid var(--brand); background: var(--brand-soft); color: var(--ink); text-align: center; padding: 0; outline: none; }
.letters .lt:focus { background: var(--surface); }
.letters .lt.right { border-color: var(--good); background: var(--good-soft); }
.letters .lt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.letters .sp { width: 12px; }
.fb { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); margin-top: 16px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; box-shadow: var(--shadow); }
.fb > div { flex: 1; min-width: 0; }
.fb.good { background: var(--good-soft); color: var(--good); }
.fb.bad { background: var(--bad-soft); color: var(--bad); }
.fb .small { color: var(--ink-2); margin-top: 2px; }
.fb .btn { flex: none; }
.mem { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mcard { display: flex; align-items: center; justify-content: center; text-align: center; min-width: 0; overflow: hidden; height: 96px; border: 2px solid transparent; border-radius: 14px; background: linear-gradient(135deg, #0a9cf0, #1846d0 55%, #5b23cf); color: #fff; font-size: 24px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); padding: 6px; line-height: 1.15; word-break: break-word; }
.mcard.open { background: var(--surface); color: var(--ink); font-size: 15px; border: 2px solid var(--brand); }
.mcard.open.side-uz { color: var(--brand); }
.mcard.done { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.result { padding: 26px 20px; text-align: center; }
.result h2 { margin: 6px 0 0; font-size: 26px; }
.stars { font-size: 46px; letter-spacing: 6px; color: var(--line); }
.stars .on { color: var(--star); }
.big-pct { font-size: 52px; font-weight: 800; margin: 4px 0 0; background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.row-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* ---------- polish ---------- */
body { font-feature-settings: "ss01"; -webkit-font-smoothing: antialiased; }
.top-right { display: flex; align-items: center; gap: 4px; }
.streak-chip { font-weight: 800; font-size: 15px; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.offline-bar { margin: 0 16px 4px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600; }
.mic { border: 0; background: var(--brand-soft); color: var(--brand); width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; flex: none; }
.mic.on { background: var(--accent); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 25%, transparent); } }
main.enter { animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.h2 { margin: 6px 2px 14px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.fc-head .h2 { margin: 0; }
.back { margin-bottom: 4px; }
.skel { display: block; height: 14px; width: 100%; border-radius: 7px; margin: 8px 0; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
.ipa .skel { display: inline-block; margin: 4px 0 0; }
@keyframes skel { to { background-position: -200% 0; } }
.round.ghost { background: var(--surface-2); color: var(--ink-2); }
a.pill:hover { background: var(--brand-soft); color: var(--brand); }

/* Word of the day actions */
.wotd .wotd-actions { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.wotd .wotd-actions .round { background: rgba(255,255,255,.2); color: #fff; }
.wotd .wotd-actions .round.on { background: var(--star); }
.wotd .ex { padding-right: 96px; }

/* Daily goal */
.goal { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-top: 14px; }
.goal .txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.goal b { font-size: 17px; }
.ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring span { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 20px; }
.chev { color: var(--muted); display: grid; place-items: center; }
.stats { margin-top: 10px; }
.hint { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.hint span { flex: 1; }

/* Levels */
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lvl-card { padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.lvl-card .li { font-size: 26px; }
.lvl-card b { font-size: 15px; }
.page-head { display: flex; align-items: center; gap: 14px; margin: 6px 2px 4px; }
.page-head .li { font-size: 40px; }
.page-head h2 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
.page-head p { margin: 0; }

/* Saved progress dots */
.dots { display: flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--good); }

/* Practice */
.pts-chip { font-weight: 800; font-size: 14px; padding: 5px 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--star); }
.play-sub { margin: 8px 2px 14px; }
.earned { margin: 10px 0 0; color: var(--ink-2); }
.letters .lw { display: inline-flex; gap: 5px; margin-right: 12px; }
.letters .lw:last-of-type { margin-right: 0; }

/* Welcome */
body.first-run .search-wrap, body.first-run .tabs, body.first-run .top { display: none; }
.welcome { text-align: center; padding: calc(28px + env(safe-area-inset-top)) 6px 20px; }
.welcome-logo { width: 84px; height: 84px; border-radius: 24px; box-shadow: 0 12px 30px rgba(24, 70, 208, .3); }
.welcome h1 { font-size: 30px; letter-spacing: -.02em; margin: 18px 0 4px; }
.welcome .lead { color: var(--ink-2); margin: 0 0 20px; font-size: 17px; }
.tips { list-style: none; padding: 0; margin: 0 0 20px; text-align: left; display: grid; gap: 10px; }
.tips li { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); font-weight: 600; }
.tips li span { font-size: 22px; width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--brand-soft); border-radius: 12px; }
.welcome .set-label { text-align: left; }
.btn.big { padding: 16px; font-size: 18px; margin-top: 18px; }
.welcome .dir.wide button.on { background: var(--surface); }

@media (min-width: 700px) {
  #app { max-width: 640px; }
  .games { grid-template-columns: repeat(3, 1fr); }
  .games .game:last-child:nth-child(odd) { grid-column: auto; }
}
.nowrap { white-space: nowrap; }
.btn .cnt { background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 8px; font-size: 14px; }
.speak-row { align-items: center; flex-wrap: nowrap; gap: 8px; }
.speak-row .round { font-size: 20px; }

/* CEFR level badges */
.cefr { --c: #16a06a; display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 7px; font-size: 12px; font-weight: 900; letter-spacing: .02em; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1.5px solid color-mix(in srgb, var(--c) 35%, transparent); flex: none; }
.cefr.big { height: 28px; min-width: 40px; font-size: 15px; border-radius: 9px; }
.c1 { --c: #16a06a; } .c2 { --c: #0e9f9a; } .c3 { --c: #2f6fe0; } .c4 { --c: #5b4bdb; } .c5 { --c: #d9600f; } .c6 { --c: #d4373a; }
:root[data-theme="dark"] .c1, :root[data-theme="dark"] .c2 { --c: #3ccf8e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .c3 { --c: #6b9bff; } :root:not([data-theme="light"]) .c4 { --c: #9b8cff; } :root:not([data-theme="light"]) .c5 { --c: #ff8a4c; } :root:not([data-theme="light"]) .c6 { --c: #ff6b6b; } }
:root[data-theme="dark"] .c3 { --c: #6b9bff; } :root[data-theme="dark"] .c4 { --c: #9b8cff; } :root[data-theme="dark"] .c5 { --c: #ff8a4c; } :root[data-theme="dark"] .c6 { --c: #ff6b6b; }
.ipa-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ipa-row .ipa { margin-top: 0; }
.pill.lvl-pill { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.pill.lvl-pill i { font-style: normal; color: inherit; opacity: .75; }
.row .cefr { margin-left: 2px; }
.ex[hidden] { display: none; }
.ex .lv { width: 64px; display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 4px 4px; text-transform: none; font-weight: 700; font-size: 10.5px; }
.ex .lv b { font-size: 14px; font-weight: 900; }
.block h2 .h2-note { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--muted); font-size: 12px; margin-left: 6px; }
.more-btn { margin-top: 10px; }

/* logo palette: blue → purple with a teal accent */
.progress i { background: linear-gradient(90deg, #0a9cf0, #1846d0, #5b23cf); }
.big-pct { background: linear-gradient(90deg, #0a9cf0, #5b23cf); -webkit-background-clip: text; background-clip: text; }
.brand-name { color: var(--ink); }
.brand-name .dot { color: #00c2b4; }
.uz .flag { color: #00a99d; }

/* ---------- 5-tab menu, profile ---------- */
.tabs a { max-width: 120px; font-size: 11px; }
.tabs .tab-search { gap: 3px; }
.tabs .sbub { width: 44px; height: 44px; margin-top: -20px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #0aa3f2, #1846d0 55%, #5b23cf); box-shadow: 0 6px 16px rgba(24, 70, 208, .35); border: 3px solid var(--bg); box-sizing: content-box; }
.tabs .tab-search.on .sbub { box-shadow: 0 6px 18px rgba(24, 70, 208, .55); }
body:not([data-route="search"]):not([data-route="word"]):not([data-route="level"]) .search-wrap { display: none; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--brand-soft); border: 2px solid var(--surface); box-shadow: var(--shadow); }
.avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 30px; background: var(--brand-soft); }
.avatar.big { width: 84px; height: 84px; font-size: 46px; box-shadow: 0 8px 24px rgba(24, 70, 208, .18); }
.hello h1 { font-size: 26px; letter-spacing: -.02em; margin: 4px 2px 2px; }
.hello p { margin: 0 2px 14px; }
.search.fake { margin-bottom: 16px; font-size: 17px; color: var(--muted); }
.search.fake span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-hint { margin: 4px 2px 0; font-size: 15px; }
.pform { padding-bottom: 24px; }
.pform-head { text-align: center; padding: calc(18px + env(safe-area-inset-top)) 0 4px; }
.pform-head .avatar { margin: 0 auto; }
.pform-head h1 { font-size: 26px; letter-spacing: -.02em; margin: 14px 0 4px; }
.pform-head p { margin: 0; }
.field { width: 100%; box-sizing: border-box; height: 52px; border: 2px solid var(--line); border-radius: 14px; padding: 0 14px; font: inherit; font-size: 17px; background: var(--surface); color: var(--ink); outline: 0; }
.field:focus { border-color: var(--brand); }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.avatars input { position: absolute; opacity: 0; pointer-events: none; }
.avatars span { display: grid; place-items: center; aspect-ratio: 1; font-size: 26px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); cursor: pointer; }
.avatars input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.avatars input:focus-visible + span { outline: 2px solid var(--brand); }
.seg.wrap { flex-wrap: wrap; }
.seg.wrap label { flex: 1 0 auto; }
.seg.goals span { display: flex; flex-direction: column; gap: 1px; padding: 8px 4px; }
.seg.goals small { font-size: 12px; color: var(--muted); font-weight: 600; }
.phead { display: flex; align-items: center; gap: 14px; padding: 16px; margin-top: 4px; }
.phead .avatar.big { width: 72px; height: 72px; font-size: 40px; }
.pinfo { flex: 1; min-width: 0; }
.pinfo h2 { margin: 0; font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmeta { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; margin: 2px 0 4px; }
.btn.sm { padding: 8px 10px; border-radius: 12px; }
.pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.pstat { padding: 12px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.pstat .pe { font-size: 20px; }
.pstat b { font-size: 22px; font-weight: 800; }
.pstat span:last-child { font-size: 12px; color: var(--muted); line-height: 1.2; }
.week { padding: 16px 12px 10px; }
.bars { position: relative; display: flex; gap: 8px; height: 110px; align-items: flex-end; }
.goal-line { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--line); pointer-events: none; }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar i { display: block; width: 100%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: var(--brand-soft); position: relative; z-index: 1; }
.bar.hit i { background: linear-gradient(180deg, #0aa3f2, #1846d0); }
.bar-labels { display: flex; gap: 8px; margin-top: 6px; }
.bar-labels span { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.bar-labels span.today { color: var(--brand); }
.settings-inline { padding: 4px 16px 16px; }

/* ---------- own word lists & certificates ---------- */
.imp-entry { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; color: #fff;
  background: linear-gradient(135deg, #0aa3f2, #1846d0 55%, #5b23cf); box-shadow: 0 10px 26px rgba(24, 70, 208, .28); }
.imp-entry .txt { flex: 1; display: flex; flex-direction: column; }
.imp-entry b { font-size: 18px; }
.imp-entry .small { opacity: .85; }
.imp-icons { font-size: 26px; display: flex; flex-direction: column; align-items: center; line-height: 1; position: relative; width: 48px; height: 48px; justify-content: center; background: rgba(255,255,255,.18); border-radius: 14px; }
.imp-icons i { display: none; }
.imp-entry .plus { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #1846d0; display: grid; place-items: center; font-size: 22px; font-weight: 800; flex: none; }
.imp-tabs { margin-bottom: 12px; }
.imp-box { padding: 14px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 16px; border: 2px dashed var(--line); border-radius: 16px; text-align: center; cursor: pointer; }
.drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.drop .di { font-size: 44px; }
.drop b { font-size: 17px; }
.field.area { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.45; margin-bottom: 12px; }
.imp-busy, .imp-err { display: flex; align-items: center; gap: 12px; padding: 16px; margin-top: 12px; }
.imp-err { color: var(--bad); font-weight: 600; }
.chk { list-style: none; margin: 14px 0 0; padding: 4px 0; }
.chk-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.chk-row + .chk-row { border-top: 1px solid var(--line); }
.chk-row .em { width: 36px; height: 36px; flex: none; display: grid; place-items: center; font-size: 20px; background: var(--surface-2); border-radius: 10px; }
.chk-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chk-fields input { border: 0; background: none; font: inherit; color: var(--ink); padding: 2px 0; outline: 0; min-width: 0; }
.chk-fields input:focus { box-shadow: inset 0 -2px 0 var(--brand); }
.chk-fields .w { font-weight: 800; font-size: 17px; }
.chk-fields .u { color: var(--ink-2); font-size: 15px; }
.chk-fields .u.need { box-shadow: inset 0 -2px 0 var(--accent); }
.chk-fields .u::placeholder { color: var(--accent); }
.prog-card, .cert-card { padding: 16px; margin-top: 12px; }
.prog-top { display: flex; gap: 12px; align-items: flex-start; }
.prog-top b { font-size: 17px; }
.ci { font-size: 30px; line-height: 1; }
.steps { display: flex; align-items: center; margin-top: 14px; }
.steps span { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--surface-2); color: var(--muted); }
.steps span.on { background: var(--good); color: #fff; }
.steps span.next { background: var(--star); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--star) 30%, transparent); }
.steps i { flex: 1; height: 3px; background: var(--surface-2); margin: 0 4px; border-radius: 2px; }
.cert-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #fff6df, #ffe9b8); color: #5a3d00; }
:root[data-theme="dark"] .cert-card { background: linear-gradient(135deg, #3a2f12, #4a3a10); color: #ffe3a3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cert-card { background: linear-gradient(135deg, #3a2f12, #4a3a10); color: #ffe3a3; } }
.cert-card .txt { flex: 1; display: flex; flex-direction: column; }
.cert-card .muted { color: inherit; opacity: .75; }
.cert-win { padding: 22px 18px; margin-top: 14px; text-align: center; }
.cert-win .cw { font-size: 54px; }
.cert-win h3 { margin: 4px 0; font-size: 22px; }
.cert-win p { color: var(--ink-2); margin: 0 0 6px; }
.cert-img { padding: 8px; overflow: hidden; }
.cert-img img { display: block; width: 100%; height: auto; border-radius: 10px; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.link { color: var(--brand); font-weight: 700; }
.dir.wide button { white-space: nowrap; }

/* ---------- Telegram channel gate ---------- */
.gate { text-align: center; padding: calc(28px + env(safe-area-inset-top)) 2px 24px; }
.gate h1 { font-size: 28px; letter-spacing: -.02em; margin: 18px 0 6px; }
.gate .lead { color: var(--ink-2); margin: 0 0 18px; font-size: 17px; }
.gate-steps { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.gate-steps li { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.gate-steps li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.gate-steps .n { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; }
.btn.tg { background: #229ed9; color: #fff; }
.tg-login { min-height: 44px; display: flex; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; }
.gate .imp-err { justify-content: center; margin: 0 0 12px; }

/* ---------- two-way search ---------- */
.sdir { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.sdir .dir button { padding: 6px 10px; font-size: 13px; }
.row .ex { margin-top: 2px; font-style: italic; }
.row .ex b { color: var(--ink); }

/* ---------- check my English ---------- */
.chk-entry { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-top: 14px; }
.chk-entry .em.big { font-size: 30px; }
.chk-entry .txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ai-pill { flex: none; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #0a9cf0, #5b23cf); border-radius: 999px; padding: 3px 9px; }
.entry-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.entry-row .fc-entry { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; position: relative; }
.entry-row .fc-entry b { font-size: 16px; }
.entry-row .fc-entry .em.big { font-size: 28px; }
.entry-row .pill-count, .entry-row .ai-pill { position: absolute; top: 12px; right: 12px; }
.chk-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chk-bar .btn.big { margin: 0; }
.chk-score { display: flex; align-items: center; gap: 14px; padding: 16px; margin-top: 14px; }
.chk-score .ring { width: 64px; height: 64px; }
.chk-score .ring span { width: 50px; height: 50px; font-size: 26px; }
.chk-score .sc { font-size: 22px; }
.chk-score p { margin: 2px 0 0; color: var(--ink-2); }
.chk-text { padding: 16px; font-size: 19px; line-height: 2.1; word-break: break-word; }
.mk { white-space: nowrap; }
.mk del, .fix-list del, .legend del { color: var(--bad); background: var(--bad-soft); text-decoration: line-through; text-decoration-thickness: 2px; border-radius: 6px; padding: 1px 4px; }
.mk ins, .fix-list ins, .legend ins { color: var(--good); background: var(--good-soft); text-decoration: none; font-weight: 800; border-radius: 6px; padding: 1px 4px; margin-left: 3px; }
.mk sup { font-size: 11px; font-weight: 800; color: #fff; background: var(--bad); border-radius: 999px; padding: 0 5px; margin-left: 2px; }
.legend { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12px; }
.fix-list { list-style: none; padding: 6px 14px; margin: 0; }
.fix-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fix-list li:last-child { border-bottom: 0; }
.fix-list .num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--bad); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.fix-list .fx { font-size: 17px; line-height: 1.7; }
.fix-list .why { color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.fix-list .why::before { content: '💡 '; }
.chk-good { padding: 16px; text-align: center; background: var(--good-soft); color: var(--good); border-radius: 16px; font-size: 18px; margin-top: 12px; }
.chk-fixed { padding: 16px; }
.chk-fixed p { margin: 0 0 12px; font-size: 18px; line-height: 1.6; }
.chk-fixed .row-btns { justify-content: flex-start; }

/* ---------- learning path ---------- */
.cnt-chip { text-transform: none; letter-spacing: 0; background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.path-card { padding: 14px 16px; }
.medals { display: flex; justify-content: space-between; gap: 6px; margin-top: 12px; }
.medal { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--surface-2); filter: grayscale(1); opacity: .45; }
.medal i { position: absolute; bottom: -4px; right: -4px; font-style: normal; font-size: 11px; font-weight: 800; background: var(--surface); color: var(--muted); border-radius: 999px; padding: 0 5px; box-shadow: var(--shadow); }
.medal.on { filter: none; opacity: 1; background: var(--accent-soft); box-shadow: var(--shadow); }
.path { list-style: none; padding: 6px 0 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.path .node { padding-left: calc((var(--x) + 2) * 10px); padding-right: calc((2 - var(--x)) * 10px); }
.path .node > a, .path .node > button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); text-align: left; font: inherit; cursor: pointer; }
.path .nc { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); }
.path .nt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.path .nt b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.path .nt .small { color: var(--muted); }
.path .nmedal { flex: none; font-size: 24px; filter: grayscale(1); opacity: .5; }
.path .nmedal.on { filter: none; opacity: 1; }
.path .done > a { border-color: var(--good); }
.path .done .nc { background: var(--good); color: #fff; font-weight: 900; }
.path .cur > a { border-color: var(--brand); background: var(--brand-soft); }
.path .cur .nc { background: var(--brand); animation: pulse 1.6s ease-in-out infinite; }
.path .cur .nt .small { color: var(--brand); font-weight: 800; }
.path .lock > button { opacity: .6; box-shadow: none; }
.path.off .node > a { opacity: .5; pointer-events: none; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(26, 79, 214, .45); } 50% { box-shadow: 0 0 0 9px rgba(26, 79, 214, 0); } }

/* ---------- free practice ---------- */
.free { padding: 14px 16px; }
.free-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { border: 2px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.fchip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.fchip.on::after { content: ' ✓'; }
.free-bottom { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.free-bottom .btn { margin-left: auto; }
.btn.off, .chip.off { opacity: .5; }
.free-games { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- new activities ---------- */
.qemoji { font-size: 84px; line-height: 1.1; }
.gap-s { font-size: 20px; line-height: 1.6; font-weight: 600; margin-top: 6px; }
.gap-s .blank { display: inline-block; min-width: 80px; border-bottom: 3px solid var(--brand); color: var(--brand); font-weight: 800; padding: 0 4px; }
.gap-s .blank.right { color: var(--good); border-color: var(--good); }
.gap-s .blank.wrong { color: var(--bad); border-color: var(--bad); }
.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.slot { width: 36px; height: 46px; border-radius: 10px; border: 2px dashed var(--line); display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.slot.on { border-style: solid; border-color: var(--brand); background: var(--brand-soft); }
.slot.on.right { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.slot.on.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.slot.fixed { border: 0; }
.sgap { width: 14px; }
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 12px; }
.tile { min-width: 46px; height: 50px; border-radius: 12px; border: 0; background: var(--surface); box-shadow: 0 3px 0 var(--line), var(--shadow); font: inherit; font-size: 22px; font-weight: 800; color: var(--ink); cursor: pointer; padding: 0 12px; }
.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.tile.used { background: transparent; box-shadow: none; border: 2px dashed var(--line); width: 46px; min-width: 46px; }
.tile.w { font-size: 17px; height: 44px; }
.built { min-height: 52px; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; padding: 8px; border-radius: 14px; border: 2px dashed var(--line); }
.built.right { border: 2px solid var(--good); background: var(--good-soft); }
.built.wrong { border: 2px solid var(--bad); background: var(--bad-soft); }
.wtile { background: var(--brand-soft); color: var(--brand); border-radius: 10px; padding: 6px 10px; font-weight: 800; font-size: 17px; }
.tinput.area { font-size: 18px; text-align: left; resize: none; font-family: inherit; }
.mic-big { margin-top: 14px; }
.mic-big.on { background: var(--bad); animation: pulse 1.2s ease-in-out infinite; }
.timer { flex: 1; text-align: center; font-size: 22px; font-weight: 900; color: var(--brand); }
.timer.low { color: var(--bad); }
.pulse-good { animation: pg .4s; }
.pulse-bad { animation: pb .4s; }
@keyframes pg { 0% { box-shadow: 0 0 0 4px var(--good); } 100% { box-shadow: var(--shadow); } }
@keyframes pb { 0% { box-shadow: 0 0 0 4px var(--bad); } 100% { box-shadow: var(--shadow); } }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ccol { display: flex; flex-direction: column; gap: 10px; }
.cbtn { min-height: 58px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; padding: 8px; cursor: pointer; box-shadow: var(--shadow); word-break: break-word; line-height: 1.2; }
.ccol.cuz .cbtn { color: var(--brand); }
.cbtn.sel { border-color: var(--brand); background: var(--brand-soft); }
.cbtn.wrong { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); animation: shake .3s; }
.cbtn.done { border-color: var(--good); background: var(--good-soft); color: var(--good); opacity: .7; box-shadow: none; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.intro { padding: 26px 20px; text-align: center; }
.intro .ib { font-size: 56px; }
.intro h3 { margin: 6px 0; font-size: 22px; }
.intro p { color: var(--ink-2); }
.cert-win { border: 3px solid var(--tc, var(--star)); }
.qcard .exs { margin-top: 10px; color: var(--ink-2); font-style: italic; }

/* Speaking practice: all controls remain usable on narrow phones. */
.speak-setup, .speak-controls, .speak-review { padding: 18px; margin-bottom: 14px; }
.speak-setup { display: grid; gap: 16px; }
.speak-setup label { display: grid; gap: 6px; font-weight: 800; }
.speak-setup select { width: 100%; background: var(--surface); color: var(--ink); font: inherit; }
.speak-bubble { padding: 14px 16px; margin: 12px 20px 12px 0; overflow-wrap: anywhere; }
.speak-bubble.from-user { margin: 12px 0 12px 20px; background: var(--brand-soft); }
.speak-bubble p { margin: 8px 0; white-space: pre-wrap; }
.speak-correction { padding: 10px; border-left: 3px solid var(--good); background: var(--good-soft); border-radius: 8px; }
.speak-controls { display: grid; gap: 12px; }
.speak-controls p { margin: 0; }
.speak-hands { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; }
.speak-hands input { width: 22px; height: 22px; }
#speakMessage { display: grid; gap: 8px; }
.speak-word { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.speak-word > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.speak-word .btn { flex-shrink: 0; }
.speak-review ul { padding-left: 20px; overflow-wrap: anywhere; }

.speak-messages { max-height: 44dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.speak-messages:empty { display: none; }

/* ---------- profile photo ---------- */
.avatar img, .avatar-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-btn { overflow: hidden; }
.photo-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.photo-btns label.btn { cursor: pointer; }

/* ---------- So‘z marafoni ---------- */
.mar-banner { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; color: #fff; background: linear-gradient(135deg, #ff7a3d 0%, #e5486b 55%, #7b3fe4 100%); border: 0; }
.mar-banner .mb-ic { font-size: 30px; }
.mar-banner .txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mar-banner .small { opacity: .92; }
.mar-banner .chev { color: #fff; opacity: .8; }
.mar-hero { margin: 6px 0 12px; padding: 18px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #ff7a3d 0%, #e5486b 55%, #7b3fe4 100%); box-shadow: 0 10px 30px rgba(229, 72, 107, .25); }
.mar-hero .mh-top { display: flex; gap: 12px; align-items: center; }
.mar-hero .mh-ic { font-size: 40px; }
.mar-hero h2 { margin: 0; font-size: 24px; }
.mar-hero p { margin: 2px 0 0; opacity: .92; }
.mar-hero .mh-prize { margin-top: 12px; font-weight: 800; font-size: 17px; }
.mar-lock { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; text-align: center; }
.mar-lock .ml-ic { font-size: 36px; }
.mar-lock b { font-size: 20px; }
.mar-join h3, .mar-test h3 { margin: 0 0 6px; }
.mar-join .seg { margin-bottom: 14px; }
.mar-today .mt-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.mar-today .mt-head b { font-size: 20px; }
.mar-words { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.mar-words .mw { display: grid; grid-template-columns: 26px 1fr; column-gap: 6px; padding: 7px 8px; border-radius: 12px; background: var(--surface-2); line-height: 1.2; min-width: 0; }
.mar-words .mw i { grid-row: span 2; font-style: normal; font-size: 20px; align-self: center; }
.mar-words .mw b { font-size: 14px; overflow-wrap: anywhere; }
.mar-words .mw small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.mar-ok { padding: 10px 12px; border-radius: 12px; background: var(--good-soft); color: var(--good); font-weight: 700; }
.mar-cal .progress { margin: 6px 0 10px; }
.mar-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mar-days li { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: var(--surface-2); font-size: 12px; }
.mar-days li b { font-size: 13px; }
.mar-days li.done { background: var(--good-soft); color: var(--good); }
.mar-days li.miss { background: var(--bad-soft); color: var(--bad); }
.mar-days li.cur { outline: 2px solid var(--brand); }
.mar-days li.lock { opacity: .6; }
.mar-rules summary { font-weight: 800; cursor: pointer; }
.mar-rules ol, .mar-rules ul { margin: 10px 0 0; padding-left: 20px; line-height: 1.5; }
.mar-topics { list-style: none; padding: 0 !important; }
.mar-topics li { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.mar-topics li.past { opacity: .55; }
.mar-topics li.now { font-weight: 800; color: var(--brand); }
.mar-src { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); }
.mar-src .small { width: 100%; color: var(--brand); font-weight: 700; }
.mar-q .mq-top { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; }
.mar-q .mq-time { font-size: 18px; font-variant-numeric: tabular-nums; }
.mar-q .progress { margin-bottom: 12px; }
.mq-card { text-align: center; padding: 22px 14px; }
.mq-em { font-size: 44px; }
.mq-word { font-size: 26px; font-weight: 800; margin: 6px 0; overflow-wrap: anywhere; }
.mq-opts { display: grid; gap: 8px; margin: 12px 0; }
.mq-opts .btn { justify-content: flex-start; text-align: left; white-space: normal; }

/* ---------- admin ---------- */
.adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-scroll { overflow-x: auto; margin: 12px 0; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.adm { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13px; }
.adm th, .adm td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.adm th { font-size: 12px; color: var(--muted); }
.adm tr.top td:first-child { font-weight: 800; color: var(--accent); }
.adm-days { display: grid; grid-template-columns: repeat(7, 16px); gap: 2px; margin-top: 4px; }
.adm-days i { font-style: normal; font-size: 9px; text-align: center; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.adm-days i.y { background: var(--good); color: #fff; }
.adm-days i.n { background: var(--bad-soft); color: var(--bad); }
.adm-tools { display: grid; gap: 10px; }
.adm-tools .pick { display: flex; gap: 8px; align-items: center; }
.adm td:nth-child(2) { min-width: 120px; } .adm td:last-child { min-width: 150px; }

/* Video guide */
.page-h { margin: 6px 2px 4px; font-size: 26px; letter-spacing: -.02em; }
.guide-card { display: flex; align-items: center; gap: 8px; padding: 12px 14px; margin-top: 12px; }
.guide-card .gc-main { display: flex; align-items: center; gap: 12px; flex: 1; color: inherit; text-decoration: none; min-width: 0; }
.guide-card .gc-ic { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 16px; padding-left: 3px; box-sizing: border-box; }
.guide-card .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.guide-card .small { color: var(--ink-2); }
.guide-btn { margin-top: 10px; text-align: center; text-decoration: none; }
.guide-video { margin: 12px 0 4px; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 960 / 676; }
.guide-video video { width: 100%; height: 100%; display: block; }
.guide-parts .row { width: 100%; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.guide-parts .row.on { background: var(--accent-soft, rgba(37, 99, 235, .1)); }
.guide-parts .row.on .w { font-weight: 800; }

/* Game room (O‘yinlar zali) */
.arcade-list { display: grid; gap: 10px; }
.gcard { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; color: #fff; box-shadow: var(--shadow); overflow: hidden; min-height: 82px; }
.gcard::after { content: ""; position: absolute; right: -30px; bottom: -40px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.12); }
.gcard .gic { width: 54px; height: 54px; flex: none; border-radius: 16px; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 32px; }
.gcard .gtx { display: flex; flex-direction: column; min-width: 0; }
.gcard .gtx b { font-size: 18px; line-height: 1.2; }
.gcard .gtx span { font-size: 13px; opacity: .92; }
.gcard .grec { position: absolute; top: 10px; right: 10px; z-index: 1; background: rgba(0,0,0,.2); border-radius: 12px; padding: 2px 9px; font-size: 12px; font-weight: 800; }
.gcard.off { filter: saturate(.55); opacity: .7; }
.g-hill { background: linear-gradient(135deg, #1f8f5a, #4cc38a); }
.g-mem { background: linear-gradient(135deg, #1a4fd6, #4f86f7); }
.g-letters { background: linear-gradient(135deg, #7a4bd8, #b06ae6); }
.g-bricks { background: linear-gradient(135deg, #e2552f, #f59a3c); }

.arcade-intro { position: relative; text-align: center; padding: 8px 4px 20px; }
.arcade-intro .icon-btn { position: absolute; left: 0; top: 0; }
.ai-hero { font-size: 64px; margin-top: 6px; }
.arcade-intro h2 { margin: 0; font-size: 28px; }
.arcade-intro .how { text-align: left; list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.arcade-intro .how li { background: var(--surface); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 15px; }
.ai-best { font-weight: 700; color: var(--ink-2); }

/* Full screen game */
body.arcade-on .top, body.arcade-on .tabs, body.arcade-on .offline-bar { display: none !important; }
body.arcade-on { overflow: hidden; overscroll-behavior: none; }
.arcade { position: fixed; inset: 0; z-index: 40; background: #7cc4ff; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overflow: hidden; }
.arc-stage, .hill-canvas { position: absolute; inset: 0; display: block; }
.arc-pause { position: absolute; left: 12px; top: calc(14px + env(safe-area-inset-top)); width: 38px; height: 30px; border: 0; border-radius: 15px; background: rgba(255,255,255,.9); color: #1b1d2a; font-weight: 900; font-size: 12px; box-shadow: 0 3px 10px rgba(0,0,0,.18); cursor: pointer; z-index: 2; }
.pedal { position: absolute; bottom: calc(22px + env(safe-area-inset-bottom)); z-index: 2; width: 96px; height: 112px; border-radius: 22px; border: 3px solid #1a1d25; color: #fff; font: inherit; font-weight: 1000; font-size: 13px; letter-spacing: .5px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px; cursor: pointer; box-shadow: 0 6px 0 rgba(0,0,0,.35), 0 10px 20px rgba(0,0,0,.3); background: linear-gradient(#5b6170, #2c303b); transition: transform .06s; touch-action: none; }
.pedal::before { content: ""; position: absolute; top: 14px; left: 14px; right: 14px; height: 44px; border-radius: 8px; background: repeating-linear-gradient(#7d8495 0 5px, #3d424f 5px 10px); }
.pedal span { position: relative; }
.pedal.gas { right: 16px; background: linear-gradient(#3fc27c, #17804b); }
.pedal.gas::before { background: repeating-linear-gradient(#7ee0a8 0 5px, #1f8f55 5px 10px); }
.pedal.brk { left: 16px; height: 96px; }
.pedal.brk::before { height: 30px; }
.pedal.down { transform: translateY(5px) scale(.97); box-shadow: 0 1px 0 rgba(0,0,0,.35), 0 4px 10px rgba(0,0,0,.3); }
.arc-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.arc-layer > * { pointer-events: auto; }
.arc-dim { position: absolute; inset: 0; background: rgba(10,12,30,.45); }
.arc-card { position: absolute; left: 12px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; background: var(--surface); color: var(--ink); border-radius: 24px; padding: 16px; box-shadow: 0 14px 50px rgba(0,0,0,.45); animation: pop .22s ease-out; }
@keyframes pop { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.arc-pausebox { text-align: center; bottom: auto; top: 30%; }
.arc-pausebox h3 { margin: 4px 0 14px; font-size: 22px; }
.aq-top { display: flex; align-items: center; justify-content: space-between; }
.aq-tag { font-size: 12.5px; font-weight: 1000; color: var(--accent); letter-spacing: .3px; }
.aq-ring { width: 42px; height: 42px; }
.aq-ring circle { fill: none; stroke: var(--line); stroke-width: 5; }
.aq-ring circle.arc { stroke: var(--accent); stroke-dasharray: 100; stroke-dashoffset: 0; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 20px 20px; transition: stroke-dashoffset .1s linear; }
.aq-ring text { font-size: 13px; font-weight: 1000; fill: var(--ink); text-anchor: middle; }
.aq-w { font-size: 30px; font-weight: 1000; line-height: 1.15; display: flex; align-items: center; gap: 8px; word-break: break-word; }
.aq-w.uz { font-size: 26px; }
.aq-w + p { margin: 2px 0 4px; }
.aq-say { border: 0; background: var(--surface-2); border-radius: 12px; font-size: 16px; padding: 4px 9px; cursor: pointer; }
.aq-say.big { font-size: 30px; padding: 10px 22px; border-radius: 18px; background: var(--brand-soft); }
.aq-opts { display: grid; gap: 8px; margin-top: 8px; }
.aq-opts .opt { padding: 12px 14px; font-size: 16px; }
.aq-fb { min-height: 0; display: flex; flex-direction: column; margin-top: 8px; }
.aq-fb:empty { display: none; }
.aq-fb .good { color: var(--good); } .aq-fb .bad { color: var(--bad); }
.res-ic { font-size: 54px; }
.res-stats { display: flex; gap: 8px; margin: 14px 0 6px; }
.res-stats span { flex: 1; background: var(--surface-2); border-radius: 14px; padding: 10px 4px; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; }
.res-stats b { font-size: 20px; color: var(--ink); } .res-stats b.g { color: var(--good); } .res-stats b.r { color: var(--bad); }

/* Memory game: look first */
.mem-peek { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); color: var(--accent); border-radius: 18px; padding: 10px 12px; margin: -4px 0 12px; }
.mem-peek .mp-n { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 4px solid var(--accent); display: grid; place-items: center; font-size: 24px; font-weight: 1000; }
.mem-peek > span:last-child { display: flex; flex-direction: column; }
.mem-peek .small { color: var(--ink-2); }

/* Tog‘ yo‘li: stages and garage */
.ai-top { display: flex; justify-content: space-between; align-items: center; }
.arcade-intro .ai-top .icon-btn { position: static; }
.coin-chip { background: var(--surface); border-radius: 16px; padding: 5px 12px; font-weight: 900; box-shadow: var(--shadow); }
.arcade-intro .section-title { text-align: left; }
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stage { border: 3px solid transparent; border-radius: 18px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; cursor: pointer; font: inherit; box-shadow: var(--shadow); min-width: 0; }
.stage b { font-size: 14px; line-height: 1.15; }
.stage .sic { font-size: 28px; }
.stage .small { font-size: 11.5px; opacity: .95; }
.stage .sbest { min-height: 16px; }
.stage.on { border-color: var(--ink); transform: translateY(-2px); }
.stage.locked { filter: grayscale(.8); opacity: .6; }
.st-meadow { background: linear-gradient(160deg, #4cc38a, #1f8f5a); }
.st-desert { background: linear-gradient(160deg, #f2b45a, #c9772c); }
.st-snow { background: linear-gradient(160deg, #8fb6e8, #4a6fb0); }
.garage { display: grid; gap: 8px; }
.upg { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); text-align: left; }
.upg .uic { font-size: 26px; }
.upg .utx { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.upg .lv { display: flex; gap: 4px; margin-top: 4px; }
.upg .lv i { width: 22px; height: 6px; border-radius: 3px; background: var(--surface-2); }
.upg .lv i.on { background: var(--good); }
.upg .max { font-weight: 900; color: var(--good); font-size: 13px; }

/* Games in landscape */
@media (orientation: landscape) and (max-height: 520px) {
  .arc-card { padding: 10px 14px; max-width: 640px; }
  .aq-w { font-size: 24px; }
  .aq-opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .aq-opts .opt { padding: 10px; font-size: 15px; text-align: center; }
  .pedal { width: 86px; height: 92px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .pedal.brk { height: 80px; }
  .pedal.gas { right: calc(16px + env(safe-area-inset-right)); }
  .pedal.brk { left: calc(16px + env(safe-area-inset-left)); }
}
.how-d { margin-top: 14px; text-align: left; }
.how-d summary { cursor: pointer; font-weight: 800; padding: 10px 4px; color: var(--ink-2); }

/* Harf bog‘i */
.lg-page { padding-top: calc(4px + env(safe-area-inset-top)); }
.lg-top { display: flex; align-items: center; gap: 8px; }
.lg-top b { font-size: 17px; }
.lg-top .small { margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 45%; }
.lg { position: relative; display: flex; flex-direction: column; align-items: center; user-select: none; -webkit-user-select: none; }
.lg-head { width: 100%; display: flex; justify-content: space-between; align-items: center; margin: 4px 0 8px; }
.lg-lvl { font-weight: 900; color: var(--ink-2); }
.lg-coins { background: var(--surface); border-radius: 14px; padding: 3px 10px; box-shadow: var(--shadow); font-weight: 800; }
.lg-gwrap { min-height: 120px; display: flex; align-items: center; justify-content: center; }
.lg-grid { position: relative; }
.lg-cell { position: absolute; border-radius: 9px; background: var(--surface); border: 2px solid var(--line); display: grid; place-items: center; font-weight: 1000; color: var(--ink); transition: background .2s; }
.lg-cell.open { background: linear-gradient(160deg, #a56ae6, #7a3fd0); border-color: #6d35bf; color: #fff; }
.lg-cell.flash { animation: lgpop .45s ease-out; }
@keyframes lgpop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.lg-hints { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0 2px; }
.lg-hint { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 12px; background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow); }
.lg-hint.star { border: 1.5px solid var(--star); }
.lg-hint.ok { background: var(--good-soft); color: var(--good); cursor: pointer; }
.lg-prev { height: 38px; margin: 8px 0 4px; min-width: 60px; padding: 2px 16px; border-radius: 14px; font-size: 24px; font-weight: 1000; letter-spacing: 3px; color: #fff; background: #8e44d6; display: flex; align-items: center; justify-content: center; }
.lg-prev:empty { background: transparent; }
.lg-prev.good { background: var(--good); animation: lgpop .4s; }
.lg-prev.bad { background: var(--bad); animation: shake .3s; }
.lg-prev.same { background: var(--star); }
.lg-wheelrow { display: flex; align-items: center; gap: 8px; }
.lg-wheel { position: relative; border-radius: 50%; background: radial-gradient(circle at 50% 40%, var(--surface), var(--surface-2)); box-shadow: var(--shadow), inset 0 0 0 6px color-mix(in srgb, #8e44d6 18%, transparent); touch-action: none; }
.lg-wheel svg { position: absolute; inset: 0; pointer-events: none; }
.lg-wheel polyline { stroke: #8e44d6; opacity: .55; }
.lg-l { position: absolute; width: 54px; height: 54px; margin: -27px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 1000; color: var(--ink); pointer-events: none; transition: background .1s, color .1s, transform .1s; }
.lg-l.on { background: #8e44d6; color: #fff; transform: scale(1.08); }
.lg-tool { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 20px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.lg-tool small { font-size: 10px; font-weight: 900; color: var(--muted); margin-top: 2px; }
.lg-bonus { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.lg-win { position: absolute; inset: -8px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(3px); z-index: 5; }
.lg-win-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 24px; padding: 20px; box-shadow: 0 14px 50px rgba(0,0,0,.3); text-align: center; animation: pop .25s ease-out; }
.lg-burst { font-size: 54px; animation: lgpop .5s; }
.lg-win-card h3 { margin: 2px 0 8px; font-size: 24px; }
.lg-win-card ul { list-style: none; padding: 0; margin: 0 0 8px; text-align: left; display: grid; gap: 4px; }
.lg-win-card li { background: var(--surface-2); border-radius: 10px; padding: 6px 10px; font-size: 14px; }
.arcade-bricks { background: #1a1450; }
