/* The restaurant page. Pathors brand: blue, black, white, neutral greys. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f4f5f7;
  --wash: #eef9ff;
  --ink: #1a1a1a;
  --ink-2: #3a3a3a;
  --ink-3: #6b6b6b;
  --rule: #e0e0e0;
  --rule-soft: #ededed;
  --blue: #1469d4;
  --blue-2: #0f55b0;
  --sky: #2db6f3;
  --navy: #1b3a66;
  --risk: #c0392b;
  --paper: #fdfdfb;
  --paper-ink: #1a1a1a;
  --paper-ink-3: #6b6b6b;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "PingFang TC", monospace;
  --radius: 10px;
  --cta-h: 72px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e0f11; --bg-2: #16181b; --wash: #102844; --ink: #f2f2f2; --ink-2: #c9cbd0; --ink-3: #9a9da3;
    --rule: #30333a; --rule-soft: #24272c; --blue: #5aa2f0; --blue-2: #8cc0f7; --navy: #8cc0f7; --risk: #f0807a;
    --paper: #f3f3ef;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f11; --bg-2: #16181b; --wash: #102844; --ink: #f2f2f2; --ink-2: #c9cbd0; --ink-3: #9a9da3;
  --rule: #30333a; --rule-soft: #24272c; --blue: #5aa2f0; --blue-2: #8cc0f7; --navy: #8cc0f7; --risk: #f0807a;
  --paper: #f3f3ef;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); padding-bottom: calc(var(--cta-h) + env(safe-area-inset-bottom)); }
[hidden] { display: none !important; }
a { color: var(--blue); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--rule); background: var(--bg); border-radius: 8px; padding: 8px 14px; min-height: 40px; }
button:hover { border-color: var(--ink-3); }
button:disabled { opacity: .5; cursor: default; }
.primary { background: var(--blue); border: 1px solid var(--blue); color: #fff; border-radius: 8px; padding: 8px 16px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; }
.primary:hover { background: var(--blue-2); border-color: var(--blue-2); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .primary { background: #1469d4; border-color: #1469d4; } }
:root[data-theme="dark"] .primary { background: #1469d4; border-color: #1469d4; }
button.link { border: 0; background: none; color: var(--blue); padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: 3px; }
input[type=text], input[type=tel], textarea { width: 100%; border: 1px solid var(--rule); background: var(--bg); border-radius: 8px; padding: 9px 12px; }
input:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: transparent; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hint { color: var(--ink-3); font-size: 14px; margin: 4px 0; }
.status { color: var(--ink-3); font-size: 14px; margin: 6px 0 0; min-height: 1.4em; }
.status.bad { color: var(--risk); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.top { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.brand img { width: 24px; height: 24px; }
.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; }
.lang button { border: 0; border-radius: 999px; min-height: 30px; padding: 2px 12px; font-size: 13px; color: var(--ink-3); background: none; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

main { max-width: 1120px; margin: 0 auto; padding: 8px 24px 48px; }
.hero { padding: 24px 0 8px; }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: .08em; color: var(--blue); font-weight: 600; }
h1 { font-size: 36px; line-height: 1.25; margin: 6px 0 8px; letter-spacing: -.01em; }
.lede { font-size: 19px; color: var(--ink-2); margin: 0 0 4px; max-width: 46ch; }
h2 { font-size: 21px; margin: 0; }

/* ---- layout A: talk on the left, the ticket on the right */
.stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .9fr); gap: 32px; margin-top: 24px; align-items: start; }
.try { border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; background: var(--bg); }
.modes { display: inline-flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 10px; margin-bottom: 16px; }
.mode { display: inline-flex; gap: 8px; align-items: center; border: 0; background: none; color: var(--ink-3); border-radius: 8px; font-weight: 600; }
.mode.active { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.call-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; font-size: 18px; font-weight: 700; border-radius: 999px; background: var(--blue); border-color: var(--blue); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .call-btn { background: #1469d4; border-color: #1469d4; } }
:root[data-theme="dark"] .call-btn { background: #1469d4; border-color: #1469d4; }
.call-btn svg { width: 22px; height: 22px; }
.call-btn:hover { background: var(--blue-2); }
.call-btn.on { background: var(--bg); color: var(--risk); border-color: var(--risk); }
.call-btn.on svg { transform: rotate(135deg); }
.call-btn .timer { font: 500 15px var(--mono); opacity: .85; }
.call-btn .timer:empty { display: none; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.examples button { font-size: 14px; border-radius: 999px; padding: 6px 14px; min-height: 36px; background: var(--wash); border-color: transparent; color: var(--ink); text-align: left; }
.examples button:hover { border-color: var(--blue); }
.log { margin: 16px 0 0; max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.log:empty { display: none; }
.bubble { max-width: 86%; margin: 0; padding: 9px 14px; border-radius: 14px; font-size: 15px; line-height: 1.55; }
.bubble.agent { align-self: flex-start; background: var(--bg-2); border-bottom-left-radius: 4px; }
.bubble.caller { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bubble.caller { background: #1469d4; } }
:root[data-theme="dark"] .bubble.caller { background: #1469d4; }
.bubble.typing { color: var(--ink-3); }
.log .end { align-self: center; font-size: 13px; color: var(--ink-3); margin: 4px 0; display: flex; gap: 10px; align-items: center; }
.composer { display: flex; gap: 8px; margin-top: 14px; }
.composer input { flex: 1; }
.ts { margin-top: 8px; }
.ts:empty { display: none; }

/* ---- the kitchen ticket: thermal paper, always light */
.ticket-wrap { position: sticky; top: 16px; scroll-margin-top: 16px; }
.ticket-label { margin: 0 0 8px; font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: .06em; }
.ticket {
  position: relative; background: var(--paper); color: var(--paper-ink); font: 14px/1.55 var(--mono);
  padding: 20px 20px 26px; min-height: 280px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.08);
  -webkit-mask: radial-gradient(circle 6px at 50% 100%, transparent 5.5px, #000 6px) bottom / 14px 7px repeat-x, linear-gradient(#000, #000) top / 100% calc(100% - 6px) no-repeat;
          mask: radial-gradient(circle 6px at 50% 100%, transparent 5.5px, #000 6px) bottom / 14px 7px repeat-x, linear-gradient(#000, #000) top / 100% calc(100% - 6px) no-repeat;
}
.t-head { text-align: center; border-bottom: 1px dashed #9a9a9a; padding-bottom: 10px; margin-bottom: 10px; }
.t-head b { display: block; font-size: 17px; font-family: var(--sans); }
.t-head span { font-size: 12px; color: var(--paper-ink-3); }
.t-empty { color: var(--paper-ink-3); text-align: center; padding: 40px 0; font-family: var(--sans); font-size: 14px; }
.t-line { display: grid; grid-template-columns: 2.4em 1fr auto; gap: 0 6px; margin-bottom: 6px; }
.t-line.fresh { animation: print .35s ease-out; }
.t-line .q { font-weight: 700; }
.t-line .n { font-weight: 700; }
.t-line .p { text-align: right; font-variant-numeric: tabular-nums; }
.t-line .s { grid-column: 2 / 4; color: #444; font-size: 13px; }
.t-line .note { grid-column: 2 / 4; font-size: 13px; }
.t-sep { border-top: 1px dashed #9a9a9a; margin: 10px 0; }
.t-row { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.t-row.total { font-weight: 700; font-size: 17px; margin-top: 4px; }
.t-pending { margin: 8px 0 0; padding: 8px 10px; border: 1px dashed #9a9a9a; font-size: 13px; }
.t-pending b { display: block; font-family: var(--sans); font-size: 12px; color: var(--paper-ink-3); }
.stamp {
  position: absolute; right: 16px; top: 54px; transform: rotate(-8deg);
  border: 3px solid #1469d4; color: #1469d4; padding: 4px 14px; border-radius: 6px;
  font: 800 22px/1.2 var(--sans); letter-spacing: .12em; background: rgba(238, 249, 255, .85);
  animation: stamp .3s cubic-bezier(.2, 1.6, .5, 1);
}
.ticket-note { margin-top: 12px; }
@keyframes print { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-8deg) scale(1.6); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .t-line.fresh, .stamp { animation: none; } }

/* ---- menu and FAQ */
.block { margin-top: 56px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.menu { columns: 2 320px; column-gap: 40px; margin-top: 16px; }
.menu-cat { break-inside: avoid; margin: 0 0 20px; }
.menu-cat h3 { font-size: 14px; color: var(--ink-3); margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); letter-spacing: .04em; }
.menu-item { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--rule-soft); }
.menu-item .top-line { display: flex; justify-content: space-between; gap: 12px; }
.menu-item .name { font-weight: 600; }
.menu-item .price { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.menu-item .specs { font-size: 13px; color: var(--ink-3); }
.tag { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; background: var(--bg-2); color: var(--ink-3); }
.tag.rec { background: var(--wash); color: var(--blue); }
.promos { margin-top: 8px; }
.promos h3 { font-size: 14px; color: var(--ink-3); margin: 0 0 6px; }
.promos ul { margin: 0; padding-left: 18px; font-size: 15px; }
.report { margin: 12px 0; padding: 16px; background: var(--bg-2); border-radius: var(--radius); display: grid; gap: 10px; max-width: 620px; }
.report label, dialog label { display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.faq { margin: 12px 0 0; display: grid; grid-template-columns: minmax(160px, max-content) 1fr; border-top: 1px solid var(--rule-soft); max-width: 880px; }
.faq dt, .faq dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.faq dt { font-weight: 600; padding-right: 24px; }
.faq dd { color: var(--ink-2); }
.notice { margin-top: 32px; max-width: 640px; }
.notice p { font-size: 17px; color: var(--ink-2); }

/* ---- fixed CTA bar */
.cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); min-height: var(--cta-h);
  background: var(--navy); color: #fff;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta { background: #16181b; border-top: 1px solid var(--rule); } }
:root[data-theme="dark"] .cta { background: #16181b; border-top: 1px solid var(--rule); }
.cta p { margin: 0; font-weight: 600; font-size: 17px; }
.cta-buttons { display: flex; gap: 10px; }
/* Beats the dark-mode .primary overrides: the booking button is always white on the navy bar. */
:root body .cta a.primary { background: #fff; color: #1b3a66; border-color: #fff; }
:root body .cta a.primary:hover { background: #eef9ff; color: #1b3a66; }
.cta button { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); font-weight: 600; }
.cta button:hover { border-color: #fff; }

dialog { border: 0; border-radius: 14px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog form { padding: 24px; display: grid; gap: 12px; }
dialog h2 { font-size: 20px; }

@media (max-width: 820px) {
  main, .top { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 28px; }
  .lede { font-size: 17px; }
  .stage { grid-template-columns: 1fr; gap: 24px; }
  .ticket-wrap { position: static; }
  .try { padding: 16px; }
  .log { max-height: 320px; }
  .faq { grid-template-columns: 1fr; }
  .faq dt { border-bottom: 0; padding-bottom: 0; }
  .cta { gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); --cta-h: 104px; }
  .cta p { font-size: 15px; width: 100%; text-align: center; }
  .cta-buttons { width: 100%; }
  .cta-buttons > * { flex: 1; justify-content: center; }
  body { --cta-h: 112px; }
}
