/* ============ Shared page layout ============ */
#view { outline: none; min-height: 60vh; }
.page-top { height: calc(var(--header-h) + 8px); }
.page-pad { padding-top: calc(var(--header-h) + 40px); padding-bottom: 24px; }
.narrow { max-width: 820px; }
.page-head { margin-bottom: 26px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; color: var(--muted); margin: calc(var(--header-h) + 20px) 0 14px; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 18px; height: 18px; }
.cap { text-transform: capitalize; }
.h-sec { font-size: 1.25rem; }
.section { padding-top: clamp(64px, 9vw, 120px); }
.section-head { margin-bottom: clamp(24px, 3vw, 40px); display: grid; gap: 12px; }
.list-title { margin: 28px 0 12px; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--font-body); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-sm); background: var(--brand-50); color: var(--brand-600); }
.notice svg { margin-top: 2px; }
.notice.bad { background: var(--bad-50); color: var(--bad); }
.notice.info { background: #eaf1f8; color: #1d4f7a; }
.notice p { color: inherit; opacity: .9; }
.link-btn { color: var(--brand-600); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin: 22px 0 6px; }

.pick-group-title { margin: 14px 0 4px; }
.pick-state { font: 700 .85rem var(--font-display); color: var(--muted); margin: 14px 0 6px; }
.pick-row { display: flex; width: 100%; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-sm); text-align: left; transition: background .15s; min-height: 64px; }
.pick-row:hover { background: #fff; }
.pick-row[aria-pressed='true'] { background: var(--brand-50); }
.pick-ico { width: 40px; height: 40px; border-radius: 12px; background: #fff; display: grid; place-items: center; border: 1px solid var(--line); flex: none; color: var(--brand-600); }
.pick-main { flex: 1; min-width: 0; display: grid; }
.pick-main strong { font-size: .98rem; }
.pick-check { opacity: 0; color: var(--brand-600); }
.pick-row[aria-pressed='true'] .pick-check { opacity: 1; }

/* ============ Car grid ============ */
.car-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1023px) { .car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .car-grid { grid-template-columns: 1fr; } }

/* ============ Car card ============ */
.car-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s; }
.car-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-3); border-color: transparent; }
.car-card-link { display: block; height: 100%; }
.car-card-media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(160deg, #eef2f6, #e1e8ef); overflow: hidden; }
.car-img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.car-card:hover .car-img { transform: scale(1.05); }
.car-img-3d { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); background: linear-gradient(160deg, var(--ink-2), var(--ink)); }
.car-img-3d svg { width: 46px; height: 46px; color: var(--accent); }
.car-img-3d span { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.car-cat { position: absolute; left: 14px; top: 14px; }
.car-left { position: absolute; right: 14px; bottom: 12px; background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.car-sold { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(245, 247, 250, .84); font-weight: 800; text-align: center; padding: 20px; backdrop-filter: grayscale(1); }
.car-card.is-sold { opacity: .8; }
.car-card.is-sold .car-card-link { cursor: not-allowed; }
.car-card.is-sold:hover { transform: none; box-shadow: none; }
.car-card-body { padding: 20px; display: grid; gap: 14px; }
.specs { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .82rem; color: var(--muted); }
.specs li { display: inline-flex; align-items: center; gap: 6px; }
.specs svg { width: 16px; height: 16px; }
.car-card-foot { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.car-price { font: 800 1.5rem var(--font-display); letter-spacing: -.03em; }
.car-go { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; transition: background .2s, transform .3s var(--ease); }
.car-card:hover .car-go { background: var(--accent); color: var(--on-accent); transform: translateX(3px); }

/* ============ Results ============ */
.results { padding-top: 8px; }
.trip-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; position: sticky; top: calc(var(--header-h) + 8px); z-index: 20; backdrop-filter: blur(12px); background: rgba(255, 255, 255, .92); }
.trip-bar-main { display: flex; align-items: center; gap: 20px; min-width: 0; flex-wrap: wrap; }
.trip-bar-leg { display: flex; gap: 12px; align-items: center; min-width: 0; }
.trip-bar-leg > svg { color: var(--brand); width: 24px; height: 24px; }
.trip-bar-leg div { display: grid; min-width: 0; }
.trip-bar-leg strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-bar-arrow { color: var(--muted-2); }
@media (max-width: 899px) { .trip-bar { position: static; margin-top: 8px; } .trip-bar-arrow { display: none; } .trip-bar-main { gap: 12px; } }

/* ============ Car page ============ */
.car-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .85fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.car-main { display: grid; gap: 24px; }
.car-stage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: radial-gradient(120% 90% at 50% 20%, #26435c, var(--ink)); border: 0; }
.car-stage-img { aspect-ratio: auto; position: absolute; inset: 0; }
.stage-ui { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; pointer-events: none; }
.stage-ui > * { pointer-events: auto; }
.swatches { display: flex; gap: 8px; padding: 8px 10px; background: rgba(11, 27, 43, .55); backdrop-filter: blur(8px); border-radius: 999px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; background: var(--c); border: 2px solid rgba(255, 255, 255, .35); transition: transform .2s var(--ease), border-color .2s; }
.swatch:hover { transform: scale(1.15); }
.swatch[aria-pressed='true'] { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 12px; }
.facts dt { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); font-weight: 700; }
.facts dt svg { width: 16px; height: 16px; }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.feature-list li { display: flex; gap: 10px; align-items: center; font-size: .92rem; }
.feature-list svg { color: var(--brand); width: 18px; height: 18px; }
.car-panel { position: sticky; top: calc(var(--header-h) + 16px); }
.panel-trip { display: grid; gap: 12px; padding-bottom: 6px; }
.panel-trip > div { display: grid; }
.plans { display: grid; gap: 10px; }
.plan { border: 1.5px solid var(--line-2); border-radius: var(--r); background: #fff; transition: border-color .2s, box-shadow .2s; overflow: hidden; }
.plan:has([aria-checked='true']) { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.plan-head { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; text-align: left; }
.plan-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; transition: .2s; }
.plan-head[aria-checked='true'] .plan-radio { border-color: var(--brand); }
.plan-head[aria-checked='true'] .plan-radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.plan-main { flex: 1; display: grid; min-width: 0; }
.plan-price { font-weight: 800; white-space: nowrap; text-align: right; }
.plan-price small { font-weight: 600; color: var(--muted); }
.plan-pop { position: absolute; right: 14px; top: -1px; border-radius: 0 0 10px 10px; padding: 3px 10px; }
.plan-body { overflow: hidden; padding: 0 16px; }
.plan-body > * { }
.plan-body ul { display: grid; gap: 8px; padding: 0 0 16px; }
.plan-body p { padding-top: 2px; }
.plan-body li { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.plan-body li svg { width: 17px; height: 17px; color: var(--ok); }
.plan-body li.off { color: var(--muted-2); text-decoration: line-through; }
.plan-body li.off svg { color: var(--muted-2); }
.addons { display: grid; gap: 10px; }
.addon { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r); background: #fff; transition: border-color .2s, background .2s; }
.addon.is-on { border-color: var(--brand); background: var(--brand-50); }
.addon-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--paper); display: grid; place-items: center; flex: none; }
.addon-main { flex: 1; display: grid; min-width: 0; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--paper); border-radius: 999px; padding: 3px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow-1); transition: transform .15s; }
.stepper button:active { transform: scale(.9); }
.stepper svg { width: 16px; height: 16px; }
.stepper output { min-width: 28px; text-align: center; font-weight: 800; }

/* Price summary */
.price-lines { display: grid; gap: 10px; }
.price-lines li { display: flex; justify-content: space-between; gap: 16px; font-size: .94rem; }
.price-lines li.is-neg { color: var(--ok); font-weight: 600; }
.price-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 14px; border-top: 1px dashed var(--line-2); font-weight: 700; }
.price-total strong { font: 800 1.7rem var(--font-display); letter-spacing: -.03em; }
.price-note { display: flex; gap: 8px; margin-top: 12px; align-items: flex-start; }
.price-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--brand); }
.desk-cta { margin-top: 18px; }

/* Mobile sticky buy bar */
.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 58; display: none; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--gutter) calc(12px + var(--safe-b)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(11, 27, 43, .08); }
.buybar strong { display: block; font: 800 1.35rem var(--font-display); letter-spacing: -.03em; line-height: 1.1; }
body.no-bottom-nav .bottom-nav { display: none !important; }
@media (max-width: 1023px) {
  .car-layout { grid-template-columns: 1fr; }
  .car-panel { position: static; }
  .buybar { display: flex; }
  .desk-cta { display: none; }
  body.no-bottom-nav { padding-bottom: 96px !important; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) { .feature-list { grid-template-columns: 1fr; } .car-stage { aspect-ratio: 4 / 3; } }

/* ============ Stepper (progress) ============ */

ol.progress-steps { display: flex; justify-content: center; gap: clamp(8px, 3vw, 28px); margin: 0 0 24px; padding: 0; background: none; border-radius: 0; }
ol.progress-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-weight: 700; font-size: .88rem; position: relative; }
ol.progress-steps li:not(:last-child)::after { content: ''; width: clamp(14px, 4vw, 48px); height: 2px; background: var(--line-2); margin-left: clamp(2px, 1vw, 10px); }
.stepper-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-size: .82rem; flex: none; }
.stepper-dot svg { width: 16px; height: 16px; }
ol.progress-steps li.now { color: var(--text); }
ol.progress-steps li.now .stepper-dot { background: var(--ink); color: #fff; }
ol.progress-steps li.done { color: var(--brand-600); }
ol.progress-steps li.done .stepper-dot { background: var(--brand); color: #fff; }
ol.progress-steps li.done::after { background: var(--brand); }
@media (max-width: 639px) { .stepper-label { display: none; } ol.progress-steps li.now .stepper-label { display: inline; } }

/* ============ Checkout ============ */
.checkout { padding-bottom: 40px; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.checkout-aside { position: sticky; top: calc(var(--header-h) + 16px); }
.summary-img { width: 92px; height: 66px; border-radius: 12px; flex: none; aspect-ratio: auto; font-size: 0; }
.summary-img svg { width: 24px; height: 24px; }
.summary-img span { display: none; }
.timeline { display: grid; gap: 0; margin-top: 18px; position: relative; }
.timeline li { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li > div { display: grid; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--brand); background: #fff; margin-top: 4px; flex: none; position: relative; z-index: 1; }
.tl-dot.end { border-color: var(--accent); }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 6px; top: 20px; bottom: 0; width: 2px; background: repeating-linear-gradient(var(--line-2) 0 4px, transparent 4px 8px); }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pay-methods .badge { padding: 7px 12px; }
.pay-methods svg { width: 14px; height: 14px; }
@media (max-width: 1023px) { .checkout-grid { grid-template-columns: 1fr; } .checkout-aside { position: static; order: -1; } .desk-only { display: none; } }

/* ============ Booking + pass ============ */
.booking-page { padding-top: calc(var(--header-h) + 28px); }
.booking-head { text-align: center; display: grid; gap: 10px; justify-items: center; margin-bottom: 28px; }
.booking-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.success-badge { width: 84px; height: 84px; border-radius: 50%; background: var(--ok-50); color: var(--ok); display: grid; place-items: center; }
.success-badge svg { width: 60px; height: 60px; }
.success-badge .sb-c { fill: none; stroke: var(--ok); stroke-width: 3; }
.success-badge .sb-t { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.success-badge.is-wait { background: var(--warn-50); color: var(--warn); }
.success-badge.is-bad { background: var(--bad-50); color: var(--bad); }
.success-badge.is-wait > svg, .success-badge.is-bad > svg { width: 38px; height: 38px; }
.pass { max-width: 760px; margin: 0 auto 24px; border-radius: 28px; overflow: hidden; background: #fff; box-shadow: var(--shadow-3); position: relative; }
.pass-top { padding: clamp(20px, 3vw, 30px); background: linear-gradient(135deg, var(--ink), var(--ink-3)); color: #fff; display: grid; gap: 22px; }
.pass-head { display: flex; justify-content: space-between; align-items: center; }
.pass-route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.pass-route strong { display: block; font: 800 clamp(1.9rem, 6vw, 3rem)/1 var(--font-display); letter-spacing: -.03em; }
.pass-route span { font-size: .82rem; color: rgba(255, 255, 255, .65); }
.pass-route .right { text-align: right; }
.pass-line { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.pass-line span { height: 2px; width: clamp(24px, 8vw, 90px); background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 5px, transparent 5px 10px); }
.pass-car { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .14); }
.pass-k { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
.pass-car .pass-k { color: rgba(255, 255, 255, .55); }
.pass-car strong { font-size: 1.08rem; }
.pass-tear { position: relative; height: 0; display: flex; justify-content: space-between; align-items: center; }
.pass-tear i { width: 28px; height: 28px; border-radius: 50%; background: var(--paper); position: absolute; top: -14px; }
.pass-tear i:first-child { left: -14px; }
.pass-tear i:last-child { right: -14px; }
.pass-tear b { position: absolute; left: 22px; right: 22px; top: -1px; border-top: 2px dashed var(--line-2); }
.pass-bottom { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: clamp(22px, 3vw, 32px); align-items: center; }
.pass-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.pass-grid div { display: grid; gap: 2px; }
.pass-qr { display: grid; gap: 8px; justify-items: center; text-align: center; }
.pass-qr img { border: 1px solid var(--line); border-radius: 16px; padding: 8px; background: #fff; }
.booking-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.booking-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1000px; margin: 0 auto; }
.checklist { display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: center; font-size: .92rem; }
.checklist svg { color: var(--brand); width: 18px; height: 18px; }
@media (max-width: 719px) { .pass-bottom { grid-template-columns: 1fr; } .pass-qr { order: -1; } .booking-cols { grid-template-columns: 1fr; } .pass-route .right, .pass-route div:first-child { } }
@media print { .site-header, .bottom-nav, .site-footer, .booking-actions, .stepper, [data-cancel] { display: none !important; } body { background: #fff; padding: 0 !important; } .booking-page { padding-top: 0; } }

/* ============ Trips / stations ============ */
.trip-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px 14px 14px; transition: transform .25s var(--ease), box-shadow .25s; }
.trip-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.trip-img { width: 96px; height: 68px; border-radius: 14px; flex: none; aspect-ratio: auto; }
.trip-img svg { width: 22px; height: 22px; }
.trip-img span { display: none; }
.trip-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.trip-end { display: grid; text-align: right; }
.station-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
@media (max-width: 1023px) { .station-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 639px) { .station-grid { grid-template-columns: 1fr; } .trip-img { width: 72px; height: 54px; } }

/* ============ Processing overlay ============ */
.processing { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; background: rgba(12, 22, 30, .95); color: #fff; text-align: center; padding: 24px; }
.processing-inner { display: grid; gap: 14px; justify-items: center; max-width: 360px; }
.processing p { color: rgba(255, 255, 255, .65); }
.road { position: relative; width: 240px; height: 64px; overflow: hidden; }
.road-dash { position: absolute; left: 0; right: 0; bottom: 6px; height: 4px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 24px, transparent 24px 48px); background-size: 80px 4px; }
.road-car { position: absolute; left: 50%; bottom: 10px; margin-left: -22px; color: var(--accent); }
.road-car svg { width: 44px; height: 44px; }

/* ============ Misc ============ */
#boot-splash { position: fixed; inset: 0; z-index: 200; background: var(--night); display: grid; place-items: center; }
.boot-mark { width: 54px; height: 54px; border-radius: 16px; background: var(--accent); animation: boot 1s ease-in-out infinite alternate; }
@keyframes boot { to { transform: scale(.82) rotate(8deg); border-radius: 50%; } }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
