/* SUMI · "Ink & ember". Tokens first: re-skin a client here (see DESIGN.md). */
:root {
  --bg: #0f0c0a;
  --surface: #1a1613;
  --surface-2: #241f1b;
  --line: rgb(255 240 225 / 0.1);
  --line-strong: rgb(255 240 225 / 0.22);
  --fg: #f3ece4;
  --muted: #b3a79b;
  --dim: #8f8378;
  --accent: #ef6a35;          /* ember: actions only */
  --accent-ink: #1c0c04;
  --seal: #c8352b;            /* hanko vermilion: seals and stamps only */
  --tone: #c2412f;            /* per-dish ambient colour, animated by app.js */
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --jp: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --plate: min(60vh, 38vw, 620px);
  --gutter: clamp(16px, 3vw, 40px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}
@property --tone { syntax: "<color>"; inherits: true; initial-value: #c2412f; }
@property --ring-strength { syntax: "<percentage>"; inherits: true; initial-value: 17%; }

@view-transition { navigation: auto; }
.top { view-transition-name: site-header; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* Washi grain: one static noise texture over everything, never animated, never blended. */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 .96  0 0 0 0 .9  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.app { display: grid; grid-template-rows: auto 1fr auto; height: 100dvh; overflow: hidden; }
/* Ambient light follows the dish on stage. */
.app::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 60% at 50% 48%, color-mix(in srgb, var(--tone) 16%, transparent), transparent 70%),
    radial-gradient(120% 80% at 50% 45%, #17120f 0%, var(--bg) 60%);
}
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--fg); color: var(--bg); border-radius: 8px; }
.skip:focus { top: 12px; }
/* Mask that "paints" the ensō: circumference of r=80 is 502.65, so offset 503 = unpainted, 0 = painted. */
.enso-brush { fill: none; stroke: #fff; stroke-width: 46; stroke-dasharray: 503 503; stroke-dashoffset: 0; }

/* Scrollbars: a thin ink stroke tinted by the dish on stage. */
:root {
  --scroll-thumb: color-mix(in srgb, var(--tone) 35%, var(--fg) 18%);
  --scroll-thumb-hover: color-mix(in srgb, var(--tone) 70%, var(--fg) 30%);
}
.drawer-inner { scrollbar-gutter: stable; }
/* Chrome / Edge / Safari: a floating pill, no arrow buttons. */
::-webkit-scrollbar { width: 10px; height: 6px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
::-webkit-scrollbar-thumb:horizontal { border-width: 1px 3px; }
/* Firefox only understands the standard properties (setting them in Chrome would switch off the pill above). */
@supports (-moz-appearance: none) {
  html, .drawer-inner, .day-list, .dish-list ul { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
}

/* ---------- Hi-ire loader: the page's own loading lights the binchotan ----------
   Lives above the intro (which starts under its fading curtain) and carries its own washi grain.
   Only shown when loader.js runs; the stick and type appear after 280ms so cached loads see nothing. */
.hiire { display: none; }
html.sumi-loading .hiire {
  position: fixed; inset: 0; z-index: 110; display: grid; place-items: center;
  background: var(--bg); color: var(--fg); overflow: hidden;
}
.hiire::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.07; }
html.sumi-loading .hiire::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 .96  0 0 0 0 .9  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hiire-stage {
  display: grid; justify-items: center; gap: 18px; width: min(560px, 78vw);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.7s var(--ease-out), transform 1s var(--ease-out);
}
.hiire.is-visible .hiire-stage { opacity: 1; transform: none; }

/* the footer's signature: 墨 seal and the name, unstamped until service is ready */
.hiire-mark { display: flex; align-items: center; gap: 16px; margin: 0 0 clamp(18px, 4vh, 34px); }
.hiire-seal {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; rotate: -6deg;
  border: 1.5px solid color-mix(in srgb, var(--seal) 55%, transparent);
  color: color-mix(in srgb, var(--seal) 60%, transparent); font: 700 22px/1 var(--jp);
}
.hiire-stamp {
  position: absolute; inset: -1.5px; display: grid; place-items: center; border-radius: 6px;
  background: var(--seal); color: var(--bg); opacity: 0;
}
.hiire-name { font: 600 28px/1 var(--serif); letter-spacing: 0.32em; margin-right: -0.32em; }

/* the stick */
.hiire-fire { position: relative; width: 100%; aspect-ratio: 640 / 140; container-type: inline-size; }
.hiire-coal { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hiire-seam { fill: none; stroke: rgb(255 240 225 / 0.05); stroke-width: 1.2; }
.hiire-sheen { fill: none; stroke: rgb(255 245 235 / 0.18); stroke-width: 2.5; stroke-linecap: round; }
.hiire-shade { fill: none; stroke: rgb(0 0 0 / 0.45); stroke-width: 10; stroke-linecap: round; }
.hiire-end ellipse + ellipse { fill: none; stroke: rgb(255 240 225 / 0.08); stroke-width: 1; }
.hiire-crack { fill: none; stroke: #050404; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.hiire-glow { fill: none; stroke: #ef6a35; stroke-width: 7; stroke-opacity: 0.26; stroke-linejoin: round; stroke-linecap: round; }
.hiire-vein { fill: none; stroke: #ffb27a; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.hiire-rim { fill: none; stroke: #ef6a35; stroke-width: 3; stroke-linecap: round; opacity: 0.75; }
.hiire-ember { animation: hiire-breathe 2.6s ease-in-out infinite; }
@keyframes hiire-breathe { 0%, 100% { opacity: 1; } 30% { opacity: 0.78; } 55% { opacity: 0.95; } 78% { opacity: 0.84; } }

/* heat: a pre-softened glow under the stick, and the burning edge that rides the lit end */
.hiire-halo {
  position: absolute; left: 50%; top: 64%; width: 135%; aspect-ratio: 2.4; translate: -50% -50%;
  background: radial-gradient(closest-side, rgb(239 106 53 / 0.5), rgb(200 53 43 / 0.16) 55%, transparent);
  opacity: 0.15; pointer-events: none; transform-origin: 50% 50%;
}
.hiire-front { position: absolute; left: 0; top: 18%; width: 16%; height: 64%; margin-left: -8%; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.hiire-front::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(closest-side, rgb(255 214 170 / 0.85), rgb(239 106 53 / 0.45) 45%, transparent);
  animation: hiire-flicker 1.3s ease-in-out infinite;
}
@keyframes hiire-flicker { 0%, 100% { transform: scale(1); opacity: 1; } 40% { transform: scale(0.88, 0.94); opacity: 0.8; } 70% { transform: scale(1.06, 0.98); opacity: 0.95; } }
.hiire-sparks { position: absolute; left: 3%; right: 3%; top: 34%; height: 0; }
.hiire-sparks i {
  position: absolute; top: 0; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
  background: radial-gradient(circle, #fff1de 0 30%, #ef6a35 60%, transparent 72%);
  box-shadow: 0 0 6px 1px rgb(239 106 53 / 0.55);
}
.hiire-kanji {
  position: absolute; right: -34px; top: -6%; writing-mode: vertical-rl;
  font: 500 15px/1 var(--jp); letter-spacing: 0.42em; color: var(--dim);
}

/* type */
.hiire-num {
  margin: clamp(8px, 2vh, 18px) 0 0; font: 500 clamp(44px, 7vw, 64px)/1 var(--serif);
  font-variant-numeric: lining-nums tabular-nums; opacity: 0; transition: opacity 0.6s var(--ease-out);
}
.hiire.has-ink .hiire-num { opacity: 1; }
.hiire-status {
  margin: 0; min-height: 1.4em; font: 500 12px/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); text-align: center;
}

/* service: the whole stick flares */
.hiire.is-flaring .hiire-ember { animation: none; opacity: 1; }
.hiire.is-flaring .hiire-halo { opacity: 1 !important; transform: scale(1.22) !important; transition: opacity 0.35s ease-out, transform 0.7s var(--ease-out); }
.hiire.is-flaring .hiire-status { color: var(--fg); }

@media (max-width: 520px) {
  .hiire-stage { width: 80vw; }
  .hiire-kanji { right: -26px; font-size: 13px; }
  .hiire-name { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .hiire-sparks, .hiire-front { display: none; }
  .hiire-ember { animation: none; }
  .hiire-stage { transform: none; }
}

/* Intro */
.intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 28px;
  background: var(--bg); color: var(--fg);
}
.intro[hidden] { display: none; }
.intro-enso { width: min(46vw, 260px); color: var(--fg); overflow: visible; }
.intro-enso .enso-brush { stroke-dashoffset: 503; }
.intro-word { margin: 0; font: 600 clamp(28px, 4vw, 40px)/1 var(--serif); letter-spacing: 0.5em; padding-left: 0.5em; }

/* Header */
.top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px var(--gutter);
  position: relative; z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--fg); text-decoration: none; justify-self: start; }
.brand-enso { width: 38px; height: 38px; color: var(--fg); overflow: visible; }
.brand-name { font: 600 26px/1 var(--serif); letter-spacing: 0.32em; }
/* right side: EN / ES switch, then the order button */
.top-end { justify-self: end; display: flex; align-items: center; gap: 10px; }
.lang { display: flex; }
.lang a, .lang [aria-current] {
  position: relative; padding: 10px 8px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: 0.14em;
  transition: color 0.2s;
}
.lang a:hover, .lang [aria-current] { color: var(--fg); }
.lang [aria-current]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: calc(-2px - 0.07em);
  border-radius: 50%; background: var(--accent);
}
.cart-btn {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 14px 8px 16px;
  background: rgb(26 22 19 / 0.7); border: 1px solid var(--line-strong); border-radius: 14px;
  font-weight: 500; font-size: 15px;
  transition: border-color 0.2s, background-color 0.2s;
}
.cart-btn:hover { border-color: rgb(255 240 225 / 0.4); background: var(--surface-2); }
.site-nav { display: flex; gap: 6px; }
.site-nav a {
  position: relative; padding: 10px 14px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--fg); }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--accent);
}
.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cart-total { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Stage */
.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) var(--plate) minmax(240px, 1fr);
  grid-template-areas: "info plate list" ". arrows .";
  grid-template-rows: 1fr auto;
  align-items: center;
  column-gap: clamp(24px, 4vw, 72px);
  padding: 0 var(--gutter) 24px;
  min-height: 0;
}

.info { grid-area: info; max-width: 420px; }
.counter {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.14em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.counter-num { display: inline-block; overflow: hidden; height: 1.2em; line-height: 1.2em; }
.counter-num > span { display: inline-block; }
.counter-track { width: 56px; height: 1px; background: var(--line-strong); position: relative; }
.counter-fill { position: absolute; inset: 0; background: var(--tone); transform: scaleX(0); transform-origin: left; }
.counter-cat { color: color-mix(in srgb, var(--tone) 70%, var(--fg)); text-transform: uppercase; margin-left: 6px; }
.dish-name {
  margin: 22px 0 16px;
  font: 500 clamp(44px, 5.4vw, 84px)/1.02 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
  outline: none;
}
.dish-native { display: none; margin: 0 0 22px; font: 500 15px/1.4 var(--jp); letter-spacing: 0.3em; color: var(--dim); }
.dish-desc { margin: 0 0 32px; color: var(--muted); max-width: 38ch; font-size: 16px; }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }   /* narrow info column: the button drops under the price instead of spilling */
.price { margin: 0; font: 500 34px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.hint { margin: 36px 0 0; font-size: 13px; color: var(--dim); }
.hint-touch { display: none; }
@media (hover: none) { .hint-fine { display: none; } .hint-touch { display: inline; } }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 14px;
  font-weight: 600; font-size: 15px;
  box-shadow: 0 10px 30px -8px rgb(239 106 53 / 0.55);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, filter 0.2s;
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 14px 34px -8px rgb(239 106 53 / 0.7); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.4; box-shadow: none; cursor: not-allowed; filter: none; }
.btn-add:disabled { opacity: 1; cursor: progress; }
.btn-add-label { min-width: 6.6em; text-align: left; white-space: nowrap; }
.btn-block { width: 100%; min-height: 56px; font-size: 16px; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* Plate */
.plate-area { grid-area: plate; position: relative; width: var(--plate); aspect-ratio: 1; justify-self: center; }
.glow {
  position: absolute; inset: -38%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tone) 22%, transparent), color-mix(in srgb, var(--tone) 6%, transparent) 55%, transparent 75%);
}
.enso-ring {
  position: absolute; inset: -13%; width: 126%; height: 126%; pointer-events: none; overflow: visible;
  /* Intensity lives in the colour so JS can fade the ring in and out with plain opacity. */
  color: color-mix(in srgb, color-mix(in srgb, var(--tone) 45%, var(--fg)) var(--ring-strength), transparent);
}
.native-v {
  position: absolute; top: 50%; right: calc(-1 * clamp(64px, 7.5vw, 120px)); translate: 0 -50%;
  margin: 0; writing-mode: vertical-rl; pointer-events: none;
  font: 500 clamp(30px, 4.2vh, 46px)/1 var(--jp); letter-spacing: 0.18em;
  color: color-mix(in srgb, var(--tone) 55%, var(--fg));
  opacity: 0.85;
}
.native-v span { display: inline-block; opacity: 0.32; }
.plates { position: absolute; inset: 0; }
.plate { position: absolute; inset: 0; }
/* Static contact shadow under the plate. The rotating image itself carries no filter. */
.plate::before {
  content: ""; position: absolute; inset: 6% 4% -3%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.75), rgb(0 0 0 / 0.35) 60%, transparent);
  transform: translateY(5%);
}
.plate img {
  width: 100%; height: 100%; object-fit: contain;
  will-change: transform;
  user-select: none; -webkit-user-drag: none;
}
.plate-hit {
  position: absolute; inset: 4%; z-index: 3; border-radius: 50%;
  background: transparent; border: 0; padding: 0;
  cursor: zoom-in; touch-action: pan-y;
}
.plate-hit[aria-pressed="true"] { cursor: zoom-out; }
.has-cursor .plate-hit { cursor: none; }

.plate-cursor {
  position: fixed; left: 0; top: 0; z-index: 30; width: 88px; height: 88px; pointer-events: none;
  display: grid; place-items: center; opacity: 0;
}
.plate-cursor svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.pc-track { fill: rgb(15 12 10 / 0.35); stroke: rgb(243 236 228 / 0.35); stroke-width: 1; }
.pc-fill { fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-dasharray: 252 252; stroke-dashoffset: 252; } /* r=40 */
.plate-cursor span { position: relative; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }

/* List */
.dish-list { grid-area: list; justify-self: end; width: 100%; max-width: 260px; }
.dish-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dish-btn {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 8px 12px 8px 8px; border: 0; border-radius: 14px; background: transparent; text-align: left;
  color: var(--muted);
  transition: background-color 0.25s, color 0.25s;
}
.dish-btn:hover { background: rgb(255 240 225 / 0.04); color: var(--fg); }
.dish-btn[aria-current="true"] { background: var(--surface); color: var(--fg); }
.dish-btn img {
  width: 46px; height: 46px; border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong);
  transition: box-shadow 0.25s, transform 0.35s var(--ease-out);
}
.dish-btn:hover img { transform: rotate(-20deg); }
.dish-btn[aria-current="true"] img { box-shadow: 0 0 0 2px var(--tone); }
.dish-btn-name { display: block; font-size: 15px; font-weight: 500; line-height: 1.25; }
.dish-btn-price { display: block; font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }

.arrows { grid-area: arrows; display: flex; justify-content: center; gap: 12px; padding-top: 12px; }
.round-btn {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 50%; background: transparent;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}
.round-btn:hover { background: var(--surface); border-color: rgb(255 240 225 / 0.4); }
.round-btn:active { transform: scale(0.92); }

/* Callouts */
.callouts { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.callout-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.callout-lines polyline { fill: none; stroke: rgb(243 236 228 / 0.65); stroke-width: 1; stroke-linejoin: round; }
.callout-lines .dot { fill: var(--accent); }
.callout-lines .ring { fill: rgb(15 12 10 / 0.35); stroke: rgb(243 236 228 / 0.95); stroke-width: 1.2; }
.callout-lines .pulse { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0; }
.callout {
  position: absolute; width: max-content; max-width: 180px;
  transform: translateY(-50%);
  opacity: 0;
}
.callout[data-side="left"] { text-align: right; }
.callout-cap { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.callout-label { display: block; font: 500 21px/1.15 var(--serif); color: var(--fg); }

/* Ticker */
.ticker { border-top: 1px solid var(--line); overflow: hidden; padding: 12px 0; }
.ticker-track { display: flex; width: max-content; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track > div { display: flex; }
.ticker-track span {
  padding: 0 22px; white-space: nowrap;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim);
}
.ticker-track span::after { content: "・"; margin-left: 44px; color: var(--line-strong); }
.ticker-track .live { color: var(--muted); }
.ticker-track .live::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 10px; vertical-align: 2px;
  border-radius: 50%; background: var(--accent); animation: ember 2.4s ease-in-out infinite;
}
@keyframes ticker { to { transform: translateX(-50%); } }
/* Studio credit: in the HTML itself (crawlers that run no JS read it). It closes the ticker on the menu and the footer on inner pages. */
.credit { display: flex; align-items: center; gap: 0.6em; margin: 0; white-space: nowrap; }
.credit a { padding: 4px 0; color: var(--fg); text-underline-offset: 3px; text-decoration-color: var(--line-strong); transition: text-decoration-color 0.2s; }
.credit a:hover { text-decoration-color: var(--accent); }
.ticker { position: relative; }
.ticker .credit {
  position: absolute; inset: 0 0 0 auto; padding: 0 var(--gutter) 0 22px; background: var(--bg); border-left: 1px solid var(--line);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim);
}
.site-foot .credit { margin-left: auto; }
@keyframes ember { 50% { opacity: 0.35; } }

/* Mobile buy bar */
.buy-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 25;
  display: none; align-items: center; gap: 12px; padding: 8px 8px 8px 10px;
  background: rgb(26 22 19 / 0.92); border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: 0 18px 40px -12px rgb(0 0 0 / 0.7);
  transform: translateY(140%); transition: transform 0.45s var(--ease-out);
}
.buy-bar.is-shown { transform: none; }
.buy-bar img { width: 44px; height: 44px; border-radius: 50%; }
.buy-bar-text { flex: 1; min-width: 0; }
.buy-bar-name { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buy-bar-price { display: block; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.buy-bar .btn-primary { min-width: 92px; }

/* Drawer */
dialog { color: var(--fg); }
.drawer {
  position: fixed; inset: 12px 12px 12px auto; margin: 0;
  width: min(440px, calc(100vw - 24px)); height: calc(100dvh - 24px); max-height: none; max-width: none;
  padding: 0; border: 1px solid var(--line); border-radius: 22px;
  background: var(--surface);
  box-shadow: -20px 0 60px -20px rgb(0 0 0 / 0.6);
}
.drawer::backdrop, .confirm::backdrop { background: rgb(8 6 5 / 0.55); backdrop-filter: blur(10px); }
.drawer-inner { height: 100%; display: flex; flex-direction: column; padding: 26px 28px 28px; overflow-y: auto; overscroll-behavior: contain; }
.drawer-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.drawer-head h2 { margin: 0; font: 500 38px/1 var(--serif); }
.link-btn { background: none; border: 0; padding: 10px 4px; color: var(--muted); font-size: 15px; }
.link-btn:hover { color: var(--fg); }
/* Items keep their height; the whole drawer scrolls when space runs out, so nothing gets squeezed. */
.cart-items { list-style: none; margin: 0; padding: 0; flex: none; }
.cart-item { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 60px; height: 60px; border-radius: 50%; }
.cart-item-text { flex: 1; min-width: 0; }
.cart-item-name { display: block; font-weight: 500; }
.cart-item-price { display: block; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; }
.qty button { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); }
.qty button:hover { color: var(--fg); }
.qty output { min-width: 20px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.cart-empty { flex: 1; color: var(--muted); margin: 8px 0 0; }
.pair { padding: 18px 0 20px; }
.pair-card { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 12px; border: 1px dashed var(--line-strong); border-radius: 16px; }
.pair-card img { width: 52px; height: 52px; border-radius: 50%; }
.pair-text { flex: 1; min-width: 0; }
.pair-name { display: block; font: 500 20px/1.15 var(--serif); }
.pair-price { display: block; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.checkout { border-top: 1px solid var(--line); padding-top: 22px; margin-top: auto; }
.slots { border: 0; margin: 0 0 20px; padding: 0; }
.field-label { display: block; margin-bottom: 10px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.slot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.slot span:hover { color: var(--fg); border-color: rgb(255 240 225 / 0.4); }
.slot input:checked + span { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.slot input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.text-input {
  width: 100%; min-height: 50px; padding: 0 16px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px;
}
.text-input:focus { border-color: var(--fg); outline: none; }
.text-input[aria-invalid="true"] { border-color: #ff8a65; }
.field-error.send-error { margin: 0 0 12px; }
.field-error { margin: 8px 0 0; color: #ff9e7d; font-size: 14px; }
.totals { margin: 20px 0 18px; display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; color: var(--muted); }
.totals dt, .totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .grand { color: var(--fg); font-size: 19px; font-weight: 600; margin-top: 4px; }

/* Confirmation */
.confirm {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 24px;
  background: transparent; border: 0;
  display: none; place-items: center;
}
.confirm[open] { display: grid; }
.confirm::backdrop { background: rgb(8 6 5 / 0.82); backdrop-filter: blur(14px); }
.confirm-inner { width: min(540px, 100%); text-align: center; }
.hanko { width: 92px; height: 92px; color: var(--seal); margin: 0 auto; display: block; transform: rotate(-7deg); }
.hanko-bg { fill: currentColor; }
.hanko-char { font: 700 38px/1 var(--jp); fill: var(--bg); text-anchor: middle; }
.order-no { margin: 22px 0 6px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.2em; }
.confirm h2 { margin: 0; font: 500 clamp(44px, 7vw, 64px)/1.05 var(--serif); }
.confirm-sub { margin: 10px 0 30px; color: var(--muted); }
.tracker { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.tracker::before { content: ""; position: absolute; top: 6px; left: 16.6%; right: 16.6%; height: 1px; background: var(--line-strong); }
.tracker::after {
  content: ""; position: absolute; top: 6px; left: 16.6%; height: 1px; background: var(--accent);
  width: 66.8%; transform: scaleX(var(--progress, 0)); transform-origin: left; transition: transform 0.8s var(--ease-out);
}
.tracker li { position: relative; z-index: 1; padding-top: 24px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.tracker li::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 13px; height: 13px; margin-left: -6.5px;
  border-radius: 50%; background: var(--surface-2); transition: background-color 0.4s, box-shadow 0.4s;
}
.tracker li.is-done { color: var(--fg); }
.tracker li.is-done::before { background: var(--accent); box-shadow: 0 0 0 4px rgb(239 106 53 / 0.2); }
.confirm-items { list-style: none; margin: 0 0 30px; padding: 0; border-top: 1px solid var(--line); text-align: left; }
.confirm-items li { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }

/* Fly-to-cart clone */
.flyer { position: fixed; z-index: 60; pointer-events: none; border-radius: 50%; will-change: transform; }

/* Small laptops and tablets on their side: the three columns plus the plate were wider than the screen */
@media (min-width: 900px) and (max-width: 1120px) {
  :root { --plate: min(60vh, 33vw, 620px); }
  .stage { grid-template-columns: minmax(220px, 1fr) var(--plate) minmax(190px, 1fr); column-gap: clamp(20px, 3vw, 40px); }
}

/* Mobile */
@media (max-width: 899px) {
  .app { height: auto; overflow: visible; grid-template-rows: auto auto auto; padding-bottom: 84px; }
  :root { --plate: min(80vw, 420px); }
  .top { grid-template-columns: 1fr auto; row-gap: 6px; padding: 12px 16px; position: sticky; top: 0; background: linear-gradient(var(--bg) 70%, transparent); }
  .brand-enso { width: 32px; height: 32px; }
  .brand-name { font-size: 22px; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .cart-total { display: none; }
  .lang [aria-current] { display: none; }   /* phones: only the other language, next to the order */
  .top-end { gap: 4px; }
  .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "plate" "arrows" "info" "list";
    grid-template-rows: auto;
    row-gap: 8px; padding: 18px 16px 32px; overflow-x: clip;
  }
  .plate-area { margin-top: 8px; }
  .native-v { display: none; }
  .dish-native { display: block; }
  .info { max-width: none; padding-top: 12px; }
  .dish-name { margin-top: 14px; font-size: clamp(40px, 12vw, 56px); }
  .dish-desc { margin-bottom: 24px; }
  .buy { justify-content: space-between; }
  .hint { margin-top: 24px; }
  .dish-list { justify-self: stretch; max-width: none; margin-top: 28px; }
  .dish-list ul { grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .dish-list li { scroll-snap-align: start; }
  .callout-label { font-size: 16px; }
  .callout-cap { font-size: 10px; letter-spacing: 0.08em; }
  .buy-bar { display: flex; }
  .ticker .credit { position: static; justify-content: center; margin-top: 12px; padding: 8px 16px 0; background: none; border-left: 0; border-top: 1px solid var(--line); }
  .site-foot .credit { margin-left: 0; }
  .drawer { inset: auto 0 0 0; width: 100vw; height: min(92dvh, 760px); border-radius: 22px 22px 0 0; }
  .drawer-inner { padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  @view-transition { navigation: none; }
}

/* ---------- Inner pages (reserve, story) ---------- */
.page .cart-btn { color: var(--fg); text-decoration: none; }
a.btn-primary { text-decoration: none; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border: 1px solid var(--line-strong); border-radius: 14px;
  background: transparent; color: var(--fg); text-decoration: none; font-weight: 500; font-size: 15px;
  transition: border-color 0.2s, background-color 0.2s;
}
.btn-ghost:hover { border-color: rgb(255 240 225 / 0.4); background: var(--surface); }
.done-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.page-title { margin: 0 0 14px; font: 500 clamp(48px, 6vw, 80px)/1 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); }
.foot-enso { width: 24px; height: 24px; overflow: visible; }
.foot-name { font: 600 16px/1 var(--serif); letter-spacing: 0.32em; }
.lede { margin: 0 0 40px; color: var(--muted); max-width: 46ch; }
.lede a, .visit-list a, .site-foot a { color: var(--fg); text-underline-offset: 3px; white-space: nowrap; }
.page { display: flex; flex-direction: column; }
.page main { flex: 1; width: 100%; }
.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 28px var(--gutter);
  border-top: 1px solid var(--line); color: var(--dim); font-size: 14px;
}

/* Reserve */
.reserve {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 8px clamp(32px, 6vw, 96px);
  align-items: start; max-width: 1320px; margin: 0 auto; padding: clamp(24px, 5vh, 56px) var(--gutter) 96px;
}
.field { margin-bottom: 20px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.optional { text-transform: none; letter-spacing: 0; color: var(--dim); }
select.text-input {
  appearance: none; cursor: pointer;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23b3a79b' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 16px center;
}
input[type="date"].text-input { color-scheme: dark; }
.slot input:disabled + span { opacity: 0.35; text-decoration: line-through; cursor: not-allowed; }
.slot-note { margin: 4px 0 0; color: var(--muted); font-size: 14px; width: 100%; }
.reserve-form .slots { margin-bottom: 26px; }
.days { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.day-list {
  display: grid; grid-auto-flow: column; grid-auto-columns: 64px; gap: 8px;
  overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 10px;
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.day { position: relative; scroll-snap-align: start; }
.day input { position: absolute; opacity: 0; pointer-events: none; }
.day span {
  display: grid; justify-items: center; gap: 2px; padding: 10px 0 9px;
  border: 1px solid var(--line-strong); border-radius: 14px; cursor: pointer; color: var(--muted);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.day small { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.day b { font: 500 26px/1 var(--serif); color: var(--fg); }
.day span:hover { border-color: rgb(255 240 225 / 0.4); }
.day input:checked + span { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.day input:checked + span b { color: var(--bg); }
.day input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.other-date { display: inline-flex; align-items: center; gap: 12px; margin-top: 6px; color: var(--muted); font-size: 14px; }
.other-date .text-input { width: auto; min-height: 42px; color-scheme: dark; }
.other-date.is-active .text-input { border-color: var(--fg); }
.field-guests { max-width: 260px; }
.reserve-form { grid-column: 1; grid-row: 1; min-width: 0; }
.floor { grid-column: 2; grid-row: 1 / span 2; }
.reserve-submit { grid-column: 1; grid-row: 2; }
.reserve-submit .field-error { margin: 0 0 12px; }

.floor { position: sticky; top: 24px; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.floor-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.floor-head h2 { margin: 0; font: 500 34px/1 var(--serif); }
.floor-hint { margin: 0; color: var(--muted); font-size: 14px; }
.plan {
  position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 60%, rgb(239 106 53 / 0.06), transparent 70%),
    repeating-linear-gradient(90deg, rgb(255 240 225 / 0.025) 0 1px, transparent 1px 40px),
    var(--bg);
  border: 1px solid var(--line);
}
.plan-counter {
  position: absolute; left: 8%; width: 67%; top: 20%; height: 5%;
  display: grid; place-items: center; border-radius: 6px;
  background: rgb(201 167 124 / 0.28); color: #e2cfb4;
  font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}
.plan-window, .plan-door { position: absolute; font-size: 10px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.plan-window { left: 2%; top: 50%; writing-mode: vertical-rl; transform: rotate(180deg) translateY(50%); }
.plan-door { right: 3%; bottom: 3%; }
.table {
  position: absolute; display: grid; place-content: center; text-align: center;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2);
  color: var(--muted); cursor: pointer; line-height: 1.15;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s, opacity 0.25s;
}
.table-round, .table-counter { border-radius: 50%; height: auto !important; aspect-ratio: 1; }
.table-pill { border-radius: 999px; }
.table input { position: absolute; opacity: 0; pointer-events: none; }
.table-id { font-size: 13px; font-weight: 600; color: var(--fg); }
.table-seats { font-size: 11px; }
.table-counter .table-seats { display: none; }
.table:hover { border-color: rgb(255 240 225 / 0.45); }
.table:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -8px rgb(239 106 53 / 0.6); }
.table:has(input:checked) .table-id { color: var(--accent-ink); }
.table:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.table.is-small { opacity: 0.3; border-style: dashed; cursor: not-allowed; }
.floor-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.floor-legend > span { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; white-space: nowrap; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.key-picked { background: var(--accent); border-color: var(--accent); }
.key-small { opacity: 0.4; border-style: dashed; }
.reserve-done { grid-column: 1 / -1; justify-self: center; max-width: 620px; text-align: center; padding-top: 40px; outline: none; }
.reserve-done .done-actions { justify-content: center; margin-top: 28px; }

/* Story */
.story { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); overflow-x: clip; }
.story-hero {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: end; gap: clamp(32px, 5vw, 72px);
  min-height: calc(100dvh - 90px); padding: 24px 0 56px;
}
.story-title { margin: 0 0 8px; font: 500 clamp(48px, 6.2vw, 96px)/1.02 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.story-hero-media { border-radius: 20px; overflow: hidden; aspect-ratio: 7 / 5; max-height: calc(100dvh - 160px); }
.story-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.story-hero-text { position: relative; }
.story-enso {
  position: absolute; left: -12%; top: 50%; width: min(118%, 560px); translate: 0 -50%; z-index: -1; pointer-events: none;
  color: color-mix(in srgb, var(--accent) 17%, transparent); overflow: visible;
}
.story-enso .enso-brush { stroke-dashoffset: 503; }
.story-counter-media { border-radius: 20px; overflow: hidden; aspect-ratio: 7 / 5; }
.story-counter-media img { width: 100%; height: 100%; object-fit: cover; scale: 1.14; }
.story-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding: clamp(72px, 12vh, 140px) 0; border-top: 1px solid var(--line); }
.story-big { margin: 0; font: 500 clamp(28px, 3vw, 42px)/1.2 var(--serif); text-wrap: pretty; }
.story-text p { margin: 0 0 1.2em; color: var(--muted); font-size: 17px; max-width: 60ch; }
.story-plates { margin: 0; padding: 24px 0 clamp(72px, 12vh, 140px); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 48px); }
.story-plates img { width: 100%; filter: drop-shadow(0 30px 40px rgb(0 0 0 / 0.55)); will-change: transform; }
.story-plates img:nth-child(2) { transform: translateY(12%) rotate(-12deg); }
.story-plates img:nth-child(3) { transform: rotate(18deg); }
.story-plates figcaption { grid-column: 1 / -1; margin-top: clamp(24px, 6vw, 72px); text-align: center; color: var(--dim); font-size: 14px; }
.story-counter { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-bottom: clamp(72px, 12vh, 140px); }
.story-counter h2, .story-visit h2 { margin: 0 0 16px; font: 500 clamp(36px, 4vw, 56px)/1.05 var(--serif); }
.story-counter p { margin: 0 0 28px; color: var(--muted); font-size: 17px; max-width: 42ch; }
.story-visit { border-top: 1px solid var(--line); padding: clamp(56px, 10vh, 112px) 0; }
.visit-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0 0 40px; }
.visit-list dt { margin-bottom: 6px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.visit-list dd { margin: 0; font: 500 24px/1.3 var(--serif); }

@media (max-width: 899px) {
  .reserve { grid-template-columns: minmax(0, 1fr); row-gap: 28px; padding-top: 16px; }
  .reserve-form, .floor, .reserve-submit { grid-column: 1; grid-row: auto; }
  .floor { position: static; padding: 18px; }
  .table-id { font-size: 11px; }
  .table-seats { display: none; }
  .story-hero, .story-split, .story-counter, .visit-list { grid-template-columns: minmax(0, 1fr); }
  .story-hero { min-height: 0; padding-top: 8px; }
}
@media (max-width: 520px) {
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
