/* 7:59 · стили гостевого меню и админки */

/* ---------- токены ---------- */
:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --surface: #fffdf9;
  --sunken: #ebe6db;
  --ink: #1b1916;
  --ink-2: #67615a;
  --ink-3: #9d968b;
  --line: rgba(27, 25, 22, 0.1);
  --accent: #e5b63c;
  --accent-ink: #1b1916;
  --accent-soft: #f6e7b8;
  --dock: #1b1916;
  --dock-ink: #f4f0e8;
  --danger: #b8402f;
  --shadow: 0 1px 2px rgba(27, 25, 22, 0.06), 0 14px 36px rgba(27, 25, 22, 0.1);
  --shadow-float: 0 24px 60px rgba(27, 25, 22, 0.28);
  --radius: 22px;
  --radius-sm: 14px;
  --topbar: 60px;
  --font-body: Montserrat, Inter, "Helvetica Neue", Arial, sans-serif;
  --font-display: Montserrat, Inter, "Helvetica Neue", Arial, sans-serif;
  --font-brand: Montserrat, Inter, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131211;
    --surface: #1d1b18;
    --sunken: #292622;
    --ink: #f3eee4;
    --ink-2: #b8b0a3;
    --ink-3: #8d867b;
    --line: rgba(243, 238, 228, 0.09);
    --accent: #e5b63c;
    --accent-soft: #3e3418;
    --dock: #262320;
    --dock-ink: #f3eee4;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 36px rgba(0, 0, 0, 0.35);
    --shadow-float: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme="dark"] {
    color-scheme: dark;
  --bg: #131211;
  --surface: #1d1b18;
  --sunken: #292622;
  --ink: #f3eee4;
  --ink-2: #b8b0a3;
  --ink-3: #8d867b;
  --line: rgba(243, 238, 228, 0.09);
  --accent: #e5b63c;
  --accent-soft: #3e3418;
  --dock: #262320;
  --dock-ink: #f3eee4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 36px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ---------- база ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p, ul { margin: 0; }
em { font-style: italic; }
.eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.empty { padding: 32px 8px; text-align: center; color: var(--ink-2); grid-column: 1 / -1; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- шапка ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar);
  padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
}
.wordmark { display: inline-flex; align-items: center; height: 34px; color: var(--ink); text-decoration: none; }
.wordmark__mark {
  display: block; width: 34px; height: 34px; background: currentColor;
  -webkit-mask: url("assets/logo-mark-240.png") center / contain no-repeat; mask: url("assets/logo-mark-240.png") center / contain no-repeat;
}
.topbar__right { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
.table-pill {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- страница ---------- */
.page { width: min(1160px, 100%); margin: 0 auto; padding: 0 18px calc(124px + env(safe-area-inset-bottom)); }
body.is-home .page { padding-bottom: 64px; }

/* ---------- главная ---------- */
.hero { padding: 10px 0 8px; }
.hero__card {
  position: relative; width: min(100%, 520px); border-radius: 28px; overflow: hidden; background: #fff; box-shadow: var(--shadow);
}
.hero__cover { display: block; width: 100%; height: auto; }
.hero__tagline { margin: 26px 0 10px; font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 6vw, 38px); line-height: 1.12; letter-spacing: -0.035em; max-width: 12em; }
.hero__text { max-width: 34em; color: var(--ink-2); }

.section-title { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.1; letter-spacing: -0.03em; margin: 36px 0 16px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--sunken); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg__item { flex: 1 0 auto; border: 0; border-radius: 999px; padding: 9px 16px; background: transparent; color: var(--ink-2); font-weight: 500; font-size: 14px; white-space: nowrap; transition: background 0.2s var(--ease), color 0.2s; }
.seg__item.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(27, 25, 22, 0.1); }
#venueTabs { margin-bottom: 16px; }
.halls { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.hall { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.hall h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink); margin-bottom: 14px; }
.hall__grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.table-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 1; border-radius: var(--radius-sm); background: var(--sunken); color: var(--ink); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; letter-spacing: -0.03em;
  transition: background 0.2s var(--ease), color 0.2s, transform 0.2s var(--ease);
}
.table-link small { font-family: var(--font-brand); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.table-link:hover, .table-link:focus-visible { background: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.table-link:hover small, .table-link:focus-visible small { color: color-mix(in srgb, var(--accent-ink) 60%, transparent); }

/* ---------- меню стола ---------- */
.greeting { padding: 22px 0 14px; }
.greeting__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 7.5vw, 46px); line-height: 1.05; letter-spacing: -0.04em; margin: 4px 0 8px; }
.greeting__text { color: var(--ink-2); }

body.is-menu .topbar { position: static; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.menu-nav {
  position: sticky; top: 0; z-index: 20;
  margin: 0 -18px; padding: 8px 18px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
}
.search {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-3); margin-bottom: 8px;
  transition: border-color 0.2s;
}
.search:focus-within { border-color: var(--ink); color: var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.tabs { display: flex; gap: 22px; margin: 0 -18px; padding: 0 18px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none; border: 0; padding: 10px 0 12px; background: transparent; color: var(--ink-3);
  font-family: var(--font-brand); font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap;
  transition: color 0.2s;
}
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease); }
.tab.is-active { color: var(--ink); }
.tab.is-active::after { transform: scaleX(1); }

.chips { display: flex; gap: 6px; margin: 10px -18px 0; padding: 0 40px 0 18px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.chips::after { content: ""; flex: 0 0 24px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- карточки ---------- */
.dish-grid { display: grid; gap: 14px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 14px; }
.dish-grid__heading {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; letter-spacing: -0.03em; margin: 18px 0 0;
}
.dish-grid__heading::after { content: ""; flex: 1; height: 1px; background: var(--line); transform: translateY(-6px); }
.dish-grid__heading:first-child { margin-top: 4px; }
.dish {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border-radius: 20px; overflow: hidden; box-shadow: 0 2px 12px rgba(30, 20, 0, 0.06), 0 0 0 1px var(--line);
  content-visibility: auto; contain-intrinsic-size: 300px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
@media (hover: hover) { .dish:hover { transform: translateY(-2px); box-shadow: var(--shadow); } }
.dish__media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--sunken); overflow: hidden; }
.dish__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
@media (hover: hover) { .dish:hover .dish__media img { transform: scale(1.04); } }
.placeholder {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: repeating-linear-gradient(135deg, hsl(var(--h) 38% 93%) 0 10px, hsl(var(--h) 38% 90%) 10px 20px); color: hsl(var(--h) 30% 66%);
}
.placeholder__mark { display: block; width: 44px; height: 44px; background: currentColor; opacity: 0.55;
  -webkit-mask: url("assets/logo-mark-240.png") center / contain no-repeat; mask: url("assets/logo-mark-240.png") center / contain no-repeat; }
.dish--nophoto .placeholder__mark { width: 40px; height: 40px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .placeholder { background: repeating-linear-gradient(135deg, hsl(var(--h) 14% 19%) 0 10px, hsl(var(--h) 14% 17%) 10px 20px); color: hsl(var(--h) 20% 52%); } }
:root[data-theme="dark"] .placeholder { background: repeating-linear-gradient(135deg, hsl(var(--h) 14% 19%) 0 10px, hsl(var(--h) 14% 17%) 10px 20px); color: hsl(var(--h) 20% 52%); }
.badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 4px; }
.badge {
  padding: 4px 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-brand); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.dish__body { display: flex; flex-direction: column; flex: 1; gap: 4px; padding: 12px 14px 14px; }
.dish__title {
  display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: 14.5px; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dish__meta { color: var(--ink-3); font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.dish__price { display: grid; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dish__price small { font-weight: 400; font-size: 11.5px; color: var(--ink-3); }
.add {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  transition: transform 0.15s var(--ease), background 0.2s;
}
.add:active { transform: scale(0.92); }
.add--counted { background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; }
.stepper { display: inline-flex; align-items: center; height: 40px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.stepper button { width: 34px; height: 40px; border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; }
.stepper b { min-width: 16px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.stepper--sm { height: 32px; background: var(--accent-soft); color: var(--ink); }
.stepper--sm button { width: 30px; height: 32px; font-size: 17px; }
.dish .stepper button { width: 30px; }
.menu-foot { margin: 40px 0 0; color: var(--ink-3); font-size: 13px; text-align: center; }

/* ---------- док ---------- */
.dock-fade { position: fixed; left: 0; right: 0; bottom: 0; height: 110px; z-index: 24; pointer-events: none; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg) 92%, transparent) 60%, var(--bg)); }
.dock {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 25;
  display: flex; gap: 6px; width: min(560px, calc(100% - 28px)); padding: 6px; border-radius: 999px;
  background: var(--dock); color: var(--dock-ink); box-shadow: var(--shadow-float), 0 0 0 1px color-mix(in srgb, var(--dock-ink) 12%, transparent); transform: translateX(-50%);
}
.dock.is-bump { animation: bump 0.4s var(--ease); }
@keyframes bump { 30% { transform: translateX(-50%) scale(1.03); } 100% { transform: translateX(-50%); } }
.dock__waiter { background: var(--accent) !important; color: var(--accent-ink) !important; }
.dock button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border: 0; border-radius: 999px; background: transparent; color: inherit; font-weight: 500; font-size: 15px; white-space: nowrap; transition: background 0.25s var(--ease), color 0.25s; }
.dock__cart { flex: 1; min-width: 0; padding: 0 14px 0 16px; justify-content: flex-start !important; }
.dock__cart span { opacity: 0.7; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dock__cart strong { margin-left: auto; flex: none; font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.dock.has-items .dock__cart { background: var(--accent); color: var(--accent-ink); }
.dock.has-items .dock__cart span { opacity: 1; }
.dock__waiter { padding: 0 18px; }
.dock.has-items .dock__waiter span { display: none; }
.dock.has-items .dock__waiter { padding: 0 16px; }

/* ---------- шторки ---------- */
.sheet { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); display: none; align-items: flex-end; justify-content: center; }
.sheet[open] { display: flex; }
.sheet::backdrop { background: rgba(14, 12, 10, 0.5); backdrop-filter: blur(3px); }
.sheet__panel {
  position: relative; width: 100%; max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 28px 28px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up 0.32s var(--ease);
}
.sheet__panel::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; border-radius: 2px; background: var(--line); transform: translateX(-50%); }
@keyframes sheet-up { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__close { position: absolute; top: 16px; right: 16px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(8px); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.sheet__head { padding-right: 48px; margin-bottom: 16px; }
.sheet__head h2, .dish-detail__body h2 { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.15; letter-spacing: -0.03em; }
.sheet__footer { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px -20px calc(-20px - env(safe-area-inset-bottom)); padding: 14px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.sheet__footer--stack { flex-direction: column; align-items: stretch; gap: 10px; }
.sheet__price { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.dish-detail { display: grid; gap: 18px; }
.dish-detail__media { position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: var(--sunken); }
.dish-detail__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dish-detail__body h2 { margin-bottom: 8px; }
.dish-detail__text { color: var(--ink-2); }
.facts { display: grid; gap: 10px; margin: 16px 0 0; }
.facts div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.facts dt { color: var(--ink-3); font-size: 13px; }
.facts dd { margin: 0; font-size: 14px; }

/* ---------- конструктор ---------- */
.builder { margin-top: 20px; display: grid; gap: 18px; }
.builder__block { display: grid; gap: 10px; }
.builder__label { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.2; letter-spacing: -0.02em; }
.builder__chosen { list-style: none; padding: 0; display: grid; gap: 6px; }
.builder__chosen li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--sunken); animation: pop 0.3s var(--ease); }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.builder__name { font-weight: 500; font-size: 14.5px; }
.builder__name small, .picker__name small { color: var(--ink-3); font-weight: 400; font-size: 12px; margin-left: 4px; }
.builder__price { font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.builder__more {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 14px 14px 16px;
  border: 2px dashed var(--accent); border-radius: 14px; background: transparent; color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 15px; text-align: left; transition: background 0.2s;
}
.builder__more:hover { background: var(--accent-soft); }
.builder__more.is-open { background: var(--accent-soft); }
.builder__more > span:first-child { flex: 1; }
.builder__tap {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); flex: none; transition: transform 0.25s var(--ease);
}
.builder__tap svg { width: 18px; height: 18px; stroke-width: 2.2; }
.builder__more.is-open .builder__tap { transform: rotate(180deg); }
/* подсказка «тапни сюда»: кружок мягко пульсирует, стрелка чуть подпрыгивает — до первого нажатия */
.builder__more.is-hint:not(.is-open) .builder__tap { animation: tap-pulse 1.8s ease-in-out infinite; }
.builder__more.is-hint:not(.is-open) .builder__tap svg { animation: tap-nudge 1.8s ease-in-out infinite; }
@keyframes tap-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); }
}
@keyframes tap-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.picker { display: grid; gap: 14px; padding: 4px 0 0; animation: pop 0.25s var(--ease); }
.picker__label { font-family: var(--font-brand); font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 6px 0 4px; }
.picker__row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.picker__row:last-child { border-bottom: 0; }
.picker__item {
  flex: 1; display: grid; grid-template-columns: 1fr auto 28px; align-items: center; gap: 10px; min-width: 0; padding: 10px 4px 10px 0;
  border: 0; background: transparent; color: var(--ink); text-align: left; font-size: 14.5px;
}
.picker__minus { width: 34px; margin-left: 4px; border: 0; background: transparent; color: var(--ink-3); font-size: 20px; line-height: 1; }
.picker__minus:active { color: var(--ink); }
.builder__count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; margin-left: auto; margin-right: 8px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 700; }
.picker__mark.is-pop { animation: pop-in 0.3s var(--ease); }
.picker__price { color: var(--ink-2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.picker__mark { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); font-size: 16px; line-height: 1; transition: background 0.2s; }
.picker__item.is-chosen .picker__mark { background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.picker__item:active .picker__mark { background: var(--accent); color: var(--accent-ink); }

/* ---------- корзина ---------- */
.cart-items { display: grid; gap: 4px; }
.cart-item { display: grid; grid-template-columns: 48px 1fr auto; grid-template-areas: "thumb info stepper" "thumb sum stepper"; align-items: center; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item__thumb { grid-area: thumb; width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--sunken); align-self: start; }
.cart-item__thumb--empty { display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.cart-item__thumb--empty .placeholder__mark { width: 22px; height: 22px; }
.cart-item__info { grid-area: info; display: grid; gap: 2px; }
.cart-item__info strong { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.25; letter-spacing: -0.01em; }
.cart-item__info span { color: var(--ink-3); font-size: 13px; }
.cart-item__options { list-style: none; padding: 0; color: var(--ink-2); font-size: 13px; }
.cart-item__options li::before { content: "+ "; color: var(--ink-3); }
.cart-item .stepper { grid-area: stepper; }
.cart-item__sum { grid-area: sum; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total span { color: var(--ink-2); font-size: 15px; }
.cart-total strong { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

.field { display: grid; gap: 6px; margin-top: 16px; }
.field span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field textarea, .field input, .field select { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 12px 14px; outline: 0; resize: none; }
.field textarea:focus, .field input:focus, .field select:focus { border-color: var(--ink); }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: grid; justify-items: center; gap: 10px; padding: 22px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); font-weight: 500; transition: border-color 0.2s; }
.choice svg { width: 28px; height: 28px; }
.choice:hover { border-color: var(--accent); }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 22px; border: 0; border-radius: 999px; font-weight: 600; font-size: 15px; transition: opacity 0.15s, transform 0.1s var(--ease); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--dark { background: var(--ink); color: var(--bg); }
.btn--text { height: 44px; background: transparent; color: var(--ink-2); font-weight: 500; }
.btn--full { width: 100%; }

/* ---------- тост ---------- */
.toast {
  position: fixed; top: 14px; left: 50%; z-index: 60; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; text-align: center;
  box-shadow: var(--shadow-float); opacity: 0; transform: translate(-50%, -8px); transition: opacity 0.2s, transform 0.25s var(--ease); pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }


/* ---------- витрина ---------- */
.showcase { display: flex; gap: 10px; margin: 14px -18px 0; padding: 0 18px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.showcase::-webkit-scrollbar { display: none; }
.promo {
  position: relative; flex: 0 0 min(80%, 320px); display: grid; grid-template-columns: 1fr 88px; align-items: center; gap: 12px;
  min-height: 116px; padding: 16px 16px 16px 18px; border: 0; border-radius: 22px; text-align: left; overflow: hidden; scroll-snap-align: start;
  transition: transform 0.2s var(--ease);
}
.promo:active { transform: scale(0.985); }
.promo--accent { background: var(--accent); color: var(--accent-ink); }
.promo--dark { background: var(--ink); color: var(--bg); }
.promo__text { display: grid; gap: 4px; min-width: 0; }
.promo__eyebrow { font-family: var(--font-brand); font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.promo__title { font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.1; letter-spacing: -0.03em; }
.promo__note { font-size: 12.5px; line-height: 1.35; opacity: 0.85; }
.promo__img { width: 88px; height: 88px; border-radius: 20px; object-fit: cover; box-shadow: 0 10px 24px rgba(0,0,0,0.22); }
.chip--hit { border-color: var(--accent); color: var(--ink); }

/* ---------- карточки: широкая первая, появление, отклик ---------- */
.dish { opacity: 0; transform: translateY(14px); }
.dish.is-in { opacity: 1; transform: none; transition: opacity 0.45s var(--ease), transform 0.5s var(--ease), box-shadow 0.25s var(--ease); transition-delay: calc(var(--i, 0) * 40ms); }
@media (hover: hover) { .dish.is-in:hover { transform: translateY(-2px); transition-delay: 0s; } }
.is-pop { animation: pop-in 0.35s var(--ease); }
@keyframes pop-in { 0% { transform: scale(0.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.dish--skeleton .dish__media { background: linear-gradient(100deg, var(--sunken) 30%, color-mix(in srgb, var(--sunken) 60%, var(--surface)) 50%, var(--sunken) 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk { display: block; height: 12px; border-radius: 6px; background: var(--sunken); animation: shimmer 1.4s linear infinite; }
.sk--title { width: 80%; height: 15px; margin-top: 2px; }
.sk--meta { width: 60%; }
.sk--price { width: 34%; height: 16px; margin-top: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- док: история стола ---------- */
.dock.has-history .dock__cart { background: color-mix(in srgb, var(--dock-ink) 12%, transparent); }
.dock.has-history .dock__cart span { opacity: 1; }
.linkline { display: block; width: 100%; margin-top: 12px; padding: 10px 0; border: 0; background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--ink-2) 40%, transparent); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after { content: ""; position: absolute; width: 20px; height: 20px; border: 2.5px solid color-mix(in srgb, var(--accent-ink) 30%, transparent); border-top-color: var(--accent-ink); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.reasons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.reason { display: grid; justify-items: center; gap: 8px; padding: 14px 4px 12px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: 0 2px 10px rgba(30, 20, 0, 0.06), 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 500; letter-spacing: -0.01em; transition: background 0.15s, transform 0.15s var(--ease); }
.reason:active { transform: scale(0.96); background: var(--accent-soft); }
.reason__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.reason__icon svg { width: 22px; height: 22px; stroke-width: 1.75; }
.sheet__hint { margin-top: 12px; text-align: center; color: var(--ink-3); font-size: 12.5px; }

/* ---------- ваш стол ---------- */
.success { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 8px 0 20px; }
.success h2 { font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; line-height: 1.15; }
.success__note { color: var(--ink-2); font-size: 14px; max-width: 24em; }
.success__mark { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); animation: pop-in 0.5s var(--ease); margin-bottom: 6px; }
.success__mark svg { width: 30px; height: 30px; stroke-width: 2.4; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw 0.5s 0.2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hist-list { display: grid; gap: 10px; }
.hist { padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: 0 2px 12px rgba(30, 20, 0, 0.06), 0 0 0 1px var(--line); }
.hist.is-new { box-shadow: 0 6px 20px rgba(30, 20, 0, 0.1), 0 0 0 1px var(--line); }
.hist__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hist__head strong { font-weight: 700; font-size: 15px; }
.hist__badge { padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hist__items { list-style: none; padding: 0; display: grid; gap: 6px; }
.hist__items li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; font-size: 14px; align-items: baseline; }
.hist__items li small { display: block; color: var(--ink-3); font-size: 12px; }
.hist__items li b { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; min-width: 24px; text-align: right; }
.hist__items li em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hist__comment { margin-top: 8px; color: var(--ink-2); font-size: 13px; font-style: italic; }
.hist__foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.hist__foot strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- планшет и десктоп ---------- */
@media (min-width: 640px) {
  .dish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; }
  .promo { flex-basis: 360px; }
  .sheet { align-items: center; padding: 24px; }
  .sheet__panel { width: min(680px, 100%); max-height: min(88vh, 940px); border-radius: 28px; padding: 28px 28px 24px; }
  .sheet__panel::before { display: none; }
  .sheet__footer { margin: 20px -28px -24px; padding: 14px 28px 20px; bottom: -24px; }
  .sheet--compact .sheet__panel { width: 420px; }
  .dish-detail { grid-template-columns: 260px 1fr; align-items: start; }
  .dish-detail__media { aspect-ratio: 3 / 4; }
  .menu-nav { margin: 0 -18px; }
}
@media (min-width: 960px) {
  .dish-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .showcase { margin: 14px -24px 0; padding: 0 24px; }
  .menu-nav { display: grid; grid-template-columns: 1fr 340px; grid-template-areas: "tabs search" "chips chips"; column-gap: 24px; align-items: end; }
  .menu-nav .tabs { grid-area: tabs; margin: 0; padding: 0; }
  .menu-nav .search { grid-area: search; margin: 0 0 6px; height: 42px; }
  .menu-nav .chips { grid-area: chips; }
  .dock { left: auto; right: 24px; bottom: 24px; transform: none; width: 420px; }
  .showcase { -webkit-mask-image: none; mask-image: none; }
  .promo { flex: 1 1 0; }
  .dish-grid { padding-bottom: 96px; }
  .dock.is-bump { animation: bump-right 0.4s var(--ease); }
  .dock-fade { display: none; }
  body.is-menu .page { padding-bottom: 80px; }
  .page { padding-left: 24px; padding-right: 24px; }
  .menu-nav { margin: 0 -24px; padding: 8px 24px 10px; }
  .menu-nav .tabs { margin: 0; padding: 0; }
  .menu-nav .chips { margin: 10px -24px 0; padding: 0 24px; }
  .dish-detail { grid-template-columns: 300px 1fr; }
}
@keyframes bump-right { 30% { transform: scale(1.03); } 100% { transform: none; } }

/* =====================================================================
   АДМИНКА
   ===================================================================== */
body.admin { background: var(--bg); }
.ashell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.aside {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px;
  border-right: 1px solid var(--line); background: var(--surface);
}
.aside__brand { display: grid; gap: 14px; padding: 0 6px; }
.aside__venue { display: grid; gap: 2px; }
.aside__venue-label { font-family: var(--font-brand); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.aside__venue strong { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.anav { display: grid; gap: 4px; }
.anav__item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 14.5px; transition: background 0.15s, color 0.15s;
}
.anav__item:hover { background: var(--sunken); color: var(--ink); }
.anav__item.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.anav__item svg { width: 20px; height: 20px; }
.anav__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.anav__item.is-active .anav__badge { background: var(--accent-ink); color: var(--accent); }
.aside__foot { margin-top: auto; display: grid; gap: 10px; }
.aside__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.amain { min-width: 0; padding: 22px 28px 60px; }
.ahead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.ahead__title { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -0.04em; line-height: 1; }
.ahead__right { display: flex; align-items: center; gap: 10px; }
.admin-status { font-size: 13px; color: var(--ink-3); }
.admin-status.is-ok { color: var(--ink-2); }
.admin-status.is-error { color: var(--danger); }
.admin-status.is-live { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.admin-status.is-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ba55d; box-shadow: 0 0 0 0 rgba(59,165,93,0.5); animation: live 2s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(59,165,93,0.5); } 70% { box-shadow: 0 0 0 7px rgba(59,165,93,0); } 100% { box-shadow: 0 0 0 0 rgba(59,165,93,0); } }
.abtn--lg { height: 40px; }
.abtn--icon.abtn--lg { width: 40px; }
.asection { animation: none; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chooser { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 320px)); }
.chooser__card { display: grid; gap: 4px; padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 0.2s, transform 0.2s var(--ease); }
.chooser__card:hover { border-color: var(--accent); transform: translateY(-2px); }
.chooser__card strong { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.chooser__card span:last-child { color: var(--ink-3); font-size: 13px; }

/* --- заказы --- */
.metrics { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.metric { display: grid; gap: 4px; padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.metric--hero { border-color: transparent; box-shadow: inset 0 0 0 1px var(--line), 0 6px 18px rgba(30,20,0,0.06); }
.metric__label { font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.metric__value { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.metric--hero .metric__value { font-size: 40px; }
.metric__value.is-accent { color: var(--accent); }
.metric__sub { font-size: 12.5px; color: var(--ink-3); }
.ofilter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ofilter__sound { margin-left: auto; font-size: 13px; color: var(--ink-2); }
.ofeed { display: grid; gap: 10px; }
.ofeed__divider { margin: 14px 0 4px; font-family: var(--font-brand); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.ocard {
  position: relative; display: grid; grid-template-columns: 60px 1fr; gap: 16px; padding: 16px 16px 16px 18px; border-radius: 18px;
  background: var(--surface); box-shadow: 0 2px 12px rgba(30,20,0,0.05), 0 0 0 1px var(--line); overflow: hidden;
}
.ocard.is-fresh { animation: fade-in 0.35s var(--ease); }
.ocard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: transparent; }
.ocard--new::before { background: var(--accent); }
.ocard--accepted::before { background: var(--ink); }
.ocard--done { opacity: 0.55; }
.ocard__table { display: grid; align-content: center; justify-items: center; align-self: start; width: 60px; height: 60px; border-radius: 14px; background: var(--sunken); font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.04em; line-height: 1; }
.ocard--new .ocard__table { background: var(--accent); color: var(--accent-ink); }
.ocard__table small { font-family: var(--font-brand); font-size: 8.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6; margin-bottom: 3px; }
.ocard__body { display: grid; gap: 8px; min-width: 0; }
.ocard__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ocard__head strong { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.ocard__head strong svg { width: 18px; height: 18px; color: var(--ink-2); }
.ostatus { padding: 4px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.ostatus--new { background: var(--accent); color: var(--accent-ink); }
.ostatus--accepted { background: var(--ink); color: var(--bg); }
.ocard__time { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ocard__tg { padding: 2px 7px; border-radius: 6px; background: var(--sunken); font-size: 11px; }
.ocard__tg.is-error { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.ocard__items { list-style: none; padding: 0; display: grid; gap: 5px; }
.ocard__items li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; font-size: 14px; }
.ocard__items li small { display: block; color: var(--ink-3); font-size: 12px; }
.ocard__items li b { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.ocard__items li em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ocard__comment { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--sunken); font-size: 13px; color: var(--ink); }
.ocard__comment svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--ink-3); }
.ocard__total { display: flex; justify-content: space-between; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.ocard__total strong { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.ocard__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-state { display: grid; gap: 6px; justify-items: center; padding: 48px 20px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: 18px; }
.empty-state strong { color: var(--ink-2); font-size: 16px; }

/* --- столы и QR --- */
.tables-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.tables-note { color: var(--ink-2); font-size: 14px; max-width: 60em; }
.qr-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.qr-card { display: grid; gap: 10px; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: 0 2px 12px rgba(30,20,0,0.05), 0 0 0 1px var(--line); text-align: center; transition: box-shadow 0.2s; }
.qr-card:hover { box-shadow: 0 8px 24px rgba(30,20,0,0.1), 0 0 0 1px var(--accent); }
.qr-card__frame { padding: 10px; border-radius: 14px; background: #fff; }
.qr-card__img { display: block; width: 100%; height: auto; }
.qr-card__num { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.03em; display: grid; }
.qr-card__num small { font-family: var(--font-brand); font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.qr-card__url { font-size: 11px; color: var(--ink-3); word-break: break-all; margin-top: -4px; }
.qr-card__actions { display: flex; gap: 6px; justify-content: center; }
.print-area { display: none; }
@media print {
  body.admin > * { display: none !important; }
  body.admin .print-area { display: block !important; }
  .print-area img { display: block; width: 100%; max-width: 180mm; margin: 0 auto; page-break-after: always; }
  @page { margin: 12mm; }
}

/* --- меню (редактор) --- */
.admin-grid { display: grid; gap: 18px; grid-template-columns: 220px minmax(380px, 1fr) minmax(360px, 420px); align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.panel--sticky { position: sticky; top: 22px; max-height: calc(100vh - 130px); overflow-y: auto; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel__head h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.panel__head small { color: var(--ink-3); font-size: 13px; }
.abtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.abtn:hover:not(:disabled) { border-color: var(--ink-3); }
.abtn:disabled { opacity: 0.4; cursor: default; }
.abtn--primary, .abtn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.abtn--ghost { background: transparent; }
.abtn--danger { color: var(--danger); }
.abtn--icon { width: 30px; height: 30px; padding: 0; border-radius: 8px; font-size: 14px; }
.abtn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.admin-form-row { display: flex; gap: 8px; margin-bottom: 10px; }
.admin-form-row input, .admin-form-row select { flex: 1; min-width: 0; }
.admin-form-row select { flex: 0 0 38%; }
.admin input[type="text"], .admin input[type="number"], .admin input[type="search"], .admin select, .admin textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); outline: 0; }
.admin textarea { height: auto; padding: 10px 12px; resize: vertical; }
.admin input:focus, .admin select:focus, .admin textarea:focus { border-color: var(--ink); }
.admin label { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
.admin label > span { font-weight: 500; }
.admin .check { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; }
.admin .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.tree { display: grid; gap: 4px; }
.tree__group { border-top: 1px solid var(--line); padding-top: 6px; }
.tree__group:first-child { border-top: 0; padding-top: 0; }
.tree__row { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 6px; border-radius: 10px; }
.tree__row:hover { background: var(--sunken); }
.tree__row--group { font-weight: 600; cursor: pointer; }
.tree__row--child { padding-left: 24px; font-size: 14px; }
.tree__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree__count { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.tree__actions { display: none; gap: 2px; }
.tree__row:hover .tree__actions, .tree__row:focus-within .tree__actions { display: flex; }
.tree__caret { width: 14px; color: var(--ink-3); transition: transform 0.15s; }
.tree__group.is-collapsed .tree__caret { transform: rotate(-90deg); }
.tree__group.is-collapsed .tree__children { display: none; }
.dish-list { display: grid; gap: 4px; }
.dish-row { display: grid; grid-template-columns: 1fr auto 40px; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; background: transparent; }
.dish-row:hover { background: var(--sunken); }
.dish-row.is-active { background: var(--accent-soft); }
.dish-row.is-dragging { opacity: 0.4; }
.dish-row.drop-before { box-shadow: 0 -2px 0 var(--accent); }
.dish-row.drop-after { box-shadow: 0 2px 0 var(--accent); }
.dish-row__open { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; min-width: 0; cursor: pointer; }
.dish-row img, .dish-row .thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--sunken); }
.dish-row .thumb { display: flex; align-items: center; justify-content: center; color: var(--ink-3); background: repeating-linear-gradient(135deg, var(--sunken) 0 6px, color-mix(in srgb, var(--sunken) 70%, var(--surface)) 6px 12px); }
.dish-row .thumb .placeholder__mark { width: 20px; height: 20px; opacity: 0.6; }
.dish-row__text { display: grid; min-width: 0; }
.dish-row__text strong { font-weight: 600; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-row__text small { color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dish-row__price { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.dish-row--stopped { opacity: 0.75; }
.dish-row--stopped strong { text-decoration: line-through; color: var(--ink-2); }
.switch { position: relative; display: inline-block; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 999px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); transition: background 0.2s; cursor: pointer; flex: none; }
.switch__knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: transform 0.2s var(--ease); }
.switch.is-on { background: var(--accent); box-shadow: none; }
.switch.is-on .switch__knob { transform: translateX(16px); }
.ofilter__sound { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.admin-subhead { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-subhead h2 { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.admin-filter { display: flex; gap: 8px; margin-bottom: 10px; }
.admin-filter select { flex: 0 0 46%; min-width: 0; }
.admin-filter input { flex: 1; min-width: 0; }
.editor { display: grid; gap: 14px; padding-bottom: 8px; }
.editor__photo { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.editor__preview { width: 120px; height: 120px; border-radius: 14px; object-fit: cover; background: var(--sunken); }
.editor__preview--empty { display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12px; }
.editor__photo-actions { display: grid; gap: 8px; align-content: start; }
.editor__photo-actions small { color: var(--ink-3); font-size: 12px; }
.editor__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel--editor { padding-bottom: 0; }
.editor__actions { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 8px; align-items: center; justify-content: space-between; margin: 0 -18px 0; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -10px 14px -6px var(--surface); }
.editor__delete { margin: 8px 0 18px; padding: 8px 0; border: 0; background: transparent; color: var(--danger); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.admin-form-stack { display: grid; gap: 8px; margin-bottom: 12px; }
.admin-form-stack .admin-form-row { margin-bottom: 0; }
.admin .toast { top: auto; bottom: 20px; left: auto; right: 20px; transform: translate(0, 8px); }
.admin .toast.is-visible { transform: none; }
.helper { color: var(--ink-3); font-size: 13px; padding: 8px 6px; }

@media (max-width: 1180px) {
  .admin-grid { grid-template-columns: 240px 1fr; }
  .panel--editor { grid-column: 1 / -1; }
  .panel--sticky { position: static; max-height: none; }
}
@media (max-width: 860px) {
  .ashell { grid-template-columns: 1fr; }
  .aside { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .aside__brand { grid-auto-flow: column; align-items: center; gap: 10px; }
  .aside__venue-label { display: none; }
  .aside__venue strong { font-size: 13px; white-space: nowrap; }
  .anav { grid-auto-flow: column; gap: 2px; }
  .anav__item { padding: 8px 10px; font-size: 13px; }
  .anav__item span { display: none; }
  .anav__item.is-active span { display: inline; }
  .aside__foot { margin-top: 0; margin-left: auto; grid-auto-flow: column; }
  .aside__foot #openMenuLink { display: none; }
  .amain { padding: 16px 14px 60px; }
  .ahead__title { font-size: 24px; }
  .ahead { align-items: center; }
  .ahead .eyebrow { display: none; }
  .metrics { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
  .metric { padding: 12px 14px; }
  .metric--hero { grid-column: 1 / -1; }
  .metric__value { font-size: 24px; }
  .metric--hero .metric__value { font-size: 30px; }
  .ofilter__sound { width: 100%; margin-left: 0; justify-content: flex-end; }
  .admin-grid { grid-template-columns: 1fr; }
  .tree__actions { display: flex; }
  .editor__row { grid-template-columns: 1fr; }
  .ocard { grid-template-columns: 1fr; gap: 10px; padding: 12px 12px 12px 14px; }
  .ocard__table { grid-auto-flow: column; width: auto; height: 32px; padding: 0 10px; gap: 6px; border-radius: 8px; font-size: 15px; justify-self: start; }
  .ocard__table small { margin: 0; }
  .ocard__actions .abtn { flex: 1; }
  .tables-head { flex-direction: column; align-items: flex-start; }
}
