:root {
  --bg: #070806;
  --ink: #efe6d6;
  --mut: rgba(239, 230, 214, .58);
  /* TULUM wordmark / bird lockup — site --gold */
  --gold: #d4b483;
  --gold-2: #f0d7a8;
  --line: rgba(212, 180, 131, .28);
  --serif: "Cinzel", "Times New Roman", serif;
  --sans: "Albert Sans", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box }

/* Standalone deck.php only — do not restyle the real menu chrome */
html:has(body.page-deck) { height: 100% }
body.page-deck {
  margin: 0;
  min-height: 100dvh;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.page-deck button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer }
body.page-deck a { color: inherit; text-decoration: none }
body.page-deck img { display: block; max-width: 100% }
body.page-deck ::selection { background: rgba(212, 180, 131, .35) }

.page-deck .grain,
.menu-deck-home .grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 8;
  opacity: .07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.page-deck .top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 0 10px;
  flex: 0 0 auto;
}
.page-deck .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
}
.page-deck .logo img { width: 28px; height: 28px; object-fit: contain }
.page-deck .logo span {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .42em;
  padding-left: .42em;
  color: var(--gold);
}

.deck {
  --gap: 8px;
  --lip: 84px;
  --plate-rad: 18px;
  --badge: 50px;
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-height: 0;
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  touch-action: none;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}
.deck .empty { color: var(--mut); padding: 32px 0; margin: 0 }

.sheet {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
}
.deck.is-instant .plate,
.deck.is-instant .plate-photo { transition: none }

.sheet[data-slug="kitchen"] .plate-photo { object-position: 50% 40% }
.sheet[data-slug="bar"] .plate-photo { object-position: 52% 42% }
.sheet[data-slug="cocktails"] .plate-photo { object-position: 48% 30% }
.sheet[data-slug="hookah"] .plate-photo { object-position: 46% 50% }

/* Open cocktails: fill the gold frame edge-to-edge (deck asset, no side bars) */
.sheet[data-slug="cocktails"].is-hot .plate-photo,
.sheet[data-slug="cocktails"] .plate-photo {
  object-fit: cover;
  object-position: 50% 40%;
}

.plate {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #0c0b09;
  cursor: pointer;
  /* Frame drawn via ::after so it sits on top of the photo on all four sides */
  border: 0;
  border-radius: var(--plate-rad);
  box-shadow: none;
  transition: filter .28s ease, box-shadow .28s ease, height .34s cubic-bezier(.4, 0, .2, 1);
  font: inherit;
  color: inherit;
  padding: 0;
  margin: 0;
  display: block;
  text-align: center;
}
/* Visible rounded gold frame around the card photo (mockup) */
.plate::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1.5px solid var(--gold);
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(240, 215, 168, .22);
  pointer-events: none;
}
.plate:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}
/* Resting cards: bottom of the photo sits under a black veil. Finger-open card clears it. */
.plate-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(to top, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .72) 28%, rgba(0, 0, 0, .28) 52%, rgba(0, 0, 0, 0) 78%);
  pointer-events: none;
  transition: opacity .28s ease;
}
.sheet.is-hot .plate-shade {
  opacity: 0;
}
.plate-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  /* Stay inside the frame — no scale bleed past the gold line */
  transform: none;
  border-radius: inherit;
  filter: saturate(.86) brightness(.78);
  transition: filter .28s ease;
  pointer-events: none;
}
.sheet.is-hot .plate-photo {
  filter: none;
}
.sheet.is-hot .plate {
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}
.sheet.is-hot .plate::after {
  border-color: var(--gold-2);
  box-shadow: inset 0 0 0 1px rgba(240, 215, 168, .35);
}

.plate-core {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 16px;
  /* Glyph at vertical mid of the card; title hangs below (mockup sits lower) */
  transform: translateY(calc((2px + 1.1em) / 2 + 6px));
  pointer-events: none;
}

.plate-badge {
  display: grid;
  place-items: center;
  width: var(--badge);
  height: var(--badge);
  flex-shrink: 0;
  background: transparent;
  box-shadow: none;
}
.plate-sign {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  /* Glyphs are painted #d4b483 in the PNG; transparent around strokes */
}

.plate-name {
  position: static;
  transform: none;
  font-family: var(--serif);
  font-size: clamp(20px, 5.2vw, 28px);
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.1;
  color: var(--gold);
  -webkit-text-fill-color: var(--gold);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .75), 0 8px 22px rgba(0, 0, 0, .55);
  pointer-events: none;
  white-space: nowrap;
}

/* Shrunk lips: keep glyph + title readable, no clip */
.deck.is-open .sheet:not(.is-hot) .plate-core {
  gap: 1px;
  padding: 2px 12px;
  transform: none;
}
.deck.is-open .sheet:not(.is-hot) .plate-badge {
  width: min(var(--badge), 25px);
  height: min(var(--badge), 25px);
}
.deck.is-open .sheet:not(.is-hot) .plate-name {
  font-size: clamp(14px, 3.6vw, 18px);
  letter-spacing: .06em;
  line-height: 1.05;
}

/* Desktop classic home wrapper — keeps absolute home-bg scoped */
.home-classic {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  width: 100%;
  min-height: calc(100vh - var(--m-top, 76px));
  min-height: calc(100svh - var(--m-top, 76px));
  min-height: calc(100dvh - var(--m-top, 76px));
}

/* Embedded in menu/index.php — phone only (site breakpoint ≤900px) */
.menu-deck-home {
  display: none;
  /* float-bar: ~50px buttons + safe-area; +12px gap so last gold edge clears it */
  --deck-dock: calc(62px + env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 1;
  flex-direction: column;
  box-sizing: border-box;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100svh;
  max-height: 100dvh;
  min-height: 0;
  padding-top: var(--m-top, calc(64px + env(safe-area-inset-top, 0px)));
  padding-bottom: var(--deck-dock);
  overflow: hidden;
  background: var(--bg, #070806);
}
.menu-deck-home .deck {
  --clear-bottom: 0px;
  --gap: 7px;
  --lip: 80px;
  --plate-rad: 16px;
  --badge: 31px;
  width: min(100% - 20px, 1280px);
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
.menu-deck-home .plate-name {
  font-size: clamp(18px, 4.8vw, 24px);
  letter-spacing: .08em;
}

/* Phone / tablet: deck replaces classic menu home. Desktop (≥901px): classic only. */
@media (max-width: 900px) {
  .home:has(.menu-deck-home) {
    padding-top: 0;
    min-height: 0;
    height: auto;
  }
  .home .home-classic { display: none !important }
  .home:not([hidden]) .menu-deck-home { display: flex }
}

@media (min-width: 901px) {
  .menu-deck-home { display: none !important }
}

@media (max-width: 900px) {
  .page-deck .deck { --gap: 7px; --lip: 80px; --plate-rad: 16px; --badge: 31px }
  .page-deck .plate-name { font-size: clamp(18px, 5vw, 24px); letter-spacing: .08em }
}

@media (prefers-reduced-motion: reduce) {
  .plate,
  .plate-photo { transition: none }
}
