@font-face {
  font-family: Comfortaa;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/comfortaa-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: Comfortaa;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/comfortaa-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Comfortaa;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/comfortaa-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Comfortaa;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/comfortaa-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #090a0d;
  --card: #14161c;
  --card-2: #1b1e26;
  --gold: #e4b15c;
  --gold-2: #f0cb86;
  --ink: #f7f4ee;
  --muted: #a09b93;
  --line: rgba(255, 255, 255, 0.08);
  --danger: #ff8d7a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
  font-family: Comfortaa, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #050506; }
html, body, button, input, textarea { font-family: Comfortaa, sans-serif; }
body { overflow-x: hidden; min-height: 100%; font-weight: 450; }
body.map-open { overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, .brand b { font-weight: 600; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.app {
  width: min(100%, 460px);
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom) + var(--kb, 0px));
}

.top, .top-actions, .brand, .pill, .perks, .block-head, .row, .loc-actions, .phone, .trust, .master-top {
  display: flex;
  align-items: center;
}
.top { justify-content: space-between; gap: 12px; }
.brand { gap: 10px; min-width: 0; }
.brand b, .brand small { display: block; }
.brand b { font-size: 15px; letter-spacing: -0.03em; }
.brand small { color: var(--muted); font-size: 12px; }
.mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  color: #1a140b;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  border-radius: 12px;
}
.mark svg { width: 22px; height: 22px; }
.top-actions { gap: 8px; }
.pill, .icon-button, .back {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.pill, .icon-button {
  height: 38px;
  border-radius: 999px;
  color: var(--ink);
}
.pill { gap: 6px; padding: 0 12px; }
.icon-button, .back { width: 38px; }
.back { width: auto; height: 36px; padding: 0 12px; border-radius: 999px; }
.pop { position: relative; }
.popover {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 5;
  min-width: 168px;
  padding: 6px;
  background: #1c1f27;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.popover.right { right: 0; }
.popover button, .menu-link {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  text-decoration: none;
}
.popover button:active, .menu-link:active { background: rgba(255, 255, 255, 0.05); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 158px;
  align-items: end;
  min-height: 228px;
  margin-top: 8px;
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 2; padding: 16px 8px 14px 0; }
.hero h1 { margin: 0; font-size: 32px; font-weight: 700; line-height: 1.08; }
.hero p { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.hero-frame {
  position: relative;
  height: 236px;
  overflow: hidden;
  pointer-events: none;
}
.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
}
.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #050506 0%, rgba(5, 5, 6, 0) 36%),
    linear-gradient(180deg, rgba(5, 5, 6, 0) 58%, #050506 100%),
    linear-gradient(270deg, #050506 0%, rgba(5, 5, 6, 0) 18%);
}
.perks { gap: 14px; margin: 4px 0 18px; padding: 0; list-style: none; color: var(--gold-2); font-size: 12px; }
.perks li { display: flex; align-items: center; gap: 6px; }
.perks i { width: 14px; height: 14px; background: currentColor; }
.bolt { clip-path: polygon(55% 0, 20% 55%, 48% 55%, 38% 100%, 82% 40%, 52% 40%); }
.shield { clip-path: polygon(50% 0, 100% 18%, 86% 78%, 50% 100%, 14% 78%, 0 18%); }
.star { clip-path: polygon(50% 0, 62% 35%, 100% 38%, 72% 62%, 80% 100%, 50% 80%, 20% 100%, 28% 62%, 0 38%, 38% 35%); }

.block { margin-top: 8px; }
.block h2, .order h1, .order h2, .join h2 { margin: 0; font-weight: 600; letter-spacing: -0.03em; }
.block h2, .join h2 { font-size: 20px; }
.cats {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  width: 96px;
  min-height: 104px;
  flex: none;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.cat span:last-child { font-size: 12px; line-height: 1.2; text-align: center; }
.cat-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: rgba(228, 177, 92, 0.08);
  border-radius: 14px;
}
.cat-icon svg { width: 22px; height: 22px; }
.cat:active { transform: scale(0.97); }
.cat[aria-pressed="true"] { border-color: rgba(228, 177, 92, 0.7); background: #231c12; }

.order, .join {
  margin-top: 18px;
  padding: 18px 16px;
  background: linear-gradient(180deg, #191c23, #12141a);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.order h2, .order h1 { font-size: 26px; line-height: 1.12; }
.lead, .join p, .city-note, .request { color: var(--muted); }
.lead { margin: 8px 0 14px; font-size: 14px; line-height: 1.4; }
.rows { display: grid; gap: 10px; }
.row, .field, .text, .line, .submit, .ghost {
  width: 100%;
  border-radius: 18px;
}
.row.is-set { border-color: rgba(228, 177, 92, 0.55); }
.row.is-invalid { border-color: var(--danger); }
.row {
  gap: 12px;
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}
.row-icon, .cat-icon { flex: none; }
.row-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--gold);
}
.row-icon svg, .chev { width: 20px; height: 20px; }
.row-copy { min-width: 0; flex: 1; }
.row-copy b, .row-copy small, .field > span { display: block; }
.row-copy b { font-size: 15px; }
.row-copy small, .field > span, .note, .hint, .progress { color: var(--muted); font-size: 12px; line-height: 1.35; }
.chev { color: var(--muted); }
.field { display: grid; gap: 8px; }
.task { margin-top: 2px; }
.text, .mini {
  min-height: 52px;
  border: 1px solid var(--line);
  background: rgba(5, 6, 8, 0.35);
  padding: 0 14px;
  outline: none;
}
.area { min-height: 74px; padding: 12px 14px; resize: none; }
.text:focus, .mini:focus { border-color: rgba(228, 177, 92, 0.65); }
.phone {
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(5, 6, 8, 0.35);
}
.phone b { color: var(--gold-2); }
.phone input { flex: 1; min-width: 0; height: 50px; border: 0; background: transparent; outline: none; }
.field.is-invalid .phone, .field.is-invalid .text { border-color: var(--danger); }
.hint, .note, .progress { min-height: 0; margin: 0; }
.hint.is-on, .note.is-on { margin-top: 6px; }
.hint.is-on { color: var(--danger); }
.panel { display: grid; gap: 8px; }
.loc-actions { gap: 8px; }
.line, .ghost {
  min-height: 44px;
  border: 1px solid var(--line);
  background: transparent;
}
.line-gold { color: var(--gold-2); border-color: rgba(228, 177, 92, 0.4); }
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  margin-top: 8px;
  border: 0;
  color: #1a140b;
  background: linear-gradient(180deg, #f0cb86, #e0ac4e);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(224, 172, 78, 0.18);
}
.submit:active { transform: scale(0.985); }
.submit:disabled { opacity: 0.65; }
.submit.is-loading .label, .submit.is-loading svg { opacity: 0; }
.spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(26, 20, 11, 0.25);
  border-top-color: #1a140b;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.submit.is-loading .spinner { display: block; position: absolute; }
.submit { position: relative; }
.trust { justify-content: center; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.suggest { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #1c1f27; }
.suggest button { display: block; width: 100%; padding: 12px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.loc-card { display: flex; gap: 10px; align-items: center; }
.loc-card img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.loc-card button { border: 0; background: transparent; color: var(--gold-2); padding: 0; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.details label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.safari { color: var(--gold-2); font-size: 13px; }
.city-note, .join { text-align: center; }
.city-note { margin: 16px 0 0; font-size: 13px; }
.join p { margin: 8px 0 14px; font-size: 14px; line-height: 1.4; }

.success { text-align: center; }
.success h2 { margin: 8px 0; }
.check { width: 58px; height: 58px; margin: 0 auto; color: var(--gold); }
.check svg { width: 58px; height: 58px; }
.check circle, .check path { fill: none; stroke: currentColor; stroke-width: 2.4; }
.request { margin-top: 0; }
.ghost { margin-top: 8px; }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}
.chip span { min-width: 0; line-height: 1.25; font-size: 13px; }
.chip i { width: 16px; height: 16px; flex: none; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; position: relative; }
.chip[aria-pressed="true"] { border-color: rgba(228, 177, 92, 0.7); background: rgba(228, 177, 92, 0.1); }
.chip[aria-pressed="true"] i { border-color: transparent; background: var(--gold); }
.chip[aria-pressed="true"] i::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 7px;
  border-right: 1.6px solid #1a140b;
  border-bottom: 1.6px solid #1a140b;
  transform: rotate(40deg);
}
.extra { display: grid; gap: 10px; margin-top: 10px; }
.master-top { padding-top: max(8px, env(safe-area-inset-top)); }
.progress { margin: 8px 0; }

.picker {
  position: fixed;
  z-index: 25;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.62);
}
.picker-card {
  width: min(100%, 460px);
  margin: 0 auto;
  max-height: min(78vh, 680px);
  overflow: auto;
  padding: 16px;
  background: #16181f;
  border: 1px solid var(--line);
  border-radius: 28px;
}
.picker-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.picker-top h2 { font-size: 22px; }
.picker-top .line { width: auto; padding: 0 14px; }
.picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #101217;
  text-align: left;
}
.pick span:last-child { font-size: 14px; font-weight: 700; line-height: 1.2; }
.pick[aria-pressed="true"] { border-color: rgba(228, 177, 92, 0.8); background: #2a2216; }
.map-sheet {
  position: fixed;
  z-index: 40;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #0b0d12;
  overflow: hidden;
}
#map-canvas {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 240px;
  width: 100%;
  background: #0d1016;
  touch-action: none;
}
#map-canvas img { max-width: none; }
.leaflet-container {
  width: 100%;
  height: 100%;
  background: #0d1016;
  touch-action: none;
  font-family: Comfortaa, sans-serif;
}
.leaflet-control-zoom a { color: #1a140b; }
.leaflet-div-icon.pin-wrap { background: transparent; border: 0; }
.pin { display: block; width: 44px; height: 56px; pointer-events: auto; }
.pin svg { display: block; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.map-top, .map-bottom { padding: 12px; }
.map-bottom { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.map-top { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.map-top p { margin: 0; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 840px) {
  body { background: radial-gradient(circle at 50% 0, #17140f, #050506 42%); }
  .app { padding-top: 28px; }
}
