/* ============================================================
   La Terrazza · main stylesheet
   Mobile-first. Tested for 360px → 1440px.
   ============================================================ */

/* ---- Tokens ------------------------------------------------ */
:root {
  /* paper palette */
  --bg:        #F6EFDC;
  --bg-deep:   #EFE5CC;
  --paper:     #FBF6E9;
  --paper-2:   #F2E8CB;

  /* ink */
  --ink:        #1F1A14;
  --ink-soft:   #3C3326;
  --ink-muted:  #6F6249;
  --ink-faint:  #A39473;

  /* italian / wine accents */
  --wine:       #7A1A2B;
  --wine-deep:  #5A1320;
  --wine-tint:  rgba(122,26,43,0.08);
  --green:      #2E6B3E;
  --red:        #B22F35;
  --gold:       #A8854A;
  --gold-deep:  #6B521F;

  /* lines */
  --line:       rgba(31,26,20,0.12);
  --line-soft:  rgba(31,26,20,0.06);
  --line-wine:  rgba(122,26,43,0.18);

  /* layout */
  --maxw:       640px;       /* main content cap on tablet+ */
  --r-card:     14px;
  --r-pill:     999px;

  /* shadows */
  --sh-card:    0 1px 2px rgba(31,26,20,0.04), 0 4px 14px rgba(31,26,20,0.05);
  --sh-pop:     0 14px 32px rgba(20,15,8,0.18);
  --sh-drawer:  -10px 0 32px rgba(20,15,8,0.22);

  /* fonts */
  --f-display: 'Cinzel', 'Cormorant Garamond', serif;
  --f-serif:   'Cormorant Garamond', 'Cinzel', serif;
  --f-script:  'Italianno', 'Cormorant Garamond', cursive;
  --f-sans:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* safe-area */
  --sa-top:    env(safe-area-inset-top, 0px);
  --sa-bot:    env(safe-area-inset-bottom, 0px);
}

/* ---- Reset / base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html, body {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;     /* page itself never scrolls — the .main element is the scroller */
  overscroll-behavior: none;
}
body {
  font-family: var(--f-sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; padding: 0; }
button:active { transform: scale(.985); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--wine-tint); color: var(--wine-deep); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(31,26,20,0.18); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- Paper background ------------------------------------- */
.paper-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 65% 45% at 100% 0%, rgba(168,132,72,0.10), transparent 60%),
    radial-gradient(ellipse 55% 40% at 0% 100%, rgba(122,26,43,0.06), transparent 60%),
    var(--bg);
}
.paper-noise { position: absolute; inset: 0; opacity: 0.6; mix-blend-mode: multiply; }
.paper-stain { position: absolute; border-radius: 50%; filter: blur(40px); }
.paper-stain--tl { top: -60px; left: -40px; width: 220px; height: 160px; background: rgba(201,127,88,0.07); }
.paper-stain--br { bottom: 18%; right: -60px; width: 220px; height: 180px; background: rgba(122,26,43,0.05); }

/* ---- App shell — full-height column, .main is the only scroller --- */
.app {
  position: relative; z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px var(--line-soft);
  background: transparent;
  overflow: hidden;
}
@media (min-width: 720px) {
  .app {
    margin-top: 16px; margin-bottom: 16px;
    border-radius: 18px;
    background:
      radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.5), transparent 60%),
      var(--bg);
    box-shadow: 0 30px 60px rgba(20,15,8,0.18), 0 0 0 1px var(--line);
    overflow: hidden;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
  }
}

/* ---- Header — part of the flex column, never moves --------- */
.hdr {
  position: relative; z-index: 40;
  flex-shrink: 0;
  padding-top: var(--sa-top);
  background: var(--bg);
  transition: box-shadow .2s ease;
}
.hdr.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 4px 14px rgba(20,15,8,0.05); }
.hdr__inner {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 12px;
  padding: 10px 14px 8px;
  min-height: 56px;
}
.hdr__lang { justify-self: start; }
.hdr__logo { justify-self: center; }
.hdr__menu { justify-self: end; }
.hdr__hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--line) 20%, var(--line) 80%, transparent 100%);
}

/* language button */
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
  color: var(--ink);
  font-family: var(--f-sans); font-size: 12px; font-weight: 500;
  padding: 7px 10px 7px 8px;
  border-radius: var(--r-pill);
  letter-spacing: 0.06em;
  transition: background .15s, border-color .15s;
}
.lang-btn:hover { background: rgba(255,255,255,0.8); border-color: var(--line-wine); }
.lang-btn[aria-expanded="true"] { background: var(--wine-tint); border-color: var(--line-wine); }
.lang-btn__flag { font-size: 16px; line-height: 1; }
.lang-btn__code { font-weight: 600; letter-spacing: 0.08em; }
.lang-btn__chev { color: var(--ink-muted); transition: transform .2s; }
.lang-btn[aria-expanded="true"] .lang-btn__chev { transform: rotate(180deg); }

/* icon button (header + sheets) */
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
  color: var(--ink);
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.8); border-color: var(--line-wine); }
.icon-btn--ghost { border-color: transparent; background: transparent; pointer-events: none; }

/* logo */
.logo {
  display: flex; flex-direction: column; align-items: center; line-height: 1;
  color: var(--ink);
}
.logo__img { max-height: 38px; max-width: 180px; object-fit: contain; }
.logo__fallback { display: flex; flex-direction: column; align-items: center; }
.logo__small {
  font-family: var(--f-display);
  font-size: 8.5px; letter-spacing: 0.24em; font-weight: 500;
  color: var(--ink-muted); opacity: .9;
}
.logo__big {
  font-family: var(--f-display);
  font-size: 15px; letter-spacing: 0.16em; font-weight: 500;
  color: var(--ink); margin-top: 2px;
}
.logo__big--sm {
  font-family: var(--f-display);
  font-size: 11px; letter-spacing: 0.18em; font-weight: 500;
  color: var(--ink-muted); margin-top: 1px;
}

/* ---- Subcategory ribbon (also sticky) --------------------- */
.ribbon {
  display: flex; gap: 0; overflow-x: auto; overflow-y: hidden;
  padding: 6px 8px 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.ribbon::-webkit-scrollbar { display: none; }

.ribbon__item {
  flex: 0 0 auto;
  padding: 8px 14px 4px;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
  white-space: nowrap;
  transition: transform .15s;
}
.ribbon__item-label {
  font-family: var(--f-serif);
  font-size: 16.5px;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
  transition: color .2s, font-size .2s, font-weight .2s;
}
.ribbon__item.is-active .ribbon__item-label {
  color: var(--wine);
  font-style: italic;
  font-weight: 600;
  font-size: 18.5px;
}
.ribbon__item-brush {
  height: 7px; margin-top: 1px;
  width: 100%; opacity: 0; transform: scaleX(.6);
  transition: opacity .25s, transform .25s;
}
.ribbon__item.is-active .ribbon__item-brush { opacity: 1; transform: scaleX(1); }
.ribbon__item-brush svg { display: block; width: 100%; height: 100%; }

/* ---- Main scroll area — the ONLY scroller in the app -------- */
.main {
  flex: 1 1 0;
  min-height: 0;                     /* required so flexbox child can shrink and scroll */
  overflow-y: auto;
  overflow-x: hidden;                /* prevent stray horizontal scroll from bleed elements */
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* hero — italian flag brush banner under the sticky header */
.hero {
  position: relative;
  text-align: center;
  padding: 32px 22px 26px;      /* title sits high, right inside the brush zone */
  isolation: isolate;
  overflow: visible;
}
/* the painted tricolor brush curtain — purely decorative, softened */
.hero::before {
  content: '';
  position: absolute;
  top: -10px; left: -8px; right: -8px;
  height: 200px;
  background-image: url('../images/flag-brush-top.svg?v=1');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  z-index: -1;
  opacity: 0.5;
  mix-blend-mode: multiply;
  filter: saturate(0.78);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  pointer-events: none;
}
/* warm paper "spotlight" behind the title, anchored to the title row */
.hero::after {
  content: '';
  position: absolute;
  left: 50%; top: 14px;
  width: 86%; max-width: 460px; height: 140px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(251,246,233,0.95) 0%, rgba(251,246,233,0.55) 45%, rgba(251,246,233,0) 75%);
  z-index: -1;
  pointer-events: none;
}
.hero__eyebrow {
  font-family: var(--f-sans); font-size: 11.5px;
  color: var(--ink-muted); letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.hero__title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(34px, 9.5vw, 46px);   /* much bigger — was 26-34, now 34-46 */
  color: var(--ink);
  letter-spacing: 0.04em;
  line-height: 1.05;
}
.hero__brush { display: flex; justify-content: center; margin-top: 8px; height: 14px; }
.hero__brush svg { width: 200px; height: 14px; }
.hero__hint {
  font-family: var(--f-script);
  font-size: 26px;
  color: var(--wine);
  font-style: italic;
  margin-top: 4px;
  min-height: 26px;
}
.hero__action {
  margin-top: 14px;
  display: flex; justify-content: center;
}
.hero__action[hidden] { display: none; }

/* ---- Content sections ------------------------------------- */
.content { padding: 4px 0 20px; }

.cat-anchor { scroll-margin-top: 20px; }

.cat-title {
  display: flex; align-items: center; gap: 18px;
  padding: 60px 22px 4px;            /* lots of breathing room */
}
.cat-title__line {
  flex: 1 1 auto; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(122,26,43,0.35) 30%, rgba(122,26,43,0.35) 70%, transparent 100%);
}
.cat-title__text {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--wine);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cat-title__deco {
  display: flex; justify-content: center;
  padding: 10px 0 20px;
}
.cat-title__deco svg { display: block; }

/* dish list */
.dish-list { padding: 0 22px; }
.dish {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  width: 100%;
  align-items: stretch;
}
.dish:last-child { border-bottom: 0; }
.dish--openable { cursor: pointer; }
.dish--openable:hover .dish__name { color: var(--wine-deep); }

.dish__photo {
  flex-shrink: 0;
  width: 92px; height: 92px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  box-shadow: var(--sh-card);
  position: relative;
}
.dish__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish__photo--empty {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-script);
  color: var(--ink-faint);
  font-size: 38px; line-height: 1;
  background: linear-gradient(135deg, var(--paper) 0%, var(--paper-2) 100%);
}

/* no-photo / drinks layout — no image column */
.dish--nopic { padding: 13px 0; }
.dish--nopic .dish__main { padding: 0; min-height: 0; }
.dish--nopic .dish__name { font-size: 17px; }

.dish__main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 2px 0;
}
.dish__head { display: flex; align-items: baseline; gap: 8px; }
.dish__name {
  font-family: var(--f-serif);
  font-weight: 700; font-size: 19px;
  color: var(--wine);
  line-height: 1.12;
  letter-spacing: 0.005em;
}
.dish__name-leader {
  flex: 1 1 auto;
  align-self: flex-end;
  border-bottom: 1px dotted var(--line);
  margin: 0 4px 6px;
  display: none;
}
.dish__price-inline {
  font-family: var(--f-script);
  font-style: italic;
  font-size: 23px;
  color: var(--wine);
  white-space: nowrap;
  align-self: baseline;
}
.dish__desc {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.4;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dish__foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-top: 6px;
}
.dish__weight {
  font-family: var(--f-script); font-style: italic;
  font-size: 18px; color: var(--ink-muted);
  line-height: 1;
}
.dish__price {
  font-family: var(--f-script); font-style: italic;
  font-size: 23px; color: var(--wine);
  line-height: 1;
}

/* drinks / bar layout: name + weight + price on one row */
.dish--nopic .dish__foot { margin-top: 4px; }

/* ============================================================
   WINE LIST — premium look, based on printed Wine Cellar booklet
   ============================================================ */

/* "Open wine card" callout in bar section ------------------- */
.wine-callout {
  position: relative;
  margin: 22px 18px 8px;
  padding: 28px 22px 22px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #FCF8EA 0%, #F0E5C7 100%);
  border: 1px solid rgba(122,26,43,0.22);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.6),
    0 2px 6px rgba(31,26,20,0.05),
    0 18px 42px rgba(31,26,20,0.10);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
/* faded vineyard watermark behind the text */
.wine-callout__art {
  position: absolute;
  inset: auto 0 -10% 0;
  height: 80%;
  background-image: url('../images/vineyard.svg');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  opacity: 0.18;
  z-index: -1;
  mix-blend-mode: multiply;
  filter: saturate(0.85);
}
/* dashed inner frame (like printed pages) */
.wine-callout::before {
  content: ''; position: absolute; inset: 10px;
  border: 1px dashed rgba(122,26,43,0.25);
  border-radius: 12px;
  pointer-events: none;
}
.wine-callout__eyebrow {
  font-family: var(--f-sans); font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--gold-deep); font-weight: 600;
}
.wine-callout__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: 26px; letter-spacing: 0.14em; color: var(--wine);
  margin: 8px 0 0;
  line-height: 1.05;
}
.wine-callout__divider {
  margin: 8px auto 6px;
  width: 80px; height: 8px;
}
.wine-callout__sub {
  font-family: var(--f-script); font-style: italic; font-size: 22px;
  color: var(--ink-muted);
}
.wine-callout__btn {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 16px;
  padding: 12px 26px;
  border: 1px solid var(--wine);
  background: linear-gradient(180deg, var(--wine) 0%, var(--wine-deep) 100%);
  color: var(--paper);
  border-radius: var(--r-pill);
  font-family: var(--f-sans); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(122,26,43,0.28);
  transition: transform .15s, box-shadow .15s;
}
.wine-callout__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(122,26,43,0.34); }
.wine-callout__btn:active { transform: translateY(0); }

/* Wine row — single bottle / glass line */
.wine-row {
  position: relative;
  padding: 16px 4px 18px;
  border-bottom: 1px solid var(--line);
}
.wine-row:last-child { border-bottom: 0; }
.wine-row__top {
  display: grid; grid-template-columns: 1fr auto;
  gap: 14px; align-items: start;
}
.wine-row__main { min-width: 0; }
.wine-row__pricebox {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 2px;
}
.wine-section__title-wrap {
  display: inline-flex; align-items: center; justify-content: center;
}
.wine-row__name {
  font-family: var(--f-serif); font-weight: 700; font-size: 19px;
  color: var(--wine);
  letter-spacing: 0.005em;
  line-height: 1.18;
}
.wine-row__price {
  font-family: var(--f-script); font-style: italic;
  font-size: 26px; color: var(--wine); white-space: nowrap;
  line-height: 1;
}
.wine-row__region {
  font-family: var(--f-sans); font-size: 10.5px;
  color: var(--ink-muted); margin-top: 5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.wine-row__grape {
  font-family: var(--f-serif); font-style: italic;
  font-size: 14px; color: var(--ink-soft); margin-top: 4px;
  letter-spacing: 0.01em;
}
.wine-row__desc {
  font-family: var(--f-serif); font-style: italic;
  font-size: 13px; color: var(--ink-muted); line-height: 1.45;
  margin-top: 6px; max-width: 95%;
}
.wine-row__volume {
  font-family: var(--f-script); font-style: italic;
  font-size: 18px; color: var(--ink-muted);
  margin-top: 2px;
  text-align: right;
}

/* "in stop list" softening — currently hidden from menu, but kept
   here in case admin chooses to surface them via setting */
.dish.is-stop { opacity: .45; pointer-events: none; }
.dish.is-stop::after {
  content: attr(data-stop);
  position: absolute; right: 0; top: 8px;
  font-family: var(--f-sans); font-size: 10px;
  color: var(--wine); letter-spacing: 0.18em; text-transform: uppercase;
}

/* ---- Footer ----------------------------------------------- */
.foot {
  text-align: center; padding: 32px 24px 28px;
}
.foot__brushdot { display: flex; justify-content: center; }
.foot__slogan {
  margin: 16px 0 18px;
  font-family: var(--f-serif); font-style: italic;
  font-size: 16px; color: var(--ink-muted);
}
.review-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  background: var(--wine); color: var(--paper);
  border: 1px solid var(--wine);
  border-radius: var(--r-pill);
  font-family: var(--f-sans); font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(122,26,43,0.22);
  transition: background .15s, transform .15s;
}
.review-btn:hover { background: var(--wine-deep); }
.review-btn[hidden] { display: none; }
.foot__thanks {
  margin: 22px 8px 0;
  font-family: var(--f-script); font-style: italic;
  font-size: 22px; color: var(--wine);
}

/* ---- Bottom nav (sections) -------------------------------- */
.botnav {
  position: relative; z-index: 35;
  flex-shrink: 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 8px rgba(31,26,20,0.04);
}
.botnav__tricolor {
  display: flex; height: 2px;
}
.botnav__tricolor span:nth-child(1) { flex: 1; background: var(--green); opacity: .85; }
.botnav__tricolor span:nth-child(2) { flex: 1; background: #F0E8D5; }
.botnav__tricolor span:nth-child(3) { flex: 1; background: var(--red); opacity: .85; }
.botnav__row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 8px 8px 4px;
}
.botnav__safe { height: var(--sa-bot); }
.bot-tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px 4px;
  color: var(--ink-muted);
  transition: color .15s;
  position: relative;
}
.bot-tab__label {
  font-family: var(--f-serif); font-weight: 500;
  font-size: 13px; letter-spacing: 0.02em;
}
.bot-tab__brush {
  height: 7px; opacity: 0; transition: opacity .2s;
  display: flex; justify-content: center;
}
.bot-tab__brush svg { width: 40px; height: 7px; }
.bot-tab.is-active { color: var(--wine); }
.bot-tab.is-active .bot-tab__label { font-style: italic; font-weight: 600; }
.bot-tab.is-active .bot-tab__brush { opacity: 1; }

/* ---- Language popover ------------------------------------- */
.lang-pop {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(20,15,8,0);
  transition: background .2s;
}
.lang-pop.is-open { background: rgba(20,15,8,0.25); }
.lang-pop__list {
  position: absolute;
  top: calc(var(--sa-top) + 56px); left: 12px;
  width: min(260px, 80vw);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--sh-pop);
  padding: 6px;
  transform: translateY(-8px) scale(.96);
  opacity: 0; transform-origin: top left;
  transition: transform .22s cubic-bezier(.2,.7,.2,1), opacity .15s;
  max-height: 70vh; overflow-y: auto;
}
.lang-pop.is-open .lang-pop__list { transform: translateY(0) scale(1); opacity: 1; }
.lang-row {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 10px; width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  font-family: var(--f-serif); font-size: 17px; color: var(--ink);
  transition: background .12s;
}
.lang-row:hover { background: rgba(31,26,20,0.04); }
.lang-row.is-active {
  background: var(--wine-tint);
  color: var(--wine); font-style: italic; font-weight: 600;
}
.lang-row__flag { font-size: 22px; line-height: 1; }
.lang-row__native { flex: 1; }
.lang-row__check {
  font-family: var(--f-script); font-style: italic; font-size: 20px;
  color: var(--wine); opacity: 0;
}
.lang-row.is-active .lang-row__check { opacity: 1; }

/* ---- Side drawer ------------------------------------------ */
.drawer {
  position: fixed; inset: 0; z-index: 90;
  pointer-events: none;
}
.drawer.is-open { pointer-events: auto; }
.drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(20,15,8,0);
  transition: background .3s;
}
.drawer.is-open .drawer__scrim { background: rgba(20,15,8,0.45); }
.drawer__panel {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(360px, 88vw);
  background: var(--paper);
  box-shadow: var(--sh-drawer);
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column;
  overflow: hidden;
  padding-top: var(--sa-top);
  padding-bottom: var(--sa-bot);
}
.drawer.is-open .drawer__panel { transform: translateX(0); }

.drawer__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px;
}
.drawer__hero {
  text-align: center; padding: 12px 24px 12px;
}
.drawer__logo {
  display: flex; flex-direction: column; align-items: center;
}
.drawer__logo img { max-height: 56px; max-width: 220px; object-fit: contain; }
.drawer__art { margin: 6px auto 8px; max-width: 280px; }
.drawer__tagline {
  font-family: var(--f-serif); font-style: italic;
  font-size: 14.5px; color: var(--ink-muted);
  margin-top: 6px;
}
.tricolor-strip { display: flex; height: 3px; margin: 0 18px; border-radius: 2px; overflow: hidden; }
.tricolor-strip span:nth-child(1) { flex: 1; background: var(--green); }
.tricolor-strip span:nth-child(2) { flex: 1; background: #F0E8D5; }
.tricolor-strip span:nth-child(3) { flex: 1; background: var(--red); }

.drawer__list {
  flex: 1 1 auto; overflow-y: auto;
  padding: 18px 8px 18px;
}
.drawer-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: background .12s;
}
.drawer-item:hover { background: rgba(31,26,20,0.03); }
.drawer-item__icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--wine-tint);
  color: var(--wine);
  border: 1px solid var(--line-wine);
}
.drawer-item__main { flex: 1; min-width: 0; }
.drawer-item__label {
  font-family: var(--f-serif); font-weight: 600; font-size: 16.5px;
  color: var(--ink);
}
.drawer-item__hint {
  font-family: var(--f-sans); font-size: 11.5px; color: var(--ink-muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drawer-item__chev { color: var(--ink-faint); flex-shrink: 0; }

.drawer__foot {
  padding: 14px 22px 22px; text-align: center;
  border-top: 1px solid var(--line);
}
.drawer__logo-small { display: flex; flex-direction: column; align-items: center; }
.drawer__slogan {
  font-family: var(--f-serif); font-style: italic;
  font-size: 13px; color: var(--ink-muted);
  margin-top: 8px;
}

/* drawer coastal watercolor */
.coastal {
  display: block; margin: 0 auto;
}

/* ---- Dish sheet ------------------------------------------- */
.sheet {
  position: fixed; inset: 0; z-index: 100;
  pointer-events: none;
}
.sheet.is-open { pointer-events: auto; }
.sheet__scrim {
  position: absolute; inset: 0;
  background: rgba(20,15,8,0);
  transition: background .28s;
}
.sheet.is-open .sheet__scrim { background: rgba(20,15,8,0.55); }
.sheet__panel {
  position: absolute; left: 50%; right: 0; bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%; max-width: var(--maxw);
  height: calc(100% - 38px);
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  box-shadow: 0 -16px 50px rgba(0,0,0,0.32);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
.sheet.is-open .sheet__panel { transform: translate(-50%, 0); }
.sheet__scroll {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(40px + var(--sa-bot));
}
.sheet__hero {
  position: relative;
  width: 100%; height: 320px;
  background: linear-gradient(135deg, var(--paper) 0%, var(--paper-2) 100%);
  overflow: hidden;
}
.sheet__hero img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.sheet__hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 80px;
  background: linear-gradient(180deg, transparent 0%, rgba(246,239,220,0.92) 90%);
  pointer-events: none;
}
.sheet__close {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: rgba(255,255,255,0.9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft);
}
.sheet__handle {
  width: 42px; height: 4px; border-radius: 2px;
  background: rgba(31,26,20,0.16);
  margin: -10px auto 6px;
  position: relative; z-index: 3;
}
.sheet__body {
  padding: 0 24px 32px;
}
.sheet__title {
  margin: 6px 0 0;
  font-family: var(--f-serif); font-weight: 700;
  font-size: clamp(28px, 8vw, 36px);
  color: var(--wine);
  line-height: 1.05;
  letter-spacing: 0.003em;
}
.sheet__priceline {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 10px;
}
.sheet__weight {
  font-family: var(--f-script); font-style: italic;
  font-size: 24px; color: var(--ink-muted);
}
.sheet__price {
  font-family: var(--f-script); font-style: italic;
  font-size: 34px; color: var(--wine);
}
.sheet__divider {
  height: 1px; background: var(--line); margin: 20px 0;
}
.sheet__desc {
  font-family: var(--f-serif); font-style: italic;
  font-size: 16.5px; color: var(--ink); line-height: 1.55;
  margin: 0;
}
.section-label {
  font-family: var(--f-sans); font-weight: 600;
  font-size: 10px; letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.sheet__section { margin-top: 22px; }
.sheet__section p {
  font-family: var(--f-sans); font-size: 14px; line-height: 1.55;
  color: var(--ink); margin: 8px 0 0;
}
.allergens { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.allergen {
  font-family: var(--f-sans); font-size: 11px; font-weight: 500;
  color: var(--wine);
  background: var(--wine-tint);
  border: 1px solid var(--line-wine);
  padding: 4px 10px; border-radius: var(--r-pill);
  letter-spacing: 0.02em;
}
.sheet__footer {
  margin-top: 30px; padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.sheet__footer-text {
  font-family: var(--f-serif); font-style: italic;
  font-size: 13px; color: var(--ink-muted);
  text-align: right; line-height: 1.3;
}

/* ---- About / Contacts page sheet -------------------------- */
.page-sheet {
  position: fixed; inset: 0; z-index: 95;
  pointer-events: none;
}
.page-sheet.is-open { pointer-events: auto; }
.page-sheet__scrim {
  position: absolute; inset: 0;
  background: rgba(20,15,8,0);
  transition: background .28s;
}
.page-sheet.is-open .page-sheet__scrim { background: rgba(20,15,8,0.45); }
.page-sheet__panel {
  position: absolute; left: 50%; right: 0; bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%; max-width: var(--maxw);
  height: calc(100% - 38px);
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
  padding-top: var(--sa-top);
}
.page-sheet.is-open .page-sheet__panel { transform: translate(-50%, 0); }
.page-sheet__top {
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center;
  padding: 10px 14px 10px;
  border-bottom: 1px solid var(--line);
}
.page-sheet__top h2 {
  margin: 0;
  font-family: var(--f-display); font-size: 17px;
  letter-spacing: 0.18em; text-transform: uppercase;
  text-align: center; color: var(--ink);
  font-weight: 500;
}
.page-sheet__body {
  flex: 1; overflow-y: auto;
  padding: 24px 24px calc(60px + var(--sa-bot));
}
.page-body {
  font-family: var(--f-serif); font-size: 17px; line-height: 1.6;
  color: var(--ink);
}
.page-body h1, .page-body h2, .page-body h3 {
  font-family: var(--f-display); font-weight: 500;
  color: var(--ink); letter-spacing: 0.04em; margin: 24px 0 8px;
}
.page-body h1 { font-size: 26px; }
.page-body h2 { font-size: 21px; }
.page-body h3 { font-size: 17px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--wine); }
.page-body p { margin: 12px 0; }
.page-body a { color: var(--wine); text-decoration: underline; text-underline-offset: 3px; }
.page-body ul { padding-left: 22px; }
.page-body em { font-style: italic; color: var(--wine); }

/* contacts card grid */
.contact-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.contact-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none; color: var(--ink);
  transition: background .12s, border-color .12s, transform .15s;
}
.contact-row:hover { border-color: var(--line-wine); background: #FFFCF1; }
.contact-row__icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: var(--wine-tint); color: var(--wine);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-wine);
}
.contact-row__main { flex: 1; min-width: 0; }
.contact-row__label {
  font-family: var(--f-sans); font-size: 10px; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold-deep);
}
.contact-row__value {
  font-family: var(--f-serif); font-size: 16px; font-weight: 600;
  color: var(--ink); margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.contact-row__chev { color: var(--ink-faint); flex-shrink: 0; }

.empty-state {
  text-align: center; padding: 60px 30px;
  color: var(--ink-muted);
}
.empty-state__big {
  font-family: var(--f-script); font-style: italic;
  font-size: 42px; color: var(--wine); margin-bottom: 8px;
}
.empty-state__small {
  font-family: var(--f-serif); font-size: 16px; font-style: italic;
}

/* ---- Wine card full screen — premium booklet look --------- */
.winecard {
  position: fixed; inset: 0; z-index: 98;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, #FBF6E2 0%, #F2E8CB 60%, #EFE3C1 100%);
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
}
.winecard.is-open { transform: translateY(0); }
@media (min-width: 720px) {
  .winecard {
    left: 50%; transform: translate(-50%, 100%);
    width: 100%; max-width: var(--maxw);
    top: 16px; bottom: 16px; border-radius: 22px;
    box-shadow: 0 30px 80px rgba(20,15,8,0.45);
  }
  .winecard.is-open { transform: translate(-50%, 0); }
}

/* Subtle warm tint at the top of the wine card — no more circular stains */
.winecard::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(168,132,72,0.08), transparent 70%);
  pointer-events: none;
}

.winecard__top {
  position: relative; z-index: 5;
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center;
  padding: 14px 14px 6px;
  padding-top: calc(14px + var(--sa-top));
}
.winecard__top .icon-btn { background: rgba(255,255,255,0.6); }

.winecard__brand {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 2px;
}
.winecard__brand .logo__small { font-size: 9px; letter-spacing: 0.32em; opacity: .7; }
.winecard__brand .logo__big   { font-size: 14px; letter-spacing: 0.22em; }

/* SCROLLER — single scroll container for hero + tabs + list */
.winecard__scroll {
  position: relative; z-index: 5;
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* HERO — vineyard watercolor + section title; scrolls away with content */
.winecard__hero {
  position: relative; z-index: 2;
  padding: 8px 24px 18px;
  text-align: center;
}
.winecard__hero-art {
  display: block;
  width: 100%; max-width: 480px;
  height: auto; max-height: 220px;
  margin: 0 auto 14px;
  object-fit: contain;
  /* multiply blends any remaining beige paper from the SVG into our cream page */
  mix-blend-mode: multiply;
  filter: saturate(0.96) contrast(1.04);
}
.winecard__hero-title {
  margin: 0;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(26px, 8vw, 34px);
  color: var(--ink);
  letter-spacing: 0.22em;
  line-height: 1.1;
  text-transform: uppercase;
}
.winecard__hero-line {
  margin: 12px auto 0;
  width: 84px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--wine) 50%, transparent);
}

/* TABS — sticky to the top of the scroller after the hero scrolls past */
.winecard__tabs {
  position: sticky; top: 0; z-index: 6;
  display: flex; gap: 0;
  padding: 6px 22px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(246,239,220,0.92);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  justify-content: center;
}
.wine-tab {
  flex: 0 1 180px;
  padding: 10px 14px 6px;
  background: transparent;
  font-family: var(--f-serif); font-weight: 500;
  font-size: 16px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  transition: color .2s, font-weight .2s, font-style .2s;
  display: flex; flex-direction: column; align-items: center;
}
.wine-tab__brush {
  height: 8px; margin-top: 3px; width: 100%;
  opacity: 0; transform: scaleX(.5);
  transition: opacity .25s, transform .25s;
}
.wine-tab__brush svg { width: 100%; height: 100%; }
.wine-tab.is-active {
  color: var(--wine);
  font-style: italic; font-weight: 600; font-size: 17px;
}
.wine-tab.is-active .wine-tab__brush { opacity: 1; transform: scaleX(1); }

/* BODY — list of regions + wines (no longer the scroll container) */
.winecard__body {
  position: relative;
  padding: 10px 26px calc(48px + var(--sa-bot));
}

/* Region/type section header */
.wine-section {
  margin-top: 26px;
}
.wine-section:first-child { margin-top: 12px; }
.wine-section__head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.wine-section__line { flex: 1; height: 1px; background: var(--line); }
.wine-section__grape {
  width: 28px; height: 28px; flex-shrink: 0;
  opacity: 0.95;
}
.wine-section__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
}
.wine-section__sub {
  font-family: var(--f-script); font-style: italic;
  font-size: 22px; color: var(--wine); text-align: center;
  margin: -6px 0 14px;
}

/* Empty state inside wine card */
.winecard__body .empty-state__big {
  font-family: var(--f-script); font-size: 56px; color: var(--wine);
}

/* ---- Splash ----------------------------------------------- */
.splash {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .35s ease, visibility .35s;
}
.splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash__inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.splash__logo { display: flex; flex-direction: column; align-items: center; }
.splash__logo .logo__big { font-size: 26px; letter-spacing: 0.22em; }
.splash__logo .logo__small { font-size: 11px; letter-spacing: 0.32em; margin-bottom: 4px; }
.splash__brush { height: 14px; }
.splash__brush svg { width: 220px; height: 14px; }
.splash__spinner {
  margin-top: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line-wine);
  border-top-color: var(--wine);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* prevent body scroll when overlay open */
body.is-locked { overflow: hidden; touch-action: none; }

/* error banner */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; border-radius: 999px;
  font-family: var(--f-sans); font-size: 13px;
  z-index: 250; box-shadow: var(--sh-pop);
  opacity: 0; transition: opacity .25s;
}
.toast.is-show { opacity: 1; }

/* ---- Tablet / desktop polish ------------------------------ */
@media (min-width: 720px) {
  .hdr { background: rgba(246,239,220,0.85); }
  .hero { padding-top: 28px; }
  .dish__photo { width: 110px; height: 110px; }
  .dish__name { font-size: 21px; }
  .sheet__hero { height: 380px; }
}

/* hide elements with [hidden] even if display set elsewhere */
[hidden] { display: none !important; }

/* small focus ring */
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 2px;
}

/* a category section header */
.cat-anchor + .cat-anchor { /* placeholder for future */ }
