/* ==========================================================================
   OK Chicken — Digital Business Card (DOT card architecture, OK Chicken skin)
   Sections: base · ambient · header · panel · buttons · pills · socials ·
             utilities · footer · dialogs · menu · QR · toast · motion · responsive
   ========================================================================== */

/* Poppins (SIL OFL 1.1), self-hosted latin subset — see assets/fonts/OFL.txt */
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/poppins-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/poppins-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/poppins-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #08080a;
  --ink: #fffaf5;
  --ink-2: #f1e4de;
  --muted: #b7a39e;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  --red: #e02029;
  --red-hi: #ff4141;
  --red-deep: #991112;
  --gold: #ffc329;
  --gold-hi: #ffe474;
  --gold-deep: #e9a000;
  --sheet-top: #27131a;

  --radius-xl: 30px;
  --radius-pill: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);

  --font: "Poppins", Tahoma, Arial, sans-serif;
  --gutter: 18px;
  --avatar: 156px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.has-modal { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, #351015 0%, transparent 60%),
    linear-gradient(180deg, #16090b 0%, var(--bg) 44%, #060608 100%);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-x: clip;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }

.ico {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* ---------- Ambient light (composited transforms only) ---------- */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; contain: strict; }
.glow { position: absolute; border-radius: 50%; will-change: transform; }
.glow--blue {
  width: 520px; height: 520px; top: -160px; right: -220px;
  background: radial-gradient(closest-side, rgba(224, 32, 41, 0.3), rgba(224, 32, 41, 0));
  animation: drift-a 18s ease-in-out infinite alternate;
}
.glow--gold {
  width: 460px; height: 460px; bottom: -200px; left: -220px;
  background: radial-gradient(closest-side, rgba(255, 195, 41, 0.16), rgba(255, 195, 41, 0));
  animation: drift-b 22s ease-in-out infinite alternate;
}
.tech-grid {
  position: absolute; inset: -2px;
  background-image: radial-gradient(rgba(255, 203, 94, 0.16) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 22%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 22%, #000 0%, transparent 75%);
  opacity: 0.55;
}
.tech-grid::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 160px;
  background: linear-gradient(180deg, transparent, rgba(240, 216, 154, 0.08) 50%, transparent);
  animation: scan 9s ease-in-out infinite;
}
@keyframes scan { 0% { transform: translateY(-180px); } 60%, 100% { transform: translateY(110vh); } }
@keyframes drift-a { to { transform: translate3d(-60px, 50px, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(70px, -40px, 0) scale(1.1); } }
/* Decorative motion is hidden behind an open sheet: pause it to save GPU work */
.has-modal .glow, .has-modal .tech-grid::after, .has-modal .avatar__orbit, .has-modal .deco { animation-play-state: paused; }

/* ---------- Card shell ---------- */
.card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) max(22px, env(safe-area-inset-bottom));
}

/* ---------- A. Brand header ---------- */
.brand {
  position: relative;
  display: flex; align-items: flex-start; justify-content: center;
  min-height: calc(var(--avatar) + 38px);
  padding-top: 8px;
}
.brand__deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.deco { position: absolute; opacity: 0.5; }
.deco--spark-gold { width: 14px; height: 14px; left: 18%; top: 34px; fill: var(--gold); animation: twinkle 4.5s ease-in-out infinite; }
.deco--spark-blue { width: 10px; height: 10px; left: 80%; top: 112px; fill: var(--red); animation: twinkle 5.5s ease-in-out 1.2s infinite; }
.deco--rings { width: 22px; height: 22px; left: 12%; top: 104px; stroke: var(--red); opacity: 0.55; }
.deco--zig { width: 24px; height: 12px; left: 78%; top: 54px; stroke: var(--gold); opacity: 0.5; }
.deco--diamond { width: 8px; height: 8px; left: 86%; top: 24px; background: var(--gold); transform: rotate(45deg); }
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(0.72); opacity: 0.45; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- B. Logo medallion — the original transparent logo, never on a white or ivory backing ---------- */
.avatar {
  position: relative; z-index: 3;
  width: var(--avatar); height: var(--avatar);
  margin-top: 26px;
  flex: none;
}
.avatar__face { position: absolute; inset: 9px; display: grid; place-items: center; background: transparent; }
.avatar__face picture { display: contents; }
.avatar__face img { width: 100%; height: 100%; object-fit: contain; background: transparent; }
.avatar__orbit { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 36s linear infinite; overflow: visible; }
.orbit { fill: none; stroke-width: 1.1; stroke-linecap: round; }
.orbit--gold { stroke: var(--gold); stroke-dasharray: 118 184; opacity: 0.9; }
.orbit--blue { stroke: var(--red); stroke-dasharray: 64 238; stroke-dashoffset: -160; opacity: 0.9; }
.orbit__dot { fill: var(--gold-hi); }

/* ---------- Panel and profile ---------- */
.panel {
  position: relative;
  margin-top: calc(var(--avatar) * -0.5 - 10px);
  padding: calc(var(--avatar) * 0.5 + 16px) 16px 18px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(38, 18, 23, 0.79) 0%, rgba(21, 12, 16, 0.9) 46%, rgba(10, 8, 12, 0.94) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.panel::before {
  content: ""; position: absolute; left: 22%; right: 22%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 216, 154, 0.7), transparent);
}

.profile { text-align: center; }
.profile__est {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold);
}
.profile__est .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--red); }
.profile__name {
  font-family: "Poppins", sans-serif;
  font-size: clamp(24px, 7vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15;
  background: linear-gradient(180deg, #ffffff 30%, #cfd6e2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.profile__role { margin-top: 6px; font-size: 15px; font-weight: 500; color: var(--ink-2); letter-spacing: 0.01em; }
.profile__sub {
  margin-top: 4px; font-size: 12px; font-weight: 500; line-height: 1.8;
  background: linear-gradient(90deg, var(--gold-hi), var(--gold) 45%, var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 14px;
  border-radius: 16px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.01em; white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease);
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn .ico { width: 18px; height: 18px; }
.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-2);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.btn--blue {
  color: #fff;
  background: linear-gradient(135deg, var(--red-hi) 0%, var(--red) 45%, var(--red-deep) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px -12px rgba(224, 32, 41, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn--blue::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  background-size: 250% 100%; background-position: 120% 0;
  transition: background-position 0.8s var(--ease);
}
@media (hover: hover) {
  .btn--ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(240, 216, 154, 0.45); }
  .btn--blue:hover { box-shadow: 0 16px 34px -12px rgba(224, 32, 41, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.3); transform: translateY(-1px); }
  .btn--blue:hover::after { background-position: -20% 0; }
}

.primary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 10px; margin-top: 18px; }
.primary .btn { padding: 0 10px; font-size: 13.5px; }

.rule {
  height: 1px; margin: 18px -16px 16px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}

/* ---------- D. Action pills (order: food menu, maps, landline, mobile, WhatsApp) ---------- */
.actions { position: relative; display: grid; gap: 2px; }
.actions::before {
  content: ""; position: absolute; inset: -10% -6% -4%; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 45% at 50% 32%, rgba(150, 162, 184, 0.16), transparent 70%);
}
.pill {
  --x: 50%; --y: 50%;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center;
  width: 100%; min-height: 62px; padding: 8px 10px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #1d1215 0%, #0f0a0d 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 22px -16px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  transition: transform 0.3s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
}
.pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(160px circle at var(--x) var(--y), rgba(224, 32, 41, 0.18), transparent 70%);
  transition: opacity 0.35s var(--ease);
}
.pill__icon {
  grid-column: 1; grid-row: 1 / span 2;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 195, 41, 0.28);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.45s var(--ease-spring);
}
.pill__icon .ico { width: 19px; height: 19px; }
.pill__label { grid-column: 2; grid-row: 1; font-size: 15.5px; font-weight: 500; letter-spacing: 0.01em; line-height: 1.25; color: var(--ink); }
.pill__meta {
  grid-column: 2; grid-row: 2; margin-top: 1px;
  font-size: 11.5px; color: var(--muted); letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pill__meta--phone { display: block; justify-self: center; unicode-bidi: isolate; }
.pill:active { transform: scale(0.982); }
.pill:active .pill__icon { transform: scale(0.9); }
.pill:focus-visible::before, .pill.is-pressed::before { opacity: 1; }
.pill.is-pressed .pill__icon { background: var(--red); color: #fff; }
@media (hover: hover) {
  .pill:hover { border-color: rgba(240, 216, 154, 0.38); transform: translateY(-1px); box-shadow: 0 16px 30px -18px rgba(224, 32, 41, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
  .pill:hover::before { opacity: 1; }
  .pill:hover .pill__icon { background: var(--red); border-color: rgba(255, 255, 255, 0.25); color: #fff; transform: rotate(-8deg) scale(1.06); }
}

/* ---------- E. Socials ---------- */
.socials { margin-top: 22px; }
.socials__list { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.social {
  width: 48px; height: 48px; border-radius: 15px;
  display: grid; place-items: center;
  color: #7f889a;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.35s var(--ease-spring);
}
.social .ico { width: 21px; height: 21px; }
.social:active { transform: scale(0.92); }
@media (hover: hover) {
  .social:hover { color: #fff; background: rgba(224, 32, 41, 0.16); border-color: rgba(224, 32, 41, 0.5); transform: translateY(-2px); }
}

/* ---------- F. Utilities ---------- */
.utils { margin-top: 18px; }
.utils__row { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 38px; padding: 0 14px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.2s var(--ease);
}
.chip .ico { width: 16px; height: 16px; color: var(--gold); }
.chip:active { transform: scale(0.96); }
@media (hover: hover) { .chip:hover { color: #fff; border-color: rgba(240, 216, 154, 0.4); background: rgba(255, 255, 255, 0.06); } }

.details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}
.details summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 46px; padding: 0 16px;
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  cursor: pointer; list-style: none; border-radius: 18px;
}
.details summary::-webkit-details-marker { display: none; }
.ico--chev { width: 18px; height: 18px; color: var(--muted); transition: transform 0.35s var(--ease); }
.details[open] .ico--chev { transform: rotate(180deg); }
.details__body { padding: 0 8px 12px; }
.details[open] .details__body { animation: fade-down 0.35s var(--ease) both; }
@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.info { display: grid; gap: 2px; }
.info__row {
  display: grid; grid-template-columns: 34px 1fr 40px; align-items: center; gap: 4px;
  padding: 6px 4px 6px 8px; border-radius: 12px;
}
.info__row > .ico { width: 17px; height: 17px; color: var(--gold); }
.info__text { min-width: 0; }
.info__label { display: block; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.info__value { display: block; font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; transition: color 0.2s; }
@media (hover: hover) { .info__value:hover { color: var(--red-hi); } }
.copy-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--muted);
  transition: color 0.2s, background-color 0.2s, transform 0.2s;
}
.copy-btn .ico { width: 17px; height: 17px; }
.copy-btn:active { transform: scale(0.9); }
@media (hover: hover) { .copy-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.06); } }
.copy-btn.is-done { color: var(--gold-hi); }
.copy-btn.is-done .ico { animation: pop 0.4s var(--ease-spring); }
@keyframes pop { from { transform: scale(0.5); } to { transform: scale(1); } }
.about { margin: 10px 8px 2px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }

/* ---------- Footer ---------- */
.foot { margin-top: 24px; display: grid; justify-items: center; gap: 6px; color: var(--muted); direction: ltr; }
.foot small { font-size: 11px; letter-spacing: 0.04em; }

/* ---------- Dialogs (bottom sheets on phones, centred modals from 600px) ---------- */
/* Closed sheets must never render, even where the browser has no native <dialog> styles */
dialog:not([open]) { display: none !important; }
.sheet {
  width: 100%; max-width: 440px; max-height: 88vh; max-height: 88dvh;
  margin: auto auto 0; padding: 0;
  border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, var(--sheet-top) 0%, #0d0b10 100%);
  color: var(--ink);
  box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, 0.8);
  overflow: auto; overscroll-behavior: contain;
}
.sheet[open] { animation: sheet-in 0.45s var(--ease) both; }
.sheet.is-closing { animation: sheet-out 0.25s ease-in both; }
.sheet::backdrop { background: rgba(2, 4, 10, 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open]::backdrop { animation: fade-in 0.3s ease both; }
.sheet.is-closing::backdrop { animation: fade-out 0.25s ease both; }
/* Fallback modal for browsers without <dialog> (explicit offsets: old Safari lacks `inset`) */
.sheet.is-fallback { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; }
.sheet-backdrop {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 59;
  background: rgba(2, 4, 10, 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fade-in 0.3s ease both;
}
.sheet-backdrop.is-closing { animation: fade-out 0.25s ease both; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sheet-out { to { transform: translateY(40px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.sheet__inner { padding: 10px 18px max(20px, env(safe-area-inset-bottom)); }
.sheet__grip { width: 38px; height: 4px; border-radius: 4px; margin: 0 auto 12px; background: rgba(255, 255, 255, 0.18); }
.sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet__eyebrow { font-size: 12px; font-weight: 500; color: var(--gold); }
.sheet h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  transition: background-color 0.2s, transform 0.2s;
}
.icon-btn:active { transform: scale(0.92); }
@media (hover: hover) { .icon-btn:hover { background: rgba(255, 255, 255, 0.12); } }

/* ---------- Interactive menu sheet ---------- */
/* Fixed height so switching categories never resizes the sheet; only the list scrolls */
.sheet--menu { height: 88vh; height: 88dvh; overflow: hidden; }
.sheet--menu[open] { display: flex; flex-direction: column; }
.menu { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 0; }
.menu .sheet__head { margin-bottom: 12px; }
.menu__bar { flex: none; margin: 0 -18px; padding: 0 18px 10px; border-bottom: 1px solid var(--line); }

.menu__search { position: relative; }
.menu__search > .ico { position: absolute; top: 50%; inset-inline-start: 14px; width: 18px; height: 18px; margin-top: -9px; color: var(--muted); pointer-events: none; }
.menu__search input {
  width: 100%; min-height: 46px; padding: 0 44px;
  font: inherit; font-size: 16px; /* ≥16px stops iOS zooming on focus */
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line-2); border-radius: 14px;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s;
}
.menu__search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.menu__search input::placeholder { color: var(--muted); }
.menu__search input:focus { border-color: var(--gold); outline: none; }
.menu__search input:focus-visible { box-shadow: 0 0 0 2px rgba(255, 228, 116, 0.35); }
.menu__clear { position: absolute; top: 3px; inset-inline-end: 3px; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); }
.menu__clear .ico { width: 16px; height: 16px; }
@media (hover: hover) { .menu__clear:hover { color: #fff; background: rgba(255, 255, 255, 0.06); } }

.menu__tabs {
  display: flex; gap: 6px; margin: 10px -18px 0; padding: 3px 18px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.menu__tabs::-webkit-scrollbar { display: none; }
.menu__tab {
  flex: none; min-height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}
.menu__tab:focus-visible { outline-offset: -2px; }
.menu__tab[aria-selected="true"] { color: var(--gold-hi); background: rgba(255, 195, 41, 0.12); border-color: var(--gold); }
.menu__tabs.is-searching .menu__tab[aria-selected="true"] { color: var(--ink-2); background: rgba(255, 255, 255, 0.04); border-color: var(--line); }
@media (hover: hover) { .menu__tab:hover { border-color: rgba(255, 195, 41, 0.5); } }

.menu__body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  margin: 0 -18px; padding: 2px 18px max(18px, env(safe-area-inset-bottom));
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.menu__body:focus { outline: none; }
.menu__group { animation: fade-in 0.22s ease both; }
.menu__body.is-search .menu__group { animation: none; } /* no flicker while typing */
.menu__heading {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 14px 2px 10px; font-size: 16px; font-weight: 700; color: var(--gold-hi);
}
.menu__count { flex: none; font-size: 11px; font-weight: 500; color: var(--muted); }
.menu__note {
  margin: -2px 0 10px; padding: 8px 12px;
  font-size: 12px; line-height: 1.7; color: var(--ink-2);
  border: 1px dashed rgba(255, 195, 41, 0.3); border-radius: 12px; background: rgba(255, 195, 41, 0.05);
}
.menu__empty { display: grid; justify-items: center; gap: 12px; padding: 36px 8px; text-align: center; color: var(--muted); font-size: 13px; }

/* Food cards: photo on the start side, text beside it; text-only cards span the row */
.dishes { display: grid; gap: 10px; }
.dish {
  display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 10px;
  border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}
.dish--text { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
.dish__photo {
  position: relative; display: block; width: 100%; aspect-ratio: 8 / 5;
  border-radius: 12px; overflow: hidden;
  background: #2b1a1f;
}
.dish__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease); }
.dish__photo:focus-visible { outline-offset: 2px; }
@media (hover: hover) { .dish__photo:hover img { transform: scale(1.04); } }
.dish__body { min-width: 0; }
.dish__name { font-size: 14px; font-weight: 600; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.dish__desc { margin-top: 2px; font-size: 12px; line-height: 1.75; color: var(--muted); overflow-wrap: anywhere; }
.dish__tag {
  display: inline-block; margin-top: 6px; padding: 1px 9px;
  font-size: 11px; line-height: 1.7; color: #ffc2b8;
  border: 1px solid rgba(224, 32, 41, 0.4); border-radius: 999px; background: rgba(224, 32, 41, 0.14);
}
.dish__price { margin-top: 6px; }
.dish__amount { color: var(--gold-hi); font-size: 15px; font-weight: 700; white-space: nowrap; }
.dish__amount small { font-size: 11px; font-weight: 500; opacity: 0.85; }
.dish__variants { display: grid; margin-top: 4px; }
.dish__variants li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 4px 0; font-size: 12.5px; color: var(--ink-2);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}
.dish__variants li:last-child { border-bottom: 0; }
.dish__variants .dish__amount { font-size: 13.5px; }
/* Text-only cards: options as compact price chips that wrap cleanly at any width */
.dish--text .dish__variants { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dish--text .dish__variants li {
  gap: 8px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.dish--text .dish__variants li:last-child { border-bottom: 1px solid var(--line); }

/* Photo viewer inside the menu sheet */
.viewer {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  padding: 64px 16px 28px;
  background: rgba(10, 7, 9, 0.94);
  animation: fade-in 0.2s ease both;
}
.viewer__close { position: absolute; top: 14px; inset-inline-end: 14px; }
/* Source photos are at most 450 px wide; cap the enlargement so they stay sharp */
.viewer__figure { width: min(100%, 560px); display: grid; gap: 12px; }
.viewer__figure img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border-radius: 16px; background: #2b1a1f; }
.viewer__figure figcaption { text-align: center; font-size: 14px; line-height: 1.7; color: var(--ink-2); }

/* ---------- QR ---------- */
.qr { display: grid; justify-items: center; gap: 12px; margin: 4px 0 18px; }
.qr__frame {
  width: min(250px, 72vw); aspect-ratio: 1;
  padding: 14px; border-radius: 22px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 195, 41, 0.6), 0 24px 50px -20px rgba(224, 32, 41, 0.55);
}
.sheet[open] .qr__frame { animation: qr-in 0.6s var(--ease-spring) 0.1s both; }
@keyframes qr-in { from { transform: scale(0.88) rotate(-2deg); opacity: 0; } to { transform: none; opacity: 1; } }
.qr__frame svg { width: 100%; height: 100%; }
.qr__url { font-size: 12px; color: var(--muted); text-align: center; overflow-wrap: anywhere; max-width: 100%; direction: ltr; }
.qr__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 11px 16px 11px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  background: rgba(32, 18, 22, 0.94);
  border: 1px solid rgba(240, 216, 154, 0.35);
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.8);
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform 0.4s var(--ease-spring), opacity 0.3s var(--ease);
}
.toast .ico { width: 16px; height: 16px; color: var(--gold-hi); }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Entrance choreography ---------- */
.reveal { animation: rise 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms + 120ms); }
.reveal--pop { animation-name: pop-in; animation-duration: 0.9s; animation-timing-function: var(--ease-spring); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.82); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 359px) {
  :root { --gutter: 12px; --avatar: 138px; }
  .panel { padding-left: 12px; padding-right: 12px; }
  .primary { grid-template-columns: 1fr; }
  .rule { margin-left: -12px; margin-right: -12px; }
  .pill { grid-template-columns: 38px 1fr 20px; }
  .pill__label { font-size: 14.5px; }
  .deco--zig, .deco--rings { display: none; }
  .sheet__inner { padding-left: 14px; padding-right: 14px; }
  .menu__bar, .menu__body { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .menu__tabs { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .dish { gap: 10px; padding: 8px; }
}
@media (min-width: 360px) and (max-width: 389px) {
  .primary .btn .ico { display: none; }
}
@media (min-width: 400px) {
  :root { --avatar: 164px; }
}
@media (min-width: 600px) {
  body { display: grid; place-items: center; padding: 40px 0; }
  .card {
    padding: 22px 24px 26px;
    border-radius: 40px;
    background: linear-gradient(180deg, rgba(12, 18, 32, 0.55), rgba(4, 6, 11, 0.7));
    border: 1px solid var(--line);
    box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(212, 175, 94, 0.06) inset;
  }
  .sheet { margin: auto; border-radius: 28px; border-bottom: 1px solid var(--line-2); }
  .sheet[open] { animation-name: modal-in; }
  .sheet--menu { height: 86vh; height: min(86dvh, 900px); }
  @keyframes modal-in { from { transform: translateY(16px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (min-width: 768px) {
  .sheet--menu { max-width: min(780px, calc(100vw - 48px)); }
  .sheet--menu .sheet__inner { padding-left: 24px; padding-right: 24px; }
  .menu__bar, .menu__body, .menu__tabs { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
  .dishes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Short phone screens: give the menu list more room (menu sheet only) */
@media (max-height: 700px) and (max-width: 599px) {
  .sheet--menu { height: 94vh; height: 94dvh; max-height: 94vh; max-height: 94dvh; }
  .sheet--menu .sheet__grip { margin-bottom: 6px; }
  .menu .sheet__head { margin-bottom: 8px; }
  .menu .sheet__eyebrow { display: none; }
  .menu__tabs { margin-top: 8px; }
  .menu__heading { margin-top: 10px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .glow, .avatar__orbit, .deco { animation: none !important; }
  .tech-grid::after { display: none; }
}
