/* =====================================================================
   Gridiron Confidence — app styles
   Mobile-first, dark stadium palette, motion used to explain state.
   ===================================================================== */

:root {
  --bg:        #070b14;
  --bg-2:      #0b1220;
  --surface:   #111a2b;
  --surface-2: #16223a;
  --surface-3: #1d2b47;
  --line:      rgba(148, 163, 184, .14);
  --line-hi:   rgba(148, 163, 184, .28);

  --text:   #e8edf7;
  --text-2: #b9c5db;
  --muted:  #7f8fab;

  --accent:   #f5a524;   /* confidence points */
  --accent-2: #ffca62;
  --turf:     #1fa54a;   /* selected / correct */
  --turf-dim: rgba(31, 165, 74, .16);
  --loss:     #ef4444;
  --loss-dim: rgba(239, 68, 68, .14);
  --info:     #4a9bf5;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;

  --shadow:    0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .6);

  --tab-h: 62px;
  --bar-h: 58px;

  --ease:   cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { min-height: 100dvh; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9;
      stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ---------------------------------------------- animated field lines */
.field-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(31, 165, 74, .13), transparent 60%),
    radial-gradient(90% 50% at 90% 110%, rgba(245, 165, 36, .08), transparent 60%),
    repeating-linear-gradient(90deg,
      transparent 0 78px,
      rgba(148, 163, 184, .045) 78px 79px);
  background-color: var(--bg);
  animation: drift 40s linear infinite;
}
@keyframes drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 0 0, 0 0, 158px 0; }
}

/* =====================================================================
   Auth
   ===================================================================== */
.auth-body { display: grid; place-items: center; padding: 24px 18px 40px; }

.auth-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  animation: riseIn .55s var(--ease) both;
}

.auth-hero { text-align: center; margin-bottom: 24px; }

.logo-mark {
  width: 74px; height: 74px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 24px;
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-hi);
  box-shadow: var(--shadow);
}
.logo-ball { font-size: 34px; display: block; animation: tumble 4.5s var(--ease) infinite; }
@keyframes tumble {
  0%, 72%, 100% { transform: rotate(0) scale(1); }
  78%  { transform: rotate(-16deg) scale(1.12); }
  86%  { transform: rotate(14deg)  scale(1.06); }
  92%  { transform: rotate(-5deg)  scale(1.02); }
}

.auth-title { font-size: 27px; }
.auth-sub { color: var(--muted); margin-top: 8px; font-size: 14px; }

.auth-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-lg);
}

.seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(0, 0, 0, .28);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}
.seg-btn {
  position: relative; z-index: 1;
  padding: 10px 8px;
  font-size: 14px; font-weight: 600;
  color: var(--muted);
  border-radius: 9px;
  transition: color .25s var(--ease);
}
.seg-btn.is-active { color: #08111f; }
.seg-thumb {
  position: absolute;
  z-index: 0;
  top: 4px; left: 4px;
  width: calc(50% - 4px); height: calc(100% - 8px);
  border-radius: 9px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  transition: transform .38s var(--spring);
}
.seg[data-tab="register"] .seg-thumb { transform: translateX(100%); }

.auth-form { display: none; }
.auth-form.is-active { display: grid; gap: 13px; animation: fadeSlide .3s var(--ease) both; }

.fld { display: grid; gap: 6px; }
.fld > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.fld > span em { color: var(--muted); font-style: normal; font-weight: 500; }
.fld input, .fld select, .inline-form input {
  width: 100%;
  padding: 12px 13px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.fld input:focus, .fld select:focus, .inline-form input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, .45);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, .16);
}
.fld .hint { font-size: 12px; color: var(--muted); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.auth-error {
  background: var(--loss-dim);
  border: 1px solid rgba(239, 68, 68, .4);
  color: #ffc9c9;
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  margin-bottom: 13px;
  animation: shake .4s var(--ease);
}

.auth-points {
  margin-top: 22px;
  display: grid; gap: 10px;
  font-size: 13.5px; color: var(--muted);
}
.auth-points li { display: flex; gap: 10px; align-items: center; }
.auth-points span { font-size: 16px; }

/* =====================================================================
   Buttons
   ===================================================================== */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  font-size: 14.5px;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .16s var(--spring), filter .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: scale(.965); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }

.btn-primary {
  --btn-bg: linear-gradient(180deg, var(--accent-2), var(--accent));
  --btn-fg: #0a1220;
  border-color: transparent;
}
.btn-ghost { --btn-bg: transparent; border-color: var(--line-hi); color: var(--text-2); }
.btn-lock {
  --btn-bg: linear-gradient(180deg, #26c95d, var(--turf));
  --btn-fg: #05130a;
  border-color: transparent;
  font-size: 16px; padding: 15px;
}
.btn-lock:not(:disabled)::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.42) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: sweep 2.6s var(--ease) infinite;
}
@keyframes sweep { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.btn-send {
  --btn-bg: linear-gradient(180deg, var(--accent-2), var(--accent));
  --btn-fg: #0a1220;
  border-color: transparent;
  padding: 0; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
}
.btn-send svg { fill: currentColor; stroke: none; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--muted);
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* =====================================================================
   App shell
   ===================================================================== */
.app-body {
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-top: calc(var(--bar-h) + env(safe-area-inset-top));
}

.appbar {
  position: fixed; z-index: 30;
  top: 0; left: 0; right: 0;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(9, 14, 25, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.appbar-pool {
  display: flex; align-items: baseline; gap: 8px;
  min-width: 0;
  padding: 6px 8px; margin-left: -8px;
  border-radius: 10px;
  transition: background .2s;
}
.appbar-pool:active { background: var(--surface-2); }
.pool-name {
  font-weight: 700; font-size: 16px;
  max-width: 46vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pool-week {
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: rgba(245, 165, 36, .12);
  border: 1px solid rgba(245, 165, 36, .25);
  padding: 2px 7px; border-radius: 20px;
  white-space: nowrap;
}
.chev { width: 16px; height: 16px; color: var(--muted); align-self: center; }

.appbar-right { display: flex; align-items: center; gap: 10px; }

.presence { display: flex; }
.presence .pip {
  width: 26px; height: 26px; margin-left: -8px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px;
  background: var(--surface-2);
  border: 2px solid var(--bg-2);
  animation: popIn .3s var(--spring) both;
}
.presence .pip:first-child { margin-left: 0; }

.avatar-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 18px;
  background: color-mix(in srgb, var(--avatar, #f59e0b) 22%, var(--surface));
  border: 1.5px solid color-mix(in srgb, var(--avatar, #f59e0b) 55%, transparent);
  transition: transform .18s var(--spring);
}
.avatar-btn:active { transform: scale(.9); }

/* ------------------------------------------------------------- views */
.views { position: relative; z-index: 1; }
.view { padding: 16px 14px 30px; max-width: 720px; margin: 0 auto; }
.view:not([hidden]) { animation: viewIn .34s var(--ease) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.view-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.view-title { font-size: 21px; }
.view-sub { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.card.pad { padding: 16px; }
.card-title { font-size: 15px; margin-bottom: 8px; }
.stack { display: grid; gap: 12px; }

.empty {
  text-align: center; color: var(--muted);
  padding: 46px 20px; font-size: 14px;
  border: 1px dashed var(--line-hi);
  border-radius: var(--r);
}
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }

/* ------------------------------------------------------------ tabbar */
.tabbar {
  position: fixed; z-index: 30;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(9, 14, 25, .88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative;
  display: grid; place-items: center; gap: 3px;
  color: var(--muted);
  font-size: 10.5px; font-weight: 600;
  transition: color .22s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 21px; height: 21px; transition: transform .3s var(--spring); }
.tab.is-active { color: var(--accent); }
.tab.is-active svg { transform: translateY(-2px) scale(1.1); }
.tab-dot {
  position: absolute; top: 8px; right: calc(50% - 18px);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--loss);
  border: 1.5px solid var(--bg-2);
  animation: popIn .3s var(--spring) both;
}

/* =====================================================================
   Pick cards
   ===================================================================== */
.lockbar {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 13px; margin-bottom: 13px;
  background: rgba(245, 165, 36, .09);
  border: 1px solid rgba(245, 165, 36, .24);
  border-radius: 12px;
  font-size: 13px; font-weight: 600; color: var(--accent-2);
}
.lockbar.is-locked {
  background: var(--loss-dim);
  border-color: rgba(239, 68, 68, .35);
  color: #ffb4b4;
}
.lock-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
  70%      { opacity: .55; box-shadow: 0 0 0 7px transparent; }
}

.progress-rail {
  position: relative;
  height: 30px; margin-bottom: 16px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.progress-fill {
  position: absolute; inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(31,165,74,.5), rgba(245,165,36,.55));
  transition: width .5s var(--ease);
}
.progress-label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}

.pick-list { display: grid; gap: 13px; }

.pick-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: riseIn .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 65ms);
  transition: border-color .3s, box-shadow .3s;
}
.pick-card.has-points { border-color: rgba(245, 165, 36, .4); }
.pick-card.is-locked { opacity: .92; }

.pick-meta {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 13px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, .18);
}
.pick-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.pick-meta .live {
  color: var(--loss); display: inline-flex; align-items: center; gap: 5px;
}
.pick-meta .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--loss); animation: pulseDot 1.4s ease-in-out infinite;
}
.pick-meta .tv { margin-left: auto; }

.team-row { display: grid; grid-template-columns: 1fr 1fr; }

.team {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 15px 13px;
  text-align: left;
  transition: background .28s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.team + .team { border-left: 1px solid var(--line); }
.team:active { background: rgba(255, 255, 255, .04); }

.team-logo {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--surface-2);
  font-size: 12px; font-weight: 800; letter-spacing: -.03em;
  overflow: hidden;
}
.team-logo img { width: 26px; height: 26px; object-fit: contain; }

.team-id { min-width: 0; }
.team-name {
  font-size: 14px; font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.team-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.team-rank {
  font-size: 10.5px; font-weight: 800; color: var(--accent);
  margin-right: 3px;
}
.team-score {
  margin-left: auto;
  font-size: 19px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* selection fill sweeps in from the side that was tapped */
.team::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--turf-dim), transparent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .32s var(--ease);
}
.team.is-picked::before { transform: scaleY(1); }
.team.is-picked { box-shadow: inset 0 -3px 0 var(--turf); }
.team.is-picked .team-name { color: #b8f5cd; }

.team.is-win  { box-shadow: inset 0 -3px 0 var(--turf); }
.team.is-lose { opacity: .45; }

.pick-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .2);
}
.pick-foot .label {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}

.conf-chips { display: flex; gap: 6px; margin-left: auto; }
.conf-chip {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: transform .22s var(--spring), background .22s, color .22s, border-color .22s;
}
.conf-chip:active { transform: scale(.88); }
.conf-chip.is-on {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-color: transparent;
  color: #0a1220;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(245, 165, 36, .35);
}
.conf-chip.is-taken { opacity: .32; }
.conf-chip.just-set { animation: pointPop .45s var(--spring); }
@keyframes pointPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.42) rotate(-7deg); }
  100% { transform: scale(1.08); }
}

.card-badge {
  position: absolute; top: 9px; right: 11px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px;
}
.badge-win  { background: var(--turf-dim); color: #7ff0a6; }
.badge-loss { background: var(--loss-dim); color: #ffa8a8; }

/* --------------------------------------------------------- submit dock */
.tiebreak { margin-top: 14px; }

.submit-dock {
  position: sticky; bottom: calc(var(--tab-h) + 8px);
  margin-top: 18px; padding: 13px;
  background: rgba(11, 18, 32, .93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  z-index: 5;
}
.dock-warn {
  font-size: 12px; color: var(--muted);
  text-align: center; margin-bottom: 10px;
}

/* =====================================================================
   The room (board)
   ===================================================================== */
.gate {
  text-align: center;
  padding: 44px 22px;
  border: 1px dashed var(--line-hi);
  border-radius: var(--r);
  background: radial-gradient(90% 70% at 50% 0%, rgba(245,165,36,.07), transparent);
}
.gate-lock { font-size: 46px; display: block; margin-bottom: 14px; animation: swing 3.4s var(--ease) infinite; }
@keyframes swing {
  0%, 70%, 100% { transform: rotate(0); }
  76% { transform: rotate(-11deg); }
  84% { transform: rotate(9deg); }
  91% { transform: rotate(-4deg); }
}
.gate h3 { font-size: 18px; margin-bottom: 8px; }
.gate p { color: var(--muted); font-size: 14px; max-width: 34ch; margin: 0 auto; }

.entry-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 13px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: flipIn .6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes flipIn {
  from { opacity: 0; transform: perspective(900px) rotateX(-14deg) translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.entry-card.is-me { border-color: rgba(245, 165, 36, .45); }

.entry-head {
  display: flex; align-items: center; gap: 11px;
  padding: 13px;
  border-bottom: 1px solid var(--line);
}
.entry-avatar {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 50%;
  display: grid; place-items: center; font-size: 19px;
  background: color-mix(in srgb, var(--avatar, #f59e0b) 22%, var(--surface));
  border: 1.5px solid color-mix(in srgb, var(--avatar, #f59e0b) 55%, transparent);
}
.entry-who { min-width: 0; flex: 1; }
.entry-name { font-weight: 700; font-size: 15px; }
.entry-when { font-size: 11.5px; color: var(--muted); }
.entry-score {
  text-align: right;
  font-size: 24px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1;
}
.entry-score small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }

.entry-picks { padding: 6px 0; }
.epick {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px;
  position: relative;
  transition: background .2s;
}
.epick + .epick { border-top: 1px solid rgba(148, 163, 184, .07); }
.epick-pts {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: 13.5px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: rgba(245, 165, 36, .14);
  color: var(--accent-2);
  border: 1px solid rgba(245, 165, 36, .25);
}
.epick.is-right .epick-pts { background: var(--turf-dim); color: #7ff0a6; border-color: rgba(31,165,74,.4); }
.epick.is-wrong .epick-pts { background: var(--loss-dim); color: #ffa8a8; border-color: rgba(239,68,68,.35); }
.epick-id { min-width: 0; flex: 1; }
.epick-team { font-size: 14px; font-weight: 600; }
.epick-vs { font-size: 12px; color: var(--muted); }
.epick-mark { font-size: 15px; width: 16px; text-align: right; }
.epick-reacts { display: flex; gap: 4px; margin-left: auto; }
.epick-reacts .react-pill { padding: 3px 7px; font-size: 12px; }
.epick { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.epick:active { background: rgba(255, 255, 255, .04); }
.epick.is-right { background: linear-gradient(90deg, var(--turf-dim), transparent); }
.epick.is-wrong { background: linear-gradient(90deg, var(--loss-dim), transparent); }

.react-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 10px 13px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, .18);
}
.react-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px;
  border-radius: 20px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 600;
  transition: transform .2s var(--spring), background .2s, border-color .2s;
}
.react-pill:active { transform: scale(.9); }
.react-pill.is-mine { background: rgba(245, 165, 36, .16); border-color: rgba(245, 165, 36, .4); }
.react-pill .n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.react-add {
  color: var(--muted);
  font-size: 12px; font-weight: 600;
  padding: 5px 11px;
  border-radius: 20px;
  border: 1px dashed var(--line-hi);
  transition: color .2s, border-color .2s;
}
.react-add:active { color: var(--text); border-color: var(--accent); }

/* floating emoji burst */
.emoji-fly {
  position: fixed;
  z-index: 90;
  font-size: 26px;
  pointer-events: none;
  animation: flyUp 1.05s var(--ease) forwards;
}
@keyframes flyUp {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(.5); }
  18%  { opacity: 1; transform: translate(-50%, -14px) scale(1.25); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -110px) scale(.9); }
}

.consensus {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
  padding: 8px 13px;
}
.consensus-bar {
  flex: 1; height: 6px; border-radius: 4px; overflow: hidden;
  background: var(--loss-dim);
  display: flex;
}
.consensus-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--turf), #43d97b);
  transition: width .7s var(--ease);
}

/* =====================================================================
   Chat
   ===================================================================== */
.view-chat {
  display: flex; flex-direction: column;
  height: calc(100dvh - var(--bar-h) - var(--tab-h) - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding: 0;
}
.chat-scroll { flex: 1; overflow-y: auto; padding: 14px; -webkit-overflow-scrolling: touch; }
.chat-list { display: grid; gap: 10px; }

.msg { display: flex; gap: 9px; align-items: flex-end; animation: msgIn .34s var(--spring) both; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.msg.is-me { flex-direction: row-reverse; }
.msg-avatar {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 50%;
  display: grid; place-items: center; font-size: 15px;
  background: color-mix(in srgb, var(--avatar, #f59e0b) 22%, var(--surface));
}
.msg-bubble {
  max-width: 76%;
  padding: 9px 13px;
  border-radius: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.42;
  word-break: break-word;
}
.msg.is-me .msg-bubble {
  background: linear-gradient(180deg, rgba(245,165,36,.22), rgba(245,165,36,.12));
  border-color: rgba(245, 165, 36, .3);
}
.msg-who { font-size: 11.5px; font-weight: 700; color: var(--accent-2); margin-bottom: 2px; }
.msg-time { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.msg-react { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }

.msg-system {
  display: flex; align-items: center; gap: 9px;
  margin: 4px auto;
  padding: 8px 14px;
  max-width: 92%;
  border-radius: 20px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2);
  text-align: center;
  animation: msgIn .34s var(--spring) both;
}
.msg-system .sys-icon { font-size: 15px; }
.msg-system.is-drop {
  background: linear-gradient(90deg, rgba(245,165,36,.14), rgba(31,165,74,.1));
  border-color: rgba(245, 165, 36, .3);
  color: var(--accent-2); font-weight: 600;
}

.chat-compose {
  border-top: 1px solid var(--line);
  background: rgba(9, 14, 25, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 9px 12px 12px;
}
.quick-react { display: flex; gap: 6px; margin-bottom: 8px; }
.quick-react button {
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 18px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--line);
  transition: transform .2s var(--spring), background .2s;
}
.quick-react button:active { transform: scale(1.25) translateY(-3px); background: var(--surface-2); }

.compose-row { display: flex; gap: 9px; align-items: center; }
.compose-row input {
  flex: 1;
  padding: 12px 15px;
  border-radius: 22px;
  background: rgba(0, 0, 0, .34);
  border: 1px solid var(--line);
  color: var(--text);
}
.compose-row input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, .14);
}

/* =====================================================================
   Standings
   ===================================================================== */
.stand-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 9px;
  animation: riseIn .45s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.stand-row.is-me { border-color: rgba(245, 165, 36, .45); }
.stand-rank {
  width: 30px; flex: 0 0 30px;
  text-align: center;
  font-size: 17px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.stand-row:nth-child(1) .stand-rank { color: var(--accent); }
.stand-who { flex: 1; min-width: 0; }
.stand-name { font-weight: 700; font-size: 15px; }
.stand-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stand-pts {
  font-size: 22px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.stand-pts small { font-size: 10.5px; color: var(--muted); display: block; text-align: right; font-weight: 600; }

.sparks { display: flex; gap: 3px; margin-top: 6px; }
.spark {
  width: 5px; border-radius: 3px;
  background: rgba(245, 165, 36, .55);
  animation: growUp .6s var(--ease) both;
  transform-origin: bottom;
}
@keyframes growUp { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* =====================================================================
   Commissioner
   ===================================================================== */
.week-picker {
  display: flex; gap: 7px; overflow-x: auto;
  padding-bottom: 12px; margin-bottom: 12px;
  scrollbar-width: none;
}
.week-picker::-webkit-scrollbar { display: none; }
.week-chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 650; color: var(--muted);
  transition: all .22s var(--ease);
}
.week-chip.is-on {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #0a1220; border-color: transparent;
}

.commish-tray {
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top) + 6px);
  z-index: 6;
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  margin-bottom: 13px;
  background: rgba(11, 18, 32, .95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.tray-chips { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.tray-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px;
  border-radius: 20px;
  background: rgba(245, 165, 36, .14);
  border: 1px solid rgba(245, 165, 36, .3);
  font-size: 12px; font-weight: 650;
  animation: popIn .3s var(--spring) both;
}
.tray-chip .x { color: var(--muted); font-size: 13px; }
.tray-slot {
  width: 30px; height: 26px;
  border-radius: 8px;
  border: 1px dashed var(--line-hi);
}

/* ------------------------------------------------------------- search */
.search-row {
  position: relative;
  display: flex; align-items: center;
  margin-bottom: 13px;
}
.search-row input {
  width: 100%;
  padding: 12px 38px 12px 40px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  -webkit-appearance: none;
}
.search-row input::-webkit-search-cancel-button { display: none; }
.search-row input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, .14);
}
.search-icon {
  position: absolute; left: 12px;
  width: 18px; height: 18px;
  color: var(--muted); pointer-events: none;
}
.search-clear {
  position: absolute; right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  color: var(--muted); font-size: 12px;
  display: grid; place-items: center;
}
.search-clear:active { background: var(--surface-2); color: var(--text); }

.game-pool { display: grid; gap: 10px; }
.pg-rank { color: var(--accent); font-size: 12px; font-weight: 800; }
.pg-at { color: var(--muted); font-weight: 500; }
.pool-game {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 13px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  width: 100%;
  transition: border-color .25s, transform .18s var(--spring), background .25s;
  animation: riseIn .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}
.pool-game:active { transform: scale(.985); }
.pool-game.is-on {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(245,165,36,.13), var(--bg-2));
}
.pool-game .pg-teams { flex: 1; min-width: 0; }
.pool-game .pg-line { font-size: 14px; font-weight: 650; }
.pool-game .pg-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
/* model read stamped on each candidate game */
.pg-read { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.pg-read:empty { display: none; }
.read-chip {
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
  padding: 2px 7px; border-radius: 6px;
  background: rgba(148, 163, 184, .14); color: var(--text-2);
}
.read-chip.lock  { background: var(--turf-dim); color: #7ff0a6; }
.read-chip.solid { background: rgba(245, 165, 36, .16); color: var(--accent-2); }
.read-chip.coin  { background: rgba(124, 92, 255, .18); color: #c4b5fd; }
.read-tier { font-size: 10.5px; color: var(--muted); font-weight: 600; }

.pool-game .pg-check {
  width: 24px; height: 24px; flex: 0 0 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line-hi);
  display: grid; place-items: center;
  font-size: 13px; color: transparent;
  transition: all .25s var(--spring);
}
.pool-game.is-on .pg-check {
  background: var(--accent); border-color: var(--accent); color: #0a1220;
  transform: scale(1.12);
}

/* =====================================================================
   Strategist sheet
   ===================================================================== */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(3, 6, 12, .68);
  backdrop-filter: blur(3px);
  animation: fadeIn .25s ease both;
}
.sheet {
  position: fixed; z-index: 50;
  left: 0; right: 0; bottom: 0;
  max-height: 88dvh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--surface-2), var(--bg-2));
  border-top: 1px solid var(--line-hi);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-lg);
  animation: sheetUp .42s var(--ease) both;
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grab {
  width: 38px; height: 4px; border-radius: 4px;
  background: var(--line-hi);
  margin: 9px auto 0;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-size: 18px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 14px 16px 18px; -webkit-overflow-scrolling: touch; }
.sheet-foot {
  display: flex; gap: 10px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.sheet-foot .btn { flex: 1; }

.strat-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
  margin-bottom: 15px;
}
.strat-stat {
  padding: 11px 9px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}
.strat-stat b {
  display: block; font-size: 19px; font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.strat-stat span { font-size: 10.5px; color: var(--muted); }

.strat-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 11px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  animation: riseIn .4s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.strat-pts {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 800;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #0a1220;
}
.strat-row.is-upset .strat-pts {
  background: linear-gradient(180deg, #7c5cff, #5b3ff0); color: #fff;
}
.strat-pick { font-size: 15px; font-weight: 700; }
.strat-vs { font-size: 12px; color: var(--muted); margin-top: 1px; }
.strat-bar {
  height: 5px; border-radius: 4px;
  background: rgba(0, 0, 0, .35);
  margin: 8px 0 7px;
  overflow: hidden;
}
.strat-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--turf), var(--accent));
  transition: width .8s var(--ease);
}
.strat-why { font-size: 13px; color: var(--text-2); line-height: 1.45; }
.strat-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  padding: 3px 7px; border-radius: 6px;
  background: rgba(148, 163, 184, .12); color: var(--text-2);
}
.tag.for      { background: var(--turf-dim); color: #7ff0a6; }
.tag.against  { background: var(--loss-dim); color: #ffa8a8; }
.tag.tier     { background: rgba(245, 165, 36, .16); color: var(--accent-2); }

/* week-preview rows: tap to add the game to the card */
.week-row {
  cursor: pointer;
  border-radius: 12px;
  padding: 12px 10px;
  margin: 0 -10px;
  transition: background .22s var(--ease);
}
.week-row:active { background: rgba(255, 255, 255, .05); }
.week-row.is-on { background: rgba(245, 165, 36, .1); }
.week-row .strat-pts {
  font-size: 12px; letter-spacing: -.02em;
  padding: 0 4px; text-align: center; line-height: 1.1;
}
.week-row .strat-pts.is-coin {
  background: linear-gradient(180deg, #7c5cff, #5b3ff0); color: #fff;
  font-size: 10.5px;
}

.strat-note {
  margin-top: 14px; padding: 12px;
  border-radius: 12px;
  background: rgba(74, 155, 245, .1);
  border: 1px solid rgba(74, 155, 245, .25);
  font-size: 13px; color: #bcd9ff;
}

/* =====================================================================
   Toasts, confetti, misc
   ===================================================================== */
.toast-stack {
  position: fixed; z-index: 95;
  left: 12px; right: 12px;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 12px);
  display: grid; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 15px;
  border-radius: 13px;
  background: rgba(22, 34, 58, .97);
  border: 1px solid var(--line-hi);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: toastIn .4s var(--spring) both;
}
.toast.is-bad { border-color: rgba(239, 68, 68, .45); background: rgba(58, 22, 22, .97); }
.toast.is-good { border-color: rgba(31, 165, 74, .45); background: rgba(16, 46, 28, .97); }
.toast.is-out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(.97); } }

.confetti {
  position: fixed; inset: 0; z-index: 92;
  pointer-events: none;
}

.inline-form { display: flex; gap: 9px; }
.inline-form input { flex: 1; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }

.or-split {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--muted); font-size: 12px;
}
.or-split::before, .or-split::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.onboard { display: grid; gap: 0; max-width: 460px; margin: 0 auto; }

.code-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px;
  border-radius: 11px;
  background: rgba(0, 0, 0, .32);
  border: 1px dashed var(--line-hi);
  font-size: 17px; font-weight: 800; letter-spacing: .18em;
  font-variant-numeric: tabular-nums;
}

.pool-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 13px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .22);
  margin-bottom: 9px;
  text-align: left;
}
.pool-row.is-on { border-color: var(--accent); background: rgba(245, 165, 36, .1); }

.skeleton {
  border-radius: var(--r);
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  height: 96px; margin-bottom: 13px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* =====================================================================
   What-if simulator
   ===================================================================== */
.scenario-head {
  display: grid; gap: 6px;
  padding: 13px;
  border-radius: 12px;
  background: rgba(74, 155, 245, .1);
  border: 1px solid rgba(74, 155, 245, .25);
  font-size: 13.5px; color: #cfe4ff;
  margin-bottom: 14px;
}
.scenario-head b { color: #fff; }
.sc-winner {
  font-size: 16px; font-weight: 700; color: #fff;
  display: block;
}
.sc-winner b { color: var(--accent-2); }
.sc-sub { font-size: 12.5px; }

.sc-section {
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
  margin: 18px 0 9px;
}

.sc-game {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.sc-game.is-final { opacity: .72; }
.sc-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.sc-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sc-team {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 650;
  transition: all .2s var(--ease);
}
.sc-team img { width: 20px; height: 20px; object-fit: contain; }
.sc-team b { margin-left: auto; font-variant-numeric: tabular-nums; }
.sc-team.is-on {
  background: var(--turf-dim);
  border-color: var(--turf);
  color: #b8f5cd;
}
.sc-team:disabled { cursor: default; }
.sc-team:not(:disabled):active { transform: scale(.96); }

.sc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(148, 163, 184, .08);
}
.sc-row.is-me { background: rgba(245, 165, 36, .07); border-radius: 10px; padding-left: 8px; }
.sc-rank {
  width: 22px; text-align: center;
  font-weight: 800; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sc-who { flex: 1; min-width: 0; font-size: 14px; font-weight: 650; }
.sc-who small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.sc-pts {
  font-size: 18px; font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.sc-pts small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }

.mv { font-size: 11px; font-weight: 800; }
.mv.up { color: #4ade80; }
.mv.down { color: #f87171; }

/* ------------------------------------------------------- emoji picker */
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 6px;
  max-height: 232px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}
.emoji-grid button {
  aspect-ratio: 1;
  border-radius: 10px;
  font-size: 20px;
  background: transparent;
  border: 1px solid transparent;
  transition: transform .18s var(--spring), background .2s;
}
.emoji-grid button:active { transform: scale(1.22); }
.emoji-grid button.is-on {
  background: rgba(245, 165, 36, .22);
  border-color: rgba(245, 165, 36, .5);
}

/* --------------------------------------------------- chat delete + invite */
.msg-del {
  color: var(--muted);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 6px;
  opacity: .5;
  transition: opacity .2s, color .2s, background .2s;
}
.msg-del:hover, .msg-del:active { opacity: 1; color: #ffa8a8; background: var(--loss-dim); }

.invite-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 13px;
  background: rgba(31, 165, 74, .12);
  border: 1px solid rgba(31, 165, 74, .32);
  font-size: 13.5px; color: #b8f5cd;
  animation: riseIn .4s var(--ease) both;
}
.invite-banner span:first-child { font-size: 20px; }

/* =====================================================================
   Admin panel
   ===================================================================== */
.admin-body { padding-bottom: 40px; }

.admin-seg {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
}
.admin-seg .seg-btn.is-active {
  color: #08111f;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
}
.admin-seg .seg-thumb { display: none; }

.admin-pane { display: none; }
.admin-pane.is-active { display: block; animation: fadeSlide .3s var(--ease) both; }

.admin-row {
  display: flex; gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
}
.admin-who { flex: 1; min-width: 0; }
.admin-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-meta { font-size: 12px; color: var(--muted); margin-top: 3px; word-break: break-word; }
.admin-actions {
  display: flex; gap: 7px; flex-wrap: wrap;
  margin-top: 10px;
}
.admin-actions .btn { padding: 7px 11px; font-size: 12.5px; }
.btn.danger, .btn-danger {
  color: #ffb4b4;
  border-color: rgba(239, 68, 68, .38);
}
.btn.danger:active, .btn-danger:active { background: var(--loss-dim); }
.btn-danger { --btn-bg: var(--loss-dim); }

.mini-select {
  padding: 7px 10px;
  font-size: 12.5px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
}
.mini-select:focus { outline: none; border-color: var(--accent); }

/* manual score entry */
.score-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.score-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px solid rgba(148, 163, 184, .08);
}
.score-team { font-size: 13px; font-weight: 650; }
.score-at { font-size: 11.5px; color: var(--muted); }
.score-in {
  width: 58px;
  padding: 7px 8px;
  text-align: center;
  font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, .34);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
}
.score-in:focus { outline: none; border-color: var(--accent); }

.danger-card { border-color: rgba(239, 68, 68, .3); }
.pw-reveal { margin-top: 12px; border-color: rgba(245, 165, 36, .4); }

/* ------------------------------------------------------------ motion */
@keyframes riseIn   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeSlide{ from { opacity: 0; transform: translateX(8px);  } to { opacity: 1; transform: none; } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn    { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --------------------------------------------------------- larger up */
@media (min-width: 700px) {
  .view { padding: 24px 20px 40px; }
  .sheet { left: 50%; transform: translateX(-50%); max-width: 640px; border-radius: 24px; bottom: 20px; }
  @keyframes sheetUp {
    from { transform: translate(-50%, 100%); }
    to   { transform: translate(-50%, 0); }
  }
  .tabbar { max-width: 640px; margin: 0 auto; border-radius: 18px 18px 0 0; border: 1px solid var(--line); border-bottom: 0; }
}
