/* Choyxona customer site — frosted glass over a warm dark ambient, orange
   accent. Mobile-first, works as a Telegram Mini App. The `site-*` class
   names are the stable contract with site.js. The palette lives entirely in
   the tokens below — it is expected to be retuned later. */

:root {
  color-scheme: dark;

  --accent: #f2913a;
  --accent-2: #f7ab55;
  --on-accent: #3c1e04;
  --accent-glow: rgba(242, 145, 58, 0.75);
  --accent-tint: rgba(242, 145, 58, 0.14);

  --text: #f5efe6;
  --text-dim: rgba(245, 239, 230, 0.60);
  --text-faint: rgba(245, 239, 230, 0.52);

  /* text and scrims layered directly over a photo (delivery cards) */
  --on-media: rgba(255, 255, 255, 0.85);
  --on-media-dim: rgba(255, 255, 255, 0.62);
  --scrim-rgb: 6 4 3;

  --ground: #140f0d;
  --pane-base: #1e1815; /* opaque warm lift under the white tint where there is
                           no backdrop-filter (list-level surfaces) */
  --card: rgba(255, 255, 255, 0.10);
  --card-hi: rgba(255, 255, 255, 0.19);
  --card-edge: rgba(255, 255, 255, 0.28);
  --field: rgba(255, 255, 255, 0.07);
  --hair: rgba(255, 255, 255, 0.14);
  --hair-faint: rgba(255, 255, 255, 0.06);
  --press: rgba(255, 255, 255, 0.05); /* :active / pressed surface tint */

  --free: #63cf8f;
  --part: #e8c65c;
  --full: #e87c6c;

  --radius: 24px;
  --radius-sm: 16px;
  --blur: blur(26px) saturate(1.4);

  /* motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* strong ease-out — entrances, settles, presses */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);   /* iOS-style drawer curve — the confirm sheet */
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);  /* one gentle overshoot — delight moments only */
  --dur-fast: 130ms;   /* press feedback, tiny state changes */
  --dur-base: 200ms;   /* small UI transitions */
  --dur-sheet: 340ms;  /* the confirm sheet */

  --disp: 'Gabarito', 'Manrope', system-ui, sans-serif;
  --ui: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  background: var(--ground); /* the solid fallback lives on <html>, so <body>
                                can stay transparent and not paint over the
                                fixed #site-bg / #site-photo layers */
}
html, body { margin: 0; }
body {
  background: transparent;
  color: var(--text);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* keyboard focus — one visible ring for every interactive element; follows
   each element's own border-radius. Pointer focus stays quiet. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }
/* headings take focus on screen change for assistive tech — no visible ring */
[tabindex="-1"]:focus { outline: none; }

.site-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* the confirm sheet backdrop is behind an inert page while open */
[inert] { pointer-events: none; }

/* ambient background — two fixed layers behind #app:
     #site-bg     canvas warm ambient, painted by site.js (also the fallback
                  if a photo fails to load)
     #site-photo  a blurred venue photo (blur is baked into the JPEG — no CSS
                  filter/transform, which break position:fixed on iOS webviews)
                  with a gradient veil layered on top so the frosted UI stays
                  readable. background-size:cover crops, never stretches. */
#site-bg,
#site-photo {
  position: fixed;
  inset: 0;
  display: block;
  pointer-events: none;
}
#site-bg { z-index: -2; width: 100%; height: 100%; }
#site-photo { z-index: -1; }

#site-bg {
  background:
    radial-gradient(60% 45% at 16% 4%, rgba(201, 112, 47, 0.36), transparent 70%),
    radial-gradient(52% 42% at 92% 24%, rgba(122, 47, 28, 0.34), transparent 72%),
    radial-gradient(62% 50% at 50% 104%, rgba(138, 90, 36, 0.30), transparent 72%),
    linear-gradient(180deg, #1c130f, #120c0a 55%, #0a0706);
}

#site-photo {
  /* the image layer (last) is set in site.js — one of BG_PHOTOS at random;
     the gradients above it are the readability veil */
  background-image:
    radial-gradient(130% 55% at 50% 0%, rgba(201, 112, 47, 0.14), transparent 58%),
    linear-gradient(180deg,
      rgba(9, 6, 5, 0.70) 0%,
      rgba(9, 6, 5, 0.52) 30%,
      rgba(8, 5, 4, 0.66) 58%,
      rgba(6, 4, 3, 0.92) 100%),
    var(--bg-photo, url('/img/bg-venue.jpg'));
  background-size: cover;
  background-position: center 32%;
  background-repeat: no-repeat;
}

/* fallback when backdrop-filter is unavailable: make glass surfaces opaque */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --card: rgba(34, 27, 22, 0.95);
    --card-hi: rgba(42, 34, 28, 0.96);
    --field: rgba(34, 27, 22, 0.95);
  }
}

#app {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.site-loading {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

/* --- shared glass surface --- */
.site-glass,
.site-card,
.site-choice,
.site-links button,
.site-menu-item,
.site-people,
.site-datechip,
.site-sheet-panel {
  position: relative;
  border: 1px solid var(--hair);
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.5), 0 1px 0 0 var(--card-edge) inset;
}
/* Large surfaces that appear once or twice per screen carry the real
   backdrop blur. */
.site-glass,
.site-card,
.site-sheet-panel {
  background: linear-gradient(155deg, var(--card-hi), var(--card));
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
/* List-level surfaces (dozens on a menu screen) keep the frosted tint but
   drop the filter — same look over an opaque warm base, none of the
   per-element compositing cost. */
.site-choice,
.site-links button,
.site-menu-item,
.site-people,
.site-datechip {
  background: linear-gradient(155deg, var(--card-hi), var(--card)), var(--pane-base);
}

/* --- header (every screen) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 17px 15px 15px;
  background: rgba(20, 15, 13, 0.55);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--hair-faint);
}
.site-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 30% 25%, var(--accent-2), var(--accent));
  color: var(--on-accent);
  font: 800 13px/1 var(--disp);
  letter-spacing: -0.02em;
  box-shadow: 0 4px 14px rgba(242, 145, 58, 0.3);
}
.site-name { flex: 1; min-width: 0; font: 800 19px/1 var(--disp); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-icon-btn,
.site-back {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--card-edge);
  background: var(--card-hi);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}
.site-icon-btn svg, .site-back svg { width: 20px; height: 20px; }
.site-icon-btn, .site-back { transition: transform var(--dur-fast) var(--ease-out); }
.site-icon-btn:active, .site-back:active { transform: scale(0.92); }

/* --- main / footer --- */
.site-main {
  flex: 1;
  padding: 20px 15px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-main-center { justify-content: center; padding-bottom: 72px; }

.site-footer {
  padding: 22px 15px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-foot-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(155deg, var(--card-hi), var(--card));
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--hair);
}
.site-foot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  color: var(--text);
  text-decoration: none;
}
.site-foot-row + .site-foot-row { border-top: 1px solid var(--hair); }
.site-foot-row:not(.site-foot-call):active { background: var(--press); }

.site-foot-call { padding: 0; gap: 0; align-items: stretch; }
.site-foot-link {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  color: var(--text);
  text-decoration: none;
}
.site-foot-link:active { background: var(--press); }
.site-foot-copy {
  flex-shrink: 0;
  width: 54px;
  border: 0;
  border-left: 1px solid var(--hair);
  background: transparent;
  color: var(--accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  font: 800 15px/1 var(--ui);
}
.site-foot-copy svg { width: 17px; height: 17px; }
.site-foot-copy:active { background: var(--press); }
.site-foot-copy.done { color: var(--free); }

.site-foot-ic {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-tint);
  color: var(--accent);
}
.site-foot-ic svg { width: 18px; height: 18px; }
.site-foot-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-foot-t b { font: 700 14px/1.25 var(--ui); }
/* keep the number tappable for iOS's phone-number detection + long-press */
.site-foot-call .site-foot-t b {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
.site-foot-call .site-foot-t b::selection { background: var(--accent); color: var(--on-accent); }
.site-foot-t span { font: 500 11.5px/1 var(--ui); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

.site-foot-socials { display: flex; gap: 10px; }
.site-foot-socials a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hair);
  background: var(--card-hi);
  color: var(--text);
  text-decoration: none;
  font: 700 13px/1 var(--ui);
}
.site-foot-socials a svg { width: 17px; height: 17px; color: var(--accent); }

.site-foot-name {
  text-align: center;
  font: 600 11px/1 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-top: 2px;
}

/* --- primitives --- */
.site-h1 { font: 900 30px/1.0 var(--disp); letter-spacing: -0.04em; text-wrap: balance; margin: 2px 2px; }
.site-label { font: 700 12px/1 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.site-muted { color: var(--text-dim); font: 400 0.84rem/1.55 var(--ui); }
.site-err { color: var(--full); font: 700 13px/1.4 var(--ui); }
.site-err.is-shown { animation: site-err-in var(--dur-base) var(--ease-out); }
@keyframes site-err-in {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes site-err-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .site-err.is-shown { animation-name: site-err-fade; }
}
.site-ok { color: var(--free); font: 700 13px/1.4 var(--ui); }

.site-card { border-radius: var(--radius); padding: 20px; }

.site-btn {
  appearance: none;
  width: 100%;
  padding: 15px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--on-accent);
  font: 800 15px/1 var(--ui);
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 14px 34px -8px rgba(242, 145, 58, 0.5);
  transition: transform var(--dur-fast) var(--ease-out);
}
.site-btn:active { transform: translateY(1px); }
.site-btn:disabled { opacity: 0.5; box-shadow: none; }
.site-btn-ghost {
  background: var(--card-hi);
  color: var(--text);
  border: 1px solid var(--hair);
  box-shadow: none;
  margin-top: 10px;
}
.site-linkbtn {
  background: none; border: 0;
  padding: 7px 4px; /* real tap target around a small text control */
  color: var(--accent); font: 700 13px/1 var(--ui); cursor: pointer;
}

/* forms */
.site-form { display: flex; flex-direction: column; gap: 14px; }
.site-form label,
.site-field { display: flex; flex-direction: column; gap: 7px; font: 700 12px/1 var(--ui); letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-dim); }
.site-form input,
.site-form select,
.site-form textarea {
  font: 500 15px/1.2 var(--ui);
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 13px 15px;
  text-transform: none;
  letter-spacing: normal;
}
.site-form textarea { resize: vertical; min-height: 62px; }
.site-form input::placeholder, .site-form textarea::placeholder { color: var(--text-faint); }
.site-form input:focus, .site-form select:focus, .site-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 145, 58, 0.2);
}
.site-readonly {
  background: var(--field);
  border: 1px solid var(--hair);
  border-radius: 14px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 600 15px/1 var(--ui);
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
}
.site-readonly .site-linkbtn { font-size: 12px; }

/* --- auth --- */
.site-auth { text-align: center; }
.site-auth h1 { font: 900 26px/1 var(--disp); letter-spacing: -0.03em; margin: 0 0 6px; }
.site-auth .site-err { margin: 12px 0; }
.site-tg-signin { margin-top: 18px; display: flex; justify-content: center; min-height: 46px; }

/* --- greeting / home --- */
.site-greet { padding: 6px 2px 2px; }
.site-greet-hi {
  font: 900 40px/0.98 var(--disp);
  letter-spacing: -0.04em;
  margin: 0 0 12px;
}
.site-greet-hi span { color: var(--accent); }
.site-greet-q { font: 600 15px/1.35 var(--ui); color: var(--text-dim); margin: 0; }

.site-choices { display: flex; flex-direction: column; gap: 12px; }
.site-choice {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 17px;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.site-choice { transition: transform var(--dur-fast) var(--ease-out); }
.site-choice:active { transform: translateY(1px); }
.site-choice-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-tint);
  color: var(--accent);
}
.site-choice-icon svg { width: 23px; height: 23px; }
.site-choice-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.site-choice-title { font: 800 18px/1.1 var(--disp); letter-spacing: -0.02em; }
.site-choice-sub { font: 500 0.75rem/1.3 var(--ui); color: var(--text-dim); }
.site-choice-arrow { color: var(--text-faint); flex-shrink: 0; }

.site-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.site-links button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 15px;
  border-radius: 20px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font: 800 13.5px/1 var(--disp);
  letter-spacing: -0.01em;
}
.site-mic {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-tint);
  color: var(--accent);
}
.site-mic svg { width: 18px; height: 18px; }

/* --- menu --- */
.site-menu-cat h2 {
  font: 800 12px/1 var(--ui);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 18px 2px 10px;
}
.site-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  font: 600 0.906rem/1.3 var(--ui);
}
.site-menu-item span:last-child { color: var(--accent); font-weight: 800; white-space: nowrap; }

/* --- calendar --- */
.site-cal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 2px;
}
.site-month { font: 700 13px/1 var(--ui); letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); }
.site-cal-nav { display: flex; gap: 6px; }
.site-cal-nav button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--card-edge);
  background: var(--card-hi);
  color: var(--text);
  cursor: pointer;
}
.site-cal-nav button:disabled { opacity: 0.3; cursor: default; }
.site-cal-nav button { transition: transform var(--dur-fast) var(--ease-out); }
.site-cal-nav button:not(:disabled):active { transform: scale(0.9); }
.site-cal-nav svg { width: 14px; height: 14px; }
.site-cal-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: 0 4px 6px;
}
.site-cal-head span {
  text-align: center;
  font: 700 10px/1 var(--ui);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.site-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  padding: 4px;
}
.site-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: 600 13px/1 var(--ui);
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
}
.site-dot { width: 5px; height: 5px; border-radius: 50%; }
.site-dot.free { background: var(--free); }
.site-dot.part { background: var(--part); }
.site-dot.full { background: var(--full); }
.site-day.pad { visibility: hidden; }
.site-day:disabled { cursor: default; }
.site-day { transition: transform var(--dur-fast) var(--ease-out); }
.site-day:not(:disabled):active { transform: scale(0.93); }
.site-day.past { color: var(--text-faint); opacity: 0.4; }
.site-day.full { color: var(--text-faint); background: rgba(232, 124, 108, 0.1); }
.site-day.past .site-dot,
.site-day.sel .site-dot { display: none; }
.site-day.sel {
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 900;
  text-shadow: 0 5px 14px var(--accent-glow), 0 2px 5px rgba(242, 145, 58, 0.5);
}

.site-legend {
  display: flex;
  gap: 14px;
  padding: 12px 6px 2px;
  font: 600 11px/1 var(--ui);
  color: var(--text-dim);
}
.site-legend i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.site-legend i.free { background: var(--free); }
.site-legend i.part { background: var(--part); }
.site-legend i.full { background: var(--full); }

/* selection tick (shared: calendar day + dish card) */
.site-tick {
  position: absolute;
  top: -3px;
  right: -1px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 900 9px/15px var(--ui);
  text-align: center;
  box-shadow: 0 3px 9px rgba(242, 145, 58, 0.6);
  animation: site-tick-in 150ms var(--ease-back) both;
}
@keyframes site-tick-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes site-tick-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .site-tick { animation: site-tick-fade 120ms ease both; }
}

/* --- reservation form --- */
.site-datechip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  font: 700 15px/1 var(--ui);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  cursor: pointer;
}
.site-datechip svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }
.site-chg {
  margin-left: auto;
  font: 700 11px/1 var(--ui);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* soft scarcity caption, tucked under the date chip */
.site-scarce {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: -9px 4px 0;
  font: 700 0.8rem/1.35 var(--ui);
  color: var(--part);
}
.site-scarce svg { width: 15px; height: 15px; margin-top: 1px; flex-shrink: 0; color: var(--part); }
.site-scarce span { min-width: 0; }

.site-people {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
}
.site-grp { width: 118px; height: 96px; flex-shrink: 0; }
.site-n b {
  font: 900 54px/0.82 var(--disp);
  letter-spacing: -0.05em;
  display: block;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.site-n span { font: 700 13px/1 var(--ui); color: var(--text-dim); }

.site-slider-wrap { padding: 4px 4px 2px; }
.site-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  background: transparent;
  cursor: pointer;
}
.site-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0 var(--fill, 30%), rgba(255, 255, 255, 0.12) var(--fill, 30%) 100%);
}
.site-slider::-moz-range-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
.site-slider::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--accent); }
.site-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.site-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 5px solid var(--accent);
}
.site-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.site-dishes {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  margin: 0 -15px;
  padding: 8px 15px 14px;
}
.site-dishes::-webkit-scrollbar { display: none; }
.site-dish {
  position: relative;
  appearance: none;
  flex: 0 0 84px;
  scroll-snap-align: start;
  border: 1px solid var(--hair);
  border-radius: 18px;
  background: linear-gradient(155deg, var(--card-hi), var(--card)), var(--pane-base);
  aspect-ratio: 1;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  transition: transform var(--dur-fast) var(--ease-out);
}
.site-em { font-size: 26px; line-height: 1; }
.site-nm { font: 700 10.5px/1.15 var(--ui); text-align: center; color: var(--text-dim); }
.site-dish.sel {
  border-color: rgba(242, 145, 58, 0.4);
  background: transparent;
  transform: translateY(-3px);
}
.site-dish.sel .site-em { text-shadow: 0 8px 18px var(--accent-glow); }
.site-dish.sel .site-nm { color: var(--accent); text-shadow: 0 7px 16px var(--accent-glow); }

/* --- confirm sheet --- */
.site-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  background: rgba(4, 3, 2, 0);                 /* fades in via .is-open */
  backdrop-filter: blur(3px);                   /* static — cheap at 3px */
  -webkit-backdrop-filter: blur(3px);
  transition: background var(--dur-base) var(--ease-out);
}
.site-sheet[hidden] { display: none; }
.site-sheet.is-open { background: rgba(4, 3, 2, 0.6); }
.site-sheet-panel {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  border-radius: 28px 28px 0 0;
  padding: 22px 18px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform var(--dur-sheet) var(--ease-drawer);
}
.site-sheet.is-open .site-sheet-panel { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .site-sheet-panel,
  .site-sheet.is-open .site-sheet-panel { transition: none; transform: none; }
  /* the backdrop still fades — it aids comprehension and involves no travel */
}
.site-sheet-h { font: 900 22px/1 var(--disp); letter-spacing: -0.03em; margin: 0 0 16px; }
.site-sheet-rows { display: flex; flex-direction: column; gap: 11px; margin-bottom: 18px; }
.site-sheet-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; }
.site-sheet-rows span { color: var(--text-dim); font-weight: 600; }
.site-sheet-rows b { font-weight: 800; text-align: right; }
.site-sheet-field { margin-bottom: 14px; }
.site-sheet-field .site-label { display: block; margin-bottom: 8px; }
.site-sheet-field input {
  width: 100%;
  padding: 13px 15px;
  margin-bottom: 9px;
  border-radius: 14px;
  border: 1px solid var(--card-edge);
  background: var(--card-hi);
  color: var(--text);
  font: 700 16px/1 var(--ui);
}
.site-sheet-field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-sheet-field input[hidden] { display: none; }
.site-sheet-field textarea {
  width: 100%;
  padding: 13px 15px;
  margin-bottom: 9px;
  border-radius: 14px;
  border: 1px solid var(--card-edge);
  background: var(--card-hi);
  color: var(--text);
  font: 600 15px/1.45 var(--ui);
  resize: none;
}
.site-sheet-field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-sheet-field textarea::placeholder { color: var(--text-faint); }
.site-add-phone { background: none; border: 0; padding: 9px 2px; color: var(--accent); font: 700 13px/1 var(--ui); cursor: pointer; }
.site-sheet-cancel {
  width: 100%;
  background: none;
  border: 0;
  color: var(--text-dim);
  font: 700 13px/1 var(--ui);
  padding: 13px;
  margin-top: 4px;
  cursor: pointer;
}
.site-sheet .site-err { margin-bottom: 10px; }

/* --- success --- */
@keyframes site-pop-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes site-rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes site-fade-in { from { opacity: 0; } to { opacity: 1; } }

.site-success { text-align: center; }
.site-success-mark {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: var(--on-accent);
  font-size: 28px;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  box-shadow: 0 14px 40px rgba(242, 145, 58, 0.45);
  animation: site-pop-in 360ms var(--ease-back) both;
}
.site-success-mark svg { width: 26px; height: 26px; }
.site-success h1, .site-success h2 {
  font: 900 20px/1.1 var(--disp);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  animation: site-rise-in 260ms var(--ease-out) 120ms both;
}
.site-success .site-muted { animation: site-rise-in 260ms var(--ease-out) 180ms both; }
.site-success .site-btn { margin-top: 16px; animation: site-rise-in 260ms var(--ease-out) 260ms both; }

@media (prefers-reduced-motion: reduce) {
  .site-success-mark,
  .site-success h1,
  .site-success h2,
  .site-success .site-muted,
  .site-success .site-btn {
    animation: site-fade-in 220ms ease both;   /* opacity only — no scale, no travel, no stagger */
  }
}

/* --- "soon" (delivery) --- */
.site-soon { text-align: center; }
.site-soon-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-tint);
  border: 1px solid rgba(242, 145, 58, 0.35);
  color: var(--accent);
  font: 800 11px/1 var(--ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-soon h1, .site-soon h2 { font: 900 25px/1.06 var(--disp); letter-spacing: -0.03em; margin: 0 0 10px; }

/* --- requests --- */
.site-req { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; }
.site-req-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 800 14.5px/1.2 var(--disp); }
.site-tag {
  font: 800 10.5px/1 var(--ui);
  padding: 5px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-tag-pending { background: rgba(232, 198, 92, 0.16); color: var(--part); border: 1px solid rgba(232, 198, 92, 0.32); }
.site-tag-accepted { background: var(--accent-tint); color: var(--accent); border: 1px solid rgba(242, 145, 58, 0.32); }
.site-tag-declined { background: rgba(232, 124, 108, 0.16); color: var(--full); border: 1px solid rgba(232, 124, 108, 0.32); }

/* --- delivery · today's list --- */
.dlv-hero {
  position: relative;
  min-height: 222px;
  padding: 18px 15px 18px;
  /* no overflow clip / backdrop-filter here so the illustration can bleed
     past the edge — the frosted panel is the ::before */
}
.dlv-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  border: 1px solid var(--hair);
  background: linear-gradient(150deg, var(--card-hi), var(--card));
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 18px 50px -14px rgba(0, 0, 0, 0.45);
}
.dlv-tag {
  position: relative;
  z-index: 1;
  margin: 0;
  white-space: nowrap; /* two forced lines (<br>); the tail runs under the illustration */
  font: 900 clamp(30px, 9.4vw, 42px)/1.02 var(--disp);
  letter-spacing: -0.045em;
  text-shadow: 0 2px 14px rgba(6, 4, 3, 0.55); /* keeps the tail legible where it passes behind the car */
}
.dlv-tag span { color: var(--accent); }
.dlv-hero-fig {
  position: absolute;
  z-index: 1;
  right: -14px;
  bottom: -6px;
  width: 60%;
  max-width: 228px;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.38));
}

.dlv-carousel {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scroll-snap-type: x proximity;   /* forgiving — small flicks settle, no fight with a smooth programmatic scroll */
  scrollbar-width: none;
  margin: 0 -15px;
  padding: 4px 0 6px;
  -webkit-overflow-scrolling: touch;
}
.dlv-carousel::-webkit-scrollbar { display: none; }
/* leading / trailing spacers so the first and last card can sit centred —
   half the empty space beside an 82%-wide card */
.dlv-carousel::before,
.dlv-carousel::after {
  content: "";
  flex: 0 0 calc((100% - 82%) / 2);
}
.dlv-card {
  position: relative;
  flex: 0 0 82%;
  scroll-snap-align: center;
  aspect-ratio: 1 / 1.12;
  border-radius: 22px;
  border: 1px solid var(--hair);
  overflow: hidden;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;   /* all text anchored to the bottom-left corner */
  padding: 14px;
  color: #fff;
}
.dlv-card { transition: transform var(--dur-fast) var(--ease-out); }
.dlv-card:active { transform: scale(0.985); }
/* readability scrim over the photo — bottom-weighted so the corner label reads */
.dlv-card:not(.is-ph)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 6%,
    rgb(var(--scrim-rgb) / 0.5) 42%,
    rgb(var(--scrim-rgb) / 0.92)
  );
  pointer-events: none;
}
.dlv-card.is-ph {
  background: linear-gradient(155deg, var(--card-hi), var(--card)), var(--pane-base);
  flex-direction: column;
  align-items: flex-start;
  color: var(--text);
}
.dlv-card-emoji { font-size: 48px; line-height: 1; }
/* placeholder cards: the dish glyph floats in the free space above the label */
.dlv-card.is-ph .dlv-card-emoji { align-self: center; margin: auto 0; font-size: 58px; opacity: 0.92; }

.dlv-card-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  min-width: 0;
  text-align: left;
}
.dlv-card-name {
  font: 800 16px/1.16 var(--disp);
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dlv-card.is-ph .dlv-card-name { font-size: 15px; }
.dlv-card-price { display: flex; align-items: baseline; gap: 6px; }
.dlv-card-price .dlv-now { font: 800 14.5px/1 var(--ui); }
.dlv-card-price .dlv-was { font: 600 11.5px/1 var(--ui); color: var(--on-media-dim); }
.dlv-card.is-ph .dlv-card-price .dlv-was { color: var(--text-faint); }
.dlv-card-note {
  margin-top: 2px;
  font: 500 11.5px/1.35 var(--ui);
  color: var(--on-media);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dlv-card.is-ph .dlv-card-note { color: var(--text-dim); }

.dlv-card-tag {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 800 10px/1 var(--ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dlv-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 6px 0 2px;
}
.dlv-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--card-edge);
  background: var(--card-hi);
  color: var(--text);
  cursor: pointer;
}
.dlv-arrow svg { width: 14px; height: 14px; }
.dlv-arrow { transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out); }
.dlv-arrow:active { background: var(--press); transform: scale(0.9); }

.dlv-dots { display: flex; gap: 6px; justify-content: center; padding: 0; }
.dlv-dots span {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--text-faint);
  transition: width var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}
.dlv-dots span.on { width: 18px; background: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .dlv-dots span { transition: background var(--dur-base) ease; }  /* size still changes, just instantly */
}

/* detail screen (renderDeliveryItem) */
.dlv-name { margin: 0; font: 900 24px/1.05 var(--disp); letter-spacing: -0.03em; }
.dlv-price { display: flex; align-items: baseline; gap: 8px; margin-top: 5px; }
.dlv-was { font: 600 14px/1 var(--ui); color: var(--text-faint); text-decoration: line-through; }
.dlv-now { font: 800 18px/1 var(--ui); color: var(--accent); }
.dlv-note { margin: 10px 0 0; font: 500 0.84rem/1.5 var(--ui); color: var(--text-dim); }

/* quantity stepper on the delivery detail screen */
.dlv-qty { display: flex; align-items: center; gap: 14px; }
.dlv-qty-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--card-edge);
  background: var(--card-hi);
  color: var(--text);
  font: 700 20px/1 var(--ui);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.dlv-qty-btn:active { background: var(--press); transform: scale(0.9); }
.dlv-qty-btn:disabled { opacity: 0.38; cursor: default; }
.dlv-qty b { min-width: 1.6ch; text-align: center; font: 900 22px/1 var(--disp); }
.dlv-qty-unit { font: 600 0.85rem/1 var(--ui); color: var(--text-dim); }
.dlv-per { font: 600 13px/1 var(--ui); color: var(--text-dim); align-self: center; }

.dlv-kg-hint { margin: 9px 2px 0; font: 500 0.8rem/1.45 var(--ui); color: var(--text-faint); }

/* --- delivery order form --- */
.dlv-ohead { display: flex; align-items: center; gap: 13px; }
.dlv-othumb {
  width: 60px; height: 60px; flex-shrink: 0;
  border-radius: 15px;
  border: 1px solid var(--hair);
  background-size: cover; background-position: center;
  display: grid; place-items: center; font-size: 30px;
}
.dlv-othumb.is-ph { background: linear-gradient(155deg, var(--card-hi), var(--card)), var(--pane-base); }
.dlv-oname { margin: 0; font: 900 19px/1.1 var(--disp); letter-spacing: -0.02em; }
.dlv-oprice { margin-top: 3px; font: 800 14px/1 var(--ui); color: var(--accent); }
.dlv-flabel { margin: 24px 2px 10px; }

.dlv-sizes { display: flex; gap: 8px; }
.dlv-size {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 6px;
  border-radius: 14px;
  border: 1px solid var(--card-edge);
  background: var(--card-hi);
  color: var(--text);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.dlv-size:active { transform: scale(0.97); }
.dlv-size.sel { border-color: var(--accent); }
.dlv-size b { font: 800 13.5px/1 var(--ui); }
.dlv-size span { font: 600 11.5px/1 var(--ui); color: var(--text-dim); }
.dlv-size.sel b { color: var(--accent); }

.dlv-times { display: flex; flex-wrap: wrap; gap: 8px; }
.dlv-time-chip {
  padding: 10px 13px;
  border-radius: 999px;
  border: 1px solid var(--card-edge);
  background: var(--card-hi);
  color: var(--text);
  font: 700 12.5px/1 var(--ui);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.dlv-time-chip:active { transform: scale(0.96); }
.dlv-time-chip.sel { border-color: var(--accent); color: var(--accent); }

.dlv-oinput {
  width: 100%;
  margin-top: 10px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--card-edge);
  background: var(--card-hi);
  color: var(--text);
  font: 600 15px/1.3 var(--ui);
}
.dlv-oinput:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dlv-oinput[hidden] { display: none; }
.dlv-oinput::placeholder { color: var(--text-faint); }

.dlv-omap-wrap {
  position: relative;
  height: 260px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--hair);
}
#dlv-omap { position: absolute; inset: 0; background: var(--pane-base); }
.dlv-map-pin {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -100%);
  color: var(--accent);
  pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
  z-index: 500;
}
.dlv-map-pin svg { width: 34px; height: 34px; }
.dlv-map-locate {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--card-edge);
  background: var(--pane-base);
  color: var(--text);
  cursor: pointer;
  z-index: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.dlv-map-locate svg { width: 18px; height: 18px; }

.dlv-detail-img {
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  border: 1px solid var(--hair);
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
}
.dlv-detail-img.is-ph { background: linear-gradient(155deg, var(--card-hi), var(--card)), var(--pane-base); }
.dlv-detail-img .dlv-card-emoji { font-size: 66px; }

@media (prefers-reduced-motion: reduce) {
  /* Keep fades and colour changes (they aid comprehension); drop travel and
     bounce. Every animated component below ships its own reduced-motion
     override in this spirit — opacity stays, transform distance goes. */

  /* the dish-select lift becomes a static state change */
  .site-dish { transition: none; }
  .site-dish.sel { transform: none; }

  /* press feedback (≤1px / 0.985 scale) is imperceptible and is the only
     signal a tap registered — it stays */
}
