/*
 * Дизайн-токены Fargo.
 * Палитра: глубокий «вечерний» синий степи + солнечно-жёлтый (отсылка к флагу и закату над трассой).
 * Шрифты: Unbounded — широкий гротеск для заголовков и цифр (цена, время), Onest — для текста.
 * Оба поддерживают казахские буквы (ә, ғ, қ, ң, ө, ұ, ү, һ, і).
 */
:root {
  --ink: #0f2b3a;
  --ink-2: #183f53;
  --ink-3: #2a5a72;
  --on-ink: #ffffff;
  --on-ink-muted: #b9cdd6;

  --paper: #eef2f3;
  --surface: #ffffff;
  --surface-2: #f6f8f9;
  --line: #d3dde1;
  --text: #0f2b3a;
  --muted: #557080;

  --sun: #ffc629;
  --sun-hover: #ffb800;
  --on-sun: #0f2b3a;

  --sky: #136f8d;
  --sky-soft: #e1f0f5;
  --danger: #b3261e;
  --danger-soft: #fbeaea;
  --ok: #1f7a4d;
  --ok-soft: #e4f3ea;

  --font-display: var(--font-unbounded), "Unbounded", system-ui, sans-serif;
  --font-body: var(--font-onest), "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Шкала: 1.25 на мобильных, растёт к десктопу */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-md: 1rem;
  --fs-lg: 1.1875rem;
  --fs-xl: clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
  --fs-2xl: clamp(1.625rem, 1.2rem + 2vw, 2.5rem);
  --fs-display: clamp(2.125rem, 1.2rem + 4.4vw, 4.5rem);

  --r-field: 12px;
  --r-panel: 20px;
  --r-story: 26px;
  --r-pill: 999px;

  --gutter: 16px;
  --max: 1200px;

  --shadow-panel: 0 18px 40px -18px rgba(15, 43, 58, 0.35);
  --focus: 0 0 0 3px var(--surface), 0 0 0 5px var(--sky);

  --header-h: 60px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --header-h: 72px;
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
fieldset {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}

/* Плавающая legend ведёт себя как обычный блок — иначе она «садится» на рамку fieldset */
legend {
  float: left;
  width: 100%;
  padding: 0;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--sky);
  text-underline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ─── Типографика ─── */

.h1,
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  text-wrap: balance;
}

.h1 {
  font-size: var(--fs-2xl);
}

.h2 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-wrap: balance;
}

.h3 {
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.3;
}

.lead {
  font-size: var(--fs-lg);
  line-height: 1.55;
  max-width: 62ch;
}

.muted {
  color: var(--muted);
}

.fine {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.45;
}

/* ─── Раскладка ─── */

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container.narrow {
  max-width: calc(760px + var(--gutter) * 2);
}

/* Лента карточек выходит за поля контейнера на мобильном, чтобы было видно, что её можно листать */
.container--bleed {
  padding-inline: 0;
}

@media (min-width: 1264px) {
  .container--bleed {
    padding-inline: var(--gutter);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .ticket-actions {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
/* ═══════════════ Кнопки ═══════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn-primary {
  background: var(--sun);
  color: var(--on-sun);
}

.btn-primary:hover {
  background: var(--sun-hover);
}

.btn-ink {
  background: var(--ink);
  color: var(--on-ink);
}

.btn-ink:hover {
  background: var(--ink-2);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.btn-ghost:hover {
  box-shadow: inset 0 0 0 1.5px var(--muted);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
}

/* ═══════════════ Шапка ═══════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--on-ink);
}

.site-header-row {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header-logo {
  text-decoration: none;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  color: var(--on-ink);
}

.logo-go {
  color: var(--sun);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav-link {
  color: var(--on-ink-muted);
  text-decoration: none;
  font-weight: 500;
  padding-block: 6px;
}

.site-nav-link:hover,
.site-nav-link[aria-current="page"] {
  color: var(--on-ink);
}

.site-nav-link[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--sun);
}

.lang-switch {
  display: flex;
  padding: 3px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.lang-switch a {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  color: var(--on-ink-muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
}

.lang-switch a[aria-current="true"] {
  background: var(--on-ink);
  color: var(--ink);
}

.site-menu-btn {
  display: none;
}

@media (max-width: 767px) {
  .site-menu-btn {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    background: transparent;
    border: 0;
  }

  .site-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: var(--on-ink);
    transition: transform 0.2s ease;
  }

  .site-menu-btn[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .site-menu-btn[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    padding: 24px var(--gutter);
    background: var(--ink);
  }

  .site-nav.is-open .site-nav-link {
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--on-ink);
    box-shadow: none;
  }

  .site-nav.is-open .lang-switch {
    margin-top: 20px;
  }
}

/* ═══════════════ Подвал ═══════════════ */

.site-footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  padding-block: 40px 24px;
  font-size: var(--fs-sm);
}

.site-footer-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 768px) {
  .site-footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
  }
}

.site-footer-note {
  margin-top: 12px;
  max-width: 40ch;
}

.site-footer-links,
.site-footer-contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.site-footer-links a {
  color: var(--on-ink-muted);
  text-decoration: none;
}

.site-footer-links a:hover {
  color: var(--on-ink);
}

.site-footer-contacts a {
  color: var(--on-ink);
  font-weight: 600;
  text-decoration: none;
}

.site-footer-bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--fs-xs);
}

/* ═══════════════ Главный экран ═══════════════ */

/* Синий фон обрывается на середине панели поиска — панель «лежит» на границе */
.hero {
  background: linear-gradient(to bottom, var(--ink) calc(100% - 88px), transparent 0);
  color: var(--on-ink);
  padding-top: 32px;
}

@media (min-width: 960px) {
  .hero {
    padding-top: 64px;
    background: linear-gradient(to bottom, var(--ink) calc(100% - 64px), transparent 0);
  }
}

.hero-inner {
  padding-bottom: 28px;
}

.hero-title {
  font-size: var(--fs-display);
  max-width: 15ch;
}

.hero-lead {
  margin-top: 16px;
  max-width: 52ch;
  font-size: var(--fs-lg);
  color: var(--on-ink-muted);
}

/* ═══════════════ Поиск ═══════════════ */

.search {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-panel);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-panel);
}

@media (min-width: 960px) {
  .search {
    padding: 18px;
  }
}

.search--compact {
  margin-top: 12px;
  box-shadow: none;
}

.segmented {
  display: inline-flex;
  justify-self: start;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.segmented button {
  padding: 7px 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.segmented button[aria-checked="true"] {
  background: var(--ink);
  color: var(--on-ink);
}

.search-grid {
  display: grid;
  gap: 10px;
}

@media (min-width: 960px) {
  .search-grid {
    grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr) minmax(150px, auto) auto;
  }

  .search-grid.has-return {
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(150px, auto) auto;
  }

  .search-submit {
    height: 100%;
    padding-inline: 28px;
  }
}

.search-cities {
  position: relative;
  display: grid;
  gap: 10px;
}

@media (min-width: 640px) {
  .search-cities {
    grid-template-columns: 1fr 1fr;
  }
}

.search-swap {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 44px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transform: translateY(-50%) rotate(90deg);
}

.search-swap:hover {
  box-shadow: inset 0 0 0 1.5px var(--sky);
  color: var(--sky);
}

@media (min-width: 640px) {
  .search-swap {
    right: auto;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.search-submit {
  min-height: 56px;
}

.search-edit {
  margin-top: 16px;
}

.search-edit summary {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.search-edit summary::-webkit-details-marker {
  display: none;
}

.search-edit[open] summary {
  background: var(--on-ink);
  color: var(--ink);
}

/* ═══════════════ Поля форм ═══════════════ */

.field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 60px;
  padding: 8px 14px;
  border-radius: var(--r-field);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.field:focus-within {
  box-shadow: inset 0 0 0 1.5px var(--sky), 0 0 0 3px var(--sky-soft);
}

.field.is-invalid {
  box-shadow: inset 0 0 0 1.5px var(--danger);
  background: var(--danger-soft);
}

.field-label {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  font-weight: 600;
  font-size: var(--fs-md);
  outline: none;
}

.field textarea {
  resize: vertical;
  font-weight: 500;
}

.field select {
  appearance: none;
  padding-right: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23557080' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    right 2px center / 12px no-repeat;
  cursor: pointer;
}

.field-error {
  font-size: var(--fs-xs);
  color: var(--danger);
}

.field--wide {
  grid-column: 1 / -1;
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stepper button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 1.125rem;
  line-height: 1;
}

.stepper button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.stepper output {
  font-weight: 600;
  min-width: 6ch;
  text-align: center;
}

.form-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-grid > legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.form-error {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: var(--fs-sm);
}

.field.car-classes {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 0;
  background: none;
  box-shadow: none;
}

.choice,
.pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  cursor: pointer;
  font-weight: 500;
}

.choice:has(input:checked),
.pay-method:has(input:checked) {
  background: var(--sky-soft);
  box-shadow: inset 0 0 0 1.5px var(--sky);
}

.choice input,
.pay-method input {
  accent-color: var(--sky);
  width: 18px;
  height: 18px;
  margin: 0;
}

/* ═══════════════ Секции главной ═══════════════ */

.section {
  padding-block: 44px 0;
}

.section--last {
  padding-bottom: 64px;
}

@media (min-width: 960px) {
  .section {
    padding-top: 72px;
  }

  .section--last {
    padding-bottom: 96px;
  }
}

.section-head {
  margin-bottom: 18px;
}

.section-lead {
  margin-top: 6px;
  color: var(--muted);
}

/* ═══════════════ Истории городов ═══════════════ */

.stories-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 12px;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.stories-rail::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1264px) {
  .stories-rail {
    padding-inline: 0;
    scroll-padding-inline: 0;
  }
}

.stories-rail > li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.story-card {
  position: relative;
  display: block;
  width: clamp(196px, 60vw, 248px);
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  border-radius: var(--r-story);
  overflow: hidden;
  background: var(--tone, var(--ink-2));
  color: #fff;
  text-align: left;
  transition: transform 0.15s ease;
}

.story-card:active {
  transform: scale(0.98);
}

.city-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 20, 28, 0.82) 0%, rgba(6, 20, 28, 0.25) 45%, rgba(6, 20, 28, 0) 70%);
  pointer-events: none;
}

.story-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-placeholder {
  position: absolute;
  top: -0.2em;
  left: -0.05em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.13);
  pointer-events: none;
}

.story-promo {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 14px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--sun);
  color: var(--on-sun);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.story-card-body {
  position: absolute;
  z-index: 1;
  inset: auto 0 0 0;
  display: grid;
  gap: 4px;
  padding: 18px;
}

.story-card-name {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.story-card-tagline {
  font-size: var(--fs-sm);
  line-height: 1.35;
  opacity: 0.92;
}

.story-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin-top: 8px;
  font-size: var(--fs-xs);
  font-weight: 600;
}

.story-card-facts span:first-child {
  color: var(--sun);
}

/* Просмотр истории */

.story-viewer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 20, 28, 0.88);
  animation: viewer-in 0.2s ease-out;
}

@keyframes viewer-in {
  from {
    opacity: 0;
  }
}

.story-sheet {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--tone, var(--ink-2));
  color: #fff;
  animation: sheet-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes sheet-in {
  from {
    transform: translateY(24px) scale(0.98);
    opacity: 0;
  }
}

@media (min-width: 640px) {
  .story-sheet {
    width: auto;
    height: min(88dvh, 860px);
    aspect-ratio: 9 / 16;
    border-radius: var(--r-story);
  }
}

.story-sheet-media {
  position: absolute;
  inset: 0;
}

.story-sheet-media .story-placeholder {
  font-size: 34rem;
}

.story-progress {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 14px;
  right: 64px;
  display: flex;
  gap: 4px;
}

.story-progress span {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
}

.story-progress .is-done,
.story-progress .is-current {
  background: #fff;
}

.story-close {
  position: absolute;
  z-index: 3;
  top: 4px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
}

.story-sheet-body {
  position: absolute;
  z-index: 2;
  inset: auto 0 0 0;
  display: grid;
  gap: 10px;
  max-height: 72%;
  overflow-y: auto;
  padding: 24px 22px calc(22px + env(safe-area-inset-bottom));
}

.story-sheet-name {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 9vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.story-sheet-tagline {
  font-weight: 600;
  color: var(--sun);
}

.story-sheet-text {
  font-size: var(--fs-sm);
  line-height: 1.55;
  opacity: 0.94;
}

.story-sheet-sub {
  margin-top: 4px;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.story-sheet-list {
  display: grid;
  gap: 6px;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
}

.story-sheet-list li {
  position: relative;
  padding-left: 18px;
}

.story-sheet-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sun);
}

.story-sheet-cta {
  display: grid;
  gap: 6px;
  justify-items: center;
  margin-top: 8px;
}

.story-sheet-price {
  font-size: var(--fs-xs);
  opacity: 0.85;
}

.story-nav {
  position: absolute;
  z-index: 3;
  top: 38%;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
}

.story-nav--prev {
  left: 8px;
}

.story-nav--next {
  right: 8px;
}

/* ═══════════════ Акции-билеты ═══════════════ */

.promo-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.promo-ticket {
  --stub: 96px;
  --notch: 9px;
  display: grid;
  grid-template-columns: var(--stub) 1fr;
  min-height: 112px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  /* Полукруглые вырезы на линии отрыва, как у настоящего билета */
  -webkit-mask:
    radial-gradient(circle var(--notch) at var(--stub) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at var(--stub) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at var(--stub) 0, transparent 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at var(--stub) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}

.promo-stub {
  display: grid;
  place-items: center;
  background: var(--sun);
  color: var(--on-sun);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  border-right: 2px dashed rgba(15, 43, 58, 0.25);
}

.promo-body {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 14px 18px;
}

.promo-title {
  font-weight: 600;
}

.promo-route {
  font-size: var(--fs-sm);
}

.promo-until {
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* ═══════════════ Как купить ═══════════════ */

.steps {
  display: grid;
  gap: 24px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.step {
  counter-increment: step;
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.step::before {
  content: counter(step);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--sky);
}

.step p {
  color: var(--muted);
  max-width: 40ch;
}

/* ═══════════════ Тизеры ═══════════════ */

.teasers {
  display: grid;
  gap: 16px;
}

@media (min-width: 768px) {
  .teasers {
    grid-template-columns: 1.2fr 1fr;
  }
}

.teaser {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 14px;
  padding: 28px 24px;
  border-radius: var(--r-panel);
}

@media (min-width: 960px) {
  .teaser {
    padding: 40px;
  }
}

.teaser p {
  max-width: 46ch;
}

.teaser--ink {
  background: var(--ink);
  color: var(--on-ink);
}

.teaser--ink p {
  color: var(--on-ink-muted);
}

.teaser--sun {
  background: var(--sun);
  color: var(--on-sun);
}

/* ═══════════════ Шапка внутренних страниц ═══════════════ */

.page-head {
  padding-block: 24px 28px;
  background: var(--ink);
  color: var(--on-ink);
}

@media (min-width: 960px) {
  .page-head {
    padding-block: 40px 44px;
  }
}

.page-head--ok {
  background: var(--ok);
}

.page-head-sub {
  margin-top: 10px;
  max-width: 60ch;
  color: var(--on-ink-muted);
}

.page-head--ok .page-head-sub {
  color: #d6efe0;
}

.legs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.legs li {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.legs .is-current {
  background: var(--sun);
  color: var(--on-sun);
  box-shadow: none;
}

.legs .is-done {
  color: var(--on-ink-muted);
}

.page-body {
  display: grid;
  gap: 24px;
  padding-block: 24px 64px;
}

.page-empty {
  display: grid;
  justify-items: start;
  gap: 20px;
  max-width: 720px;
  padding-block: 64px;
}

.notice--ok {
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 500;
}

/* ═══════════════ Выдача ═══════════════ */

.results {
  padding-block: 20px 64px;
}

.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.day {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  min-width: 68px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  text-decoration: none;
}

.day-week {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.day-num {
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.day[aria-current="date"] {
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: none;
}

.day[aria-current="date"] .day-week {
  color: var(--on-ink-muted);
}

.results-picked {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.results-next {
  margin-top: 14px;
}

.trip-list {
  display: grid;
  gap: 12px;
}

.empty {
  padding: 32px 20px;
  border-radius: var(--r-panel);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

/* Карточка рейса */

.trip {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface);
}

.trip.is-selected {
  box-shadow: inset 0 0 0 2px var(--sky);
}

@media (min-width: 820px) {
  .trip {
    grid-template-columns: 1fr auto;
    grid-template-areas: "times buy" "meta buy";
    column-gap: 24px;
    padding: 20px 24px;
  }

  .trip-times {
    grid-area: times;
  }

  .trip-meta {
    grid-area: meta;
  }

  .trip-buy {
    grid-area: buy;
  }
}

.trip-times {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
}

.trip-point {
  display: grid;
  gap: 2px;
}

.trip-point--end {
  text-align: right;
}

.trip-time {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.trip-shift {
  margin-left: 2px;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--sky);
}

.trip-city {
  font-weight: 600;
  font-size: var(--fs-sm);
}

.trip-station {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.trip-line {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 2px;
  margin-top: 17px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 11px);
}

.trip-line span {
  padding-inline: 8px;
  background: var(--surface);
  font-size: var(--fs-xs);
  color: var(--muted);
  white-space: nowrap;
}

.trip-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.3;
}

.chip--info {
  background: var(--sky-soft);
  color: var(--sky);
}

.chip--warn {
  background: #fff3cc;
  color: #6b4e00;
}

.trip-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding-top: 14px;
  border-top: 1.5px dashed var(--line);
}

@media (min-width: 820px) {
  .trip-buy {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    min-width: 190px;
    padding: 0 0 0 24px;
    border-top: 0;
    border-left: 1.5px dashed var(--line);
  }
}

.trip-price {
  display: grid;
}

@media (min-width: 820px) {
  .trip-price {
    justify-items: end;
  }
}

.trip-price strong {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.trip-old,
.trip-per {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.trip-seats {
  font-size: var(--fs-xs);
  color: var(--muted);
}

@media (min-width: 820px) {
  .trip-seats {
    text-align: right;
  }
}

.trip-seats.is-low {
  color: var(--danger);
  font-weight: 600;
}

@media (max-width: 819px) {
  .trip-buy .btn {
    flex: 1 1 100%;
  }
}

/* ═══════════════ Оформление ═══════════════ */

.panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: var(--r-panel);
  background: var(--surface);
}

@media (min-width: 960px) {
  .panel {
    padding: 24px;
  }
}

.booking,
.checkout {
  display: grid;
  gap: 16px;
  padding-block: 20px 64px;
  align-items: start;
}

@media (min-width: 960px) {
  .booking {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
  }

  .checkout {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
  }

  .panel--sticky {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
}

.booking-main {
  display: grid;
  gap: 16px;
}

.summary-lines {
  display: grid;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
}

.summary-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
}

.summary-lines li span:last-child {
  font-weight: 600;
  white-space: nowrap;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.summary-total strong {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Схема автобуса */

.seatmap {
  display: grid;
  gap: 12px;
}

.bus {
  width: 100%;
  max-width: 300px;
  margin: 4px auto 0;
  padding: 14px;
  border-radius: 40px 40px 16px 16px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 2px var(--line);
}

.bus-front {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 4px 6px 10px;
  border-bottom: 1.5px dashed var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
}

.bus-rows {
  display: grid;
  gap: 6px;
}

.seat {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 9px 9px 6px 6px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.seat:not(:disabled):hover {
  box-shadow: inset 0 0 0 1.5px var(--sky);
}

.seat[aria-pressed="true"],
.seat.is-chosen {
  background: var(--sun);
  box-shadow: inset 0 0 0 1.5px var(--sun-hover);
  color: var(--on-sun);
}

.seat:disabled,
.seat.is-taken {
  background: #e2e8eb;
  box-shadow: none;
  color: #9aabb4;
  cursor: not-allowed;
}

.seat-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  padding: 0;
  list-style: none;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.seat-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.seat--sample {
  display: inline-block;
  width: 18px;
  height: 18px;
  min-height: 0;
}

/* Оплата */

.pay-timer {
  justify-self: start;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--sky-soft);
  color: var(--sky);
  font-size: var(--fs-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pay-methods {
  display: grid;
  gap: 8px;
}

.pay-methods legend {
  margin-bottom: 8px;
}

/* Сводка брони и билет */

.summary {
  display: grid;
  gap: 16px;
}

.summary-leg {
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1.5px dashed var(--line);
}

.summary-route,
.summary-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.summary-route > div {
  display: grid;
  gap: 2px;
  align-content: start;
  font-size: var(--fs-sm);
}

.summary-label,
.summary-facts dt {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.summary-time {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.summary-facts dd {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.summary-passengers {
  display: grid;
  gap: 2px;
  padding: 0;
  list-style: none;
  font-size: var(--fs-sm);
  font-weight: 500;
}

.ticket-wrap {
  max-width: calc(640px + var(--gutter) * 2);
  padding-block: 24px 64px;
}

.ticket {
  overflow: hidden;
  border-radius: var(--r-panel);
  background: var(--surface);
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--ink);
  color: var(--on-ink-muted);
  font-size: var(--fs-sm);
}

.ticket-code {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--sun);
}

.ticket .summary {
  padding: 20px;
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

/* ═══════════════ Партнёрам ═══════════════ */

.benefits {
  display: grid;
  gap: 20px;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .benefits {
    grid-template-columns: repeat(3, 1fr);
  }
}

.benefits li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
}

.benefits p {
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ═══════════════ Страница города ═══════════════ */

.city-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 58vh;
  overflow: hidden;
  padding-block: 32px 40px;
  background: var(--tone, var(--ink));
  color: #fff;
}

.city-hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.city-hero-letter {
  position: absolute;
  right: -0.06em;
  bottom: -0.22em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18rem, 55vw, 36rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.city-hero-inner {
  position: relative;
  z-index: 1;
}

.city-hero .hero-lead {
  color: rgba(255, 255, 255, 0.86);
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-sm);
  text-decoration: none;
}

.back-link:hover {
  color: #fff;
}

.city-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 14px;
  font-weight: 600;
}

.city-body {
  display: grid;
  gap: 32px;
  padding-block: 32px 64px;
}

@media (min-width: 960px) {
  .city-body {
    grid-template-columns: 1fr 1.25fr;
    gap: 48px;
  }
}

.city-text,
.city-trips {
  display: grid;
  gap: 14px;
  align-content: start;
  justify-items: start;
}

.city-trips .trip-list {
  width: 100%;
}

/* ═══════════════ Логотип .kz ═══════════════ */

.logo-tld {
  color: var(--on-ink);
  opacity: 0.72;
}

/* ═══════════════ Истории городов: карточка с фото и автобусом ═══════════════ */

.story-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.story-card-photo {
  position: absolute;
  inset: 0 0 42% 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
}

.story-card-photo .story-placeholder {
  font-size: 13rem;
}

.story-card-bus {
  position: absolute;
  z-index: 2;
  left: 10px;
  width: 62%;
  top: calc(58% - 34px);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
}

.story-card-body {
  position: relative;
  inset: auto;
  min-height: 42%;
  padding: 30px 16px 16px;
  align-content: start;
}

.story-card-name {
  font-size: 1.5rem;
}

.story-card-tagline {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card-facts .is-price {
  color: var(--sun);
}

.story-card-facts .is-muted {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.16);
}

.story-card-facts span:first-child {
  color: inherit;
}

/* Просмотр: обложка */

.story-sheet {
  display: flex;
  flex-direction: column;
}

.story-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.story-cover-photo {
  position: relative;
  flex: 0 0 46%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
}

.story-cover-photo .story-placeholder {
  font-size: 26rem;
}

.story-cover-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6, 20, 28, 0.45) 0%, rgba(6, 20, 28, 0) 22%);
  pointer-events: none;
}

.story-cover-bus {
  position: absolute;
  z-index: 2;
  left: 18px;
  width: min(58%, 260px);
  top: calc(46% - 52px);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.4));
  animation: bus-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes bus-in {
  from {
    transform: translateX(-120%);
  }
}

.story-cover .story-sheet-body {
  position: relative;
  inset: auto;
  flex: 1;
  max-height: none;
  padding-top: 52px;
  align-content: start;
}

.story-credit {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.6875rem;
  text-decoration: none;
}

.story-cover .story-sheet-cta {
  margin-top: auto;
  padding-top: 8px;
}

.story-unavailable {
  font-size: var(--fs-sm);
  text-align: center;
  opacity: 0.9;
}

/* Просмотр: вкладки с информацией */

.story-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  overflow-y: auto;
  padding: 56px 22px calc(28px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0) 40%);
}

.story-section-city {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--sun);
}

.story-section-title {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.place-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.place-list li {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.place-link {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.place-link::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-left: auto;
  padding-left: 0;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
}

.place-link:hover,
.place-map:hover {
  background: rgba(255, 255, 255, 0.2);
}

.place-map {
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--sun);
}

.category-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.category-list a {
  display: flex;
  align-items: flex-end;
  min-height: 96px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.category-list a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.story-video {
  display: grid;
  gap: 12px;
  margin-top: auto;
  margin-bottom: auto;
}

.story-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
}

.story-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.story-video-link {
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: center;
}

.story-next-city {
  margin-top: 8px;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
}

.story-sheet--cover .story-nav,
.story-sheet .story-nav {
  top: auto;
  bottom: 50%;
}

/* ═══════════════ Пустая выдача с действием ═══════════════ */

.empty--action {
  display: grid;
  justify-items: center;
  gap: 16px;
  color: var(--text);
}

/* ═══════════════ Заказ автобуса ═══════════════ */

.place-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.map-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-field);
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--sky);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.map-btn.is-set {
  background: var(--sky-soft);
  box-shadow: inset 0 0 0 1.5px var(--sky);
}

@media (max-width: 479px) {
  .map-btn span {
    display: none;
  }
}

.return-fields {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .return-fields {
    grid-template-columns: repeat(3, 1fr);
  }
}

.choice.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quote {
  margin-top: 16px;
}

.quote-label {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.quote-total {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.quote-details summary {
  cursor: pointer;
  color: var(--sky);
  font-weight: 600;
}

.quote-details ul {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-left: 18px;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* Карта */

.map-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 20, 28, 0.7);
}

.map-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--surface);
}

@media (min-width: 768px) {
  .map-sheet {
    width: min(920px, 94vw);
    height: min(86dvh, 760px);
    border-radius: var(--r-panel);
  }
}

.map-head,
.map-foot {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}

.map-search {
  display: flex;
  gap: 8px;
}

.map-search input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-field);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.map-canvas {
  position: relative;
  flex: 1;
  min-height: 280px;
  background: var(--paper);
}

.map-failed {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.map-point {
  font-size: var(--fs-sm);
  font-weight: 500;
}

.map-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ═══════════════ Страница города v2 ═══════════════ */

.city-hero-bus {
  position: absolute;
  z-index: 1;
  right: 4%;
  bottom: 18px;
  width: min(42vw, 300px);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.4));
}

.city-credit {
  bottom: 6px;
  right: 10px;
}

.city-section {
  display: grid;
  gap: 10px;
  width: 100%;
}

.place-list--light .place-link,
.place-list--light .place-map {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.place-list--light .place-map {
  color: var(--sky);
}

.city-video {
  width: 100%;
}

/* Навигация историй — внизу, чтобы не перекрывать списки и автобус */
.story-sheet .story-nav,
.story-sheet--cover .story-nav {
  top: auto;
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.32);
}

.story-cover .story-sheet-body,
.story-section {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

.story-cover-photo .story-credit {
  top: 26px;
  right: auto;
  bottom: auto;
  left: 14px;
}

.story-cover-bus {
  width: min(52%, 240px);
}
