/* «Пол-оборота» — страница студии в корне домена. Мир страницы: ворота автосервиса ночью — сервис закрыт, а запись идёт.
   Токены и решения — DESIGN.md (раздел «Страница студии»). Шрифты свои (OFL), внешних запросов нет — обещание в Политике. */
@font-face { font-family: "Onest"; font-weight: 400 700; font-display: swap; src: url("fonts/Onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-weight: 400 700; font-display: swap; src: url("fonts/Onest-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-weight: 400 700; font-display: swap; src: url("fonts/Onest-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans Condensed"; font-weight: 400 800; font-display: swap; src: url("fonts/SofiaSansCondensed-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia Sans Condensed"; font-weight: 400 800; font-display: swap; src: url("fonts/SofiaSansCondensed-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sofia Sans Condensed"; font-weight: 400 800; font-display: swap; src: url("fonts/SofiaSansCondensed-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --night: #0B0D0F;          /* улица ночью: под воротами и в подвале страницы */
  --bg: #101315;             /* внутри сервиса */
  --surface: #171B1E;
  --surface-2: #1E2327;
  --surface-3: #272D32;
  --line: #2A3035;
  --line-strong: #6A747E;    /* рамки полей, ≥ 3:1 */
  --text: #ECEEF0;
  --text-2: #CBD1D6;
  --muted: #A7B0B8;          /* вторичный текст: ≥ 7:1 к --bg, ≥ 6:1 к воротам */
  --faint: #6E7881;          /* только неактивное */
  --accent: #FFB547;         /* янтарь приборки: главная кнопка, свет из-под ворот, выбранное */
  --accent-hover: #FFC46B;
  --on-accent: #1B1205;
  --glow: rgba(255, 181, 71, .30);
  --danger: #FF8A7A;
  --ok: #63D69B;
  --focus: #FFC46B;
  /* ворота: короб, ламели (плоские полосы — профиль ламели освещён сверху), нижняя планка */
  --korob: #1A1E22;
  --gate: #15191C;
  --slats: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='26'%3E%3Crect width='8' height='26' fill='%2315191C'/%3E%3Crect width='8' height='2' fill='%23202529'/%3E%3Crect y='2' width='8' height='1' fill='%231B2023'/%3E%3Crect y='16' width='8' height='8' fill='%23121518'/%3E%3Crect y='24' width='8' height='2' fill='%23090B0C'/%3E%3C/svg%3E");
  --bar: #1F2529;

  --font-text: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "Sofia Sans Condensed", "Arial Narrow", var(--font-text);
  --fs-h1: clamp(2.6rem, .8rem + 5vw, 6.25rem);
  --fs-h2: clamp(2.25rem, 1.35rem + 3.1vw, 4.25rem);
  --fs-h3: clamp(1.5rem, 1.15rem + 1.1vw, 2.125rem);
  --fs-lead: clamp(1.0625rem, .98rem + .42vw, 1.3125rem);
  --fs-body: clamp(1rem, .96rem + .2vw, 1.125rem);
  --fs-sm: .9375rem;
  --fs-xs: .8125rem;

  --m: 16px;
  --maxw: 1440px;
  --px: max(var(--m), calc((100vw - var(--maxw)) / 2 + var(--m)));
  --top-h: 64px;
  --floor: 30px;
  --sec: clamp(88px, 40px + 8vw, 168px);
  --r: 10px;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --ease-o: cubic-bezier(.16, 1, .3, 1);
  interpolate-size: allow-keywords;
}
@media (min-width: 720px) { :root { --m: 32px; } }
@media (min-width: 1200px) { :root { --m: 48px; --top-h: 72px; --floor: 34px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: #343B41 var(--night); }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-body)/1.55 var(--font-text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 700; line-height: 1.02; }
p { text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: from-font; text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: var(--accent); }
::selection { background: rgba(255, 181, 71, .32); color: #fff; }
input, textarea, button { font: inherit; color: inherit; caret-color: var(--accent); }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.nw { white-space: nowrap; }
svg.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.wrap { padding-inline: var(--px); }

/* ---------- кнопки: главная — янтарь, одна на экран ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 30px; border-radius: var(--r);
  font-weight: 600; font-size: 1.0625rem; text-decoration: none; white-space: nowrap; border: 0;
  transition: background-color 140ms var(--ease), transform 140ms var(--ease); }
.btn-main { background: var(--accent); color: var(--on-accent); }
.btn-main:hover { background: var(--accent-hover); }
.btn-main:active { transform: translateY(1px); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.btn-quiet:hover { background: var(--surface-3); }
.btn[disabled] { background: var(--surface-3); color: var(--muted); cursor: progress; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* ========== 1. Ночь: ворота закрыты, запись идёт ========== */
.night { position: relative; background: var(--night); }
.stage { position: relative; display: grid; grid-template-rows: var(--top-h) auto var(--floor) auto; overflow: clip; }

/* короб ворот — он же шапка сайта */
.korob { grid-row: 1; position: relative; z-index: 4; display: flex; align-items: center; gap: 24px; padding-inline: var(--px); background: var(--korob); box-shadow: inset 0 -3px 0 #0A0C0D; } /* taste-skill-ignore: кромка короба ворот */
.mark { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-right: auto; font-family: var(--font-num); font-weight: 700; font-size: 1.375rem; letter-spacing: .01em; text-decoration: none; }
.mark svg { width: 30px; height: 30px; }
.nav { display: none; gap: 34px; font-size: var(--fs-sm); color: var(--muted); }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.nav a:hover { color: var(--text); }
.go { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.go:hover { color: var(--accent); }

/* ворота */
.gate { grid-row: 2; grid-column: 1; position: relative; z-index: 2; display: grid; grid-template-rows: 1fr auto;
  min-height: calc(100svh - var(--top-h) - var(--floor)); background: var(--gate) var(--slats) 0 0 / 8px 26px; overflow: clip; }
.gate-in { display: grid; gap: 32px; align-content: center; padding: 36px var(--px) 40px; }
.hero h1, .gate h1 { font-family: var(--font-num); font-weight: 800; font-size: var(--fs-h1); line-height: .88; letter-spacing: -.014em; color: #F1F2F3; }
.lead { margin-top: 22px; font-size: var(--fs-lead); line-height: 1.5; max-width: 27em; color: #E6E9EB; }
.cta { display: grid; gap: 14px; margin-top: 30px; }
.cta .sub { color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; max-width: 31em; }
.cta .sub b { color: var(--text); font-weight: 600; }

/* табличка на воротах и телефон владельца перед ними */
.scene { position: relative; display: grid; grid-template-columns: 38% 1fr; gap: 14px; align-items: start; }
.sign { display: grid; gap: 12px; }
.sign a { display: block; rotate: -1.4deg; transition: rotate 300ms var(--ease); border-radius: 2px; }
.sign a:hover { rotate: 0deg; }
.sign img { width: 100%; height: auto; border-radius: 2px; }
.sign figcaption { font-size: var(--fs-xs); line-height: 1.45; color: var(--muted); }
.sign .kam { display: none; }
.own { justify-self: end; position: relative; z-index: 3; }

.bar { height: 28px; position: relative; background: var(--bar); box-shadow: inset 0 2px 0 #2A3136, inset 0 -3px 0 #0E1113; } /* taste-skill-ignore: кромки нижней планки */
.bar .lock { position: absolute; left: 50%; top: 7px; width: 46px; height: 14px; margin-left: -23px; border-radius: 3px; background: #2B3237; }
.bar .lock::after { content: ""; position: absolute; left: 50%; top: 3px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #0E1113; }
.floor { grid-row: 3; grid-column: 1; position: relative; z-index: 1; background: var(--night); }
.floor::before, .niz::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent);
  box-shadow: 0 0 14px 2px rgba(255, 181, 71, .42), 0 6px 40px 6px rgba(255, 181, 71, .13); } /* taste-skill-ignore: свет из-под ворот */

/* телефон владельца: экран блокировки в 21:40; утром — чат с ботом */
.phone { --pw: min(54vw, 230px); position: relative; width: var(--pw); aspect-ratio: 390 / 844; font-size: calc(var(--pw) / 26);
  border-radius: calc(var(--pw) * .145); padding: calc(var(--pw) * .028); background: #1A1F23;
  box-shadow: inset 0 0 0 1.5px #2C3338, inset 0 0 0 4px #121518; } /* taste-skill-ignore: рамка корпуса телефона */
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #23292D; }
.phone::before { left: -3px; top: 21%; height: 7%; box-shadow: 0 calc(var(--pw) * .15) 0 #23292D; } /* taste-skill-ignore: кнопки корпуса */
.phone::after { right: -3px; top: 27%; height: 11%; }
.phone .scr { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * .118); background: #07090A; }
/* телефоны со снимком: строка состояния сверху, снимок 390×844 под ней без обрезки */
.phone.ekr { aspect-ratio: 390 / 854; }
.phone.ekr .scr { display: grid; grid-template-rows: calc(var(--pw) * .09) 1fr; background: #111317; }
.phone.pr .scr { background: #0A0C0E; }
.sb { position: relative; display: flex; align-items: center; justify-content: space-between; padding: .2em 1.9em 0 2.3em; font-weight: 600; font-size: .95em; color: #ECEEF0; }
.sb .pt { position: absolute; left: 50%; top: 50%; width: 1.05em; height: 1.05em; margin: -.42em 0 0 -.525em; border-radius: 50%; background: #000; }
.sb .bt { position: relative; width: 1.75em; height: .85em; border-radius: .25em; border: 1.5px solid rgba(236, 238, 240, .6); }
.sb .bt::after { content: ""; position: absolute; top: 1.5px; bottom: 1.5px; left: 1.5px; right: 30%; border-radius: .12em; background: #ECEEF0; }
.ek { position: relative; overflow: hidden; grid-row: 2; grid-column: 1; }
/* живые даты поверх снимка пульта: лента дней и «Сегодня, …» — в цветах самого пульта, места — по снимку 780×1688 */
.pd { grid-row: 2; grid-column: 1; position: relative; z-index: 1; container-type: inline-size; pointer-events: none; }
.pd > span { position: absolute; top: 8.18%; height: 4.98%; width: 11.3%; display: grid; align-content: center; justify-items: center; row-gap: .4cqi; background: #161A1E; line-height: 1; }
.pd > .seg { background: #272E32; }
.pd i { font-style: normal; font-size: 3.55cqi; color: #A8ADB2; }
.pd b { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 5.1cqi; letter-spacing: .02em; color: #F5F9FC; }
.pd > .vch b { color: #ACB2B9; }
.pd > .zag { left: 3.6%; top: 17.06%; width: 68%; height: 3.4%; justify-items: start; background: #111315; font-family: var(--font-num); font-weight: 750; font-size: 5.85cqi; color: #ECEEF0; }
.ek > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity 380ms var(--ease); }
.ek > img.nov { opacity: 0; }
.ek iframe { position: absolute; left: 0; top: 0; width: 390px; height: 844px; border: 0; transform-origin: 0 0; background: #0A0C0E; opacity: 0; transition: opacity 450ms var(--ease); }
.ek iframe.gotov { opacity: 1; }
.lockscr { position: absolute; inset: 0; display: grid; justify-items: center; align-content: start; grid-template-rows: auto auto auto 1fr auto; background: #0A0D0F; color: #F3F4F5; }
.lockscr > :not(.oboi) { position: relative; }
/* обои: ночью — тёмные с янтарём снизу, как свет из-под ворот; утром — рассвет */
.oboi { position: absolute; inset: 0; background: radial-gradient(140% 55% at 50% 118%, rgba(255, 181, 71, .2), rgba(255, 181, 71, 0) 62%), #0A0D0F; } /* taste-skill-ignore: обои телефона */
.oboi::after { content: ""; position: absolute; inset: 0; opacity: 0; background: radial-gradient(150% 68% at 50% 114%, #E9A456, rgba(199, 116, 52, .6) 32%, rgba(40, 52, 70, 0) 72%), linear-gradient(#22324A, #141C26 55%, #0E1319); } /* taste-skill-ignore: обои телефона */
.lockscr .date, .lockscr .clock { display: grid; }
.lockscr .date > span, .lockscr .clock > span { grid-area: 1 / 1; text-align: center; }
.lockscr .utr { opacity: 0; }
.sw { display: inline-grid; justify-items: start; }
.sw > * { grid-area: 1 / 1; }
/* карточка бота: «до» — как пришла в 21:40, «после» — бот переписал её, когда утром нажали «Подтвердить».
   Без анимации видно «после»; в сцене с воротами нажатие проигрывается при прокрутке */
.do { opacity: 0; }
.msg .st { display: block; margin-top: 1.36em; overflow: hidden; max-height: 3em; }
.tgc.zhdet .do { opacity: 1; }
.tgc.zhdet .po { opacity: 0; }
.tgc.zhdet .st { max-height: 0; margin-top: 0; opacity: 0; }
.tgc.zhdet .do, .tgc.zhdet .po, .tgc.zhdet .st { transition: opacity 320ms var(--ease), max-height 520ms var(--ease-o), margin-top 520ms var(--ease-o); }
.tgc.zhdet.nazh .ok { background: #3A434A; scale: .95; transition: background-color 120ms, scale 120ms; }
.tgc.zhdet.nazh .tap { animation: kasanie-t 620ms var(--ease-o); }
.tgc.zhdet.prinyata .do { opacity: 0; }
.tgc.zhdet.prinyata .po { opacity: 1; }
.tgc.zhdet.prinyata .st { max-height: 3em; margin-top: 1.36em; opacity: 1; }
@keyframes kasanie-t { from { opacity: 0; scale: .4; } 35% { opacity: 1; scale: 1; } to { opacity: 0; scale: 1.7; } }
.lockscr .cam { width: 1.05em; height: 1.05em; border-radius: 50%; background: #000; margin-top: .85em; }
.lockscr .date { margin-top: 2.2em; min-height: 1.4em; font-weight: 500; font-size: 1.05em; color: #D9DDE0; }
.lockscr .clock { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 500; font-size: 6.6em; line-height: .95; letter-spacing: -.01em; }
.notif { width: calc(100% - 1.6em); align-self: start; margin-top: 4.4em; display: grid; grid-template-columns: 2.5em 1fr; gap: .2em .75em;
  padding: .9em 1em 1em; border-radius: 1.45em; background: #232A2F; text-align: left; }
.notif .ava, .tg-ava { display: grid; place-items: center; width: 2.5em; height: 2.5em; border-radius: 50%; background: #2F373D; }
.notif .ava { grid-row: span 2; }
.notif .ava svg, .tg-ava svg { width: 1.6em; height: 1.6em; }
.notif .h { display: flex; justify-content: space-between; gap: .5em; font-size: .93em; }
.notif .h b { font-weight: 600; }
.notif .h span { color: #A3ACB4; }
.notif .b { grid-column: 2; font-size: .93em; line-height: 1.38; white-space: pre-line; color: #E6E9EB; }
.niz-ekr { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0 1.7em 1.5em; }
.niz-ekr .kn { display: grid; place-items: center; width: 2.9em; height: 2.9em; border-radius: 50%; background: rgba(46, 53, 60, .7); }
.niz-ekr svg { width: 1.3em; height: 1.3em; fill: none; stroke: #E6E9EB; stroke-width: 1.6; stroke-linejoin: round; }
.niz-ekr .home { position: absolute; left: 32%; right: 32%; bottom: .5em; height: .3em; border-radius: 1em; background: #E6E9EB; opacity: .8; }
.wake .lockscr { animation: wake 1000ms var(--ease) 200ms both; }
.wake .phone { animation: buzz 480ms linear 1150ms; }
@keyframes buzz { 12%, 50%, 88% { transform: translateX(-2px) rotate(-.5deg); } 31%, 69% { transform: translateX(2px) rotate(.5deg); } }
.wake .notif { animation: drop 520ms var(--ease) 1100ms both; }
@keyframes wake { from { filter: brightness(0); } 55% { filter: brightness(.85); } }
@keyframes drop { from { opacity: 0; transform: translateY(-.8em) scale(.98); } }

/* чат с ботом (утро) — в цветах страницы, разметка как у Telegram: шапка, сообщение с кнопками, кнопки под полем ввода */
.chat { position: absolute; inset: 0; display: none; grid-template-rows: auto 1fr auto; background: #0C0F11; font-size: 1em; line-height: 1.36; }
.chat-head { display: grid; grid-template-columns: 1em 2.5em 1fr; gap: .6em; align-items: center; padding: 2.6em .9em .7em; background: var(--surface); }
.chat-head .back { color: var(--muted); font-size: 1.3em; line-height: 1; }
.chat-head b { display: block; font-weight: 600; font-size: 1em; }
.chat-head span { color: var(--muted); font-size: .85em; }
.chat-body { display: flex; flex-direction: column; justify-content: flex-end; gap: .3em; padding: .8em .7em; }
.chat-day { align-self: center; padding: .15em .8em; margin-bottom: .4em; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .8em; }
.msg { align-self: flex-start; max-width: 94%; padding: .6em .85em .45em; border-radius: 1.05em 1.05em 1.05em .35em; background: var(--surface-3); white-space: pre-line; font-size: .95em; }
.msg time { display: block; text-align: right; color: var(--muted); font-size: .78em; margin-top: .1em; }
.kb { display: grid; max-width: 94%; }
.kb > div { grid-area: 1 / 1; display: grid; grid-template-columns: 1fr 1fr; gap: .25em; }
.kb span { position: relative; padding: .55em .3em; border-radius: .6em; background: var(--surface-2); text-align: center; font-weight: 500; font-size: .9em; }
.kb .tap { position: absolute; left: 50%; top: 50%; width: 2.6em; height: 2.6em; margin: -1.3em 0 0 -1.3em; border-radius: 50%; background: rgba(255, 255, 255, .35); opacity: 0; pointer-events: none; }
.kb .w { grid-column: span 2; }
.chat-foot { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .3em; padding: .45em .7em 2em; background: var(--surface); }
.chat-foot::after { content: ""; position: absolute; left: 32%; right: 32%; bottom: .55em; height: .3em; border-radius: 1em; background: #E6E9EB; opacity: .8; }
.chat-foot span { padding: .6em .3em; border-radius: .55em; background: var(--surface-2); text-align: center; font-size: .9em; }
.chat-foot .w { grid-column: span 2; }
.chat-foot .vvod { grid-column: span 2; display: flex; gap: .6em; align-items: center; margin-top: .2em; background: none; padding: .2em .3em 0; color: var(--faint); text-align: left; }
.chat-foot .vvod b { padding: .45em .8em; border-radius: .55em; background: var(--surface-3); color: var(--text); font-weight: 600; }

/* утро за воротами */
.utro { grid-row: 4; grid-column: 1; position: relative; z-index: 1; display: grid; gap: 36px; align-content: center; padding: var(--sec) var(--px); background: #1A1F23; }
.utro .tgc { background: var(--bg); }
.utro .t { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: clamp(4.5rem, 2.4rem + 6.5vw, 7rem); line-height: .82; color: #F1F2F3; }
.utro h2 { margin-top: 22px; font-family: var(--font-num); font-weight: 750; font-size: var(--fs-h2); line-height: .96; letter-spacing: -.01em; max-width: 12em; }
.utro p.x { margin-top: 20px; max-width: 30em; }
.tgc { width: 100%; max-width: 400px; padding: 14px 14px 16px; border-radius: 22px; background: var(--surface); }
.tgc-head { display: grid; grid-template-columns: 2.5em 1fr; gap: 10px; align-items: center; padding: 2px 2px 12px; font-size: .9375rem; }
.tgc-head b { display: block; font-weight: 600; line-height: 1.2; }
.tgc-head span { color: var(--muted); font-size: .8125rem; }
.tgc .msg { max-width: none; font-size: .9375rem; line-height: 1.42; }
.tgc .kb { max-width: none; margin-top: 4px; }
.tgc .kb span { font-size: .875rem; padding: 10px 6px; border-radius: 10px; }

/* ========== общие блоки ========== */
.sec { padding-block: var(--sec); }
.sec h2 { font-family: var(--font-num); font-weight: 750; font-size: var(--fs-h2); line-height: .96; letter-spacing: -.01em; }
.sec .intro { margin-top: 20px; max-width: 34em; font-size: var(--fs-lead); line-height: 1.5; color: var(--text-2); }
.note { color: var(--muted); font-size: var(--fs-sm); }

/* 3. Подключение: лента времени */
.kak { background: var(--bg); }
.lenta { margin-top: 64px; display: grid; gap: 40px; counter-reset: lenta; }
.lenta li { display: grid; gap: 12px; align-content: start; }
.lenta .risk { height: 6px; border-radius: 3px; background: var(--surface-3); }
.lenta li:first-child .risk { background: var(--accent); }
/* со скриптом шкала заполняется по шагам, когда лента появилась на экране */
.jsr .lenta .risk { position: relative; overflow: hidden; }
.jsr .lenta li:first-child .risk { background: var(--surface-3); }
.jsr .lenta .risk::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 900ms var(--ease-o) calc(250ms + var(--i, 0) * 280ms); }
.jsr .lenta li:not(:first-child) .risk::after { background: #4A535A; }
.jsr .lenta li.in .risk::after { transform: none; }
.lenta h3 { margin-top: 10px; font-family: var(--font-num); font-weight: 750; font-size: clamp(2rem, 1.3rem + 2vw, 3rem); line-height: .95; letter-spacing: -.01em; }
.lenta p { color: var(--text-2); max-width: 26em; }

/* 4. Пульт: вкладки как в самом пульте, справа — телефон с экраном вкладки */
.pult { background: var(--surface); }
.pult-in { display: grid; gap: 48px; }
.tabs { margin-top: 40px; display: grid; gap: 6px; }
.tab { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 6px 16px; align-items: start; width: 100%; padding: 16px 18px; border-radius: 14px; text-align: left; color: var(--text-2);
  transition: background-color 140ms var(--ease), color 140ms var(--ease); }
.tab svg.i { width: 26px; height: 26px; margin-top: 2px; color: var(--muted); }
.tab b { display: block; font-family: var(--font-num); font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: var(--text); }
.tab span { display: block; grid-column: 2; font-size: var(--fs-sm); line-height: 1.5; }
.tab:hover { background: var(--surface-2); }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); }
.tab[aria-selected="true"] svg.i { color: var(--accent); }
.tab::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--accent); opacity: 0; transform: scaleX(0); transform-origin: left; }
.tabs.avto .tab[aria-selected="true"]::after { opacity: .85; animation: prog 6500ms linear forwards; }
.tabs.avto:hover .tab::after, .tabs.avto:focus-within .tab::after { animation-play-state: paused; }
@keyframes prog { to { transform: none; } }
.pult-ekran { display: grid; justify-items: center; gap: 16px; }
.pult-ekran .phone { --pw: min(80vw, 340px); }
.pult-ekran .note { text-align: center; max-width: 24em; }
.shoty { display: none; }

/* 5. Водитель: живая страница примера в телефоне */
.klient { background: var(--bg); }
.klient { padding-top: calc(var(--sec) * .6); }
.klient-in { display: grid; gap: 48px; }
.punkty { margin-top: 36px; display: grid; gap: 22px; }
.punkty li { display: grid; grid-template-columns: 26px 1fr; gap: 16px; align-items: start; }
.punkty svg.i { width: 26px; height: 26px; color: var(--muted); margin-top: 1px; }
.punkty p { max-width: 30em; }
.zhivoy { display: grid; justify-items: center; gap: 16px; }
.zhivoy .phone { --pw: min(80vw, 360px); }
.zhivoy .poprobovat { min-height: 48px; padding: 0 22px; font-size: 1rem; }
.zhivoy .note { text-align: center; max-width: 26em; }

/* 6. Цена: строки прайса, как в списке услуг на странице записи */
.cena { background: var(--gate) var(--slats) 0 0 / 8px 26px; overflow-x: clip; }
.cena-big { color: #F1F2F3; }
.cena-in { display: grid; gap: 48px; }
.cena-big { font-family: var(--font-num); font-weight: 750; font-size: var(--fs-h2); line-height: .96; letter-spacing: -.01em; }
.cena-big b { font-weight: 800; }
.list { position: relative; justify-self: center; width: 100%; max-width: 560px; margin: 0; padding: 34px 26px 22px; border-radius: 3px; background: #F2F0EA; color: #1A1E21; rotate: -.5deg;
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .8), 0 2px 3px rgba(0, 0, 0, .35); } /* taste-skill-ignore: лист на воротах, настоящая тень */
.magnit { position: absolute; top: 12px; left: 14px; width: 16px; height: 16px; border-radius: 50%; background: #2B3237; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .4); } /* taste-skill-ignore: магнит */
.magnit + .magnit { left: auto; right: 14px; }
@media (max-width: 559px) { .list { width: calc(100% - 14px); padding-inline: 20px; } }
.list-h { padding-bottom: 12px; font-family: var(--font-num); font-weight: 800; font-size: clamp(1.75rem, 1.35rem + 1vw, 2.25rem); line-height: 1; letter-spacing: .02em; text-transform: uppercase;
  box-shadow: inset 0 -2px 0 #1A1E21; } /* taste-skill-ignore: черта под заголовком листа */
.list .prais div + div { box-shadow: inset 0 1px 0 rgba(26, 30, 33, .16); } /* taste-skill-ignore: строки прайса */
.list .prais dt small { color: #545D65; }
.list-niz { margin-top: 6px; padding-top: 14px; box-shadow: inset 0 1px 0 rgba(26, 30, 33, .16); font-size: var(--fs-sm); color: #3F474E; } /* taste-skill-ignore: строки прайса */
.jsr .list.r { rotate: -3.5deg; translate: 0 -18px; transition: opacity 500ms var(--ease-o), translate 900ms var(--ease-o), rotate 1100ms var(--ease-o); }
.jsr .list.r.in { rotate: -.5deg; translate: none; }
.prais { display: grid; }
.prais div { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: baseline; padding: 18px 0; }
.prais div + div { box-shadow: inset 0 1px 0 var(--line); } /* taste-skill-ignore: строки прайса — таблица */
.prais dt { font-weight: 500; }
.prais dt small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; }
.prais dd { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.625rem; line-height: 1; white-space: nowrap; text-align: right; }
.usloviya { margin-top: 28px; display: grid; gap: 12px; color: var(--text-2); max-width: 34em; }
.cena .cta-row { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }

/* 7. Данные */
.dannye { background: var(--bg); }
.dannye-in { display: grid; gap: 40px; }
.dannye .ssylka { margin-top: 12px; }
.fakty { display: grid; gap: 28px; }
.fakty li { max-width: 32em; }
.fakty b { display: block; font-family: var(--font-num); font-weight: 700; font-size: 1.5rem; line-height: 1.1; margin-bottom: 6px; }
.fakty p { color: var(--text-2); }

/* 8. Вопросы */
.voprosy { background: var(--surface); }
.voprosy-in { display: grid; gap: 40px; }
.faq { margin-inline: calc(-1 * min(18px, var(--m))); }
.faq details { border-radius: 14px; }
.faq details + details { box-shadow: inset 0 1px 0 var(--line); } /* taste-skill-ignore: разделитель списка вопросов */
.faq details[open], .faq details[open] + details { box-shadow: none; } /* taste-skill-ignore: снимает разделитель */
.faq summary { display: grid; grid-template-columns: 1fr 24px; gap: 16px; align-items: center; min-height: 60px; padding: 16px 18px; border-radius: 14px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.0625rem; transition: background-color 140ms var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 14px; height: 14px; justify-self: center; background:
  linear-gradient(var(--muted), var(--muted)) center / 14px 2px no-repeat, linear-gradient(var(--muted), var(--muted)) center / 2px 14px no-repeat; transition: rotate 200ms var(--ease); } /* taste-skill-ignore: значок «плюс», не заливка */
.faq details[open] summary::after { rotate: 45deg; }
.faq summary:hover { background: var(--surface-2); }
.faq details[open] { background: var(--surface-2); }
.faq details > p { padding: 0 18px 18px; color: var(--text-2); max-width: 40em; }
.faq details::details-content { block-size: 0; overflow: clip; transition: block-size 340ms var(--ease-o), content-visibility 340ms allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

/* 9. Заявка: снова ворота — бланк на них */
.zayavka { background: var(--gate) var(--slats) 0 0 / 8px 26px; }
.zayavka-in { display: grid; gap: 40px; }
.zayavka h2 { color: #F1F2F3; }
.zayavka .intro { color: #E4E7EA; }
.svyaz { margin-top: 28px; display: grid; gap: 6px; color: var(--muted); font-size: var(--fs-sm); }
.svyaz a { color: var(--text); }
.blank { padding: 28px 22px 26px; border-radius: 20px; background: var(--surface); display: grid; gap: 20px; }
.pole { display: grid; gap: 8px; }
.pole label, .pole legend { font-weight: 500; font-size: var(--fs-sm); }
.pole small { color: var(--muted); font-weight: 400; font-size: inherit; }
.pole input, .pole textarea { width: 100%; min-height: 54px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--bg); font-size: 1rem;
  transition: border-color 140ms var(--ease); }
.pole textarea { min-height: 96px; padding: 14px 16px; resize: vertical; }
.pole input::placeholder, .pole textarea::placeholder { color: #7F8992; }
.pole input:focus, .pole textarea:focus { border-color: var(--text); outline: none; }
.pole input:focus-visible, .pole textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.pole [aria-invalid="true"] { border-color: var(--danger); }
fieldset.pole { margin: 0; padding: 0; border: 0; min-width: 0; }
.pole legend { padding: 0; margin-bottom: 8px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); }
.seg2 label { position: relative; display: grid; place-items: center; min-height: 46px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: var(--fs-sm); color: var(--muted); }
.seg2 input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg2 label:has(input:checked) { background: var(--surface-3); color: var(--text); }
.seg2 label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.err { color: var(--danger); font-size: var(--fs-sm); }
.err:empty { display: none; }
.soglasie { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; min-height: 44px; font-size: var(--fs-sm); color: var(--muted); cursor: pointer; }
.soglasie input { appearance: none; display: grid; place-content: center; width: 22px; height: 22px; margin: 1px 0 0; border: 1.5px solid var(--line-strong); border-radius: 6px;
  background: var(--bg); cursor: pointer; transition: background-color 140ms var(--ease), border-color 140ms var(--ease); }
.soglasie input::after { content: ""; width: 11px; height: 6px; border: solid var(--on-accent); border-width: 0 0 2px 2px; rotate: -45deg; translate: 0 -1px; opacity: 0; }
.soglasie input:checked { background: var(--accent); border-color: var(--accent); }
.soglasie input:checked::after { opacity: 1; }
.soglasie input[aria-invalid="true"] { border-color: var(--danger); }
.soglasie input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.soglasie a { color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* taste-skill-ignore: скрытая ловушка */
.blank .btn-main { width: 100%; }
.otvet { padding: 14px 16px; border-radius: 12px; font-size: var(--fs-sm); }
.otvet:empty { display: none; }
.otvet.oshibka { background: rgba(255, 138, 122, .1); color: var(--danger); }
.gotovo { display: grid; gap: 14px; padding: 8px 0 4px; }
.gotovo h3 { font-family: var(--font-num); font-weight: 750; font-size: var(--fs-h3); line-height: 1; }
.gotovo p { color: var(--text-2); }

/* 10. Подвал: пол под воротами, свет из-под планки и знак */
.niz { position: relative; padding: 72px var(--px) calc(48px + env(safe-area-inset-bottom)); background: var(--night); color: var(--muted); font-size: var(--fs-sm); }
.niz-znak { color: var(--text); }
.niz-in { margin-top: 48px; display: grid; gap: 32px; }
.niz h2 { font-family: var(--font-text); font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.niz li { min-height: 36px; display: flex; align-items: center; }
.niz a { color: var(--text-2); display: inline-flex; align-items: center; min-height: 44px; }
.cena .cta-row > a:not(.btn), .dannye .ssylka a { display: inline-flex; align-items: center; min-height: 44px; }
.niz a:hover { color: var(--text); }
.niz .kopi { margin-top: 48px; color: var(--muted); font-size: var(--fs-xs); }

/* ---------- планшет и шире ---------- */
@media (min-width: 560px) {
  .cta { justify-items: start; }
  .phone { --pw: min(46vw, 260px); }
  .niz-in { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .lenta { grid-template-columns: 1fr 1fr; column-gap: 32px; row-gap: 48px; }
  .fakty { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .blank { padding: 36px 34px 32px; }
}
@media (min-width: 1024px) {
  .nav { display: flex; }
  .gate-in { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; column-gap: 48px; padding-block: 32px; }
  .scene { display: grid; grid-template-columns: clamp(124px, 13vw, 230px) auto; justify-content: space-between; align-items: center; column-gap: clamp(16px, 2vw, 32px); }
  .sign { align-self: start; margin-top: 7vh; }
  .sign .kam { display: inline; }
  .sign .tap { display: none; }
  .phone { --pw: clamp(240px, 19vw, 330px); }
  :root { --pw-own: min(clamp(205px, 19vw, 330px), calc((100svh - var(--top-h) - var(--floor) - 80px) * .462)); }
  .own .phone { --pw: var(--pw-own); }
  .utro { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 48px; align-items: center; }
  .utro .tgc { justify-self: center; }
  .lenta { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; }
  .lenta h3 { min-height: 1.9em; }
  .pult-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: 64px; }
  .pult-ekran { justify-self: center; }
  .klient-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; column-gap: 64px; }
  .klient-in > div { position: sticky; top: 112px; padding-top: 24px; }
  .zhivoy { order: -1; }
  .cena-in, .dannye-in, .voprosy-in, .zayavka-in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 64px; align-items: start; }
  .niz-in { grid-template-columns: 1.2fr 1fr 1.2fr; }
}

/* ворота поднимаются при прокрутке: десктоп, браузер умеет анимацию от прокрутки, движение не выключено.
   Телефон стоит на месте (сдвиг навстречу воротам), на его экране наступает утро. Иначе — всё статично. */
@supports (animation-timeline: view()) {
  @media (min-width: 1024px) and (min-height: 680px) and (prefers-reduced-motion: no-preference) {
    .night { height: 205svh; view-timeline: --night block; }
    .stage { position: sticky; top: 0; height: 100svh; grid-template-rows: var(--top-h) 1fr var(--floor); }
    .gate, .utro { grid-row: 2; min-height: 0; }
    .utro { padding-block: 32px; }
    .utro .tgc { visibility: hidden; }
    .night .do { animation: skryt linear both; animation-timeline: --night; animation-range: contain 70% contain 74%; }
    .night .po { animation: rassvet linear both; animation-timeline: --night; animation-range: contain 72% contain 77%; }
    .night .msg .st { animation: rasti linear both; animation-timeline: --night; animation-range: contain 72% contain 77%; }
    .night .kb .ok { animation: nazhat linear both; animation-timeline: --night; animation-range: contain 64% contain 71%; }
    .night .kb .tap { animation: kasanie linear both; animation-timeline: --night; animation-range: contain 64% contain 71%; }
    @keyframes skryt { from { opacity: 1; } to { opacity: 0; } }
    @keyframes rasti { from { max-height: 0; margin-top: 0; opacity: 0; } to { max-height: 3em; opacity: 1; } }
    @keyframes nazhat { 0%, 30% { background: var(--surface-2); scale: 1; } 55% { background: #3A434A; scale: .95; } 100% { background: #3A434A; scale: 1; } }
    @keyframes kasanie { 0%, 25% { opacity: 0; scale: .4; } 50% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.7; } }
    @media (min-width: 1280px) {
      .utro { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px) var(--pw-own); column-gap: 48px; }
      .utro h2 { font-size: clamp(2.5rem, .4rem + 3.2vw, 3.9rem); }
      .utro .tgc { visibility: visible; grid-column: 2; justify-self: stretch; animation: otkryt linear both; animation-timeline: --night; animation-range: contain 56% contain 63%; }
    }
    .gate { overflow: visible; --vys: calc(100svh - var(--top-h) - var(--floor)); animation: podnyat linear both; animation-timeline: --night; animation-range: contain 0% contain 52%; }
    .own { animation: stoyat linear both; animation-timeline: --night; animation-range: contain 0% contain 52%; }
    .floor { animation: pogasit linear both; animation-timeline: --night; animation-range: contain 0% contain 22%; }
    .own .lockscr { animation: pogasit linear both; animation-timeline: --night; animation-range: contain 45% contain 51%; }
    .own .noch { animation: pogasit linear both; animation-timeline: --night; animation-range: contain 20% contain 27%; }
    .own .utr { animation: rassvet linear both; animation-timeline: --night; animation-range: contain 28% contain 35%; }
    .own .oboi::after { animation: rassvet linear both; animation-timeline: --night; animation-range: contain 20% contain 38%; }
    .own .chat { display: grid; animation: otkryt linear both; animation-timeline: --night; animation-range: contain 52% contain 60%; }
    .own.wake .lockscr { animation: pogasit linear both; animation-timeline: --night; animation-range: contain 45% contain 51%; }
    @keyframes podnyat { to { transform: translateY(calc(-1 * var(--vys))); } }
    @keyframes stoyat { to { transform: translateY(var(--vys)); } }
    @keyframes pogasit { to { opacity: 0; } }
    @keyframes rassvet { from { opacity: 0; } to { opacity: 1; } }
    @keyframes otkryt { from { opacity: 0; transform: translateY(5%) scale(.97); } }
  }
}

/* появление блоков при прокрутке: классы ставит скрипт; без скрипта всё видно сразу */
.jsr .r { opacity: 0; translate: 0 26px; transition: opacity 700ms var(--ease-o), translate 900ms var(--ease-o); transition-delay: calc(var(--i, 0) * 80ms); }
.jsr .r.in { opacity: 1; translate: none; }
@media (max-width: 1023px) { .ek iframe { pointer-events: none; } }
.zh-tap { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
@media (min-width: 1024px) { .zh-tap { display: none; } }

/* липкая полоса: на телефоне — кнопка снизу, когда первая ушла из вида; на компьютере — шапка после первого блока */
.lip { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 10px var(--m) calc(10px + env(safe-area-inset-bottom)); background: var(--korob); box-shadow: inset 0 2px 0 #2A3136; /* taste-skill-ignore: кромка планки */
  transform: translateY(105%); transition: transform 320ms var(--ease-o); }
.lip.vidno { transform: none; }
.lip .mark, .lip .nav { display: none; }
.lip-cena { display: grid; font-size: var(--fs-xs); line-height: 1.35; color: var(--muted); white-space: nowrap; }
.lip-cena b { font-size: var(--fs-sm); }
.lip-cena b { color: var(--text); font-weight: 600; }
.lip .btn { min-height: 48px; padding: 0 18px; font-size: 1rem; }
@media (max-width: 389px) { .lip { gap: 10px; } .lip .btn { padding: 0 14px; font-size: .9375rem; } .lip-cena span { display: none; } }
@media (min-width: 1024px) {
  .lip { top: 0; bottom: auto; grid-template-columns: auto 1fr auto; gap: 32px; height: 64px; padding: 0 var(--px); box-shadow: inset 0 -3px 0 #0A0C0D; transform: translateY(-105%); } /* taste-skill-ignore: кромка короба */
  .lip .mark { display: inline-flex; }
  .lip .nav { display: flex; justify-content: flex-end; }
  .lip-cena { display: none; }
  .lip .btn { min-height: 44px; }
}

/* телефон: подпись таблички — под табличкой и телефоном на всю ширину; в пульте раскрыто описание только выбранной вкладки */
@media (max-width: 1023px) {
  .scene { grid-template-areas: "znak tel" "podp podp"; row-gap: 18px; }
  .sign { display: contents; }
  .sign > a { grid-area: znak; align-self: start; }
  .sign figcaption { grid-area: podp; max-width: 34em; }
  .own { grid-area: tel; }
  .tab { padding: 13px 16px; }
  .tab[aria-selected="false"] span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
