/* Дизайн Человека v2. Астрономический инструмент: минеральные нейтральные, латунь — определённые центры,
   красный — Дизайн, чернильный — Личность, бирюзовый — транзит. Тема следует теме Telegram. */
:root {
  --bg: #fbfcfc; --surface: #fbfcfc; --surface-2: #f0f4f2;
  --ink: #15201e; --muted: #5d6a67; --line: #d5ddda; --tube: #e3e9e7;
  --brass: #c9a24a; --brass-soft: #f3e8cc; --design: #c3342c; --transit: #1e8a7e;
  --accent: #1d5b56; --on-accent: #ffffff; --scrim: rgba(8, 14, 13, .45);
  --pair-a: #2f8a57; --pair-b: #d27a22;
  --f-display: "Tenor Sans", "Cormorant Garamond", Georgia, serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-md: 16px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #131c1b; --surface: #131c1b; --surface-2: #1a2523;
  --ink: #e6eeeb; --muted: #94a3a0; --line: #263331; --tube: #1f2a28;
  --brass: #d8b45c; --brass-soft: #3a3220; --design: #ec5a4f; --transit: #45c0b1;
  --accent: #6cc3b8; --on-accent: #0b1110; --scrim: rgba(0, 0, 0, .6);
  --pair-a: #4fbf7f; --pair-b: #f0a04b;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); display: flex; flex-direction: column; overflow: hidden; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.screen { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.pad { padding: 16px max(20px, env(safe-area-inset-right)) 28px max(20px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 22px; max-width: 560px; margin: 0 auto; }
.tabs { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: var(--surface); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
.tabs button { background: none; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 4px 0; }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tabs button[aria-current="page"] { color: var(--ink); }
.tabs button[aria-current="page"] svg { stroke: var(--accent); }
.main-btn { flex: none; margin: 0 16px calc(12px + env(safe-area-inset-bottom)); height: 50px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 16px; cursor: pointer; }
.main-btn:disabled { opacity: .5; }

.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.display { font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 9.4vw, 38px); line-height: 1.05; margin: 0; text-wrap: balance; overflow-wrap: anywhere; hyphens: auto; }
h2.sec { font-family: var(--f-display); font-weight: 400; font-size: 22px; margin: 0; }
.lead { font-size: 16px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.error { color: var(--design); }
p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }

.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--accent); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.input { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); font-size: 16px; min-height: 50px; }
.input input { border: 0; background: none; font: inherit; color: inherit; flex: 1; min-width: 0; outline: none; }
.input:focus-within { border-color: var(--accent); }
.chip { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.tg { color: var(--accent); }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-size: 28px; background: var(--brass-soft); color: var(--ink); border: 1px solid var(--line); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who { display: flex; gap: 14px; align-items: center; }
.note { font-size: 13px; color: var(--muted); border-left: 2px solid var(--brass); padding-left: 12px; }
.note.warn { border-color: var(--design); }
.wheel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-radius: var(--r-md); background: var(--surface-2); height: 200px; position: relative; overflow: hidden; }
.wheel::before { content: ""; position: absolute; left: 12px; right: 12px; top: 80px; height: 40px; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.wheel .col { height: 200px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; position: relative; text-align: center; padding: 80px 0; -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent); }
.wheel .col::-webkit-scrollbar { display: none; }
.wheel .col div { height: 40px; line-height: 40px; scroll-snap-align: center; font-family: var(--f-mono); font-size: 22px; color: var(--muted); }
.wheel .col div.sel { color: var(--ink); }
.wheel .colon { font-family: var(--f-mono); font-size: 22px; position: relative; }
.wheel.off { opacity: .35; pointer-events: none; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; flex: none; transition: background .2s; border: 0; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.suggest { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; isolation: isolate; contain: paint; }
.suggest button { background: var(--surface); border: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; text-align: left; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.suggest button:last-child { border-bottom: 0; }
.suggest button b { font-weight: 500; }
.suggest button .tz { grid-row: span 2; align-self: center; }
.suggest button[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

.hero { display: flex; flex-direction: column; gap: 6px; }
.rave { display: grid; grid-template-columns: 50px minmax(0, 1fr) 50px; align-items: start; gap: 2px; }
.acts { display: flex; flex-direction: column; padding-top: 8px; }
.acts h4 { margin: 0 0 4px; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
.acts .row { display: flex; align-items: center; gap: 3px; height: 27px; font-family: var(--f-mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.acts .row .g { width: 15px; text-align: center; font-family: var(--f-body); font-size: 13px; opacity: .75; }
.acts .row.unsure { opacity: .45; }
.acts.d { color: var(--design); }
.acts.p { text-align: right; }
.acts.p .row { flex-direction: row-reverse; }
.acts.t { color: var(--transit); }
.bodygraph { width: 100%; height: auto; display: block; }
.bodygraph .center { cursor: pointer; transition: fill .4s; }
.bodygraph text { font-family: var(--f-mono); font-size: 7.5px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.legend { display: flex; gap: 14px; justify-content: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.key { background: var(--surface-2); border: 0; border-radius: var(--r-md); padding: 14px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.key .k { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.key .v { font-weight: 600; font-size: 15px; line-height: 1.25; }
.key .s { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.list { display: flex; flex-direction: column; }
.li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; width: 100%; align-items: center; }
.li:last-child { border-bottom: 0; }
.li.static { cursor: default; }
.li .t { display: flex; flex-direction: column; min-width: 0; }
.li .t b { font-weight: 500; }
.li .chev { color: var(--muted); }

.sky { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sky div { border-radius: var(--r-md); padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sky b { font-family: var(--f-mono); font-size: 26px; font-weight: 500; color: var(--transit); }
.weather { border-radius: var(--r-md); padding: 18px; background: var(--ink); color: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.weather .eyebrow { color: inherit; opacity: .65; }
.weather p.big { font-family: var(--f-display); font-size: 21px; line-height: 1.25; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; }

.life { position: relative; padding-left: 64px; display: flex; flex-direction: column; }
.life::before { content: ""; position: absolute; left: 44px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.ev { position: relative; background: none; border: 0; text-align: left; padding: 10px 0 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.ev .age { position: absolute; left: -64px; top: 10px; width: 38px; text-align: right; font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.ev .dot { position: absolute; left: -25px; top: 14px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brass); }
.ev.past .dot { background: var(--brass); }
.ev.past b, .ev.past .when { opacity: .6; }
.ev b { font-weight: 600; }
.ev .when { font-size: 13px; color: var(--muted); font-family: var(--f-mono); }
.now { position: relative; height: 0; margin: 4px 0; }
.now span { position: absolute; left: -64px; top: -10px; font-size: 11px; color: var(--transit); font-weight: 600; width: 38px; text-align: right; }
.now::after { content: ""; position: absolute; left: -26px; right: 0; top: 0; height: 2px; background: var(--transit); }

.person { display: flex; gap: 12px; align-items: center; min-width: 0; }
.person .avatar { width: 44px; height: 44px; font-size: 18px; }
.compat { border-radius: var(--r-md); background: var(--surface-2); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.compat .compat-and { text-align: center; margin: -6px 0; }
.compat .row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.compat .row4 div { display: flex; flex-direction: column; }
.compat .row4 b { font-family: var(--f-mono); font-size: 22px; font-weight: 500; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.ghost { border: 1px dashed var(--line); background: none; border-radius: 12px; padding: 14px; cursor: pointer; color: var(--accent); font-weight: 500; width: 100%; }
.ghost.danger { color: var(--design); }

.scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 5; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: 22px 22px 0 0; padding: 10px max(22px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); z-index: 6; max-height: 85%; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; max-width: 600px; margin: 0 auto; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); align-self: center; margin-bottom: 6px; }
.sheet .grab { position: sticky; top: 0; z-index: 1; cursor: grab; flex: none; }   /* «ручка» всегда видна, даже когда содержимое прокручено */
.sheet .grab::before { content: ""; position: absolute; inset: -14px -60px; }   /* увеличенная зона захвата */
.sheet { overscroll-behavior: contain; }
body.sheet-open .scrim { opacity: 1; pointer-events: auto; }
body.sheet-open .sheet { transform: none; }
.sheet h3 { font-family: var(--f-display); font-weight: 400; font-size: 26px; margin: 0; }

.reveal { position: fixed; inset: 0; background: var(--bg); display: grid; place-items: center; z-index: 8; text-align: center; padding: 30px; }
.reveal p { font-family: var(--f-display); font-size: 22px; }
.draw .act:not(.stripe) { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 1.1s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rise > * { animation: rise .45s ease-out both; }
.rise > *:nth-child(2) { animation-delay: .05s; } .rise > *:nth-child(3) { animation-delay: .1s; } .rise > *:nth-child(4) { animation-delay: .15s; }
@media (prefers-reduced-motion: reduce) {
  .draw .act:not(.stripe) { animation: none; stroke-dashoffset: 0; }
  .rise > * { animation: none; }
  .sheet, .scrim { transition: none; }
}

/* расшифровки */
.bodygraph .gate { cursor: pointer; }
.acts .row[data-gate] { cursor: pointer; }
.acts .row[data-gate]:active { opacity: .6; }
.cta { border-radius: var(--r-md); padding: 18px; background: var(--brass-soft); border: 1px solid var(--brass); display: flex; flex-direction: column; gap: 8px; text-align: left; cursor: pointer; }
.cta b { font-family: var(--f-display); font-weight: 400; font-size: 22px; }
.badge { align-self: flex-start; font-size: 11px; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: var(--surface); color: var(--accent); border: 1px solid var(--line); }
.mine { border-left: 3px solid var(--brass); padding-left: 12px; display: flex; flex-direction: column; gap: 4px; }
.mine .hl { color: var(--accent); }
.mine .lo { color: var(--design); }
.reading article { display: flex; flex-direction: column; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.reading article:last-child { border-bottom: 0; }
.reading article h3 { margin: 0; font-size: 16px; font-weight: 600; }
.reading article .gl { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.reading .side-head { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }

/* совместимость: сравнение двух карт */
.pair-toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.pair-toggles button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 500; }
.pair-toggles button[aria-pressed="false"] { opacity: .45; }
.pair-toggles i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.pair-acts { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 10px; font-family: var(--f-mono); font-size: 13px; font-variant-numeric: tabular-nums; align-items: center; }
.pair-acts .h { font-family: var(--f-body); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding-bottom: 6px; }
.pair-acts .a { color: var(--pair-a); text-align: right; } .pair-acts .b { color: var(--pair-b); }
.pair-acts .g { text-align: center; color: var(--muted); font-family: var(--f-body); }
.pair-acts > span { padding: 3px 0; border-bottom: 1px solid var(--line); }
.pair-acts small { color: var(--muted); font-size: 10px; }
.facts2 { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.facts2 dt { color: var(--muted); font-size: 13px; } .facts2 dd { margin: 0; font-weight: 500; }
.pair-rave { display: grid; grid-template-columns: 66px minmax(0, 1fr) 66px; gap: 0; align-items: start; margin: 0 -8px; }
.pcol { display: flex; flex-direction: column; padding-top: 8px; font-family: var(--f-mono); font-size: 9.5px; font-variant-numeric: tabular-nums; transition: opacity .2s; }
.pcol h4 { margin: 0 0 4px; font-family: var(--f-body); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcol.a { color: var(--pair-a); } .pcol.b { color: var(--pair-b); text-align: right; }
.pcol .prow { display: grid; grid-template-columns: 1fr 12px 1fr; align-items: center; height: 26px; gap: 1px; }
.pcol .prow span:first-child { text-align: left; } .pcol .prow span:last-child { text-align: right; }
.pcol .g { text-align: center; font-family: var(--f-body); font-size: 12px; opacity: .8; }
.pcol.off { opacity: .3; }
@media (max-width: 360px) { .pair-rave { grid-template-columns: 60px minmax(0, 1fr) 60px; } .pcol { font-size: 9px; } }

/* заметная кнопка «Поделиться» */
.share-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; border: 0;
  border-radius: 14px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 16px; cursor: pointer;
  box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.share-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-btn:active { transform: scale(.99); }

/* эксперимент 7 дней */
.exp { border-radius: var(--r-md); padding: 18px; background: var(--surface); border: 1px solid var(--brass); display: flex; flex-direction: column; gap: 12px; }
.exp-title { font-family: var(--f-display); font-weight: 400; font-size: 22px; line-height: 1.2; }
.exp-dots { display: flex; gap: 6px; }
.exp-dots i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.exp-dots i.done { background: var(--brass); }
.exp-dots i.cur:not(.done) { background: var(--accent); }
.exp-ok { color: var(--accent); font-weight: 500; font-size: 14px; }
.exp-past { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.exp-past button { background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; text-align: left; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.link-btn { align-self: center; background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 6px 10px; cursor: pointer; }

/* дневник решений */
.input textarea { border: 0; background: none; font: inherit; color: inherit; flex: 1; min-width: 0; outline: none; resize: none; }
.dec-due { border-radius: 12px; background: var(--brass-soft); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.dec-out { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.dec-out button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 10px 4px; font: inherit; font-size: 14px; cursor: pointer; }
.dec-out button:active { background: var(--ink); color: var(--bg); }
.exp-past .dec-st { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.dec-st.good { color: var(--accent); } .dec-st.bad { color: var(--design); } .dec-st.mid { color: var(--brass); }

/* транзит на любую дату */
.datebar { display: grid; grid-template-columns: 50px 1fr 50px; gap: 8px; }
.datebar > button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; font-size: 24px; line-height: 1; cursor: pointer; }
.datebar .input { cursor: pointer; }
.datebar .input input { color: var(--ink); }

/* поделиться в соцсетях */
.social { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.social button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; min-width: 0; }
.social button i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 700; font-size: 17px; }
.social button:active { transform: scale(.97); }

/* админ-панель */
.adm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.adm-num { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adm-num b { font-family: var(--f-mono); font-size: 22px; font-weight: 500; }
.adm-h { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.adm-h summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.adm-h summary::-webkit-details-marker { display: none; }
.adm-h summary span { margin-left: auto; }
.adm-h summary i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.adm-h.ok summary i { background: #2f9e5b; }
.adm-h.bad { border-color: var(--design); }
.adm-h.bad summary i { background: var(--design); }
.adm-h p { margin-top: 8px; }

/* выбор человека для совместимости */
.picker { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.picker:disabled { cursor: default; opacity: 1; }
.picker .avatar, #pp-list .avatar { width: 40px; height: 40px; font-size: 18px; }
.picker .t { display: flex; flex-direction: column; min-width: 0; }
.picker .t b { font-weight: 500; }
.pick-hint { color: var(--accent); font-weight: 500; font-size: 14px; white-space: nowrap; }
#pp-list .li[aria-current="true"] b { color: var(--accent); }
#pp-list .chev { color: var(--accent); font-weight: 600; }
.input input[type="search"]::-webkit-search-cancel-button { display: none; }

/* нагрузка в админ-панели */
:root { --st-ok: #2f8a57; --st-warn: #b7791f; --st-high: #c3342c; }
:root[data-theme="dark"] { --st-ok: #4fbf7f; --st-warn: #e0a43a; --st-high: #ec5a4f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --st-ok: #4fbf7f; --st-warn: #e0a43a; --st-high: #ec5a4f; } }
.load-verdict { border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-left: 4px solid var(--st-ok); }
.load-verdict b { color: var(--ink); }
.load-verdict span { font-size: 14px; color: var(--muted); }
.load-verdict.warn { border-left-color: var(--st-warn); } .load-verdict.high { border-left-color: var(--st-high); }
.meter { display: flex; flex-direction: column; gap: 6px; }
.meter-top { display: flex; justify-content: space-between; font-size: 15px; }
.meter-top b { font-family: var(--f-mono); font-weight: 500; }
.meter-track { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter-track i { display: block; height: 100%; border-radius: 4px; background: var(--st-ok); min-width: 2px; }
.meter.warn .meter-track i { background: var(--st-warn); } .meter.high .meter-track i { background: var(--st-high); }
.load-h { font-size: 13px; font-weight: 500; color: var(--muted); margin: 6px 0 -2px; }
.spark { width: 100%; height: 56px; display: block; touch-action: pan-y; cursor: crosshair; }
.spark-base { stroke: var(--line); stroke-width: 1; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-cross { stroke: var(--muted); stroke-width: 1; }
.spark-tip { min-height: 18px; font-family: var(--f-mono); }

/* покупка */
.buy-alt { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }

/* баланс звёзд */
.stars-hero { display: flex; flex-direction: column; gap: 2px; }
.stars-hero b { font-family: var(--f-mono); font-size: 40px; font-weight: 500; line-height: 1.1; }

/* сообщить об ошибке */
.rp-file { display: block; text-align: center; cursor: pointer; }
.rp-prev { max-height: 180px; align-self: center; border-radius: 10px; border: 1px solid var(--line); }

/* метки размещений */
.camp-table { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.camp-row { display: grid; grid-template-columns: 1.6fr .8fr .8fr 1fr .8fr; gap: 6px; padding: 10px 12px; font-size: 14px; align-items: baseline; list-style: none; cursor: pointer; }
.camp-row::-webkit-details-marker { display: none; }
.camp-row span:not(:first-child) { text-align: right; font-family: var(--f-mono); }
.camp-row .mono { font-family: var(--f-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camp-row.head { font-size: 12px; color: var(--muted); cursor: default; border-bottom: 1px solid var(--line); }
.camp-row-wrap + .camp-row-wrap { border-top: 1px solid var(--line); }
.camp-links { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.camp-links code { font-size: 12px; word-break: break-all; background: var(--surface-2); padding: 6px 8px; border-radius: 8px; }
.camp-links .link-btn { align-self: flex-start; padding-left: 0; }

/* этап 2: ворота дня и практика */
.daygates, .practice { border-radius: var(--r-md); padding: 18px; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.daygates .moon { border-top: 1px solid var(--line); padding-top: 10px; color: var(--muted); }
.mine-note { color: var(--accent); font-weight: 500; }
.practice ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.week { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.wk-day { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.wk-day:last-child { border-bottom: 0; }

/* этап 4: курс и библиотека */
.course-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.course-bar i { display: block; height: 100%; background: var(--brass); border-radius: 2px; }
.li.dim { opacity: .55; cursor: default; }
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--muted); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: 8px; }

/* подсказки: что нажимается */
.acts .row[data-gate] { cursor: pointer; }
.acts .row .n { text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gate-list { display: flex; flex-direction: column; gap: 8px; }
.gate-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: transform .1s, border-color .2s; }
.gate-row:active { transform: scale(.98); border-color: var(--brass); }
.gate-row .gnum { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brass); color: #1b1606; font-family: var(--f-mono); font-weight: 600; font-size: 15px; }
.gate-row .t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.gate-row .t b { font-weight: 500; }
.gate-row .chev { flex: none; color: var(--accent); font-size: 26px; line-height: 1; font-weight: 300; }
.gate-row.coach-pulse { border-color: var(--brass); }

/* знакомство при первом входе */
.coach { position: fixed; z-index: 4; max-width: min(320px, calc(100vw - 24px)); background: var(--ink); color: var(--bg);
  border-radius: 14px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: 15px; line-height: 1.4;
  animation: coach-in .25s ease-out; }
.coach p { margin: 0; }
.coach::after { content: ""; position: absolute; left: var(--ax, 50%); bottom: -7px; width: 14px; height: 14px; background: inherit;
  transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.coach.below::after { bottom: auto; top: -7px; }
.coach-acts { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.coach .link-btn { color: var(--bg); opacity: .75; font-size: 13px; padding: 0; }
.coach-ok { border: 0; border-radius: 999px; padding: 6px 14px; background: var(--brass); color: #1b1606; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.coach.out, .coach-inline.out { opacity: 0; transition: opacity .3s; }
.coach-inline { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--brass-soft); font-size: 14px; }
@keyframes coach-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes coach-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 74, .55); } 50% { box-shadow: 0 0 0 7px rgba(201, 162, 74, 0); } }
@keyframes coach-stroke { 0%, 100% { stroke-width: 1.4; stroke: var(--ink); } 50% { stroke-width: 5; stroke: var(--brass); } }
.coach-pulse:not(polygon) { animation: coach-ring 1.6s ease-in-out infinite; border-radius: 14px; }
polygon.coach-pulse { animation: coach-stroke 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .coach, .coach-pulse, polygon.coach-pulse { animation: none; } polygon.coach-pulse { stroke: var(--brass); stroke-width: 4; } }

/* администратор в режиме «как пользователь» */
#view-as-pill { position: fixed; top: calc(8px + env(safe-area-inset-top)); right: 10px; z-index: 4; border: 1px solid var(--brass);
  background: var(--brass-soft); color: var(--ink); border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }

/* расширенная расшифровка */
.toc { margin-top: -4px; }
.one-page { border-radius: var(--r-md); padding: 18px; background: var(--surface); border: 1px solid var(--brass); display: flex; flex-direction: column; gap: 10px; }
.one-page p { margin: 0; }
.one-page ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.link-btn.danger { color: var(--design); align-self: flex-start; padding-left: 0; }
.camp-group + .camp-group, .camp-group + .camp-row-wrap, .camp-row-wrap + .camp-group { border-top: 1px solid var(--line); }
.camp-row.group { font-weight: 600; }
.camp-group[open] > .camp-row.group .mono { color: var(--accent); }
.camp-group-list { border-top: 1px dashed var(--line); background: var(--surface-2); }
.camp-group .camp-row { padding-left: calc(12px + var(--depth, 0) * 12px); }
.camp-group .caret { display: inline-block; font-style: normal; transition: transform .15s; } .camp-group[open] > summary .caret { transform: rotate(90deg); }
.camp-periods { gap: 6px; }
.camp-periods button { font-size: 13px; padding: 5px 10px; }
.camp-custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.camp-custom .input { flex: 1; min-width: 130px; }

.row-btns { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.path-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.path-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* сова-помощник и подсказки к терминам */
.term { border-bottom: 1.5px dotted var(--brass); cursor: pointer; }
.term.on { color: var(--brass); }
#owl { position: fixed; left: 0; top: 0; width: 64px; height: 78px; z-index: 7; touch-action: none; cursor: grab; will-change: transform; transition: opacity .2s; }
#owl svg { width: 100%; height: 100%; overflow: visible; display: block; }
#owl.drag { cursor: grabbing; }
#owl.away { opacity: 0; pointer-events: none; }
.owl-close { position: absolute; top: -8px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font: 16px/1 system-ui; display: grid; place-items: center; padding: 0; opacity: 0; pointer-events: none; transition: opacity .2s; }
#owl.docked:not(.drag) .owl-close { opacity: 1; pointer-events: auto; }
.owl-bubble { position: fixed; z-index: 7; background: #f3ecd9; color: #1d2621; border-radius: 14px; padding: 10px 12px; font-size: 14px; line-height: 1.4;
  box-shadow: 0 6px 20px #0006; opacity: 0; pointer-events: none; max-height: 50vh; overflow-y: auto; }
.owl-bubble.show { pointer-events: auto; }
.owl-bubble b { display: block; margin-bottom: 2px; }
.owl-more { display: block; margin-top: 6px; padding: 0; border: 0; background: none; color: #8a5a12; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.owl-zzz { position: fixed; left: 0; top: 0; z-index: 7; font: 600 15px system-ui; color: var(--brass); pointer-events: none; opacity: 0; }
.owl-zzz small { font-size: .8em; }

/* подсказка «Как купить звёзды» */
.stars-help { align-self: center; font-size: 14px; }
.stars-help.nudge { color: var(--brass); animation: nudge .6s ease-in-out 2; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.stars-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
