/* FLAYMI — дизайн-система (ТЗ, раздел 29). Тёмная тема по видео, светлая сохраняет расположение и акценты. */
:root {
  --bg: #171819; --surface: #202122; --surface-2: rgba(255,255,255,.055); --surface-3: rgba(255,255,255,.09);
  --text: #F7F7FA; --muted: #B7B3C1; --faint: #8E8A99;
  --violet: #A184FF; --violet-deep: #8C5CF7; --violet-soft: rgba(140,92,247,.18);
  --green: #29D583; --on-green: #072918; --green-text: #4BE39B; --green-soft: rgba(41,213,131,.14);
  --stroke: rgba(255,255,255,.12); --stroke-strong: rgba(255,255,255,.2);
  --glass: rgba(48,48,53,.74); --danger: #FF8A8A; --warn: #FFD27A;
  --glow-a: rgba(41,213,131,.42); --glow-b: rgba(140,92,247,.34);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --r-card: 24px; --r-field: 20px; --r-nav: 32px; --pad: 18px;
  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --app-h: 100dvh;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F6F7FA; --surface: #FFFFFF; --surface-2: #FFFFFF; --surface-3: #EEF0F5;
  --text: #14151A; --muted: #565A69; --faint: #6F7383;
  --violet: #6A45E0; --violet-deep: #7C4DF0; --violet-soft: rgba(124,77,240,.11);
  --green: #29D583; --on-green: #072918; --green-text: #087A47; --green-soft: rgba(41,213,131,.16);
  --stroke: rgba(20,21,26,.09); --stroke-strong: rgba(20,21,26,.18);
  --glass: rgba(255,255,255,.84); --danger: #C62F2F; --warn: #8A5A00;
  --glow-a: rgba(41,213,131,.30); --glow-b: rgba(140,92,247,.20);
  --shadow: 0 8px 24px rgba(20,21,26,.08);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 400 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
a { color: var(--violet); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Свечение закреплено у верха прокручиваемого содержимого: под текстом при чтении оно не движется. */
#glow, .glow {
  position: absolute; inset: 0 0 auto 0; height: 520px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 60% at 50% -12%, var(--glow-a), transparent 62%),
    radial-gradient(90% 50% at 18% 46%, var(--glow-b), transparent 70%),
    radial-gradient(70% 40% at 96% 58%, var(--glow-b), transparent 72%);
}
#glow { display: none; }
body.legal #glow { display: block; }

#app { position: relative; height: var(--app-h); display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.screen { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-top: var(--safe-top); }
.screen-body { position: relative; z-index: 1; padding: 0 var(--pad) calc(120px + var(--safe-bottom)); }
.screen.with-ask .screen-body { padding-bottom: calc(184px + var(--safe-bottom)); }
.screen.no-nav .screen-body { padding-bottom: calc(32px + var(--safe-bottom)); }
.fade-in { animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Верхняя панель */
.topbar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 var(--pad); }
.topbar .brand { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 700; letter-spacing: .22em; font-size: 15px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--stroke); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.pill-btn { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--surface-2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-width: 44px; }
.pill-btn.pro { color: var(--green-text); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.pill-btn.pro.on { background: var(--green-soft); }

/* Типографика */
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow.violet { color: var(--violet); }
.title { font-size: 28px; line-height: 1.12; font-weight: 750; letter-spacing: -.01em; margin: 6px 0 14px; }
.h2 { font-size: 18px; font-weight: 700; }
.sub { color: var(--muted); font-size: 14px; }
.small { font-size: 12.5px; color: var(--muted); }
.center { text-align: center; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.link { color: var(--violet); font-weight: 600; font-size: 13px; text-decoration: none; padding: 8px 0; }

/* Карточки */
.card { background: var(--surface-2); border: 1px solid var(--stroke); border-radius: var(--r-card); padding: 16px; position: relative; }
[data-theme="light"] .card { box-shadow: 0 2px 10px rgba(20,21,26,.035); }
.card.hero { padding: 18px; background: linear-gradient(160deg, var(--violet-soft), var(--surface-2) 62%); overflow: hidden; }
.card.green { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 35%, transparent); }
.card.violet { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet-deep) 35%, transparent); }
.card.tap { display: block; width: 100%; text-align: left; transition: transform .16s ease, border-color .16s ease; }
.card.tap:active { transform: scale(.985); border-color: var(--stroke-strong); }
.card h3 { font-size: 16px; font-weight: 700; }
.card + .card { margin-top: 12px; }
.hero-row { display: flex; gap: 12px; align-items: flex-start; }
.hero-row .grow { flex: 1; min-width: 0; }
.hero-title { font-size: 21px; line-height: 1.18; font-weight: 750; margin: 6px 0 8px; }
.i3d { width: 76px; height: 76px; flex: none; filter: drop-shadow(0 10px 18px rgba(120,80,240,.35)); animation: pop .24s ease both; }
.i3d.sm { width: 40px; height: 40px; filter: drop-shadow(0 6px 10px rgba(120,80,240,.28)); }
.i3d.lg { width: 104px; height: 104px; }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2 .card + .card { margin-top: 0; }
.tool { min-height: 118px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.tool h3 { font-size: 15px; }
.tool p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--pad)); padding: 2px var(--pad) 6px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.hscroll .card + .card { margin-top: 0; }
.scn { width: 200px; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.scn h3 { font-size: 15px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; background: var(--surface-3); color: var(--muted); }
.tag.pro { background: var(--violet-soft); color: var(--violet); }
.tag.ai { background: var(--green-soft); color: var(--green-text); }
.tag.ex { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }

/* Кнопки */
.btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; padding: 0 18px; border-radius: 16px; font-weight: 700; font-size: 15px; transition: transform .16s ease, opacity .16s ease; }
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--green); color: var(--on-green); }
.btn.ghost { background: var(--surface-2); border: 1px solid var(--stroke); justify-content: center; }
.btn.quiet { justify-content: center; color: var(--muted); font-weight: 600; min-height: 44px; }
.btn.danger { justify-content: center; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.center { justify-content: center; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.loading { pointer-events: none; }
.btn.loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn.loading .arr { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn + .btn, .card + .btn, .btn + .card { margin-top: 10px; }
.row { display: flex; gap: 10px; }
.row .btn + .btn { margin-top: 0; }
.mt { margin-top: 12px; } .mt2 { margin-top: 20px; } .mb { margin-bottom: 12px; }

/* Чипы и сегменты */
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--surface-2); font-size: 13.5px; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; }
.chip[aria-pressed="true"], .chip.on { background: var(--green); color: var(--on-green); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad) 4px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }

/* Поля */
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, .textarea { width: 100%; background: var(--surface-2); border: 1px solid var(--stroke); border-radius: var(--r-field); padding: 13px 15px; font-size: 16px; outline: none; }
.textarea { min-height: 96px; resize: none; line-height: 1.4; }
.input:focus, .textarea:focus { border-color: var(--violet); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.count { text-align: right; font-size: 12px; color: var(--faint); margin-top: 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; min-height: 44px; }
.check input { width: 22px; height: 22px; flex: none; accent-color: var(--green); margin: 1px 0 0; }

/* Нижняя стеклянная панель */
.nav { position: absolute; left: var(--pad); right: var(--pad); bottom: calc(12px + var(--safe-bottom)); z-index: 5; height: 64px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px; border-radius: var(--r-nav); background: var(--glass); border: 1px solid var(--stroke); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow); }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 26px; color: var(--muted); text-decoration: none; font-size: 10.5px; font-weight: 600; transition: background .16s ease, color .16s ease; }
.nav a svg { width: 22px; height: 22px; }
.nav a[aria-current="page"] { background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text); }
.ask { position: absolute; left: var(--pad); right: var(--pad); bottom: calc(86px + var(--safe-bottom)); z-index: 5; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 6px 0 18px; border-radius: 26px; background: var(--glass); border: 1px solid color-mix(in srgb, var(--violet-deep) 40%, var(--stroke)); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow); transition: transform .2s ease, opacity .2s ease; }
.ask.hidden { transform: translateY(18px); opacity: 0; pointer-events: none; }
.ask input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; }
.ask input::placeholder { color: var(--muted); }
.send { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--green); color: var(--on-green); display: grid; place-items: center; }
.send svg { width: 18px; height: 18px; }
.send[disabled] { opacity: .45; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .nav, .ask, .sheet { background: var(--surface); } }

/* Путь */
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .24s ease; }
.progress.violet > i { background: var(--violet-deep); }
.steps { list-style: none; margin: 16px 0 0; padding: 0; }
.step { display: flex; gap: 14px; position: relative; padding-bottom: 18px; width: 100%; text-align: left; }
.step::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 1px; background: var(--stroke); }
.step:last-child::before { display: none; }
.dot { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-3); border: 1px solid var(--stroke); color: var(--muted); }
.step.done .dot { background: var(--green-soft); color: var(--green-text); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.step.current .dot { background: var(--violet-deep); color: #fff; border-color: transparent; }
.step.skipped .dot { opacity: .6; }
.step h3 { font-size: 15px; font-weight: 700; }
.step.todo:not(.current) h3 { color: var(--muted); }
.step p { font-size: 12.5px; color: var(--muted); }

/* Чат */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-head { position: relative; z-index: 2; padding: calc(var(--safe-top) + 8px) var(--pad) 10px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--stroke); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--violet-deep), #5B37C9); color: #fff; flex: none; }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head .who b { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px var(--pad); display: flex; flex-direction: column; gap: 8px; position: relative; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 20px; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; animation: fade .18s ease both; }
.bubble.partner { align-self: flex-start; background: var(--surface-3); border: 1px solid var(--stroke); border-bottom-left-radius: 8px; }
.bubble.user { align-self: flex-end; background: color-mix(in srgb, var(--violet-deep) 62%, var(--surface)); color: #fff; border-bottom-right-radius: 8px; }
[data-theme="light"] .bubble.user { background: var(--violet-deep); }
.bubble.typing { color: var(--muted); letter-spacing: .2em; }
.coach { align-self: stretch; border-radius: 18px; padding: 12px 14px; background: var(--green-soft); border: 1px dashed color-mix(in srgb, var(--green) 50%, transparent); font-size: 14px; animation: fade .18s ease both; }
.coach .eyebrow { color: var(--green-text); margin-bottom: 4px; }
.coach p + p { margin-top: 6px; }
.coach .ready { background: var(--surface-2); border: 1px solid var(--stroke); border-radius: 12px; padding: 8px 10px; margin-top: 6px; }
.ctx { align-self: stretch; font-size: 13.5px; }
.chat-foot { position: relative; z-index: 2; padding: 8px var(--pad) calc(10px + var(--safe-bottom)); border-top: 1px solid var(--stroke); background: var(--bg); }
.chat-tools { display: flex; gap: 8px; margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; }
.chat-tools::-webkit-scrollbar { display: none; }
.chat-tools .chip { flex: none; min-height: 34px; font-size: 13px; }
.chat-input { display: flex; align-items: flex-end; gap: 8px; background: var(--surface-2); border: 1px solid var(--stroke); border-radius: 24px; padding: 5px 5px 5px 16px; }
.chat-input textarea { flex: 1; min-width: 0; border: 0; background: none; outline: none; resize: none; font-size: 16px; line-height: 1.35; max-height: 120px; padding: 9px 0; }
.turns { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Результаты */
.variant { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.variant-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--stroke); }
.act { font-weight: 700; font-size: 13.5px; color: var(--violet); min-height: 44px; padding: 0 4px; display: inline-flex; align-items: center; }
.quote { border-left: 3px solid var(--violet-deep); padding: 4px 0 4px 12px; margin-top: 10px; color: var(--muted); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.crit { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--stroke); font-size: 14.5px; }
.crit:last-child { border-bottom: 0; }
.st { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.st.achieved { background: var(--green-soft); color: var(--green-text); }
.st.practice { background: var(--violet-soft); color: var(--violet); }
.st.insufficient_data { background: var(--surface-3); color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--stroke); align-items: flex-start; }
.list li:last-child { border-bottom: 0; }
.list .k { min-width: 52px; font-weight: 700; color: var(--violet); }
.list.plain li { display: block; }
.menu { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--stroke); font-weight: 600; }
.menu:last-child { border-bottom: 0; }
.menu .grow { flex: 1; min-width: 0; }
.menu small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.menu > svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.big-num { font-size: 44px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.quota { margin-top: 14px; }
.quota-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.quota-top b { font-weight: 600; }
.msg-edit { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.msg-edit .who-btn { flex: none; width: 64px; min-height: 44px; border-radius: 14px; font-size: 12.5px; font-weight: 700; border: 1px solid var(--stroke); background: var(--surface-3); text-align: center; }
.msg-edit .who-btn.me { background: var(--violet-soft); color: var(--violet); }
.msg-edit textarea { flex: 1; min-height: 44px; border-radius: 14px; padding: 10px 12px; font-size: 15px; }
.msg-edit .x { flex: none; width: 36px; height: 44px; color: var(--muted); font-size: 20px; text-align: center; }
.redact { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--stroke); touch-action: none; background: #000; }
.redact canvas { display: block; width: 100%; height: auto; }

/* Состояния */
.state { text-align: center; padding: 34px 10px; }
.state .i3d { margin: 0 auto 12px; }
.state h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.state p { color: var(--muted); font-size: 14px; }
.state .btn { margin-top: 16px; }
.skel { border-radius: var(--r-card); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shim 1.2s linear infinite; height: 110px; margin-top: 12px; border: 1px solid var(--stroke); }
.skel.sm { height: 54px; }
@keyframes shim { to { background-position: -200% 0; } }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 16px; background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); font-size: 13px; margin-bottom: 12px; }

/* Шторка и уведомления */
.sheet-back { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; animation: fadeo .18s ease both; }
@keyframes fadeo { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 560px; max-height: 88%; overflow-y: auto; background: var(--surface); border: 1px solid var(--stroke); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 10px var(--pad) calc(22px + var(--safe-bottom)); animation: up .22s ease both; }
[data-theme="dark"] .sheet { background: #1E1F21; }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.grab { width: 40px; height: 4px; border-radius: 4px; background: var(--stroke-strong); margin: 0 auto 14px; }
#toast-root { position: fixed; left: 0; right: 0; top: calc(var(--safe-top) + 12px); z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { max-width: 440px; padding: 11px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; animation: fade .18s ease both; }
[data-theme="dark"] .toast { background: #2A2B2F; }

/* Загрузка и онбординг */
.boot { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; position: relative; z-index: 1; }
.boot-mark { border-radius: 28px; box-shadow: 0 16px 40px rgba(120,80,240,.35); }
.boot-name { font-weight: 800; letter-spacing: .24em; font-size: 18px; margin-top: 8px; }
.boot-note { color: var(--muted); font-size: 14px; max-width: 320px; }
.onb { min-height: 100%; display: flex; flex-direction: column; padding: calc(var(--safe-top) + 28px) var(--pad) calc(24px + var(--safe-bottom)); position: relative; z-index: 1; }
.onb .grow { flex: 1; }
.dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--stroke-strong); }
.dots i.on { width: 22px; border-radius: 6px; background: var(--green); }

/* Документы */
body.legal { overflow: auto; }
.legal-wrap { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 40px 20px 60px; }
.legal-wrap h1 { font-size: 28px; margin: 6px 0 18px; }
.legal-wrap h2 { font-size: 17px; margin: 24px 0 8px; }
.legal-wrap p, .legal-wrap li { color: var(--muted); margin-bottom: 8px; }
.legal-wrap .draft { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--surface-2); font-size: 13px; }
.legal-nav { margin-top: 32px; }

@media (max-height: 640px) { .title { font-size: 24px; } .i3d { width: 64px; height: 64px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.card.tap.ask-inline { display: none; }
.short .ask { display: none; }
.short .card.tap.ask-inline { display: block; margin-top: 12px; }
.short .screen.with-ask .screen-body { padding-bottom: calc(120px + var(--safe-bottom)); }
.lowfx .nav, .lowfx .ask, .lowfx .chat-head { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
