/* amenu Studio: a near-black sidebar around a warm light workspace, so the guest
   menu is the richest thing on screen. Soft cards, sentence case, one sans and one
   accent. Sign-in and setup keep the dark ground; .desk and .sheet switch the
   tokens to light, so every control below works on both. */
:root {
  --bench: #100d0b;
  --panel: #1a1512;
  --panel-2: #241e19;
  --panel-3: #30281f;
  --line: rgba(244, 234, 223, 0.09);
  --line-2: rgba(244, 234, 223, 0.17);
  --text: #f6f0e8;
  --soft: #b0a294;
  --faint: #7c6f63;
  --terra: #e06a32;
  --terra-hi: #ec7c45;
  --terra-ink: #1a0d05;
  --primary: var(--terra);
  --primary-hi: var(--terra-hi);
  --primary-ink: var(--terra-ink);
  --ok: #8fc9a0;
  --danger: #ff8a74;
  --display: "Space Grotesk", system-ui, sans-serif;
  --ui: "Geist", system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 2px rgba(23, 18, 14, 0.04);
  color-scheme: dark;
}
.desk, .sheet {
  --bench: #eeebe5;
  --panel: #fbfaf7;
  --panel-2: #f2efea;
  --panel-3: #e6e2db;
  --line: rgba(23, 18, 14, 0.08);
  --line-2: rgba(23, 18, 14, 0.15);
  --text: #17120e;
  --soft: #6f6358;
  --faint: #998c80;
  --primary: #17120e;
  --primary-hi: #33291f;
  --primary-ink: #fbfaf7;
  --ok: #2f8153;
  --danger: #c23f28;
  color-scheme: light;
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bench); color: var(--text); font: 15px/1.45 var(--ui); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; font-weight: 500; white-space: nowrap; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s; }
.btn:hover { background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn.accent { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn.accent:hover { background: var(--primary-hi); }
.btn.wide { width: 100%; }
.btn svg { fill: currentColor; stroke: none; }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--soft); transition: background 0.15s, color 0.15s; }
.icon:hover { background: var(--panel-2); color: var(--text); }
.icon:disabled { opacity: 0.35; pointer-events: none; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  color: var(--text); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background 0.15s; }
.pill:hover { background: var(--panel-2); }
.pill svg { width: 18px; height: 18px; }
.link { border: 0; background: none; color: var(--terra); font-weight: 500; padding: 4px 0; }
.link:hover { color: var(--terra-hi); text-decoration: underline; text-underline-offset: 3px; }
.kicker { margin: 0 0 14px; font-size: 14px; font-weight: 500; color: var(--terra); }
.msg { min-height: 1.4em; margin: 6px 0 0; color: var(--soft); font-size: 13.5px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }
.msg a { color: var(--terra); }

/* ── Sign in ───────────────────────────────────────────────── */
.gate { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: auto; }
.gate-card { align-self: center; justify-self: center; width: min(440px, 100%); padding: 40px 24px; }
.gate h1, .setup h1, .home h1 { margin: 0 0 16px; font: 600 clamp(34px, 5vw, 50px)/1.02 var(--display); letter-spacing: -0.04em; }
.gate h1 em { font-style: normal; color: var(--terra); }
.lede { margin: 0 0 28px; color: var(--soft); font-size: 16px; }
.gate-actions { display: grid; gap: 10px; margin-bottom: 18px; }
.otp { display: flex; gap: 8px; margin-top: 8px; }
.otp input { flex: 1; min-width: 0; height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; }
.otp input:focus { outline: 2px solid var(--terra); outline-offset: -1px; }
.gate-art { position: relative; margin: 12px 12px 12px 0; border-radius: 24px; overflow: hidden; background: var(--panel); }
.gate-art::before { content: ""; position: absolute; inset: -40px; background: var(--terra); opacity: 0.22;
  -webkit-mask: url("/o/girih/pattern.svg") 0 0 / 120px 120px repeat; mask: url("/o/girih/pattern.svg") 0 0 / 120px 120px repeat; }
@media (max-width: 760px) {
  .gate { grid-template-columns: 1fr; grid-template-rows: 140px auto; }
  .gate-art { order: -1; margin: 12px 12px 0; }
  .gate-card { padding-top: 24px; }
}

/* ── Your restaurants ──────────────────────────────────────── */
.home { height: 100%; overflow: auto; }
.home-top, .home-body { width: min(980px, 100%); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.home-top { display: flex; align-items: center; gap: 14px; padding-top: 18px; padding-bottom: 18px; }
.home-top .brand { display: flex; flex: none; padding: 0; margin-right: auto; }
.home-top .wordmark { display: block; }
.home-who { min-width: 0; margin: 0; color: var(--soft); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-top .btn { flex: none; height: 38px; padding: 0 16px; font-size: 14px; }
.home-body { padding-top: 28px; padding-bottom: 48px; }
.home .lede { margin-bottom: 24px; }
.home .msg { margin-top: 18px; font-size: 14px; }
.vcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.vcard { min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: 20px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 13.5px; text-align: left; }
.vcard-head { min-width: 0; display: flex; align-items: center; gap: 14px; }
.vcard-art { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line-2); font: 600 24px/1 var(--display); }
.vcard-text { min-width: 0; }
.vcard h2 { margin: 0 0 2px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.vcard h2, .vcard-text p, .vcard-text a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vcard-text p { margin: 0; color: var(--soft); }
.vcard-text a { display: block; color: var(--soft); text-underline-offset: 3px; text-decoration: none; }
.vcard-text a:hover { color: var(--text); text-decoration: underline; }
.vcard-acts { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vcard-acts .btn { height: 42px; padding: 0 12px; font-size: 14px; }
a.btn { color: var(--text); text-decoration: none; }
.vcard.add { cursor: pointer; align-items: flex-start; justify-content: center; gap: 6px; border-style: dashed; border-color: var(--line-2); background: transparent; transition: background 0.15s; }
.vcard.add:hover { background: var(--panel); }
.vcard.add b { font: 600 18px/1.2 var(--display); }
.vcard.add span { color: var(--soft); }
@media (max-width: 760px) {
  .home-top, .home-body { padding-left: 16px; padding-right: 16px; }
  .home-body { padding-top: 12px; }
}

/* ── New venue ─────────────────────────────────────────────── */
.setup { height: 100%; overflow: auto; display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); }
.setup-card { padding: 40px 32px 48px; }
.setup .lede b { color: var(--text); font-weight: 500; word-break: break-all; }
.setup-form { display: grid; gap: 18px; margin-bottom: 22px; }
.setup-form .text { height: 44px; }
.setup-form .text:focus, .slug:focus-within { outline: 2px solid var(--terra); outline-offset: -1px; }
.row label i { font-style: normal; font-weight: 400; color: var(--faint); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slug { display: flex; align-items: center; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); overflow: hidden; font-size: 14px; }
.slug span { padding: 0 1px 0 14px; color: var(--soft); white-space: nowrap; }
.slug input { flex: 1; min-width: 0; height: 100%; padding: 0 12px 0 0; border: 0; background: transparent; outline: none; }
.slug[data-state="ok"] { border-color: var(--ok); }
.slug[data-state="bad"] { border-color: var(--danger); }
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; }
.tpl { display: grid; gap: 7px; padding: 0; border: 0; background: none; text-align: left; color: var(--text); }
.tpl .card { position: relative; height: 96px; padding: 12px 10px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); display: grid; align-content: start; gap: 6px; overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s; }
.tpl:hover .card { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line-2), 0 8px 18px -12px rgba(23, 18, 14, 0.4); }
.tpl.on .card { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--terra); }
.tpl .card .t { font-size: 15px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl .card .l { height: 3px; border-radius: 2px; opacity: 0.38; }
.tpl .card .p { position: absolute; right: 10px; bottom: 10px; width: 16px; height: 5px; border-radius: 3px; }
.tpl b { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl small { display: block; margin-top: -5px; font-size: 12px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.custom-note { margin: 0 0 6px; padding: 14px 16px; border-radius: 12px; background: var(--panel); color: var(--soft); font-size: 14px; }
.custom-note a { color: var(--terra); font-weight: 500; }
.setup-stage { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; background: var(--bench); }
.setup-stage .device { height: min(760px, calc(100vh - 90px)); }
.setup-caption { margin: 0; color: var(--faint); font-size: 12.5px; }
.setup.claim-only { grid-template-columns: minmax(0, 600px); justify-content: center; }
.setup.claim-only .setup-stage, .setup.claim-only .custom-note { display: none; }
.setup-form .slug input { color: var(--text); }

/* The Instagram proof. */
.code { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 0 0 20px; padding: 16px 18px 16px 20px;
  border: 1px solid var(--line-2); border-radius: 14px; background: var(--panel-2); color: var(--text); cursor: copy; transition: background 0.15s; }
.code b { font-size: 24px; font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; user-select: all; }
.code span { font-size: 13.5px; font-weight: 500; color: var(--terra); }
.code:hover { background: var(--panel-3); }
.steps { margin: 0 0 22px; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { position: relative; padding: 11px 0 11px 28px; border-bottom: 1px solid var(--line); color: var(--soft); font-size: 14px; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 11px; font-weight: 600; color: var(--terra); }
.steps a, .steps b { color: var(--text); font-weight: 500; }
#claim-note b { color: var(--text); font-weight: 500; }
#claim-note .link { font-size: 13px; padding: 0; margin-left: 4px; }
@media (max-width: 900px) {
  .setup { grid-template-columns: 1fr; }
  .setup-card { padding: 28px 16px 24px; }
  .setup-stage { position: static; height: auto; padding: 8px 16px 40px; }
  .setup-stage .device { height: 620px; }
}
@media (max-width: 420px) { .pair { grid-template-columns: 1fr; } }

/* ── Lab ───────────────────────────────────────────────────── */
.lab { height: 100%; display: grid; grid-template-columns: 252px minmax(0, 1fr); }

/* The sidebar: logo, tools with where each one stands, then the way out. */
.side { min-height: 0; display: flex; flex-direction: column; gap: 22px; padding: 22px 12px 14px; overflow: auto; scrollbar-width: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 12px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand .mark { width: 19px; height: 24px; stroke: none; }
.wordmark { font: 700 23px/1 var(--display); letter-spacing: -0.06em; }
.wordmark b { color: var(--terra); font-weight: 700; }
.pro-chip { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: var(--terra); color: var(--terra-ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.island { display: flex; flex-direction: column; gap: 2px; }
.island button { position: relative; display: grid; grid-template-columns: 20px auto minmax(0, 1fr); align-items: center; gap: 12px; height: 46px; padding: 0 12px; border: 0; border-radius: 14px;
  background: transparent; color: var(--soft); text-align: left; transition: background 0.15s, color 0.15s; }
.island button:hover { background: rgba(244, 234, 223, 0.05); color: var(--text); }
/* The open tool: a soft light falling from the top edge of its pill. */
.island button.on { color: var(--text); background: radial-gradient(70% 90% at 50% -30%, rgba(236, 124, 69, 0.42), transparent 100%), rgba(244, 234, 223, 0.07);
  box-shadow: inset 0 1px rgba(236, 124, 69, 0.6), inset 0 0 0 1px rgba(244, 234, 223, 0.04); }
.island span { font-size: 15px; font-weight: 500; }
.island .sum { justify-self: end; max-width: 100%; font-style: normal; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.island button.on .sum { color: var(--soft); }
.sum .ink { display: inline-block; width: 11px; height: 11px; margin-left: 3px; vertical-align: -1px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-2); }
.side-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-link { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--soft);
  font-size: 14px; font-weight: 500; text-decoration: none; text-align: left; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.side-link:hover { background: rgba(244, 234, 223, 0.05); color: var(--text); }

/* The workspace: inset against the black, title on top, save bar at the foot. */
.desk { min-width: 0; min-height: 0; margin: 12px 12px 12px 0; padding: 20px 20px 16px; border-radius: 24px; background: var(--bench); display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.topbar { flex: none; display: flex; align-items: center; gap: 14px; }
.back { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text); transition: background 0.15s; }
.back:hover { background: var(--panel); }
.back svg { width: 18px; height: 18px; }
.venue { flex: 1; min-width: 0; }
.venue-name { margin: 0; font-size: 23px; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.venue-url { display: block; color: var(--soft); font-size: 13px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.venue-url:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.venue-pick { display: block; field-sizing: content; max-width: 100%; height: 30px; margin-left: -2px; padding: 0 26px 0 2px; border: 0; border-radius: 6px; -webkit-appearance: none; appearance: none; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6358' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 4px center / 16px no-repeat;
  color: var(--text); font-size: 23px; font-weight: 600; letter-spacing: -0.02em; text-overflow: ellipsis; }
.save-state { flex: none; display: flex; align-items: center; gap: 8px; margin: 0; color: var(--soft); font-size: 13.5px; font-weight: 500; }
.save-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.save-state.unsaved::before { background: var(--terra); }
.save-state.unsaved { color: var(--text); }

.work { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(0, max-content); gap: 16px; }

/* Cards. */
.tray, .stage, .actions { border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); }
.tray { container-type: inline-size; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; }
.tray-head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 16px; }
.tray-head > div { flex: 1; min-width: 0; }
.tray-grip, .tray-close { display: none; }
.tray-head h2, .stage-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.tray-hint { margin: 2px 0 0; color: var(--soft); font-size: 13.5px; }
.tray-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 24px; scrollbar-width: thin; scrollbar-color: var(--panel-3) transparent; }
.tray-body > * { margin: 0; }
.tray-body > .msg { min-height: 0; margin-top: -8px; }
/* A wide card seats short controls side by side. */
@container (min-width: 560px) {
  .tray-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 28px; }
  .tray-body > * { grid-column: 1 / -1; }
  .tray-body > .row:has(> input), .tray-body > .row:has(> .seg), .tray-body > .row:has(> .colours), .tray-body > .row:has(> .logo-box), .tray-body > .toggle { grid-column: auto; }
}

.stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 14px 18px 20px; border-radius: 20px; overflow: hidden; }
.stage-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.device { position: relative; flex: 1 1 0; align-self: center; min-height: 0; width: 390px; max-width: 100%; margin: 6px 0; border-radius: 30px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 6px #17120e, 0 24px 44px -26px rgba(23, 18, 14, 0.55); transition: width 0.3s ease; }
.setup-stage .device { flex: none; width: 390px; box-shadow: 0 0 0 1px var(--line-2), 0 0 0 7px #050403; }
.device iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; visibility: hidden; }
.device iframe.shown { visibility: visible; }
/* Takes the card's width without widening it. */
.site-note { flex: none; width: 0; min-width: 100%; margin: 0; padding: 9px 12px; border-radius: 10px; background: var(--panel-2); color: var(--soft); font-size: 13px; }
.site-note a { color: var(--text); text-decoration-color: var(--terra); text-underline-offset: 3px; }
.compare-tag { position: absolute; z-index: 2; top: 16px; left: 50%; transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: 999px;
  background: rgba(23, 18, 14, 0.85); color: #fbfaf7; font-size: 12.5px; font-weight: 500; }

/* The save bar. */
.actions { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 10px 12px 10px 20px; border-radius: 18px; }
.save-note { min-width: 0; display: flex; align-items: center; gap: 10px; margin: 0; color: var(--soft); font-size: 13.5px; }
.save-note svg { width: 18px; height: 18px; }
.action-btns { flex: none; display: flex; align-items: center; gap: 8px; }
.action-btns .icon { width: 42px; height: 42px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); }
.action-btns .pill { height: 42px; padding: 0 16px; font-size: 14px; }
.action-btns .btn { height: 42px; margin-left: 4px; padding: 0 24px; font-size: 14.5px; }

/* Segments: the chosen one lifts out of a soft well. */
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--panel-2); }
.seg button { flex: 1; min-height: 36px; border: 0; border-radius: 9px; background: transparent; padding: 0 10px; color: var(--soft); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--text); background: var(--panel); box-shadow: 0 1px 2px rgba(23, 18, 14, 0.12), 0 0 0 1px var(--line); }
.seg.small { border-radius: 999px; }
.seg.small button { min-height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13px; }

/* Tool card controls */
.row { display: grid; gap: 10px; align-content: start; }
.row > label, .row > .label { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 500; color: var(--text); }
.row .val { font-weight: 400; color: var(--soft); font-variant-numeric: tabular-nums; }
.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; padding: 2px; }
.tray .templates { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 14px; padding: 4px; }
.tray .tpl .card { height: 132px; padding: 16px 14px; gap: 8px; }
.tray .tpl .card .t { font-size: 18px; }

/* Which ornament sets to show. */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chips::before { content: "Ornaments for"; flex-basis: 100%; margin-bottom: 4px; font-size: 14px; font-weight: 500; color: var(--text); }
.chip { height: 32px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: 999px; background: none; color: var(--soft); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.chip:hover { color: var(--text); background: var(--panel-2); }
.chip.on { color: var(--primary-ink); background: var(--primary); border-color: transparent; }

.swatch { position: relative; display: grid; place-items: center; align-content: center; gap: 6px; width: auto; aspect-ratio: 1; min-width: 0; padding: 8px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.swatch:hover { border-color: var(--line-2); }
.swatch.on { border-color: var(--terra); background: var(--panel); box-shadow: 0 0 0 1px var(--terra); }
.swatch .aa { font-size: 26px; line-height: 1; }
.swatch small { max-width: 100%; font-size: 11.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swatch.on small { color: var(--text); }
.swatch .art { width: 42px; height: 42px; background: var(--text); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.swatch .art.tile { width: 100%; height: 40px; -webkit-mask-size: 26px; mask-size: 26px; -webkit-mask-repeat: repeat; mask-repeat: repeat; }
.swatch .art.wide { width: 100%; height: 16px; }
/* A frame as four mirrored corners, as the menu draws it. */
.swatch .mini { position: relative; width: 42px; height: 42px; }
.swatch .mini i { position: absolute; width: 18px; height: 18px; background: var(--text);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain; }
.swatch .mini .c0 { top: 0; left: 0; }
.swatch .mini .c1 { top: 0; right: 0; transform: scaleX(-1); }
.swatch .mini .c2 { bottom: 0; left: 0; transform: scaleY(-1); }
.swatch .mini .c3 { bottom: 0; right: 0; transform: scale(-1); }
.swatch .none { font-size: 20px; line-height: 1.3; color: var(--faint); }
.swatch.locked .mini, .swatch.locked .art, .swatch.locked .aa { opacity: 0.5; }
.crown { position: absolute; top: 5px; right: 5px; padding: 1px 7px; border-radius: 999px; background: #17120e; color: #f6f0e8; font-size: 10.5px; font-weight: 500; line-height: 1.5; }
.crown.inline, .toggle .crown { position: static; display: inline-block; margin-left: 8px; vertical-align: 1px; }

/* Sliders: a thin track, filled up to the handle. */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--terra), var(--terra)) 0 0 / var(--fill, 0%) 100% no-repeat, var(--panel-3); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--terra), var(--terra)) 0 0 / var(--fill, 0%) 100% no-repeat, var(--panel-3); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line-2), 0 1px 4px rgba(23, 18, 14, 0.25); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line-2), 0 1px 4px rgba(23, 18, 14, 0.25); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--terra); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--terra); }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; align-self: start; min-height: 48px; padding: 8px 12px 8px 14px; border-radius: 12px; background: var(--panel-2); font-size: 14px; font-weight: 500; cursor: pointer; }
.toggle input { position: relative; flex: none; width: 40px; height: 24px; margin: 0; -webkit-appearance: none; appearance: none; border-radius: 999px; background: var(--panel-3);
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background 0.15s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(23, 18, 14, 0.25); transition: transform 0.18s ease-out; }
.toggle input:checked { background: var(--terra); box-shadow: none; }
.toggle input:checked::after { transform: translateX(16px); }

.colours { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 3px; }
.dot { position: relative; width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 1px var(--line-2); }
.dot.on::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--terra); pointer-events: none; }
.dot.picker { overflow: visible; background: conic-gradient(from 90deg, #e06a32, #f2c468, #8fc9a0, #5c9fd0, #8d6fc4, #d4637f, #e06a32); }
.dot.picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dot.clear { display: grid; place-items: center; background: transparent; color: var(--soft);
  background-image: linear-gradient(135deg, transparent calc(50% - 0.75px), var(--faint) calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px)); }
.dot.clear { font-size: 0; }
.warn { padding: 10px 12px; border-radius: 10px; background: rgba(194, 63, 40, 0.09); color: var(--danger); font-size: 13.5px; }
.text { width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; }
.text:focus { outline: 2px solid var(--terra); outline-offset: -1px; }
.logo-box { display: flex; gap: 14px; align-items: center; }
.logo-box .thumb { width: 88px; height: 88px; border-radius: 12px; flex: none; display: grid; place-items: center; overflow: hidden;
  background: repeating-conic-gradient(var(--panel-3) 0 25%, var(--panel-2) 0 50%) 0 0 / 14px 14px; box-shadow: inset 0 0 0 1px var(--line); }
.logo-box .thumb img { max-width: 92%; max-height: 92%; }
.logo-box .btns { display: grid; gap: 8px; flex: 1; max-width: 260px; justify-items: start; }
.logo-box .btn { height: 40px; width: 100%; }
.logo-box .msg { margin: 0; font-size: 12.5px; }

/* ── Pro ───────────────────────────────────────────────────── */
.sheet { width: min(440px, calc(100% - 24px)); padding: 28px 26px 22px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.6); }
.sheet::backdrop { background: rgba(8, 6, 5, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet h2 { margin: 0 0 18px; font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -0.025em; }
.sheet-close { position: absolute; top: 12px; right: 12px; margin: 0; }
.perks { list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid var(--line); }
.perks li { padding: 11px 0 11px 26px; position: relative; color: var(--soft); font-size: 14px; border-bottom: 1px solid var(--line); }
.perks li::before { content: ""; position: absolute; left: 0; top: 14px; width: 14px; height: 14px; background: var(--terra);
  -webkit-mask: url("/o/girih/corner.svg") center / contain no-repeat; mask: url("/o/girih/corner.svg") center / contain no-repeat; }
.perks b { display: block; color: var(--text); font-weight: 500; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.plan { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: transparent; text-align: left; transition: border-color 0.15s, box-shadow 0.15s; }
.plan.on { border-color: var(--terra); box-shadow: 0 0 0 1px var(--terra); }
.plan b { font-size: 13.5px; font-weight: 500; color: var(--soft); }
.plan .price { font-size: 23px; font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plan .price s { margin-right: 6px; font-size: 15px; color: var(--faint); font-weight: 400; }
.plan .price span { font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--soft); }
.plan small { font-size: 12.5px; color: var(--soft); }
.promo { margin-bottom: 14px; }
.promo label { font-size: 14px; font-weight: 500; }
.promo .otp { margin-top: 8px; }
.fine { margin: 12px 0 0; font-size: 12.5px; color: var(--faint); text-align: center; }

.toast { position: fixed; top: 28px; left: 50%; transform: translateX(-50%); z-index: 20; margin: 0; padding: 10px 18px; border-radius: 999px;
  background: #17120e; color: #fbfaf7; font-weight: 500; font-size: 14px; box-shadow: 0 0 0 1px rgba(244, 234, 223, 0.14), 0 12px 30px -10px rgba(0, 0, 0, 0.6); }

/* ── Narrower desks: the sidebar folds to a rail ───────────── */
@media (max-width: 1279px) and (min-width: 900px) {
  .lab { grid-template-columns: 84px minmax(0, 1fr); }
  .side { padding: 20px 8px 12px; align-items: stretch; }
  .brand { justify-content: center; padding: 0; }
  .wordmark, .brand .pro-chip { display: none; }
  .island button { grid-template-columns: 1fr; justify-items: center; align-content: center; gap: 4px; height: 60px; padding: 0 2px; }
  .island span { font-size: 12px; }
  .island .sum, .side-link span { display: none; }
  .side-link { justify-content: center; padding: 0; }
  .save-note { display: none; }
  .actions { justify-content: flex-end; }
}

/* ── Phones: tools at the foot, the tool card rises over the menu ── */
@media (max-width: 899px) {
  .lab { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; display: block; padding: 0 0 env(safe-area-inset-bottom); background: var(--bench); border-top: 1px solid var(--line); overflow: visible; }
  .brand, .side-foot { display: none; }
  .island { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; }
  .island button { grid-template-columns: 1fr; justify-items: center; align-content: center; gap: 4px; height: 60px; padding: 0 2px; border-radius: 0; }
  .island button.on { background: radial-gradient(70% 90% at 50% -30%, rgba(236, 124, 69, 0.42), transparent 100%); box-shadow: inset 0 1.5px var(--terra); }
  .island .sum { display: none; }
  .island span { font-size: 11px; }

  .desk { margin: 0; padding: 0; gap: 0; border-radius: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "top act" "stage stage"; background: var(--panel); }
  .topbar { grid-area: top; gap: 0; padding: max(8px, env(safe-area-inset-top)) 4px 8px 14px; }
  .back { width: 34px; height: 34px; margin: 0 8px 0 -6px; border: 0; }
  .venue-name { font-size: 16px; }
  .venue-pick { height: 24px; font-size: 16px; }
  .venue-url { display: none; }
  .save-state { display: none; }
  .work { display: contents; }
  .actions { grid-area: act; min-height: 0; padding: max(8px, env(safe-area-inset-top)) 10px 8px 0; border: 0; border-radius: 0; box-shadow: none; }
  .save-note { display: none; }
  .action-btns { gap: 2px; }
  .action-btns .icon, .action-btns .pill { width: 36px; height: 36px; padding: 0; justify-content: center; border: 0; box-shadow: none; color: var(--soft); }
  .action-btns .pill span { display: none; }
  .action-btns .btn { height: 36px; padding: 0 14px; font-size: 13.5px; }

  .stage { grid-area: stage; gap: 0; padding: 0 0 calc(61px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; box-shadow: none; background: #000; }
  .stage-head { display: none; }
  .site-note { border-radius: 0; background: var(--panel-2); }
  .device { width: 100% !important; max-width: none; margin: 0; align-self: stretch; border-radius: 0; box-shadow: none; }

  .tray { position: fixed; z-index: 5; left: 0; right: 0; bottom: calc(61px + env(safe-area-inset-bottom)); max-height: 52vh; border: 0; border-radius: 20px 20px 0 0;
    box-shadow: 0 -24px 48px -24px rgba(0, 0, 0, 0.6); animation: rise 0.22s cubic-bezier(0.2, 0.8, 0.3, 1); }
  /* The head is the handle: touch-action keeps the page out of the drag. */
  .tray-head { position: relative; padding: 22px 8px 10px 16px; align-items: center; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
  .tray-grip { display: block; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line-2); }
  .tray-close { display: grid; }
  .tray-head h2 { font-size: 16px; }
  .tray-hint { display: none; }
  .tray-body { padding: 4px 16px 20px; gap: 18px; }
  .strip { display: flex; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px 6px 6px; margin: 0 -6px; }
  .strip .swatch { flex: none; width: 76px; scroll-snap-align: start; }
  .tray .templates { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .tray .tpl .card { height: 96px; padding: 12px 10px; }
  .tray .tpl .card .t { font-size: 15px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .chips::before { display: none; }
  .chip { flex: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
