/* Menu QR admin — forest, paper and brass, matching the guest menu. */
:root {
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --surface-2: #f1ece1;
  --ink: #1d221f;
  --ink-2: #4c534e;
  --muted: #7a7f78;
  --line: #e3dccd;
  --brand: #1f3a2e;
  --brand-ink: #f3ead8;
  --accent: #a87d3f;
  --accent-soft: #f2e6cf;
  --ok: #2f7a4f;
  --ok-soft: #dff0e4;
  --warn: #9a6512;
  --warn-soft: #fbecc8;
  --bad: #a83a2c;
  --bad-soft: #f8dcd6;
  --three: #3b5aa8;
  --three-soft: #e2e8f8;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(29 34 31 / 6%), 0 6px 20px rgb(29 34 31 / 5%);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --surface: #1a201c;
    --surface-2: #222a25;
    --ink: #ece7dc;
    --ink-2: #c3bdb0;
    --muted: #8f958d;
    --line: #2f3832;
    --brand: #0f1d17;
    --brand-ink: #efe4cd;
    --accent: #d0a865;
    --accent-soft: #3a3020;
    --ok: #7cc79a;
    --ok-soft: #1d3326;
    --warn: #e2b462;
    --warn-soft: #3a2f17;
    --bad: #ee8b7c;
    --bad-soft: #3d201b;
    --three: #9fb5ef;
    --three-soft: #1f2840;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 0.4em; line-height: 1.2; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; margin-top: 1.2em; }
p { margin: 0 0 0.8em; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.88rem; margin: 0.4em 0 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.7rem; color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }
.warn-text { color: var(--warn); font-weight: 600; }
.pad { padding: 0.5rem 0; }
.spacer { flex: 1; }

/* ── shell ── */
.has-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.shell-nav {
  background: var(--brand); color: var(--brand-ink); padding: 22px 16px; display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-family: var(--serif); font-size: 1.15rem; color: var(--brand-ink); }
.brand small { display: block; font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.6; }
.brand-mark { color: #c9a46a; font-size: 1.6rem; line-height: 1; }
.brand-mark.big { font-size: 3.4rem; }
.nav-restaurant { padding: 14px; border-radius: 12px; background: rgb(255 255 255 / 6%); display: grid; gap: 2px; }
.nav-restaurant .eyebrow { color: rgb(243 234 216 / 55%); }
.nav-rname { font-family: var(--serif); font-size: 1.1rem; text-decoration: none; color: var(--brand-ink); }
.role-chip { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: #c9a46a; }
.nav-group { display: grid; gap: 2px; }
.nav-group a { padding: 9px 12px; border-radius: 9px; text-decoration: none; color: rgb(243 234 216 / 80%); }
.nav-group a:hover { background: rgb(255 255 255 / 7%); color: var(--brand-ink); }
.nav-group a[aria-current="page"] { background: rgb(201 164 106 / 18%); color: #f1d9a8; }
.nav-global { border-top: 1px solid rgb(255 255 255 / 10%); padding-top: 14px; }
.nav-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: end; gap: 10px; font-size: 0.86rem; }
.who { display: grid; }
.who small { opacity: 0.6; word-break: break-all; }
.btn-link { background: none; border: 0; color: #c9a46a; cursor: pointer; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.nav-toggle, .nav-open, .nav-scrim { display: none; }

.shell-main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; gap: 10px; align-items: center; padding: 12px 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar-title { font-family: var(--serif); font-weight: 600; margin-right: auto; }
.content { padding: 28px 32px 64px; max-width: 1180px; width: 100%; }

/* ── page structure ── */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.crumb { font-size: 0.85rem; margin-bottom: 4px !important; }
.crumb a { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.stack > .card:last-child { margin-bottom: 0; }
.stack { display: grid; gap: 18px; align-content: start; }
.stack > .card { margin: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; margin-bottom: 18px; }
.grid-2 > .card { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.empty { text-align: center; padding: 48px 22px; }
.status-page { max-width: 560px; margin: 8vh auto; }
.status-code { font-family: var(--serif); font-size: 4rem; color: var(--accent); margin: 0; line-height: 1; }

/* ── flashes, pills ── */
.flash { padding: 12px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 16px; }
.flash-ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.flash-error { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; text-decoration: none; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.pill-3d { background: var(--three-soft); color: var(--three); }
.pill-soft { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 0.9rem var(--sans); cursor: pointer;
  text-decoration: none; transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:hover { border-color: var(--accent); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 85%, var(--accent)); color: var(--brand-ink); }
@media (prefers-color-scheme: dark) { .btn-primary { background: var(--accent); border-color: var(--accent); color: #18140c; } .btn-primary:hover { background: #e0bb7c; color: #18140c; } }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(1.08); }
.btn-sm { padding: 5px 11px; font-size: 0.82rem; }
.btn-icon { padding: 4px 9px; font-size: 0.9rem; border-radius: 8px; background: transparent; }
.btn-block { width: 100%; }
form.inline { display: inline-flex; gap: 4px; align-items: center; margin: 0; }

/* ── forms ── */
.form label { display: grid; gap: 5px; font-weight: 600; font-size: 0.88rem; margin-bottom: 14px; color: var(--ink-2); }
.form label small { font-weight: 400; }
input, select, textarea {
  width: 100%; font: 400 0.95rem var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; line-height: 1.45; }
textarea.mono { font-family: var(--mono); font-size: 0.85rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
@media (prefers-color-scheme: dark) { input[type=checkbox], input[type=radio] { accent-color: var(--accent); } }
input[type=color] { padding: 2px; width: 48px; height: 40px; flex: none; }
.color-field { display: flex; gap: 8px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.card { padding: 22px; margin-bottom: 18px; }
fieldset.unstyled:disabled, fieldset:disabled { opacity: 0.85; }
legend { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; padding: 0; margin-bottom: 14px; float: left; width: 100%; }
legend + * { clear: both; }
.form .check { display: flex; align-items: center; gap: 9px; font-weight: 500; margin-bottom: 8px; color: var(--ink); }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > label { flex: 1 1 180px; }
.row > label.grow { flex: 3 1 260px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 6px; }
.sticky-actions { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); }
.narrow { max-width: 620px; }
.field-error { color: var(--bad); font-weight: 500; font-size: 0.82rem; }
.toolbar { display: flex; gap: 8px; margin-bottom: 18px; max-width: 520px; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; margin: 4px 0 12px; }

/* ── tables & lists ── */
.table-wrap { padding: 6px 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.card > .table th:first-child, .card > .table td:first-child { padding-left: 0; }
.table-wrap .table th:first-child, .table-wrap .table td:first-child { padding-left: 22px; }
.table th.narrow { width: 40px; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.meta dt { color: var(--muted); font-size: 0.86rem; }
.meta dd { margin: 0; }

/* ── login ── */
.bare-main { min-height: 100vh; display: grid; }
.login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-art { background: radial-gradient(120% 90% at 20% 10%, #2c5240 0%, var(--brand) 55%, #0d1a14 100%); color: var(--brand-ink); padding: 8vh 7vw; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; }
.login-quote { font-family: var(--serif); font-size: clamp(1.8rem, 3.4vw, 2.8rem); line-height: 1.15; margin: 0; max-width: 14ch; }
.muted-inv { color: rgb(243 234 216 / 70%); max-width: 42ch; }
.login-card { align-self: center; justify-self: center; width: min(400px, 88vw); }
.login-card h1 { margin-bottom: 0; }
.login-card > .muted { margin-bottom: 26px; }
.login-card label { display: grid; gap: 6px; font-weight: 600; font-size: 0.88rem; margin-bottom: 16px; }
.login-card .btn { margin-top: 8px; padding: 12px; }

/* ── restaurants ── */
.r-card { display: flex; gap: 16px; align-items: center; text-decoration: none; margin: 0; transition: border-color 0.15s, transform 0.15s; }
.r-card:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
.r-initial { flex: none; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--brand); color: #c9a46a; font: 600 1.6rem var(--serif); }
.r-body { display: grid; gap: 3px; min-width: 0; }
.r-body strong { font-family: var(--serif); font-size: 1.15rem; }
.r-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ── overview ── */
.publish-card { display: flex; justify-content: space-between; gap: 20px; align-items: center; flex-wrap: wrap; border-left: 4px solid var(--line); }
.publish-card.is-live { border-left-color: var(--ok); }
.publish-card h2 { font-size: 1.5rem; margin: 4px 0; }
.publish-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.publish-actions .btn-primary { padding: 12px 22px; }
.issues ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.issues code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; margin-right: 6px; }
.issues-error { border-left: 4px solid var(--bad); }
.issues-warn { border-left: 4px solid var(--warn); }
.count { font-family: var(--sans); font-size: 0.8rem; background: var(--surface-2); padding: 1px 8px; border-radius: 99px; vertical-align: middle; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { text-decoration: none; margin: 0; display: grid; gap: 2px; }
.stat strong { font: 600 2rem var(--serif); }
.stat span { color: var(--muted); font-size: 0.85rem; }
.stat:hover { border-color: var(--accent); color: inherit; }

/* ── items ── */
.item-group { padding: 8px 22px 12px; }
.group-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 8px; border-bottom: 1px solid var(--line); }
.group-head h2 { margin: 0; }
.item-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.item-row:last-child { border-bottom: 0; }
.item-row.is-off .item-main { opacity: 0.55; }
.item-row:target { background: linear-gradient(90deg, var(--accent-soft), transparent); }
.item-main { flex: 1; min-width: 0; display: grid; gap: 2px; text-decoration: none; }
.item-name { font-weight: 650; }
.item-desc { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.item-price { font-family: var(--serif); font-weight: 600; white-space: nowrap; }
.switch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 12px 4px 4px; cursor: pointer; font: 600 0.78rem var(--sans); color: var(--bad); min-width: 112px; }
.switch span { width: 30px; height: 18px; border-radius: 99px; background: var(--line); position: relative; transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch.on { color: var(--ok); }
.switch.on span { background: var(--ok); }
.switch.on span::after { transform: translateX(12px); }

.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.item-side { position: sticky; top: 76px; }
.actions-card { display: grid; gap: 8px; }
.label-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.form .mode-tab { display: grid; gap: 2px; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; position: relative; }
.mode-tab input { position: absolute; opacity: 0; }
.mode-tab strong { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.mode-tab small { font-weight: 400; color: var(--muted); }
.mode-tab:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mode-tab:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.picker-block { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 4px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; max-height: 330px; overflow-y: auto; padding: 4px; }
.picker-list { grid-template-columns: 1fr; }
.form .pick { display: grid; gap: 6px; margin: 0; padding: 6px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; font-size: 0.8rem; position: relative; align-content: start; }
.picker-list .pick { grid-template-columns: auto 1fr; align-items: center; }
.pick input { position: absolute; opacity: 0; }
.pick img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; width: 100%; background: var(--surface-2); }
.pick span { overflow: hidden; text-overflow: ellipsis; }
.pick.none { place-content: center; text-align: center; color: var(--muted); min-height: 60px; }
.pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.pick:has(input:focus-visible) { outline: 2px solid var(--accent); }
.model-chip { display: inline-grid; place-items: center; font: 700 0.7rem var(--mono); letter-spacing: 0.08em; background: var(--three-soft); color: var(--three); border-radius: 8px; padding: 6px 8px; }
.model-chip.big { font-size: 1.1rem; padding: 18px 22px; border-radius: 14px; }
.checks { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.checks .check { flex: 1 1 200px; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-color: var(--bad-soft); }
.danger-zone h2 { margin: 0; }

/* ── media ── */
.uploads { padding-top: 14px; }
.upload-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.upload-tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font: 600 0.9rem var(--sans); color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.upload-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.form .drop { display: block; position: relative; border: 1.5px dashed var(--line); border-radius: 14px; padding: 26px; text-align: center; cursor: pointer; background: var(--surface-2); font-weight: 400; color: var(--ink-2); transition: border-color 0.15s; }
.drop:hover, .drop:focus-within { border-color: var(--accent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.frames { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.frames-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.frame-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.frame { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 5px; background: var(--surface); cursor: grab; display: grid; gap: 4px; }
.frame img { aspect-ratio: 1; object-fit: cover; border-radius: 7px; width: 100%; pointer-events: none; }
.frame-no { position: absolute; top: 9px; left: 9px; background: var(--brand); color: var(--brand-ink); font: 700 0.72rem var(--sans); border-radius: 99px; padding: 1px 7px; }
.frame-name { font-size: 0.72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-move { display: flex; justify-content: space-between; }
.progress { position: relative; height: 30px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.progress span { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 45%, transparent); transition: width 0.2s; }
.progress em { position: relative; display: block; text-align: center; line-height: 30px; font-style: normal; font-size: 0.82rem; font-weight: 600; }
.filters { display: flex; gap: 6px; margin: 4px 0 16px; flex-wrap: wrap; }
.filters a { padding: 6px 14px; border-radius: 99px; text-decoration: none; border: 1px solid var(--line); font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
.filters a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.media-card { padding: 0; margin: 0; overflow: hidden; text-decoration: none; display: grid; transition: border-color 0.15s, transform 0.15s; }
.media-card:hover { border-color: var(--accent); transform: translateY(-2px); color: inherit; }
.media-thumb { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; position: relative; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; bottom: 8px; left: 8px; background: rgb(15 29 23 / 82%); color: #f3ead8; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.media-info { display: grid; padding: 10px 12px; gap: 1px; }
.media-info strong { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview img { border-radius: 10px; margin: 0 auto; max-height: 520px; object-fit: contain; }
.seq-viewer { cursor: ew-resize; touch-action: pan-y; user-select: none; }
.seq-viewer img { pointer-events: none; }
.preview input[type=range] { margin-top: 12px; padding: 0; accent-color: var(--accent); }
.model-preview { display: grid; place-items: center; gap: 10px; padding: 30px 0; }
pre { background: var(--surface-2); border-radius: 10px; padding: 12px; overflow: auto; max-height: 340px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 22px; color: var(--muted); }

/* ── responsive ── */
@media (max-width: 1000px) {
  .item-layout { grid-template-columns: 1fr; }
  .item-side { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .has-shell { grid-template-columns: 1fr; }
  .shell-nav { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 30; transform: translateX(-100%); transition: transform 0.2s; }
  .nav-toggle:checked ~ .shell-nav { transform: none; }
  .nav-toggle:checked ~ .nav-scrim { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / 40%); z-index: 20; }
  .nav-open { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-size: 1.1rem; }
  .topbar { padding: 10px 16px; }
  .content { padding: 20px 16px 48px; }
  .grid-2 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 34vh; padding: 32px 24px; }
  .login-card { padding: 32px 0; }
  .mode-tabs { grid-template-columns: 1fr; }
  .item-row { flex-wrap: wrap; }
  .item-main { flex-basis: 100%; }
  .danger-zone { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── palette & texts ── */
.palette { margin-top: 6px; display: grid; gap: 8px; }
.palette-head, .palette-row { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 1fr; gap: 12px; align-items: center; }
.palette-head strong { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.palette-row > span:first-child { display: grid; font-size: 0.9rem; }
.palette-row .color-field input:not([type=color]) { font-family: var(--mono); font-size: 0.85rem; }
.btn-inline { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.text-group { padding-top: 14px; }
.text-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 6px 18px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.text-row:first-of-type { border-top: 0; }
.form .text-row label { margin: 0; }
.text-meta { display: grid; gap: 2px; font-size: 0.86rem; }
.text-meta code { font-size: 0.74rem; color: var(--muted); }
.text-row.is-changed .text-meta strong::after { content: " · changed"; color: var(--accent); font-weight: 600; font-size: 0.75rem; }
.ph { display: inline-block; font: 600 0.72rem var(--mono); background: var(--surface-2); border-radius: 6px; padding: 0 5px; margin-right: 4px; color: var(--ink-2); }
@media (max-width: 860px) { .palette-head, .palette-row, .text-row { grid-template-columns: 1fr; } .palette-head { display: none; } }

/* ── GLB vs sequence guide ── */
.guide { border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; margin: 6px 0 4px; background: var(--surface-2); }
.guide summary { margin: 10px 0; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.guide-col h4 { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; font: 600 1rem var(--serif); }
.guide-col p { font-size: 0.88rem; color: var(--ink-2); }
.guide-col ul { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 5px; font-size: 0.86rem; color: var(--ink-2); }
.guide > .hint { margin-bottom: 12px; }
@media (max-width: 860px) { .guide-grid { grid-template-columns: 1fr; } }

/* ── table QR cards (colours: /r/{id}/qr/card.css from the restaurant's light palette) ── */
.qr-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.qr-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 12px; }
.qr-card { --card-bg: #fffcf6; --card-ink: #1c1b17; --card-accent: #8a6634; margin: 0; display: grid; gap: 8px; min-width: 0; }
.qr-card figcaption { min-width: 0; }
.qr-card-inner {
  background: var(--card-bg); color: var(--card-ink); border: 1px solid var(--line); border-radius: 6px;
  padding: 26px 22px 22px; text-align: center; display: grid; justify-items: center; gap: 4px;
  box-shadow: var(--shadow); -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.qr-logo { width: 54px; height: 54px; object-fit: contain; margin-bottom: 4px; }
.qr-name { font: 600 1.35rem var(--serif); letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.qr-code { width: 72%; max-width: 220px; margin: 12px 0 8px; }
.qr-code svg { display: block; width: 100%; height: auto; }
.qr-scan { font: italic 1.1rem var(--serif); margin: 0; }
.qr-hint { font-size: 0.8rem; opacity: 0.7; margin: 0; }
.qr-table { margin: 12px 0 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; color: var(--card-accent); }
.qr-card figcaption { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 0.75rem; }
.qr-url { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.qr-dl { display: flex; gap: 4px; flex: none; }

@page { size: A4; margin: 12mm; }
@media print {
  body, .has-shell { display: block; background: #fff; }
  .shell-nav, .topbar, .nav-scrim, .nav-toggle, .qr-controls, .flash { display: none !important; }
  .shell-main, .content { padding: 0; margin: 0; max-width: none; }
  .qr-sheet { display: grid; gap: 8mm; margin: 0; }
  .qr-grid { grid-template-columns: 1fr 1fr; }
  .qr-grid .qr-card { height: 128mm; break-inside: avoid; }
  .qr-grid .qr-card:nth-child(4n) { break-after: page; }
  .qr-single { grid-template-columns: 1fr; }
  .qr-single .qr-card { height: 265mm; break-after: page; break-inside: avoid; }
  .qr-single .qr-card-inner { padding: 30mm 20mm; }
  .qr-single .qr-name { font-size: 2.2rem; }
  .qr-single .qr-code { max-width: 110mm; }
  .qr-single .qr-scan { font-size: 1.6rem; }
  .qr-card-inner { box-shadow: none; height: 100%; align-content: center; border: 0.3mm dashed #bbb; border-radius: 0; }
}

/* ── settings: languages & social ── */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 14px; margin: 4px 0 14px; }
.lang-head { grid-column: 1 / -1; display: grid; gap: 2px; margin-bottom: 6px; font-size: 0.9rem; }
.social-rows .row > label { margin-bottom: 8px; }

/* ── translations ── */
.translations .tr-lang { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.translations legend { font-size: 1rem; margin-bottom: 8px; }

/* dish editor P4 */
.small-legend { font: 600 0.88rem var(--sans); color: var(--ink-2); margin-bottom: 6px; float: none; }
.allergens { margin: 4px 0 14px; }
.range-row { display: flex; gap: 10px; align-items: center; }
.range-row input[type=range] { padding: 0; accent-color: var(--accent); }
.range-row output { min-width: 3.5em; font-variant-numeric: tabular-nums; font-weight: 600; }
.viewer-settings { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* asset page P4 */
.glb-preview { width: 100%; height: 420px; background: radial-gradient(circle at 50% 40%, var(--surface), var(--surface-2)); border-radius: 10px; --poster-color: transparent; }
.frame-editor .frame-grid { margin-bottom: 12px; }
.append-frames { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }

/* GLB player in the upload form and dish editor */
.glb-upload-preview, .glb-pick-preview { margin: 4px 0 14px; }
.glb-pick-preview .glb-preview { height: 320px; }

/* Theme & appearance (P5) */
.theme-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.theme-preview { position: sticky; top: 76px; display: grid; gap: 10px; }
.preview-bar { display: flex; justify-content: space-between; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg-btn { border: 0; background: var(--surface); padding: 7px 12px; font: 600 0.82rem var(--sans); color: var(--muted); cursor: pointer; }
.seg-btn[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }
.preview-frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface-2); height: calc(100vh - 190px); min-height: 520px; }
.preview-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.preview-frame.is-mobile { width: 390px; max-width: 100%; margin: 0 auto; border-radius: 28px; border-width: 8px; border-color: var(--ink); }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.preset { display: grid; gap: 4px; text-align: left; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.preset:hover { border-color: var(--accent); }
.preset.is-current { border-color: var(--accent); background: var(--accent-soft); }
.preset strong { font-family: var(--serif); font-size: 1rem; }
.preset small { color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.preset em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.swatches { display: flex; gap: 4px; margin-bottom: 4px; }
.sw { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgb(0 0 0 / 12%); display: inline-block; }
.palette-15 .palette-row { padding: 2px 0; }
.contrast { margin-top: 12px; }
.contrast .flash { margin: 0; font-size: 0.86rem; }
@media (max-width: 1200px) { .theme-layout { grid-template-columns: 1fr; } .theme-preview { position: static; } }
