: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; }
/* no pinch or double-tap zoom: a stray two-finger swipe on the shelf used to zoom the page */
html { touch-action: pan-x pan-y; }
@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, .country { position: relative; }
.country { margin-left: .2rem; }
#lang-button, #country-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, #country-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
#lang-menu, #country-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, #country-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, #country-menu button:hover, #country-menu button:focus-visible { background: rgba(255,255,255,.08); }
#lang-menu button[aria-checked="true"]::after, #country-menu button[aria-checked="true"]::after { content: "✓"; float: right; color: var(--amber); }
@media (max-width: 640px) {
  .navlinks { display: none; }
  .country { margin-left: auto; }
  .topnav { gap: .5rem; }
}

/* --------------------------------------------------------------- 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-note { margin-top: .1rem; font-size: .7rem; font-weight: 600; letter-spacing: .04em; color: #ffd48a; }
.bd-note[hidden] { display: none; }
.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; }
/*
 * Lighting for wider screens. On a phone the lamp already covers the few
 * glasses in view; across a desktop-wide shelf the same glow spreads thin and
 * everything looks evenly, flatly lit. Here the lamp keeps a fixed size: a
 * soft beam falls on the glass in front, pools on the board around its foot,
 * and the light dies away along the shelf and into the corners of the wall.
 * None of it changes the glasses or the board - it is light laid over them.
 */
@media (min-width: 761px) {
  .shelf-section {
    background:
      radial-gradient(135% 100% at 50% 60%, transparent 48%, rgba(6, 3, 1, .55) 100%),
      radial-gradient(38rem 24rem at 50% 64%, rgba(255, 170, 70, .24), rgba(255, 170, 70, 0) 72%),
      radial-gradient(40% 40% at 12% 8%, rgba(255, 200, 120, .06), 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 { width: 40rem; height: 40rem; background: radial-gradient(closest-side, rgba(255, 196, 110, .2), transparent); }
  .shelf-stage::before {
    /* the beam, on the wall behind the glasses */
    content: ""; position: absolute; left: 50%; top: -4rem; bottom: 3rem; width: 34rem; transform: translateX(-50%);
    background: radial-gradient(36% 80% at 50% 12%, rgba(255, 214, 150, .13), rgba(255, 214, 150, .04) 60%, transparent 100%);
    pointer-events: none;
  }
  .shelf-stage::after {
    /* light on the glasses and the board: soft-light brightens where warm and
       deepens where dark, like a real lamp rather than a coloured haze */
    content: ""; position: absolute; inset: -3rem 0 0; z-index: 2; pointer-events: none;
    background:
      radial-gradient(15rem 4.5rem at 50% calc(100% - 3.9rem), rgba(255, 222, 165, .75), transparent 72%),
      radial-gradient(24rem 20rem at 50% 48%, rgba(255, 228, 180, .4), transparent 75%),
      linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .55));
    mix-blend-mode: soft-light;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 6rem);
            mask-image: linear-gradient(180deg, transparent, #000 6rem);
  }
}
.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 {
  position: relative; display: inline-flex; list-style: none; margin: 0;
  /* the bottom padding is room for shelf labels that hang below the board */
  padding: 1.5rem calc(50vw - 85px) var(--tag-room);
  --tag-room: 34px;
  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: calc(44px + var(--tag-room)); 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: calc(16px + var(--tag-room)); 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; }

/*
 * The coverflow: how far a glass is from the middle of the shelf decides how
 * far it steps forward or back, turns and shrinks. Where the browser supports
 * scroll-driven animations this runs in the browser's own scrolling, frame for
 * frame with the finger or the wheel - no script in between that could fall a
 * frame behind and make the glasses jump as the shelf slows down. Other
 * browsers get the same curve from updateShelf() in js/app.js.
 *
 * The range covers five slots (170px each) either side of the middle;
 * keyframes sit at 5, 2.82 (where the turn reaches its limit), 1 and 0 slots.
 */
@keyframes coverflow {
  0%    { transform: translateZ(-64px) rotateY(-48deg) scale(.775); opacity: .575; }
  21.8% { transform: translateZ(-29.1px) rotateY(-48deg) scale(.873); opacity: .76; }
  40%   { transform: translateZ(0) rotateY(-17deg) scale(.955); opacity: .915; }
  50%   { transform: translateZ(42px) rotateY(0deg) scale(1); opacity: 1; }
  60%   { transform: translateZ(0) rotateY(17deg) scale(.955); opacity: .915; }
  78.2% { transform: translateZ(-29.1px) rotateY(48deg) scale(.873); opacity: .76; }
  100%  { transform: translateZ(-64px) rotateY(48deg) scale(.775); opacity: .575; }
}
@supports (animation-timeline: view()) {
  .shelf-item { view-timeline: --slot inline; }
  .bottle-inner {
    animation: coverflow linear both;
    animation-timeline: --slot;
    animation-range: cover calc(50% - 850px) cover calc(50% + 850px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bottle-inner { animation: none !important; }
}
.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; }
/* the beer and its head tilt as the shelf moves (--slosh is set by js/app.js) */
.glass .slosh { transform: rotate(var(--slosh, 0deg)); transform-box: view-box; }
.shelf-item.center .glass-box::before { opacity: 1; }
/*
 * Labels are pinned to the front edge of the board, outside the part of the
 * item that turns and scales: while the shelf moves they only slide along it.
 * Each one is as wide as its name needs (within the width of a slot) and a
 * long name wraps onto a second line, so the label hangs a little lower -
 * no name is ever cut off, in any language.
 */
.bottle { position: relative; }
.shelf-tag {
  position: absolute; top: calc(100% - 3.25rem); left: 50%; transform: translateX(-50%) rotate(-1.2deg);
  width: max-content; min-width: 7.5rem; max-width: 158px; box-sizing: border-box;
  padding: .4rem .55rem .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, .t-meta { display: block; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.t-name { font-family: var(--serif); font-weight: 700; font-size: .86rem; margin-top: .15rem; }
.t-name.tight { font-size: .76rem; letter-spacing: -.01em; }
.t-name.tighter { font-size: .7rem; }
.t-meta { font-size: .68rem; color: #6d5842; margin-top: .15rem; }
.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 .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); }
/* The card scrolls in exactly one place: the text column on wide screens, the
   whole card on narrow ones. The dialog itself never scrolls, so the arrows
   that stick out past its edges cannot add a horizontal scrollbar. */
.card-dialog { width: min(1040px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); margin: auto; overflow: visible; }
.card-body, .card-body .idx-card {
  overflow-x: hidden; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(139, 106, 71, .55) transparent;
}
.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: 1180px) { .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: plain snow white. "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-body { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.wm-head { color: #ffffff; }
.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;
}
.wm-hero .wm-amp { font-size: .78em; vertical-align: .06em; margin: 0 .02em; }
.brand .wm-amp, .brand-foot .wm-amp { margin: 0 .04em; }

.account-slot:empty { display: none; }

/* ------------------------------------------------------------ welcome */
/* country, language and age on the first visit; it cannot be skipped */
.welcome-dialog { width: min(520px, calc(100vw - 1.5rem)); margin: auto; }
.welcome-dialog::backdrop { background: rgba(12, 7, 3, .82); backdrop-filter: blur(10px); }
.welcome {
  background: linear-gradient(180deg, #2a1b10, #1a110a); color: #f5ead6;
  border: 1px solid rgba(255, 244, 225, .14); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  padding: 1.8rem clamp(1.2rem, 4vw, 2rem) 1.4rem; font-family: var(--sans);
}
.welcome-brand { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; margin: 0 0 .9rem; }
.welcome-title { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 1.9rem); line-height: 1.15; margin: 0 0 .5rem; color: #fff7e8; }
.welcome-lede { margin: 0 0 1.2rem; color: #d8c4a4; line-height: 1.5; }
.welcome-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1.2rem; }
@media (max-width: 460px) { .welcome-fields { grid-template-columns: 1fr; } }
.welcome-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); margin-bottom: .35rem; }
.welcome-field .dd, .welcome-field .dd-btn { width: 100%; }
.welcome-question { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 .8rem; color: #fff7e8; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.1rem; }
.welcome-actions .btn.ghost { color: #f5ead6; border-color: rgba(255, 244, 225, .3); }
.welcome-actions .btn.ghost:hover { background: rgba(255, 244, 225, .08); }
.welcome-notice { margin: 0; padding-top: .9rem; border-top: 1px solid rgba(255, 244, 225, .12); font-size: .78rem; line-height: 1.5; color: #bda888; }
.welcome-notice a { color: #f3c77f; }

/* -------------------------------------------------------------- shops */
.shops { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; }
.shop {
  display: inline-flex; align-items: center; gap: .35rem; font-family: var(--sans); font-size: .82rem; font-weight: 600;
  padding: .45rem .75rem; border-radius: 999px; text-decoration: none;
  background: #2b1d10; color: #fff4df; border: 1px solid #2b1d10;
}
.shop:hover { background: #b5690f; border-color: #b5690f; }
.shop svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shops-note { font-family: var(--sans); font-size: .74rem; color: #7c6852; margin: .5rem 0 0; }

/* ------------------------------------------------------------ journal */
.account-btn {
  display: inline-flex; align-items: center; gap: .45rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: .3rem .75rem .3rem .4rem; color: inherit; font-size: .85rem; font-weight: 600; font-family: var(--sans);
}
.account-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; margin-left: .25rem; }
.account-initial { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--amber); color: #241404; font-size: .78rem; font-weight: 700; }
@media (max-width: 640px) { .account-label { display: none; } .account-btn { padding: .3rem .45rem; } }

.journal-dialog { width: min(720px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); margin: auto; overflow: visible; }
.journal-dialog .dlg-close { background: var(--ink); color: var(--paper); }
.journal {
  background: var(--card); color: var(--card-ink); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
  max-height: calc(100dvh - 1.5rem); overflow-y: auto; overscroll-behavior: none; overflow-x: hidden;
  padding: 1.6rem clamp(1.1rem, 4vw, 2rem) 1.4rem; font-family: var(--sans); font-size: .95rem;
  scrollbar-width: thin; scrollbar-color: rgba(139, 106, 71, .55) transparent;
}
.j-title { font-family: var(--serif); font-size: clamp(1.4rem, 3.4vw, 1.8rem); line-height: 1.15; margin: 0 2.5rem .4rem 0; }
.j-lede { margin: 0 0 1.1rem; color: #5d4a36; line-height: 1.5; }
.j-loading { margin: 2rem 0; color: #7c6852; }
.j-providers { display: grid; gap: .5rem; margin-bottom: 1rem; }
.j-provider { background: #2b1d10; color: #fff4df; justify-content: center; }
.j-provider:hover { background: #b5690f; }
/* "Sign in with Google" per Google's branding guidelines, light theme: white fill,
   1px #747775 border, #1F1F1F Roboto Medium 14/20, 40px high, 12px | 18px G | 10px | text | 12px */
.gsi-button {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 40px; box-sizing: border-box;
  padding: 0 12px; border: 1px solid #747775; border-radius: 20px; background: #fff; color: #1f1f1f;
  font-family: Roboto, Arial, sans-serif; font-weight: 500; font-size: 14px; line-height: 20px; letter-spacing: .25px;
  cursor: pointer; transition: background-color .218s, box-shadow .218s;
}
.gsi-icon { display: flex; width: 18px; height: 18px; margin-right: 10px; flex: none; }
.gsi-icon svg { display: block; width: 18px; height: 18px; }
.gsi-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsi-button:hover { background: #f7f8f8; box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); }
.gsi-button:active { background: #e3e3e3; }
.gsi-button:focus-visible { outline: 2px solid #0b57d0; outline-offset: 2px; }
.j-email label, .j-label, .j-field label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8b6a47; margin: 0 0 .35rem; }
.j-row { display: flex; gap: .5rem; }
.j-row input { flex: 1; min-width: 0; }
.journal input[type="text"], .journal input[type="email"], .journal input[type="date"], .journal textarea {
  width: 100%; font: inherit; color: var(--card-ink); background: #fff; border: 1px solid #dccab0; border-radius: 10px; padding: .55rem .7rem;
}
.journal input:focus, .journal textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: transparent; }
.journal .btn.ghost { color: var(--card-ink); }
.j-sent { background: rgba(60, 130, 70, .1); color: #2f5a33; border-radius: 10px; padding: .7rem .9rem; margin: 0 0 1rem; }
.j-note { font-size: .78rem; color: #7c6852; margin: 1rem 0 0; line-height: 1.5; }
.j-note a, .j-check a { color: var(--accent); }
.j-status { min-height: 1.2em; margin: .6rem 0 0; font-size: .85rem; color: #5d4a36; }
.j-status.warn { color: #a8321f; }
.j-status.ok { color: #2f5a33; }
.j-check { display: flex; gap: .55rem; align-items: flex-start; margin: 0 0 .7rem; line-height: 1.4; }
.j-check input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--amber-deep); }
.j-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.btn.danger { background: #a8321f; color: #fff; box-shadow: none; }
.j-head { margin-bottom: .8rem; }
.j-who { margin: 0; font-size: .85rem; color: #7c6852; }
.j-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
/* four equal tabs that always fit: nothing to drag sideways */
.j-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .15rem; border-bottom: 1px solid #e6d7bd; margin-bottom: 1rem; touch-action: manipulation; }
.j-tab { min-width: 0; background: none; border: 0; border-bottom: 2px solid transparent; padding: .55rem .3rem; font: inherit; font-weight: 600; font-size: .92rem; line-height: 1.2; color: #7c6852; margin-bottom: -1px; text-align: center; overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 460px) { .j-tab { font-size: .8rem; padding: .5rem .15rem; } .j-count { display: none; } }
.j-tab[aria-selected="true"] { color: var(--card-ink); border-bottom-color: var(--amber-deep); }
.j-count { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 999px; background: #efe2c9; font-size: .75rem; }
.j-form { display: grid; gap: .9rem; }
.j-grid { display: grid; grid-template-columns: 1fr 12rem; gap: .9rem; }
@media (max-width: 520px) { .j-grid { grid-template-columns: 1fr; } }
.j-swatch { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.j-stars { display: flex; align-items: center; gap: .15rem; }
.j-star { background: none; border: 0; padding: 0 .1rem; font-size: 1.7rem; line-height: 1; color: #d9c7a8; }
.j-star.on { color: #d98a1d; }
.j-stars-text { margin-left: .6rem; color: #5d4a36; font-size: .9rem; }
.j-hint { margin: -.15rem 0 .45rem; font-size: .78rem; color: #8b7560; }
.j-aspects { display: flex; flex-wrap: wrap; gap: .35rem; }
.j-aspect { font: inherit; font-size: .82rem; padding: .35rem .7rem; border-radius: 999px; background: rgba(120, 80, 30, .07); color: #4a3520; border: 1px solid rgba(120, 80, 30, .16); }
.j-aspect.liked { background: rgba(60, 130, 70, .14); border-color: rgba(60, 130, 70, .45); color: #2f5a33; }
.j-aspect.disliked { background: rgba(168, 50, 31, .1); border-color: rgba(168, 50, 31, .4); color: #8a2a1a; }
.j-summary { margin: 0 0 .8rem; color: #5d4a36; }
.j-empty { color: #7c6852; margin: 1.2rem 0; }
.j-history, .j-recs { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.j-entry { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; padding: .7rem 0; border-top: 1px solid #efe3cd; }
.j-month { padding: .9rem 0 .15rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a07a4e; }
.j-month + .j-entry { border-top: 0; }

/* a glass on its own little piece of shelf, as on the page */
.j-glass {
  position: relative; display: block; flex: 0 0 auto; width: 46px; height: 62px; padding: 5px 6px 7px; box-sizing: border-box;
  border-radius: 10px; background: radial-gradient(120% 90% at 50% 20%, #4a321d 0%, #24170c 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 160, .08), 0 3px 8px rgba(43, 29, 16, .25); overflow: hidden;
}
.j-glass::after { content: ""; position: absolute; left: 3px; right: 3px; bottom: 4px; height: 3px; border-radius: 1px; background: linear-gradient(180deg, #92623a, #4f3218); }
.j-glass .glass { position: relative; z-index: 1; display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 6px rgba(255, 190, 90, .3)); }
.j-glass-sm { width: 34px; height: 46px; padding: 4px 4px 6px; border-radius: 8px; }
.j-glass-xs { width: 22px; height: 30px; padding: 2px 2px 4px; border-radius: 6px; box-shadow: none; }
.j-glass-xs::after { bottom: 2px; height: 2px; }
.j-entry-glass, .j-rec-glass, .j-day-glass { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 10px; transition: transform .15s ease; }
.j-entry-glass:hover, .j-rec-glass:hover, .j-day-glass:hover { transform: translateY(-2px); }

/* scanning */
.j-scan { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: 0 0 1rem; padding: .8rem; border-radius: 14px; background: linear-gradient(135deg, #f7ecd8, #efdcb9); border: 1px solid #e2cba4; }
.j-scan-btn { background: var(--card-ink); color: #fff4df; }
.j-scan-btn:hover { background: var(--amber-deep); }
.j-scan-or { font-size: .84rem; color: #7c6852; }
.j-scan-result { margin: -.4rem 0 1rem; padding: .55rem .8rem; border-radius: 10px; font-size: .88rem; background: rgba(60, 130, 70, .1); color: #2f5a33; }
.j-scan-result.warn { background: rgba(217, 138, 29, .12); color: #7a4a0c; }
.j-scanner { margin: 0 0 1rem; display: grid; gap: .6rem; justify-items: start; }
.j-scanner-view { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 55dvh; max-width: 100%; border-radius: 14px; overflow: hidden; background: #140c05; }
.j-scanner-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.j-scanner-frame { position: absolute; left: 12%; right: 12%; top: 30%; bottom: 30%; border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(20, 12, 5, .45); border: 2px solid rgba(255, 214, 140, .9); }
.j-scanner-line { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ff7a45; box-shadow: 0 0 12px #ff7a45; opacity: 0; }
.j-scanner-view.live .j-scanner-line { opacity: 1; animation: scanline 1.8s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { transform: translateY(-38px); } 50% { transform: translateY(38px); } }
@media (prefers-reduced-motion: reduce) { .j-scanner-view.live .j-scanner-line { animation: none; } }
.j-code { width: 100%; }
.j-code label { display: block; font-size: .8rem; color: #7c6852; margin: 0 0 .3rem; }
.j-code input { max-width: 16rem; letter-spacing: .08em; }
.j-barcode { display: flex; align-items: center; gap: .45rem; margin: -.3rem 0 0; font-size: .8rem; color: #7c6852; font-family: var(--mono); }
.j-barcode svg, .j-scan-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.j-barcode .j-link { text-decoration: none; font-size: 1.1rem; line-height: 1; color: #a07a4e; }

/* history filters */
.j-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 .4rem; }
.journal .j-filter input[type="search"] { flex: 1 1 12rem; min-width: 0; font: inherit; color: var(--card-ink); background: #fff; border: 1px solid #dccab0; border-radius: 999px; padding: .45rem .9rem; }
.j-seg { display: inline-flex; border: 1px solid #dccab0; border-radius: 999px; overflow: hidden; background: #fff; }
.j-seg button { font: inherit; font-size: .8rem; border: 0; background: none; padding: .42rem .75rem; color: #5d4a36; }
.j-seg button + button { border-left: 1px solid #efe3cd; }
.j-seg button[aria-pressed="true"] { background: var(--card-ink); color: #fff4df; }
.j-more { text-align: center; margin: .8rem 0 0; }

/* my taste */
.j-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 0 0 1.2rem; }
@media (max-width: 520px) { .j-tiles { grid-template-columns: repeat(2, 1fr); } }
.j-tile { display: grid; gap: .1rem; padding: .75rem .6rem; border-radius: 14px; background: linear-gradient(160deg, #3a2616, #1f140a); color: #fff4df; text-align: center; }
.j-tile-num { font-family: var(--serif); font-size: 1.55rem; font-weight: 700; line-height: 1.1; color: #ffc86b; }
.j-tile-label { font-size: .72rem; letter-spacing: .04em; color: #d8c09a; }
.j-section { margin: 0 0 1.4rem; }
.j-h3 { font-family: var(--serif); font-size: 1.12rem; margin: 0 0 .5rem; }
.j-radar { margin: 0; }
.j-radar svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; overflow: visible; }
.j-radar .ring { fill: none; stroke: #e6d7bd; stroke-width: 1; }
.j-radar .spoke { stroke: #eee2cc; stroke-width: 1; }
.j-radar .liked { fill: rgba(217, 138, 29, .32); stroke: #c47612; stroke-width: 2; stroke-linejoin: round; }
.j-radar .disliked { fill: rgba(168, 50, 31, .08); stroke: #a8321f; stroke-width: 1.5; stroke-dasharray: 4 3; stroke-linejoin: round; }
.j-radar text { font-size: 10.5px; fill: #5d4a36; font-family: var(--sans); }
.j-radar figcaption { display: flex; justify-content: center; gap: 1rem; font-size: .8rem; color: #5d4a36; margin-top: .2rem; }
.j-radar .key::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.j-radar .key.liked::before { background: rgba(217, 138, 29, .45); border: 2px solid #c47612; }
.j-radar .key.disliked::before { border: 2px dashed #a8321f; }
.j-favs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem; }
.j-fav { width: 100%; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .6rem; align-items: center; text-align: left; font: inherit; color: inherit; padding: .5rem; border-radius: 12px; border: 1px solid #ead9bb; background: #fffaf1; cursor: pointer; }
.j-fav .j-glass { grid-row: span 2; }
.j-fav-name { font-weight: 700; font-size: .88rem; line-height: 1.2; }
.j-fav-meta { font-size: .78rem; color: #a07a4e; }
.j-badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); gap: .5rem; }
.j-badge { display: grid; justify-items: center; text-align: center; gap: .15rem; padding: .7rem .5rem; border-radius: 14px; border: 1px dashed #dccab0; color: #9b8670; }
.j-badge-icon { font-size: 1.6rem; line-height: 1; filter: grayscale(1); opacity: .45; }
.j-badge-name { font-weight: 700; font-size: .82rem; }
.j-badge-desc { font-size: .72rem; line-height: 1.3; }
.j-badge.done { border: 1px solid #e2b86f; background: radial-gradient(120% 100% at 50% 0%, #fff3d6, #f6e3bd); color: var(--card-ink); }
.j-badge.done .j-badge-icon { filter: none; opacity: 1; }
.j-badge-bar { width: 80%; height: 4px; border-radius: 2px; background: #eee2cc; overflow: hidden; margin-top: .25rem; }
.j-badge-bar span { display: block; height: 100%; background: #d98a1d; }
.j-collection { display: grid; gap: .55rem; }
.j-fam-head { display: flex; justify-content: space-between; gap: .5rem; margin: 0 0 .2rem; font-size: .8rem; color: #5d4a36; }
.j-fam-count { color: #a07a4e; font-variant-numeric: tabular-nums; }
.j-dots { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.j-dot { width: 16px; height: 16px; padding: 0; border-radius: 50%; border: 0; background: var(--c); opacity: .22; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); transition: transform .12s ease; }
.j-dot.on { opacity: 1; box-shadow: inset 0 0 0 1px rgba(0,0,0,.3), 0 0 0 2px #fffaf1, 0 0 0 3px #c47612; }
.j-dot:hover, .j-dot:focus-visible { transform: scale(1.3); opacity: 1; }
.j-activity { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 110px; }
.j-bar { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; }
.j-bar-n { font-size: .68rem; color: #a07a4e; min-height: 1em; }
.j-bar-fill { align-self: end; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #f3b651, #b5690f); }
.j-bar-m { font-size: .68rem; color: #7c6852; padding-top: .2rem; text-transform: capitalize; }

/* for you */
.j-match { display: inline-block; margin-left: .3rem; padding: .05rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: rgba(60, 130, 70, .12); color: #2f5a33; vertical-align: 1px; }
.j-rec.explore .j-match { background: rgba(80, 90, 160, .12); color: #3a4380; }
.j-reasons { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .1rem; font-size: .82rem; color: #5d4a36; }
.j-reasons li::before { display: inline-block; width: 1.2em; }
.j-reasons .like::before { content: "♥"; color: #c47612; }
.j-reasons .aspect::before { content: "✓"; color: #2f5a33; }
.j-reasons .profile::before { content: "◎"; color: #b5690f; }
.j-reasons .explore::before { content: "✦"; color: #3a4380; }
.j-day { padding: 1rem; border-radius: 16px; background: radial-gradient(140% 120% at 0% 0%, #4a321d, #1f140a); color: #fff4df; }
.j-day-kicker { margin: 0 0 .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffc86b; }
.j-day-body { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; }
.j-day .j-glass { width: 72px; height: 98px; padding: 8px 9px 11px; }
.j-day-name { margin: 0; font-family: var(--serif); font-size: 1.3rem; font-weight: 700; }
.j-day .j-hint { color: #e6cfa8; margin: .2rem 0 0; }
.j-day .btn.ghost { color: #fff4df; border-color: rgba(255, 244, 223, .35); }
.j-nothing { text-align: center; padding: .5rem 0; }
.j-nothing .j-actions { justify-content: center; }
.j-nothing .btn svg, .j-wish svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.j-wish.on { color: #a8321f; border-color: rgba(168, 50, 31, .4); }
.j-wish.on svg { fill: currentColor; }
.j-card-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0 0; }
.j-card-actions .j-card-btn { margin-top: 0; }
.j-status.badge { font-weight: 700; color: #7a4a0c; }
.j-entry-title { margin: 0; font-weight: 600; }
.j-entry-title .j-link { color: var(--card-ink); text-decoration: none; font-weight: 700; }
.j-brand { font-weight: 400; color: #5d4a36; }
.j-entry-meta { margin: .1rem 0 0; font-size: .84rem; color: #7c6852; }
.j-entry-stars { color: #d98a1d; letter-spacing: .05em; margin-right: .3rem; }
.j-chips { display: flex; flex-wrap: wrap; gap: .25rem; margin: .35rem 0 0; }
.j-chip { font-size: .74rem; padding: .12rem .5rem; border-radius: 999px; }
.j-chip.liked { background: rgba(60, 130, 70, .12); color: #2f5a33; }
.j-chip.disliked { background: rgba(168, 50, 31, .1); color: #8a2a1a; }
.j-entry-note { margin: .35rem 0 0; font-size: .88rem; color: #3d2c1b; white-space: pre-wrap; overflow-wrap: anywhere; }
.j-entry-actions { display: flex; flex-direction: column; gap: .3rem; align-items: flex-end; font-size: .82rem; }
.j-rec { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: center; padding: .7rem 0; border-top: 1px solid #efe3cd; }
.j-rec .j-glass { width: 54px; height: 74px; padding: 6px 7px 9px; }
.j-rec-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .45rem 0 0; }
/* where to buy, on the journal's own cards */
.j-shops { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: .5rem 0 0; font-family: var(--sans); font-size: .74rem; }
.j-shops-label { color: #8b7560; margin-right: .1rem; }
.j-shop {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-weight: 600; text-decoration: none;
  color: #5a3d1d; border: 1px solid #d9c6a3; background: #fffaf0;
}
.j-shop:hover { background: #b5690f; border-color: #b5690f; color: #fff4df; }
.j-day .j-shops-label { color: #e6cfa8; }
.j-day .j-shop { color: #fff4df; border-color: rgba(255, 244, 223, .35); background: transparent; }
.j-day .j-shop:hover { background: #b5690f; border-color: #b5690f; }
.j-danger { margin: 1.4rem 0 0; padding-top: .8rem; border-top: 1px solid #efe3cd; font-size: .82rem; }
.j-danger .j-link { color: #a8321f; }

/* the style field: a button that opens the chooser */
.j-style-pick { width: 100%; display: flex; align-items: center; gap: .7rem; text-align: left; font: inherit; color: var(--card-ink); background: #fff; border: 1px solid #dccab0; border-radius: 12px; padding: .5rem .7rem; min-height: 3.2rem; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.j-style-pick:hover { border-color: #c9a97a; }
.j-style-pick:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.j-style-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #f3e7d2; color: #a07a4e; flex: none; }
.j-style-icon svg, .j-picker-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.j-style-text { flex: 1; min-width: 0; display: grid; }
.j-style-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.j-style-pick:not(.chosen) .j-style-name { font-weight: 400; color: #9b8670; }
.j-style-sub { font-size: .76rem; color: #a07a4e; }
.j-style-chev { font-size: 1.5rem; line-height: 1; color: #b89b76; }
.j-suggest { display: inline-flex; align-items: center; gap: .45rem; margin-top: .45rem; font: inherit; font-size: .84rem; color: #7a4a0c; background: rgba(217, 138, 29, .1); border: 1px dashed rgba(181, 105, 15, .45); border-radius: 999px; padding: .25rem .8rem .25rem .3rem; cursor: pointer; }
.j-suggest:hover { background: rgba(217, 138, 29, .18); }

/* required and optional fields */
.j-req { display: inline-block; width: 6px; height: 6px; margin-left: .35rem; border-radius: 50%; background: #d98a1d; vertical-align: .15em; box-shadow: 0 0 0 2px rgba(217, 138, 29, .18); }
.j-optional { margin-left: .3rem; font-size: .68rem; font-weight: 500; letter-spacing: .02em; text-transform: none; color: #b3a089; }
.j-legend { margin-left: auto; font-size: .74rem; color: #a08b72; align-self: center; }
.j-save-row { align-items: center; }
.j-field.need .j-style-pick, .j-field.need .j-stars { border-radius: 12px; box-shadow: 0 0 0 3px rgba(217, 138, 29, .28); border-color: #e0a653; }
.j-field.need .j-stars { padding: .2rem .4rem; background: rgba(217, 138, 29, .06); }
.j-need-hint { margin: .45rem 0 0; font-size: .84rem; color: #8a5a17; animation: need-in .35s ease; }
.j-need-hint::before { content: "☝ "; }
@keyframes need-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* the chooser: one list in the journal's own scroll, search pinned on top */
.j-picker-top { display: flex; align-items: center; gap: .6rem; margin: 0 2.6rem .5rem 0; }
.j-back { font: inherit; font-weight: 600; color: var(--accent); background: none; border: 0; padding: .3rem .1rem; cursor: pointer; white-space: nowrap; }
.j-picker-title { margin: 0; font-size: 1.25rem; }
.j-picker-search { position: sticky; top: -1.6rem; z-index: 3; margin: 0 calc(-1 * clamp(1.1rem, 4vw, 2rem)); padding: .6rem clamp(1.1rem, 4vw, 2rem); background: var(--card); box-shadow: 0 8px 12px -10px rgba(43, 29, 16, .35); }
.journal .j-picker-search input { width: 100%; font: inherit; color: var(--card-ink); background: #fff; border: 1px solid #dccab0; border-radius: 999px; padding: .6rem 1rem; }
.j-pick-head { margin: 1rem 0 .3rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a07a4e; }
.j-picks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .3rem; }
.j-pick { width: 100%; display: flex; align-items: center; gap: .65rem; text-align: left; font: inherit; color: var(--card-ink); background: none; border: 1px solid transparent; border-radius: 12px; padding: .35rem .5rem; cursor: pointer; }
.j-pick:hover, .j-pick:focus-visible { background: #f5ead6; }
.j-pick.on { border-color: #e2b86f; background: #fff3d6; }
.j-pick-text { display: grid; min-width: 0; }
.j-pick-name { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.j-pick-sub { font-size: .76rem; color: #a07a4e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* a note that fades away by itself */
.j-toast { position: absolute; left: 50%; bottom: 1.2rem; z-index: 10; transform: translate(-50%, 12px); opacity: 0; display: grid; gap: .15rem; text-align: center; max-width: calc(100% - 2rem); padding: .7rem 1.2rem; border-radius: 16px; background: #2b1d10; color: #fff4df; box-shadow: 0 14px 34px rgba(0, 0, 0, .35); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.j-toast.show { opacity: 1; transform: translate(-50%, 0); }
.j-toast-main { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; }
.j-toast-extra { font-size: .84rem; color: #ffc86b; }
@media (prefers-reduced-motion: reduce) { .j-toast { transition: none; } }

/* the page behind the journal stays still */
html:has(#journal-dialog[open]) { overflow: hidden; }

/* the account button counts bought beers still to rate */
.account-btn { position: relative; }
.account-badge { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d9481f; color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #1c1108; animation: badge-pop .4s ease; }
@keyframes badge-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: none; } }

/* a reminder on the page, once per visit */
.j-remind { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 40; transform: translateX(-50%); display: flex; align-items: center; max-width: calc(100vw - 2rem); border-radius: 999px; background: #2b1d10; color: #fff4df; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); animation: remind-in .5s cubic-bezier(.2, .8, .2, 1); }
.j-remind button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.j-remind-open { display: flex; align-items: center; gap: .5rem; padding: .65rem .4rem .65rem 1.1rem; font-weight: 600; font-size: .92rem; font-family: var(--sans); text-align: left; }
.j-remind-close { padding: .5rem .9rem; font-size: 1.2rem; color: #d8c09a; }
@keyframes remind-in { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .j-remind, .account-badge { animation: none; } }

/* bought beers waiting for a rating */
.j-pending { margin: 0 0 .9rem; border-radius: 14px; background: linear-gradient(135deg, #fff1d6, #fbe2b6); border: 1px solid #efc47c; overflow: hidden; }
.j-pending-bar { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .65rem .9rem; font: inherit; font-weight: 700; color: #6b3f08; background: none; border: 0; cursor: pointer; text-align: left; }
.j-pending-text { flex: 1; }
.j-pending-count { min-width: 1.6rem; height: 1.6rem; border-radius: .8rem; display: grid; place-items: center; background: #d9481f; color: #fff; font-size: .8rem; }
.j-pending-bell { font-size: 1.1rem; }
.j-pending:not(.open) .j-pending-bell { animation: bell 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes bell { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(14deg); } 90% { transform: rotate(-12deg); } 95% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .j-pending-bell { animation: none !important; } }
.j-pending-list { list-style: none; margin: 0; padding: 0 .9rem .5rem; }
.j-pending-item { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; padding: .55rem 0; border-top: 1px solid rgba(181, 105, 15, .2); }
.j-pending-item .j-entry-title { font-size: .92rem; }
.j-stars-sm .j-star { font-size: 1.45rem; color: #d7b98a; }
.j-stars-sm .j-star:hover, .j-stars-sm .j-star:focus-visible { color: #d98a1d; transform: scale(1.15); }
.j-chip.pending { background: rgba(217, 72, 31, .12); color: #a33712; font-weight: 600; }
.j-later-hint { margin: .3rem 0 0; }

/* suggestions while typing a name: part of the page, no scroll box of their own */
.j-sugs { list-style: none; margin: .35rem 0 0; padding: .25rem; border-radius: 12px; background: #fff; border: 1px solid #e6d7bd; box-shadow: 0 8px 20px rgba(43, 29, 16, .1); }
.j-sug { width: 100%; display: flex; align-items: center; gap: .6rem; text-align: left; font: inherit; color: var(--card-ink); background: none; border: 0; border-radius: 9px; padding: .4rem .45rem; cursor: pointer; }
.j-sug:hover, .j-sug:focus-visible { background: #f5ead6; }
.j-sug-text { display: grid; min-width: 0; }
.j-sug-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.j-sug-sub { font-size: .74rem; color: #a07a4e; }

/* "have I had this?" */
.j-verdict { border-radius: 14px; padding: .8rem 1rem; background: #f4ecdf; border-left: 4px solid #b89b76; animation: need-in .35s ease; }
.j-verdict p { margin: 0; }
.j-verdict-head { font-weight: 700; margin-bottom: .2rem !important; }
.j-verdict.liked { background: rgba(60, 130, 70, .1); border-left-color: #3c8246; }
.j-verdict.disliked { background: rgba(168, 50, 31, .08); border-left-color: #a8321f; }
.j-verdict.so-so, .j-verdict.pending { background: rgba(217, 138, 29, .1); border-left-color: #d98a1d; }
.j-verdict-note { font-style: italic; color: #5d4a36; margin-top: .25rem !important; }
.j-chance { display: flex; align-items: baseline; gap: .5rem; }
.j-chance-num { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.j-verdict.liked .j-chance-num { color: #2f6e39; }
.j-verdict.disliked .j-chance-num { color: #a8321f; }
.j-verdict.so-so .j-chance-num { color: #a3620c; }
.j-chance-text { color: #5d4a36; }
.j-chance-bar { display: block; height: 6px; border-radius: 3px; background: rgba(43, 29, 16, .1); margin: .35rem 0 .3rem; overflow: hidden; }
.j-chance-bar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #a8321f, #d98a1d 50%, #3c8246); background-size: 300% 100%; background-position: 50% 0; }

/* the style card: buttons of fixed width, so nothing moves when a label changes */
.j-card-actions { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .4rem; max-width: 24rem; }
.j-card-actions .btn { justify-content: center; -webkit-tap-highlight-color: transparent; }
.j-card-actions .btn:active { transform: none; }
.j-card-mine { margin: 1rem 0 0; padding: .7rem .9rem; border-radius: 12px; background: rgba(255, 250, 241, .85); border: 1px solid #ead9bb; font-family: var(--sans); font-size: .88rem; }
.j-card-mine-head { margin: 0 0 .35rem; font-weight: 700; }
.j-card-mine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.j-card-mine-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; }
.j-card-mine-name { font-weight: 600; }
.j-card-mine-date { color: #8b7560; font-size: .8rem; margin-left: auto; }
.j-card-chance { margin: .3rem 0 0; }
.j-card-chance .j-chance-num { font-size: 1.3rem; margin-right: .2rem; color: #a3620c; }
.journal input[readonly] { background: #f6efe3; color: #4a3520; cursor: default; }
.j-lock { margin: .3rem 0 0; font-size: .76rem; color: #8b7560; }

/* waiting for the server: a glass sways over the window, nothing underneath responds */
@property --slosh { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.j-busy { position: absolute; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: .6rem; border-radius: 20px; background: rgba(28, 17, 8, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s ease; cursor: progress; }
.j-busy.show { opacity: 1; }
.j-busy-glass { width: 92px; padding: 14px 16px 18px; border-radius: 18px; background: radial-gradient(120% 90% at 50% 20%, #4a321d 0%, #24170c 70%); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); position: relative; }
.j-busy-glass::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 9px; height: 5px; border-radius: 2px; background: linear-gradient(180deg, #92623a, #4f3218); }
.j-busy-glass .glass { position: relative; z-index: 1; display: block; width: 100%; height: auto; overflow: visible; transform-origin: 50% 96%; animation: sway 1.4s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(255, 190, 90, .35)); }
.j-busy-glass .bub { animation: rise 2.4s linear infinite; }
.j-busy-text { margin: 0; color: #fff4df; font-family: var(--sans); font-size: .9rem; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
@keyframes sway {
  0%, 100% { transform: rotate(-9deg); --slosh: 7deg; }
  50% { transform: rotate(9deg); --slosh: -7deg; }
}
@media (prefers-reduced-motion: reduce) { .j-busy-glass .glass { animation: none; } .j-busy-glass { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: .7; } }

/* typing on a phone: the journal sits at the top and fits above the keyboard */
@media (pointer: coarse) {
  .journal-dialog.typing, .journal-dialog.picking {
    margin: calc(var(--vv-top, 0px) + .5rem) auto auto;
    max-height: calc(var(--vv-h, 100dvh) - 1rem);
  }
  .journal-dialog.typing .journal, .journal-dialog.picking .journal { max-height: calc(var(--vv-h, 100dvh) - 1rem); }
  .journal-dialog.picking .j-picker-top { margin-bottom: .2rem; }
}

/* how sure a prediction is */
.j-conf { margin: .1rem 0 .3rem !important; font-size: .76rem; color: #8b7560; }
.j-conf::before { content: ""; display: inline-block; width: 26px; height: 6px; margin-right: .4rem; border-radius: 3px; vertical-align: 1px; background: linear-gradient(90deg, #d98a1d 33%, #e6d7bd 33%); }
.j-conf.mid::before { background: linear-gradient(90deg, #d98a1d 66%, #e6d7bd 66%); }
.j-conf.high::before { background: #3c8246; }
.j-card-chance .j-conf { display: block; }
.j-reasons .against::before { content: "!"; color: #a8321f; font-weight: 700; }
.j-verdict .j-reasons { margin-top: .35rem; }
.j-match.low { background: rgba(120, 100, 80, .12); color: #6f5943; }

/* the beer finder: "or" groups widen, "and" accents and dishes narrow (on the dark section) */
.logic-legend { list-style: none; margin: -.4rem 0 1.1rem; padding: .6rem .8rem; display: grid; gap: .35rem; border-radius: 12px; background: rgba(241, 230, 211, .06); border: 1px solid rgba(241, 230, 211, .12); }
.logic { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--sans); font-size: .8rem; line-height: 1.35; color: #d8c8ae; }
.logic-sign { flex: none; display: inline-grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font-size: .8rem; font-weight: 700; color: #17110b; }
.logic.or .logic-sign { background: #8fd49b; }
.logic.and .logic-sign { background: #f3b651; }
p.logic { display: flex; margin: -.4rem 0 1rem; }
.crit-head { display: flex; align-items: center; gap: .45rem; }
.crit-head h4 { margin-bottom: 0; }
.crit-head + .chips { margin-top: .5rem; }
.crit-head .logic-sign { width: 1.05rem; height: 1.05rem; font-size: .68rem; }
.crit.accents { padding: .75rem .85rem .85rem; margin-top: .5rem; border-radius: 14px; background: rgba(243, 182, 81, .07); border: 1px dashed rgba(243, 182, 81, .4); }
.chip-delta { display: inline-block; margin-left: .4rem; padding: 0 .4rem; border-radius: 999px; font-family: var(--sans); font-size: .7rem; font-weight: 700; line-height: 1.55; font-variant-numeric: tabular-nums; background: rgba(241, 230, 211, .12); color: #d8c8ae; }
.chip-delta.up { background: rgba(143, 212, 155, .18); color: #a8e3b2; }
.chip-delta.down { background: rgba(243, 182, 81, .16); color: #f5c67c; }
.chip-delta.zero { background: rgba(255, 120, 90, .18); color: #ffa58f; }
.chip.on .chip-delta { display: none; }
.pick-found { position: sticky; bottom: .6rem; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .8rem; margin: 1.1rem 0 .8rem; padding: .65rem .85rem; border-radius: 14px; background: #f1e6d3; color: #17110b; font-family: var(--sans); font-size: .9rem; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.pick-found.none { background: #ffd2c4; }
.pick-found-text { font-weight: 700; }
.pick-found-bar { flex: 1 1 6rem; height: 6px; border-radius: 3px; background: rgba(23, 17, 11, .12); overflow: hidden; }
.pick-found-bar span { display: block; height: 100%; background: linear-gradient(90deg, #f3b651, #b5690f); transition: width .3s ease; }
.pick-show { display: none; }
@media (max-width: 900px) { .pick-show { display: inline-flex; } }
