/* The Interval Club — member PWA
   Studio-console dark UI. Geologica (display/numbers) + Karla (body).
   Mobile-first at a 402px design width; scales to desktop. */

:root {
  /* palette (canonical) */
  --blue: #6868ED;
  --gold: #D4A843;
  --green: #3FB960;
  --amber: #E08A3C;
  --red: #F03222;
  /* Same red, as channels, so the alpha variants below follow the brand flag
     instead of freezing the default accent into a literal. Every
     rgba(var(--red-rgb), a) computes byte-identical to the rgba() it replaced. */
  --red-rgb: 240, 50, 34;
  --black: #000000;
  --bg: #08080F;
  --card: #0A0A12;
  --fg: #EEEEEE;
  --muted: #9A9AA8;
  --faint: #6A6A78;

  --blue-soft: rgba(104, 104, 237, 0.15);
  --blue-line: rgba(104, 104, 237, 0.42);
  --gold-soft: rgba(212, 168, 67, 0.14);
  --gold-line: rgba(212, 168, 67, 0.45);
  --green-soft: rgba(63, 185, 96, 0.15);
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-2: rgba(255, 255, 255, 0.05);

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --tab-h: 68px;
  --shell-w: 460px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);

  --font-display: 'Geologica', -apple-system, system-ui, sans-serif;
  --font-body: 'Karla', -apple-system, system-ui, sans-serif;
}

/* ---------- runtime brand flag: The Hit Club ----------
   brand.js sets data-brand="hit" before first paint. Nothing here applies to
   the default brand, which stays exactly as it ships. */
html[data-brand="hit"] {
  --red: #FF3B2F;
  --red-rgb: 255, 59, 47;
}
/* The Interval mark is a 44x26 waveform; the H is square, so its boxes are too.
   The two marks that are not already square get resized under the flag. */
html[data-brand="hit"] .su-mark,
html[data-brand="hit"] .v-mark { width: 34px; height: 34px; }

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

html, body {
  height: 100%;
  background: var(--black);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { overflow-x: hidden; }

h1, h2, h3, .num, .display { font-family: var(--font-display); }
button, input, select, textarea { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- app shell ---------- */
#app {
  position: relative;
  width: 100%;
  max-width: var(--shell-w);
  min-height: 100dvh;
  margin: 0 auto;
  background:
    radial-gradient(ellipse 120% 60% at 20% -5%, rgba(104, 104, 237, 0.16), transparent 60%),
    radial-gradient(ellipse 90% 40% at 90% 6%, rgba(212, 168, 67, 0.06), transparent 55%),
    var(--bg);
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  padding: calc(var(--safe-top) + 14px) 18px calc(var(--tab-h) + var(--safe-bot) + 28px);
  animation: fade 0.28s ease;
}
.screen.no-tabs { padding-bottom: calc(var(--safe-bot) + 28px); }
.screen.centered {
  justify-content: center;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .mark { width: 26px; height: 26px; }
.brand .name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.2px; }
.brand .name em { color: var(--blue); font-style: normal; }
.topbar .date { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }

.tier-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase;
  border: 1px solid var(--hairline);
}
.tier-badge.trc { color: var(--gold); background: var(--gold-soft); border-color: var(--gold-line); }
.tier-badge.paid { color: #aeaef7; background: var(--blue-soft); border-color: var(--blue-line); }
.tier-badge.free { color: var(--muted); }

/* ---------- generic surfaces ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 18px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--faint);
  margin: 26px 2px 12px;
}
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.gold { color: var(--gold); }
.blue { color: var(--blue); }
.green { color: var(--green); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%;
  padding: 16px 20px;
  border: none; border-radius: var(--r-md);
  background: var(--blue); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  cursor: pointer; transition: filter 0.15s, transform 0.08s;
}
.btn:active { transform: scale(0.98); }
.btn:hover { filter: brightness(1.1); }
.btn.big { padding: 20px; font-size: 1.15rem; border-radius: var(--r-lg); }
/* long labels break evenly instead of orphaning one word on line 2 */
.btn { text-wrap: balance; line-height: 1.25; }
/* deliberate two-line button: headline + quiet detail, never a ragged wrap */
.btn.stack { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 15px 18px; }
.btn.stack b { font-size: 1.12rem; font-weight: 700; letter-spacing: 0.2px; }
.btn.stack small { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.6px; opacity: 0.82; text-transform: uppercase; }
.btn.ghost.danger { border-color: rgba(var(--red-rgb), 0.45); color: #FF7A66; }
.btn.ghost.danger:hover { background: rgba(var(--red-rgb), 0.08); }
.btn.gold { background: var(--gold); color: #17130a; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--hairline); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.04); filter: none; }
.btn.soft { background: var(--blue-soft); color: #aeaef7; border: 1px solid var(--blue-line); }
.btn.soft:hover { filter: none; background: rgba(104, 104, 237, 0.22); }
.btn:disabled { opacity: 0.5; cursor: default; filter: none; transform: none; }
.btn.glow { box-shadow: 0 0 0 1px rgba(104, 104, 237, 0.4), 0 12px 40px -12px rgba(104, 104, 237, 0.7); }

.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.link-btn { background: none; border: none; color: var(--blue); cursor: pointer; font-weight: 600; font-size: 0.92rem; }

/* ---------- chips & pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  background: var(--blue-soft); border: 1px solid var(--blue-line); color: #aeaef7;
}
.chip.gold { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.chip.green { background: var(--green-soft); border-color: rgba(63, 185, 96, 0.4); color: var(--green); }
.chip.muted { background: transparent; border-color: var(--hairline); color: var(--muted); }
.chip.live { background: rgba(104, 104, 237, 0.2); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.live .dot { background: var(--blue); animation: pulse-dot 1.4s ease-in-out infinite; box-shadow: 0 0 8px var(--blue); }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }

.scheme-badge {
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem;
  padding: 4px 9px; border-radius: 7px; letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--hairline); color: var(--fg);
}

/* ---------- waveform motif ---------- */
.waveform { display: flex; align-items: center; gap: 3px; height: 34px; }
.waveform .bar {
  flex: 1; min-width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(104, 104, 237, 0.9), rgba(104, 104, 237, 0.35));
}
.waveform.dim .bar { background: rgba(255, 255, 255, 0.14); }

/* progress waveform bar (fills as complete) */
.wave-progress { position: relative; display: flex; align-items: center; gap: 3px; height: 40px; }
.wave-progress .bar { flex: 1; min-width: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); transition: background 0.3s; }
.wave-progress .bar.on { background: linear-gradient(180deg, var(--blue), rgba(104, 104, 237, 0.4)); }

/* ---------- HERO (today) ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--hairline);
  background: var(--card);
  min-height: 340px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero .thumb {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.82;
}
.hero .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 15, 0.15) 0%, rgba(8, 8, 15, 0.55) 45%, rgba(8, 8, 15, 0.96) 100%);
}
.hero .hero-body { position: relative; padding: 22px; }
.hero .kicker { font-size: 0.82rem; letter-spacing: 1.4px; text-transform: uppercase; color: var(--blue); font-weight: 700; }
.hero h1 { font-size: 1.9rem; font-weight: 700; line-height: 1.08; margin: 6px 0 12px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 18px; }
.hero .meta .m { font-size: 0.9rem; color: var(--fg); display: inline-flex; align-items: center; gap: 6px; }
.hero .meta .m .lbl { color: var(--muted); }
.hero.locked .thumb { filter: grayscale(0.5) brightness(0.6); }

.hero .lock-note {
  display: flex; align-items: center; gap: 8px;
  color: var(--gold); font-size: 0.85rem; font-weight: 600; margin-bottom: 14px;
}

/* week beats */
.week-beats { display: flex; gap: 10px; }
.beat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.beat .dot {
  width: 100%; height: 44px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hairline);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.beat .dot .fill { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s; }
.beat.done .dot { border-color: var(--blue-line); }
.beat.done .dot .fill { opacity: 1; background: linear-gradient(180deg, rgba(104, 104, 237, 0.35), rgba(104, 104, 237, 0.1)); }
.beat.done .dot::after { content: '✓'; position: relative; color: #aeaef7; font-weight: 700; }
.beat.today .dot { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), 0 0 18px -4px var(--blue); }
.beat.today .dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); animation: pulse-dot 1.6s infinite; }
.beat.missed .dot::after { content: ''; width: 22px; height: 2px; background: var(--faint); }
.beat.off .dot { opacity: 0.4; }
.beat.off .dot::after { content: '—'; color: var(--faint); }
.beat .lbl { font-size: 0.72rem; color: var(--muted); font-family: var(--font-display); font-weight: 600; }
.beat.today .lbl { color: var(--blue); }

/* live countdown chip row */
.live-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 16px;
}
.live-row .info { display: flex; flex-direction: column; gap: 2px; }
.live-row .info .top { font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.live-row .info .cd { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.live-row .info .cd.live { color: var(--blue); }
.here-now { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.here-now b { color: var(--green); font-family: var(--font-display); }

/* streak chip */
.streak-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px; border-radius: 999px;
  background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold);
  font-family: var(--font-display); font-weight: 700;
}
.streak-chip .flame { font-size: 1.1rem; }

/* ---------- locked days row (free) ---------- */
.locked-days { display: flex; flex-direction: column; gap: 8px; }
.locked-day {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--hairline);
}
.locked-day .lock { color: var(--gold); font-size: 1rem; }
.locked-day .d { font-family: var(--font-display); font-weight: 700; width: 44px; color: var(--muted); }
.locked-day .t { flex: 1; color: var(--muted); font-size: 0.92rem; }

/* ---------- catalog / archive ---------- */
.day-list { display: flex; flex-direction: column; gap: 10px; }
.day-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; border-radius: var(--r-md);
  background: var(--card); border: 1px solid var(--hairline);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.day-card:hover { border-color: var(--blue-line); }
.day-card .thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #000; }
.day-card .info { flex: 1; min-width: 0; }
.day-card .info .dow { font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); }
.day-card .info .title { font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-card .info .sub { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.day-card .badge {
  font-family: var(--font-display); font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; flex-shrink: 0;
}
.day-card .badge.done { color: var(--green); background: var(--green-soft); }
.day-card .badge.replay { color: #aeaef7; background: var(--blue-soft); }

/* ---------- builder ---------- */
.filter-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-pill {
  white-space: nowrap; padding: 7px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hairline); color: var(--muted); cursor: pointer;
}
.filter-pill.on { background: var(--blue-soft); border-color: var(--blue-line); color: #aeaef7; }

.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-tile {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--hairline); background: var(--card); cursor: pointer;
  aspect-ratio: 4 / 3;
}
.ex-tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.ex-tile .cap { position: absolute; inset: auto 0 0 0; padding: 8px 10px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.92)); }
.ex-tile .cap .n { font-size: 0.85rem; font-weight: 600; }
.ex-tile .cap .m { font-size: 0.72rem; color: var(--muted); }
.ex-tile .add { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1rem; }
.ex-tile.added { border-color: var(--blue); }
.ex-tile.added .add { background: var(--green); }

.lineup { display: flex; flex-direction: column; gap: 8px; }
.lineup-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--card); border: 1px solid var(--hairline);
}
.lineup-item .pos { font-family: var(--font-display); font-weight: 700; color: var(--faint); width: 22px; }
.lineup-item .n { flex: 1; font-size: 0.92rem; }
.lineup-item .m { font-size: 0.78rem; color: var(--muted); }
.lineup-item .ctrls { display: flex; gap: 4px; }
.lineup-item .ctrls button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--hairline); background: none; color: var(--muted); cursor: pointer; }
.lineup-item .ctrls button:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.lineup-item .ctrls .rm:hover { color: var(--red); }

.builder-summary { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.builder-summary .total { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; }
.builder-summary .total small { font-size: 0.85rem; color: var(--muted); font-weight: 400; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; padding: 14px 15px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hairline); color: var(--fg);
  font-size: 1rem;
}
.input:focus { outline: none; border-color: var(--blue); background: rgba(104, 104, 237, 0.06); }
.input::placeholder { color: var(--faint); }

/* toggle switch */
.switch { position: relative; display: inline-block; width: 46px; height: 27px; flex-shrink: 0; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.12); transition: background 0.2s; cursor: pointer; }
.switch .track::before { content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::before { transform: translateX(19px); }

/* ---------- auth flow ---------- */
.code-boxes { display: flex; gap: 10px; justify-content: center; margin: 8px 0 20px; }
.code-boxes input {
  width: 48px; height: 60px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--hairline); border-radius: 12px; color: var(--fg);
}
.code-boxes input:focus { outline: none; border-color: var(--blue); background: rgba(104, 104, 237, 0.08); }

.notif-opt .ic { font-size: 1.5rem; width: 30px; text-align: center; }
.notif-opt .body { flex: 1; }
.notif-opt .body .t { font-weight: 600; }
.notif-opt .body .s { font-size: 0.82rem; color: var(--muted); }

/* ---------- pill tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--safe-bot) + 12px);
  width: min(calc(var(--shell-w) - 28px), calc(100% - 28px));
  height: var(--tab-h);
  display: flex; align-items: stretch;
  background: rgba(10, 10, 18, 0.82);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--hairline); border-radius: 999px;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.9);
  z-index: 40; padding: 6px;
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--faint); border-radius: 999px; transition: color 0.15s, background 0.15s;
}
.tabbar a .ic { width: 21px; height: 21px; }
.tabbar a .lbl { font-family: var(--font-display); font-size: 0.56rem; font-weight: 600; letter-spacing: 0.4px; }
.tabbar a.on { color: var(--blue); background: var(--blue-soft); }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { font-size: 2.4rem; margin-bottom: 12px; opacity: 0.6; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12); border-top-color: var(--blue);
  animation: spin 0.8s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-bot) + 24px); transform: translateX(-50%) translateY(20px);
  background: var(--card); border: 1px solid var(--hairline); color: var(--fg);
  /* above every sheet (z 300): a toast fired from inside a sheet is the only
     feedback the member gets, and at z-100 it was painted behind the backdrop. */
  padding: 12px 20px; border-radius: 999px; font-size: 0.9rem; z-index: 360;
  opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8); max-width: calc(100% - 40px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(var(--red-rgb), 0.5); color: #ff8f80; }
/* A sheet owns the bottom of the screen, so a bottom-anchored toast lands on
   top of the sheet's primary button. With a sheet up, the toast drops from the
   top instead and covers nothing. */
body.sheet-open .toast { bottom: auto; top: calc(var(--safe-top) + 14px); transform: translateX(-50%) translateY(-20px); }
body.sheet-open .toast.show { transform: translateX(-50%) translateY(0); }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.25s; display: flex; align-items: flex-end; justify-content: center;
}
.sheet-backdrop.show { opacity: 1; }
.sheet {
  width: 100%; max-width: var(--shell-w);
  background: rgba(12, 12, 20, 0.96); backdrop-filter: blur(24px);
  border: 1px solid var(--hairline); border-bottom: none;
  border-radius: 22px 22px 0 0; padding: 20px 18px calc(var(--safe-bot) + 24px);
  transform: translateY(100%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 80dvh; overflow-y: auto;
}
.sheet-backdrop.show .sheet { transform: translateY(0); }
.sheet .grab { width: 40px; height: 4px; border-radius: 999px; background: var(--faint); margin: 0 auto 16px; }
.sheet h3 { font-size: 1.2rem; margin-bottom: 14px; }

/* desktop niceties */
@media (min-width: 720px) {
  #app { box-shadow: 0 0 120px -30px rgba(104, 104, 237, 0.25); }
  body { display: flex; align-items: stretch; min-height: 100dvh; }
}

/* ============================================================
   V2 COMMUNITY — additions
   ============================================================ */

/* full-bleed screen (gate) */
.screen.bleed { padding: 0; flex: 1; display: flex; }

/* per-user avatar (initial circle) */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid;
  font-family: var(--font-display); font-weight: 700; flex-shrink: 0;
}
/* stacked avatar dots */
.dot-cluster { display: inline-flex; align-items: center; }
.dot-cluster .dot-av {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bg);
  margin-left: -7px; position: relative;
}
.dot-cluster .dot-av:first-child { margin-left: 0; }
/* anonymous filler dots — neutral, no implied identity, paired with real counts */
.dot-cluster .dot-av.anon {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.10);
}

/* ---------- GATE (screen 27) ---------- */
.gate { position: relative; width: 100%; min-height: 100dvh; display: flex; align-items: flex-end; overflow: hidden; }
.gate-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gate-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.1) 30%, rgba(8,8,15,0.7) 68%, rgba(8,8,15,0.98) 100%);
}
.gate-panel {
  position: relative; z-index: 2; width: 100%;
  padding: 0 22px calc(var(--safe-bot) + 30px);
}
.gate-mark { display: block; width: 42px; height: 42px; margin-bottom: 14px; }
.gate-head { font-family: var(--font-display); font-weight: 800; font-size: 2.15rem; line-height: 1.08; letter-spacing: -0.5px; }
.gate-head .alt { color: var(--blue); }
.gate-proof { display: flex; align-items: center; gap: 10px; margin: 18px 0 22px; }
.gate-proof .pl { font-size: 0.95rem; color: #dcdce6; }
.gate-proof .pl b { color: #fff; font-family: var(--font-display); }
.gate-btns { display: flex; flex-direction: column; gap: 11px; }
.btn.glass {
  background: rgba(255,255,255,0.08); color: var(--fg); border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.btn.glass:hover { background: rgba(255,255,255,0.14); filter: none; }
.btn.trc-tint {
  background: var(--gold-soft); color: var(--gold); border: 1px solid var(--gold-line);
}
.btn.trc-tint:hover { background: rgba(212,168,67,0.22); filter: none; }
.gate-foot {
  margin-top: 20px; text-align: center; font-size: 0.68rem; letter-spacing: 0.6px;
  color: var(--muted); font-family: var(--font-display); font-weight: 600;
}
.gate-legal { margin-top: 10px; text-align: center; font-size: 0.7rem; color: var(--muted); }
.gate-legal a { color: var(--muted); text-decoration: underline; }

/* ---------- TODAY / THE DROP (screen 28) ---------- */
.streak-chip.sm { padding: 6px 12px; font-size: 0.82rem; }
.hero.drop { min-height: 380px; }
.hero .thumb.grad, .thumb.grad {
  background: linear-gradient(135deg, rgba(104,104,237,0.4), rgba(212,168,67,0.16));
}
.drop-eyebrow { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 1.6px; color: var(--blue); font-weight: 700; }
/* hero text sits on a photo — muted grey alone loses the fight against a bright frame */
.drop-meta { font-size: 0.8rem; color: #C9C9D6; margin-top: 3px; text-shadow: 0 1px 6px rgba(0,0,0,0.85); }
.drop-eyebrow, .hero.drop h1 { text-shadow: 0 2px 10px rgba(0,0,0,0.7); }
.hero.drop h1 { font-size: 1.95rem; margin: 8px 0 12px; }
.hero .meta .mchip {
  font-size: 0.76rem; padding: 5px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--hairline); color: var(--fg);
  font-family: var(--font-display); font-weight: 600;
}
.hero .meta .mchip.host { color: var(--gold); background: var(--gold-soft); border-color: var(--gold-line); font-size: 0.68rem; letter-spacing: 0.4px; display: inline-flex; align-items: center; gap: 6px; }
/* 22px on screen, 192px square source (/media/avatar/…) — sharp at 3x */
.hero .meta .mchip.host .host-ava { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold-line); background: #14141c; }
.drop-social { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.drop-social .pl { font-size: 0.9rem; color: #dcdce6; }
.drop-social .pl b { color: #fff; font-family: var(--font-display); }
.live-txt { color: var(--red) !important; }

/* community pulse card */
.pulse-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.pulse-card:hover { border-color: var(--blue-line); }
.pulse-body { min-width: 0; }
.pulse-line { font-size: 0.92rem; line-height: 1.4; }
.pulse-line b { font-family: var(--font-display); color: var(--fg); }
.pulse-sub { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--muted); margin-top: 5px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse-dot 1.6s infinite; }
.live-dot.big { width: 10px; height: 10px; background: var(--red); box-shadow: 0 0 10px var(--red); }

/* ---------- COMMUNITY / WALL (screen 29) ---------- */
.wall-count-row { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.wall-big { display: flex; align-items: baseline; gap: 8px; }
.wall-big .n { font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; line-height: 1; color: var(--blue); }
.wall-big .u { font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; letter-spacing: 1.4px; color: var(--muted); }
.chip.live { color: var(--red); background: rgba(var(--red-rgb),0.14); border-color: rgba(var(--red-rgb),0.4); }
.chip.live .dot { background: var(--red); box-shadow: 0 0 8px var(--red); animation: pulse-dot 1.4s infinite; }

.live-strip {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px; border-radius: var(--r-md); margin-bottom: 12px;
  background: rgba(var(--red-rgb),0.1); border: 1px solid rgba(var(--red-rgb),0.4);
}
.live-strip .lt { flex: 1; font-size: 0.92rem; color: #ffb3aa; }
.live-strip .lt b { color: #fff; font-family: var(--font-display); }
.btn.tiny { width: auto; padding: 8px 14px; font-size: 0.8rem; border-radius: 999px; }
.live-join { background: var(--red); color: #fff; }

.crew-teaser {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-md); margin-bottom: 6px; cursor: pointer;
  background: var(--card); border: 1px solid var(--hairline);
}
.crew-teaser:hover { border-color: var(--blue-line); }
.crew-teaser.start { border-style: dashed; }
.crew-teaser .ct-l { display: flex; align-items: center; gap: 12px; }
.crew-teaser .ct-emoji { font-size: 1.3rem; width: 28px; text-align: center; }
.crew-teaser .ct-name { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }
.crew-teaser .ct-sub { font-size: 0.8rem; color: var(--muted); margin-top: 1px; }

/* feed */
.feed { display: flex; flex-direction: column; gap: 8px; }
.post {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; border-radius: var(--r-md);
  background: var(--card); border: 1px solid var(--hairline);
}
.post-l { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.post-body { min-width: 0; }
.post-head { font-size: 0.94rem; line-height: 1.35; }
.post-head b { font-weight: 700; }
.post-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.post .vibe { font-size: 1rem; }
.post.milestone { border-color: var(--gold-line); background: radial-gradient(ellipse at 0% 0%, rgba(212,168,67,0.12), transparent 60%), var(--card); }
.ms-badge {
  width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; background: var(--gold-soft); border: 1px solid var(--gold-line); flex-shrink: 0;
}
.post.milestone .post-head b { color: var(--gold); }

.hi5 {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid var(--hairline); color: var(--muted);
  font-size: 0.88rem; font-family: var(--font-display); font-weight: 600; transition: transform .1s, background .15s, border-color .15s, color .15s;
}
.hi5:active { transform: scale(0.92); }
.hi5.on { background: var(--blue-soft); border-color: var(--blue-line); color: #aeaef7; }
.hi5:disabled { opacity: 0.55; cursor: default; }
.hi5 .c { font-variant-numeric: tabular-nums; }

/* report/block menu trigger on wall posts */
.post-more {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  background: transparent; border: none; color: var(--muted);
  font-size: 1rem; line-height: 1; letter-spacing: 1px; padding: 0;
}
.post-more:active { background: rgba(255,255,255,0.06); }

.leaders { display: flex; flex-wrap: wrap; gap: 8px; }
.leader {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--hairline); font-size: 0.88rem; font-weight: 600;
}
.leader .rank { font-size: 0.95rem; }
.wall-empty { border: 1px dashed var(--hairline); border-radius: var(--r-md); }

/* ---------- CREW (screen 30) ---------- */
.brand .back { font-size: 1.5rem; color: var(--muted); padding: 0 6px 0 0; line-height: 1; }
.crew-head { display: flex; flex-direction: column; }
.crew-head .name { font-size: 1.05rem; }
.crew-sub { font-family: var(--font-display); font-size: 0.6rem; letter-spacing: 1px; color: var(--faint); margin-top: 1px; }
.code-chip {
  background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold);
  padding: 7px 13px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: 0.78rem;
  cursor: pointer; white-space: nowrap;
}
.crew-progress { padding: 16px; }
.crew-progress .cp-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.cp-num { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--green); }
.cp-goal { font-size: 1rem; color: var(--muted); font-weight: 400; }
.cp-pct { font-family: var(--font-display); font-weight: 700; color: var(--muted); }
.cp-bar { height: 12px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.cp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, rgba(63,185,96,0.7), var(--green)); transition: width 0.4s; min-width: 2px; }

.crew-list { display: flex; flex-direction: column; gap: 8px; }
.crew-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-md);
  background: var(--card); border: 1px solid var(--hairline);
}
.crew-row.done { border-color: rgba(63,185,96,0.3); }
.crew-row.live { border-color: var(--blue-line); }
.crew-info { flex: 1; min-width: 0; }
.crew-nm { font-family: var(--font-display); font-weight: 700; font-size: 0.96rem; display: flex; align-items: center; gap: 6px; }
.mini-streak { font-size: 0.72rem; color: var(--gold); font-weight: 600; }
.crew-detail { font-size: 0.8rem; color: var(--muted); margin-top: 1px; }
.crew-state { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 30px; }
.crew-state.done { color: var(--green); font-size: 1.2rem; font-weight: 700; }
.leave-btn { display: block; margin: 20px auto 0; color: var(--red); opacity: 0.7; }

.crewless-intro { text-align: center; padding: 20px 10px 8px; }
.crewless-intro .ci-emoji { font-size: 2.4rem; }
.crewless-intro h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; margin: 10px 0 6px; }
.crewless-card { margin-bottom: 12px; }
.crewless-card .cc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }

/* ---------- WORKOUTS (screen 32) ---------- */
.seg { display: flex; gap: 0; border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; margin-bottom: 16px; }
.seg-btn {
  flex: 1; padding: 12px; background: none; border: none; color: var(--muted); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 0.76rem; letter-spacing: 0.6px;
}
.seg-btn.on { background: var(--blue-soft); color: #aeaef7; }

.day-card .badge.today { color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-line); }
.day-card.is-today { border-color: var(--blue-line); }
.thumb.grad.build { background: linear-gradient(135deg, rgba(104,104,237,0.35), rgba(63,185,96,0.15)); }

.build-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px; border-radius: var(--r-md); cursor: pointer; margin-bottom: 6px;
  background: radial-gradient(ellipse at 100% 0%, rgba(104,104,237,0.12), transparent 60%), var(--card);
  border: 1px solid var(--blue-line);
}
.build-cta .bc-l { display: flex; align-items: center; gap: 12px; }
.build-cta .bc-emoji { font-size: 1.5rem; }
.build-cta .bc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.build-cta .bc-sub { font-size: 0.8rem; color: var(--muted); margin-top: 1px; }
.ex-grad { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(104,104,237,0.3), rgba(212,168,67,0.12)); }

/* you-hero (profile) */
.you-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.you-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }

/* auth-hero tag (verify screen still uses it) */
.auth-hero .tag b { color: var(--fg); }

/* ============================================================
   V2 DESIGN-NOTES screens 33–48
   ============================================================ */

/* shared back button (34px circle) */
.back-fab {
  position: absolute; top: calc(var(--safe-top) + 14px); left: 16px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.65); border: 1px solid rgba(255,255,255,0.18); cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.back-fab.close { left: auto; right: 16px; }
.back-fab.flat { position: static; margin: calc(var(--safe-top) + 10px) 0 0 4px; background: rgba(255,255,255,0.06); }
.back-fab svg { width: 18px; height: 18px; }
.back-fab svg g { stroke: var(--fg); }

/* sub-page topbar (Settings / Builder) */
.topbar.sub { gap: 14px; justify-content: flex-start; align-items: center; margin-bottom: 20px; padding-top: 2px; }
.back-circle {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,0.06); border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.back-circle svg { width: 18px; height: 18px; }
.back-circle svg g { stroke: var(--fg); }
.sub-title { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; }

/* icon helpers sizing inside buttons/chips */
.btn svg { width: 18px; height: 18px; }
.faint-link { color: var(--faint) !important; display: block; margin: 8px auto 0; }

/* ---------- 33 · Sign Up ---------- */
.signup { width: 100%; min-height: 100dvh; display: flex; flex-direction: column; background: var(--black); }
.su-hero { position: relative; height: 470px; flex-shrink: 0; overflow: hidden; }
.su-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.su-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, transparent 30%, rgba(0,0,0,0.78) 78%, #000 100%); }
.su-head { position: absolute; left: 16px; right: 16px; bottom: 20px; z-index: 2; }
.su-mark { display: block; width: 44px; height: 26px; margin-bottom: 10px; }
.su-head h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; }
.su-head p { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.su-form { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 18px 24px calc(var(--safe-bot) + 30px); }
.su-input { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--hairline); border-radius: 14px; padding: 15px 16px; }
.su-input .ic { flex-shrink: 0; width: 16px; height: 16px; display: flex; }
.su-input .ic svg { width: 16px; height: 16px; }
.su-input .ic svg g { stroke: var(--faint); }
.su-input input { flex: 1; background: none; border: none; outline: none; color: var(--fg); font-size: 0.95rem; }
.su-input input::placeholder { color: var(--faint); }
.su-helper { display: flex; align-items: flex-start; gap: 8px; font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.su-helper .disc { flex-shrink: 0; margin-top: 1px; } .su-helper .disc svg { width: 15px; height: 15px; } .su-helper .disc svg g { stroke: var(--gold); }
.su-spacer { flex: 1; min-height: 8px; }
.su-login { text-align: center; color: var(--muted); font-size: 0.86rem; }
.su-login .link-btn { color: var(--blue); font-weight: 800; }

/* ---------- 34 · Verify ---------- */
.verify-screen { min-height: 100dvh; display: flex; flex-direction: column; padding: 8px 24px 40px; }
.verify-body { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 44px; }
.v-mark { width: 44px; height: 26px; margin-bottom: 14px; }
.verify-body h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.65rem; }
.v-sub { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.code-boxes { display: flex; gap: 8px; justify-content: center; margin: 22px 0 8px; }
.code-boxes input {
  width: 48px; height: 60px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  background: var(--card); border: 1px solid var(--borderStrong, rgba(255,255,255,0.16)); border-radius: 14px; color: var(--fg);
}
.code-boxes input.focus { border-color: var(--blue); border-width: 1.5px; background: rgba(104,104,237,0.08); box-shadow: 0 0 0 1px var(--blue); }
.code-boxes input:focus { outline: none; }
.v-sent { font-size: 0.875rem; color: var(--muted); margin-top: 10px; }
.yp-since { font-family: Karla, sans-serif; font-size: 0.6rem; font-weight: 800; letter-spacing: 1.5px; color: var(--muted); margin-top: 2px; }
.v-sent b { color: var(--fg); }
.v-sent .dot-sep { color: var(--faint); margin: 0 4px; }
.v-sent .link-btn { color: var(--blue); font-weight: 700; font-size: 0.8rem; }
.v-sent .link-btn:disabled { color: var(--blue); opacity: 0.85; cursor: default; }

/* ---------- 35 / 36 · Onboarding ---------- */
.onb-screen { min-height: 100dvh; display: flex; flex-direction: column; gap: 14px; padding: 10px 20px calc(var(--safe-bot) + 34px); }
.onb-head { margin-top: 8px; }
.onb-eyebrow { font-family: var(--font-body); font-weight: 800; font-size: 0.62rem; letter-spacing: 2.5px; color: var(--blue); margin-bottom: 8px; }
.onb-head h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.65rem; }
.onb-head p { color: var(--muted); font-size: 0.9rem; margin-top: 8px; line-height: 1.4; }
.onb-cards { display: flex; flex-direction: column; gap: 12px; }
.toggle-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--hairline); cursor: pointer; }
.tc-ic { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tc-ic.blue { background: rgba(104,104,237,0.15); } .tc-ic svg { width: 18px; height: 18px; }
.tc-body { flex: 1; } .tc-body .t { font-weight: 700; font-size: 0.94rem; } .tc-body .s { font-size: 0.76rem; color: var(--muted); margin-top: 1px; }
.onb-spacer { flex: 1; min-height: 8px; }
.onb-actions { display: flex; flex-direction: column; gap: 6px; }
.crew-start-card { border-radius: 16px; padding: 16px 18px; background: rgba(104,104,237,0.08); border: 1px solid rgba(104,104,237,0.3); }
.crew-join-card { border-radius: 16px; padding: 16px 18px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14); }
.crew-start-card.dim, .crew-join-card.dim { opacity: 0.42; }
.csc-row, .cjc-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.csc-plus { width: 40px; height: 40px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.csc-plus svg { width: 20px; height: 20px; }
.cjc-ticket { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.08); border: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cjc-ticket svg { width: 18px; height: 18px; }
.csc-t, .cjc-t { font-weight: 700; font-size: 0.96rem; } .csc-s, .cjc-s { font-size: 0.76rem; color: var(--muted); }
.inset-input { width: 100%; background: rgba(0,0,0,0.35); border: 1px solid var(--hairline); border-radius: 12px; padding: 13px 14px; color: var(--fg); font-size: 0.92rem; }
.inset-input:focus { outline: none; border-color: var(--blue); }
.inset-input::placeholder { color: var(--faint); }
.inset-input.mono { font-family: var(--font-display); letter-spacing: 2px; font-weight: 700; }
.onb-proof { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: 0.82rem; color: var(--muted); }

/* ---------- 40 · Live Class + today live-teaser ---------- */
.live-teaser { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.live-teaser:hover { border-color: var(--blue-line); }
.lt-l { display: flex; align-items: center; gap: 12px; }
.lt-emoji { font-size: 1.3rem; width: 26px; display: flex; align-items: center; justify-content: center; }
.lt-t { font-family: var(--font-display); font-weight: 700; font-size: 0.96rem; }
.lt-s { font-size: 0.8rem; color: var(--muted); margin-top: 1px; }
.live-teaser .faint svg { width: 18px; height: 18px; }

.lc-header { margin-bottom: 13px; }
.lc-eyebrow { font-family: var(--font-body); font-weight: 800; font-size: 0.62rem; letter-spacing: 2.5px; color: var(--blue); }
.lc-date { font-size: 0.78rem; color: var(--faint); margin-top: 3px; }
.lc-hero { position: relative; height: 288px; border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,0.12); margin-bottom: 13px; }
.lc-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lc-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.9) 100%); }
.lc-live-pill { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; align-items: center; gap: 6px; background: var(--red); border-radius: 999px; padding: 5px 10px; font-family: var(--font-body); font-weight: 800; font-size: 0.62rem; letter-spacing: 1.2px; color: #fff; }
.lc-live-pill .live-dot { width: 6px; height: 6px; background: #fff; box-shadow: none; }
.lc-hero-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 16px 16px; }
.lc-hero-body h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.lc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.lc-meta-txt { font-family: var(--font-body); font-weight: 700; font-size: 0.62rem; letter-spacing: 1px; color: var(--muted); }
.host-chip { background: rgba(255,255,255,0.08); border-radius: 999px; padding: 3px 10px; font-family: var(--font-body); font-weight: 800; font-size: 0.5rem; letter-spacing: 0.5px; color: var(--muted); }
.lc-social { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.lc-social-txt { font-size: 0.82rem; font-weight: 700; }
.lc-social-txt b { color: var(--fg); }
.sched-card { padding: 14px 16px; margin: 13px 0; }
.sc-label { font-family: var(--font-body); font-weight: 800; font-size: 0.66rem; letter-spacing: 1.5px; color: var(--faint); margin-bottom: 9px; }
.sc-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; margin-bottom: 6px; }
.sc-row:last-child { margin-bottom: 0; }
.sc-time { font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; width: 62px; flex-shrink: 0; }
.sc-name { flex: 1; font-size: 0.82rem; color: var(--muted); }
.sc-row.live { background: rgba(var(--red-rgb),0.08); border: 1px solid rgba(var(--red-rgb),0.25); }
.sc-row.live .sc-name, .sc-row.live .sc-time { color: var(--fg); }
.sc-row.next { background: rgba(104,104,237,0.12); border: 1.5px solid var(--blue); }
.sc-row.next .sc-name, .sc-row.next .sc-time { color: var(--fg); }
.sc-tag { font-family: var(--font-body); font-weight: 800; font-size: 0.58rem; letter-spacing: 0.6px; display: flex; align-items: center; gap: 5px; }
.sc-tag.live { color: var(--red); } .sc-tag.live .live-dot { width: 6px; height: 6px; background: var(--red); }
.sc-tag.next { color: var(--blue); }
.cal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,0.05); border: 1px solid var(--hairline); }
.cal-l { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; }
.cal-l svg { width: 18px; height: 18px; } .cal-row .faint svg { width: 18px; height: 18px; }

/* ---------- 42 · Crew empty ---------- */
.ce-header { margin-bottom: 14px; }
.ce-header h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.ce-eyebrow { font-family: var(--font-body); font-weight: 700; font-size: 0.58rem; letter-spacing: 1.5px; color: var(--faint); margin-top: 2px; }
.ce-hero { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.ce-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ce-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.84); }
.ce-hero-body { position: relative; z-index: 2; text-align: center; padding: 26px 24px; display: flex; flex-direction: column; align-items: center; gap: 9px; }
.ce-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--blue); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 36px rgba(104,104,237,0.5); }
.ce-circle svg { width: 28px; height: 28px; }
.ce-hero-body h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.ce-hero-body p { font-size: 0.82rem; color: var(--muted); max-width: 250px; }
.ce-card { display: flex; flex-direction: column; gap: 11px; padding: 16px 18px; margin-bottom: 12px; }
.ce-label { font-family: var(--font-body); font-weight: 800; font-size: 0.62rem; letter-spacing: 2px; }
.ce-label.blue { color: var(--blue); } .ce-label.muted-lbl { color: var(--muted); }

/* ---------- 43 · Builder segmented ---------- */
.builder-top .bt-head { display: flex; flex-direction: column; }
.bt-eyebrow { font-family: var(--font-body); font-weight: 700; font-size: 0.56rem; letter-spacing: 1.5px; color: var(--faint); }
.scheme-seg { display: flex; gap: 2px; background: var(--card); border-radius: 12px; padding: 3px; border: 1px solid var(--hairline); }
.ss-btn { flex: 1; border: none; background: none; border-radius: 9px; padding: 8px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); }
.ss-btn .ss-n { font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; }
.ss-btn .ss-l { font-family: var(--font-body); font-weight: 800; font-size: 0.48rem; letter-spacing: 1px; color: var(--faint); }
.ss-btn.on { background: var(--blue); color: #fff; } .ss-btn.on .ss-l { color: rgba(255,255,255,0.72); }

/* ---------- 44 · Workout Preview ---------- */
.preview-hero { position: relative; height: 310px; margin: -14px -18px 0; }
.pv-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 35%, #000 100%); }
.pv-hero-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 16px 16px; }
.pv-eyebrow { font-family: var(--font-body); font-weight: 800; font-size: 0.62rem; letter-spacing: 2.5px; color: var(--blue); }
.pv-hero-body h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; margin: 6px 0 8px; }
.pv-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-chip { background: rgba(0,0,0,0.65); border: 1px solid rgba(255,255,255,0.12); border-radius: 999px; padding: 6px 11px; font-family: var(--font-body); font-weight: 800; font-size: 0.62rem; letter-spacing: 1px; }
.pv-content { padding: 14px 0 0; }
.pv-social { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.pv-social-txt { font-size: 0.82rem; font-weight: 700; } .pv-social-txt b { color: var(--fg); }
.pex-card { padding: 6px 14px; }
.pex-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hairline-2); }
.pex-row:last-child { border-bottom: none; }
.pex-row.dim { opacity: 0.35; }
.pex-idx { font-family: var(--font-display); font-weight: 700; font-size: 0.75rem; color: var(--faint); width: 14px; }
.pex-thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #000; }
.pex-thumb.grad { background: linear-gradient(135deg, rgba(104,104,237,0.35), rgba(212,168,67,0.15)); }
.pex-name { flex: 1; font-size: 0.84rem; font-weight: 700; }
.pex-name.locked-name { color: var(--muted); font-weight: 500; }
.pex-dur { font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.pex-more { text-align: center; font-size: 0.78rem; color: var(--faint); padding: 10px 0 4px; }
.pv-cta-wrap { margin-top: 20px; }
.btn.gold.big svg g { stroke: #17130a; }

/* ---------- 46 · You ---------- */
.you-profile { position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 13px; min-height: 92px; }
.yp-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yp-scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.78); }
.yp-body { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.yp-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(104,104,237,0.15); border: 1px solid rgba(104,104,237,0.4); color: var(--blue); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.yp-info { flex: 1; min-width: 0; }
.yp-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.yp-email { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yp-streak { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold); border-radius: 999px; padding: 6px 11px; font-family: var(--font-body); font-weight: 800; font-size: 0.66rem; }
.yp-streak svg { width: 13px; height: 13px; }
.you-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.ys-cell { background: var(--card); border: 1px solid var(--hairline); border-radius: 14px; padding: 11px 14px; }
.ys-num { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.ys-cell.gold .ys-num { color: var(--gold); }
.ys-lbl { font-family: var(--font-body); font-weight: 800; font-size: 0.56rem; letter-spacing: 1.2px; color: var(--faint); margin-top: 1px; }
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shelf-badge { border-radius: 12px; padding: 12px 4px; text-align: center; background: var(--elev, #12121A); border: 1px solid var(--hairline); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.shelf-badge.earned { background: var(--gold-soft); border-color: var(--gold-line); }
.sb-ic svg { width: 16px; height: 16px; }
.sb-ic svg g { stroke: var(--faint); } .shelf-badge.earned .sb-ic svg g { stroke: var(--gold); }
.sb-name { font-family: var(--font-body); font-weight: 800; font-size: 0.5rem; letter-spacing: 0.4px; color: var(--faint); line-height: 1.2; }
.shelf-badge.earned .sb-name { color: var(--gold); }
.you-week { margin-top: 14px; }
.yw-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.yw-hd { font-family: var(--font-body); font-weight: 800; font-size: 0.66rem; letter-spacing: 1.5px; color: var(--muted); }
.yw-count { font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; color: var(--gold); }
.yw-beats { display: flex; gap: 10px; }
.yw-beat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.yw-bar { width: 100%; height: 34px; border-radius: 8px; background: var(--blue); }
.yw-beat.future .yw-bar, .yw-beat.missed .yw-bar { background: var(--elev, #12121A); border: 1px solid var(--hairline); }
.yw-box { width: 100%; height: 34px; border-radius: 8px; background: rgba(104,104,237,0.12); border: 1.5px solid var(--blue); display: flex; align-items: center; justify-content: center; font-family: var(--font-body); font-weight: 800; font-size: 0.48rem; color: var(--blue); }
.yw-d { font-family: var(--font-body); font-weight: 700; font-size: 0.66rem; color: var(--muted); }
.yw-beat.today .yw-d { color: var(--blue); } .yw-beat.future .yw-d { color: var(--faint); }
.you-crew { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--hairline); margin-top: 14px; cursor: pointer; }
.you-crew:hover { border-color: var(--gold-line); }
.yc-shield { flex-shrink: 0; } .yc-shield svg { width: 18px; height: 18px; }
.yc-body { flex: 1; min-width: 0; }
.yc-name { font-weight: 700; font-size: 0.9rem; }
.yc-sub { font-family: var(--font-body); font-weight: 700; font-size: 0.62rem; letter-spacing: 0.5px; color: var(--faint); }
.you-crew .faint svg { width: 18px; height: 18px; }
.you-list { padding: 2px 16px; margin-top: 14px; }
.yl-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hairline-2); cursor: pointer; }
.yl-row:last-child { border-bottom: none; }
.yl-ic { flex-shrink: 0; } .yl-ic svg { width: 18px; height: 18px; }
.yl-t { flex: 1; font-size: 0.9rem; }
.yl-row.danger .yl-t { color: var(--red); }
.yl-row .faint svg { width: 18px; height: 18px; }

/* ---------- 47 · Settings groups ---------- */
.grp-label { font-family: var(--font-body); font-weight: 800; font-size: 0.66rem; letter-spacing: 1.8px; color: var(--faint); margin: 24px 2px 10px; }
.grp-label:first-of-type { margin-top: 4px; }
.list-card { padding: 2px 16px; }
.lc-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hairline-2); }
.lc-row:last-child { border-bottom: none; }
.lc-t { flex: 1; font-size: 0.86rem; }
.lc-v { font-size: 0.82rem; color: var(--muted); }
.lc-v.mono-sm { font-size: 0.78rem; }
.int-ic { flex-shrink: 0; } .int-ic svg { width: 17px; height: 17px; }
.connect-chip { background: rgba(104,104,237,0.15); border: 1px solid rgba(104,104,237,0.4); color: var(--blue); border-radius: 999px; padding: 6px 12px; font-family: var(--font-body); font-weight: 800; font-size: 0.62rem; letter-spacing: 1px; cursor: pointer; }

/* ============================ TOGETHER (squad workouts) ============================ */

.back-row { padding: calc(var(--safe-top) + 10px) 0 2px; }
.back-link { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.back-link:active { color: var(--fg); }

.gs-hero { padding: 6px 2px 18px; }
.gs-kicker { font-family: var(--font-body); font-weight: 800; font-size: 0.62rem; letter-spacing: 2.6px; color: var(--gold); margin-bottom: 8px; }
.gs-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; line-height: 1.12; }
.gs-hero-sub { color: var(--muted); font-size: 0.9rem; line-height: 1.45; margin: 8px 0 14px; }

.section-title.live-title { display: flex; align-items: center; gap: 8px; color: var(--red); }

.gs-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 12px; margin-bottom: 10px; cursor: pointer; }
.gs-card:hover { border-color: var(--blue-line); }
.gs-card.live { border-color: rgba(var(--red-rgb), 0.5); background: linear-gradient(180deg, rgba(var(--red-rgb), 0.07), var(--card)); }
.gs-thumb { width: 62px; height: 62px; border-radius: var(--r-md); object-fit: cover; flex-shrink: 0; background: #14141f; }
.gs-thumb.grad { background: linear-gradient(135deg, #1c1c30, #10101c); }
.gs-body { flex: 1; min-width: 0; }
.gs-top { margin-bottom: 4px; }
.gs-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-body); font-weight: 800; font-size: 0.56rem; letter-spacing: 1.6px; padding: 3px 8px; border-radius: 999px; }
.gs-badge.live { color: var(--red); background: rgba(var(--red-rgb), 0.14); border: 1px solid rgba(var(--red-rgb), 0.4); }
.gs-badge.mine { color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-line); }
.gs-badge.in { color: var(--green); background: var(--green-soft); border: 1px solid rgba(63, 185, 96, 0.4); }
.gs-badge.inv { color: var(--blue); background: var(--blue-soft); border: 1px solid var(--blue-line); }
.gs-title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-sub { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.gs-sub .live-txt { color: var(--red); }
.gs-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.gs-count { color: var(--faint); font-size: 0.74rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-empty { margin-top: 10px; }

.lb-teaser { cursor: pointer; padding: 14px; }
.lb-teaser:hover { border-color: var(--gold-line); }
.lbt-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.lbt-row.you .lbt-name { color: var(--gold); }
.lbt-rank { width: 26px; text-align: center; font-size: 0.95rem; flex-shrink: 0; }
.lbt-name { flex: 1; font-weight: 800; font-size: 0.92rem; }
.lbt-pts { font-family: var(--font-display); font-weight: 700; font-size: 0.88rem; color: var(--muted); }
.lbt-more { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--hairline-2); color: var(--blue); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.3px; }

/* host flow */
.gs-host-head { padding: 4px 2px 6px; }
.gs-host-head h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; }
.gs-host-head .muted { margin-top: 4px; font-size: 0.88rem; }
.host-wk-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; border-radius: var(--r-lg); }
.host-wk { display: flex; align-items: center; gap: 11px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 9px 12px 9px 9px; cursor: pointer; }
.host-wk.sel { border-color: var(--gold-line); background: linear-gradient(180deg, rgba(212, 168, 67, 0.08), var(--card)); }
.hw-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #14141f; }
.hw-thumb.grad { background: linear-gradient(135deg, #1c1c30, #10101c); }
.hw-body { flex: 1; min-width: 0; }
.hw-title { font-weight: 800; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-sub { color: var(--muted); font-size: 0.74rem; margin-top: 2px; }
.hw-check { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--hairline); color: transparent; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 900; flex-shrink: 0; }
.host-wk.sel .hw-check { background: var(--gold); border-color: var(--gold); color: #17130a; }
.host-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hchip { background: var(--card); border: 1px solid var(--hairline); color: var(--fg); border-radius: 999px; padding: 9px 15px; font-family: var(--font-body); font-weight: 800; font-size: 0.8rem; cursor: pointer; }
.hchip.sel { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.host-custom, .host-title-input { width: 100%; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); color: var(--fg); font-family: var(--font-body); font-size: 0.95rem; padding: 13px 14px; margin-top: 10px; outline: none; color-scheme: dark; }
.host-title-input { margin-top: 0; }
.host-custom:focus, .host-title-input:focus { border-color: var(--blue-line); }
.host-create { margin-top: 22px; }
.host-note { text-align: center; font-size: 0.78rem; margin: 12px 20px 0; line-height: 1.45; }

/* session lobby */
.gs-detail-hero { min-height: 240px; }
.gs-status { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 18px 16px; margin-top: 12px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.gs-status.live { border-color: rgba(var(--red-rgb), 0.5); }
.gs-count-label { font-family: var(--font-body); font-weight: 800; font-size: 0.62rem; letter-spacing: 2px; color: var(--muted); }
.gs-countdown { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: 4px; }
.gs-live-line { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 0.95rem; color: var(--red); }
.gs-live-line b { color: var(--fg); }
.gs-over-line { font-weight: 800; font-size: 0.98rem; }
.gs-roster { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; }
.gs-member { display: flex; align-items: center; gap: 11px; padding: 7px 0; }
.gsm-body { flex: 1; min-width: 0; }
.gsm-name { font-weight: 800; font-size: 0.92rem; display: flex; align-items: center; gap: 7px; }
.gsm-host { font-size: 0.52rem; font-weight: 800; letter-spacing: 1.4px; color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-line); padding: 2px 6px; border-radius: 999px; }
.gsm-sub { color: var(--muted); font-size: 0.72rem; margin-top: 1px; }
.gsm-done { color: var(--green); font-weight: 800; font-size: 0.76rem; white-space: nowrap; }
.gs-share { margin-top: 10px; }

/* an unanswered invite: its own block at the top of Together, both answers on it */
.section-title.inv-title { color: var(--gold); }
.gs-inv-card { background: var(--card); border: 1px solid var(--gold-line); border-radius: var(--r-lg); padding: 14px 15px 13px; margin-bottom: 10px; }
.gsic-head { display: flex; align-items: center; gap: 10px; }
.gsic-who { flex: 1; min-width: 0; color: var(--muted); font-size: 0.86rem; }
.gsic-who b { color: var(--fg); font-weight: 800; }
.gsic-title { font-family: var(--font-display); font-weight: 800; font-size: 1.14rem; letter-spacing: -0.4px; margin: 10px 0 3px; }
.gsic-when { color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.gsic-when .live-txt { color: var(--red); font-weight: 800; }
.gsic-acts { display: flex; gap: 8px; margin-top: 13px; }
.gsic-acts .btn { flex: 1; min-height: 44px; padding: 11px 10px; font-size: 0.88rem; }
.gs-invited-by { color: var(--muted); font-size: 0.86rem; margin-bottom: 10px; }
.gs-invited-by b { color: var(--fg); font-weight: 800; }
.gs-over-sub { color: var(--muted); font-size: 0.84rem; margin: 6px 0 12px; }

/* invite sheet */
.gs-sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(3px); z-index: 300; display: flex; align-items: flex-end; justify-content: center; }
/* --sheet-vh is the VISUAL viewport height, republished by app.js while the
   soft keyboard is up. Without it the sheet keeps sizing to the full 72vh and
   the primary button ends up underneath the keyboard. */
.gs-sheet { width: 100%; max-width: var(--shell-w); background: #101018; border: 1px solid var(--hairline); border-bottom: none; border-radius: 22px 22px 0 0; padding: 16px 16px calc(16px + var(--safe-bot)); max-height: 72vh; max-height: min(72vh, var(--sheet-vh, 72vh)); display: flex; flex-direction: column; overscroll-behavior: contain; animation: sheetUp 0.24s ease-out; }
@media (prefers-reduced-motion: reduce) { .gs-sheet { animation: none; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.gs-sheet-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--hairline-2); font-size: 1.02rem; }
.gs-sheet-x { background: none; border: none; color: var(--muted); font-size: 1rem; cursor: pointer; padding: 4px 8px; }
.gs-sheet-body { overflow: hidden; padding-top: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.gs-people { display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
.gs-person { display: flex; align-items: center; gap: 11px; padding: 9px 2px; cursor: pointer; }
.gsp-name { flex: 1; font-weight: 800; font-size: 0.92rem; min-width: 0; }
.gsp-streak { color: var(--muted); font-weight: 700; font-size: 0.76rem; }
/* white system squares fight the dark sheet — round gold targets instead */
.gs-person input[type="checkbox"] { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; flex-shrink: 0; margin: 0;
  border: 1.5px solid var(--hairline); border-radius: 50%; background: rgba(255,255,255,0.04); cursor: pointer;
  display: grid; place-content: center; transition: background 0.12s, border-color 0.12s; }
.gs-person input[type="checkbox"]::after { content: "✓"; font-size: 0.72rem; font-weight: 900; color: #17130a; opacity: 0; }
.gs-person input[type="checkbox"]:checked { background: var(--gold); border-color: var(--gold); }
.gs-person input[type="checkbox"]:checked::after { opacity: 1; }
/* search-first invite: shortlist + query, so a 1000-member club never becomes a scroll */
.gsi-search { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; background: #16161F; color: var(--fg);
  border: 1px solid var(--hairline); font-size: 0.95rem; font-family: inherit; -webkit-appearance: none; }
.gsi-search:focus { outline: none; border-color: var(--gold-line); }
.gsi-search::placeholder { color: #6E6E7E; }
.gsi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gsi-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; cursor: pointer;
  background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--gold); font-weight: 800; font-size: 0.74rem; font-family: inherit; }
.gsi-chip span { opacity: 0.65; font-size: 0.7rem; }
.gsi-hint { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.6px; text-transform: uppercase; font-weight: 700; }
.gsi-hint:empty { display: none; }
.gsp-tag { font-size: 0.5rem; font-weight: 800; letter-spacing: 1.2px; color: var(--muted); border: 1px solid var(--hairline);
  padding: 2px 6px; border-radius: 999px; white-space: nowrap; }
.gsp-tag.crew { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.gsp-tag.in { color: var(--green); border-color: rgba(63, 185, 96, 0.42); background: var(--green-soft); }
.gsp-tag.sent { color: var(--blue); border-color: var(--blue-line); background: var(--blue-soft); }
/* already in the room or already asked: shown, never re-invitable */
.gs-person.locked { opacity: 0.55; cursor: default; }
.gs-person.locked input[type="checkbox"] { display: none; }
.gs-person input[type="checkbox"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* "invite anyone" — the way out of an empty picker */
.gsi-anyone { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 12px; border-radius: 12px; cursor: pointer;
  background: var(--blue-soft); border: 1px solid var(--blue-line); color: var(--fg); font-family: inherit; font-weight: 700; font-size: 0.9rem; text-align: left; min-height: 44px; }
.gsi-anyone .ga-ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; background: var(--blue); display: grid; place-content: center; font-size: 0.95rem; }
.gsi-anyone .ga-sub { display: block; color: var(--muted); font-weight: 500; font-size: 0.75rem; margin-top: 1px; }
.gsi-anyone:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* the action never scrolls away behind the list */
.gs-sheet-foot { padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--hairline-2); display: flex; flex-direction: column; gap: 8px; align-items: center; flex-shrink: 0; }
.gs-sheet-foot .btn { width: 100%; }

/* ---------- post-workout rating ask + celebration ---------- */
.ic-rate .gs-sheet-body { overscroll-behavior: contain; gap: 12px; padding-bottom: 4px; }
.ic-rate-q { font-family: var(--font-display); font-size: 1.42rem; font-weight: 600; line-height: 1.2; margin: 6px 0 4px; }
/* the choice is weighted on purpose: love is the headline act, ideas the quiet door */
.ic-rate-love { width: 100%; background: var(--blue); color: #fff; font-size: 1.18rem; letter-spacing: 0.2px; }
.ic-rate-ideas { width: 100%; min-height: 48px; font-size: 0.95rem; color: var(--muted); }
.ic-rate-ideas:hover { color: var(--fg); }
.ic-fb-text { width: 100%; min-height: 116px; padding: 12px 13px; border-radius: var(--r-md); background: #16161F;
  color: var(--fg); border: 1px solid var(--hairline); font-size: 1rem; line-height: 1.5; resize: none; font-family: inherit; }
.ic-fb-text:focus { outline: none; border-color: var(--blue-line); }
.ic-fb-text::placeholder { color: #6E6E7E; }
.ic-fb-hint { color: var(--muted); font-size: 0.8rem; margin: -2px 2px 0; }
.ic-fb-hint.err { color: #FF7A66; }
.ic-fb-send { min-height: 48px; }
.ic-rate .gs-sheet-x:focus-visible, .ic-rate .btn:focus-visible, .ic-fb-text:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px; }

/* the veil gives the moment its own layer, so the message never fights the hero art */
.ic-cele { position: fixed; inset: 0; z-index: 400; pointer-events: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 80% at 50% 46%, rgba(10, 10, 20, 0.72), rgba(3, 3, 8, 0.9));
  animation: icVeil 1.62s ease-out both; }
.ic-cele-msg { font-family: var(--font-display); font-size: 1.62rem; font-weight: 600; line-height: 1.22; text-align: center;
  max-width: 310px; padding: 0 24px; text-wrap: balance; animation: icMsgIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.ic-cele-ring { position: absolute; top: 50%; left: 50%; width: 200px; height: 200px; margin: -100px 0 0 -100px;
  border-radius: 50%; border: 2px solid var(--gold); animation: icRing 0.85s cubic-bezier(0.16, 0.84, 0.44, 1) both; }
.ic-cf { position: absolute; top: 50%; left: 50%; width: 7px; height: 13px; border-radius: 2px; opacity: 0;
  animation: icConfetti 1.45s cubic-bezier(0.13, 0.72, 0.31, 1) var(--d, 0s) forwards; }
.ic-heart { position: absolute; top: -8%; font-size: 1.9rem; opacity: 0;
  animation: icHeartFall 1.5s cubic-bezier(0.35, 0.1, 0.5, 1) var(--d, 0s) forwards; }
@keyframes icVeil { 0% { opacity: 0; } 10% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes icMsgIn { from { transform: scale(0.86); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes icRing { from { transform: scale(0.2); opacity: 0.85; } to { transform: scale(2.4); opacity: 0; } }
@keyframes icConfetti {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate3d(var(--dx), calc(var(--dy) + 210px), 0) rotate(var(--rot)); opacity: 0; }
}
@keyframes icHeartFall {
  0% { transform: translate3d(0, 0, 0) scale(var(--s, 1)); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translate3d(0, 108vh, 0) scale(var(--s, 1)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ic-cele { animation: icVeil 0.9s ease-out both; }
  .ic-cele-msg { animation: none; opacity: 1; }
  .ic-cele-ring { display: none; }
}

/* weekly leaderboard */
.lb-head { padding: 4px 2px 12px; }
.lb-head h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; }
.lb-head .muted { margin-top: 4px; font-size: 0.85rem; }
.lb-row { display: flex; align-items: center; gap: 11px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 11px 13px; margin-bottom: 8px; }
.lb-row.you { border-color: var(--gold-line); background: linear-gradient(180deg, rgba(212, 168, 67, 0.07), var(--card)); }
.lb-rank { width: 28px; text-align: center; font-size: 1.05rem; flex-shrink: 0; font-family: var(--font-display); font-weight: 700; }
.lb-body { flex: 1; min-width: 0; }
.lb-name { font-weight: 800; font-size: 0.95rem; }
.lb-row.you .lb-name { color: var(--gold); }
.lb-sub { color: var(--muted); font-size: 0.74rem; margin-top: 2px; }
.lb-pts { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; display: flex; align-items: baseline; gap: 3px; }
.lb-pts .u { font-size: 0.55rem; font-weight: 800; letter-spacing: 1px; color: var(--faint); }
.lb-you-card { text-align: center; font-size: 0.88rem; color: var(--muted); padding: 14px; }
.lb-legend { text-align: center; color: var(--faint); font-size: 0.72rem; line-height: 1.5; margin: 14px 24px 6px; }

/* group wall post */
.post.group { border-color: var(--gold-line); background: linear-gradient(180deg, rgba(212, 168, 67, 0.05), var(--card)); }
.together-tag { font-size: 0.52rem; font-weight: 800; letter-spacing: 1.6px; color: var(--gold); background: var(--gold-soft); border: 1px solid var(--gold-line); padding: 2px 6px; border-radius: 999px; vertical-align: middle; }

/* host go-live hint in the lobby */
.gs-host-hint { font-size: 0.76rem; color: var(--muted); line-height: 1.5; text-align: left; background: rgba(var(--red-rgb), 0.06); border: 1px solid rgba(var(--red-rgb), 0.25); border-radius: var(--r-md); padding: 10px 12px; }
.gs-host-hint b { color: var(--fg); }

/* ---------- INVITES ----------
   The one surface in the app built like a physical thing: a will-call ticket
   stub. Punched notches on the edges, a perforation across the middle, and a
   5-punch rail that fills as workouts land. Nothing else here has notches, so
   this screen is recognisable at a glance. */
.you-invites { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--hairline); margin-top: 14px; min-height: 60px; }
.you-invites:hover { border-color: var(--blue-line); }
.you-invites:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.yi-ic { display: flex; flex-shrink: 0; }
.yi-ic svg { width: 22px; height: 22px; }
.yi-body { flex: 1; min-width: 0; }
.yi-name { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }
.yi-sub { font-family: var(--font-body); font-weight: 800; font-size: 0.58rem; letter-spacing: 1.2px; color: var(--faint); margin-top: 2px; }
.yi-count { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--blue); font-variant-numeric: tabular-nums; }

.inv-stub {
  position: relative;
  /* lighter than the page on purpose: it is what makes the punched notches
     and the perforation read as holes in a card rather than drawn arcs */
  background: linear-gradient(180deg, rgba(104, 104, 237, 0.22), #14141F 68%);
  border: 1px solid var(--blue-line);
  border-radius: 22px 22px 18px 18px;
  overflow: hidden;
  margin-bottom: 14px;
}
.inv-stub-top { padding: 26px 20px 20px; text-align: center; }
.inv-count { font-family: var(--font-display); font-weight: 800; font-size: 4.6rem; line-height: 0.9; letter-spacing: -3px; font-variant-numeric: tabular-nums; }
.inv-count-lbl { font-family: var(--font-body); font-weight: 800; font-size: 0.6rem; letter-spacing: 2.4px; color: #aeaef7; margin-top: 9px; }
.inv-line { font-size: 0.86rem; color: var(--muted); margin-top: 10px; }
/* the perforation: punched notch, dashes, punched notch */
.inv-perf { position: relative; height: 1px; margin: 4px 26px 0; border-top: 1px dashed rgba(255, 255, 255, 0.2); }
.inv-perf::before, .inv-perf::after {
  content: ''; position: absolute; top: -11px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 1px solid rgba(104, 104, 237, 0.3);
}
.inv-perf::before { left: -37px; }
.inv-perf::after { right: -37px; }
.inv-stub-foot { padding: 16px 16px 18px; }
.inv-stub-foot .btn { width: 100%; }
.inv-stub-foot a.btn { display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }

.inv-earn { margin-bottom: 4px; }
.ie-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ie-hd { font-family: var(--font-body); font-weight: 800; font-size: 0.66rem; letter-spacing: 1.5px; color: var(--muted); }
.ie-count { font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; color: #aeaef7; font-variant-numeric: tabular-nums; }
.ie-rail { display: flex; gap: 8px; }
.ie-punch { flex: 1; height: 26px; border-radius: 7px; background: var(--elev, #12121A); border: 1px solid var(--hairline); }
.ie-punch.on { background: var(--blue); border-color: var(--blue); }
.ie-sub { font-size: 0.82rem; color: var(--muted); margin-top: 11px; }

.inv-links { padding: 6px 14px; margin-bottom: 4px; }
.inv-link { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--hairline-2); }
.inv-link:last-child { border-bottom: 0; }
.il-ic { display: flex; flex-shrink: 0; }
.il-ic svg { width: 18px; height: 18px; }
.il-body { flex: 1; min-width: 0; }
.il-code { font-family: var(--font-display); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.il-when { font-size: 0.7rem; color: var(--faint); margin-top: 2px; }
.inv-link .btn.tiny { flex-shrink: 0; min-height: 34px; }
.il-kill.danger { border-color: rgba(255, 59, 47, 0.45); color: #FF7A66; }

.inv-people { padding: 6px 14px; }
.inv-person { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--hairline-2); }
.inv-person:last-child { border-bottom: 0; }
.ip-body { flex: 1; min-width: 0; }
.ip-name { font-weight: 700; font-size: 0.92rem; }
.ip-when { font-size: 0.72rem; color: var(--faint); margin-top: 2px; }
.ip-in { font-family: var(--font-body); font-weight: 800; font-size: 0.54rem; letter-spacing: 1.4px; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 3px 8px; }
.inv-empty { display: flex; align-items: center; gap: 12px; }
.inv-empty .ie-ic svg { width: 22px; height: 22px; }
.iv-e-t { font-weight: 700; font-size: 0.92rem; }
.iv-e-s { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

/* gate: "Marcus invited you" */
.gate-invite { display: flex; align-items: center; gap: 9px; background: rgba(104, 104, 237, 0.2); border: 1px solid var(--blue-line); border-radius: 999px; padding: 9px 14px; margin-bottom: 12px; font-size: 0.86rem; }
.gate-invite.spent { background: rgba(255, 255, 255, 0.07); border-color: var(--hairline); color: var(--muted); }
.gi-tic { display: flex; flex-shrink: 0; }
.gi-tic svg { width: 17px; height: 17px; }

/* the closed door */
.iw-how { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.iw-step { display: flex; align-items: flex-start; gap: 11px; font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.iw-n { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-soft); border: 1px solid var(--blue-line); color: #aeaef7; font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; display: flex; align-items: center; justify-content: center; }
.su-form a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.iw-said { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px; padding: 16px; border-radius: 16px; background: rgba(63, 185, 96, 0.1); border: 1px solid rgba(63, 185, 96, 0.28); text-align: center; overflow-wrap: anywhere; }
.iw-said b { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--green); }
.iw-said span { font-size: 0.82rem; color: var(--muted); }

/* earned an invite, on the finish screen */
.invite-pop { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: rgba(104, 104, 237, 0.18); border: 1px solid var(--blue-line); color: #cfcffb; font-family: var(--font-display); font-weight: 700; font-size: 0.9rem; }
