/* =====================================================================
   Wolf Pack Team Hub — design system
   Light and clean: light-grey page, white cards, Wolf Pack red as the accent, and charcoal used only for depth
   (the next-game hero, scoreboard, jersey numbers, toasts). Plain CSS, no build step.
   Mobile first; tablet ≥ 768px; desktop ≥ 1100px.
   ===================================================================== */

:root {
  --red: #E8261E;
  --red-600: #C8190F;
  --red-700: #A3140C;
  --red-glow: rgba(232, 38, 30, .28);
  --red-soft: #FDECEA;
  --red-tint: #FFF5F4;

  --ink: #17181C;          /* charcoal — depth only */
  --ink-2: #26282E;
  --bg: #F2F3F5;
  --surface: #FFFFFF;
  --surface-2: #F6F6F8;
  --surface-3: #ECEDF0;
  --field: #FAFAFB;
  --line: #E7E8EC;
  --line-strong: #D6D8DE;
  --text: #15161A;
  --text-2: #44464D;
  --muted: #6E7078;

  --paper: #FFFFFF;
  --paper-2: #F6F6F8;
  --paper-text: #15161A;
  --paper-muted: #6E7078;
  --paper-line: #E7E8EC;

  --green: #16A34A;
  --green-ink: #0F7A36;
  --amber: #F5A524;
  --amber-ink: #945600;
  --grey: #8E9097;

  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 18, 24, .04), 0 6px 20px rgba(16, 18, 24, .05);
  --shadow-lift: 0 2px 4px rgba(16, 18, 24, .05), 0 14px 32px rgba(16, 18, 24, .09);
  --shadow-dark: 0 20px 44px rgba(16, 18, 24, .28);

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;

  --header-h: 66px;
  --bottom-h: 70px;
  --gutter: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--text);
  background: radial-gradient(900px 340px at 100% -140px, rgba(232, 38, 30, .07), transparent 60%), var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }   /* keep proportions when CSS sets only a width */
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid rgba(232, 38, 30, .55); outline-offset: 2px; border-radius: 6px; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

h1, h2, h3, h4, .display { font-family: var(--font-display); font-weight: 800; letter-spacing: .005em; line-height: 1.05; margin: 0; text-transform: uppercase; color: var(--text); }
h1 { font-size: clamp(2rem, 6.5vw, 2.7rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0; }
.eyebrow { font-family: var(--font); font-weight: 800; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.num { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ------------------------------------------------------------------ layout */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell-body { flex: 1; display: flex; width: 100%; max-width: 1440px; margin: 0 auto; }
.main { flex: 1; min-width: 0; padding: 22px var(--gutter) calc(var(--bottom-h) + 32px); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-sm { display: flex; align-items: center; gap: 6px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; grid-template-columns: 1fr; }
.grid-stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.hide-mobile { display: none; }

@media (min-width: 768px) {
  :root { --gutter: 24px; }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hide-mobile { display: initial; }
  .hide-tablet-up { display: none !important; }
  .span-2 { grid-column: span 2; }
}
@media (min-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .main { padding: 30px 34px 48px; }
  .grid-main { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}

/* ------------------------------------------------------------------ header */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  display: flex; align-items: center; gap: 10px; padding: 0 var(--gutter);
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--red); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { height: 48px; width: auto; filter: drop-shadow(0 3px 8px rgba(232, 38, 30, .22)); }
.brand-name { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: 1; font-size: 1.2rem; letter-spacing: .02em; }
.brand-name small { display: block; font-family: var(--font); font-size: .66rem; letter-spacing: .16em; color: var(--red); font-weight: 800; margin-top: 4px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: transparent; border: 1px solid transparent; color: var(--text); }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.icon { width: 22px; height: 22px; flex: none; }
.icon-sm { width: 18px; height: 18px; flex: none; }
.icon-lg { width: 28px; height: 28px; flex: none; }

/* language selector — always visible; plain <details> so it works without JavaScript */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }

/* a collapsible <section><details> card, e.g. "Change password" — plain <details> so it works without JS */
.details-plain > summary { list-style: none; cursor: pointer; }
.details-plain > summary::-webkit-details-marker { display: none; }
.details-plain > summary .chevron { transition: transform .15s ease; }
.details-plain[open] > summary .chevron { transform: rotate(180deg); }
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: .92rem; cursor: pointer; box-shadow: 0 1px 2px rgba(16, 18, 24, .05);
}
.lang-btn .icon-sm { color: var(--red); }
.dropdown[open] > .lang-btn { border-color: var(--red); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 236px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(16, 18, 24, .16); padding: 8px; }
.menu-title { padding: 8px 10px 6px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; color: var(--text); font-weight: 600; }
.menu-item.is-active { background: var(--red-tint); color: var(--red-700); }
.menu-item .code { width: 36px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-3); font-family: var(--font-display); font-weight: 800; font-size: .85rem; color: var(--text-2); }
.menu-item.is-active .code { background: var(--red); color: #fff; }
.menu-item .check { margin-left: auto; color: var(--red); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
/* Pinned with absolute + transform, not grid centering: the icon-btn it sits in is position:relative inside a
   sticky, backdrop-filter header, and on iOS Safari that combination can leave grid/flex-centered content
   floating at a stale offset after a page swap. A transform anchored to the parent's own box never depends on
   that recalculation, so it can't drift regardless. */
.avatar-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--red); overflow: hidden; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* demo role switcher */
.demo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px var(--gutter); background: var(--red-tint); border-bottom: 1px solid #F6D3D0; font-size: .85rem; }
.demo-tag { font-weight: 800; letter-spacing: .12em; font-size: .72rem; padding: 4px 9px; border-radius: 999px; background: var(--red); color: #fff; }
.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-3); border-radius: 999px; overflow-x: auto; max-width: 100%; }
.seg button, .seg a { border: 0; background: transparent; color: var(--text-2); min-height: 36px; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .88rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg .is-active { background: var(--red); color: #fff; box-shadow: 0 4px 12px var(--red-glow); }

/* ------------------------------------------------------------------ navigation */
.sidebar { display: none; }
@media (min-width: 1100px) {
  .sidebar { display: block; position: sticky; top: var(--header-h); align-self: flex-start; width: 250px; flex: none; height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 22px 12px 24px 16px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .55); }
  .bottom-nav { display: none !important; }
  .main { padding-bottom: 48px; }
}
.nav-section { margin-top: 18px; }
.nav-section:first-child { margin-top: 0; }
.nav-heading { padding: 0 12px 6px; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; }
.nav-link .icon { color: var(--muted); }
.nav-link.is-active { background: var(--surface); color: var(--text); font-weight: 800; box-shadow: var(--shadow), inset 3px 0 0 var(--red); }
.nav-link.is-active .icon { color: var(--red); }
.nav-link .badge-count { margin-left: auto; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; padding: 1px 7px; border-radius: 10px; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--bottom-h) + env(safe-area-inset-bottom));
  padding: 6px 6px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 18, 24, .05);
  /* iOS Safari can visually detach a `position: fixed` bar during scroll and leave it floating mid-page,
     especially after a wire:navigate swap (only clearing once the page is fully re-laid out, e.g. on reopen).
     Forcing this onto its own GPU layer stops that drift — the standard fix for this exact WebKit quirk. */
  transform: translateZ(0); -webkit-transform: translateZ(0); will-change: transform;
}
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 700; border-radius: 12px; position: relative; }
.bottom-nav .is-active { color: var(--red); }
.bottom-nav .is-active::before { content: ""; position: absolute; top: -6px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
.bottom-nav .pip { position: absolute; top: 4px; left: 55%; min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); color: #fff; font-size: .65rem; display: grid; place-items: center; padding: 0 4px; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(16, 18, 24, .45); backdrop-filter: blur(2px); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 71; max-height: 88vh; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 50px rgba(16, 18, 24, .2); }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 12px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px; background: var(--surface-2); font-size: .82rem; font-weight: 700; text-align: center; color: var(--text-2); }
.sheet-grid a .icon { color: var(--red); }
.sheet-grid a.is-active { background: var(--red-tint); color: var(--red-700); box-shadow: inset 0 0 0 1px #F6CDCA; }
@media (min-width: 768px) { .sheet { left: 50%; right: auto; bottom: 50%; transform: translate(-50%, 50%); width: min(560px, 92vw); border-radius: 24px; } }

/* ------------------------------------------------------------------ page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .eyebrow { margin-bottom: 6px; }
.page-head .sub { color: var(--muted); margin-top: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: .9rem; margin-bottom: 10px; min-height: 36px; }

/* ------------------------------------------------------------------ cards */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { font-size: 1.2rem; }
.card-link { color: var(--red); font-weight: 800; font-size: .88rem; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-head { padding: 18px 20px 0; }
.card-paper { background: var(--surface); }
.card-accent { box-shadow: var(--shadow), inset 4px 0 0 var(--red); }

/* the dark card that gives depth: next game */
.card-hero {
  overflow: hidden; color: #fff; border: 0; border-radius: 26px;
  background: radial-gradient(480px 220px at 105% -20%, rgba(232, 38, 30, .30), transparent 62%), linear-gradient(160deg, var(--ink-2), var(--ink) 70%);
  box-shadow: var(--shadow-dark);
}
.card-hero::before { content: ""; position: absolute; right: -90px; top: -90px; width: 260px; height: 260px; border-radius: 50%; border: 44px solid rgba(255, 255, 255, .035); pointer-events: none; }
.card-hero::after { content: ""; position: absolute; right: -110px; bottom: -150px; width: 240px; height: 240px; border-radius: 50%; border: 2px dashed rgba(232, 38, 30, .45); pointer-events: none; }
.card-hero h1, .card-hero h2, .card-hero h3 { color: #fff; }
.card-hero .eyebrow { display: inline-block; color: #fff; background: var(--red); padding: 5px 11px; border-radius: 999px; letter-spacing: .1em; }
.card-hero .muted { color: rgba(255, 255, 255, .72); }
.card-hero .icon-sm { color: #FF6A61; }
.card-hero a:not(.btn) { color: #fff; }
.card-hero .btn-light { color: var(--text); }

/* stat tiles */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; box-shadow: var(--shadow); }
.stat .label { font-size: .72rem; color: var(--muted); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.stat .value { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: .8rem; color: var(--muted); }
.stat .icon-wrap { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); flex: none; }
.stat.is-alert { border-color: #F6CDCA; background: linear-gradient(180deg, var(--red-tint), var(--surface)); }
.card .stat { box-shadow: none; background: var(--surface-2); border-color: transparent; }

/* date block: red for the date line, used everywhere */
.datebox { flex: none; width: 64px; border-radius: 14px; overflow: hidden; text-align: center; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.datebox .dow { background: var(--red); color: #fff; font-weight: 800; font-size: .7rem; letter-spacing: .1em; padding: 4px 0; text-transform: uppercase; }
.datebox .day { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; padding-top: 2px; }
.datebox .mon { font-weight: 800; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; padding-bottom: 5px; color: var(--red-600); }
.card-hero .datebox { background: #fff; border-color: #fff; color: var(--text); }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 800; font-size: .98rem; line-height: 1.1; text-align: center; transition: transform .12s ease, box-shadow .15s ease, background .15s ease; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px var(--red-glow); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: 0 1px 2px rgba(16, 18, 24, .05); }
.btn-secondary .icon-sm, .btn-secondary .icon { color: var(--red); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-success { background: var(--green); color: #fff; }
.btn-danger { background: transparent; color: var(--red-600); border-color: #F2B8B3; }
.btn-light { background: #fff; color: var(--text); }
.btn-light .icon-sm { color: var(--red); }
.btn-lg { min-height: 58px; font-size: 1.05rem; padding: 12px 22px; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .86rem; }
.btn-block { width: 100%; }
.grid-4 > .btn { border-radius: 18px; }

/* RSVP pair */
.rsvp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rsvp-btn { min-height: 62px; border-radius: 999px; border: 2px solid transparent; font-weight: 800; font-size: 1.02rem; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; text-align: center; line-height: 1.15; }
.rsvp-yes { background: #EAF8EF; color: var(--green-ink); border-color: #C5EBD2; }
.rsvp-no { background: var(--red-tint); color: var(--red-700); border-color: #F6CDCA; }
.rsvp-yes.is-on { background: var(--green); color: #fff; border-color: var(--green); box-shadow: 0 8px 20px rgba(22, 163, 74, .3); }
.rsvp-no.is-on { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 8px 20px var(--red-glow); }

/* ------------------------------------------------------------------ badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: .77rem; font-weight: 800; white-space: nowrap; border: 1px solid transparent; background: var(--surface-3); color: var(--text-2); }
.badge .icon-sm { width: 14px; height: 14px; }
.badge-green { background: #E7F7EC; color: var(--green-ink); border-color: #C5EBD2; }
.badge-amber { background: #FFF4DE; color: var(--amber-ink); border-color: #F5DDA8; }
.badge-red { background: var(--red-soft); color: var(--red-700); border-color: #F6CDCA; }
.badge-grey { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }
.badge-white { background: #fff; color: var(--text); }
.badge-solid-red { background: var(--red); color: #fff; }
.card-hero .badge-green { background: rgba(34, 197, 94, .18); color: #86EFAC; border-color: rgba(34, 197, 94, .35); }
.card-hero .badge-amber { background: rgba(245, 165, 36, .18); color: #FFD27A; border-color: rgba(245, 165, 36, .35); }
.demo-label { display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-ink); background: #FFF8EA; border: 1px dashed #EFC77A; padding: 2px 7px; border-radius: 6px; }

/* ------------------------------------------------------------------ lists */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-height: 60px; }
.list-item:first-child { border-top: 0; }
.list-item > .icon { color: var(--red); }
.card-flush .list-item { padding-left: 20px; padding-right: 20px; }
.list-title { font-weight: 700; }
.list-meta { color: var(--muted); font-size: .86rem; }
.chev { color: var(--line-strong); margin-left: auto; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #EEEFF2, #E1E3E8); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--text-2); overflow: hidden; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 92px; height: 92px; font-size: 1.9rem; border-width: 3px; box-shadow: 0 0 0 3px var(--red), 0 10px 24px rgba(232, 38, 30, .22); }
.avatar-sm { width: 34px; height: 34px; font-size: .82rem; }
.jersey { flex: none; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; background: var(--ink); color: #fff; }
.jersey-red { background: var(--red); }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-weight: 700; font-size: .9rem; color: var(--text); }
.help { font-size: .82rem; color: var(--muted); }
.error { font-size: .85rem; color: var(--red-600); font-weight: 700; }
.input, .select, .textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--field); border: 1px solid var(--line-strong); color: var(--text); font-size: 1rem; }
.textarea { min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red); background: #fff; box-shadow: 0 0 0 4px rgba(232, 38, 30, .12); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--red); background: var(--red-tint); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8261E' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--red); flex: none; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-weight: 700; font-size: .88rem; color: var(--text-2); }
.chip.is-active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 12px var(--red-glow); }
.chip.is-active .type-dot { background: #fff !important; box-shadow: none !important; }
.chip:disabled { opacity: .45; cursor: not-allowed; border-color: var(--line-strong); color: var(--text-2); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.search { position: relative; flex: 1; min-width: 200px; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--red); }
.search .input { padding-left: 44px; border-radius: 999px; background: var(--surface); }

.scale { display: flex; gap: 6px; }
.scale button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--text-2); }
.scale button.is-on { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 6px 14px var(--red-glow); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.stepper button { width: 40px; height: 42px; border: 0; background: var(--surface-2); font-size: 1.2rem; font-weight: 800; color: var(--red); }
.stepper button:active { background: var(--red); color: #fff; }
.stepper .val { min-width: 36px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }

/* ------------------------------------------------------------------ tabs */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 6px 14px; margin: -4px -6px 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 42px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.tab .icon-sm { color: var(--red); }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 6px 16px rgba(16, 18, 24, .2); }
.tab.is-active .icon-sm { color: #FF6A61; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num, .table th.num { text-align: right; }

/* ------------------------------------------------------------------ progress & charts */
.bar { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--red-600), #FF5A4F); transition: width .2s linear; }
.bar.green > span { background: linear-gradient(90deg, #15A34A, #4ADE80); }
.skill { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.skill .bar { grid-column: 1 / -1; }
.skill-pips { display: flex; gap: 4px; }
.skill-pips i { width: 18px; height: 8px; border-radius: 4px; background: var(--surface-3); }
.skill-pips i.on { background: var(--red); }
.ring { --p: 0; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--red) calc(var(--p) * 1%), var(--surface-3) 0); flex: none; }
.ring > div { width: 62px; height: 62px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.ring.green { background: conic-gradient(var(--green) calc(var(--p) * 1%), var(--surface-3) 0); }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); font-weight: 600; }
.chart .line { fill: none; stroke: var(--red); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: #fff; stroke: var(--red); stroke-width: 3; }

/* countdown (on the dark hero) */
.countdown { display: flex; gap: 8px; }
.countdown div { min-width: 60px; padding: 9px 6px; border-radius: 14px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); text-align: center; }
.countdown b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
.countdown span { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }

.uniform { display: flex; align-items: center; gap: 14px; }
.shirt { flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); }
.shirt svg { width: 40px; height: 40px; }

/* ------------------------------------------------------------------ calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .7rem; font-weight: 800; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; padding: 6px 0; }
.cal-day { min-height: 66px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; padding: 6px; display: flex; flex-direction: column; gap: 3px; text-align: left; }
.cal-day.is-out { opacity: .4; }
.cal-day.is-today { background: #fff; border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.cal-day .d { font-family: var(--font-display); font-weight: 800; font-size: .95rem; }
.cal-ev { display: block; font-size: .68rem; font-weight: 800; padding: 2px 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.t-game { background: var(--red); color: #fff; }
.cal-ev.t-practice { background: #E3F6EA; color: var(--green-ink); }
.cal-ev.t-meeting, .cal-ev.t-registration { background: #FFF1D6; color: var(--amber-ink); }
.cal-ev.t-fundraiser, .cal-ev.t-other { background: var(--ink); color: #fff; }
@media (max-width: 560px) { .cal-day { min-height: 52px; padding: 4px; } .cal-ev { font-size: 0; height: 6px; padding: 0; } }
.type-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--grey); }
.type-dot.t-game { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.type-dot.t-practice { background: var(--green); }
.type-dot.t-meeting, .type-dot.t-registration { background: var(--amber); }
.type-dot.t-fundraiser, .type-dot.t-other { background: var(--ink); }

/* ------------------------------------------------------------------ game day & lineup */
.field-svg { width: 100%; max-width: 440px; margin: 0 auto; border-radius: 18px; }
.pos-chip { cursor: pointer; }
.pos-chip rect { fill: rgba(23, 24, 28, .88); stroke: rgba(255, 255, 255, .25); stroke-width: 1.5; }
.pos-chip.is-filled rect { fill: #fff; stroke: #fff; }
.pos-chip .pos-code { fill: #FF6A61; font: 800 11px var(--font-display); }
.pos-chip.is-filled .pos-code { fill: var(--red); }
.pos-chip .pos-name { fill: #C9CBD1; font: 700 12px var(--font); }
.pos-chip.is-filled .pos-name { fill: var(--text); }
.pos-chip.is-selected rect { stroke: var(--red); stroke-width: 3; }
.order-list { display: flex; flex-direction: column; gap: 6px; }
.order-item { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 6px 8px 6px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16, 18, 24, .04); }
.order-item.is-out { opacity: .45; }
.order-item .n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; flex: none; }
.order-item .handle { color: var(--muted); cursor: grab; padding: 6px; }
.order-item.dragging { opacity: .5; outline: 2px dashed var(--red); }
.order-item .mini { display: flex; gap: 2px; }
.order-item .mini button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--red); }
.order-item .mini button[disabled] { opacity: .35; }
.pos-select { min-height: 40px; padding: 6px 30px 6px 12px; font-size: .9rem; font-weight: 800; width: auto; background-position: right 8px center; border-radius: 999px; }
.inning-cell { text-align: center; padding: 6px 4px; border-radius: 8px; background: var(--red-soft); color: var(--red-700); font-family: var(--font-display); font-weight: 800; }
.inning-cell.is-bench { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.scoreboard { display: grid; grid-template-columns: 1fr repeat(3, 64px); background: var(--ink); color: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-dark); }
.scoreboard > div { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); display: flex; align-items: center; }
.scoreboard .h { font-size: .72rem; letter-spacing: .12em; color: #A6A8AF; font-weight: 800; justify-content: center; }
.scoreboard .team { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.05rem; }
.scoreboard .v { justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: #FF8A84; }
.scoreboard > div:nth-last-child(-n+4) { border-bottom: 0; }
.scoreboard .input { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .15); color: #fff; }
.reco { border: 1px dashed #EFC77A; background: #FFFBF1; border-radius: var(--radius); padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.reco .icon { color: var(--amber-ink); margin-top: 2px; }
.avail { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.avail > div { border-radius: 16px; padding: 12px; text-align: center; background: var(--surface-2); }
.avail b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; line-height: 1; }
.avail .g b { color: var(--green); } .avail .r b { color: var(--red); } .avail .a b { color: #D98A00; }

/* ------------------------------------------------------------------ messages */
.thread { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 84%; padding: 10px 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.bubble.mine { align-self: flex-end; background: var(--red); border-color: var(--red); color: #fff; border-bottom-right-radius: 5px; }
.bubble.theirs { border-bottom-left-radius: 5px; }
.bubble .meta { font-size: .72rem; opacity: .75; margin-top: 4px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer .textarea { min-height: 50px; border-radius: 24px; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); flex: none; }

/* ------------------------------------------------------------------ modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(16, 18, 24, .45); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; }
.modal { width: 100%; max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px rgba(16, 18, 24, .22); border-top: 4px solid var(--red); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (min-width: 768px) { .modal-backdrop { align-items: center; padding: 24px; } .modal { width: min(620px, 100%); border-radius: 24px; } .modal-wide { width: min(860px, 100%); } }

/* ------------------------------------------------------------------ toast */
.toasts { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); top: calc(var(--header-h) + 10px); width: min(460px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 16px 40px rgba(16, 18, 24, .3); border-left: 6px solid var(--green); }
.toast.is-error { border-left-color: var(--red); }
.toast .icon { color: #4ADE80; }
.toast.is-error .icon { color: #FF6A61; }

/* ------------------------------------------------------------------ empty state & alerts */
.empty { text-align: center; padding: 34px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .icon-lg { color: var(--red); width: 44px; height: 44px; padding: 10px; box-sizing: content-box; border-radius: 50%; background: var(--red-soft); }
.empty strong { color: var(--text); font-family: var(--font-display); text-transform: uppercase; font-size: 1.15rem; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.alert .icon { margin-top: 1px; color: var(--muted); }
.alert-red { border-color: #F6CDCA; background: #FEF3F2; }
.alert-red .icon { color: var(--red); }
.alert-amber { border-color: #F5DDA8; background: #FFFAF0; }
.alert-amber .icon { color: var(--amber-ink); }
.alert-green { border-color: #C5EBD2; background: #F1FBF4; }
.alert-green .icon { color: var(--green); }

/* child switcher */
.kids { display: flex; gap: 8px; overflow-x: auto; padding: 4px 6px 16px; margin: -4px -6px -10px; scrollbar-width: none; }
.kids::-webkit-scrollbar { display: none; }
.kid { flex: none; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 6px 18px 6px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 800; box-shadow: 0 1px 2px rgba(16, 18, 24, .05); }
.kid.is-active { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 8px 20px rgba(16, 18, 24, .22); }
.kid.is-active .avatar { box-shadow: 0 0 0 2px var(--red); border-color: var(--ink); }

/* ------------------------------------------------------------------ auth pages */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px 40px; background: radial-gradient(700px 320px at 50% -120px, rgba(232, 38, 30, .10), transparent 65%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { width: 230px; margin: 0 auto 10px; filter: drop-shadow(0 10px 24px rgba(232, 38, 30, .25)); }
.auth-title { text-align: center; font-size: 2.4rem; }
.auth-title span { color: var(--red); display: block; }
.auth-tagline { text-align: center; color: var(--muted); margin: 8px 0 22px; font-weight: 700; }
.auth-top { position: fixed; top: 14px; right: 14px; z-index: 5; }
.demo-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin: 18px 0; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }

/* ------------------------------------------------------------------ misc */
.kv { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 8px 14px; font-size: .95rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.note { padding: 12px 14px; border-radius: 14px; background: var(--red-tint); border-left: 4px solid var(--red); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 600; }
.checklist .box { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; background: #fff; }
.checklist .box.on { background: var(--green); border-color: var(--green); color: #fff; }
.money { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.divider-line { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.link { color: var(--red); font-weight: 800; }
.offline-banner { position: fixed; bottom: calc(var(--bottom-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 50; background: var(--ink); color: #fff; font-weight: 700; padding: 8px 14px; border-radius: 999px; font-size: .88rem; box-shadow: 0 8px 20px rgba(16, 18, 24, .25); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media (max-width: 560px) {
  .demo-bar { flex-wrap: nowrap; gap: 8px; padding: 6px 12px; }
  .demo-bar .seg button { padding: 6px 10px; min-height: 32px; font-size: .82rem; }
}

/* ------------------------------------------------------------------ no zoom (owner's choice)
   Pinch and double-tap zoom are off; every form field is at least 16px so iPhones never zoom in on focus. */
html, body { touch-action: pan-x pan-y; }
input, select, textarea, .input, .select, .textarea, .pos-select { font-size: max(16px, 1em); }

/* ------------------------------------------------------------------ landing page ("coming soon") */
.lp { background: radial-gradient(1000px 420px at 85% -120px, rgba(232, 38, 30, .10), transparent 60%), var(--bg); }
.lp-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px var(--gutter); background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.lp-top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--red); }
.lp-hero { max-width: 1240px; margin: 0 auto; padding: 36px var(--gutter) 20px; display: grid; gap: 34px; align-items: center; }
.lp-soon { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; box-shadow: 0 8px 22px var(--red-glow); }
.lp-soon-dark { background: rgba(255, 255, 255, .1); box-shadow: none; }
.lp-pulse { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: lp-pulse 1.6s ease-out infinite; }
@keyframes lp-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); } 100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }
.lp-title { margin-top: 18px; font-size: clamp(3.2rem, 13vw, 6.4rem); font-weight: 900; line-height: .86; letter-spacing: -.01em; }
.lp-title span { display: block; color: var(--red); }
.lp-slogan { margin-top: 14px; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.3rem); text-transform: uppercase; }
.lp-intro { margin-top: 12px; max-width: 560px; font-size: 1.08rem; color: var(--text-2); }

/* dark stage with the devices — the one place with depth */
.lp-stage { position: relative; min-height: 400px; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-dark);
  background: radial-gradient(360px 200px at 12% 6%, rgba(255, 70, 55, .5), transparent 70%), radial-gradient(360px 200px at 92% 8%, rgba(255, 70, 55, .4), transparent 70%),
    linear-gradient(180deg, #121318 0%, #17181C 55%, #10301C 56%, #0C2415 100%); }
.lp-lights { position: absolute; top: 18px; left: 18px; display: grid; grid-template-columns: repeat(5, 12px); gap: 6px; filter: drop-shadow(0 0 16px rgba(255, 90, 70, .9)); }
.lp-lights i { width: 12px; height: 12px; border-radius: 50%; background: #FFE3DC; }
.lp-stage-logo { position: absolute; right: 16px; top: 14px; width: 120px; filter: drop-shadow(0 8px 20px rgba(232, 38, 30, .45)); }
.lp-tablet { position: absolute; right: -40px; top: 90px; width: 78%; padding: 10px; border-radius: 22px; background: linear-gradient(145deg, #2c2e34, #0c0d10); box-shadow: 0 30px 60px rgba(0, 0, 0, .6); transform: rotate(-2deg); }
.lp-tablet img { width: 100%; height: auto; border-radius: 13px; display: block; }
.lp-phone { position: absolute; left: 18px; top: 70px; width: 38%; max-width: 230px; padding: 8px; border-radius: 34px; background: linear-gradient(145deg, #34363c, #0b0c0e); box-shadow: 0 30px 60px rgba(0, 0, 0, .7), 0 0 40px rgba(232, 38, 30, .25); transform: rotate(-5deg); z-index: 2; }
.lp-phone img { width: 100%; height: auto; border-radius: 27px; display: block; }
.lp-notch { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 36%; height: 16px; border-radius: 10px; background: #0b0c0e; z-index: 2; }
.lp-stamp { position: absolute; right: 18px; bottom: 22px; z-index: 3; padding: 12px 22px; border-radius: 14px; background: var(--red); color: #fff; font-family: var(--font-display); font-weight: 900; font-size: clamp(1.5rem, 5vw, 2.2rem); letter-spacing: .04em; text-transform: uppercase; transform: rotate(-6deg); border: 3px solid #fff; box-shadow: 0 16px 36px rgba(232, 38, 30, .55); }

.lp-section { max-width: 1240px; margin: 0 auto; padding: 34px var(--gutter); }
.lp-h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 20px; }
.lp-features { display: grid; gap: 14px; grid-template-columns: 1fr; }
.lp-feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.lp-feature h3 { margin-top: 14px; font-size: 1.25rem; }
.lp-feature p { margin-top: 6px; color: var(--text-2); }
.lp-ring { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; border: 4px solid var(--red); box-shadow: 0 0 22px rgba(232, 38, 30, .35); }
.lp-duo { display: grid; gap: 16px; grid-template-columns: 1fr; }
.lp-list { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 10px; }
.lp-list li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.lp-list .icon-sm { color: var(--green); margin-top: 3px; }
.lp-access { display: grid; gap: 20px; align-items: center; padding: 28px; border-radius: 26px; color: #fff; background: radial-gradient(420px 200px at 100% 0, rgba(232, 38, 30, .35), transparent 65%), linear-gradient(160deg, var(--ink-2), var(--ink)); box-shadow: var(--shadow-dark); }
.lp-access h2 { color: #fff; font-size: clamp(1.6rem, 5vw, 2.2rem); }
.lp-code { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.lp-code .input { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #fff; }
.lp-code .input::placeholder { color: rgba(255, 255, 255, .55); }
.lp-footer { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 28px var(--gutter) 40px; color: var(--muted); font-weight: 600; font-size: .9rem; }
@media (min-width: 768px) {
  .lp-features { grid-template-columns: repeat(3, 1fr); }
  .lp-duo { grid-template-columns: 1fr 1fr; }
  .lp-access { grid-template-columns: 1.2fr 1fr; padding: 36px; }
  .lp-stage { min-height: 460px; }
}
@media (min-width: 1100px) {
  .lp-hero { grid-template-columns: 1fr 1.05fr; padding-top: 56px; }
  .lp-features { grid-template-columns: repeat(5, 1fr); }
  .lp-stage { min-height: 520px; }
}
@media (max-width: 560px) { .lp-code { grid-template-columns: 1fr; } .lp-stage { min-height: 360px; } .lp-tablet { top: 110px; } }
@media (max-width: 560px) {
  .lp-brand-name { display: none; }
  .lp-stage-logo { width: 78px; right: 12px; top: 10px; }
  .lp-top .btn-sm { padding: 6px 12px; }
}

/* player profile header actions: full-width row on phones, compact row on larger screens */
.player-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .player-actions { display: flex; justify-content: flex-end; } }

/* instant tap feedback: Livewire marks the element that started a request with data-loading */
.btn[data-loading], .rsvp-btn[data-loading], .chip[data-loading], .tab[data-loading], .scale button[data-loading], .stepper button[data-loading] { opacity: .6; cursor: progress; }
.btn[data-loading]::after { content: ""; width: 14px; height: 14px; margin-left: 4px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: wp-spin .7s linear infinite; }
@keyframes wp-spin { to { transform: rotate(360deg); } }

/* Who is online */
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: #C9CBD1; flex: none; display: inline-block; }
.online-dot.is-on { background: #1FA35B; box-shadow: 0 0 0 3px rgba(31, 163, 91, .18); }

/* News feed */
.composer-input { min-height: 50px; }
.post-body { white-space: pre-line; overflow-wrap: anywhere; font-size: 1.02rem; line-height: 1.5; }
.post-actions { display: flex; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.post-action { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; background: transparent; border: 0; color: var(--text-2); }
.post-action.is-on { background: var(--red-tint); color: var(--red); }

.post-count { background: none; border: 0; color: inherit; font: inherit; display: inline-flex; align-items: center; gap: 4px; min-height: 32px; }
.comment { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; min-width: 0; }
.comments { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.comment-row { align-items: flex-start; gap: 8px; }
.comment { display: inline-block; max-width: 100%; }
.comment-meta { font-size: .75rem; color: var(--muted); padding: 2px 12px 0; }
.comment-input { min-height: 40px; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); border-color: transparent; font-size: .95rem; }
.comment-send { color: var(--red); }
.comment-send:disabled { opacity: .5; }
.comment-actions { display: flex; align-items: center; gap: 14px; font-size: .78rem; font-weight: 700; color: var(--muted); padding: 2px 12px 0; }
.comment-actions button { background: none; border: 0; color: inherit; font: inherit; display: inline-flex; align-items: center; gap: 4px; min-height: 28px; }
.comment-actions button.is-on { color: var(--red); }
.replies { margin-left: 44px; display: flex; flex-direction: column; gap: 8px; }

/* News feed: media */
.post-media-grid { display: grid; gap: 4px; border-radius: var(--radius-sm); overflow: hidden; }
.post-media-grid-1 { grid-template-columns: 1fr; }
.post-media-grid-1 .post-media-item { aspect-ratio: 4 / 3; }
.post-media-grid-2 .post-media-item, .post-media-grid-3 .post-media-item, .post-media-grid-4 .post-media-item { aspect-ratio: 1 / 1; }
.post-media-grid-2, .post-media-grid-3, .post-media-grid-4 { grid-template-columns: repeat(2, 1fr); }
.post-media-item { position: relative; display: block; padding: 0; margin: 0; border: 0; background: var(--surface-2); cursor: zoom-in; }
.post-media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-media-lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(10, 11, 14, .92); display: flex; align-items: center; justify-content: center; }
.post-media-lightbox-inner { max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.post-media-lightbox-inner img { max-width: 94vw; max-height: 78vh; object-fit: contain; border-radius: var(--radius-sm); }
.post-media-lightbox-bar { display: flex; align-items: center; gap: 10px; }
.post-media-lightbox-bar .icon-btn { color: #fff; }
.post-video { border-radius: var(--radius-sm); overflow: hidden; }
.post-video-wrap { position: relative; }
.post-video video { width: 100%; max-height: 70vh; background: #000; display: block; border-radius: var(--radius-sm); }
.post-video-spinner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: wp-spin .8s linear infinite; }

/* Composer: selected photos/video before posting */
.composer-media-row { display: flex; gap: 8px; flex-wrap: wrap; }
.upload-progress { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.media-picks { display: flex; gap: 8px; overflow-x: auto; padding: 2px; }
.media-pick { position: relative; flex: none; width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.media-pick img, .media-pick video { width: 100%; height: 100%; object-fit: cover; }
.media-pick-video { width: 140px; }
.media-pick-remove { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(16, 18, 24, .65); color: #fff; border: 0; display: grid; place-items: center; }
.media-pick-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .35); }
.media-pick-progress span { display: block; height: 100%; background: var(--red); transition: width .2s; }
.icon-btn:disabled { opacity: .4; }

/* All :hover styling lives here, gated to devices that can actually hover (a mouse/trackpad). On a touchscreen
   without this guard, iOS Safari treats a hover-styled element as needing a first tap just to "focus" it (to
   preview the hover state) and only a second tap to actually activate it — links and buttons across the app
   would need two taps instead of one. Every rule that also carries a non-hover state (an open dropdown, an
   active toggle) stays unconditional above; only the pure hover effect moves here. */
@media (hover: hover) {
    .icon-btn:hover { background: var(--surface-2); }
    .lang-btn:hover { border-color: var(--red); }
    .menu-item:hover { background: var(--surface-2); }
    .seg button:not(.is-active):hover, .seg a:not(.is-active):hover { background: rgba(255, 255, 255, .7); color: var(--text); }
    .nav-link:hover { background: var(--surface); color: var(--text); }
    .back-link:hover { color: var(--red); }
    a.card:hover, a.card-lift:hover { box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
    .card-link:hover { text-decoration: underline; }
    .btn-primary:hover { background: var(--red-600); }
    .btn-secondary:hover { border-color: var(--red); color: var(--red-700); }
    .btn-ghost:hover { background: var(--surface-2); color: var(--text); }
    .btn-danger:hover { background: var(--red-tint); }
    .list-item.is-link:hover .list-title { color: var(--red-700); }
    .chip:hover:not(.is-active) { border-color: var(--red); color: var(--text); }
    .table tbody tr:hover { background: var(--red-tint); }
    .link:hover { text-decoration: underline; }
    .post-action:hover { background: var(--red-tint); color: var(--red); }
    .post-count:not(:disabled):hover { color: var(--red); }
    .comment-actions button:hover { text-decoration: underline; }
}

/* ------------------------------------------------------------------ first-login welcome animation */
.welcome-intro {
  position: fixed; inset: 0; z-index: 200; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
  opacity: 1; transform: scale(1);
  transition: opacity .8s ease, transform .8s ease;
}
.welcome-intro.is-leaving { opacity: 0; transform: scale(1.08); }

.welcome-intro-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(120% 90% at 50% 18%, rgba(232, 38, 30, .22), transparent 60%), linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, #0c0d0f 100%);
  opacity: 0; animation: wi-bg-fade .6s ease-out both;
}

.welcome-intro-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 3vw, 20px); max-width: min(92vw, 560px); }

.welcome-intro-logo { width: min(46vw, 200px); height: auto; opacity: 0; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .5)); animation: wi-logo-pop .9s cubic-bezier(.34, 1.56, .64, 1) .15s both; }

.welcome-intro-text { position: relative; z-index: 1; opacity: 0; animation: wi-text-up .8s ease-out .55s both; }
.welcome-intro-eyebrow { margin: 0; font-family: var(--font); font-weight: 800; font-size: clamp(.74rem, 2.6vw, .92rem); letter-spacing: .22em; text-transform: uppercase; color: var(--red); }
.welcome-intro-title { margin: 6px 0 0; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; font-size: clamp(1.6rem, 7vw, 2.6rem); color: #fff; }
.welcome-intro-rule { display: block; width: 120px; max-width: 40vw; height: 4px; margin: 14px auto 0; border-radius: 3px; background: var(--red); transform-origin: center; transform: scaleX(0); animation: wi-rule-grow .5s ease-out 1.05s both; }

.welcome-intro-confetti { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.wi-confetti-piece {
  position: absolute; top: -12%; border-radius: 2px; opacity: .95;
  animation-name: wi-fall; animation-timing-function: cubic-bezier(.4, 0, .6, 1); animation-iteration-count: infinite; animation-fill-mode: both;
}

@keyframes wi-bg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wi-logo-pop { 0% { opacity: 0; transform: scale(.4); } 55% { opacity: 1; transform: scale(1.08); } 75% { transform: scale(.97); } 100% { opacity: 1; transform: scale(1); } }
@keyframes wi-text-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wi-rule-grow { to { transform: scaleX(1); } }
@keyframes wi-fall { 0% { transform: translateY(-10vh) translateX(0) rotate(0deg); } 100% { transform: translateY(115vh) translateX(var(--wi-drift, 0)) rotate(var(--wi-spin, 180deg)); } }
