/* Спокойная тёмная тема: тёплый графит, тонкие линии, без градиентов и свечения. */
:root {
  --bg: #0e0d0c;
  --surface: #161513;
  --surface-2: #1c1a18;
  --surface-3: #25221f;
  --line: rgba(239, 231, 220, .08);
  --line-strong: rgba(239, 231, 220, .16);
  --text: #efe9e1;
  --muted: #9a9187;
  --faint: #675f57;
  --cream: #efe9e1;
  --ink: #141210;
  --accent: #d9ad7c;          /* бар — виски */
  --accent-ink: #1a140d;
  --accent-soft: rgba(217, 173, 124, .12);
  --ok: #9cc493;
  --warn: #e08f75;
  --warn-soft: rgba(224, 143, 117, .12);
  --tg: #2aabee;
  --radius: 20px;
  --sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --serif: var(--sans); /* заголовки тем же шрифтом, только жирнее */
  color-scheme: dark;
}
body[data-zone="hookah"] {                 /* кальянная — дымчатая лаванда */
  --accent: #b9b0d8;
  --accent-ink: #15121f;
  --accent-soft: rgba(185, 176, 216, .13);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh;
  color: var(--text); background: var(--bg);
  font: 400 17px/1.5 var(--sans);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  padding-top: env(safe-area-inset-top);
  background: rgba(14, 13, 12, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.logo {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; background: var(--cream); color: var(--ink);
}
.logo svg { width: 20px; height: 20px; }
.title { flex: 1; min-width: 0; }
.title h1 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
.title p { margin: 0; color: var(--muted); font-size: 13px; }

.progress { display: flex; align-items: center; gap: 12px; }
.bar { flex: 1; height: 3px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s cubic-bezier(.2, .8, .2, 1); }
.progress-text { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 40px; text-align: right; font-weight: 500; }

/* ---------- Кнопки ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 14px;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .12s, opacity .2s, background .2s, color .2s, border-color .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn-primary { background: var(--cream); color: var(--ink); }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn-block { width: 100%; min-height: 58px; font-size: 16px; border-radius: 16px; }
.btn-tg { background: var(--tg); color: #fff; }
.btn-danger { background: transparent; color: var(--warn); border: 1px solid rgba(224, 143, 117, .3); }
.btn-danger:hover { background: var(--warn-soft); }
.btn-danger-solid { background: var(--warn); color: #1d0c07; }
.admin-link { color: var(--muted); border-color: var(--line); }
.admin-link:hover { color: var(--text); }

/* ---------- Заголовки ---------- */
main { padding: 4px 0 56px; }
.kicker { display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 26px 0 26px; }
.hero h2 {
  margin: 10px 0 16px; font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 6.4vw, 48px); line-height: 1.05; letter-spacing: -.01em;
}
.hero h2 em { font-style: italic; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--line-strong); color: var(--muted);
}
.chip svg { width: 14px; height: 14px; }
.chip.soon { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.chip.late { color: var(--warn); border-color: rgba(224, 143, 117, .45); }

/* ---------- Главная: выбор зоны ---------- */
body { --zc: #1a1714; }
body[data-zone="bar"] { --zc: #2a1b12; }
body[data-zone="hookah"] { --zc: #211b2c; }
.deco {
  /* узор «чешуя» в стиле ар-деко — едва заметный */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1'%3E%3Cpath d='M0 24a24 24 0 0 1 48 0M8 24a16 16 0 0 1 32 0M16 24a8 8 0 0 1 16 0'/%3E%3Cpath d='M-24 12a24 24 0 0 1 48 0M24 12a24 24 0 0 1 48 0'/%3E%3C/g%3E%3C/svg%3E");
}
.kicker { display: inline-flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }

.hero-home { display: block; padding: 40px 0 30px; }
.hero-home h2 { font-size: clamp(44px, 9vw, 68px); margin-bottom: 20px; }
.zones { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .zones { grid-template-columns: 1fr; } }

.zone-card {
  --zc: #2a1b12; --za: #e2b47f; --zi: #1a1209;
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 360px; padding: 28px; border-radius: 30px;
  background-color: var(--zc);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 30px 60px -32px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
  animation: rise .55s cubic-bezier(.2, .8, .2, 1) both;
}
.zone-card[data-zone="hookah"] { --zc: #211b2c; --za: #c3b8ea; --zi: #15111f; animation-delay: .07s; }
.zone-card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1'%3E%3Cpath d='M0 24a24 24 0 0 1 48 0M8 24a16 16 0 0 1 32 0M16 24a8 8 0 0 1 16 0'/%3E%3Cpath d='M-24 12a24 24 0 0 1 48 0M24 12a24 24 0 0 1 48 0'/%3E%3C/g%3E%3C/svg%3E"); }
.zone-card:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -34px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .08); }
.zone-art {
  position: absolute; z-index: -1; right: -14px; top: -26px; width: 210px; height: 210px;
  color: var(--za); opacity: .42; transition: transform .6s cubic-bezier(.2, .8, .2, 1), opacity .4s;
}
.zone-art svg { width: 100%; height: 100%; }
.zone-card:hover .zone-art { transform: rotate(-4deg) scale(1.05); opacity: .65; }
.zone-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.zone-body { position: relative; }
.zone-num { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--za); }
.zone-title { margin: 8px 0 8px; font-family: var(--serif); font-weight: 500; font-size: clamp(42px, 6vw, 52px); line-height: 1; }
.zone-desc { margin: 0; color: rgba(239, 233, 225, .62); font-size: 15px; max-width: 30ch; }
.zone-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .2); color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px;
  transition: background .2s, border-color .2s, transform .12s;
}
.pill svg { width: 17px; height: 17px; }
.pill:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .35); }
.pill:active { transform: scale(.97); }
.pill-solid { background: var(--za); color: var(--zi); border-color: transparent; }
.pill-solid:hover { background: color-mix(in srgb, var(--za) 85%, #fff); border-color: transparent; }

/* ---------- Баннер списка ---------- */
.banner {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin: 18px 0 16px; padding: 30px 28px 28px; border-radius: 30px;
  background-color: var(--zc); border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1'%3E%3Cpath d='M0 24a24 24 0 0 1 48 0M8 24a16 16 0 0 1 32 0M16 24a8 8 0 0 1 16 0'/%3E%3Cpath d='M-24 12a24 24 0 0 1 48 0M24 12a24 24 0 0 1 48 0'/%3E%3C/g%3E%3C/svg%3E"); }
.banner-art { position: absolute; z-index: -1; left: 46%; top: -30px; width: 230px; height: 230px; color: var(--accent); opacity: .2; }
.banner-art svg { width: 100%; height: 100%; }
.banner .kicker { color: var(--accent); }
.banner h2 { margin: 10px 0 16px; font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 6vw, 46px); line-height: 1.05; }
.banner .chip { border-color: rgba(255, 255, 255, .16); color: rgba(239, 233, 225, .75); }
.banner .chip.soon { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.banner .chip.late { color: var(--warn); border-color: rgba(224, 143, 117, .5); }
.hero-count { position: relative; flex: none; width: 116px; height: 116px; text-align: center; }
.count-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.count-ring circle { fill: none; stroke-width: 5; }
.count-ring .r-bg { stroke: rgba(255, 255, 255, .1); }
.count-ring .r-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset .5s cubic-bezier(.2, .8, .2, 1); }
.hero-count > div { position: absolute; inset: 0; display: grid; place-content: center; line-height: 1; }
.hero-count b { font-family: var(--serif); font-weight: 500; font-size: 42px; font-variant-numeric: lining-nums tabular-nums; }
.hero-count span { color: rgba(239, 233, 225, .6); font-size: 12.5px; margin-top: 2px; }
.hero-count.full b { color: var(--accent); }
@media (max-width: 520px) {
  .banner { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
  .hero-count { position: absolute; right: 18px; top: 18px; width: 84px; height: 84px; }
  .hero-count b { font-size: 30px; }
  .banner h2 { padding-right: 90px; }
}

/* Отмеченный пункт подсвечивается тоном зоны */
.item:has(input:checked) { background: var(--accent-soft); }
.item:has(input:checked)::before, .item:has(input:checked) + .item::before { opacity: 0; }
.sec-num {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--line-strong); font-size: 12px; letter-spacing: 0; transform: translateY(-3px);
}
.card.complete .sec-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-block.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-block.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }

/* ---------- Шапка чек-листа ---------- */
.back {
  flex: none; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background .15s;
}
.back:hover { background: var(--surface-2); }
.back svg { width: 19px; height: 19px; }
.sub-row { display: flex; align-items: center; gap: 18px; padding-bottom: 12px; }
.sub-row .progress { flex: 1; }
.seg {
  position: relative; flex: none; display: grid; grid-template-columns: 1fr 1fr;
  padding: 3px; border-radius: 12px; border: 1px solid var(--line-strong);
}
.seg button {
  position: relative; z-index: 1; appearance: none; border: 0; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 7px 14px; border-radius: 9px; font-weight: 500; font-size: 14px; color: var(--muted); transition: color .2s;
}
.seg button svg { width: 15px; height: 15px; }
.seg button.active { color: var(--ink); font-weight: 600; }
.seg-thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 9px;
  background: var(--cream); transition: transform .3s cubic-bezier(.3, 1.1, .5, 1);
}
.seg[data-active="close"] .seg-thumb { transform: translateX(100%); }
@media (max-width: 480px) { .sub-row { flex-direction: column; align-items: stretch; gap: 10px; } }

/* ---------- Карточки и поля ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; margin: 0 0 14px; }
#sections .card { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.card-head { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 12px 6px; }
.card-head h2 { display: flex; align-items: baseline; gap: 10px; margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 500; }
.sec-num { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--faint); letter-spacing: .08em; transition: color .2s; }
.card-count { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.card.complete .sec-num, .card.complete .card-count { color: var(--accent); }

.grid2 { display: grid; grid-template-columns: 1fr 1.6fr; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: block; padding: 10px 12px 12px; }
.field > span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 12px; padding: 13px 15px; outline: none; font-size: 17px;
  min-height: 52px; transition: border-color .15s, background .15s;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--line-strong); background: var(--surface-3); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.75); cursor: pointer; }
.field input[type="number"] { font-variant-numeric: tabular-nums; }

/* Пункт чек-листа */
.item {
  position: relative; display: flex; gap: 14px; align-items: flex-start;
  padding: 15px 12px; border-radius: 14px; cursor: pointer;
  transition: background .15s; user-select: none; -webkit-user-select: none;
}
.item + .item::before { content: ""; position: absolute; top: 0; left: 54px; right: 12px; height: 1px; background: var(--line); }
.item:hover { background: var(--surface-2); }
.item input { position: absolute; opacity: 0; pointer-events: none; }
.box {
  flex: none; width: 26px; height: 26px; margin-top: -1px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.box svg { width: 14px; height: 14px; stroke: var(--accent-ink); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .25s ease .05s; }
.item input:checked + .box { background: var(--accent); border-color: var(--accent); }
.item input:checked + .box svg { stroke-dashoffset: 0; }
.item input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 3px; }
.q { display: block; font-weight: 500; transition: color .2s; }
.hint { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.item input:checked ~ .txt .q { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.item input:checked ~ .txt .hint { color: var(--faint); }

.submit-zone { margin-top: 26px; }
.submit-note { text-align: center; color: var(--faint); font-size: 13px; margin: 12px 0 0; }

/* ---------- Модальные окна ---------- */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(440px, calc(100vw - 32px)); width: 100%; }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog[open] .sheet { animation: pop .25s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.sheet { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 26px; padding: 30px 24px 22px; text-align: center; }
.sheet h3 { margin: 18px 0 6px; font-family: var(--serif); font-size: 30px; font-weight: 500; }
.sheet p { margin: 0 0 22px; color: var(--muted); }
.sheet p b { color: var(--text); font-weight: 600; }
.sheet .actions { display: grid; gap: 10px; }
.big-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.big-icon.warn { background: var(--warn-soft); color: var(--warn); }
.big-icon svg { width: 30px; height: 30px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.big-icon.draw path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .45s ease .15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.missing { text-align: left; margin: -8px 0 20px; padding: 0; list-style: none; max-height: 40vh; overflow: auto; }
.missing li { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); margin-bottom: 6px; font-size: 15px; }
.steps { text-align: left; margin: 0 0 20px; padding-left: 22px; color: var(--muted); }
.steps li { margin-bottom: 6px; }
.steps b { color: var(--text); }
.confirm-input {
  width: 100%; margin: 0 0 16px; text-align: center; border: 1px solid var(--line-strong); background: var(--surface-2);
  border-radius: 12px; min-height: 52px; padding: 0 14px; outline: none; font-size: 17px; font-weight: 600;
}
.confirm-input:focus { border-color: rgba(224, 143, 117, .6); }

/* Экран «отправлено» */
.done-screen { text-align: center; padding: 16vh 16px 40px; }
.done-screen h2 { font-family: var(--serif); font-size: 40px; font-weight: 500; margin: 24px 0 6px; }
.done-screen p { color: var(--muted); margin: 0 0 28px; }

/* Тост */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--cream); color: var(--ink); padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100vw - 32px); z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) { .hero { padding-top: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Заголовки: Onest, плотный и современный ---------- */
.hero h2, .banner h2, .zone-title, .sheet h3, .done-screen h2, .hero-count b {
  font-weight: 700; letter-spacing: -.035em;
}
.hero h2 em { font-style: normal; color: var(--accent); }
.zone-title { letter-spacing: -.04em; }
.card-head h2 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; align-items: center; }
.sec-num { transform: none; }
.hero-count b { letter-spacing: -.04em; }

/* Ссылка на админку внизу главной */
.admin-foot {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: fit-content;
  margin: 28px auto 0; padding: 10px 16px; border-radius: 99px;
  color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none;
  border: 1px solid var(--line); transition: color .15s, border-color .15s;
}
.admin-foot:hover { color: var(--text); border-color: var(--line-strong); }
