/* Мио · LifeMio — интерфейс платформы. Дизайн-система: DESIGN.md (светлая основная тема, бирюзовая ниша Мио, Geologica + Onest). */

:root {
  color-scheme: light;
  --bg: #F3F1EB; --bg-2: #ECEAE2; --surface: #FFFFFF; --surface-2: #FAF9F5; --raise: #FFFFFF;
  --line: #E3E4DD; --line-2: #D3D8D1;
  --ink: #12302F; --text: #2B4443; --muted: #5A6D6B; --faint: #889895;
  --accent: #006A6D; --accent-hover: #00585B; --accent-2: #00BFAE; --accent-soft: #E3F2EE; --accent-ink: #FFFFFF;
  --deep: #05393D; --deep-2: #08474B; --deep-3: #0B5559; --on-deep: #EAF6F3; --on-deep-2: #A9CDC8; --aqua: #5FE0CF; --line-deep: rgb(255 255 255 / .1);
  --peach: #FF8F7E; --peach-soft: #FFECE4; --sun: #F4B246; --sun-soft: #FEF2DA; --sun-ink: #8C5A0A;
  --ok: #15705F; --ok-soft: #E1F2EC; --danger: #A63C29; --danger-soft: #FCE9E3;
  --k1: #00807C; --k2: #C98A0C; --k3: #D9694F; --k4: #4F63C0; --k5: #93549F; --k6: #4C8C5F;
  --shadow: 0 1px 2px rgb(18 48 47 / .05), 0 10px 28px -16px rgb(18 48 47 / .18);
  --shadow-up: 0 2px 6px rgb(18 48 47 / .06), 0 28px 60px -20px rgb(6 42 45 / .35);
  --display: "Geologica", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --out: cubic-bezier(.16, 1, .3, 1);
  --r-card: 18px; --r-niche: 22px; --r-field: 12px; --r-chip: 10px;
  --side-w: 256px; --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101B1A; --bg-2: #1B2A29; --surface: #172524; --surface-2: #132120; --raise: #1D2D2C;
  --line: #263634; --line-2: #334744;
  --ink: #F1F5F3; --text: #D4DDDA; --muted: #9AACA9; --faint: #708482;
  --accent: #7FDCD0; --accent-hover: #A2E8DE; --accent-2: #00BFAE; --accent-soft: #1D3532; --accent-ink: #062A2D;
  --deep: #062A2D; --deep-2: #0A3A3D; --deep-3: #0E4A4D;
  --peach-soft: #3A2620; --sun-soft: #352B17; --sun-ink: #F4C77A; --ok: #6FD3B6; --ok-soft: #173A31; --danger: #FF9C86; --danger-soft: #3B221D;
  --shadow: 0 1px 2px rgb(0 0 0 / .25), 0 12px 30px -18px rgb(0 0 0 / .6);
  --shadow-up: 0 2px 6px rgb(0 0 0 / .3), 0 30px 60px -20px rgb(0 0 0 / .7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101B1A; --bg-2: #1B2A29; --surface: #172524; --surface-2: #132120; --raise: #1D2D2C;
    --line: #263634; --line-2: #334744;
    --ink: #F1F5F3; --text: #D4DDDA; --muted: #9AACA9; --faint: #708482;
    --accent: #7FDCD0; --accent-hover: #A2E8DE; --accent-2: #00BFAE; --accent-soft: #1D3532; --accent-ink: #062A2D;
    --deep: #062A2D; --deep-2: #0A3A3D; --deep-3: #0E4A4D;
    --peach-soft: #3A2620; --sun-soft: #352B17; --sun-ink: #F4C77A; --ok: #6FD3B6; --ok-soft: #173A31; --danger: #FF9C86; --danger-soft: #3B221D;
    --shadow: 0 1px 2px rgb(0 0 0 / .25), 0 12px 30px -18px rgb(0 0 0 / .6);
    --shadow-up: 0 2px 6px rgb(0 0 0 / .3), 0 30px 60px -20px rgb(0 0 0 / .7);
  }
}

/* ───────── основа ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-2) transparent; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
body.noscroll { overflow: hidden; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; color: var(--ink); letter-spacing: -.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
img, svg { display: block; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent-2) 35%, transparent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.num, .stat-v, .code, time { font-variant-numeric: tabular-nums; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--surface); color: var(--accent); padding: 10px 14px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }
.noscript { padding: 24px; text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.45; }
.strong { font-weight: 600; color: var(--ink); }
.mt { margin-top: 12px; }
.mt-s { margin-top: 6px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* загрузка */
.booting { min-height: 100vh; display: grid; place-items: center; }
.boot img { width: 64px; height: auto; animation: breathe 2.4s var(--out) infinite alternate; }
@keyframes breathe { from { opacity: .45; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

/* ───────── оболочка ───────── */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface-2); border-right: 1px solid var(--line); padding: 16px 12px 12px; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 12px; color: var(--ink); }
.brand img { width: 30px; height: auto; }
.brand-t { font: 600 19px/1 var(--display); letter-spacing: -.02em; }
.brand-s { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.find { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: var(--r-field); background: var(--surface); color: var(--muted); font-size: 14px; transition: border-color .2s; }
.find:hover { border-color: var(--line-2); color: var(--text); }
.find > span { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.find kbd, kbd { margin-left: auto; font: 600 11px/1 var(--sans); color: var(--faint); border: 1px solid var(--line); border-radius: 6px; padding: 3px 5px; background: var(--surface-2); }
.nav { flex: 1; overflow-y: auto; margin: 10px -4px 6px; padding: 0 4px; scrollbar-width: thin; }
.nav-group + .nav-group { margin-top: 10px; }
.nav-gt { padding: 0 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--faint); letter-spacing: .02em; }
.nav-a { position: relative; display: flex; align-items: center; gap: 11px; height: 34px; padding: 0 10px; border-radius: 10px; color: var(--text); font-size: 14.5px; font-weight: 500; transition: background-color .15s, color .15s; }
.nav-a .i { color: var(--muted); transition: color .15s; }
.nav-a:hover { background: var(--bg-2); color: var(--ink); }
.nav-a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-a.on .i { color: var(--accent); }
.nav-a.sub { height: 30px; padding-left: 39px; font-size: 13.5px; color: var(--muted); }
.nav-a.sub.on { color: var(--accent); }
.nav-mio { height: 40px; margin-bottom: 2px; font-weight: 600; color: var(--ink); }
.nav-mio .mini-orb { --s: 22px; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--peach); color: #3B140C; font: 700 11.5px/20px var(--sans); text-align: center; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 2px; }
.sync { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12.5px; color: var(--muted); }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 20%, transparent); }
.sync-dot.off { background: var(--sun); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 25%, transparent); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid transparent; transition: border-color .2s; }
.topbar.scrolled { border-bottom-color: var(--line); }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); min-width: 0; }
.crumb b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-acts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top-brand { display: none; align-items: center; gap: 8px; color: var(--ink); font: 600 17px/1 var(--display); }
.top-brand img { width: 26px; height: auto; }
.at-home .topbar { display: none; }
.view { flex: 1; min-width: 0; }

/* мини-сфера Мио — цвета логотипа, медленный перелив */
.mini-orb { --s: 20px; position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 32% 30%, #FBF6EF 0 10%, transparent 42%), conic-gradient(from 0deg, #00BFAE, #006A6D, #5FE0CF, #FF9C7F, #F4B246, #00BFAE);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25), 0 2px 6px -1px rgb(0 106 109 / .35); }
.mini-orb::after { content: ""; position: absolute; inset: -30%; background: conic-gradient(from 90deg, transparent, rgb(255 255 255 / .35), transparent 40%); animation: spin 7s linear infinite; mix-blend-mode: soft-light; }
@keyframes spin { to { transform: rotate(1turn); } }
.ask-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px 0 9px; border-radius: 999px; background: var(--deep); color: var(--on-deep); font-weight: 600; font-size: 14px; box-shadow: 0 8px 20px -10px rgb(5 57 61 / .55); transition: transform .2s var(--out), background-color .2s; }
.ask-btn:hover { background: var(--deep-2); }
.ask-btn:active { transform: scale(.97); }
.ask-btn .mini-orb { --s: 22px; }

/* ───────── страница раздела ───────── */
.page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px 28px 56px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; }
.page-narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; padding-top: 6px; }
.page-head > div:first-child { flex: 1 1 360px; min-width: 0; }
.page-head h1 { font-size: 30px; line-height: 1.12; letter-spacing: -.03em; }
.page-sub { margin-top: 6px; color: var(--muted); max-width: 64ch; font-size: 14.5px; }
.page-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.stack.tight { gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* карточка */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; min-height: 28px; margin-bottom: 12px; }
.card.flush .card-head { padding: 16px 20px 0; margin-bottom: 8px; }
.card-head h2 { font-size: 17px; line-height: 1.3; }
.card-head .sub { color: var(--muted); font-size: 13px; }
.card-head > :last-child:not(h2):not(:first-child) { margin-left: auto; }
.card-foot { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card.flush .card-foot { padding: 0 20px 16px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.hint + .hint { margin-top: 6px; }

/* бирюзовая ниша — главная цифра раздела */
.niche { position: relative; overflow: hidden; border-radius: var(--r-niche); padding: 22px 24px; color: var(--on-deep-2);
  background: radial-gradient(70% 120% at 100% 0%, rgb(0 191 174 / .22), transparent 60%), radial-gradient(50% 90% at 0% 100%, rgb(255 156 127 / .10), transparent 70%), linear-gradient(160deg, var(--deep-2), var(--deep) 70%);
  box-shadow: 0 18px 40px -24px rgb(5 57 61 / .6); }
.niche::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgb(95 224 207 / .14), transparent 65%); pointer-events: none; }
.niche h2, .niche h3, .niche b, .niche strong { color: #fff; }
.niche a:not(.btn) { color: var(--aqua); }
.niche-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px 28px; align-items: start; }
.stat { min-width: 0; }
.stat-l { display: block; font-size: 12.5px; font-weight: 500; color: var(--on-deep-2); margin-bottom: 6px; }
.stat-v { display: flex; align-items: baseline; gap: 6px; font: 600 34px/1 var(--display); letter-spacing: -.03em; color: #fff; white-space: nowrap; }
.stat-v small { font: 500 15px/1 var(--sans); letter-spacing: 0; color: var(--on-deep-2); }
.stat-s { display: block; margin-top: 8px; font-size: 13px; color: var(--on-deep-2); }
.stat.lead .stat-v { font-size: 44px; }
.stat-now { display: block; color: #fff; font: 600 16px/1.35 var(--display); letter-spacing: -.01em; }
.niche .bar { --track: rgb(255 255 255 / .12); --fill: var(--aqua); margin-top: 12px; }
.niche .btn { --b-bg: rgb(255 255 255 / .1); --b-fg: #fff; --b-line: rgb(255 255 255 / .18); }
.niche .btn.primary { --b-bg: #fff; --b-fg: var(--deep); --b-line: #fff; }
.niche .btn:hover { --b-bg: rgb(255 255 255 / .18); }
.niche .btn.primary:hover { --b-bg: #E6F6F2; }
.niche .code { background: rgb(255 255 255 / .1); color: var(--on-deep); }
.niche .split-bar { background: rgb(255 255 255 / .08); }
.niche .legend { color: var(--on-deep-2); }
.niche-foot { position: relative; z-index: 1; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-deep); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 13.5px; }

/* кнопки */
.btn { --b-bg: var(--surface); --b-fg: var(--ink); --b-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: var(--r-field);
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-line); font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s var(--out); }
.btn:hover { --b-line: var(--faint); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; }
.btn .i { width: 17px; height: 17px; }
.btn.primary { --b-bg: var(--accent); --b-fg: var(--accent-ink); --b-line: var(--accent); }
.btn.primary:hover { --b-bg: var(--accent-hover); --b-line: var(--accent-hover); }
.btn.ghost { --b-bg: transparent; --b-line: transparent; --b-fg: var(--text); }
.btn.ghost:hover { --b-bg: var(--bg-2); }
.btn.soft { --b-bg: var(--accent-soft); --b-line: transparent; --b-fg: var(--accent); }
.btn.soft:hover { --b-bg: color-mix(in srgb, var(--accent-soft) 70%, var(--accent-2)); }
.btn.danger { --b-bg: var(--danger); --b-fg: #fff; --b-line: var(--danger); }
.btn.danger-t, .danger-t { color: var(--danger) !important; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 10px; gap: 6px; }
.btn.sm .i { width: 15px; height: 15px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 14px; }
.btn.wide { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--muted); transition: background-color .15s, color .15s; flex: none; }
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.sm .i { width: 16px; height: 16px; }
.icon-btn[aria-pressed="true"] { color: var(--accent); }
.linkbtn { color: var(--accent); font-weight: 600; font-size: 13px; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:disabled { color: var(--faint); text-decoration: none; }
.linkish { color: var(--accent); font-weight: 600; font-size: 13.5px; text-align: left; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }
.linkish.quiet { color: var(--muted); font-weight: 500; }
.flip { display: inline-flex; transform: scaleX(-1); }

/* код записи — маленькая кликабельная метка */
.code { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; margin-right: 6px; border-radius: 6px; background: var(--bg-2); color: var(--muted); font: 600 11.5px/1 var(--mono); letter-spacing: .01em; vertical-align: 2px; transition: background-color .15s, color .15s; }
button.code:hover { background: var(--accent-soft); color: var(--accent); }
.code-t { font: 600 12px/1 var(--mono); color: var(--muted); }

/* метки состояния */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--bg-2); color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag .i { width: 13px; height: 13px; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--sun-soft); color: var(--sun-ink); }
.tag.err { background: var(--danger-soft); color: var(--danger); }
.tag.accent { background: var(--accent-soft); color: var(--accent); }
.tag.dim { color: var(--muted); }
.tag.peach { background: var(--peach-soft); color: #9A3E2B; }
:root[data-theme="dark"] .tag.peach { color: #FFB8A6; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }

/* сегменты-вкладки */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-b { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 9px; color: var(--muted); font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background-color .15s, color .15s; }
.seg-b:hover { color: var(--ink); }
.seg-b[aria-selected="true"], .seg-b[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(18 48 47 / .1), 0 2px 8px -4px rgb(18 48 47 / .15); }
.seg-n { font-size: 12px; color: var(--faint); font-weight: 600; }
.seg-b[aria-selected="true"] .seg-n { color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-width: 0; }
.toolbar > .seg { min-width: 0; }

/* чипы — быстрые варианты */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 500; transition: border-color .15s, background-color .15s; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip .i { width: 15px; height: 15px; }

/* полоска прогресса */
.bar { --track: var(--bg-2); --fill: var(--accent-2); position: relative; height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: inherit; background: var(--fill); transition: width .7s var(--out); }
.bar.warn { --fill: var(--sun); }
.bar.err { --fill: var(--peach); }
.bar.ok { --fill: var(--ok); }
.bar.thick { height: 10px; }
.split-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--bg-2); gap: 2px; }
.split-bar > i { display: block; height: 100%; width: var(--p); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* кольцо (SVG) */
.ring { position: relative; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .trk { stroke: var(--bg-2); }
.ring .val { stroke: var(--accent-2); transition: stroke-dashoffset .8s var(--out); }
.ring-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-c b { font: 600 22px/1 var(--display); color: var(--ink); letter-spacing: -.02em; }
.ring-c span { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.niche .ring .trk { stroke: rgb(255 255 255 / .12); }
.niche .ring .val { stroke: var(--aqua); }
.niche .ring-c b { color: #fff; }
.niche .ring-c span { color: var(--on-deep-2); }

/* строки списков */
.rows { display: grid; }
.rows > li, .r { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.rows > li:first-child { border-top: 0; }
.card.flush .rows > li { padding: 12px 20px; }
.card.flush .rows > li:first-child { border-top: 1px solid var(--line); }
.r-lead { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--bg-2); color: var(--muted); }
.r-lead .i { width: 17px; height: 17px; }
.r-lead.accent { background: var(--accent-soft); color: var(--accent); }
.r-lead.sun { background: var(--sun-soft); color: var(--sun-ink); }
.r-lead.peach { background: var(--peach-soft); color: #B04A33; }
.r-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.r-title { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.r-meta { color: var(--muted); font-size: 13px; line-height: 1.4; }
.r-acts { flex: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.r-amt { flex: none; font: 600 15px/1 var(--display); color: var(--ink); }
.r-amt.in { color: var(--ok); }
.done .r-title, li.done > .r-main .r-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.dim-r { opacity: .6; }
.sub-r { padding-left: 24px !important; }
@media (hover: hover) and (min-width: 900px) {
  .rows > li .r-acts.hover { opacity: 0; transition: opacity .15s; }
  .rows > li:hover .r-acts.hover, .rows > li:focus-within .r-acts.hover { opacity: 1; }
}

/* отметка-галочка */
.chk { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; border: 1.75px solid var(--line-2); color: #fff; background: var(--surface); transition: background-color .15s, border-color .15s, transform .15s var(--out); }
.chk:hover:not(:disabled) { border-color: var(--accent); }
.chk[aria-pressed="true"] { background: var(--accent-2); border-color: var(--accent-2); }
.chk .i { width: 15px; height: 15px; stroke-width: 2.4; }
.chk.circle { border-radius: 50%; }
.chk:active:not(:disabled) { transform: scale(.9); }

/* шаги */
.steps { display: grid; gap: 6px; margin-top: 6px; }
.steps li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text); }
.steps li.done span { color: var(--muted); text-decoration: line-through; }
.steps .chk { width: 20px; height: 20px; border-radius: 6px; }
.steps .chk .i { width: 12px; height: 12px; }

/* пусто, ошибка, скелет */
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 28px 16px; }
.empty-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.empty-ic .i { width: 24px; height: 24px; }
.empty-t { color: var(--ink); font-weight: 600; font-size: 15.5px; }
.empty-s { color: var(--muted); font-size: 13.5px; max-width: 44ch; }
.empty .btn { margin-top: 6px; }
.failed { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; border-radius: 14px; background: var(--danger-soft); color: var(--danger); font-size: 14px; }
.failed .i { width: 18px; height: 18px; }
.skel-wrap { display: grid; gap: 10px; }
.skel { height: 54px; border-radius: 14px; background: linear-gradient(90deg, var(--bg-2), color-mix(in srgb, var(--bg-2) 50%, var(--surface)), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--sun-soft); color: var(--sun-ink); font-size: 13.5px; line-height: 1.45; }
.note .i { margin-top: 1px; }
.note.info { background: var(--accent-soft); color: var(--accent); }
.note .btn { margin-left: auto; }

/* тексты движка */
.et { display: grid; gap: 6px; color: var(--text); font-size: 14.5px; line-height: 1.55; }
.et p { overflow-wrap: anywhere; }
.et-head { font-weight: 600; color: var(--ink); font-size: 15px; }
.et-ind { padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.et-ind1 { padding-left: 9px; }
.et-list { display: grid; gap: 5px; }
.et-list li { position: relative; padding-left: 16px; }
.et-list li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2); }
.et-list li.sub { padding-left: 30px; color: var(--muted); font-size: 13.5px; }
.et-list li.sub::before { left: 17px; background: var(--line-2); }
.et strong { color: var(--ink); }

/* меню «⋯» */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 230px; padding: 6px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); box-shadow: var(--shadow-up); display: grid; transform-origin: top right; animation: pop .18s var(--out); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.menu button, .menu-time { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 9px; text-align: left; font-size: 14px; color: var(--text); }
.menu button:hover, .menu button:focus-visible { background: var(--bg-2); color: var(--ink); outline: none; }
.menu-time { color: var(--muted); }
.menu-time input { margin-left: auto; border: 1px solid var(--line-2); border-radius: 8px; padding: 4px 6px; background: var(--surface); }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--line); }

/* переключатель */
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background-color .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .2); transition: transform .25s var(--out); }
.switch input:checked + span { background: var(--accent-2); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* поля */
.field, .kform input:not([type=checkbox]):not([type=range]):not([type=file]), .kform select, .kform textarea, .wiz-in, .otp-one {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r-field); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.field:focus, .kform input:focus, .kform select:focus, .kform textarea:focus, .wiz-in:focus, .otp-one:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 22%, transparent); }
.kform textarea { resize: vertical; line-height: 1.5; }
::placeholder { color: var(--faint); }
.kform { display: grid; gap: 14px; }
.kfield { display: grid; gap: 6px; }
.kfield > label, .kfield > span:first-child { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.kfield .opt { color: var(--faint); font-weight: 500; }
.kcheck { display: flex !important; align-items: center; gap: 10px; font-size: 14.5px; color: var(--text); cursor: pointer; }
.kcheck input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.khint { font-size: 12.5px; color: var(--muted); }
.khint.good { color: var(--ok); }
.khint.bad { color: var(--danger); }
.kform-err { color: var(--danger); font-size: 13.5px; min-height: 1px; }
.kform-err:empty { display: none; }
.kchips { display: flex; flex-wrap: wrap; gap: 6px; }
.kchip { min-width: 40px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13.5px; color: var(--muted); }
.kchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.secret { position: relative; }
.secret input { padding-right: 88px !important; }
.reveal { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12.5px; font-weight: 600; color: var(--accent); padding: 4px 6px; }
.mono { font-family: var(--mono) !important; letter-spacing: .02em; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; --v: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--peach), var(--sun) 45%, var(--accent-2)) 0 0 / var(--v) 100% no-repeat, var(--bg-2); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: var(--bg-2); }
input[type=range]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--accent-2); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #fff; border: 5px solid var(--sun); box-shadow: 0 2px 8px rgb(18 48 47 / .25); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 5px solid var(--sun); }
dl.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 9px 18px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; color: var(--ink); font-weight: 500; }

/* ───────── панели (формы, превью, карточка записи, «Спросить Мио») ───────── */
.sheet { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-end; background: rgb(6 30 32 / .32); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet-panel { position: relative; display: flex; flex-direction: column; width: min(480px, 100%); height: 100%; background: var(--surface); box-shadow: var(--shadow-up); animation: slide .3s var(--out); }
.sheet-panel.wide { width: min(640px, 100%); }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.sheet-title { font-size: 18px; flex: 1; }
.sheet-head .icon-btn { margin-left: auto; }
.sheet-code { font: 600 13px/1 var(--mono); color: var(--muted); }
.sheet-body { flex: 1; overflow-y: auto; padding: 20px 22px; overscroll-behavior: contain; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 22px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet-actions .btn.primary { min-width: 120px; }

/* превью «Да / Изменить / Отмена» */
.pv { display: grid; gap: 14px; }
.pv-lead { color: var(--ok); font-weight: 600; font-size: 14px; }
.pv-head { font: 600 17px/1.35 var(--display); color: var(--ink); }
.pv-items { display: grid; gap: 0; counter-reset: pv; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pv-items li { counter-increment: pv; display: flex; gap: 10px; align-items: baseline; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 14.5px; }
.pv-items li:first-child { border-top: 0; }
.pv-items li::before { content: counter(pv); flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-2); color: var(--muted); font: 600 11.5px/20px var(--sans); text-align: center; }
.pv-op { flex: none; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 7px; }
.pv-notes { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--sun-soft); color: var(--sun-ink); font-size: 13.5px; }
.pv-safe { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.pv-safe .i { width: 16px; height: 16px; margin-top: 1px; color: var(--ok); }

/* ───────── тосты ───────── */
.toasts { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(520px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 14px; background: var(--deep); color: var(--on-deep); box-shadow: var(--shadow-up); font-size: 14px; opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .35s var(--out); }
.toast.in { opacity: 1; transform: none; }
.toast-text { flex: 1; line-height: 1.4; }
.toast.error { background: #5C2117; color: #FFE4DC; }
.toast.info { background: var(--deep-2); }
.toast .btn { --b-bg: rgb(255 255 255 / .12); --b-fg: #fff; --b-line: transparent; }
.toast .icon-btn { color: var(--on-deep-2); }
.toast .icon-btn:hover { background: rgb(255 255 255 / .1); color: #fff; }

/* ───────── палитра команд ⌘K ───────── */
.palette { position: fixed; inset: 0; z-index: 110; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; background: rgb(6 30 32 / .28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .15s ease; }
.pal-box { width: min(620px, 100%); background: var(--raise); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-up); overflow: hidden; animation: pop .2s var(--out); }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.pal-in .i { color: var(--muted); width: 20px; height: 20px; }
.pal-in input { flex: 1; height: 56px; border: 0; background: transparent; outline: none; font-size: 16.5px; color: var(--ink); }
.pal-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 6px; }
.pal-gt { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--faint); }
.pal-i { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 10px; text-align: left; color: var(--text); font-size: 14.5px; }
.pal-i .i { color: var(--muted); }
.pal-i .pal-k { margin-left: auto; font-size: 12px; color: var(--faint); }
.pal-i.sel { background: var(--accent-soft); color: var(--ink); }
.pal-i.sel .i { color: var(--accent); }
.pal-i.ask .mini-orb { --s: 20px; }
.pal-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }

/* ───────── панель «Спросить Мио» ───────── */
.ask-panel { width: min(460px, 100%); }
.ask-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 18px; background: linear-gradient(160deg, var(--deep-2), var(--deep)); color: var(--on-deep); }
.ask-head .mini-orb { --s: 34px; }
.ask-head b { display: block; font: 600 17px/1.1 var(--display); color: #fff; }
.ask-head span { font-size: 12.5px; color: var(--on-deep-2); }
.ask-head .icon-btn { margin-left: auto; color: var(--on-deep-2); }
.ask-head .icon-btn:hover { background: rgb(255 255 255 / .1); color: #fff; }
.ask-body { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ask-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-foot { padding: 12px 14px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); display: grid; gap: 8px; }
.ask-foot .linkish { justify-self: start; font-size: 12.5px; }

/* переписка */
.convo { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--peach-soft); color: var(--ink); border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.err { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.msg-who { display: block; font-size: 11.5px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.msg-body p + p, .msg-body ul { margin-top: 6px; }
.msg-body ul { padding-left: 18px; list-style: disc; }
.msg-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.msg-tag .i { width: 12px; height: 12px; }
.msg-err { color: var(--danger); margin-top: 4px; }
.msg-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 20%, transparent); }
.composer textarea { flex: 1; min-height: 40px; max-height: 140px; padding: 9px 0; border: 0; background: transparent; resize: none; outline: none; font-size: 15px; line-height: 1.45; color: var(--ink); }
.round { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; transition: background-color .15s, transform .15s var(--out); }
.round.send { background: var(--accent); color: var(--accent-ink); }
.round.send:hover { background: var(--accent-hover); }
.round:active { transform: scale(.94); }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .4; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: 1; transform: translateY(-2px); } }
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; background: currentColor; vertical-align: -2px; animation: blink 1s infinite; }

/* ───────── главная «Мио» ───────── */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; min-height: 100vh; padding: 16px; }
.stage { position: relative; display: flex; flex-direction: column; align-items: center; min-height: calc(100vh - 32px); border-radius: 26px; padding: 18px 24px 22px; color: var(--on-deep-2); overflow: hidden; isolation: isolate;
  background: radial-gradient(55% 50% at 50% 42%, rgb(20 179 163 / .22), transparent 70%), radial-gradient(40% 45% at 0% 100%, rgb(255 156 127 / .10), transparent 70%), linear-gradient(180deg, #04343A 0%, #05393D 55%, #063F43 100%);
  box-shadow: 0 30px 60px -30px rgb(5 57 61 / .7); }
:root[data-theme="dark"] .stage { background: radial-gradient(55% 50% at 50% 42%, rgb(20 179 163 / .18), transparent 70%), linear-gradient(180deg, #03272A, #052E31 60%, #04292C); }
.stage-top { display: flex; align-items: center; gap: 10px; width: 100%; }
.stage-brand { display: flex; align-items: center; gap: 10px; color: #fff; font: 600 18px/1 var(--display); }
.stage-brand img { width: 28px; height: auto; }
.stage-top .row { margin-left: auto; }
.stage .icon-btn { color: var(--on-deep-2); }
.stage .icon-btn:hover { background: rgb(255 255 255 / .08); color: #fff; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 999px; background: rgb(255 255 255 / .07); border: 1px solid rgb(255 255 255 / .12); color: var(--on-deep); font-size: 13px; font-weight: 600; }
.pill:hover { background: rgb(255 255 255 / .12); }
.pill .i { width: 15px; height: 15px; }
.live { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px; border-radius: 999px; background: rgb(255 255 255 / .07); color: var(--on-deep); font-size: 13px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 10px var(--aqua); }
.home[data-state="speaking"] .live-dot, [data-state="speaking"] .live-dot { background: var(--peach); box-shadow: 0 0 10px var(--peach); }
[data-state="error"] .live-dot { background: #FF7F70; box-shadow: none; }
[data-state="listening"] .live-dot, [data-state="hands"] .live-dot { animation: blink 1.2s infinite; }
.orb-wrap { position: relative; width: min(54vh, 100%, 540px); aspect-ratio: 1; margin: 4px auto 0; flex: none; border-radius: 50%; }
.orb-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.orb-wrap:focus-visible { outline-color: var(--aqua); outline-offset: -20px; border-radius: 50%; }
.greet { text-align: center; margin-top: -6px; }
.greet h1 { color: #fff; font-size: 26px; letter-spacing: -.025em; }
.orb-hint { margin-top: 6px; text-align: center; font-size: 13.5px; color: var(--on-deep-2); min-height: 20px; }
.subtitle { width: min(640px, 100%); margin-top: 14px; display: grid; gap: 6px; text-align: center; }
.subtitle.is-empty { display: none; }
.sub-you { font-size: 13px; color: var(--on-deep-2); }
.sub-you::before { content: "Вы: "; opacity: .7; }
.sub-mio { max-height: 132px; overflow-y: auto; color: #fff; font-size: 16px; line-height: 1.5; scrollbar-width: thin; }
.sub-mio p + p { margin-top: 6px; }
.sub-mio ul { display: inline-block; text-align: left; padding-left: 18px; list-style: disc; }
.subtitle .msg-acts { justify-content: center; }
.subtitle .btn { --b-bg: rgb(255 255 255 / .1); --b-fg: #fff; --b-line: rgb(255 255 255 / .16); }
.subtitle .btn.primary { --b-bg: var(--aqua); --b-fg: var(--deep); --b-line: var(--aqua); }
.subtitle .code { background: rgb(255 255 255 / .12); color: var(--on-deep); }
.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: min(680px, 100%); margin-top: auto; padding-top: 16px; }
.quick .chip { background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .14); color: var(--on-deep); }
.quick .chip:hover { background: rgb(255 255 255 / .12); border-color: var(--aqua); color: #fff; }
.controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; width: min(680px, 100%); margin-top: 16px; }
.sens-wrap { display: grid; gap: 6px; justify-items: start; }
.sens { display: inline-flex; padding: 3px; border-radius: 11px; background: rgb(255 255 255 / .07); }
.sens-b { height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--on-deep-2); }
.sens-b[aria-checked="true"] { background: rgb(255 255 255 / .14); color: #fff; }
.miclevel { position: relative; width: 132px; height: 4px; border-radius: 999px; background: rgb(255 255 255 / .1); overflow: hidden; opacity: 0; transition: opacity .2s; }
.miclevel.on { opacity: 1; }
.miclevel i { position: absolute; inset: 0 auto 0 0; width: var(--l, 0%); background: var(--aqua); transition: width .08s linear; }
.miclevel b { position: absolute; top: 0; bottom: 0; left: var(--t, 0%); width: 2px; background: #fff; opacity: .6; }
.bigmic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--aqua); color: var(--deep); box-shadow: 0 0 0 8px rgb(95 224 207 / .12), 0 14px 30px -10px rgb(0 0 0 / .5); transition: transform .2s var(--out), background-color .2s, box-shadow .2s; touch-action: none; -webkit-user-select: none; user-select: none; }
.bigmic .i { width: 28px; height: 28px; stroke-width: 2; }
.bigmic:hover { transform: scale(1.04); }
.bigmic.on { background: #fff; box-shadow: 0 0 0 10px rgb(95 224 207 / .2), 0 0 40px rgb(95 224 207 / .45); }
.bigmic.rec { background: var(--peach); color: #3B140C; box-shadow: 0 0 0 12px rgb(255 143 126 / .22); }
.bigmic.off { background: rgb(255 255 255 / .12); color: var(--on-deep-2); box-shadow: none; }
.endbtn { justify-self: start; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgb(255 255 255 / .1); color: #fff; }
.endbtn:hover { background: rgb(255 120 100 / .35); }
.stage .composer { width: min(680px, 100%); margin-top: 14px; background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .14); }
.stage .composer textarea { color: #fff; }
.stage .composer textarea::placeholder { color: rgb(169 205 200 / .75); }
.stage .composer:focus-within { border-color: var(--aqua); box-shadow: 0 0 0 3px rgb(95 224 207 / .18); }
.stage .round.send { background: var(--aqua); color: var(--deep); }
.sound-gate { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 2; background: var(--aqua); color: var(--deep); border: 0; }

/* правая колонка главной — карточки дня */
.rail { display: grid; gap: 12px; align-content: start; }
.rail-head { display: flex; align-items: center; gap: 8px; padding: 6px 4px 2px; }
.rail-head h2 { font-size: 15px; color: var(--muted); font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.rail-head .find { margin-left: auto; width: auto; height: 34px; }
.lc { display: grid; gap: 10px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: inherit; }
a.lc:hover { border-color: var(--line-2); }
.lc-top { display: flex; align-items: center; gap: 8px; }
.lc-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.lc-top > :last-child:not(:first-child) { margin-left: auto; }
.lc-note { font-size: 13px; color: var(--muted); }
.lc-big { display: flex; align-items: baseline; gap: 6px; font: 600 30px/1 var(--display); color: var(--ink); letter-spacing: -.03em; }
.lc-big .unit { font: 500 14px/1 var(--sans); color: var(--muted); letter-spacing: 0; }
.lc-text { color: var(--ink); font-size: 14.5px; }
.lc-text.strong { font: 600 16px/1.35 var(--display); }
.lc-row { display: flex; align-items: center; gap: 14px; }
.lc-pending { grid-template-columns: auto 1fr auto; align-items: center; background: var(--peach-soft); border-color: transparent; }
.lc-pend-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--peach); color: #3B140C; font: 700 18px/1 var(--display); }
.lc-pending .lc-text { font-weight: 600; }
.lc-pending .i { color: var(--muted); }
.lc-hello { background: var(--accent-soft); border-color: transparent; }
.card-edit { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }
.card-edit output { font: 600 16px/1 var(--display); color: var(--ink); min-width: 32px; text-align: right; }
.near { display: grid; gap: 2px; }
.near li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.near .i { width: 16px; height: 16px; color: var(--accent); }
.n-t { color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-w { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ───────── вход ───────── */
.login-mode { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, .9fr); background: var(--bg); }
.login-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; color: var(--on-deep-2);
  background: radial-gradient(55% 60% at 70% 45%, rgb(20 179 163 / .30), transparent 70%), radial-gradient(40% 45% at 0% 100%, rgb(255 156 127 / .16), transparent 70%), linear-gradient(180deg, #04343A, #05393D 60%, #063F43); }
.login-art .brand-row { display: flex; align-items: center; gap: 12px; color: #fff; font: 600 20px/1 var(--display); }
.login-art .brand-row img { width: 34px; height: auto; }
.login-art h1 { color: #fff; font-size: clamp(32px, 3.4vw, 50px); line-height: 1.06; letter-spacing: -.04em; max-width: 13ch; }
.login-art h1 em { font-style: normal; color: #8BEADD; }
.login-art .lead { margin-top: 18px; max-width: 40ch; font-size: 16.5px; line-height: 1.55; }
.login-points { display: grid; gap: 10px; margin-top: 28px; }
.login-points li { display: flex; gap: 10px; align-items: center; font-size: 14.5px; color: var(--on-deep); }
.login-points .i { color: var(--aqua); }
.login-glow { position: absolute; right: -12%; top: 22%; width: 56%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, rgb(251 246 239 / .55), transparent 30%), radial-gradient(circle at 60% 65%, rgb(255 156 127 / .35), transparent 50%), radial-gradient(circle, rgb(0 191 174 / .55), rgb(0 106 109 / .2) 55%, transparent 70%);
  filter: blur(2px); animation: breathe 6s ease-in-out infinite alternate; }
.login-art small { color: var(--on-deep-2); font-size: 12.5px; }
.login { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: min(400px, 100%); display: grid; gap: 18px; }
.login-mark { width: 56px; height: auto; }
.login-title { font-size: 28px; letter-spacing: -.03em; }
.login-sub, .login-lead { color: var(--muted); font-size: 15px; }
.login-step { display: grid; gap: 14px; }
.btn.tg { height: 50px; font-size: 15.5px; border-radius: 14px; }
.otp-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp { width: 100%; height: 56px; text-align: center; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font: 600 24px/1 var(--display); color: var(--ink); }
.otp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 22%, transparent); }
.login-msg { min-height: 20px; font-size: 14px; color: var(--muted); }
.login-msg.err { color: var(--danger); }
.login-foot { font-size: 12.5px; color: var(--faint); }
.login-safe { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.login-safe .i { color: var(--ok); margin-top: 1px; }

/* ───────── «Сегодня» ───────── */
.today-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.energy-pick { display: grid; gap: 12px; }
.energy-row { display: flex; align-items: center; gap: 16px; }
.energy-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.energy-out { font: 600 30px/1 var(--display); color: var(--ink); letter-spacing: -.03em; min-width: 64px; }
.now-title { font: 600 19px/1.35 var(--display); color: var(--ink); letter-spacing: -.015em; }
.now-step { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--ink); font-size: 14px; }
.now-step .lc-label { color: var(--accent); }
.why { font-size: 13px; color: var(--muted); }
.minutes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line); }
.timeline { display: grid; }
.tl { display: grid; grid-template-columns: 52px 18px minmax(0, 1fr) auto; gap: 0 12px; align-items: start; padding: 10px 0; position: relative; }
.tl + .tl { border-top: 1px dashed var(--line); }
.tl-time { font: 600 14px/22px var(--display); color: var(--ink); text-align: right; }
.tl-dot { position: relative; width: 12px; height: 12px; margin: 5px auto 0; border-radius: 50%; border: 2.5px solid var(--accent-2); background: var(--surface); }
.tl.habit .tl-dot { border-color: var(--sun); }
.tl.rest .tl-dot, .tl.recovery .tl-dot { border-color: var(--peach); }
.tl.event .tl-dot, .tl.meeting .tl-dot { border-color: var(--k4); }
.tl.done .tl-dot { background: var(--accent-2); }
.tl.done .tl-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.tl.now { background: linear-gradient(90deg, var(--accent-soft), transparent 80%); border-radius: 12px; }
.tl-body { min-width: 0; display: grid; gap: 2px; }
.tl-title { color: var(--ink); font-weight: 500; }
.tl-meta { color: var(--muted); font-size: 13px; }
.tl-acts { display: flex; gap: 6px; align-items: center; }

/* ───────── «План и календарь» ───────── */
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.cal-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.cal-label { min-width: 190px; text-align: center; font: 600 16px/1 var(--display); color: var(--ink); }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wk-day { display: grid; grid-template-rows: auto 1fr; min-width: 0; min-height: 260px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.wk-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wk-day.past { background: var(--surface-2); }
.wk-day.past .ag-list { opacity: .65; }
.wk-head { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: baseline; gap: 0 8px; padding: 10px 12px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.wk-head:hover { background: var(--bg-2); }
.wk-wd { grid-column: 1; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wk-num { grid-column: 1; font: 600 22px/1.1 var(--display); color: var(--ink); }
.wk-day.today .wk-num { color: var(--accent); }
.wk-busy { grid-column: 2; grid-row: 1 / 3; justify-self: end; align-self: center; font-size: 11.5px; color: var(--muted); }
.wk-busy.warn { color: var(--sun-ink); font-weight: 600; }
.wk-load { height: 3px; background: var(--bg-2); }
.wk-load i { display: block; height: 100%; width: var(--p); background: var(--accent-2); }
.wk-load.warn i { background: var(--sun); }
.wk-dots { display: none; }
.ag-list { display: grid; gap: 4px; padding: 8px; align-content: start; }
.ag-i { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 7px 9px; border-radius: 10px; font-size: 13.5px; background: var(--surface-2); border-left: 0; }
.ag-i::before { content: ""; width: 3px; align-self: stretch; border-radius: 3px; background: var(--accent-2); grid-row: 1; grid-column: 1; }
.ag-i { grid-template-columns: 3px 44px minmax(0, 1fr) auto; }
.ag-t { grid-column: 2; font: 600 12.5px/1.45 var(--display); color: var(--ink); }
.ag-t .i { width: 14px; height: 14px; color: var(--muted); margin-top: 2px; }
.ag-x { grid-column: 3; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.ag-m { display: block; color: var(--muted); font-size: 12px; }
.ag-i.ev::before { background: var(--k4); }
.ag-i.ev.free::before { background: var(--line-2); }
.ag-i.dl::before { background: var(--peach); }
.ag-i.pay::before { background: var(--sun); }
.ag-i.date::before { background: var(--k5); }
.ag-i.hab::before { background: var(--k6); }
.ag-i.rest::before { background: var(--peach); opacity: .6; }
.ag-i.done .ag-x { color: var(--muted); text-decoration: line-through; }
.ag-empty { padding: 10px; font-size: 13px; color: var(--faint); }
.cal-week .ag-i { grid-template-columns: 3px minmax(0, 1fr); padding: 6px 8px; font-size: 12.5px; }
.cal-week .ag-t { grid-column: 2; font-size: 11.5px; color: var(--muted); }
.cal-week .ag-t:empty { display: none; }
.cal-week .ag-x { grid-column: 2; }
.cal-week .ag-i::before { grid-row: 1 / 3; }
.cal-week .ag-i .menu-wrap { display: none; }
.cal-week .ag-i .code { display: none; }
.cal-day { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.cal-day .ag-list { padding: 0; gap: 6px; }
.cal-day .ag-i { padding: 10px 12px; font-size: 14px; }
.free-l { display: grid; gap: 6px; }
.free-l li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mo-wd { padding: 4px 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.mo-day { display: grid; grid-template-rows: auto 1fr auto; min-height: 96px; padding: 8px 9px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: border-color .15s; }
.mo-day:hover { border-color: var(--accent); }
.mo-day.out { background: transparent; border-color: transparent; }
.mo-day.out .mo-num { color: var(--faint); }
.mo-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.mo-num { font: 600 15px/1 var(--display); color: var(--ink); }
.mo-day.today .mo-num { color: var(--accent); }
.mo-dots { display: flex; gap: 3px; flex-wrap: wrap; align-self: end; }
.mo-n { font-size: 11.5px; color: var(--muted); }
.mo-day .dot { width: 6px; height: 6px; }
.dot.ev { background: var(--k4); } .dot.task { background: var(--accent-2); } .dot.dl { background: var(--peach); } .dot.pay { background: var(--sun); } .dot.date { background: var(--k5); }

/* ───────── «Жизнь» ───────── */
.spheres { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sph { --k: var(--k1); position: relative; display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.sph-top { display: flex; align-items: center; gap: 10px; }
.sph-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--k) 14%, var(--surface)); color: var(--k); }
.sph-name { font: 600 15.5px/1.25 var(--display); color: var(--ink); }
.sph-top .menu-wrap { margin-left: auto; }
.sph select { height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 10px; font-size: 13.5px; color: var(--ink); }
.sph.hidden-s { opacity: .55; }
.mode-main { --k: var(--deep); }

/* ───────── деньги, цели ───────── */
.goal { display: grid; gap: 10px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.goal-top { display: flex; align-items: flex-start; gap: 10px; }
.goal-t { font: 600 16px/1.3 var(--display); color: var(--ink); flex: 1; min-width: 0; }
.goal-v { display: flex; align-items: baseline; gap: 6px; font: 600 26px/1 var(--display); color: var(--ink); letter-spacing: -.02em; }
.goal-v small { font: 500 13.5px/1 var(--sans); color: var(--muted); letter-spacing: 0; }
.goal-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

/* документы */
.doc-facts { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.doc-facts > li { padding: 10px 14px; }
.fact-r.st-accepted .r-title strong { color: var(--ok); }
.fact-r.st-rejected { opacity: .55; }

/* списки */
.lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.checklist { display: grid; gap: 2px; margin: 4px 0 10px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14.5px; }
.checklist li.done .ci-t { color: var(--muted); text-decoration: line-through; }
.ci-t { flex: 1; min-width: 0; color: var(--ink); }
.add-item { display: flex; gap: 8px; }
.add-item .field { min-height: 38px; }
.note-body { color: var(--text); font-size: 14px; margin-top: 4px; white-space: pre-line; }
.r-meta-i { color: var(--muted); font-size: 12.5px; }

/* память */
.fact { display: grid; gap: 8px; }
.fact-top { display: flex; gap: 12px; align-items: flex-start; }
.fact-text { flex: 1; font: 500 16px/1.45 var(--sans); color: var(--ink); }
.fact-meta { font-size: 13px; color: var(--muted); }
.fact-why { font-size: 13.5px; color: var(--sun-ink); background: var(--sun-soft); padding: 8px 12px; border-radius: 10px; }
.confirm { display: grid; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 14px; }

/* история */
.hist { display: grid; }
.hist-i { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.hist-i:first-child { border-top: 0; }
.hist-dot { width: 10px; height: 10px; margin: 6px auto 0; border-radius: 50%; background: var(--accent-2); }
.st-undone .hist-dot, .st-declined .hist-dot { background: var(--line-2); }
.st-expired .hist-dot { background: var(--sun); }
.hist-main { display: grid; gap: 4px; min-width: 0; }
.hist-t { color: var(--ink); font-weight: 500; }
.hist-meta { color: var(--muted); font-size: 13px; }
.hist-acts { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.hist-more { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-top: 6px; }
.hist-day { padding: 18px 0 6px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.chan { display: inline-flex; align-items: center; gap: 5px; }

/* подключения и система */
.link-list { display: grid; gap: 12px; }
.link-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.link-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: var(--accent-soft); color: var(--accent); }
.link-ic .i { width: 24px; height: 24px; }
.is-missing .link-ic { background: var(--bg-2); color: var(--muted); }
.is-error .link-ic { background: var(--danger-soft); color: var(--danger); }
.link-main { display: grid; gap: 8px; min-width: 0; }
.link-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.link-head h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.link-head h3 { font-size: 15.5px; }
.link-ic-s { display: none; }
.link-about { color: var(--muted); font-size: 14px; }
.link-detail { display: grid; gap: 6px; font-size: 14px; color: var(--ink); }
.link-reason { color: var(--danger); font-size: 13.5px; }
.link-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.conn-res { font-size: 13.5px; color: var(--muted); }
.conn-res:empty { display: none; }
.conn-res.ok { color: var(--ok); }
.conn-res.bad { color: var(--danger); }
.st-badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.st-badge .i { width: 13px; height: 13px; stroke-width: 2.4; }
.st-badge.ok { background: var(--ok-soft); color: var(--ok); }
.st-badge.dim { background: var(--bg-2); color: var(--muted); }
.st-badge.err { background: var(--danger-soft); color: var(--danger); }
.warn-t { color: var(--sun-ink); }
.more-box { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.more-box summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; font-weight: 600; color: var(--ink); }
.more-box summary::-webkit-details-marker { display: none; }
.more-box summary .i { margin-left: auto; color: var(--muted); transition: transform .2s var(--out); }
.more-box[open] summary .i { transform: rotate(90deg); }
.more-rows { padding: 0 20px 8px; }
.more-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.more-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.more-acts { display: flex; gap: 8px; align-items: center; }
.sys-link { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.sys-link > span:not(.r-lead) { flex: 1; display: grid; gap: 2px; }
.sys-link:hover { border-color: var(--line-2); }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.foot-note { font-size: 13px; color: var(--muted); }
.wiz { display: grid; gap: 16px; }
.wiz-intro { color: var(--text); }
.wsteps { display: grid; gap: 14px; }
.wstep { display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.wnum { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 700 14px/1 var(--display); }
.wstep-b { display: grid; gap: 8px; }
.wstep-b h3 { font-size: 15.5px; padding-top: 4px; }
.wiz-status { font-size: 14px; color: var(--muted); }
.wiz-status:empty { display: none; }
.wiz-status.bad { color: var(--danger); }
.wiz-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding-top: 16px; }
.wiz-ok { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.wiz-ok .i { width: 30px; height: 30px; stroke-width: 2.4; }
.otp-one { font: 600 24px/1 var(--display) !important; letter-spacing: .3em; text-align: center; }
.voice-list .cur { background: var(--accent-soft); margin: 0 -10px; padding-left: 10px !important; padding-right: 10px !important; border-radius: 12px; }
.usage { display: grid; gap: 8px; }
.usage-warn { color: var(--sun-ink); font-size: 13.5px; }
.theme-pick .seg { width: 100%; }
.theme-pick .seg-b { flex: 1; justify-content: center; }

/* ───────── мобильная навигация ───────── */
.tabbar { display: none; }
.drawer { position: fixed; inset: 0; z-index: 95; background: rgb(6 30 32 / .35); display: flex; align-items: flex-end; animation: fade .2s ease; }
.drawer-panel { width: 100%; max-height: 88vh; display: flex; flex-direction: column; background: var(--surface-2); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-up); animation: up .3s var(--out); padding: 8px 14px calc(14px + var(--safe-b)); }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
.drawer-grip { width: 40px; height: 5px; border-radius: 999px; background: var(--line-2); margin: 4px auto 10px; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 0 4px 10px; }
.drawer-head .find { flex: 1; }
.drawer .nav { margin: 4px 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; align-content: start; }
.drawer .nav-group { display: contents; }
.drawer .nav-gt { grid-column: 1 / -1; padding-top: 10px; }
.drawer .nav-a { height: 44px; background: var(--surface); border: 1px solid var(--line); }
.drawer .nav-a.on { border-color: transparent; }
.drawer .nav-a.sub { padding-left: 10px; }

/* ───────── адаптивность ───────── */
@media (max-width: 1240px) {
  .home { grid-template-columns: minmax(0, 1fr) 330px; }
  .cal-week { gap: 6px; }
}
@media (max-width: 1100px) {
  .today-grid, .split, .cal-day { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top-brand { display: flex; }
  .crumb { display: none; }
  .topbar { padding: 0 16px; height: 56px; }
  .top-acts .find { width: 38px; padding: 0; justify-content: center; }
  .top-acts .find span, .top-acts .find kbd { display: none; }
  .main { padding-bottom: calc(var(--tab-h) + var(--safe-b)); }
  .tabbar { position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; height: calc(var(--tab-h) + var(--safe-b)); padding: 0 6px var(--safe-b); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border-top: 1px solid var(--line); }
  .tab { position: relative; display: grid; justify-items: center; gap: 4px; padding: 9px 2px 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
  .tab .i { width: 22px; height: 22px; }
  .tab.on { color: var(--accent); }
  .tab .badge { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; min-width: 17px; height: 17px; font-size: 10.5px; line-height: 17px; padding: 0 4px; }
  .tab-mio { align-self: start; margin-top: -18px; }
  .tab-mio .mini-orb { --s: 54px; box-shadow: 0 0 0 4px var(--surface), 0 10px 24px -6px rgb(0 106 109 / .5); }
  .tab-mio.on .mini-orb { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent-2); }
  .home { grid-template-columns: minmax(0, 1fr); padding: 0; gap: 14px; min-height: 0; }
  .stage { min-height: calc(100svh - var(--tab-h) - var(--safe-b)); border-radius: 0 0 28px 28px; padding: 14px 16px 18px; }
  .rail { padding: 0 16px 24px; }
  .login-mode { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 28px 24px 32px; min-height: 0; }
  .login-art h1 { font-size: 32px; }
  .login-points, .login-art small { display: none; }
  .login-glow { width: 70%; right: -25%; top: 10%; opacity: .6; }
}
@media (max-width: 720px) {
  .page { padding: 4px 16px 32px; gap: 16px; }
  .page-head h1 { font-size: 25px; }
  .page-head { align-items: flex-start; }
  .page-acts { width: 100%; }
  .card { padding: 16px; border-radius: 16px; }
  .card.flush .card-head { padding: 14px 16px 0; }
  .card.flush .rows > li { padding: 12px 16px; }
  .niche { padding: 18px; border-radius: 20px; }
  .niche-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .stat-v { font-size: 26px; }
  .stat.lead { grid-column: 1 / -1; }
  .stat.lead .stat-v { font-size: 38px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .rows > li { flex-wrap: wrap; }
  .rows > li .r-acts { width: 100%; justify-content: flex-start; padding-left: 0; }
  .rows > li.task-r .r-acts, .rows > li.has-lead .r-acts { padding-left: 46px; }
  .rows > li .r-acts.end { width: auto; }
  .tl { grid-template-columns: 44px 14px minmax(0, 1fr); }
  .tl-acts { grid-column: 3; padding-top: 8px; }
  .cal-label { min-width: 0; flex: 1; font-size: 15px; }
  .cal-nav { width: 100%; margin-left: 0; }
  .cal-week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .wk-day { min-height: 0; border-radius: 12px; }
  .wk-head { grid-template-columns: 1fr; justify-items: center; padding: 8px 2px 6px; text-align: center; }
  .wk-wd { font-size: 10.5px; }
  .wk-num { font-size: 17px; }
  .wk-busy { display: none; }
  .wk-day .ag-list { display: none; }
  .wk-dots { display: flex; justify-content: center; gap: 3px; padding: 6px 2px 8px; min-height: 20px; }
  .wk-dots .dot { width: 5px; height: 5px; }
  .wk-n { display: none; }
  .wk-day.sel { background: var(--accent-soft); border-color: var(--accent); }
  .cal-month { gap: 3px; }
  .mo-day { min-height: 54px; padding: 6px; border-radius: 10px; }
  .mo-wd { padding: 2px 4px; font-size: 10.5px; text-align: center; }
  .mo-n { display: none; }
  .sheet { align-items: flex-end; }
  .sheet-panel, .sheet-panel.wide { width: 100%; height: auto; max-height: calc(var(--vvh, 100svh) - 24px); border-radius: 22px 22px 0 0; animation: up .3s var(--out); margin-bottom: var(--kb, 0px); }
  .sheet-head { padding: 14px 12px 12px 18px; }
  .sheet-body { padding: 16px 18px; }
  .sheet-actions { padding: 12px 18px calc(12px + var(--safe-b)); }
  .sheet-actions .btn { flex: 1; }
  .ask-panel { height: 86svh; }
  .toasts { bottom: calc(var(--tab-h) + var(--safe-b) + 12px); }
  .controls { grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .sens-b { padding: 0 7px; font-size: 12px; }
  .miclevel { width: 90px; }
  .orb-wrap { width: min(82vw, 46svh); }
  .greet h1 { font-size: 22px; }
  .quick { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; width: calc(100% + 32px); }
  .quick::-webkit-scrollbar { display: none; }
  .quick .chip { flex: none; }
  .bigmic { width: 64px; height: 64px; }
  .link-card { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .link-ic { display: none; }
  .link-ic-s { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
  .sys-grid { grid-template-columns: minmax(0, 1fr); }
  .palette { padding: 12px; align-items: start; }
  .pal-foot { display: none; }
  .login { padding: 28px 20px 40px; align-items: start; }
  .otp { height: 52px; font-size: 22px; }
  .hist-i { grid-template-columns: 16px minmax(0, 1fr); }
  .hist-acts { grid-column: 2; justify-content: flex-start; }
  dl.kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dl.kv dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.hist-main .linkbtn { justify-self: start; }
.ask-hello { display: grid; gap: 8px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: 14px; }
.ask-hello b { color: var(--ink); font-family: var(--display); font-size: 15.5px; }
.convo-host:has(.msg) + .ask-hello, .convo-host:has(.msg) ~ .ask-hello { display: none; }
.seg-wrap { flex-wrap: wrap; }
.seg-col { display: grid; width: 100%; }
.seg-col .seg-b { justify-content: flex-start; white-space: normal; height: auto; min-height: 34px; padding: 7px 12px; text-align: left; }
.kfield.mt + .seg, p.kfield + .seg { margin-top: 6px; }
