/* insomniabus — «Ночная долина». Токены, сцена, табличка, мастер бронирования, кабинеты. */

@font-face { font-family: "Shantell Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/shantell-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Shantell Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/shantell-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: "Shantell Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/shantell-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: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/nunito-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/nunito-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: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/nunito-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 {
  --night-950: #0f1130;
  --night-900: #141638;
  --night-800: #1d1f4e;
  --night-700: #2a2b63;
  --dusk-600: #3b3a78;
  --peach: #f2b38a;
  --teal-800: #1a3533;
  --teal-700: #22403e;
  --teal-600: #2b4f4c;
  --teal-500: #376560;
  --teal-line: #4f7a73;
  --wood: #7a5232;
  --wood-hi: #a8774a;
  --moon: #f6edd9;
  --moon-2: #c6d7d1;       /* вторичный текст на табличке */
  --moon-3: #a5c0b9;       /* подписи, плейсхолдеры */
  --amber: #e7a136;
  --amber-hi: #f3b553;
  --amber-lo: #c47f1c;
  --amber-ink: #2a1a0c;
  --lantern: #ffe08a;
  --fur-stripe: #8a4f1c;
  --danger: #ffa08f;
  --danger-bg: #4a2427;
  --ok: #a6e3b4;

  --font-display: "Shantell Sans", "Nunito", system-ui, sans-serif;
  --font-ui: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r: 14px;
  --r-sm: 10px;
  --gap: 16px;
  --field-h: 50px;
  --shadow: 0 18px 40px -18px rgba(5, 8, 24, .75), 0 2px 6px rgba(5, 8, 24, .35);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --scene-s: max(calc(100vw / 1600), calc(100vh / 1000));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--teal-500) var(--night-900); }
body {
  margin: 0; min-height: 100dvh; color: var(--moon); font: 500 16px/1.5 var(--font-ui);
  background: linear-gradient(180deg, #121433 0%, #1d1f4e 26%, #302f6a 50%, #5a4f86 66%, #a7788a 78%, #e3a684 86%, #f2b38a 92%);
  background-attachment: fixed;
  display: flex; flex-direction: column; overflow-x: hidden;
}
::selection { background: var(--amber); color: var(--amber-ink); }
a { color: var(--lantern); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff1bf; }
button, input { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--lantern); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--night-900); }
::-webkit-scrollbar-thumb { background: var(--teal-500); border-radius: 10px; border: 2px solid var(--night-900); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-sm { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- сцена */
.scene { position: fixed; left: 0; bottom: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; overflow: hidden; }
.scene-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene::after { content: ""; position: absolute; inset: 0; background: rgba(12, 14, 38, 0); transition: background .6s var(--ease-out); }
body.dim .scene::after { background: linear-gradient(180deg, rgba(12, 14, 38, .62), rgba(12, 14, 38, .38) 60%, rgba(12, 14, 38, .5)); }
.scene .tw { animation: twinkle 4.5s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .2; } }
.scene .fly { animation: drift 7s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes drift {
  0% { transform: translate(0, 0); opacity: .35; }
  40% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: .55; }
}
/* котобус бежит по дороге (дорога ≈ 150 единиц сцены от низа) */
.scene-bus { position: absolute; left: 0; bottom: calc(var(--scene-s) * 128); width: calc(var(--scene-s) * 300); opacity: 0;
  transition: opacity .5s; }
body.home .scene-bus { opacity: 1; animation: roam 26s linear infinite; }
@keyframes roam {
  0% { transform: translateX(calc(var(--scene-s) * -320)); }
  100% { transform: translateX(calc(100vw + var(--scene-s) * 40)); }
}
.catbus { width: 100%; height: auto; overflow: visible; }
.catbus .leg { transform-box: fill-box; transform-origin: 50% 8%; }
.running .catbus .leg-a { animation: legA .34s ease-in-out infinite alternate; }
.running .catbus .leg-b { animation: legB .34s ease-in-out infinite alternate; }
.running .catbus { animation: bob .17s ease-in-out infinite alternate; }
@keyframes legA { from { transform: rotate(24deg); } to { transform: rotate(-22deg); } }
@keyframes legB { from { transform: rotate(-22deg); } to { transform: rotate(24deg); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-2.5px); } }

/* переход между шагами: котобус пробегает экран */
.wipe { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.wipe-bus { position: absolute; top: 58%; left: 0; width: clamp(220px, 34vw, 420px); transform: translateX(-110%); }
.wipe-bus.go { animation: dash .95s cubic-bezier(.45, .05, .35, 1) forwards; }
@keyframes dash { from { transform: translateX(-110%); } to { transform: translateX(calc(100vw + 10%)); } }
.wipe-bus::before { content: ""; position: absolute; right: 92%; top: 46%; width: 70vw; height: 46%;
  background: linear-gradient(90deg, transparent, rgba(255, 224, 138, .14) 70%, rgba(255, 224, 138, 0)); filter: blur(10px); border-radius: 50%; }

/* ---------------------------------------------------------------- каркас */
.top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, env(safe-area-inset-left)) 0; max-width: 1080px; width: 100%; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--moon); text-decoration: none; font: 700 17px/1 var(--font-display); }
.brand .eye-mini { width: 34px; height: 29px; color: var(--moon); }
.brand:hover { color: #fff; }
.top-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 40px; border-radius: 999px; color: var(--moon);
  text-decoration: none; font-weight: 700; font-size: 15px; background: rgba(20, 22, 56, .45); border: 1px solid rgba(246, 237, 217, .18); }
.top-link:hover { color: #fff; background: rgba(20, 22, 56, .7); }
main { position: relative; z-index: 2; flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 8px 16px 32px; outline: none; }
.view { animation: viewIn .45s var(--ease-out) both; }
.view.out { animation: viewOut .2s ease-in both; }
@keyframes viewIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes viewOut { to { opacity: 0; transform: translateX(-22px); } }

.foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.foot a { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; min-height: 44px;
  background: rgba(15, 17, 48, .72); color: var(--moon); text-decoration: none; font-weight: 700; font-size: 15px;
  border: 1px solid rgba(246, 237, 217, .16); backdrop-filter: blur(6px); }
.foot a:hover { border-color: var(--lantern); color: #fff; }
.foot a .i { color: var(--lantern); }
.foot .legal { flex-basis: 100%; text-align: center; font-size: 13px; color: var(--moon-2); }
.foot .legal a { display: inline; padding: 0; min-height: 0; background: none; border: 0; font-weight: 600; color: var(--moon-2); text-decoration: underline; }

/* ---------------------------------------------------------------- главная */
.hero { display: grid; justify-items: center; text-align: center; padding-top: 4px; }
.moon { position: relative; width: clamp(150px, 40vw, 230px); aspect-ratio: 155 / 130; color: var(--moon); margin: 6px 0 4px; }
.moon::before { content: ""; position: absolute; inset: -42% -30%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 190, .34), rgba(255, 224, 138, .12) 55%, transparent); }
.moon .eye { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 0 18px rgba(255, 236, 190, .35)); transform-origin: 50% 50%; }
body.home .moon .eye { animation: wake 1.1s var(--ease-out) both, blink 8s 2.4s infinite; }
@keyframes wake { 0% { transform: scaleY(.06); opacity: .2; } 55% { transform: scaleY(1.04); opacity: 1; } 100% { transform: scaleY(1); } }
@keyframes blink { 0%, 95.5%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.08); } }
.hero h1 { margin: 6px 0 4px; font: 800 clamp(30px, 8.4vw, 50px)/1.05 var(--font-display); letter-spacing: -.01em; text-wrap: balance; }
.hero .lead { margin: 0 0 18px; max-width: 34ch; color: #e9e0d0; font-size: 17px; text-wrap: balance; }

/* табличка остановки */
.sign { position: relative; width: 100%; max-width: 520px; margin: 26px auto 46px; }
.sign-board { position: relative; z-index: 1; padding: 30px 20px 22px; border-radius: var(--r); background:
  linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 30%),
  var(--teal-700);
  border: 3px solid var(--wood); box-shadow: inset 0 0 0 1px rgba(255, 236, 200, .1), var(--shadow); }
.sign::before, .sign::after { content: ""; position: absolute; z-index: 0; bottom: -42px; width: 14px; height: 70px; border-radius: 3px;
  background: linear-gradient(90deg, #5d3d24, var(--wood-hi) 45%, #5d3d24); box-shadow: 0 6px 10px rgba(0, 0, 0, .35); }
.sign::before { left: 18%; } .sign::after { right: 18%; }
.stop-disc { position: absolute; z-index: 2; left: 50%; top: -34px; transform: translateX(-50%); width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #2f5b57, var(--teal-800)); border: 3px solid var(--wood); box-shadow: 0 6px 14px rgba(0, 0, 0, .4);
  display: grid; place-items: center; }
.stop-disc-art { width: 48px; height: 48px; }

/* ---------------------------------------------------------------- поля */
.field { display: grid; gap: 6px; margin-bottom: 14px; text-align: left; }
.field > label, .field .label { font-weight: 800; font-size: 15px; color: var(--moon); }
.field .hint { font-size: 13.5px; color: var(--moon-2); }
.req { color: var(--amber-hi); margin-left: 2px; }
.input { width: 100%; height: var(--field-h); padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--teal-line);
  background: var(--teal-800); color: var(--moon); font-weight: 600; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--moon-3); font-weight: 500; }
.input:hover { border-color: #6c9a92; }
.input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(231, 161, 54, .25); }
.input[aria-invalid="true"], .dd[data-invalid="true"] .dd-btn { border-color: var(--danger); }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.field-error { font-size: 14px; color: var(--danger); font-weight: 700; }
.field-ok { font-size: 14px; color: var(--ok); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.upper { text-transform: uppercase; letter-spacing: .04em; }

/* кастомный выпадающий список */
.dd { position: relative; }
.dd-btn { width: 100%; height: var(--field-h); display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; text-align: left;
  border-radius: var(--r-sm); border: 1.5px solid var(--teal-line); background: var(--teal-800); cursor: pointer; font-weight: 700; font-size: 16px; }
.dd-btn:hover { border-color: #6c9a92; }
.dd-btn[aria-expanded="true"] { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(231, 161, 54, .25); }
.dd-btn .dd-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .dd-ph { color: var(--moon-3); font-weight: 500; }
.dd-btn .i { color: var(--moon-2); transition: transform .2s var(--ease-out); }
.dd-btn[aria-expanded="true"] .i:last-child { transform: rotate(180deg); }
.dd-btn .lead-i { color: var(--lantern); }
.dd-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 300px; overflow: auto; padding: 6px;
  border-radius: var(--r-sm); background: var(--teal-800); border: 1.5px solid var(--teal-line); box-shadow: var(--shadow);
  animation: ddIn .18s var(--ease-out); }
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } }
.dd-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; background: none;
  text-align: left; cursor: pointer; font-weight: 600; min-height: 44px; }
.dd-opt:hover, .dd-opt.kb { background: var(--teal-600); }
.dd-opt[aria-selected="true"] { background: rgba(231, 161, 54, .16); color: var(--lantern); }
.dd-opt .sub { margin-left: auto; color: var(--moon-3); font-size: 13.5px; font-weight: 600; }
.dd-opt.muted { color: var(--moon-2); font-style: italic; }

/* чекбоксы */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 6px 0; font-size: 15px; color: var(--moon-2); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 7px; border: 1.5px solid var(--teal-line); background: var(--teal-800);
  display: grid; place-items: center; transition: background .15s, border-color .15s; }
.check .box .i { width: 16px; height: 16px; stroke-width: 3; color: var(--amber-ink); opacity: 0; transform: scale(.5); transition: .2s var(--ease-out); }
.check input:checked + .box { background: var(--amber); border-color: var(--amber); }
.check input:checked + .box .i { opacity: 1; transform: none; }
.check input:focus-visible + .box { outline: 3px solid var(--lantern); outline-offset: 2px; }
.check[data-invalid="true"] .box { border-color: var(--danger); }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 12px;
  border: 0; cursor: pointer; font: 800 17px/1 var(--font-ui); text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { width: 100%; background: linear-gradient(180deg, var(--amber-hi), var(--amber)); color: var(--amber-ink);
  box-shadow: 0 8px 18px -8px rgba(8, 10, 30, .7); }
.btn-primary:hover { background: linear-gradient(180deg, #f7c068, var(--amber-hi)); color: var(--amber-ink); }
.btn-primary .label-display { font-family: var(--font-display); font-size: 21px; }
.btn-ghost { width: 100%; background: rgba(15, 17, 48, .55); color: var(--moon); border: 1.5px solid rgba(246, 237, 217, .28); }
.btn-ghost:hover { border-color: var(--lantern); color: #fff; background: rgba(15, 17, 48, .75); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 10px; }
.btn-plain { background: var(--teal-600); color: var(--moon); }
.btn-plain:hover { background: var(--teal-500); color: #fff; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.btn-row { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }
@media (min-width: 640px) { .btn-row.two { grid-template-columns: 1fr 2fr; } }
.linkbtn { background: none; border: 0; padding: 4px 2px; color: var(--lantern); font-weight: 700; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px; }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 4px 0 12px; border-radius: 10px;
  background: var(--danger-bg); color: #ffd9d2; font-weight: 700; font-size: 15px; text-align: left; }
.form-error .i { color: var(--danger); margin-top: 2px; }

/* ---------------------------------------------------------------- шаги мастера */
.step-head { text-align: center; margin: 10px 0 18px; }
.step-head h1 { margin: 0; font: 800 clamp(26px, 6.6vw, 38px)/1.1 var(--font-display); text-wrap: balance; }
.step-head p { margin: 6px auto 0; color: #e6dccb; max-width: 46ch; }

.panel { padding: 18px; border-radius: var(--r); background: rgba(26, 53, 51, .92); border: 1.5px solid rgba(122, 82, 50, .9);
  box-shadow: var(--shadow); backdrop-filter: blur(4px); }
.panel + .panel { margin-top: 14px; }
.panel h2 { margin: 0 0 12px; font: 800 21px/1.2 var(--font-display); }
.panel h3 { margin: 16px 0 10px; font: 800 17px/1.2 var(--font-ui); color: var(--lantern); }
.filters { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .filters { grid-template-columns: 1fr 1fr 1fr; } }
.narrow { max-width: 680px; margin: 0 auto; }

/* карточка рейса — табличка расписания */
.flights { display: grid; gap: 12px; margin-top: 14px; }
.flight { position: relative; display: grid; gap: 10px; width: 100%; padding: 16px 16px 14px; text-align: left; cursor: pointer;
  border-radius: var(--r); border: 1.5px solid rgba(122, 82, 50, .85); background: rgba(26, 53, 51, .94); box-shadow: var(--shadow);
  transition: transform .2s var(--ease-out), border-color .15s, background .15s; }
.flight:hover { transform: translateY(-2px); border-color: var(--amber); background: rgba(31, 62, 59, .97); }
.flight:active { transform: translateY(0) scale(.995); }
.flight.selected { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(231, 161, 54, .3), var(--shadow); }
.flight[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
.flight[aria-disabled="true"]:hover { transform: none; border-color: rgba(122, 82, 50, .85); }
.f-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.f-name { font: 800 15px/1.2 var(--font-ui); color: var(--moon-2); }
.f-name b { color: var(--moon); font-family: var(--font-display); font-size: 19px; margin-right: 6px; }
.f-price { font: 800 22px/1 var(--font-display); color: var(--amber-hi); white-space: nowrap; }
.f-price s { font-size: 14px; color: var(--moon-3); margin-right: 6px; }
.route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.route .stop { display: grid; gap: 2px; min-width: 0; }
.route .stop.end { text-align: right; }
.route time { font: 800 26px/1 var(--font-display); }
.route .place { font-weight: 700; font-size: 14.5px; color: var(--moon-2); overflow-wrap: anywhere; }
.track { position: relative; height: 22px; display: flex; align-items: center; }
.track-line { position: relative; height: 0; width: var(--len, 100%); margin: 0 auto; border-top: 3px dashed rgba(255, 224, 138, .85); }
.track-line::before, .track-line::after { content: ""; position: absolute; top: -1.5px; width: 11px; height: 11px; border-radius: 50%; transform: translateY(-50%); }
.track-line::before { left: -4px; background: var(--moon); }
.track-line::after { right: -4px; background: var(--amber); }
.track .dur { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); font-size: 12.5px; font-weight: 700; color: var(--moon-3); white-space: nowrap; }
.f-meta { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: rgba(246, 237, 217, .08); color: var(--moon-2); border: 1px solid rgba(246, 237, 217, .12); }
.chip .i { width: 15px; height: 15px; }
.chip.warn { color: #ffd59a; border-color: rgba(255, 213, 154, .35); }
.chip.vol { color: #bfe6c9; border-color: rgba(166, 227, 180, .4); }
.chip.few { color: var(--danger); border-color: rgba(255, 160, 143, .45); }
.f-note { font-size: 14px; color: var(--moon-2); }
.f-addr { font-size: 14px; color: var(--moon-2); }

.empty { text-align: center; padding: 26px 18px; }
.empty h2 { font: 800 22px/1.2 var(--font-display); margin: 8px 0 6px; }
.empty p { margin: 0 auto 14px; color: var(--moon-2); max-width: 40ch; }
.empty .catbus { width: 170px; margin: 0 auto; opacity: .95; }
.date-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.date-chips button { padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--teal-line); background: var(--teal-800); cursor: pointer; font-weight: 700; }
.date-chips button:hover { border-color: var(--amber); color: var(--lantern); }

/* выбранные рейсы на шаге пассажиров */
.picked { display: grid; gap: 10px; }
.picked-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px;
  background: rgba(15, 31, 30, .55); border: 1px solid rgba(246, 237, 217, .1); }
.picked-item .dir { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(231, 161, 54, .16); color: var(--amber-hi); }
.picked-item .what { min-width: 0; }
.picked-item .what b { display: block; font-size: 16px; }
.picked-item .what span { font-size: 14px; color: var(--moon-2); }
.picked-item .price { font: 800 18px/1 var(--font-display); color: var(--amber-hi); white-space: nowrap; }

.pax { padding-top: 14px; margin-top: 14px; border-top: 1px dashed rgba(246, 237, 217, .18); }
.pax:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.pax-title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 800 18px/1.2 var(--font-display); color: var(--lantern); }
.egis { margin-top: 4px; padding: 14px; border-radius: 12px; background: rgba(15, 31, 30, .5); border: 1px solid rgba(255, 213, 154, .22); }
.egis-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 800; color: #ffd59a; font-size: 15px; }
.egis .grid2 { display: grid; gap: 0 12px; }
@media (min-width: 640px) { .egis .grid2 { grid-template-columns: 1fr 1fr; } .egis .grid2 .full { grid-column: 1 / -1; } }

.svc { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(246, 237, 217, .1); }
.svc:first-child { border-top: 0; }
.svc b { font-size: 16px; }
.svc .desc { grid-column: 1; font-size: 14px; color: var(--moon-2); }
.svc .cost { font-weight: 800; color: var(--amber-hi); }
.stepper { grid-row: 1 / span 2; grid-column: 2; display: inline-flex; align-items: center; gap: 4px; padding: 3px; border-radius: 12px;
  background: var(--teal-800); border: 1.5px solid var(--teal-line); }
.stepper button { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 9px; background: var(--teal-600); cursor: pointer; }
.stepper button:hover:not([disabled]) { background: var(--teal-500); }
.stepper button[disabled] { opacity: .35; cursor: default; }
.stepper output { min-width: 28px; text-align: center; font: 800 18px/1 var(--font-display); }

/* оформление */
.sum { display: grid; gap: 6px; padding: 14px 0 4px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; color: var(--moon-2); font-weight: 600; }
.sum-row.total { margin-top: 6px; padding-top: 10px; border-top: 1px dashed rgba(246, 237, 217, .22); color: var(--moon); font-weight: 800; font-size: 18px; }
.sum-row.total b { font: 800 26px/1 var(--font-display); color: var(--amber-hi); }
.sum-row.disc b { color: var(--ok); }
.pax-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pax-list li { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.pax-list li .i { color: var(--moon-3); }
.pay-note { margin: 10px 0 0; font-size: 13.5px; color: var(--moon-2); text-align: center; }

/* заказ / успех */
.done-art { width: min(300px, 78vw); margin: 0 auto 4px; }
.ticket { position: relative; padding: 14px 16px; border-radius: 12px; background: rgba(15, 31, 30, .55); border: 1px solid rgba(246, 237, 217, .12); }
.ticket + .ticket { margin-top: 10px; }
.ticket .code { font: 800 15px/1 var(--font-display); letter-spacing: .08em; color: var(--lantern); }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 800; }
.status.paid, .status.active { background: rgba(166, 227, 180, .14); color: var(--ok); }
.status.pending, .status.resale { background: rgba(255, 213, 154, .14); color: #ffd59a; }
.status.expired, .status.refunded, .status.resold, .status.cancelled { background: rgba(255, 160, 143, .14); color: var(--danger); }

/* кабинет */
.order-card { padding: 16px; }
.order-card + .order-card { margin-top: 14px; }
.o-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.o-head h2 { margin: 0; }
.t-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.t-panel { margin-top: 12px; padding: 14px; border-radius: 12px; background: rgba(12, 26, 25, .6); border: 1px solid rgba(231, 161, 54, .35); }
.t-panel p { margin: 0 0 10px; color: var(--moon-2); }
.opt-list { display: grid; gap: 8px; margin: 10px 0; }
.opt { display: flex; justify-content: space-between; gap: 10px; align-items: center; width: 100%; padding: 12px 14px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--teal-line); background: var(--teal-800); text-align: left; }
.opt:hover, .opt[aria-pressed="true"] { border-color: var(--amber); }
.opt .due { font-weight: 800; color: var(--amber-hi); white-space: nowrap; }
.rules { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; color: var(--moon-2); }
.rules li { display: flex; gap: 8px; align-items: flex-start; }
.rules .i { width: 16px; height: 16px; margin-top: 3px; color: var(--moon-3); }

/* куратор */
.quota { display: grid; gap: 4px; margin: 4px 0 14px; }
.meter { height: 10px; border-radius: 10px; background: rgba(246, 237, 217, .12); overflow: hidden; display: flex; }
.meter i { display: block; height: 100%; }
.meter .m-used { background: var(--amber); }
.meter .m-issued { background: rgba(231, 161, 54, .4); }
.quota-nums { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--moon-2); }
.quota-nums b { color: var(--moon); }
.codes { display: grid; gap: 8px; margin-top: 12px; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 12px; border-radius: 10px;
  background: rgba(15, 31, 30, .55); border: 1px solid rgba(246, 237, 217, .1); }
.code-row .c { font: 800 16px/1.2 var(--font-display); letter-spacing: .05em; }
.code-row .c.off { text-decoration: line-through; color: var(--moon-3); }
.code-row .meta { grid-column: 1; font-size: 13.5px; color: var(--moon-2); }
.code-row .acts { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1.5px solid var(--teal-line); background: var(--teal-800); cursor: pointer; }
.icon-btn:hover { border-color: var(--amber); color: var(--lantern); }
.new-codes { margin-top: 12px; padding: 12px; border-radius: 10px; background: rgba(231, 161, 54, .1); border: 1px solid rgba(231, 161, 54, .45); }
.new-codes pre { margin: 8px 0 0; white-space: pre-wrap; font: 700 15px/1.6 var(--font-display); letter-spacing: .04em; }

.prose { line-height: 1.65; }
.prose p { margin: 0 0 12px; }

/* тост */
#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 18px; border-radius: 12px; background: var(--night-950); border: 1px solid rgba(246, 237, 217, .2); color: var(--moon);
  font-weight: 700; box-shadow: var(--shadow); transition: .3s var(--ease-out); pointer-events: none; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* демо-оплата — лист снизу */
.sheet-back { position: fixed; inset: 0; z-index: 70; background: rgba(8, 10, 28, .62); display: grid; align-items: end; justify-items: center;
  animation: fadeIn .2s both; }
.sheet { width: min(520px, 100%); padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; background: var(--teal-700);
  border: 2px solid var(--wood); border-bottom: 0; animation: up .35s var(--ease-out) both; }
@media (min-width: 640px) { .sheet-back { align-items: center; } .sheet { border-radius: 18px; border-bottom: 2px solid var(--wood); } }
.sheet h2 { margin: 0 0 6px; font: 800 22px/1.2 var(--font-display); }
.sheet p { margin: 0 0 14px; color: var(--moon-2); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }

.skeleton { border-radius: var(--r); height: 128px; background: linear-gradient(90deg, rgba(26, 53, 51, .7), rgba(43, 79, 76, .8), rgba(26, 53, 51, .7));
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (min-width: 900px) {
  .sign { margin-top: 30px; }
  .sign-board { padding: 34px 28px 26px; }
  .hero .lead { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  body.home .scene-bus { animation: none; transform: translateX(calc(50vw + var(--scene-s) * 260)); }
  .scene .fly { animation: none; }
}

/* правки после первого просмотра */
.upper::placeholder { text-transform: none; letter-spacing: 0; }
.f-addr { display: flex; gap: 6px; align-items: flex-start; }
.f-addr .i { margin-top: 3px; color: var(--moon-3); }
html { background: #141638; }
.foot .legal a { backdrop-filter: none; }
@media (max-width: 520px) {
  .picked-item { grid-template-columns: 1fr auto; padding: 12px; }
  .picked-item .dir { display: none; }
  .route time { font-size: 23px; }
}

/* ================================================================ материал (пересборка после ревью)
   Акварельная сцена — растр img/valley.webp (deploy/paint/build_paint.js), поверх живые звёзды и светлячки.
   Таблички и карточки — крашеная доска (paint.webp) в деревянной раме (wood-h.webp). */
.scene-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.scene-svg { z-index: 1; }
.scene::before { content: ""; position: absolute; inset: 0; z-index: 2; background: url(img/grain.webp) 0 0 / 256px; mix-blend-mode: soft-light; opacity: .3; pointer-events: none; }
.scene::after { z-index: 3; }
.scene-bus { z-index: 2; }

.sign-board, .panel, .flight {
  border: 7px solid transparent;
  background: url(img/paint.webp) 0 0 / 512px padding-box, url(img/wood-h.webp) 0 0 / 600px 120px border-box;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5), inset 0 3px 8px -4px rgba(0, 0, 0, .55), 0 18px 34px -16px rgba(4, 6, 20, .85);
  backdrop-filter: none;
}
.panel, .flight { border-width: 5px; }
.flight:hover { border-color: transparent; background: url(img/paint.webp) 0 0 / 512px padding-box, url(img/wood-h.webp) 0 0 / 600px 120px border-box; filter: brightness(1.08); }
.flight[aria-disabled="true"]:hover { filter: none; border-color: transparent; }
.flight.selected { outline: 3px solid var(--amber); outline-offset: 3px; }
.sign::before, .sign::after { background: url(img/wood-v.webp) 0 0 / 60px 600px; border-radius: 4px; }
.stop-disc { border: 5px solid transparent; background: radial-gradient(circle at 50% 40%, #2f5b57, var(--teal-800)) padding-box, url(img/wood-h.webp) 0 0 / 300px 60px border-box; }
.board-title { margin: 4px 0 16px; text-align: center; font: 800 22px/1.1 var(--font-display); color: var(--lantern); letter-spacing: .02em; }

/* вложенные «карточки» → разлинованные строки */
.picked { gap: 0; }
.picked-item { background: none; border: 0; border-radius: 0; border-top: 1px dashed rgba(246, 237, 217, .22); padding: 12px 2px; }
.picked-item:first-child { border-top: 0; padding-top: 2px; }
.egis { background: none; border: 0; border-radius: 0; border-top: 1px solid rgba(255, 213, 154, .3); padding: 14px 0 0; margin-top: 14px; }
.ticket { background: none; border: 0; border-radius: 0; border-top: 1px dashed rgba(246, 237, 217, .22); padding: 14px 0; }
.ticket + .ticket { margin-top: 0; }
.ticket:first-of-type { border-top: 0; padding-top: 4px; }
.t-panel { background: none; border: 0; border-top: 1px solid rgba(231, 161, 54, .5); border-radius: 0; padding: 12px 0 0; }
.code-row { background: none; border: 0; border-radius: 0; border-top: 1px dashed rgba(246, 237, 217, .2); padding: 10px 0; }
.code-row:first-child { border-top: 0; }
.new-codes { background: none; border: 0; border-radius: 0; border-top: 1px solid rgba(231, 161, 54, .5); border-bottom: 1px solid rgba(231, 161, 54, .5); padding: 12px 0; }

/* единый ряд действий на всех шагах: главная кнопка, под ней «назад» */
.actions { display: grid; gap: 10px; margin-top: 18px; }
.actions .pay-note { margin: -2px 0 2px; }
.step-head p { text-wrap: balance; }

/* прогресс — дорога с остановками, котобус на текущей */
ol.trail { list-style: none; display: flex; justify-content: center; gap: 0; margin: 4px auto 12px; padding: 0; max-width: 520px; }
ol.trail li { position: relative; flex: 1; display: grid; justify-items: center; align-content: start; gap: 4px; font-size: 12.5px; font-weight: 800; color: var(--moon-3); }
ol.trail li::before { content: ""; position: absolute; top: 16px; left: -50%; right: 50%; border-top: 3px dashed rgba(246, 237, 217, .3); }
ol.trail li:first-child::before { display: none; }
ol.trail li.done::before, ol.trail li.on::before { border-top-color: rgba(231, 161, 54, .85); }
.stopmark { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: 10px; border-radius: 50%; background: var(--night-700); border: 2px solid rgba(246, 237, 217, .45); }
ol.trail li.done .stopmark { background: var(--amber); border-color: var(--amber); }
ol.trail li.on .stopmark { width: 36px; height: 36px; margin-top: 0; border: 0; background: none; }
ol.trail li.on .stopmark svg { width: 36px; height: 36px; }
ol.trail li.on .stopname { color: var(--lantern); }

/* футер: пункты из ТЗ видны, даже пока контакт не заполнен */
.foot-soon { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; min-height: 44px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: rgba(15, 17, 48, .55); color: var(--moon-2); border: 1px dashed rgba(246, 237, 217, .25); }
.foot-soon .i { color: var(--moon-3); }

/* дорожка котобуса на телефоне: на узком экране табличка закрывает дорогу сцены */
.lane { display: none; }
@media (max-width: 640px) {
  body.home .scene-bus { display: none; }
  .moon { width: 124px; margin-top: 0; }
  .hero h1 { margin-top: 2px; }
  .hero .lead { margin-bottom: 6px; }
  .lane { display: block; position: relative; width: 100vw; height: 70px; margin: 0 -16px 2px; overflow: hidden; }
  .lane::before { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 18px; background: url(img/grain.webp) 0 0 / 256px, #6f6a92; background-blend-mode: soft-light; box-shadow: 0 -2px 6px rgba(10, 12, 30, .25), 0 3px 6px rgba(10, 12, 30, .35); }
  .lane::after { content: ""; position: absolute; left: 0; right: 0; bottom: 16px; border-top: 2px dashed rgba(212, 205, 232, .45); }
  .lane-bus { position: absolute; z-index: 1; left: 0; bottom: 10px; width: 132px; animation: laneRun 9s linear infinite; }
  @keyframes laneRun { from { transform: translateX(-150px); } to { transform: translateX(100vw); } }
  .sign { margin-top: 36px; }
  .picked-item { grid-template-columns: 1fr; gap: 4px; }
  .picked-item .price { justify-self: start; font-size: 16px; }
}
/* десктоп с невысоким окном: табличка, кнопка и столбики помещаются в первый экран */
@media (min-width: 900px) and (max-height: 960px) {
  .moon { width: 168px; margin: 0 0 2px; }
  .hero h1 { font-size: 42px; margin-top: 2px; }
  .hero .lead { margin-bottom: 8px; }
  .sign { margin-top: 24px; }
  .sign-board { padding-top: 24px; padding-bottom: 20px; }
  .board-title { margin-bottom: 12px; }
  .field { margin-bottom: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .lane-bus { animation: none; left: 50%; transform: translateX(-50%); }
}
#app:focus, #app:focus-visible { outline: none; }

/* ================================================================ правки по второму ревью */
.scene { top: 0; bottom: 0; height: auto; }
.scene picture { position: absolute; inset: 0; }
.scene-bus { width: calc(var(--scene-s) * 380); bottom: calc(var(--scene-s) * 132); }
.btn-primary { font-family: var(--font-display); font-size: 19px; font-weight: 800; letter-spacing: .01em; }
.btn-primary .label-display { font-size: 21px; }
/* остановки прогресса: одинаковый слот 36px, подписи на одной линии */
ol.trail li .stopmark, ol.trail li.on .stopmark { width: 36px; height: 36px; margin-top: 0; border: 0; border-radius: 0; background: none; display: grid; place-items: center; }
ol.trail li .stopmark::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--night-700); border: 2px solid rgba(246, 237, 217, .45); box-sizing: border-box; }
ol.trail li.done .stopmark::before { background: var(--amber); border-color: var(--amber); }
ol.trail li.on .stopmark::before { display: none; }
ol.trail li::before { top: 16.5px; }
/* футер: сплошная тонкая рамка, «уточняется» приглушённо */
.foot-soon { border: 1px solid rgba(246, 237, 217, .16); background: rgba(15, 17, 48, .72); color: var(--moon); }
.foot-soon .soon { color: var(--moon-3); font-weight: 600; }
@media (max-width: 640px) {
  .scene-svg .flies { display: none; }
  .top { padding-top: 8px; }
  .moon { width: 100px; }
  .hero h1 { font-size: 27px; margin: 0 0 2px; white-space: nowrap; }
  .hero .lead { font-size: 15px; max-width: none; margin-bottom: 0; }
  .lane { height: 80px; margin: 0 -16px; background: url(img/lane.webp) center bottom / auto 80px repeat-x; }
  .lane::before, .lane::after { display: none; }
  .lane-bus { bottom: 19px; width: 128px; }
  .sign { margin-top: 26px; }
  .sign-board { padding: 24px 16px 18px; }
  .board-title { font-size: 20px; margin: 4px 0 10px; }
  .field { margin-bottom: 10px; }
  .sign::before, .sign::after { bottom: -34px; height: 56px; }
}
ol.trail li.done .stopmark { background: none; border: 0; }
@media (max-width: 400px) {
  .hero h1 { font-size: 24px; }
  .hero .lead { font-size: 14px; }
}
.ticket svg.i, .f-note svg.i { display: inline-block; vertical-align: -3px; margin-right: 2px; }
@media (max-width: 360px) { .hero h1 { white-space: normal; text-wrap: balance; } }
