/* Sat Pretty app styles. Owner: designer (layout, type, colour, components); builders add rules for generated markup in their own marked blocks.
   Base: app.css on main (PR 204, fonts from fonts/ since PR 207), old one-page shell rules removed; v2 layer before the print block. */
/* Fonts self-hosted (SIL OFL 1.1, fonts/OFL.txt): no third-party request while a guest list is on the page. */
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/bodoni-moda-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/bodoni-moda-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-style: italic; font-weight: 500; font-display: swap; src: url(fonts/bodoni-moda-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/jost-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/jost-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Jost"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/jost-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Pinyon Script"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/pinyon-script-latin-400-normal.woff2) format("woff2"); }
:root {
  --bg: #F3F5F2;          /* cool cotton board, green-grey bias (not cream) */
  --surface: #FFFFFF;
  --fg: #14261D;          /* bottle-green ink */
  --muted: #52645A;
  --rule: #D3DCD5;
  --accent: #1D4A37;
  --on-accent: #FFFFFF;
  --tint: #E5EDE7;
  --foil: #9C7A3C;        /* brass foil: keylines, decoration only */
  --foil-ink: #7A5C24;    /* foil-coloured text */
  --good: #23704A;
  --bad: #9E2638;         /* claret */
  --bad-tint: #F7E7E9;
  --shadow: 0 18px 50px rgba(20, 38, 29, .18);
  /* paper is always paper, in both themes */
  --paper: #FFFFFF;
  --paper-ink: #14261D;
  --paper-foil: #9C7A3C;
  --paper-cut: #8E9690;

  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --f-body: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --t-label: 12px;
  --t-small: 14px;
  --t-body: 16px;
  --t-h3: 18px;
  --t-h2: 26px;
  --t-h1: clamp(34px, 4.2vw + 18px, 54px);
  --radius: 6px;
  --tap: 48px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1813; --surface: #15231C; --fg: #ECF1EC; --muted: #A3B4A9; --rule: #2A3C32;
    --accent: #9ACDB0; --on-accent: #0E1813; --tint: #1D3127; --foil: #D4B472; --foil-ink: #DCC088;
    --good: #7FD3A4; --bad: #F2909C; --bad-tint: #3A1C22; --shadow: 0 18px 50px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1813; --surface: #15231C; --fg: #ECF1EC; --muted: #A3B4A9; --rule: #2A3C32;
  --accent: #9ACDB0; --on-accent: #0E1813; --tint: #1D3127; --foil: #D4B472; --foil-ink: #DCC088;
  --good: #7FD3A4; --bad: #F2909C; --bad-tint: #3A1C22; --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-size: var(--t-body); line-height: 1.55;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  overflow-x: hidden;
}
.wrap { max-width: 1180px; margin: 0 auto; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ico svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.label { font-size: var(--t-label); text-transform: uppercase; letter-spacing: .16em; font-weight: 500; }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- header ---------- */

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 20px; border-radius: var(--radius); border: 1px solid var(--accent); font-weight: 500; font-size: 16px; text-decoration: none; line-height: 1.2; text-align: center; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn-secondary:hover { background: var(--tint); }
.btn-quiet { background: none; border: 0; padding: 0 6px; min-height: 44px; text-decoration: underline; text-decoration-color: var(--foil); text-underline-offset: 4px; font-weight: 500; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; filter: none; }
.btn-block { width: 100%; }

/* ---------- tool ---------- */
.help { color: var(--muted); font-size: 15px; max-width: 62ch; }
.field-label { font-weight: 500; font-size: 15px; display: block; margin-bottom: 6px; }
textarea, input[type="text"], input[type="number"], input[type="search"] {
  width: 100%; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  font-size: 16px; padding: 12px 14px; min-height: var(--tap);
}
textarea { min-height: 220px; line-height: 1.65; resize: vertical; }
textarea::placeholder, input::placeholder { color: var(--muted); opacity: .85; }
textarea:focus, input:focus { border-color: var(--accent); }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.count { font-weight: 500; }
.note { background: var(--tint); padding: 12px 14px; font-size: 15px; }
.empty { color: var(--muted); font-size: 15px; border: 1px dashed var(--rule); padding: 14px; }
.confirm { display: grid; gap: 10px; border: 1px solid var(--bad); background: var(--bad-tint); padding: 14px; }
.confirm .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.status { font-weight: 500; display: flex; gap: 8px; align-items: center; }
.status.short { color: var(--bad); }

/* together / apart */
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--fg); border-radius: var(--radius); overflow: hidden; }
.seg button { min-height: var(--tap); border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; }
.seg button + button { border-left: 1px solid var(--fg); }
.seg button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.rule-row { display: grid; gap: 8px; }
.and { color: var(--muted); font-size: 15px; padding-left: 2px; }
.pick { position: relative; }
.pick .ico { position: absolute; left: 13px; top: 14px; color: var(--muted); pointer-events: none; }
.pick input { padding-left: 42px; }
.pick ul { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--fg); border-radius: var(--radius); max-height: 268px; overflow-y: auto; box-shadow: var(--shadow); }
.pick li { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border-radius: 4px; cursor: pointer; }
.pick li[aria-selected="true"], .pick li:hover { background: var(--tint); }
.err { color: var(--bad); font-size: 15px; display: flex; gap: 8px; align-items: center; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--rule); }
.rules li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--rule); padding: 2px 0 2px 2px; min-height: 52px; }
.rules li .ico { color: var(--foil-ink); }
.rules li span.t { overflow-wrap: anywhere; }
/* flows D1/D3/S3: a refused keep-apart rule offers to split the line; a broken rule says so, in claret, with Fix this */
#rule-err { flex-wrap: wrap; align-items: flex-start; }
#rule-err .msg { flex: 1 1 0; min-width: 0; }
#rule-err .brk { flex-basis: 100%; height: 0; }
#rule-err .btn-quiet { margin: -6px 0 -6px 22px; padding: 0 6px; color: var(--fg); text-align: left; }
.rules li .rb { min-width: 0; padding: 6px 0; }
.rules li.broken .ico { color: var(--bad); }
.rules .broken-line { margin: 2px 0 0; font-size: var(--t-small); color: var(--bad); display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; }
.fix-one { color: var(--fg); padding: 0 6px; margin-left: -6px; }
.banner li .cl { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; min-width: 0; }
.banner li .cl > span { min-width: 0; }
.banner li .fix-one { min-height: 44px; margin: -10px 0 -10px -6px; }

/* plan */
.seat-btn { width: 100%; font-size: 17px; min-height: 56px; }
.banner { padding: 16px; display: grid; gap: 10px; scroll-margin-top: 16px; }
.banner:focus { outline: none; }
.banner:focus-visible { outline: 2px solid var(--accent); }
.banner.good { background: var(--tint); }
.banner.bad { background: var(--bad-tint); }
.banner h3 { font-size: 21px; display: flex; gap: 10px; align-items: center; }
.banner.good h3 { color: var(--good); }
.banner.bad h3, .banner.bad .lead .ico { color: var(--bad); }
.banner ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.banner li { display: flex; gap: 10px; align-items: flex-start; }
.banner li .ico { color: var(--bad); margin-top: 2px; }
.tag { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; border: 1px solid currentColor; color: var(--bad); padding: 1px 6px; margin-right: 6px; border-radius: 3px; vertical-align: 2px; white-space: nowrap; }
.todo { font-size: 15px; color: var(--muted); }
.unlocked { display: flex; gap: 8px; align-items: center; color: var(--good); font-weight: 500; }
.hint { color: var(--muted); font-size: 15px; display: flex; gap: 8px; align-items: center; }
.hint-desk { display: none; }
@media (hover: hover) and (pointer: fine) { .hint-desk { display: flex; } .hint-phone { display: none; } }
.tables { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .tables { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tcard { container-type: inline-size; background: var(--surface); border: 1px solid var(--rule); padding: 14px 12px 10px; display: grid; gap: 8px; min-width: 0; position: relative; }
.tcard.has-clash { border-color: var(--bad); }
.tcard.target { cursor: pointer; outline: 2px dashed var(--foil); outline-offset: -5px; }
.tcard.target:hover, .tcard.drop { background: var(--tint); }
.tcard.full { opacity: .62; }
.thead { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: center; }
.ring { width: 76px; height: 76px; display: block; }
.ring .tbl { fill: var(--bg); stroke: var(--foil); stroke-width: 1.1; }
.ring .tbl-in { fill: none; stroke: var(--foil); stroke-width: .6; opacity: .7; }
.ring .seat { fill: var(--fg); transition: fill .25s; }
.ring .seat.free { fill: none; stroke: var(--muted); stroke-width: 1.1; }
.ring .seat.clash { fill: var(--bad); }
.ring .seat.moving { fill: var(--accent); stroke: var(--foil); stroke-width: 1.5; }
.ring text { font-family: var(--f-script); fill: var(--fg); font-size: 27px; }
.tname { font-family: var(--f-display); font-size: 20px; line-height: 1.15; }
.tcount { color: var(--muted); font-size: 14px; margin-top: 2px; }
.names { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
@container (min-width: 300px) { .names { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 6px; } }
.gbtn { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 6px; text-align: left; background: none; border: 0; border-radius: 4px; padding: 6px 8px; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.gbtn:hover { background: var(--tint); }
.gbtn.clash { color: var(--bad); font-weight: 500; }
.gbtn.clash .ico { width: 16px; height: 16px; }
.gbtn.new { box-shadow: inset 3px 0 0 var(--foil); }   /* flows C1: newly seated, until the next change */
.gbtn.moving { background: var(--accent); color: var(--on-accent); }
.free-seat { min-height: 44px; display: flex; align-items: center; padding: 6px 8px; color: var(--muted); font-size: 14px; font-style: italic; }
.plan-empty { border: 1px dashed var(--rule); padding: 28px 18px; display: grid; gap: 14px; justify-items: start; color: var(--muted); }
.plan-empty svg { width: 72px; height: 72px; }
.plan-empty .seat { fill: none; stroke: var(--muted); stroke-width: 1.1; }
.plan-empty .tbl { fill: none; stroke: var(--foil); stroke-width: 1.1; }
.plan-empty .tbl-in { fill: none; stroke: var(--foil); stroke-width: .6; opacity: .7; }
.printbox { display: grid; gap: 14px; border-top: 1px solid var(--rule); padding-top: 18px; }
.printbtns { display: grid; gap: 10px; }
@media (min-width: 520px) { .printbtns { grid-template-columns: 1fr 1fr; } }
.price-tag { font-variant-numeric: tabular-nums; color: var(--foil-ink); font-weight: 600; }
.btn-secondary .price-tag { color: var(--foil-ink); }


/* move bar */
.movebar { position: fixed; z-index: 30; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px)); max-width: 640px; margin: 0 auto; background: var(--fg); color: var(--bg); border-radius: var(--radius); padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.movebar p { flex: 1; min-width: 0; font-size: 15px; margin: 6px 0; }
/* a phone (CEO, 2026-10-29): three buttons beside the sentence left it a one-word-per-line sliver; the sentence takes the
   whole first row and the buttons sit in a row beneath it, right-aligned. From 600px the sentence and buttons share one row */
@media (max-width: 599px) { .movebar { flex-wrap: wrap; row-gap: 4px; padding: 10px 8px 8px 16px; } .movebar p { flex: 1 1 100%; margin: 0 0 4px; } .movebar .btn { margin-left: auto; } .movebar .btn ~ .btn { margin-left: 0; } }
.movebar .btn { border-color: var(--bg); color: var(--bg); background: transparent; min-height: 44px; }

footer { border-top: 1px solid var(--rule); padding: 24px 0 18px; display: grid; gap: 8px; font-size: var(--t-small); color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
footer nav a, footer nav button { min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; padding: 0; color: var(--fg); text-decoration: underline; text-decoration-color: var(--foil); text-underline-offset: 4px; font-size: var(--t-small); }
.ph { color: var(--muted); border-bottom: 1px dashed var(--muted); }
/* ---------- unlock dialog ---------- */
dialog.unlock { border: 0; padding: 0; background: var(--surface); color: var(--fg); width: min(480px, 100%); max-width: 100%; max-height: calc(100dvh - 24px); overflow: auto; box-shadow: var(--shadow); }
dialog.unlock::backdrop { background: rgba(10, 20, 15, .55); }
.unlock-in { position: relative; padding: 30px 22px 22px; display: grid; gap: 16px; }
.unlock-in::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--foil); opacity: .55; pointer-events: none; }
.unlock-in > * { position: relative; }
.unlock h2 { font-size: 26px; padding-right: 8px; }
.price { display: flex; align-items: baseline; gap: 10px; }
.price b { font-family: var(--f-display); font-weight: 500; font-size: 46px; line-height: 1; font-variant-numeric: lining-nums; }
.price span { color: var(--muted); }
.gets { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gets li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.gets .ico { color: var(--good); margin-top: 2px; }
.small { font-size: 14px; color: var(--muted); }
.failed { display: grid; gap: 10px; background: var(--bad-tint); padding: 14px; }
@media (max-width: 639px) {
  dialog.unlock { margin: auto 0 0; width: 100%; max-height: 92dvh; }
  dialog.unlock[open] { animation: rise .22s ease-out; }
}
@keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---------- app shell, free wall, account (2026-10-28 re-cut) ---------- */
.acct { color: var(--muted); font-size: var(--t-small); overflow-wrap: anywhere; }
.sample-btn { justify-self: start; }
.tcard.locked { background: var(--bg); border-style: dashed; }
.tcard.locked .ring .seat { fill: var(--muted); }
.lock-cta { width: 100%; min-height: 44px; font-size: 15px; }
.wall-note { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--foil); background: var(--surface); padding: 12px 14px; font-size: 15px; }
.wall-note .ico { color: var(--foil-ink); margin-top: 2px; }
.wall-note .btn-quiet { padding: 0; min-height: 0; }
.gatebtns { display: grid; gap: 10px; }
@media (min-width: 520px) { .gatebtns { grid-template-columns: 1fr 1fr; } }
.demo-note { font-size: 14px; color: var(--foil-ink); border: 1px dashed var(--foil); padding: 8px 12px; }
.unlock form { display: grid; gap: 10px; margin: 0; }
input[type="email"] { width: 100%; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); font-size: 16px; padding: 12px 14px; min-height: var(--tap); }
input[type="email"]:focus { border-color: var(--accent); }
.unlock-step { display: grid; gap: 10px; }
.sent { display: flex; gap: 10px; align-items: flex-start; background: var(--tint); padding: 12px 14px; font-size: 15px; }
.sent .ico { color: var(--good); margin-top: 2px; }

/* ---------- print preview (screen) ---------- */
#preview { display: none; }
body.previewing #app { display: none; }
body.previewing #preview { display: block; }
.pv-bar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--rule); padding: 12px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pv-bar .btn { flex: 1 1 200px; }
.pv-tip { color: var(--muted); font-size: 15px; padding: 14px 0 6px; max-width: 70ch; }
.pv-note { display: flex; gap: 8px; align-items: center; font-weight: 500; padding: 6px 0 4px; }
.pv-pages { display: grid; gap: 20px; padding: 14px 0 48px; justify-items: center; }
.sheet { container-type: inline-size; background: var(--paper); color: var(--paper-ink); width: 100%; max-width: 794px; box-shadow: var(--shadow); }
.sheet-plan { aspect-ratio: 210 / 297; padding: 4.5cqw; }
.ps-frame { border: max(1px, .32cqw) solid var(--paper-foil); padding: 1.4cqw; height: 100%; }
.ps-in { border: max(1px, .14cqw) solid var(--paper-foil); height: 100%; padding: 6cqw 5cqw 5cqw; display: flex; flex-direction: column; gap: 4.5cqw; }
.ps-head { text-align: center; display: grid; gap: 1.6cqw; }
.ps-title { font-family: var(--f-display); font-weight: 500; font-size: max(22px, 6.4cqw); line-height: 1.05; }
.ps-sub { font-family: var(--f-body); text-transform: uppercase; letter-spacing: .22em; font-size: max(10px, 1.9cqw); color: var(--paper-foil); font-weight: 500; }
.ps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4cqw 3cqw; align-content: start; }
.ps-table { text-align: center; break-inside: avoid; min-width: 0; }
.ps-table h3 { font-family: var(--f-script); font-weight: 400; font-size: max(18px, 5cqw); line-height: 1.1; margin-bottom: 1cqw; }
.ps-table h3::after { content: ""; display: block; width: 8cqw; margin: 1cqw auto 0; border-top: max(1px, .14cqw) solid var(--paper-foil); }
.ps-table ol { list-style: none; margin: 0; padding: 0; font-family: var(--f-display); font-size: max(11px, 2.05cqw); line-height: 1.5; overflow-wrap: anywhere; }
@container (max-width: 420px) { .ps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sheet-cards { aspect-ratio: 210 / 297; padding: 5cqw; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); }
.pc { container-type: inline-size; aspect-ratio: 95 / 90; display: grid; grid-template-rows: 1fr 1fr; border: 1px solid var(--paper-cut); margin: 0 -1px -1px 0; color: var(--paper-ink); }
.pc-half { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 6cqw 7cqw; gap: 2cqw; }
.pc-half::before { content: ""; position: absolute; inset: 4.5cqw; border: max(1px, .5cqw) solid var(--paper-foil); opacity: .9; }
.pc-back { transform: rotate(180deg); border-top: 1px dashed var(--paper-cut); }
.pc-name { position: relative; font-family: var(--f-script); font-size: 13cqw; line-height: 1.05; overflow-wrap: anywhere; }
.pc-name.l1 { font-size: 11cqw; } .pc-name.l2 { font-size: 9cqw; } .pc-name.l3 { font-size: 7.5cqw; }
.pc-table { position: relative; font-family: var(--f-body); text-transform: uppercase; letter-spacing: .24em; font-size: 4cqw; color: var(--paper-foil); font-weight: 500; }

/* =====================================================================================
   v2 shell (designer, 2026-10-28; design/brief.md v2). Six sections, CSS-only navigation,
   tags, table shapes, room canvas, share and print cards. Builder rules above stay valid.
   ===================================================================================== */
:root {
  --tag-gold: #9C7A3C; --tag-navy: #2E4A7A; --tag-heather: #7B4B7A; --tag-teal: #2D6E6E; --tag-moss: #4F6B2E; --tag-slate: #5B6670; --tag-rose: #A8506A;
  --canvas: #E9EEEA; --canvas-grid: #C9D3CC;
  --bar: 60px; --tabs: 66px; --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --tag-gold: #D4B472; --tag-navy: #93AEDB; --tag-heather: #CDA2CC; --tag-teal: #8CC9C6; --tag-moss: #B5CF8E; --tag-slate: #AEB8C2; --tag-rose: #E7A3B3; --canvas: #0B140F; --canvas-grid: #24352B; }
}
:root[data-theme="dark"] { --tag-gold: #D4B472; --tag-navy: #93AEDB; --tag-heather: #CDA2CC; --tag-teal: #8CC9C6; --tag-moss: #B5CF8E; --tag-slate: #AEB8C2; --tag-rose: #E7A3B3; --canvas: #0B140F; --canvas-grid: #24352B; }

body { padding: 0; }
.eyebrow { color: var(--foil-ink); }
.muted { color: var(--muted); }
.h3 { font-family: var(--f-display); font-weight: 500; font-size: 21px; line-height: 1.2; }
.ico.i { display: inline-block; }

/* ---------- bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  min-height: calc(var(--bar) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.wm { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg); text-decoration: none; }
.wm svg { display: block; height: auto; }
.bar .wm svg { width: 104px; }
.bar-title { text-align: center; font-family: var(--f-display); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-link { min-height: 44px; padding: 0 4px; border: 0; background: none; font-weight: 500; font-size: 15px; text-decoration: underline; text-decoration-color: var(--foil); text-underline-offset: 5px; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 4px 12px; flex-wrap: nowrap; justify-content: flex-end; }
.acct { display: none; }
@media (min-width: 640px) { .acct { display: inline; } }

/* ---------- tabs: bottom bar on a phone, rail from 960px ---------- */
.tabs { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: calc(var(--tabs) + env(safe-area-inset-bottom)); padding: 0 2px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--rule); }
.tabs .rail-wm { display: none; }
.tab { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 44px; padding: 6px 1px; color: var(--muted); text-decoration: none;
  font-size: 11px; line-height: 1.15; font-weight: 500; text-align: center; }
.tab .ico { width: 22px; height: 22px; }
.tab::before { content: ""; position: absolute; top: -1px; left: 24%; right: 24%; height: 2px; background: transparent; }
/* current tab: the :target section, Guests when none */
body:has(#step-guests:target) .tab[href="#step-guests"], body:has(#step-rules:target) .tab[href="#step-rules"],
body:has(#step-tables:target) .tab[href="#step-tables"], body:has(#step-plan:target) .tab[href="#step-plan"],
body:has(#step-share:target) .tab[href="#step-share"],
body:not(:has(.screen:target)) .tab[href="#step-guests"] { color: var(--accent); }
body:has(#step-guests:target) .tab[href="#step-guests"]::before, body:has(#step-rules:target) .tab[href="#step-rules"]::before,
body:has(#step-tables:target) .tab[href="#step-tables"]::before, body:has(#step-plan:target) .tab[href="#step-plan"]::before,
body:has(#step-share:target) .tab[href="#step-share"]::before,
body:not(:has(.screen:target)) .tab[href="#step-guests"]::before { background: var(--foil); }
body:has(#step-signin:target) .tabs { display: none; }

/* ---------- screens ---------- */
.screens { padding: 20px max(16px, env(safe-area-inset-right)) calc(var(--tabs) + 28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.screen { display: none; max-width: 760px; margin: 0 auto; gap: 18px; scroll-margin-top: calc(var(--bar) + 8px); }
.screen.wide { max-width: 1180px; }
.screen:target, .screens:not(:has(.screen:target)) #step-guests { display: grid; }
.screen-head { display: grid; gap: 6px; }
.screen-head h1 { font-size: 26px; line-height: 1.2; }
.card { background: var(--surface); border: 1px solid var(--rule); padding: 18px 16px; display: grid; gap: 14px; min-width: 0; }
.card.keyline { position: relative; }
.card.keyline::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--foil); opacity: .5; pointer-events: none; }
.card.keyline > * { position: relative; }
.next { justify-self: end; }
.next .ico { width: 18px; height: 18px; }
.welcome { display: grid; gap: 10px; justify-items: start; border: 1px dashed var(--rule); padding: 18px 16px; }
.welcome h2 { font-size: 22px; }
.welcome p { color: var(--muted); }
.saved { display: flex; gap: 6px; align-items: center; }
.app-foot { max-width: 1180px; margin: 40px auto 0; border-top: 1px solid var(--rule); padding: 20px 0 8px; display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.app-foot nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.app-foot a { min-height: 44px; display: inline-flex; align-items: center; color: var(--fg); text-decoration: underline; text-decoration-color: var(--foil); text-underline-offset: 4px; }
body:has(#step-signin:target) .app-foot { display: none; }

@media (min-width: 640px) { .rule-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; } .rule-row .btn-block { width: auto; } .rule-row .err { grid-column: 1 / -1; } }

@media (min-width: 960px) {
  body { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  #app { display: contents; }
  .bar { grid-column: 2; grid-template-columns: minmax(0, 1fr) auto; }
  .bar .wm { display: none; }
  .bar-title { text-align: left; font-size: 18px; }
  .screens { grid-column: 2; padding: 32px 40px 48px; }
  .screen-head h1 { font-size: 30px; }
  .tabs { position: sticky; top: 0; grid-column: 1; grid-row: 1 / span 2; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; border-top: 0; border-right: 1px solid var(--rule); }
  .tabs .rail-wm { display: block; padding: 2px 6px 26px; }
  .tabs .rail-wm svg { width: 208px; }
  .tab { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: var(--radius); font-size: 15px; text-align: left; }
  .tab:hover { background: var(--tint); color: var(--fg); }
  .tab::before { top: 12px; bottom: 12px; left: 0; right: auto; width: 2px; height: auto; }
  body:has(#step-guests:target) .tab[href="#step-guests"], body:has(#step-rules:target) .tab[href="#step-rules"],
  body:has(#step-tables:target) .tab[href="#step-tables"], body:has(#step-plan:target) .tab[href="#step-plan"],
  body:has(#step-share:target) .tab[href="#step-share"],
  body:not(:has(.screen:target)) .tab[href="#step-guests"] { background: var(--tint); }
  .next { display: none; }
}

/* ---------- plan ---------- */
.tables-set .pair input { max-width: 100%; }
.seat-btn { min-height: 56px; }
@media (min-width: 640px) { .seat-btn { width: auto; justify-self: start; padding: 0 36px; } }
.thead .ring, .thead .shape { width: 76px; height: 76px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; background: var(--fg); }
.dot[data-tag="gold"] { background: var(--tag-gold); } .dot[data-tag="navy"] { background: var(--tag-navy); } .dot[data-tag="heather"] { background: var(--tag-heather); }
.dot[data-tag="teal"] { background: var(--tag-teal); } .dot[data-tag="moss"] { background: var(--tag-moss); } .dot[data-tag="slate"] { background: var(--tag-slate); } .dot[data-tag="rose"] { background: var(--tag-rose); }
.ring .seat.gold, .shape .seat.gold { fill: var(--tag-gold); } .ring .seat.navy, .shape .seat.navy { fill: var(--tag-navy); }
.ring .seat.heather, .shape .seat.heather { fill: var(--tag-heather); } .ring .seat.teal, .shape .seat.teal { fill: var(--tag-teal); }
.ring .seat.moss, .shape .seat.moss { fill: var(--tag-moss); } .ring .seat.slate, .shape .seat.slate { fill: var(--tag-slate); } .ring .seat.rose, .shape .seat.rose { fill: var(--tag-rose); }
.ring .tbl, .shape .tbl { fill: var(--surface); stroke: var(--fg); stroke-width: 1.4; }
.ring .tbl-in, .shape .tbl-in { fill: none; stroke: var(--foil); stroke-width: .8; opacity: 1; }
.shape .seat { fill: var(--fg); } .shape .seat.free { fill: none; stroke: var(--muted); stroke-width: 1.1; } .shape .seat.clash { fill: var(--bad); }
.shape text, .ring text { font-family: var(--f-script); fill: var(--fg); }
.tcard.locked .ring .tbl, .tcard.locked .ring .tbl-in, .tcard.locked .ring text { opacity: .55; }
.key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.key span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- people ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 22px; background: var(--surface); font-size: 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--tint); border-color: var(--fg); }
.chip .n { color: var(--muted); font-weight: 400; }
.chip-new .ico { width: 16px; height: 16px; }
.people { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.people li + li.party { border-top: 1px solid var(--rule); }
.people li:not(.party) + li:not(.party) { border-top: 1px dashed var(--rule); }
.people button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px; border: 0; background: none; text-align: left; }
.people button:hover { background: var(--tint); }
.people .nm { min-width: 0; overflow-wrap: anywhere; }
.people .tg { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.people .add { font-size: 13px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }

/* ---------- room ---------- */
.room-layout { display: grid; gap: 14px; }
.room-main { display: grid; gap: 10px; min-width: 0; }
.room-wrap { position: relative; background: var(--canvas); border: 1px solid var(--rule); overflow: hidden; touch-action: none; }
.room-wrap svg.room { display: block; width: 100%; height: auto; max-height: calc(100vh - 260px); min-height: 220px; }
.room .grid-dot { fill: var(--canvas-grid); }
.room .walls { fill: none; stroke: var(--fg); stroke-width: 2; }
.room .t { cursor: grab; }
.room .t .sel { fill: none; stroke: none; }
.room .t.selected .sel, .room .t:focus-visible .sel { stroke: var(--foil); stroke-width: 2; stroke-dasharray: 6 4; }
.room .t:focus { outline: none; }
/* flows S4: no veil. A locked room is fully visible and a tap picks a table (free); the gate is one quiet line under
   the canvas, above the tray (#room-gate, hidden once unlocked). */
.room-gate { margin: 0; display: flex; justify-content: flex-start; }
.room-gate[hidden], .room-gate:has(#layout-btn[hidden]) { display: none; }
.room-gate .btn-quiet { display: inline-flex; align-items: center; gap: 6px; padding: 0 2px; color: var(--fg); cursor: pointer; }
.room-gate .btn-quiet .ico { width: 16px; height: 16px; color: var(--foil-ink); }
.room-gate .price-tag::before { content: '·'; display: inline-block; margin-right: 6px; color: var(--muted); font-weight: 400; }   /* inline-block: the link underline skips the dot */
.tray button .price-tag { font-size: 11px; line-height: 1; }
.seltool { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--surface); border: 1px solid var(--foil); }
.seltool .nm { font-family: var(--f-display); font-size: 18px; margin-right: auto; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: var(--radius); color: var(--fg); }
.icon-btn:hover { background: var(--tint); }
.stepper { display: inline-grid; grid-template-columns: 44px 3ch 44px; align-items: center; text-align: center; border: 1px solid var(--rule); border-radius: var(--radius); }
.stepper button { height: 44px; border: 0; background: none; display: grid; place-items: center; }
.tray { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tray-title { grid-column: 1 / -1; }
.tray button { display: grid; justify-items: center; align-content: center; gap: 4px; padding: 8px 2px; min-height: 76px; border: 1px solid var(--rule); background: var(--surface); border-radius: var(--radius); font-size: 12px; font-weight: 500; }
.tray button:hover { border-color: var(--fg); }
.tray svg.shape { width: 44px; height: 30px; }
@media (min-width: 960px) { .room-layout { grid-template-columns: minmax(0, 1fr) 128px; align-items: start; } .tray { grid-template-columns: 1fr; } }

/* ---------- share, print, email ---------- */
.share-open { display: none; gap: 12px; }
.share-open.ready { display: grid; }
.share-open.ready ~ #share-btn { display: none; }
#printbox:not([hidden]) ~ .share-empty { display: none; }
.linkrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.linkrow input { font-size: 14px; color: var(--muted); text-overflow: ellipsis; }
.ok-line { display: flex; gap: 8px; align-items: center; color: var(--good); font-size: 14px; }
.qrcard { position: relative; justify-self: center; width: min(100%, 280px); margin: 0; background: var(--paper); color: var(--paper-ink); padding: 20px 20px 16px; display: grid; gap: 10px; justify-items: center; text-align: center; border: 1px solid #D3DCD5; }
.qrcard::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--paper-foil); pointer-events: none; }
.qrcard img { width: 100%; height: auto; display: block; position: relative; }
.qrcard figcaption { position: relative; display: grid; gap: 4px; justify-items: center; }
.qrcard .t { font-family: var(--f-display); font-size: 18px; line-height: 1.2; }
.qrcard .l { display: flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.qrcard .l svg { width: 16px; height: 16px; color: var(--paper-ink); --foil: var(--paper-foil); }
.note.warn { background: var(--bad-tint); }
.sizes { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.sizes legend { padding: 0; margin-bottom: 10px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
label.tile { position: relative; display: grid; gap: 2px; align-content: start; padding: 12px; min-height: 44px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
label.tile input { position: absolute; opacity: 0; pointer-events: none; }
label.tile:has(input:checked) { border-color: var(--fg); background: var(--tint); box-shadow: inset 0 0 0 1px var(--fg); }
label.tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
label.tile b { font-weight: 600; }
label.tile .sz { font-size: 13px; color: var(--muted); }
svg.paper { width: 40px; height: 40px; margin-bottom: 6px; }
.paper rect { fill: none; stroke: var(--muted); stroke-width: 1; }
.paper rect.on { stroke: var(--fg); stroke-width: 1.6; fill: var(--tint); }
.checks { display: grid; gap: 4px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.gatebtns { grid-template-columns: 1fr; }
@media (min-width: 520px) { .gatebtns { grid-template-columns: 1fr 1fr; } }   /* flows G2: two print buttons */

/* ---------- sign-in landing ---------- */
.signin { max-width: 420px; width: 100%; margin: 24px auto 0; padding: 30px 22px 24px; text-align: center; justify-items: center; }
.signin > div { display: grid; gap: 14px; width: 100%; }
.signin-wm svg { width: 220px; }
.signin h1, .signin h2 { font-size: 26px; }
.signin .lead { color: var(--muted); }

/* ---------- dialogs: bottom sheets on a phone ---------- */
.grab { display: none; }
dialog.dlg-sheet { border: 0; padding: 0; background: var(--surface); color: var(--fg); width: min(460px, calc(100% - 32px)); box-shadow: var(--shadow); }
dialog.dlg-sheet::backdrop { background: rgba(10, 20, 15, .55); }
.dlg { padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 16px; margin: 0; }
.dlg h2 { font-size: 24px; }
.dlg .actions { display: grid; gap: 8px; }
.field { display: grid; gap: 6px; }
.swatches { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.swatches legend { padding: 0; margin-bottom: 8px; }
.swatches label.tile { grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; }
.swatches .dot { width: 16px; height: 16px; }
.unlock-in .grab { margin: -14px auto 0; }
@media (max-width: 639px) {
  dialog.dlg-sheet { margin: auto 0 0; width: 100%; max-width: none; max-height: 92dvh; border-radius: 14px 14px 0 0; }
  dialog.unlock { border-radius: 14px 14px 0 0; }
  .grab { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--rule); margin: -12px auto 0; }
}
.movebar { bottom: calc(var(--tabs) + 10px + env(safe-area-inset-bottom)); }
@media (min-width: 960px) { .movebar { bottom: 16px; } }
body.previewing { display: block; }
.btn-primary .price-tag { color: var(--on-accent); opacity: .85; }

/* ---------- flow review 2026-10-29 (designer; design/flows-2026-10-29.md, CSS-only fixes) ---------- */
/* F-G1: the share module's print preview (#sp-print, appended to body) fell into the 248px rail column of the
   desktop grid; like the app's own preview, the body is a plain block while it prints */
body.sp-printing { display: block; }
/* F-A3: the "tap a guest" hint only once a table is open; while every card is closed there is no guest to tap */
#step-plan:not(:has(#tables .tcard:not(.locked))) .hint { display: none; }
/* F-J1: on a phone the panel is taller than the screen and "Not now" sat below the fold; it now sits at the top
   right, visible as the sheet opens (a backdrop tap to close is specified for the builder) */
@media (max-width: 639px) {
  .unlock-in { padding-top: 52px; }
  .unlock-in > #unlock-close { position: absolute; top: 8px; right: 10px; min-height: 40px; padding: 0 10px; margin: 0; }
  .unlock-in .grab { margin-top: -38px; }
}

/* ---------- v2 round 3: five tabs, Guests with important people, Tables with List | Room ---------- */
.people-block { display: grid; gap: 12px; margin-top: 8px; }
.dot.none { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
.view-seg { display: inline-grid; grid-template-columns: auto auto; justify-self: start; padding: 3px; gap: 3px; border-radius: var(--radius); }
.view-seg input { position: absolute; opacity: 0; pointer-events: none; }
.view-seg label { min-height: 40px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; border-radius: 7px; cursor: pointer; }
.view-seg label .ico { width: 18px; height: 18px; }
.view-seg input:checked + label { background: var(--fg); color: var(--bg); }
.view-seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.view-seg label + input + label { border-left: 0; }
.tv { display: grid; gap: 14px; min-width: 0; }
.tv-room { display: none; }
#step-tables:has(#tv-room:checked) .tv-room { display: grid; }
#step-tables:has(#tv-room:checked) .tv-list { display: none; }
.trows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.trows li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.trows .draw svg { width: 56px; height: auto; display: block; }
.trows .nm { font-family: var(--f-display); font-size: 18px; }
.trows .sub { font-size: 14px; color: var(--muted); }
.trows .acts { display: flex; align-items: center; gap: 6px; }
@media (max-width: 479px) { .trows li { grid-template-columns: 56px minmax(0, 1fr); } .trows .acts { grid-column: 2; } }
.room-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.room-tools .icon-btn { background: var(--surface); border: 1px solid var(--rule); }
.plan-top { display: grid; gap: 10px; }
@media (min-width: 640px) { .plan-top { grid-template-columns: auto 1fr; align-items: center; gap: 18px; } }
.key:not([hidden]) { display: flex; }
/* flows A2: the free table's open button is the outline secondary with the chevron (as the lock buttons beside it), so a
   first plan is not a column of five filled CTAs; the wall note above carries the invitation */
.tcard .lock-cta.can-open { background: transparent; color: var(--fg); border-color: var(--fg); }
.tcard .lock-cta.can-open:hover { background: var(--tint); }
/* flows I3: a table's name in a clash line takes you to its card */
.tlink { color: inherit; text-decoration: underline; text-decoration-color: var(--foil); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tlink:hover { color: var(--foil-ink); }
.tiles.two { grid-template-columns: 1fr; }
@media (min-width: 560px) { .tiles.two { grid-template-columns: 1fr 1fr; } }
.swatches.shapes label.tile svg.shape { width: 44px; height: 30px; flex: none; }
.danger { color: var(--bad); }
dialog.qr-full { width: min(480px, calc(100% - 32px)); }
.qr-full .qrcard { width: 100%; }
/* flows H4: on a phone the code is the screen: full viewport, white, the code as wide as the viewport allows (and as
   tall as it leaves room for the caption and Done), Done at the bottom */
@media (max-width: 639px) {
  dialog.qr-full { inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; background: #fff; color: #16231C; }
  dialog.qr-full[open] { animation: none; }
  .qr-full .dlg { min-height: 100dvh; box-sizing: border-box; grid-template-rows: 1fr auto; padding: max(16px, env(safe-area-inset-top)) 4vw max(16px, env(safe-area-inset-bottom)); }
  .qr-full .qrcard { width: auto; align-self: center; border: 0; padding: 0; background: #fff; color: #16231C; }
  .qr-full .qrcard::before { display: none; }
  .qr-full .qrcard img { width: min(92vw, calc(92vh - 120px)); height: auto; aspect-ratio: 1; }
  .qr-full .btn { width: 100%; color: #16231C; border-color: #16231C; }
}

/* ---------- print ---------- */
@media print {
  /* no global @page: the print document sets its own size (sharepanel.js + export.js pageCss); the fallback preview
     below (app.js #preview, used only when sharepanel.js is absent) prints on its own named A4 page */
  @page sp-fallback-a4 { size: A4 portrait; margin: 10mm; }
  #preview .sheet { page: sp-fallback-a4; }
  :root, :root[data-theme="dark"] { --paper: #fff; --paper-ink: #14261D; --paper-foil: #9C7A3C; --paper-cut: #8E9690; color-scheme: light; }
  html, body { background: #fff !important; color: #14261D !important; padding: 0 !important; margin: 0 !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body:not(.previewing) .movebar, body:not(.previewing) dialog { display: none !important; }
  body.previewing #app, .pv-bar, .pv-tip, .pv-note, dialog, .movebar { display: none !important; }
  .wrap { max-width: none; }
  .pv-pages { display: block; padding: 0; }
  .sheet { box-shadow: none; max-width: none; width: 190mm; margin: 0; break-after: page; }
  .sheet:last-child { break-after: auto; }
  .sheet-plan { aspect-ratio: auto; min-height: 276mm; padding: 0; }
  .sheet-cards { aspect-ratio: auto; padding: 0; height: 270mm; }
  .cards { grid-template-columns: 95mm 95mm; grid-template-rows: repeat(3, 90mm); }
  .pc { aspect-ratio: auto; height: 90mm; break-inside: avoid; }
}

/* ---------- tables: list rows, room canvas, shapes (M1b, tables.js + layout.js; integration 2026-10-28) ----------
   The shell above styles .trows, .room-wrap, .room-tools, .seltool, .stepper, .icon-btn, .tray and the shape sheet;
   this block adds only what tables.js draws that the shell does not: the row's name field and shape picker, the
   table drawings (svg.shape.mini, the room's tables and labels), the canvas size, drag and overlap states, the
   locked room, and the printed room. */
.icon-btn[disabled], .stepper button[disabled] { opacity: .4; cursor: not-allowed; }
.trows .draw { width: 56px; display: grid; place-items: center; }
.trows .info { display: grid; gap: 4px; min-width: 0; }
.trows .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.trows .tname-in { font-family: var(--f-display); font-size: 18px; padding: 6px 10px; min-height: 44px; }
.shape-sel { min-height: 44px; height: 44px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); color: var(--fg); padding: 0 8px; font-size: 15px; }
#add-table { justify-self: start; }
svg.shape.mini { display: block; width: 100%; max-width: 56px; max-height: 48px; height: auto; overflow: visible; }
.shape .seat.foil, .room .seat.foil { stroke: var(--foil); stroke-width: 3; }
.shape .seat.foil:not(.free), .room .seat.foil:not(.free) { fill: var(--foil); }
.shape .sel { fill: none; stroke: none; }
/* the room canvas: tables.js works in screen pixels (no viewBox), so the canvas takes its size from CSS */
.room-wrap svg.room { aspect-ratio: 4 / 3; min-height: 260px; max-height: 70vh; touch-action: none; user-select: none; -webkit-user-select: none; }
@media (min-width: 960px) { .room-wrap svg.room { aspect-ratio: 16 / 10; } }
.room .floor { fill: var(--canvas); }
.room .walls { vector-effect: non-scaling-stroke; }
.room .tbl { fill: var(--surface); stroke: var(--fg); stroke-width: 2.5; }
.room .tbl-in { fill: none; stroke: var(--foil); stroke-width: 1.4; }
.room .seat { fill: var(--fg); }
.room .seat.free { fill: none; stroke: var(--muted); stroke-width: 2.2; }
.room .t { outline: none; }
.room.locked .t { cursor: pointer; }
.room .t.selected .sel { vector-effect: non-scaling-stroke; fill: none; }
.room .t:focus-visible .sel { stroke: var(--accent); vector-effect: non-scaling-stroke; fill: none; }
.room .t.reject .tbl { stroke: var(--bad); stroke-width: 6; }
.room .t.reject .sel { stroke: var(--bad); stroke-width: 2; stroke-dasharray: none; vector-effect: non-scaling-stroke; }
.room .no, .room-print .no { font-family: var(--f-script); fill: var(--fg); }
.room-tools .ico, .seltool .ico, .stepper .ico, .trows .icon-btn .ico { width: 18px; height: 18px; }
.seltool .nm { overflow-wrap: anywhere; }
#room-overlap .ico { width: 18px; height: 18px; }
/* the printed room (first page of the plan) */
.sheet-room .ps-in { gap: 3cqw; }
.room-sheet { flex: 1; display: grid; place-items: center; min-height: 0; }
.room-print { width: 100%; height: auto; max-height: 100%; }
.room-print .floor { fill: #fff; }
.room-print .grid-dot { fill: none; }
.room-print .walls { fill: none; stroke: var(--paper-ink); stroke-width: 3; }
.room-print .tbl { fill: #fff; stroke: var(--paper-ink); stroke-width: 2.5; }
.room-print .tbl-in { fill: none; stroke: var(--paper-foil); stroke-width: 1.4; }
.room-print .seat { fill: var(--paper-ink); }
.room-print .seat.free { fill: none; stroke: var(--paper-cut); stroke-width: 2; }
.room-print .seat.foil:not(.free) { fill: var(--paper-foil); }
.room-print .sel { fill: none; stroke: none; }
.room-print .no { fill: var(--paper-ink); }
@media print { .sheet-room .room-print { max-height: 230mm; } }
/* who sits where (design/occupants.md §3, §4, §6): initials on every occupied seat, the full name on hover (<title>)
   and on tap (g.seat-name, screen pixels, outside the zoomed g.vp) */
.room .seat.gold { fill: var(--tag-gold); } .room .seat.navy { fill: var(--tag-navy); } .room .seat.heather { fill: var(--tag-heather); }
.room .seat.teal { fill: var(--tag-teal); } .room .seat.moss { fill: var(--tag-moss); } .room .seat.slate { fill: var(--tag-slate); } .room .seat.rose { fill: var(--tag-rose); }
.room .seat-hit { fill: transparent; stroke: none; pointer-events: all; }
.room .seat-ini { font-family: var(--f-body); font-weight: 600; letter-spacing: .02em; fill: var(--surface); pointer-events: none; }
/* the couple's seats: gold fails both white and ink, so an occupied one is drawn white with its foil ring */
.room .seat-g.taken .seat.foil, .room .seat-g.taken .seat.gold { fill: var(--surface); stroke: var(--foil); stroke-width: 3; }
.room .seat-g.taken .seat.foil + .seat-ini, .room .seat-g.taken .seat.gold + .seat-ini { fill: var(--foil-ink); }
.room .seat-g.taken:hover .seat { stroke: var(--foil); stroke-width: 2; }
.room .seat-g.taken:hover .seat.foil, .room .seat-g.taken:hover .seat.gold { stroke-width: 3; }
.room.far .seat-ini { display: none; }
.room .seat-name { pointer-events: none; }
/* M1e item 3: a guest in the air. The ghost is her initials under the pointer; the ring marks the seat she would take;
   a drop on a table body outlines that table */
.room .seat-g.taken { cursor: grab; }
.room .seat-ghost { pointer-events: none; }
.room .seat-ghost .ghost-dot { fill: var(--fg); stroke: var(--foil); stroke-width: 2; opacity: .92; filter: drop-shadow(0 3px 8px rgba(20, 38, 29, .28)); }
.room .seat-ghost .ghost-ini { font-family: var(--f-body); font-weight: 600; fill: var(--surface); }
.room .seat-ghost .drop-ring { fill: none; stroke: var(--foil); stroke-width: 3; stroke-dasharray: 5 3; }
.room .t.drop .tbl { stroke: var(--foil); stroke-width: 4; }
.room .seat-name rect { fill: var(--surface); stroke: var(--rule); stroke-width: 1; filter: drop-shadow(0 2px 6px rgba(20, 38, 29, .18)); }
.room .seat-name text { font: 500 14px var(--f-body); fill: var(--fg); }
/* print: white letters on ink dots (greyscale-safe); the couple's seats white with foil-ink letters; never far */
.room-print .seat-ini { fill: #fff; }
.room-print .seat-hit { fill: none; stroke: none; }
.room-print .seat-g.taken .seat.foil, .room-print .seat-g.taken .seat.gold { fill: #fff; stroke: var(--paper-foil); stroke-width: 3; }
.room-print .seat-g.taken .seat.foil + .seat-ini, .room-print .seat-g.taken .seat.gold + .seat-ini { fill: var(--foil-ink); }

/* M1d item 7: edits keep the plan. Undo beside Auto-seat, the pin on a hand-placed guest, the moved-guests note */
.plan-btns { display: flex; gap: 10px; align-items: stretch; }
.plan-btns .seat-btn { flex: 1 1 auto; width: auto; min-width: 0; }
.plan-btns .undo-btn { min-height: 56px; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; }
.plan-btns .undo-btn .ico { width: 18px; height: 18px; }
@media (min-width: 640px) { .plan-btns .seat-btn { flex: 0 0 auto; } }
#reseat-confirm { border-color: var(--fg); background: var(--tint); }
.gbtn.pinned .pin-mark { width: 14px; height: 14px; margin-left: auto; flex: none; opacity: .75; }
.gbtn.pinned .pin-mark svg { width: 14px; height: 14px; }
.banner .move-note { font-weight: 500; }
.movebar #move-unpin, .movebar #move-unlock { display: inline-flex; align-items: center; gap: 6px; }
.movebar #move-unpin[hidden], .movebar #move-unlock[hidden] { display: none; }
.movebar #move-unpin .ico { width: 16px; height: 16px; }

/* ---------- the change toast (flows S1): styled like the move bar, above the tab bar on a phone ---------- */
.toast { position: fixed; z-index: 30; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(var(--tabs) + 10px + env(safe-area-inset-bottom, 0px)); max-width: 640px; margin: 0 auto; background: var(--fg); color: var(--bg); border-radius: var(--radius); padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow); }
.toast p { flex: 1; min-width: 0; font-size: 15px; margin: 6px 0; padding: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }   /* a big edit's full list stays in the List view's note */
.toast .btn { flex: none; border-color: var(--bg); color: var(--bg); background: transparent; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.toast .btn .ico { width: 16px; height: 16px; }
.toast .btn:focus-visible { outline: 2px solid var(--bg); outline-offset: 2px; }
.toast.in { animation: toast-in .2s ease-out; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
/* desktop (flows S1 addendum, 2026-10-29): the toast is a notice at the top right of the content column, under the bar,
   never over the room's picked-table panel or the plan's cards at the bottom; only its Undo button takes the pointer,
   so a click meant for whatever sits beneath the words still lands there */
@media (min-width: 960px) { .toast { top: calc(var(--bar) + 12px); bottom: auto; left: auto; right: 24px; width: min(440px, calc(100vw - 248px - 48px)); margin: 0; pointer-events: none; } .toast .btn { pointer-events: auto; } .toast.in { animation-name: toast-in-top; } }
@keyframes toast-in-top { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
@media print { .toast { display: none !important; } }

/* ---------- the room, full screen (CEO feedback 2026-10-29) ----------
   One mechanism: body.room-full (tables.js, setFull). The room fills the viewport above the header and the tab bar
   (z-index 31; the bar is 20, the tabs 30), the page behind cannot scroll, and the pieces she still needs sit above
   it: the panel, the locked line, the remove question and the overlap message in #room-dock at the bottom, the change
   toast and the move bar (raised to 32 and moved to the top, clear of the two buttons and of the dock). */
.room-dock { display: contents; }
#room-min, #room-add { display: none; }
/* Add a table, full screen only: opens the same shape sheet as the tray, docked at the bottom like the other panels */
body.room-full #room-add { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px 0 10px; background: var(--surface); color: var(--fg); border: 1px solid var(--rule); border-radius: var(--radius); font: inherit; font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer; }
body.room-full #room-add:hover { background: var(--tint); }
body.room-full #room-add .ico { width: 18px; height: 18px; }
@media (min-width: 640px) { body.room-full dialog#shape-sheet { margin: auto auto 12px; } }   /* a phone's sheet is already flush at the bottom */
body.room-full { overflow: hidden; overscroll-behavior: none; }
body.room-full #room-max { display: none; }
body.room-full #room-min { display: inline-grid; }
body.room-full .room-wrap { position: fixed; inset: 0; z-index: 31; border: 0; }
body.room-full .room-wrap svg.room { width: 100%; height: 100%; aspect-ratio: auto; min-height: 0; max-height: none; }
body.room-full .room-tools { top: calc(10px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); }
body.room-full .room-dock { position: fixed; z-index: 31; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(12px, env(safe-area-inset-bottom, 0px)); max-width: 640px; max-height: 60dvh; overflow-y: auto; margin: 0 auto; display: grid; gap: 8px; pointer-events: none; }
body.room-full .room-dock > * { pointer-events: auto; margin: 0; }
body.room-full .room-gate, body.room-full #room-overlap { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 8px 12px; min-height: 44px; align-items: center; box-shadow: var(--shadow); }
body.room-full #room-overlap { border-color: var(--bad); }
body.room-full .seltool { box-shadow: var(--shadow); }
body.room-full .movebar, body.room-full .toast { z-index: 32; top: calc(64px + env(safe-area-inset-top, 0px)); bottom: auto; }
body.room-full .toast { left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); width: auto; margin: 0 auto; pointer-events: none; }
body.room-full .toast .btn { pointer-events: auto; }
