/* «Ночной вагон», светлая версия в палитре Московского метро: белый, чёрный, красный. Unbounded + Onest */
:root {
  --bg: #ffffff; --bg2: #f3f3f5; --bg3: #e8e8ec; --ink: #111114; --mute: #6b6b76; --dim: #9a9aa3;
  --amber: #e4002b; --amber2: #b80022; --amber-ink: #ffffff; --red-text: #d0001f; --line: rgba(17,17,20,.1); --line2: rgba(17,17,20,.18);
  --sheet-h: 54dvh;
  --d: "Unbounded", "Onest", system-ui, sans-serif; --f: "Onest", -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #fff; color: var(--ink); font: 16px/1.45 var(--f); overflow: hidden; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
[hidden] { display: none !important; }

/* ── Александра ─────────────────────────────────────────────── */
.stage { position: fixed; inset: 0; background: #bdbdbd url("media/alexandra_poster_v2.jpg") center top / cover no-repeat; }
.idle { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; opacity: 0; transition: opacity .3s ease; }
/* светлый студийный фон (ролик 11.11): затемнение над шторкой, чтобы читались время и подпись; следует за высотой шторки */
.stage-fade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,16,24,.62) var(--sheet-h), rgba(14,16,24,.22) calc(var(--sheet-h) + 10dvh), rgba(14,16,24,0) calc(var(--sheet-h) + 22dvh)), linear-gradient(to bottom, rgba(0,0,0,.16) 0%, rgba(0,0,0,0) 12%); pointer-events: none; }
.stage-glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s; box-shadow: inset 0 0 140px 30px rgba(228,0,43,.16); }
body.speaking .stage-glow { opacity: .8; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: inset 0 0 180px 50px rgba(228,0,43,.24); } }
.timebox { position: absolute; left: 22px; right: 22px; bottom: calc(var(--sheet-h) + 14px); transition: opacity .3s; }
.time { font-family: var(--d); font-weight: 900; font-size: 46px; letter-spacing: -.02em; line-height: 1; color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.timesub { margin-top: 8px; font-size: 13px; font-weight: 500; color: #f0f0f3; letter-spacing: .02em; text-shadow: 0 1px 10px rgba(0,0,0,.6); }

/* ── Шторка ─────────────────────────────────────────────────── */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; height: var(--sheet-h); display: flex; flex-direction: column;
  background: var(--bg); border-radius: 26px 26px 0 0; border-top: 1px solid var(--line2); box-shadow: 0 -30px 60px rgba(0,0,0,.25);
  transition: height .5s cubic-bezier(.2,.8,.2,1), border-radius .5s ease; padding-bottom: env(safe-area-inset-bottom); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px 4px; min-height: 50px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--d); font-weight: 700; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); }
.head-right { display: flex; align-items: center; gap: 10px; }
.memory { font-size: 14px; font-weight: 600; color: var(--red-text); padding: 6px 2px; letter-spacing: .01em; }
.collapse { display: none; width: 38px; height: 38px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--line); align-items: center; justify-content: center; color: var(--ink); }
.eqbtn { display: none; width: 40px; height: 32px; border-radius: 999px; border: 1px solid rgba(228,0,43,.45); align-items: center; justify-content: center; }
body.speaking .eqbtn { display: inline-flex; }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--amber); border-radius: 2px; height: 5px; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .15s } .eq i:nth-child(3) { animation-delay: .3s } .eq i:nth-child(4) { animation-delay: .45s }
@keyframes eq { 0%,100% { height: 4px } 50% { height: 14px } }

/* Главный экран */
.home { padding: 4px 22px 8px; flex: 1; overflow: auto; }
.greet { margin: 6px 0 0; font-size: 18px; line-height: 1.45; font-weight: 400; color: var(--ink); text-wrap: pretty; }
.greet b { color: var(--red-text); font-weight: 600; }
.meters { display: flex; gap: 20px; margin-top: 16px; }
.m { flex: 1; min-width: 0; }
.m i { display: block; height: 3px; background: var(--line2); border-radius: 2px; overflow: hidden; }
.m i::after { content: ""; display: block; height: 100%; width: 0; background: var(--amber); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.m.ready i::after { width: var(--v); }
.m span { display: block; margin-top: 8px; font-size: 12px; color: var(--mute); line-height: 1.3; }
.m b { display: block; font-family: var(--d); font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 1px; }
.hints { display: grid; gap: 5px; margin-top: 12px; }
.hint-item { font-size: 13px; line-height: 1.4; color: #3a3a42; padding-left: 14px; position: relative; }
.hint-item::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 2px; background: var(--amber); }
.actions { position: relative; display: flex; align-items: center; gap: 18px; margin-top: 10px; color: var(--dim); min-height: 40px; }
.ico { display: grid; place-items: center; width: 28px; height: 28px; transition: color .2s, transform .15s; }
.ico:active { transform: scale(.9); }
.ico.on { color: var(--amber); }
.expand { position: absolute; left: 50%; top: -2px; width: 42px; height: 42px; margin-left: -21px; border-radius: 50%; background: var(--amber); color: var(--amber-ink); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(228,0,43,.25); }

/* Лента чата */
.thread { display: none; flex: 1; overflow: auto; padding: 4px 22px 12px; scroll-behavior: smooth; }
.msg { margin: 12px 0; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.msg.user { margin-left: auto; width: fit-content; max-width: 88%; background: var(--bg3); border: 1px solid var(--line); padding: 10px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; font-weight: 500; }
.msg.bot { font-size: 16px; line-height: 1.5; }
.msg.bot .text { white-space: pre-wrap; color: var(--ink); padding-top: 12px; border-top: 1px solid var(--line); margin-top: 6px; }
.msg.bot .text:empty { display: none; }
.msg.bot .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--mute); font-size: 12.5px; margin-bottom: 4px; }
.msg.bot .meta .hl { color: #3a3a42; flex-basis: 100%; }
.typing { display: inline-flex; gap: 4px; align-items: center; color: var(--mute); font-size: 14px; margin-top: 8px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s } .typing i:nth-child(3) { animation-delay: .4s }
@keyframes blink { 0%,80%,100% { opacity: .2 } 40% { opacity: 1 } }

/* Сортировка */
.sort { display: flex; gap: 18px; margin: 10px 0 0; border-bottom: 1px solid var(--line); }
.sort button { padding: 8px 0 10px; font-size: 13px; font-weight: 600; color: var(--mute); position: relative; }
.sort button.on { color: var(--ink); }
.sort button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--amber); }

/* Варианты строками */
.cards { display: block; margin: 0; }
.card { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; padding: 16px 0; border-top: 1px solid var(--line); animation: rise .45s ease both; }
.card:first-child { border-top: 0; }
.card.win { margin: 0 -22px; padding: 16px 22px; border-top-color: transparent; background: linear-gradient(90deg, rgba(228,0,43,.08), rgba(228,0,43,0) 70%); }
.card.win + .card { border-top-color: transparent; }
.card-top { display: flex; align-items: center; gap: 10px; grid-column: 1; }
.card-ico { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--bg3); color: var(--ink); }
.card-ico svg { width: 18px; height: 18px; }
.card.win .card-ico { background: var(--amber); color: #fff; }
.card-title { font-weight: 600; font-size: 16px; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 8px; vertical-align: middle; }
.badge { display: inline-block; padding: 2px 7px; border-radius: 4px; background: var(--amber); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .01em; line-height: 1.4; }

.badge.est { background: transparent; color: var(--mute); border: 1px solid var(--line2); }
.card-nums { grid-column: 2; grid-row: 1 / 3; text-align: right; white-space: nowrap; align-self: start; }
.card-nums b { display: block; font-family: var(--d); font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.card.win .card-nums b { color: var(--red-text); }
.card-nums span { display: block; color: var(--mute); font-size: 12px; font-weight: 500; margin-top: 6px; }
.steps { grid-column: 1; margin: 6px 0 0; padding: 0; list-style: none; color: var(--mute); font-size: 13px; line-height: 1.45; }
.steps li { margin: 2px 0; }
.notes { grid-column: 1; margin: 4px 0 0; color: var(--dim); font-size: 12px; line-height: 1.4; }
.personal { grid-column: 1; margin: 6px 0 0; color: var(--red-text); font-size: 12.5px; font-weight: 500; }
.status { grid-column: 1; margin: 4px 0 0; color: var(--mute); font-size: 12px; }
.card-actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.card-actions > * { display: inline-flex; align-items: center; padding: 8px 13px; border-radius: 10px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--line2); background: transparent; color: var(--ink); }
.card-actions .go-trip { background: var(--amber); color: var(--amber-ink); border-color: transparent; }
.card-actions .go-taxi { border-color: var(--ink); color: var(--ink); }
.map { grid-column: 1 / -1; height: 210px; margin-top: 12px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #f3f3f5; }
.leaflet-container { background: #f3f3f5; font-family: var(--f); }
.dark-tiles { filter: saturate(.25) contrast(.95); }
.leaflet-control-attribution { background: rgba(255,255,255,.7) !important; color: #6b6b76 !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: #8a94a6 !important; }
.pin-tip { background: #111114; color: #fff; border: 0; border-radius: 6px; font-weight: 800; font-size: 11px; padding: 1px 6px; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.pin-tip::before { display: none; }
.unavail { color: var(--dim); font-size: 12.5px; padding: 10px 0 4px; border-top: 1px solid var(--line); }

/* Выезд */
.depart { display: flex; align-items: center; gap: 12px; padding: 6px 22px 4px; flex: none; }
.depart-label { font-family: var(--d); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.seg { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--mute); }
.seg button.on { background: var(--amber); color: var(--amber-ink); }

/* Чипы */
.chips { display: flex; gap: 8px; padding: 8px 22px 10px; overflow-x: auto; scrollbar-width: none; flex: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 13px 16px; border-radius: 12px; background: var(--bg2); color: var(--ink); border: 1px solid var(--line2); font-size: 14px; font-weight: 500; white-space: nowrap; transition: transform .12s; }
.chip:active { transform: scale(.97); }
.chip.primary { background: var(--amber); color: var(--amber-ink); border-color: transparent; font-weight: 600; }
.chip.recent { color: var(--red-text); }

/* Ввод */
.composer { display: flex; gap: 10px; padding: 4px 22px 16px; flex: none; }
.plus { width: 54px; height: 54px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); font-size: 26px; font-weight: 300; line-height: 1; color: var(--ink); }
.field { flex: 1; display: flex; align-items: center; height: 54px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line2); padding: 0 8px 0 16px; transition: border-color .3s; }
body.busy .field { border-color: rgba(228,0,43,.6); }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font-size: 16px; font-weight: 500; }
.field input::placeholder { color: var(--mute); font-weight: 400; }
.mic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--red-text); }
.mic.on { color: var(--amber-ink); background: var(--amber); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }

/* Раскрытое состояние */
body[data-state="expanded"] .sheet { height: 100dvh; border-radius: 0; padding-top: env(safe-area-inset-top); }
body[data-state="expanded"] .idle { opacity: 0; transform: scale(1.04); }
body[data-state="expanded"] .timebox { opacity: 0; }
body[data-state="expanded"] .home { display: none; }
body[data-state="expanded"] .thread { display: block; }
body[data-state="expanded"] .memory { display: none; }
body[data-state="expanded"] .collapse { display: inline-flex; }
body[data-state="home"] .depart { display: none; }

/* Память (профиль) */
.profile { position: fixed; inset: 0; z-index: 20; background: var(--bg); display: flex; flex-direction: column; }
.profile-head { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 22px 8px; border-bottom: 1px solid var(--line); }
.profile-head h2 { margin: 0; font-family: var(--d); font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.profile-body { flex: 1; overflow: auto; padding: 8px 22px 20px; }
.profile-body h3 { font-family: var(--d); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin: 22px 0 6px; }
.profile-body label { display: block; color: var(--mute); font-size: 12.5px; font-weight: 500; margin: 12px 0 0; }
.profile-body input, .profile-body textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); color: var(--ink); font-size: 16px; outline: 0; font-family: var(--f); resize: vertical; }
.profile-body input:focus, .profile-body textarea:focus { border-color: var(--amber); }
.talk { position: relative; }
.talk textarea { padding-right: 52px; margin-top: 0; }
.talk-mic { position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--amber); background: #fff; border: 1px solid var(--line); }
.talk-mic.on { background: var(--amber); color: #fff; animation: pulse 1s ease-in-out infinite; }
.readback ul, .history ul { margin: 0; padding: 0 0 0 18px; font-size: 14px; line-height: 1.45; color: #2a2a30; }
.readback li, .history li { margin: 4px 0; }
.switch { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: 14px; color: var(--ink); }
.steps li small { display: block; color: var(--dim); font-size: 12px; margin-top: 1px; }
.switch input { width: auto; margin: 0; accent-color: var(--amber); }
.profile-foot { padding: 10px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.hint.small { font-size: 12px; margin-top: 18px; }

/* Вход по номеру */
.auth { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg2); margin-top: 10px; }
.auth h3 { margin: 0 0 4px !important; }
.auth-row { display: flex; gap: 8px; margin-top: 8px; }
.auth-row input { margin-top: 0 !important; flex: 1; min-width: 0; background: #fff !important; }
.btn { padding: 10px 14px; border-radius: 12px; background: var(--amber); color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn.ghost { background: var(--bg2); color: var(--ink); border: 1px solid var(--line2); }
.link { color: var(--red-text); font-weight: 600; text-decoration: underline; }
.weights ul { margin: 0; padding: 0; list-style: none; }
.weights li { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 6px 0; }
.weights li i { flex: 1; height: 4px; background: var(--line2); border-radius: 2px; overflow: hidden; }
.weights li i::after { content: ""; display: block; height: 100%; width: var(--v); background: var(--amber); }
.weights li b { min-width: 68px; text-align: right; font-weight: 600; }
.badge.you { background: #111114; color: #fff; }
/* В пути */
.banner { margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: rgba(228,0,43,.07); border: 1px solid rgba(228,0,43,.25); font-size: 14.5px; line-height: 1.4; }
.banner-actions { display: flex; gap: 8px; margin-top: 10px; }
.trip-gps { font-size: 12.5px; color: var(--mute); margin-top: 8px; }
.trip-gps b { color: var(--red-text); font-weight: 600; }

/* Настройки (старое) */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(17,17,20,.45); display: flex; align-items: flex-end; }
.modal-card { width: 100%; max-height: 92dvh; overflow: auto; background: var(--bg2); border-radius: 24px 24px 0 0; border-top: 1px solid var(--line2); padding: 18px 22px calc(20px + env(safe-area-inset-bottom)); animation: up .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes up { from { transform: translateY(40px); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-card header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-card h2 { margin: 0; font-family: var(--d); font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.close { font-size: 30px; line-height: 1; color: var(--mute); width: 36px; height: 36px; }
.modal-card label { display: block; color: var(--mute); font-size: 12.5px; font-weight: 500; margin: 12px 0 0; }
.modal-card input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); color: var(--ink); font-size: 16px; outline: 0; }
.modal-card input:focus { border-color: var(--amber); }
.addr { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: end; margin-top: 10px; }
.addr .st { grid-column: 1 / -1; font-size: 12px; color: var(--red-text); min-height: 14px; margin-top: -2px; }
.addr .st.bad { color: #ff8a70; }
.addr .del { width: 42px; height: 46px; color: var(--mute); font-size: 22px; }
.add { margin-top: 14px; color: var(--red-text); font-weight: 600; }
.hint { color: var(--mute); font-size: 13px; }
.save { width: 100%; margin-top: 8px; padding: 14px; border-radius: 14px; background: var(--amber); color: var(--amber-ink); font-weight: 700; font-size: 16px; }

/* Режим поездки */
.trip { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column; padding: calc(14px + env(safe-area-inset-top)) 22px calc(18px + env(safe-area-inset-bottom)); }
.trip-head { display: flex; align-items: center; gap: 12px; }
.trip-title { font-family: var(--d); font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.trip-sub { color: var(--mute); font-size: 13px; margin-top: 3px; }
.trip-progress { height: 3px; border-radius: 2px; background: var(--bg3); margin: 18px 0 26px; overflow: hidden; }
.trip-progress i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .5s ease; }
.trip-k { font-family: var(--d); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red-text); }
.trip-step { font-family: var(--d); font-size: 24px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin-top: 10px; text-wrap: balance; }
.trip-list { list-style: none; margin: 28px 0 0; padding: 0; flex: 1; overflow: auto; }
.trip-list li { position: relative; padding: 11px 0 11px 26px; color: var(--mute); font-size: 15px; border-top: 1px solid var(--line); }
.trip-list li::before { content: ""; position: absolute; left: 3px; top: 17px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--dim); }
.trip-list li.done { color: var(--dim); text-decoration: line-through; }
.trip-list li.done::before { background: var(--amber); border-color: var(--amber); }
.trip-list li.now { color: var(--ink); font-weight: 600; }
.trip-list li.now::before { border-color: var(--amber); box-shadow: 0 0 10px var(--amber); }
.trip-eta { font-size: 13.5px; color: var(--mute); margin: -14px 0 18px; }
.trip-eta b { color: var(--ink); font-weight: 600; }
.trip-eta .late { color: var(--red-text); font-weight: 600; }
.trip-status { margin-top: 8px; font-size: 13.5px; color: var(--mute); }
.trip-done { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.trip-summary { font-size: 17px; line-height: 1.45; margin: 8px 0 14px; }
.fb { display: flex; gap: 8px; margin-bottom: 10px; }
.fb-btn { flex: 1; padding: 11px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); font-weight: 600; font-size: 14px; }
.fb-btn.on { background: var(--amber); color: #fff; border-color: transparent; }
.trip-done .talk { margin-bottom: 10px; }
.trip-done textarea { display: block; width: 100%; padding: 12px 52px 12px 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); color: var(--ink); font-size: 15px; outline: 0; font-family: var(--f); }
.trip-done .primary.wide { width: 100%; padding: 15px; border-radius: 14px; font-weight: 700; font-size: 16px; background: var(--amber); color: #fff; }
.trip-actions { display: flex; gap: 10px; margin-top: 14px; }
.trip-actions button { flex: 1; padding: 15px; border-radius: 14px; font-weight: 700; font-size: 16px; }
.trip-actions .primary { background: var(--amber); color: var(--amber-ink); }
.trip-actions .ghost { background: var(--bg2); border: 1px solid var(--line2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.reminder-time { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.profile-body .reminder-time input { width: 100px; margin-top: 0; }
.reminder-time span { color: var(--mute); font-size: 14px; }

.toast { padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em; }

.idle.is-playing { opacity: 1; }

.trip[data-state="done"] .trip-done { margin-top: 24px; }

.trip[data-state="done"] { overflow-y: auto; }
.trip[data-state="done"] > * { flex-shrink: 0; }

/* ── Автобус по запросу ─────────────────────────────────────── */
.sh-win { grid-column: 1 / -1; margin: 8px 0 0; font-size: 13.5px; color: var(--ink); }
.sh-win b { font-family: var(--d); font-weight: 700; font-size: 13px; letter-spacing: -.01em; color: var(--red-text); }
.card-actions .go-refresh:disabled { color: var(--dim); border-color: var(--line); }

/* плашка активной брони над чипами */
.bkbar { display: flex; align-items: center; gap: 12px; margin: 4px 22px 2px; padding: 10px 12px; border-radius: 14px; background: rgba(228,0,43,.07); border: 1px solid rgba(228,0,43,.28); text-align: left; flex: none; animation: rise .4s ease both; }
.bkbar-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--amber); color: #fff; display: grid; place-items: center; }
.bkbar-ico svg { width: 20px; height: 20px; }
.bkbar-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bkbar-txt b { font-size: 14px; font-weight: 600; }
.bkbar-txt span { font-size: 12.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bkbar-go { font-size: 24px; color: var(--red-text); line-height: 1; }

/* полноэкранные экраны брони */
.sheet2 { position: fixed; inset: 0; z-index: 32; background: var(--bg); display: flex; flex-direction: column; animation: up .35s cubic-bezier(.2,.8,.2,1) both; }
.s2-head { display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 22px 10px; border-bottom: 1px solid var(--line); }
.s2-title { font-family: var(--d); font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.s2-sub { color: var(--mute); font-size: 12.5px; margin-top: 2px; }
.s2-body { flex: 1; overflow: auto; padding: 16px 22px 18px; }
.s2-foot { padding: 10px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.bk-demo { margin: 0 0 14px; padding: 8px 12px; border-radius: 10px; background: var(--bg2); border: 1px dashed var(--line2); color: var(--mute); font-size: 12.5px; }
.bk-k { font-family: var(--d); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red-text); }
.bk-big { font-family: var(--d); font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 8px; }
.bk-line { margin-top: 8px; font-size: 14.5px; color: #2a2a30; }
.bk-line b { font-weight: 600; }
.bk-slots { display: flex; gap: 6px; overflow-x: auto; margin: 14px -22px 0; padding: 0 22px 2px; scrollbar-width: none; }
.bk-slots::-webkit-scrollbar { display: none; }
.slot { flex: none; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg2); font-size: 13px; font-weight: 600; color: var(--mute); }
.slot.on { background: var(--amber); border-color: transparent; color: #fff; }
.bk-route { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: st; }
.bk-route li { position: relative; padding: 7px 0 7px 26px; font-size: 14px; color: #2a2a30; border-top: 1px solid var(--line); }
.bk-route li::before { counter-increment: st; content: counter(st); position: absolute; left: 0; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg3); font-size: 11px; font-weight: 700; display: grid; place-items: center; color: var(--mute); }
.bk-route li small { display: block; color: var(--dim); font-size: 12px; margin-top: 1px; }
.bk-rows { margin-top: 16px; border-top: 1px solid var(--line2); }
.bk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.bk-row > span { color: var(--mute); }
.bk-row > b { font-weight: 600; text-align: right; }
.bk-row .seg button { padding: 6px 10px; }
.bk-phone { display: block; margin-top: 12px; color: var(--mute); font-size: 12.5px; }
.bk-phone input { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--amber); background: var(--bg2); font-size: 18px; letter-spacing: .2em; outline: 0; }
.bk-rules { margin: 14px 0 0; font-size: 12.5px; color: var(--mute); line-height: 1.45; }
.bk-msg { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(228,0,43,.07); border: 1px solid rgba(228,0,43,.25); font-size: 14px; line-height: 1.4; }
.bk-upd { font-size: 12px; color: var(--mute); text-align: center; }
.s2-foot .wide { width: 100%; padding: 15px; border-radius: 14px; font-weight: 700; font-size: 16px; }
.s2-foot .primary { background: var(--amber); color: #fff; }
.s2-foot .primary:disabled { opacity: .6; }
.s2-foot .ghost { background: var(--bg2); border: 1px solid var(--line2); color: var(--ink); }
.bk-flow { list-style: none; display: flex; gap: 4px; margin: 0 0 18px; padding: 0; }
.bk-flow li { flex: 1; font-size: 10px; font-weight: 600; color: var(--dim); text-align: center; line-height: 1.2; }
.bk-flow li::before { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--bg3); margin-bottom: 6px; }
.bk-flow li.done::before { background: var(--amber); }
.bk-flow li.now { color: var(--ink); }
.bk-flow li.now::before { background: var(--amber); box-shadow: 0 0 10px rgba(228,0,43,.6); animation: breathe-bar 1.6s ease-in-out infinite; }
@keyframes breathe-bar { 50% { opacity: .55; } }
.bk-h { font-family: var(--d); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin: 22px 0 4px; }
.bk-events { list-style: none; margin: 0; padding: 0; }
.bk-events li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.4; color: #2a2a30; }
.bk-events li:first-child { color: var(--ink); font-weight: 500; }
.bk-events time { display: inline-block; min-width: 46px; color: var(--mute); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.bk-confirm { padding: 12px; border-radius: 14px; background: rgba(228,0,43,.06); border: 1px solid rgba(228,0,43,.25); }
.bk-confirm p { margin: 0 0 10px; font-size: 14px; }
.bk-actions { display: flex; gap: 8px; }
.bk-actions button { flex: 1; padding: 12px; border-radius: 12px; font-weight: 700; font-size: 15px; }
.bk-actions .ghost { background: #fff; border: 1px solid var(--line2); }
.bk-actions .danger { background: var(--amber); color: #fff; }
.seg-wide { margin-top: 6px; }
.seg-wide button { flex: 1; }

/* всплывающее уведомление (как пуш, когда приложение открыто) */
.notif { position: fixed; z-index: 50; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top)); display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; background: rgba(17,17,20,.92); color: #fff; box-shadow: 0 14px 40px rgba(0,0,0,.35); cursor: pointer; }
.notif.show { animation: drop .4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes drop { from { transform: translateY(-30px); opacity: 0 } to { transform: none; opacity: 1 } }
.notif-ico { flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--amber); display: grid; place-items: center; }
.notif-ico svg { width: 19px; height: 19px; color: #fff; }
.notif b { display: block; font-size: 14px; font-weight: 600; }
.notif span span, .notif #notifText { display: block; font-size: 13px; color: #d9d9de; line-height: 1.35; margin-top: 2px; }
body.has-booking { --sheet-h: 66dvh; }
.bk-big[data-arrive]:not([data-arrive=""])::after { content: attr(data-arrive); display: block; font-family: var(--f); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--red-text); margin-top: 6px; }
