/* Spokey · разговор с носителем. Белый фон, Noto Sans, живой маскот. Макеты: Figma «Spokey · Screens · Live 2». */
:root {
  --ink: #0B1533;
  --ink-2: #3C4A68;
  --muted: #66738F;
  --hair: #E4E9F5;
  --line: #DCE5FA;
  --haze: #EEF3FF;
  --blue50: #E7EEFF;
  --mist: #F3F5FB;
  --surface: #FFFFFF;
  --cobalt: #2051E5;
  --amber: #F0A23A;
  --red: #E5484D;
  --green: #1C9A63;
  --c-grammar: #1F4BD8;
  --c-vocabulary: #06809F;
  --c-pronunciation: #6A33D6;
  --c-fluency: #1C7A50;
  --c-language: #8A5A12;
  --c-phrase: #C2410C;
  --shadow: 0 1px 2px rgba(11, 21, 51, .04), 0 12px 32px -8px rgba(11, 21, 51, .06);
  --shadow-up: 0 -1px 2px rgba(11, 21, 51, .03), 0 -12px 32px -8px rgba(11, 21, 51, .07);
  --font: "Noto Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--surface); color: var(--ink); font: 500 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }
h1, h2, p { margin: 0; }

.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 28px 40px 40px; padding-left: max(40px, env(safe-area-inset-left)); padding-right: max(40px, env(safe-area-inset-right)); }

/* ---------- Шапка ---------- */
.bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 44px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -.01em; justify-self: start; }
.logo img { width: 28px; height: 28px; border-radius: 50%; display: block; }
.bar .scene { font-size: 14px; font-weight: 700; color: var(--ink); text-align: center; }
.timer { justify-self: end; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timer i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: rec 1.6s ease-in-out infinite; }
@keyframes rec { 50% { opacity: .35; } }

/* ---------- Общие элементы ---------- */
.card { background: var(--surface); border-radius: 32px; box-shadow: var(--shadow); }
.label { display: block; font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--ink-2); }
.note { font-size: 13px; line-height: 1.45; color: var(--muted); }
.note.ok { color: var(--green); }
.note.bad { color: var(--red); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; text-decoration: none; font-weight: 700; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn-l { height: 52px; padding: 0 24px; font-size: 16px; }
.btn-m { height: 44px; padding: 0 18px; font-size: 14px; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #1A2648; }
.btn-ink:disabled { background: #9AA3B8; cursor: not-allowed; }
.btn-light { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair); }
.btn-light:hover { background: var(--mist); }
.btn.wide { width: 100%; }

/* ---------- Маскот ---------- */
/* Слот шире арта: место под прыжки и руки. --mw — ширина самого персонажа, как в макете. */
.mascot-slot { --mw: 300px; position: relative; width: calc(var(--mw) * 1.327); aspect-ratio: 1.367; margin: calc(var(--mw) * -.229) calc(var(--mw) * -.163) calc(var(--mw) * -.089); pointer-events: none; }
.mascot-slot .mascot-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .5s ease; }
.mascot-slot.mascot-ready .mascot-canvas { opacity: 1; }
.mascot-slot.fallback { background: url(/live-assets/mascot/dave.webp) center 62% / 76% auto no-repeat; }

/* ---------- Шкала терпения ---------- */
.patience { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.patience .label { color: var(--muted); font-size: 15px; }
.segs { display: flex; gap: 5px; }
.segs i { width: 12px; height: 12px; border-radius: 3px; background: var(--hair); transition: background .35s; }
.segs.high i.on { background: var(--cobalt); }
.segs.mid i.on { background: var(--amber); }
.segs.low i.on { background: var(--red); }

/* ---------- Старт ---------- */
.intro { flex: 1; display: grid; grid-template-columns: minmax(0, 560px) 480px; justify-content: space-between; align-items: start; gap: 48px; width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 0; }
/* Герой держится у верха, а не у центра формы: открытые настройки не утягивают его вниз. */
.hero { position: sticky; top: 24px; padding-top: 72px; }
.hero .mascot-slot { --mw: 300px; margin-left: calc(var(--mw) * -.163 + 6px); }
.hero h1 { margin-top: 28px; font-size: 64px; line-height: 1; letter-spacing: -.035em; font-weight: 700; color: var(--ink); }
.hero .lead { margin-top: 16px; font-size: 16px; color: var(--ink-2); }

.form { padding: 36px 36px 32px; display: flex; flex-direction: column; gap: 22px; border-radius: 32px; }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field legend.label { padding: 0; margin-bottom: 10px; color: var(--muted); }
.input { height: 52px; width: 100%; padding: 0 16px; border-radius: 14px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); font-size: 16px; color: var(--ink); transition: box-shadow .15s; }
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--cobalt); }
.input.invalid { box-shadow: inset 0 0 0 1.5px var(--red); }

.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); cursor: pointer; transition: box-shadow .15s; }
.choice:hover { box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(11,21,51,.04); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.choice b { font-size: 16px; line-height: 1.45; font-weight: 700; }
.choice small { font-size: 14px; line-height: 1.45; color: var(--muted); }
.choice .radio { flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .15s, background .15s; }
.choice:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--cobalt); }
.choice input:checked ~ .radio { background: var(--cobalt); box-shadow: inset 0 0 0 5px #fff, 0 0 0 1.5px var(--cobalt); }
.choice input:focus-visible ~ .radio { outline: 2px solid var(--cobalt); outline-offset: 3px; }

.settings { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--hair); }
.settings summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; cursor: pointer; }
.settings summary::-webkit-details-marker { display: none; }
.settings summary > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.settings summary b { font-size: 16px; line-height: 1.45; }
.settings summary small { font-size: 14px; line-height: 1.45; color: var(--muted); }
.settings .chev { width: 20px; height: 20px; color: var(--muted); transition: transform .2s; }
.settings[open] .chev { transform: rotate(180deg); }
.settings-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 16px; }
.set { display: flex; flex-direction: column; gap: 8px; }
.set .label { color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--haze); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; height: 40px; padding: 0 10px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; text-align: center; line-height: 1.15; transition: background .15s, color .15s, box-shadow .15s; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ink); cursor: pointer; }
.switch-row span { flex: 1; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(11,21,51,.15); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--cobalt); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.mic-row { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 6px 0 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink-2); }
.mic-row svg { width: 20px; height: 20px; flex: none; }
.mic-level { flex: 1; display: flex; align-items: center; gap: 3px; height: 18px; overflow: hidden; }
.mic-level i { width: 3px; height: 4px; border-radius: 2px; background: var(--line); transition: height .08s, background .08s; }
.mic-level i.on { background: var(--cobalt); }
.mini { height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--haze); font-size: 14px; font-weight: 700; color: var(--ink); }
.mini:hover { background: var(--blue50); }

.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check i { flex: none; width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--line); background: #fff; transition: background .15s, box-shadow .15s; }
.check input:checked + i { background: var(--cobalt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; box-shadow: none; }
.check input:focus-visible + i { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.status { min-height: 0; font-size: 14px; color: var(--ink-2); text-align: center; }
.status:empty { display: none; }
.status.error { color: var(--red); }
.fine { font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; margin-top: -8px; }

/* ---------- Разговор ---------- */
.stage { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; padding-top: 30px; }
.talk { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.talk .scene-m { display: none; }
.talk .mascot-slot { --mw: 356px; }
.talk .patience { margin-top: 18px; }
.sheet { display: flex; flex-direction: column; align-items: center; width: 100%; }
.dialogue { margin-top: 36px; width: min(720px, 100%); padding: 40px 48px 32px; display: flex; flex-direction: column; gap: 20px; text-align: center; }
.dialogue .speaker { display: none; }
.dialogue .line { font-size: 40px; line-height: 1.04; letter-spacing: -.025em; font-weight: 700; color: var(--ink); text-wrap: balance; min-height: 1.04em; overflow-wrap: anywhere; }
.dialogue .line.long { font-size: 30px; line-height: 1.12; }
.dialogue .you { font-size: 16px; color: var(--muted); min-height: 24px; }
.dialogue .line-tr { font-size: 18px; line-height: 1.4; color: var(--ink-2); margin-top: -8px; text-wrap: balance; }
.dialogue .line-tr[hidden] { display: none; }
.dialogue .you-label::after { content: ": "; }
.dialogue .you:has(#you:empty) { visibility: hidden; }
.hints { display: flex; flex-direction: column; gap: 10px; }
.hint-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.hint-list li { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--hair); }
.hint-list b { font-size: 16px; line-height: 1.45; font-weight: 700; color: var(--ink); }
.hint-list span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.hint-list li.loading { grid-column: 1 / -1; color: var(--muted); text-align: center; box-shadow: none; }
.hint-help { font-size: 14px; color: var(--muted); }
.hint-help b { color: var(--ink); font-weight: 700; }
.hint-help:empty { display: none; }

.dock { margin-top: 24px; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.voice-state { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 20px 0 18px; border-radius: 999px; background: var(--haze); font-size: 14px; font-weight: 700; color: var(--ink); min-width: 210px; }
.wave { display: flex; align-items: center; gap: 3px; height: 24px; }
.wave i { width: 3px; height: 6px; border-radius: 2px; background: var(--cobalt); transition: height .09s linear; }
.voice-state.idle .wave i { background: var(--line); }
.icon-btn { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair); color: var(--ink); transition: background .15s; }
.icon-btn:hover { background: var(--mist); }
.icon-btn[aria-pressed="true"] { background: var(--haze); box-shadow: inset 0 0 0 1.5px var(--cobalt); color: var(--cobalt); }
.icon-btn.ink { background: var(--ink); color: #fff; box-shadow: none; }
.icon-btn.ink:hover { background: #1A2648; }
.icon-btn svg { width: 22px; height: 22px; }
.notes-peek { display: none; }

.notes { padding: 28px 28px 12px; border-radius: 28px; position: sticky; top: 24px; }
.notes-head { display: flex; align-items: baseline; gap: 8px; padding-bottom: 8px; }
.notes-head h2 { font-size: 18px; line-height: 1.28; font-weight: 600; }
.notes-head .count { font-size: 14px; font-weight: 700; color: var(--muted); }
.notes-close { display: none; }
.notes > .note { padding: 8px 0 16px; }
.errors { list-style: none; margin: 0; padding: 0; }
.err { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--hair); animation: rise .35s ease both; }
.err .kind { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--k); }
.err .kind::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--k); }
.err .correct { font-size: 16px; line-height: 1.45; font-weight: 700; color: var(--ink); }
.err .said { font-size: 14px; line-height: 1.45; color: var(--muted); }
.err .why { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.err.grammar { --k: var(--c-grammar); }
.err.vocabulary { --k: var(--c-vocabulary); }
.err.pronunciation { --k: var(--c-pronunciation); }
.err.fluency { --k: var(--c-fluency); }
.err.language { --k: var(--c-language); }
.err.phrase { --k: var(--c-phrase); }
.field[hidden] { display: none; }
.choices.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .choices.grid { grid-template-columns: 1fr; } }
.choices.grid .choice { align-items: flex-start; gap: 12px; padding: 14px; }
.choices.grid .radio { display: none; }
.choices.grid small { font-size: 13px; }
.memory-note { margin-top: 10px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--cobalt); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link-btn[hidden] { display: none; }
.choice .play { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--mist); color: var(--ink, #0B1533); cursor: pointer; transition: background .15s, transform .15s; }
.choice .play:hover { background: #E7ECF8; }
.choice .play svg { width: 18px; height: 18px; }
.choice .play .bars { display: none; }
.choice.playing .play { background: var(--cobalt); color: #fff; }
.choice.playing .play .tri { display: none; }
.choice.playing .play .bars { display: inline; }
.choice.loading .play { animation: play-pulse 1s ease-in-out infinite; }
@keyframes play-pulse { 50% { transform: scale(.88); opacity: .6; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Итог ---------- */
.final { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; padding-top: 30px; }
.summary { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.summary .mascot-slot { --mw: 360px; }
.summary .patience { margin-top: 18px; }
.summary-card { margin-top: 36px; width: min(720px, 100%); padding: 40px 48px 36px; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.summary-card h1 { font-size: 40px; line-height: 1.04; letter-spacing: -.025em; font-weight: 700; }
.summary-card .sub { margin-top: -18px; font-size: 16px; color: var(--ink-2); max-width: 52ch; }
.stats { display: flex; gap: 64px; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; gap: 6px; text-align: left; }
.stats dt { font-size: 14px; color: var(--muted); }
.stats dd { margin: 0; font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.save-status { margin-top: -12px; }
.final .notes { position: sticky; }
.final.solo { grid-template-columns: minmax(0, 1fr); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--shadow); z-index: 50; }

/* ---------- Планшет ---------- */
@media (max-width: 1180px) {
  .stage, .final { grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
  .dialogue .line { font-size: 34px; }
}
@media (max-width: 980px) and (min-width: 761px) {
  .intro { grid-template-columns: 1fr; justify-items: center; text-align: center; max-width: 560px; }
  .hero { display: flex; flex-direction: column; align-items: center; position: static; padding-top: 0; }
  .hero .mascot-slot { margin-left: calc(var(--mw) * -.163); }
  .form { width: 100%; text-align: left; }
  .stage, .final { grid-template-columns: 1fr; }
  .notes { position: static; width: min(720px, 100%); justify-self: center; }
}

/* ---------- Телефон ---------- */
@media (max-width: 760px) {
  .app { padding: 16px 20px 24px; padding-top: max(16px, env(safe-area-inset-top)); }
  .bar { grid-template-columns: 1fr auto; min-height: 40px; }
  .bar .scene { display: none; }
  .intro { grid-template-columns: 1fr; gap: 28px; padding: 12px 0 0; align-items: start; }
  .hero { display: flex; flex-direction: column; align-items: center; text-align: center; position: static; padding-top: 0; }
  .hero .mascot-slot { --mw: 200px; margin-left: calc(var(--mw) * -.163); }
  .hero h1 { margin-top: 20px; font-size: 40px; line-height: 1.04; }
  .hero .lead { margin-top: 10px; }
  .form { padding: 0; box-shadow: none; border-radius: 0; gap: 20px; }

  /* разговор: персонаж сверху, реплика — в листе снизу */
  .app[data-screen="stage"] { padding-bottom: 0; }
  .stage { display: flex; flex-direction: column; padding-top: 0; gap: 0; }
  .talk { flex: 1; }
  .talk .scene-m { display: block; margin-top: 4px; font-size: 14px; color: var(--ink); text-align: center; }
  .talk .mascot-slot { --mw: 272px; margin-top: calc(var(--mw) * -.229 + 14px); }
  .talk .patience { margin-top: 12px; gap: 8px; }
  .talk .patience .label { font-size: 13px; }
  .sheet { flex: 1; margin: 26px -20px 0; width: auto; align-self: stretch; padding: 24px 24px max(24px, env(safe-area-inset-bottom)); background: var(--surface); border-radius: 32px 32px 0 0; box-shadow: var(--shadow-up); align-items: stretch; }
  .dialogue { margin: 0; width: 100%; padding: 0; box-shadow: none; border-radius: 0; text-align: left; gap: 16px; flex: 1; }
  .dialogue .speaker { display: block; font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--cobalt); margin-bottom: -10px; }
  .dialogue .line, .dialogue .line.long { font-size: 24px; line-height: 1.28; font-weight: 600; letter-spacing: -.01em; }
  .dialogue .you { display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
  .dialogue .you-label { font-size: 13px; line-height: 1.3; font-weight: 600; color: var(--muted); }
  .dialogue .you-label::after { content: ""; }
  .hint-list { grid-template-columns: 1fr; gap: 8px; }
  .dock { position: sticky; bottom: 0; z-index: 5; margin: 12px -24px calc(-1 * max(24px, env(safe-area-inset-bottom))); padding: 8px 24px max(16px, env(safe-area-inset-bottom)); border-radius: 0; background: var(--surface); box-shadow: none; gap: 10px; }
  .voice-state { display: none; }
  .notes-peek { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px 0 18px; border: 0; border-radius: 999px; background: var(--haze); font-size: 14px; font-weight: 700; color: var(--ink); text-align: left; }
  .notes-peek > span:nth-child(2) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .notes-peek svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
  .notes-peek .dots { display: flex; gap: 4px; }
  .notes-peek .dots i { width: 8px; height: 8px; border-radius: 2px; background: var(--k, var(--line)); }
  .notes-peek .dots:empty { display: none; }

  /* замечания — выезжающий лист поверх */
  .stage .notes { position: fixed; top: auto; left: 0; right: 0; bottom: 0; max-height: 72vh; overflow: auto; z-index: 30; border-radius: 28px 28px 0 0; padding: 24px 24px max(16px, env(safe-area-inset-bottom)); box-shadow: 0 -12px 48px rgba(11,21,51,.16); transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
  .stage.notes-open .notes { transform: none; }
  .stage .notes-close { display: block; margin-left: auto; border: 0; background: none; font-size: 14px; font-weight: 700; color: var(--cobalt); padding: 4px 0; }

  /* итог */
  .final { display: flex; flex-direction: column; gap: 0; padding-top: 0; }
  .summary { align-items: stretch; }
  .summary .mascot-slot { --mw: 230px; align-self: center; margin-top: calc(var(--mw) * -.229 + 20px); }
  .summary .patience { margin-top: 14px; }
  .summary-card { margin-top: 44px; padding: 0; box-shadow: none; border-radius: 0; align-items: stretch; text-align: left; gap: 22px; }
  .summary-card h1 { font-size: 28px; line-height: 1.12; }
  .summary-card .sub { margin-top: -14px; }
  .stats { gap: 40px; }
  .actions { flex-direction: column; order: 5; }
  .actions .btn-light { background: none; box-shadow: none; }
  .final .notes { position: static; width: 100%; margin-top: 28px; padding: 0; box-shadow: none; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
