/* پله · Pelleh design system v6 — «هر روز یک پله»
   Sunrise warmth (Fabulous/Rise) + one bold colour per goal tile (Streaks/Strides).
   Mobile-first; on desktop the same phone-width app sits centred. RTL, light + dark.
   Layers: tokens → base → shell → components → screens. No inline styles in templates. */

@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-Regular.4b12dd0ce3b7.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-Medium.780a4421557d.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-Bold.1aae597923f7.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-ExtraBold.c74462807b2f.woff2") format("woff2"); font-weight: 800 900; font-display: swap; }

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light;
  --bg: #FFF7EF;
  --sun-1: #FFDDBF;            /* top of the sunrise */
  --sun-2: #FFF7EF;
  --surface: #FFFFFF;
  --surface-2: #FFF1E4;
  --ink: #2A1A10;
  --ink-2: #6B5546;
  --ink-3: #9C8676;
  --line: #F2E2D2;
  --brand: #C2410C;            /* text/links on light: 5.2:1 */
  --brand-hi: #F26A2E;
  --brand-lo: #C8401B;
  --brand-soft: #FFE6D6;
  --ok: #15803D;
  --ok-soft: #DCF5E4;
  --warn-soft: #FFF1C9;
  --danger: #B42318;
  --radius: 24px;
  --radius-m: 18px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(120, 60, 20, .06), 0 10px 28px -14px rgba(196, 92, 30, .35);
  --shadow-s: 0 1px 2px rgba(120, 60, 20, .08);
  --font: "Vazirmatn FD", "Vazirmatn", Tahoma, system-ui, sans-serif;
  --app-w: 480px;
  --tab-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ring: 0 0 0 3px rgba(242, 106, 46, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15100C; --sun-1: #3A2214; --sun-2: #15100C; --surface: #211913; --surface-2: #2A2018;
    --ink: #FBEFE4; --ink-2: #CDB8A7; --ink-3: #9A8574; --line: #33271E;
    --brand: #FF9A66; --brand-soft: #3A2316; --ok: #5FD68C; --ok-soft: #173622; --warn-soft: #3A2E12;
    --shadow: 0 10px 28px -16px rgba(0, 0, 0, .6); --shadow-s: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15100C; --sun-1: #3A2214; --sun-2: #15100C; --surface: #211913; --surface-2: #2A2018;
  --ink: #FBEFE4; --ink-2: #CDB8A7; --ink-3: #9A8574; --line: #33271E;
  --brand: #FF9A66; --brand-soft: #3A2316; --ok: #5FD68C; --ok-soft: #173622; --warn-soft: #3A2E12;
  --shadow: 0 10px 28px -16px rgba(0, 0, 0, .6); --shadow-s: none;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; font-weight: 900; line-height: 1.4; letter-spacing: -.2px; }
h2 { font-size: 17px; font-weight: 800; line-height: 1.5; }
h3 { font-size: 15px; font-weight: 800; }
button, input, textarea, select { font: inherit; color: inherit; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.stack-l > * + * { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
/* v6.2 · motion carries meaning instead of words (all off under prefers-reduced-motion) */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, .45); } 100% { box-shadow: 0 0 0 10px rgba(234, 88, 12, 0); } }
@keyframes climb { from { opacity: 0; transform: translateY(18px) scaleY(.6); } }
.stack-l > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.stack-l > *:nth-child(2) { animation-delay: .05s; } .stack-l > *:nth-child(3) { animation-delay: .1s; }
.stack-l > *:nth-child(4) { animation-delay: .15s; } .stack-l > *:nth-child(n+5) { animation-delay: .2s; }
.bar i { transform-origin: right; animation: fill .9s .25s cubic-bezier(.2, .8, .2, 1) both; }
.step-done .big { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
.week .d.today i { animation: ring 1.8s ease-out infinite; }
.land-hero .logo-big { animation: climb .7s cubic-bezier(.2, .8, .2, 1) both; }
.how { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; padding: 0; counter-reset: s; }
.how li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 6px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); font-size: 13px;
  animation: rise .5s calc(.15s + var(--i) * .12s) cubic-bezier(.2, .8, .2, 1) both; }
.how li:nth-child(2) { transform: translateY(-8px); } .how li:nth-child(3) { transform: translateY(-16px); }
.how .ic { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: var(--c); }
.how .ic svg { width: 22px; height: 22px; }
.clamp2, .step-hero .why { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.step-hero .more[open] ~ .why, .step-hero:has(.more[open]) .why { -webkit-line-clamp: unset; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ shell: one phone-width app, also on desktop */
.app { position: relative; max-width: var(--app-w); margin: 0 auto; min-height: 100dvh; background: var(--bg);
  display: flex; flex-direction: column; }
.app.has-tabs { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 12px); }
.sunrise { background: linear-gradient(180deg, var(--sun-1) 0, var(--sun-2) 300px) no-repeat; }
@media (min-width: 720px) {
  body { background: radial-gradient(900px 500px at 50% -10%, var(--sun-1), transparent 70%), var(--bg); }
  .app { margin-top: 24px; margin-bottom: 24px; min-height: calc(100dvh - 48px); border-radius: 32px; overflow: hidden;
    box-shadow: 0 30px 60px -30px rgba(120, 60, 20, .35), 0 0 0 1px var(--line); }
}
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 900; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center;
  color: var(--ink-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn .dot { position: absolute; top: 6px; inset-inline-end: 6px; min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--brand-lo); color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--sun-1); display: grid;
  place-items: center; font-weight: 800; font-size: 15px; }
main.screen { flex: 1; padding: 8px 16px 24px; }
.demo-note { margin: 0 16px; padding: 6px 12px; border-radius: 999px; background: var(--warn-soft); color: var(--ink-2);
  font-size: 12px; text-align: center; }

/* tab bar: four tabs, Pico in the middle */
.tabbar { position: fixed; bottom: 0; inset-inline: 0; margin: 0 auto; max-width: var(--app-w); z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(8px + var(--safe-b));
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); }
@media (min-width: 720px) { .tabbar { bottom: 24px; border-radius: 0 0 32px 32px; } }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; min-height: 52px;
  color: var(--ink-3); font-size: 11.5px; font-weight: 700; border-radius: 14px; }
.tabbar a:hover { text-decoration: none; color: var(--ink); }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--brand); }
.tabbar a[aria-current="page"] svg { transform: translateY(-1px); }

/* ------------------------------------------------------------------ components */
.card { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.eyebrow { font-size: 12px; font-weight: 800; color: var(--brand); letter-spacing: .2px; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 10px; }
.section-h a { font-size: 13px; font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-radius: 16px; border: 0; cursor: pointer; font-weight: 800; font-size: 15.5px; text-decoration: none;
  transition: transform .12s ease, filter .12s ease; }
.btn:hover { text-decoration: none; filter: brightness(1.04); }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.btn.block { width: 100%; }
.btn.primary { background: linear-gradient(90deg, var(--brand-hi), var(--brand-lo)); color: #fff;
  box-shadow: 0 8px 18px -10px rgba(200, 64, 27, .8); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.line { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; }
.btn svg { width: 20px; height: 20px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2);
  color: var(--ink-2); font-size: 12.5px; font-weight: 700; border: 1px solid transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* the one step of today */
.step-hero { position: relative; }
.step-hero .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.step-hero .title { font-size: 20px; font-weight: 900; line-height: 1.55; margin: 8px 0 4px; }
.step-hero .why { font-size: 13.5px; color: var(--ink-2); line-height: 1.85; }
.step-hero .why b { color: var(--ink); }
.step-hero .actions { display: flex; gap: 8px; margin-top: 16px; }
.step-hero .actions .btn.primary { flex: 1; }
.dom-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--c, var(--brand)); }
.dom-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--brand)); }
.step-done { text-align: center; padding: 26px 18px; }
.step-done .big { font-size: 44px; line-height: 1; }

/* other steps today */
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.mini-list li:last-child { border-bottom: 0; }
.check { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: transparent; }
.check:hover { border-color: var(--brand-hi); }
.check svg { width: 16px; height: 16px; }
.is-done .check { background: var(--ok); border-color: var(--ok); color: #fff; }
.is-done .t { color: var(--ink-3); text-decoration: line-through; }
.is-skipped .t { color: var(--ink-3); }

/* goal tiles — one colour per wheel-of-life area */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 132px;
  padding: 14px; border-radius: 22px; background: var(--c, #8A5A2B); color: #fff; overflow: hidden; text-decoration: none; }
.tile:hover { text-decoration: none; filter: brightness(1.05); }
.tile::after { content: ""; position: absolute; inset-inline-start: -26px; bottom: -34px; width: 110px; height: 110px;
  border-radius: 50%; background: rgba(255, 255, 255, .10); }
.tile .dom { font-size: 11.5px; font-weight: 800; opacity: .9; }
.tile .name { display: block; font-size: 15.5px; font-weight: 900; line-height: 1.5; margin-top: 4px; }
.tile .stat { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; }
.tile .bar { display: block; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .28); overflow: hidden; margin-top: 8px; }
.tile .bar i { display: block; height: 100%; background: #fff; border-radius: 3px; }
.tile .tile-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tile .badge { flex: none; font-size: 10.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .25); }
.tile.wide { grid-column: 1 / -1; min-height: 120px; }
.tile.slim { min-height: 0; gap: 6px; }
.tile.add { background: var(--surface); color: var(--ink-2); border: 2px dashed var(--line); align-items: center;
  justify-content: center; gap: 6px; font-weight: 800; }
.tile.add::after { display: none; }
.tile.add svg { width: 28px; height: 28px; color: var(--brand); }
.tile.dim { opacity: .82; }

/* week strip */
.week { display: flex; justify-content: space-between; gap: 6px; }
.week .d { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-3); font-weight: 700; }
.week .d i { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center;
  font-style: normal; font-size: 13px; color: var(--ink-3); border: 2px solid transparent; }
.week .d.done i { background: linear-gradient(135deg, var(--brand-hi), var(--brand-lo)); color: #fff; }
.week .d.part i { background: var(--brand-soft); color: var(--brand); }
.week .d.today i { border-color: var(--brand-hi); }
.streak { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; color: var(--brand); }

/* Pico line */
.pico-line { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pico-line:hover { text-decoration: none; border-color: var(--brand-hi); }
.pico-av { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--sun-1); display: grid;
  place-items: center; font-weight: 900; font-size: 15px; }
.pico-line p { font-size: 13.5px; line-height: 1.85; }
.pico-line .go { font-size: 12.5px; font-weight: 800; color: var(--brand); margin-top: 4px; display: block; }

/* list menu (Me, settings) */
.menu { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.menu a, .menu button.menu-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 16px; color: var(--ink);
  font-weight: 700; text-decoration: none; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: start; cursor: pointer; }
.menu > :last-child { border-bottom: 0; }
.menu a:hover, .menu button.menu-row:hover { background: var(--surface-2); text-decoration: none; }
.menu .ic { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.menu .ic svg { width: 20px; height: 20px; }
.menu .sub { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.menu .chev { margin-inline-start: auto; color: var(--ink-3); }
.menu .chev svg { width: 18px; height: 18px; }

/* forms */
.field { display: block; }
.field label, .label { display: block; font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 6px; }
.input, .field input[type=text], .field input[type=password], .field input[type=number], .field textarea, .field select {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font-size: 16px; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.8; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand-hi); box-shadow: var(--ring); }
.help { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--danger); font-size: 13px; }

/* choice cards / options (radio as big targets) */
.options { display: grid; gap: 10px; }
.options.two { grid-template-columns: 1fr 1fr; }
.opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px;
  background: var(--surface); border: 2px solid var(--line); cursor: pointer; font-weight: 700; min-height: 58px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:hover { border-color: var(--brand-hi); }
.opt:has(input:checked) { border-color: var(--brand-hi); background: var(--brand-soft); }
.opt:has(input:focus-visible) { box-shadow: var(--ring); }
.opt .sub { display: block; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.opt .sw { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c, var(--brand)); }
.opt.colored:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }

/* wheel rating: 1..10 per area */
.rate-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.rate-row:last-child { border-bottom: 0; }
.rate-row .h { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 14px; }
.rate-row .h .v { min-width: 30px; text-align: center; color: var(--c); font-size: 16px; font-weight: 900; }
.rate-row input[type=range] { width: 100%; accent-color: var(--c); margin-top: 6px; height: 28px; }

/* onboarding / multi-step flow */
.flow-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.progress { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand-hi), var(--brand-lo)); transition: width .3s ease; }
.flow { padding: 22px 16px 120px; }
.flow h1 { margin-bottom: 6px; }
.flow .lead { color: var(--ink-2); margin-bottom: 18px; }
.flow-cta { position: fixed; bottom: 0; inset-inline: 0; margin: 0 auto; max-width: var(--app-w); padding: 12px 16px calc(14px + var(--safe-b));
  background: linear-gradient(180deg, transparent, var(--bg) 30%); z-index: 15; }
@media (min-width: 720px) { .flow-cta { bottom: 24px; border-radius: 0 0 32px 32px; } }

/* wheel of life (SVG) */
.wheel { display: block; width: 100%; max-width: 280px; margin: 0 auto; }
.wheel text { font-family: var(--font); font-size: 9px; font-weight: 800; fill: var(--ink-2); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 12.5px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.legend b { margin-inline-start: auto; }

/* goal page */
.goal-head { border-radius: 0 0 32px 32px; background: var(--c); color: #fff; padding: 14px 16px 24px; margin: -8px -16px 0; position: relative; overflow: hidden; }
.goal-head::after { content: ""; position: absolute; inset-inline-start: -40px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.goal-head a { color: #fff; }
.goal-head h1 { font-size: 23px; margin: 10px 0 6px; }
.goal-head .kpis { display: flex; gap: 18px; margin-top: 12px; font-size: 12px; }
.goal-head .kpis b { display: block; font-size: 20px; font-weight: 900; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 14px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 40px 16px 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 7px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--line); }
.timeline li.done::before { background: var(--ok); border-color: var(--ok); }
.timeline li.now::before { border-color: var(--c, var(--brand-hi)); background: var(--c, var(--brand-hi)); }
.timeline .when { font-size: 11.5px; color: var(--ink-3); font-weight: 700; }
.kv { display: grid; gap: 10px; }
.kv div { display: flex; flex-direction: column; gap: 2px; }
.kv dt { font-size: 12px; color: var(--ink-3); font-weight: 800; }
.kv dd { margin: 0; font-size: 14px; line-height: 1.85; color: var(--ink); }
details.more { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 12px; }
details.more summary { cursor: pointer; font-weight: 800; color: var(--brand); font-size: 13.5px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }

/* chat (Pico) */
.chat { display: flex; flex-direction: column; gap: 10px; padding-bottom: 150px; }
.bubble { max-width: 86%; padding: 11px 15px; border-radius: 20px; line-height: 1.85; white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; }
.bubble.pico { align-self: flex-start; background: var(--surface); border-end-start-radius: 6px; box-shadow: var(--shadow-s); border: 1px solid var(--line); }
.bubble.user { align-self: flex-end; background: linear-gradient(135deg, var(--brand-hi), var(--brand-lo)); color: #fff; border-end-end-radius: 6px; }
.bubble.guard { border-color: var(--danger); }
.typing { align-self: flex-start; color: var(--ink-3); font-size: 13px; }
.typing i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--ink-3); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.rate { display: flex; gap: 4px; align-self: flex-start; margin-top: -4px; }
.rate button { border: 0; background: transparent; font-size: 14px; opacity: .45; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.rate button[aria-pressed="true"] { opacity: 1; background: var(--surface-2); }
.action-card { align-self: stretch; background: var(--surface-2); border-radius: 18px; padding: 12px 14px; font-size: 14px; }
.action-card .row { margin-top: 8px; }
.composer { position: fixed; bottom: calc(var(--tab-h) + var(--safe-b)); inset-inline: 0; margin: 0 auto; max-width: var(--app-w);
  padding: 10px 12px; background: linear-gradient(180deg, transparent, var(--bg) 26%); z-index: 15; }
@media (min-width: 720px) { .composer { bottom: calc(var(--tab-h) + 24px); } }
.composer form { display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 24px; padding: 6px 6px 6px 6px; box-shadow: var(--shadow); }
.composer textarea { flex: 1; border: 0; background: transparent; resize: none; min-height: 44px; max-height: 140px; padding: 10px 10px; font-size: 15px; }
.composer textarea:focus { outline: none; }
.composer .send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-hi), var(--brand-lo)); color: #fff; cursor: pointer; }
.composer .send svg { width: 20px; height: 20px; }
.suggest { display: flex; gap: 8px; overflow-x: auto; padding: 0 2px 8px; scrollbar-width: none; }
.suggest .chip { flex: none; cursor: pointer; background: var(--surface); border-color: var(--line); }

/* flash + toast */
.flash { margin: 8px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--ok-soft); color: var(--ink); font-size: 14px; font-weight: 600; }
.flash.error { background: #FDE2DE; }
.toast { position: fixed; inset-inline: 0; bottom: calc(var(--tab-h) + 24px); margin: 0 auto; width: max-content; max-width: 90%;
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; z-index: 50;
  animation: pop .25s ease; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.burst i { position: absolute; width: 8px; height: 12px; border-radius: 2px; animation: fall 1.1s ease-out forwards; }
@keyframes fall { to { transform: translate(var(--x), var(--y)) rotate(320deg); opacity: 0; } }

/* landing (public) */
.land-hero { padding: 26px 20px 8px; text-align: center; }
.land-hero .logo-big { width: 74px; height: 74px; margin: 6px auto 14px; display: block; }
.land-hero h1 { font-size: 30px; }
.land-hero p { color: var(--ink-2); margin: 10px auto 0; max-width: 340px; }
.benefits { display: grid; gap: 10px; margin: 22px 0; }
.benefit { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-s); border: 1px solid var(--line); }
.benefit .ic { flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--c); }
.benefit .ic svg { width: 22px; height: 22px; }
.benefit b { display: block; }
.benefit span { color: var(--ink-2); font-size: 13.5px; }
.preview-tiles { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.preview-tiles span { padding: 6px 12px; border-radius: 999px; color: #fff; background: var(--c); font-size: 12px; font-weight: 800; }

/* building (plan generation) */
.build { text-align: center; padding: 40px 16px; }
.build .steps-l { list-style: none; padding: 0; margin: 24px auto 0; max-width: 320px; text-align: start; }
.build .steps-l li { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--ink-3); font-weight: 700; }
.build .steps-l li.done { color: var(--ink); }
.build .steps-l li i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-style: normal; font-size: 12px; }
.build .steps-l li.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.build .steps-l li.now i { border-color: var(--brand-hi); border-top-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sunmark { width: 96px; height: 96px; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle at 50% 60%, var(--brand-hi), var(--brand-lo));
  box-shadow: 0 0 0 14px var(--brand-soft); display: grid; place-items: center; }
.sunmark svg { width: 46px; height: 46px; color: #fff; }

/* empty state */
.empty { text-align: center; padding: 28px 16px; color: var(--ink-2); }
.empty svg { width: 46px; height: 46px; color: var(--brand); margin-bottom: 8px; }

/* legacy pages (old templates still reachable from admin): keep them inside the same app frame */
.legacy-wrap { padding: 8px 16px 24px; }

/* small utilities used by the screens */
.mt { margin-top: 12px; }
.m0 { margin: 0; }
.my4 { margin: 4px 0; }
.h3 { font-size: 15px; font-weight: 800; cursor: pointer; }
details > summary.h3 { list-style: none; }
details > summary.h3::-webkit-details-marker { display: none; }
details > summary.h3::after { content: "▾"; float: left; color: var(--ink-3); }
details[open] > summary.h3::after { content: "▴"; }
.empty.wide { grid-column: 1 / -1; }
.agent-tag { display: inline-block; font-size: 11px; font-weight: 800; color: var(--brand); background: var(--brand-soft);
  border-radius: 999px; padding: 0 8px; margin-inline-end: 6px; }
.action-card .badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: var(--surface); }
.action-card .badge.done { color: var(--ok); }
.action-card .badge.warn { color: var(--danger); }
.action-card ul { margin: 6px 0; padding-inline-start: 18px; }
.tiles > .card.center { padding: 14px; }
.tiles > .card.center .streak { font-size: 22px; justify-content: center; }
.tiles > .card.center .streak svg { width: 22px; height: 22px; }
.streak svg { width: 18px; height: 18px; }
.chip svg { width: 14px; height: 14px; }
.btn.ghost.block svg { width: 18px; height: 18px; }
.center-row { justify-content: center; }

/* energy check-in (one tap, then it disappears for the day) */
.energy { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.energy-row { display: flex; justify-content: space-between; gap: 6px; }
.energy-row button { flex: 1; min-height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  font-size: 22px; cursor: pointer; }
.energy-row button:hover { border-color: var(--brand-hi); background: var(--brand-soft); }
.pico-av .mark { width: 20px; height: 20px; }
.chip { line-height: 1.7; }
.legacy .avatar .mark, .avatar .mark { width: 18px; height: 18px; }

/* ================================================================== v7 · learning */
.mt-s { margin-top: 8px; }
.d-block { display: block; }
.chips-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.chips-pick.four { grid-template-columns: repeat(4, 1fr); }
.pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px;
  background: var(--surface); border: 2px solid var(--line); font-size: 13.5px; font-weight: 700; cursor: pointer; text-align: center;
  transition: transform .15s, border-color .15s, background .15s; }
.pick span { font-size: 24px; line-height: 1; }
.pick b { font-size: 20px; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick:has(input:checked) { border-color: var(--brand-hi); background: var(--brand-soft); transform: translateY(-2px); }
.pick:has(input:focus-visible) { box-shadow: var(--ring); }
.flag-stack { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.flag-stack span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; color: #fff; font-weight: 900;
  font-size: 14px; animation: climb .6s cubic-bezier(.2, .8, .2, 1) both; }
.flag-stack span:nth-child(1) { background: #0F8A5F; } .flag-stack span:nth-child(2) { background: #0E7490; transform: translateY(-5px); animation-delay: .06s; }
.flag-stack span:nth-child(3) { background: #2563EB; transform: translateY(-10px); animation-delay: .12s; }
.flag-stack span:nth-child(4) { background: #7C4DDB; transform: translateY(-15px); animation-delay: .18s; }
.flag-stack span:nth-child(5) { background: #C2410C; transform: translateY(-20px); animation-delay: .24s; }
.flag-stack span:nth-child(6) { background: #D63B1E; transform: translateY(-25px); animation-delay: .3s; }
.ladder { display: flex; justify-content: center; gap: 6px; margin: 18px 0 4px; }
.ladder span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; background: var(--c);
  font-weight: 900; font-size: 14px; animation: rise .5s calc(.3s + var(--i) * .08s) both; transform: translateY(calc(var(--i) * -6px)); }
.ladder small { font-size: 11px; font-weight: 700; opacity: .9; }

/* player */
.app.player .screen { padding-bottom: 140px; }
.player-top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--bg); }
.pbar { height: 14px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22C55E, #16A34A);
  transition: width .5s cubic-bezier(.2, .8, .2, 1); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.xp-chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; color: #D97706; font-size: 14px; }
.xp-chip svg { width: 18px; height: 18px; }
.teach h1 { font-size: 26px; }
.kind-dot { font-size: 16px; }
.rule { border-inline-start: 5px solid var(--c, var(--brand)); font-size: 15px; line-height: 2; }
.example { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); text-align: start; cursor: pointer; }
.example b { display: block; font-size: 16px; }
.example .faint { display: block; }
.spk { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--c, var(--brand));
  color: #fff; }
.spk svg { width: 20px; height: 20px; }
.exercise .prompt { font-size: 22px; line-height: 1.9; font-weight: 800; }
.exercise .prompt.en { font-size: 23px; text-align: left; }
.exercise .prompt.fa { font-size: 22px; }
.gap { display: inline-block; min-width: 72px; margin: 0 4px; border-bottom: 3px solid var(--brand-hi); color: var(--ok); text-align: center; }
.gap-input { width: 7.5em; margin: 0 4px; padding: 2px 6px; font: inherit; font-size: 21px; border: 0; border-bottom: 3px solid var(--brand-hi);
  background: transparent; color: var(--ink); text-align: center; outline: none; }
.hint { font-size: 13px; color: var(--ink-3); }
.answers { display: grid; gap: 10px; }
.ans { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-radius: 18px;
  background: var(--surface); border: 2px solid var(--line); box-shadow: 0 3px 0 var(--line); font-size: 17px; font-weight: 700; cursor: pointer;
  transition: transform .1s, border-color .15s, background .15s; }
.ans:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.ans input { position: absolute; opacity: 0; pointer-events: none; }
.ans .key { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--line);
  font-size: 12px; color: var(--ink-3); }
.ans .t { flex: 1; }
.ans .t[dir=ltr] { text-align: left; }
.ans:has(input:checked) { border-color: #3B82F6; background: rgba(59, 130, 246, .1); box-shadow: 0 3px 0 #3B82F6; }
.ans:has(input:focus-visible) { box-shadow: var(--ring); }
.ans.right, .ans.right:has(input:checked) { border-color: #16A34A; background: rgba(22, 163, 74, .12); box-shadow: 0 3px 0 #16A34A; }
.ans.wrong, .ans.wrong:has(input:checked) { border-color: #DC2626; background: rgba(220, 38, 38, .1); box-shadow: 0 3px 0 #DC2626; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.speak-big { display: grid; place-items: center; width: 112px; height: 112px; margin: 6px auto 0; border: 0; border-radius: 32px; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, #3B82F6, #1D4ED8); box-shadow: 0 6px 0 #1E3A8A; }
.speak-big svg { width: 54px; height: 54px; }
.speak-big:active { transform: translateY(4px); box-shadow: 0 2px 0 #1E3A8A; }
.speak-slow { display: block; margin: 8px auto 0; border: 0; background: none; color: var(--ink-3); cursor: pointer; }
.pulse { animation: pop .3s ease; }
.order .built { min-height: 64px; padding: 8px 0; border-bottom: 2px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.order .bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.tok { padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); box-shadow: 0 3px 0 var(--line);
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; animation: pop .2s ease; }
.order .order-input { width: 100%; margin-top: 12px; }
.order.js-on .order-input { display: none; }
.order:not(.js-on) .bank .tok { cursor: default; }
.big-input { font-size: 20px; padding: 14px; }
.btn.dark { background: #DC2626; color: #fff; }
.sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; max-width: var(--app-w); margin: 0 auto; padding: 18px 18px calc(18px + var(--safe-b));
  border-radius: 24px 24px 0 0; display: grid; gap: 10px; animation: sheetup .3s cubic-bezier(.2, .8, .2, 1); }
.sheet.ok { background: #DCFCE7; color: #14532D; }
.sheet.bad { background: #FEE2E2; color: #7F1D1D; }
.sheet h2 { display: flex; align-items: center; gap: 6px; font-size: 20px; }
.sheet .icon-btn { color: inherit; }
.why-line { line-height: 1.9; }
@keyframes sheetup { from { transform: translateY(100%); } }
.exercise.answered .answers, .exercise.answered .order { pointer-events: none; }
.summary .trophy { font-size: 72px; line-height: 1; animation: bob 2.4s ease-in-out infinite; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats3 div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); animation: rise .5s both; }
.stats3 div:nth-child(2) { animation-delay: .1s; } .stats3 div:nth-child(3) { animation-delay: .2s; }
.stats3 b { display: inline-flex; align-items: center; gap: 4px; font-size: 22px; }
.stats3 b svg { width: 18px; height: 18px; color: #D97706; }
.stats3 span { font-size: 12px; color: var(--ink-3); }
.goal-ring { --s: 92px; display: grid; place-items: center; width: var(--s); height: var(--s); margin: 0 auto; border-radius: 50%;
  background: conic-gradient(#22C55E calc(var(--p) * 1%), var(--surface-2) 0); }
.goal-ring span { display: grid; place-items: center; width: calc(var(--s) - 16px); height: calc(var(--s) - 16px); border-radius: 50%;
  background: var(--bg); font-weight: 900; }
.goal-ring.small { --s: 52px; margin: 0; font-size: 12px; }
.level-badge { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 14px; font-weight: 900;
  color: #fff; background: linear-gradient(135deg, #7C4DDB, #2563EB); box-shadow: 0 3px 0 #1E3A8A; text-decoration: none; }
.level-badge.big { min-width: 120px; height: 120px; font-size: 44px; border-radius: 36px; margin: 0 auto; animation: climb .7s both; }
.lvl-bar { display: block; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.lvl-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7C4DDB, #2563EB);
  transform-origin: right; animation: fill .9s .2s both; }

/* Today card */
.study-hero { border-top: 6px solid var(--c); display: grid; gap: 10px; animation: rise .45s both; }
.study-hero .title { font-size: 21px; }
.lvl-line { display: flex; align-items: center; gap: 8px; color: var(--ink-3); text-decoration: none; }
.lvl-line .lvl-bar { flex: 1; height: 8px; }

/* path map */
.level-head { display: grid; gap: 10px; }
.review-pill { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border: 0; border-radius: 18px;
  cursor: pointer; font: inherit; font-weight: 800; color: #fff; background: linear-gradient(90deg, #F59E0B, #D97706); box-shadow: 0 4px 0 #92400E; }
.lvl-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 900; margin-top: 8px; cursor: pointer; list-style: none; }
.lvl-title::-webkit-details-marker { display: none; }
.lvl-title .faint { margin-inline-start: auto; }
.level-head svg, .chip svg, .review-pill svg { width: 16px; height: 16px; vertical-align: -3px; }
.lvl-title span { display: grid; place-items: center; width: 40px; height: 32px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 14px; }
.unit { margin: 14px 0 6px; }
.unit-band { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; color: #fff; background: var(--c);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.unit-band .xs { opacity: .9; }
.u-ic { font-size: 26px; }
.u-count { font-weight: 900; font-size: 13px; background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 2px 10px; }
.nodes { list-style: none; padding: 58px 0 4px; margin: 0; display: grid; gap: 18px; justify-items: center; }
.node { position: relative; display: flex; flex-direction: column; align-items: center; animation: rise .4s calc(var(--i) * .05s) both; }
.node:nth-child(4n+2) { transform: translateX(-56px); } .node:nth-child(4n+3) { transform: translateX(-84px); }
.node:nth-child(4n+4) { transform: translateX(-56px); }
.node a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.disc { position: relative; display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; font-size: 26px;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); box-shadow: 0 5px 0 rgba(0, 0, 0, .14); }
.disc::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); z-index: 0; }
.disc > * { position: relative; z-index: 1; }
.disc { isolation: isolate; }
.disc svg { position: relative; z-index: 1; width: 30px; height: 30px; }
.node.s-new .disc { filter: grayscale(1); opacity: .55; }
.node.s-mastered .disc, .node.s-tested .disc { background: var(--c); color: #fff; }
.node.s-mastered .disc::before, .node.s-tested .disc::before { background: var(--c); }
.node.s-tested .disc { opacity: .75; }
.node.is-current .disc { filter: none; opacity: 1; animation: ring 1.8s ease-out infinite; }
.node.is-due .disc::after { content: "↻"; position: absolute; top: -4px; inset-inline-end: -4px; z-index: 2; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: #F59E0B; color: #fff; font-size: 14px; font-weight: 900; }
.lbl { max-width: 120px; font-size: 12px; font-weight: 700; text-align: center; line-height: 1.5; }
.go-bubble { position: absolute; top: -34px; }
.go-bubble button { border: 0; cursor: pointer; padding: 6px 14px; border-radius: 12px; font: inherit; font-weight: 900; color: var(--c);
  background: var(--surface); box-shadow: 0 3px 0 var(--line); animation: bob 1.8s ease-in-out infinite; }
.mini-ring { --s: 46px; display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-2) 0); font-size: 12px; font-weight: 900; }
.mini-ring span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg); }
.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.word { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); cursor: pointer; }
.word-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.word-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.strength { width: 56px; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.strength i { display: block; height: 100%; width: calc(var(--p) * 1%); background: linear-gradient(90deg, #F59E0B, #16A34A); }
.chip.ok { color: #16A34A; }
.center-row { justify-content: center; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sheet.ok { background: #14532D; color: #DCFCE7; }
  :root:not([data-theme="light"]) .sheet.bad { background: #7F1D1D; color: #FEE2E2; }
}
:root[data-theme="dark"] .sheet.ok { background: #14532D; color: #DCFCE7; }
:root[data-theme="dark"] .sheet.bad { background: #7F1D1D; color: #FEE2E2; }
.study-start { padding-bottom: 140px; }
.order .built.right .tok { border-color: #16A34A; }
.order .built.wrong .tok { border-color: #DC2626; animation: shake .35s; }

/* v7.1 · scores, tests, reading */
.score-chip { gap: 8px; text-decoration: none; color: var(--ink); font-size: 18px; }
.score-big { font-size: 30px; font-weight: 900; line-height: 1; }
.up { color: #16A34A; font-weight: 800; } .down { color: #DC2626; font-weight: 800; }
.spark { width: 100%; height: 56px; }
.spark polyline { fill: none; stroke: #7C4DDB; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 1.2s .2s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.areas { display: grid; gap: 8px; }
.area { display: grid; grid-template-columns: 56px 1fr 30px 40px; align-items: center; gap: 8px; font-size: 13px; }
.area .bar { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.area .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2563EB, #7C4DDB); transform-origin: right; animation: fill .9s .2s both; }
.area b { text-align: center; }
.test-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.test-row form { display: contents; }
.test-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 18px; border: 2px solid var(--line);
  background: var(--surface); font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; text-align: center; box-shadow: 0 3px 0 var(--line); }
.test-card .ic { font-size: 24px; } .test-card b { font-size: 13.5px; } .test-card .xs { color: var(--ink-3); }
.test-card.ready { border-color: #F59E0B; box-shadow: 0 3px 0 #F59E0B; animation: ring 2s ease-out infinite; }
.unit-test { display: flex; justify-content: center; margin-top: -6px; }
.unit-test button { border: 0; border-radius: 0 0 14px 14px; padding: 6px 14px; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer;
  background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--c); }
.unit-test button.passed { background: #DCFCE7; color: #166534; }
.pitfall { padding: 12px 14px; border-radius: 16px; background: var(--warn-soft, #FEF3C7); font-size: 14px; line-height: 1.9; }
.passage { max-height: 42vh; overflow: auto; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  text-align: left; line-height: 1.75; font-size: 15.5px; }
.passage p { margin: 8px 0 0; }
.test-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.result-ring { --s: 130px; display: grid; place-items: center; width: var(--s); height: var(--s); margin: 0 auto; border-radius: 50%;
  background: conic-gradient(var(--rc, #16A34A) calc(var(--p) * 1%), var(--surface-2) 0); animation: climb .6s both; }
.result-ring.bad { --rc: #F59E0B; }
.result-ring span { display: grid; place-items: center; width: calc(var(--s) - 22px); height: calc(var(--s) - 22px); border-radius: 50%; background: var(--bg);
  font-size: 30px; font-weight: 900; }
.score-delta { font-size: 16px; }
.mistakes { margin: 8px 0 0; padding-inline-start: 18px; display: grid; gap: 10px; text-align: start; }
.mistakes .q { display: block; font-weight: 700; }
.mistakes .bad { color: #DC2626; } .mistakes .ok { color: #16A34A; }
.results { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.results li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.results li.ok { border-color: #86EFAC; } .results li.bad { border-color: #FCD34D; }
.results .ic { font-size: 22px; } .results .res { font-weight: 900; font-size: 18px; }

/* v7.2 · new exercise types, micro-feedback, growth map */
.block-tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-weight: 800; }
.block-tag.b-surprise, .block-tag.b-exam { background: #FEF3C7; color: #92400E; }
.block-tag.b-clinic, .block-tag.b-fix { background: #FEE2E2; color: #991B1B; }
.block-tag.b-learn { background: var(--ok-soft); color: var(--ok); }
.bonus { color: #D97706; font-weight: 900; }
.combo { font-weight: 900; font-size: 13px; margin-inline-end: 6px; }
.chip.tiny { padding: 2px 8px; font-size: 11px; }
.topic-line { margin: 0; opacity: .9; }
.fa-toggle summary { cursor: pointer; font-size: 13px; color: var(--ink-3); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match .col { display: grid; gap: 8px; align-content: start; }
.match .tok { width: 100%; text-align: center; font-size: 14px; line-height: 1.5; }
.match .tok.sel { border-color: var(--brand); box-shadow: 0 3px 0 var(--brand); }
.match .tok[data-pairc] { opacity: .85; }
.match .tok[data-pairc="1"] { border-color: #2563EB; } .match .tok[data-pairc="2"] { border-color: #16A34A; }
.match .tok[data-pairc="3"] { border-color: #D97706; } .match .tok[data-pairc="4"] { border-color: #7C3AED; }
.match .tok[data-pairc="5"] { border-color: #DB2777; }
.match[data-done] { pointer-events: none; }
.spot { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0; }
.spot .tok.picked { border-color: var(--brand); box-shadow: 0 3px 0 var(--brand); }
.spot .tok.wrong-word { border-color: #DC2626; background: rgba(220, 38, 38, .1); }
.exercise.answered .spot, .exercise.answered .pair { pointer-events: none; }
.speak-box { display: grid; gap: 10px; justify-items: center; }
.mic { width: 96px; height: 96px; border-radius: 50%; border: 0; font-size: 40px; background: var(--brand-soft); cursor: pointer; box-shadow: 0 5px 0 var(--line); }
.mic.live { animation: pulse 1s infinite; background: #FEE2E2; }
.mic:disabled { opacity: .4; }
.say-line { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--surface); font-size: 19px; font-weight: 800; text-align: left; color: var(--ink); cursor: pointer; }
.speak-diff span { display: inline-block; margin: 2px; padding: 0 4px; border-radius: 6px; }
.speak-diff .ok { color: var(--ok); }
.speak-diff .miss { background: rgba(220, 38, 38, .12); color: #B91C1C; cursor: pointer; }
.speak-diff small { display: block; font-size: 11px; opacity: .8; }
.write-box { min-height: 96px; resize: vertical; font-size: 17px; }
.passage.listen-only { text-align: center; }
.diag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: start; }
.diag-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.diag-list .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); flex: none; }
.diag-list .tag { margin-inline-start: auto; font-size: 12px; font-weight: 800; }
.diag-list .st-weak .dot { background: #DC2626; } .diag-list .st-weak .tag { color: #DC2626; }
.diag-list .st-ok .dot, .diag-list .st-strong .dot { background: var(--ok); } .diag-list .st-strong .tag, .diag-list .st-ok .tag { color: var(--ok); }
.diag-list .st-emerging .dot { background: #D97706; } .diag-list .st-emerging .tag { color: #D97706; }
.prof { display: grid; gap: 8px; }
.prof-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.prof-row .bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.prof-row .bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.prof-row.low .bar i { background: #DC2626; } .prof-row.high .bar i { background: var(--ok); }
.prof-row .lv { font-weight: 900; font-size: 13px; }
.mission { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mission .ring { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--surface-2) 0); }
.mission.done .t { text-decoration: line-through; color: var(--ink-3); }
.ex-line { font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.ex-line s { color: #B91C1C; } .ex-line b { color: var(--ok); }
.prog-card .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.band { font-size: 34px; font-weight: 900; }
.corr { font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.corr s { color: #B91C1C; } .corr b { color: var(--ok); }
.timer { font-variant-numeric: tabular-nums; font-weight: 900; font-size: 20px; }
.chip.bad { background: #FEE2E2; color: #991B1B; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.modes { margin: 4px 0; }
.weak-card { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.why-this { color: var(--ink-3); }
.why-this summary { cursor: pointer; display: inline; }
