/* Discover: the homepage stage's dark register (Liquesse), as in the mockup
   Curtis approved 2026-11-16. Tokens are the mockup's :root, scoped here so
   the album palette elsewhere is untouched. Besley and Figtree are the
   site's own --font-display and --font-ag, which the global CSS defines.

   A static file, not a module import (R11, 2026-11-16): Next links every
   stylesheet a route's client components import, rendered or not, so an
   import would block the can stage's first paint on every signed-out `/`.
   DiscoverStream links this file as a React hoisted stylesheet, so it loads
   only where the stream renders. VERSIONED BY NAME: when this content
   changes, copy it to the next number (discover-v3.css, and so on) and point
   DISCOVER_CSS_HREF in components/discover/DiscoverStream.tsx at it, so no
   browser or edge keeps serving the old rules under the same address. The
   old file stays for HTML still cached with its link.

   v2 (2026-11-17, Curtis's option B): the iOS shell's Feed shows Discover
   full screen with one scroller, and no Ask pill sits over a stream. */
.dv {
  --dv-abyss: #0b0806; --dv-deep: #15100c; --dv-ivory: #efe8dc; --dv-mist: #a89c8a; --dv-gold: #d4aa55;
  --dv-line: rgba(239, 232, 220, 0.16);
  --dv-serif: var(--font-display), "Besley", Georgia, serif;
  --dv-sans: var(--font-ag), "Figtree", system-ui, sans-serif;
  position: relative; isolation: isolate; overflow: hidden;
  height: min(calc(100svh - 64px), 920px); min-height: 560px;
  background: var(--dv-abyss); color: var(--dv-ivory); font-family: var(--dv-sans);
  -webkit-font-smoothing: antialiased;
}

.dv-bar { position: absolute; inset: 0 0 auto; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 10px; background: linear-gradient(var(--dv-abyss) 60%, transparent); pointer-events: none; }
.dv-bar > * { pointer-events: auto; }
.dv-title { margin: 0; font: 400 14px/1.2 var(--dv-sans); color: var(--dv-ivory); border-bottom: 1px solid var(--dv-gold); padding-bottom: 3px; }
.dv-home { font-size: 13px; color: var(--dv-mist); text-decoration: none; }
.dv-home:hover { color: var(--dv-ivory); }

/* One beer per screen; a snap stop on every card so a fling can't skip several. */
.dv-stream { height: 100%; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; }
.dv-stream::-webkit-scrollbar { display: none; }
.dv-slot { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }

/* Narrow side margins (mockup v4) so the label gets the room. */
.dv-card { height: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding: 62px 14px 22px; }
/* pan-y: a vertical swipe still moves the stream; a sideways drag turns the can. */
.dv-art { flex: 1; min-height: 0; display: block; position: relative; border-radius: 20px; overflow: hidden; touch-action: pan-y;
  background: radial-gradient(ellipse at 50% 55%, rgba(212, 170, 85, 0.1), transparent 62%), var(--dv-deep); }
.dv-art.wide { cursor: grab; }
.dv-art.wide.drag { cursor: grabbing; }
/* A label that is roughly its own front just fills the frame, as large as it goes. */
.dv-fit { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55)); -webkit-user-drag: none; user-select: none; }
/* A can wrap fills the full height and drifts side to side, like turning the can. */
.dv-wrap { position: absolute; top: 0; bottom: 0; left: 0; will-change: transform; }
.dv-wrap img { height: 100%; width: auto; max-width: none; display: block; -webkit-user-drag: none; user-select: none; }
.dv-art.wide::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--dv-deep) 0, transparent 9%, transparent 91%, var(--dv-deep) 100%); }
.dv-turn { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 11.5px; color: var(--dv-mist);
  background: rgba(11, 8, 6, 0.6); border-radius: 999px; padding: 4px 10px; pointer-events: none; white-space: nowrap; }
.dv-diff { position: absolute; top: 14px; left: 14px; z-index: 3; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dv-gold); border: 1px solid rgba(212, 170, 85, 0.45); border-radius: 999px; padding: 5px 10px; background: rgba(11, 8, 6, 0.6); }

.dv-meta { padding: 16px 4px 0; }
.dv-brewery { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; color: var(--dv-ivory); text-decoration: none; }
.dv-brewery span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-brewery i { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(212, 170, 85, 0.6); display: grid; place-items: center;
  font-style: normal; font-size: 11px; color: var(--dv-gold); font-weight: 500; }
.dv-brewery small { flex: none; font-weight: 400; color: var(--dv-mist); font-size: 13px; }
.dv-name { margin: 6px 0 4px; font: 400 27px/1.12 var(--dv-serif); }
.dv-name a { color: inherit; text-decoration: none; }
.dv-eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dv-mist); }
.dv-desc { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: rgba(239, 232, 220, 0.86);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dv-src { margin-top: 4px; font-size: 11.5px; color: var(--dv-mist); }
.dv-src a { color: var(--dv-mist); text-decoration: underline; text-underline-offset: 3px; }

.dv-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 16px; }
.dv-actions button { height: 50px; border-radius: 999px; border: 1px solid var(--dv-line); background: transparent; color: var(--dv-ivory);
  font: 500 14px/1.1 var(--dv-sans); cursor: pointer; padding: 0 8px; }
.dv-actions button:hover { border-color: rgba(239, 232, 220, 0.5); }
.dv-actions button.dv-love { background: var(--dv-ivory); color: var(--dv-abyss); border-color: var(--dv-ivory); }
.dv-actions button:disabled { opacity: 0.6; cursor: progress; }
.dv-skip { display: block; width: 100%; margin-top: 12px; padding: 4px 0; border: 0; background: none; text-align: center;
  font: 400 12.5px/1.2 var(--dv-sans); color: var(--dv-mist); cursor: pointer; user-select: none; }
.dv-skip:hover { color: var(--dv-ivory); }
.dv :focus-visible { outline: 2px solid var(--dv-gold); outline-offset: 2px; }

.dv-toast { position: absolute; left: 16px; right: 16px; bottom: 18px; z-index: 6; max-width: 528px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px;
  background: rgba(21, 16, 12, 0.92); border: 1px solid var(--dv-line); font-size: 14px; animation: dv-up 0.3s ease-out; }
.dv-links { display: flex; gap: 16px; flex: none; }
.dv-links a, .dv-links button { color: var(--dv-ivory); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
  font: inherit; background: none; border: 0; padding: 0; }
@keyframes dv-up { from { transform: translateY(140%); } to { transform: none; } }

.dv-end { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px 36px; }
.dv-end h2 { margin: 0 0 10px; font: 400 25px/1.2 var(--dv-serif); }
.dv-end p { margin: 0 0 22px; max-width: 34ch; color: var(--dv-mist); font-size: 14.5px; line-height: 1.55; }
.dv-btn { height: 46px; padding: 0 24px; border-radius: 999px; background: var(--dv-ivory); color: var(--dv-abyss); border: 0;
  font: 600 14.5px/1 var(--dv-sans); cursor: pointer; }
.dv-sub { margin-top: 14px; font-size: 13px; color: var(--dv-mist); text-decoration: none; }
.dv-sub:hover { color: var(--dv-ivory); }

/* Inside the Feed, the app's first tab: the stream sits under the Feed
   heading and its tabs, so it is shorter than a page of its own and still
   holds one beer per screen. */
.fr-discover .dv { height: min(calc(100svh - 190px), 820px); min-height: 480px; border-radius: 18px; }

@media (prefers-reduced-motion: reduce) {
  .dv-toast { animation: none; }
}

/* No Ask pill over a stream: it sat on the buttons and "Not now". Wherever a
   stream is visible (the Feed's Discover tab, /discover, the signed-in
   homepage); a hidden Feed panel (Following or Everyone showing) keeps it. */
body:has(.dv):not(:has([hidden] > .dv)) .m-askpill { display: none; }

/* The iOS shell's Feed, Discover showing: full screen, one scroller.
   Before, the stream was a 100svh - 190px box inside a page that also
   scrolled; in the shell it did not fit, so a swipe moved the page one time
   and the snapping stream the next. Now the page is locked and the stream is
   fixed to the web view. Its bottom is --dv-bar-clear, set by the stream
   (barClearance, lib/discover/view.ts): 0 from iOS 26, where the fixed
   viewport already stops at the tab bar (the Map tab's measurement,
   .map-wrap, 2026-10-07), and the bar's height on older iOS, where the web
   view runs under it. Never --hg-tabbar outright: on iOS 26+ that leaves a
   blank band. Under the account chip (.hg-acct, z-index 45).
   Keyed on the panel's hidden attribute, so Following and Everyone scroll
   again the moment they show, and only in the shell: on the web the
   masthead stays. */
html.hg-app:has(.fr-discover:not([hidden])),
html.hg-app:has(.fr-discover:not([hidden])) body { overflow: hidden; overscroll-behavior: none; }
html.hg-app .fr-discover .dv { position: fixed; top: 0; right: 0; bottom: var(--dv-bar-clear, 0px); left: 0; z-index: 30; height: auto; min-height: 0; max-height: none; border-radius: 0; }
/* Room for the notch and the pill row (the chip is at notch + 8px, 36px tall). */
html.hg-app .fr-discover .dv-card { padding-top: calc(env(safe-area-inset-top) + 54px); padding-bottom: 14px; }
/* The fade the pills float on, like .dv-bar on /discover. */
html.hg-app .fr-discover .dv::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 4; height: calc(env(safe-area-inset-top) + 56px);
  background: linear-gradient(var(--dv-abyss) 62%, transparent); pointer-events: none; }
/* The heading stays for screen readers; the tabs float as small pills. */
html.hg-app .fr-feed:has(> .fr-discover:not([hidden])) .fr-head { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
html.hg-app .fr-feed:has(> .fr-discover:not([hidden])) .fr-tabs { position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: 12px; right: 98px;
  z-index: 35; margin: 0; gap: 5px; overflow-x: auto; scrollbar-width: none; }
html.hg-app .fr-feed:has(> .fr-discover:not([hidden])) .fr-tab { flex: none; min-height: 36px; padding: 0 10px; font-size: 13px;
  border-color: rgba(239, 232, 220, 0.22); background: rgba(11, 8, 6, 0.55); color: #efe8dc; }
html.hg-app .fr-feed:has(> .fr-discover:not([hidden])) .fr-tab.on { background: #efe8dc; border-color: #efe8dc; color: #0b0806; }
