:root {
  --paper: #f4f1e9;
  --paper-2: #ebe5d8;
  --card: #fffdf8;
  --ink: #17150f;
  --ink-2: #2b281f;
  --muted: #6f695b;
  --line: #ded6c5;
  --line-soft: #eae4d6;
  --accent: #cf4522;
  --accent-dark: #a83517;
  --accent-soft: #fbe7df;
  --green: #23594a;
  --green-soft: #e7f0ea;
  --gold: #a97b23;
  --shadow: 0 1px 2px rgba(23, 21, 15, .04), 0 10px 30px rgba(23, 21, 15, .07);
  --shadow-lg: 0 30px 80px rgba(23, 21, 15, .28);
  --radius: 16px;
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", "PT Serif", serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image: radial-gradient(rgba(23, 21, 15, .035) 1px, transparent 1px);
  background-size: 22px 22px;
}

.wrap { width: min(1240px, 100% - 40px); margin: 0 auto; }

a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 241, 233, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { display: flex; align-items: center; gap: 28px; height: 66px; position: relative; }
.brand {
  font-family: var(--serif);
  font-size: 24px; font-weight: 700; letter-spacing: -.02em;
  text-decoration: none; display: inline-flex; align-items: baseline; gap: 4px;
  white-space: nowrap;
}
.brand__zero { color: var(--accent); }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav__link {
  text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600;
  padding: 8px 12px; border-radius: 999px;
}
.nav__link:hover { color: var(--ink); background: rgba(23, 21, 15, .05); }
.nav__link.is-active { color: var(--ink); background: rgba(23, 21, 15, .07); }
.topbar__right { display: flex; gap: 10px; align-items: center; }
.topbar__fresh {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.topbar__fresh .fresh-dot { margin-right: 0; }
@media (max-width: 980px) { .topbar__fresh { display: none; } }

/* «Поддержи проект» по центру шапки: два QR, подпись и сердечко, без рамки */
.topup {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 7px;
  padding: 0; background: transparent; border: 0; border-radius: 0;
  color: var(--ink); z-index: 2;
}
.topup__link { display: block; line-height: 0; flex: 0 0 auto; transition: opacity .15s; }
.topup__link:hover { opacity: .8; }
.topup__qr { width: 34px; height: 34px; display: block; }
.topup__label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 800; letter-spacing: .01em;
  text-decoration: none; color: inherit;
}
.topup__word {
  font-family: "Segoe Print", "Segoe Script", cursive;
  font-size: 18px; font-weight: 700; font-style: normal; line-height: 1;
  display: inline-block; transform: skewX(-4deg);
  letter-spacing: .01em; padding-right: 2px;
}
.topup__heart {
  width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto;
  transition: transform .15s;
}
.like-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; color: var(--accent); font-family: var(--font);
}
.like-btn__count { font-size: 12px; font-weight: 700; color: var(--muted); }
.like-btn:hover .topup__heart { transform: scale(1.18); }
.like-btn.is-liked { cursor: default; }
.like-btn:disabled { opacity: 1; cursor: default; }
.like-btn.is-liked .topup__heart { color: var(--accent-dark); }
.like-btn.is-liked .like-btn__count { color: var(--accent-dark); }
@media (max-width: 1180px) {
  .topbar__in {
    height: auto; min-height: 66px; flex-wrap: wrap;
    padding: 8px 0 9px; row-gap: 6px;
  }
  .topup {
    position: static; transform: none; order: 3;
    flex: 0 0 100%; justify-content: center;
  }
  .topup__qr { width: 42px; height: 42px; }
  .topup__word { font-size: 16px; }
  .filters { position: static; }
}

.ghost-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  transition: .15s;
}
.ghost-btn:hover { border-color: var(--ink); }
.ghost-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ghost-btn.is-on svg { color: #fff; }
.ghost-btn svg { color: var(--accent); }

.collect-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 15px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font-weight: 700; font-size: 13px; transition: .15s;
}
.collect-btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.collect-btn:disabled { opacity: .55; cursor: wait; }
.collect-btn--small { height: 34px; padding: 0 13px; font-size: 12.5px; }
.collect-wrap { display: flex; align-items: center; gap: 10px; }
.collect-progress { display: flex; flex-direction: column; gap: 4px; width: 150px; }
.collect-progress__text {
  font-size: 11px; color: var(--muted); text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.collect-progress__bar { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.collect-progress__bar span {
  display: block; height: 100%; width: 0;
  background: var(--accent); transition: width .4s ease;
}

.pill {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  border-radius: 999px; background: rgba(23, 21, 15, .09);
  font-size: 11px; padding: 0 6px;
}
.ghost-btn.is-on .pill { background: rgba(255, 255, 255, .24); }

/* ---------- hero ---------- */
.hero { padding: 54px 0 26px; }
.hero__in { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); gap: 48px; align-items: end; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--green); margin-bottom: 18px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 4vw, 52px); line-height: 1.04; letter-spacing: -.03em;
  margin: 0 0 18px;
}
.hero h1 strong { color: var(--ink); font-weight: 700; }
.hero h1 em { color: var(--accent); font-style: italic; }
.hero h1 .hero-br-mobile { display: none; }
.hero__sub { max-width: 640px; color: var(--muted); font-size: 16.5px; margin: 0; }

.hero__stats {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border-top: 1px solid var(--line);
}
.stat {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.stat__num { font-family: var(--serif); font-size: 30px; line-height: 1; }
.stat__cap { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stat--updated .stat__num { font-variant-numeric: tabular-nums; }
.fresh-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); margin-right: 6px; vertical-align: middle;
}
.fresh-dot.is-old { background: var(--gold); }

/* ---------- filters ---------- */
.filters {
  position: sticky; top: 66px; z-index: 30;
  background: rgba(244, 241, 233, .94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0 12px;
}
.search-row { display: grid; grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 180px)) auto; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 14px; height: 46px; color: var(--muted);
}
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 21, 15, .06); }
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 15px; color: var(--ink); }

.select {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 4px 12px; height: 46px;
}
.select span { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.select select {
  border: 0; outline: 0; background: transparent; font-size: 14px; font-weight: 600;
  color: var(--ink); width: 100%; cursor: pointer; margin-top: 1px; padding: 0;
  appearance: none;
}
.select::after {
  content: "▾"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 11px; pointer-events: none;
}

/* кастомный выбор города */
.city-combo { position: relative; }
.city-combo::after { display: none; }
.city-combo__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; border: 0; background: transparent; padding: 0; margin-top: 1px;
  font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--ink);
  cursor: pointer; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.city-combo__arrow { color: var(--muted); font-size: 11px; flex: 0 0 auto; }
.city-combo__menu {
  position: absolute; z-index: 80; top: calc(100% + 6px); left: 0;
  width: min(340px, calc(100vw - 40px)); background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 8px;
}
.city-combo__menu input {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 10px; font-size: 13px; margin-bottom: 6px; outline: none;
  background: var(--paper); font-family: var(--font);
}
.city-combo__menu input:focus { border-color: var(--ink); background: #fff; }
.city-combo__list { max-height: 320px; overflow: auto; }
.city-option {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 7px 9px; border-radius: 8px; font-size: 13.5px; cursor: pointer;
}
.city-option__name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.city-option__sub { font-size: 11px; color: var(--muted); font-weight: 400; }
.city-option__count { flex: 0 0 auto; }
.city-section {
  padding: 9px 9px 4px; font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.city-tabs { display: flex; gap: 6px; margin: 2px 0 6px; }
.city-tab {
  flex: 1; border: 1px solid var(--line); background: var(--paper); border-radius: 8px;
  padding: 6px 8px; font-size: 12px; font-weight: 700; color: var(--muted);
  cursor: pointer; font-family: var(--font);
}
.city-tab.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.city-hint { font-size: 11px; color: var(--muted); padding: 0 9px 6px; line-height: 1.35; }
.city-option__right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.city-option__drill { color: var(--muted); font-size: 16px; line-height: 1; }
.city-back {
  padding: 8px 9px; margin-bottom: 4px; font-size: 12.5px; font-weight: 700;
  color: var(--accent-dark); cursor: pointer; border-bottom: 1px solid var(--line);
}
.city-back:hover { background: var(--paper); border-radius: 8px; }
.city-option:hover { background: var(--paper); }
.city-option.is-active { background: var(--accent-soft); color: var(--accent-dark); }
.city-option--pinned { font-weight: 800; }
.city-option__count { color: var(--muted); font-weight: 400; font-size: 12px; }
.city-option--sep { height: 1px; background: var(--line); margin: 6px 4px; }
.lucky-btn {
  height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: 14px;
  transition: .15s;
}
.lucky-btn:hover { background: var(--accent); border-color: var(--accent); }

.chip-rows { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; flex-wrap: wrap; width: 100%; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; max-width: 100%; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  transition: .13s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chips--dates .chip { font-weight: 500; }
.chips--dates .chip.is-active { background: var(--green); border-color: var(--green); }

.active-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.active-row__label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.active-row__list { display: flex; gap: 6px; flex-wrap: wrap; }
.active-tag {
  display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft);
  color: var(--accent-dark); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600;
}
.active-tag button { border: 0; background: transparent; color: inherit; font-size: 15px; line-height: 1; padding: 0; }
.link-btn { border: 0; background: transparent; color: var(--muted); text-decoration: underline; font-size: 13px; padding: 4px; }

/* ---------- results ---------- */
.main { padding: 26px 0 60px; }
.result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.result-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.result-tools .ghost-btn { font-size: 12px; padding: 6px 11px; }
.result-count { font-size: 15px; font-weight: 700; }
.result-count b { color: var(--accent); }
.result-note { font-size: 12.5px; color: var(--muted); max-width: 260px; white-space: normal; text-align: right; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 22px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  text-align: left; padding: 0;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfc6b2; }
.card__poster { position: relative; aspect-ratio: 4 / 4.6; background: var(--paper-2); overflow: hidden; }
.card__poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.card:hover .card__poster img { transform: scale(1.04); }
.card__poster--empty {
  display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, #efe9dc, #efe9dc 12px, #e7e0d0 12px, #e7e0d0 24px);
  color: #b3a98f; font-family: var(--serif); font-size: 38px;
}
.badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: rgba(255, 253, 248, .95); color: var(--ink);
  border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(4px);
}
.badge--circus { background: #ffd9c9; color: #8a2c0c; }
.badge--concert { background: #e2e8ff; color: #2b3a8a; }
.badge--theater { background: #e6f0e3; color: #2c5a37; }
.date-chip {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: var(--ink); color: var(--paper); border-radius: 10px;
  padding: 6px 9px; text-align: center; line-height: 1.05; min-width: 52px;
}
.date-chip b { display: block; font-size: 16px; font-family: var(--serif); }
.date-chip span { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.fav {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(255, 253, 248, .94); color: #8b8474; display: grid; place-items: center;
  transition: .15s;
}
.fav:hover { color: var(--accent); transform: scale(1.06); }
.fav.is-on { color: var(--accent); }

.card__body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card__title {
  font-size: 16.5px; line-height: 1.28; font-weight: 700; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__where { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.card__where b { color: var(--ink-2); font-weight: 600; }
.card__tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.tag { font-size: 11px; color: var(--muted); background: var(--paper); border-radius: 6px; padding: 2px 7px; }
.card__foot {
  margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.price { font-weight: 800; color: var(--green); font-size: 14px; letter-spacing: .02em; }
.price small { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted); letter-spacing: 0; }
.card__age { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }

/* skeletons */
.skeleton { pointer-events: none; }
.skeleton .sk { background: linear-gradient(90deg, #ece6d8 25%, #f2ecdf 37%, #ece6d8 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; }
.skeleton .card__poster { background: #ece6d8; }
.sk-line { height: 12px; margin: 6px 0; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* empty & more */
.empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: 24px; background: rgba(255, 253, 248, .6); }
.empty__icon { font-size: 46px; color: var(--accent); line-height: 1; }
.empty h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 14px 0 8px; }
.empty p { color: var(--muted); max-width: 440px; margin: 0 auto 22px; }
.more-wrap { display: grid; place-items: center; margin-top: 34px; }
.more-btn, .primary-btn {
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 14px; transition: .15s;
}
.more-btn:hover, .primary-btn:hover { background: var(--accent); border-color: var(--accent); }
.more-btn:disabled, .primary-btn:disabled { opacity: .45; cursor: not-allowed; background: var(--ink); border-color: var(--ink); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--paper-2); padding: 40px 0; margin-top: 20px; }
.footer__in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
.brand--footer { font-size: 20px; margin-bottom: 10px; }
.footer p { color: var(--muted); font-size: 13px; max-width: 520px; margin: 0; }
.footer__links { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.footer__links a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid transparent; width: fit-content; }
.footer__links a:hover { border-color: var(--ink); }
.footer__stats {
  display: flex; flex-wrap: wrap; gap: 7px 18px; margin-top: 14px;
  font-size: 12px; color: var(--muted);
}
.footer__stats b { color: var(--ink); font-weight: 700; }
.footer__quick { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.footer__quick-title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); font-weight: 800; margin-bottom: 2px;
}
.footer__quick a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid transparent; width: fit-content; }
.footer__quick a:hover { border-color: var(--ink); }
.footer__lucky {
  background: none; border: 0; padding: 0; font: inherit; font-size: 13.5px;
  color: var(--accent); cursor: pointer; text-align: left; width: fit-content;
}
.footer__lucky:hover { text-decoration: underline; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20, 18, 12, .55); backdrop-filter: blur(3px); }
.modal__card {
  position: relative; width: min(980px, 100%); max-height: calc(100vh - 48px);
  background: var(--card); border-radius: 22px; overflow: hidden;
  display: grid; grid-template-columns: 380px minmax(0, 1fr);
  box-shadow: var(--shadow-lg); animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(10px) scale(.99); opacity: 0; } }
.modal__poster { background: var(--paper-2); min-height: 100%; }
.modal__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal__body { padding: 30px 34px 28px; overflow-y: auto; max-height: calc(100vh - 48px); }
.modal__close {
  position: absolute; top: 12px; right: 14px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255, 253, 248, .92); font-size: 22px; line-height: 1; color: var(--ink);
}
.modal__close:hover { background: var(--accent); color: #fff; }
.modal__meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; flex-wrap: wrap; }
.modal__meta .tag { text-transform: none; letter-spacing: 0; }
#mTitle { font-family: var(--serif); font-weight: 400; font-size: 31px; line-height: 1.1; margin: 0 0 16px; letter-spacing: -.01em; }
.modal__facts { display: grid; gap: 8px; margin-bottom: 18px; }
.fact { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 14.5px; }
.fact svg { color: var(--muted); margin-top: 2px; }
.fact b { font-weight: 700; }
.fact span { color: var(--muted); }
.modal__desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.62; margin-bottom: 18px; white-space: pre-line; }
.modal__desc.is-muted { color: var(--muted); font-style: italic; }
.modal__desc.is-clamped { max-height: 150px; overflow: hidden; mask-image: linear-gradient(180deg, #000 70%, transparent); }
.desc-toggle { border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 13px; padding: 0; margin: -8px 0 16px; }

.booking-box { border: 1px solid #cfe1d4; background: var(--green-soft); border-radius: 14px; padding: 15px 17px; margin-bottom: 18px; }
.booking-box__head { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin-bottom: 6px; }
.booking-box p { margin: 0; font-size: 14px; color: #1d3b32; }
.booking-box .hint { margin-top: 8px; font-size: 12px; color: #4d6b60; }

.modal__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 12px 18px; border-radius: 12px; font-weight: 700; font-size: 14px; border: 1px solid transparent;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--outline { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--outline:hover { border-color: var(--ink); }
.modal__source { color: var(--muted); font-size: 12px; margin: 14px 0 0; }
.modal__source a { color: var(--muted); }

@media (max-width: 980px) {
  .hero__in { grid-template-columns: 1fr; gap: 26px; }
  .hero__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { flex-direction: column; align-items: flex-start; gap: 2px; border-bottom: 0; border-right: 1px solid var(--line); padding-right: 12px; }
  .stat:last-child { border-right: 0; }
  .search-row { grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; }
  .lucky-btn { grid-column: 1 / -1; }
  .modal__card { grid-template-columns: 1fr; overflow-y: auto; }
  .modal__poster { max-height: 320px; }
  .modal__body { max-height: none; }
  .footer__in { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 28px); }
  .topbar__in { gap: 10px; height: auto; min-height: 60px; }
  .topbar__right .collect-wrap { display: none; }
  .nav { display: none; }
  .hero { padding: 30px 0 18px; }
  .hero__stats { gap: 8px; }
  .stat { padding-right: 6px; }
  .stat__num { font-size: 23px; }
  .stat__cap { font-size: 9px; letter-spacing: .03em; }
  .filters { position: static; }
  .chip-rows { align-items: flex-start; flex-direction: column; }
  .search-row { grid-template-columns: 1fr; }
  .select { height: 44px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card__title { font-size: 14.5px; }
  .modal { padding: 0; }
  .modal__card { border-radius: 0; max-height: 100vh; height: 100%; }
  .modal__body { padding: 22px 20px 26px; }
  #mTitle { font-size: 25px; }
  .hero h1 { font-size: 30px; }
  .hero h1 .hero-br-desktop { display: none; }
  .hero h1 .hero-br-mobile { display: inline; }
}

/* ---------- sources page ---------- */
.page-hero { padding: 46px 0 30px; border-bottom: 1px solid var(--line); }
.page-hero h1 {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.02em;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.06; margin: 0 0 14px;
}
.page-hero__sub { max-width: 840px; color: var(--muted); font-size: 15.5px; margin: 0 0 24px; }
.src-summary { display: flex; gap: 42px; flex-wrap: wrap; }
.src-summary div { display: flex; flex-direction: column; gap: 2px; }
.src-summary b { font-family: var(--serif); font-size: 28px; color: var(--accent); font-weight: 400; }
.src-summary span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

.src-section { margin: 44px 0 10px; }
.src-h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 8px; letter-spacing: -.01em; }
.src-hint { color: var(--muted); font-size: 14px; max-width: 800px; margin: 0 0 20px; }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; margin-top: 18px; }
.src-grid--links { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.src-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px; display: flex; flex-direction: column; gap: 13px;
}
.src-card--live { border-color: #bcd6c4; box-shadow: 0 0 0 1px rgba(35, 89, 74, .08), var(--shadow); }
.src-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.src-card h3 { font-size: 19px; margin: 0 0 3px; letter-spacing: -.01em; }
.src-card__coverage { font-size: 12.5px; color: var(--muted); }
.status {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em;
  background: var(--paper-2); color: var(--muted); border-radius: 999px; padding: 5px 9px; white-space: nowrap;
}
.status--live { background: var(--green); color: #eef5f0; }
.status--token { background: var(--gold); color: #fff; }

.token-hint {
  margin-top: 22px; padding: 18px 22px; border: 1px solid #dcc9a4;
  background: #fbf3e2; border-radius: 16px; max-width: 900px;
}
.token-hint__title { font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #7a5714; margin-bottom: 8px; }
.token-hint ol { margin: 0 0 8px; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); }
.token-hint li { margin-bottom: 4px; }
.token-hint p { margin: 0; font-size: 12px; color: var(--muted); }
.token-hint code {
  font-family: Consolas, "Courier New", monospace; font-size: 12px;
  background: rgba(23, 21, 15, .07); padding: 1px 5px; border-radius: 4px;
}
.src-card__types { display: flex; gap: 5px; flex-wrap: wrap; }
.src-block h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  margin: 0 0 5px; font-weight: 800;
}
.src-block p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.src-block .mono { font-size: 12.5px; color: var(--muted); }
.field-list { margin: 0; padding-left: 17px; columns: 2; column-gap: 16px; }
.field-list li { font-size: 12.8px; color: var(--ink-2); margin-bottom: 3px; break-inside: avoid; }
.src-note {
  margin: 0; font-size: 12px; color: var(--muted); border-left: 2px solid var(--line);
  padding-left: 10px; font-style: italic;
}
.src-card__actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }

.src-legal { border-top: 1px solid var(--line); padding-top: 30px; }
.legal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.legal-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 7px; color: var(--accent-dark); }
.legal-grid p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }

@media (max-width: 640px) {
  .src-grid, .src-grid--links { grid-template-columns: 1fr; }
  .field-list { columns: 1; }
  .src-summary { gap: 22px; }
}

/* ---------- Timepad page ---------- */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.tp-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px 24px; margin-top: 18px;
}
.tp-grid .tp-card { margin-top: 0; }
.tp-card h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 12px; letter-spacing: -.01em; }
.step-list { margin: 0 0 12px; padding-left: 20px; font-size: 14px; color: var(--ink-2); }
.step-list li { margin-bottom: 7px; line-height: 1.45; }
.step-list a { color: var(--accent-dark); }
.tp-note { font-size: 12.5px; color: var(--muted); margin: 0; }
.tp-note code, .tp-hint code { font-family: Consolas, monospace; font-size: 12px; background: var(--paper); padding: 1px 5px; border-radius: 4px; }
.tp-token-state {
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  background: var(--paper); border-radius: 10px; padding: 10px 13px; margin-bottom: 12px;
}
.tp-token-state.is-ok { color: var(--green); background: var(--green-soft); }
.tp-form { display: flex; gap: 8px; flex-wrap: wrap; }
.tp-form input {
  flex: 1 1 220px; min-width: 0; height: 44px; border: 1px solid var(--line);
  border-radius: 11px; padding: 0 12px; font-size: 14px; background: var(--paper); color: var(--ink);
  font-family: var(--font);
}
.tp-form input:focus { outline: none; border-color: var(--ink); background: #fff; }
.tp-form .primary-btn { height: 44px; padding: 0 18px; font-size: 13.5px; }
.tp-hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.tp-collect { margin-top: 18px; }
.tp-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin-top: 12px; }
.tp-select { flex: 1 1 320px; height: 46px; }
.tp-select--small { flex: 0 0 170px; }
.tp-select input {
  border: 0; outline: 0; background: transparent; font-size: 14px; font-weight: 600;
  color: var(--ink); width: 100%; padding: 0; margin-top: 1px; font-family: var(--font);
}
.tp-controls .primary-btn { height: 46px; padding: 0 22px; }
.tp-progress { margin-top: 16px; }
.tp-progress__bar { height: 8px; border-radius: 999px; background: var(--paper-2); overflow: hidden; }
.tp-progress__bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
.tp-progress__text { font-size: 13px; color: var(--muted); margin-top: 7px; }
.tp-result { margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tp-result .tp-hint { margin: 0; }
.tp-error { color: var(--accent-dark); font-size: 13.5px; font-weight: 600; }
.tp-about__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tp-about__grid div { display: flex; flex-direction: column; gap: 2px; }
.tp-about__grid b { font-size: 13.5px; }
.tp-about__grid span { font-size: 12.5px; color: var(--muted); }

@media (max-width: 640px) {
  .tp-card { padding: 18px; }
  .tp-select--small { flex: 1 1 100%; }
  .tp-controls .primary-btn { width: 100%; }
}

/* ---------- страница события (SEO) ---------- */
.event-head {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 940px; margin: 0 auto; padding: 22px 24px;
}
.event-head .brand { text-decoration: none; }
.event-head__back { font-size: 13px; color: var(--muted); text-decoration: none; }
.event-head__back:hover { color: var(--ink); }
.event-main { max-width: 820px; margin: 0 auto; padding: 6px 24px 64px; }
.event-kicker { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.event-free {
  font-size: 12px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px;
}
.event-title {
  font-family: var(--serif); font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08; letter-spacing: -.02em; margin: 0 0 22px;
}
.event-facts {
  display: grid; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 22px; font-size: 15px;
}
.event-poster { max-width: 100%; border-radius: 14px; margin-bottom: 22px; }
.event-desc { white-space: pre-line; font-size: 16px; line-height: 1.6; margin-bottom: 26px; }
.event-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.event-source { font-size: 12px; color: var(--muted); }
.event-source a { color: var(--muted); }

.card__poster-link { display: block; width: 100%; height: 100%; }
.card__title a { color: inherit; text-decoration: none; }

/* ---------- городские и тематические страницы ---------- */
.listing-page { background: var(--paper); }
.listing-head {
  max-width: 1240px; margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid var(--line);
}
.listing-nav { display: flex; gap: 18px; font-size: 14px; font-weight: 600; }
.listing-nav a { color: var(--muted); text-decoration: none; }
.listing-nav a:hover { color: var(--ink); }
.listing-main { max-width: 1240px; margin: 0 auto; padding: 34px 24px 60px; }
.listing-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -.02em;
  margin: 10px 0 12px;
}
.listing-intro { color: var(--muted); font-size: 16px; max-width: 760px; margin: 0 0 10px; }
.listing-count { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.listing-count b { color: var(--ink); }
.listing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.listing-card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--ink); transition: .2s ease;
}
.listing-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.listing-card__poster { position: relative; aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; }
.listing-card__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-card__empty {
  display: grid; place-items: center; height: 100%;
  background: repeating-linear-gradient(135deg, #efe9dc, #efe9dc 12px, #e7e0d0 12px, #e7e0d0 24px);
  color: #b3a98f; font-family: var(--serif); font-size: 34px;
}
.listing-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; }
.listing-card__date { font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.listing-card__title { font-family: var(--serif); font-size: 18px; line-height: 1.2; margin: 0; font-weight: 400; }
.listing-card__place { margin: 0; font-size: 12px; color: var(--muted); }
.listing-card__free { margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--green); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 34px 0 18px; font-size: 14px; }
.pagination__link { color: var(--ink); font-weight: 700; text-decoration: none; }
.pagination__link:hover { color: var(--accent); }
.pagination__info { color: var(--muted); }
.listing-back { margin: 18px 0 0; font-size: 13px; }
.listing-back a { color: var(--muted); }
@media (max-width: 640px) {
  .listing-head { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 14px; }
  .listing-main { padding: 24px 14px 44px; }
  .listing-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .listing-card__title { font-size: 16px; }
}

.event-city-link { margin: 12px 0 0; font-size: 14px; font-weight: 600; }
.event-city-link a { color: var(--accent); text-decoration: none; }
.event-city-link a:hover { text-decoration: underline; }
