/* QR Menu Studio · кабинет клиента. Тёмная тема по умолчанию, светлая по переключателю. */
:root {
  color-scheme: dark;
  --bg: #0d0c0b;
  --bg-2: #141210;
  --card: #1a1715;
  --card-2: #221e1a;
  --line: rgba(246, 239, 228, 0.1);
  --line-2: rgba(246, 239, 228, 0.18);
  --ink: #f6efe4;
  --ink-2: #b9b0a3;
  --ink-3: #8a8177;
  --accent: #f5b342;
  --accent-ink: #1a1512;
  --accent-soft: rgba(245, 179, 66, 0.14);
  --good: #6fd6a4;
  --warn: #ffb35c;
  --bad: #ff6b52;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: Manrope, Montserrat, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sidebar: 252px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f3ee;
  --bg-2: #efeae2;
  --card: #ffffff;
  --card-2: #f7f4ef;
  --line: rgba(26, 21, 18, 0.1);
  --line-2: rgba(26, 21, 18, 0.18);
  --ink: #1a1512;
  --ink-2: #5d564e;
  --ink-3: #8d857a;
  --accent-soft: rgba(245, 179, 66, 0.2);
  --shadow: 0 16px 40px rgba(26, 21, 18, 0.12);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
h1 { font-size: clamp(24px, 3.4vw, 32px); }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
a { color: inherit; }
small { font-size: 13px; color: var(--ink-3); }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

/* ---------- кнопки, поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
  transition: transform 0.14s var(--ease), background 0.16s var(--ease), border-color 0.16s var(--ease), opacity 0.16s;
}
.btn:hover { background: var(--card-2); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn--primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn--ghost { background: transparent; }
.btn--quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn--quiet:hover { background: var(--card-2); color: var(--ink); }
.btn--danger { border-color: transparent; background: rgba(255, 107, 82, 0.14); color: var(--bad); }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn--lg { min-height: 50px; padding: 0 22px; font-size: 16px; }
.btn--full { width: 100%; }
.btn--icon { width: 42px; padding: 0; }
.btn.is-busy { position: relative; color: transparent; pointer-events: none; }
.btn.is-busy::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; color: var(--accent-ink);
  animation: spin 0.7s linear infinite;
}
.btn--ghost.is-busy::after, .btn--quiet.is-busy::after { color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: block; margin-bottom: 14px; }
.field > span, .field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { display: block; margin-top: 5px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="search"], input[type="url"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--bg-2); color: var(--ink); font: inherit; font-size: 15px;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.row--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .row, .row--3 { grid-template-columns: 1fr; } }

.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; margin: 3px 0 0; accent-color: var(--accent); flex: none; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); flex: none; transition: background 0.18s var(--ease); }
.switch__knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform 0.18s var(--ease); }
.switch.is-on { background: var(--accent); }
.switch.is-on .switch__knob { transform: translateX(18px); background: var(--accent-ink); }
.toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row__text { flex: 1; }
.toggle-row__text strong { display: block; font-size: 15px; font-weight: 700; }
.toggle-row__text small { display: block; }
.toggle-row.is-locked { opacity: 0.55; cursor: default; }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; align-self: start; height: 100vh; display: flex; flex-direction: column; gap: 14px;
  padding: 20px 16px; border-right: 1px solid var(--line); background: var(--bg-2);
}
.side__brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.03em; }
.side__logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; flex: none; }
.side__venue { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); padding: 10px 12px; }
.side__venue small { display: block; }
.side__venue strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side__venue select { min-height: 36px; margin-top: 8px; font-size: 14px; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav__item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px;
}
.nav__item:hover { background: var(--card); color: var(--ink); }
.nav__item.is-active { background: var(--accent-soft); color: var(--ink); }
.nav__item svg { width: 18px; height: 18px; flex: none; }
.nav__badge { margin-left: auto; min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; text-align: center; }
.nav__soon { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.side__foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.side__row { display: flex; gap: 8px; }
.side__row .btn { flex: 1; }

.main { min-width: 0; padding: 22px clamp(16px, 3vw, 34px) 80px; }
.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head__text { flex: 1; min-width: 200px; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section { display: flex; flex-direction: column; gap: 16px; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 18px; }
.card--flat { background: transparent; }
.card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card__head h2, .card__head h3 { flex: 1; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: start; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

.metric { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 16px; }
.metric b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.04em; }
.metric span { font-size: 13px; color: var(--ink-3); }
.metrics { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.metric--hero { grid-column: span 2; background: color-mix(in srgb, var(--accent) 10%, var(--card)); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.metric--hero b { font-size: 40px; }
@media (max-width: 640px) { .metric--hero { grid-column: 1 / -1; } }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.pill--good { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pill--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pill--bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip.is-active { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.empty { padding: 34px 20px; border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; color: var(--ink-3); }
.hint { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); font-size: 14px; color: var(--ink); }
.status { font-size: 13px; color: var(--ink-3); }
.status--bad { color: var(--bad); }
.status--good { color: var(--good); }
.copy { display: flex; gap: 8px; align-items: center; }
.copy input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.link { color: var(--accent); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- вход и регистрация ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background:
  radial-gradient(1200px 600px at 20% -10%, rgba(245, 179, 66, 0.18), transparent 60%),
  radial-gradient(800px 500px at 110% 20%, rgba(111, 214, 164, 0.1), transparent 55%), var(--bg); }
.auth__box { width: min(440px, 100%); border: 1px solid var(--line); border-radius: 26px; background: var(--card); padding: clamp(22px, 4vw, 32px); box-shadow: var(--shadow); }
.auth__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-weight: 800; }
.auth__switch { margin-top: 16px; font-size: 14px; color: var(--ink-2); text-align: center; }
.auth__error { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255, 107, 82, 0.14); color: var(--bad); font-size: 14px; }

/* ---------- мастер настройки ---------- */
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.step { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.step b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--card-2); font-size: 12px; }
.step.is-done { color: var(--good); border-color: color-mix(in srgb, var(--good) 35%, transparent); }
.step.is-done b { background: var(--good); color: var(--bg); }
.step.is-current { color: var(--ink); border-color: var(--accent); }
.step.is-current b { background: var(--accent); color: var(--accent-ink); }
.todo { display: flex; flex-direction: column; gap: 10px; }
.todo__item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-2); }
.todo__item b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; flex: none; }
.todo__item.is-done { opacity: 0.6; }
.todo__item.is-done b { background: var(--good); color: var(--bg); }
.todo__text { flex: 1; }
.todo__text strong { display: block; }

/* ---------- темы и палитра ---------- */
.themes { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.theme-card { border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--card-2); padding: 12px; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.theme-card.is-active { border-color: var(--accent); }
.theme-card__swatch { display: flex; gap: 4px; margin-bottom: 8px; }
.theme-card__swatch i { width: 22px; height: 22px; border-radius: 6px; }
.color-field { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg-2); }
.color-field input[type="color"] { width: 34px; height: 34px; min-height: 0; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.color-field input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line-2); border-radius: 10px; }
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-field code { flex: 1; font-size: 13px; color: var(--ink-2); font-family: ui-monospace, Menlo, monospace; }
.logo-drop { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); }
.logo-drop img { max-width: 120px; max-height: 60px; object-fit: contain; }
.logo-drop__empty { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 12px; background: var(--card-2); color: var(--ink-3); font-size: 12px; }

/* ---------- заказы ---------- */
.feed { display: flex; flex-direction: column; gap: 12px; }
.ocard { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 16px; }
.ocard.is-new { border-color: color-mix(in srgb, var(--accent) 55%, transparent); animation: pop 0.4s var(--ease); }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }
.ocard__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ocard__num { margin-left: 4px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.ocard__table { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.ocard__time { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.ocard__time[data-urgency="wait"] { color: var(--warn); font-weight: 700; }
.ocard__time[data-urgency="late"] { color: var(--bad); font-weight: 800; }
.ocard__kind { font-size: 17px; font-weight: 700; }
.ocard[data-status="new"] { background: color-mix(in srgb, var(--accent) 8%, var(--card)); border-left: 4px solid var(--accent); }
.ocard[data-status="done"] { opacity: 0.72; }
.ocard__items { display: flex; flex-direction: column; gap: 5px; margin: 8px 0; font-size: 16px; }
.ocard__item { display: flex; gap: 8px; }
.ocard__item span { flex: 1; }
.ocard__opts { margin: 2px 0 0 14px; color: var(--ink-3); font-size: 13px; }
.ocard__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ocard__foot .btn { min-height: 48px; padding: 0 20px; }
.ocard__total { font-size: 18px; }
.ocard__total { margin-right: auto; font-weight: 800; }
.ocard__comment { padding: 8px 10px; border-radius: 10px; background: var(--card-2); font-size: 14px; font-style: italic; }
.ocard--waiter { border-left: 3px solid var(--warn); }
.ocard--bill { border-left: 3px solid var(--good); }

/* ---------- меню ---------- */
.menu-layout { display: grid; gap: 16px; grid-template-columns: 240px minmax(0, 1fr) minmax(0, 380px); align-items: start; }
.menu-layout > * { min-width: 0; }
@media (max-width: 1280px) { .menu-layout { grid-template-columns: 220px minmax(0, 1fr); } .menu-layout .editor-panel { grid-column: 1 / -1; } }
@media (max-width: 860px) { .copy { flex-wrap: wrap; } .copy input { min-width: 0; } }
@media (max-width: 760px) { .menu-layout { grid-template-columns: minmax(0, 1fr); } }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px; }
.panel--sticky { position: sticky; top: 18px; max-height: calc(100vh - 40px); overflow-y: auto; }
.tree { display: flex; flex-direction: column; gap: 4px; }
.tree__group { font-weight: 700; font-size: 14px; padding: 8px 6px; display: flex; align-items: center; gap: 6px; }
.tree__group button { margin-left: auto; }
.tree__cat { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 18px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.tree__cat:hover { background: var(--card-2); }
.tree__cat span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dish-list { display: flex; flex-direction: column; gap: 6px; }
.dish-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-2); cursor: pointer; }
.dish-row.is-active { border-color: var(--accent); }
.dish-row__thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--bg-2); flex: none; }
.dish-row__body { flex: 1; min-width: 0; }
.dish-row__title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dish-row__meta { font-size: 12px; color: var(--ink-3); }
.dish-row.is-stopped .dish-row__title { text-decoration: line-through; color: var(--ink-3); }
.editor__actions { position: sticky; bottom: -14px; display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 0; background: linear-gradient(to top, var(--card) 70%, transparent); }
.editor__actions .status { flex: 1; }
.photo-wide {
  display: grid; place-items: center; width: 100%; min-height: 150px; margin-bottom: 10px; overflow: hidden;
  border: 1px dashed var(--line-2); border-radius: var(--radius-sm); background: var(--bg-2); cursor: pointer; text-align: center;
}
.photo-wide:hover { border-color: var(--accent); }
.photo-wide img { width: 100%; max-height: 220px; object-fit: cover; display: block; }
.photo-wide.has-photo { border-style: solid; min-height: 0; }
.photo-wide__hint { padding: 22px 16px; }
.photo-wide__hint b { display: block; font-size: 15px; }
.photo-wide__hint small { display: block; margin-top: 4px; }
.more { margin: 4px 0 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-2); }
.more > summary { padding: 12px 14px; font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: "▾"; float: right; opacity: 0.6; }
.more[open] > summary::after { content: "▴"; }
.more > .field { padding: 0 14px; }
.more > .field:last-of-type { padding-bottom: 14px; }
.photo-box { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.photo-box img { width: 92px; height: 92px; border-radius: 12px; object-fit: cover; background: var(--bg-2); }
.photo-box__empty { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 12px; background: var(--bg-2); color: var(--ink-3); font-size: 12px; text-align: center; }

/* ---------- столы и QR ---------- */
.qr-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.qr-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 12px; text-align: center; }
.qr-card img { width: 100%; border-radius: 10px; background: #fff; }
.qr-card__title { margin: 8px 0 2px; font-weight: 800; }
.qr-card__url { font-size: 11px; color: var(--ink-3); word-break: break-all; }
.qr-card__actions { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.halls-editor { display: flex; flex-direction: column; gap: 10px; }
.hall-row { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) 110px 42px; align-items: center; }
.print-area { display: none; }

/* ---------- таблицы владельца ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* ---------- всплывашки ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 60;
  max-width: min(440px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
dialog.sheet { width: min(560px, calc(100vw - 24px)); max-height: 88vh; padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(3px); }
.sheet__body { padding: 20px; overflow-y: auto; max-height: 88vh; }
.sheet__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sheet__head h2 { flex: 1; }

/* ---------- мобильная раскладка ---------- */
.mobile-bar { display: none; }
.mobile-bar__badge { position: absolute; top: 2px; right: 2px; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; line-height: 18px; }
#burger { position: relative; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .editor__actions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; margin: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .editor__actions .btn { flex: 1; min-height: 48px; }
  .editor__actions .status { flex: none; }
  .ocard__foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .ocard__total, .ocard__foot .status { grid-column: 1 / -1; margin: 0; }
  .ocard__foot .btn { grid-column: 1 / -1; }
  .side { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 264px; transform: translateX(-100%); transition: transform 0.24s var(--ease); box-shadow: var(--shadow); }
  .side.is-open { transform: none; }
  .main { padding: 12px 16px 120px; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; margin: -4px -4px 12px; padding: 8px 4px; position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
  .mobile-bar strong { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-bar small { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.5); }
  .panel--sticky { position: static; max-height: none; }
}
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { display: block; position: absolute; inset: 0; }
  .print-page { page-break-after: always; display: grid; place-items: center; height: 100vh; }
  .print-page img { width: 92%; max-width: 620px; }
}
