
/* ==========================================================================
   OrynBar — дизайн-система
   Палитра: графит, тёплый камень, дерево, латунь. Шрифты: Inter (интерфейс),
   Playfair Display (заголовки).
   ========================================================================== */

:root {
    --ink: #1C1917;
    --ink-2: #292524;
    --ink-soft: #44403C;
    --muted: #78716C;
    --muted-2: #A8A29E;
    --line: #E8E2D9;
    --line-2: #D9D1C5;
    --paper: #F7F4EF;
    --cream: #FBF9F5;
    --card: #FFFFFF;
    --brass: #B08A5A;
    --brass-2: #C9A46A;
    --brass-deep: #8C6A3F;
    --brass-soft: #F4ECDF;
    --green: #3F6B55;
    --green-soft: #EAF2EC;
    --amber: #9A6418;
    --amber-soft: #FBF1DF;
    --rose: #A8433B;
    --rose-soft: #FBECEA;
    --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.05);
    --shadow-sm: 0 1px 3px rgba(28, 25, 23, 0.06), 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-md: 0 12px 32px -14px rgba(28, 25, 23, 0.22), 0 4px 10px -4px rgba(28, 25, 23, 0.07);
    --shadow-lg: 0 34px 70px -24px rgba(28, 25, 23, 0.42);
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
}

::selection {
    background: var(--brass-soft);
    color: var(--ink);
}

.font-display {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    letter-spacing: -0.012em;
}

.container-x {
    width: 100%;
    max-width: 1380px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 640px) {
    .container-x { padding-left: 24px; padding-right: 24px; }
}

/* ---------- Иконки ---------- */
.ico {
    display: inline-flex;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    vertical-align: -0.125em;
}

.ico > svg { width: 100%; height: 100%; }

/* ---------- Логотип: буква «О» — круглый стол со стульями ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    color: var(--ink);
    text-decoration: none;
    line-height: 1;
    user-select: none;
}

.brand-mark {
    width: 1.48em;
    height: 1.48em;
    margin-right: -0.17em;
    margin-left: -0.1em;
    flex-shrink: 0;
}

.brand-mark .ring { stroke: currentColor; }
.brand-mark .chairs { stroke: var(--brass); }

.brand-word {
    font-weight: 800;
    letter-spacing: -0.035em;
    font-size: 1em;
}

.brand-word .accent { color: var(--brass-deep); }

.brand-light { color: #FFFFFF; }
.brand-light .brand-mark .chairs { stroke: var(--brass-2); }
.brand-light .brand-word .accent { color: var(--brass-2); }

/* ---------- Надписи ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brass-deep);
}

.eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
}

.eyebrow-light { color: var(--brass-2); }

.muted { color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    padding: 11px 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn:disabled { cursor: not-allowed; opacity: .55; }
.btn .ico { width: 16px; height: 16px; }

.btn-sm { font-size: 13px; padding: 9px 13px; border-radius: 11px; }
.btn-sm .ico { width: 15px; height: 15px; }
.btn-lg { font-size: 15px; padding: 14px 20px; border-radius: 14px; }
.btn-xs { font-size: 12px; padding: 7px 10px; border-radius: 9px; gap: 6px; }
.btn-xs .ico { width: 13px; height: 13px; }

.btn-primary {
    background: var(--ink);
    color: #FFFFFF;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 6px 16px -8px rgba(28, 25, 23, 0.6);
}

.btn-primary:hover:not(:disabled) {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 12px 22px -10px rgba(28, 25, 23, 0.7);
}

.btn-brass {
    background: linear-gradient(180deg, #C29B65, #A9824E);
    color: #FFFFFF;
    border-color: #9A7644;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 18px -10px rgba(140, 106, 63, 0.9);
}

.btn-brass:hover:not(:disabled) {
    background: linear-gradient(180deg, #C9A46D, #B08A55);
    transform: translateY(-1px);
}

.btn-outline {
    background: var(--card);
    color: var(--ink);
    border-color: var(--line-2);
}

.btn-outline:hover:not(:disabled) { border-color: var(--ink); }

.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
}

.btn-ghost:hover:not(:disabled) { background: rgba(28, 25, 23, 0.05); color: var(--ink); }

.btn-danger {
    background: var(--card);
    color: var(--rose);
    border-color: #EBCFCB;
}

.btn-danger:hover:not(:disabled) { background: var(--rose-soft); }

.btn-light {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.btn-light:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--muted);
    transition: background-color .15s, color .15s;
    cursor: pointer;
}

.icon-btn:hover { background: rgba(28, 25, 23, 0.06); color: var(--ink); }
.icon-btn .ico { width: 17px; height: 17px; }

.link {
    color: var(--brass-deep);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(140, 106, 63, 0.35);
    text-underline-offset: 3px;
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
    font-size: inherit;
}

.link:hover { text-decoration-color: currentColor; }
.link:disabled { color: var(--muted-2); text-decoration: none; cursor: default; }
.link-sm { font-size: 12px; }

.count-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--ink);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.count-badge.is-zero { background: var(--line); color: var(--muted); }

/* ---------- Карточки, плашки ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-soft {
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
    line-height: 1.1;
}

.pill-amber { background: var(--amber-soft); color: var(--amber); border-color: #F0DDBB; }
.pill-green { background: var(--green-soft); color: var(--green); border-color: #CFE2D5; }
.pill-ink { background: var(--ink); color: #FFFFFF; }
.pill-muted { background: #F1EEE9; color: var(--muted); border-color: var(--line); }
.pill-rose { background: var(--rose-soft); color: var(--rose); border-color: #EFD3CF; }
.pill-brass { background: var(--brass-soft); color: var(--brass-deep); border-color: #E8D8BE; }
.pill-glass { background: rgba(255, 255, 255, 0.86); color: var(--ink); backdrop-filter: blur(8px); }

/* ---------- Сегменты и чипы ---------- */
.seg {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    background: #EFEAE3;
    border: 1px solid var(--line);
    border-radius: 13px;
}

.seg-wide { display: flex; }
.seg-wide .seg-item { flex: 1; }

.seg-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .15s, color .15s, box-shadow .15s;
    white-space: nowrap;
}

.seg-item .ico { width: 15px; height: 15px; }
.seg-item:hover { color: var(--ink); }

.seg-item.is-active {
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.1), 0 0 0 1px rgba(28, 25, 23, 0.04);
}

.seg-dark { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.08); }
.seg-dark .seg-item { color: #A8A29E; }
.seg-dark .seg-item:hover { color: #FFFFFF; }
.seg-dark .seg-item.is-active { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; box-shadow: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--card);
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}

.chip:hover { border-color: var(--ink); color: var(--ink); }

.chip.is-active {
    background: var(--ink);
    border-color: var(--ink);
    color: #FFFFFF;
}

.chip-sm { font-size: 12px; padding: 5px 11px; }

.chip-dark {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    color: #E7E2DA;
}

.chip-dark:hover { border-color: rgba(255, 255, 255, 0.4); color: #FFFFFF; }

/* Время: горизонтальная лента слотов */
.slot-strip {
    position: relative;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px;
    scroll-behavior: smooth;
}

.slot-strip::-webkit-scrollbar { display: none; }

/* Полоса времени: края растворяются, когда за ними есть ещё время; стрелки ‹ ›; мышью можно тащить */
.slot-scroller { position: relative; }
.slot-strip {
    --fade-l: 0px;
    --fade-r: 0px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
    user-select: none;
}
.slot-strip.has-more-left { --fade-l: 48px; }
.slot-strip.has-more-right { --fade-r: 48px; }
.slot-strip.can-drag { cursor: grab; }
.slot-strip.is-dragging, .slot-strip.is-dragging .slot { cursor: grabbing; }

.slot-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 32px;
    height: 32px;
    margin-top: -16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--card);
    color: var(--ink);
    box-shadow: 0 4px 12px -6px rgba(28, 25, 23, 0.45);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.slot-arrow:hover { border-color: var(--ink); box-shadow: 0 6px 16px -6px rgba(28, 25, 23, 0.55); }
.slot-arrow:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.slot-arrow .ico { width: 16px; height: 16px; }
.slot-arrow.is-prev { left: -6px; }
.slot-arrow.is-next { right: -6px; }
.slot-arrow[hidden], .slot-range-row[hidden] { display: none; }

/* Ползунок под полосой: прокручивает её от первого до последнего времени дня */
.slot-range-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.slot-range-edge { flex: none; font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.slot-range {
    --p: 0%;
    flex: 1 1 auto;
    min-width: 0;
    height: 22px;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}
.slot-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brass) var(--p), var(--line-2) var(--p));
}
.slot-range::-moz-range-track { height: 4px; border-radius: 999px; background: var(--line-2); }
.slot-range::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--brass); }
.slot-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -7px;
    border-radius: 50%;
    background: var(--brass);
    border: 3px solid var(--card);
    box-shadow: 0 0 0 1px var(--brass-deep), 0 2px 6px -2px rgba(28, 25, 23, 0.5);
}
.slot-range::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--brass);
    border: 3px solid var(--card);
    box-shadow: 0 0 0 1px var(--brass-deep), 0 2px 6px -2px rgba(28, 25, 23, 0.5);
}
.slot-range:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

@media (pointer: coarse) {
    .slot-arrow { display: none; }   /* на сенсорном экране полосу листают пальцем */
    .slot-range { height: 36px; }
    .slot-range::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -11px; }
    .slot-range::-moz-range-thumb { width: 20px; height: 20px; }
}

.slot {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
    padding: 9px 13px;
    border-radius: 11px;
    border: 1px solid var(--line-2);
    background: var(--card);
    cursor: pointer;
    transition: all .15s ease;
}

.slot:hover { border-color: var(--ink); color: var(--ink); }
.slot.is-active { background: var(--ink); border-color: var(--ink); color: #FFFFFF; box-shadow: 0 6px 14px -8px rgba(28, 25, 23, 0.8); }

/* ---------- Поля ввода ---------- */
.field { display: block; }

.field-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.field-label-row { display: flex; justify-content: space-between; align-items: baseline; }

.input-wrap { position: relative; display: block; }

.input-ico {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--muted-2);
    pointer-events: none;
}

.input {
    width: 100%;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink);
    background: var(--cream);
    border: 1px solid var(--line-2);
    border-radius: 12px;
    padding: 12px 14px;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
    outline: none;
}

.input.has-ico { padding-left: 40px; }
.input::placeholder { color: var(--muted-2); font-weight: 400; }

.input:focus {
    background: var(--card);
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(176, 138, 90, 0.16);
}

.input-sm { font-size: 13px; padding: 9px 11px; border-radius: 10px; }

/* Роль сотрудника в списке персонала (меняет владелец) */
.role-select { width: auto; min-width: 124px; padding-top: 6px; padding-bottom: 6px; font-weight: 600; }

select.input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 15px;
    padding-right: 34px;
    cursor: pointer;
}

.otp-input {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.42em;
    padding: 14px 10px 14px 22px;
    font-variant-numeric: tabular-nums;
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
}

/* Поле с ошибкой: красная рамка и значок справа */
input[aria-invalid="true"],
input[aria-invalid="true"]:focus {
    border-color: #C2554C;
    background-color: #FFF6F5;
    box-shadow: 0 0 0 4px rgba(194, 85, 76, 0.12);
}

/* ---------- Форма входа ---------- */
.auth { display: flex; flex-direction: column; gap: 16px; }
.auth-step { display: flex; flex-direction: column; gap: 14px; }
.auth-hint { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: -4px; }
.auth-lead { font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.auth-switch { font-size: 13px; color: var(--muted); text-align: center; }
.link-center { align-self: center; font-size: 13px; }
.link-back { align-self: center; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.link-back .ico { width: 14px; height: 14px; }

.auth-alert {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.45;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid;
}

.auth-alert .ico { width: 16px; height: 16px; margin-top: 1px; }

.soon-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--brass-deep);
    background: var(--brass-soft);
    border: 1px solid #E8D8BE;
    border-radius: 999px;
    padding: 1px 7px;
    margin-left: 2px;
}

.auth-soon {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--cream);
    border: 1px solid var(--line);
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.auth-soon.hidden { display: none; }
.auth-soon .ico { width: 17px; height: 17px; color: var(--brass); flex-shrink: 0; margin-top: 1px; }
.auth-soon b { color: var(--ink); font-weight: 650; }
.auth-step .input:disabled { opacity: .55; cursor: not-allowed; }
.auth-alert.is-error { background: var(--rose-soft); border-color: #EFCFCB; color: #8E3730; }
.auth-alert.is-info { background: var(--brass-soft); border-color: #E8D8BE; color: #6E5230; }

/* ---------- Модальные окна ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(20, 17, 15, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fade-in .18s ease;
}

.modal {
    width: 100%;
    background: var(--card);
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    overflow: hidden;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    animation: pop-in .22s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Плашка демо-версии (index.html) ---------- */
.demo-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--ink);
    color: #D6CFC5;
    font-size: 12.5px;
    line-height: 1.45;
    text-align: center;
}

.demo-bar b { color: var(--brass-2); font-weight: 650; }
.demo-bar .ico { width: 15px; height: 15px; color: var(--brass-2); flex-shrink: 0; }

/* ---------- Шапка ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(247, 244, 239, 0.82);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid rgba(232, 226, 217, 0.9);
    transition: background-color .3s ease, box-shadow .3s ease;
}

.site-header.is-scrolled {
    background: rgba(251, 249, 245, 0.92);
    box-shadow: 0 10px 30px -22px rgba(28, 25, 23, 0.45);
}

.select-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 7px 12px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
    box-shadow: var(--shadow-xs);
}

.select-pill .ico { width: 15px; height: 15px; color: var(--brass); }

.select-pill select {
    appearance: none;
    background: transparent;
    font-weight: 700;
    color: var(--ink);
    outline: none;
    cursor: pointer;
    padding-right: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 14px;
    max-width: 260px;
    text-overflow: ellipsis;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 4px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--line);
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(150deg, #C9A46A, #8C6A3F);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---------- Главный баннер ---------- */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #1A1613;
    color: #FFFFFF;
    isolation: isolate;
    box-shadow: var(--shadow-lg);
}

/* Фото выше и ниже баннера на 10% — запас для параллакса (parallax() в config.js) */
.hero-bg {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 120%;
    object-fit: cover;
    z-index: -2;
    animation: hero-photo-in 1.8s cubic-bezier(.2, .7, .2, 1) both;
    will-change: translate;
}

@keyframes hero-photo-in { from { opacity: 0; scale: 1.08; } to { opacity: 1; scale: 1; } }

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(95deg, rgba(20, 16, 13, 0.94) 0%, rgba(20, 16, 13, 0.82) 38%, rgba(20, 16, 13, 0.35) 72%, rgba(20, 16, 13, 0.55) 100%),
        linear-gradient(0deg, rgba(20, 16, 13, 0.55), transparent 45%);
}

.hero-title {
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.04;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hero-title em { font-style: italic; color: var(--brass-2); font-weight: 500; }

.hero-lead {
    font-size: 15px;
    line-height: 1.65;
    color: #D6CFC5;
    max-width: 560px;
}

.search-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #FFFFFF;
    border-radius: 18px;
    padding: 6px;
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.6);
    color: var(--ink);
}

@media (min-width: 640px) {
    .search-bar { flex-direction: row; align-items: center; border-radius: 999px; }
}

.search-field {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 14px;
    min-width: 0;
}

.search-field .ico { width: 17px; height: 17px; color: var(--brass); }

.search-field input,
.search-field select {
    width: 100%;
    background: transparent;
    outline: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    appearance: none;
}

.search-field input { font-weight: 500; }
.search-field input::placeholder { color: var(--muted-2); }
.search-divider { width: 1px; align-self: stretch; background: var(--line); margin: 8px 0; }

.search-bar .btn { border-radius: 999px; padding: 13px 24px; }

.glass-card {
    background: rgba(28, 24, 21, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    border-radius: 22px;
}

.feature-ico {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(201, 164, 106, 0.16);
    color: var(--brass-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-ico .ico { width: 18px; height: 18px; }

/* ---------- Экраны сайта гостя: каталог (главная) и ресторан (#r=…) ----------
   data-view на <html> ставит js/boot.js до отрисовки, дальше — route() в client.js */
html[data-view="catalog"] [data-screen="restaurant"],
html[data-view="restaurant"] [data-screen="catalog"] { display: none !important; }

/* ---------- Каталог: кухни, число найденных, сортировка, «Показать ещё» ---------- */
.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 22px;
}

.cat-bar { scrollbar-width: none; min-width: 0; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-bar > * { flex-shrink: 0; }

.catalog-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.catalog-count { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.sort-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line-2);
    border-radius: 999px;
    transition: border-color .15s ease;
}

.sort-pill:hover { border-color: var(--ink); }

.sort-pill select {
    appearance: none;
    background: transparent;
    outline: none;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    padding: 7px 32px 7px 14px;
    cursor: pointer;
}

/* стрелка списка */
.sort-pill::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -5px;
    border-right: 1.6px solid var(--muted);
    border-bottom: 1.6px solid var(--muted);
    rotate: 45deg;
    pointer-events: none;
}

.sort-pill:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(176, 138, 90, 0.16); }

/* «Недавно смотрели: …» — вернуться к последнему ресторану */
.continue-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    background: var(--brass-soft);
    border: 1px solid #E8D8BE;
    border-radius: 999px;
    padding: 8px 14px 8px 8px;
    transition: border-color .15s ease, background-color .15s ease;
}

.continue-pill:hover { border-color: var(--brass); }
.continue-pill .continue-thumb { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #E9E3DA; }
.continue-pill .continue-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.continue-pill .ico { width: 14px; height: 14px; color: var(--brass-deep); flex-shrink: 0; }

@media (max-width: 639.98px) {
    .catalog-toolbar .cat-bar {
        flex: 1 1 100%;
        overflow-x: auto;
        margin: 0 -16px;
        padding: 2px 16px;
        mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent);
    }
    /* счётчик и сортировка в одну строку: длинные подписи (казахский) сжимаются с многоточием */
    .catalog-tools { width: 100%; justify-content: space-between; min-width: 0; }
    .catalog-count { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .sort-pill { min-width: 0; max-width: 62%; flex-shrink: 0; }
    .sort-pill select { width: 100%; text-overflow: ellipsis; }
}

@media (pointer: coarse), (max-width: 639.98px) {
    .sort-pill select { min-height: 40px; }
    .continue-pill { min-height: 40px; }
}

/* ---------- Экран ресторана: фото, название, адрес, рейтинг ---------- */
.rest-hero {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #1A1613;
    color: #FFFFFF;
    isolation: isolate;
    box-shadow: var(--shadow-md);
}

.rest-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.rest-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(0deg, rgba(20, 16, 13, 0.92) 0%, rgba(20, 16, 13, 0.55) 55%, rgba(20, 16, 13, 0.30) 100%),
        linear-gradient(90deg, rgba(20, 16, 13, 0.55), transparent 70%);
}

.rest-hero-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 34px;
    min-height: 230px;
    padding: 16px 18px 22px;
}

@media (min-width: 640px) {
    .rest-hero-body { min-height: 270px; padding: 22px 32px 30px; }
}

.rest-hero-title {
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    font-size: 13px;
    font-weight: 600;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    padding: 7px 14px 7px 9px;
    transition: background-color .15s ease;
}

.back-link:hover { background: rgba(255, 255, 255, 0.26); }
.back-link .ico { width: 16px; height: 16px; }

/* телефон и сенсорные экраны — кнопка не меньше 40 px */
@media (pointer: coarse), (max-width: 639.98px) { .back-link { min-height: 40px; } }

.meta-row.meta-row-light { color: #E4DDD3; }
.meta-row.meta-row-light .ico { color: var(--brass-2); }

.stat.stat-glass { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.18); color: #DCD4C9; backdrop-filter: blur(8px); }
.stat.stat-glass strong { color: #FFFFFF; }

/* ---------- Карточки ресторанов ---------- */
.rest-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    cursor: pointer;
}

.rest-card > * { width: 100%; }

.rest-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.rest-card.is-active {
    border-color: var(--brass);
    box-shadow: 0 0 0 3px rgba(176, 138, 90, 0.2), var(--shadow-md);
}

.rest-card-media { position: relative; height: 196px; overflow: hidden; background: #E9E3DA; }

.rest-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.rest-card:hover .rest-card-media img { transform: scale(1.05); }

.rest-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(20, 16, 13, 0.55), transparent 55%);
}

.rest-card-media .media-top {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 1;
}

.rest-card-media .media-bottom { position: absolute; left: 14px; bottom: 12px; z-index: 1; }

.rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
}

.rating .ico { width: 13px; height: 13px; color: var(--brass); }

.promo-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
    background: rgba(140, 106, 63, 0.92);
    padding: 6px 10px;
    border-radius: 999px;
}

.promo-tag .ico { width: 13px; height: 13px; }

.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    font-size: 12.5px;
    color: var(--muted);
}

.meta-row .ico { width: 14px; height: 14px; color: var(--brass); margin-right: 5px; }
.meta-row > span { display: inline-flex; align-items: center; }

.rest-card-promo { display: none; }

/* Телефон: компактная карточка — фото слева, текст справа (≈ 130 px вместо 420) */
@media (max-width: 639.98px) {
    .rest-card { flex-direction: row; border-radius: 18px; }
    .rest-card > * { width: auto; }
    .rest-card .rest-card-media { width: 112px; height: auto; min-height: 128px; flex-shrink: 0; }
    .rest-card .rest-card-media img { position: absolute; inset: 0; }
    .rest-card .rest-card-media::after { display: none; }
    .rest-card .rest-card-media .media-top { top: 8px; left: 8px; right: auto; }
    .rest-card .rest-card-media .media-top .pill,
    .rest-card .rest-card-media .media-bottom,
    .rest-card .rest-card-cta { display: none; }
    .rest-card .rest-card-media .rating { font-size: 11px; padding: 3px 7px; }
    .rest-card .rest-card-body { padding: 12px 14px 13px; gap: 4px; min-width: 0; }
    /* название — до двух строк, кухня и адрес — в одну строку с многоточием */
    .rest-card .rest-card-body h3 { font-size: 18px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
    .rest-card .rest-card-body > p { font-size: 12.5px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .rest-card .rest-card-body .meta-row { padding-top: 4px; gap: 3px 10px; font-size: 12px; flex-wrap: nowrap; min-width: 0; }
    .rest-card .rest-card-body .meta-row > span { white-space: nowrap; flex-shrink: 0; }
    /* адрес сжимается и обрезается многоточием, средний чек остаётся целиком */
    .rest-card .rest-card-body .meta-row > span:first-child { display: block; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .rest-card .rest-card-body .meta-row > span:first-child .ico { vertical-align: -2px; }
    .rest-card .rest-card-promo {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 11.5px;
        font-weight: 700;
        color: var(--brass-deep);
    }
    .rest-card .rest-card-promo .ico { width: 12px; height: 12px; }
    .rest-card:hover { transform: none; }
}

/* ---------- Блок бронирования ---------- */
.panel-dark {
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(201, 164, 106, 0.18), transparent 55%),
        linear-gradient(160deg, #24201C, #171412);
    color: #FFFFFF;
}

.ticket-cell {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
}

.ticket-cell .label { display: block; font-size: 10.5px; color: #A8A29E; letter-spacing: .04em; margin-bottom: 3px; }
.ticket-cell strong { font-size: 13px; font-weight: 700; }

.table-pick {
    border-radius: 18px;
    padding: 16px;
    border: 1.5px dashed var(--line-2);
    background: var(--cream);
    transition: all .2s ease;
}

.table-pick.is-selected {
    border-style: solid;
    border-color: var(--brass);
    background: linear-gradient(160deg, #FFFDF9, var(--brass-soft));
    box-shadow: 0 10px 24px -16px rgba(140, 106, 63, 0.7);
}

.table-pick-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--muted-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.table-pick-icon .ico { width: 26px; height: 26px; }
.table-pick.is-selected .table-pick-icon { color: var(--brass-deep); border-color: #E3D2B6; }

.status-msg {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    border: 1px solid;
}

.status-msg.is-success { background: var(--green-soft); border-color: #CFE2D5; color: #2F5541; }
.status-msg.is-error { background: var(--rose-soft); border-color: #EFCFCB; color: #8E3730; }
.status-msg.is-info { background: #F3F0EB; border-color: var(--line); color: var(--ink-soft); }

.booking-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--cream);
    font-size: 12.5px;
}

.stepper {
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--line-2);
    border-radius: 12px;
    padding: 3px;
}

.stepper button {
    width: 36px;
    height: 34px;
    border-radius: 9px;
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .15s;
}

.stepper button:hover { background: #F1ECE5; color: var(--ink); }
.stepper button .ico { width: 15px; height: 15px; }
.stepper .value { flex: 1; text-align: center; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }

.date-input {
    width: 100%;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line-2);
    border-radius: 12px;
    padding: 9px 12px;
    outline: none;
}

.date-input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(176, 138, 90, 0.16); }

.step-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

/* ---------- Схема зала: сцена вокруг холста ---------- */
.plan-card { border-radius: var(--radius-lg); overflow: hidden; }

.plan-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
}

.plan-stage {
    position: relative;
    /* тёмная «подложка» в мелкую точку, как холст в редакторе чертежей; сверху — тёплый свет */
    background:
        radial-gradient(90% 70% at 50% 0%, rgba(201, 164, 106, 0.12), transparent 70%),
        radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1.4px) 0 0 / 18px 18px,
        linear-gradient(180deg, #221D19, #151210);
    padding: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    user-select: none;
}

.plan-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px 18px;
    padding: 11px 16px;
    background: #161311;
    color: #B5ADA3;
    font-size: 11.5px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.legend-item { display: inline-flex; align-items: center; gap: 7px; }

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 5px;
    display: inline-block;
}

/* Образцы повторяют столы на схеме (.arch-status-*) */
.sw-free { background: linear-gradient(155deg, #7E5E44, #4C3626); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.sw-selected { background: linear-gradient(155deg, #F0D8A6, #B48C55); box-shadow: 0 0 0 2px rgba(240, 216, 166, .28), 0 0 8px rgba(240, 216, 166, .45); }
.sw-booked { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .22) 0 1.5px, transparent 1.5px 4px), linear-gradient(155deg, #B5ABA0, #988F86); }
.sw-occupied { background: linear-gradient(155deg, #4E4844, #34302C); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
/* Как .arch-status-dimmed: стол свободен, но рассчитан на другое число гостей */
.sw-dimmed { background: linear-gradient(155deg, #B6A594, #9A8977); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.sw-pending { background: linear-gradient(155deg, #E2C69C, #BE9A6C); outline: 1.5px dashed #D18A2A; outline-offset: 1px; }

/* Образец «Свободен» — как столы этого ресторана: скатерть (траттория), светлый кипарис (идзакая) */
.plan-card:has(.arch-trattoria-floor) .plan-legend :is(.sw-free, .sw-dimmed) { background: linear-gradient(160deg, #FFFDF8, #EFE7DA); box-shadow: inset 0 0 0 1px #CDBFAA; }
.plan-card:has(.arch-izakaya-floor) .plan-legend :is(.sw-free, .sw-dimmed) { background: linear-gradient(160deg, #E9D3AA, #D3B583); box-shadow: inset 0 0 0 1px #9C7E52; }
.plan-card:has(:is(.arch-trattoria-floor, .arch-izakaya-floor)) .plan-legend .sw-dimmed { opacity: 0.45; }

/* Телефон: поля вокруг зала уже — схема крупнее (fitZoomToScreen учитывает этот отступ) */
@media (max-width: 639.98px) {
    .plan-stage { padding: 10px; }
}

/* Зоны над схемой: на телефоне — одна строка с прокруткой пальцем (а не три строки кнопок) */
.zone-bar { scrollbar-width: none; }
.zone-bar::-webkit-scrollbar { display: none; }
.zone-bar > * { flex-shrink: 0; }

@media (max-width: 639.98px) {
    .plan-toolbar .zone-bar {
        flex: 1 1 100%;
        min-width: 0;
        overflow-x: auto;
        margin: 0 -14px;
        padding: 2px 14px;
        mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 28px), transparent);
    }
}

.zoom-ctl { display: inline-flex; align-items: center; gap: 2px; }
.zoom-ctl button { width: 26px; height: 26px; border-radius: 8px; color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; }
.zoom-ctl button:hover { background: rgba(28, 25, 23, 0.07); color: var(--ink); }
.zoom-ctl .ico { width: 14px; height: 14px; }
.zoom-ctl span { font-size: 11px; font-weight: 700; color: var(--muted); width: 38px; text-align: center; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   СХЕМА ЗАЛА: ПОЛЫ, СТЕНЫ, ДЕКОР, СТОЛЫ
   ========================================================================== */

.arch-floor {
    position: relative;
    border-radius: 14px;
    transform-origin: top left;
    /* наружная стена — тонкая тёмная рамка со светлой кромкой; мягкая тень «поднимает» зал над подложкой */
    box-shadow:
        inset 0 0 0 4px #2E2620,
        inset 0 0 0 5px rgba(255, 255, 255, 0.10),
        inset 0 0 90px rgba(40, 24, 10, 0.20),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 12px 28px -14px rgba(0, 0, 0, 0.55),
        0 40px 80px -30px rgba(0, 0, 0, 0.75);
}

/* Мягкий верхний свет над залом: середина чуть светлее, углы — в лёгкой тени */
.arch-floor::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(70% 60% at 50% 38%, rgba(255, 250, 240, 0.16), transparent 70%),
        radial-gradient(140% 110% at 50% 45%, transparent 58%, rgba(45, 28, 14, 0.12));
}

.arch-decor-layer { position: absolute; inset: 0; pointer-events: none; }

/* Пол 1: дубовая доска (lounge) — спокойная, без резких швов */
.arch-wood-floor {
    background-color: #D2BB9C;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.008 0.55' numOctaves='3' seed='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.32 0 0 0 0 0.20 0 0 0 0 0.10 0 0 0 0.14 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
        repeating-linear-gradient(180deg, rgba(70, 45, 20, 0.085) 0 1px, transparent 1px 26px),
        repeating-linear-gradient(180deg, rgba(255, 245, 225, 0.07) 0 26px, rgba(110, 75, 40, 0.035) 26px 52px, rgba(255, 245, 225, 0.03) 52px 78px, rgba(110, 75, 40, 0.05) 78px 104px),
        repeating-linear-gradient(90deg, transparent 0 239px, rgba(70, 45, 20, 0.07) 239px 240px);
    color: #1C1917;
}

/* Пол 2: тёплая каменная плитка (trattoria) — тонкие швы */
.arch-trattoria-floor {
    background-color: #E5D9C7;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
        linear-gradient(rgba(150, 125, 95, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(150, 125, 95, 0.15) 1px, transparent 1px),
        conic-gradient(rgba(255, 255, 255, 0.08) 25%, rgba(120, 90, 60, 0.03) 0 50%, rgba(255, 255, 255, 0.08) 0 75%, rgba(120, 90, 60, 0.03) 0);
    background-size: 200px 200px, 48px 48px, 48px 48px, 96px 96px;
    color: #1C1917;
}

/* Пол 3: татами (izakaya) — окантовка тоньше и мягче */
.arch-izakaya-floor {
    background-color: #D5CBA6;
    background-image:
        repeating-linear-gradient(90deg, rgba(70, 72, 52, 0.2) 0 2px, transparent 2px 120px),
        repeating-linear-gradient(0deg, rgba(70, 72, 52, 0.2) 0 2px, transparent 2px 60px),
        repeating-linear-gradient(0deg, rgba(120, 110, 70, 0.07) 0 1px, transparent 1px 3px),
        linear-gradient(180deg, rgba(255, 255, 240, 0.12), rgba(120, 110, 60, 0.05));
    color: #1C1917;
}

/* ---------- Декор ---------- */
.arch-decor {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.arch-decor-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.3;
    padding: 0 8px;
}

.arch-decor.is-vertical .arch-decor-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 8px 0;
}

/* Бар: тёмный камень, латунный поручень */
.arch-bar {
    background:
        linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.06) 48%, transparent 56%),
        radial-gradient(120% 90% at 30% 20%, #4A3E35 0%, #2A231E 55%, #1D1815 100%);
    border: 1px solid #110D0B;
    border-radius: 9px;
    box-shadow: inset 0 0 0 2px rgba(201, 164, 106, 0.7), inset 0 0 0 4px rgba(0, 0, 0, 0.35), 0 10px 22px -8px rgba(0, 0, 0, 0.6);
    color: #E6CF9F;
}

/* Сцена: тёмный подиум и световое пятно */
.arch-stage-box {
    background:
        radial-gradient(60% 90% at 50% 0%, rgba(255, 226, 170, 0.32), transparent 70%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 14px),
        linear-gradient(180deg, #2E2621, #1A1512);
    border: 1px solid #0E0B09;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 14px 26px -10px rgba(0, 0, 0, 0.6), inset 0 -3px 0 rgba(201, 164, 106, 0.55);
    color: #F1DFB9;
}

.arch-stage-box .arch-decor-label { font-size: 12px; letter-spacing: 0.3em; }

/* Служебные помещения: кухня, гардероб, WC — как на архитектурном плане: тонкая штриховка и рамка */
.arch-room-service {
    background:
        repeating-linear-gradient(135deg, rgba(60, 46, 34, 0.13) 0 1px, transparent 1px 8px),
        rgba(70, 55, 42, 0.10);
    border: 1.5px solid rgba(60, 46, 34, 0.32);
    border-radius: 8px;
    box-shadow: inset 0 0 0 3px rgba(255, 250, 240, 0.18);
    color: rgba(50, 38, 28, 0.72);
}

/* Отдельные залы и кабинеты: мягкий ковёр и пунктирная граница */
.arch-room-private {
    background:
        radial-gradient(70% 70% at 50% 50%, rgba(255, 248, 235, 0.28), rgba(255, 248, 235, 0.12)),
        repeating-linear-gradient(45deg, rgba(120, 90, 60, 0.04) 0 2px, transparent 2px 8px);
    border: 1.5px dashed rgba(98, 74, 50, 0.6);
    border-radius: 14px;
    color: #5E4630;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 8px 6px;
}

.arch-room-private .arch-decor-label { font-size: 10px; }

/* Декоративная зона: сад камней */
.arch-room-feature {
    background:
        radial-gradient(circle at 32% 38%, #8E887E 0 9px, transparent 10px),
        radial-gradient(circle at 64% 58%, #7E786E 0 12px, transparent 13px),
        radial-gradient(circle at 46% 74%, #9A948A 0 6px, transparent 7px),
        repeating-radial-gradient(circle at 32% 38%, #DCD4C4 0 3px, #CEC5B2 3px 6px);
    border: 2px solid #A39985;
    border-radius: 16px;
    color: #4D4535;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.12);
    align-items: flex-end;
    padding-bottom: 8px;
}

/* Лестница */
.arch-stairs {
    background: repeating-linear-gradient(180deg, #BFB5A8 0 8px, #8F857A 8px 10px);
    border: 2px solid #4A423B;
    border-radius: 4px;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.25);
}

.arch-stairs-label {
    background: #F4EEE4;
    color: #1C1917;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 7px;
    border-radius: 6px;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* Вход: тёмный придверный ковёр */
.arch-entrance {
    background: repeating-linear-gradient(90deg, #3B342E 0 2px, #2F2925 2px 5px);
    border-radius: 6px 6px 0 0;
    box-shadow: 0 -2px 0 rgba(201, 164, 106, 0.8) inset;
    color: #E6CF9F;
}

.arch-entrance .arch-decor-label::before { content: "↑  "; letter-spacing: 0; }

.arch-label { color: #5E4F40; }
.arch-label .arch-decor-label { font-size: 10px; letter-spacing: 0.2em; }

/* Окна: стекло с переплётом */
.arch-window {
    position: absolute;
    background:
        repeating-linear-gradient(0deg, transparent 0 58px, rgba(60, 74, 80, 0.75) 58px 60px),
        repeating-linear-gradient(90deg, transparent 0 58px, rgba(60, 74, 80, 0.75) 58px 60px),
        linear-gradient(90deg, #9DBDCA, #DCEDF2 50%, #9DBDCA);
    box-shadow: 0 0 0 1px rgba(50, 64, 70, 0.55), 0 0 18px rgba(170, 210, 225, 0.35);
}

/* Стена (перегородка): в лаунже тёмный камень, в траттории штукатурка, в идзакае тёмное дерево */
.arch-wall {
    position: absolute;
    background: linear-gradient(180deg, #5E5750, #3D3732);
    border-radius: 2px;
    box-shadow: 0 3px 6px -1px rgba(20, 14, 10, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.arch-trattoria-floor .arch-wall { background: linear-gradient(180deg, #EFE7DA, #CDBFAA); box-shadow: 0 3px 6px -1px rgba(60, 45, 30, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.arch-izakaya-floor .arch-wall { background: linear-gradient(180deg, #5A4330, #3B2B1E); }

/* Редактор зала (панель ресторана): элементы можно выбрать и перетащить */
.arch-floor.is-decor-editing .arch-decor-layer > * { pointer-events: auto; cursor: grab; touch-action: none; }
.arch-floor.is-decor-editing .arch-decor-layer > *:hover { outline: 1px dashed rgba(176, 138, 90, 0.8); outline-offset: 2px; }
.arch-decor-layer > .decor-selected { outline: 2px dashed var(--brass) !important; outline-offset: 3px; z-index: 5; }
.arch-decor-layer > .is-dragging { cursor: grabbing; opacity: 0.85; }
.decor-handle {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 16px;
    height: 16px;
    border-radius: 5px;
    background: var(--brass);
    border: 2px solid #FFFFFF;
    box-shadow: var(--shadow-sm);
    cursor: nwse-resize;
    touch-action: none;
    z-index: 2;
}

/* Растения: листва и тень от кадки */
.arch-plant {
    position: absolute;
    border-radius: 50%;
    /* крона из пяти «листьев» вокруг тёмной середины, блик сверху слева; кольцо — край кашпо */
    background:
        radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.24) 0 9%, transparent 26%),
        radial-gradient(circle at 50% 24%, #94B57E 0 19%, transparent 20%),
        radial-gradient(circle at 75% 45%, #82A86D 0 19%, transparent 20%),
        radial-gradient(circle at 65% 74%, #719860 0 19%, transparent 20%),
        radial-gradient(circle at 35% 74%, #7CA268 0 19%, transparent 20%),
        radial-gradient(circle at 25% 45%, #8AAE74 0 19%, transparent 20%),
        radial-gradient(circle at 50% 50%, #5C8249 0 40%, #4B6C3C 41% 58%, #6F9659 59%);
    box-shadow: 0 6px 12px -4px rgba(30, 40, 20, 0.45), 0 0 0 3px rgba(150, 120, 90, 0.45), 0 0 0 4px rgba(60, 45, 30, 0.15);
}

.arch-column {
    position: absolute;
    background: radial-gradient(circle at 35% 30%, #A39C93, #6E675F);
    border-radius: 4px;
    box-shadow: 0 6px 10px -3px rgba(0, 0, 0, 0.45);
}

/* ---------- Столы ----------
   Внешний вид задаётся переменными: --top (столешница), --chair (обивка стульев),
   --bench (диваны). Состояния (занят, выбран…) только меняют переменные. */
.arch-table {
    --top: linear-gradient(155deg, #7E5E44 0%, #614532 52%, #4C3626 100%);
    --grain: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 7px);
    --edge: rgba(36, 24, 14, 0.7);
    --ink-on: #FBF4E8;
    --ink-sub: rgba(251, 244, 232, 0.66);
    --chair: #A57B58;
    --chair-back: #6A4A33;
    --bench: #2F5446;
    --bench-edge: #1E382E;
    --lift: 0 1px 1px rgba(28, 18, 10, 0.16), 0 5px 10px -3px rgba(28, 18, 10, 0.32), 0 16px 24px -12px rgba(28, 18, 10, 0.45);
    --halo: transparent;
    position: absolute;
    user-select: none;
    touch-action: none;
    background: var(--grain), var(--top);
    border: 1px solid var(--edge);
    border-radius: 9px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -2px 0 rgba(0, 0, 0, 0.10), var(--lift);
    color: var(--ink-on);
    transform: rotate(var(--rot, 0deg)) scale(var(--scale, 1));
    transition: transform .22s cubic-bezier(.2, .8, .3, 1.2), box-shadow .2s ease, filter .2s ease, opacity .2s ease;
    z-index: 20;
}

.arch-table.is-round {
    border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.16), transparent 55%), var(--grain), var(--top);
}

/* Кольцо вокруг стола со стульями: при наведении — тонкое, у выбранного — латунное, второе кольцо «дышит».
   ::before — под стульями, ::after — волна выбранного стола */
.arch-table::before,
.arch-table::after {
    content: "";
    position: absolute;
    inset: calc(-1 * var(--halo-gap, 17px));
    border-radius: 18px;
    pointer-events: none;
}

.arch-table::before {
    border: 1.5px solid var(--halo);
    transition: border-color .2s ease, background-color .2s ease;
}

.arch-table.is-booth { --halo-gap: 21px; }
.arch-table.is-round { --halo-gap: 15px; }
.arch-table.is-round::before,
.arch-table.is-round::after { border-radius: 50%; }
.arch-table.arch-ushape::before,
.arch-table.arch-ushape::after { display: none; }

/* Траттория: белые скатерти и деревянные стулья */
.arch-trattoria-floor .arch-table {
    --top: linear-gradient(160deg, #FFFDF8, #EFE7DA);
    --grain: radial-gradient(circle at 50% 50%, transparent 60%, rgba(160, 140, 110, 0.10));
    --edge: #CDBFAA;
    --ink-on: #3A2E25;
    --ink-sub: #8C7B69;
    --chair: #8B6A4A;
    --chair-back: #563F2C;
    --lift: 0 6px 12px -6px rgba(60, 45, 30, 0.45), 0 1px 3px rgba(60, 45, 30, 0.2);
}

/* Идзакая: столы из светлого кипариса и тёмно-синие подушки */
.arch-izakaya-floor .arch-table {
    --top: linear-gradient(160deg, #E9D3AA, #D3B583);
    --grain: repeating-linear-gradient(90deg, rgba(120, 80, 30, 0.08) 0 1px, transparent 1px 5px);
    --edge: #9C7E52;
    --ink-on: #3B2A16;
    --ink-sub: #7A6040;
    --chair: #34405A;
    --chair-back: #1F273A;
    --bench: #34405A;
    --bench-edge: #1F273A;
}

.arch-table.is-bookable:hover,
.arch-table.is-clickable:hover {
    --scale: 1.05;
    --halo: rgba(201, 164, 106, 0.75);
    z-index: 40;
    filter: brightness(1.05);
    cursor: pointer;
}

/* Клавиатура: тот же ориентир, что и мышью */
.arch-table.is-bookable:focus-visible,
.arch-table.is-clickable:focus-visible { outline: none; --halo: var(--brass); }

.arch-table.is-draggable { cursor: grab; }

.arch-table.is-dragging {
    cursor: grabbing;
    z-index: 60;
    transition: none;
    --scale: 1.04;
    filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.35));
}

/* Подпись: номер и вместимость (всегда горизонтально, даже у повёрнутых столов) */
.t-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    pointer-events: none;
    transform: rotate(calc(-1 * var(--rot, 0deg)));
    z-index: 3;
}

.t-label-top { bottom: auto; height: var(--u-bar); }

.t-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-on);
    letter-spacing: -0.01em;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.t-seats {
    font-size: 9px;
    font-weight: 600;
    color: var(--ink-sub);
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Мелкий масштаб (телефон, applyZoom в client.js): номер стола крупнее — на экране около 7,5 px,
   вместимость скрыта (её видно в панели брони после выбора стола) */
.arch-floor.is-compact .t-name { font-size: calc(7.5px / var(--zoom, 1)); letter-spacing: -0.02em; }
.arch-floor.is-compact .t-seats { display: none; }
.plan-card:has(.arch-floor.is-compact) .legend-note { display: none; }

/* Стулья: мягкое сиденье со скруглённой спинкой с внешней стороны, чуть отступают от стола.
   Положение вдоль стороны задаёт addChairs (left/top в %), центрирование — translate */
.arch-chair {
    position: absolute;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 70%), var(--chair);
    border-radius: 4px;
    pointer-events: none;
}

.chair-t, .chair-b, .chair-round { width: 13px; height: 9px; }
.chair-l, .chair-r { width: 9px; height: 13px; }
.chair-t { top: -12px; translate: -50% 0; box-shadow: inset 0 3px 0 var(--chair-back), 0 1px 2px rgba(0, 0, 0, 0.25); border-radius: 5px 5px 3px 3px; }
.chair-b { bottom: -12px; translate: -50% 0; box-shadow: inset 0 -3px 0 var(--chair-back), 0 1px 2px rgba(0, 0, 0, 0.25); border-radius: 3px 3px 5px 5px; }
.chair-l { left: -12px; translate: 0 -50%; box-shadow: inset 3px 0 0 var(--chair-back), 0 1px 2px rgba(0, 0, 0, 0.25); border-radius: 5px 3px 3px 5px; }
.chair-r { right: -12px; translate: 0 -50%; box-shadow: inset -3px 0 0 var(--chair-back), 0 1px 2px rgba(0, 0, 0, 0.25); border-radius: 3px 5px 5px 3px; }

/* У круглого стола стул стоит в центре и сдвигается наружу поворотом (transform из addChairs) */
.chair-round {
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    box-shadow: inset 0 3px 0 var(--chair-back), 0 1px 2px rgba(0, 0, 0, 0.25);
    border-radius: 5px 5px 3px 3px;
}

/* Диваны вдоль длинных сторон (форма booth): бархат с мягкой строчкой */
.arch-bench {
    position: absolute;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 12px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 70%),
        var(--bench);
    border-radius: 7px;
    pointer-events: none;
}

.bench-t { left: 2px; right: 2px; top: -17px; height: 13px; box-shadow: inset 0 4px 0 var(--bench-edge), 0 1px 3px rgba(0, 0, 0, 0.25); }
.bench-b { left: 2px; right: 2px; bottom: -17px; height: 13px; box-shadow: inset 0 -4px 0 var(--bench-edge), 0 1px 3px rgba(0, 0, 0, 0.25); }
.bench-l { top: 2px; bottom: 2px; left: -17px; width: 13px; box-shadow: inset 4px 0 0 var(--bench-edge), 0 1px 3px rgba(0, 0, 0, 0.25); }
.bench-r { top: 2px; bottom: 2px; right: -17px; width: 13px; box-shadow: inset -4px 0 0 var(--bench-edge), 0 1px 3px rgba(0, 0, 0, 0.25); }

/* П-образный банкетный стол */
.arch-table.arch-ushape {
    background: none;
    border: none;
    box-shadow: none;
}

.u-wrap {
    position: absolute;
    inset: 0;
    filter: drop-shadow(0 6px 7px rgba(28, 18, 10, 0.45));
}

.u-top {
    position: absolute;
    inset: 0;
    background: var(--grain), var(--top);
    clip-path: polygon(0 0, 100% 0, 100% 100%, calc(100% - var(--u-leg)) 100%, calc(100% - var(--u-leg)) var(--u-bar), var(--u-leg) var(--u-bar), var(--u-leg) 100%, 0 100%);
}

/* ---------- Состояния столов ---------- */

/* Подходит по вместимости — тонкая латунная кромка столешницы */
.arch-table.arch-status-optimal { --edge: rgba(214, 178, 118, 0.95); }

/* Выбран гостем / хостес — латунная столешница, мягкое свечение, кольцо вокруг стола и волна от него */
.arch-table.arch-status-selected {
    --top: linear-gradient(155deg, #F2DCAB 0%, #D2AE72 52%, #B08A52 100%);
    --grain: linear-gradient(transparent, transparent);
    --edge: rgba(126, 95, 51, 0.8);
    --ink-on: #1C1917;
    --ink-sub: rgba(28, 25, 23, 0.66);
    --halo: rgba(222, 190, 132, 0.95);
    --scale: 1.08;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 0 0 3px rgba(240, 216, 166, 0.35),
        0 0 22px 4px rgba(232, 200, 140, 0.45),
        0 16px 28px -10px rgba(0, 0, 0, 0.55);
    z-index: 50;
}

.arch-table.arch-status-selected::before { background-color: rgba(232, 200, 140, 0.10); }

.arch-table.arch-status-selected::after {
    border: 1.5px solid rgba(222, 190, 132, 0.9);
    animation: halo-wave 2.4s cubic-bezier(.2, .6, .3, 1) infinite;
}

@keyframes halo-wave {
    from { opacity: 0.9; scale: 1; }
    to { opacity: 0; scale: 1.18; }
}

.arch-table.arch-ushape.arch-status-selected { box-shadow: none; }
.arch-ushape.arch-status-selected .u-wrap { filter: drop-shadow(0 0 3px rgba(237, 211, 158, 0.95)) drop-shadow(0 0 14px rgba(232, 200, 140, 0.5)) drop-shadow(0 10px 12px rgba(0, 0, 0, 0.45)); }

/* Забронирован на это время — плоский, тёплый серый с тонкой штриховкой, без тени */
.arch-table.arch-status-booked {
    --top: linear-gradient(155deg, #B8AEA3, #9B9288);
    --grain: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 1.5px, transparent 1.5px 6px);
    --edge: rgba(110, 100, 90, 0.6);
    --ink-on: rgba(255, 255, 255, 0.96);
    --ink-sub: rgba(255, 255, 255, 0.74);
    --chair: #BFB5AA;
    --chair-back: #A0968B;
    --bench: #B5ABA0;
    --bench-edge: #9A9085;
    --lift: 0 1px 2px rgba(0, 0, 0, 0.14);
    cursor: not-allowed;
}

/* Гости в зале — графит */
.arch-table.arch-status-occupied {
    --top: linear-gradient(155deg, #4E4844, #34302C);
    --grain: linear-gradient(transparent, transparent);
    --edge: rgba(20, 18, 16, 0.8);
    --ink-on: #E6DFD6;
    --ink-sub: rgba(230, 223, 214, 0.62);
    --chair: #6B645E;
    --chair-back: #443E39;
    --bench: #5E5752;
    --bench-edge: #3D3834;
    cursor: not-allowed;
}

/* Бронь только через хостес (панель) — точечное кольцо вокруг стола со стульями */
.arch-table.arch-phone-only:not(:where(.arch-status-selected)) { --halo: rgba(28, 25, 23, 0.5); }
.arch-table.arch-phone-only:not(:where(.arch-status-selected))::before { border-style: dotted; border-width: 2px; }

/* Новая заявка (панель хостес) — пунктирное оранжевое кольцо вокруг стола со стульями */
.arch-table.arch-status-pending {
    --top: linear-gradient(155deg, #E2C69C, #BE9A6C);
    --grain: linear-gradient(transparent, transparent);
    --edge: rgba(140, 106, 63, 0.8);
    --ink-on: #2B2015;
    --ink-sub: rgba(43, 32, 21, 0.66);
    --halo: #D18A2A;
}

.arch-table.arch-status-pending::before { border-style: dashed; border-width: 2px; }

/* Бронь только через хостес */
.arch-table.arch-status-offline { opacity: 0.55; }

/* Не подходит под фильтр зоны или по вместимости */
.arch-table.arch-status-dimmed {
    --lift: 0 1px 2px rgba(28, 18, 10, 0.12);
    opacity: 0.45;
    filter: saturate(0.5) brightness(1.05);
}

.arch-table.arch-status-dimmed:hover { opacity: 0.8; }

/* Карточка над столом при наведении мышью (сайт гостя, showTableTip в client.js) */
.table-tip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 80;
    min-width: 172px;
    max-width: 260px;
    padding: 10px 12px 11px;
    border-radius: 12px;
    background: #1F1B18;
    color: #F4EEE4;
    font-size: 12px;
    line-height: 1.35;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 14px 32px -12px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    opacity: 0;
    translate: 0 4px;
    transition: opacity .14s ease, translate .14s ease;
}

.table-tip.is-below { translate: 0 -4px; }
.table-tip.is-visible { opacity: 1; translate: 0 0; }

/* Хвостик к столу */
.table-tip::after {
    content: "";
    position: absolute;
    left: var(--arrow-x, 50%);
    bottom: -5px;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    background: #1F1B18;
    border-radius: 0 0 2px 0;
    rotate: 45deg;
}

.table-tip.is-below::after { bottom: auto; top: -5px; border-radius: 2px 0 0 0; }

.table-tip-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.table-tip-head b { font-size: 13px; font-weight: 700; color: #FFFFFF; }
.table-tip-meta { margin-top: 3px; color: #B5ADA3; }
.table-tip-hint { margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(255, 255, 255, 0.08); color: #D8C39A; font-size: 11.5px; }

.table-tip-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: #D9D1C5; white-space: nowrap; }
.table-tip-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9A9088; }
.table-tip-status.is-free::before { background: #9DBB86; box-shadow: 0 0 0 3px rgba(157, 187, 134, 0.18); }
.table-tip-status.is-selected::before { background: #E3C48C; box-shadow: 0 0 0 3px rgba(227, 196, 140, 0.2); }
.table-tip-status.is-other::before { background: #B6A594; }
.table-tip-status.is-booked::before { background: #B5ABA0; }
.table-tip-status.is-occupied::before { background: #6B645E; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25); }

/* Кнопка удаления стола в конструкторе */
.arch-table-delete {
    position: absolute;
    top: -11px;
    right: -11px;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    background: #B4413B;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    z-index: 5;
    display: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transform: rotate(calc(-1 * var(--rot, 0deg)));
}

.arch-table.is-draggable:hover .arch-table-delete { display: block; }

/* ---------- AI-помощник ---------- */
.ai-msg-bot {
    margin-right: 28px;
    background: var(--card);
    border: 1px solid var(--line);
    padding: 11px 13px;
    border-radius: 16px 16px 16px 6px;
    color: var(--ink-soft);
    line-height: 1.55;
}

.ai-msg-user {
    margin-left: auto;
    max-width: calc(100% - 28px);
    width: fit-content;
    background: var(--ink);
    color: #FFFFFF;
    padding: 9px 13px;
    border-radius: 16px 16px 6px 16px;
    line-height: 1.55;
}

#ai-chat-messages { max-height: min(360px, 52vh); min-height: 140px; }

/* Кнопки-ответы под сообщением помощника */
.ai-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    animation: ai-choices-in .25s ease both;
}

@keyframes ai-choices-in {
    from { opacity: 0; translate: 0 4px; }
    to { opacity: 1; translate: 0 0; }
}

.ai-choice {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink);
    padding: 7px 13px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: var(--card);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.ai-choice:hover { border-color: var(--ink); }
.ai-choice.is-primary { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.ai-choice.is-primary:hover { background: #000000; }

/* Постоянные быстрые действия над полем ввода */
.ai-quickbar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 12px 0;
    background: #FFFFFF;
    border-top: 1px solid var(--line);
    scrollbar-width: none;
}

.ai-quickbar::-webkit-scrollbar { display: none; }

.ai-quick {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}

.ai-quick:hover { color: var(--ink); border-color: var(--ink); }

@media (pointer: coarse) {
    .ai-choice { min-height: 40px; padding: 9px 15px; font-size: 13px; }
    .ai-quick { min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
    .ai-choices { animation: none; }
}

.fab {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 18px;
    border-radius: 999px;
    background: var(--ink);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 16px 36px -12px rgba(28, 25, 23, 0.75);
    transition: transform .18s ease;
}

.fab:hover { transform: translateY(-2px); }
.fab .ico { width: 16px; height: 16px; color: var(--brass-2); }

/* ---------- Панель ресторана ---------- */
.admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 13px 4px;
    margin-right: 22px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.admin-tab .ico { width: 16px; height: 16px; }
.admin-tab:hover { color: var(--ink); }
.admin-tab.is-active { color: var(--ink); border-bottom-color: var(--brass); }

.stat {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    font-size: 12px;
    color: var(--muted);
}

.stat strong { font-size: 14px; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }

.res-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--card);
    font-size: 12.5px;
    transition: border-color .15s, box-shadow .15s;
}

.res-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.res-card.is-inactive { opacity: 0.6; }

.login-shell {
    background:
        radial-gradient(60% 60% at 80% 10%, rgba(201, 164, 106, 0.22), transparent 70%),
        radial-gradient(50% 50% at 10% 90%, rgba(63, 90, 76, 0.25), transparent 70%),
        linear-gradient(160deg, #24201C, #120F0D);
}

.toast {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid;
    box-shadow: var(--shadow-md);
}

.toast.is-success { background: #F3F8F4; border-color: #CFE2D5; color: #2F5541; }
.toast.is-error { background: #FDF3F2; border-color: #EFCFCB; color: #8E3730; }

/* ---------- Подвал ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    background: var(--cream);
}

/* ---------- Панель ресторана: карточка, часы работы, особые дни ---------- */
.rest-photo {
    position: relative;
    height: 220px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #EFE9E1, #E2D9CC);
    border: 1px solid var(--line);
}

.rest-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rest-photo img:not([src]), .rest-photo img[src=""] { visibility: hidden; }

.rest-photo-bar {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rest-photo-status {
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.btn-glass:hover { background: #FFFFFF; }
.btn-glass:focus-within { outline: 2px solid var(--brass); outline-offset: 2px; }

.hours-row {
    display: grid;
    grid-template-columns: 34px 92px 1fr;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    font-size: 13px;
}

.hours-row .day { font-weight: 700; color: var(--ink); }
.hours-row .times { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hours-row .times.hidden, .hours-row .overnight.hidden { display: none; }
.hours-row .times .input { width: 116px; padding-top: 7px; padding-bottom: 7px; } /* хватает и для «12:00 AM» */
.hours-row .closed-label { color: var(--muted-2); font-size: 12.5px; }

/* Телефон: день и галочка — первой строкой, время открытия и закрытия — второй */
@media (max-width: 560px) {
    .hours-row { grid-template-columns: 34px 1fr; row-gap: 4px; padding: 4px 0; }
    .hours-row .times { grid-column: 2 / -1; flex-wrap: wrap; }
    .hours-row .times .input { width: auto; flex: 1 1 0; min-width: 0; }
    .hours-row .overnight { flex-basis: 100%; }
}
.hours-row .overnight { font-size: 11px; color: var(--brass-deep); font-weight: 600; }

.special-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--cream);
    border: 1px solid var(--line);
}

.special-item .when { font-weight: 700; color: var(--ink); }
.special-item .what { font-size: 12px; color: var(--muted); }

/* ---------- Согласие с политикой (форма входа) ---------- */
.consent-row { font-size: 12px; color: var(--muted); }
.consent-row .link { font-weight: 600; }
.check-row input[aria-invalid="true"] { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 3px; }

/* ---------- Страница документов (privacy.html: без Tailwind и скриптов) ---------- */
.legal-wrap { max-width: 760px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.legal-head { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.legal-brand { font-size: 22px; }
.legal { padding-top: 40px; padding-bottom: 64px; color: var(--ink-soft); font-size: 15px; line-height: 1.7; }
.legal h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; color: var(--ink); margin: 10px 0 8px; font-weight: 600; }
.legal h2 { font-size: 26px; line-height: 1.25; color: var(--ink); margin: 40px 0 8px; padding-top: 28px; border-top: 1px solid var(--line); font-weight: 600; }
.legal h3 { font-size: 15.5px; color: var(--ink); font-weight: 700; margin: 24px 0 6px; }
.legal p { margin: 0 0 10px; }
.legal ul { margin: 0 0 10px; padding-left: 20px; list-style: disc; }
.legal li { margin: 5px 0; }
.legal li::marker { color: var(--brass); }

/* Страница 404 (404.html): по центру экрана, три языка, кнопки на главную */
.legal.not-found { min-height: calc(100vh - 64px); display: flex; flex-direction: column; justify-content: center; padding-bottom: 96px; }
.not-found-langs { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: 19px; color: var(--muted); }
.not-found-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px !important; }
.legal b { color: var(--ink); font-weight: 650; }
.legal section { scroll-margin-top: 80px; }
.legal-meta { font-size: 13px; color: var(--muted); }
.legal-foot { margin-top: 32px; }
.legal-note { margin: 20px 0 8px; padding: 14px 16px; border-radius: 14px; background: var(--brass-soft); border: 1px solid #E8D8BE; color: #6E5230; font-size: 14px; line-height: 1.6; }
.legal-note b { color: #6E5230; }
.legal-fill { background: var(--amber-soft); border-bottom: 1px dashed var(--amber); padding: 0 4px; border-radius: 4px; color: var(--amber); font-weight: 600; }

/* ---------- Галочка с пояснением (согласие на сообщения в WhatsApp) ---------- */
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--ink-soft);
    cursor: pointer;
    user-select: none;
}

.check-row input {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--brass-deep);
    cursor: pointer;
}

.check-row b { color: var(--ink); font-weight: 650; }

/* ---------- Анимации при прокрутке (initReveal в config.js) ----------
   Анимируются свойства translate/scale, а не transform — поэтому эффекты наведения
   (transform у карточек) не конфликтуют с появлением. */
.has-reveal [data-reveal] { opacity: 0; }

.has-reveal [data-reveal].is-revealed {
    animation: reveal-up .9s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: var(--reveal-delay, 0ms);
}

.has-reveal [data-reveal="fade"].is-revealed { animation-name: reveal-fade; animation-duration: 1.1s; }
.has-reveal [data-reveal="zoom"].is-revealed { animation-name: reveal-zoom; animation-duration: 1s; }

@keyframes reveal-up { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
@keyframes reveal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes reveal-zoom { from { opacity: 0; translate: 0 22px; scale: .975; } to { opacity: 1; translate: 0 0; scale: 1; } }

/* Схема зала: столы появляются волной (playPlanIntro), декор — плавно */
.plan-intro .arch-decor-layer { animation: fade-in .7s ease backwards; }

.plan-intro .arch-table {
    animation: table-in .6s cubic-bezier(.2, .8, .25, 1.15) backwards;
    animation-delay: var(--wave, 0ms);
}

@keyframes table-in { from { opacity: 0; scale: .78; } }

/* ---------- Мелочи ---------- */
.scroll-thin { scrollbar-width: thin; scrollbar-color: #D9D1C5 transparent; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .has-reveal [data-reveal] { opacity: 1; }
}

/* ==========================================================================
   ПАНЕЛЬ РЕСТОРАНА НА ПЛАНШЕТЕ И ТЕЛЕФОНЕ (admin.html)
   ========================================================================== */
/* Шапка: выпадающий список ресторана сжимается, вкладки не переносятся, а прокручиваются */
.admin-rest-pill { flex: 1 1 auto; }
.admin-rest-pill select { width: 100%; max-width: 280px; }
.admin-tabs { display: flex; overflow-x: auto; scrollbar-width: none; margin-bottom: -1px; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 639px) { .admin-tab { margin-right: 16px; } }

/* Карточка стола / элемента зала: на экранах уже 1024 px — выезжающая снизу панель */
@keyframes sheet-up { from { translate: 0 100%; } to { translate: 0 0; } }
@media (max-width: 1023px) {
    #table-panel:not(.hidden) {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        max-height: min(78vh, 680px);
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -20px 50px -12px rgba(28, 25, 23, 0.5);
        padding-bottom: env(safe-area-inset-bottom);
        animation: sheet-up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    #table-panel:not(.hidden)::before {   /* «язычок» сверху */
        content: "";
        position: absolute;
        top: 7px;
        left: 50%;
        width: 40px;
        height: 4px;
        margin-left: -20px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.35);
        z-index: 1;
    }
}

/* Сенсорный экран: кнопки и поля не меньше 40 px — удобно попадать пальцем */
@media (pointer: coarse) {
    html[data-app="admin"] .btn-xs,
    html[data-app="admin"] .btn-sm,
    html[data-app="admin"] .seg-item,
    html[data-app="admin"] .input-sm { min-height: 40px; }
    html[data-app="admin"] .icon-btn { min-width: 40px; min-height: 40px; }
    html[data-app="admin"] .zoom-ctl button { width: 40px; height: 40px; }
    html[data-app="admin"] .btn-xs { padding-left: 12px; padding-right: 12px; }
}

/* Статус сообщения гостю в WhatsApp в карточке брони */
.wa-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
}
.wa-status .ico { width: 13px; height: 13px; }
.wa-status.is-sent { color: var(--green); }
.wa-status.is-failed { color: var(--rose); }

/* ---------- Аналитика (вкладка панели ресторана) ----------
   Цвет столбиков — насыщенная латунь: проверена валидатором палитры
   (контраст ≥ 3:1 к белой карточке, не «серая»). Текст — только текстовыми цветами. */
:root {
    --chart: #B07D3A;
    --chart-hover: #8F6430;
}

.stats-body { transition: opacity .2s ease; }
.stats-body.is-loading { opacity: .5; pointer-events: none; }

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
@media (min-width: 768px) { .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .kpi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.kpi {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 18px;
    min-width: 0;
}
.kpi-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; line-height: 1.15; margin-top: 4px; }
.kpi-delta { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.kpi-delta.is-good { color: var(--green); font-weight: 600; }
.kpi-delta.is-bad { color: var(--rose); font-weight: 600; }
.kpi-arrow { font-weight: 800; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

.stats-facts { font-size: 13px; color: var(--ink-soft); }

.stats-card { padding: 20px 22px; min-width: 0; }
.stats-card-head { margin-bottom: 14px; }
.stats-card-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.stats-card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stats-empty { font-size: 13px; color: var(--muted); padding: 18px 0; }

/* Вертикальные столбики: сетка — волосяные линии, столбик ≤ 24px, скругление только сверху */
.col-plot { position: relative; height: 168px; margin: 14px 0 0 30px; }
.col-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.col-tick {
    position: absolute; right: calc(100% + 8px); top: 0; translate: 0 -50%;
    font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.col-bars { position: absolute; inset: 0; display: flex; align-items: stretch; }
.col-slot {
    flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center;
    cursor: default; outline: none;
}
.col-bar {
    position: relative;
    width: min(24px, calc(100% - 2px));
    background: var(--chart);
    border-radius: 4px 4px 0 0;
    transition: background-color .12s ease;
}
.col-slot:hover .col-bar, .col-slot:focus-visible .col-bar { background: var(--chart-hover); }
.col-slot:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); border-radius: 6px; }
.col-cap {
    position: absolute; bottom: 100%; left: 50%; translate: -50% -4px;
    font-size: 11px; font-weight: 700; color: var(--ink); white-space: nowrap;
}
.col-x { display: flex; margin: 6px 0 0 30px; }
.col-x span {
    flex: 1 1 0; min-width: 0; text-align: center; font-size: 11px; color: var(--muted);
    white-space: nowrap; overflow: visible; font-variant-numeric: tabular-nums;
}

/* Горизонтальные полосы: подпись и число над полосой, полоса растёт от левого края */
.hbar-list { display: flex; flex-direction: column; gap: 12px; }
.hbar-row { outline: none; border-radius: 8px; }
.hbar-row:focus-visible { box-shadow: 0 0 0 2px var(--ink); }
.hbar-head { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 5px; }
.hbar-label { color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }
.hbar-value { color: var(--ink); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hbar-fill { height: 8px; background: var(--chart); border-radius: 0 4px 4px 0; transition: background-color .12s ease; }
.hbar-row:hover .hbar-fill, .hbar-row:focus-visible .hbar-fill { background: var(--chart-hover); }

/* Подсказка: сначала число, потом подпись */
.stats-tip {
    position: fixed; z-index: 80; pointer-events: none;
    background: var(--ink); color: #FFFFFF;
    padding: 8px 11px; border-radius: 10px;
    box-shadow: 0 10px 24px -10px rgba(28, 25, 23, 0.6);
    display: flex; flex-direction: column; gap: 1px; max-width: 260px;
}
.stats-tip strong { font-size: 13px; font-weight: 700; }
.stats-tip span { font-size: 11.5px; color: #D6CFC5; }

/* Таблица под графиком */
.stats-table { margin-top: 14px; font-size: 12.5px; }
.stats-table summary { cursor: pointer; color: var(--muted); font-weight: 600; width: fit-content; }
.stats-table summary:hover { color: var(--ink); }
.stats-table table { width: 100%; margin-top: 10px; border-collapse: collapse; }
.stats-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); }
.stats-table td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.stats-table th:not(:first-child), .stats-table td:not(:first-child) { text-align: right; }

@media (pointer: coarse) {
    .stats-table summary { min-height: 40px; display: flex; align-items: center; }
}

/* ---------- Вход через Google (форма входа) ----------
   Белая кнопка с фирменным знаком G — по правилам оформления кнопок Google. */
.auth-google { display: flex; flex-direction: column; gap: 10px; }
.btn-google {
    background: #FFFFFF;
    color: #1F1F1F;
    border: 1px solid #747775;
    gap: 10px;
}
.btn-google:hover:not(:disabled) { background: #F7F8F8; border-color: #1F1F1F; }
.btn-google:disabled { opacity: .7; cursor: progress; }
.google-logo { width: 18px; height: 18px; flex: none; }
.auth-legal { font-size: 11.5px; line-height: 1.5; color: var(--muted); text-align: center; }
.auth-or {
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; color: var(--muted-2); margin: 2px 0 2px;
}
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Шахматка броней (панель ресторана, «Зал и брони» → «Шахматка») ----------
   Столы по строкам, время по горизонтали; колонка столов и шкала часов прилипают при прокрутке. */
.timeline { overflow: auto; max-height: 72vh; background: var(--card); position: relative; overscroll-behavior: contain; }
.tl-inner { position: relative; }
.tl-head { display: flex; position: sticky; top: 0; z-index: 6; height: 34px; background: var(--cream); border-bottom: 1px solid var(--line); }
.tl-corner {
    position: sticky; left: 0; z-index: 7; width: 132px; flex: none;
    display: flex; align-items: center; padding: 0 12px;
    background: var(--cream); border-right: 1px solid var(--line);
    font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.tl-hours { position: relative; flex: none; height: 100%; }
.tl-hour {
    position: absolute; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 6px;
    border-left: 1px solid var(--line); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.tl-body { position: relative; }
.tl-floor {
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 6px 12px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-deep);
}
.tl-floor span { position: sticky; left: 12px; }
.tl-row { display: flex; height: 44px; border-bottom: 1px solid var(--line); }
.tl-name {
    position: sticky; left: 0; z-index: 4; width: 132px; flex: none;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1px;
    padding: 0 12px; text-align: left; background: var(--card); border-right: 1px solid var(--line); cursor: pointer;
}
.tl-name b { font-size: 13px; color: var(--ink); line-height: 1.1; }
.tl-name span { font-size: 10.5px; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-name:hover b { text-decoration: underline; }
.tl-row.is-selected .tl-name { background: var(--brass-soft); box-shadow: inset 3px 0 0 var(--brass); }
.tl-track {
    position: relative; flex: none; cursor: pointer;
    background-image: linear-gradient(to right, var(--line) 1px, transparent 1px), linear-gradient(to right, #F4F0EA 1px, transparent 1px);
    background-size: var(--tl-hour) 100%, var(--tl-step) 100%;
}
.tl-track:hover { background-color: #FCFAF6; }
.tl-row.is-drop .tl-track { background-color: var(--brass-soft); }
.tl-lines { position: absolute; top: 0; bottom: 0; z-index: 3; pointer-events: none; }
.tl-slice { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--brass); opacity: .75; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--rose); }
.tl-now span {
    position: absolute; top: 4px; left: 4px; padding: 1px 6px; border-radius: 6px;
    background: var(--rose); color: #FFFFFF; font-size: 10px; font-weight: 700; white-space: nowrap;
}
.tl-empty { padding: 24px; font-size: 13px; color: var(--muted); }

.tl-bar {
    position: absolute; top: 6px; height: 32px; z-index: 2;
    display: flex; align-items: center; gap: 6px; padding: 0 8px;
    border-radius: 8px; border: 1px solid transparent;
    font-size: 11.5px; line-height: 1; white-space: nowrap; overflow: hidden; text-align: left;
    cursor: pointer; transition: box-shadow .12s ease;
}
.tl-bar:hover, .tl-bar:focus-visible { box-shadow: 0 4px 12px -4px rgba(28, 25, 23, .45); z-index: 4; }
.tl-bar-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-bar-who { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl-bar-party { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; margin-left: auto; }
.tl-bar-party .ico, .tl-bar-party svg { width: 12px; height: 12px; }
.tl-bar.is-confirmed { background: #E7DFD3; border-color: #CDBFAD; color: var(--ink); }
.tl-bar.is-pending { background: #FBF1E1; border: 1.5px dashed #D18A2A; color: #7A4E14; }
.tl-bar.is-seated { background: #4A4440; border-color: #4A4440; color: #FFFFFF; }
.tl-bar.is-completed { background: #F3F0EB; border-color: var(--line); color: var(--muted); }
.tl-bar.is-noshow { background: var(--rose-soft); border-color: #F0C9C4; color: var(--rose); }
.tl-bar.is-noshow .tl-bar-who { text-decoration: line-through; }
.tl-bar.is-current { outline: 2px solid var(--ink); outline-offset: 1px; }
.tl-bar.is-movable { cursor: grab; }
.tl-bar.is-dragging { cursor: grabbing; z-index: 8; opacity: .92; box-shadow: 0 10px 24px -8px rgba(28, 25, 23, .55); transition: none; }

@media (pointer: coarse) {
    .tl-row { height: 48px; }
    .tl-bar { height: 36px; }
}

/* Выбор языка в шапке сайта гостя (РУС / ҚАЗ / ENG) — выглядит как кнопка btn-ghost btn-sm */
.lang-select {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1;
    color: var(--ink-soft);
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%2378716C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 7px center / 11px 11px;
    border: 0;
    border-radius: 11px;
    padding: 9px 22px 9px 10px;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.lang-select:hover { background-color: rgba(28, 25, 23, 0.05); color: var(--ink); }
.lang-select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lang-select option { font-weight: 600; color: var(--ink); }
@media (pointer: coarse) { .lang-select { min-height: 40px; } }

/* ---------- Отзывы гостей ---------- */
.stars { display: inline-flex; align-items: center; gap: 1px; flex: none; }
.stars .star { color: var(--line-2); display: inline-flex; }
.stars .star.is-on { color: var(--brass); }
.stars .star svg, .stars .star .ico { width: 16px; height: 16px; }
.reviews-summary .stars .star svg, .reviews-summary .stars .star .ico { width: 18px; height: 18px; }
.rating-count { font-weight: 600; color: var(--muted); margin-left: 4px; font-size: .92em; }
.reviews-summary { display: flex; align-items: center; gap: 10px; }
.reviews-avg { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.review { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--cream); }
.review-head { display: flex; align-items: center; gap: 10px; }
.review-text { margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); white-space: pre-line; overflow-wrap: anywhere; }
.review-reply { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--brass); background: var(--card); border-radius: 0 10px 10px 0; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; overflow-wrap: anywhere; }
.review-reply-label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brass-deep); margin-bottom: 2px; }
.review-mine { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.review-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.review-form textarea { resize: vertical; min-height: 72px; font-size: 13px; }
.review-form-error { font-size: 12.5px; font-weight: 600; color: var(--rose); }
.star-pick { display: flex; gap: 4px; }
.star-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--line-2); transition: color .12s ease, background-color .12s ease; }
.star-btn svg, .star-btn .ico { width: 24px; height: 24px; }
.star-btn:hover { background: var(--paper); }
.star-btn.is-on { color: var(--brass); }
@media (pointer: coarse) { .star-btn { width: 42px; height: 42px; } }
.review-admin.is-hidden { opacity: .72; background: var(--paper); }

/* ---------- Карточка гостя (CRM) в панели ресторана ---------- */
.guest-link { font-weight: 600; font-size: 14px; color: var(--ink); text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.guest-link:hover { text-decoration-color: var(--ink); }
.guest-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pill.pill-xs { font-size: 10.5px; padding: 1px 7px; gap: 3px; }
.pill.pill-xs .ico, .pill.pill-xs svg { width: 11px; height: 11px; }
.guest-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.guest-stats > div { background: var(--cream); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.guest-stats b { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.guest-stats span { font-size: 11.5px; color: var(--muted); }
.guest-stats > div.is-bad b { color: var(--rose); }
.guest-history { display: flex; flex-direction: column; gap: 6px; }
.guest-history-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
@media (max-width: 420px) { .guest-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Двухэтапный вход (панель ресторана) ---------- */
.mfa-steps { list-style: decimal; padding-left: 20px; font-size: 13px; line-height: 1.55; color: var(--ink-soft); display: flex; flex-direction: column; gap: 4px; }
.mfa-qr { display: flex; justify-content: center; }
.mfa-qr img { width: 180px; height: 180px; padding: 8px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; }
.mfa-secret { display: flex; flex-direction: column; gap: 4px; }
.mfa-secret-code { font-family: 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .06em; padding: 8px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; word-break: break-all; user-select: all; }
.mfa-error { font-size: 12.5px; font-weight: 600; color: var(--rose); }
