/* AIWine.co.nz — shared styles */

/* ⚠ MAINTENANCE — assets/boot.js MIRRORS PART OF THIS FILE. Read before editing:
   1. FONTS are loaded by boot.js (preconnect + parallel <link>), NOT by an @import
      here — an @import at the top forced the browser to parse this whole file before
      it could fetch the fonts (render-blocking). If the font family list changes,
      change it in boot.js.
   2. CRITICAL CSS: boot.js inlines a hand-kept SUBSET of this file (the :root tokens
      below + base html/body + the .nav / .nav-logo / .nav-links / .btn rules) so the
      page paints styled before styles.css loads. If you change any of those TOKENS
      or NAV rules here, MIRROR the change in boot.js's #aw-critical block, or the
      first paint will briefly use stale values.
   3. styles.css is loaded NON-BLOCKING by boot.js (media=print swap) with a reveal
      gate (aw-css-pending). Don't re-add a blocking <link> for it in page HTML. */

/* STAND-IN SERIF, SIZED LIKE CORMORANT (design audit, 30 Oct 2026).
   Cormorant Garamond arrives ~1.9 s after the page starts, even on a fast line.
   Until then headings drew in Georgia, which is 12% wider (22% in italic), so
   when the brand font landed every large heading re-wrapped — a two-line title
   became one and the page jumped (layout shift 0.17–0.34 on content and wine
   pages). These faces are Georgia scaled to Cormorant's measured width and
   height; every stack reads 'Cormorant Garamond','Cormorant Fallback',serif.
   Measured in Chromium against the same Google Fonts files the site loads. A
   device without Georgia (Android) skips them and uses its own serif, as before.
   Mirrored in boot.js #aw-critical. */
@font-face { font-family: 'Cormorant Fallback'; src: local('Georgia'); font-weight: 300 700; font-display: swap;
  size-adjust: 88%; ascent-override: 104.5%; descent-override: 33%; line-gap-override: 0%; }
@font-face { font-family: 'Cormorant Fallback'; src: local('Georgia Italic'), local('Georgia-Italic'); font-style: italic; font-weight: 300 700; font-display: swap;
  size-adjust: 78%; ascent-override: 117.9%; descent-override: 37.2%; line-gap-override: 0%; }
/* Arial sized like Manrope, the body font (30 Oct 2026) — paragraphs drew in the system font
   and re-wrapped when Manrope arrived (e.g. sonic-seasoning's intro 5 lines → 4). Width from
   the site's own text (regular 102.4%, bold 98%), height from Manrope's 1.07 / 0.30. */
@font-face { font-family: 'Manrope Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 200 500; font-display: swap;
  size-adjust: 102.4%; ascent-override: 104.5%; descent-override: 29.3%; line-gap-override: 0%; }
@font-face { font-family: 'Manrope Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 600 800; font-display: swap;
  size-adjust: 98%; ascent-override: 109.2%; descent-override: 30.6%; line-gap-override: 0%; }
/* Courier New for JetBrains Mono, the labels' font (30 Oct 2026): both are monospaced at
   exactly 0.6 em a letter, so no scaling — the system monospace (Consolas, 0.55 em) is
   narrower, and a breadcrumb that fitted wrapped onto a second line when the font landed. */
@font-face { font-family: 'JetBrains Mono Fallback'; src: local('Courier New'), local('CourierNewPSMT'); font-weight: 100 500; font-display: swap;
  size-adjust: 100%; ascent-override: 102%; descent-override: 30%; line-gap-override: 0%; }
@font-face { font-family: 'JetBrains Mono Fallback'; src: local('Courier New Bold'), local('CourierNewPS-BoldMT'); font-weight: 600 800; font-display: swap;
  size-adjust: 100%; ascent-override: 102%; descent-override: 30%; line-gap-override: 0%; }

:root {
  /* palette — warm bone, claret, aged brass */
  --bg: #F4EFE5;
  --bone: #F4EFE5;   /* = --bg. about.html + faq.html CTAs used --bone and nothing defined it: their headings rendered near-black on claret (7 Oct 2026) */
  --bg-alt: #EDE6D8;
  --card: #FAF6EE;
  --ink: #1B1410;
  --ink-soft: #4A3D34;
  --muted: #706558;   /* text-safe: 4.5:1 on --bg-alt (was #8B7E6E, 3.2:1) */
  --line: #D8CFBE;
  --claret: #5C1B27;
  --claret-deep: #3A0E18;
  --brass: #A98654;
  --brass-soft: #C9A878;
  --muted-ink: #6B5F52;   /* AA-safe text (≈4.5:1 on bone) — use for meta/hint TEXT */
  --brass-ink: #7A5E2E;   /* AA-safe text (≈4.6:1 on bone) — use for label/link TEXT */

  /* wine-label tint palette by variety */
  --t-pinot: #6B1F2A;
  --t-syrah: #2A0E18;
  --t-chard: #C9A45A;
  --t-sauv: #B8C28A;
  --t-pinotg: #D9B58C;
  --t-ries: #E0CC74;
  --t-rose: #D9889A;
  --t-merlot: #4A1722;
  --t-cab: #2E0A14;
  --t-sparkling: #E8DDB0;

  /* type scale */
  --t-display: clamp(48px, 7vw, 96px);
  --t-h1: clamp(40px, 5vw, 64px);
  --t-h2: clamp(28px, 3vw, 40px);
  --t-h3: clamp(20px, 2vw, 24px);
  --t-body: 17px;
  --t-small: 14px;
  --t-tiny: 11px;

  /* spacing */
  /* BR-20: never closer to the edge than the iPhone's notch / Dynamic Island
     in landscape (viewport-fit=cover); env() is 0 everywhere else. */
  --pad-x: max(clamp(24px, 5vw, 80px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --pad-y: clamp(56px, 8vw, 120px);
}

/* BR-08: light design only. `only` stops Samsung Internet's dark mode (and
   Chrome's optional auto-dark) repainting the site in its own colours. */
:root { color-scheme: only light; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope','Manrope Fallback', system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
/* Native ticks and radio dots in the brand colour, not the browser's blue
   (design audit, 30 Oct 2026). On body, so a lens's --claret (Discover green) applies. */
body { accent-color: var(--claret); }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }

.serif { font-family: 'Cormorant Garamond','Cormorant Fallback', Georgia, serif; font-weight: 400; }
.mono { font-family: 'JetBrains Mono','JetBrains Mono Fallback', ui-monospace, monospace; }
.label {
  font-family: 'JetBrains Mono','JetBrains Mono Fallback', ui-monospace, monospace;
  font-size: var(--t-tiny);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-ink);
}

/* ============ NAV ============ */
/* ⚠ The .nav / .nav-logo / .nav-links / .nav-actions / .btn rules below are mirrored
   in boot.js #aw-critical (above-the-fold). Mirror any change there too. */
.nav {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: baseline; justify-content: space-between;
  /* BR-07: env() is 0 in a browser tab; it clears the clock / Dynamic Island
     when the site runs from the iPhone Home Screen. */
  padding: calc(22px + env(safe-area-inset-top, 0px)) var(--pad-x) 18px;
  background: rgba(244, 239, 229, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  display: flex; align-items: baseline; gap: 8px;
  font-family: 'Cormorant Garamond','Cormorant Fallback', serif;
  font-size: 28px; font-weight: 500;
  letter-spacing: -0.01em;
}
/* The AIWine icon, small, before the name (Tim, 3 Nov 2026: "subtle"). Decorative: the link already says AIWine. */
.nav-logo::before { content: ""; flex: none; align-self: center; width: 22px; height: 22px; margin-right: -1px; border-radius: 5px; background: url(/brand/aiwine/aiwine-favicon-48.png) center / 100% no-repeat; }
.nav-logo .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--claret); display: inline-block; transform: translateY(-0.28em); }
.nav-logo .tld { color: var(--muted-ink); font-size: 18px; font-style: italic; }
.nav-logo .sfx { font-family: 'Cormorant Garamond','Cormorant Fallback', serif; font-style: italic; font-size: 20px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--claret); margin-left: 12px; padding-left: 13px; border-left: 1px solid var(--line); line-height: 1; align-self: baseline; white-space: nowrap; }   /* "Cellar Door" stays on one line (23 Oct 2026) */

.nav-links { display: flex; gap: 32px; align-items: baseline; }
.nav-link {
  font-size: 14px; font-weight: 500;
  position: relative;
  padding: 6px 0;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.nav-link:hover { color: var(--claret); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; border-radius: 2px; background: var(--claret);
}

.nav-actions { display: flex; gap: 12px; align-items: baseline; }
/* One line per link (design audit, 30 Oct 2026). From 1241 to ~1470 px — the
   common laptop widths 1280, 1366 and 1440 — four links and three buttons did not
   fit, so every link broke onto two lines ("Start / Here") and the header grew
   from 87 to 104 px. Measured: tighter gaps and button padding in that band keep
   everything on one line, inside the viewport, from 1241 px up — the band's
   rules sit after "Nav alignment" below, which sets the .nav gap. Mirrored in
   boot.js #aw-critical. */
.nav-link { white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em;
  background: transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-primary {
  background: var(--claret); color: var(--bg);
  border-color: var(--claret);
}
.btn-primary:hover { background: var(--claret-deep); border-color: var(--claret-deep); color: var(--bg); }
.btn-ghost { border-color: var(--line); color: var(--ink-soft); }

/* ===== Loading skeleton (shared; also in browse.css for the wines page) =====
   Used by the homepage featured grid + wines catalogue so a grid is never a
   blank dead-end while async data loads. */
.wine-skeleton { cursor: default; pointer-events: none; overflow: hidden; }
.wine-skeleton .ws-shot { aspect-ratio: 3/4; background: var(--bg-alt, #F1E9DA); position: relative; }
.wine-skeleton .ws-line { height: 13px; margin: 14px 18px 0; border-radius: 3px; background: var(--bg-alt, #F1E9DA); position: relative; overflow: hidden; }
.wine-skeleton .ws-line.short { width: 52%; margin-bottom: 18px; }
.wine-skeleton .ws-shot::after, .wine-skeleton .ws-line::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-100%); animation: ws-shimmer 1.25s infinite; }
@keyframes ws-shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .wine-skeleton .ws-shot::after, .wine-skeleton .ws-line::after { animation: none; } }
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-koru { background: var(--claret); color: var(--bg); border-color: var(--claret); }
.btn-koru:hover { background: var(--claret-deep); border-color: var(--claret-deep); color: var(--bg); }
/* DR-17 (Tim, 30 Oct 2026): "Your Sommelier" (Discover: "Your Wine Guide") is for
   visitors who are not signed in — it is the invitation to create an account. A
   signed-in shopper has My Sommelier first in the account menu, so the header
   keeps one Sommelier button. html.aw-in is set by boot.js. Mirrored in boot.js. */
html.aw-in .nav .btn-koru, html.aw-in .fnav a.fnav-btn[href^="my-sommelier.html"] { display: none; }
.btn-small { padding: 8px 14px; font-size: 11px; }

.cart-btn { position: relative; }
.cart-btn .count {
  position: absolute; top: -4px; right: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--claret); color: var(--bg);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace;
}

/* account nav control */
.nav-account {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 40px;
  padding: 7px 14px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.2s;
}
.nav-account:hover { border-color: var(--ink); color: var(--ink); }
.nav-account .acct-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--claret); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond','Cormorant Fallback', serif; font-size: 15px; font-weight: 600;
}
.nav-account .acct-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
}
.nav-account .acct-name { white-space: nowrap; }

/* ============ MOBILE NAV ============ */
/* Hidden on desktop; the inline links/actions show instead. */
.nav-toggle { display: none; }
.nav-panel { display: none; }

/* BR-01: the full menu needs about 1,190px. It used to collapse only at 980px,
   so between 980 and 1,190 (iPad landscape, laptops at 125-150% scaling) Case
   and Sign in fell off the right edge and the page scrolled sideways. Keep in
   step with partials.js (fcrumb top + close-on-resize). */
@media (max-width: 1240px) {
  /* hide the wide desktop nav; logo + hamburger remain */
  .nav > .nav-links,
  .nav > .nav-actions { display: none !important; }

  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 11px;
    border: 1px solid var(--line); background: var(--card);
    color: var(--ink); flex-shrink: 0;
    transition: background .2s, color .2s, border-color .2s;
  }
  .nav-toggle:hover { border-color: var(--ink); }
  .nav-toggle .i-close { display: none; }
  .nav.open .nav-toggle { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .nav.open .nav-toggle .i-open { display: none; }
  .nav.open .nav-toggle .i-close { display: inline; }

  .nav-panel {
    display: block;
    position: absolute; top: calc(100% + 8px); right: var(--pad-x);
    width: min(320px, calc(100vw - 32px));
    background: var(--card);
    border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 26px 70px rgba(0,0,0,0.22);
    padding: 12px;
    opacity: 0; transform: translateY(-10px) scale(0.97); transform-origin: top right;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    z-index: 60;
    max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto;
  }
  /* transparent bridge so hover survives the gap between toggle and panel */
  .nav-panel::before {
    content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
  }
  /* reveal on hover (hover-capable devices) OR when toggled open (touch) */
  .nav-toggle:hover + .nav-panel,
  .nav-panel:hover,
  .nav.open .nav-panel {
    opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
  }

  .nav-panel .nav-links {
    display: flex; flex-direction: column; gap: 2px; align-items: stretch;
  }
  .nav-panel .nav-link {
    padding: 13px 14px; border-radius: 9px; font-size: 16px; color: var(--ink-soft);
  }
  .nav-panel .nav-link:hover,
  .nav-panel .nav-link.active { background: var(--bg-alt); color: var(--ink); }
  .nav-panel .nav-link.active::after { display: none; }

  .nav-panel .nav-actions {
    display: flex; flex-direction: column; gap: 9px; align-items: stretch;
    margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line);
  }
  .nav-panel .btn,
  .nav-panel .nav-account { width: 100%; justify-content: center; }
  .nav-panel .nav-account { padding: 11px 14px; gap: 9px; }
  /* BR-19: the icon alone said nothing; aria-label still names it for screen readers */
  .nav-panel .nav-account::after { content: 'Sign in'; font-size: 14px; font-weight: 600; }
  .nav-panel .nav-account.has-menu::after { content: 'Your account'; }
  .nav-panel .cart-btn .count { top: 4px; right: auto; left: calc(50% + 30px); }
}

/* wishlist heart (on wine label cards) */
.wish-btn {
  position: absolute; top: 14px; right: 14px; left: auto; z-index: 6;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.92);
  -webkit-backdrop-filter:blur(4px); backdrop-filter: blur(4px);
  border: 1px solid rgba(120,30,40,0.18);
  color: var(--claret);
  box-shadow: 0 2px 8px rgba(0,0,0,0.14);
  transition: all 0.2s; cursor: pointer;
}
.wish-btn svg { fill: none; stroke: currentColor; stroke-width: 1.9; transition: all 0.2s; }
.wish-btn:hover { background: #fff; transform: scale(1.1); box-shadow: 0 3px 12px rgba(120,30,40,0.28); }
.wish-btn.on { background: var(--claret); border-color: var(--claret); color: var(--bg); }
.wish-btn.on svg { fill: var(--bg); stroke: var(--bg); }

/* ============ AGE GATE ============ */
.age-gate {
  position: fixed; inset: 0;
  z-index: 100;
  /* Light enough to see the page behind (Tim, 16 Oct 2026: "place over the home
     page in the background") — it was 75% near-black with an 18px blur, which
     turned every page into a dark wall. */
  background: rgba(27, 20, 16, 0.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  /* Centred, not top-aligned. flex-start + margin:auto only centred when the card
     happened to be shorter than the viewport; on a tall phone it sat high with a
     lot of dead space below. A SHORT viewport still scrolls from the top (below). */
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: clamp(14px, 4vw, 32px);
  opacity: 1; transition: opacity 0.4s;
}
.age-gate.hidden { opacity: 0; pointer-events: none; }
/* Said under 18 (LC-03, 2 Nov 2026): a plain screen — nothing of the page shows
   through, unlike the 18+ question above. */
.age-gate.under { background: var(--bg, #F4EFE5); backdrop-filter: none; -webkit-backdrop-filter: none; }
.age-gate.under .age-gate-card { box-shadow: none; }
.age-gate.under .age-gate-mark { margin-bottom: 22px; }
/* Matches choose.html's card exactly: same 460px cap, same radius, same fluid
   padding. It was 520px wide, square-cornered and 56px-padded, so the two front
   doors looked like different products. */
.age-gate-card {
  background: var(--card);
  max-width: clamp(340px, 92vw, 460px); width: 100%;
  margin: auto;
  padding: clamp(24px, 5vw, 34px) clamp(18px, 5vw, 30px) clamp(20px, 4vw, 26px);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}
@media (max-height: 620px) { .age-gate { align-items: flex-start; } }
@media (max-width: 430px) { .age-gate-card { border-radius: 16px; } }
.age-gate-mark {
  font-family: 'Cormorant Garamond','Cormorant Fallback', serif;
  font-size: clamp(23px, 6vw, 27px);
  letter-spacing: 0.02em;
  margin-bottom: 32px;
}
.age-gate-mark .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--claret); display: inline-block; margin: 0 6px; transform: translateY(-4px); }
.age-gate-title {
  font-family: 'Cormorant Garamond','Cormorant Fallback', serif;
  font-size: 36px; font-weight: 400; font-style: italic;
  line-height: 1.15;
  margin-bottom: 16px;
}
.age-gate-text {
  font-size: 15px; color: var(--ink-soft);
  margin-bottom: 36px; line-height: 1.6;
}
.age-gate-actions {
  display: flex; gap: 12px; flex-direction: column;
}
.age-gate-actions .btn { justify-content: center; padding: 16px 24px; }

/* age gate — experience chooser */
.age-gate-title.welcome { font-style: normal; font-weight: 600; font-size: clamp(21px, 5.4vw, 26px); line-height: 1.12; margin-bottom: 8px; }
.age-gate-ask {
  font-family: 'Cormorant Garamond','Cormorant Fallback', serif; font-style: italic;
  font-size: clamp(14px, 3.6vw, 15px); font-style: normal; color: var(--ink-soft); line-height: 1.45; margin-bottom: 20px;
}
.age-gate-choose {
  font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace;
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted-ink); margin-bottom: 16px;
}
.age-choices { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.age-choice {
  display: flex; align-items: center; gap: 16px;
  width: 100%; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.age-choice:hover {
  border-color: var(--claret); transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(92,27,39,0.12);
}
.age-choice .age-num {
  font-family: 'Cormorant Garamond','Cormorant Fallback', serif;
  font-size: 30px; font-weight: 600; line-height: 1;
  color: var(--claret); flex: none; min-width: 64px;
}
.age-choice .age-num small { font-size: 17px; }
/* The card is centre-aligned; the rows are not. Without this the row copy centred
   itself against a left-hand badge, which read as a mistake. */
.age-choice .age-ctext { flex: 1; text-align: left; }
.age-choices .flightrow, .age-choices .flightrow .fr-tx { text-align: left; }
.age-choice .age-ctext .ct { display: block; font-weight: 600; font-size: 15px; color: var(--ink); }
.age-choice .age-ctext .cd { display: block; font-size: 12.5px; color: var(--muted-ink); margin-top: 2px; line-height: 1.45; }
.age-choice .age-arrow { color: var(--brass-ink); flex: none; transition: transform 0.18s; }
.age-choice:hover .age-arrow { transform: translateX(4px); }
.age-choice.soft .age-num { color: #B07C1E; font-weight: 700; font-style: italic; font-size: 21px; }
/* Step 2 of the gate labels the flights, not an age — "I know" / "Show me" need a
   wider, smaller slot than the 30px numeral the age step uses. */
.age-choice .age-num.flight { font-size: 18px; font-style: italic; font-weight: 500; white-space: nowrap; min-width: 82px; }

/* ============ TASTING-FLIGHT ROW (one component, four places) ============
   Used by: the gate step 2 (choose.html + the in-page gate in partials.js), the
   footer flights block (partials.js, dark) and the lean flight footer
   (flight-nav.js, light). Anatomy is fixed — accent swatch · short label · name ·
   tag · right-hand slot (arrow when it navigates, "you're here" when it does not)
   — and only the surface colours change, via .on-light / .on-dark on a parent.
   Before this there were four unrelated drawings of the same three flights. */
.flightrow { display:flex; align-items:center; gap:13px; width:100%; text-align:left; font-family:inherit; cursor:pointer; border-radius:13px; padding:12px 14px; text-decoration:none; transition:border-color .16s, transform .16s, box-shadow .2s, background .2s; }
.flightrow .fr-badge { flex:none; min-width:74px; padding:0 12px; height:48px; border-radius:10px; display:flex; align-items:center; justify-content:center; white-space:nowrap; font-family:'Cormorant Garamond','Cormorant Fallback',serif; font-style:italic; font-size:17px; font-weight:500; line-height:1; color:#FBF3EC; background:var(--ac,var(--claret)); }
.flightrow .fr-tx { flex:1; min-width:0; }
.flightrow .fr-n { display:block; font-family:'Cormorant Garamond','Cormorant Fallback',serif; font-size:19px; font-weight:600; line-height:1.15; }
.flightrow .fr-s { display:block; font-family:'JetBrains Mono','JetBrains Mono Fallback',monospace; font-size:10px; letter-spacing:.1em; text-transform:uppercase; margin-top:4px; }
.flightrow .fr-go { flex:none; display:flex; transition:transform .2s, color .2s; }
.flightrow:hover .fr-go { transform:translateX(3px); }
.flightrow .fr-here { flex:none; font-family:'JetBrains Mono','JetBrains Mono Fallback',monospace; font-size:10px; letter-spacing:.1em; text-transform:uppercase; border-radius:999px; padding:4px 9px; white-space:nowrap; }
/* light surface — the gate card and the lean flight footer */
.on-light .flightrow { background:var(--bg); border:1px solid var(--line); color:var(--ink); }
.on-light .flightrow:hover { border-color:var(--ac); transform:translateY(-2px); box-shadow:0 12px 28px color-mix(in oklab, var(--ac), transparent 82%); }
.on-light .flightrow .fr-n { color:var(--ink); }
.on-light .flightrow .fr-s { color:var(--muted-ink); }
.on-light .flightrow .fr-go { color:var(--muted); }
.on-light .flightrow:hover .fr-go { color:var(--ac); }
.on-light .flightrow.here { background:var(--bg-alt); border-color:var(--ac); }
.on-light .flightrow.here .fr-here { color:var(--ac); border:1px solid color-mix(in oklab, var(--ac), transparent 55%); }
/* dark surface — the main footer */
.on-dark .flightrow { background:transparent; border:1px solid rgba(244,239,229,0.16); color:var(--bg); }
.on-dark .flightrow:hover { border-color:rgba(244,239,229,0.45); transform:translateX(2px); }
.on-dark .flightrow .fr-n { color:#F4EFE5; }
.on-dark .flightrow .fr-s { color:rgba(244,239,229,0.62); }
.on-dark .flightrow .fr-go { color:rgba(244,239,229,0.5); }
.on-dark .flightrow:hover .fr-go { color:#F4EFE5; }
.on-dark .flightrow.here { border-color:var(--ac); background:rgba(244,239,229,0.05); }
.on-dark .flightrow.here .fr-here { color:var(--brass-soft); border:1px solid var(--brass-soft); }
/* Rows are wide, not columnar: the badge plus a serif name needs the width, so the
   flight blocks stack rather than sitting in a three-up grid. */
.flightrow-list { display:flex; flex-direction:column; gap:10px; max-width:560px; }

/* ---- compact variant: three across, on every surface ----
   133px deep (stacked rows were 298px) and no deeper with more flights. The accent is a
   top edge, not a badge. Narrow at 375px: the sub-line drops below 560px and the name
   may wrap. */
.flightrow-list.compact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; max-width: 680px; }
/* Centre inside a centred container (Learn's footer is text-align:center and 1120px
   wide, so a 680px grid sat hard left under a centred heading). The site footer's
   own column is left-aligned, so it is unaffected. */
.lfoot .flightrow-list.compact, .flightrow-list.compact.centred { margin-inline: auto; }
/* Tiles read left even when the surrounding footer centres its text. */
.flightrow-list.compact .flightrow, .flightrow-list.compact .fr-tx { text-align: left; }
.flightrow-list.compact .flightrow { display: block; padding: 11px 12px; border-radius: 11px; border-top: 3px solid var(--ac); }
.flightrow-list.compact .flightrow:hover { transform: translateY(-2px); }
.flightrow-list.compact .fr-badge,
.flightrow-list.compact .fr-go { display: none; }
.flightrow-list.compact .fr-n { font-size: 16.5px; line-height: 1.1; }
.flightrow-list.compact .fr-s { font-size: 9.5px; margin-top: 5px; }
.flightrow-list.compact .fr-here { display: block; margin-top: 5px; padding: 0; border: 0 !important; font-size: 9.5px; letter-spacing: .1em; }
.on-dark .flightrow-list.compact .flightrow.here { background: rgba(244,239,229,0.06); }
.on-dark .flightrow-list.compact .fr-here { color: var(--brass-soft); }
.on-light .flightrow-list.compact .fr-here { color: var(--ac); }
@media (max-width: 560px) {
  /* Three columns at 375px leaves ~105px each — enough for the name, not for the
     tag. Keeping the tag here would either clip it or push the tiles to 140px tall,
     which is the depth we set out to remove. */
  .flightrow-list.compact { gap: 7px; max-width: none; }
  .flightrow-list.compact .flightrow { padding: 10px 9px; }
  .flightrow-list.compact .fr-n { font-size: 14px; overflow-wrap: anywhere; }
  .flightrow-list.compact .fr-s { display: none; }
  .flightrow-list.compact .fr-here { margin-top: 4px; font-size: 9px; }
}
@media (max-width:560px) {
  /* The "You're here" chip was forcing the current row to wrap, so it stood 93px
     tall against 68px for its neighbours. Smaller chip, no wrap, even rows. */
  .flightrow .fr-here { font-size: 7.5px; padding: 3px 7px; }
  .flightrow .fr-n { overflow-wrap: anywhere; }
  .flightrow { gap:11px; padding:11px 12px; }
  .flightrow .fr-badge { min-width:64px; height:44px; font-size:15.5px; padding:0 10px; }
  .flightrow .fr-n { font-size:17px; }
  .flightrow .fr-go { display:none; }
  .flightrow-list { max-width:none; }
}

.age-choice.soft:hover { border-color: var(--muted-ink); box-shadow: 0 14px 30px rgba(0,0,0,0.08); }
.age-gate-bic {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-alt); color: var(--claret);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.age-gate-blocked .btn { margin-top: 4px; }
.age-gate-foot {
  margin-top: 28px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-ink);
}
@media (max-width: 560px) {
  /* padding, card width and type are clamped above — only the bits that genuinely
     need a breakpoint remain here. */
  .age-gate-mark { margin-bottom: 18px; }
  .age-gate-choose { margin-bottom: 12px; }
  .age-choices { gap: 10px; }
  .age-choice { gap: 12px; padding: 13px 14px; }
  .age-choice .age-num { font-size: 25px; min-width: 50px; }
  .age-choice.soft .age-num { font-size: 18px; }
  .age-choice .age-num.flight { font-size: 15.5px; min-width: 68px; }
  .age-choice .age-ctext .ct { font-size: 14px; }
  .age-choice .age-ctext .cd { font-size: 11.5px; }
  .age-gate-foot { margin-top: 20px; font-size: 10px; }
}

/* shared section CTA (home previews → full pages) */
.section-cta { margin-top: 44px; display: flex; justify-content: center; }

/* ============ BOTTOM TAB BAR (mobile) ============ */
/* Shared by all three experiences; hidden on desktop. Built by bottom-nav.js.
   --btabs-h IS THE CONTRACT for the bottom edge on mobile: this bar, the cart
   bar, the toast and the flight launcher all read it — never a literal (separate
   numbers once put the cart bar over the "Ask the Sommelier" tab). It includes
   the safe-area inset the bar's padding adds (~34px on an iPhone), or the last
   footer links and Add buttons hide behind the bar. */
.btabs { display: none; }
:root { --btabs-h: 0px; }
@media (max-width: 720px) {
  .btabs {
    display: flex; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: rgba(250, 246, 238, 0.97); /* BR-17 fallback */
    background: color-mix(in oklab, var(--card), transparent 3%);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 32px rgba(27, 20, 16, 0.08);
  }
  .btab {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 52px; padding: 6px 2px;
    border: 0; background: none; cursor: pointer; text-decoration: none;
    color: var(--muted-ink); font-family: 'Manrope','Manrope Fallback', sans-serif; position: relative;
    transition: color 0.15s;
  }
  .btab .bt-ic { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; position: relative; }
  .btab .bt-ic svg { width: 23px; height: 23px; }
  .btab .bt-lb { font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; line-height: 1; }
  .btab.on { color: var(--claret); }
  .btab:active { transform: translateY(1px); }
  .bt-count {
    position: absolute; top: -5px; left: calc(50% + 5px);
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: var(--claret); color: #fff; font-size: 9px; font-weight: 700;
    display: none; align-items: center; justify-content: center;
  }
  /* Emphasised "Ask the Sommelier" tab on the adult experiences */
  .btab-hero { color: var(--ink); }
  .btab-hero.on { color: var(--claret); }
  .btab-hero .bt-ic {
    width: 50px; height: 50px; margin-top: -22px; border-radius: 50%;
    background: var(--claret); color: #fff;
    border: 3px solid var(--card);
    box-shadow: 0 8px 22px rgba(92, 27, 39, 0.4);
  }
  .btab-hero .bt-ic svg { width: 22px; height: 22px; }
  /* clear the bar so page content / footers aren't hidden behind it.
     62px is the bar's own box (52px tab + 5px/5px padding); the inset is what
     the bar adds on top of that, so it has to be in the figure too. */
  :root { --btabs-h: calc(62px + env(safe-area-inset-bottom, 0px)); }
  body { padding-bottom: var(--btabs-h); }
}

/* ============ DRAWER ============ */
/* Layers (design audit, 30 Oct 2026): the sticky header is 90 and the
   breadcrumb 89, so the scrim (was 60) and the drawers (was 70) opened UNDER
   them — the drawer's title and close button sat behind the header on every
   page and a tap on the × landed on the menu button. Scrim 91 and drawer 92
   put an open drawer above the header; the 18+ screen (100), the quick look
   (200) and toasts (200) stay above a drawer. */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 91;
  background: rgba(27, 20, 16, 0.4);
  /* BR-06: Safari 26+ tints its own bars from fixed elements at the screen
     edges EVEN at opacity 0, so a closed scrim is display:none, not just
     transparent. allow-discrete keeps the fade where supported; older
     browsers simply show/hide it. */
  display: none; opacity: 0; pointer-events: none;
  transition: opacity 0.3s, display 0.3s allow-discrete;
}
.drawer-scrim.open { display: block; opacity: 1; pointer-events: auto; }
@starting-style { .drawer-scrim.open { opacity: 0; } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  /* height in dvh: a fixed box's bottom:0 is the LARGE viewport on Android, so
     with the URL bar showing the drawer's last ~60-90px (the composer) sat below
     the screen. height + top over-constrains the box, so height wins (the vh line
     is the fallback). The same fix #cart-drawer carries below. */
     dvh is still not enough on its own: it does not shrink for the ON-SCREEN
     KEYBOARD, and app.js used to focus the composer the moment the drawer
     opened, so the keyboard was always up. The drawer was then ~100dvh tall
     inside a ~55dvh visible area — the composer a screen below the fold and
     the empty middle of the message list filling the screen. --app-vh is the
     VISIBLE viewport, published from window.visualViewport by boot.js; the dvh
     line above it is the no-JS fallback. See the long note there.
     --app-vv-top is 0 except on iOS with the keyboard up, where the layout
     viewport (which a fixed box is pinned to) scrolls out from under the
     visible one. */
  height: 100vh; height: 100dvh; height: var(--app-vh, 100dvh);
  top: var(--app-vv-top, 0px);
  width: min(520px, 100vw);
  background: var(--card);
  z-index: 92;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  display: flex; flex-direction: column;
}
/* The shadow only while open: a closed drawer sits just off the right edge, and
   its -20px/60px shadow used to fall back into the page — a grey band down the
   right of every desktop page, doubled by the two drawers (7 Oct 2026). */
.drawer.open { transform: translateX(0); box-shadow: -20px 0 60px rgba(0,0,0,0.15); }
/* FULL-BLEED CHAT PANEL ON TOUCH DEVICES. min(520px, 100vw) gave a half-width
   panel on Android phones that report a ~1000px layout viewport (and "Desktop
   site"). left:0 + width:auto sizes from the viewport EDGES, no vw (which also
   counts a scrollbar). pointer: coarse tells a big phone from a narrow desktop
   window, which keeps the 520px panel. Covers both lenses' #somm-drawer. */
@media (max-width: 720px), (pointer: coarse) and (max-width: 1180px) {
  .drawer#somm-drawer { left: 0; right: 0; width: auto; max-width: none; }
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}
.drawer-title {
  font-family: 'Cormorant Garamond','Cormorant Fallback', serif;
  font-size: 26px; font-style: italic; font-weight: 400;
}
.drawer-close {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  font-size: 18px;
  transition: all 0.2s;
}
.drawer-close:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px 28px; min-height: 0; }
/* The sommelier body is a flex column so the conversation can sit AGAINST the
   composer (#somm-msgs below). A short chat in a block-layout body left the
   messages at the top and a screen of dead space above the input — half of the
   reported "blank space" once the height was right. The intro stays first, so
   the empty state is unchanged. */
#somm-drawer .drawer-body { display: flex; flex-direction: column; }
#somm-drawer #somm-msgs { margin-top: auto; }
/* safe-area padding so the composer clears the home indicator / gesture bar. */
.drawer-foot { padding: 20px 28px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg-alt); }
.drawer-foot:empty { display: none; }   /* an empty case left a bare 40 px band here (DR-24) */
/* Every shop page's content holds at least a screen (30 Oct 2026), so the footer starts
   below the fold while lists, regions and wineries load, instead of showing and then being
   pushed away (regions.html 0.18 on a slow connection). Mirrored in boot.js. */
body[data-shared-nav] > main { min-height: 100vh; min-height: 100dvh; }
/* A phone held sideways (design audit, 30 Oct 2026): at 667×375 the drawer's
   header (109 px) and composer (~150 px) left 113 px of conversation — one line
   of a reply. On short screens the header drops its small "AI · 24/7" line and
   both bars lose most of their padding, so about twice as much chat shows. */
@media (max-height: 500px) {
  .drawer-head { padding: 8px 20px; }
  .drawer-head .label { display: none; }
  .drawer-title { font-size: 22px; }
  .drawer-foot { padding: 8px 20px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  #somm-drawer .drawer-body { padding-top: 12px; padding-bottom: 12px; }
  #somm-drawer [data-somm-clear] { margin-top: 4px !important; }   /* the button carries its margin inline */
}

/* ============ AI SOMMELIER ============ */
.somm-intro {
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.somm-intro p { color: var(--ink-soft); font-size: 15px; }

.somm-suggest {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 14px 0 4px;
}
.somm-chip {
  padding: 8px 14px;
  border: 1px solid var(--flight-accent, #6B1F2A);
  border-radius: 999px;
  font-size: 13px;
  background: var(--bg);
  color: var(--flight-accent, #6B1F2A);
  transition: all 0.2s;
  text-align: left;
}
.somm-chip:hover { background: var(--flight-accent, #6B1F2A); color: #fff; border-color: var(--flight-accent, #6B1F2A); }

.somm-msgs { display: flex; flex-direction: column; gap: 20px; }
.somm-msg { max-width: 92%; }
.somm-msg.user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  font-size: 15px;
}
.somm-msg.bot { align-self: flex-start; }
.somm-msg.bot .bubble {
  background: var(--bg);
  padding: 16px 18px;
  border-radius: 4px 18px 18px 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
}
.somm-msg.bot .bubble strong { font-weight: 600; }
.somm-msg.bot .speaker {
  font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--claret); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.somm-msg.bot .speaker::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--claret);
}
.somm-recs {
  margin-top: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.somm-rec {
  display: flex; gap: 14px; align-items: center;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.somm-rec-tint {
  width: 44px; height: 60px; flex-shrink: 0;
  border-radius: 2px;
  background: var(--tint, var(--claret)); /* BR-17 fallback */
  background: linear-gradient(180deg, var(--tint, var(--claret)), color-mix(in oklab, var(--tint, var(--claret)), black 30%));
}
.somm-rec-tint img{width:44px;height:60px;object-fit:contain}
.somm-rec-info { flex: 1; min-width: 0; }
.somm-rec-info .label { margin-bottom: 2px; }
.somm-rec-info h4 { font-family: 'Cormorant Garamond','Cormorant Fallback', serif; font-weight: 500; font-size: 18px; line-height: 1.2; }
.somm-rec-info .price { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.somm-rec button {
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  white-space: nowrap;
}
.somm-rec button:hover { background: var(--ink); color: var(--bg); }
.somm-rec button.added { background: var(--claret); color: var(--bg); border-color: var(--claret); }
/* "Add all N to your case" under the Sommelier's picks (assets/app.js) */
.somm-addall {
  margin-top: 10px; width: 100%;
  padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--claret); background: var(--claret); color: var(--bg);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.somm-addall:hover { background: var(--claret-deep); border-color: var(--claret-deep); }
.somm-addall.added, .somm-addall:disabled { background: transparent; color: var(--claret); cursor: default; }

.somm-typing {
  display: inline-flex; gap: 4px; padding: 14px 18px;
  background: var(--bg); border-radius: 4px 18px 18px 18px;
}
.somm-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--muted);
  animation: typing 1.2s infinite;
}
.somm-typing span:nth-child(2) { animation-delay: 0.15s; }
.somm-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.somm-input {
  display: flex; gap: 8px; align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
}
.somm-input input {
  flex: 1; background: none; border: none; outline: none;
  font: inherit; font-size: 14px;
  padding: 8px 0;
  color: var(--ink);
}
.somm-input input::placeholder { color: var(--muted-ink); }
.somm-input button {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--claret); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.somm-input button:hover { background: var(--claret-deep); }
.somm-input button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ CART ============ */
.cart-empty {
  text-align: center; padding: 60px 20px;
  color: var(--muted-ink);
}
.cart-empty .serif { font-size: 28px; color: var(--ink); display: block; margin-bottom: 8px; font-style: italic; }
.cart-empty p { font-size: 14px; }

.cart-items { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
  display: flex; gap: 14px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.cart-item-tint {
  width: 50px; height: 70px; flex-shrink: 0;
  background: var(--tint, var(--claret)); /* BR-17 fallback */
  background: linear-gradient(180deg, var(--tint, var(--claret)), color-mix(in oklab, var(--tint, var(--claret)), black 30%));
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info .label { font-size: 10px; margin-bottom: 2px; }
.cart-item-info h4 { font-family: 'Cormorant Garamond','Cormorant Fallback', serif; font-weight: 500; font-size: 18px; line-height: 1.15; }
.cart-item-info .winery { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.cart-item-controls {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between;
  gap: 8px;
}
.qty {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card);
}
.qty button { width: 26px; height: 26px; border-radius: 50%; font-size: 14px; }
.qty button:hover { background: var(--ink); color: var(--bg); }
.qty span { width: 24px; text-align: center; font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 13px; }
.cart-remove {
  font-size: 11px; color: var(--muted-ink);
  text-decoration: underline; text-underline-offset: 3px;
}
.cart-remove:hover { color: var(--claret); }
.cart-price { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 13px; font-weight: 500; }

.case-progress {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.case-progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.case-progress-head .ttl { font-size: 13px; font-weight: 600; }
.case-progress-head .count { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 12px; color: var(--muted-ink); }
.case-progress-bar {
  height: 4px; background: var(--line); border-radius: 99px;
  overflow: hidden;
}
.case-progress-bar .fill {
  height: 100%; background: var(--claret);
  transition: width 0.4s;
}
.case-progress-hint { font-size: 11px; color: var(--muted-ink); margin-top: 8px; }
.case-progress.complete .ttl { color: var(--claret); }

.cart-totals { display: flex; justify-content: space-between; margin-bottom: 14px; }
.cart-totals .label { font-size: 12px; color: var(--ink-soft); letter-spacing: 0.1em; }
.cart-total-amt { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 18px; font-weight: 500; }

/* split shipments (one cart, fulfilled per winery) */
.ship-note {
  font-size: 12px; color: var(--ink-soft); line-height: 1.5;
  background: rgba(169,134,84,0.10); border: 1px solid var(--brass-soft, #C9A878);
  border-radius: 8px; padding: 10px 13px; margin-bottom: 16px;
}
.shipment {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 13px 13px 11px; margin-bottom: 16px; background: var(--card, #FAF6EE);
  display: flex; flex-direction: column; gap: 12px;
}
.ship-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.ship-head .ship-k { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-ink); }
.ship-head .ship-w { font-family: 'Cormorant Garamond','Cormorant Fallback', serif; font-size: 20px; font-weight: 600; line-height: 1.1; margin-top: 3px; }
.ship-head .ship-meta { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 11px; color: var(--muted-ink); white-space: nowrap; }
.shipment .cart-item { padding: 10px 0; border: none; border-top: 1px solid var(--line-soft, #E6DECF); border-radius: 0; }
.ship-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-top: 1px solid var(--line-soft, #E6DECF); padding-top: 10px;
}
.ship-hint { font-size: 11px; color: var(--muted-ink); line-height: 1.4; }
.ship-hint.good { color: var(--claret); font-weight: 600; }
.ship-sums { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.ship-disc { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 11px; color: #3F6B4B; }
.ship-post { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 11px; color: var(--ink-soft); }
.cart-totals.stacked { display: flex; flex-direction: column; gap: 7px; }
.cart-totals.stacked .line { display: flex; justify-content: space-between; align-items: baseline; }
.cart-totals.stacked .line.good span:last-child { color: #3F6B4B; font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 13px; }
.cart-totals.stacked .line span:last-child { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 13px; }
.cart-totals.stacked .line.total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 3px; }
.cart-totals.stacked .line.gst { margin-top: -2px; }
.cart-totals.stacked .line.gst .label, .cart-totals.stacked .line.gst span:last-child { font-size: 10.5px; color: var(--muted-ink); }
/* The agent sentence on its own line under the labelled GST figure (walkthrough 31 Oct 2026, T134). */
.cart-totals.stacked .line.gst-note { margin-top: -5px; }
.cart-totals.stacked .line.gst-note .label { font-size: 10.5px; color: var(--muted-ink); letter-spacing: 0.04em; }

/* ship-to (market) selector + interest capture */
.ship-to { border-bottom: 1px solid var(--line); padding-bottom: 13px; margin-bottom: 13px; }
.ship-to .st-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ship-to .st-k { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-ink); }
.ship-to select { font: inherit; font-size: 13px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; max-width: 230px; }
.ship-to .st-note { font-size: 11px; color: var(--muted-ink); margin-top: 7px; }
.ship-interest { margin-top: 11px; background: rgba(169,134,84,0.10); border: 1px solid var(--brass-soft, #C9A878); border-radius: 8px; padding: 11px 12px; }
.ship-interest .si-t { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 9px; line-height: 1.4; }
.ship-interest .si-row { display: flex; gap: 8px; }
.ship-interest input { flex: 1; min-width: 0; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; background: var(--card); }
.ship-interest .btn { white-space: nowrap; padding: 8px 14px; }

.cart-checkout {
  width: 100%; justify-content: center;
}

/* ============ TOAST ============ */
.toast {
  /* --btabs-h is 0 on desktop, so this stays 24px there and lifts clear of the
     tab bar on mobile. Before, "added to case" confirmed itself behind the bar. */
  position: fixed; bottom: calc(24px + var(--btabs-h, 0px)); left: 50%; transform: translateX(-50%) translateY(20px);
  /* BR-03: with left:50% and no width the browser allowed it only half the
     screen, so a wine name wrapped to six lines on a phone. */
  width: max-content; max-width: calc(100vw - 32px);
  background: var(--ink); color: var(--bg);
  padding: 12px 22px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: all 0.3s;
  z-index: 200;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast::before { content: '✓'; color: var(--brass-soft); font-weight: 700; }
/* BR-03: on phones and tablets the cart bar sits where the toast lands — lift it clear */
@media (max-width: 1240px) { body:has(#cart-bar.show) .toast { bottom: calc(80px + var(--btabs-h, 0px)); } }

/* ============ UTILITY ============ */
.divider-rule {
  display: flex; align-items: center; gap: 16px;
  margin: 8px 0 20px;
}
.divider-rule::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ============ STOCK ============ */
.wine-stockline { margin-top: -2px; }
.stock-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace;
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
.stock-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.stock-tag.in { background: #DCEADF; background: color-mix(in oklab, #1F8A5B, var(--bg) 84%); color: #1F6B49; }
.stock-tag.in::before { background: #1F8A5B; }
.stock-tag.low { background: #EBDFC8; background: color-mix(in oklab, var(--brass), var(--bg) 78%); color: #8A6A2E; }
.stock-tag.low::before { background: var(--brass); }
.stock-tag.out { background: var(--bg-alt); color: var(--muted-ink); }
.stock-tag.out::before { background: var(--muted); }

.wine-card.is-sold-out .wine-label { filter: grayscale(0.5) opacity(0.7); }
.label-soldout {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  background: rgba(27,20,16,0.82); color: var(--bg);
  font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 8px 18px; z-index: 2;
}
.wine-add.sold-out, .somm-rec button.sold-out {
  border-color: var(--line); color: var(--muted-ink);
  cursor: not-allowed; background: var(--bg-alt);
}
.wine-add.sold-out:hover, .somm-rec button.sold-out:hover {
  background: var(--bg-alt); color: var(--muted-ink);
}

/* ============ FOOTER ============ */
/* (moved here from per-page inline styles — the footer itself is injected by partials.js) */
.footer {
  background: var(--ink);
  color: var(--bg);
  padding: 80px var(--pad-x) 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(244,239,229,0.15);
}
@media (max-width: 900px) { .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.footer-brand .serif {
  font-family: 'Cormorant Garamond','Cormorant Fallback', serif;
  font-size: 32px;
  margin-bottom: 16px;
}
.footer-brand p { color: rgba(244,239,229,0.6); font-size: 14px; max-width: 320px; }
/* Christmas order-by banner (16 Oct 2026) — partials.js seasonBarHtml() */
.season-bar { display: flex; align-items: center; justify-content: center; gap: 8px 14px; flex-wrap: wrap; padding: 10px calc(var(--pad-x) + 28px) 10px var(--pad-x); background: var(--claret); color: var(--bg); font-size: 13.5px; line-height: 1.45; text-align: center; position: relative; }
.season-bar .sb-k { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass-soft); }
.season-bar .sb-a { color: var(--bg); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.season-bar .sb-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: none; color: var(--bg); font-size: 20px; line-height: 1; cursor: pointer; opacity: 0.8; }
.season-bar .sb-x:hover { opacity: 1; }
.season-bar[data-phase="closed"] { background: var(--ink); }
.season-bar .sb-short { display: none; }
@media (max-width: 640px) {
  .season-bar { font-size: 13px; gap: 4px 10px; padding-top: 8px; padding-bottom: 8px; }
  .season-bar .sb-k, .season-bar .sb-long { display: none; }
  .season-bar .sb-short { display: inline; }
}

/* Footer email sign-up (15 Oct 2026) — partials.js footerHtml() */
.footer-news { margin-top: 26px; max-width: 360px; }
.footer-news .fn-k {
  display: block;
  font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brass-soft);
  margin-bottom: 10px;
}
.footer-news .fn-row { display: flex; gap: 8px; }
.footer-news input[type="email"] {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px;
  background: rgba(244,239,229,0.06); color: var(--bg);
  border: 1px solid rgba(244,239,229,0.3); border-radius: 2px;
  font: inherit; font-size: 15px;
}
.footer-news input[type="email"]::placeholder { color: rgba(244,239,229,0.55); }
.footer-news input[type="email"]:focus { outline: 2px solid var(--brass-soft); outline-offset: 1px; border-color: transparent; }
.footer-news input[aria-invalid="true"] { border-color: #E8A0A0; }
.footer-news button {
  flex: none; height: 44px; padding: 0 18px;
  background: var(--bg); color: var(--ink);
  border: none; border-radius: 2px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600;
}
.footer-news button:hover { background: #fff; }
.footer-news button:disabled { opacity: 0.7; cursor: default; }
.footer-news .fn-msg { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: rgba(244,239,229,0.7); }
.footer-news .fn-msg a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-news .fn-msg.bad { color: #F2C4C4; }
.footer-news.done .fn-msg { font-size: 14px; color: rgba(244,239,229,0.85); }
.footer-news.done .fn-msg b { color: var(--bg); font-weight: 600; word-break: break-all; }
.footer-news .fn-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 900px) { .footer-brand { grid-column: 1 / -1; } }
.footer-col h2, .footer-col h4 {   /* h2 since 30 Oct: a footer title after the page's h2 must not skip to h4 (DR-22) */
  font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brass-soft);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: rgba(244,239,229,0.8); font-size: 14px; }
.footer-col a:hover { color: var(--bg); }
.footer-licence {
  border-top: 1px solid rgba(244,239,229,0.15);
  margin-top: 8px;
  padding-top: 22px;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(244,239,229,0.6);
  max-width: 880px;
}
.footer-licence b { color: rgba(244,239,229,0.85); font-weight: 600; }
.footer-bot {
  padding-top: 32px;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(244,239,229,0.55);
}

/* ============ MOBILE ERGONOMICS ============ */
/* Enlarge touch targets on phones (>=44px) without affecting desktop. */
@media (max-width: 640px) {
  .drawer-close { width: 44px; height: 44px; }
  .wish-btn { width: 44px; height: 44px; top: 12px; right: 12px; left: auto; }
  .wine-region { left: 18px; }
  .wish-btn svg { width: 19px; height: 19px; }
  .wine-add { min-height: 44px !important; display: inline-flex !important; align-items: center; padding-top: 11px !important; padding-bottom: 11px !important; }
  .footer-col a { font-size: 15px; padding: 3px 0; }
}
/* DR-23 (design audit): on touch screens the footer and breadcrumb links get a 44 px
   tall hit area — they were 16–22 px (WCAG 2.2 AA passed on spacing, not the 44 px
   goal). The footer lists lose their gap to make up for it; the breadcrumb link's
   negative margin takes the space from the bar's own padding, so the bar barely grows. */
@media (pointer: coarse) {
  .footer-col ul { gap: 0; }
  .footer-col a, .footer-bot a, .ffoot-links a { display: inline-flex; align-items: center; min-height: 44px; padding-top: 0; padding-bottom: 0; }
  .fcrumb a { display: inline-flex; align-items: center; min-height: 44px; margin: -11px 0; }
}


/* ============ DISCOVERY CART (v2) ============ */
/* per-shipment progress toward the Six (midpoint marker) and Dozen */
.ship-prog { position: relative; height: 5px; border-radius: 99px; background: var(--line-soft, #E6DECF); margin: 8px 0 4px; overflow: visible; }
.ship-prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brass, #A98654), var(--claret, #5C1B27)); transition: width .4s cubic-bezier(.22,1,.36,1); }
.ship-prog .m6 { position: absolute; top: -2.5px; width: 1.5px; height: 10px; background: var(--muted, #8B7E6E); opacity: .55; }
/* winemaker complete-the-carton suggestions */
.ship-suggest { border-top: 1px dashed var(--line-soft, #E6DECF); margin-top: 8px; padding-top: 9px; }
/* "One more bottle and delivery is free — you save $12" (assets/app.js) */
.ship-nudge { margin: 8px 0 2px; padding: 8px 11px; border-radius: 8px; background: color-mix(in oklab, var(--claret), var(--bg) 92%); color: var(--claret); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.ship-topup { display: block; width: 100%; margin: 8px 0 2px; padding: 10px 12px; border-radius: 999px; border: 1px solid var(--claret); background: var(--claret); color: #fff; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.ship-topup:hover { filter: brightness(1.08); }
/* "Sold by the case of 6" on a case-only wine's card (app.js caseNote, 15 Oct 2026) */
.case-note { margin-top: 10px; font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--claret); line-height: 1.4; }
.case-note + .wp-buy { margin-top: 10px; }
.wine-body > .case-note { margin-top: auto; }
.wine-body > .case-note + .wine-foot { margin-top: 0; }
.somm-rec-info > .case-note, .mini-info > .case-note { margin-top: 4px; font-size: 9.5px; }
/* "Dozen price · $27 a bottle" — the winery's Dozen deal as a bottle price (app.js dozenNote, 29 Oct 2026) */
.dozen-note { margin-top: 10px; font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brass-ink); line-height: 1.4; }
.case-note + .dozen-note { margin-top: 4px; }
.dozen-note + .wp-buy { margin-top: 10px; }
.wine-body > .dozen-note { margin-top: auto; }
.wine-body > .case-note + .dozen-note { margin-top: -8px; }
.wine-body > .dozen-note + .wine-foot { margin-top: 0; }
.somm-rec-info > .dozen-note, .mini-info > .dozen-note { margin-top: 4px; font-size: 10.5px; }
/* A winery's delivery terms and where the case stands (app.js buyNotes / fillShipTerms, 15 Oct 2026) */
.ship-terms { font-size: 13px; line-height: 1.5; color: var(--ink-soft); margin: 8px 0 0; }
.ship-terms:empty { display: none; }
.wy-sec-head .ship-terms { margin-top: 10px; font-size: 14px; }
.ship-progress { margin: 10px 0 0; padding: 8px 11px; border-radius: 8px; background: color-mix(in oklab, var(--claret), var(--bg) 92%); color: var(--claret); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.ship-suggest .ss-k { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-ink, #7A5E2E); margin-bottom: 7px; }
.ss-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: var(--card, #FAF6EE); border: 1px solid var(--line, #D8CFBE); border-radius: 9px; padding: 7px 9px; margin-bottom: 6px; cursor: pointer; transition: border-color .15s, transform .15s; font-family: inherit; }
.ss-item:hover { border-color: var(--claret, #5C1B27); transform: translateX(2px); }
.ss-tint { width: 9px; height: 26px; border-radius: 3px; background: var(--tint, #5C1B27); flex: none; }
.ss-nm { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--ink, #1B1410); line-height: 1.2; }
.ss-nm small { display: block; font-weight: 400; font-size: 10.5px; color: var(--muted, #8B7E6E); }
.ss-add { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 11px; color: var(--claret, #5C1B27); font-weight: 700; white-space: nowrap; }
/* cases-only wineries */
.shipment.needs-case { border-left: 3px solid var(--brass, #A98654); padding-left: 10px; }
.case-block-note { font-size: 11.5px; color: #8a5a1f; background: #f7ecd9; border: 1px solid #e8d3ac; border-radius: 9px; padding: 9px 12px; margin-bottom: 10px; line-height: 1.45; }
.cart-checkout[disabled] { opacity: .5; cursor: not-allowed; }
/* app member tease */
.cart-totals .line.app-tease { border-top: 1px dashed var(--line-soft, #E6DECF); margin-top: 6px; padding-top: 8px; }
.cart-totals .line.app-tease .label { font-size: 11px; color: var(--muted, #8B7E6E); }
.cart-totals .line.app-tease a { color: var(--claret, #5C1B27); font-weight: 600; }

/* mobile: cart becomes a bottom sheet + persistent nudge bar */
@media (max-width: 720px) {
  .drawer#cart-drawer {
    top: 0; right: 0; left: 0; bottom: 0;
    width: 100vw; height: 100dvh; height: var(--app-vh, 100dvh); max-height: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-radius: 0;
    /* T276: vh, not %: --app-vh halves with the keyboard up */
    transform: translateY(105vh);
    box-shadow: none;   /* only while open — see .drawer.open */
  }
  .drawer#cart-drawer.open { transform: translateY(0); box-shadow: 0 -18px 50px rgba(27,20,16,.28); }
  /* full-screen now — drop the sheet grab-handle */
  .drawer#cart-drawer::before { display: none; }
}
/* Phones and short screens: the case scrolls as ONE list, like a receipt (design audit,
   30 Oct 2026). The totals panel is 370–450 px tall; fixed at the foot it left no room
   for the wines on a small phone. Wines first, totals after; the title and × stay pinned.
   Tall screens keep the fixed totals panel. */
@media (max-width: 720px), (max-height: 860px) {
  .drawer#cart-drawer { overflow-y: auto; overscroll-behavior: contain; }
  #cart-drawer .drawer-head { position: sticky; top: 0; z-index: 3; background: var(--card); }
  #cart-drawer .drawer-body { flex: 1 0 auto; overflow: visible; }
}
/* persistent mobile cart bar (injected by app.js) */
.cart-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--btabs-h, 0px)); z-index: 74;
  display: none; align-items: center; gap: 11px;
  background: var(--ink, #1B1410); color: var(--bg, #F4EFE5);
  border-radius: 999px; padding: 11px 16px; cursor: pointer;
  box-shadow: 0 14px 38px rgba(0,0,0,.32), 0 0 0 1px rgba(244,239,229,.16); border: none; font-family: inherit;   /* the faint ring keeps it apart from the dark footer */
  transform: translateY(90px); transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.cart-bar.show { transform: translateY(0); }
.cart-bar .cb-count {
  flex: none; min-width: 26px; height: 26px; border-radius: 99px; background: var(--brass, #A98654);
  color: #2a1c0c; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; padding: 0 7px;
}
.cart-bar .cb-hint { flex: 1; min-width: 0; text-align: left; font-size: 12.5px; line-height: 1.25;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.cart-bar .cb-total { font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 12.5px; font-weight: 700; }
/* LW-01 (2 Nov 2026): the header Case button goes at 1240px and below, so the
   bar shows to 1240px (a centred pill above 720px, no tab bar) and the page
   leaves room for it below the footer. */
@media (max-width: 1240px) {
  .cart-bar { display: flex; }
  body:has(#cart-drawer.open) .cart-bar { transform: translateY(90px); }
  body:has(#cart-bar.show) { padding-bottom: calc(var(--btabs-h, 0px) + 76px); }
  /* under the site's dark footer that room is the footer's own, not a light strip */
  body:has(#cart-bar.show):has(> footer.footer) { padding-bottom: var(--btabs-h, 0px); }
  body:has(#cart-bar.show) > footer.footer { padding-bottom: 116px; }   /* its own 40px + 76px */
}
/* T275: while a text box has the cursor these two bars step aside (the phone keyboard
   pushed them over the box). Back 0.3s AFTER, so a tap in that strip reaches its button. */
.cart-bar { transition: transform .3s cubic-bezier(.22,1,.36,1), visibility 0s .3s; }
.btabs { transition: visibility 0s .3s; }
body:has(:is(input:not([type=checkbox],[type=radio],[type=range],[type=button],[type=submit]),textarea,[contenteditable]):focus) :is(.cart-bar,.btabs) { visibility: hidden; transition-delay: 0s; }
@media (min-width: 721px) and (max-width: 1240px) {
  .cart-bar { left: 0; right: 0; margin: 0 auto; width: min(560px, calc(100% - 32px)); bottom: 16px; }
}

/* ===== SKIP LINK (a11y) ===== */
.skip-link{position:absolute;left:-9999px;top:0;z-index:1000;background:var(--claret);color:var(--bg);padding:10px 16px;border-radius:0 0 6px 0;font-size:14px;font-weight:600;text-decoration:none}
.skip-link:focus{left:0}

/* ===== VISIBLE KEYBOARD FOCUS (WCAG 2.4.7) =====
   Keyboard users get a clear brass ring; mouse/touch (no :focus-visible) don't,
   so the visual design is untouched for pointer interaction. */
:focus-visible{outline:2px solid var(--brass-ink);outline-offset:2px;border-radius:2px}
a:focus-visible,button:focus-visible,.btn:focus-visible,.nav-link:focus-visible,.somm-chip:focus-visible,[role="button"]:focus-visible{outline:2px solid var(--brass-ink);outline-offset:3px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--claret);outline-offset:1px}
/* the sommelier input clears its own outline; the focus ring goes round the
   whole rounded composer instead — a square ring inside the pill read as a
   rendering fault (design audit, 30 Oct 2026). Still 2 px of claret. */
.somm-input input:focus-visible{outline:none}
.somm-input:focus-within{border-color:var(--claret);box-shadow:0 0 0 1px var(--claret)}

/* Nav alignment — consistent LEFT grouping across all lenses (match flight nav) */
.nav { justify-content: flex-start; gap: 30px; min-height: 64px; }
.nav > .nav-links { margin-right: auto; }
.nav > .nav-actions { margin-left: 0; }
@media (max-width: 1240px){ .nav { justify-content: space-between; gap: 16px; } }
/* 1241–1499 px: one line per link (see .nav-link above) */
@media (min-width: 1241px) and (max-width: 1499px) {
  .nav { gap: 20px; }
  .nav-links { gap: clamp(12px, 1.4vw, 28px); }
  .nav-actions { gap: 8px; }
  .nav-actions .btn { padding: 11px 16px; gap: 8px; }
  .nav-logo .sfx { margin-left: 8px; padding-left: 9px; }
}
/* Phones: more page, less header (design audit, 30 Oct 2026). The sticky header
   (88 px), the sticky breadcrumb (39 px) and the bottom tabs (64 px) held 191 px
   of every screen — a third of a 320×568 phone, half of one held sideways. The
   header loses 14 px of padding; the breadcrumb stays at the top of the page but
   scrolls away; on a sideways phone the header scrolls away too (the bottom
   tabs still reach Home, Wines, the Sommelier and the case). */
@media (max-width: 560px) {
  .nav { padding-top: calc(15px + env(safe-area-inset-top, 0px)); padding-bottom: 11px; }
}
/* Under 375 px the logo (226 px), the gap and the menu button needed 312 px: at 320 the button sat
   8 px from the edge (24 on the left), and below 312 it ran off the screen (found in Firefox, 30 Oct 2026).
   The Discover header steps its lockup down the same way (flight-nav.js, max-width 430px). */
@media (max-width: 374px) {
  .nav { gap: 12px; }
  .nav-logo .sfx { font-size: 18px; margin-left: 8px; padding-left: 9px; }
}
@media (max-width: 359px) { .nav-logo::before { display: none; } }   /* no room for the icon under 360 px */
/* "html" because partials.js and flight-nav.js inject their .fcrumb / .fnav rules after this sheet */
@media (max-width: 760px) { html .fcrumb { position: static; } }
@media (max-height: 500px) and (orientation: landscape) {
  html .nav, html .fnav, html .lnav, html [data-experience] .nav, html [data-experience] .fnav { position: relative; }   /* discover.css pins [data-experience="discover"] .nav */
  html .fcrumb { position: static; }
}
@media (min-width: 1241px) and (max-width: 1339px) {
  .nav-actions .btn { padding: 11px 13px; gap: 7px; }
}


/* ============ LENS TOKENS ============================================
   One design system, three moods — set on body[data-experience].
   The ONLY things a lens changes are its GROUND surface and its MOTION
   budget. Type, palette, spacing and components stay identical across
   every lens, so pages read as one brand and can't drift apart.
     cellar   -> 35+, considered  · flat bone ground · calm motion
     learn    -> long-form read   · flat bone ground · calm motion
     discover -> 18+, exploratory · atmospheric ground allowed · alive
   Atmosphere on discover is OPT-IN per page; calm lenses are FORCED flat
   here so none can re-acquire a background texture by accident. Motion-
   heavy effects should be scoped under [data-experience="discover"]
   and/or gated by prefers-reduced-motion. */
:root{ --lens-ground: var(--bg); }
body[data-experience="cellar"],
body[data-experience="learn"]{
  --lens-ground: var(--bg);
  background: var(--lens-ground) !important;
  background-image: none !important;
}
/* Calm lenses never run the ambient home-page canvas / watercolour. */
body[data-experience="cellar"] #motes,
body[data-experience="learn"] #motes,
body[data-experience="cellar"] .manifesto-brush,
body[data-experience="learn"] .manifesto-brush{ display: none !important; }
@media (prefers-reduced-motion: reduce){
  body[data-experience] #motes,
  body[data-experience] .manifesto-brush{ display: none !important; }
}
/* ==================================================================== */


/* ---- Discover: mobile atmosphere gate + legibility guardrail ----------
   Phones get a lighter, faster, always-legible ground. Heavy blur is a
   desktop luxury; on small screens we drop it and lean on a stronger page
   tint so text over imagery keeps AA contrast. Unmatched selectors are a
   safe no-op. */
@media (max-width: 640px){
  body[data-experience="discover"]{ background-attachment: scroll !important; }
  body[data-experience="discover"] .page-bg,
  body[data-experience="discover"] .p-bg,
  body[data-experience="discover"] .l-bg,
  body[data-experience="discover"] .d-bg{ background: rgba(244,239,229,0.82) !important; }
  body[data-experience="discover"] [class*="glass"],
  body[data-experience="discover"] [style*="backdrop-filter"]{
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  }
}
/* Touch devices: drop cursor-tilt cost. */
@media (hover: none) and (pointer: coarse){
  body[data-experience="discover"] .hero-panel{ transform: none !important; }
}
/* ---------------------------------------------------------------------- */


/* ---- Hero legibility floor (WCAG-AA safety net) -----------------------
   Bone/brass text sits over photo + video heroes. The gradient scrims
   already darken the text zone; this adds a soft ink text-shadow behind
   the headline/sub/eyebrow text in every image hero, so contrast clears
   AA even if an uploaded photo comes in bright. Applies across both lenses. */
.hero .hero-title, .hero .hero-sub, .hero .ai-live,
.d-hero h1, .d-hero .sub, .d-hero .d-eyebrow,
.rg-hero-inner, .wr-hero-inner, .region-hero .crumb{
  text-shadow: 0 1px 3px rgba(20,14,10,0.55), 0 2px 20px rgba(20,14,10,0.34);
}
/* ---------------------------------------------------------------------- */


/* account dropdown menu */
.nav-actions { position: relative; }
.nav-account.has-menu { cursor: pointer; padding-right: 11px; }
.nav-account .acct-caret { display: flex; color: var(--muted); transition: transform 0.2s; }
.nav-account.has-menu[aria-expanded="true"] .acct-caret { transform: rotate(180deg); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 270px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 20px 44px -14px rgba(28,16,10,0.30);
  padding: 8px; z-index: 300;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.acct-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.acct-menu .am-head { display: flex; align-items: center; gap: 11px; padding: 10px 10px 12px; text-decoration: none; }
.acct-menu .am-head .am-av { width: 38px; height: 38px; font-size: 19px; flex: none; border-radius: 50%; background: var(--claret); color: var(--bg); display: flex; align-items: center; justify-content: center; font-family: 'Cormorant Garamond','Cormorant Fallback', serif; font-weight: 600; }
.acct-menu .am-id { display: flex; flex-direction: column; min-width: 0; }
.acct-menu .am-id strong { font-family: 'Cormorant Garamond','Cormorant Fallback', serif; font-size: 19px; font-weight: 600; color: var(--ink); line-height: 1.1; }
.acct-menu .am-id small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-menu .am-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.acct-menu .am-item { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; transition: background 0.14s, color 0.14s; }
.acct-menu .am-item:hover { background: var(--bg-alt); color: var(--ink); }
.acct-menu .am-item .am-i { display: flex; width: 18px; color: var(--claret); flex: none; }
.acct-menu .am-out { color: var(--muted); }
.acct-menu .am-out .am-i { color: var(--muted); }
.acct-menu .am-out:hover { color: var(--ink); background: var(--bg-alt); }
@media (max-width: 1240px) {
  .nav-panel .acct-menu { position: static; width: 100%; box-shadow: none; border: none; padding: 0; margin-top: 6px; opacity: 1; visibility: visible; transform: none; display: none; }
  .nav-panel .acct-menu.open { display: block; }
  /* The open account menu takes the page links' room, so Sign out is on screen (T193). */
  .nav-panel:has(.acct-menu.open) .nav-links { display: none; } .nav-panel:has(.acct-menu.open) .nav-actions { border-top: 0; margin-top: 0; padding-top: 0; }
}

/* ===== REFLOW SAFETY (WCAG 1.4.10 · 320px width / 400% zoom) =====
   The layout already collapses to a single column via per-block breakpoints;
   this is the global backstop so nothing forces a horizontal scrollbar when a
   user zooms to 200–400% or views at 320px. Long unbroken strings wrap, grid
   children may shrink below their content width, and any stray flex/grid row
   wraps instead of overflowing. Kept last so it wins on specificity ties. */
.wine-card, .cart-item, .shipment, .acct-menu, .drawer-body, .foot-flight, main, .section, footer { min-width: 0; }
.wine-body-name, .wine-body-winery, .cart-item, .am-id small, .drawer-body p, .somm-msg, .ship-head .ship-w { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 400px) {
  /* final-resort single-column for any utility grid that still has 2+ tracks */
  /* minmax(0, …): a plain 1fr cannot shrink below its content, and Safari sizes the footer's email
     box wider than Chrome — at 320 px the footer was 16 px too wide and the page scrolled sideways */
  .footer-top, .gc-delivery, .gc-fields { grid-template-columns: minmax(0, 1fr) !important; }
  .filters-bar, .cat-controls, .ship-sums, .ship-head { flex-wrap: wrap; }
  /* bottom-nav: 4 tabs must fit 320px — let labels shrink rather than overflow */
  .btabs .bt-lb { font-size: 10px; }
}

/* ============ TOUCH TARGETS (mobile) ============
   At 375px, 72 controls measured under the 44px minimum. These raise the
   INTERACTIVE controls only — inline text links inside prose are left alone,
   since padding them out would break line spacing. Scoped to <=760px so the
   desktop design is unchanged. (New selectors, not edits to the .btn rule
   mirrored in boot.js, so no critical-CSS mirror is needed.) */
@media (max-width: 760px) {
  .btn, .filter-chip, .somm-chip, .cart-btn, .btn-koru, .btn-ghost,
  select, .cat-reset, .cart-remove, .qty button, .stepper button {
    min-height: 44px;
  }
  .btn, .filter-chip, .somm-chip, .cart-btn, .btn-koru, .btn-ghost, .cat-reset, .cart-remove {
    display: inline-flex; align-items: center; justify-content: center;
  }
  /* small text-style buttons: widen the hit area without changing type size */
  .cat-reset, .cart-remove { padding-left: 10px; padding-right: 10px; min-width: 44px; }
  /* checkboxes and radios */
  input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; }
  input[type="checkbox"] + label, input[type="radio"] + label { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 760px) {
  /* link lists in the footer and drawers: rows, so height is safe to raise */
  .footer li > a, .drawer li > a, .fnav-panel-links a, .nav-links > a { min-height: 44px; display: inline-flex; align-items: center; }
  /* form controls */
  .cat-search input, .somm-input input, input[type="text"], input[type="email"], input[type="search"], input[type="tel"], textarea { min-height: 44px; }
  .cat-search { display: flex; align-items: center; min-height: 44px; }
  .somm-input button, .drawer-foot button, .browse-somm button { min-height: 44px; }
  .browse-somm button, .drawer-foot button { display: inline-flex; align-items: center; }
}

/* AIWine Member mark — a small "+" beside the member's name / avatar.
   Presence only; every sentence still says "AIWine Member". */
.m-badge { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 6px; border-radius: 50%; background: var(--claret); color: var(--bg); font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 10px; font-weight: 700; line-height: 1; vertical-align: 1px; }
.acct-avatar { position: relative; }
.acct-avatar .m-plus { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--brass); color: var(--bg); font-family: 'JetBrains Mono','JetBrains Mono Fallback', monospace; font-size: 9px; font-weight: 700; font-style: normal; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--bg); }

/* ===== MOBILE INPUT ZOOM (iOS Safari) =====
   iOS zooms the viewport whenever a focused field has font-size < 16px, and it
   never zooms back out. The Sommelier input (14px), interest email (13px),
   region select (13px) and promo code (12px) all tripped it, so tapping the
   most important control on the site left the customer in a zoomed viewport.
   16px only at mobile widths — desktop typography is untouched. NOTE: do NOT
   "fix" this with maximum-scale/user-scalable=no; that kills pinch-zoom and
   breaks the accessibility work. */
/* BR-02: field rules on checkout (15px), account (15px), Wines (13px) and
   others were more specific and won, so iPhones still zoomed. !important
   makes this the last word; (hover:none) and (pointer:coarse) also covers
   phones held sideways (up to 932px) and tablets. */
@media (max-width: 860px), (hover: none) and (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),
  select, textarea { font-size: 16px !important; }
}
/* iOS: 16px prevents auto-zoom on focus */

/* ===== BR-11 (browser review, 6 Oct 2026): readable labels on phones =====
   Mono eyebrow labels of 7-10px carried real information (footer headings, the
   footer "you're here" tag, the Sommelier's name, checkout step keys). */
@media (max-width: 720px) {
  .footer-col h2, .footer-col h4, .ffk, .somm-msg.bot .speaker, .lbl, .tw-tag, .ship-k, .ss-k, .dr-ct, .nlab, .ca-badge, .demo-flag, .sw-e, .o-k { font-size: 11px; }
  .fr-here { font-size: 9.5px; }
}
