:root {
  --bg: #1c1a22;
  --surface: rgba(36, 33, 43, .82);
  --surface-2: #2d2a36;
  --line: #423e4d;
  --text: #f4f1f8;
  --muted: #b7b2c4;
  --accent: #e06e55;
  --accent-soft: #f3b09c;
  --ok: #63c291;
  --radius: 14px;
  --max: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("/static/img/park.png?v=4") center 32% / cover no-repeat;
  filter: brightness(1.7) saturate(1.08) contrast(1.05);
  opacity: .55;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(34, 30, 40, .42) 0%, rgba(28, 26, 34, .58) 55%, rgba(22, 20, 28, .7) 100%);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-soft); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: 1.6rem; margin-top: 2rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.accent { color: var(--accent); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  color: var(--accent);
  margin-bottom: .4rem;
}

.lead { font-size: 1.1rem; color: #c8c4d4; max-width: 62ch; }

/* --- Шапка и подвал --- */
.site-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  background: rgba(28, 26, 34, .55);
  backdrop-filter: blur(10px);
}
.logo { font-size: 1.35rem; font-weight: 700; letter-spacing: -.03em; }
.logo-dot { color: var(--accent); }
.site-nav { display: flex; gap: 1.25rem; flex: 1; flex-wrap: wrap; }
.site-nav a { color: var(--muted); font-size: .95rem; }
.site-nav a:hover { color: var(--text); }
.site-auth { display: flex; align-items: center; gap: .85rem; font-size: .95rem; }
.social-links { display: flex; align-items: center; gap: .35rem; }
.social-links a, .social-text {
  display: inline-flex; align-items: center; gap: .4rem; color: var(--muted);
}
.social-links svg, .social-text svg { width: 18px; height: 18px; display: block; }
.social-links a:hover, .social-text:hover { color: var(--text); }
.human-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
}
.human-card {
  width: min(420px, 100%); text-align: center;
  background: rgba(28, 26, 34, .88); border: 1px solid var(--line);
  border-radius: 18px; padding: 2rem 1.6rem;
}
.human-mark { width: 64px; height: 64px; margin-bottom: 1rem; }
.human-check {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  margin: 1.2rem 0; color: var(--text); font-weight: 600;
}
.human-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.site-auth form { margin: 0; }

.site-main { max-width: var(--max); margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--muted);
}
.site-footer nav { display: flex; flex-direction: column; gap: .4rem; }

/* --- Кнопки --- */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: .7rem 1.4rem;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease;
}
.button:hover { background: #cf5941; color: #fff; transform: translateY(-1px); }
.button-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button-ghost:hover { background: var(--surface-2); color: var(--text); }
.button-soft {
  background: rgba(224, 110, 85, .16);
  color: var(--accent-soft);
  border-color: rgba(224, 110, 85, .45);
}
.button-soft:hover { background: rgba(224, 110, 85, .28); color: #fff; }
.button-small { padding: .45rem 1rem; font-size: .85rem; }
.button-block { display: block; width: 100%; text-align: center; }
.link-button {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font: inherit; padding: 0;
}
.link-button:hover { color: var(--text); }
.link-arrow { color: var(--accent); white-space: nowrap; }
.chip {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .85rem;
}

/* --- Главная --- */
.hero { padding: 3rem 0 2rem; }
.hero h1 { max-width: 16ch; }
.hero-actions { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; align-items: flex-start; }

.section {
  margin-top: 2.5rem;
  padding: 1.6rem 1.5rem 1.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 10px 30px rgba(10, 8, 16, .18);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.section:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 110, 85, .38);
  box-shadow: 0 16px 36px rgba(10, 8, 16, .28);
}
.section-accent {
  background:
    linear-gradient(160deg, rgba(224,101,74,.18), rgba(36, 33, 43, .55) 70%),
    var(--surface);
  border-color: rgba(224, 110, 85, .4);
}
.section-rise { animation: rise .7s ease both; }
.section-rise:nth-of-type(2) { animation-delay: .06s; }
.section-rise:nth-of-type(3) { animation-delay: .14s; }
.section-rise:nth-of-type(4) { animation-delay: .22s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0 0 .35rem; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  animation: rise .55s ease both;
}
.page-head-accent {
  background: linear-gradient(160deg, rgba(224,101,74,.14), transparent 70%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.cta {
  margin-top: 4rem;
  padding: 2.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.cta p { max-width: 55ch; margin-inline: auto; color: var(--muted); }

/* --- Сетки и карточки --- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.two-col { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 110, 85, .32);
  box-shadow: 0 12px 24px rgba(10, 8, 16, .22);
}
.card-intent { border-color: rgba(224,101,74,.5); }
.card-media {
  position: relative;
  display: block;
  height: 200px;
  overflow: hidden;
  background: var(--surface-2);
}
.card-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.card-media-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ribbon {
  position: absolute;
  top: .75rem; left: .75rem;
  background: var(--accent);
  color: #fff;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .6rem;
  border-radius: 999px;
}
.card-body { padding: 1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .4rem; }
.card-body h3 { margin: 0; }
.card-meta { color: var(--muted); font-size: .82rem; margin: 0; }
.card-footer { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }

.tag {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .78rem;
  color: var(--muted);
}
.tag-warn { color: var(--accent-soft); border-color: rgba(224,101,74,.4); }

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}
.empty a { color: var(--accent); }

/* --- Оценки --- */
.score-row { display: flex; align-items: center; gap: .6rem; margin-top: .3rem; }
.score-badge {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .15rem .55rem;
  font-weight: 700;
  font-size: .9rem;
}
.score-strong { color: var(--ok); border-color: rgba(88,183,132,.4); }

.scores { margin: 1.5rem 0; display: grid; gap: .6rem; }
.score-line { display: grid; grid-template-columns: 1fr 2fr auto; gap: .8rem; align-items: center; font-size: .9rem; }
.score-bar { background: var(--surface-2); border-radius: 999px; height: 8px; overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--accent); }
.score-value { color: var(--muted); font-variant-numeric: tabular-nums; }

/* --- Детальные страницы --- */
.breadcrumbs { color: var(--muted); font-size: .85rem; margin-bottom: 1rem; }
.detail { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
.detail-main { min-width: 0; }
.detail-side { display: flex; flex-direction: column; gap: 1rem; }
.detail-photo {
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius);
  margin: 1.25rem 0;
  display: block;
}
.detail-text { white-space: pre-line; color: #c8c4d4; }

.map { width: 100%; height: 280px; border: 1px solid var(--line); border-radius: var(--radius); }

.side-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.side-block h3 { margin-bottom: .6rem; }
.side-event {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
}
.side-event:last-child { border-bottom: none; }
.side-event .tag { align-self: flex-start; margin-top: .25rem; }

.booking { padding: 1.25rem; }
.facts { margin: 0 0 1.25rem; display: grid; gap: .55rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.facts dt { color: var(--muted); margin: 0; }
.facts dd { margin: 0; text-align: right; }
.status-ok { color: var(--ok); font-weight: 600; }

.reviews { margin-top: 1.5rem; display: grid; gap: 1rem; }
.review {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
}
.review header { display: flex; align-items: center; gap: .65rem; margin-bottom: .4rem; flex-wrap: wrap; }
.review p { margin: 0; color: #c8c4d4; }

.avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }

/* --- Формы --- */
.narrow { max-width: 680px; margin: 0 auto; }
.center-form { padding-top: 2rem; }

.form { padding: 1.5rem; display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-size: .9rem; color: var(--muted); }
.form-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

input, select, textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: .65rem .8rem;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(224,101,74,.5); outline-offset: 1px; }
textarea { resize: vertical; }
input[type="file"] { padding: .5rem; color: var(--muted); }

.checkbox { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .9rem; }
.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  flex: 0 0 18px;
}

.filters {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters input[type="search"] { flex: 2 1 220px; width: auto; }
.filters select { flex: 1 1 160px; width: auto; }

.interests { border: 1px solid var(--line); border-radius: 10px; padding: .9rem; display: grid; gap: .4rem; }
.interests legend { color: var(--muted); font-size: .85rem; padding: 0 .4rem; }

.rating-row { display: grid; gap: .4rem; }
.rating-options { display: flex; gap: .4rem; }
.rating-option input { position: absolute; opacity: 0; width: 0; }
.rating-option span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  color: var(--text);
}
.rating-option input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.rating-option input:focus-visible + span { outline: 2px solid var(--accent-soft); }

/* Текст, который просит заполнять карточки по-человечески */
.manifesto {
  border-left: 3px solid var(--accent);
  background: linear-gradient(100deg, rgba(224,101,74,.1), transparent 75%);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0 2rem;
  color: #c8c4d4;
}
.manifesto p { margin-bottom: .7rem; }
.manifesto p:last-child { margin-bottom: 0; }
.manifesto-lead { color: var(--text); font-size: 1.12rem; font-weight: 600; line-height: 1.35; }
.manifesto-sign { color: var(--accent-soft); font-style: italic; }

.hint { color: var(--muted); font-size: .82rem; line-height: 1.45; }
code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .05rem .35rem;
  font-size: .85em;
}

.resolved {
  background: var(--surface-2);
  border: 1px solid rgba(88,183,132,.35);
  border-radius: 10px;
  padding: .9rem 1.1rem;
}
.resolved h3 { margin: 0 0 .2rem; }
.resolved .eyebrow { color: var(--ok); margin-bottom: .3rem; }

.map-preview { height: 220px; }

.htmx-indicator { opacity: 0; transition: opacity .2s ease; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

.alert { border-radius: 10px; padding: .9rem 1.1rem; margin-bottom: 1.25rem; }
.alert ul { margin: 0; padding-left: 1.1rem; }
.alert-error { background: rgba(224,101,74,.12); border: 1px solid rgba(224,101,74,.45); }
.alert-ok { background: rgba(88,183,132,.12); border: 1px solid rgba(88,183,132,.4); }

.match-picker { position: relative; flex: 1 1 100%; }
.match-picker > summary { list-style: none; }
.match-picker > summary::-webkit-details-marker { display: none; }
.match-hint {
  margin-top: .85rem;
  max-width: 36rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid rgba(224, 110, 85, .4);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(10, 8, 16, .28);
  animation: rise .35s ease;
}
.match-hint p:last-of-type { margin-bottom: .85rem; }

.choice-set {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem 1rem 1rem;
  margin: 0;
}
.choice-set legend {
  color: var(--text);
  font-size: .88rem;
  padding: 0 .4rem;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .55rem;
}
.choice-grid-wide { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.choice { display: block; margin: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  padding: .45rem .7rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.choice span::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1.5px solid #8d8899;
  border-radius: 4px;
  background: transparent;
  box-shadow: inset 0 0 0 0 var(--accent);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.choice input[type="radio"] + span::before { border-radius: 50%; }
.choice input:checked + span {
  border-color: var(--accent);
  background: rgba(224, 110, 85, .16);
}
.choice input:checked + span::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 3px #fff;
}
.choice input:focus-visible + span { outline: 2px solid var(--accent-soft); }
.choice:hover span { transform: translateY(-1px); border-color: rgba(224, 110, 85, .45); }
.pref-row { margin-top: .85rem; }
.pref-row:first-of-type { margin-top: .2rem; }
.pref-label { margin: 0 0 .4rem; color: var(--muted); font-size: .82rem; }
.questionnaire { display: grid; gap: 1rem; }

.photo-pick {
  display: grid;
  gap: .45rem;
  justify-items: start;
}
.photo-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 46px;
  padding: .55rem 1.1rem;
  border: 1px dashed rgba(224, 110, 85, .55);
  border-radius: 999px;
  background: rgba(224, 110, 85, .1);
  color: var(--accent-soft);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.photo-pick-btn svg { width: 18px; height: 18px; }
.photo-pick:hover .photo-pick-btn,
.photo-pick:focus-within .photo-pick-btn {
  background: rgba(224, 110, 85, .2);
  transform: translateY(-1px);
}
.photo-pick-name { color: var(--muted); font-size: .82rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin: 1rem 0; }
.gallery button {
  padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px;
}
.gallery img { width: 100%; height: 130px; object-fit: cover; border-radius: 12px; display: block; }
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(960px, 92vw);
}
.lightbox::backdrop { background: rgba(8, 7, 12, .82); }
.lightbox img { width: 100%; max-height: 86vh; object-fit: contain; border-radius: 12px; background: #111; }
.lightbox-close {
  position: absolute; top: .6rem; right: .6rem;
  border: 0; border-radius: 999px; padding: .35rem .7rem; cursor: pointer;
}

.history { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.history-item {
  display: grid;
  gap: .15rem;
  padding: .9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

@media (max-width: 820px) {
  .detail { grid-template-columns: 1fr; }
  .site-header { gap: 1rem; }
  body { background-attachment: scroll; }
}
