/* Бронь столов — публичная страница. Тёмная «вечерняя» тема. */

:root {
    --accent: #e2b04a;
    --bg: #0e1014;
    --bg2: #15181f;
    --card: #1a1e26;
    --card2: #212632;
    --line: #2c3240;
    --text: #eef1f6;
    --dim: #98a1b3;
    --busy: #3a3f4c;
    --ok: #4ec98a;
    --err: #ff6b6b;
    --radius: 16px;
}

* { box-sizing: border-box; }

/* Атрибут hidden должен побеждать любые display из этого файла. */
[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

body {
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(226, 176, 74, .12), transparent 60%),
        radial-gradient(700px 400px at 100% 0%, rgba(90, 120, 255, .10), transparent 55%),
        var(--bg);
    min-height: 100vh;
    min-height: 100dvh;
}

.wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

button, input, textarea { font: inherit; color: inherit; }

/* ---------- шапка ---------- */

.head {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.head__main { flex: 1 1 240px; min-width: 0; }

.head__name {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -.02em;
    font-weight: 700;
}

.head__addr { color: var(--dim); font-size: 14px; margin-top: 4px; }

.head__hours { color: var(--accent); font-size: 13px; margin-top: 4px; opacity: .85; }

.head__phone {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(226, 176, 74, .35);
    border-radius: 999px;
    padding: 8px 16px;
    transition: background .15s;
}

.head__phone:hover { background: rgba(226, 176, 74, .12); }

.head__descr { color: var(--dim); margin: 12px 0 0; font-size: 15px; }

/* ---------- шаги ---------- */

.form { margin-top: 26px; }

.step {
    background: linear-gradient(180deg, var(--card), var(--bg2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 16px;
    margin-bottom: 14px;
}

.step__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }

.step__head h2 { margin: 0; font-size: 17px; font-weight: 600; }

.step__num {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(226, 176, 74, .16);
    color: var(--accent);
    font-size: 13px; font-weight: 700;
}

.step__hint { color: var(--dim); font-size: 13px; margin-left: auto; }

/* ---------- даты ---------- */

.dates {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.dates::-webkit-scrollbar { height: 6px; }
.dates::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.date {
    flex: 0 0 auto;
    width: 66px;
    padding: 9px 4px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card2);
    display: grid;
    justify-items: center;
    gap: 1px;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
}

.date:hover { border-color: rgba(226, 176, 74, .5); }
.date:active { transform: scale(.97); }

.date__wd {
    font-size: 11px;
    color: var(--dim);
    text-transform: lowercase;
    white-space: nowrap;      /* «сегодня» не должно переноситься */
}

.date__wd:not(:empty) { letter-spacing: -.01em; }
.date__d { font-size: 19px; font-weight: 700; line-height: 1.1; }
.date__mon { font-size: 11px; color: var(--dim); }
.date--we .date__wd { color: var(--accent); }

.date--closed {
    opacity: .4;
    cursor: not-allowed;
    border-style: dashed;
}

.date--closed:hover { border-color: var(--line); }
.date--closed .date__mon { font-size: 9px; letter-spacing: -.02em; }

.date.is-on {
    background: var(--accent);
    border-color: var(--accent);
    color: #17130a;
}

.date.is-on .date__wd, .date.is-on .date__mon { color: rgba(23, 19, 10, .7); }

/* ---------- время ---------- */

.times { display: flex; flex-wrap: wrap; gap: 8px; }

.time {
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card2);
    cursor: pointer;
    font-variant-numeric: tabular-nums;
    transition: border-color .15s, background .15s;
}

.time:hover { border-color: rgba(226, 176, 74, .5); }

.time.is-on {
    background: var(--accent);
    border-color: var(--accent);
    color: #17130a;
    font-weight: 600;
}

.times__load, .times__none { color: var(--dim); font-size: 14px; padding: 6px 0; }

/* ---------- гости ---------- */

.guests {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.guests__label { color: var(--dim); font-size: 14px; }

.guests__ctl { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.guests__btn {
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--card2);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.guests__btn:active { background: var(--line); }

.guests__val { min-width: 34px; text-align: center; font-size: 18px; font-weight: 700; }

/* ---------- залы ---------- */

.halls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.hall {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--card2);
    cursor: pointer;
    font-size: 14px;
}

.hall.is-on { background: rgba(226, 176, 74, .16); border-color: var(--accent); color: var(--accent); }

/* ---------- схема ---------- */

.scheme {
    background: #101319;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
}

.scheme__stage { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.scheme__empty { color: var(--dim); font-size: 14px; padding: 24px 8px; text-align: center; }

.hall-svg { width: 100%; min-width: 520px; height: auto; display: block; }

.floor { fill: #161a22; stroke: #232937; stroke-width: 2; }

/* декор */
.obj__box { fill: #1c2130; stroke: #2b3242; stroke-width: 2; }
.obj__text {
    fill: #7e8899;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.obj--bar .obj__box { fill: #23212c; stroke: #3a3350; }
.obj--stage .obj__box { fill: #1e2635; stroke: #35455f; }
.obj--dj .obj__box { fill: #1e2635; stroke: #35455f; }
.obj--door .obj__box { fill: #1a2620; stroke: #2f4d3c; }
.obj--door .obj__text { fill: #6ea88a; }
.obj--plant .obj__box { fill: #1a2620; stroke: #2f4d3c; }

/* столы */
.tbl { cursor: pointer; }

.tbl__body {
    fill: #27303f;
    stroke: #46536b;
    stroke-width: 2;
    transition: fill .15s, stroke .15s;
}

.tbl__back { fill: #46536b; }
.tbl__seat { fill: #384357; }

.tbl__label { fill: #eef1f6; font-size: 22px; font-weight: 700; pointer-events: none; }
.tbl__seats { fill: #8b95a8; font-size: 12px; pointer-events: none; }
.tbl__vip { fill: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .1em; pointer-events: none; }

.tbl--free .tbl__body { fill: #223026; stroke: #3f7a57; }
.tbl--free:hover .tbl__body { fill: #2b4234; stroke: var(--ok); }
.tbl--free .tbl__seat { fill: #35563f; }

.tbl--vip .tbl__body { stroke: rgba(226, 176, 74, .8); }
.tbl--vip.tbl--free .tbl__body { fill: #2e2a1d; }

.tbl--small .tbl__body { opacity: .75; stroke-dasharray: 6 5; }

.tbl--busy { cursor: not-allowed; }
.tbl--busy .tbl__body { fill: #1c1f27; stroke: #333947; }
.tbl--busy .tbl__label { fill: #5d6577; }
.tbl--busy .tbl__seats { fill: #4a5162; }
.tbl--busy .tbl__seat { fill: #2a2f3b; }

.tbl.is-sel .tbl__body {
    fill: var(--accent);
    stroke: #fff4d8;
    stroke-width: 3;
}
.tbl.is-sel .tbl__label { fill: #17130a; }
.tbl.is-sel .tbl__seats { fill: rgba(23, 19, 10, .65); }
.tbl.is-sel .tbl__seat { fill: var(--accent); }

.tbl:focus { outline: none; }
.tbl:focus .tbl__body { stroke: #fff; stroke-width: 3; }

/* легенда */
.scheme__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 4px 2px;
    color: var(--dim);
    font-size: 13px;
}

.lg { display: inline-flex; align-items: center; gap: 6px; }

/* Подсказка про горизонтальную прокрутку нужна только на телефоне. */
.lg--swipe { display: none; opacity: .8; }

.lg__box { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 2px solid; }
.lg__box--free { background: #223026; border-color: #3f7a57; }
.lg__box--vip { background: #2e2a1d; border-color: rgba(226, 176, 74, .8); }
.lg__box--busy { background: #1c1f27; border-color: #333947; }
.lg__box--sel { background: var(--accent); border-color: #fff4d8; }

/* выбранный стол */
.pick {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .02);
}

.pick__text { font-size: 14px; color: var(--dim); }
.pick__text.is-on { color: var(--text); font-weight: 600; }

.pick__clear {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

/* ---------- поля ---------- */

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field { display: block; }
.field--wide { grid-column: 1 / -1; }

.field__label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 6px; }
.field__opt { opacity: .65; }

.field__input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--card2);
    outline: none;
    transition: border-color .15s;
}

.field__input:focus { border-color: var(--accent); }
.field__input::placeholder { color: #616a7d; }
.field__input--area { resize: vertical; min-height: 48px; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- итог и кнопка ---------- */

.summary {
    text-align: center;
    color: var(--dim);
    font-size: 14px;
    margin: 4px 0 12px;
}

.error {
    background: rgba(255, 107, 107, .12);
    border: 1px solid rgba(255, 107, 107, .4);
    color: #ffb3b3;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-size: 14px;
}

.submit {
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--accent), #c99433);
    color: #17130a;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(226, 176, 74, .22);
    transition: transform .1s, opacity .15s;
}

.submit:active { transform: translateY(1px); }
.submit:disabled { opacity: .6; cursor: default; }

.note { color: var(--dim); font-size: 13px; text-align: center; margin: 12px 0 0; }

/* ---------- успех ---------- */

.done {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(180deg, var(--card), var(--bg2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-top: 26px;
}

.done__icon {
    width: 62px; height: 62px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(78, 201, 138, .15);
    color: var(--ok);
    font-size: 30px;
}

.done__title { margin: 0 0 14px; font-size: 24px; }
.done__row { font-size: 16px; margin-bottom: 4px; }
.done__hint { color: var(--dim); font-size: 14px; margin-top: 14px; }

.done__phone {
    display: inline-block;
    margin-top: 20px;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid rgba(226, 176, 74, .4);
    border-radius: 999px;
    padding: 10px 20px;
}

.done__more {
    display: block;
    margin: 14px auto 0;
    background: none;
    border: 0;
    color: var(--dim);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

/* ---------- список заведений ---------- */

.list-title { font-size: 26px; margin: 10px 0 20px; }

.list-empty { color: var(--dim); }
.list-empty a { color: var(--accent); }

.venue-list { display: grid; gap: 12px; }

.venue-card {
    display: grid;
    gap: 4px;
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--card), var(--bg2));
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, transform .1s;
}

.venue-card:hover { border-color: var(--accent); }
.venue-card:active { transform: scale(.995); }
.venue-card__name { font-size: 19px; font-weight: 700; }
.venue-card__addr { color: var(--dim); font-size: 14px; }
.venue-card__go { color: var(--accent); font-size: 14px; margin-top: 6px; }

/* ---------- телефоны ---------- */

@media (max-width: 560px) {
    .lg--swipe { display: inline-flex; }
    .wrap { padding: 18px 12px 48px; }
    .head__name { font-size: 24px; }
    .fields { grid-template-columns: 1fr; }
    .step { padding: 16px 12px; }
    .head__phone { padding: 7px 14px; font-size: 15px; }
}
