/* wow.tj — черновик междугороднего такси
   Палитра: небо над перевалом, ледник, тёмные чернила, абрикос (акцент), арча (свободные места). */
:root {
  --sky: #EAF1F5;
  --mist: #F6F9FB;
  --glacier: #D3E4EC;
  --ink: #13212C;
  --slate: #5B6E7C;
  --line: rgba(19, 33, 44, .10);
  --apricot: #EC7F2F;
  --apricot-ink: #A9501A;
  --apricot-soft: #FDE6D2;
  --juniper: #2E7A6A;
  --juniper-soft: #D9EEE8;
  --danger: #B83A27;
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .84);
  --glass-border: rgba(255, 255, 255, .8);
  --shadow: 0 24px 60px -28px rgba(19, 33, 44, .38), 0 2px 8px rgba(19, 33, 44, .05);
  --r-xl: 32px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --f-display: 'Unbounded', 'Onest', sans-serif;
  --f-body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 3vw, 32px);
  --maxw: 1240px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, #F9E6D6 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #D7E8F0 0%, transparent 60%),
    var(--sky);
  background-attachment: fixed;
  min-height: 100svh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--apricot); outline-offset: 2px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic { display: inline-block; vertical-align: -.2em; width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 26px; height: 26px; }

/* ---------- стекло ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
}
.glass-strong { background: var(--glass-strong); }

/* ---------- шапка ---------- */
.topbar {
  position: fixed; z-index: 50; top: 12px; left: 50%; transform: translateX(-50%);
  width: min(var(--maxw), calc(100% - 24px));
  display: flex; align-items: center; gap: 16px;
  padding: 8px 8px 8px 18px; border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; }
.brand small { font-family: var(--f-body); font-weight: 500; font-size: 12px; color: var(--slate); letter-spacing: 0; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--slate);
}
.nav a:hover { color: var(--ink); background: rgba(255,255,255,.6); }
.nav a[aria-current="page"] { color: var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(19,33,44,.08); }
.nav .badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--apricot); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.role {
  display: flex; padding: 4px; border-radius: 999px; background: rgba(19,33,44,.07);
}
.role button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--slate);
}
.role button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.bottombar { display: none; }

/* ---------- общие ---------- */
main { min-height: 100svh; }
.page { width: min(var(--maxw), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 108px 0 64px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin: 0 0 10px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
.h-display { font-family: var(--f-display); font-weight: 700; letter-spacing: -.035em; line-height: .98; }
.h2 { font-family: var(--f-display); font-size: clamp(26px, 3.2vw, 40px); line-height: 1.05; letter-spacing: -.03em; }
.h3 { font-size: 20px; letter-spacing: -.01em; }
.muted { color: var(--slate); }
.small { font-size: 13px; }
.mono { font-family: var(--f-mono); font-weight: 500; }
.num { font-variant-numeric: tabular-nums; }
.section { margin-top: 72px; }
.card { border-radius: var(--r-lg); padding: 22px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-side { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; font-size: 15px;
  background: var(--ink); color: #fff; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(19,33,44,.6); }
.btn:active { transform: none; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-accent { background: var(--apricot); color: #fff; }
.btn-accent:hover { background: #E2711F; box-shadow: 0 10px 24px -10px rgba(236,127,47,.7); }
.btn-ghost { background: rgba(255,255,255,.7); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(184,58,39,.3); }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.75); display: grid; place-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: rgba(19,33,44,.06); color: var(--ink); white-space: nowrap;
}
.chip-apricot { background: var(--apricot-soft); color: var(--apricot-ink); }
.chip-juniper { background: var(--juniper-soft); color: var(--juniper); }
.chip-ink { background: var(--ink); color: #fff; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot-live { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* номерной знак — родной объект таджикской дороги */
.plate {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; border-radius: 6px;
  background: #fff; border: 1.5px solid var(--ink); font-family: var(--f-mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; white-space: nowrap;
}
.plate b { background: var(--ink); color: #fff; font-size: 9px; padding: 1px 4px; border-radius: 3px; letter-spacing: .02em; }

.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 12px; font-weight: 600; color: var(--slate); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,.85); border-radius: var(--r-sm);
  padding: 12px 14px; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6E7C' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--apricot); box-shadow: 0 0 0 4px rgba(236,127,47,.15); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-size: 13px; font-weight: 500; }
.hint { color: var(--slate); font-size: 13px; }

.seg { display: flex; padding: 4px; border-radius: 14px; background: rgba(19,33,44,.06); gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 9px 10px; font-size: 14px; font-weight: 600; color: var(--slate); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(19,33,44,.1); }

.option {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: rgba(255,255,255,.7); cursor: pointer;
}
.option:has(input:checked) { border-color: var(--ink); background: #fff; }
.option input { margin: 3px 0 0; accent-color: var(--ink); width: 18px; height: 18px; flex: none; }
.option strong { display: block; font-size: 15px; }

.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 14px; background: rgba(19,33,44,.18); transition: background .2s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--juniper); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--apricot); outline-offset: 2px; }

.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ---------- герой ---------- */
.hero {
  position: relative; margin: 12px; border-radius: var(--r-xl); overflow: hidden;
  min-height: min(880px, calc(100svh - 24px));
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 120px clamp(20px, 4vw, 56px) clamp(20px, 3vw, 36px);
  isolation: isolate;
}
.landscape { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); grid-template-areas: "copy live" "stats live"; gap: 0 32px; align-items: end; }
.hero-copy { grid-area: copy; }
#rg-stats { grid-area: stats; }
#rg-live { grid-area: live; }
.hero h1 { font-size: clamp(42px, 6.6vw, 100px); max-width: 11ch; }
.hero h1 em { font-style: normal; color: var(--apricot-ink); }
.hero-lead { font-size: clamp(16px, 1.4vw, 19px); max-width: 44ch; margin: 22px 0 0; color: #2A3B48; }
.hero-stats { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats div { display: grid; }
.hero-stats b { font-family: var(--f-display); font-size: 24px; letter-spacing: -.03em; }
.hero-stats span { font-size: 13px; color: var(--slate); }

.live-card { border-radius: var(--r-lg); padding: 18px; justify-self: end; width: min(100%, 360px); }
.live-card .route-mini { font-family: var(--f-display); font-size: 20px; letter-spacing: -.02em; line-height: 1.1; margin: 10px 0 4px; }

.search {
  margin-top: 36px; border-radius: 24px; padding: 10px;
  display: grid; grid-template-columns: 1fr auto 1fr 1fr .7fr auto; gap: 6px; align-items: stretch;
}
.search .sf { display: grid; gap: 2px; padding: 8px 14px; border-radius: 16px; background: rgba(255,255,255,.72); }
.search .sf span { font-size: 11px; font-weight: 600; color: var(--slate); text-transform: uppercase; letter-spacing: .08em; }
.search .sf select, .search .sf input { border: 0; background: transparent; padding: 2px 0; font-size: 16px; font-weight: 600; outline: none; width: 100%; appearance: none; }
.search .swap { align-self: center; }
.search .btn { border-radius: 16px; padding: 0 26px; }

/* ---------- маршрутная лента ---------- */
.routes { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.routes::-webkit-scrollbar { display: none; }
.route-chip {
  flex: none; display: grid; gap: 2px; text-align: left; padding: 14px 18px; border-radius: 20px; min-width: 170px;
  border: 1px solid var(--glass-border); background: var(--glass); cursor: pointer;
}
.route-chip b { font-family: var(--f-display); font-size: 17px; letter-spacing: -.02em; }
.route-chip span { font-size: 13px; color: var(--slate); }
.route-chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.route-chip[aria-pressed="true"] span { color: rgba(255,255,255,.7); }

/* ---------- карточка машины ---------- */
.rides { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.ride {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 14px 18px;
  padding: 20px; border-radius: var(--r-lg); text-align: left; width: 100%;
  border: 1px solid var(--glass-border); background: var(--glass);
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.enter .ride, .ride.fresh { animation: rise .5s ease both; }
.ride:hover { transform: translateY(-3px); }
.ride.is-mine { border-color: var(--apricot); box-shadow: 0 0 0 2px var(--apricot-soft), var(--shadow); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.ride-route { font-family: var(--f-display); font-size: 22px; line-height: 1.05; letter-spacing: -.03em; }
.ride-route .arrow { color: var(--apricot); }
.ride-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--slate); margin-top: 8px; }
.ride-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ride-driver { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; }
.ride-price { text-align: right; }
.ride-price b { font-family: var(--f-display); font-size: 22px; letter-spacing: -.03em; display: block; line-height: 1; }
.ride-price small { font-size: 12px; color: var(--slate); }
.ride .btn { margin-left: auto; }

/* схема машины — подпись проекта */
.car {
  --seat: 30px;
  position: relative; width: calc(var(--seat) * 3 + 34px); padding: 26px 10px 14px;
  border-radius: 34px 34px 22px 22px; background: linear-gradient(180deg, #fff, #F1F5F8);
  border: 1.5px solid rgba(19,33,44,.14);
  display: grid; grid-template-columns: repeat(3, var(--seat)); gap: 7px 7px; justify-content: center;
}
.car::before { /* лобовое стекло */
  content: ''; position: absolute; top: 7px; left: 18%; right: 18%; height: 9px; border-radius: 10px 10px 3px 3px; background: var(--glacier);
}
.seat {
  width: var(--seat); height: var(--seat); border-radius: 9px 9px 6px 6px; border: 1.5px dashed rgba(46,122,106,.6);
  background: var(--juniper-soft); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--juniper);
  padding: 0; transition: background .3s, transform .2s;
}
.seat.taken { border: 0; background: var(--ink); color: #fff; }
.seat.fresh { animation: seatIn .45s cubic-bezier(.3,1.6,.6,1) both; }
.seat.mine { border: 0; background: var(--apricot); color: #fff; }
.seat.driver { border: 0; background: rgba(19,33,44,.1); color: var(--slate); }
.seat.driver svg { width: 18px; height: 18px; }
.seat.gap { visibility: hidden; }
.seat.pick { border: 0; background: var(--apricot); color: #fff; transform: scale(1.08); }
button.seat:not(:disabled):hover { transform: scale(1.08); }
button.seat:disabled { cursor: default; }
@keyframes seatIn { from { transform: scale(.4); opacity: 0; } }
.car-lg { --seat: 54px; padding: 40px 18px 22px; border-radius: 52px 52px 30px 30px; gap: 12px; }
.car-lg .seat { font-size: 13px; border-radius: 14px 14px 9px 9px; }
.car-lg::before { top: 12px; height: 14px; }
.car-caption { font-size: 12px; font-weight: 600; text-align: center; margin-top: 8px; }
.car-wrap { display: grid; justify-items: center; }

/* ---------- шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { border-radius: var(--r-lg); padding: 24px; }
.step-n { font-family: var(--f-display); font-size: 44px; line-height: 1; color: var(--apricot); letter-spacing: -.04em; }
.step h3 { margin: 18px 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--slate); }

/* ---------- карта ---------- */
.map-shell { position: relative; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--glass-border); box-shadow: var(--shadow); }
.map { height: 520px; background: var(--glacier); }
.map-full .map { height: calc(100svh - 230px); min-height: 420px; }
.map-panel { position: absolute; z-index: 500; top: 14px; left: 14px; border-radius: 20px; padding: 6px; display: flex; gap: 4px; }
.map-panel button { border: 0; background: transparent; border-radius: 14px; padding: 8px 12px; font-size: 13px; font-weight: 600; color: var(--slate); }
.map-panel button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.map-legend { position: absolute; z-index: 500; bottom: 14px; left: 14px; border-radius: 16px; padding: 10px 14px; display: flex; gap: 14px; font-size: 12px; font-weight: 600; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.car-pin {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px 5px 5px; border-radius: 999px;
  background: #fff; box-shadow: 0 6px 16px -6px rgba(19,33,44,.5); font: 600 12px var(--f-body); color: var(--ink); white-space: nowrap;
  transform: translate(-50%, -50%); position: absolute;
}
.car-pin i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--juniper); color: #fff; font-style: normal; }
.car-pin.full i { background: var(--ink); }
.car-pin.moving i { background: var(--apricot); }
.car-pin.me { background: var(--ink); color: #fff; }
.car-pin.me i { background: var(--apricot); }
.car-pin svg { width: 14px; height: 14px; }
.stand-pin { transform: translate(-50%, -50%); position: absolute; padding: 4px 8px; border-radius: 8px; background: rgba(19,33,44,.82); color: #fff; font: 600 11px var(--f-body); white-space: nowrap; }
.city-pin { transform: translate(-50%, -50%); position: absolute; font: 700 13px var(--f-display); color: var(--ink); white-space: nowrap; text-shadow: 0 0 4px #fff, 0 0 8px #fff; letter-spacing: -.02em; }
.pickup-pin { transform: translate(-50%, -100%); position: absolute; padding: 4px 8px; border-radius: 8px 8px 8px 2px; background: var(--apricot); color: #fff; font: 600 11px var(--f-body); white-space: nowrap; }
.leaflet-container { font-family: var(--f-body); }
/* приглушаем OSM под палитру сайта */
.leaflet-tile-pane { filter: saturate(.55) contrast(.95) brightness(1.04); }
.leaflet-popup-content-wrapper { border-radius: 16px; }
.leaflet-popup-content { margin: 14px 16px; }

/* ---------- водитель ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(28px, 5vw, 64px);
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center; isolation: isolate; color: #fff;
}
.cta-band .landscape { filter: saturate(.8) brightness(.55); }
.cta-band p { color: rgba(255,255,255,.82); max-width: 46ch; }
.cta-band ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cta-band li { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

.pax { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.pax:first-child { border-top: 0; }
.seat-no { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.seat-no.free { background: var(--juniper-soft); color: var(--juniper); border: 1.5px dashed rgba(46,122,106,.6); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--juniper-soft); color: #1C5246; font-size: 14px; }
.banner-apricot { background: var(--apricot-soft); color: #7A3B13; }
.banner-ink { background: var(--ink); color: #fff; }

.progress { height: 10px; border-radius: 5px; background: rgba(19,33,44,.08); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--apricot), #F4A867); }

/* ---------- кошелёк ---------- */
.money { font-family: var(--f-display); font-size: clamp(40px, 5vw, 64px); letter-spacing: -.04em; line-height: 1; }
.money small { font-size: .4em; letter-spacing: 0; color: var(--slate); margin-left: 6px; }
.balance-card { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 28px; color: #fff; isolation: isolate; min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; }
.balance-card .landscape { filter: brightness(.6) saturate(.9); }
.balance-card .money small { color: rgba(255,255,255,.7); }
.tx { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.tx:first-child { border-top: 0; }
.tx-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(19,33,44,.06); }
.plus { color: var(--juniper); font-weight: 700; }
.minus { color: var(--ink); font-weight: 700; }
.promo-ticket {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 14px 18px; border-radius: 16px;
  background: #fff; border: 1.5px dashed rgba(236,127,47,.6);
}
.promo-ticket .mono { font-size: 15px; letter-spacing: .06em; }

/* ---------- окно ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 900; background: rgba(19,33,44,.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .2s ease; display: flex; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
.sheet-back.again, .sheet-back.again .sheet { animation: none; }
.sheet {
  width: min(560px, 100%); height: 100%; overflow-y: auto; background: var(--mist); padding: 24px; animation: slideIn .3s cubic-bezier(.2,.8,.2,1);
  display: grid; align-content: start; gap: 18px;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.sheet .ride-route { font-size: 28px; }
.summary { display: grid; gap: 8px; font-size: 14px; }
.summary .row-between b { font-weight: 600; }
.summary .total { font-size: 18px; padding-top: 10px; border-top: 1px solid var(--line); }
.summary .total b { font-family: var(--f-display); font-size: 22px; letter-spacing: -.02em; }

/* ---------- тосты ---------- */
.toasts { position: fixed; z-index: 1000; left: 50%; transform: translateX(-50%); bottom: 24px; display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); animation: toastIn .35s cubic-bezier(.2,.8,.2,1); }
.toast .ic { color: var(--apricot); }
@keyframes toastIn { from { transform: translateY(16px); opacity: 0; } }

.empty { text-align: center; padding: 48px 24px; border-radius: var(--r-lg); border: 1.5px dashed rgba(19,33,44,.18); }
.empty h3 { font-size: 19px; margin-bottom: 6px; }
.empty p { color: var(--slate); max-width: 42ch; margin: 0 auto 18px; }

.draft-note { font-size: 12px; color: var(--slate); text-align: center; padding: 24px var(--gutter) 40px; }
.footer { width: min(var(--maxw), calc(100% - 2 * var(--gutter))); margin: 40px auto 0; padding: 28px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--slate); }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .search { grid-template-columns: 1fr auto 1fr; }
  .search .sf-date, .search .sf-seats { grid-column: span 1; }
  .search .btn { grid-column: span 3; padding: 15px; }
  .search .sf-seats { grid-column: span 2; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "stats" "live"; }
  #rg-live { margin-top: 24px; }
  .live-card { justify-self: start; }
  .grid-side { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { padding: 6px 6px 6px 12px; top: 8px; width: calc(100% - 16px); }
  .topbar .nav { display: none; }
  .brand small { display: none; }
  .role { margin-left: auto; }
  .role button { padding: 7px 11px; font-size: 12px; }
  .bottombar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; z-index: 60; left: 8px; right: 8px; bottom: 8px;
    border-radius: 24px; padding: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom) / 2);
  }
  .bottombar a { display: grid; justify-items: center; gap: 2px; padding: 7px 2px; border-radius: 18px; text-decoration: none; font-size: 11px; font-weight: 600; color: var(--slate); position: relative; }
  .bottombar a[aria-current="page"] { color: var(--ink); background: #fff; }
  .bottombar .badge { position: absolute; top: 3px; right: calc(50% - 20px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--apricot); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
  .page { padding: 84px 0 110px; }
  .hero { margin: 0; border-radius: 0 0 28px 28px; padding: 92px 16px 20px; min-height: auto; }
  .hero h1 { font-size: clamp(38px, 11.5vw, 56px); }
  .hero-stats { gap: 20px; }
  .hero-stats b { font-size: 20px; }
  .live-card { width: 100%; }
  .search { grid-template-columns: 1fr auto 1fr; padding: 8px; border-radius: 22px; }
  .search .sf { padding: 8px 10px; }
  .search .sf select, .search .sf input { font-size: 15px; }
  .section { margin-top: 48px; }
  .rides { grid-template-columns: 1fr; }
  .ride { padding: 16px; }
  .ride-route { font-size: 19px; }
  .steps { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; border-radius: 24px; }
  .map { height: 400px; }
  .map-full .map { height: calc(100svh - 250px); }
  .sheet-back { align-items: flex-end; }
  .sheet { height: auto; max-height: 92svh; border-radius: 28px 28px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); animation-name: slideUp; }
  .sheet .ride-route { font-size: 23px; }
  .toasts { bottom: 92px; }
  .footer { margin-bottom: 90px; }
  .car-lg { --seat: 46px; }
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } }

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

.driver-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.driver-line .nm { font-weight: 600; font-size: 14px; }
.rating { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.rating .ic { width: 14px; height: 14px; fill: var(--apricot); stroke: var(--apricot); }

/* кнопка профиля в шапке */
.me-btn { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 2px solid #fff; color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(19,33,44,.18); }
.topbar > .btn-sm { flex: none; }
@media (max-width: 760px) { .me-btn { width: 34px; height: 34px; } .role { margin-left: auto; } }

/* в открытом окне уведомления — сверху, чтобы не закрывать кнопки */
body:has(.sheet-back) .toasts { top: 16px; bottom: auto; }
.sheet .driver-card { flex-wrap: wrap; }
.sheet .driver-card .plate { margin-left: auto; }

/* ---------- телефон: доводка ---------- */
.ride-price b { white-space: nowrap; }
@media (max-width: 760px) {
  body { background-attachment: scroll; }
  /* iPhone увеличивает страницу при фокусе на поле со шрифтом меньше 16px */
  .input, .select, .textarea, .search .sf select, .search .sf input { font-size: 16px; }

  .topbar { top: max(8px, env(safe-area-inset-top)); }
  .bottombar { bottom: max(8px, env(safe-area-inset-bottom)); padding-bottom: 6px; }
  .page { padding: calc(80px + env(safe-area-inset-top)) 0 calc(104px + env(safe-area-inset-bottom)); }

  /* первый экран: заголовок → поиск → статистика → машина */
  .hero { padding: calc(80px + env(safe-area-inset-top)) 16px 20px; gap: 0; }
  .hero-grid { display: contents; }
  .hero-copy { order: 1; }
  .hero .search { order: 2; margin-top: 18px; }
  #rg-live { order: 3; margin-top: 16px; }
  .hero h1 { font-size: clamp(34px, 10.4vw, 46px); }
  .hero .eyebrow { font-size: 11px; margin-bottom: 8px; }
  .hero-lead { font-size: 15px; margin-top: 12px; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 0; order: 4; }
  #rg-stats { order: 4; margin-top: 16px; }
  .hero-stats b { font-size: 20px; }
  .hero-stats span { font-size: 12px; line-height: 1.25; }
  .search .sf span { font-size: 10px; }

  .section { margin-top: 44px; }
  .page-head { margin-bottom: 16px; }

  .steps { gap: 10px; }
  .step { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: start; padding: 16px 18px; border-radius: 20px; }
  .step-n { font-size: 30px; grid-row: span 2; }
  .step h3 { margin: 2px 0 4px; font-size: 17px; }
  .step p { font-size: 14px; }

  .ride-price b { font-size: 19px; }
  .ride-driver { gap: 8px; }
  .map { height: 360px; }
  .cta-band { padding: 26px 20px; }
  .cta-band .btn-lg { width: 100%; padding: 15px 18px; }
  .balance-card { min-height: 190px; padding: 22px; }
  .card { padding: 18px; }
}
@media (max-width: 360px) {
  .brand > span:last-child { font-size: 16px; }
  .role button { padding: 7px 9px; }
  .hero-stats span { font-size: 11px; }
}

/* ---------- где машина ---------- */
.plate-search { display: flex; gap: 8px; padding: 8px; border-radius: 22px; margin-bottom: 20px; align-items: stretch; }
.plate-search .sf { flex: 1; display: grid; gap: 2px; padding: 8px 14px; border-radius: 16px; background: rgba(255,255,255,.75); min-width: 0; }
.plate-search .sf span { font-size: 11px; font-weight: 600; color: var(--slate); text-transform: uppercase; letter-spacing: .08em; }
.plate-search input { border: 0; background: transparent; padding: 2px 0; font: 500 18px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; outline: none; width: 100%; }
.plate-search .btn { border-radius: 16px; padding: 0 22px; }
.plate-lg { font-size: 16px; padding: 5px 12px 5px 6px; border-width: 2px; border-radius: 8px; }
.plate-lg b { font-size: 11px; padding: 2px 5px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.track-grid .map { height: 460px; }
.car-pin.live i { animation: livePulse 1.8s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(46,122,106,.55); } 100% { box-shadow: 0 0 0 14px rgba(46,122,106,0); } }
@media (max-width: 760px) {
  .plate-search { border-radius: 20px; }
  .plate-search input { font-size: 17px; }
  .plate-search .btn { padding: 0 16px; }
  .track-grid .map { height: 300px; }
  .share-row .btn { flex: 1 1 calc(50% - 4px); }
}
