/* Moka Travels. Цвета заданы токенами, вёрстка от телефона.
   Образ: дорожный - билеты, путевой лист, полароиды с маршрута, штамп "был".
   Шрифты лежат у себя (app/assets/fonts, лицензия SIL OFL): Unbounded - заголовки,
   Caveat - "рукописные" подписи. */
@font-face { font-family: "Unbounded"; font-weight: 400 800; font-display: swap;
  src: url("/assets/unbounded-cyrillic-bc09ba47.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 400 800; font-display: swap;
  src: url("/assets/unbounded-latin-cafa3ec4.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Caveat"; font-weight: 600; font-display: swap;
  src: url("/assets/caveat-cyrillic-787313f9.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Caveat"; font-weight: 600; font-display: swap;
  src: url("/assets/caveat-latin-9eddd13c.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --bg: #fbf6ec;        /* бумага */
  --card: #ffffff;
  --ink: #17262a;
  --muted: #5a6764;
  --line: #e6dccb;
  --acc: #0f6a5c;       /* морская волна: ссылки, кнопки */
  --acc-ink: #ffffff;
  --warm: #e8562a;      /* закат: старт, "популярное", главная кнопка */
  --sun: #ffb547;
  --night: #0e2b2f;     /* первый экран */
  --soft: #edf3ef;
  --radius: 12px;
  --gutter: 16px;
  --display: "Unbounded", system-ui, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--acc); }
img { max-width: 100%; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(24px, 5vw, 34px); line-height: 1.2; margin: 18px 0 8px; overflow-wrap: anywhere; }
h2 { font-size: clamp(19px, 3.4vw, 24px); line-height: 1.25; margin: 36px 0 14px; }
.h-small { font-size: 16px; margin: 20px 0 8px; color: var(--muted); font-weight: 600; }
.lead { color: var(--muted); margin: 0 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- шапка ---------- */
.top { background: var(--night); color: #fff; }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 18px; color: #fff; text-decoration: none; letter-spacing: -.01em; }
.brand::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 3px rgba(232, 86, 42, .3); vertical-align: 1px; }
.top-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.top-nav a, .top-me a { color: rgba(255, 255, 255, .78); text-decoration: none; padding: 4px 0; }
.top-nav a:hover, .top-nav a.on, .top-me a:hover { color: #fff; }
.top-nav a.on { font-weight: 600; box-shadow: inset 0 -2px var(--sun); }
.top-me { display: flex; gap: 6px 16px; margin-left: auto; align-items: center; }
@media (max-width: 640px) {
  .top-me { order: 2; }
  .top-nav { order: 3; flex-basis: 100%; font-size: 15px; }
}
.top-me .me-link { padding: 5px 14px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; color: #fff; }
.top-me .me-link:hover { border-color: var(--sun); }

.crumbs { margin-top: 16px; color: var(--muted); font-size: 14px; }

.demo { margin-top: 16px; }
.demo .lead { max-width: 760px; }
.demo-note { max-width: 760px; margin-top: 14px; }

/* Вкладки на радиокнопках: работают без скриптов. Кнопки скрыты визуально,
   но остаются в порядке Tab и переключаются стрелками. */
.tab-in { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tab-labels { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--soft); border-radius: 22px; margin-bottom: 14px; max-width: 100%; }
.tab-l { padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--muted); user-select: none; }
.tab-p { display: none; }
#dh0:checked ~ .tab-p0, #dh1:checked ~ .tab-p1, #dh2:checked ~ .tab-p2 { display: block; }
#dh0:checked ~ .tab-labels [for=dh0],
#dh1:checked ~ .tab-labels [for=dh1],
#dh2:checked ~ .tab-labels [for=dh2] { background: var(--acc); color: var(--acc-ink); }
#dh0:focus-visible ~ .tab-labels [for=dh0],
#dh1:focus-visible ~ .tab-labels [for=dh1],
#dh2:focus-visible ~ .tab-labels [for=dh2] { outline: 2px solid var(--acc); outline-offset: 2px; }

.plan-sum { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 12px; color: var(--muted); }
.plan-sum b { color: var(--ink); }

.plan { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px dashed var(--line); }
.plan-stop { position: relative; padding-top: 4px; }
.plan-walk { display: block; font-size: 13px; color: var(--muted); padding: 2px 0 6px; }
.plan-car { color: var(--ink); font-weight: 600; }
.plan-card {
  position: relative; display: flex; gap: 12px; align-items: center; padding: 8px; margin-bottom: 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none;
}
.plan-card::before {
  content: ""; position: absolute; left: -26px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 3px var(--bg);
}
.plan-card:hover { border-color: var(--acc); }
.plan-card:hover .plan-name { color: var(--acc); }
.plan-card img, .plan-noimg { flex: none; width: 88px; height: 66px; object-fit: cover; border-radius: 6px; background: var(--soft); }
.plan-text { display: block; min-width: 0; }
.plan-time { display: block; font-size: 13px; font-weight: 700; color: var(--acc); }
.plan-name { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.plan-meta { display: block; font-size: 13px; color: var(--muted); }

.passing { margin-top: 12px; padding: 12px 14px; background: var(--soft); border-radius: var(--radius); }
.passing-h { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.passing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }

/* ---------- форма подбора ---------- */
.picker { margin: 8px 0 8px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); max-width: 900px; }
.step { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.step-h { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; padding: 0; font-size: 17px; line-height: 1.35; font-weight: 600; }
.step-n {
  flex: none; display: inline-block; padding: 1px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--acc); color: var(--acc-ink); font-size: 14px; font-weight: 700; margin-top: 1px;
}
.step-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; }
.step-sub { font-size: 15px; }
.step .kinds { margin: 0; }
.step .hint { margin: 8px 0 0; }
.picker-map { height: 340px; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); z-index: 0; }
@media (max-width: 560px) { .picker-map { height: 300px; } }
.picker-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.picker-act .hint { margin: 0; }
.start-l { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 15px; }
.start-l input { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.picker-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.picker-go .hint { margin: 0; }
.btn-sm { padding: 6px 12px; font-size: 14px; }
.btn-big { padding: 12px 22px; font-size: 17px; font-weight: 600; }

/* ---------- карты ---------- */
.route-map { height: 360px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--soft); z-index: 0; margin-bottom: 14px; }
.plan-cols { display: grid; gap: 0 24px; }
@media (min-width: 960px) {
  .plan-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .route-map { position: sticky; top: 16px; height: 520px; margin-bottom: 0; }
}
.map-dot span {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--acc); color: #fff; font: 700 13px/1 system-ui, sans-serif; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.map-start span {
  display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--warm);
  border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.leaflet-container { font: inherit; }
.leaflet-container a { color: var(--acc); }
.plan-n {
  position: absolute; left: 4px; top: 4px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 11px; background: var(--acc); color: #fff; font-size: 12px; font-weight: 700; z-index: 1;
}
.plan-start { padding: 2px 0 2px; color: var(--muted); font-size: 14px; position: relative; }
.plan-start::before {
  content: ""; position: absolute; left: -26px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 3px var(--bg);
}
.plan-start .plan-time { display: inline; margin-right: 6px; }

/* ---------- фильтр ---------- */
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 8px 0 4px; }
.kinds { border: 0; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chk { display: inline-flex; align-items: center; cursor: pointer; }
.chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chk span {
  display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); font-size: 14px; line-height: 1.3; user-select: none;
}
.chk input:checked + span { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.chk input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }
.chk-pop span { font-weight: 600; }
.chk-pop input:checked + span { background: var(--warm); border-color: var(--warm); }
.filters-act { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.filters-act:has(.btn[hidden]):not(:has(.reset)) { display: none; }
.reset { font-size: 14px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--acc);
  background: var(--acc); color: var(--acc-ink); font: inherit; font-size: 15px; text-decoration: none; cursor: pointer;
}
.btn-ghost { background: transparent; color: var(--acc); }

/* ---------- города ---------- */
.town-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.town-list a { text-decoration: none; }

/* ---------- карточки ---------- */
.found { color: var(--muted); font-size: 14px; margin: 18px 0 10px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.card-link { display: block; height: 100%; color: var(--ink); text-decoration: none; }
.card-link:hover .card-name { color: var(--acc); }
.card-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); }
.card-noimg { display: grid; place-items: center; padding: 12px; text-align: center; color: var(--muted); font-size: 14px; }
.card-body { display: block; padding: 10px 12px 12px; }
.card-name { display: block; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.card-where { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.empty { padding: 24px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

.pager { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: center; margin: 24px 0; color: var(--muted); }

/* ---------- страница места ---------- */
.place h1 { overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--acc); font-size: 14px; text-decoration: none; }
.tag-pop { background: var(--warm); color: #fff; }

.gallery { display: grid; gap: 6px; border-radius: var(--radius); overflow: hidden; }
.gallery a { display: block; min-width: 0; background: var(--soft); cursor: zoom-in; }
.gallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery.n1 img { height: auto; max-height: 520px; }
.gallery.n2 { grid-template-columns: 1fr 1fr; }
.gallery.n2 img, .gallery.n3 img { aspect-ratio: 4 / 3; }
.gallery.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery.n3 a:first-child { grid-row: span 2; }
.gallery.n3 a:first-child img { aspect-ratio: auto; }
@media (max-width: 560px) {
  .gallery.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .gallery.n3 a:first-child { grid-column: span 2; grid-row: auto; }
  .gallery.n3 a:first-child img { aspect-ratio: 4 / 3; }
}

.nophoto { padding: 20px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.nophoto p { margin: 0 0 12px; color: var(--muted); }

.place-cols { display: grid; gap: 8px 32px; margin-top: 16px; }
@media (min-width: 820px) { .place-cols { grid-template-columns: minmax(0, 1fr) 320px; } }
.place-text p { margin: 0 0 12px; }
.src { color: var(--muted); font-size: 14px; }
.place-facts dl { margin: 0; }
.place-facts dt { font-size: 14px; color: var(--muted); margin-top: 10px; }
.place-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.hint { color: var(--muted); font-size: 13px; }
.maps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.credits { color: var(--muted); font-size: 13px; margin-top: 20px; overflow-wrap: anywhere; }
.credits a { color: var(--muted); }

/* ---------- подвал ---------- */
.foot { margin-top: 48px; padding: 20px 0 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.foot a { color: var(--muted); }

/* ---------- просмотр снимка ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  /* Строка задана явно: в auto-строке max-height: 100% у снимка отбрасывается
     и он вылезает за экран */
  grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
  padding: 64px 80px; background: rgba(12, 16, 15, .92); animation: lbIn .15s ease;
}
@keyframes lbIn { from { opacity: 0 } to { opacity: 1 } }
.lb-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; cursor: zoom-out; }
.lb-x, .lb-arw {
  position: absolute; display: grid; place-items: center; cursor: pointer;
  background: rgba(20, 26, 24, .75); border: 1px solid rgba(255, 255, 255, .25); color: #fff; border-radius: 8px;
}
.lb-arw { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 22px; }
.lb-arw[hidden] { display: none; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-x { top: 14px; right: 14px; width: 44px; height: 44px; font-size: 16px; }
@media (max-width: 640px) {
  .lb { padding: 64px 12px 84px; }
  .lb-arw { top: auto; bottom: 18px; transform: none; width: 46px; height: 46px; }
  .lb-prev { left: 50%; margin-left: -52px; }
  .lb-next { right: 50%; margin-right: -52px; }
}
@media (prefers-reduced-motion: reduce) { .lb { animation: none; } }

/* =====================================================================
   ГЛАВНАЯ: первый экран, билеты, путевой лист, открытки, указатели
   ===================================================================== */

/* ---------- первый экран ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; background-color: var(--night);
  /* закатное зарево + горизонтали, как на топографической карте */
  background-image:
    radial-gradient(60rem 30rem at 85% 110%, rgba(232, 86, 42, .55), transparent 60%),
    radial-gradient(40rem 22rem at 100% 0%, rgba(255, 181, 71, .22), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.06' stroke-width='1.2'%3E%3Cpath d='M-20 420c80-40 120 30 210-10s110-120 210-90 140 60 220 30'/%3E%3Cpath d='M-20 460c90-40 130 40 220 0s120-120 220-80 130 70 200 40'/%3E%3Cpath d='M-20 500c100-40 140 50 230 10s130-120 230-70 120 80 180 50'/%3E%3Cpath d='M-20 120c70 30 140-40 220-10s90 110 190 90 130-70 230-50'/%3E%3Cpath d='M-20 160c80 30 150-30 230 0s90 100 190 80 130-60 220-40'/%3E%3Cpath d='M-20 80c60 30 130-50 210-20s100 110 200 100 120-80 230-60'/%3E%3Cellipse cx='300' cy='300' rx='70' ry='40'/%3E%3Cellipse cx='300' cy='300' rx='120' ry='72'/%3E%3Cellipse cx='300' cy='300' rx='175' ry='108'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, auto, 600px 600px;
}
.hero-in { display: grid; gap: 28px; padding-top: 36px; padding-bottom: 44px; align-items: center; }
@media (min-width: 900px) { .hero-in { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding-top: 56px; padding-bottom: 64px; } }
.hero-eyebrow { margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--sun); font-weight: 600; }
.hero-h {
  margin: 0 0 18px; font-family: var(--display); font-weight: 800;
  font-size: clamp(36px, 8.6vw, 76px); line-height: 1.02; letter-spacing: -.035em; overflow-wrap: normal;
}
.hero-mark { position: relative; display: inline-block; color: var(--sun); white-space: nowrap; }
/* мазок маркером под словом */
.hero-mark::after {
  content: ""; position: absolute; left: -2%; right: -4%; bottom: .02em; height: .2em; z-index: -1;
  background: var(--warm); border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%; transform: rotate(-1.5deg);
  transform-origin: left; animation: markIn .7s .3s cubic-bezier(.2, .8, .2, 1) both;
}
.hero-h { position: relative; z-index: 0; }
@keyframes markIn { from { transform: rotate(-1.5deg) scaleX(0); } }
.hero-lead { margin: 0 0 24px; max-width: 34em; font-size: clamp(16px, 2.2vw, 19px); color: rgba(255, 255, 255, .84); }
.hero-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.btn-hot {
  padding: 14px 24px; border: 0; border-radius: 999px; background: var(--warm); color: #fff;
  font-weight: 700; font-size: 17px; box-shadow: 0 8px 24px -8px rgba(232, 86, 42, .8);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-hot:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(232, 86, 42, .9); }
.hero-link { color: #fff; font-weight: 600; text-underline-offset: 4px; }
.hero-link:hover { color: var(--sun); }

.hero-clock { margin-top: 30px; }
.hero-clock-h { margin: 0 0 8px; font-family: var(--hand); font-size: 22px; color: rgba(255, 255, 255, .7); }
.hero-clock ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
.hero-tick {
  display: block; height: 100%; padding: 10px 12px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  transition: background .15s ease, border-color .15s ease;
}
.hero-tick:hover { background: rgba(255, 255, 255, .13); border-color: var(--sun); }
.hero-tick b { display: block; font-family: var(--display); font-size: clamp(26px, 6vw, 38px); line-height: 1; color: var(--sun); }
.hero-tick span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.3; color: rgba(255, 255, 255, .8); }

/* Полароиды на маршруте. Размеры - от ширины блока, чтобы на телефоне всё
   осталось внутри экрана (у .hero overflow: hidden на всякий случай). */
.hero-art { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1 / 1; container-type: inline-size; }
@media (max-width: 899px) { .hero-art { aspect-ratio: 5 / 4; max-width: 520px; } }
.hero-route { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hero-route path {
  fill: none; stroke: var(--sun); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: routeDraw 2.6s .2s ease-in-out forwards;
}
/* Пунктир поверх нарисованной линии: путь "пешком" */
@keyframes routeDraw { to { stroke-dashoffset: 0; } }
.hero-start {
  position: absolute; left: 2%; bottom: 0; padding: 2px 10px; border-radius: 999px;
  background: var(--warm); color: #fff; font-family: var(--hand); font-size: 20px; line-height: 1.3;
}
.polaroid {
  position: absolute; width: 40%; margin: 0; padding: 3.2% 3.2% 0; background: #fffdf8; color: var(--ink);
  border-radius: 3px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .6), 0 2px 4px rgba(0, 0, 0, .2);
  animation: polIn .6s cubic-bezier(.2, .9, .3, 1.3) both;
}
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #ddd; }
.polaroid figcaption {
  padding: 4% 0 6%; font-family: var(--hand); font-size: clamp(14px, 3.6cqw, 21px); line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pol-pin {
  position: absolute; top: -12px; left: -12px; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--acc); color: #fff; font: 700 14px/1 var(--display); border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.pol1 { left: 6%; top: 34%; --r: -7deg; animation-delay: .5s; }
.pol2 { left: 22%; top: 0; --r: 4deg; animation-delay: .9s; }
.pol3 { right: 2%; top: 22%; --r: 8deg; animation-delay: 1.3s; }
.pol4 { right: 16%; top: 60%; --r: -4deg; animation-delay: 1.7s; }
.polaroid { transform: rotate(var(--r, 0deg)); }
@keyframes polIn { from { opacity: 0; transform: translateY(18px) rotate(calc(var(--r, 0deg) * 3)) scale(.85); } }

/* ---------- заголовки разделов ---------- */
.sec-h { display: flex; flex-direction: column; gap: 4px; margin-top: 56px; }
.sec-k {
  font-family: var(--hand); font-weight: 600; font-size: 24px; line-height: 1; letter-spacing: 0;
  color: var(--warm); transform: rotate(-2deg); transform-origin: left; width: max-content; max-width: 100%;
}

/* ---------- билеты ---------- */
.ticket-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.ticket {
  --notch: 10px;
  position: relative; display: flex; min-width: 0; background: var(--card); border-radius: 14px;
  box-shadow: 0 1px 0 var(--line), 0 10px 24px -18px rgba(23, 38, 42, .5);
  /* полукруглые вырезы на линии отрыва */
  -webkit-mask: radial-gradient(circle var(--notch) at 64px 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at 64px 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle var(--notch) at 64px 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle var(--notch) at 64px 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.ticket-stub {
  flex: none; width: 64px; padding-top: 20px; text-align: center; border-right: 2px dashed var(--line);
  font: 800 22px/1 var(--display); color: var(--warm);
}
.ticket-body { display: block; padding: 16px 18px 18px; color: var(--muted); font-size: 15px; min-width: 0; }
.ticket-body b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 17px; line-height: 1.3; }
.ticket-link { display: inline-block; margin-top: 8px; font-weight: 600; }
.ticket-stamp .ticket-body { padding-right: 92px; }
.stamp {
  position: absolute; right: 12px; top: 14px; display: grid; place-items: center; width: 64px; height: 64px;
  border: 3px double var(--warm); border-radius: 50%; color: var(--warm); transform: rotate(-16deg);
  font: 800 13px/1 var(--display); text-transform: uppercase; letter-spacing: .12em; opacity: .85;
}

/* ---------- путевой лист (форма подбора) ---------- */
.plan-sheet .picker {
  position: relative; max-width: none; padding: 22px 18px 18px 18px; border: 0; border-radius: 16px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, rgba(15, 106, 92, .07) 31px 32px),
    var(--card);
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -26px rgba(23, 38, 42, .55);
}
@media (min-width: 700px) {
  .plan-sheet .picker { padding: 28px 28px 24px 84px; }
  /* дорога между шагами */
  .plan-sheet .picker::before {
    content: ""; position: absolute; left: 47px; top: 56px; bottom: 110px; border-left: 3px dashed rgba(232, 86, 42, .45);
  }
  .plan-sheet .step-h { position: relative; }
  .plan-sheet .step-n {
    position: absolute; left: -64px; top: -6px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    font-size: 0; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 5px var(--card);
  }
  .plan-sheet .step-n::after { font: 800 17px/1 var(--display); color: #fff; }
  .plan-sheet .picker { counter-reset: step; }
  .plan-sheet .step { counter-increment: step; }
  .plan-sheet .step-n::after { content: counter(step); }
  /* "Шаг N:" остаётся в тексте заголовка для чтения с экрана и без стилей */
  .plan-sheet .step-n { color: transparent; }
}
.plan-sheet .step-h { font-family: var(--display); font-weight: 600; font-size: clamp(15px, 2.2vw, 18px); letter-spacing: -.01em; }
.plan-sheet .step-n { background: var(--warm); }
.plan-sheet .btn-big { border: 0; border-radius: 999px; background: var(--warm); padding: 14px 28px; box-shadow: 0 8px 22px -10px rgba(232, 86, 42, .9); }

/* ---------- пример ---------- */
.demo .tab-labels { background: var(--night); }
.demo .tab-l { color: rgba(255, 255, 255, .75); }
#dh0:checked ~ .tab-labels [for=dh0],
#dh1:checked ~ .tab-labels [for=dh1],
#dh2:checked ~ .tab-labels [for=dh2] { background: var(--sun); color: var(--night); }

/* ---------- чем отличается ---------- */
.why-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: stretch; }
.why-item { position: relative; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.why-item h3 { margin: 0 0 6px; font: 700 18px/1.2 var(--display); }
.why-item p { margin: 0; color: var(--muted); }
.why-no h3 { text-decoration: line-through; text-decoration-color: var(--warm); text-decoration-thickness: 3px; color: var(--muted); }
.why-us { border: 0; background: var(--night); color: #fff; transform: rotate(-1deg); box-shadow: 0 18px 36px -20px rgba(14, 43, 47, .9); }
.why-us h3 { color: var(--sun); }
.why-us p { color: rgba(255, 255, 255, .88); }

/* ---------- открытки ---------- */
.postcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.postcard {
  position: relative; padding: 20px 18px 18px; min-height: 150px; background: #fffdf8; border-radius: 6px; color: var(--muted);
  box-shadow: 0 1px 0 var(--line), 0 14px 28px -20px rgba(23, 38, 42, .6);
  transform: rotate(var(--r, 0deg)); transition: transform .2s ease;
  /* марка в углу */
}
/* марка с зубцами и штемпель поверх */
.postcard::before {
  content: ""; position: absolute; right: 14px; top: 14px; width: 38px; height: 46px;
  background: radial-gradient(circle at 50% 40%, var(--sun) 0 9px, transparent 10px), var(--acc);
  outline: 3px dotted #fffdf8; outline-offset: -2px;
}
.postcard::after {
  content: ""; position: absolute; right: 30px; top: 30px; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid rgba(232, 86, 42, .55); box-shadow: inset 0 0 0 5px #fffdf800, inset 0 0 0 6px rgba(232, 86, 42, .35);
}
.postcard:nth-child(1) { --r: -1.5deg; }
.postcard:nth-child(2) { --r: 1.2deg; }
.postcard:nth-child(3) { --r: -.8deg; }
.postcard:nth-child(4) { --r: 1.6deg; }
@media (hover: hover) { .postcard:hover { transform: rotate(0deg) translateY(-3px); } }
.postcard b { display: block; margin: 0 52px 8px 0; font-family: var(--hand); font-size: 28px; line-height: 1; color: var(--acc); }
.soon { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--warm); color: #fff; font-size: 12px; font-weight: 600; vertical-align: 2px; }

/* ---------- каталог: дорожные указатели ---------- */
.signs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.sign {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px;
  padding: 14px 18px; border-radius: 10px; background: #1f5fa8; color: #fff; text-decoration: none;
  box-shadow: inset 0 0 0 3px #1f5fa8, inset 0 0 0 5px #fff; transition: transform .15s ease;
}
.sign:hover { transform: translateX(4px); }
.sign-name { font: 700 16px/1.25 var(--display); overflow-wrap: anywhere; }
.sign-n { grid-column: 1; font-size: 14px; opacity: .85; }
.sign-arw { grid-column: 2; grid-row: 1 / span 2; font-size: 28px; line-height: 1; }

/* ---------- отметка "был": кнопка-штамп ---------- */
.visit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 16px; }
.visit-f { margin: 0; }
.visit-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 10px; border-radius: 999px; cursor: pointer;
  border: 2px dashed var(--warm); background: transparent; color: var(--warm); font: 700 15px/1.2 var(--display);
}
.visit-btn:hover { background: rgba(232, 86, 42, .08); }
.visit-ico { width: 26px; height: 26px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; }
.visit-btn.on { border-style: solid; background: var(--warm); color: #fff; animation: stampIn .35s cubic-bezier(.2, .9, .3, 1.4); }
.visit-btn.on .visit-ico::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg); }
@keyframes stampIn { from { transform: scale(1.25) rotate(-6deg); opacity: .4; } }
.been {
  display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; background: rgba(232, 86, 42, .12);
  color: var(--warm); font-size: 12px; font-weight: 700;
}

/* ---------- предупреждение и выгрузка маршрута ---------- */
.plan-warn {
  margin: 0 0 14px; padding: 10px 14px 10px 40px; position: relative; border-radius: 10px;
  background: #fff4dc; color: #6b4a0b; font-size: 14px;
}
.plan-warn::before {
  content: ""; position: absolute; left: 13px; top: 50%; margin-top: -9px; width: 0; height: 0;
  border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 16px solid #d99a1e;
}
.export { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius); }
.export-h { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.export-links { display: flex; flex-wrap: wrap; gap: 8px; }
.export .hint { margin: 8px 0 0; }

/* ---------- фото посетителей ---------- */
.uphotos h2 { margin-top: 28px; }
.uphoto-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.uphoto { position: relative; display: block; border-radius: 8px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.uphoto img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.uphoto-wait img { opacity: .6; }
.uphoto-badge { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(14, 43, 47, .85); color: #fff; font-size: 11px; line-height: 1.3; }
.upload { margin-top: 12px; }
.upload-l { cursor: pointer; }
.upload-l:focus-within { outline: 2px solid var(--acc); outline-offset: 2px; }

/* ---------- сообщения ---------- */
.flash { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 15px; }
.flash-notice { background: var(--soft); color: var(--acc); }
.flash-alert { background: #fde9e3; color: #8a2a10; }

/* ---------- вход и регистрация ---------- */
.auth { max-width: 460px; margin: 0 auto; padding-top: 8px; }
.auth h2 { font-size: 18px; margin-top: 32px; }
.auth-form { display: grid; gap: 14px; margin: 16px 0; }
.auth-form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.auth-form input[type=email], .auth-form input[type=password], .auth-form input[type=text] {
  font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); width: 100%;
}
.auth-form input:focus { outline: 2px solid var(--acc); outline-offset: 1px; }
.auth-form .btn-big { justify-self: start; border-radius: 999px; }
.chk-line { display: flex !important; grid-template-columns: none; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.chk-line input { margin-top: 4px; flex: none; width: 18px; height: 18px; accent-color: var(--acc); }
.auth-alt { color: var(--muted); }
.auth-perks { margin: 0 0 8px; padding-left: 20px; color: var(--muted); }
.trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-danger { background: #b3321a; border-color: #b3321a; color: #fff; }
.linkish { background: none; border: 0; padding: 0; color: var(--acc); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* ---------- мои места и модерация ---------- */
.my-region h2 .n { font-family: system-ui, sans-serif; }
.my-photos, .mod-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.my-photo { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.my-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.my-photo figcaption { padding: 8px 10px; display: grid; gap: 2px; font-size: 14px; }
.my-photo form { margin: 0; }
.my-foot { margin-top: 32px; }
.mod-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.mod-item .gal-zoom { display: block; cursor: zoom-in; }
.mod-item img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.mod-item p { margin: 8px 0; font-size: 14px; overflow-wrap: anywhere; }
.mod-act { display: flex; gap: 8px; }
.mod-act form { margin: 0; }
.mod-recent { padding-left: 20px; }
.mod-recent form { display: inline; }
.prose { max-width: 720px; }
.prose h2 { font-size: 19px; margin-top: 28px; }

@media (prefers-reduced-motion: reduce) {
  .hero-mark::after, .polaroid, .visit-btn.on { animation: none; }
  .hero-route path { animation: none; stroke-dashoffset: 0; }
  .postcard, .sign, .btn-hot { transition: none; }
}
