/* Aistrum — светлая тема по макету Claude Design (токены IntellectBot). */
:root {
  --bg: #F7F7F5;
  --surface: #FFFFFF;
  --ink: #121412;
  --text: #1A1A1A;
  --muted: #6B6B6B;
  --muted-2: #6b6e6c;
  --line: #E8E8E4;
  --line-2: #c9c9c4;
  --soft: #f0f0ed;
  --soft-2: #ededea;
  --hover: #e7e7e3;
  --accent: #F5C02B;
  --accent-hover: #E8B21C;
  --accent-active: #D4A114;
  --accent-ink: #E9AE1A;
  --accent-soft: #FFF1BF;
  --accent-soft-ink: #6b4f00;
  --link-hover: #8a5300;
  --dark-sub: #B9B9B3;
  --danger: #b4321f;
  --svc-violet: #E9E4F6;
  --svc-blue: #E3E8EF;
  --svc-green: #DFF1EA;
  --svc-peach: #F8E6DC;
  --r-btn: 8px;
  --r-card: 24px;
  --shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 1px rgba(18,20,18,.05), 0 1px 2px rgba(18,20,18,.04), 0 8px 24px rgba(18,20,18,.04);
  --shadow-up: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 1px rgba(18,20,18,.06), 0 6px 16px rgba(18,20,18,.06), 0 24px 48px rgba(18,20,18,.08);
  --top-h: 64px;
  --side-w: 320px;
  --work-w: 880px;
  --dock-h: 208px;
  --container: 1200px;
  --gutter: 24px;
  --pad: 32px;
  --font: Inter, "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-decoration: none; transition: color .15s; }
a:hover { color: var(--link-hover); }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Типографика */
.mut { color: var(--muted); }
.t12 { font-size: 12px; line-height: 1.4; }
.t14 { font-size: 14px; }
.t20 { font-size: 20px; font-weight: 600; line-height: 1.4; }
.t24 { font-size: 24px; font-weight: 600; line-height: 1.4; }
.t32 { font-size: 32px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.strong { font-weight: 600; }

/* Кнопки: normal / hover / active / disabled / loading */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-btn); font: inherit; font-size: 14px; font-weight: 600; line-height: 1; border: 1px solid transparent; cursor: pointer; white-space: nowrap; position: relative; transition: background .15s, border-color .15s, color .15s, transform .08s; }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.dis { opacity: .4; pointer-events: none; }
.btn.load { color: transparent !important; pointer-events: none; }
.btn.load::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid rgba(26,26,26,.25); border-top-color: var(--text); animation: spin .7s linear infinite; }
.btn:focus-visible, .chip:focus-visible, .in:focus-visible, .tile:focus-visible, .dk:focus-visible, .ib:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.btn.lg { height: 48px; }
.btn.wide { padding: 0 32px; }
.btn.start { justify-content: flex-start; }
.p { background: var(--accent); color: var(--text); }
.p:hover { background: var(--accent-hover); color: var(--text); }
.p:active { background: var(--accent-active); }
.s { background: var(--surface); color: var(--text); border-color: #8b8e8b; }
.s:hover { border-color: var(--text); color: var(--text); }
.s:active { background: var(--soft); }
.g { background: transparent; color: #4a4d4b; }
.g:hover { background: var(--hover); color: var(--text); }
.w { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(18,20,18,.08), 0 0 0 1px rgba(18,20,18,.04); }
.w:hover { color: var(--link-hover); }
.on-dark { color: #fff; background: rgba(255,255,255,.08); }
.on-dark:hover { color: #fff; background: rgba(255,255,255,.14); }
.back { padding: 0 12px; }
.ib { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-btn); border: 0; background: transparent; color: #4a4d4b; cursor: pointer; transition: background .15s; flex: none; }
.ib:hover { background: var(--hover); color: var(--text); }
.ib.p { background: var(--accent); color: var(--text); }
.ib.p:hover { background: var(--accent-hover); }
.ib:disabled { opacity: .4; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .5; } }

.ic { width: 20px; height: 20px; flex: none; }
.ic24 { width: 24px; height: 24px; }
.ic-acc { color: var(--accent-ink); }

/* Карточки и элементы */
.card { background: var(--surface); border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow); }
.card.lg { padding: 32px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-8 { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-8 { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.self-start { align-self: flex-start; }
.dots { background-image: radial-gradient(#d9d9d4 1px, transparent 1.3px); background-size: 20px 20px; }
.ink { background: var(--ink); color: #fff; border-radius: var(--r-card); padding: 24px; }
.chk { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; }
.tag { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e9e9e5; color: var(--text); white-space: nowrap; }
.tag.y { background: var(--accent-soft); color: var(--accent-soft-ink); }
.tag.lg { height: 32px; padding: 0 12px; font-size: 14px; }
.bar { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; background: var(--accent-ink); border-radius: 999px; transition: width .3s; }
.in { height: 48px; width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-btn); color: var(--text); padding: 0 16px; font: inherit; font-size: 16px; }
.in::placeholder { color: var(--muted-2); }
.in:focus { outline: none; border-color: var(--accent-ink); }
.field label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 16px; }
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 16px; }
.grid-auto-lg { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.max360 { max-width: 360px; }
.max200 { max-width: 200px; }
.chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 8px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s, transform .08s; }
.chip:hover { border-color: #8b8e8b; }
.chip:active { transform: scale(.97); }
.chip.on { border-color: var(--accent-ink); background: var(--accent-soft); color: var(--accent-soft-ink); }
.chip.left { align-items: flex-start; text-align: left; }
.chip.pill { min-height: 44px; border-radius: 999px; font-size: 14px; flex-direction: row; }
.sk { background: var(--hover); border-radius: 8px; height: 16px; animation: pulse 1.2s ease-in-out infinite; }
.sk.w60 { width: 60%; } .sk.w80 { width: 80%; } .sk.w45 { width: 45%; }
.err { color: var(--danger); font-size: 14px; }
.hint { display: flex; align-items: center; gap: 8px; padding: 16px; background: var(--bg); border-radius: 16px; font-weight: 500; }
.cell { background: var(--bg); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.divider { display: flex; align-items: center; gap: 16px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Шапка */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 24px; height: var(--top-h); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.top nav { display: flex; align-items: center; gap: 8px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.burger, .hdr-back { display: none; }
.short { display: none; }

/* Рабочая область: боковая панель + чат */
.shell { display: flex; min-height: calc(100vh - var(--top-h)); }
.side { flex: 0 0 var(--side-w); width: var(--side-w); position: sticky; top: var(--top-h); align-self: flex-start; height: calc(100vh - var(--top-h)); overflow-y: auto; overflow-x: hidden; padding: 24px; display: flex; flex-direction: column; gap: 16px; background: var(--surface); border-right: 1px solid var(--line); }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.tg2 { height: auto; min-height: 56px; padding: 8px 16px; white-space: normal; text-align: left; }
.tg2-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.tg2-t .mut { font-weight: 400; }
.work { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.work-in { flex: 1; width: 100%; max-width: var(--work-w); margin: 0 auto; padding: 32px var(--pad) var(--dock-h); display: flex; flex-direction: column; gap: 24px; }
.work-in.wide { padding-bottom: 32px; }
/* Строка ввода плавает внизу экрана над рабочей областью и останавливается перед футером:
   она стоит в потоке после всех секций, а отрицательный отступ убирает её высоту из потока. */
.dock { position: sticky; bottom: 0; z-index: 15; height: var(--dock-h); margin: calc(-1 * var(--dock-h)) 0 0 var(--side-w); padding: 0 var(--pad) 24px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; pointer-events: none; }
.dock > * { pointer-events: auto; width: 100%; max-width: calc(var(--work-w) - 2 * var(--pad)); }
.quick { display: flex; flex-wrap: nowrap; justify-content: safe center; gap: 8px; padding: 4px 0; overflow-x: auto; scrollbar-width: none; }
.quick:empty { display: none; }
.quick::-webkit-scrollbar { display: none; }
.quick .chip { flex: none; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); }
#below { padding-bottom: var(--dock-h); background: var(--bg); }
.topbar { position: sticky; top: var(--top-h); z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; min-height: 56px; margin: -16px -8px 0; padding: 4px 8px; border-bottom: 1px solid var(--line); background: rgba(247,247,245,.92); backdrop-filter: blur(8px); }
.topbar .back { justify-self: start; }
.topbar-t { font-size: 14px; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .change { justify-self: end; padding: 0 12px; }
.composer { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 20px; padding: 8px 8px 8px 16px; box-shadow: var(--shadow-up); }
.composer input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); height: 44px; }
.composer input::placeholder { color: var(--muted-2); }
.composer input:focus { outline: none; }
.scrim { display: none; }

/* Сообщения */
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg.me { justify-content: flex-end; }
.msg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ub { background: var(--soft-2); border-radius: 20px 20px 4px 20px; padding: 12px 16px; max-width: 70%; overflow-wrap: anywhere; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex: none; }
.pre { white-space: pre-line; }

/* Главная: астролог и плитки */
.hello { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-top: 8px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dk { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: var(--r-card); background: var(--ink); color: #fff; overflow: hidden; min-height: 208px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 24px rgba(18,20,18,.12); transition: transform .2s, box-shadow .2s; }
.dk:hover { transform: translateY(-2px); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 24px 48px rgba(18,20,18,.2); }
.dk.hero { grid-column: span 2; min-height: 248px; }
.dk.tall { min-height: 248px; }
.dk.small { min-height: 192px; }
.dk:not(.hero) .dkt { max-width: 100%; }
.dk:not(.hero) .dki { width: 56%; height: 56%; }
.dk.strip { grid-column: span 3; min-height: 96px; flex-direction: row; align-items: center; }
.dk.strip .tag { margin-left: auto; }
.dkt { display: flex; flex-direction: column; gap: 8px; max-width: 56%; position: relative; z-index: 1; }
.dk.strip .dkt { max-width: none; flex-direction: row; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.dks { color: var(--dark-sub); font-size: 16px; }
.dki { position: absolute; right: 0; bottom: 0; width: 46%; height: 100%; object-fit: contain; object-position: right bottom; pointer-events: none; mix-blend-mode: lighten; }

/* Ниже первого экрана: один контейнер 1200px, 12 колонок, межколонник 24px */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--pad)); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.below { padding-top: 96px; display: flex; flex-direction: column; gap: 96px; }
.section { display: flex; flex-direction: column; gap: 32px; scroll-margin-top: calc(var(--top-h) + 32px); }
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
@media (max-width: 1023px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .svc-grid { grid-template-columns: 1fr; } }
.svc { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 24px 0; border-radius: var(--r-card); min-height: 360px; position: relative; overflow: hidden; color: var(--text); }
.svc:hover { color: var(--text); }
.svc .img { width: 100%; height: 240px; margin-top: auto; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.svc .img img { height: 100%; width: auto; object-fit: contain; mix-blend-mode: multiply; filter: brightness(1.05) contrast(1.06); padding-bottom: 56px; }
.svc .img .btn { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); }
.svc .img .btn:active { transform: translateX(-50%) scale(.97); }
.svc.violet { background: var(--svc-violet); } .svc.blue { background: var(--svc-blue); } .svc.green { background: var(--svc-green); } .svc.peach { background: var(--svc-peach); }
.how { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding: 24px 32px; }
.how .t20 { flex: 1 1 200px; }
.how-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-weight: 500; }
.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.prices > * > .btn:last-child { margin-top: auto; }
.faq-sec { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gutter); }
.faq-head { grid-column: span 4; }
.faq { grid-column: span 8; border-bottom: 1px solid var(--line); }
details { border-top: 1px solid var(--line); }
details summary { list-style: none; cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--muted); font-size: 24px; font-weight: 400; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 16px; }
.foot { border-top: 1px solid var(--line); padding: 24px 0; background: var(--surface); }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.foot nav { display: flex; gap: 24px; flex-wrap: wrap; }

/* Шкалы, кольцо, прогресс мастера */
.ring { position: relative; width: 144px; height: 144px; flex: none; }
.ring-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num { font-size: 48px; font-weight: 600; line-height: 1; }
.scores { flex: 1 1 240px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.sc { display: flex; align-items: center; gap: 12px; }
.sc .l { width: 120px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.sc .v { width: 32px; text-align: right; font-size: 14px; font-weight: 600; }
.blur { filter: blur(6px); pointer-events: none; user-select: none; }
.unlock { position: absolute; left: 50%; top: 62%; transform: translate(-50%, -50%); }
.unlock:active { transform: translate(-50%, -50%) scale(.97); }
.result { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; }
.steps-bar { display: flex; align-items: center; gap: 16px; }
.steps-bar .bar { flex: 1; }
.steps-bar .lbl { width: 40px; text-align: right; }
.sugg { display: flex; flex-direction: column; gap: 8px; }

/* Ладонь */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 200px; border: 2px dashed var(--line-2); border-radius: 16px; background: var(--surface); cursor: pointer; color: var(--text); font: inherit; transition: border-color .15s; padding: 24px; }
.drop:hover { border-color: var(--accent-ink); }
.palm-photo { width: 240px; height: 300px; flex: none; border-radius: 16px; object-fit: cover; background: var(--soft); }
.palm-lines { flex: 1 1 220px; display: flex; flex-direction: column; gap: 8px; }
.ln { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--bg); }
.ln.on { background: var(--accent-soft); color: var(--accent-soft-ink); }
.ln .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line-2); flex: none; }
.ln.on .dot { background: var(--accent-ink); }
.ln .grow { flex: 1; }

/* Год */
.months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.mo { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.mo .d { width: 100%; height: 40px; border-radius: 8px; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--accent-soft-ink); }
.mo .d.good { background: var(--accent-soft); }
.mo .d.hard { background: #fbefd9; color: #8a5300; }
.mo .n { font-size: 12px; color: var(--muted); font-weight: 500; }
.mo.now .n { color: var(--text); font-weight: 600; }
.legend { width: 12px; height: 12px; border-radius: 4px; background: var(--accent-ink); flex: none; }
.legend.hard { background: #e0a93a; }

/* Натальная карта */
.wheel { width: 100%; max-width: 320px; height: auto; margin: 0 auto; }
.planets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 8px; }
.planet { display: flex; justify-content: space-between; gap: 8px; padding: 8px 16px; border-radius: 12px; background: var(--bg); font-size: 14px; }

/* Кабинет */
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 128px; padding: 24px; background: var(--surface); border-radius: var(--r-card); color: var(--text); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.tile:hover { transform: translateY(-2px); color: var(--text); box-shadow: var(--shadow-up); }

.center-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 48px 32px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px); }

/* ——— Планшет и мобильный ——— */
@media (max-width: 1023px) {
  :root { --pad: 24px; }
  .dock { margin-left: 0; }
  .top { padding: 8px 16px; }
  .top nav { display: none; }
  .burger { display: inline-flex; }
  .top-actions .hide-m { display: none; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: min(360px, 88vw); z-index: 40; transform: translateX(-100%); transition: transform .2s; overflow-y: auto; }
  .side.open { transform: none; box-shadow: 0 24px 48px rgba(18,20,18,.2); }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(18,20,18,.32); z-index: 30; }
}
@media (max-width: 767px) {
  :root { --pad: 16px; --dock-h: 176px; }
  .work-in { padding-top: 24px; gap: 16px; }
  .dock { padding-bottom: 16px; }
  .quick { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .hdr-back { display: inline-flex; }
  .topbar { margin-top: -8px; }
  .topbar .back { display: none; }
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .topbar-t { text-align: left; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .dk { padding: 16px; min-height: 168px; }
  .dk.hero { grid-column: span 2; min-height: 160px; }
  .dk.tall, .dk.small { min-height: 168px; }
  .top-actions .btn { height: 40px; padding: 0 12px; }
  .top-actions .full { display: none; }
  .top-actions .short { display: inline; }
  .dk.strip { grid-column: span 2; min-height: 64px; }
  .dk .t32 { font-size: 24px; }
  .dk .t24 { font-size: 16px; line-height: 1.3; }
  .dks { font-size: 12px; }
  .dkt { max-width: 100%; }
  .dk.hero .dkt { max-width: 56%; }
  .dk.small .dki, .dk.tall .dki { width: 72%; height: 52%; }
  .hello svg { width: 72px; height: 72px; }
  .below { padding-top: 64px; gap: 64px; }
  .prices { grid-template-columns: 1fr; }
  .faq-head, .faq { grid-column: 1 / -1; }
  .foot { padding: 16px 0; }
  .foot-in { flex-direction: column; align-items: flex-start; }
  .card.lg { padding: 24px; }
  .grid3 { gap: 8px; }
  .months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ub { max-width: 85%; }
  .sc .l { width: 104px; }
  .top-actions .btn.s { display: none; }
  .palm-photo { width: 100%; height: 240px; }
}
.d-block { display: block; }
.grow { flex: 1 1 240px; }

/* Telegram: QR-карточка в боковой панели, кнопка-плитка на телефоне */
.tg-card { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); transition: border-color .15s; }
.tg-card:hover { border-color: #8b8e8b; color: var(--text); }
.tg-card img { width: 72px; height: 72px; flex: none; border-radius: 8px; }
.tg-card-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; line-height: 1.4; }
.tg-name { color: var(--accent-soft-ink); font-weight: 600; }

/* Переключатель направлений: всегда видно, где вы и куда можно перейти */
.dirs { grid-column: 1 / -1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 8px; }
.dirs::-webkit-scrollbar { display: none; }
.dir { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; white-space: nowrap; transition: border-color .15s, background .15s; }
.dir:hover { border-color: #8b8e8b; color: var(--text); }
.dir.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.dir .ic { width: 16px; height: 16px; }

/* Строка ввода: заметная, с мягкой жёлтой рамкой */
.composer { border: 2px solid var(--accent); padding: 6px 6px 6px 16px; }
.composer:focus-within { border-color: var(--accent-ink); box-shadow: 0 0 0 4px rgba(245,192,43,.18), var(--shadow-up); }
.composer input { height: 48px; font-size: 16px; }
.composer input::placeholder { transition: opacity .3s; }
.composer.swap input::placeholder { opacity: 0; }

.cta-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.consent { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent-ink); }
.consent a { text-decoration: underline; }

@media (max-width: 767px) {
  .dir { height: 44px; }
}

.ai-note { text-align: center; }
.ai-note a { color: var(--muted); text-decoration: underline; }
.legal { gap: 16px; display: flex; flex-direction: column; max-width: 70ch; }
.legal h2 { font-size: 24px; line-height: 1.4; margin: 0; }
.legal h3 { font-size: 20px; line-height: 1.4; margin: 16px 0 0; }
.legal p, .legal li { font-size: 16px; line-height: 1.6; margin: 0; }
.legal ol, .legal ul { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; }
.legal a { text-decoration: underline; }

/* Поле ввода: крупнее, иконка астролога слева */
.composer { min-height: 56px; }
.composer-av { flex: none; }
.composer input { height: 52px; }

/* Подсказка первого визита */
.tip { align-self: center; width: auto !important; max-width: 100%; padding: 8px 16px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; font: inherit; font-size: 14px; cursor: pointer; box-shadow: var(--shadow-up); }
.tip::after { content: " ✕"; opacity: .6; }

/* Telegram: тёмная плитка с QR среди плиток и широкая карточка ниже первого экрана */
.dk.tg-tile { display: flex; grid-column: 1 / -1; min-height: 136px; flex-direction: row; align-items: center; gap: 24px; }
.dk.tg-tile .dkt { max-width: none; flex: 1; }
.dk.tg-tile .tg-qr { width: 96px; height: 96px; flex: none; border-radius: 12px; background: #fff; padding: 8px; }
.tg-wide { width: 100%; max-width: var(--container, 880px); display: flex; align-items: center; gap: 24px; padding: 24px; border-radius: var(--r-card); background: var(--ink); color: #fff; }
.tg-wide:hover { color: #fff; }
.tg-wide img { width: 112px; height: 112px; flex: none; border-radius: 12px; background: #fff; padding: 8px; }
.tg-wide > .stack-8 { flex: 1; }
.tg-wide .btn { flex: none; }

/* Оглавление юридических страниц */
.legal { max-width: 784px; }
.toc { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--bg); font-size: 14px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--link-hover); }

/* Нижние вкладки на телефоне */
.tabbar { display: none; }
@media (max-width: 767px) {
  :root { --top-h: 56px; }
  .top { height: 56px; }
  .tabbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 52px; border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); border-radius: 8px; cursor: pointer; }
  .tabbar .on { color: var(--text); font-weight: 600; }
  .tabbar .on .ic { color: var(--accent-ink); }
  .dock { bottom: calc(60px + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .topbar .dirs { display: none; }
  .composer { min-height: 48px; }
  .composer input { height: 44px; }
  .composer-av { display: none; }
  .dk.tg-tile { min-height: 88px; }
  .dk.tg-tile .tg-qr { display: none; }
  .tg-wide { flex-direction: column; align-items: flex-start; }
  .tg-wide img { display: none; }
  .hdr-back { display: inline-flex; }
}

/* Плавающая строка не перекрывает текст: под ней мягкая подложка в цвет фона */
.dock { background: linear-gradient(to bottom, rgba(247,247,245,0), var(--bg) 45%); }
/* Подсказка первого визита компактная, в одну строку */
.tip { font-size: 12px; padding: 4px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: none; }
/* Главная: плитки целиком видны на первом экране над строкой ввода */
.hello svg { width: 72px; height: 72px; }
.hello { gap: 4px; padding-top: 0; }
.dk.hero, .dk.tall { min-height: 216px; }
.dk.small { min-height: 176px; }
@media (max-width: 767px) {
  .work-in { padding-bottom: calc(var(--dock-h) + 64px); }
}

/* ——— Раунд 3: закреплённые элементы, выдвижное меню, сворачиваемая строка ——— */
html, body { overflow-x: clip; overscroll-behavior-x: none; }
.top, .dock, .tabbar { touch-action: pan-y; }
.side-close { display: none; }

.wz-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.wz-nav .btn { flex: 0 0 auto; }

.dock-min, .dock-open { display: none; }
.dock-min { align-self: flex-end; width: auto !important; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--muted); font: inherit; font-size: 12px; align-items: center; gap: 4px; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.dock-min .ic { width: 16px; height: 16px; }
@media (min-width: 0px) { .dock-min { display: inline-flex; } }
.dock-open { align-self: flex-end; width: auto !important; height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--accent); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; align-items: center; gap: 8px; cursor: pointer; box-shadow: var(--shadow-up); }
body.dock-collapsed .dock > :not(.dock-open) { display: none !important; }
body.dock-collapsed .dock-open { display: inline-flex; }
body.dock-collapsed .dock { background: none; }

.palm-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

@media (max-width: 1023px) {
  .side { left: auto; right: 0; transform: translateX(100%); width: min(360px, 88vw); height: 100dvh; max-height: 100dvh; top: 0; bottom: 0; padding: 64px 24px 24px; z-index: 60; }
  .side.open { transform: none; }
  .scrim.open { z-index: 55; }
  .side-close { display: inline-flex; position: absolute; top: 8px; right: 8px; }
  .side-close .ic { transform: rotate(45deg); }
}

@media (max-width: 767px) {
  .hdr-back { display: none !important; }
  .topbar .back { display: inline-flex !important; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto !important; }
  .topbar-t { text-align: center !important; }
  /* Строка вопроса закреплена над вкладками и не уезжает: фиксированная позиция, фиксированная высота кнопок */
  .dock { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); height: auto; margin: 0; padding: 8px 16px; z-index: 24; }
  .quick { flex-wrap: nowrap; min-height: 48px; align-items: center; overflow-y: hidden; }
  .quick .chip { min-height: 40px; }
  .work-in, .work-in.wide { padding-bottom: 232px !important; }
  #below { padding-bottom: 232px; }
  body.dock-collapsed .work-in, body.dock-collapsed .work-in.wide { padding-bottom: 96px !important; }
  .palm-actions .btn, .palm-actions .drop { width: 100%; }
}
/* Кнопка «Свернуть» не занимает отдельную строку: висит в углу над строкой вопроса */
.dock { position: sticky; }
.dock-min { position: static; align-self: flex-end; margin-right: max(0px, calc((100% - (var(--work-w) - 2 * var(--pad))) / 2)); }
@media (max-width: 767px) {
  .dock { position: fixed; padding-top: 4px; gap: 4px; }
  .dock-min { top: -32px; bottom: auto; right: 16px; height: 28px; }
  .topbar .change { display: none !important; }
  .topbar { grid-template-columns: auto minmax(0, 1fr) !important; }
  .topbar-t { text-align: right !important; }
  .ai-note { font-size: 12px; line-height: 1.2; }
}

.steps-bar .lbl { width: auto; white-space: nowrap; }
@media (max-width: 767px) {
  .top-actions { margin-left: auto; }
  .dock-min { position: absolute; margin: 0; }
}
