:root {
  color-scheme: light;
  --red: #c92832;
  --red-dark: #a51c28;
  --red-soft: #fff0f1;
  --ink: #1c2434;
  --muted: #687184;
  --line: #e8e9ed;
  --paper: #ffffff;
  --canvas: #f7f5f3;
  --success: #147550;
  --success-soft: #e9f7f0;
  --warning: #8a5b05;
  --warning-soft: #fff7df;
  --shadow: 0 10px 34px rgba(33, 31, 44, .065);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .56; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(201, 40, 50, .28);
  outline-offset: 2px;
}
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 20; background: white; padding: 8px 12px; }
.skip-link:focus { top: 12px; }
.app-shell { width: min(100%, 560px); min-height: 100dvh; margin: 0 auto; padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 72px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; background: var(--red); color: white; border-radius: 11px 11px 11px 4px; font-size: 21px; font-weight: 800; letter-spacing: -.1em; padding-right: 3px; }
.brand-name { font-size: 21px; font-weight: 800; letter-spacing: -.045em; }
.brand-dot { color: var(--red); }
.topbar-label { font-size: 12px; font-weight: 650; color: var(--muted); text-align: right; }
.site-footer { display: flex; justify-content: space-between; gap: 12px; padding: 24px 2px 30px; color: #9298a4; font-size: 11px; }
.site-footer span:last-child { letter-spacing: .09em; font-weight: 750; }
.account-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; padding: 9px 11px; border: 1px solid #d4e8db; border-radius: 11px; background: #eff8f1; color: #206244; font-size: 11px; }
.account-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-bar button { flex: none; border: 0; background: none; color: #a32631; font-size: 11px; font-weight: 750; }
.screen { animation: rise .24s ease-out; }
@keyframes rise { from { opacity: .65; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.eyebrow { color: var(--red); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.hero { margin: 8px 0 21px; }
.hero h1 { max-width: 390px; margin: 8px 0 9px; font-size: clamp(28px, 7vw, 37px); line-height: 1.08; letter-spacing: -.055em; }
.hero p, .section-intro { color: var(--muted); font-size: 14px; line-height: 1.52; margin: 0; }
.hero.compact h1 { font-size: 29px; }
.hero.compact { margin-bottom: 18px; }
.card { background: var(--paper); border: 1px solid #eeecea; border-radius: 21px; box-shadow: var(--shadow); }
.search-card, .form-card, .summary-card, .status-card { padding: 20px; }
.search-card { position: relative; }
.field { display: block; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; margin: 0 0 7px; font-size: 12px; font-weight: 750; color: #3f4757; }
.field-input, .field-select { width: 100%; min-height: 47px; border: 1px solid #dedfe4; border-radius: 12px; padding: 10px 13px; background: #fff; color: var(--ink); outline: none; }
.field-input::placeholder { color: #a2a8b3; }
.field-input:focus, .field-select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(201,40,50,.09); }
.field-help { display: block; font-size: 11px; line-height: 1.4; color: var(--muted); margin: 5px 0 0; }
.city-field { position: relative; }
.city-wrap { display: flex; gap: 9px; align-items: center; }
.city-stack { flex: 1; min-width: 0; }
.swap-button { align-self: center; display: grid; place-items: center; flex: 0 0 43px; width: 43px; height: 43px; margin-top: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--red); font-size: 23px; transform: rotate(90deg); }
.suggestions { position: absolute; z-index: 15; top: calc(100% - 12px); left: 0; right: 0; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 14px 35px rgba(25,30,42,.16); max-height: 270px; overflow-y: auto; }
.suggestion { width: 100%; border: 0; border-radius: 9px; background: white; text-align: left; padding: 10px 11px; color: var(--ink); }
.suggestion:hover { background: var(--red-soft); }
.suggestion strong { display: block; font-size: 14px; }
.suggestion span { color: var(--muted); font-size: 12px; }
.suggestion-empty { padding: 11px; color: var(--muted); font-size: 13px; }
.primary-button, .secondary-button, .text-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; padding: 11px 16px; border-radius: 12px; font-weight: 750; font-size: 14px; text-decoration: none; }
.primary-button { width: 100%; background: var(--red); border: 1px solid var(--red); color: white; box-shadow: 0 6px 14px rgba(201,40,50,.13); }
.primary-button:hover:not(:disabled) { background: var(--red-dark); }
.secondary-button { background: #fff; border: 1px solid #dcdfe5; color: var(--ink); }
.secondary-button:hover:not(:disabled) { background: #faf8f8; }
.text-button { padding: 5px 0; min-height: 32px; border: 0; background: none; color: var(--red); }
.search-button { margin-top: 3px; }
.demo-banner, .notice { border-radius: 13px; padding: 12px 14px; font-size: 12px; line-height: 1.45; }
.demo-banner { margin-bottom: 15px; color: #744e06; background: var(--warning-soft); border: 1px solid #f4e5ac; }
.notice { border: 1px solid #e9e6e2; background: #faf9f7; color: #4d5664; }
.notice.warning { background: var(--warning-soft); border-color: #f2e3ab; color: var(--warning); }
.notice.error { background: #fff0f1; border-color: #f4ccd0; color: #922631; }
.notice.success { background: var(--success-soft); border-color: #c9eadb; color: var(--success); }
.notice + .notice { margin-top: 9px; }
.mt14 { margin-top: 14px; }
.mt15 { margin-top: 15px; }
.mt17 { margin-top: 17px; }
.mb14 { margin-bottom: 14px; }
.mb15 { margin-bottom: 15px; }
.price-note { margin: 11px 3px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin: 23px 2px 13px; }
.section-heading h2 { margin: 0; font-size: 18px; line-height: 1.25; letter-spacing: -.025em; }
.section-heading span { color: var(--muted); font-size: 12px; }
.route-list { display: grid; gap: 12px; }
.route-card { padding: 17px; }
.route-head, .route-foot, .route-times, .summary-row, .count-control, .seat-head, .person-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.carrier-name { font-size: 13px; font-weight: 800; }
.pill { display: inline-block; border-radius: 999px; padding: 5px 8px; background: #f1f3f6; color: #596375; font-size: 10px; font-weight: 750; white-space: nowrap; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.green { background: var(--success-soft); color: var(--success); }
.route-times { margin: 20px 0 12px; align-items: flex-start; }
.route-times > div:first-child, .route-times > div:last-child { flex: 1; min-width: 0; }
.route-times > div:last-child { text-align: right; }
.route-time { display: block; font-size: 27px; font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.route-city { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.route-line { position: relative; flex: 0 0 55px; margin-top: 8px; height: 1px; background: #d5d9df; }
.route-line::before, .route-line::after { content: ""; position: absolute; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: #d5d9df; }
.route-line::before { left: 0; }.route-line::after { right: 0; }
.route-stations { margin: 0 0 16px; color: #5c6575; font-size: 11px; line-height: 1.45; }
.route-foot { padding-top: 13px; border-top: 1px solid var(--line); }
.route-price { font-size: 20px; font-weight: 800; letter-spacing: -.035em; }
.route-price small { color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: normal; }
.route-foot .primary-button { width: auto; min-height: 38px; padding: 8px 14px; }
.steps { display: flex; gap: 7px; margin: 7px 0 19px; }
.step { flex: 1; height: 4px; border-radius: 5px; background: #e5e6e9; }
.step.active { background: var(--red); }
.back-button { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 13px; padding: 5px 0; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 700; }
.trip-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 17px; }
.trip-summary strong { font-size: 15px; }
.trip-summary span { color: var(--muted); font-size: 12px; }
.count-control { width: 126px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; }
.count-control button { width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f4f4f6; color: var(--ink); font-size: 19px; }
.count-control strong { font-size: 15px; }
.seat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin: 15px 0; }
.seat { min-height: 46px; border: 1px solid #d9e0dc; border-radius: 10px; background: #f7fbf8; color: #255846; font-size: 13px; font-weight: 750; }
.seat.selected { background: var(--red); border-color: var(--red); color: white; }
.seat.taken { background: #f2f3f5; border-color: #eceef0; color: #acb2bc; }
.seat-key { display: flex; flex-wrap: wrap; gap: 13px; color: var(--muted); font-size: 11px; }
.seat-key span::before { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; background: #f7fbf8; border: 1px solid #d9e0dc; content: ""; vertical-align: -1px; }
.seat-key span:nth-child(2)::before { background: var(--red); border-color: var(--red); }
.seat-key span:nth-child(3)::before { background: #f2f3f5; border-color: #eceef0; }
.person-card { padding: 18px; margin-bottom: 13px; }
.person-head { margin-bottom: 17px; }
.person-head h2 { margin: 0; font-size: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field-input[type="date"] { min-width: 0; }
.action-stack { display: grid; gap: 10px; margin: 18px 0 0; }
.summary-card .summary-row { padding: 11px 0; border-bottom: 1px solid var(--line); align-items: start; }
.summary-card .summary-row:last-child { border-bottom: 0; }
.summary-row span { color: var(--muted); font-size: 13px; }
.summary-row strong { text-align: right; font-size: 13px; }
.total-row { margin-top: 8px; padding-top: 16px !important; }
.total-row strong { color: var(--red); font-size: 20px; }
.status-art { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 17px; margin-bottom: 16px; background: var(--success-soft); color: var(--success); font-size: 27px; }
.status-art.pending { background: var(--warning-soft); color: var(--warning); }
.status-art.error { background: var(--red-soft); color: var(--red); }
.status-card h2 { margin: 0 0 9px; font-size: 23px; letter-spacing: -.035em; }
.status-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.status-card .action-stack { margin-top: 19px; }
.loading-row { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.spinner { display: inline-block; width: 17px; height: 17px; border: 2px solid #ead2d4; border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.initial-loading { display: flex; align-items: center; gap: 10px; padding: 35px 0; color: var(--muted); font-size: 13px; }
.toast { position: fixed; z-index: 40; left: max(15px, calc(50% - 260px)); right: max(15px, calc(50% - 260px)); bottom: calc(18px + env(safe-area-inset-bottom)); padding: 13px 15px; border-radius: 13px; background: #253041; color: white; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-size: 13px; line-height: 1.4; }
[hidden] { display: none !important; }
@media (max-width: 370px) {
  .app-shell { padding-left: 12px; padding-right: 12px; }
  .search-card, .form-card, .summary-card, .status-card { padding: 16px; }
  .route-line { flex-basis: 35px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .form-grid .full { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; } }
