/* Spički booking — общий стиль гостя и сотрудников.
   Макет: «зал при свечах» — тёмное обугленное дерево, кремовый текст, красная головка спички как акцент,
   янтарное пламя для ожидания. Схема зала — главный объект страницы. Единая тёмная тема, как на сайте. */
:root {
  /* Палитра сайта spickibg.com (обновлена 19.10.2026): почти чёрный с лиловым оттенком, розовый неон */
  --char: #0f0a0d;      /* фон */
  --char-2: #1a1116;    /* приподнятые поверхности */
  --char-3: #2b1a23;    /* линии, рамки */
  --char-4: #3a2430;    /* активные рамки */
  --cream: #fff0f5;     /* основной текст */
  --cream-dim: #bfa2ae; /* второстепенный текст */
  --mute: #8f7480;      /* подписи */
  --head: #ff2e7e;      /* главный акцент: выбор, главное действие */
  --head-deep: #c81f5f;
  --flame: #ff5fa2;     /* второй акцент */
  --pend: #f5b14c;      /* ожидает подтверждения */
  --ok: #8fd19e;        /* гости пришли */
  --info: #8fb2c9;      /* блокировка */
  --danger: #ff7a62;
  --floor: #160e12;
  --font-display: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gl: max(16px, env(safe-area-inset-left, 0px));
  --gr: max(16px, env(safe-area-inset-right, 0px));
  --r: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--char); color: var(--cream); font: 15px/1.55 var(--font-body); -webkit-font-smoothing: antialiased }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--char) }
a { color: inherit }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -.02em; font-size-adjust: .40 }
p { margin: 0 }
button, input, select, textarea { font: inherit; color: inherit }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; border-radius: 6px }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.num { font-variant-numeric: tabular-nums }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important } }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr) }
.eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--flame) }
.muted { color: var(--cream-dim) }
.small { font-size: .85rem }
.tiny { font-size: .76rem; color: var(--mute) }

/* демо-метка: заметна всегда */
.demo-flag { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25; background: repeating-linear-gradient(-45deg, #4a1230 0 14px, #3a0e25 14px 28px); color: #ffd0e2; border-bottom: 1px solid var(--head);
  font-size: .82rem; font-weight: 600; text-align: center; padding-block: 8px; padding-left: var(--gl); padding-right: var(--gr) }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 44px; padding: 0 1.25em; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .93rem; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, box-shadow .25s, color .2s; white-space: nowrap }
.btn:disabled { opacity: .45; cursor: not-allowed }
.btn-fire { background: var(--head); color: #fff4f8 }
.btn-fire:not(:disabled):hover { box-shadow: 0 0 0 5px rgba(255, 95, 162, .15), 0 10px 34px -10px rgba(255, 46, 126, .8) }
.btn-line { border-color: rgba(255, 240, 245, .3); background: transparent }
.btn-line:not(:disabled):hover { border-color: var(--flame); color: var(--flame) }
.btn-ghost { background: transparent; color: var(--cream-dim); padding: 0 .8em }
.btn-ghost:hover { color: var(--cream) }
.btn-sm { min-height: 34px; padding: 0 .95em; font-size: .84rem }
.btn-danger { border-color: rgba(255, 122, 98, .45); color: var(--danger); background: transparent }
.btn-danger:hover { background: rgba(255, 122, 98, .1) }
.iconbtn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--char-4); background: var(--char-2); color: var(--cream); font-size: 1.1rem; line-height: 1; cursor: pointer; display: grid; place-items: center }
.iconbtn:hover { border-color: var(--flame) }

/* чипы и сегменты */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; scroll-snap-type: x proximity }
.chip { flex: 0 0 auto; scroll-snap-align: start; border: 1px solid var(--char-4); background: var(--char-2); border-radius: 10px; padding: 8px 12px; cursor: pointer; text-align: center; line-height: 1.2; min-width: 58px; transition: border-color .15s, background .15s }
.chip:hover { border-color: var(--cream-dim) }
.chip[aria-pressed="true"], .chip.on { border-color: var(--head); background: rgba(255, 46, 126, .16); box-shadow: inset 0 0 0 1px var(--head) }
.chip:disabled { opacity: .35; cursor: not-allowed }
.chip .k { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--mute) }
.chip .v { display: block; font-weight: 600; font-variant-numeric: tabular-nums }
.chip .n { display: block; font-size: .7rem; color: var(--pend) }
.seg { display: inline-flex; border: 1px solid var(--char-4); border-radius: 999px; padding: 3px; gap: 2px; background: var(--char-2) }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; cursor: pointer; color: var(--cream-dim); font-weight: 600; font-size: .85rem }
.seg button[aria-pressed="true"] { background: var(--cream); color: var(--char) }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px }
.times .chip { min-width: 0 }

/* поля */
.field { display: grid; gap: 6px; min-width: 0 }
.field > label, .label { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cream-dim) }
.field .opt { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--mute) }
.input, .field input:not([type=checkbox]):not([type=range]), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--char-4); background: #0b0709; color: var(--cream); outline: none }
.field textarea { min-height: 84px; resize: vertical }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--flame); box-shadow: 0 0 0 3px rgba(255, 95, 162, .15) }
.field .err { color: var(--danger); font-size: .82rem }
.field.has-err input, .field.has-err textarea { border-color: var(--danger) }
.field > label.check, .check { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--cream); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--head); flex: 0 0 auto }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden }

/* бегунок гостей */
.guests { display: grid; gap: 10px }
.guests-row { display: flex; align-items: center; gap: 14px }
.guests-val { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; min-width: 2.4ch; text-align: center; color: var(--cream); font-variant-numeric: tabular-nums }
input[type=range].slider { -webkit-appearance: none; appearance: none; flex: 1; height: 34px; background: transparent; cursor: pointer; min-width: 0 }
input[type=range].slider::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--head) 0 var(--fill, 0%), var(--char-4) var(--fill, 0%)) }
input[type=range].slider::-moz-range-track { height: 6px; border-radius: 6px; background: var(--char-4) }
input[type=range].slider::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--head) }
input[type=range].slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--cream); border: 4px solid var(--head); box-shadow: 0 0 14px rgba(255, 46, 126, .6) }
input[type=range].slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--cream); border: 4px solid var(--head) }
.ticks { display: flex; justify-content: space-between; font-size: .72rem; color: var(--mute); padding: 0 6px; font-variant-numeric: tabular-nums }

/* панели */
.panel { background: var(--char-2); border: 1px solid var(--char-3); border-radius: var(--r); padding: clamp(16px, 2.6vw, 24px); display: grid; gap: 18px; min-width: 0 }
.panel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap }
.panel-h h2 { font-size: clamp(1.5rem, 3vw, 1.9rem) }
.step-n { font-family: var(--font-display); font-style: italic; color: var(--head); font-size: 1.1em; margin-right: .3em }
.note { border-left: 2px solid var(--flame); padding: 8px 12px; background: rgba(255, 95, 162, .07); border-radius: 0 8px 8px 0; font-size: .88rem; color: var(--cream-dim) }
.alert { border: 1px solid rgba(255, 122, 98, .5); background: rgba(255, 122, 98, .08); color: #ffd0dc; border-radius: 10px; padding: 10px 14px; font-size: .9rem }
.okbox { border: 1px solid rgba(143, 179, 122, .5); background: rgba(143, 179, 122, .08); border-radius: 10px; padding: 10px 14px }

/* схема */
.plan-wrap { position: relative; border-radius: var(--r); background: #0d080b; border: 1px solid var(--char-3); overflow: hidden }
.plan-svg { display: block; width: 100%; height: auto; aspect-ratio: 1470 / 790; user-select: none; -webkit-user-select: none }
.plan-box { display: grid; gap: 8px; min-width: 0 }
.plan-zoom { display: flex; gap: 8px; justify-content: flex-end }
.panel, .g-who { scroll-margin-top: calc(80px + env(safe-area-inset-top, 0px)) }
.plan-static .floor { fill: var(--floor) }
.plan-static .floor-lower { fill: #120b0f; stroke: var(--char-3); stroke-dasharray: 6 8 }
.plan-static .service { fill: #22161c }
.plan-static .bar { fill: #2e1c26; stroke: #4a3040 }
.plan-static .sofa { fill: #2e1c26 }
.plan-static .wall { fill: none; stroke: #9b8090; stroke-width: 6; stroke-linejoin: round; stroke-linecap: round }
.plan-static .wall-thin { stroke: #4a3440; stroke-width: 4 }
.plan-static .chair { fill: #22161c; stroke: #3d2a33; stroke-width: 2 }
.plan-static .chair.lower { fill: #1a1015; stroke: #3a2a32 }
.plan-static .plant { fill: none; stroke: #4c5640; stroke-width: 2 }
.plan-note { fill: var(--mute); font: 600 17px var(--font-body); letter-spacing: .2em; text-anchor: middle }
.lower-note { letter-spacing: .06em; font-weight: 500; font-size: 20px }
.hatch-bg { fill: transparent } .hatch-line { stroke: rgba(255, 240, 245, .16); stroke-width: 4 }

.ptable { cursor: pointer; outline: none }
.ptable-body { fill: #281820; stroke: var(--cream-dim); stroke-width: 2.5; transition: fill .15s, stroke .15s }
.ptable-hatch { fill: transparent; pointer-events: none }
.ptable-label { fill: var(--cream); font: 600 28px var(--font-body); text-anchor: middle; dominant-baseline: middle; pointer-events: none; font-variant-numeric: tabular-nums }
.kind-room .ptable-label { font-family: var(--font-display); font-size: 38px; font-weight: 500 }
.ptable-sub { fill: var(--cream-dim); font: 600 15px var(--font-body); text-anchor: middle; pointer-events: none }
.kind-room .ptable-body { stroke-dasharray: 10 7 }
.ptable:hover .ptable-body, .ptable:focus-visible .ptable-body { stroke: var(--flame); stroke-width: 4 }
.ptable.is-free .ptable-body { fill: #2a1a23; stroke: var(--cream) }
.ptable.is-busy .ptable-body, .ptable.is-off .ptable-body { fill: #140c10; stroke: #3d2a33 }
.ptable.is-busy .ptable-hatch { fill: url(#plan-hatch) }
.ptable.is-busy .ptable-label, .ptable.is-off .ptable-label { fill: #6e5562 }
.ptable[aria-disabled="true"] { cursor: not-allowed }
.ptable.is-selected .ptable-body { fill: var(--head); stroke: #ffb3d1; stroke-width: 4; filter: drop-shadow(0 0 14px rgba(255, 46, 126, .9)) }
.ptable.is-selected .ptable-label, .ptable.is-selected .ptable-sub { fill: #fff4f8 }
.ptable.is-dim { opacity: .35 }
/* состояния для сотрудников */
.ptable.st-pending .ptable-body { stroke: var(--pend); stroke-dasharray: 8 6; stroke-width: 3.5 }
.ptable.st-confirmed .ptable-body { fill: #4a1430; stroke: var(--head); stroke-width: 3.5 }
.ptable.st-seated .ptable-body { fill: #263222; stroke: var(--ok); stroke-width: 3.5 }
.ptable.st-blocked .ptable-body { fill: #1b1d1f; stroke: var(--info) }
.ptable.st-blocked .ptable-hatch { fill: url(#plan-hatch) }
.ptable-badge { fill: var(--pend); stroke: var(--char); stroke-width: 3 }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8rem; color: var(--cream-dim) }
.legend span { display: inline-flex; align-items: center; gap: 7px }
.sw { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--cream); background: #2a1a23; display: inline-block }
.sw.busy { border-color: #3d2a33; background: repeating-linear-gradient(45deg, #140c10 0 3px, #3a2a32 3px 5px) }
.sw.sel { border-color: #ffb3d1; background: var(--head) }
.sw.pend { border: 2px dashed var(--pend); background: transparent }
.sw.conf { border-color: var(--head); background: #4a1430 }
.sw.seat { border-color: var(--ok); background: #263222 }
.sw.blk { border-color: var(--info); background: repeating-linear-gradient(45deg, #1b1d1f 0 3px, #39424a 3px 5px) }

/* список столов */
.tlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px }
.tcard { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; text-align: left; border: 1px solid var(--char-4); background: var(--char-2); border-radius: 12px; padding: 12px 14px; cursor: pointer; min-width: 0 }
.tcard:hover { border-color: var(--cream-dim) }
.tcard[aria-pressed="true"] { border-color: var(--head); box-shadow: inset 0 0 0 1px var(--head); background: rgba(255, 46, 126, .12) }
.tcard:disabled { opacity: .45; cursor: not-allowed }
.tcard .tnum { grid-row: span 2; font-family: var(--font-display); font-size: 2rem; line-height: 1; min-width: 1.6ch; text-align: center }
.tcard .tname { font-weight: 600; min-width: 0 }
.tcard .tmeta { font-size: .8rem; color: var(--cream-dim); min-width: 0 }
.dep { color: var(--flame); font-weight: 600 }

/* статусы */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; border: 1px solid currentColor; white-space: nowrap }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.pill.pending { color: var(--pend) }
.pill.confirmed { color: var(--flame) }
.pill.seated { color: var(--ok) }
.pill.completed { color: var(--cream-dim) }
.pill.cancelled, .pill.no_show { color: var(--mute) }

/* карточки-сводки */
.summary { display: grid; gap: 4px; padding: 14px 16px; border-radius: 12px; background: #0b0709; border: 1px solid var(--char-3) }
.summary .big { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1 }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .92rem }
.kv dt { color: var(--mute) } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere }
.linkbox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.linkbox code { flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; background: #0b0709; border: 1px solid var(--char-3); padding: 10px 12px; border-radius: 10px; font-size: .82rem; user-select: all }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--cream); color: var(--char); padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 60; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: calc(100% - 32px) }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 240, 245, .25); border-top-color: var(--flame); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block }
@keyframes spin { to { transform: rotate(360deg) } }
.empty { padding: 26px; text-align: center; color: var(--cream-dim); border: 1px dashed var(--char-4); border-radius: 12px }
