/* Лендинг Штурмана. Цвета, шрифт и радиусы — из дизайн-системы приложения (apps/mobile/src/palette.ts, tokens.ts). */

@font-face {
  font-family: Manrope;
  src: url('fonts/Manrope_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url('fonts/Manrope_700Bold.ttf') format('truetype');
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url('fonts/Manrope_800ExtraBold.ttf') format('truetype');
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f4f6fa;
  --card: #ffffff;
  --card-inset: #eef2f8;
  --border: rgba(11, 18, 32, 0.07);
  --line-strong: #808999;
  --text: #0b1220;
  --text-secondary: #3b4456;
  --muted: #5e6778;
  --primary: #1f6fd6;
  --button: #1f6fd6;
  --on-button: #ffffff;
  --ok: #0a7550;
  --ok-bg: rgba(10, 117, 80, 0.1);
  --warning-bg: #fbefd9;
  --on-warning-bg: #6b3f00;
  --accent-bg: rgba(31, 111, 214, 0.08);
  --on-accent-bg: #123a73;
  --shadow: 0 1px 2px rgba(11, 18, 32, 0.06), 0 12px 32px rgba(11, 18, 32, 0.08);
  --shadow-small: 0 8px 24px rgba(11, 18, 32, 0.1);
  /* Блок «Как начать»: заливка акцентом, текст на ней. */
  --cta-bg: #1f6fd6;
  --on-cta: #ffffff;
  --cta-tile: rgba(255, 255, 255, 0.12);
  --cta-button: #ffffff;
  --on-cta-button: #123a73;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #0a0d14;
    --card: #121722;
    --card-inset: #182030;
    --border: rgba(255, 255, 255, 0.06);
    --line-strong: #677083;
    --text: #f2f4f8;
    --text-secondary: #c9d0dc;
    --muted: #8a93a6;
    --primary: #7cc4ff;
    --button: #7cc4ff;
    --on-button: #071019;
    --ok: #4ade9b;
    --ok-bg: rgba(74, 222, 155, 0.12);
    --warning-bg: rgba(245, 181, 74, 0.12);
    --on-warning-bg: #f7d9a6;
    --accent-bg: rgba(124, 196, 255, 0.1);
    --on-accent-bg: #cfe6ff;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-small: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --cta-bg: #121722;
    --on-cta: #f2f4f8;
    --cta-tile: #182030;
    --cta-button: #7cc4ff;
    --on-cta-button: #071019;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}
ol,
ul {
  list-style: none;
  padding: 0;
}

a {
  color: var(--primary);
}
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
}

/* Шапка: плавающая, раздел по ссылке меню не уходит под неё. */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--background) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}
main [id] {
  scroll-margin-top: 88px;
}
.header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.logo img {
  width: 40px;
  height: 40px;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-size: 15px;
  font-weight: 700;
}
.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 0;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a[aria-current] {
  color: var(--text);
}
.nav a[aria-current] {
  border-bottom-color: var(--primary);
}
/* На телефоне меню — второй строкой шапки, листается вбок. */
@media (max-width: 900px) {
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 20px;
    font-size: 14px;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  .nav a {
    padding: 4px 0 6px;
  }
  main [id] {
    scroll-margin-top: 112px;
  }
}

/* Кнопки */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 16px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  transition: filter 0.15s;
}
.button:hover {
  filter: brightness(1.08);
}
.button--small {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 15px;
}
.button--secondary {
  background: var(--card-inset);
  color: var(--text);
}
.button svg {
  flex: none;
}

/* Первый экран */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
  padding-top: 48px;
  padding-bottom: 88px;
}
.hero__text {
  flex: 1 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pill {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--on-accent-bg);
  font-size: 14px;
  font-weight: 700;
}
h1 {
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.lead {
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 560px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}
.note {
  font-size: 14px;
  color: var(--muted);
}
.hero__visual {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.stack {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Карточка рейса в первом экране — как FlightSummary в приложении. */
.flight {
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.flight__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}
.badge {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--warning-bg);
  color: var(--on-warning-bg);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.route {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.route__point {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: var(--text-secondary);
}
.route__point:last-child {
  align-items: flex-end;
}
.route__code {
  font-size: 36px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.route__line {
  flex: 1;
  min-width: 40px;
  max-width: 120px;
  margin-bottom: 26px;
  color: var(--line-strong);
}
.cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.cell {
  background: var(--card-inset);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}
.cell__label {
  font-weight: 700;
}
.cell__value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.cell s {
  color: var(--muted);
}

.toast {
  width: 86%;
  background: var(--card);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: var(--shadow-small);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
}
.toast:nth-child(even) {
  align-self: flex-end;
}
.toast strong {
  display: block;
  color: var(--text);
}
.toast__icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-bg);
  color: var(--primary);
}
.toast__icon--ok {
  background: var(--ok-bg);
  color: var(--ok);
}
@media (max-width: 480px) {
  .toast {
    width: 100%;
  }
  .route__code {
    font-size: 30px;
  }
}

/* Секции */

.section {
  padding: 88px 0;
}
.section--card {
  background: var(--card);
}
.section__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
  margin-bottom: 48px;
}
.eyebrow {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
h2 {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section__head p {
  font-size: 18px;
  color: var(--text-secondary);
}
@media (max-width: 480px) {
  .section {
    padding: 64px 0;
  }
  .hero {
    padding-bottom: 64px;
  }
}

/* Уведомления по этапам */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.step {
  background: var(--background);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step__when {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.step h3 {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 800;
}
.step p {
  font-size: 15px;
  color: var(--text-secondary);
}
.section--card .step,
.section--card .feature {
  background: var(--background);
}
.section:not(.section--card) .step {
  background: var(--card);
  box-shadow: 0 0 0 1px var(--border);
}
.section .step--highlight {
  background: var(--warning-bg);
  box-shadow: none;
}
.step--highlight,
.step--highlight .step__when,
.step--highlight p {
  color: var(--on-warning-bg);
}

/* Карточка рейса: возможности */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--card);
  border-radius: 20px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 0 0 1px var(--border);
}
.feature svg {
  color: var(--primary);
}
.feature h3 {
  font-size: 20px;
  font-weight: 800;
}
.feature p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* Встречающим */

.split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}
.split > * {
  flex: 1 1 400px;
  min-width: 0;
}
.split .section__head {
  margin-bottom: 0;
}
/* Страница встречающего — как экран s/[token] в приложении, в рамке телефона. */
.greeter {
  max-width: 380px;
  margin: 0 auto;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 22px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
}
.greeter__brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.greeter__brand span:first-child {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.greeter__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px;
  font-size: 15px;
  color: var(--muted);
}
.greeter__head strong {
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.status {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--on-accent-bg);
  font-size: 14px;
  font-weight: 700;
}
.greeter__arrival {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 4px;
}
.greeter__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.greeter__time {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 64px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.greeter__time s {
  font-size: 22px;
  letter-spacing: 0;
  color: var(--muted);
}
.cells--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.cell__hint {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--muted);
}
.greeter .cell {
  background: var(--card-inset);
}
.greeter__telegram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 16px;
  font-weight: 700;
}
.greeter__tg {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2aabee;
  display: flex;
  align-items: center;
  justify-content: center;
}
.greeter__note {
  padding: 0 4px;
  font-size: 12px;
  color: var(--muted);
}

/* Факты: источники, покрытие, где открыть */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.facts h2 {
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.facts p {
  color: var(--text-secondary);
}

/* Как начать */

.cta {
  background: var(--cta-bg);
  color: var(--on-cta);
  border-radius: 32px;
  padding: clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  gap: 36px;
  box-shadow: 0 0 0 1px var(--border);
}
.cta h2 {
  max-width: 640px;
}
.cta__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  counter-reset: step;
}
.cta__steps li {
  background: var(--cta-tile);
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
}
.cta__steps li::before {
  counter-increment: step;
  content: counter(step);
  font-size: 32px;
  line-height: 1.2;
  font-weight: 800;
}
.cta__steps h3 {
  font-size: 18px;
  font-weight: 700;
}
.cta .button {
  align-self: flex-start;
  background: var(--cta-button);
  color: var(--on-cta-button);
  font-weight: 800;
}

/* Подвал */

.footer {
  border-top: 1px solid var(--border);
  margin-top: 88px;
  padding: 28px 0;
  font-size: 14px;
  color: var(--muted);
}
.footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.footer a {
  color: var(--muted);
}

/* Шапка фильма: логотип и две кнопки, без меню — главы внизу экрана. */

.header__actions {
  display: flex;
  gap: 8px;
}
@media (max-width: 480px) {
  .header__apply {
    display: none;
  }
}

/* Фильм: этапы полёта. Без JS — обычные блоки друг под другом. */

.film {
  position: relative;
}
.stage {
  position: relative;
}
.scene {
  padding: 56px 0;
}
.scene__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 64px;
}
.scene__text {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.scene__text h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.scene__text p:not(.note) {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--text-secondary);
  max-width: 540px;
}
.scene__visual {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.scene__visual > * {
  width: 100%;
  max-width: 440px;
}
.profile,
.timeline {
  display: none;
}

/* Плавность прокрутки фильм задаёт сам: автопросмотр двигает страницу каждый кадр. */
html.film-on {
  scroll-behavior: auto;
}
.film-on .topbar {
  position: fixed;
  left: 0;
  right: 0;
}
.film-on .film {
  height: calc(var(--scenes, 8) * 100svh);
}
/* Заголовок первой сцены зависит и от высоты окна, иначе на невысоком экране сцена не помещается. */
.film-on .scene h1 {
  font-size: clamp(32px, min(4.6vw, 7.5svh), 60px);
}
.film-on .stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
.film-on .scene {
  position: absolute;
  inset: 0;
  padding: 88px 0 196px;
  display: flex;
  /* safe: если сцена выше окна, она уходит вниз, а не вверх под шапку. */
  align-items: safe center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s, visibility 0s 0.35s;
}
.film-on .scene.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.35s;
}
.film-on .scene__inner {
  width: 100%;
  flex-wrap: nowrap;
}
.film-on .scene [data-in] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--d, 0) * 110ms + 120ms);
}
.film-on .scene.is-active [data-in] {
  opacity: 1;
  transform: none;
}
@media (max-height: 760px) {
  .film-on .scene {
    padding-top: 80px;
  }
  .film-on .scene__text {
    gap: 12px;
  }
}
@media (max-height: 680px) {
  .film-on .scene__visual {
    zoom: 0.8;
  }
}
@media (prefers-reduced-motion: reduce) {
  .film-on .scene [data-in] {
    transform: none;
    transition: opacity 0.2s;
  }
}

/* Профиль полёта: земля, взлёт, эшелон, посадка. Самолёт двигается вместе с прокруткой. */
.film-on .profile {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 86px;
  height: 104px;
  pointer-events: none;
  color: var(--primary);
}
.profile__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.profile__track,
.profile__done {
  fill: none;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.profile__track {
  stroke: var(--line-strong);
  stroke-dasharray: 3 7;
  opacity: 0.45;
}
.profile__done {
  stroke: var(--primary);
  stroke-width: 2;
}
.profile__plane,
.profile__car,
.profile__person {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 50% 100%;
  will-change: transform;
  transition: opacity 0.35s, color 0.35s;
}
.profile__car,
.profile__person {
  opacity: 0;
  color: var(--text);
}
.profile__car.is-shown,
.profile__person.is-shown {
  opacity: 1;
}
.profile__plane.is-parked {
  color: var(--line-strong);
}
/* Остановки на пути: точка на линии и подпись под ней. */
.profile__stations {
  position: absolute;
  left: 0;
  right: 0;
  top: 93%;
}
.station {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  padding-top: 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--muted);
  transition: color 0.3s;
}
.station::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -4px;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--background);
  box-shadow: 0 0 0 1.5px var(--line-strong);
  transition: background 0.3s, box-shadow 0.3s;
}
.station.is-passed {
  color: var(--text);
}
.station.is-passed::before {
  background: var(--primary);
  box-shadow: 0 0 0 1.5px var(--primary);
}

/* Главы и часы рейса внизу. */
.film-on .timeline {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
}
.timeline__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}
.timeline__play {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--button);
  color: var(--on-button);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.timeline__play .icon-pause,
.film-playing .timeline__play .icon-play {
  display: none;
}
.film-playing .timeline__play .icon-pause {
  display: block;
}
.clock {
  flex: none;
  display: flex;
  flex-direction: column;
  min-width: 168px;
  line-height: 1.15;
}
.clock__time {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.clock__time {
  display: flex;
  align-items: center;
  gap: 2px;
}
.digit {
  display: inline-block;
  height: 1em;
  width: 0.72em;
  overflow: hidden;
  border-radius: 5px;
  background: var(--card-inset);
  text-align: center;
  line-height: 1;
}
.digit__strip {
  display: flex;
  flex-direction: column;
}
.digit__strip span {
  height: 1em;
}
.clock__colon {
  padding: 0 1px;
}
.clock__meta.is-new {
  animation: meta-in 0.5s ease-out;
}
@keyframes meta-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
.clock__meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.chapters {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
}
.chapters li {
  flex: 1;
  min-width: 0;
}
.chapter {
  width: 100%;
  padding: 10px 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chapter__bar {
  height: 3px;
  border-radius: 2px;
  background: var(--card-inset);
  overflow: hidden;
}
.chapter__fill {
  display: block;
  height: 100%;
  background: var(--primary);
  transform-origin: left;
  transform: scaleX(var(--fill, 0));
}
.chapter__name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chapter:hover,
.chapter[aria-current] {
  color: var(--text);
}
.chapter:focus-visible,
.timeline__play:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Визуалы сцен */

.ticket {
  position: relative;
  background: var(--card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ticket__top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.ticket__cut {
  margin: 0 -24px;
  height: 0;
  border-top: 2px dashed var(--card-inset);
  position: relative;
}
.ticket__cut::before,
.ticket__cut::after {
  content: '';
  position: absolute;
  top: -13px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--background);
}
.ticket__cut::before {
  left: -12px;
}
.ticket__cut::after {
  right: -12px;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  align-self: flex-end;
  padding: 10px 16px;
  border-radius: 18px 18px 4px 18px;
  background: var(--button);
  color: var(--on-button);
  font-weight: 700;
}
.badge--ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.toast__link {
  display: block;
  margin-top: 6px;
  font-weight: 700;
  color: var(--primary);
}
.toast__icon--warn {
  background: var(--warning-bg);
  color: var(--on-warning-bg);
}
.film .toast {
  width: 100%;
}

.big,
.gate {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.big__value {
  font-size: clamp(64px, 9vw, 120px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--primary);
}
.big__label {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

.gate {
  align-items: flex-start;
  background: var(--card);
  border-radius: 24px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.gate__label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.gate__value {
  font-size: clamp(88px, 11vw, 148px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}
.gate--ok .gate__value {
  color: var(--ok);
}
.gate__hint {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
}

.chain {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chain__leg {
  background: var(--card);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: var(--shadow-small);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chain__leg--yours {
  box-shadow: 0 0 0 2px var(--primary);
}
.chain__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.chain__leg strong {
  font-size: 18px;
  font-weight: 800;
}
.chain__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}
.chain__row b {
  color: var(--text);
}
.chain__row s {
  color: var(--muted);
}
.chain__gap {
  align-self: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  padding-left: 14px;
  border-left: 2px dashed var(--line-strong);
}

.flight--compact {
  gap: 14px;
  padding: 20px;
}
.rights {
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-small);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rights__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.rights__title svg {
  color: var(--ok);
}
.rights ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.rights li {
  background: var(--card-inset);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-secondary);
}
.rights b {
  font-size: 16px;
  color: var(--text);
}
.film .greeter {
  max-width: 360px;
  padding: 18px 16px;
  gap: 12px;
}
.film .greeter__time {
  font-size: 56px;
}

.cta__note {
  font-size: 15px;
}
.cta__note a {
  color: inherit;
}
#start {
  padding-top: 24px;
}


/* Турбулентность — как TurbulenceCard в приложении; цвета уровней оттуда же. */
.turb {
  background: var(--card);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: var(--shadow-small);
  display: flex;
  flex-direction: column;
  gap: 4px;
  --turb-none: #97c459;
  --turb-light: #fac775;
}
.turb__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.turb__headline {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--on-warning-bg);
}
.turb__when {
  font-size: 14px;
  color: var(--text-secondary);
}
.turb__strip {
  display: flex;
  height: 14px;
  margin-top: 10px;
  border-radius: 4px;
  overflow: hidden;
}
.turb__strip i,
.turb__legend i {
  background: var(--turb-none);
}
.turb__strip i.is-light,
.turb__legend i.is-light {
  background: var(--turb-light);
}
.turb__ticks {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.turb__legend {
  display: flex;
  gap: 14px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
.turb__legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.turb__legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.weather .cell {
  background: var(--card);
  box-shadow: var(--shadow-small);
}

/* Где самолёт — как RouteMap в приложении: подложка OSM с сервера, дуга и самолёт поверх. */
.routemap {
  background: var(--card);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: var(--shadow-small);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.routemap__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.routemap__map {
  position: relative;
  aspect-ratio: 320 / 170;
  margin: 8px 0 6px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card-inset);
}
.routemap__map img,
.routemap__map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.routemap__done {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
}
.routemap__rest {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}
.routemap__pin {
  fill: var(--card);
  stroke: var(--primary);
  stroke-width: 2.2;
}
.routemap__label,
.routemap__halo {
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-anchor: middle;
  fill: var(--text);
}
.routemap__halo {
  fill: var(--card-inset);
  stroke: var(--card-inset);
  stroke-width: 3.5;
  stroke-linejoin: round;
}
.routemap__glow {
  fill: var(--primary);
  opacity: 0.18;
}
.routemap__plane {
  fill: var(--primary);
  stroke: var(--primary);
  stroke-width: 1.5;
}
.routemap__facts {
  font-size: 16px;
  font-weight: 700;
}
.routemap__muted {
  font-size: 14px;
  color: var(--muted);
}
.routemap__link {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}
.routemap__credit {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* Итог: все сообщения за рейс. */
.digest {
  background: var(--card);
  border-radius: 24px;
  padding: 10px 20px;
  box-shadow: var(--shadow);
}
.digest li {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0 9px 16px;
  position: relative;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.digest li:last-child {
  border-bottom: 0;
}
.digest li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--primary);
}
.digest li.is-warn::before {
  background: #ef9f27;
}
.digest li.is-ok::before {
  background: var(--ok);
}
.digest time {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Фильм на телефоне: текст сверху, визуал под ним, профиль и главы ниже. */
@media (max-width: 820px) {
  .film-on .scene {
    padding: 76px 0 132px;
    align-items: flex-start;
  }
  .film-on .scene__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .film-on .scene__text,
  .film-on .scene__visual {
    flex: none;
  }
  .film-on .scene__text {
    gap: 10px;
  }
  .film-on .scene__text h2 {
    font-size: clamp(26px, 7vw, 34px);
  }
  .film-on .scene__text h1 {
    font-size: clamp(32px, 9vw, 44px);
  }
  .film-on .scene__text p:not(.note) {
    font-size: 15px;
    line-height: 1.45;
  }
  .film-on .scene--intro .note,
  .film-on .scene--final .note,
  .film-on .ticket__top {
    display: none;
  }
  .film-on .scene .actions {
    flex-wrap: nowrap;
    gap: 8px;
    padding-top: 4px;
  }
  .film-on .scene .actions .button {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 15px;
  }
  .film-on .ticket {
    padding: 18px;
    gap: 14px;
  }
  .film-on .ticket__cut {
    margin: 0 -18px;
  }
  .film-on .scene__visual {
    font-size: 15px;
  }
  .film-on .profile {
    bottom: 64px;
    height: 60px;
  }
  .station {
    font-size: 0;
  }
  .timeline__inner {
    min-height: 56px;
    gap: 12px;
  }
  .clock {
    min-width: 0;
  }
  .chapters {
    gap: 3px;
  }
  .chapter__name {
    display: none;
  }
  .film .gate__value {
    font-size: 72px;
  }
  .film .big__value {
    font-size: 64px;
  }
  .film .greeter__time {
    font-size: 44px;
  }
  .digest {
    padding: 4px 16px;
  }
  .digest li {
    grid-template-columns: 92px 1fr;
    padding: 6px 0 6px 14px;
    font-size: 13px;
  }
  .digest time {
    font-size: 12px;
  }
  .turb__headline {
    font-size: 19px;
  }
}
/* Невысокий телефон: визуалы сцен компактнее. */
@media (max-width: 820px) and (max-height: 740px) {
  .film-on .scene {
    padding-top: 68px;
  }
  .film-on .scene__visual {
    zoom: 0.78;
  }
}
