/* Тёмный мир курса: глубокий индиго, тёплый янтарь (память) и бирюза (фокус).
   Раскладка: колонка телефона по центру, шапка и нижняя панель закреплены. */
:root {
  --bg: #100F1A; --s1: #1A1928; --s2: #232236; --ink: #F3EEE6; --mut: #A9A5B8; --lock: #8A86A0;
  --line: rgba(243,238,230,.10); --on: #17120A; --ok: #7FD99A; --bad: #E5564F;
  --ac: #F2B45A;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2, .ph, .rscore, .bignum { font-family: var(--serif); font-weight: 600; text-wrap: balance; }
.mut { color: var(--mut); } .ok { color: var(--ok); } .small { font-size: 13px; } .ac { color: var(--ac); }

#app { height: 100%; max-width: 480px; margin: 0 auto; position: relative; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
@media (min-width: 520px) { body { background: #0A0A12; } #app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }

/* вход */
.gate { height: 100%; overflow-y: auto; position: relative; padding: 56px 24px 32px; }
.gdeco { position: absolute; top: -90px; right: -110px; width: 320px; height: 320px; border-radius: 50%; border: 1px solid rgba(242,180,90,.35); box-shadow: 0 0 0 28px rgba(242,180,90,.05), 0 0 0 64px rgba(111,211,197,.04); pointer-events: none; }
.gwrap { position: relative; display: flex; flex-direction: column; gap: 16px; padding-top: 28px; }
.brand { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ac); font-weight: 700; }
.brand.sm { font-size: 11px; }
.gate h1 { font-size: 46px; line-height: 1.02; }
.lead { color: var(--mut); font-size: 16px; } .lead.sm { font-size: 14px; margin-bottom: 4px; }
.lbl { display: block; font-size: 13px; color: var(--mut); margin-bottom: 6px; }
.inp { width: 100%; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 17px; letter-spacing: .04em; }
.err { min-height: 20px; color: var(--bad); font-size: 14px; margin: 8px 0; }
#gform { margin-top: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--ac); color: var(--on); font-weight: 700; border-radius: 999px; padding: 12px 22px; min-height: 46px; transition: transform .15s, opacity .15s; }
.btn.big { width: 100%; min-height: 54px; font-size: 17px; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); width: 100%; margin-top: 10px; }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid rgba(229,86,79,.5); }
.tcard { text-align: left; background: var(--s1); border: 1px solid var(--line); border-left: 4px solid var(--ac); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.tcard b { font-family: var(--serif); font-size: 28px; font-weight: 600; color: var(--ac); }
.tcard span { color: var(--mut); font-size: 14px; }

/* каркас приложения */
.top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.seg { display: flex; background: var(--s1); border-radius: 999px; padding: 3px; border: 1px solid var(--line); }
.seg button { padding: 7px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--mut); }
.seg button.on { background: var(--ac); color: var(--on); }
.seg.big { width: 100%; } .seg.big button { flex: 1; padding: 12px; font-size: 16px; }
.ib { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--s1); border: 1px solid var(--line); }
.ib svg, .tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.view { flex: 1; overflow-y: auto; padding: 18px 16px 28px; display: flex; flex-direction: column; gap: 14px; }
.tabs { flex: none; display: flex; background: var(--s1); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--lock); border-radius: 12px; }
.tabs button.on { color: var(--ac); }

.ph { font-size: 32px; line-height: 1.05; }
.sh { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); font-weight: 700; margin-top: 6px; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); font-weight: 700; }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.pill { display: inline-block; border: 1px solid var(--ac); color: var(--ac); border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 700; align-self: flex-start; }
.note { background: var(--s2); border-radius: 14px; padding: 12px 14px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lnk { color: var(--ac); font-weight: 700; flex: none; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--mut); font-size: 14px; align-self: flex-start; padding: 4px 0; }
.back svg, .stp i svg, .gchip svg, .dcell svg, .finish svg, .grow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.empty { color: var(--mut); text-align: center; padding: 40px 0; }

/* сегодня */
.hero { display: flex; align-items: center; gap: 18px; padding: 6px 0; }
.heroR { display: flex; flex-direction: column; gap: 6px; }
.stat { font-size: 15px; } .stat b { font-family: var(--serif); font-size: 26px; color: var(--ink); }
.ring .rbg { fill: none; stroke: var(--s2); stroke-width: 9; }
.ring .rfg { fill: none; stroke: var(--ac); stroke-width: 9; stroke-linecap: round; }
.ring .rnum { font-family: var(--serif); font-size: 44px; font-weight: 600; fill: var(--ink); }
.ring .rsub { font-size: 11px; fill: var(--mut); letter-spacing: .12em; text-transform: uppercase; }
.task h2 { font-size: 28px; line-height: 1.1; }
.plist { margin: 0; padding-left: 18px; color: var(--mut); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.gchips { display: flex; flex-wrap: wrap; gap: 6px; }
.gchip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; color: var(--mut); }
.gchip.ok { color: var(--ok); border-color: rgba(127,217,154,.5); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gcard { text-align: left; background: var(--s1); border: 1px solid var(--line); border-top: 3px solid var(--ac); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; min-height: 108px; }
.gcard .gn { font-weight: 700; font-size: 16px; } .gcard .gs { font-size: 12px; color: var(--mut); } .gcard .gb { margin-top: auto; font-size: 12px; font-weight: 700; color: var(--ac); }
.gcard.fin { border-top-color: var(--ok); } .gcard.fin .gb { color: var(--ok); }
.tip b { font-size: 16px; } .tip p { color: var(--mut); font-size: 15px; }
.src { font-size: 12px; color: var(--lock); font-style: italic; }

/* карта */
.jrow { display: flex; gap: 10px; } .jrow .inp { flex: 1; }
.mpills { display: flex; gap: 8px; }
.mp { flex: 1; padding: 10px 0; border-radius: 12px; border: 1px solid var(--line); color: var(--mut); font-weight: 700; }
.mp.on { background: var(--ac); border-color: var(--ac); color: var(--on); }
.dgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.dcell { aspect-ratio: 1; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); display: grid; place-items: center; position: relative; font-weight: 700; font-size: 15px; color: var(--ink); }
.dcell svg { position: absolute; top: 4px; right: 4px; width: 12px; height: 12px; }
.dcell.done { background: rgba(127,217,154,.14); border-color: rgba(127,217,154,.5); color: var(--ok); }
.dcell.today { background: var(--ac); color: var(--on); border-color: var(--ac); }
.dcell.missed { border-color: var(--bad); color: var(--ink); }
.dcell.locked { color: var(--lock); background: transparent; border-style: dashed; }
.dcell.mile:not(.today):not(.done) { box-shadow: inset 0 0 0 1px rgba(111,211,197,.45); }
.dcell.big { border-radius: 50%; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--mut); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.lg.done { background: rgba(127,217,154,.3); border-color: var(--ok); } .lg.today { background: var(--ac); } .lg.missed { border-color: var(--bad); } .lg.locked { border-style: dashed; }

/* день */
.teach p { font-size: 17px; line-height: 1.55; } .teach b { color: var(--ac); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stp { width: 100%; text-align: left; display: flex; gap: 12px; align-items: flex-start; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 14px; font-size: 15px; }
.stp i { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--lock); display: grid; place-items: center; color: transparent; }
.stp.on i { background: var(--ac); border-color: var(--ac); color: var(--on); }
.stp.on span { color: var(--mut); }
.finish { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 14px; border-radius: 16px; border: 1px solid rgba(127,217,154,.5); font-weight: 700; }
.lockd { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 24px 0; color: var(--mut); }
.lockd svg { width: 36px; height: 36px; fill: none; stroke: var(--lock); stroke-width: 1.6; } .lockd h2 { color: var(--ink); font-size: 30px; }

/* игры */
.glist { display: flex; flex-direction: column; gap: 8px; }
.grow { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; background: var(--s1); border: 1px solid var(--line); border-left: 4px solid var(--ac); border-radius: 16px; padding: 14px 16px; }
.grow b { display: block; font-size: 16px; } .grow span { display: block; font-size: 12px; color: var(--mut); }
.grow em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--ac); display: inline-flex; align-items: center; gap: 4px; flex: none; }
.grow.lk { border-left-color: var(--lock); } .grow.lk b, .grow.lk em { color: var(--lock); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .tiles.t3 { grid-template-columns: repeat(3, 1fr); }
.tiles > div { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px; text-align: center; }
.tiles b { display: block; font-family: var(--serif); font-size: 32px; line-height: 1; color: var(--ac); } .tiles span { font-size: 12px; color: var(--mut); }
#gbox { display: flex; flex-direction: column; gap: 8px; }
.gstage { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 6px 0; }
.ghint { color: var(--mut); text-align: center; font-size: 15px; } .ghint b { color: var(--ink); } .ghint .big { font-size: 22px; color: var(--ac); }
.gsc { color: var(--mut); font-size: 14px; }
.wordlist { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; } .wordlist span { font-family: var(--serif); font-size: 30px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--s1); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 15px; background: var(--s1); }
.chip.on { background: var(--ac); border-color: var(--ac); color: var(--on); font-weight: 700; }
.chips.fl { justify-content: flex-start; }
.bignum { font-size: 84px; line-height: 1; min-height: 96px; display: grid; place-items: center; } .bignum.small { font-size: 44px; min-height: 56px; letter-spacing: .12em; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; max-width: 320px; }
.keypad button { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; min-height: 54px; font-size: 22px; font-weight: 600; }
.keypad .okk { background: var(--ac); color: var(--on); font-size: 15px; font-weight: 700; }
.gfb { font-family: var(--serif); font-size: 30px; padding: 40px 0; text-align: center; } .gfb.good { color: var(--ok); } .gfb.bad { color: var(--bad); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 300px; }
.cell { aspect-ratio: 1; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); transition: background .1s; }
.cell.lit { background: var(--ac); box-shadow: 0 0 22px var(--ac); } .grid3.lock { pointer-events: none; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.pc { aspect-ratio: 3/4; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); font-size: 30px; display: grid; place-items: center; }
.pc span { visibility: hidden; } .pc.up span { visibility: visible; } .pc.up { background: var(--s1); } .pc.gone { opacity: .25; pointer-events: none; }
.sch { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%; }
.sch button { aspect-ratio: 1; border-radius: 10px; background: var(--s1); border: 1px solid var(--line); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sch button.ok { background: rgba(127,217,154,.14); color: var(--lock); border-color: rgba(127,217,154,.4); } .sch button.bad, .odd button.bad { background: rgba(229,86,79,.3); }
.sword { font-family: var(--sans); font-size: 52px; font-weight: 800; min-height: 90px; display: grid; place-items: center; letter-spacing: .02em; }
.sbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.sbtns button { background: var(--s2); border: 1px solid var(--line); border-radius: 14px; min-height: 56px; font-size: 18px; font-weight: 600; }
.odd { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; width: 100%; }
.odd button { aspect-ratio: 1; border-radius: 10px; background: var(--s1); border: 1px solid var(--line); font-size: 24px; font-weight: 600; }
.gotap { width: 240px; height: 240px; border-radius: 50%; background: var(--s1); border: 1px solid var(--line); display: grid; place-items: center; touch-action: manipulation; }
.dot { width: 150px; height: 150px; border-radius: 50%; background: transparent; } .dot.go { background: #4FC67A; } .dot.no { background: #E5564F; }
.result { align-items: center; text-align: center; }
.rscore { font-size: 84px; line-height: 1; color: var(--ac); } .rdet { color: var(--mut); }
.badge { background: var(--s2); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 700; } .badge.up { background: rgba(127,217,154,.18); color: var(--ok); }

/* советы */
.tlist { display: flex; flex-direction: column; gap: 8px; }
.tdet { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.tdet summary { cursor: pointer; display: flex; flex-direction: column; gap: 4px; list-style: none; } .tdet summary::-webkit-details-marker { display: none; }
.tdet summary b { font-size: 16px; } .tdet p { margin-top: 10px; color: var(--mut); font-size: 15px; } .tdet .src { margin-top: 8px; }
.kind { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ac); } .kind.study { color: #8FB8FF; }

/* прогресс */
.wchart { width: 100%; height: auto; } .wchart .bar { fill: var(--mut); opacity: .35; } .wchart .bar.last { fill: var(--ac); opacity: 1; } .wchart .gl { stroke: var(--line); } .wchart text { fill: var(--mut); font-size: 11px; } .wchart .bv { fill: var(--ink); font-weight: 700; }
.mrows { display: flex; flex-direction: column; gap: 8px; }
.mrow { display: grid; grid-template-columns: 1fr 90px auto; align-items: center; gap: 12px; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.mrow b { display: block; font-size: 15px; } .mrow span { font-size: 12px; color: var(--mut); display: block; }
.mbar { height: 8px; background: var(--s2); border-radius: 99px; overflow: hidden; } .mbar i { display: block; height: 100%; background: var(--ac); border-radius: 99px; }
.mv { font-size: 13px; font-weight: 700; text-align: right; }
.prows { display: flex; flex-direction: column; gap: 10px; }
.prow { background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; grid-template-columns: 1fr 120px; gap: 6px 12px; align-items: center; }
.pn b { display: block; } .pn span { font-size: 12px; color: var(--mut); }
.spark { width: 120px; height: 36px; } .sl { stroke: var(--ac); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; } .sd { fill: var(--ac); }
.pv { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; } .ba span { display: block; font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .1em; } .ba b { font-family: var(--serif); font-size: 26px; line-height: 1; } .ar { color: var(--lock); }
.dl { grid-column: 1 / -1; font-size: 13px; color: var(--mut); } .dl.up { color: var(--ok); } .cmp { grid-column: 1 / -1; font-size: 13px; color: var(--mut); }

/* профиль */
.kv > div { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; } .kv span { color: var(--mut); }
.rem .inp { max-width: 160px; }
.row3 { display: flex; gap: 8px; flex-wrap: wrap; } .row3 .btn { width: auto; flex: 1; margin-top: 0; font-size: 14px; padding: 10px 12px; } .row3.end { margin-top: 8px; }

.toast { position: absolute; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--ink); color: var(--on); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* главная без прокрутки */
.view.fit { justify-content: center; gap: 20px; }
.meta { color: var(--mut); font-size: 14px; }
button.note { width: 100%; text-align: left; color: inherit; }

/* день и игры: один экран, шаги вместо прокрутки */
.flow { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.ftop { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 6px; }
.exitb { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px 9px 12px; min-height: 44px; border-radius: 999px; border: 1.5px solid var(--ink); color: var(--ink); font-weight: 700; font-size: 15px; background: var(--s1); }
.exitb svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ftitle { flex: 1; text-align: center; font-weight: 700; color: var(--mut); font-size: 14px; }
.fright { min-width: 48px; text-align: right; color: var(--mut); font-size: 14px; font-variant-numeric: tabular-nums; }
.fbar { flex: none; display: flex; gap: 4px; padding: 8px 16px 0; }
.fbar i { flex: 1; height: 4px; border-radius: 4px; background: var(--s2); }
.fbar i.dn { background: var(--ac); } .fbar i.cu { background: var(--ac); opacity: .55; }
.fbody { flex: 1; overflow-y: auto; padding: 20px 16px 12px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.fbody.center { align-items: flex-start; }
.fbody.center svg { width: 36px; height: 36px; fill: none; stroke: var(--lock); stroke-width: 1.6; }
.ffoot { flex: none; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; min-height: 84px; }
.ffoot:empty { min-height: 0; padding: 0; }
.bigtask p { font-family: var(--serif); font-size: 28px; line-height: 1.2; font-weight: 600; }
.factc p { font-size: 18px; line-height: 1.5; }
.verdict { border-left: 3px solid var(--ac); padding-left: 12px; font-weight: 600; color: var(--ink); }
.verdict span { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ac); font-weight: 700; margin-bottom: 2px; }
.tdet .verdict { color: var(--ink); margin-top: 12px; font-size: 15px; }
.rdet.big { font-family: var(--serif); font-size: 36px; line-height: 1.1; color: var(--ink); font-weight: 600; }
.srows { display: flex; flex-direction: column; }
.srow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.srow:last-child { border-bottom: 0; } .srow span { color: var(--ac); font-weight: 700; }

/* ---- крупный значок раздела, серия, уровни ---- */
.seg button { padding: 9px 20px; font-size: 15px; }
.hero { gap: 16px; }
.heroR { flex: 1; align-items: stretch; gap: 8px; min-width: 0; }
.trkbig { background: var(--ac); color: var(--on); border-radius: 18px; padding: 10px 16px 12px; display: flex; flex-direction: column; box-shadow: 0 8px 24px -10px var(--ac); }
.trkbig small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; opacity: .75; }
.trkbig b { font-family: var(--serif); font-size: 34px; line-height: 1; font-weight: 700; }
.swap { color: var(--ac); border: 1px solid var(--ac); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 700; text-align: center; }
.pill.big { font-size: 18px; padding: 7px 20px; }
.streak { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; background: linear-gradient(135deg, #2A1F22 0%, #1E1A2B 70%); border: 1px solid rgba(255,165,46,.28); border-radius: 22px; padding: 14px 16px 12px; position: relative; overflow: hidden; }
.streak::before { content: ''; position: absolute; left: -30px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(255,140,40,.28), transparent 70%); pointer-events: none; }
.streak.cold { background: var(--s1); border-color: var(--line); } .streak.cold::before { display: none; }
.sflame { position: relative; display: grid; place-items: center; width: 52px; }
.flame { filter: drop-shadow(0 0 12px rgba(255,140,40,.6)); animation: flick 1.7s ease-in-out infinite; transform-origin: 50% 92%; }
.flame.off { filter: none; animation: none; }
@keyframes flick { 0%, 100% { transform: scale(1, 1) rotate(-1.5deg); } 50% { transform: scale(1.06, 1.1) rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) { .flame { animation: none; } }
.stxt { position: relative; min-width: 0; } .stxt p { font-size: 13px; color: var(--mut); line-height: 1.3; margin-top: 2px; }
.snum { display: flex; align-items: baseline; gap: 8px; } .snum b { font-family: var(--serif); font-size: 42px; line-height: .95; color: #FFC24D; } .snum span { font-size: 15px; font-weight: 700; }
.wk { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 4px; position: relative; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--mut); font-weight: 700; }
.wd i { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; }
.wd i svg { width: 15px; height: 15px; fill: none; stroke: #2A1500; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wd.on i { background: linear-gradient(180deg, #FFD25E, #FF8A22); border-color: transparent; box-shadow: 0 0 10px rgba(255,150,40,.5); } .wd.on { color: var(--ink); }
.wd.now i { border: 1.5px dashed #FFB347; } .wd.now { color: #FFB347; } .wd.fut { opacity: .45; }
.endfl { display: flex; align-items: center; gap: 14px; justify-content: center; }
.endn { display: flex; flex-direction: column; } .endn b { font-family: var(--serif); font-size: 56px; line-height: .9; color: #FFC24D; } .endn span { font-size: 15px; font-weight: 700; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .meter i { height: 10px; border-radius: 6px; background: var(--s2); } .meter i.on { background: var(--ac); }
.card.lvl { gap: 0; padding: 6px 16px; } .lrow { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); } .lrow:last-child { border-bottom: 0; }
.lrow b { flex: 1; font-size: 16px; } .lrow em { font-style: normal; font-size: 12px; color: var(--mut); }
.lc { font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--s2); color: var(--ink); }
.lc.l1 { background: rgba(242,180,90,.16); color: #F2B45A; } .lc.l2 { background: rgba(111,211,197,.16); color: #6FD3C5; } .lc.l3 { background: rgba(127,217,154,.18); color: var(--ok); }
.lvbig { display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--serif); font-size: 24px; } .lvbig span { color: var(--mut); } .lvbig b { color: var(--ac); font-size: 32px; } .lvbig i { font-style: normal; color: var(--mut); }

/* серия дней: маленький значок в правом верхнем углу жёлтой плашки */
.tplate { position: relative; }
.tplate .stk { position: absolute; top: 12px; right: 14px; display: flex; align-items: center; gap: 5px; padding: 3px 11px 3px 7px; border-radius: 999px; background: rgba(16,15,26,.9); border: 1px solid rgba(255,165,46,.5); box-shadow: 0 6px 16px -8px rgba(0,0,0,.6); }
.tplate .stk.cold { border-color: var(--line); }
.tplate .stk b { font-family: var(--serif); font-size: 22px; line-height: 1; color: #FFC24D; }
.tplate .stk.cold b { color: var(--mut); }
.tplate .stk span { font-size: 10px; line-height: 1.05; font-weight: 700; color: var(--ink); text-align: left; }
.tplate .stk .flame { filter: drop-shadow(0 0 6px rgba(255,140,40,.55)); }
.note.prac { background: rgba(242,180,90,.12); border: 1px solid rgba(242,180,90,.4); line-height: 1.4; }
.note.prac b { color: var(--ink); }
.task .ok { font-size: 15px; font-weight: 700; }

/* главная: ничего не сжимается, на низких экранах всё компактнее */
.view.fit > * { flex: none; }
.view.fit { gap: 14px; }
@media (max-height: 740px) {
  .view.fit { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .hero { gap: 12px; padding: 0; } .hero .ring { width: 92px; height: 92px; }
  .trkbig { padding: 7px 14px 9px; border-radius: 16px; } .trkbig b { font-size: 28px; }
  .swap { padding: 5px 12px; font-size: 13px; }
  .streak { padding: 10px 14px 8px; gap: 2px 12px; } .stxt p { display: none; } .sflame { width: 44px; }
  .snum b { font-size: 34px; } .wd i { width: 24px; height: 24px; } .wd i svg { width: 13px; height: 13px; } .wk { margin-top: 2px; }
  .task { padding: 14px; gap: 8px; } .task h2 { font-size: 23px; } .btn.big { min-height: 50px; }
  button.note { padding: 10px 14px; }
}
.trkbig b.lg { font-size: 27px; white-space: nowrap; }
@media (max-height: 740px) { .trkbig b.lg { font-size: 24px; } }

/* ---- новые игры ---- */
.bigq { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.emo { font-size: 64px; line-height: 1.1; } .bw { font-family: var(--serif); font-size: 46px; font-weight: 600; }
.opts { display: grid; grid-template-columns: repeat(var(--c, 3), 1fr); gap: 8px; width: 100%; }
.opts button { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; min-height: 54px; font-size: 22px; font-weight: 600; padding: 6px; display: grid; place-items: center; }
.opts button.ok, .egrid button.ok { background: rgba(127,217,154,.25); border-color: var(--ok); } .opts button.bad, .egrid button.bad { background: rgba(229,86,79,.35); border-color: var(--bad); }
.egrid { display: grid; grid-template-columns: repeat(var(--c, 4), 1fr); gap: 6px; width: 100%; max-width: 340px; }
.egrid span, .egrid button { aspect-ratio: 1; display: grid; place-items: center; font-size: 30px; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; }
.egrid.sm span, .egrid.sm button { aspect-ratio: auto; height: 42px; font-size: 24px; }
.egrid button.sel { border-color: var(--ac); background: rgba(242,180,90,.2); }
.egrid.cross button, .egrid.trail button, .egrid.rb button { font-size: 20px; font-weight: 700; aspect-ratio: auto; height: 40px; }
.egrid.trail button { height: 56px; font-size: 24px; } .egrid.rb { gap: 4px; } .egrid.rb button { height: 38px; font-size: 17px; padding: 0; }
.egrid.rb button.b { background: #E9E4DA; color: #111; } .egrid.rb button.r { background: #E5564F; color: #fff; } .egrid.rb button.ok { opacity: .25; }
.egrid.cross button.ok { opacity: .3; }
.egrid.dots { max-width: 300px; } .egrid.dots .dc { aspect-ratio: 1; height: auto; border-radius: 50%; } .dc.lit { background: var(--ac); box-shadow: 0 0 16px var(--ac); }
.egrid.lock, .egrid .lock { pointer-events: none; }
.simon { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 300px; } .simon.lock { pointer-events: none; }
.simon button { aspect-ratio: 1; border-radius: 22px; background: var(--p); opacity: .38; font-weight: 800; font-size: 18px; color: #17120A; transition: opacity .1s, transform .1s; } .simon button.lit { opacity: 1; transform: scale(1.04); box-shadow: 0 0 26px var(--p); }
.fcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; } .fcards div { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; } .fcards .emo { font-size: 40px; }
.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; } .pairs div { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; } .pairs b { font-size: 18px; } .pairs span { font-size: 26px; }
.sw { display: inline-block; width: 28px; height: 28px; border-radius: 50%; }
.react { width: 100%; min-height: 220px; border-radius: 24px; background: #E5564F; color: #fff; font-size: 26px; font-weight: 800; } .react.go { background: #4FC67A; color: #07240F; }
.arena { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1; background: var(--s1); border: 1px solid var(--line); border-radius: 20px; touch-action: none; }
.ball { position: absolute; width: 13%; height: 13%; border-radius: 50%; background: #8E88B5; } .ball.mark { background: var(--ac); box-shadow: 0 0 14px var(--ac); } .ball.sel { background: var(--ok); }
.tgt { position: absolute; width: 20%; height: 20%; border-radius: 50%; background: #6FD3C5; transform: translate(-50%, -50%); left: 50%; top: 50%; } .tgt.hit { background: var(--ok); box-shadow: 0 0 20px var(--ok); }
.quiet { width: 100%; min-height: 200px; border-radius: 24px; background: #0B0A12; border: 1px solid var(--line); display: grid; place-items: center; color: var(--mut); font-size: 22px; } .quiet.fl { background: #F3EEE6; color: #17120A; font-weight: 800; }
.rule { font-family: var(--serif); font-size: 26px; font-weight: 600; text-align: center; color: var(--ac); }
.shp { width: 110px; height: 110px; background: #E5564F; margin: 8px 0; }
.maze { display: grid; grid-template-columns: repeat(var(--c), 1fr); width: 100%; max-width: 300px; aspect-ratio: 1; background: var(--s1); border-radius: 12px; overflow: hidden; touch-action: none; } .maze i { background: transparent; } .maze i.w { background: #3B3957; } .maze i.s { background: #4FC67A; } .maze i.e { background: #E5564F; } .maze.bad { outline: 3px solid var(--bad); }
.spotc { }
.trkbig b { font-size: 26px; white-space: nowrap; }
.hero { align-items: center; } .heroR { justify-content: center; }

.trkbig b { font-size: 26px; white-space: nowrap; }
.hero { align-items: center; } .heroR { justify-content: center; }

.tdet summary { flex-direction: row; align-items: center; gap: 12px; }



.tn { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--sans, 'Manrope', system-ui, sans-serif); font-size: 16px; font-weight: 700; line-height: 1; padding: 0; font-variant-numeric: tabular-nums; background: var(--s2); color: var(--mut); }
.tn.top { background: var(--ac); color: var(--on); }
.dlab { font-size: 13px; color: var(--mut); margin: 14px 0 8px; }
.dchips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.dchip { padding: 12px 8px; border-radius: 12px; background: var(--s2); color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; border: 1.5px solid transparent; cursor: pointer; }
.dchip.on { border-color: var(--ac); background: var(--ac); color: var(--on); }
.dnote { margin: 8px 0 0; }
.bignum.cd { font-size: 64px; }

.dchip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 12px; }
.dchip b { font-size: 14px; } .dchip span { font-size: 11px; font-weight: 500; opacity: .75; }
.card.tod { gap: 4px; padding: 14px 16px; } .card.tod b { font-size: 16px; } .card.tod p { margin: 0; font-size: 14px; color: var(--mut); line-height: 1.4; }
.gbig { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .gbig b { font-size: 34px; color: var(--ac); font-weight: 800; } .gbig span { font-size: 13px; color: var(--mut); }
.gibars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 18px; }
.gcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; min-width: 0; }
.gcol i { flex: none; width: 100%; background: var(--ac); border-radius: 6px 6px 2px 2px; display: block; } .gcol i.no { background: var(--s2); }
.gcol em { font-style: normal; font-size: 11px; font-weight: 700; } .gcol span { font-size: 10px; color: var(--mut); white-space: nowrap; }

.tplate { background: var(--ac); color: var(--on); border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 28px -14px var(--ac); }
.tp1 { display: flex; flex-direction: column; } .tp1 small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; opacity: .7; }
.tp1 b { font-family: var(--serif); font-size: 38px; line-height: 1; font-weight: 700; }
.tp2 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; font-size: 13px; font-weight: 600; } .tp2 b { font-weight: 800; }
.tbar { flex: 1 0 100%; order: 3; height: 8px; border-radius: 99px; background: rgba(0,0,0,.2); overflow: hidden; } .tbar i { display: block; height: 100%; background: var(--on); border-radius: 99px; }
.tp2 span:first-child { order: 1; } .tp2 span:last-child { order: 2; }
.card.task { padding: 18px; } .card.task .eyebrow { margin-bottom: 0; }
.streak { padding: 12px 14px; } .streak .snum b { font-size: 30px; } .streak .stxt p { display: none; } .streak .sflame { width: 40px; }
.view > .card.tod { margin-bottom: 4px; }
.view.fit { justify-content: flex-start; }

.ghero { align-items: center; text-align: center; gap: 4px; padding: 22px 18px; background: var(--s1); }
.ghero .gh0 { font-size: 14px; color: var(--mut); font-weight: 600; } .ghero .gh1 { font-family: var(--sans); font-size: 56px; line-height: 1.05; font-weight: 800; color: var(--ac); }
.ghero.up .gh1 { color: var(--ok); } .ghero.dn .gh1 { color: #E8A04A; } .ghero p { margin: 0; font-size: 15px; color: var(--ink); }
.gcol i.neg { background: #E8A04A; }
.gar { font-size: 28px; vertical-align: middle; }

/* прогресс: идеи с 21st.dev (радиальная шкала, bento, свечение) */
.ghero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, rgba(242,180,90,.16), transparent 60%), var(--s1); border-color: rgba(255,255,255,.08); padding: 20px 16px 18px; }
.ghero::before { content: ''; position: absolute; left: 20%; right: 20%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); }
.ghero .gh0 { font-size: 13px; }
.gauge { position: relative; width: 100%; max-width: 280px; margin: 4px auto 0; } .gauge svg { width: 100%; display: block; overflow: visible; }
.gtrk, .garc { fill: none; stroke-linecap: round; stroke-width: 13; } .gtrk { stroke: var(--s2); }
.garc { stroke: url(#gg); stroke-dasharray: 0 100; animation: garc 1.3s cubic-bezier(.2,.8,.2,1) .15s forwards; } .garc.glow { opacity: .55; }
@keyframes garc { to { stroke-dasharray: var(--f) 100; } }
.gval { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; } .gval b { font-size: 46px; font-weight: 800; line-height: 1; color: var(--ink); letter-spacing: -.02em; }
.ghero.up .gval b { color: var(--ok); } .ghero.dn .gval b { color: #E8A04A; }
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bt { position: relative; overflow: hidden; background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015)), var(--s1); border: 1px solid rgba(255,255,255,.07); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 3px; min-height: 108px; }
.bt::before { content: ''; position: absolute; left: 18%; right: 18%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent); }
.bt .bti { height: 26px; display: flex; align-items: center; color: var(--ac); font-size: 20px; } .bt .bti svg { width: 22px; height: 22px; }
.bt b { font-size: 28px; font-weight: 800; line-height: 1.1; } .bt span { font-size: 12px; color: var(--mut); }
.bt .tbar.thin { height: 5px; margin-top: 6px; flex: none; background: rgba(255,255,255,.1); } .bt .tbar.thin i { background: var(--ac); }
.bt .meter { margin-top: 6px; }
.gcol i { transform-origin: bottom; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; background: linear-gradient(180deg, var(--ac), rgba(242,180,90,.45)); box-shadow: 0 0 16px -4px var(--ac); }
.gcol i.neg { background: linear-gradient(180deg, #E8A04A, rgba(232,160,74,.4)); box-shadow: none; } .gcol i.no { background: var(--s2); box-shadow: none; }
@keyframes grow { from { transform: scaleY(0); } }
.view > * { flex-shrink: 0; }

/* график роста */
.cchart { align-items: stretch; text-align: center; }
.cchart .gh1 { font-family: var(--sans); font-size: 52px; line-height: 1.05; font-weight: 800; color: var(--ac); }
.cchart.up .gh1 { color: var(--ok); }
.gdl { font-size: 14px; font-weight: 700; color: var(--mut); margin-top: -2px; }
.gdl.pos { color: var(--ok); }
.cchart .seg { align-self: center; margin: 12px 0 6px; }
.cwrap { position: relative; width: 100%; touch-action: pan-y; }
.csvg { width: 100%; height: 176px; display: block; overflow: visible; }
.cgr { stroke: rgba(255,255,255,.06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.cbase { stroke: rgba(255,255,255,.28); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.cax { fill: var(--mut); font-size: 9.5px; font-family: var(--sans); }
.cline { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: cdraw 1.3s .15s cubic-bezier(.3,.7,.2,1) forwards; }
.cline.cglw { opacity: .55; stroke-width: 5; }
.carea { opacity: 0; animation: cfade .9s .6s ease forwards; }
@keyframes cdraw { to { stroke-dashoffset: 0; } }
@keyframes cfade { to { opacity: 1; } }
.cpulse { opacity: .3; transform-box: fill-box; transform-origin: center; animation: cpul 2s ease-in-out infinite; }
@keyframes cpul { 0%,100% { transform: scale(.7); opacity: .35; } 50% { transform: scale(1.3); opacity: .08; } }
.cxl { stroke: rgba(255,255,255,.4); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; }
.cxd { fill: #100F1A; stroke-width: 2.4; opacity: 0; vector-effect: non-scaling-stroke; }
.ctip { position: absolute; top: -4px; transform: translateX(-50%); background: #232236; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 5px 10px; font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; }
.cchart .small { margin: 8px 0 0; }
.cchart .small { font-size: 12.5px; line-height: 1.4; }

/* чтение */
.rtext { text-align: left; width: 100%; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 16px; max-height: 52vh; overflow-y: auto; }
.rtext h3 { font-family: var(--serif, 'Cormorant Garamond', serif); font-size: 24px; margin: 0 0 10px; }
.rtext p { font-size: 16px; line-height: 1.55; margin: 0 0 12px; }
.bigq.rq { font-size: 21px; line-height: 1.3; margin: 8px 0 14px; }
.ropts { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.ropts button { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; min-height: 52px; font-size: 16px; font-weight: 600; padding: 10px 14px; text-align: left; }
.ropts button.ok { background: rgba(127,217,154,.25); border-color: var(--ok); } .ropts button.bad { background: rgba(229,86,79,.35); border-color: var(--bad); }
