/* ==========================================================================
   Твой Алтай — дизайн-система
   Палитра взята у Алтая: бумага карты, хвоя, бирюза Гейзерового озера,
   золото лиственницы, охра Марсианских гор.
   ========================================================================== */

:root {
  --paper: #F5F1E8;
  --surface: #FCFAF4;
  --ink: #16201C;
  --ink-soft: #2C3A33;
  --stone: #6B7168;
  --stone-light: #9AA096;
  --pine: #1E3A31;
  --pine-hover: #274A3E;
  --moss: #7A8B5A;
  --larch: #D8A13F;
  --turquoise: #2C7A78;
  --turquoise-soft: #E3EFEE;
  --mars: #B8553A;
  --mars-soft: #F7E9E4;
  --sky: #B9D2D6;
  --sky-soft: #E8F0F1;
  --mist: #DDD8CB;
  --line: #CCC6B7;
  --snow: #FFFFFF;

  --radius-s: 4px;
  --radius-m: 10px;
  --radius-l: 18px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(22,32,28,.05), 0 8px 24px rgba(22,32,28,.06);
  --shadow-2: 0 2px 6px rgba(22,32,28,.07), 0 18px 44px rgba(22,32,28,.10);

  --space-1: 8px; --space-2: 16px; --space-3: 24px; --space-4: 32px;
  --space-5: 48px; --space-6: 64px; --space-7: 96px; --space-8: 128px;

  --container: 1200px;
  --measure: 720px;

  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --header-h: 68px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Тонкая топографическая сетка на фоне страницы */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420' viewBox='0 0 420 420'%3E%3Cg fill='none' stroke='%2316201C' stroke-opacity='.055' stroke-width='1'%3E%3Cpath d='M-40 120c90-30 150 10 210-20s160-10 210 20'/%3E%3Cpath d='M-40 160c90-30 150 10 210-20s160-10 210 20'/%3E%3Cpath d='M-40 200c90-30 150 10 210-20s160-10 210 20'/%3E%3Cpath d='M-40 240c90-30 150 10 210-20s160-10 210 20'/%3E%3Cpath d='M-40 300c90-30 150 10 210-20s160-10 210 20'/%3E%3Cpath d='M-40 340c90-30 150 10 210-20s160-10 210 20'/%3E%3C/g%3E%3C/svg%3E");
}

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); line-height: 1.04; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--turquoise); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color .15s ease, text-decoration-thickness .15s ease; }
a:hover { color: var(--pine); text-decoration-thickness: 2px; }
strong { font-weight: 600; color: var(--ink); }
small { font-size: .82rem; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .45em; }
img, svg { max-width: 100%; }

.mono { font-family: var(--mono); font-size: .82rem; letter-spacing: .01em; }
.meta { font-family: var(--mono); font-size: .78rem; color: var(--stone); letter-spacing: .02em; text-transform: none; }
.eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--stone); display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--space-2); }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--line); display: inline-block; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--ink-soft); line-height: 1.6; max-width: 62ch; }
.muted { color: var(--stone); }

/* ---------- Каркас ---------- */

.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

main { position: relative; z-index: 1; min-height: 60vh; }
section { padding: clamp(48px, 7vw, 96px) 0; }
.section-tight { padding: clamp(32px, 4vw, 56px) 0; }

header.site {
  position: sticky; top: 0; z-index: 60;
  background: rgba(245,241,232,.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--mist);
}
.header-inner { display: flex; align-items: center; gap: var(--space-3); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.22rem; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { color: var(--pine); text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav-main { display: none; gap: 26px; margin-left: 12px; }
.nav-main a { font-size: .95rem; color: var(--ink-soft); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav-main a:hover { color: var(--pine); border-bottom-color: var(--pine); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
@media (min-width: 1000px) { .nav-main { display: flex; } }

.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--mist); background: var(--surface); color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: .15s ease; }
.icon-btn:hover { background: var(--snow); border-color: var(--line); color: var(--pine); }
.icon-btn svg { width: 19px; height: 19px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 12px; font-size: 1rem; font-weight: 500; font-family: var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease; position: relative; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pine); color: var(--snow); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), var(--shadow-1); }
.btn-primary:hover { background: var(--pine-hover); color: var(--snow); text-decoration: none; }
.btn-primary .arrow { transition: transform .18s ease; }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn-secondary { background: transparent; color: var(--pine); border-color: rgba(30,58,49,.34); }
.btn-secondary:hover { background: rgba(30,58,49,.06); color: var(--pine); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink-soft); height: 44px; padding: 0 16px; }
.btn-ghost:hover { background: rgba(22,32,28,.05); text-decoration: none; }
.btn-sm { height: 40px; padding: 0 16px; font-size: .9rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */

.hero { position: relative; min-height: min(84vh, 780px); display: flex; align-items: flex-end; overflow: hidden; background: #0F1B18; }
.hero-art { position: absolute; inset: 0; z-index: 0; }
.hero-art svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8,18,15,.34) 0%, rgba(8,18,15,.44) 40%, rgba(8,18,15,.86) 100%); }
.hero-inner { position: relative; z-index: 2; padding-bottom: clamp(48px, 8vh, 90px); padding-top: 120px; width: 100%; color: var(--snow); }
.hero h1 { color: var(--snow); max-width: 16ch; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hero .lead { color: rgba(255,255,255,.9); margin-top: var(--space-2); }
.hero .eyebrow { color: rgba(255,255,255,.72); }
.hero .eyebrow::before { background: rgba(255,255,255,.4); }
.hero .btn-row { margin-top: var(--space-4); }
.hero .btn-secondary { color: rgba(255,255,255,.94); border-color: rgba(255,255,255,.42); }
.hero .btn-secondary:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: var(--space-4); font-family: var(--mono); font-size: .78rem; color: rgba(255,255,255,.78); letter-spacing: .02em; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--larch); }
.hero-facts span:first-child::before { display: none; }
.scroll-hint { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 2; width: 1px; height: 38px; background: rgba(255,255,255,.28); overflow: hidden; }
.scroll-hint::after { content: ""; position: absolute; top: -38px; left: 0; width: 1px; height: 38px; background: rgba(255,255,255,.9); animation: hint 2.4s ease-in-out infinite; }
@keyframes hint { 0% { top: -38px; } 60%, 100% { top: 38px; } }

/* Появление при загрузке */
.rise { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.rise-2 { animation-delay: .12s; }
.rise-3 { animation-delay: .24s; }
.rise-4 { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Секции и заголовки ---------- */

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-4); }
.section-head h2 { margin-bottom: 0; }
.section-head .meta { align-self: center; }

.ornament { display: flex; align-items: center; gap: 14px; color: var(--line); margin: 0 0 var(--space-5); }
.ornament::before, .ornament::after { content: ""; height: 1px; background: currentColor; flex: 1; }
.ornament svg { width: 74px; height: 12px; flex: none; opacity: .9; }

/* ---------- Сетки ---------- */

.grid { display: grid; gap: var(--space-3); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Карточки ---------- */

.card { position: relative; background: var(--surface); border: 1px solid var(--mist); border-radius: var(--radius-m); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); border-color: var(--line); }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sky-soft); }
.card-media svg, .card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.card:hover .card-media svg, .card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; border-left: 2px solid transparent; }
.card:hover .card-body { border-left-color: var(--larch); }
.card-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card-title a:hover { color: var(--pine); text-decoration: none; }
.card-facts { font-family: var(--mono); font-size: .76rem; color: var(--stone); letter-spacing: .01em; }
.card-text { font-size: .95rem; color: var(--ink-soft); line-height: 1.5; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-cat { position: absolute; top: 12px; left: 12px; z-index: 2; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); background: rgba(252,250,244,.92); border: 1px solid rgba(22,32,28,.08); padding: 5px 9px; border-radius: var(--radius-pill); }

/* Горизонтальный скролл на мобильном */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: var(--space-2); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
@media (min-width: 700px) { .hscroll { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; } }
@media (min-width: 1000px) { .hscroll { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Бейджи ---------- */

.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--radius-pill); font-family: var(--mono); font-size: .7rem; letter-spacing: .02em; border: 1px solid transparent; white-space: nowrap; }
.badge-yes { background: var(--mars-soft); color: #8A3A25; border-color: rgba(184,85,58,.24); }
.badge-no { background: #EDF2E4; color: #4E6134; border-color: rgba(122,139,90,.28); }
.badge-check { background: #F4EEDD; color: #7A5B16; border-color: rgba(216,161,63,.34); }
.badge-neutral { background: var(--sky-soft); color: #275C5A; border-color: rgba(44,122,120,.18); }
.badge-ghost { background: transparent; color: var(--stone); border-color: var(--mist); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; background: rgba(30,58,49,.06); color: var(--ink-soft); font-size: .8rem; }

/* ---------- Статьи ---------- */

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { max-width: 62ch; }
.prose blockquote { margin: 2em 0; padding: 0 0 0 22px; border-left: 2px solid var(--larch); font-family: var(--serif); font-size: 1.16rem; color: var(--ink-soft); }
.prose figure { margin: 2em 0; }
.prose figcaption { font-family: var(--mono); font-size: .74rem; color: var(--stone); margin-top: 8px; }

.article-layout { display: grid; gap: var(--space-5); grid-template-columns: 1fr; }
@media (min-width: 1000px) { .article-layout { grid-template-columns: 250px minmax(0, 1fr); gap: var(--space-6); } }
.toc { position: sticky; top: calc(var(--header-h) + 24px); font-size: .9rem; align-self: start; }
.toc h4 { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); margin-bottom: 12px; }
.toc a { display: block; padding: 5px 0 5px 12px; color: var(--ink-soft); text-decoration: none; border-left: 1px solid var(--mist); }
.toc a:hover { color: var(--pine); border-left-color: var(--pine); }
@media (max-width: 999px) { .toc { position: static; border: 1px solid var(--mist); border-radius: var(--radius-m); padding: 16px 18px; background: var(--surface); } .toc a { border-left: none; padding-left: 0; } }

/* ---------- Выноски ---------- */

.callout { border: 1px solid var(--mist); border-radius: var(--radius-m); padding: 18px 20px; background: var(--surface); display: flex; gap: 14px; margin: 1.6em 0; }
.callout svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--stone); }
.callout-warn { background: var(--mars-soft); border-color: rgba(184,85,58,.25); }
.callout-warn svg { color: var(--mars); }
.callout-info { background: var(--sky-soft); border-color: rgba(44,122,120,.2); }
.callout-info svg { color: var(--turquoise); }
.callout-tip { background: #F2F3E6; border-color: rgba(122,139,90,.25); }
.callout-tip svg { color: #5D7040; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: 4px; }

/* ---------- Таблицы ---------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--mist); border-radius: var(--radius-m); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 520px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--mist); vertical-align: top; }
th { font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--stone); font-weight: 500; background: rgba(221,216,203,.28); }
tr:last-child td { border-bottom: none; }
td.num { font-family: var(--mono); font-size: .85rem; white-space: nowrap; }
.card table { min-width: 0; width: 100%; }
.card table td:first-child, .card table th:first-child { white-space: normal; }

/* ---------- Проверено / дата ---------- */

.verified { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: .74rem; color: var(--stone); }
.verified::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--moss); }
.source-note { font-size: .82rem; color: var(--stone); border-top: 1px solid var(--mist); padding-top: 14px; margin-top: var(--space-4); }

/* ---------- Хлебные крошки ---------- */

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 18px 0 0; font-size: .82rem; color: var(--stone); }
.crumbs a { color: var(--stone); text-decoration: none; }
.crumbs a:hover { color: var(--pine); text-decoration: underline; }
.crumbs span.sep { opacity: .5; }

/* ---------- Страница места ---------- */

.place-hero { position: relative; height: clamp(280px, 46vh, 520px); overflow: hidden; background: var(--sky-soft); }
.place-hero svg, .place-hero img { width: 100%; height: 100%; object-fit: cover; }
.place-head { padding-top: var(--space-4); }
.place-head h1 { max-width: 20ch; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-2); }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--mist); border: 1px solid var(--mist); border-radius: var(--radius-m); overflow: hidden; margin: var(--space-4) 0; }
@media (min-width: 700px) { .fact-grid { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--surface); padding: 16px 18px; }
.fact dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--stone); margin-bottom: 4px; }
.fact dd { margin: 0; font-size: .96rem; font-weight: 500; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: var(--space-4) 0; }
.gallery > * { border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 4/3; }
.gallery > *:first-child { grid-column: span 2; aspect-ratio: 16/9; }

/* ---------- Таймлайн маршрута ---------- */

.timeline { list-style: none; padding: 0; margin: var(--space-4) 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 25px; top: 12px; bottom: 12px; width: 1px; background: var(--mist); }
.timeline > li { position: relative; padding: 0 0 var(--space-4) 68px; }
.timeline > li::before { content: attr(data-day); position: absolute; left: 0; top: 0; width: 52px; height: 32px; border-radius: 8px; background: var(--pine); color: var(--snow); font-family: var(--mono); font-size: .72rem; display: flex; align-items: center; justify-content: center; letter-spacing: .04em; }
.timeline h4 { margin: 0 0 4px; }
.timeline .meta { margin-bottom: 8px; }
.timeline p { font-size: .95rem; }

/* ---------- Планировщик ---------- */

.planer { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 1000px) { .planer { grid-template-columns: minmax(0,1fr) 360px; align-items: start; } }
.planer-main { background: var(--surface); border: 1px solid var(--mist); border-radius: var(--radius-l); padding: clamp(20px, 3vw, 34px); }
.steps { display: flex; align-items: center; gap: 6px; margin-bottom: var(--space-4); flex-wrap: wrap; }
.step-dot { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .74rem; color: var(--stone-light); }
.step-dot b { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--mist); background: var(--paper); font-weight: 500; color: var(--stone); font-size: .76rem; }
.step-dot.is-active { color: var(--pine); }
.step-dot.is-active b { background: var(--pine); color: var(--snow); border-color: var(--pine); }
.step-dot.is-done b { background: var(--turquoise); border-color: var(--turquoise); color: #fff; }
.step-sep { width: 14px; height: 1px; background: var(--mist); }

.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin: var(--space-3) 0; }
@media (min-width: 700px) { .choice-grid { grid-template-columns: repeat(3, 1fr); } .choice-grid.four { grid-template-columns: repeat(4, 1fr); } }
.choice { position: relative; border: 1px solid var(--mist); border-radius: var(--radius-m); background: var(--paper); padding: 14px 16px; cursor: pointer; transition: .15s ease; display: block; }
.choice:hover { border-color: var(--line); background: var(--surface); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice.is-checked { border-color: var(--pine); background: #F1F5F0; box-shadow: inset 0 0 0 1px var(--pine); }
.choice-title { font-weight: 500; font-size: .96rem; display: block; }
.choice-sub { font-family: var(--mono); font-size: .72rem; color: var(--stone); }

.place-pick { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; margin: var(--space-2) 0; }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--mist); border-radius: var(--radius-m); background: var(--paper); cursor: pointer; transition: .15s ease; }
.pick:hover { background: var(--surface); border-color: var(--line); }
.pick.is-on { border-color: var(--pine); background: #F1F5F0; }
.pick .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.pick .pick-title { font-size: .95rem; }
.pick .pick-meta { font-family: var(--mono); font-size: .7rem; color: var(--stone); margin-left: auto; text-align: right; }

.summary-card { position: sticky; top: calc(var(--header-h) + 20px); background: var(--pine); color: var(--snow); border-radius: var(--radius-l); padding: 24px; box-shadow: var(--shadow-2); }
.summary-card h3 { color: var(--snow); font-size: 1.1rem; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.summary-row:last-of-type { border-bottom: none; }
.summary-row .mono { color: rgba(255,255,255,.78); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.22); }
.summary-total b { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
.warn-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.warn-list li { font-size: .82rem; background: rgba(184,85,58,.16); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 9px 11px; color: #FFE7DF; line-height: 1.4; }
.warn-list li.ok { background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); }

.sync-badge { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: .72rem; color: var(--stone); }
.sync-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--stone-light); }
.sync-badge[data-state="saved"]::before { background: var(--stone-light); }
.sync-badge[data-state="synced"]::before { background: var(--turquoise); }
.sync-badge[data-state="pending"]::before { background: var(--larch); }

/* ---------- Карта ---------- */

.map-shell { position: relative; border: 1px solid var(--mist); border-radius: var(--radius-l); overflow: hidden; background: #EFEBE0; }
.map-svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.map-node { cursor: pointer; }
.map-node circle.hit { fill: transparent; }
.map-node .pin { transition: r .15s ease, opacity .15s ease; }
.map-node:hover .pin { r: 8; }
.map-node.is-active .pin { r: 9; }
.map-node.is-dim { opacity: .22; }
.map-node text { font-family: var(--sans); font-size: 11px; fill: var(--ink-soft); pointer-events: none; opacity: 0; transition: opacity .15s ease; }
.map-node:hover text, .map-node.is-active text { opacity: 1; }
.map-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 14px 18px; border-top: 1px solid var(--mist); background: var(--surface); font-size: .78rem; color: var(--stone); }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }

.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 12px; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--mist); background: var(--surface); color: var(--ink-soft); font-size: .86rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: .15s ease; font-family: var(--sans); }
.chip:hover { border-color: var(--line); }
.chip.is-on { background: var(--turquoise); border-color: var(--turquoise); color: #fff; }
.chip.is-on:hover { background: #276b69; }

.atlas-layout { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
@media (min-width: 1000px) { .atlas-layout { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } }

.preview-card { position: absolute; left: 16px; right: 16px; bottom: 16px; background: var(--surface); border: 1px solid var(--mist); border-radius: var(--radius-m); box-shadow: var(--shadow-2); padding: 14px 16px; display: none; z-index: 5; }
.preview-card.is-open { display: block; animation: rise .25s ease both; }
.preview-card h4 { margin: 0 0 4px; font-size: 1.05rem; }

/* ---------- Сезоны ---------- */

.month-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .month-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .month-grid { grid-template-columns: repeat(6, 1fr); } }
.month {
  display: flex; flex-direction: column;
  border: 1px solid var(--mist); border-radius: var(--radius-m);
  padding: 14px 15px 15px; background: var(--surface);
  text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  min-height: 104px;
}
.month:hover { border-color: var(--line); transform: translateY(-2px); box-shadow: var(--shadow-1); text-decoration: none; }
.month b { display: block; font-family: var(--serif); font-size: 1.06rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.month-weather {
  display: block; font-family: var(--mono); font-size: .7rem; color: var(--stone);
  line-height: 1.35; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.meter { display: flex; gap: 3px; margin-top: auto; padding-top: 14px; }
.meter i { display: block; flex: 1 1 0; height: 4px; border-radius: 2px; background: var(--mist); transition: background .15s ease; }
.score-5 .meter i.on { background: #5C8A4A; }
.score-4 .meter i.on { background: #8DA85E; }
.score-3 .meter i.on { background: var(--larch); }
.score-2 .meter i.on { background: #C98A5E; }
.score-1 .meter i.on { background: var(--mars); }
.month.score-5:hover { border-color: rgba(92,138,74,.5); }
.month.score-4:hover { border-color: rgba(141,168,94,.5); }
.month.score-3:hover { border-color: rgba(216,161,63,.55); }
.month.score-2:hover { border-color: rgba(201,138,94,.55); }
.month.score-1:hover { border-color: rgba(184,85,58,.5); }
@media (max-width: 520px) { .month { min-height: 96px; padding: 12px 13px 13px; } .month b { font-size: 1rem; } }

/* ---------- Формы ---------- */

.field { margin-bottom: var(--space-3); }
.field label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 6px; }
.field .hint { font-size: .8rem; color: var(--stone); margin-top: 5px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="month"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-m);
  background: var(--snow); color: var(--ink); font-family: var(--sans); font-size: 16px; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(44,122,120,.16); }
textarea { min-height: 120px; resize: vertical; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--ink-soft); }
.checkbox input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--pine); flex: none; }
.form-note { font-size: .8rem; color: var(--stone); margin-top: 10px; }
.form-ok { border: 1px solid rgba(44,122,120,.3); background: var(--turquoise-soft); border-radius: var(--radius-m); padding: 16px; color: #1E5B59; }

/* ---------- Кнопки-иконки в карточке места ---------- */

.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin: var(--space-4) 0; }

/* ---------- Футер ---------- */

footer.site { border-top: 1px solid var(--mist); background: rgba(252,250,244,.7); padding: var(--space-6) 0 var(--space-5); margin-top: var(--space-6); position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid h5 { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--stone); margin: 0 0 12px; font-weight: 500; }
.footer-grid a { display: block; color: var(--ink-soft); text-decoration: none; font-size: .92rem; padding: 4px 0; }
.footer-grid a:hover { color: var(--pine); text-decoration: underline; }
.footer-bottom { margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--mist); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .82rem; color: var(--stone); }
.footer-words { font-family: var(--serif); font-size: 1rem; color: var(--ink-soft); max-width: 34ch; margin-top: 10px; }

/* ---------- Нижняя навигация ---------- */

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: rgba(252,250,244,.94); backdrop-filter: blur(12px); border-top: 1px solid var(--mist); display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 8px; font-size: .68rem; color: var(--stone); text-decoration: none; font-family: var(--sans); }
.bottom-nav a svg { width: 21px; height: 21px; }
.bottom-nav a.is-active { color: var(--pine); }
.bottom-nav a.is-active svg { color: var(--pine); }
@media (min-width: 1000px) { .bottom-nav { display: none; } }
@media (max-width: 999px) { body { padding-bottom: 64px; } }

/* ---------- Cookie ---------- */

.cookie { position: fixed; left: 16px; right: 16px; bottom: 76px; z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-2); padding: 14px 16px; display: none; gap: 12px; align-items: center; flex-wrap: wrap; }
.cookie.is-open { display: flex; animation: rise .3s ease both; }
.cookie p { margin: 0; font-size: .84rem; color: var(--ink-soft); flex: 1 1 260px; }
@media (min-width: 1000px) {
  .cookie { left: 0; right: 0; bottom: 0; max-width: none; border: 0; border-top: 1px solid var(--line);
    border-radius: 0; box-shadow: 0 -6px 24px rgba(22,32,28,.07); padding: 12px max(24px, calc((100% - 1200px) / 2));
    gap: 20px; }
  .cookie p { flex: 1 1 auto; max-width: 720px; }
}

/* ---------- Поиск ---------- */

.search-dialog { position: fixed; inset: 0; z-index: 90; background: rgba(12,20,17,.42); backdrop-filter: blur(3px); display: none; padding: 12vh 16px 16px; }
.search-dialog.is-open { display: block; }
.search-panel { max-width: 640px; margin: 0 auto; background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow-2); overflow: hidden; border: 1px solid var(--mist); }
.search-input { width: 100%; border: none; border-bottom: 1px solid var(--mist); border-radius: 0; padding: 18px 20px; font-size: 17px; background: var(--surface); }
.search-input:focus { box-shadow: none; }
.search-results { max-height: 58vh; overflow-y: auto; padding: 8px; }
.search-item { display: block; padding: 11px 14px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.search-item:hover, .search-item:focus { background: var(--sky-soft); text-decoration: none; }
.search-item .si-type { font-family: var(--mono); font-size: .68rem; color: var(--stone); text-transform: uppercase; letter-spacing: .08em; }
.search-item .si-title { font-weight: 500; font-size: .96rem; }
.search-empty { padding: 24px 18px; color: var(--stone); font-size: .9rem; }
.search-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 14px 16px; }

/* ---------- Утилиты ---------- */

.stack-2 > * + * { margin-top: var(--space-2); }
.stack-3 > * + * { margin-top: var(--space-3); }
.stack-4 > * + * { margin-top: var(--space-4); }
.split { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[type].sr-only, input.sr-only, textarea.sr-only, select.sr-only { width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; min-width: 0; left: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--pine); color: #fff; padding: 12px 18px; z-index: 200; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

/* Панель синхронизации / аккаунт */
.account-pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--mist); background: var(--surface); font-size: .88rem; color: var(--ink-soft); text-decoration: none; }
.account-pill:hover { border-color: var(--line); text-decoration: none; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--pine); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-family: var(--mono); }

/* Админка/кабинет */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--mist); overflow-x: auto; }
.tabs button { border: none; background: none; padding: 12px 16px; font-size: .95rem; color: var(--stone); cursor: pointer; border-bottom: 2px solid transparent; font-family: var(--sans); white-space: nowrap; }
.tabs button.is-active { color: var(--pine); border-bottom-color: var(--pine); font-weight: 500; }
.tab-panel { display: none; padding-top: var(--space-3); }
.tab-panel.is-active { display: block; }

.empty { border: 1px dashed var(--line); border-radius: var(--radius-m); padding: 32px 22px; text-align: center; color: var(--stone); }
.empty h4 { color: var(--ink); margin-bottom: 6px; }

/* Печать */
@media print {
  header.site, footer.site, .bottom-nav, .cookie, .no-print, .search-dialog { display: none !important; }
  body { background: #fff; }
  body::before { display: none; }
  .hero { min-height: auto; background: #fff; }
  .hero::after { display: none; }
  .hero-inner { color: #000; padding: 0; }
  .hero h1 { color: #000; text-shadow: none; }
  .card, .planer-main, .summary-card { break-inside: avoid; box-shadow: none; }
  a { color: #000; text-decoration: none; }
}


/* ---------- Адаптив шапки и hero ---------- */
@media (max-width: 1080px) {
  .nav-main { gap: 18px; }
  .nav-main a { font-size: .9rem; }
}
@media (max-width: 900px) {
  .nav-main { display: none; }
  .header-actions .btn-primary { display: none; }
}
@media (max-width: 380px) {
  .btn { white-space: normal; text-align: center; height: auto; min-height: 48px; padding: 8px 14px; line-height: 1.15; font-size: .9rem; }
  .btn-row .btn { flex: 1 1 100%; }
  .author-facts { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .account-pill { display: none; }
  .header-inner { gap: 12px; }
  .brand { font-size: 1.08rem; }
  .brand svg { width: 22px; height: 22px; }
  h1 { font-size: clamp(1.95rem, 7.6vw, 2.6rem); }
  .hero h1 { max-width: 100%; }
  .hero-inner { padding-top: 88px; }
  .hero-facts { font-size: .72rem; gap: 6px 14px; }
  .hero-facts span:nth-child(3) { display: none; }
  .btn { height: 50px; padding: 0 20px; font-size: .95rem; }
  .cookie { bottom: 70px; padding: 12px 14px; }
  .cookie p { font-size: .8rem; line-height: 1.35; }
  .cookie .btn-row { width: 100%; display: flex; flex-wrap: nowrap; gap: 8px; }
  .cookie .btn-row .btn { flex: 1 1 0; height: 42px; padding: 0 10px; font-size: .82rem; white-space: nowrap; }
}

/* Защита от горизонтального переполнения в гридах */
.grid > *, .atlas-layout > *, .planer > *, .split > *, .article-layout > *, .planer-main > * { min-width: 0; }
.filter-bar { max-width: 100%; }
.map-shell { max-width: 100%; }


/* Мелкие правки форм админки и футера */
.admin-row .field { flex: 1 1 260px; margin: 0; }
.field input, .field select, .field textarea { display: block; max-width: 100%; }


/* ---------- Автор материала ---------- */
.author-byline {
  display: flex; align-items: center; gap: 14px;
  margin: var(--space-4) 0 0; padding: 14px 16px;
  border: 1px solid var(--mist); border-radius: var(--radius-m);
  background: var(--surface); max-width: 560px;
}
.ab-ava { flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line); display: block; }
.ab-ava img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; display: block; }
.ab-label { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--stone); }
.ab-name { font-family: var(--serif); font-size: 1.04rem; font-weight: 600; line-height: 1.25; }
.ab-name a { color: var(--ink); text-decoration: none; }
.ab-name a:hover { color: var(--pine); text-decoration: underline; }
.ab-meta { font-family: var(--mono); font-size: .72rem; color: var(--stone); margin-top: 2px; }

/* ---------- Страница автора ---------- */
.author-hero { display: grid; gap: var(--space-4); grid-template-columns: 1fr; align-items: end; margin-top: var(--space-3); }
@media (min-width: 860px) { .author-hero { grid-template-columns: 380px minmax(0, 1fr); gap: var(--space-5); align-items: start; } }
.author-photo { position: relative; border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--mist); background: var(--mist); }
.author-photo img { display: block; width: 100%; height: auto; }
.author-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(22,32,28,0) 55%, rgba(22,32,28,.35) 100%);
  pointer-events: none;
}
.author-badge {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(252,250,244,.94); border: 1px solid rgba(22,32,28,.08);
  border-radius: var(--radius-pill); padding: 7px 13px;
  font-family: var(--mono); font-size: .72rem; color: var(--ink);
}
.author-badge i { width: 7px; height: 7px; border-radius: 50%; background: #5C8A4A; display: inline-block; }
.author-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--mist); border: 1px solid var(--mist); border-radius: var(--radius-m); overflow: hidden; margin: var(--space-3) 0 var(--space-4); }
@media (min-width: 700px) { .author-facts { grid-template-columns: repeat(4, 1fr); } }
.author-facts > div { background: var(--surface); padding: 14px 16px; }
.author-facts dt { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--stone); margin-bottom: 3px; }
.author-facts dd { margin: 0; font-size: .95rem; font-weight: 500; }
.author-quote { font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.45; color: var(--ink); border-left: 2px solid var(--larch); padding-left: 20px; margin: var(--space-4) 0; }
.author-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.author-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .96rem; }
.author-sign { font-family: var(--serif); font-size: 1.18rem; color: var(--pine); margin: var(--space-4) 0 0; }
.author-list .num { font-family: var(--mono); font-size: .74rem; color: var(--turquoise); flex: none; width: 22px; padding-top: 3px; }
