@charset "UTF-8";
/* ==========================================================================
   India Palace — digital menu
   Palette, typography and rules lifted from the printed 2026 menu:
     navy  #002856   gold #c89111 / #daa149   pale gold #e2c195
     cream #f6f4e1   ink  #373535
   Mobile-first. Everything below 640px is the primary target.

   Visual pass 2: layout and palette unchanged. What changed is the surface —
   layered navy-tinted shadows instead of flat black, brushed-gold gradients
   on display type, hairline accents that catch the light on hover, and
   photography that fades in rather than snapping into place.
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root {
  --navy:        #002856;
  --navy-deep:   #001b3b;
  --navy-soft:   #0b3566;
  --gold:        #c89111;
  --gold-light:  #daa149;
  --gold-pale:   #e2c195;
  --cream:       #f6f4e1;
  --cream-warm:  #fbfaf2;
  --ink:         #373535;

  --bg:          var(--navy-deep);
  --bg-elev:     #05244a;
  --card:        #093159;
  --card-2:      #0c3a68;
  --text:        #f2ecdf;
  --text-dim:    #b9c6d8;
  --accent:      var(--gold-light);
  --accent-2:    var(--gold);
  --line:        rgba(226, 193, 149, .22);
  --line-strong: rgba(226, 193, 149, .40);

  /* Layered shadows tinted toward the brand navy read as depth rather than
     dirt; a single flat black shadow always looks like a sticker. */
  --shadow-sm:
     0 1px 2px rgba(0, 10, 26, .28),
     0 3px 10px rgba(0, 12, 30, .26);
  --shadow:
     0 2px 4px rgba(0, 10, 26, .30),
     0 8px 20px rgba(0, 12, 30, .34),
     0 18px 44px rgba(0, 12, 30, .28);
  --shadow-lg:
     0 4px 8px rgba(0, 10, 26, .32),
     0 16px 36px rgba(0, 12, 30, .40),
     0 32px 72px rgba(0, 12, 30, .34);

  /* Brushed gold, used for display type and hairlines. */
  --gold-sheen: linear-gradient(100deg,
     #c08c22 0%, var(--gold-pale) 22%, #f6e4c0 44%,
     var(--gold-light) 62%, #b9832a 82%, var(--gold-pale) 100%);
  --gold-rule: linear-gradient(90deg,
     transparent 0%, rgba(226,193,149,.15) 12%, var(--gold-light) 50%,
     rgba(226,193,149,.15) 88%, transparent 100%);
  --glass: rgba(255, 255, 255, .055);

  --radius:      18px;
  --radius-sm:   12px;
  --radius-lg:   26px;

  --header-h:    62px;
  --nav-h:       50px;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
                  "Times New Roman", "Noto Serif", serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                  "Helvetica Neue", "Noto Sans", Arial, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, .84, .44, 1);
}

/* Arabic renders far better in a system Arabic face than in a Latin serif. */
html[lang="ar"] {
  --font-display: "SF Arabic", "Geeza Pro", "Noto Naskh Arabic", "Traditional Arabic",
                  "Segoe UI", Tahoma, serif;
  --font-body:    "SF Arabic", "Geeza Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
html[lang="zh"] {
  --font-display: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC",
                  "Microsoft YaHei", Georgia, serif;
  --font-body:    "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}
html[lang="ko"] {
  --font-display: "Apple SD Gothic Neo", "Noto Serif KR", "Malgun Gothic", Georgia, serif;
  --font-body:    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

/* --------------------------------------------------------------- light mode */
html[data-theme="light"] {
  --bg:          var(--cream);
  --bg-elev:     var(--cream-warm);
  --card:        #ffffff;
  --card-2:      #fdfcf6;
  --text:        #21262e;
  --text-dim:    #6a6f78;
  --accent:      #a2740a;
  --accent-2:    var(--gold);
  --line:        rgba(0, 40, 86, .14);
  --line-strong: rgba(0, 40, 86, .26);

  --shadow-sm:
     0 1px 2px rgba(0, 40, 86, .05),
     0 3px 10px rgba(0, 40, 86, .07);
  --shadow:
     0 2px 4px rgba(0, 40, 86, .05),
     0 8px 20px rgba(0, 40, 86, .09),
     0 18px 44px rgba(0, 40, 86, .07);
  --shadow-lg:
     0 4px 8px rgba(0, 40, 86, .06),
     0 16px 36px rgba(0, 40, 86, .11),
     0 32px 72px rgba(0, 40, 86, .09);

  /* On cream, the sheen needs deeper golds or it disappears. */
  --gold-sheen: linear-gradient(100deg,
     #8a6205 0%, #b98a1e 24%, #d8b05c 46%,
     #a2740a 66%, #7d5804 86%, #a2740a 100%);
  --gold-rule: linear-gradient(90deg,
     transparent 0%, rgba(162,116,10,.12) 12%, #b8891d 50%,
     rgba(162,116,10,.12) 88%, transparent 100%);
  --glass: rgba(0, 40, 86, .035);
}

/* ------------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--nav-h) + 8px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  overflow-x: hidden;
}

/* A very slight vertical warmth stops the navy reading as flat blue.
   This uses ::after because body carries .texture, whose ::before already
   paints the lattice — the two would otherwise fight over one pseudo-element. */
body::after {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(226, 193, 149, .085) 0%, transparent 60%),
    radial-gradient(90% 60% at 50% 108%, rgba(200, 145, 17, .06) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}
html[data-theme="light"] body::after {
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(200, 145, 17, .10) 0%, transparent 60%),
    radial-gradient(90% 60% at 50% 108%, rgba(0, 40, 86, .035) 0%, transparent 62%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}

.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }

/* The lattice from the printed cover, used as a faint page texture. */
.texture::before {
  content: "";
  position: fixed; inset: 0;
  background-image: url("../img/pattern-gold.png");
  background-size: 190px;
  opacity: .05;
  pointer-events: none;
  z-index: 0;
}
html[data-theme="light"] .texture::before { opacity: .10; }

/* --------------------------------------------------- shared gold treatments */
.gold-text {
  background: var(--gold-sheen);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
/* If the browser cannot clip a background to text, fall back to solid gold
   rather than leaving the heading invisible. */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .gold-text { color: var(--accent); -webkit-text-fill-color: currentColor; background: none; }
}

/* A hairline with a lozenge at its centre — the motif from the printed menu. */
.rule-ornament {
  position: relative;
  height: 1px;
  background: var(--gold-rule);
}
.rule-ornament::after {
  content: "";
  position: absolute; inset-inline-start: 50%; top: 50%;
  width: 7px; height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 10px rgba(218, 161, 73, .55);
}

/* --------------------------------------------------------- motion, safely
   Content is visible by default. The hidden starting state applies ONLY while
   `html.js-anim` is set, which app.js adds after confirming it can drive the
   animation. A watchdog then adds `html.anim-done`, forcing everything visible
   regardless — so the menu can never be left blank because an observer failed
   to fire, the tab was backgrounded, or a script broke.                      */
html.js-anim .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  will-change: opacity, transform;
}
html.js-anim .reveal.is-in { opacity: 1; transform: none; }

/* Photography fades up as it decodes instead of snapping in. */
html.js-anim .card__media img,
html.js-anim .tile__media img,
html.js-anim .banner img {
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .7s var(--ease-out), transform 1.1s var(--ease-out);
}
html.js-anim .card__media img[data-loaded="1"],
html.js-anim .tile__media img[data-loaded="1"],
html.js-anim .banner img[data-loaded="1"] { opacity: 1; transform: none; }

/* The watchdog — wins over every hidden starting state above. */
html.anim-done .reveal,
html.anim-done .card__media img,
html.anim-done .tile__media img,
html.anim-done .banner img {
  opacity: 1 !important;
  transform: none !important;
}

/* ==========================================================================
   Language / welcome screen
   ========================================================================== */
.splash {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.splash__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.03);
  animation: kenburns 26s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.16) translate3d(0, -1.4%, 0); }
}
.splash__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 12%, rgba(0, 27, 59, .52) 0%, rgba(0, 27, 59, .86) 55%, var(--navy-deep) 100%),
    linear-gradient(180deg, rgba(0, 20, 45, .30) 0%, transparent 26%);
}
.splash__inner { position: relative; z-index: 2; width: 100%; max-width: 460px; }

.splash__logo {
  width: 116px; height: 116px;
  margin: 0 auto 18px;
  filter:
    drop-shadow(0 10px 26px rgba(0, 0, 0, .5))
    drop-shadow(0 0 22px rgba(218, 161, 73, .22));
  animation: rise .7s var(--ease) both, float 7s ease-in-out 1s infinite;
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -6px; }
}
.splash__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 9vw, 42px);
  line-height: 1.1;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: #fff;
  text-shadow: 0 2px 26px rgba(0, 12, 30, .5);
  animation: rise .7s .06s var(--ease) both;
}
.splash__rule {
  width: 132px; height: 1px; margin: 14px auto;
  background: var(--gold-rule);
  position: relative;
  animation: rise .7s .1s var(--ease) both;
}
.splash__rule::before {
  /* a slow highlight travelling along the rule */
  content: "";
  position: absolute; inset: -1px 0;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 210, .9), transparent);
  width: 40%;
  animation: sweep 5.5s ease-in-out 1.6s infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-140%); opacity: 0; }
  25%  { opacity: 1; }
  60%  { transform: translateX(320%); opacity: 0; }
  100% { transform: translateX(320%); opacity: 0; }
}
.splash__rule::after {
  content: "◆";
  position: absolute; inset-inline-start: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px; color: var(--gold-light);
  background: var(--navy-deep); padding: 0 7px; line-height: 1;
  text-shadow: 0 0 10px rgba(218, 161, 73, .7);
}
.splash__tagline {
  font-family: var(--font-display);
  font-size: 14px; letter-spacing: .24em; text-transform: uppercase;
  margin: 0 0 4px;
  color: var(--gold-pale);
  background: var(--gold-sheen);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rise .7s .14s var(--ease) both, shimmer 9s ease-in-out 2s infinite;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .splash__tagline { -webkit-text-fill-color: currentColor; background: none; }
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.splash__welcome {
  color: rgba(255, 255, 255, .86);
  font-size: 15px; margin: 14px 0 2px;
  animation: rise .7s .18s var(--ease) both;
}
.splash__sub {
  color: rgba(255, 255, 255, .56);
  font-size: 13px; margin: 0 0 26px;
  animation: rise .7s .2s var(--ease) both;
}

.splash__prompt {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold-pale); margin: 0 0 12px;
  animation: rise .7s .24s var(--ease) both;
}

.langgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  animation: rise .7s .28s var(--ease) both;
}
.langgrid__btn {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(226, 193, 149, .28);
  border-radius: var(--radius-sm);
  background: linear-gradient(155deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  color: #fff;
  text-align: start;
  overflow: hidden;
  transition: background .3s var(--ease), border-color .3s var(--ease),
              transform .3s var(--ease), box-shadow .3s var(--ease);
  min-height: 54px;
}
/* a hairline of light along the top edge, like brushed metal */
.langgrid__btn::before {
  content: "";
  position: absolute; inset-inline: 10px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 235, 205, .55), transparent);
  opacity: .7;
}
.langgrid__btn:hover,
.langgrid__btn:focus-visible {
  background: linear-gradient(155deg, rgba(226,193,149,.22), rgba(226,193,149,.08));
  border-color: var(--gold-light);
  box-shadow: 0 8px 22px rgba(0, 12, 30, .35), 0 0 0 1px rgba(226,193,149,.18);
}
.langgrid__btn:active { transform: scale(.975); }
.langgrid__btn[aria-current="true"] {
  border-color: var(--gold-light);
  background: linear-gradient(155deg, rgba(226,193,149,.26), rgba(226,193,149,.10));
  box-shadow: inset 0 0 0 1px rgba(226, 193, 149, .34), 0 0 18px rgba(200,145,17,.16);
}
.langgrid__flag { font-size: 22px; line-height: 1; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
.langgrid__names { display: flex; flex-direction: column; min-width: 0; }
.langgrid__native { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.langgrid__en { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .58); }

.btn-primary {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 20px; padding: 15px 26px;
  border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #e9bd72 0%, var(--gold-light) 34%, var(--gold) 70%, #a97a09 100%);
  color: #24170a; font-weight: 700;
  font-size: 14px; letter-spacing: .18em; text-transform: uppercase;
  overflow: hidden;
  box-shadow:
     0 1px 0 rgba(255, 240, 214, .55) inset,
     0 -1px 0 rgba(90, 60, 0, .28) inset,
     0 10px 26px rgba(200, 145, 17, .34);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), filter .3s var(--ease);
  animation: rise .7s .32s var(--ease) both;
}
.btn-primary::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.42) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease-out);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 1px 0 rgba(255,240,214,.6) inset, 0 14px 32px rgba(200,145,17,.46); }
.btn-primary:active { transform: scale(.98); }
.btn-primary svg { flex: none; position: relative; z-index: 1; }

.splash__hint {
  margin-top: 18px; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255, 255, 255, .42);
  animation: rise .7s .36s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@media (min-width: 520px) {
  .langgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .splash__inner { max-width: 620px; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(226, 193, 149, .06), 0 6px 24px rgba(0, 12, 30, .22);
}
.header__inner { display: flex; align-items: center; gap: 10px; width: 100%; }
.header__brand { display: flex; align-items: center; gap: 9px; min-width: 0; margin-inline-end: auto; }
.header__logo {
  width: 34px; height: 34px; flex: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
  transition: transform .4s var(--ease);
}
.header__brand:hover .header__logo { transform: rotate(-8deg) scale(1.06); }
.header__name {
  font-family: var(--font-display);
  font-size: 15px; letter-spacing: .18em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header__actions { display: flex; align-items: center; gap: 6px; flex: none; }

.iconbtn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text);
  overflow: hidden;
  transition: background .25s var(--ease), border-color .25s var(--ease),
              transform .25s var(--ease), box-shadow .25s var(--ease);
}
.iconbtn:hover {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-color: var(--line-strong);
  box-shadow: 0 4px 14px rgba(0, 12, 30, .25);
}
.iconbtn:active { transform: scale(.94); }
.iconbtn__label { font-size: 12px; font-weight: 600; letter-spacing: .07em; }
.iconbtn svg { flex: none; }

/* ==========================================================================
   Category navigation
   ========================================================================== */
.catnav {
  position: sticky; top: var(--header-h); z-index: 55;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.catnav__scroll {
  display: flex; align-items: center; gap: 7px;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  /* fade the chips out at the edges instead of cutting them dead */
  -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%);
}
.catnav__scroll::-webkit-scrollbar { display: none; }
.catnav__chip {
  flex: none;
  scroll-snap-align: center;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  letter-spacing: .015em;
  color: var(--text-dim);
  background: transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease),
              background .25s var(--ease), box-shadow .25s var(--ease);
}
.catnav__chip:hover { color: var(--text); border-color: var(--line-strong); background: var(--glass); }
.catnav__chip.is-active {
  color: #24170a;
  background: linear-gradient(135deg, #e9bd72, var(--gold-light) 46%, var(--gold));
  border-color: transparent;
  box-shadow:
     0 1px 0 rgba(255, 240, 214, .5) inset,
     0 4px 14px rgba(200, 145, 17, .34);
}

/* ==========================================================================
   Search
   ========================================================================== */
.searchbar {
  position: sticky; top: calc(var(--header-h) + var(--nav-h)); z-index: 54;
  padding: 10px 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
  display: none;
}
.searchbar.is-open { display: block; animation: dropin .3s var(--ease-out) both; }
@keyframes dropin { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.searchbar__field { position: relative; display: flex; align-items: center; }
.searchbar__field svg { position: absolute; inset-inline-start: 14px; opacity: .55; pointer-events: none; }
.searchbar__input {
  width: 100%;
  padding: 12px 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: linear-gradient(160deg, var(--card), var(--card-2));
  color: var(--text);
  font-size: 16px;               /* 16px stops iOS zooming on focus */
  font-family: inherit;
  box-shadow: inset 0 1px 3px rgba(0, 10, 26, .22);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.searchbar__input::placeholder { color: var(--text-dim); }
.searchbar__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 1px 3px rgba(0,10,26,.2), 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.searchbar__clear {
  position: absolute; inset-inline-end: 8px;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-dim);
  display: none; align-items: center; justify-content: center;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.searchbar__clear:hover { background: var(--glass); color: var(--text); }
.searchbar__clear.is-visible { display: inline-flex; }
.searchbar__count { margin-top: 8px; font-size: 12px; color: var(--text-dim); text-align: center; letter-spacing: .04em; }

/* ==========================================================================
   Menu sections
   ========================================================================== */
main { position: relative; z-index: 1; padding-bottom: 48px; }

.section { scroll-margin-top: calc(var(--header-h) + var(--nav-h) + 8px); padding-top: 26px; }

.banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 7;
  background: var(--card);
  box-shadow: var(--shadow);
}
/* an inner hairline so the image sits *in* the card rather than on it */
.banner::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow:
     inset 0 0 0 1px rgba(226, 193, 149, .24),
     inset 0 1px 0 rgba(255, 240, 214, .18);
  z-index: 3;
  pointer-events: none;
}
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 20, 45, .06) 0%, rgba(0, 20, 45, .42) 44%,
                            rgba(0, 20, 45, .78) 76%, rgba(0, 16, 36, .92) 100%);
}
.banner__label {
  position: absolute; inset-inline: 16px; bottom: 14px; z-index: 2;
}
.banner__title {
  font-family: var(--font-display);
  font-size: clamp(21px, 5.6vw, 30px);
  letter-spacing: .12em; text-transform: uppercase;
  color: #fff; margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .6), 0 1px 2px rgba(0,0,0,.5);
}
.banner__title::after {
  content: "";
  display: block;
  width: 54px; height: 2px; margin-top: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-light), rgba(226,193,149,.15));
  box-shadow: 0 0 12px rgba(218, 161, 73, .5);
}
[dir="rtl"] .banner__title::after { background: linear-gradient(270deg, var(--gold-light), rgba(226,193,149,.15)); }
.banner__desc {
  margin: 7px 0 0;
  font-size: 13px; line-height: 1.45;
  color: rgba(255, 255, 255, .84);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* A single dish photograph on its own page — whole image, no scrim. */
.dishphoto {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--card), var(--card-2));
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  max-height: 62svh;
  min-height: 160px;
}
.dishphoto::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(226, 193, 149, .22);
  pointer-events: none;
}
.dishphoto img {
  width: 100%; height: auto;
  max-height: 62svh;
  object-fit: contain;
  position: relative; z-index: 1;
}

/* Section head used when a category has no banner image. */
.sechead { text-align: center; padding: 6px 0 2px; }
.sechead__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 5.4vw, 28px);
  letter-spacing: .14em; text-transform: uppercase;
  margin: 0;
  background: var(--gold-sheen);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .sechead__title { color: var(--accent); -webkit-text-fill-color: currentColor; background: none; }
}
.sechead__rule {
  position: relative;
  width: 110px; height: 1px; margin: 14px auto 0;
  background: var(--gold-rule);
}
.sechead__rule::after {
  content: "";
  position: absolute; inset-inline-start: 50%; top: 50%;
  width: 6px; height: 6px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 10px rgba(218, 161, 73, .5);
}
.sechead__desc { margin: 12px 0 0; font-size: 13.5px; color: var(--text-dim); }

/* ------------------------------------------------------------------- cards */
.items { display: grid; gap: 12px; margin-top: 18px; }

.card {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--card), var(--card-2));
  box-shadow: var(--shadow-sm);
  text-align: start;
  width: 100%;
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease),
              box-shadow .35s var(--ease);
}
/* light catching the top edge, brightening on hover */
.card::before {
  content: "";
  position: absolute; inset-inline: 14px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 193, 149, .34), transparent);
  opacity: .8;
  transition: opacity .35s var(--ease), background .35s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.card:hover::before { opacity: 1; background: linear-gradient(90deg, transparent, rgba(240, 214, 170, .75), transparent); }
.card:active { transform: scale(.995); }

/* Two class names, so this still wins inside the wider breakpoints below —
   which also set grid-template-columns on .card and would otherwise leave a
   photo-less dish squeezed into the 108px image column. */
.card.card--noimg { grid-template-columns: minmax(0, 1fr); }

.card__media {
  position: relative;
  width: 96px; aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background:
    linear-gradient(150deg,
      color-mix(in srgb, var(--accent) 14%, var(--card)),
      color-mix(in srgb, var(--accent) 5%, var(--card)));
  flex: none;
}
/* inner ring keeps the photo feeling mounted, not pasted */
.card__media::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow:
     inset 0 0 0 1px rgba(226, 193, 149, .20),
     inset 0 -14px 22px -14px rgba(0, 12, 30, .55);
  pointer-events: none;
  z-index: 2;
}
/* Thumbnails stay square and cropped — that is what makes the grid tidy — but
   the crop window sits slightly high, so a tall glass keeps its rim rather
   than its tablecloth. */
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
.card:hover .card__media img[data-loaded="1"] { transform: scale(1.07); }

.card__body { min-width: 0; }

/* Markers on the left, price on the bottom right.
   The price used to share a baseline with the dish name, which collided the
   moment a name wrapped — "Samosa Platter" and "Chicken Wings Champ — Sunehri"
   both ran straight into their figure. Dropping it to its own row below the
   text gives the name the full width and puts the price where a guest's eye
   lands last. */
.card__foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 10px; margin-top: 9px;
}
.card__foot .badges { margin-top: 0; }
.card__foot:has(.badges:empty) { justify-content: flex-end; }

.card__name {
  font-family: var(--font-display);
  font-size: 17px; line-height: 1.28; margin: 0;
  letter-spacing: .005em;
  color: var(--text);
  min-width: 0;
}

/* ------------------------------------------------------------------ price */
.price {
  margin: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  font-family: var(--font-display);
  font-variant-numeric: lining-nums tabular-nums;
}
.price__one { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.price__amount {
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  background: var(--gold-sheen);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .price__amount { color: var(--accent); -webkit-text-fill-color: currentColor; background: none; }
}
.price__label {
  font-family: var(--font-body);
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim);
}
/* Dishes with two figures stack them rather than hiding one — a guest shown
   only "AED 125" for a raan that also comes at 65 has been misinformed. */
.price--card {
  flex: none;
  flex-direction: column; align-items: flex-end;
  gap: 1px;
  text-align: end;
  margin-inline-start: auto;      /* always hugs the far edge, LTR and RTL */
}
.price--card .price__amount { font-size: 15px; }
.price--card .price__one { gap: 5px; }
.price--card .price__label { font-size: 9px; }

.price--sheet { margin: 2px 0 12px; gap: 6px 16px; }
.price--sheet .price__amount { font-size: 21px; }
.price--sheet .price__label { font-size: 10px; }

.price--detail { margin: 8px 0 0; gap: 6px 18px; }
.price--detail .price__amount { font-size: 22px; }
.card__desc {
  margin: 5px 0 0;
  font-size: 13px; line-height: 1.5; color: var(--text-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__cat {
  display: block; margin-top: 6px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}

/* --------------------------------------------------------- dietary markers
   Icon only. Repeating "Vegetarian · Gluten Free" on every card in six
   languages buried the dish names, so the words moved to the legend at the
   foot of the menu; each glyph still carries a title and an aria-label. */
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  flex: none;
  cursor: help;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: transform .2s var(--ease);
}
.badge:hover { transform: translateY(-1px) scale(1.08); }
.badge svg { width: 13px; height: 13px; }
.badge--chef  {
  color: #f3d089;
  background: linear-gradient(150deg, rgba(200,145,17,.26), rgba(200,145,17,.12));
  border-color: rgba(218, 161, 73, .5);
  box-shadow: 0 0 12px rgba(200, 145, 17, .14);
}
.badge--new   { color: #93d7ff; background: linear-gradient(150deg, rgba(60,150,220,.24), rgba(60,150,220,.10)); border-color: rgba(90, 170, 230, .44); }
.badge--veg   { color: #86dc9b; background: linear-gradient(150deg, rgba(40,160,80,.24), rgba(40,160,80,.10));  border-color: rgba(70, 190, 110, .44); }
.badge--vegan { color: #92eda9; background: linear-gradient(150deg, rgba(30,175,90,.26), rgba(30,175,90,.11));  border-color: rgba(70, 210, 120, .46); }
.badge--spicy { color: #ffa393; background: linear-gradient(150deg, rgba(210,60,40,.24), rgba(210,60,40,.10));  border-color: rgba(230, 100, 80, .46); }
.badge--gf    { color: #e6d2ab; background: linear-gradient(150deg, rgba(180,150,100,.24), rgba(180,150,100,.10)); border-color: rgba(200, 175, 130, .44); }

html[data-theme="light"] .badge--chef  { color: #8a6205; background: rgba(200, 145, 17, .13); border-color: rgba(200, 145, 17, .38); }
html[data-theme="light"] .badge--new   { color: #14618f; background: rgba(20, 120, 180, .11); border-color: rgba(20, 120, 180, .32); }
html[data-theme="light"] .badge--veg,
html[data-theme="light"] .badge--vegan { color: #1d7a3c; background: rgba(30, 140, 70, .11); border-color: rgba(30, 140, 70, .32); }
html[data-theme="light"] .badge--spicy { color: #b23a25; background: rgba(190, 60, 40, .11); border-color: rgba(190, 60, 40, .32); }
html[data-theme="light"] .badge--gf    { color: #7a6132; background: rgba(140, 110, 55, .11); border-color: rgba(140, 110, 55, .32); }

/* ---------------------------------------------------------- favourite heart */
.fav {
  position: absolute; inset-block-start: 5px; inset-inline-end: 5px;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(0, 20, 45, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, .82);
  box-shadow: 0 2px 8px rgba(0, 12, 30, .35);
  z-index: 3;
  transition: transform .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
}
.fav:hover { transform: scale(1.14); }
.fav[aria-pressed="true"] { color: #ff6b81; background: rgba(255, 107, 129, .2); }
.fav[aria-pressed="true"] svg { fill: currentColor; animation: pop .35s var(--ease-out); }
@keyframes pop {
  0%   { transform: scale(.6); }
  55%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ----------------------------------------------------------- chef's strip */
.rail { margin-top: 8px; }
.rail__head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px;
}
.rail__title {
  font-family: var(--font-display);
  font-size: 15px; letter-spacing: .2em; text-transform: uppercase;
  margin: 0;
  background: var(--gold-sheen);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .rail__title { color: var(--accent); -webkit-text-fill-color: currentColor; background: none; }
}
.rail__line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.rail__scroll {
  display: flex; gap: 12px;
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding: 4px 0 6px;
  -webkit-overflow-scrolling: touch;
}
.rail__scroll::-webkit-scrollbar { display: none; }
.tile {
  position: relative;
  flex: none; width: 168px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--card), var(--card-2));
  box-shadow: var(--shadow-sm);
  text-align: start;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.tile::before {
  content: "";
  position: absolute; inset-inline: 12px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226,193,149,.4), transparent);
  z-index: 3;
}
.tile:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.tile__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--accent) 14%, var(--card)),
    color-mix(in srgb, var(--accent) 5%, var(--card)));
  overflow: hidden;
}
.tile__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 16, 36, .5) 100%);
  z-index: 2;
}
.tile__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 38%;
}
.tile:hover .tile__media img[data-loaded="1"] { transform: scale(1.06); }
.tile__body { padding: 10px 11px 12px; }
.tile__name {
  font-family: var(--font-display); font-size: 14.5px; line-height: 1.28; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile__cat { margin: 5px 0 0; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* ==========================================================================
   Dish detail sheet
   ========================================================================== */
.sheet {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 12, 28, .66);
  backdrop-filter: blur(5px) saturate(120%);
  -webkit-backdrop-filter: blur(5px) saturate(120%);
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.sheet.is-open { opacity: 1; visibility: visible; }
.sheet__panel {
  position: relative;
  width: 100%; max-width: 560px;
  max-height: 92svh; overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    linear-gradient(175deg, var(--bg-elev), var(--bg));
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  transform: translateY(24px);
  transition: transform .38s var(--ease-out);
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
}
.sheet.is-open .sheet__panel { transform: none; }
.sheet__grab {
  width: 42px; height: 4px; border-radius: 999px;
  background: var(--line-strong);
  margin: 10px auto 0;
}
/* The photo decides its own shape here.
   A fixed 4:3 frame with object-fit:cover sliced the top off anything
   portrait — a tall glass of juice lost its rim. The frame now follows the
   image's own proportions, clamped so a very tall photo cannot push the dish
   name off the screen. */
.sheet__media {
  position: relative;
  margin: 14px 16px 0;
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--card), var(--card-2));
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  max-height: 46svh;
  min-height: 140px;
}
.sheet__media::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(226, 193, 149, .22);
  pointer-events: none;
}
.sheet__media img {
  width: 100%; height: auto;
  max-height: 46svh;
  object-fit: contain;          /* show the whole dish, never crop it */
  position: relative; z-index: 1;
}
/* Blurred copy of the same photo, filling whatever the contained image
   leaves over. Reads as shallow depth of field rather than dead space.

   Selector carries the class *and* the element so it outweighs the
   `.sheet__media img` rule above, which would otherwise force it back to
   width:100% / object-fit:contain and leave it invisible. */
.sheet__media img.sheet__bg,
.dishphoto img.sheet__bg {
  position: absolute;
  top: -8%; left: -8%;
  width: 116%; height: 116%;
  max-width: none; max-height: none;
  object-fit: cover;
  object-position: center;
  filter: blur(28px) saturate(1.5) brightness(.78);
  opacity: .5;
  z-index: 0;
  pointer-events: none;
}
img.sheet__bg:not([src]) { display: none; }
.sheet__body { padding: 16px 20px 4px; }
.sheet__cat { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.sheet__name {
  font-family: var(--font-display); font-size: 24px; line-height: 1.22; margin: 0 0 6px;
  letter-spacing: .01em;
}
.sheet__price[hidden] { display: none; }
.sheet__desc { font-size: 15px; line-height: 1.65; color: var(--text-dim); margin: 0; }
.sheet__note {
  margin: 16px 16px 0; padding: 11px 13px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: var(--glass);
  font-size: 12px; line-height: 1.55; color: var(--text-dim);
}
.sheet__close {
  position: absolute; inset-block-start: 12px; inset-inline-end: 12px;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgba(0, 20, 45, .55); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 4;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.sheet__close:hover { background: rgba(0, 20, 45, .78); transform: rotate(90deg); }

@media (min-width: 640px) {
  .sheet { align-items: center; }
  .sheet__panel { border-radius: var(--radius-lg); border-bottom: 1px solid var(--line-strong); max-height: 86svh; }
}

/* ==========================================================================
   Empty state, footer, back-to-top
   ========================================================================== */
.empty { text-align: center; padding: 60px 20px; }
.empty__icon { font-size: 34px; opacity: .55; }
.empty__title { font-family: var(--font-display); font-size: 20px; margin: 12px 0 6px; letter-spacing: .04em; }
.empty__hint { font-size: 14px; color: var(--text-dim); margin: 0; }

/* ------------------------------------------------ dietary key + allergens
   Both appear exactly once, at the foot of the menu. */
.legend {
  margin: 34px auto 0; max-width: 720px;
  padding: 20px 16px 4px;
  text-align: center;
}
.legend__title {
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  margin: 0 0 14px; color: var(--text-dim);
}
.legend__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px;
}
.legend__item { display: inline-flex; align-items: center; gap: 7px; }
.legend__item .badge { cursor: default; }
.legend__item .badge:hover { transform: none; }
.legend__label {
  font-size: 12px; letter-spacing: .06em; color: var(--text);
}

.allergen__prices {
  display: block; margin-bottom: 6px;
  color: var(--accent); letter-spacing: .04em;
}
.allergen {
  margin: 20px auto 0; max-width: 620px;
  text-align: center; font-size: 12px; line-height: 1.65; color: var(--text-dim);
  padding: 16px;
  border-block: 1px solid var(--line);
  position: relative;
}

.footer {
  margin-top: 34px;
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  text-align: center;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 4%, transparent));
}
.footer__logo {
  width: 56px; height: 56px; margin: 0 auto 12px; opacity: .95;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .3));
}
.footer__name { font-family: var(--font-display); font-size: 15px; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 4px; }
.footer__tag { font-size: 12px; color: var(--text-dim); margin: 0 0 16px; letter-spacing: .04em; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.footer__note { font-size: 11.5px; color: var(--text-dim); opacity: .78; margin: 0; }

.story { max-width: 640px; margin: 0 auto; padding: 30px 4px 0; text-align: center; }
.story__title {
  font-family: var(--font-display); font-size: 18px; letter-spacing: .2em;
  text-transform: uppercase; margin: 0 0 14px;
  background: var(--gold-sheen);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .story__title { color: var(--accent); -webkit-text-fill-color: currentColor; background: none; }
}
.story__body { font-size: 14px; line-height: 1.8; color: var(--text-dim); margin: 0; }

.totop {
  position: fixed; inset-block-end: 18px; inset-inline-end: 16px; z-index: 70;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.9);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s var(--ease);
  margin-bottom: env(safe-area-inset-bottom);
}
.totop:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(0, 12, 30, .4); }
.totop.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ==========================================================================
   Language sheet (from the header button)
   ========================================================================== */
.langsheet {
  position: fixed; inset: 0; z-index: 95;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 12, 28, .66);
  backdrop-filter: blur(5px) saturate(120%);
  -webkit-backdrop-filter: blur(5px) saturate(120%);
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s var(--ease);
}
.langsheet.is-open { opacity: 1; visibility: visible; }
.langsheet__panel {
  width: 100%; max-width: 460px;
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    linear-gradient(175deg, var(--bg-elev), var(--bg));
  border: 1px solid var(--line-strong); border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(24px);
  transition: transform .38s var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.langsheet.is-open .langsheet__panel { transform: none; }
.langsheet__title {
  font-family: var(--font-display); font-size: 15px; letter-spacing: .2em;
  text-transform: uppercase; text-align: center; margin: 0 0 16px;
  background: var(--gold-sheen);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .langsheet__title { color: var(--accent); -webkit-text-fill-color: currentColor; background: none; }
}
.langsheet .langgrid { animation: none; }
.langsheet .langgrid__btn {
  background: linear-gradient(160deg, var(--card), var(--card-2));
  border-color: var(--line); color: var(--text);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.langsheet .langgrid__btn:hover { border-color: var(--accent); background: linear-gradient(160deg, var(--card-2), var(--card)); }
.langsheet .langgrid__en { color: var(--text-dim); }
@media (min-width: 640px) {
  .langsheet { align-items: center; }
  .langsheet__panel { border-radius: var(--radius-lg); border-bottom: 1px solid var(--line-strong); }
}

/* ==========================================================================
   Wider screens
   ========================================================================== */
@media (min-width: 600px) {
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .card { grid-template-columns: 108px minmax(0, 1fr); }
  .card__media { width: 108px; }
}
@media (min-width: 900px) {
  :root { --header-h: 70px; }
  .items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .header__name { font-size: 17px; }
  .banner { aspect-ratio: 21 / 7; }
  .banner__label { inset-inline: 24px; bottom: 20px; }
}

/* ==========================================================================
   Right-to-left
   ========================================================================== */
[dir="rtl"] .card { text-align: right; }
[dir="rtl"] .searchbar__field svg { transform: scaleX(-1); }
[dir="rtl"] .rail__line { background: linear-gradient(270deg, var(--line-strong), transparent); }
[dir="rtl"] .totop svg,
[dir="rtl"] .btn-primary svg { transform: scaleX(-1); }
[dir="rtl"] .btn-primary::after { animation-direction: reverse; }

/* ==========================================================================
   Print — a guest may want a paper copy from a tablet
   ========================================================================== */
@media print {
  .header, .catnav, .searchbar, .totop, .fav, .sheet, .langsheet { display: none !important; }
  body { background: #fff; color: #000; }
  body::after, .texture::before { display: none; }
  .card { break-inside: avoid; border-color: #ccc; background: #fff; box-shadow: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .card__media img, .banner img, .tile__media img { opacity: 1 !important; transform: none !important; }
  .sechead__title, .rail__title, .story__title, .langsheet__title {
    color: #000 !important; -webkit-text-fill-color: #000 !important; background: none !important;
  }
}
