/* Вылет — лента находок в виде посадочных талонов */

@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url(fonts/unbounded-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url(fonts/unbounded-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+20BD, U+2190-21FF; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url(fonts/unbounded-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap; src: url(fonts/unbounded-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+20BD, U+2190-21FF; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url(fonts/unbounded-cyrillic-800-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url(fonts/unbounded-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+20BD, U+2190-21FF; }
@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url(fonts/golos-text-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+20BD, U+2190-21FF; }
@font-face { font-family: "Golos Text"; font-weight: 500; font-display: swap; src: url(fonts/golos-text-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 500; font-display: swap; src: url(fonts/golos-text-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+20BD, U+2190-21FF; }
@font-face { font-family: "Golos Text"; font-weight: 600; font-display: swap; src: url(fonts/golos-text-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 600; font-display: swap; src: url(fonts/golos-text-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+20BD, U+2190-21FF; }

:root {
  --ink: #172A4A;        /* табло, текст */
  --ink-2: #4F607C;      /* вторичный текст */
  --concrete: #E7ECF1;   /* фон ленты */
  --paper: #FFFFFF;      /* талон */
  --signal: #FFCB2E;     /* жёлтый аэропортовой навигации — только горячие находки */
  --good: #13744B;       /* скидка */
  --line: #CBD5E0;
  --radius-ticket: 16px;
  --display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--concrete);
  color: var(--ink);
  font: 400 16px/1.45 var(--text);
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Шапка ---------- */
.top {
  background: var(--ink);
  color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 16px 0;
  position: sticky;
  top: 0;
  z-index: 5;
}
.top__row, .homes, .kinds, .feed, .install { max-width: 620px; margin-inline: auto; }
.top__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand {
  font: 800 30px/1 var(--display);
  letter-spacing: -0.02em;
  margin: 2px 0 6px;
}
.top__status { margin: 0; font-size: 13px; color: #B9C5D8; }

.bell {
  position: relative;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: grid; place-items: center;
}
.bell svg { width: 22px; height: 22px; fill: #fff; }
.bell[aria-pressed="true"] { background: var(--signal); }
.bell[aria-pressed="true"] svg { fill: var(--ink); }
.bell__dot {
  position: absolute; top: 9px; right: 10px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 2px var(--ink);
}

.homes { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.homes::-webkit-scrollbar { display: none; }
.home-chip {
  flex: none;
  border: 1.5px solid rgba(255,255,255,.35);
  background: transparent;
  color: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 500;
}
.home-chip[aria-pressed="true"] { background: #fff; border-color: #fff; color: var(--ink); }

.kinds { display: flex; gap: 22px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.kinds::-webkit-scrollbar { display: none; }
.kinds button {
  flex: none;
  border: 0; background: none;
  color: #B9C5D8;
  padding: 10px 0 12px;
  font-size: 15px; font-weight: 500;
  border-bottom: 3px solid transparent;
}
.kinds button[aria-selected="true"] { color: #fff; border-bottom-color: var(--signal); }

/* ---------- Установка ---------- */
.install {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px; padding: 10px 12px;
  background: var(--paper); border-radius: 12px;
  font-size: 14px;
}
.install span { flex: 1; }
.install button { border: 0; border-radius: 8px; padding: 7px 12px; background: var(--ink); color: #fff; font-weight: 500; }
.install .install__close { background: none; color: var(--ink-2); font-size: 22px; padding: 0 4px; }

/* ---------- Лента ---------- */
.feed { padding: 16px 12px 40px; display: grid; gap: 12px; max-width: 644px; }

.ticket {
  display: grid;
  grid-template-columns: 1fr 118px;
  background: var(--paper);
  border-radius: var(--radius-ticket);
  border: 0; padding: 0; width: 100%;
  text-align: left;
  position: relative;
  /* вырезы перфорации сверху и снизу */
  --notch: radial-gradient(circle at center, var(--concrete) 9px, transparent 9.5px);
}
.ticket::before, .ticket::after {
  content: "";
  position: absolute;
  right: 109px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--concrete);
}
.ticket::before { top: -9px; }
.ticket::after { bottom: -9px; }

.ticket__main { padding: 16px 14px 14px 18px; min-width: 0; }
.ticket__from { font-size: 13px; color: var(--ink-2); margin: 0 0 2px; }
.ticket__dest {
  font: 700 22px/1.15 var(--display);
  letter-spacing: -0.01em;
  margin: 0;
  overflow-wrap: anywhere;
}
.ticket__country { font-size: 13px; color: var(--ink-2); margin: 3px 0 10px; }
.ticket__dates { font-weight: 600; font-size: 15px; margin: 0; }
.ticket__dates small { font-weight: 400; color: var(--ink-2); font-size: 14px; margin-left: 8px; }
.ticket__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12.5px; padding: 3px 8px; border-radius: 6px; background: #EEF2F6; color: var(--ink); }
.tag--good { background: #E3F3EB; color: var(--good); font-weight: 600; }

.ticket__stub {
  border-left: 2px dashed var(--line);
  padding: 16px 12px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px;
  border-radius: 0 var(--radius-ticket) var(--radius-ticket) 0;
}
.price { font: 800 19px/1.1 var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.price span { font-size: 0.75em; font-weight: 700; margin-left: 2px; }
.stub__note { font-size: 12.5px; color: var(--ink-2); line-height: 1.3; }
.stub__codes { font: 500 12px/1 var(--display); color: var(--ink-2); margin-top: 6px; letter-spacing: 0.04em; }

.ticket--hot .ticket__stub { background: var(--signal); border-left-color: rgba(23,42,74,.35); }
.ticket--hot .stub__note, .ticket--hot .stub__codes { color: var(--ink); }

.ticket:active { transform: scale(.99); }
@media (hover: hover) { .ticket:hover .ticket__dest { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; } }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty h2 { font: 700 19px/1.3 var(--display); color: var(--ink); margin: 0 0 8px; }
.empty button { margin-top: 16px; }

.skeleton { height: 128px; border-radius: var(--radius-ticket); background: linear-gradient(90deg, #F3F6F9 0%, #FBFCFD 50%, #F3F6F9 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Нижние листы ---------- */
.sheet {
  border: 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  width: 100%; max-width: 620px;
  margin: auto auto 0;
  border-radius: 22px 22px 0 0;
  max-height: 92dvh;
  background: var(--paper);
  color: var(--ink);
}
.sheet::backdrop { background: rgba(23,42,74,.55); }
.sheet[open] { animation: sheetUp .22s ease-out; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .4; } }
.sheet__grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet__title { font: 700 22px/1.2 var(--display); margin: 0 0 6px; }
.sheet__actions { display: flex; gap: 10px; margin-top: 20px; }
.sheet__actions .btn { flex: 1; }

.muted { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; }
.error { color: #B3261E; font-size: 14px; }

.btn { border: 0; border-radius: 12px; padding: 13px 16px; font-weight: 600; font-size: 15px; text-align: center; text-decoration: none; display: inline-block; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--signal { background: var(--signal); color: var(--ink); }
.btn--ghost { background: #EEF2F6; color: var(--ink); }
.btn--wide { display: block; width: 100%; }

/* Детали находки */
.detail__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.detail__price { text-align: right; }
.detail__price .price { font-size: 24px; }
.detail__sub { color: var(--ink-2); font-size: 14px; margin: 4px 0 0; }

.legs { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 0; }
.leg { display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; padding: 10px 0; position: relative; }
.leg__dot { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--ink); margin-top: 5px; background: var(--paper); z-index: 1; }
.leg:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 22px; bottom: -12px; border-left: 2px dotted var(--line); }
.leg--pos .leg__dot { border-color: var(--ink-2); border-style: dashed; }
.leg__route { font-weight: 600; }
.leg__meta { font-size: 13.5px; color: var(--ink-2); }
.leg__price { font-weight: 600; white-space: nowrap; }
.leg__price a { color: inherit; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.fact { background: #F3F6F9; border-radius: 12px; padding: 10px 12px; }
.fact dt { font-size: 12.5px; color: var(--ink-2); }
.fact dd { margin: 2px 0 0; font-weight: 600; }

.more-dates { margin: 18px 0 0; }
.more-dates h3 { font-size: 15px; margin: 0 0 8px; }
.more-dates button { display: flex; justify-content: space-between; width: 100%; border: 0; background: none; padding: 10px 0; border-top: 1px solid #EEF2F6; text-align: left; }

.vote { display: flex; gap: 10px; margin-top: 12px; }
.vote button { flex: 1; border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 11px; font-weight: 500; }
.vote button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }

/* Настройки */
.switch { display: flex; align-items: center; gap: 12px; font-weight: 600; margin: 8px 0 18px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { width: 50px; height: 30px; border-radius: 15px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .switch__track { background: var(--ink); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--signal); outline-offset: 2px; }

.field { border: 0; padding: 0; margin: 0 0 18px; }
.field legend, .field > span { font-weight: 600; font-size: 15px; margin-bottom: 8px; display: block; }
.field--inline input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.homes--settings { margin-top: 0; flex-wrap: wrap; }
.homes--settings .home-chip { color: var(--ink); border-color: var(--line); }
.homes--settings .home-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; font-size: 15px; cursor: pointer; }
.radio input { margin-top: 4px; accent-color: var(--ink); width: 18px; height: 18px; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 12px; font-size: 14px;
  z-index: 20; max-width: calc(100% - 32px);
}

@media (min-width: 700px) {
  .feed { padding-top: 24px; gap: 14px; }
  .ticket { grid-template-columns: 1fr 150px; }
  .ticket::before, .ticket::after { right: 141px; }
  .ticket__dest { font-size: 26px; }
  .price { font-size: 22px; }
  .sheet { margin: auto; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
