/* ThaiQR guest menu. Mobile first: one hand, bright light, a weak signal.
   "Kitchen ticket": a menu that reads like the pass of a good kitchen. The dish NUMBER is stamped on the photo (or in a
   box when there is none), names are set in a book serif with the Thai name below, prices sit at the end of a dotted
   leader. The staff screen is a receipt on espresso. Neutrals do the work; --accent (the venue's colour) only marks what
   is in the order. Tokens come from tokens.css. */

:root {
	--accent-text: var(--accent-on-paper, var(--accent));
	--rail-top: 0px;
	--bar-h: 60px;
}
body.guest { -webkit-tap-highlight-color: transparent; padding-bottom: calc(var(--bar-h) + 28px + env(safe-area-inset-bottom)); }
body.guest.lock { overflow: hidden; }
.shell { max-width: 680px; margin: 0 auto; }

@media (prefers-color-scheme: dark) {
	:root {
		color-scheme: light dark;
		--bg: #1b120b; --grid: #271a10; --paper: #2a1c12; --paper-2: #33241a; --stone: #3a2a1c; --stone-2: #48352a; --kraft: #5a4430;
		--ink: #f3e8d0; --ink-2: #dccdae; --ink-3: #bda684; --line: #5f4733; --line-strong: #f3e8d0;
		--brand: #e58a6b; --brand-soft: #4a2418;
		--ok: #b9cf7a; --ok-soft: #2b3417; --warn: #e8c27a; --warn-soft: #3a2a0f; --err: #e58a6b; --err-soft: #4a2418;
		--info: #a9bdd6; --info-soft: #222c38;
		--accent-text: color-mix(in oklab, var(--accent) 60%, #fff);
	}
}

/* ------------------------------------------------------------------ preview banner (owner's draft view) */
.preview-banner { position: sticky; top: 0; z-index: 60; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; padding: 8px var(--gutter); background: #241810; color: #f5ecd8; font: 500 .6875rem/1.5 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.preview-banner a { color: #f5ecd8; }

/* ------------------------------------------------------------------ masthead: the title block of the sheet */
.mast { padding: 16px var(--gutter) 4px; }
.tb { display: grid; grid-template-columns: minmax(0, 1fr) auto; border: 2px solid var(--ink); background: var(--paper); }
.tb-name { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 12px 14px 10px; border-bottom: 2px solid var(--ink); }
.tb-name .logo { width: 52px; height: 52px; max-width: none; flex: none; border: 2px solid var(--ink); background: var(--paper-2); object-fit: cover; }
.tb-name .logo.ph { display: grid; place-items: center; font: 600 1.5rem/1 var(--font-display); }
.tb-name h1 { margin: 0; font-size: clamp(1.5rem, 6.6vw, 2.125rem); line-height: 1.05; letter-spacing: -.015em; }
.tb-name .tag { margin-top: 4px; color: var(--ink-3); font-size: var(--fs-md); line-height: 1.3; }
.tb-l { display: flex; min-width: 0; }
.tb-l:last-child { grid-column: 1 / -1; }
.tb-c { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 0; background: none; color: var(--ink); font: 500 .6875rem/1.2 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); text-decoration: none; }
.tb-c + .tb-c { border-left: 2px solid var(--ink); }
.tb-c b { font: 500 .9375rem/1 var(--font-mono); letter-spacing: 0; }
.tb-c .i { color: var(--ink-3); }
.tb-c:active { background: var(--stone); }
.tb-c.table b { padding: 2px 8px; background: var(--ink); color: var(--paper); }
.status { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 14px; border-left: 2px solid var(--ink); font: 500 .6875rem/1.3 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); color: var(--ink); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.status.closed .dot { background: var(--ink-3); }
@media (max-width: 479px) {
	.tb-l { grid-column: 1 / -1; }
	.status { grid-column: 1 / -1; min-height: 42px; border-left: 0; border-top: 2px solid var(--ink); }
}
.cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 7; max-height: 200px; margin: 12px 0 0; border: 2px solid var(--ink); object-fit: cover; background: var(--stone); }
.quick { display: flex; gap: 8px; margin: 12px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 2px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 500 .6875rem/1 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); text-decoration: none; }
.pill-btn .i { color: var(--ink-3); }
.pill-btn:active { background: var(--stone); }
.quick .pill-btn { flex: none; }
.verified { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--ink-3); font-size: var(--fs-xs); }
.verified .i { color: var(--ok); }
.verified-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding-bottom: 0; }
.verified-foot .i { color: var(--ok); }

/* ------------------------------------------------------------------ find: search, number pad, diet filter */
.find { display: flex; gap: 8px; padding: 12px var(--gutter) 0; }
.field { position: relative; flex: 1; min-width: 0; }
.field .i { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.field input { width: 100%; height: 48px; padding: 0 14px 0 42px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); font-size: 1rem; text-overflow: ellipsis; }
.field input::placeholder { color: var(--ink-3); }
.field input:focus { outline: 0; background: var(--paper-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 38%, transparent); }
.sq-btn { position: relative; width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.sq-btn.num { background: var(--ink); color: var(--paper); }
.sq-btn:active { background: var(--stone); }
.sq-btn.num:active { background: var(--ink-2); }
.sq-btn .n { position: absolute; top: -9px; right: -9px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--bg); background: var(--accent); color: var(--accent-ink); font: 500 .6875rem/1 var(--font-mono); }
.chipnote { display: flex; align-items: center; gap: 10px; margin: 12px var(--gutter) 0; padding: 10px 12px; border: 2px dashed var(--ink-3); background: var(--paper); font-size: var(--fs-sm); }
.chipnote button { margin-left: auto; padding: 6px; border: 0; background: transparent; color: inherit; font-weight: 600; text-decoration: underline; }

/* ------------------------------------------------------------------ sticky station tabs */
.rail { position: sticky; top: var(--rail-top); z-index: 30; margin-top: 14px; background: var(--bg); border-bottom: 2px solid var(--ink); }
.rail-in { display: flex; align-items: flex-end; max-width: 680px; margin: 0 auto; }
.rail nav { flex: 1; min-width: 0; display: flex; align-items: flex-end; overflow-x: auto; padding-inline: var(--gutter) 0; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.rail nav::-webkit-scrollbar { display: none; }
.rail nav a { flex: none; display: flex; align-items: center; min-height: 46px; padding: 0 14px; margin-right: -2px; border: 2px solid var(--ink); border-bottom: 0; background: var(--stone); color: var(--ink-3); font: 500 .6875rem/1.2 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); text-decoration: none; white-space: nowrap; scroll-snap-align: start; }
.rail nav a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.rail .tools { display: flex; align-items: center; gap: 2px; padding: 0 calc(var(--gutter) - 8px) 4px 4px; }
.rail .tools button { width: 42px; height: 42px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-3); }
.rail .tools button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ------------------------------------------------------------------ menu */
.cat { scroll-margin-top: calc(var(--rail-top) + 54px); }
.cat h2 { display: flex; align-items: baseline; gap: 10px; padding: 26px var(--gutter) 10px; font-size: 1.375rem; font-weight: 600; }
.cat h2 .lead { flex: 1; min-width: 12px; border-bottom: 2px dotted var(--line); transform: translateY(-4px); }
.cat h2 small { color: var(--ink-3); font: 500 .75rem/1 var(--font-mono); letter-spacing: 0; }
.dishes { display: flex; flex-direction: column; gap: 10px; padding: 0 var(--gutter); }

.dish { position: relative; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 10px; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; }
.dish:active { background: var(--stone); }
.dish.has { box-shadow: inset 5px 0 0 var(--accent); }
.dish .photo { position: relative; width: 88px; height: 88px; overflow: hidden; border: 2px solid var(--ink); background: var(--stone); }
.dish .photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
/* the dish number is stamped on the corner of its photo */
.dish .tk { position: absolute; left: 0; bottom: 0; min-width: 34px; padding: 2px 7px; background: var(--ink); color: var(--paper); font: 500 .8125rem/1.35 var(--font-mono); font-variant-numeric: tabular-nums; text-align: center; }
.dish .body { min-width: 0; display: flex; flex-direction: column; }
.dish h3 { font-size: 1.1875rem; font-weight: 600; line-height: 1.15; text-wrap: pretty; }
.dish .th { margin: 3px 0 0; color: var(--ink-3); font: 500 .875rem/1.4 var(--font-th); }
.dish .desc { display: -webkit-box; margin: 6px 0 0; overflow: hidden; color: var(--ink-2); font-size: var(--fs-md); line-height: 1.4; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.dish .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.dish .buy { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 8px; }
.buy .lead { flex: 1; min-width: 8px; border-bottom: 2px dotted var(--line); transform: translateY(-3px); }
.dish.sold .tk { background: var(--ink-3); }
/* no photo, list mode: the number sits in a box and the text uses the full width */
.menu:not(.grid) .dish:not(.has-photo) { grid-template-columns: 58px minmax(0, 1fr); }
.menu:not(.grid) .dish:not(.has-photo) .photo { width: 58px; height: 46px; background: var(--paper-2); }
.menu:not(.grid) .dish:not(.has-photo) .ph-tile { display: none; }
.menu:not(.grid) .dish:not(.has-photo) .tk { position: static; width: 100%; height: 100%; display: grid; place-items: center; background: none; color: var(--ink); font-size: 1.25rem; }

/* small tag icons: allergens, diets, spice. Always readable, never colour-only */
.tg { display: inline-flex; align-items: center; justify-content: center; height: 26px; min-width: 26px; padding: 0 5px; border: 1.5px solid var(--ink-3); color: var(--ink-2); font: 500 .6875rem/1 var(--font-mono); }
.tg .i { width: 16px; height: 16px; }
.tg.allergen { border-color: var(--brand); color: var(--brand); }
.tg.diet { border-color: var(--ok); color: var(--ok); }
.spice { display: inline-flex; color: var(--brand); }
.spice .i { width: 16px; height: 16px; margin-right: -3px; }
/* badges (popular, new, chef pick): a small stamp */
.stamp { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 7px; border: 1.5px solid var(--ink-3); color: var(--ink-2); font: 500 .625rem/1 var(--font-mono); text-transform: var(--tt); letter-spacing: .06em; }
.stamp .i { width: 12px; height: 12px; }
.stamp.popular { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.stamp.new { border-color: var(--info); color: var(--info); }

.price { font: 500 1.0625rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.soldtag { padding: 3px 8px; border: 1.5px solid var(--brand); color: var(--brand); font: 500 .625rem/1.3 var(--font-mono); text-transform: var(--tt); letter-spacing: .06em; }
.dish.sold .th, .dish.sold h3, .dish.sold .price, .dish.sold .desc { opacity: .55; }
.dish.sold .photo img { filter: grayscale(1) contrast(.8) brightness(1.1); }

/* add button turns into a stepper once the dish is in the order */
.add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 44px; height: 44px; padding: 0; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); transition: background var(--t-fast), color var(--t-fast), translate var(--t-fast); }
.add span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.add:active { translate: 0 1px; background: var(--ink); color: var(--paper); }
.stepper { display: none; align-items: center; height: 44px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); }
.stepper button { width: 42px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: inherit; }
.stepper button:active { background: rgb(255 255 255 / .18); }
.stepper b { min-width: 26px; text-align: center; font: 500 1rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.stepper.alw { display: inline-flex; }
.stepper.ink { background: var(--paper); color: var(--ink); }
.stepper.ink button:active { background: var(--stone); }
.dish .open { all: unset; cursor: pointer; display: inline; }
.dish .open:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.dish.has .add { display: none; }
.dish.has .stepper { display: inline-flex; animation: pop var(--t-med) var(--ease); }
@keyframes pop { from { scale: .92; } to { scale: 1; } }
.dish.sold .add, .dish.sold .stepper { display: none; }
body:not([data-staff]) .add, body:not([data-staff]) .stepper { display: none !important; }

/* placeholder plate for dishes without a photo */
.ph-tile { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; background: var(--stone); color: var(--ink-3); }
.ph-tile .i { width: 46%; height: 46%; opacity: .3; stroke-width: 1.3; }

.noresults { padding: 48px var(--gutter); color: var(--ink-2); text-align: center; }
.noresults button { margin-top: 12px; }

/* photo mode: two columns of plates */
.menu.grid .dishes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.menu.grid .dish { display: flex; flex-direction: column; gap: 0; padding: 0; }
.menu.grid .dish .photo { width: 100%; height: auto; aspect-ratio: 4 / 3; border: 0; border-bottom: 2px solid var(--ink); }
.menu.grid .dish .body { flex: 1; padding: 10px 10px 12px; }
.menu.grid .dish h3 { font-size: 1.0625rem; }
.menu.grid .dish .desc { display: none; }
@media (min-width: 640px) { .menu.grid .dishes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ info blocks */
.info { margin-top: 40px; border-top: 2px solid var(--ink); background: var(--paper); }
.info section { padding: 22px var(--gutter); border-bottom: 2px dotted var(--line); }
.info h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--ink-2); font: 500 .75rem/1.4 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.info h2 .i { color: var(--ink-3); }
.info p { margin-bottom: 8px; color: var(--ink-2); }
.info .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.info .links a, .info .links span, .info .links button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); background: var(--paper-2); color: var(--ink); font-size: var(--fs-sm); font-weight: 500; text-decoration: none; }
.info details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); list-style: none; cursor: pointer; }
.info details summary::-webkit-details-marker { display: none; }
.info details summary h2 { margin: 0; }
.info details summary .i.chev { color: var(--ink-3); transition: rotate var(--t-med) var(--ease); }
.info details[open] summary .i.chev { rotate: 180deg; }
.hours { width: 100%; margin-top: 6px; border-collapse: collapse; }
.hours td { padding: 8px 0; border-bottom: 1px dotted var(--line); font-variant-numeric: tabular-nums; }
.hours td:last-child { text-align: right; font-family: var(--font-mono); }
.hours tr.today td { color: var(--ink); font-weight: 600; }
.kv { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.kv code { padding: 6px 10px; border: 2px solid var(--ink); background: var(--paper-2); font: 500 var(--fs-md)/1.4 var(--font-mono); word-break: break-all; }
.muted { color: var(--ink-3); }
.foot { padding: 28px var(--gutter) 36px; color: var(--ink-3); font: 500 .6875rem/1.5 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); text-align: center; }
.foot a { color: inherit; font-weight: 500; }

/* ------------------------------------------------------------------ order bar */
.orderbar { position: fixed; z-index: 40; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 656px; margin-inline: auto; min-height: var(--bar-h); display: flex; align-items: center; gap: 12px; padding: 0 12px 0 14px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); box-shadow: var(--sh-2); text-align: left; animation: rise var(--t-med) var(--ease); }
@keyframes rise { from { translate: 0 120%; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.orderbar .cnt { min-width: 30px; height: 30px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 500 .9375rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.orderbar .lbl { flex: 1; min-width: 0; line-height: 1.25; }
.orderbar .lbl b { display: block; font: 500 .75rem/1.3 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.orderbar .lbl small { font: 500 1.0625rem/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
.orderbar .go { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; background: var(--paper); color: var(--ink); font: 500 .6875rem/1 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.orderbar.bump { animation: bump var(--t-med) var(--ease); }
@keyframes bump { 40% { scale: 1.02; } }

/* ------------------------------------------------------------------ dialogs: bottom sheets on phones, centred sheets on wide screens */
dialog { padding: 0; border: 0; color: var(--ink); background: var(--paper); }
dialog.sheet { width: min(100%, 560px); max-width: 100%; max-height: 92dvh; margin: auto auto 0; flex-direction: column; overflow: hidden; border: 2px solid var(--ink); border-bottom: 0;
	translate: 0 100%; opacity: 1; transition: translate var(--t-med) var(--ease), overlay var(--t-med) allow-discrete, display var(--t-med) allow-discrete; }
dialog.sheet[open] { display: flex; translate: 0 0; }
@starting-style { dialog.sheet[open] { translate: 0 100%; } }
dialog::backdrop { background: rgb(36 24 16 / 0); transition: background var(--t-med) var(--ease), overlay var(--t-med) allow-discrete, display var(--t-med) allow-discrete; }
dialog[open]::backdrop { background: rgb(36 24 16 / .6); }
@starting-style { dialog[open]::backdrop { background: rgb(36 24 16 / 0); } }
@media (min-width: 640px) { dialog.sheet { margin: auto; border-bottom: 2px solid var(--ink); max-height: 88dvh; translate: 0 20px; } dialog.sheet[open] { translate: 0 0; } @starting-style { dialog.sheet[open] { translate: 0 20px; } } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--gutter); border-bottom: 2px solid var(--ink); flex: none; }
.sheet-head h2 { margin: 0; font-size: 1.25rem; }
.x { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.x:active { background: var(--stone); }
.sheet-body { flex: 1; min-height: 0; padding: 16px var(--gutter) calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 8px; flex: none; padding: 12px var(--gutter) calc(14px + env(safe-area-inset-bottom)); border-top: 2px solid var(--ink); background: var(--paper); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 500 .75rem/1.2 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); text-decoration: none; }
.btn:active { background: var(--stone); }
.btn.primary, .btn.dark { background: var(--ink); color: var(--paper); }
.btn.primary:active, .btn.dark:active { background: var(--ink-2); }
.btn.block { display: flex; width: 100%; }
.btn:disabled { opacity: .4; }
.btn.sq { width: 48px; padding: 0; }
.btn.sm { min-height: 40px; padding: 0 14px; }
.grow { flex: 1; }

/* dish detail */
.d-photo { position: relative; margin: -16px calc(var(--gutter) * -1) 16px; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 2px solid var(--ink); background: var(--stone); }
.d-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.d-photo .ph-tile .i { width: 30%; height: 30%; }
.d-photo .x { position: absolute; top: 12px; right: var(--gutter); }
.d-kick { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink-3); font: 500 .6875rem/1.3 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.d-kick b { padding: 2px 8px; background: var(--ink); color: var(--paper); font-weight: 500; letter-spacing: 0; }
.d-name { margin: 8px 0 0; font-size: clamp(1.75rem, 8vw, 2.25rem); line-height: 1.05; letter-spacing: -.015em; }
.d-th { margin-top: 6px; color: var(--ink); font: 600 1.375rem/1.45 var(--font-th); }
.d-desc { margin: 10px 0 0; color: var(--ink-2); }
/* the spec list: what the dish is, set like the legend of a drawing */
.d-spec { margin: 14px 0 0; border: 2px solid var(--ink); background: var(--paper-2); }
.d-spec > div { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px dashed var(--line); font-size: var(--fs-md); }
.d-spec > div:last-child { border-bottom: 0; }
.d-spec .lead { flex: 1; min-width: 8px; border-bottom: 2px dotted var(--line); transform: translateY(-3px); }
.d-spec .k { color: var(--ink-3); font: 500 .6875rem/1.3 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.d-spec .dots { display: inline-flex; gap: 5px; }
.d-spec .dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--brand); }
.d-spec .dots i.on { background: var(--brand); }
.d-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.d-tags .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 2px solid var(--ink); background: var(--paper-2); font: 500 .6875rem/1.2 var(--font-mono); text-transform: var(--tt); letter-spacing: .06em; }
.d-tags .chip.allergen { border-color: var(--brand); color: var(--brand); }
.d-tags .chip.diet { border-color: var(--ok); color: var(--ok); }
.d-price { font: 500 1.75rem/1 var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dfoot { align-items: stretch; gap: 10px; }
.dfoot .go { flex: 1; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 .75rem/1.2 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.dfoot .go b { font: 500 1rem/1 var(--font-mono); letter-spacing: 0; }
.dfoot .go:active { background: var(--ink-2); }
.dfoot .stepper { height: 56px; background: var(--paper); color: var(--ink); }
.dfoot .stepper button { width: 46px; height: 52px; }
.dfoot .stepper button:active { background: var(--stone); }

/* options (diet filter, allergy card) */
.optgroup h3 { margin: 18px 0 8px; color: var(--ink-3); font: 500 .6875rem/1.4 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 2px solid var(--ink); background: var(--paper-2); font-weight: 500; }
.opt[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.note { margin-top: 16px; color: var(--ink-3); font-size: var(--fs-sm); }
.listbtn { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 4px; border-bottom: 1px dotted var(--line); color: var(--ink); font-size: var(--fs-lg); text-decoration: none; }
.listbtn[aria-current="true"] { font-weight: 600; }
.listbtn .i { color: var(--accent-text); }

/* order list */
.tablebox { margin-bottom: 16px; padding: 14px; border: 2px dashed var(--ink-3); background: var(--paper-2); }
.tablebox label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font: 500 .75rem/1.4 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.tablebox label small { color: var(--ink-3); font-weight: 400; text-transform: none; letter-spacing: 0; font-family: var(--font-text); }
.tablebox input { width: 100%; height: 52px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); font: 500 1.5rem/1 var(--font-mono); }
.tablebox input:focus { outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 38%, transparent); }
.tablebox .hint { margin: 8px 0 0; color: var(--ink-3); font-size: var(--fs-sm); }
.line { display: grid; grid-template-columns: 48px 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px dotted var(--line); }
.line.nophoto { grid-template-columns: 36px minmax(0, 1fr) auto; }
.line .lt { width: 48px; height: 48px; object-fit: cover; border: 2px solid var(--ink); background: var(--stone); }
.line .tk { font: 500 1.25rem/1 var(--font-mono); text-align: center; }
.line .nm { font: 600 1.0625rem/1.2 var(--font-display); }
.line .tt { margin-top: 2px; color: var(--ink-3); font: 500 .8125rem/1.4 var(--font-th); }
.line .wish { grid-column: 3 / -1; }
.line.nophoto .wish { grid-column: 2 / -1; }
.line .wishbtn { padding: 4px 0; border: 0; background: transparent; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; text-decoration: underline; text-underline-offset: .2em; }
.line .reqs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.line .reqs button { min-height: 36px; padding: 0 12px; border: 2px solid var(--ink); background: var(--paper-2); font-size: var(--fs-sm); }
.line .reqs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.line .stepper { display: inline-flex; }
.sumrow { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; }
.sumrow span { font: 500 .75rem/1.4 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.sumrow b { font: 500 1.5rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }

/* number pad */
.pad-display { display: flex; align-items: center; gap: 14px; min-height: 84px; margin-bottom: 14px; padding: 12px 16px; border: 2px solid var(--ink); background: var(--paper-2); }
.pad-display .big { min-width: 1.6ch; font: 500 2.75rem/1 var(--font-mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pad-display .what { min-width: 0; line-height: 1.3; }
.pad-display .what b { display: block; font: 600 1.0625rem/1.2 var(--font-display); }
.pad-display .what small { color: var(--ink-3); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pad button { height: 58px; display: grid; place-items: center; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 500 1.5rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.pad button:active { background: var(--ink); color: var(--paper); }
.pad button.fn { background: var(--stone); }
.pad-actions { display: flex; gap: 8px; margin-top: 14px; }

/* staff screens: a receipt on espresso. Always light paper, huge, high contrast. The Thai is what the staff reads. */
dialog.full { width: 100%; max-width: 100%; height: 100dvh; max-height: none; margin: 0; flex-direction: column; overflow: hidden; background-color: #241810; background-image: radial-gradient(#3a2a1c 1px, transparent 1.2px); background-size: 18px 18px; color: #f5ecd8; }
dialog.full[open] { display: flex; }
dialog.full .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: none; padding: 16px var(--gutter) 8px; }
dialog.full .top h2 { margin: 0; font: 600 1.125rem/1.4 var(--font-th); }
dialog.full .top small { display: block; color: #d6c19a; font: 500 .625rem/1.4 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
dialog.full .top > div:first-child { flex: 1; min-width: 0; }
dialog.full .x { border-color: #d6c19a; background: transparent; color: #f5ecd8; }
dialog.full .hint { flex: none; padding: 4px var(--gutter) 10px; color: #d6c19a; font-size: var(--fs-sm); }
dialog.full .list { flex: 1; overflow-y: auto; padding: 4px var(--gutter) 16px; }
.docket { max-width: 560px; margin: 0 auto; padding: 20px 18px 8px; background: #f5ecd8; color: #2a1c12; }
.docket + .zz { display: block; max-width: 560px; height: 12px; margin: 0 auto; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12'%3E%3Cpath d='M0 0L8 12L16 0Z' fill='%23f5ecd8'/%3E%3C/svg%3E") repeat-x; }
.dk-head { text-align: center; }
.dk-head h3 { margin: 0; font: 700 1.625rem/1.4 var(--font-th); }
.dk-head small { display: block; margin-top: 2px; color: #6b4a32; font: 500 .625rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; }
.dk-rule { margin: 12px 0; border: 0; border-top: 2px dashed #2a1c12; }
.dk-table { display: flex; justify-content: space-between; align-items: baseline; font: 700 1.5rem/1.4 var(--font-th); }
.dk-table b { font: 500 2.25rem/1 var(--font-mono); }
.srow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dotted #b79f7c; }
.srow.ph { grid-template-columns: 56px auto minmax(0, 1fr) auto; }
.srow img { width: 56px; height: 56px; object-fit: cover; border: 2px solid #2a1c12; display: block; background: #e4d6b8; }
.snum { min-width: 40px; font: 500 1.75rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.sth { color: #2a1c12; font: 600 1.5rem/1.4 var(--font-th); }
.sloc { color: #6b4a32; font: 500 .6875rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.sreq { margin-top: 2px; color: #9b3b24; font: 600 1.25rem/1.5 var(--font-th); }
.sq { color: #2a1c12; font: 500 2.25rem/1 var(--font-mono); text-align: right; }
.sq small { margin-right: 2px; font-size: 1.25rem; font-weight: 400; }
.dk-sum { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 8px; font: 700 1.5rem/1.4 var(--font-th); }
.dk-sum b { font: 500 1.75rem/1 var(--font-mono); }
dialog.full .back { flex: none; margin: 0 var(--gutter) calc(18px + env(safe-area-inset-bottom)); min-height: 52px; border: 2px solid #f5ecd8; background: transparent; color: #f5ecd8; font: 500 .75rem/1.2 var(--font-mono); text-transform: var(--tt); letter-spacing: var(--ls); }
.alcard { text-align: center; }
.alcard .warn { width: 76px; height: 76px; display: grid; place-items: center; margin: 4px auto 6px; border: 3px solid #9b3b24; border-radius: 50%; color: #9b3b24; }
.alcard .warn .i { width: 42px; height: 42px; stroke-width: 1.8; }
.alcard .th1 { margin: 8px 0; font: 600 1.5rem/1.55 var(--font-th); }
.alcard ul { margin: 0 0 12px; padding: 0; list-style: none; color: #9b3b24; font: 700 1.875rem/1.55 var(--font-th); }
.alcard .loc { color: #4a3324; font-size: 1.125rem; line-height: 1.6; }
.phrase { padding: 14px 0; border-bottom: 1px dotted var(--line); }
.phrase .pth { font: 600 1.5rem/1.55 var(--font-th); }
.phrase .ploc { color: var(--ink-3); }

/* toast */
.toastg { position: fixed; z-index: 90; left: 50%; translate: -50% 0; bottom: calc(var(--bar-h) + 32px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px); padding: 11px 18px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); box-shadow: var(--sh-2); font-weight: 500; font-size: var(--fs-sm); text-align: center; animation: rise var(--t-med) var(--ease); }
