:root {
  --night: #140d08;
  --night-2: #21160d;
  --amber: #e9a23c;
  --amber-deep: #b5690f;
  --cream: #fbf4e4;
  --paper: #faf5ea;
  --paper-alt: #f2e9d6;
  --ink: #2a1a0c;
  --ink-soft: #6b5440;
  --line: #e3d5b9;
  --card: #fffcf4;
  --card-ink: #2b1d10;
  --rule: rgba(64, 112, 160, 0.11);
  --red-line: rgba(196, 70, 58, 0.55);
  --accent: #a85a0c;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17110b;
    --paper-alt: #1f170f;
    --ink: #f1e6d3;
    --ink-soft: #bca88c;
    --line: #36281a;
    --accent: #eaa84d;
    --card: #f6eedc;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
/* nothing may widen the page sideways on a phone; the shelf scrolls inside its own box.
   clip (unlike hidden) creates no scroll container, so sticky elements keep working */
html, body { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  /* dark behind the hero while the pour fades in; every section below paints its own background */
  background: #1c1108;
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.i18n-loading [data-t], body.i18n-loading .shelf-section, body.i18n-loading .pick-section { visibility: hidden; }
img, svg { max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -3rem; z-index: 50; background: var(--amber); color: #1a0f05; padding: .5rem .9rem; border-radius: 8px; font-family: var(--sans); text-decoration: none; }
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.wrap { max-width: 740px; margin: 0 auto; padding: 0 1.5rem; }
.wide { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.kicker {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em;
  font-size: .74rem; font-weight: 700; color: var(--accent); margin: 0 0 .8rem;
}
.kicker.light { color: var(--amber); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; margin: 0 0 1rem; letter-spacing: -.015em; }
.lede { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 1.4rem; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: .95rem; line-height: 1;
  padding: .85rem 1.25rem; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, color .2s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.primary { background: linear-gradient(180deg, #f3b651, #d98a1d); color: #241404; box-shadow: 0 6px 20px rgba(217, 138, 29, .35), inset 0 1px 0 rgba(255,255,255,.45); }
.btn.primary:hover { box-shadow: 0 10px 26px rgba(217, 138, 29, .45), inset 0 1px 0 rgba(255,255,255,.5); }
.btn.primary:disabled { opacity: .5; cursor: default; box-shadow: none; }
.btn.glass-btn { background: rgba(255, 248, 234, .12); color: #fff8ea; border-color: rgba(255, 248, 234, .35); backdrop-filter: blur(6px); }
.btn.glass-btn:hover { background: rgba(255, 248, 234, .22); }
.btn.ghost { background: transparent; color: var(--card-ink); border-color: rgba(43, 29, 16, .25); }
.btn.ghost:hover { background: rgba(43, 29, 16, .06); }
.btn.small { padding: .55rem .9rem; font-size: .85rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  font-family: var(--sans); font-size: .84rem; line-height: 1.1;
  padding: .5rem .8rem; border-radius: 999px;
  background: transparent; border: 1px solid var(--line); color: var(--ink);
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ------------------------------------------------------------ top nav */
.topnav {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem clamp(1rem, 3vw, 2rem);
  color: #fff8ea; font-family: var(--sans);
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s;
}
.topnav.solid { background: rgba(20, 13, 8, .95); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.35)); }
.navlinks { display: flex; gap: .3rem; list-style: none; margin: 0 0 0 auto; padding: 0; }
.navlinks a { display: block; padding: .5rem .8rem; border-radius: 999px; text-decoration: none; font-size: .92rem; opacity: .88; }
.navlinks a:hover { opacity: 1; background: rgba(255,255,255,.1); }
.lang { position: relative; }
#lang-button { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: .42rem .75rem; color: inherit; font-size: .85rem; font-weight: 600; }
#lang-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
#lang-menu { position: absolute; right: 0; top: calc(100% + .5rem); list-style: none; margin: 0; padding: .35rem; min-width: 11rem; background: #231710; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
#lang-menu button { width: 100%; text-align: left; background: none; border: 0; padding: .6rem .8rem; border-radius: 8px; color: #fff8ea; font-size: .92rem; }
#lang-menu button:hover, #lang-menu button:focus-visible { background: rgba(255,255,255,.08); }
#lang-menu button[aria-checked="true"]::after { content: "✓"; float: right; color: var(--amber); }
@media (max-width: 640px) {
  .navlinks { display: none; }
  .lang { margin-left: auto; }
}

/* --------------------------------------------------------------- hero */
/* hidden until it has the beer of the day, then faded in - no flash of a default colour */
#pour { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: -1; background: #1c1108; opacity: 0; transition: opacity .7s ease; }
#pour.ready { opacity: 1; }
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 6rem 0 5rem;
  background: linear-gradient(to bottom, rgba(20,9,2,0) 50%, rgba(20,9,2,.5) 78%, rgba(20,9,2,.8) 100%);
  color: #fff8ea;
  /* the legibility glow behind the text is wider than a phone screen */
  overflow: hidden;
}
.hero-kicker { font-family: var(--sans); text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; color: #ffd48a; margin: 0 0 .6rem; text-shadow: 0 1px 2px rgba(30,10,0,.9), 0 0 16px rgba(30,10,0,.75); }
.hero h1 { font-size: clamp(3rem, 9vw, 5.6rem); line-height: .98; margin: 0 0 1rem; letter-spacing: -.02em; filter: drop-shadow(0 1px 1px rgba(40, 16, 0, .7)) drop-shadow(0 3px 18px rgba(30, 10, 0, .75)); }
.hero-lede { font-size: clamp(1.05rem, 2.3vw, 1.3rem); max-width: 38ch; margin: 0 0 1.8rem; color: rgba(255,248,234,.94); text-shadow: 0 1px 14px rgba(40,15,0,.6); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; }
/* keeps the text legible when a tall head of foam rises behind it */
.hero .wrap { position: relative; }
.hero .wrap::before {
  content: ""; position: absolute; inset: -3rem -4rem -2rem -4rem; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(24, 10, 2, .62), rgba(24, 10, 2, 0));
}
.beer-day {
  --bd: #e9a23c;
  display: inline-flex; align-items: center; gap: .7rem; margin-top: 1.4rem;
  padding: .45rem .75rem .45rem .5rem; border-radius: 999px;
  background: rgba(20, 10, 3, .42); border: 1px solid rgba(255, 240, 215, .22); color: #fff8ea;
  backdrop-filter: blur(8px); font-family: var(--sans); text-align: left;
  transition: background-color .2s, border-color .2s, transform .15s;
}
.beer-day:hover { background: rgba(20, 10, 3, .6); border-color: rgba(233, 162, 60, .6); }
.beer-day:active { transform: scale(.99); }
.bd-drop {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 40%), var(--bd);
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.35), 0 0 0 2px rgba(255, 248, 234, .6);
}
.bd-text { display: flex; flex-direction: column; line-height: 1.2; }
.bd-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: #ffd48a; font-weight: 700; }
.bd-name { font-family: var(--serif); font-size: 1.02rem; font-weight: 700; }
.bd-arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }

main { position: relative; background: var(--paper); }


/* -------------------------------------------------------------- shelf */
.shelf-section {
  position: relative; overflow: hidden;
  padding: 5rem 0 3.5rem;
  color: #f5ead6;
  /* a wall of dark oak panels, lit by a warm lamp above the shelf */
  background:
    radial-gradient(55% 50% at 50% 60%, rgba(255, 170, 70, .22), rgba(255, 170, 70, 0) 72%),
    radial-gradient(40% 40% at 12% 8%, rgba(255, 200, 120, .07), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.42) 0 2px, rgba(255, 220, 170, .05) 2px 3px, transparent 3px 132px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.11 0.0035' numOctaves='4' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 0.05  0 0 0 0 0.025  0 0 0 0 0.01  0 0 0 0.9 -0.2'/%3E%3C/filter%3E%3Crect width='520' height='520' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #1c120a 0%, #2b1c10 55%, #170f08 100%);
}
.shelf-section::before {
  /* a warm lamp over the middle of the shelf */
  content: ""; position: absolute; left: 50%; top: -6rem; width: 46rem; height: 46rem; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 196, 110, .16), transparent);
  pointer-events: none;
}
.shelf-head { position: relative; display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: flex-end; justify-content: space-between; }
.shelf-head h2 { color: #fff7e8; }
.shelf-lede { margin: 0; color: #cdb898; font-size: 1.05rem; }
.shelf-tools { display: flex; flex-wrap: wrap; gap: .5rem; }
.field { position: relative; display: inline-flex; align-items: center; }
.field input {
  appearance: none; -webkit-appearance: none;
  background: rgba(255, 244, 225, .08); border: 1px solid rgba(255, 244, 225, .2); color: #fff7e8;
  border-radius: 999px; padding: .6rem 1rem; font-family: var(--sans); font-size: .88rem; min-height: 2.6rem;
  transition: border-color .15s, background-color .15s;
}
.field input:hover, .field input:focus { border-color: rgba(233, 162, 60, .7); background: rgba(255, 244, 225, .12); outline: none; }
.field input::-webkit-search-cancel-button { filter: invert(.8) sepia(.4); }
.field.search input { padding-left: 2.3rem; width: 14rem; }

/* custom dropdown */
.dd { position: relative; font-family: var(--sans); }
.dd-btn {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 2.6rem; min-width: 10.5rem;
  padding: .55rem .8rem .55rem 1rem; border-radius: 999px;
  background: rgba(255, 244, 225, .08); border: 1px solid rgba(255, 244, 225, .2); color: #fff7e8;
  font-size: .88rem; text-align: left; transition: border-color .15s, background-color .15s;
}
.dd-btn:hover, .dd.open .dd-btn { border-color: rgba(233, 162, 60, .7); background: rgba(255, 244, 225, .12); }
.dd-value { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-chev { width: 16px; height: 16px; fill: none; stroke: #e9cfa6; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; flex: none; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd-list {
  position: absolute; left: 0; top: calc(100% + .45rem); z-index: 40;
  min-width: 100%; width: max-content; max-width: min(19rem, 90vw); max-height: 19rem; overflow-y: auto;
  margin: 0; padding: .35rem; list-style: none;
  background: rgba(35, 23, 14, .97); border: 1px solid rgba(255, 238, 210, .14); border-radius: 14px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(12px);
  scrollbar-width: thin; scrollbar-color: rgba(233, 162, 60, .45) transparent;
  transform-origin: top center; animation: dd-in .16s ease-out;
}
.dd.up .dd-list { top: auto; bottom: calc(100% + .45rem); transform-origin: bottom center; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .dd-list { animation: none; } }
.dd-list::-webkit-scrollbar { width: 8px; }
.dd-list::-webkit-scrollbar-thumb { background: rgba(233, 162, 60, .4); border-radius: 8px; }
.dd-list [role=option] {
  display: flex; align-items: center; gap: .8rem; justify-content: space-between;
  padding: .55rem .7rem .55rem 1.9rem; border-radius: 9px; cursor: pointer;
  color: #f1e3cb; font-size: .9rem; position: relative; white-space: nowrap;
}
.dd-list [role=option] small { color: #a58c6a; font-size: .75rem; font-variant-numeric: tabular-nums; }
.dd-list [role=option].active { background: rgba(233, 162, 60, .16); color: #fff7e8; }
.dd-list [role=option][aria-selected="true"] { color: var(--amber); font-weight: 600; }
.dd-list [role=option][aria-selected="true"]::before {
  content: ""; position: absolute; left: .75rem; top: 50%; width: 7px; height: 12px; margin-top: -8px;
  border: solid var(--amber); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.field.search svg { position: absolute; left: .8rem; width: 16px; height: 16px; fill: none; stroke: #e9cfa6; stroke-width: 2; pointer-events: none; }
.field input::placeholder { color: #bba485; }
.family-chips { margin-top: 1.5rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .4rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.family-chips .chip { white-space: nowrap; color: #f2e3c9; border-color: rgba(255, 238, 210, .22); }
.family-chips .chip:hover { border-color: var(--amber); }
.family-chips .chip.on { background: var(--amber); color: #241404; border-color: var(--amber); }

.shelf-stage { position: relative; margin-top: 1.4rem; }
.shelf-viewport {
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; cursor: grab;
  perspective: 1100px; perspective-origin: 50% 40%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
.shelf-viewport::-webkit-scrollbar { display: none; }
.shelf-viewport.dragging { cursor: grabbing; }
.shelf-viewport:focus-visible { outline-offset: -4px; }
.shelf-track {
  --slosh: 0deg;
  position: relative; display: inline-flex; list-style: none; margin: 0;
  padding: 1.5rem calc(50vw - 85px) 0;
  transform-style: preserve-3d;
}
/*
 * The shelf is one long oak board seen slightly from above: ::before is its
 * top, which the glasses stand on (darker towards the wall, where the lamp
 * does not reach), ::after the front edge with a rounded, lit lip.
 */
.shelf-track::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 44px; height: 32px;
  background:
    linear-gradient(180deg, rgba(10, 5, 0, .62) 0%, rgba(10, 5, 0, .18) 38%, rgba(255, 210, 150, .06) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='64'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.33' numOctaves='4' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.1  0 0 0 0 0.03  0 0 0 1 -0.28'/%3E%3C/filter%3E%3Crect width='900' height='64' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 900px 32px,
    linear-gradient(180deg, #6e4520, #a06b38);
  z-index: -1;
}
.shelf-track::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 16px; height: 28px;
  background:
    linear-gradient(180deg, rgba(255, 226, 180, .45) 0, rgba(255, 226, 180, .08) 3px, rgba(0,0,0,0) 40%, rgba(0,0,0,.35) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='56'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0035 0.3' numOctaves='4' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.08  0 0 0 0 0.02  0 0 0 1 -0.25'/%3E%3C/filter%3E%3Crect width='900' height='56' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 900px 28px,
    linear-gradient(180deg, #8f5d2e 0%, #74481f 55%, #5a3616 100%);
  box-shadow: 0 22px 30px -6px rgba(0, 0, 0, .7), 0 2px 0 rgba(0, 0, 0, .5);
  z-index: -1;
}
.shelf-item { flex: 0 0 170px; display: flex; justify-content: center; }
.bottle {
  background: none; border: 0; padding: 0; width: 100%;
  display: block; text-align: center; color: inherit;
}
.bottle-inner {
  display: flex; flex-direction: column; align-items: center;
  transform-style: preserve-3d; will-change: transform, opacity;
  /* the foot of the glass: 3.4rem below the glass box plus the 7px the foot sits above its box */
  transform-origin: 50% calc(100% - 3.4rem - 7px);
  transition: filter .3s;
}
.glass-box { display: block; width: 140px; height: 233px; position: relative; margin-bottom: 3.4rem; }
.glass-box::before {
  /* coloured light thrown through the beer onto the board */
  content: ""; position: absolute; left: 14%; right: 14%; bottom: -2px; height: 18px;
  background: radial-gradient(closest-side, var(--glow, rgba(255, 190, 90, .35)), transparent);
  opacity: .55;
}
.glass-box::after {
  /* contact shadow where the glass stands */
  content: ""; position: absolute; left: 24%; right: 24%; bottom: 3px; height: 8px;
  background: radial-gradient(closest-side, rgba(0,0,0,.75), transparent);
}
.glass-box .glass { width: 100%; height: 100%; display: block; overflow: visible; position: relative; z-index: 1; }
.shelf-item.center .glass-box::before { opacity: 1; }
.shelf-tag {
  position: absolute; bottom: .35rem; left: 50%; transform: translateX(-50%) rotate(-1.2deg);
  width: 150px; padding: .4rem .5rem .45rem;
  background: var(--cream); color: #2b1d10; border-radius: 3px;
  box-shadow: 0 6px 14px rgba(0,0,0,.45);
  font-family: var(--sans); line-height: 1.15;
}
.bottle-inner { position: relative; }
.shelf-tag::before { content: ""; position: absolute; left: 8px; right: 8px; top: 3px; height: 1px; background: var(--red-line); }
.t-name { display: block; font-family: var(--serif); font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .15rem; }
.t-meta { display: block; font-size: .68rem; color: #6d5842; margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottle:hover .t-name, .bottle:focus-visible .t-name { color: var(--amber-deep); }

.shelf-arrow {
  position: absolute; top: 40%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 244, 225, .1); border: 1px solid rgba(255, 244, 225, .28); color: #fff4df;
  backdrop-filter: blur(6px); transition: background-color .2s, transform .15s;
}
.shelf-arrow:hover { background: rgba(255, 244, 225, .2); }
.shelf-arrow:active { transform: translateY(-50%) scale(.95); }
.shelf-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.shelf-arrow.prev { left: clamp(.5rem, 3vw, 2.5rem); }
.shelf-arrow.next { right: clamp(.5rem, 3vw, 2.5rem); }
.shelf-empty { text-align: center; color: #d6c2a2; font-family: var(--sans); padding: 5rem 1rem; margin: 0; position: absolute; inset: 0; }

.shelf-foot { display: flex; align-items: center; gap: 1.2rem; margin-top: 1.2rem; }
#shelf-scrub {
  --spectrum: linear-gradient(90deg, #ffe699, #36080a);
  flex: 1; appearance: none; -webkit-appearance: none; height: 10px; border-radius: 99px;
  background: var(--spectrum); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); cursor: pointer;
}
#shelf-scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff7e8; border: 3px solid #1d130b; box-shadow: 0 0 0 2px rgba(255, 220, 160, .6), 0 4px 10px rgba(0,0,0,.4); }
#shelf-scrub::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff7e8; border: 3px solid #1d130b; box-shadow: 0 0 0 2px rgba(255, 220, 160, .6); }
.shelf-count { margin: 0; font-family: var(--sans); font-size: .82rem; color: #bca47f; white-space: nowrap; }

/* glass drawing */
.glass .g-back { fill: rgba(255, 245, 225, .05); }
/* thick glass: a soft, wide translucent wall under a thin bright edge */
.glass .g-wall { fill: none; stroke: rgba(235, 244, 246, .2); stroke-width: 4.2; stroke-linejoin: round; }
.glass .g-edge { fill: none; stroke: rgba(255, 255, 255, .7); stroke-width: .9; stroke-linejoin: round; }
.glass .g-rim { fill: rgba(255, 255, 255, .04); stroke: rgba(255, 255, 255, .75); stroke-width: 1.1; }
.glass .g-solid { fill: url(#glassSolid); stroke: rgba(255, 255, 255, .6); stroke-width: .9; }
.glass .g-foot { fill: url(#glassSolid); stroke: rgba(255, 255, 255, .6); stroke-width: .9; }
.glass .g-foot-rim { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: .8; }
.glass .g-handle { fill: none; stroke: rgba(226, 236, 240, .38); stroke-width: 6.5; stroke-linecap: round; }
.glass .g-handle-hi { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 1.2; stroke-linecap: round; }
.glass .g-sheen { fill: url(#sheen); }
.glass .g-streak { fill: none; stroke: rgba(255, 255, 255, .42); stroke-width: 2.6; stroke-linecap: round; }
.glass .g-streak.dim { stroke: rgba(255, 255, 255, .22); }
.glass .g-base-line { stroke: rgba(255, 255, 255, .5); stroke-width: .8; }
.glass .g-pores circle { fill: rgba(150, 110, 60, .16); }
.glass .g-drops ellipse { fill: rgba(255, 255, 255, .16); stroke: rgba(255, 255, 255, .38); stroke-width: .35; }
.glass .g-dimples ellipse { fill: rgba(255, 255, 255, .03); stroke: rgba(255, 255, 255, .16); stroke-width: .8; }
.glass .g-facets path { stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.glass .slosh { transform: rotate(var(--slosh, 0deg)); transform-box: view-box; }
.glass .bub { fill: rgba(255, 250, 225, .75); transform-box: fill-box; opacity: 0; }
.shelf-item.near .bub, .result-glass .bub, .card-glass .bub, .empty-glass .bub { animation: rise 3s linear infinite; }
@keyframes rise {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: .9; }
  85% { opacity: .75; }
  100% { transform: translateY(var(--rise)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .glass .bub { animation: none !important; opacity: .5; } }

/* --------------------------------------------------------------- pick */
.pick-section { padding: 5.5rem 0; background: var(--paper); }
.pick-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 2.2rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 900px) { .pick-grid { grid-template-columns: 1fr; } }
.tabs { display: inline-flex; gap: .25rem; padding: .3rem; border-radius: 999px; background: var(--paper-alt); border: 1px solid var(--line); margin-bottom: 1.4rem; }
.tabs [role=tab] { border: 0; background: none; padding: .6rem 1.2rem; border-radius: 999px; font-family: var(--sans); font-weight: 600; font-size: .92rem; color: var(--ink-soft); }
.tabs [role=tab][aria-selected="true"] { background: var(--ink); color: var(--paper); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.panel-prompt { font-size: 1.2rem; margin: 0 0 1rem; }
.panel-or { font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--ink-soft); margin: 1.6rem 0 .8rem; }
.btn.locate { background: var(--ink); color: var(--paper); }
.btn.locate:hover { background: var(--accent); color: #fff; }
.weather-status { font-family: var(--sans); font-size: .95rem; margin: .9rem 0 .2rem; min-height: 1.4em; }
.weather-status.busy::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .5em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -.1em; }
.weather-status.warn { color: #b0442b; }
@keyframes spin { to { transform: rotate(360deg); } }
.fineprint { font-family: var(--sans); font-size: .78rem; color: var(--ink-soft); margin: .2rem 0 0; max-width: 60ch; }
.fineprint a { color: var(--accent); }
.weather-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (max-width: 480px) { .weather-grid { grid-template-columns: repeat(2, 1fr); } }
.wx {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: 1rem .6rem .85rem; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  font-family: var(--sans); font-size: .88rem; font-weight: 600;
  transition: transform .15s, border-color .15s, box-shadow .15s, background-color .15s;
}
@media (prefers-color-scheme: dark) { .wx { background: var(--paper-alt); } }
.wx svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--accent); }
.wx:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 6px 16px rgba(80, 40, 0, .1); }
.wx.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.wx.on svg { color: var(--amber); }
.food-group { margin-bottom: 1.1rem; }
.food-group h4, .crit h4 { font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; color: var(--ink-soft); margin: 0 0 .5rem; font-weight: 700; }
.crit { margin-bottom: 1rem; }
#taste-reset { margin-top: .4rem; color: var(--ink); border-color: var(--line); }

.pick-result { position: sticky; top: 80px; }
.result-card { display: grid; grid-template-columns: 150px 1fr; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(60, 30, 0, .22); animation: deal .45s cubic-bezier(.2, .8, .2, 1); }
.result-card.swap { animation: none; }
.result-card.swap .result-glass { animation: pour-in .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes deal { from { opacity: 0; transform: translateY(14px) rotate(-.6deg); } to { opacity: 1; transform: none; } }
@keyframes pour-in { from { opacity: 0; transform: translateX(-30px) rotate(-8deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .result-card, .result-card .result-glass { animation: none !important; } }
.result-niche {
  display: grid; place-items: end center; padding: 1.2rem .6rem 1.8rem;
  background:
    radial-gradient(80% 50% at 50% 70%, rgba(255, 170, 70, .28), transparent 70%),
    linear-gradient(180deg, #23170e, #140d08);
  position: relative;
}
.result-niche::after { content: ""; position: absolute; left: 0; right: 0; bottom: .9rem; height: 10px; background: linear-gradient(180deg, #8d5f33, #4f3218); box-shadow: 0 8px 12px rgba(0,0,0,.5); }
.result-glass { width: 120px; position: relative; z-index: 1; margin-bottom: .2rem; }
.result-glass .glass { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 0 16px rgba(255, 190, 90, .3)); }
.result-empty { border: 2px dashed var(--line); border-radius: 18px; padding: 2rem; text-align: center; color: var(--ink-soft); font-family: var(--sans); background: var(--paper-alt); }
.empty-glass { width: 90px; margin: 0 auto 1rem; opacity: .55; filter: grayscale(.4); background: #2a1b10; border-radius: 12px; padding: .6rem; }
.empty-glass .glass { display: block; width: 100%; height: auto; }
.result-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.result-counter { font-family: var(--mono); font-size: .72rem; color: #7c6852; margin: .7rem 0 0; }
.why { margin: 0; padding-left: 1.1rem; font-family: var(--sans); font-size: .9rem; }
.why li { margin: .2rem 0; }
.why li::marker { color: var(--amber-deep); }
@media (max-width: 480px) { .result-card { grid-template-columns: 1fr; } .result-niche { padding-top: 1.5rem; } }

/* -------------------------------------------------------- index cards */
.idx-card {
  position: relative; background: var(--card); color: var(--card-ink);
  --pad: 1.6rem;
  padding: 0 var(--pad) 1.5rem;
  background-image: repeating-linear-gradient(180deg, transparent 0 25px, var(--rule) 25px 26px);
}
/* the header of a library index card: blank, closed by the red line */
.idx-head {
  margin: 0 calc(-1 * var(--pad));
  padding: 1.5rem var(--pad) .9rem;
  background: var(--card);
  border-bottom: 1.5px solid var(--red-line);
}
.idx-kicker { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: #8b6a47; margin: 0 0 .3rem; }
.idx-title { font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.15; margin: 0; }
.card-local { font-style: italic; color: #6f5943; margin: .2rem 0 0; }
.idx-meta { font-family: var(--mono); font-size: .78rem; color: #5d4a36; margin: .9rem 0 0; }
.idx-desc { margin: 1.1rem 0 0; font-size: 1rem; line-height: 1.62; }
.idx-desc.short { font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.idx-sub { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #8b6a47; margin: 1.3rem 0 .5rem; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.tag { font-family: var(--sans); font-size: .78rem; padding: .28rem .6rem; border-radius: 999px; background: rgba(120, 80, 30, .09); color: #4a3520; border: 1px solid rgba(120, 80, 30, .14); }
.tag-btn { cursor: pointer; }
.tag-btn:hover { background: rgba(200, 120, 20, .18); }
.tags.matched { margin-top: .8rem; }
.tags.matched .tag { background: rgba(60, 130, 70, .1); border-color: rgba(60, 130, 70, .25); color: #2f5a33; }

.idx-stats { margin-top: 1.2rem; display: grid; gap: .75rem; }
.idx-stats > div { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; column-gap: .8rem; }
.idx-stats .lbl { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #8b6a47; }
.idx-stats b { font-family: var(--sans); font-size: .9rem; }
.idx-stats .bar { grid-column: 2; position: relative; height: 7px; border-radius: 99px; background: rgba(90, 60, 30, .12); margin-top: .3rem; }
.idx-stats .bar > span { position: absolute; top: -2px; bottom: -2px; border-radius: 99px; background: linear-gradient(90deg, #f0b04f, #c7740f); box-shadow: 0 0 0 2px var(--card); }
.idx-stats .bar.spectrum { background: var(--spectrum); }
.idx-stats .bar.spectrum > span { background: transparent; box-shadow: 0 0 0 2px var(--card-ink), 0 0 0 4px var(--card); }
.idx-stats .facts { grid-template-columns: repeat(2, 1fr); gap: .6rem .8rem; margin-top: .3rem; }
.idx-stats .facts > span { display: flex; flex-direction: column; }
.idx-profile { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem 1.2rem; font-family: var(--sans); font-size: .82rem; }
.idx-profile li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #c49a62; }
.pips i.on { background: radial-gradient(circle at 35% 35%, #ffd27d, #d38416); border-color: #b86f12; }
@media (max-width: 520px) { .idx-profile { grid-template-columns: 1fr; } .idx-stats > div { grid-template-columns: 1fr; } .idx-stats .bar { grid-column: 1; } }

/* ------------------------------------------------------------ dialogs */
dialog { border: 0; padding: 0; background: transparent; color: inherit; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(12, 7, 3, .72); backdrop-filter: blur(4px); }
.card-dialog { width: min(1040px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); margin: auto; }
.card-shell { position: relative; }
.card-body {
  display: grid; grid-template-columns: 300px 1fr; border-radius: 20px; overflow: hidden;
  max-height: calc(100dvh - 1.5rem); box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.card-body.flip { animation: flip .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes flip { from { opacity: 0; transform: perspective(1200px) rotateY(-10deg) translateX(-16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card-body.flip { animation: none; } }
.card-visual {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 2.5rem 1rem 1.4rem;
  background:
    radial-gradient(70% 45% at 50% 62%, rgba(255, 170, 70, .3), transparent 70%),
    linear-gradient(180deg, #24180e, #120b06);
  position: relative;
}
.card-glass { width: 200px; position: relative; }
.card-glass::after { content: ""; position: absolute; left: -30px; right: -30px; bottom: -14px; height: 14px; background: linear-gradient(180deg, #92623a, #4f3218); border-radius: 2px; box-shadow: 0 10px 16px rgba(0,0,0,.55); }
.card-glass .glass { width: 100%; height: auto; display: block; overflow: visible; position: relative; z-index: 1; filter: drop-shadow(0 0 22px rgba(255, 190, 90, .35)); }
.card-plate { margin: 1.8rem 0 0; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: #d8c09a; text-transform: uppercase; text-align: center; }
.card-body .idx-card { overflow-y: auto; max-height: calc(100dvh - 1.5rem); --pad: 2.1rem; padding: 0 var(--pad) 2rem; }
.dlg-close {
  position: absolute; top: .7rem; right: .7rem; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(30, 20, 10, .75); border: 1px solid rgba(255,255,255,.2); color: #fff4df;
}
.dlg-close svg, .card-step svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.card-step {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(30, 20, 10, .75); border: 1px solid rgba(255,255,255,.2); color: #fff4df;
}
.card-step.prev { left: -.4rem; }
.card-step.next { right: -.4rem; }
@media (min-width: 1100px) { .card-step.prev { left: -3.6rem; } .card-step.next { right: -3.6rem; } }
@media (max-width: 760px) {
  .card-body { grid-template-columns: 1fr; overflow-y: auto; }
  .card-visual { padding: 2.2rem 1rem 1rem; }
  .card-glass { width: 130px; }
  .card-body .idx-card { max-height: none; overflow: visible; --pad: 1.2rem; padding: 0 var(--pad) 1.5rem; }
  .card-step { top: 150px; }
}

.legal-dialog { width: min(760px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); margin: auto; }
.legal-dialog .dlg-close { background: var(--ink); color: var(--paper); }
.legal-body {
  background: var(--paper); color: var(--ink); border-radius: 18px;
  padding: 2.2rem clamp(1.2rem, 4vw, 2.6rem); max-height: calc(100dvh - 1.5rem); overflow-y: auto;
  font-size: .98rem; line-height: 1.6; box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.legal-body h2 { font-size: 1.9rem; margin-top: 0; }
.legal-body h3 { font-size: 1.12rem; margin: 1.6rem 0 .4rem; }
.legal-body p, .legal-body li { margin: .45rem 0; }
.legal-body a { color: var(--accent); }
.legal-body .updated { font-family: var(--sans); font-size: .82rem; color: var(--ink-soft); }

/* -------------------------------------------------------------- guide */
.guide-section { background: var(--paper); }
/* below the fold: let the browser skip laying out and painting these until they are near */
.pick-section, .guide-section { content-visibility: auto; contain-intrinsic-size: auto 1400px; }
.guide-section .wrap { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.guide-section p { margin: 0 0 1rem; }
.guide-band { background: var(--paper-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.reading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 2rem; margin: 1.4rem 0 0; }
.reading dt { font-weight: 700; margin-bottom: .2rem; }
.reading dd { margin: 0; color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 640px) { .reading { grid-template-columns: 1fr; } }
ol.steps { padding-left: 1.3rem; }
ol.steps li { margin-bottom: .6rem; }
.table-scroll { overflow-x: auto; margin-top: 1.2rem; }
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .92rem; min-width: 460px; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); font-weight: 600; }
blockquote { margin: 0; padding-left: 1.5rem; border-left: 3px solid var(--accent); font-size: clamp(1.2rem, 2.6vw, 1.5rem); font-style: italic; line-height: 1.45; }
.quote-note { font-family: var(--sans); font-size: .9rem; color: var(--ink-soft); margin-top: 1rem !important; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ------------------------------------------------------------- footer */
.site-footer { background: #140d08; color: #cdb99b; padding: 3rem 0 3.5rem; font-family: var(--sans); font-size: .88rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.2fr .8fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer p { margin: 0 0 .6rem; }
.brand-foot { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: #fff4df; }
.age-badge { display: inline-grid; place-items: center; min-width: 2.4rem; height: 1.6rem; padding: 0 .4rem; border: 1.5px solid #e9c78c; border-radius: 6px; color: #fff4df; font-weight: 700; font-size: .8rem; margin-right: .3rem; }
.footer-links { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.footer-links a { color: #fff4df; text-decoration: none; border-bottom: 1px solid rgba(255, 244, 223, .25); }
.footer-links a:hover { border-color: var(--amber); }
.footer-langs { display: flex; gap: .3rem; margin-top: .6rem; }
.footer-langs button { background: none; border: 1px solid rgba(255,255,255,.2); color: #e6d4b8; border-radius: 6px; padding: .25rem .5rem; font-size: .78rem; }
.footer-langs button.on { background: var(--amber); color: #1f1206; border-color: var(--amber); }

.noscript { position: fixed; inset: auto 1rem 1rem 1rem; background: var(--amber); color: #1a0f05; padding: 1rem; border-radius: 12px; font-family: var(--sans); z-index: 60; }

/* ------------------------------------------------------------ wordmark */
/* "Head" is the foam: soft cream with a faint bubbled texture. "Body" is the
   beer: gold at the top deepening to amber. The ampersand is a thin italic in
   between, like the line where head meets beer. */
.wm { white-space: nowrap; }
.wm-head, .wm-body { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.wm-head {
  background-image: linear-gradient(180deg, #fffdf8 0%, #f8eedb 58%, #e6d2ab 100%);
}
.wm-body {
  background-image: linear-gradient(180deg, #ffe3a0 0%, #f5b847 34%, #e0911a 64%, #a95a0b 100%);
}
.wm-amp {
  font-style: italic; font-weight: 400; color: #e9a23c; -webkit-text-fill-color: currentColor;
  margin: 0 -.02em; opacity: .95;
}
/* the large hero version carries the bubbles; at nav size they would only be noise */
.wm-hero .wm-head {
  background-image:
    radial-gradient(circle at 30% 35%, rgba(255, 255, 255, .7) 0 .03em, rgba(255, 255, 255, 0) .045em),
    radial-gradient(circle at 70% 70%, rgba(200, 172, 128, .35) 0 .022em, rgba(200, 172, 128, 0) .034em),
    linear-gradient(180deg, #fffdf8 0%, #f8eedb 58%, #e3cda2 100%);
  background-size: .19em .17em, .13em .15em, 100% 100%;
  -webkit-text-stroke: .012em rgba(96, 60, 22, .45);
}
.wm-hero .wm-amp { font-size: .78em; vertical-align: .06em; margin: 0 .02em; }
.brand .wm-amp, .brand-foot .wm-amp { margin: 0 .04em; }
