/* ==========================================================================
   Blue Note — customer app
   iOS-inspired: system type, grouped surfaces, translucent materials,
   sheet physics and spring motion. Light + dark follow the system.
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Surfaces — warm, like paper and steamed milk */
  --bg: #f4f1ec;
  --bg-elevated: #ffffff;
  --bg-sheet: #f7f5f2;
  --fill: rgba(118, 104, 90, 0.12);
  --fill-2: rgba(118, 104, 90, 0.08);
  --separator: rgba(60, 48, 36, 0.12);
  --material: rgba(250, 248, 245, 0.74);
  --material-border: rgba(60, 48, 36, 0.1);

  /* Text */
  --label: #1d1a17;
  --label-2: rgba(45, 38, 32, 0.62);
  --label-3: rgba(45, 38, 32, 0.36);

  /* Color */
  --tint: #2f5bd3;               /* Blue Note */
  --tint-2: #3d6cf0;
  --on-tint: #ffffff;
  --gold: #e2a63b;
  --gold-deep: #b97a12;
  --green: #30b25a;
  --red: #ff3b30;
  --orange: #ff9f0a;
  --icon-cut: var(--bg-elevated);

  /* Depth */
  --shadow-card: 0 1px 1px rgba(40, 28, 16, 0.03), 0 6px 20px rgba(40, 28, 16, 0.07);
  --shadow-float: 0 2px 6px rgba(20, 14, 8, 0.08), 0 18px 48px rgba(20, 14, 8, 0.18);
  --shadow-pass: 0 2px 4px rgba(9, 16, 40, 0.18), 0 22px 50px -10px rgba(9, 22, 64, 0.5);

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --gutter: 20px;

  /* Motion — Apple's sheet curve, and a real spring where supported */
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --spring-soft: cubic-bezier(0.34, 1.3, 0.64, 1);

  color-scheme: light dark;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1);
    --spring-soft: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001 85.9%, 1);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0b0a;
    --bg-elevated: #1c1a18;
    --bg-sheet: #161412;
    --fill: rgba(255, 246, 236, 0.1);
    --fill-2: rgba(255, 246, 236, 0.06);
    --separator: rgba(255, 246, 236, 0.1);
    --material: rgba(24, 22, 20, 0.72);
    --material-border: rgba(255, 246, 236, 0.08);
    --label: #f5f1ec;
    --label-2: rgba(245, 238, 230, 0.62);
    --label-3: rgba(245, 238, 230, 0.34);
    --tint: #5b86ff;
    --tint-2: #7097ff;
    --gold: #f2b84b;
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-float: 0 18px 48px rgba(0, 0, 0, 0.6);
  }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
html.is-locked, html.is-locked body { overflow: hidden; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--label);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}
html, body { height: 100%; overflow: hidden; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
a { color: var(--tint); text-decoration: none; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--tint) 55%, transparent); outline-offset: 2px; border-radius: 12px; }

/* ==========================================================================
   App shell
   ========================================================================== */
.app {
  --sp: 0;
  position: fixed;
  inset: 0;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  transform-origin: 50% 0;
  transition: transform 0.55s var(--ease-ios), border-radius 0.55s var(--ease-ios), filter 0.55s var(--ease-ios);
}
.scroller {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(env(safe-area-inset-top) + 12px) var(--gutter) calc(env(safe-area-inset-bottom) + 108px);
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
@media (min-width: 560px) {
  html { background: color-mix(in srgb, var(--bg) 70%, #000 6%); }
  .app { box-shadow: 0 0 0 0.5px var(--separator), 0 30px 80px rgba(0, 0, 0, 0.12); }
}

/* iOS card-stack: the screen behind a sheet recedes */
.app.is-behind {
  transform: translateY(calc(var(--sp) * 10px)) scale(calc(1 - var(--sp) * 0.06));
  border-radius: calc(var(--sp) * 14px);
  overflow: hidden;
  filter: brightness(calc(1 - var(--sp) * 0.08));
}
.app.is-covered { transform: scale(0.96); filter: brightness(0.7); }
.is-sheet-dragging .app,
.is-sheet-dragging .cover,
.is-sheet-dragging .sheet__backdrop { transition: none !important; }

.views { position: relative; }
.view { display: none; }
.view.is-active { display: block; animation: view-in 0.42s var(--ease-out) both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Staggered first paint */
.reveal { opacity: 0; transform: translateY(14px); }
html.is-ready .reveal {
  animation: reveal 0.7s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav-compact {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 30;
  height: calc(env(safe-area-inset-top) + 44px);
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 17px;
  background: var(--material);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 0.5px solid var(--material-border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.nav-compact.is-visible { opacity: 1; }
.nav-compact span { transform: translateY(6px); transition: transform 0.35s var(--ease-out); }
.nav-compact.is-visible span { transform: none; }

.large-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 18px;
}
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label-2);
  margin-bottom: 2px;
}
.large-title {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.icon-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--tint);
  background: var(--fill-2);
  transition: transform 0.4s var(--spring), background 0.2s ease;
}
.icon-btn svg { width: 20px; height: 20px; }

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 6px 24px calc(env(safe-area-inset-bottom) + 8px);
  background: var(--material);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border-top: 0.5px solid var(--material-border);
  --icon-cut: var(--bg);
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--label-3);
  transition: color 0.2s ease;
}
.tab svg { width: 28px; height: 28px; transition: transform 0.5s var(--spring); }
.tab.is-active { color: var(--tint); }
.tab.is-active svg { animation: tab-bounce 0.55s var(--spring); }
.tab.is-pressed svg { transform: scale(0.86); }
@keyframes tab-bounce { 0% { transform: scale(0.8); } 100% { transform: scale(1); } }
.tab__badge {
  position: absolute;
  top: 0;
  left: calc(50% + 8px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  animation: pop-in 0.5s var(--spring) both;
}

/* ==========================================================================
   Press feedback
   ========================================================================== */
.pressable, .btn, .chip, .row--tap, .glass-btn {
  transition: transform 0.5s var(--spring), background-color 0.2s ease, box-shadow 0.3s ease, opacity 0.2s ease;
}
.pressable.is-pressed, .row--tap.is-pressed { transform: scale(0.97); transition-duration: 0.12s; transition-timing-function: ease-out; }
.btn.is-pressed { transform: scale(0.96); transition-duration: 0.1s; transition-timing-function: ease-out; }
.icon-btn.is-pressed, .glass-btn.is-pressed { transform: scale(0.88); transition-duration: 0.1s; }
.chip.is-pressed { transform: scale(0.93); transition-duration: 0.1s; }

/* ==========================================================================
   Hero (first-time visitors)
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 26px 24px 24px;
  color: #fff8ef;
  background: #1c120b;
  box-shadow: var(--shadow-float);
  isolation: isolate;
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  z-index: -1;
  animation: drift 12s ease-in-out infinite alternate;
}
.hero__glow--a { width: 260px; height: 260px; right: -80px; top: -110px; background: radial-gradient(circle, #c8752a 0%, transparent 70%); }
.hero__glow--b { width: 240px; height: 240px; left: -90px; bottom: -130px; background: radial-gradient(circle, #2f5bd3 0%, transparent 70%); animation-delay: -6s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-24px, 18px) scale(1.12); }
}
.hero__steam { position: absolute; right: 30px; top: 22px; display: flex; gap: 7px; opacity: 0.55; }
.hero__steam i {
  width: 6px;
  height: 34px;
  border-radius: 6px;
  background: linear-gradient(to top, rgba(255, 240, 220, 0.6), transparent);
  filter: blur(2px);
  animation: steam 3.2s ease-in-out infinite;
}
.hero__steam i:nth-child(2) { animation-delay: -1.1s; height: 42px; }
.hero__steam i:nth-child(3) { animation-delay: -2.2s; }
@keyframes steam {
  0% { transform: translateY(10px) scaleY(0.6); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(-16px) scaleY(1.1) skewX(-8deg); opacity: 0; }
}
.hero__kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #f0c48a; }
.hero__title {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 6px 0 10px;
}
.hero__sub { font-size: 15px; color: rgba(255, 244, 230, 0.72); max-width: 26ch; }
.hero__dots { display: flex; gap: 6px; margin-top: 18px; }
.hero__dots i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed rgba(255, 240, 220, 0.3); }
.hero__dots i.on { border: 0; background: #f2b84b; box-shadow: 0 0 16px rgba(242, 184, 75, 0.6); animation: pulse-dot 2.4s ease-in-out infinite; }
.hero__dots i.gift { border-style: solid; border-color: rgba(242, 184, 75, 0.6); }
@keyframes pulse-dot { 50% { transform: scale(1.12); } }

/* ==========================================================================
   Mini pass (members, home)
   ========================================================================== */
.mini-pass {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 18px 14px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(120, 160, 255, 0.35), transparent 55%),
    linear-gradient(150deg, #23439e 0%, #142a66 55%, #0d1a40 100%);
  box-shadow: var(--shadow-pass);
}
.mini-pass__row { display: flex; align-items: center; justify-content: space-between; }
.mini-pass__label { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.mini-pass__count { font-family: var(--font-rounded); font-size: 15px; color: rgba(255, 255, 255, 0.7); }
.mini-pass__count strong { font-size: 22px; color: #fff; }
.mini-pass__row--foot { margin-top: 10px; font-size: 14px; color: rgba(255, 255, 255, 0.78); }
.mini-pass .chev { width: 14px; height: 14px; opacity: 0.6; }
.mini-pass .stamp-strip { margin-top: 12px; }

/* ==========================================================================
   Stamps (shared by mini pass + card)
   ========================================================================== */
.stamp-strip, .pass__stamps { display: grid; grid-template-columns: repeat(var(--n, 7), 1fr); gap: 7px; }
.stamp {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px dashed rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.35);
}
.stamp svg { width: 55%; height: 55%; }
.stamp.is-filled {
  border: 0;
  color: #3a2508;
  background: radial-gradient(circle at 35% 30%, #ffe2a3, #f2b84b 55%, #d08f1f);
  box-shadow: 0 2px 8px rgba(242, 184, 75, 0.45), inset 0 -2px 3px rgba(120, 70, 0, 0.25);
  --icon-cut: #f2b84b;
}
.stamp.is-reward { border-style: solid; border-color: rgba(242, 184, 75, 0.7); color: #f2b84b; --icon-cut: #142a66; }
.stamp.is-reward.is-filled { color: #3a2508; }
.animate-stamps .stamp { animation: pop-in 0.5s var(--spring) both; animation-delay: calc(var(--k) * 45ms); }
.stamp.is-new { animation: stamp-hit 0.75s var(--spring) both !important; animation-delay: 0.35s !important; }
.stamp.is-new::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #ffd27a;
  animation: ring-burst 0.9s var(--ease-out) 0.45s both;
}
@keyframes pop-in { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes stamp-hit {
  0% { transform: scale(2.1) rotate(-18deg); opacity: 0; }
  55% { opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes ring-burst { from { transform: scale(0.8); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }

/* ==========================================================================
   Notice + sections + game tiles
   ========================================================================== */
.notice {
  margin-top: 12px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  text-align: left;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
}
.notice__icon { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; }
.notice__icon svg { width: 16px; height: 16px; }
.notice__text { flex: 1; display: flex; flex-direction: column; font-size: 15px; }
.notice__text span { font-size: 13px; color: var(--label-2); }
.chev { flex: none; width: 13px; height: 13px; color: var(--label-3); }

.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 28px 2px 10px;
}

.game-list { display: flex; flex-direction: column; gap: 12px; }
.game-tile {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px 12px 12px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
  text-align: left;
}
.game-tile[hidden] { display: none; }
.game-tile__art {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.game-tile__text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.game-tile__text strong { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.game-tile__text span { font-size: 14px; color: var(--label-2); }

/* Tile art: a spinning record */
.art-vinyl { background: linear-gradient(145deg, #2a2522, #121010); }
.vinyl {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #111 0 3px, #ff9f0a 3.5px 11px, transparent 11.5px),
    repeating-radial-gradient(circle, #1a1a1a 0 1.5px, #262626 1.5px 3px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: spin 3.2s linear infinite;
  position: relative;
}
.vinyl::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 20deg, transparent 0 15%, rgba(255, 255, 255, 0.16) 20%, transparent 30% 65%, rgba(255, 255, 255, 0.1) 72%, transparent 80%);
}
.game-tile.is-pressed .vinyl { animation-duration: 0.7s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tile art: a cup filling with espresso */
.art-cup { background: linear-gradient(145deg, #f7e7d2, #ead1b0); }
.cup {
  position: relative;
  width: 30px;
  height: 32px;
  margin-top: 8px;
  border-radius: 3px 3px 12px 12px;
  background: #fffaf3;
  box-shadow: inset 0 0 0 2px #fff, 0 3px 8px rgba(110, 70, 30, 0.25);
  overflow: hidden;
}
.cup::before {
  content: "";
  position: absolute;
  top: 6px;
  right: -9px;
  width: 9px;
  height: 13px;
  border: 3px solid #fffaf3;
  border-left: 0;
  border-radius: 0 8px 8px 0;
}
.cup__fill {
  position: absolute;
  inset: auto 2px 2px 2px;
  height: 20%;
  border-radius: 1px 1px 10px 10px;
  background: linear-gradient(#c88a4b 0 3px, #5a3216 4px);
  animation: cup-fill 3.6s var(--ease-ios) infinite;
}
.art-cup::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 22px;
  margin-left: -4px;
  border-radius: 2px;
  background: linear-gradient(#6b3b18, #5a3216);
  animation: pour 3.6s var(--ease-ios) infinite;
}
@keyframes cup-fill { 0%, 8% { height: 8%; } 70%, 88% { height: 86%; } 100% { height: 8%; } }
@keyframes pour { 0%, 6% { transform: scaleY(0); transform-origin: top; } 12%, 66% { transform: scaleY(1); } 74%, 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Tile art: two players and a bolt */
.art-duel { background: linear-gradient(145deg, #5e5ce6, #3a37b8); }
.av {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  box-shadow: 0 0 0 2.5px #4a47d0;
}
.av--a { left: 9px; top: 12px; background: #ff9f0a; animation: bob 2.4s ease-in-out infinite; }
.av--b { right: 9px; bottom: 12px; background: #30d158; animation: bob 2.4s ease-in-out -1.2s infinite; }
.bolt { position: absolute; color: #ffd60a; width: 20px; height: 20px; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.35)); animation: flash 2.4s ease-in-out infinite; }
.bolt svg { width: 100%; height: 100%; }
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes flash { 0%, 100% { transform: scale(1) rotate(-6deg); } 50% { transform: scale(1.18) rotate(6deg); } }

.footnote {
  margin: 22px 8px 0;
  font-size: 13px;
  text-align: center;
  color: var(--label-3);
}

/* ==========================================================================
   Loyalty pass (Wallet-style)
   ========================================================================== */
.pass-wrap { perspective: 1200px; }
.pass {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 18px 20px 20px;
  color: #fff;
  background:
    radial-gradient(130% 120% at 100% 0%, rgba(120, 160, 255, 0.4), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(242, 184, 75, 0.18), transparent 60%),
    linear-gradient(155deg, #2a4cb0 0%, #162d70 52%, #0c1838 100%);
  box-shadow: var(--shadow-pass);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--spring-soft);
  will-change: transform;
}
.pass.is-entering { animation: pass-in 0.9s var(--spring-soft) both; }
@keyframes pass-in {
  from { transform: translateY(40px) rotateX(28deg) scale(0.92); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.pass__shine, .voucher__shine {
  position: absolute;
  inset: -50%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.22) 50%, transparent 60%);
  transform: translateX(-60%);
  pointer-events: none;
}
.pass.is-entering .pass__shine, .voucher.is-entering .voucher__shine { animation: shine 1.4s var(--ease-out) 0.35s both; }
@keyframes shine { to { transform: translateX(60%); } }
.pass__head { display: flex; justify-content: space-between; align-items: center; }
.pass__brand { font-weight: 700; font-size: 14px; letter-spacing: 0.08em; }
.pass__type { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.14); }
.pass__label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.pass__member { margin: 18px 0 16px; }
.pass__member strong { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.pass__stamps { gap: 9px; }
.pass__foot { display: flex; justify-content: space-between; margin-top: 18px; }
.pass__foot strong { font-size: 17px; font-weight: 600; }
.pass__foot-right { text-align: right; }

/* ==========================================================================
   Grouped lists (Settings-style)
   ========================================================================== */
.list {
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.list + .list, .list + .list-caption { margin-top: 14px; }
.list-caption { margin: 18px 16px 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--label-2); }
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 16px;
  text-align: left;
  width: 100%;
}
.row + .row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 16px;
  height: 0.5px;
  background: var(--separator);
}
.row__icon + .row__text { min-width: 0; }
.row__icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--c, var(--tint));
  --icon-cut: var(--c, var(--tint));
}
.row__icon svg { width: 19px; height: 19px; }
.row__text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.row__text strong { font-weight: 500; font-size: 16px; }
.row__text span { font-size: 13px; color: var(--label-2); }
.row__trail { font-size: 15px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.row--tap.is-pressed { background: var(--fill-2); }

.row--input { padding: 0 16px; }
.row--input input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 17px; /* ≥16px keeps iOS from zooming on focus */
  color: var(--label);
}
.row--input input::placeholder { color: var(--label-3); }
.cc-picker {
  position: relative;
  flex: none;
  padding-right: 12px;
  margin-right: 2px;
  border-right: 0.5px solid var(--separator);
}
.cc-picker select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 17px;
  color: var(--label);
  padding: 14px 14px 14px 0;
  cursor: pointer;
}
.cc-picker::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -5px;
  border-right: 1.8px solid var(--label-3);
  border-bottom: 1.8px solid var(--label-3);
  transform: rotate(45deg);
  pointer-events: none;
}

.avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  background: linear-gradient(145deg, #7a9cff, #2f5bd3);
}

/* iOS switch */
.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 51px;
  height: 31px;
  border-radius: 31px;
  background: var(--fill);
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), 0 1px 1px rgba(0, 0, 0, 0.16);
  transition: transform 0.45s var(--spring), width 0.25s var(--ease-out);
}
.switch:active::before { width: 33px; }
.switch:checked { background: var(--green); }
.switch:checked::before { transform: translateX(20px); }
.switch:checked:active::before { transform: translateX(14px); }
.row--toggle { cursor: pointer; }
.row--toggle a { font-weight: 500; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 20px;
  padding: 2px 2px 4px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  scrollbar-width: none;
  touch-action: pan-x;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 500;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card), inset 0 0 0 1px var(--separator);
}
.chip[aria-checked="true"] {
  color: var(--on-tint);
  background: var(--tint);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--tint) 40%, transparent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.btn--large { min-height: 56px; border-radius: 16px; }
.btn--primary {
  color: var(--on-tint);
  background: var(--tint);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--tint) 35%, transparent);
}
.btn--primary:disabled { opacity: 0.45; box-shadow: none; }
.btn--plain { color: var(--tint); background: transparent; margin-top: 4px; }
.link-btn { color: var(--tint); font-size: 15px; font-weight: 500; padding: 8px 4px; }
.link-btn--center { display: flex; align-items: center; gap: 6px; margin: 6px auto 0; }
.link-btn svg { width: 16px; height: 16px; }

.btn__spinner, .btn__check { position: absolute; opacity: 0; transition: opacity 0.2s ease, transform 0.45s var(--spring); }
.btn__spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.btn__check { width: 26px; height: 26px; transform: scale(0.3); }
.btn__label { transition: opacity 0.2s ease, transform 0.3s var(--ease-out); }
.btn.is-loading .btn__label, .btn.is-done .btn__label { opacity: 0; transform: scale(0.9); }
.btn.is-loading .btn__spinner { opacity: 1; }
.btn.is-done { background: var(--green); box-shadow: 0 6px 18px rgba(48, 178, 90, 0.4); }
.btn.is-done .btn__check { opacity: 1; transform: scale(1); }
.btn--claim { margin-top: 22px; }

/* ==========================================================================
   Covers (full-screen game presentations)
   ========================================================================== */
.cover {
  --sp: 0;
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 10px) 16px calc(env(safe-area-inset-bottom) + 16px);
  background: var(--bg);
  transform: translate3d(0, 100%, 0);
  transition: transform 0.6s var(--ease-ios), border-radius 0.55s var(--ease-ios), filter 0.55s var(--ease-ios);
  outline: none;
  overflow: hidden;
}
.cover.is-open { transform: none; }
.cover.is-open.is-behind {
  transform: translateY(calc(var(--sp) * 10px)) scale(calc(1 - var(--sp) * 0.06));
  border-radius: calc(var(--sp) * 14px);
  filter: brightness(calc(1 - var(--sp) * 0.25));
}
.cover--dark {
  color: #fff;
  background: radial-gradient(120% 70% at 50% 0%, #1d1a2e 0%, #0a0910 60%), #0a0910;
}
.cover__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.cover__bar-spacer { width: 40px; }
.cover__title { font-weight: 600; font-size: 17px; }
.cover__hint { margin-top: 12px; text-align: center; font-size: 15px; color: rgba(255, 255, 255, 0.6); transition: opacity 0.3s ease; }
.cover__actions { margin-top: auto; padding-top: 16px; }

.glass-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}
.glass-btn svg { width: 16px; height: 16px; }

.timer-pill, .fill-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}
.fill-pill { padding: 0 16px; min-width: 76px; justify-content: center; transition: background-color 0.25s ease, transform 0.4s var(--spring); }
.fill-pill.is-pouring { background: rgba(255, 159, 10, 0.32); transform: scale(1.06); }
.timer-ring { width: 30px; height: 30px; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 4; }
.timer-ring__track { stroke: rgba(255, 255, 255, 0.16); }
.timer-ring__bar { stroke: #30d158; stroke-linecap: round; stroke-dasharray: 94.25; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke 0.3s ease; }
.timer-pill.is-urgent .timer-ring__bar { stroke: #ff453a; }
.timer-pill.is-urgent { animation: urgent 1s var(--ease-out) infinite; }
@keyframes urgent { 0% { transform: scale(1.08); } 100% { transform: scale(1); } }

.stage {
  position: relative;
  flex: 1;
  min-height: 400px;
  margin-top: 12px;
  border-radius: 24px;
  overflow: hidden;
  background: #0e0b14;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.stage canvas { display: block; touch-action: none; }

.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 5, 10, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 0.3s ease;
}
.countdown span {
  font-family: var(--font-rounded);
  font-size: 120px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.countdown span.tick { animation: count-tick 0.85s var(--ease-out) both; }
.countdown span.word { font-size: 64px; }
@keyframes count-tick {
  0% { transform: scale(1.9); opacity: 0; filter: blur(12px); }
  30% { transform: scale(1); opacity: 1; filter: blur(0); }
  75% { transform: scale(0.96); opacity: 1; }
  100% { transform: scale(0.7); opacity: 0; filter: blur(6px); }
}

.wheel-stage { flex: 1; display: grid; place-items: center; min-height: 0; }
.wheel-stage canvas { touch-action: none; cursor: grab; }
.wheel-stage canvas:active { cursor: grabbing; }
.spin-result {
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  min-height: 26px;
}
.spin-result.is-win {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffd60a;
  animation: pop-in 0.6s var(--spring) both;
}

/* ==========================================================================
   Sheets
   ========================================================================== */
.sheet { position: fixed; inset: 0; z-index: 100; }
.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transition: opacity 0.5s var(--ease-ios);
}
.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet__panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - env(safe-area-inset-top) - 24px);
  display: flex;
  flex-direction: column;
  margin-left: -240px;
  border-radius: 14px 14px 0 0;
  background: var(--bg-sheet);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
  transform: translate3d(0, 105%, 0);
  transition: transform 0.55s var(--ease-ios);
  outline: none;
  touch-action: none;
}
@media (max-width: 480px) { .sheet__panel { left: 0; margin-left: 0; } }
.sheet.is-open .sheet__panel { transform: translate3d(0, 0, 0); }
.sheet__panel.is-dragging { transition: none; }
.sheet__panel.is-scrollable .sheet__body { touch-action: pan-y; }
.sheet__grabber {
  flex: none;
  width: 36px;
  height: 5px;
  margin: 7px auto 0;
  border-radius: 3px;
  background: var(--label-3);
  opacity: 0.6;
}
.sheet__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px var(--gutter) calc(env(safe-area-inset-bottom) + 18px);
}
.sheet.is-open .sheet__body > * { animation: sheet-content 0.6s var(--ease-out) both; }
.sheet.is-open .sheet__body > *:nth-child(2) { animation-delay: 40ms; }
.sheet.is-open .sheet__body > *:nth-child(3) { animation-delay: 80ms; }
@keyframes sheet-content { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.sheet-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; text-align: center; margin: 8px 0 16px; }
.sheet-sub { text-align: center; font-size: 15px; color: var(--label-2); margin: 18px 0 14px; }
.sheet-caption { text-align: center; font-size: 14px; color: var(--label-2); margin: 16px 0 14px; }

/* Prize reveal */
.prize-hero { text-align: center; padding: 14px 0 22px; }
.prize-hero__badge {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 14px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  color: #3a2508;
  background: radial-gradient(circle at 35% 25%, #ffe6ad, #f2b84b 60%, #d08f1f);
  box-shadow: 0 12px 30px rgba(226, 166, 59, 0.45), inset 0 -3px 6px rgba(120, 70, 0, 0.25);
  --icon-cut: #f2b84b;
}
.prize-hero__badge svg { width: 42px; height: 42px; }
.prize-hero__badge::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 34px;
  border: 2px solid rgba(242, 184, 75, 0.5);
  opacity: 0;
}
.sheet.is-open .prize-hero__badge { animation: badge-in 0.9s var(--spring) 0.1s both; }
.sheet.is-open .prize-hero__badge::after { animation: ring-burst 1.1s var(--ease-out) 0.5s both; }
@keyframes badge-in {
  0% { transform: scale(0.2) rotate(-25deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.prize-hero__title {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 4px 0 8px;
}
.prize-hero__desc { font-size: 16px; color: var(--label-2); max-width: 30ch; margin: 0 auto; }

/* Messages (cooldown, lose, info) */
.message { text-align: center; padding: 16px 4px 22px; }
.message__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--c);
  --icon-cut: var(--c);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--c) 40%, transparent);
}
.sheet.is-open .message__icon { animation: badge-in 0.8s var(--spring) 0.1s both; }
.message__icon svg { width: 32px; height: 32px; }
.message h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.message p { font-size: 16px; color: var(--label-2); max-width: 32ch; margin: 0 auto; }
.message + .list { margin-bottom: 18px; }

.gauge { position: relative; width: 132px; height: 132px; margin: 0 auto 16px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 11; }
.gauge__track { stroke: var(--fill); }
.gauge__bar { stroke: var(--orange); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.2s var(--ease-out) 0.25s; }
.gauge__value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-rounded);
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Voucher pass */
.voucher {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 22px;
  padding: 18px 20px 18px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 200, 120, 0.3), transparent 55%),
    linear-gradient(160deg, #2a1a10 0%, #17100b 100%);
  box-shadow: var(--shadow-float);
}
.voucher.is-reward {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 230, 160, 0.5), transparent 55%),
    linear-gradient(160deg, #d0901f 0%, #8a5208 100%);
}
.voucher.is-entering { animation: pass-in 0.9s var(--spring-soft) both; }
.voucher.is-order {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(140, 170, 255, 0.28), transparent 55%),
    linear-gradient(160deg, #1d2333 0%, #11141c 100%);
}
.voucher__head { display: flex; justify-content: space-between; align-items: center; }
.voucher__brand { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.85); }
.voucher__kind { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.16); }
.voucher__title { font-family: var(--font-display); font-size: 40px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; margin: 18px 0 6px; }
.voucher__desc { font-size: 15px; color: rgba(255, 255, 255, 0.7); max-width: 30ch; margin: 0 auto; }
.voucher__qr {
  width: 188px;
  margin: 18px auto 10px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
}
.voucher__qr canvas, .voucher__qr svg { width: 100% !important; height: auto !important; border-radius: 6px; }
.voucher__code { font-family: var(--font-mono); font-size: 20px; font-weight: 700; letter-spacing: 0.14em; }
.voucher__perf {
  height: 0;
  margin: 18px -20px 14px;
  border-top: 2px dashed rgba(255, 255, 255, 0.18);
  position: relative;
}
.voucher__perf::before, .voucher__perf::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-sheet);
}
.voucher__perf::before { left: -11px; }
.voucher__perf::after { right: -11px; }
.voucher__meta { display: flex; justify-content: space-between; text-align: left; }
.voucher__meta div:last-child { text-align: right; }
.voucher__meta span { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.voucher__meta strong { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.voucher__stamp {
  position: absolute;
  top: 44%;
  left: 50%;
  padding: 8px 18px;
  border: 4px solid #30d158;
  border-radius: 12px;
  color: #30d158;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: rgba(10, 30, 16, 0.6);
  transform: translate(-50%, -50%) rotate(-14deg) scale(2.2);
  opacity: 0;
  pointer-events: none;
}
.voucher.is-redeemed .voucher__qr { filter: grayscale(1) opacity(0.35); transition: filter 0.4s ease; }
.voucher.is-redeemed .voucher__stamp { animation: rubber-stamp 0.6s var(--spring) both; }
@keyframes rubber-stamp {
  0% { transform: translate(-50%, -50%) rotate(-14deg) scale(2.4); opacity: 0; }
  100% { transform: translate(-50%, -50%) rotate(-14deg) scale(1); opacity: 1; }
}

/* Duel */
.segmented {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 2px;
  border-radius: 9px;
  background: var(--fill);
}
.segmented__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(50% - 2px);
  height: calc(100% - 4px);
  border-radius: 7px;
  background: var(--bg-elevated);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.45s var(--spring-soft);
}
.segmented button { position: relative; z-index: 1; height: 32px; font-size: 14px; font-weight: 500; color: var(--label-2); transition: color 0.2s ease; }
.segmented button.is-active { color: var(--label); font-weight: 600; }

.qr-card {
  width: 216px;
  margin: 0 auto;
  padding: 12px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-float);
}
.qr-card--small { width: 170px; margin-top: 12px; text-align: center; }
.qr-card--small p { font-size: 13px; color: #3a3a3c; margin-top: 6px; }
.qr-slot { aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; background: #f2f2f4; overflow: hidden; }
.qr-slot.is-ready { background: #fff; animation: fade-scale 0.5s var(--spring-soft) both; }
.qr-slot canvas, .qr-slot svg { width: 100% !important; height: auto !important; }
.qr-slot:not(.is-ready)::after {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: rgba(0, 0, 0, 0.45);
  animation: spin 0.8s linear infinite;
}
@keyframes fade-scale { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.room-code {
  margin: 16px 0 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; color: var(--label-2); margin-bottom: 8px; }
.waiting__dots { display: flex; gap: 4px; }
.waiting__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--tint); animation: dots 1.2s ease-in-out infinite; }
.waiting__dots i:nth-child(2) { animation-delay: 0.15s; }
.waiting__dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dots { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } }
.code-input { text-transform: uppercase; font-family: var(--font-mono) !important; letter-spacing: 0.12em; text-align: center; font-size: 22px !important; }
[data-pane="join"] .btn { margin-top: 16px; }

/* ==========================================================================
   Card tab: empty state + voucher rows
   ========================================================================== */
.empty { text-align: center; padding: 30px 12px 10px; }
.empty h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.empty p { color: var(--label-2); font-size: 16px; max-width: 30ch; margin: 0 auto 22px; }
.empty .btn { max-width: 240px; margin: 0 auto; }
.empty__art { display: grid; place-items: center; margin-bottom: 24px; }
.ghost-pass {
  width: 240px;
  padding: 50px 18px 18px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card), inset 0 0 0 1px var(--separator);
  transform: rotate(-4deg);
  animation: float 5s ease-in-out infinite;
}
.ghost-pass i { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--label-3); }
@keyframes float { 50% { transform: rotate(-2deg) translateY(-6px); } }

.voucher-row .row__icon { background: linear-gradient(145deg, #ffcf7a, #e2a63b); --icon-cut: #e2a63b; color: #3a2508; }
.voucher-row.is-reward .row__icon { background: linear-gradient(145deg, #4ade80, #22a046); --icon-cut: #22a046; color: #fff; }
.list .empty-row { padding: 16px; font-size: 15px; color: var(--label-2); text-align: center; }

/* ==========================================================================
   Toast — Dynamic Island style
   ========================================================================== */
.toast {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 10px);
  left: 50%;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  color: #fff;
  background: #000;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
  font-size: 15px;
  font-weight: 600;
  transform: translate(-50%, -8px) scale(0.4, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease-ios), opacity 0.25s ease;
}
.toast.is-visible { transform: translate(-50%, 0) scale(1); opacity: 1; transition: transform 0.6s var(--spring), opacity 0.2s ease; }
.toast__icon { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #30d158; }
.toast__icon svg { width: 14px; height: 14px; }
.toast[data-tone="error"] .toast__icon { background: #ff453a; }
.toast[data-tone="gold"] .toast__icon { background: #f2b84b; color: #3a2508; }
.toast__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.confetti-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 250; pointer-events: none; }

/* ==========================================================================
   Make Your Drink
   ========================================================================== */

/* Home tile art: a latte building itself, layer by layer */
.art-make { background: linear-gradient(145deg, #2a1d14, #120c08); }
.mk-glass {
  position: relative;
  width: 30px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-top: 0;
  border-radius: 0 0 9px 9px;
  overflow: hidden;
}
.mk-l { position: absolute; left: 0; right: 0; bottom: 0; transform-origin: bottom; animation: mk-build 4.2s var(--ease-ios) infinite; }
.mk-l--1 { height: 30%; background: #4a250f; }
.mk-l--2 { bottom: 30%; height: 45%; background: #dcb98f; animation-delay: 0.35s; }
.mk-l--3 { bottom: 75%; height: 18%; background: #fffaf3; animation-delay: 0.7s; }
@keyframes mk-build { 0%, 6% { transform: scaleY(0); } 22%, 86% { transform: scaleY(1); } 100% { transform: scaleY(0); } }

.cover--make .timer-pill--compact { height: 36px; font-size: 17px; padding: 0 12px 0 4px; }
.cover--make .timer-pill--compact .timer-ring { width: 28px; height: 28px; }
.cover--make.is-playing .make-spacer { display: none; }
.cover--make .timer-pill.is-urgent .timer-ring__bar { stroke: #ff453a; }
.cover--make .timer-pill.is-urgent { animation: urgent 1s var(--ease-out) infinite; }

/* Menu */
.make-menu { flex: 1; overflow-y: auto; padding: 8px 2px 4px; scrollbar-width: none; }
.make-menu::-webkit-scrollbar { display: none; }
.make-menu h2 { font-family: var(--font-display); font-size: 30px; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; margin: 10px 4px 6px; }
.make-menu > p { font-size: 15px; color: rgba(255, 255, 255, 0.6); margin: 0 4px 18px; max-width: 34ch; }
.drink-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.drink-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 14px 12px;
  border-radius: 22px;
  text-align: left;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: fade-scale 0.5s var(--spring-soft) both;
  animation-delay: calc(var(--i) * 45ms);
}
.drink-card strong { font-size: 17px; font-weight: 600; margin-top: 10px; }
.drink-card__blurb { font-size: 13px; color: rgba(255, 255, 255, 0.55); line-height: 1.3; min-height: 2.6em; }
.drink-card__steps { font-size: 15px; margin-top: 6px; letter-spacing: 2px; }
.drink-card__art {
  width: 100%;
  height: 84px;
  display: grid;
  place-items: end center;
  border-radius: 14px;
  background: radial-gradient(80% 70% at 50% 100%, rgba(255, 190, 120, 0.18), transparent 70%);
}
.drink-card.is-pressed .mini-glass { transform: translateY(-4px) rotate(-4deg); }

.mini-glass {
  position: relative;
  display: block;
  width: 44px;
  height: 66px;
  margin-bottom: 6px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  transition: transform 0.5s var(--spring);
}
.mini-glass--cup { width: 52px; height: 42px; border-radius: 0 0 20px 20px; }
.mini-glass--carafe { width: 50px; height: 56px; border-radius: 8px 8px 22px 22px; border-top: 2px solid rgba(255, 255, 255, 0.6); }
.mini-glass i { position: absolute; left: 0; right: 0; background: var(--c); }
.mini-glass b {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: rgba(220, 240, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  left: calc(8% + (var(--k) * 23%));
  bottom: calc(10% + (var(--k) * 7%));
  transform: rotate(calc(var(--k) * 17deg));
}

/* The bar */
.make-bar { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.make-bar.is-entering { animation: fade-scale 0.5s var(--spring-soft) both; }

.recipe {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 8px -16px 0;
  padding: 2px 16px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.recipe::-webkit-scrollbar { display: none; }
.recipe__step {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.07);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.5s var(--spring);
}
.recipe__icon { font-size: 16px; }
.recipe__step.is-current { color: #fff; background: var(--tint); transform: scale(1.04); }
.recipe__step.is-done { color: #30d158; background: rgba(48, 209, 88, 0.14); }
.recipe__step.is-done .recipe__icon { filter: grayscale(0.2); }

.make-stage {
  position: relative;
  flex: 1;
  min-height: 250px;
  margin-top: 12px;
  border-radius: 24px;
  overflow: hidden;
  display: grid;
  place-items: end center;
  padding-top: 84px;
  padding-bottom: 26px;
  background:
    radial-gradient(60% 45% at 50% 100%, rgba(255, 190, 120, 0.16), transparent 70%),
    linear-gradient(#17151d, #0d0c11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
/* Counter top */
.make-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  background: linear-gradient(#2c2a30, #1a191e);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.glass {
  --gw: 150px;
  --gh: 220px;
  position: relative;
  z-index: 1;
  width: var(--gw);
  height: var(--gh);
  border: 2.5px solid rgba(255, 255, 255, 0.55);
  border-top: 0;
  border-radius: 0 0 26px 26px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 10px 0 18px -10px rgba(255, 255, 255, 0.3);
}
.glass::before {
  /* rim */
  content: "";
  position: absolute;
  top: -4px;
  left: -3px;
  right: -3px;
  height: 7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
}
.glass--cup { --gw: 150px; --gh: 128px; border-radius: 0 0 54px 54px; }
.glass--cup::after {
  /* handle */
  content: "";
  position: absolute;
  right: -30px;
  top: 22px;
  width: 26px;
  height: 46px;
  border: 5px solid rgba(255, 255, 255, 0.5);
  border-left: 0;
  border-radius: 0 22px 22px 0;
}
.glass--carafe { --gw: 160px; --gh: 160px; border-radius: 20px 20px 60px 60px; border-top: 2.5px solid rgba(255, 255, 255, 0.55); margin-bottom: 0; }
.glass--carafe::before { display: none; }
.glass.is-done { animation: glass-hop 0.7s var(--spring) both; }
@keyframes glass-hop { 0% { transform: translateY(0); } 35% { transform: translateY(-14px) scale(1.04); } 100% { transform: none; } }

.glass__inner { position: absolute; inset: 0 4px 6px; }
.glass__layers { position: absolute; inset: 0; overflow: hidden; border-radius: 0 0 20px 20px; }
.glass--cup .glass__layers { border-radius: 0 0 48px 48px; }
.glass--carafe .glass__layers { border-radius: 14px 14px 54px 54px; }

.layer {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  background: linear-gradient(to top, var(--below) 0, var(--c) 10px, var(--c) 100%);
}
.layer--espresso::after {
  /* crema line */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(#e0a868, rgba(200, 135, 74, 0));
}
.layer--foam {
  background:
    radial-gradient(circle at 20% 40%, rgba(0, 0, 0, 0.05) 0 3px, transparent 4px),
    radial-gradient(circle at 60% 70%, rgba(0, 0, 0, 0.05) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 30%, rgba(0, 0, 0, 0.05) 0 3px, transparent 4px),
    linear-gradient(to top, var(--below) 0, var(--c) 6px);
  background-size: 22px 14px, 18px 12px, 26px 16px, 100% 100%;
  transition: height 0.35s var(--spring);
}

.glass__ice { position: absolute; inset: 0; pointer-events: none; }
.cube {
  position: absolute;
  width: 38px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(235, 248, 255, 0.55), rgba(190, 220, 240, 0.22));
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55), inset 6px 6px 10px rgba(255, 255, 255, 0.35);
  animation: cube-drop 0.6s var(--spring) both;
}
.cube:nth-child(1) { left: 12%; bottom: 3%; --r: -8deg; }
.cube:nth-child(2) { right: 12%; bottom: 4%; --r: 11deg; }
.cube:nth-child(3) { left: 26%; bottom: 20%; --r: 18deg; }
.cube:nth-child(4) { right: 22%; bottom: 23%; --r: -14deg; }
.cube:nth-child(n+5) { left: 38%; bottom: 36%; --r: 6deg; }
.cube { transform: rotate(var(--r)); }
@keyframes cube-drop {
  0% { transform: translateY(-260px) rotate(calc(var(--r) - 40deg)); opacity: 0.4; }
  100% { transform: rotate(var(--r)); opacity: 1; }
}

/* Target band */
.glass__band {
  position: absolute;
  left: -14px;
  right: -14px;
  border-top: 2px dashed rgba(255, 214, 10, 0.85);
  border-bottom: 2px dashed rgba(255, 214, 10, 0.85);
  background: rgba(255, 214, 10, 0.1);
  transition: background-color 0.2s ease, border-color 0.2s ease, bottom 0.45s var(--spring-soft), height 0.45s var(--spring-soft);
  pointer-events: none;
}
.glass__band span {
  position: absolute;
  right: -78px;
  top: 50%;
  transform: translateY(-50%);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #1c1606;
  background: #ffd60a;
  white-space: nowrap;
}
.glass--cup .glass__band span { right: -92px; }
.glass__band.is-hit { background: rgba(48, 209, 88, 0.22); border-color: #30d158; }
.glass__band.is-hit span { background: #30d158; color: #04240f; }

.glass__splash {
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: var(--surface, 0%);
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  opacity: 0;
}
.glass__splash.is-on { animation: splash 0.5s var(--ease-out); }
@keyframes splash { 0% { opacity: 1; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.6); } }

/* V60 dripper sitting on the carafe */
.dripper {
  position: absolute;
  left: 50%;
  top: -86px;
  width: 132px;
  height: 92px;
  margin-left: -66px;
  z-index: 3;
  clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%);
  background: linear-gradient(90deg, #d9d9de, #ffffff 45%, #b5b5bb);
}
.dripper i {
  position: absolute;
  inset: 8px 14px 18px;
  clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%);
  background: repeating-linear-gradient(90deg, #f3ede3 0 6px, #e6dccd 6px 8px);
}

/* Feedback + finish */
.make-feedback {
  position: absolute;
  top: 34%;
  left: 50%;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform: translate(-50%, 0) scale(0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}
.make-feedback[data-tone="perfect"] { color: #1c1606; background: #ffd60a; }
.make-feedback[data-tone="good"] { color: #04240f; background: #30d158; }
.make-feedback[data-tone="bad"] { color: #fff; background: #ff453a; }
.make-feedback.is-on { animation: feedback 1.1s var(--spring) both; }
@keyframes feedback {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.6); }
  25% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -6px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -18px) scale(0.95); }
}
.make-stars { position: absolute; top: 18%; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 4; }
.make-stars span { font-size: 46px; color: rgba(255, 255, 255, 0.18); animation: star-pop 0.6s var(--spring) both; animation-delay: calc(var(--k) * 140ms + 120ms); }
.make-stars span.on { color: #ffd60a; text-shadow: 0 6px 24px rgba(255, 214, 10, 0.55); }
@keyframes star-pop { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1) rotate(0); } }

.make-hint { text-align: center; font-size: 15px; color: rgba(255, 255, 255, 0.7); margin: 12px 0 10px; min-height: 22px; }
.make-hint b { color: #fff; }
.make-hint[data-tone="warn"] { color: #ff9f0a; }
.make-hint[data-tone="warn"] b { color: #ffd60a; }

/* Ingredient pad (Control Center style) */
.ingredients { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ing {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 10px 6px 9px;
  border-radius: 20px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  touch-action: none;
  -webkit-touch-callout: none;
  transition: transform 0.45s var(--spring), background-color 0.2s ease, box-shadow 0.3s ease;
}
.ing.is-pressed { transform: scale(0.93); background: rgba(255, 255, 255, 0.2); transition-duration: 0.1s; }
.ing.is-next { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tint) 85%, transparent); }
.ing.is-next::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--tint) 45%, transparent);
  animation: next-pulse 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes next-pulse { 50% { opacity: 0.25; } }
.ing__fill { position: absolute; inset: 0; background: color-mix(in srgb, var(--tint) 35%, transparent); transform: scaleY(0); transform-origin: bottom; transition: transform 0.35s var(--spring-soft); }
.ing__emoji { position: relative; font-size: 26px; line-height: 1.15; }
.ing__name { position: relative; font-size: 13px; font-weight: 600; }
.ing__hint { position: relative; font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
@media (max-height: 700px) {
  .ing { padding: 7px 6px 6px; }
  .ing__emoji { font-size: 22px; }
  .glass { --gh: 180px; }
}

/* ==========================================================================
   Make Your Drink — tools, realistic liquids, sign your cup
   ========================================================================== */
@font-face {
  font-family: "Caveat";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/caveat-700.woff2") format("woff2");
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Portafilter at the top of the bar; its light glows while espresso runs */
.portafilter { position: absolute; top: 0; left: 50%; width: 220px; height: 72px; margin-left: -110px; z-index: 3; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45)); }
.pf-led { fill: rgba(255, 255, 255, 0.2); transition: fill 0.2s ease; }
.cover--make.is-brewing .pf-led { fill: #30d158; filter: drop-shadow(0 0 4px #30d158); }

/* Tools pivot around their spout tip, which sits just above the glass */
.tool {
  position: absolute;
  left: calc(var(--tip-x, 50%) - var(--ox));
  top: calc(var(--tip-y, 40%) - var(--oy));
  transform-origin: var(--ox) var(--oy);
  transform: translate(150px, -70px) rotate(14deg);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5));
  transition: transform 0.6s var(--spring-soft), opacity 0.3s ease;
}
.tool svg { display: block; }
.tool.is-ready { transform: translate(0, -6px) rotate(-8deg); opacity: 1; }
.tool.is-ready.is-pouring { transform: translate(0, 0) rotate(var(--pour, -45deg)); transition: transform 0.28s var(--ease-out); }
.tool--pitcher.is-ready, .tool--kettle.is-ready, .tool--can.is-ready { animation: tool-hover 2.4s ease-in-out infinite; }
.tool.is-pouring { animation: none !important; }
@keyframes tool-hover { 50% { translate: 0 -4px; } }

/* Foam spoon and ice scoop: a quick flick per tap */
.tool--spoon.is-ready, .tool--scoop.is-ready { transform: translate(0, -10px) rotate(0); }
.tool.is-flick { animation: flick 0.5s var(--ease-out); }
@keyframes flick {
  0% { rotate: 0deg; }
  30% { rotate: -38deg; translate: -4px 6px; }
  65% { rotate: -10deg; }
  100% { rotate: 0deg; }
}
.tool--spoon.is-flick .spoon-foam, .tool--scoop.is-flick .scoop-cube { animation: reload 0.5s steps(1) both; }
@keyframes reload { 0% { opacity: 1; } 25% { opacity: 0; } 85% { opacity: 0; } 100% { opacity: 1; } }

.foam-drop {
  position: absolute;
  width: 32px;
  height: 20px;
  border-radius: 50%;
  z-index: 2;
  background: radial-gradient(circle at 35% 35%, #ffffff, #f2e9dc 70%);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.08);
}

.kettle-steam { position: absolute; left: 92px; top: 0; display: flex; gap: 4px; }
.kettle-steam i { width: 5px; height: 20px; border-radius: 4px; background: linear-gradient(to top, rgba(255, 255, 255, 0.5), transparent); filter: blur(2px); animation: steam 2.4s ease-in-out infinite; }
.kettle-steam i:nth-child(2) { animation-delay: -0.8s; }
.kettle-steam i:nth-child(3) { animation-delay: -1.6s; }

/* Pour stream: grows from the spout down to the surface, then falls away */
.pour {
  position: absolute;
  width: var(--w, 6px);
  margin-left: calc(var(--w, 6px) / -2);
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(var(--c-top, var(--c)), var(--c) 60%);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.35);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.24s ease-in;
  z-index: 2;
  pointer-events: none;
  animation: stream-wobble 0.18s ease-in-out infinite alternate;
}
.pour.is-on { transform: scaleY(1); transform-origin: top; transition: transform 0.18s ease-out; }
@keyframes stream-wobble { from { translate: -0.6px 0; } to { translate: 0.6px 0; } }
/* Espresso: two thin streams from the double spout */
.pour--double { background: none; box-shadow: none; }
.pour--double::before, .pour--double::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(#7a4520, var(--c) 40%);
}
.pour--double::before { left: 0; transform-origin: top; transform: skewX(0.9deg); }
.pour--double::after { right: 0; transform-origin: top; transform: skewX(-0.9deg); }

/* The glass */
.glass__shine {
  position: absolute;
  inset: 4px 8px 10px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 6px, transparent 14px),
    linear-gradient(270deg, rgba(255, 255, 255, 0.12) 0 3px, transparent 8px);
}
.glass__surface {
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  margin-bottom: -5px;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--c, #fff) 70%, #fff), var(--c, #fff) 70%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.glass__splash.is-pouring { animation: splash 0.42s var(--ease-out) infinite; }

.steam { position: absolute; left: 50%; top: -34px; width: 60px; margin-left: -30px; height: 30px; display: flex; justify-content: center; gap: 8px; opacity: 0; transition: opacity 0.8s ease; pointer-events: none; }
.steam i { width: 7px; height: 30px; border-radius: 6px; background: linear-gradient(to top, rgba(255, 245, 235, 0.55), transparent); filter: blur(3px); animation: steam 2.8s ease-in-out infinite; }
.steam i:nth-child(2) { animation-delay: -0.9s; height: 36px; }
.steam i:nth-child(3) { animation-delay: -1.8s; }
.glass.is-hot .steam { opacity: 1; }

/* ==========================================================================
   Sign your cup
   ========================================================================== */
.make-sign { flex: 1; display: flex; flex-direction: column; align-items: center; min-height: 0; }
.make-sign.is-entering { animation: fade-scale 0.55s var(--spring-soft) both; }
.make-sign__head { text-align: center; margin: 6px 0 10px; }
.make-sign__head h2 { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.make-sign__head p { font-size: 15px; color: rgba(255, 255, 255, 0.6); }

.cup-sign {
  position: relative;
  width: min(64vw, 262px);
  aspect-ratio: 220 / 290;
  flex: none;
  margin: 4px 0 14px;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.55));
  animation: cup-in 0.8s var(--spring-soft) both;
}
@keyframes cup-in { from { transform: translateY(40px) scale(0.9) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.cup-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cup-sign__canvas,
.marker-box {
  position: absolute;
  left: 13.6%;
  top: 13.8%;
  width: 72.8%;
  height: 85.5%;
}
.cup-sign__canvas {
  pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 87.5% 100%, 12.5% 100%);
}
.cup-sign { cursor: text; }
.marker {
  position: absolute;
  left: 13.6%;
  top: 13.8%;
  width: 24px;
  height: 72px;
  transform-origin: 12px 70px;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(4px 8px 8px rgba(0, 0, 0, 0.45));
  transition: opacity 0.25s ease;
}
.marker.is-writing { opacity: 1; }

.sign-input { width: 100%; display: block; border-radius: 16px; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.sign-input input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  text-align: center;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: "Caveat", var(--font);
  font-weight: 700;
  font-size: 30px;
}
.sign-input input::placeholder { font-family: var(--font); font-weight: 400; font-size: 17px; color: rgba(255, 255, 255, 0.4); }
.sign-input:focus-within { box-shadow: inset 0 0 0 2px var(--tint); }
.sign-hint { font-size: 13px; color: rgba(255, 255, 255, 0.45); margin: 10px 0 12px; }
.make-sign .btn { width: 100%; margin-top: auto; }

/* V60: coffee drips from the cone into the carafe */
.dripper::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 3px;
  height: 0;
  margin-left: -1.5px;
  border-radius: 2px;
  background: linear-gradient(#6b3a1a, rgba(107, 58, 26, 0));
  transition: height 0.3s ease;
}
.dripper { clip-path: none; overflow: visible; background: none; }
.dripper::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%);
  background: linear-gradient(90deg, #d9d9de, #ffffff 45%, #b5b5bb);
}
.dripper i { z-index: 1; }
.glass.is-dripping .dripper::after { height: 46px; }

/* Signed cup on the voucher pass */
.voucher__media { display: flex; align-items: center; justify-content: center; gap: 12px; }
.voucher__media .voucher__qr { margin-left: 0; margin-right: 0; }
.voucher__cup {
  width: 92px;
  height: 108px;
  border-radius: 14px;
  background: linear-gradient(90deg, #e2ddd5, #ffffff 35%, #f4f0ea 70%, #d9d3ca);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  animation: fade-scale 0.6s var(--spring-soft) 0.3s both;
}
.voucher__cup img { width: 100%; height: 100%; object-fit: contain; }

/* ==========================================================================
   Feedback survey
   ========================================================================== */
.feedback-cta {
  width: 100%;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  text-align: left;
  background: linear-gradient(135deg, color-mix(in srgb, var(--tint) 14%, var(--bg-elevated)), var(--bg-elevated));
  box-shadow: var(--shadow-card), inset 0 0 0 1px color-mix(in srgb, var(--tint) 18%, transparent);
}
.feedback-cta__icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--tint) 16%, transparent); }
.feedback-cta__text { flex: 1; display: flex; flex-direction: column; }
.feedback-cta__text strong { font-size: 16px; font-weight: 600; }
.feedback-cta__text span { font-size: 13px; color: var(--label-2); }

.fb-sub { margin-top: -8px; }
.fb-q { font-size: 15px; font-weight: 600; margin: 20px 2px 10px; }
.fb-optional { font-size: 12px; font-weight: 500; color: var(--label-3); margin-left: 4px; }
.fb-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.fb-scale button {
  height: 58px;
  border-radius: 16px;
  font-size: 30px;
  line-height: 1;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-card), inset 0 0 0 1px var(--separator);
  filter: grayscale(0.85) opacity(0.7);
  transition: filter 0.25s ease, box-shadow 0.25s ease, transform 0.45s var(--spring);
}
.fb-scale button[aria-checked="true"] {
  filter: none;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--tint) 30%, transparent), inset 0 0 0 2px var(--tint);
}
.fb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-chips .chip { font-size: 14px; padding: 9px 14px; }
.row--textarea { padding: 10px 16px; }
.row--textarea textarea {
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  color: var(--label);
}
.row--textarea textarea::placeholder { color: var(--label-3); }
.fb-submit { margin-top: 22px; }

/* ==========================================================================
   Privacy page
   ========================================================================== */
.doc { max-width: 640px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 24px) var(--gutter) 60px; }
.doc h1 { font-family: var(--font-display); font-size: 34px; letter-spacing: -0.025em; margin: 8px 0 18px; }
.doc h2 { font-size: 20px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--label-2); font-size: 16px; line-height: 1.55; }
.doc ul { padding-left: 20px; }
.doc .back { display: inline-flex; align-items: center; gap: 4px; font-size: 17px; }

/* ==========================================================================
   Reduced motion: keep fades, drop the travel
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .app.is-behind, .app.is-covered { transform: none; }
}

html.doc-page, html.doc-page body { height: auto; overflow: auto; }
