/* ============================================================
   Beer Festival Companion — Alpine Lake design system
   PNW alpine: lake teal + glacier blue, cedar/sand warmth,
   gold beer-fill, one warm coral for "favorite".
   Zilla Slab display + Hanken Grotesk body.
   ============================================================

   Adapted from the v2 prototype. Phone-frame chrome stripped
   (this is a real mobile web app, not a design mockup). Sheet
   positioning changed from absolute-inside-phone to fixed-to-
   viewport. Real-app layout added at the top.
*/

:root {
  /* surfaces */
  --bg:        #EAF0EE;
  --bg-2:      #E1E9E7;
  --card:      #FFFFFF;
  --ink:       #102E29;
  --ink-soft:  #5A716D;
  --ink-faint: #99ACA8;
  --hair:      #DCE6E3;

  /* brand */
  --lake:         #14706B;
  --lake-deep:    #0E544F;
  --glacier:      #4FA3BC;
  --glacier-soft: #D5EAEF;
  --pine:         #2E5E4C;
  --sand:         #DDCDA7;
  --sand-soft:    #F0E9D6;

  /* affordances */
  --gold:      #E6B23F;  /* beer / mug fill */
  --gold-soft: #F7E9C4;
  --heart:     #E2785B;  /* the one warm pop — favorites */

  /* type */
  --display: "Zilla Slab", Georgia, serif;
  --body:    "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* shape */
  --r-card:  14px;
  --r-sm:    10px;
  --r-pill:  999px;
  --shadow-card:  0 1px 2px rgba(16,46,41,0.05), 0 6px 18px -10px rgba(16,46,41,0.18);
  --shadow-pop:   0 8px 24px -6px rgba(16,46,41,0.28), 0 2px 6px rgba(16,46,41,0.12);
  --shadow-sheet: 0 -10px 30px -12px rgba(16,46,41,0.30);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

/* ============================================================
   Typography helpers
   ============================================================ */
.slab    { font-family: var(--display); }
.h1      { font-family: var(--display); font-weight: 700; font-size: 25px; line-height: 1.05; letter-spacing: 0.2px; margin: 0; }
.h2      { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.1;  margin: 0; }
.over    { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--lake); }
.muted   { color: var(--ink-soft); }
.faint   { color: var(--ink-faint); }
.tiny    { font-size: 11.5px; }
.sm      { font-size: 13px; }

/* ============================================================
   Layout helpers
   ============================================================ */
.row     { display: flex; align-items: center; }
.col     { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center  { align-items: center; }
.wrap    { flex-wrap: wrap; }
.grow    { flex: 1; }
.gap4{gap:4px;}.gap6{gap:6px;}.gap8{gap:8px;}.gap10{gap:10px;}.gap12{gap:12px;}

/* ============================================================
   App layout
   ============================================================ */

/* Screen routing: only one .screen is visible at a time.
   Each top-level "page" is a <section class="screen">. The active
   one has no `hidden` attribute; the others have `hidden`. */
.screen[hidden] { display: none !important; }
.screen { animation: screen-in .22s cubic-bezier(.22,1,.36,1); }
@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
}

/* ============================================================
   Home screen
   ============================================================ */
.home-hero {
  padding: max(env(safe-area-inset-top), 28px) 20px 20px;
}
.home-hero .h1 {
  font-size: 32px;
  margin-top: 4px;
}
.home-hero .sm {
  margin-top: 6px;
}

/* Summary tile wrapper — owns the outer margin so both modes
   (empty + progress) sit in the exact same slot. */
.home-summary {
  margin: 4px 18px 18px;
}
.home-summary[hidden] { display: none; }

.home-progress {
  padding: 16px 18px;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.home-progress[hidden] { display: none; }
.home-progress-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.home-progress-stat {
  text-align: center;
}
.home-progress-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  color: var(--lake);
  line-height: 1.1;
}
.home-progress-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2px;
}
.home-progress-bar-wrap {
  margin-top: 14px;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-2);
  overflow: hidden;
}
.home-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width .4s ease;
}

.home-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 18px max(env(safe-area-inset-bottom), 28px);
}
.home-tile {
  display: grid;
  grid-template-columns: 48px 1fr 20px;
  align-items: center;
  gap: 14px;
  padding: 16px 16px;
  background: var(--card);
  border: none;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: transform .08s ease;
}
.home-tile:active { transform: scale(0.985); }
.home-tile-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--glacier-soft);
  color: var(--lake);
  display: flex; align-items: center; justify-content: center;
}
.home-tile-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.home-tile-sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 1px;
}
.home-tile-chev {
  color: var(--ink-faint);
  justify-self: end;
}

/* Secondary tile — visually lighter than primary tiles. "About" lives
   here because it answers a different question (what IS this app) than
   the primary tiles (what can I do in this app), and putting both kinds
   in the same visual treatment overweights About. */
.home-tile.secondary {
  display: grid;
  grid-template-columns: 1fr 18px;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  margin-top: 4px;
  background: transparent;
  box-shadow: none;
  border: 1px solid var(--hair);
}
.home-tile.secondary:active {
  transform: scale(0.99);
}
.home-tile.secondary .home-tile-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  font-family: var(--body);
}
.home-tile.secondary .home-tile-sub {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 2px;
}
.home-tile.secondary .home-tile-chev {
  width: 18px;
  height: 18px;
  color: var(--ink-faint);
}

/* Primary tile — visually heavier, lake teal. The "do this" tile. */
.home-tile.primary {
  background: linear-gradient(135deg, var(--lake) 0%, var(--lake-deep) 100%);
  color: #fff;
  padding: 20px 18px;
  grid-template-columns: 56px 1fr 22px;
  gap: 16px;
}
.home-tile.primary .home-tile-icon {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 56px;
  height: 56px;
}
.home-tile.primary .home-tile-label {
  color: #fff;
  font-size: 19px;
}
.home-tile.primary .home-tile-sub {
  color: rgba(255, 255, 255, 0.82);
}
.home-tile.primary .home-tile-chev {
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   Home empty-state card (when tried = 0)
   Tappable; navigates to list via data-go="list".
   ============================================================ */
.home-empty {
  display: grid;
  grid-template-columns: 56px 1fr 22px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--lake) 0%, var(--lake-deep) 100%);
  color: #fff;
  border: none;
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: transform .08s ease;
}
.home-empty[hidden] { display: none; }
.home-empty:active { transform: scale(0.985); }
.home-empty-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
  display: flex; align-items: center; justify-content: center;
}
.home-empty-icon svg .body   { fill: var(--gold); stroke: var(--gold); stroke-width: 1.2; }
.home-empty-icon svg .foam   { fill: #FFFDF7;     stroke: var(--gold); stroke-width: 1.2; }
.home-empty-icon svg .handle { stroke: var(--gold); stroke-width: 1.6; }
.home-empty-headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.12;
}
.home-empty-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 3px;
}
.home-empty-chev { color: rgba(255, 255, 255, 0.75); }

/* ============================================================
   Home section header (used by "Your top-rated")
   ============================================================ */
.home-section {
  margin: 4px 18px 20px;
}
.home-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.home-section-link {
  background: none;
  border: none;
  color: var(--lake);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}
.home-section-link:active { transform: scale(0.96); }

.home-tr-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--card);
  border: none;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  margin-bottom: 8px;
  transition: transform .08s ease;
}
.home-tr-card:last-child { margin-bottom: 0; }
.home-tr-card:active { transform: scale(0.985); }
.home-tr-card-text {
  min-width: 0;
  flex: 1;
}
.home-tr-card-brewery {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--lake);
  margin-bottom: 2px;
}
.home-tr-card-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-tr-card-mugs {
  flex: 0 0 auto;
}

/* ============================================================
   Sub-screen top bar (back button + title)
   ============================================================ */
.sub-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  padding: max(env(safe-area-inset-top), 12px) 18px 12px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--hair);
}
.sub-topbar-title {
  text-align: center;
}

.screen-body {
  padding: 18px;
}

/* ============================================================
   Stats screen
   ============================================================ */
.stats-summary {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 18px;
  margin-bottom: 22px;
}
.stats-summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.stats-summary-stat { text-align: center; }
.stats-summary-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  color: var(--lake);
  line-height: 1.1;
}
.stats-summary-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2px;
}
.stats-summary-avg {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-align: center;
}

.stats-section { margin-bottom: 22px; }
.stats-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.stats-section-head .tiny {
  font-weight: 700;
  color: var(--ink-soft);
}

/* ============================================================
   Festival Tapped (recap) cards — horizontal swipe carousel
   ============================================================ */

/* Recap screen overrides default body padding — the carousel
   handles its own gutters and needs to bleed edge-to-edge. */
#recapContent { padding: 0; }

.tapped-cards {
  display: flex;
  flex-direction: row;
  gap: 14px;
  padding: 4px 18px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scroll-padding-left: 18px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;       /* Firefox */
}
.tapped-cards::-webkit-scrollbar { display: none; }   /* WebKit */

.tapped-card {
  /* Each card takes most of the viewport with a peek of the next.
     On wider screens, capped so it doesn't grow unreasonably. */
  flex: 0 0 min(340px, calc(100vw - 64px));
  min-height: 460px;
  padding: 24px 22px;
  border-radius: 20px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* Pagination dots below the carousel */
.tapped-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 18px 22px;
}
.tapped-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
  opacity: 0.4;
  transition: opacity .25s ease, width .25s ease, background .25s ease;
}
.tapped-dot.active {
  opacity: 1;
  width: 20px;
  border-radius: 3px;
  background: var(--lake);
}

/* Color variants — one per card for a "wrapped"-style sequence */
.tapped-card--lake         { background: linear-gradient(135deg, var(--lake) 0%, var(--lake-deep) 100%); color: #fff; }
.tapped-card--lake-deep    { background: linear-gradient(160deg, var(--lake-deep) 0%, #082E2B 100%);     color: #fff; }
.tapped-card--gold         { background: linear-gradient(135deg, var(--gold) 0%, #C99728 100%);          color: var(--ink); }
.tapped-card--glacier      { background: linear-gradient(135deg, var(--glacier) 0%, #2F8AA0 100%);       color: #fff; }
.tapped-card--glacier-soft { background: var(--glacier-soft); color: var(--ink); }
.tapped-card--pine         { background: linear-gradient(135deg, var(--pine) 0%, #1E4636 100%);          color: #fff; }
.tapped-card--sand         { background: linear-gradient(135deg, var(--sand) 0%, #C4B381 100%);          color: var(--ink); }
.tapped-card--heart        { background: linear-gradient(135deg, var(--heart) 0%, #C95E42 100%);         color: #fff; }

.tapped-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  opacity: 0.82;
}
.tapped-headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  line-height: 1.04;
  letter-spacing: -0.4px;
}
/* Used on cards where the headline IS the focal point (typewriter
   reveals, the closing "Cheers!"). Significantly bigger; weight maxed. */
.tapped-headline-xl {
  font-size: 46px;
  line-height: 1.02;
  letter-spacing: -1.2px;
  font-weight: 800;
}
.tapped-meta {
  font-size: 14px;
  opacity: 0.88;
}
.tapped-bignum {
  font-family: var(--display);
  font-weight: 700;
  font-size: 92px;
  line-height: 0.9;
  margin-top: auto;
  letter-spacing: -2px;
}
.tapped-biglabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 0;
}

/* Style breakdown headline: "You're a / STYLE NAME / person".
   The middle line is the visual punch — large, lake-colored, its own
   line. The framing words are smaller so they don't compete. */
.tapped-style-headline {
  display: block;
  line-height: 1.04;
}
.tapped-style-prefix,
.tapped-style-suffix {
  display: block;
  font-size: 20px;
  font-weight: 600;
  opacity: 0.7;
  letter-spacing: 0;
}
.tapped-style-name {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 54px;
  line-height: 1.0;
  letter-spacing: -1.5px;
  color: var(--lake);
  /* Hidden until the animator pops it in. */
  opacity: 0;
  transform: scale(0.5);
  transform-origin: left center;
}
.tapped-style-name.pop-in {
  animation: tapped-style-pop 0.85s cubic-bezier(.34, 1.56, .64, 1) forwards;
}
@keyframes tapped-style-pop {
  to { opacity: 1; transform: scale(1); }
}

/* Top-rated list inside the gold card */
.tapped-rated-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tapped-rated-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: rgba(0, 0, 0, 0.07);
  border-radius: 10px;
}
.tapped-rated-text { min-width: 0; flex: 1; }
.tapped-rated-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tapped-rated-brewery {
  font-size: 10.5px;
  opacity: 0.75;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

/* Style breakdown chart (replaces style chips inside the glacier-soft card) */
.tapped-chart {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tapped-chart-row {
  display: grid;
  grid-template-columns: 84px 1fr 22px;
  gap: 9px;
  align-items: center;
}
.tapped-chart-label {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tapped-chart-bar-wrap {
  height: 12px;
  border-radius: 6px;
  background: rgba(20, 112, 107, 0.13);
  overflow: hidden;
}
.tapped-chart-bar {
  height: 100%;
  background: var(--lake);
  border-radius: 6px;
  transition: width .9s cubic-bezier(.22,1,.36,1);
}
.tapped-chart-count {
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}
.tapped-chart-more {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.7;
  text-align: center;
}

/* Numbers grid */
.tapped-numbers-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
}
.tapped-number-num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.0;
  letter-spacing: -0.5px;
}
.tapped-number-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 2px;
}

/* Wishlist */
.tapped-wishlist-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.tapped-wishlist-item {
  display: flex;
  flex-direction: column;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}
.tapped-wishlist-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
}
.tapped-wishlist-brewery {
  font-size: 10.5px;
  opacity: 0.82;
  margin-top: 1px;
}
.tapped-wishlist-more {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  opacity: 0.85;
  text-align: center;
}

/* Export button (on closing card) */
.tapped-export-btn {
  margin-top: 16px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .08s ease;
}
.tapped-export-btn:active { transform: scale(0.97); }

/* ============================================================
   Festival map (demo)
   ============================================================ */

.map-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.4;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  background: #EFE9D6;
}
.map-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.map-pin-layer {
  position: absolute;
  inset: 0;
}

/* Classic teardrop pin shape — rotate 45deg, point goes bottom-left
   after the translate. Position via CSS top/left (% of map-wrap).
   The translate centers horizontally and anchors the point at the
   booth location. */
.map-pin {
  position: absolute;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 2.5px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--lake);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -100%) rotate(-45deg);
  transform-origin: center;
  transition: transform .15s cubic-bezier(.22,1,.36,1), background .15s ease;
}
.map-pin-num {
  display: inline-block;
  transform: rotate(45deg);
  font-family: var(--display);
  font-weight: 700;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.map-pin:active {
  transform: translate(-50%, -100%) rotate(-45deg) scale(0.92);
}
.map-pin.selected {
  background: var(--gold);
  z-index: 10;
  transform: translate(-50%, -100%) rotate(-45deg) scale(1.18);
  color: var(--ink);
}
.map-pin.selected .map-pin-num { font-weight: 800; }

/* Booth detail panel below the map */
.map-detail {
  background: var(--card);
  border-radius: var(--r-card);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.map-detail-placeholder {
  text-align: center;
  padding: 28px 12px;
}
.map-detail-header {
  border-bottom: 1px solid var(--hair);
  padding-bottom: 14px;
}
.map-detail-header .h2 {
  font-size: 24px;
  margin-top: 2px;
  letter-spacing: -0.3px;
}

/* ============================================================
   About screen — prose-style content, clearly grouped sections.
   ============================================================ */

.about-body {
  padding: 4px 22px 32px;
}
.about-section {
  margin-bottom: 26px;
}
.about-section .over {
  margin-bottom: 8px;
}
.about-section p {
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}
.about-section p:last-of-type {
  margin-bottom: 14px;
}
.about-section .btn,
.about-section .btn.ghost {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
}
.about-eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
  color: var(--ink);
}
.about-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--hair);
}

/* ============================================================
   Recap animations: stage reveals, confetti, cursor, letter dance,
   bubbles. Timings are controlled by the JS animator (uiService);
   CSS just defines what each visual state looks like.
   ============================================================ */

/* Stage reveal — used for both [data-stagger] (sequential list items)
   and [data-stage] (meta lines, export button). The JS animator adds
   `.stage-in` to reveal each in turn. */
[data-stagger],
[data-stage] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .85s cubic-bezier(.22, .61, .36, 1),
    transform .85s cubic-bezier(.22, .61, .36, 1);
}
[data-stagger].stage-in,
[data-stage].stage-in {
  opacity: 1;
  transform: translateY(0);
}

/* Typewriter and letter-dance elements start invisible (but with
   their text still reserving layout height). The animator flips
   visibility to `visible` right before the reveal begins, so the
   original text never flashes onscreen. */
[data-typewriter-text],
[data-letter-dance] {
  visibility: hidden;
}

/* Typewriter cursor — block-style, currentColor, slow blink for that
   "ready for input" anticipation feel before typing starts. */
.tw-cursor {
  display: inline-block;
  width: 0.08em;
  height: 0.88em;
  background: currentColor;
  vertical-align: -0.08em;
  margin-left: 3px;
  animation: tw-blink 0.95s steps(2, start) infinite;
}
@keyframes tw-blink {
  to { opacity: 0; }
}

/* Letter dance — each character pops in with elastic overshoot.
   Used on the closing card's "Cheers!" headline. */
.letter-dance-char {
  display: inline-block;
  opacity: 0;
  transform: scale(0.3) translateY(8px);
  transition:
    opacity .55s cubic-bezier(.34, 1.56, .64, 1),
    transform .55s cubic-bezier(.34, 1.56, .64, 1);
}
.letter-dance-char.in {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Confetti burst — emits from the center of the hero card.
   Particles use CSS custom properties for per-piece destination/rotation
   set by the JS so all 38 pieces share one keyframes block. */
.confetti-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 1;
}
.confetti-piece {
  --tx: 0px;
  --ty: 0px;
  --rot: 0deg;
  position: absolute;
  top: -6px;
  left: -3px;
  width: 7px;
  height: 13px;
  opacity: 0;
  border-radius: 1px;
}
.confetti-burst.go .confetti-piece {
  animation: confetti-fly 2.0s cubic-bezier(.18, .85, .42, 1) forwards;
}
@keyframes confetti-fly {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg) scale(0.6);
  }
  8% {
    opacity: 1;
    transform: translate(calc(var(--tx) * 0.15), calc(var(--ty) * 0.15))
               rotate(calc(var(--rot) * 0.15)) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty))
               rotate(var(--rot)) scale(0.95);
  }
}

/* Bubble burst — gentle rising particles on the closing card.
   Different feel from confetti: drift up, fade out. Champagne energy. */
.bubble-burst {
  position: absolute;
  bottom: 38%;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 1;
}
.bubble {
  --bx: 0px;
  position: absolute;
  left: -5px;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}
.bubble.go {
  animation: bubble-rise 2.4s cubic-bezier(.4, 0, .25, 1) forwards;
}
@keyframes bubble-rise {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
  15%  { opacity: 0.95; }
  100% { opacity: 0; transform: translate(var(--bx), -240px) scale(1.3); }
}

/* Respect users who prefer less motion: skip the showy stuff
   entirely and show final states. JS also bypasses animations in
   reduced-motion, but these rules are belt-and-suspenders for any
   CSS-driven transitions that would otherwise still run. */
@media (prefers-reduced-motion: reduce) {
  .confetti-burst,
  .confetti-piece,
  .bubble-burst,
  .bubble { display: none; }
  [data-stagger],
  [data-stage],
  .letter-dance-char,
  .tapped-style-name {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .tapped-chart-bar { transition: none; }
  .tw-cursor { animation: none; opacity: 0; }
}

/* ============================================================
   Top bar (LIST screen — back button + search + filter)
   ============================================================ */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease;
}
.app-topbar.scrolled {
  border-bottom-color: var(--hair);
}
.app-topbar-controls {
  display: flex; align-items: center; gap: 10px;
  padding: max(env(safe-area-inset-top), 12px) 18px 12px;
}

.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px 6px;
}
.sort-wrap {
  display: inline-flex; align-items: center; gap: 6px;
}
.sort-bar select {
  font-family: var(--body); font-size: 12.5px; font-weight: 600;
  border-radius: var(--r-pill);
  padding: 6px 28px 6px 12px;
  background: var(--card) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23102E29' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 10px center;
  border: 1.5px solid var(--hair);
  color: var(--ink);
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}

.beer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px 18px max(env(safe-area-inset-bottom), 24px);
}

.empty-state {
  text-align: center;
  padding: 60px 28px;
  color: var(--ink);
}

/* ============================================================
   Buttons / chips / toggles
   ============================================================ */
.btn {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15.5px;
  border: none;
  border-radius: var(--r-sm);
  padding: 13px 18px;
  background: var(--lake);
  color: #fff;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(0.97); background: var(--lake-deep); }
.btn.block  { width: 100%; }
.btn.ghost  { background: transparent; color: var(--lake); border: 1.5px solid var(--lake); }
.btn.soft   { background: var(--glacier-soft); color: var(--lake-deep); }
.btn.lg     { padding: 15px 20px; font-size: 16.5px; }
.btn.grow   { flex: 1; }

.chip {
  font-family: var(--body);
  font-weight: 600;
  font-size: 12.5px;
  border-radius: var(--r-pill);
  padding: 7px 13px;
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--hair);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .14s ease;
}
.chip:active { transform: scale(0.96); }
.chip.on            { background: var(--lake);  color: #fff; border-color: var(--lake); }
.chip.on.warm       { background: var(--heart); border-color: var(--heart); }

/* checkbox-style filter toggle */
.toggle {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--body); font-size: 13px; font-weight: 600;
  padding: 8px 13px 8px 9px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--hair);
  background: var(--card);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.toggle .box {
  width: 16px; height: 16px; border-radius: 5px;
  border: 1.6px solid var(--ink-faint);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: transparent;
  flex: 0 0 auto;
}
.toggle.on             { background: var(--lake); color: #fff; border-color: var(--lake); }
.toggle.on .box        { background: #fff; color: var(--lake); border-color: #fff; }

/* ============================================================
   Search bar + icon button (used in top bar)
   ============================================================ */
.searchbar {
  display: flex; align-items: center; gap: 9px;
  background: var(--card);
  border: 1.5px solid var(--hair);
  border-radius: var(--r-pill);
  padding: 10px 15px;
  color: var(--ink-faint);
  font-size: 14.5px;
  flex: 1;
  cursor: text;
}
.searchbar input {
  border: none; outline: none; background: none; flex: 1;
  font-family: var(--body); font-size: 14.5px; color: var(--ink);
  min-width: 0;
}
.searchbar input::placeholder { color: var(--ink-faint); }

.iconbtn {
  width: 42px; height: 42px; flex: 0 0 auto;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--hair);
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink);
  position: relative;
}
.iconbtn:active { transform: scale(0.94); }
.iconbtn.small  { width: 34px; height: 34px; }

.filter-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  background: var(--heart);
  color: #fff;
  font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--bg);
}

/* ============================================================
   Mug rating
   ============================================================ */
.mugs { display: inline-flex; gap: 4px; }
.mug-btn { background: none; border: none; padding: 0; cursor: pointer; line-height: 0; }
.mug-btn:active { transform: scale(0.9); }
.mug-svg { display: block; }
.mug-svg .body   { fill: #fff; stroke: var(--ink-faint); stroke-width: 1.5; }
.mug-svg .foam   { fill: #fff; stroke: var(--ink-faint); stroke-width: 1.3; }
.mug-svg .handle { fill: none; stroke: var(--ink-faint); stroke-width: 1.5; }
.mug-svg.full .body   { fill: var(--gold);   stroke: var(--gold); }
.mug-svg.full .foam   { fill: #FFFDF7;       stroke: var(--gold); }
.mug-svg.full .handle { stroke: var(--gold); }

/* heart */
.heart-btn { background: none; border: none; padding: 0; cursor: pointer; color: var(--ink-faint); line-height: 0; }
.heart-btn:active { transform: scale(0.85); }
.heart-btn.on { color: var(--heart); }

/* ============================================================
   Beer card
   ============================================================ */
.card {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 14px 15px 13px;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .15s ease;
  border: none;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
}
.card:active { transform: scale(0.985); }
.card .c-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.c-brewery   { font-size: 10.5px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; color: var(--lake); margin-bottom: 2px; }
.c-name      { font-family: var(--display); font-weight: 700; font-size: 17.5px; line-height: 1.08; }
.c-booth     { font-size: 11px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

.statrow {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: start;
  margin: 11px 0;
  padding: 9px 13px;
  border-radius: var(--r-sm);
  background: var(--glacier-soft);
}
.statrow.plain { background: var(--bg-2); }
.stat { min-width: 0; }
.stat .k { font-size: 8.5px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 1px; white-space: nowrap; }
.stat .v { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.c-foot { display: flex; justify-content: space-between; align-items: center; }
.c-foot .your { font-size: 11px; color: var(--ink-faint); font-weight: 600; }

.skeleton-card { cursor: default; }

/* ============================================================
   Sheet / popover (adapted from prototype: now positioned to
   viewport instead of inside the .phone frame)
   ============================================================ */
.scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(10,26,23,0.42);
  opacity: 0; pointer-events: none;
  transition: opacity .26s ease;
}
.scrim.show { opacity: 1; pointer-events: auto; }
.scrim[hidden] { display: none; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 61;
  background: var(--bg);
  border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-sheet);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.22,1,.36,1);
  display: flex; flex-direction: column;
  max-height: 92vh;
  max-height: 92dvh;
}
.sheet.show { transform: translateY(0); }

.sheet-grab {
  width: 40px; height: 5px; border-radius: 3px;
  background: var(--ink-faint); opacity: .5;
  margin: 9px auto 4px;
  flex: 0 0 auto;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 18px 8px;
}
.sheet-body {
  padding: 4px 18px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  display: flex; flex-direction: column; gap: 18px;
}
.sheet-foot {
  display: flex; gap: 8px;
  padding: 12px 18px max(env(safe-area-inset-bottom), 14px);
  border-top: 1px solid var(--hair);
  background: var(--bg);
}

/* ============================================================
   Filter sheet specifics
   ============================================================ */
.range-row {
  display: flex; align-items: center; gap: 8px;
}
.range-row input[type="number"] {
  flex: 1; min-width: 0;
  font-family: var(--body); font-size: 14.5px;
  background: var(--card);
  border: 1.5px solid var(--hair);
  border-radius: var(--r-pill);
  padding: 10px 15px;
  outline: none;
  color: var(--ink);
  -moz-appearance: textfield;
}
.range-row input[type="number"]::-webkit-outer-spin-button,
.range-row input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.range-row input[type="number"]:focus { border-color: var(--glacier); background: #fff; }

/* ============================================================
   Detail sheet specifics
   ============================================================ */
.detail-brewery {
  font-size: 11px; font-weight: 700; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--lake);
  margin-bottom: 3px;
}
.detail-name {
  font-family: var(--display); font-weight: 700; font-size: 24px;
  line-height: 1.08;
}
.detail-desc {
  font-size: 14px; line-height: 1.5; color: var(--ink-soft);
  margin-top: 8px;
}
.detail-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--lake);
  margin-bottom: 10px;
}

.notes {
  width: 100%;
  min-height: 84px; resize: none;
  border: 1.5px solid var(--hair); border-radius: var(--r-sm);
  background: var(--card); padding: 11px 13px;
  font-family: var(--body); font-size: 14px; color: var(--ink);
  line-height: 1.45; outline: none;
}
.notes:focus { border-color: var(--glacier); background: #fff; }
.notes::placeholder { color: var(--ink-faint); }

/* ============================================================
   Skeleton loader
   ============================================================ */
.skel {
  display: block; border-radius: 6px;
  background: linear-gradient(100deg, var(--bg-2) 30%, color-mix(in srgb,var(--bg-2) 50%, #fff) 50%, var(--bg-2) 70%);
  background-size: 220% 100%;
  animation: shim 1.3s ease-in-out infinite;
}
@keyframes shim {
  0%   { background-position:  180% 0; }
  100% { background-position:  -80% 0; }
}

/* ============================================================
   Motion preferences
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .skel       { animation: none; }
  .sheet      { transition: none; }
  .scrim      { transition: none; }
  .card, .btn, .iconbtn, .chip, .toggle { transition: none; }
}

/* ============================================================
   Wide viewport: constrain reading width
   ============================================================ */
@media (min-width: 720px) {
  .home-hero,
  .home-progress,
  .home-menu,
  .sub-topbar,
  .app-topbar-controls,
  .sort-bar,
  .beer-list,
  .screen-body,
  .empty-state {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
  }
  .sheet {
    left: 50%;
    right: auto;
    width: 100%;
    max-width: 640px;
    transform: translate(-50%, 100%);
  }
  .sheet.show { transform: translate(-50%, 0); }
}