/* ===== Base intro (unchanged from variant-3) ===== */
:root { color-scheme: dark; background: #000; font-family: Arial, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: #000; color: #fff; }
.intro { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: grid; place-items: center; isolation: isolate; }
.scene { width: min(310px, 64vw); position: relative; z-index: 1; }
.is-docking .scene { will-change: transform; }
.is-docked .scene { visibility: hidden; }
.brand { position: absolute; left: 50%; transform: translateX(-50%); top: max(24px, env(safe-area-inset-top)); width: min(185px, calc(100vw - 48px)); height: auto; opacity: 0; z-index: 2; overflow: hidden; mix-blend-mode: screen; }
#brand-details, #brand-complete { opacity: 0; }
#moving-stripe { opacity: 0; }
.logo { width: 100%; height: auto; display: block; overflow: visible; }
#animated-logo { display: none; }
.is-playing #animated-logo { display: block; }
.is-playing #final-logo { display: none; }
#fog { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.sea-surface { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(310px, 64vw); height: auto; overflow: visible; pointer-events: none; z-index: 3; }
.controls { position: absolute; z-index: 3; bottom: max(34px, env(safe-area-inset-bottom)); left: 0; right: 0; display: flex; justify-content: center; transition: opacity .4s ease; }
.is-playing .controls { opacity: .2; }
.is-docking .controls { opacity: .2; }
.intro button { color: #939393; font: 11px/1.4 Arial, sans-serif; letter-spacing: .08em; background: transparent; border: 1px solid #242424; border-radius: 100px; min-height: 44px; padding: 10px 18px 10px 13px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: color .2s, border-color .2s; -webkit-tap-highlight-color: transparent; }
.intro button svg { width: 18px; height: 18px; }
.intro button:hover { color: #fff; border-color: #666; }
.intro button:focus-visible { outline: 2px solid #fff; outline-offset: 6px; }
#asset-error { position: absolute; bottom: 100px; font-size: 13px; color: #aaa; }
@media (max-width: 600px) { .controls { bottom: max(28px, env(safe-area-inset-bottom)); } }

/* ===== Monochrome theme ===== */
:root {
  --header-h: 132px;
  --bg: #000;
  --surface: #101010;
  --surface-2: #171717;
  --line: #272727;
  --line-strong: #454545;
  --text: #f4f4f4;
  --text-dim: #9d9d9d;
  --text-faint: #6b6b6b;
  --shadow: 0 18px 44px -22px rgba(0, 0, 0, .9);
  --font-display: "Pirata One", "UnifrakturMaguntia", serif;
  --font-name: "Pirata One", "UnifrakturMaguntia", serif;
  --font-body: "EB Garamond", Georgia, "Times New Roman", serif;
}

/* The header keeps the intro's own black: the logo stays exactly as the original artwork. */
.intro {
  position: sticky; top: 0; z-index: 40;
  transition: min-height .85s cubic-bezier(.4,0,.2,1), height .85s cubic-bezier(.4,0,.2,1), box-shadow .6s ease;
}
.intro.is-finished {
  min-height: 0;
  height: var(--header-h);
  background: #000;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 34px -24px #000;
}
.intro.is-finished .controls,
.intro.is-finished .sea-surface,
.intro.is-finished #fog { display: none; }
.intro.is-finished .brand { filter: url(#brand-crisp); }

/* ===== Language switch: right of the docked logo ===== */
.lang-switch {
  position: absolute; z-index: 3; top: 50%; right: max(12px, env(safe-area-inset-right));
  translate: 0 -50%;
  display: none; gap: 2px; padding: 3px;
  border: 1px solid #242424; border-radius: 100px;
}
.intro.is-finished .lang-switch { display: flex; }
.intro .lang-switch button {
  min-height: 0; width: 36px; height: 34px; padding: 0; justify-content: center;
  border: 0; font: 600 12.5px/1 var(--font-body); letter-spacing: .1em;
}
.intro .lang-switch button[aria-pressed="true"] { background: #fff; color: #000; cursor: default; }
.intro .lang-switch button:focus-visible { outline-offset: 2px; }
/* Beside the logo on a narrow phone there is room for one button: the language to switch to. */
@media (max-width: 389px) {
  .intro .lang-switch button[aria-pressed="true"] { display: none; }
}

/* ===== Site shell ===== */
html { scroll-behavior: smooth; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.site {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  padding-bottom: 64px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}
.site.is-visible { opacity: 1; transform: none; }
.site[hidden] { display: none; }

.site-kicker {
  text-align: center;
  margin: 26px auto 2px;
  padding: 0 24px;
  font-style: italic;
  color: var(--text-faint);
  font-size: 15px;
  letter-spacing: .03em;
}

/* ===== Section nav (horizontally scrollable) ===== */
.section-nav-wrap {
  position: sticky; top: var(--header-h); z-index: 30;
  padding: 12px 0 14px;
  background: linear-gradient(180deg, #000 0%, #000 70%, rgba(0,0,0,0) 100%);
}
.section-nav-wrap::before,
.section-nav-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 56px;
  pointer-events: none; z-index: 1; opacity: 0; transition: opacity .2s ease;
}
.section-nav-wrap::before { left: 0; background: linear-gradient(90deg, #000 20%, rgba(0,0,0,0)); }
.section-nav-wrap::after { right: 0; background: linear-gradient(270deg, #000 20%, rgba(0,0,0,0)); }
.section-nav-wrap.can-prev::before,
.section-nav-wrap.can-next::after { opacity: 1; }

.section-nav {
  display: flex; gap: 8px;
  overflow-x: auto; overscroll-behavior-x: contain;
  padding: 2px 18px 8px;
  margin-bottom: -8px;
  scrollbar-width: none;
  cursor: grab;
}
.section-nav.is-dragging { cursor: grabbing; scroll-behavior: auto; }
.section-nav.is-dragging a { pointer-events: none; }
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a {
  flex: none;
  font: 18px/1.05 var(--font-name);
  letter-spacing: .03em;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 13px 22px;
  background: rgba(255,255,255,.03);
  transition: background .2s, border-color .2s, color .2s;
  white-space: nowrap;
  user-select: none;
}
.section-nav a:hover { color: var(--text); border-color: var(--line-strong); }
.section-nav a.is-active { background: #fff; border-color: #fff; color: #000; }

.nav-arrow {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 38px; height: 38px; border-radius: 50%;
  background: #121212; border: 1px solid var(--line-strong); color: var(--text);
  display: grid; place-items: center; cursor: pointer; z-index: 2;
  transition: opacity .2s ease, background .2s ease;
}
.nav-arrow:hover { background: #1e1e1e; }
.nav-arrow svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }
.nav-arrow-prev { left: 8px; }
.nav-arrow-next { right: 8px; }
.nav-arrow[disabled] { opacity: 0; pointer-events: none; }

/* ===== Menu sections ===== */
.menu { max-width: 1080px; margin: 0 auto; padding: 8px 18px 0; }
.menu-section { padding-top: 34px; scroll-margin-top: calc(var(--header-h) + 80px); }
.menu-section-head { margin-bottom: 18px; }
.menu-section-title {
  font-family: var(--font-display);
  color: var(--text);
  font-size: clamp(30px, 4.4vw, 42px);
  font-weight: 400;
  letter-spacing: .02em;
  margin: 0;
  line-height: 1.1;
}
.menu-section-sub {
  margin: 6px 0 0;
  font-style: italic;
  color: var(--text-faint);
  font-size: 14px;
}
.menu-section-rule {
  width: 72px; height: 1px; margin-top: 12px;
  background: linear-gradient(90deg, #fff, transparent);
}

/* ===== Card grid ===== */
.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  /* A wide card that no longer fits its row would leave a hole: later cards fill it. */
  grid-auto-flow: dense;
  gap: 18px;
  align-items: start;
}
/* The grid's item: the card and its heart, which lies over the photo's top right corner
   (top left belongs to the "Scelta del Capitano" ribbon, bottom right to «Foto in arrivo»). */
.dish-cell { position: relative; min-width: 0; }
.dish-card {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 0 14px;
  margin: 0;
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
  -webkit-tap-highlight-color: transparent;
}
/* Hovered through its cell, so the card stays lifted while the pointer is on its heart. */
.dish-cell:hover > .dish-card, .dish-card:focus-visible {
  transform: translateY(-3px);
  background: var(--surface-2);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.dish-card:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.dish-cell.is-featured { grid-column: span 2; }
.dish-card.is-featured {
  border: 1px solid rgba(255,255,255,.55);
  background: linear-gradient(180deg, #191919, #0e0e0e);
  box-shadow: 0 0 0 4px rgba(255,255,255,.04), var(--shadow);
}
.dish-cell:hover > .dish-card.is-featured { border-color: #fff; }
.dish-card.is-featured .dish-photo { aspect-ratio: 16/8; }
@media (max-width: 560px) {
  .dish-cell.is-featured { grid-column: span 1; }
  .dish-card.is-featured .dish-photo { aspect-ratio: 16/10; }
}

/* ===== «La mia lista»: the hearts ===== */
.dish-save {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.22); color: #fff;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .25s ease, background .2s, border-color .2s, color .2s;
}
/* A fingertip-sized target around the drawn circle. */
.dish-save::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; }
.dish-cell:hover > .dish-save, .dish-card:focus-visible + .dish-save { transform: translateY(-3px); }
.dish-save:hover { border-color: rgba(255,255,255,.7); }
.dish-save:focus-visible, .list-row-save:focus-visible, .save-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.dish-save svg, .list-row-save svg, .save-toggle svg, .list-fab svg {
  width: 19px; height: 19px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
}
/* A dish in the list: white, like the ribbon of the "Scelta del Capitano", so a glance finds it. */
.dish-save[aria-pressed="true"] { background: #fff; border-color: #fff; color: #000; }
.dish-save[aria-pressed="true"] svg, .list-row-save[aria-pressed="true"] svg,
.save-toggle.is-on svg, .list-fab svg { fill: currentColor; }

/* In the dish dialog: beside the price, in words. */
.dish-modal-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 16px; margin: 8px 0 18px;
}
.dish-modal-meta .dish-modal-price { margin: 0; }
.save-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 42px; padding: 0 17px 0 14px; border-radius: 100px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.04); color: var(--text);
  /* The dialog's own lettering, like the price beside it. */
  font-family: inherit; font-size: 15px; line-height: 1.1; letter-spacing: .02em; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.save-toggle svg { width: 17px; height: 17px; }
.save-toggle:hover { border-color: #fff; }
.save-toggle.is-on { background: #fff; border-color: #fff; color: #000; }

.dish-photo {
  position: relative;
  aspect-ratio: 4/3;
  display: grid; place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #262626, #0d0d0d);
}
.dish-photo[data-cat="mare"] { background: linear-gradient(135deg, #2b2b2b, #0c0c0c); }
.dish-photo[data-cat="lago"] { background: linear-gradient(160deg, #242424, #0e0e0e); }
.dish-photo[data-cat="carne"] { background: linear-gradient(115deg, #303030, #121212); }
.dish-photo[data-cat="dolci"] { background: linear-gradient(145deg, #333333, #141414); }
.dish-photo[data-cat="bevande"] { background: linear-gradient(135deg, #222222, #0b0b0b); }
.dish-photo[data-cat="vini"] { background: linear-gradient(150deg, #2e2e2e, #0d0d0d); }
.dish-photo svg.dish-icon {
  width: 46%; height: 46%;
  stroke: rgba(255,255,255,.30);
  fill: rgba(255,255,255,.04);
}
.dish-photo::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 2px, transparent 2px 14px);
}
/* A real photo fills the frame; the tile's gradient shows only until it loads, and without the stripes.
   In the dialog the large copy lies over the small one. */
.dish-photo.has-photo::after { content: none; }
.dish-photo > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.photo-tag {
  position: absolute; right: 8px; bottom: 8px;
  font: 9.5px/1 var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 100px;
  padding: 4px 9px;
}
.ribbon {
  position: absolute; left: 8px; top: 8px;
  display: flex; align-items: center; gap: 5px;
  font: 10px/1 var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #000;
  background: #fff;
  border-radius: 100px;
  padding: 5px 11px 5px 8px;
}
.ribbon svg { width: 12px; height: 12px; fill: #000; stroke: #000; }

.dish-card-body { padding: 14px 16px 0; }
.dish-name {
  margin: 0 0 4px;
  font-family: var(--font-name);
  font-weight: 400;
  color: var(--text);
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: .025em;
}
.is-featured .dish-name { font-size: 25px; }
.dish-price {
  float: right;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
  margin-left: 10px;
  white-space: nowrap;
}
.dish-teaser {
  margin: 8px 0 12px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-dim);
  clear: both;
}
.dish-allergens { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }

/* ===== Allergen badges ===== */
.allergen-badge {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.05);
  color: #cfcfcf;
  cursor: help;
}
.allergen-badge svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor; stroke-width: 1.4;
  stroke-linecap: round; stroke-linejoin: round;
}
.dish-modal-allergens .allergen-badge { width: 32px; height: 32px; color: var(--text); }
.dish-modal-allergens .allergen-badge svg { width: 18px; height: 18px; }
.allergen-legend {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
}
/* Scoped to the wrapper only: a bare `span` here would also hit .allergen-badge
   and override its grid centering, pushing the glyph off-centre. */
.allergen-legend > .legend-item { display: inline-flex; align-items: center; gap: 6px; }
.menu-section details summary {
  cursor: pointer; color: var(--text); font-size: 14px; letter-spacing: .04em;
  text-transform: uppercase; list-style: none;
}
.menu-section details summary::-webkit-details-marker { display: none; }
.menu-section details summary::before { content: "＋ "; color: var(--text-faint); }
.menu-section details[open] summary::before { content: "－ "; }

/* ===== Scroll ship ===== */
.scroll-rail {
  position: fixed; top: calc(var(--header-h) + 90px); bottom: 24px; right: 41px;
  width: 1px; z-index: 24; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.12) 10%, rgba(255,255,255,.12) 90%, transparent);
}
/* The ship is the page's scrollbar thumb: held and dragged, it moves the page (menu.js).
   No touch scrolling on it, or a finger would pan the page instead of dragging. */
.scroll-ship {
  position: fixed; top: calc(var(--header-h) + 90px); right: 12px; width: 58px;
  z-index: 25;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.scroll-ship.is-dragging { cursor: grabbing; }
.scroll-ship svg { display: block; width: 100%; height: auto; opacity: .9; transition: opacity .2s ease; }
.scroll-ship:hover svg, .scroll-ship.is-dragging svg { opacity: 1; }
/* The section the held ship has reached, beside it. */
.scroll-ship-label {
  position: absolute; top: 50%; right: calc(100% + 6px); translate: 0 -50%;
  padding: 8px 15px; border-radius: 100px;
  background: #000; border: 1px solid var(--line-strong); color: var(--text);
  box-shadow: 0 10px 26px -12px #000;
  font: 18px/1.05 var(--font-name); letter-spacing: .03em; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.scroll-ship.is-dragging .scroll-ship-label:not(:empty) { opacity: 1; }
.scroll-ship-bob { animation: ship-bob 5s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes ship-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-3px) rotate(2deg); }
}
.scroll-rail[hidden], .scroll-ship[hidden] { display: none; }
/* The right edge belongs to the cards on a phone, so the ship only sails on wider screens. */
@media (max-width: 719px) {
  .scroll-rail, .scroll-ship { display: none; }
}

/* ===== Abbinamenti ===== */
.pairing { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.pairing[hidden] { display: none; }
.pairing-title {
  margin: 0 0 4px; font-family: var(--font-name); font-size: 20px;
  letter-spacing: .03em; color: var(--text);
}
.pairing-note { margin: 0 0 13px; font-size: 13.5px; font-style: italic; color: var(--text-faint); }
.pairing-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pairing-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 15px 9px 12px; border-radius: 100px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.pairing-chip:hover { border-color: #fff; background: rgba(255,255,255,.09); }
.pairing-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pairing-chip svg {
  width: 18px; height: 18px; flex: none;
  stroke: var(--text-dim); fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.pairing-chip-name { font-family: var(--font-name); font-size: 16px; letter-spacing: .02em; }
.pairing-chip-price { font-size: 13px; color: var(--text-dim); white-space: nowrap; }

/* Grouped with the close button: top-left belongs to the "Scelta del Capitano" ribbon. */
.dish-modal-back {
  position: absolute; top: 12px; right: 58px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.2);
  cursor: pointer; display: grid; place-items: center;
}
.dish-modal-back[hidden] { display: none; }
.dish-modal-back:hover { background: #fff; color: #000; border-color: #fff; }
.dish-modal-back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ===== Wine detail ===== */
.wine-spec {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 16px;
  margin: 0 0 16px; font-size: 15.5px;
}
.wine-spec dt {
  color: var(--text-faint); font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; padding-top: 3px;
}
.wine-spec dd { margin: 0; color: #d8d8d8; }
.wine-desc { margin: 0 0 12px; }
.wine-note { margin: 0 0 18px; font-size: 13px; font-style: italic; color: var(--text-faint); }

/* ===== Footer ===== */
.site-footer { max-width: 1080px; margin: 44px auto 0; padding: 24px 18px 0; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 13px; }
.site-footer p { margin: 4px 0; }
.site-footer-note { font-style: italic; opacity: .85; }

/* ===== Menu loading (menu.json) ===== */
.menu-status { margin: 56px 0; text-align: center; font-family: var(--font-body); font-size: 17px; font-style: italic; color: var(--text-dim); }
.menu-status button {
  margin-left: 10px; padding: 6px 16px; border-radius: 100px; cursor: pointer;
  font: inherit; font-style: normal; color: var(--text); background: transparent; border: 1px solid var(--line-strong);
}
.menu-status button:hover { border-color: #fff; }

/* ===== Menu editor preview (index.html?preview) ===== */
.is-preview .intro, .is-preview .site { transition: none; }
/* The dish being edited; dashed, so it never reads as keyboard focus. */
.dish-card.is-spotlight { outline: 2px dashed rgba(255,255,255,.85); outline-offset: 5px; }

/* ===== Dish modal ===== */
.dish-modal { position: fixed; inset: 0; z-index: 100; }
.dish-modal[hidden] { display: none; }
.dish-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.82); backdrop-filter: blur(3px); }
.dish-modal-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; pointer-events: none; }
.dish-modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: 100vh; max-height: 100svh;
  overflow-y: auto;
  background: #0b0b0b;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 30px 80px rgba(0,0,0,.8);
  pointer-events: auto;
}
@media (min-width: 720px) {
  .dish-modal-stage { padding: 28px; }
  .dish-modal-panel { border-radius: 16px; max-height: min(880px, 92vh); }
}
/* Plain entrance, used when there is no card on screen to grow from. */
.dish-modal.is-plain .dish-modal-panel { animation: modal-in .28s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* Card → dialog morph (menu.js): the stage's clip is the container travelling between
   the card and the dialog, and its background fills the container where neither reaches.
   Inside, the dialog and a copy of the card scale from their top-left corners. */
.dish-modal.is-morphing .dish-modal-stage { background: #0b0b0b; }
.dish-modal.is-morphing .dish-modal-panel { transform-origin: 0 0; pointer-events: none; }
.dish-card.is-ghost {
  position: absolute; margin: 0;
  border-radius: 0; box-shadow: none;
  transform-origin: 0 0; transition: none;
}

.dish-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; border: 1px solid rgba(255,255,255,.2); cursor: pointer;
  display: grid; place-items: center;
}
.dish-modal-close:hover { background: #fff; color: #000; border-color: #fff; }
.dish-modal-close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

.dish-modal-gallery { position: relative; background: #000; }
.dish-modal-photos { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.dish-modal-photos .dish-photo { position: absolute; inset: 0; aspect-ratio: auto; transition: opacity .35s ease; opacity: 0; }
.dish-modal-photos .dish-photo.is-active { opacity: 1; }
.gallery-arrow {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.22); color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.gallery-arrow:hover { background: #fff; color: #000; border-color: #fff; }
.gallery-arrow svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.dish-modal-gallery[data-count="1"] .gallery-arrow,
.dish-modal-gallery[data-count="1"] .gallery-dots { display: none; }
.gallery-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.gallery-dots button { width: 7px; height: 7px; padding: 0; border-radius: 50%; border: none; background: rgba(255,255,255,.35); cursor: pointer; }
.gallery-dots button.is-active { background: #fff; }

.dish-modal-body { display: grid; grid-template-columns: 1fr; gap: 0; padding: 26px 24px 30px; transition: grid-template-columns .3s ease; }
.dish-modal-body.has-gloss { grid-template-columns: minmax(0,1fr) minmax(220px, 290px); gap: 24px; align-items: start; }
.dish-modal-title {
  margin: 0; font-family: var(--font-name); color: var(--text);
  font-size: clamp(27px, 3.8vw, 36px); font-weight: 400; line-height: 1.22; letter-spacing: .025em;
}
.dish-modal-original { margin: 4px 0 0; font-size: 15.5px; font-style: italic; color: var(--text-faint); }
.dish-modal-price { margin: 8px 0 16px; font-weight: 600; color: var(--text); font-size: 17px; }
.dish-modal-desc { margin: 0 0 20px; font-size: 17px; line-height: 1.65; color: #d8d8d8; }
.dish-modal-allergens { display: flex; flex-wrap: wrap; gap: 8px; }

.gloss-term {
  font: inherit; color: #fff; background: none; border: none; padding: 0; cursor: pointer;
  text-decoration: underline dotted rgba(255,255,255,.6); text-underline-offset: 4px;
}
.gloss-term:hover, .gloss-term.is-open { text-decoration: underline solid #fff; }

.gloss-panel {
  background: #151515;
  border: 1px solid var(--line);
  border-left: 2px solid #fff;
  border-radius: 10px;
  padding: 16px 18px;
  position: relative;
  animation: gloss-in .25s ease both;
}
.gloss-panel[hidden] { display: none; }
@keyframes gloss-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.gloss-panel-term { margin: 0 0 8px; font-family: var(--font-name); color: var(--text); font-size: 21px; font-weight: 400; letter-spacing: .02em; }
.gloss-panel-text { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-dim); }
.gloss-panel-close {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-faint); cursor: pointer; display: grid; place-items: center;
}
.gloss-panel-close:hover { color: #fff; }
.gloss-panel-close svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

@media (max-width: 719px) {
  .dish-modal-body.has-gloss { grid-template-columns: 1fr; }
  .gloss-panel { margin-top: 4px; }
}

/* ===== «La mia lista»: the button and the list ===== */
.list-fab {
  position: fixed; z-index: 35; left: 50%; translate: -50% 0;
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 10px));
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 9px 0 18px; border-radius: 100px;
  border: 1px solid rgba(255,255,255,.55); background: #0b0b0b; color: #fff;
  font: 19px/1 var(--font-name); letter-spacing: .03em; white-space: nowrap;
  box-shadow: 0 14px 34px -12px #000, 0 0 0 5px rgba(0,0,0,.45);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  animation: list-fab-in .35s cubic-bezier(.2,0,0,1) both;
  transition: border-color .2s, background .2s;
}
.list-fab[hidden] { display: none; }
.list-fab:hover { border-color: #fff; background: #151515; }
.list-fab:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.list-fab svg { width: 18px; height: 18px; }
.list-fab-count {
  min-width: 32px; height: 32px; padding: 0 9px; border-radius: 100px;
  display: grid; place-items: center;
  background: #fff; color: #000; font: 600 15px/1 var(--font-body);
}
@keyframes list-fab-in { from { opacity: 0; translate: -50% 18px; } }
/* The footer's last lines stay clear of the button. */
body.has-list .site { padding-bottom: 124px; }

.list-modal { position: fixed; inset: 0; z-index: 90; }
.list-modal[hidden] { display: none; }
.list-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.74); backdrop-filter: blur(3px); }
/* A sheet from the bottom on a phone... */
.list-modal-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column;
  max-height: 88vh; max-height: 88svh;
  background: #0b0b0b; color: var(--text); font-family: var(--font-body);
  border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0;
  box-shadow: 0 -24px 60px rgba(0,0,0,.8);
  padding-bottom: env(safe-area-inset-bottom);
}
/* ...a dialog in the middle on wider screens. */
@media (min-width: 720px) {
  .list-modal-panel {
    left: 50%; right: auto; top: 50%; bottom: auto; translate: -50% -50%;
    width: min(560px, calc(100vw - 56px)); max-height: min(760px, 88vh);
    border-bottom: 1px solid var(--line); border-radius: 16px; padding-bottom: 0;
    box-shadow: 0 30px 80px rgba(0,0,0,.8);
  }
}
.list-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 0 22px; }
.list-modal-title { margin: 0; font: 400 30px/1.15 var(--font-name); letter-spacing: .025em; }
.list-modal-close {
  flex: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.2);
}
.list-modal-close:hover { background: #fff; color: #000; border-color: #fff; }
.list-modal-close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.list-modal-hint { margin: 6px 22px 4px; font-size: 14.5px; font-style: italic; line-height: 1.45; color: var(--text-faint); }

.list-modal-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px 14px; }
.list-group {
  margin: 18px 10px 4px; font: 500 11.5px/1.3 var(--font-body);
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint);
}
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row-open {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 14px;
  margin: 0; padding: 12px 10px; border: 0; border-radius: 10px;
  background: none; color: inherit; font: inherit; text-align: left;
  transition: opacity .2s ease;
}
button.list-row-open { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.list-row-open:hover { background: rgba(255,255,255,.05); }
button.list-row-open:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.list-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row-name { font: 19px/1.25 var(--font-name); letter-spacing: .025em; }
.list-row-original { font-size: 14px; font-style: italic; color: var(--text-faint); }
.list-row-price { flex: none; font-size: 15.5px; font-weight: 600; white-space: nowrap; }
.list-row-off { flex: none; font-size: 13.5px; font-style: italic; color: var(--text-faint); }
.list-row.is-off .list-row-name { color: var(--text-dim); }
.list-row-save {
  flex: none; width: 42px; height: 42px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: none; border: 1px solid transparent; color: var(--text);
  -webkit-tap-highlight-color: transparent; transition: border-color .2s, color .2s;
}
.list-row-save:hover { border-color: var(--line-strong); }
/* A heart taken back leaves its row faded until the list closes: one more tap undoes the slip. */
.list-row-save[aria-pressed="false"] { color: var(--text-dim); }
.list-row:has(.list-row-save[aria-pressed="false"]) .list-row-open { opacity: .4; }
.list-empty { margin: 22px 10px 26px; font-size: 16.5px; font-style: italic; line-height: 1.55; color: var(--text-dim); }

.list-modal-foot { display: flex; justify-content: center; padding: 12px 22px 18px; border-top: 1px solid var(--line); }
.list-modal-foot[hidden] { display: none; }
.list-clear {
  min-height: 40px; padding: 0 18px; border-radius: 100px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong); color: var(--text-dim);
  font: 14.5px/1 var(--font-body); letter-spacing: .03em;
  transition: color .2s, border-color .2s, background .2s;
}
.list-clear:hover { color: var(--text); border-color: #fff; }
.list-clear.is-armed { background: #fff; border-color: #fff; color: #000; }
.list-clear:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.service-charge { text-align: center; color: var(--text-dim); font-size: 14px; letter-spacing: .04em; margin: 8px 18px 0; }
.dish-cell > .dish-allergens { position: absolute; left: 0; right: 0; bottom: 18px; pointer-events: none; }
.dish-cell > .dish-card { height: 100%; }
.dish-cell > .dish-allergens .allergen-badge { pointer-events: auto; }
.allergen-badge { padding: 0; flex-shrink: 0; }
.dish-card.has-allergens { padding-bottom: 58px; }
.allergen-badge:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.allergen-tooltip { position: fixed; z-index: 10000; padding: 9px 13px; max-width: min(280px, calc(100vw - 24px)); border: 1px solid #777; border-radius: 7px; background: #202020; color: #fff; font: 15px/1.3 Georgia, serif; box-shadow: 0 4px 20px #0008; pointer-events: none; }
.intro .lang-switch { max-width: min(65vw, 420px); overflow-x: auto; }
.intro .lang-switch button { flex-shrink: 0; }
.lang-switch select { width: 88px; height: 34px; padding: 0 4px; border: 0; background: #080808; color: #fff; font: 13px var(--font-body); border-radius: 999px; cursor: pointer; }
