/* ============================================================
   Culture — Per-screen tweaks
   ============================================================ */

/* ---------- Login ---------- */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: max(var(--safe-top), var(--s-7)) var(--s-6) var(--s-7);
  background:
    radial-gradient(700px 380px at 50% -10%, rgba(232,225,212,0.05), transparent 60%),
    var(--bg);
}
.login .brand-mark {
  font-family: var(--font-display);
  font-size: var(--t-4xl);
  font-weight: 400;
  letter-spacing: 0.18em;
  margin-top: var(--s-7);
  text-transform: uppercase;
  line-height: 1;
}
.login .tagline {
  color: var(--text-muted);
  margin-top: var(--s-3);
  font-size: var(--t-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
}
.login form { margin-top: var(--s-8); }
.login .footnote { color: var(--text-dim); font-size: var(--t-xs); margin-top: var(--s-4); text-align: center; }

/* Magic-link "check your email" confirmation */
.login-sent {
  margin-top: var(--s-8);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: var(--s-3);
}
.login-sent .check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 32px; font-weight: 700;
  margin-bottom: var(--s-2);
}
.login-sent h3 { font-size: var(--t-xl); font-weight: 700; margin: 0; }
.login-sent p { color: var(--text-muted); margin: 0; line-height: 1.5; font-size: var(--t-sm); }
.login-sent .btn { margin-top: var(--s-4); max-width: 320px; }

/* Magic-link verifying state */
.login-loading {
  margin-top: var(--s-8);
  display: flex; flex-direction: column; align-items: center;
  gap: var(--s-4);
  color: var(--text-muted);
}
.login-loading .spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Home ---------- */
.home-hello { padding: var(--s-3) 0 var(--s-4); }
.home-hello .greeting {
  color: var(--text-muted);
  font-size: var(--t-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
}
.home-hello h1 {
  font-family: var(--font-display);
  font-size: var(--t-4xl);
  font-weight: 400;
  margin: 6px 0 0;
  letter-spacing: 0.01em;
  line-height: 0.95;
  text-transform: uppercase;
  /* Allow long full names (first + last) to wrap on narrow phones
     instead of overflowing horizontally off the iPhone viewport. */
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
  max-width: 100%;
}
@media (max-width: 380px) {
  .home-hello h1 { font-size: var(--t-3xl); }
}
.home-hello p { color: var(--text-muted); margin: 6px 0 0; font-size: var(--t-sm); }

.section { margin-top: var(--s-6); }
.section .cap {
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--border-soft);
  letter-spacing: 0.24em;
}

/* Membership card */
.member-card {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.member-card .tier {
  font-family: var(--font-display);
  font-size: var(--t-md);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 400;
  opacity: 0.9;
}
.member-card .name {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  font-weight: 400;
  margin-top: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}
.member-card .note { font-size: var(--t-xs); margin-top: 6px; opacity: 0.7; letter-spacing: 0.08em; text-transform: uppercase; }
.member-card .qr-mini {
  width: 36px; height: 36px; background: rgba(255,255,255,0.12); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}

/* Package list (Home > Your packages) ---- shows PT packs + extra memberships */
.pkg-list { display: grid; gap: var(--s-2); margin-top: var(--s-2); }
.pkg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-3);
}
.pkg-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); }
.pkg-name { font-size: var(--t-md); font-weight: 700; }
.pkg-venue {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 999px; color: var(--text-muted);
}
.pkg-note { color: var(--text-muted); font-size: var(--t-xs); margin-top: 4px; }
.pkg-credits { display: flex; align-items: baseline; gap: 6px; margin-top: var(--s-2); }
.pkg-credits-num { font-size: var(--t-lg); font-weight: 800; line-height: 1; }
.pkg-credits-total { font-size: var(--t-sm); font-weight: 600; color: var(--text-muted); }
.pkg-credits-label { color: var(--text-muted); font-size: var(--t-xs); }
.pkg-bar {
  height: 6px; background: rgba(255,255,255,0.06); border-radius: 999px;
  overflow: hidden; margin-top: 8px;
}
.pkg-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent, #C8423D), #E07A85);
  transition: width 240ms ease;
}

/* Stat grid (This week) */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin-top: var(--s-2); }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-3);
  text-align: left;
}
.stat .num { font-size: var(--t-xl); font-weight: 800; }
.stat .lbl { color: var(--text-muted); font-size: var(--t-xs); margin-top: 2px; line-height: 1.3; }

/* Next-up booking card */
.up-next { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--s-3); align-items: center; }
.up-next .thumb {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #353535, #1d1d1d);
}
.up-next .title { font-weight: 600; }
.up-next .meta  { color: var(--text-muted); font-size: var(--t-sm); margin-top: 2px; }
.up-next .check-in {
  background: var(--accent); color: #fff;
  padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: var(--t-sm); font-weight: 600;
}

/* Club status w/ progress */
.club .pct { font-size: var(--t-lg); font-weight: 700; }
.club .label { color: var(--text-muted); font-size: var(--t-sm); }
.club .row { margin-top: var(--s-2); }

/* ---------- Booking ---------- */
.book-header { padding: var(--s-2) 0 var(--s-4); }
.book-header .tabs { width: 100%; display: flex; }
.book-header .tabs button { flex: 1; }

.book-month { color: var(--text-muted); font-size: var(--t-sm); margin: var(--s-3) 0 var(--s-2); font-weight: 500; }

/* ---------- Book PT ---------- */
.pt-pkg {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-4);
  display: flex; justify-content: space-between; align-items: center;
}
.pt-pkg .bal { font-size: var(--t-2xl); font-weight: 800; }
.pt-pkg .lbl { color: var(--text-muted); font-size: var(--t-sm); }

/* ---------- Wallet ---------- */
/* Wallet card colour reflects member tier.
   - Default base = GOLD (top tier)
   - .silver  = polished silver/grey
   - .bronze  = warm copper/bronze (entry tier)
   - .maroon  = legacy red, kept as fallback */
.wallet-card {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 45%),
    linear-gradient(160deg, #C99A2E 0%, #A47217 55%, #6E4A0B 100%);
  border-radius: var(--radius-md);
  padding: var(--s-5);
  color: #1a0f00;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(164,114,23,0.45);
}
.wallet-card::after {
  content: "C"; position: absolute; right: -16px; top: -36px;
  font-size: 220px; font-weight: 800; line-height: 1; opacity: 0.12; letter-spacing: -0.05em;
  color: #3a2400;
}

/* SILVER tier */
.wallet-card.silver {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.35), transparent 45%),
    linear-gradient(160deg, #E6E8EC 0%, #B6BAC2 50%, #7F858E 100%);
  color: #1a1d22;
  box-shadow: 0 12px 32px rgba(127,133,142,0.45);
}
.wallet-card.silver::after { color: #2a2d33; }

/* BRONZE tier */
.wallet-card.bronze {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent 45%),
    linear-gradient(160deg, #C97A3A 0%, #8E4B1F 55%, #5A2E10 100%);
  color: #1a0a00;
  box-shadow: 0 12px 32px rgba(142,75,31,0.45);
}
.wallet-card.bronze::after { color: #3a1a00; }

/* Legacy maroon (fallback) */
.wallet-card.maroon {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), transparent 40%),
    var(--accent);
  color: #fff;
  box-shadow: 0 12px 32px var(--accent-glow);
}
.wallet-card.maroon::after { color: #fff; }
.wallet-card .lbl { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.78; font-weight: 700; }
.wallet-card .bal { font-size: var(--t-3xl); font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.wallet-card .bal small { font-size: var(--t-md); font-weight: 600; opacity: 0.78; margin-left: 4px; }
.wallet-card .meta { display: flex; justify-content: space-between; margin-top: var(--s-3); font-size: var(--t-xs); opacity: 0.85; font-weight: 600; }
.wallet-card .progress { background: rgba(0,0,0,0.18); margin-top: 8px; }
.wallet-card .progress > span { background: #1a0f00; }
.wallet-card.maroon .progress { background: rgba(255,255,255,0.18); }
.wallet-card.maroon .progress > span { background: #fff; }

/* Wallet card: layout for inline QR */
.wallet-card-row {
  display: flex; gap: var(--s-4); align-items: flex-start; justify-content: space-between;
  position: relative; z-index: 1;
}
.wallet-card-left { flex: 1 1 auto; min-width: 0; }
.wallet-id-inline {
  margin-top: var(--s-3);
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.14);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.wallet-id-inline .id-lbl {
  font-size: var(--t-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  opacity: 0.7;
}
.wallet-id-inline .id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; font-size: var(--t-sm); letter-spacing: 0.06em;
}
.wallet-card.maroon .wallet-id-inline { background: rgba(255,255,255,0.14); }
.wallet-card.silver .wallet-id-inline { background: rgba(0,0,0,0.10); }
.wallet-card.bronze .wallet-id-inline { background: rgba(0,0,0,0.18); }

.wallet-qr-inline {
  flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: #fff;
  border: 0;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.wallet-qr-inline:active { transform: scale(0.96); }
.wallet-qr-inline #wallet-qr-mini {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.wallet-qr-inline .qr-tap-hint {
  font-size: 9px; font-weight: 700;
  color: #555;
  text-transform: uppercase; letter-spacing: 0.06em;
  line-height: 1;
}

.tx, .earn-row { display: grid; grid-template-columns: 28px 1fr auto; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--border); align-items: center; }
.tx:last-child, .earn-row:last-child { border-bottom: none; }
.tx .dot, .earn-row .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 14px; }
.tx .ttl, .earn-row .ttl { font-size: var(--t-sm); font-weight: 500; }
.tx .when, .earn-row .when { color: var(--text-dim); font-size: var(--t-xs); margin-top: 2px; }
.tx .delta, .earn-row .delta { font-weight: 700; font-size: var(--t-sm); }
.tx .delta.pos, .earn-row .delta.pos { color: var(--success); }
.tx .delta.neg, .earn-row .delta.neg { color: var(--text-muted); }

/* ---- Streak card ---- */
.streak { padding: 16px 14px 14px; }

.streak-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.streak-flame {
  display: flex; align-items: center; gap: 12px;
}
.streak-icon {
  font-size: 32px; line-height: 1;
  filter: drop-shadow(0 0 12px rgba(232, 92, 100, 0.5));
  transition: opacity 200ms ease;
}
.streak-big {
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text);
}
.streak-big .streak-of {
  font-weight: 400; color: var(--text-dim); font-size: 14px;
}
.streak-sub {
  font-size: 12px; color: var(--text-dim); margin-top: 2px;
}
.streak-bonus-pill {
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 12px; padding: 6px 10px;
  border-radius: 999px; white-space: nowrap;
}

/* 12-attendance dot row */
.streak-dots {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 4px; margin: 4px 0 12px;
}
.streak-dot {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 0;
}
.streak-dot .dot {
  width: 100%; aspect-ratio: 1 / 1; max-width: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: transparent;
  border: 1.5px solid var(--border);
  color: transparent;
  transition: transform 150ms ease;
}
.streak-dot.hit .dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232, 92, 100, 0.35);
}
/* PT attendance gets a distinct purple tone to differentiate from classes. */
.streak-dot.hit.pt .dot {
  background: #8B5CF6;
  border-color: #8B5CF6;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}
.streak-dot.empty .dot {
  background: var(--surface-2, rgba(255,255,255,0.03));
  border-color: var(--border);
  border-style: dashed;
  opacity: 0.5;
}
.streak-dot.today .dot {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  animation: pulseStreak 1.6s ease-in-out infinite;
}
.streak-dot.today.hit .dot {
  background: linear-gradient(135deg, #FF7A4D, #E85C64);
  border-color: transparent;
  font-size: 13px;
}
.streak-dot.today.hit.pt .dot {
  background: linear-gradient(135deg, #A78BFA, #7C3AED);
  outline-color: #8B5CF6;
}
.streak-dot .dow {
  font-size: 9px; color: var(--text-dim); font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.streak-dot.today .dow { color: var(--accent); font-weight: 700; }
.streak-dot.empty .dow { opacity: 0.4; }

@keyframes pulseStreak {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

.streak-foot {
  font-size: 13px; color: var(--text-dim); text-align: center;
  padding-top: 4px; border-top: 1px solid var(--border); padding-top: 12px;
}
.streak-foot b { color: var(--text); font-weight: 700; }

.rewards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3); }
.reward {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-3);
}
.reward .img {
  height: 92px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2a2a2a, #161616);
  margin-bottom: var(--s-2);
}
.reward .name { font-weight: 600; font-size: var(--t-sm); }
.reward .pts  { color: var(--accent); font-weight: 700; font-size: var(--t-xs); margin-top: 2px; }

/* ---------- Challenges ---------- */
.featured-challenge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-4);
}
.featured-challenge h2 { margin: 0; font-size: var(--t-lg); font-weight: 800; letter-spacing: -0.01em; }
.featured-challenge .dates { color: var(--text-muted); font-size: var(--t-sm); margin-top: 2px; }
.featured-challenge .ring-row {
  display: grid; grid-template-columns: 120px 1fr; gap: var(--s-4);
  align-items: center; margin: var(--s-4) 0;
}
.featured-challenge .ring-stats { display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--t-sm); }
.featured-challenge .ring-stats .stat-line { display: flex; gap: var(--s-2); align-items: center; color: var(--text-muted); }
.featured-challenge .ring-stats .stat-line b { color: var(--text); margin-right: 4px; }

.challenge-row {
  display: grid; grid-template-columns: 36px 1fr auto; gap: var(--s-3);
  align-items: center;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border);
}
.challenge-row:last-child { border-bottom: none; }
.challenge-row .icn { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.challenge-row .ttl { font-weight: 600; font-size: var(--t-sm); }
.challenge-row .when { color: var(--text-muted); font-size: var(--t-xs); margin-top: 2px; }
.challenge-row .pct  { font-size: var(--t-sm); font-weight: 700; color: var(--accent); }
.challenge-row .pct.done { color: var(--success); }

/* ---------- Community / Chat ---------- */
/* Frozen layout: header + tabs fixed at top, composer fixed above bottom nav,
   only the message list scrolls in between. */
.chat-screen {
  position: fixed;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  z-index: 5;
}

.chat-screen .chat-fixed-top {
  flex: 0 0 auto;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-top: var(--safe-top, 0px);
}
.chat-screen .chat-tabs-wrap { padding-bottom: var(--s-3); }

.chat-screen .chat-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-top: var(--s-3);
  /* Leave room for composer (≈72px) + bottom nav + safe area + buffer
     so the last message is fully visible when scrolled to the end. */
  padding-bottom: calc(72px + var(--bottom-nav-h) + var(--safe-bottom) + 24px);
}
.chat-screen #chat-list { margin-top: 0; }
.chat-screen #chat-list .chat-msg:last-child { border-bottom: none; }

.chat-screen .composer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 30%);
  padding: var(--s-3) var(--s-5) var(--s-4);
  margin: 0;
  z-index: 40;
}
.chat-screen .composer .row { gap: var(--s-2); }
.chat-screen .composer input {
  flex: 1; min-height: 44px; padding: 0 var(--s-3);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-pill);
  font-size: var(--t-sm); outline: none;
}

/* Empty / error state */
.empty {
  text-align: center; padding: var(--s-7) var(--s-5);
  color: var(--text-muted);
}
.empty h3 { color: var(--text); font-size: var(--t-md); margin: 0 0 var(--s-2); }
.empty p { margin: 0; font-size: var(--t-sm); }
.empty .icon { font-size: 32px; margin-bottom: var(--s-3); opacity: 0.4; }

/* ---------- Magic Link Confirmation Card ---------- */
.confirm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6) var(--s-5);
  text-align: center;
  margin-top: var(--s-5);
}
.confirm-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 28px; line-height: 56px;
  margin: 0 auto var(--s-4);
}
.confirm-title {
  font-weight: 700; font-size: var(--t-lg);
  color: var(--text); margin-bottom: var(--s-2);
}
.confirm-body {
  color: var(--text-muted); font-size: var(--t-sm);
  line-height: 1.5; margin-bottom: var(--s-5);
}
.sent-to {
  color: var(--text); font-weight: 600;
  word-break: break-all;
}
.loader {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto var(--s-4);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Rewards screen
   ============================================================ */

/* Balance pill in header */
.balance-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 700;
  font-size: var(--t-sm);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-glow);
  font-variant-numeric: tabular-nums;
}
.balance-pill .dot { color: var(--accent); font-size: 11px; }

/* Segmented tabs (Featured / Catalog / My Redemptions) */
.seg-tabs {
  display: flex; gap: 4px;
  padding: 0 var(--s-5) var(--s-3);
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
  scrollbar-width: none;
}
.seg-tabs::-webkit-scrollbar { display: none; }
.seg-tabs .seg {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: var(--t-sm);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg-tabs .seg:hover { color: var(--text); }
.seg-tabs .seg[aria-selected="true"] {
  background: var(--surface-2);
  color: var(--text);
}

/* Empty state — extra classes used by rewards screen (don't clash with legacy `.empty h3/.icon`) */
.empty-icon  { font-size: 36px; margin-bottom: var(--s-3); opacity: 0.5; color: var(--text-muted); }
.empty-title { color: var(--text); font-size: var(--t-md); margin: 0 0 var(--s-2); font-weight: 700; }
.empty-sub   { margin: 0; font-size: var(--t-sm); color: var(--text-muted); }

/* ---------- Featured tab ---------- */
.featured-stack { display: flex; flex-direction: column; gap: var(--s-4); }

.featured-card {
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 180px;
  padding: var(--s-4);
  border-radius: var(--radius-lg);
  background-color: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s ease;
  box-shadow: var(--shadow-card);
}
.featured-card:active { transform: scale(0.99); }
.featured-card .featured-card-top {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.featured-card .featured-card-foot {
  display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-3);
}
.featured-card .ttl  { font-weight: 800; font-size: var(--t-lg); letter-spacing: -0.01em; margin-bottom: 4px; line-height: 1.15; }
.featured-card .sub  { font-size: var(--t-xs); opacity: 0.85; line-height: 1.4; max-width: 240px; }
.featured-card .cost { text-align: right; }
.featured-card .cost .num { font-size: var(--t-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.featured-card .cost .lbl { font-size: var(--t-xs); opacity: 0.85; margin-left: 3px; }
.featured-card .cost.locked .num { color: var(--text-dim); }

/* Chips on cards */
.chip {
  display: inline-block;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: var(--t-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chip-warn { background: rgba(229,168,72,0.85); color: #1a0f00; }

/* ---------- Catalog tab ---------- */
.cat-section { margin-bottom: var(--s-6); }
.cat-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--s-3);
}
.cat-title {
  font-weight: 700; font-size: var(--t-md);
  letter-spacing: -0.01em; color: var(--text);
}
.cat-count {
  font-size: var(--t-xs); color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  transition: transform 0.12s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}
.cat-card:hover { border-color: var(--border); }
.cat-card:active { transform: scale(0.98); }
.cat-card:disabled { opacity: 0.6; cursor: not-allowed; }

.cat-img {
  aspect-ratio: 4 / 3;
  background-color: var(--surface-3);
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.cat-img-fallback { font-size: 36px; opacity: 0.6; }
.cat-img-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.6); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: var(--t-sm);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.cat-img-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(229,168,72,0.95); color: #1a0f00;
  font-size: var(--t-xs); font-weight: 700;
  padding: 3px 8px; border-radius: var(--radius-pill);
}

.cat-meta { padding: var(--s-3); display: flex; flex-direction: column; gap: 4px; }
.cat-name { font-size: var(--t-sm); font-weight: 600; color: var(--text); line-height: 1.25; }
.cat-cost {
  font-size: var(--t-xs);
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cat-cost .num { font-size: var(--t-sm); }
.cat-cost .lbl { color: var(--text-muted); font-weight: 500; margin-left: 3px; }
.cat-card.locked .cat-cost { color: var(--text-dim); }
.cat-card.locked .cat-cost .num { color: var(--text-dim); }

/* ---------- My Redemptions tab ---------- */
.history-list { display: flex; flex-direction: column; gap: var(--s-3); }

.redemption-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.redemption-card.status-pending  { border-color: var(--accent-glow); }
.redemption-card.status-fulfilled { opacity: 0.9; }
.redemption-card.status-expired,
.redemption-card.status-cancelled { opacity: 0.6; }

.rc-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.rc-title { font-weight: 700; color: var(--text); font-size: var(--t-base); line-height: 1.2; }

.rc-pill {
  font-size: var(--t-xs); font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-pill);
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
}
.pill-pending   { background: var(--accent-soft);  color: var(--accent); }
.pill-fulfilled { background: rgba(79,190,121,0.15); color: var(--success); }
.pill-expired,
.pill-cancelled { background: var(--surface-3); color: var(--text-dim); }

.rc-bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.rc-meta { display: flex; gap: 6px; color: var(--text-muted); font-size: var(--t-xs); }
.rc-code {
  display: flex; flex-direction: column; align-items: flex-end;
  cursor: pointer;
  user-select: all;
}
.rc-code-label { font-size: var(--t-xs); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.rc-code-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; font-size: var(--t-md); letter-spacing: 0.08em;
  color: var(--accent);
}
.rc-foot { font-size: var(--t-xs); color: var(--text-dim); margin-top: 4px; }

/* ---------- Bottom-sheet system (used for detail + success) ---------- */
.bs {
  position: fixed; inset: 0;
  z-index: 80;
  display: flex; align-items: flex-end;
}
.bs.hidden { display: none; }
.bs-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.72);
  animation: bs-fade 0.15s ease;
}
.bs-card {
  position: relative;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: bs-slide 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 -20px 40px rgba(0,0,0,0.5);
}
.bs-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 6px;
}
@keyframes bs-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes bs-slide { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Reward detail sheet */
.rd-hero {
  aspect-ratio: 16 / 10;
  background-color: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
}
.rd-hero-emoji { font-size: 72px; opacity: 0.85; }

.rd-pad { padding: var(--s-5); }
.rd-cat {
  font-size: var(--t-xs); color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700;
  margin-bottom: var(--s-2);
}
.rd-title { font-size: var(--t-xl); font-weight: 800; color: var(--text); letter-spacing: -0.01em; margin-bottom: var(--s-2); line-height: 1.15; }
.rd-desc  { font-size: var(--t-sm); color: var(--text-muted); line-height: 1.55; margin-bottom: var(--s-5); }

.rd-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.rd-stat {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: var(--s-3);
}
.rd-stat .lbl { font-size: var(--t-xs); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.rd-stat .val { font-size: var(--t-md); font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

.rd-warn {
  background: rgba(229,168,72,0.12);
  border: 1px solid rgba(229,168,72,0.35);
  color: var(--warning);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: var(--t-sm);
  font-weight: 600;
  margin-bottom: var(--s-4);
  text-align: center;
}

/* Redemption success sheet */
.rs-pad { padding: var(--s-6) var(--s-5); text-align: center; }
.rs-check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(79,190,121,0.15);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
  margin: 0 auto var(--s-4);
}
.rs-title { font-size: var(--t-xl); font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.rs-sub   { font-size: var(--t-sm); color: var(--text-muted); margin-top: 4px; margin-bottom: var(--s-5); }

.rs-code-card {
  background: var(--surface-2);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-md);
  padding: var(--s-5) var(--s-4);
  margin-bottom: var(--s-4);
}
.rs-code-lbl {
  font-size: var(--t-xs);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s-2);
}
.rs-code-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 36px; font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--text);
  margin-bottom: var(--s-4);
  user-select: all;
}

.rs-meta {
  display: flex; gap: 6px;
  justify-content: center;
  font-size: var(--t-xs);
  color: var(--text-muted);
  margin-bottom: var(--s-5);
}

/* ============================================================
   Staff Fulfillment Panel  (Deliverable #7)
   ============================================================ */
.admin-bar { background: var(--surface); border-bottom: 1px solid var(--border); }

.admin-who {
  font-size: var(--t-sm); color: var(--text-muted);
  margin-bottom: var(--s-3);
}
.admin-who b { color: var(--text); font-weight: 600; }

.admin-card { padding: var(--s-4); }

.admin-code-row {
  display: flex; gap: 8px; align-items: stretch;
}
.admin-code-input {
  flex: 1 1 auto; min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 26px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; text-align: center;
  padding: 14px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface-elev);
  color: var(--text);
  outline: none;
  transition: border-color 0.12s ease;
}
.admin-code-input:focus { border-color: var(--accent); }
.admin-code-row .btn { white-space: nowrap; padding-left: 18px; padding-right: 18px; }

#admin-lookup-result { margin-top: 14px; }
.admin-error {
  display: flex; gap: 12px; align-items: center;
  border: 1px solid #5a2a2a;
  background: rgba(224, 122, 133, 0.08);
}
.admin-error-icon { font-size: 22px; color: #E07A85; }
.admin-error-msg { color: #E07A85; font-weight: 600; font-size: var(--t-sm); }

.admin-lookup {
  position: relative;
}
.admin-code-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 28px; font-weight: 800;
  letter-spacing: 0.18em; text-align: center;
  padding: 8px 0;
  color: var(--text);
}
.admin-status { text-align: center; margin-bottom: 14px; }
.admin-status-pill {
  display: inline-block;
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}
.admin-status-pill.pending   { background: rgba(220, 170, 60, 0.15); color: #E2B652; border: 1px solid rgba(220, 170, 60, 0.35); }
.admin-status-pill.fulfilled { background: rgba(56, 178, 122, 0.15); color: #54D29A; border: 1px solid rgba(56, 178, 122, 0.35); }
.admin-status-pill.cancelled { background: rgba(224, 122, 133, 0.15); color: #E07A85; border: 1px solid rgba(224, 122, 133, 0.35); }
.admin-status-pill.expired   { background: rgba(170, 170, 170, 0.15); color: #AAA;     border: 1px solid rgba(170, 170, 170, 0.35); }

.admin-reward-row {
  display: flex; gap: 12px; align-items: center;
  margin: 6px 0 4px;
}
.admin-reward-img {
  width: 56px; height: 56px;
  border-radius: 12px;
  background-color: var(--surface-elev);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex: 0 0 auto;
}
.admin-reward-img.placeholder { background: linear-gradient(135deg, #2a2a2e, #1a1a1e); }
.admin-reward-meta { flex: 1 1 auto; min-width: 0; }
.admin-reward-title { font-size: var(--t-md); font-weight: 700; }

.admin-divider {
  height: 1px; background: var(--border);
  margin: 12px 0;
}

.admin-meta-line {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: var(--t-sm);
  padding: 4px 0;
  gap: 12px;
}
.admin-meta-line .lbl {
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  flex: 0 0 80px;
}
.admin-meta-line span:last-child { text-align: right; }

.admin-actions { margin-top: 16px; }
.admin-already {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(56, 178, 122, 0.10);
  color: #54D29A;
  text-align: center;
  font-weight: 600;
  font-size: var(--t-sm);
}
.admin-already.cancelled { background: rgba(224, 122, 133, 0.10); color: #E07A85; }
.admin-already.expired   { background: rgba(170, 170, 170, 0.10); color: #AAA; }

/* Pending queue */
.admin-pending-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s ease;
}
.admin-pending-row:last-child { border-bottom: none; }
.admin-pending-row:active { background: rgba(255,255,255,0.04); }
.admin-pending-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 800; font-size: 15px;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface-elev);
  color: var(--text);
}
.admin-pending-meta { min-width: 0; }
.admin-pending-meta .ttl { font-size: var(--t-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-pending-meta .when { font-size: var(--t-xs); color: var(--text-muted); margin-top: 2px; }
.admin-pending-pts {
  font-size: var(--t-sm); font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

/* Segmented tab badge (count) */
.seg-badge {
  display: inline-block;
  margin-left: 6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  padding: 0 5px;
  vertical-align: middle;
}

/* Danger button (used for Cancel & Refund) */
.btn-danger {
  background: rgba(224, 122, 133, 0.12);
  color: #E07A85;
  border: 1px solid rgba(224, 122, 133, 0.35);
}
.btn-danger:hover { background: rgba(224, 122, 133, 0.18); }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

/* -----------------------------------------------------------------
 * Admin Dashboard tab — KPI cards, tier bars, mini rows
 * ----------------------------------------------------------------- */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.dash-kpi {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 12px;
  min-height: 90px;
}
.dash-kpi-accent {
  background: rgba(255, 196, 0, 0.10);
  border-color: rgba(255, 196, 0, 0.35);
}
.dash-kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.6;
  margin-bottom: 6px;
}
.dash-kpi-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.dash-kpi-sub {
  font-size: 11px;
  opacity: 0.55;
  margin-top: 6px;
}

.dash-tier-row {
  display: grid;
  grid-template-columns: 70px 1fr 110px;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.dash-tier-name {
  font-size: 13px;
  font-weight: 600;
}
.dash-tier-bar-wrap {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.dash-tier-bar {
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #ffd75e);
  border-radius: 999px;
}
.dash-tier-count {
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dash-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}
.dash-mini-row:last-child { border-bottom: 0; }
.dash-mini-label { opacity: 0.75; }
.dash-mini-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Launch bonus celebration overlay (Industrial Strength)
   Shown ONCE when launch.claim_bonus succeeds on home load.
   ============================================================ */
.launch-bonus-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-6);
  opacity: 0;
  transition: opacity 240ms var(--ease);
}
.launch-bonus-overlay.open { opacity: 1; }
.launch-bonus-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--s-7) var(--s-5) var(--s-5);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  transform: scale(0.96);
  transition: transform 280ms var(--ease);
  position: relative;
  overflow: hidden;
}
.launch-bonus-overlay.open .launch-bonus-card { transform: scale(1); }
.launch-bonus-card::before {
  /* Big stencil C watermark */
  content: "C";
  position: absolute;
  right: -30px; top: -50px;
  font-family: var(--font-display);
  font-size: 280px;
  font-weight: 800;
  color: rgba(232,225,212,0.04);
  letter-spacing: -0.05em;
  pointer-events: none;
  line-height: 1;
}
.launch-bonus-sub {
  font-size: var(--t-xs);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
}
.launch-bonus-sub.is-founding {
  color: var(--blood);
  font-weight: 800;
}
.launch-bonus-num {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  margin-top: var(--s-3);
  color: var(--accent);
}
.launch-bonus-pts {
  font-family: var(--font-display);
  font-size: var(--t-lg);
  letter-spacing: 0.2em;
  margin-top: var(--s-1);
  color: var(--text);
}
.launch-bonus-hr {
  height: 1px;
  background: var(--border-soft);
  margin: var(--s-5) auto var(--s-4);
  max-width: 80%;
}
.launch-bonus-msg {
  font-size: var(--t-sm);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--s-5);
}
.launch-bonus-ok { margin-top: var(--s-3); }

/* ============================================================
   Legal screen — Privacy / Terms
   Industrial Strength: bone text on charcoal, hairline rules,
   condensed caps for headings/tabs.
   ============================================================ */
.legal-screen {
  max-width: 720px;
  margin: 0 auto;
  padding-top: var(--s-4);
  padding-bottom: var(--s-8);
  color: var(--text);
}
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: var(--s-5);
}
.legal-back {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--t-sm);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: var(--s-2) var(--s-3);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.legal-back:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.legal-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-soft);
}
.legal-tab {
  font-family: var(--font-display);
  font-size: var(--t-sm);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: var(--s-2) var(--s-4);
  text-decoration: none;
  color: var(--text-muted);
  border-right: 1px solid var(--border-soft);
  transition: background 0.15s ease, color 0.15s ease;
}
.legal-tab:last-child { border-right: none; }
.legal-tab:hover { color: var(--text); }
.legal-tab.active {
  background: var(--accent);
  color: var(--bg);
}
.legal-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 var(--s-2);
  line-height: 1;
}
.legal-effective {
  color: var(--text-muted);
  font-size: var(--t-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 var(--s-5);
}
.legal-body {
  font-size: var(--t-sm);
  line-height: 1.65;
  color: var(--text);
}
.legal-body h2 {
  font-family: var(--font-display);
  font-size: var(--t-md);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: var(--s-6) 0 var(--s-3);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border-soft);
  color: var(--accent);
}
.legal-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.legal-body p { margin: 0 0 var(--s-3); }
.legal-body ul {
  margin: 0 0 var(--s-3);
  padding-left: var(--s-4);
}
.legal-body li { margin-bottom: var(--s-2); }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body a, .legal-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-body a:hover { color: var(--text); }
.legal-footer {
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border-soft);
  text-align: center;
}
.legal-entity {
  font-size: var(--t-xs);
  letter-spacing: 0.05em;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 480px) {
  .legal-screen { padding-left: var(--s-3); padding-right: var(--s-3); }
  .legal-title { font-size: 32px; }
  .legal-header { flex-direction: column; align-items: stretch; }
  .legal-tabs { justify-content: center; }
  .legal-back { text-align: center; }
}

/* ============================================================
   Beta gate — pre-launch invite-code screen.
   Same Industrial Strength palette as the login screen.
   ============================================================ */
.beta-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-6) var(--s-4);
  background: var(--bg);
  color: var(--text);
}
.beta-gate-inner {
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.beta-gate .brand-mark {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 0.18em;
  margin-bottom: var(--s-2);
  color: var(--text);
}
.beta-stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 10px;
  margin-bottom: var(--s-5);
}
.beta-title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 var(--s-4);
  color: var(--text);
}
.beta-sub {
  color: var(--text-muted);
  font-size: var(--t-sm);
  line-height: 1.55;
  margin: 0 0 var(--s-6);
}
.beta-gate .field { text-align: left; }
.beta-gate input[name="code"] {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: var(--font-display);
  font-size: 18px;
}
.beta-error {
  background: rgba(122, 31, 43, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: var(--t-sm);
  padding: var(--s-2) var(--s-3);
  margin-bottom: var(--s-3);
  text-align: left;
  line-height: 1.4;
}
.beta-footnote {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: var(--t-xs);
  line-height: 1.6;
}
.beta-footnote strong { color: var(--text); }

@media (max-width: 380px) {
  .beta-title { font-size: 36px; }
  .beta-gate .brand-mark { font-size: 30px; }
}

/* Floating "BETA · SEND FEEDBACK" badge, shown only to unlocked testers
   before public launch. Positioned bottom-right; respects bottom nav. */
#beta-feedback-badge {
  position: fixed;
  right: 12px;
  bottom: 76px; /* above bottom-nav (60px) */
  z-index: 9000;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
  transition: background 0.15s ease, color 0.15s ease;
}
#beta-feedback-badge:hover {
  background: var(--bg);
  color: var(--accent);
}
@media (max-width: 480px) {
  #beta-feedback-badge { font-size: 10px; padding: 7px 10px; right: 8px; bottom: 70px; }
}
