:root {
  --bg: #060609;
  --bg-2: #0e0e16;
  --card: #12121d;
  --card-hover: #1a1a2a;
  --border: #272740;
  --text: #e8e8f2;
  --muted: #8d8da8;
  --accent: #8b5cf6;
  --accent-2: #7c3aed;
  --live: #22c55e;
  --gold: #fbbf24;
  --red: #ef4444;
  --blue: #60a5fa;
  --purple: #c084fc;
  --silver: #d7d7e4;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(900px 500px at 50% -8%, rgba(124, 58, 237, .28) 0%, transparent 60%),
    radial-gradient(1400px 800px at 50% 10%, #150d28 0%, var(--bg) 62%);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }
.screen { min-height: 100vh; }

h1, h2, h3, .brand, .auth-title { font-family: 'Rajdhani', 'Inter', sans-serif; }

/* ===== Auth (hero) ===== */
#auth-screen {
  display: flex; align-items: center; justify-content: center; padding: 24px;
  position: relative; overflow-x: clip; /* never clip vertically: the sign-up form must scroll on a phone */
}
/* stadium light beams */
#auth-screen::before, #auth-screen::after {
  content: ''; position: absolute; top: -12%; width: 340px; height: 75%;
  background: linear-gradient(to bottom, rgba(220, 210, 255, .12), transparent 75%);
  pointer-events: none;
}
#auth-screen::before { left: 4%; transform: rotate(18deg); }
#auth-screen::after { right: 4%; transform: rotate(-18deg); }
.wordmark { text-align: center; font-family: 'Rajdhani'; font-weight: 700; font-style: italic; letter-spacing: 2px; }
.wordmark .wm-grid { color: var(--silver); }
.wordmark .wm-gm { color: var(--accent); text-shadow: 0 0 18px rgba(139, 92, 246, .8); }
.wordmark .wm-live { color: var(--silver); font-size: .55em; letter-spacing: 3px; vertical-align: middle; border: 1.5px solid var(--silver); border-radius: 4px; padding: 1px 6px; font-style: normal; }
/* the brand: the logo lockup once assets/logo.png is there, the wordmark until then */
.brand-logo { display: none; height: 34px; width: auto; vertical-align: middle; }
.brand.has-logo .brand-logo { display: inline-block; }
.brand.has-logo .badge-mini, .brand.has-logo .wordmark { display: none; }
.brand-icon { display: none; height: 30px; width: 30px; border-radius: 7px; vertical-align: -8px; }
.brand.has-logo .brand-icon { display: inline-block; }
/* sign-in: the poster behind everything, the lockup on the card */
/* only the top of the poster (logo, tagline, play diagram): it fades out above the poster's own
   copy, which the card would otherwise cover. Sized by width so the fade lands on the same part
   of the artwork on every phone; capped so the logo is not huge on a desktop. */
.auth-backdrop {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; height: auto;
  opacity: .95; pointer-events: none; z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 64%);
  mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 64%);
}
#auth-screen.has-hero::before, #auth-screen.has-hero::after { display: none; }
/* with the poster behind: its logo and tagline carry the top, the card sits under them */
#auth-screen.has-hero { align-items: flex-start; padding-top: clamp(205px, 56vw, 322px); padding-bottom: 40px; }
/* wide screens: the poster is a centred strip — fade its sides into the page */
@media (min-width: 600px) {
  .auth-backdrop {
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 64%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to bottom, #000 0, #000 50%, transparent 64%), linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
    mask-composite: intersect;
  }
}
#auth-screen.has-hero .auth-logo, #auth-screen.has-hero .auth-title, #auth-screen.has-hero .tagline { display: none; }
#auth-screen.has-hero .auth-card { background: linear-gradient(180deg, rgba(21, 16, 38, .86), rgba(14, 14, 22, .94)); backdrop-filter: blur(6px); }
.auth-logo { display: none; width: 100%; max-width: 340px; margin: 0 auto 6px; }
.auth-card.has-logo .auth-logo { display: block; }
.auth-card.has-logo .auth-title { display: none; }
.tagline {
  text-align: center; color: var(--muted); font-size: 11.5px; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase; margin-top: 2px;
}
.auth-card {
  width: 100%; max-width: 460px; position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(21, 16, 38, .92), rgba(14, 14, 22, .96));
  border: 1px solid var(--border);
  border-radius: 20px; padding: 30px 32px 36px;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, .12), 0 24px 80px rgba(0,0,0,.7), 0 0 90px rgba(124, 58, 237, .18);
}
.auth-logo { font-size: 44px; text-align: center; }
.auth-title { font-size: 40px; margin-top: 6px; }
.auth-sub { text-align: center; color: var(--muted); margin: 6px 0 24px; font-size: 14px; }
.auth-sub b { color: var(--purple); }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; background: var(--bg-2); padding: 5px; border-radius: 10px; }
.auth-tab {
  flex: 1; padding: 9px; border: none; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 14px;
}
.auth-tab.active { background: var(--accent); color: #fff; }
.auth-form, .stack-form { display: flex; flex-direction: column; gap: 6px; }
.auth-form label, .stack-form label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-top: 10px; }
.auth-form input, .auth-form select, .stack-form input, .stack-form select {
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font-size: 15px; outline: none;
}
.auth-form input:focus, .auth-form select:focus,
.stack-form input:focus, .stack-form select:focus { border-color: var(--accent); }
.btn-primary {
  margin-top: 20px; padding: 13px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-2); color: #eafff2; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.auth-error { margin-top: 14px; color: var(--red); font-size: 14px; text-align: center; }
.hint { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.form-note { color: var(--muted); font-size: 12px; margin-top: 12px; line-height: 1.5; }

/* ===== Topbar ===== */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; border-bottom: 1px solid var(--border);
  background: rgba(13,17,23,.8); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20; flex-wrap: wrap;
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.brand.clickable { cursor: pointer; }
.brand.clickable:hover { color: var(--accent); }
/* one row of identical pills; scrolls sideways on a phone, the active tab kept in view */
.nav {
  display: flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 12px; border: 1px solid var(--border);
  flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.nav::-webkit-scrollbar { display: none; }
.nav-btn {
  flex: 0 0 auto; padding: 8px 13px; border: none; border-radius: 9px; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--muted); font-family: 'Rajdhani', 'Inter', sans-serif; font-weight: 700;
  font-size: 15px; letter-spacing: 1.2px; text-transform: uppercase; line-height: 1.1;
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active { background: var(--accent); color: #fff; }
.nav-btn .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-left: 5px; vertical-align: middle; animation: pulse 1.6s infinite; }
.user-box { display: flex; align-items: center; gap: 8px; }
.user-chip { font-weight: 600; font-size: 14px; color: var(--text); }
.btn-ghost {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-small {
  padding: 6px 12px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 12.5px;
}
.btn-small.gold { background: var(--gold); color: #1a1509; }
.btn-small.red { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.5); }
.btn-small.blue { background: rgba(59,130,246,.15); color: var(--blue); border: 1px solid rgba(59,130,246,.5); }
.btn-small.purple { background: var(--purple); color: #1c1233; }
.btn-small:disabled { opacity: .35; cursor: not-allowed; }

/* ===== Week nav ===== */
.week-nav { display: flex; align-items: center; gap: 8px; padding: 16px 22px 0; max-width: 1100px; margin: 0 auto; }
.week-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; flex: 1; }
.week-pill {
  min-width: 46px; padding: 8px 0; text-align: center; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--muted);
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.week-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.week-pill.current-week:not(.active) { border-color: var(--accent); color: var(--accent); }
.week-pill.playoff-pill { border-style: dashed; }
.week-pill.playoff-pill.active { border-style: solid; }
.week-arrow {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text); font-size: 18px; cursor: pointer; flex-shrink: 0;
}

main { max-width: 1100px; margin: 0 auto; padding: 18px 22px 60px; }
.hub-main { max-width: 1100px; margin: 0 auto; padding: 24px 22px 60px; display: flex; flex-direction: column; gap: 18px; }
.hub-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 759px) { .hub-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===== Panels & tables ===== */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.panel h2 { font-size: 22px; }
.panel h3 { font-size: 17px; margin-bottom: 8px; }
.panel-sub { color: var(--muted); font-size: 13px; margin: 2px 0 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* wide tables scroll sideways on a phone instead of being clipped by the page */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; margin: 0 -4px; padding: 0 4px; }
.table-scroll table { min-width: 560px; }
.table-scroll th, .table-scroll td { white-space: nowrap; }
.st-owner { display: none; }
/* phones: the owner moves under the team name, the numbers tighten, and the whole table fits */
@media (max-width: 640px) {
  .table-scroll .standings-table { min-width: 0; font-size: 13px; }
  .standings-table th, .standings-table td { padding: 8px 5px; }
  .standings-table .owner-col { display: none; }
  .standings-table .team-cell { white-space: normal; min-width: 120px; }
  .standings-table .team-cell b { display: block; line-height: 1.2; }
  .st-owner { display: block; color: var(--muted); font-size: 11.5px; }
  .standings-table td.num, .standings-table th.num { padding-left: 4px; padding-right: 4px; }
}
tr.me td { background: rgba(34,197,94,.07); }
.rank { color: var(--muted); width: 30px; }
.empty-note { color: var(--muted); padding: 18px 4px; font-size: 14px; }
.table-note { color: var(--muted); font-size: 12px; margin-top: 10px; }

/* ===== League cards (hub) ===== */
.league-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
  background: var(--bg-2); cursor: pointer; transition: border-color .15s;
}
.league-card:hover { border-color: var(--accent); }
.league-card .lc-name { font-weight: 700; font-size: 16px; }
.league-card .lc-meta { color: var(--muted); font-size: 13px; }
.status-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.status-pill.pre_draft { background: rgba(251,191,36,.15); color: var(--gold); border: 1px solid rgba(251,191,36,.4); }
.status-pill.drafting { background: rgba(167,139,250,.15); color: var(--purple); border: 1px solid rgba(167,139,250,.45); animation: pulse 1.6s infinite; }
.status-pill.active { background: rgba(34,197,94,.14); color: var(--live); border: 1px solid rgba(34,197,94,.45); }
.status-pill.complete { background: rgba(59,130,246,.14); color: var(--blue); border: 1px solid rgba(59,130,246,.45); }

/* ===== Lineup ===== */
.lineup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 759px) { .lineup-grid { grid-template-columns: minmax(0, 1fr); } }
.slot-row {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 12px; padding: 9px 12px; margin-bottom: 8px;
  background: var(--bg-2);
}
.slot-row.locked { border-color: rgba(251,191,36,.35); }
.slot-row.live-game { border-color: rgba(34,197,94,.6); box-shadow: 0 0 0 1px rgba(34,197,94,.28); }
.slot-row.empty-slot { border-style: dashed; }
.slot-row.swapped { border-color: rgba(167,139,250,.6); box-shadow: 0 0 0 1px rgba(167,139,250,.3); }
.slot-tag {
  min-width: 44px; text-align: center; font-family: 'Rajdhani'; font-weight: 700; font-size: 14px;
  color: var(--muted); background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 4px; flex-shrink: 0;
}
.headshot {
  width: 38px; height: 38px; border-radius: 50%; background: var(--card); object-fit: cover;
  border: 1px solid var(--border); flex-shrink: 0;
}
.p-info { flex: 1; min-width: 0; }
.p-name { font-weight: 600; font-size: 14.5px; line-height: 1.25; overflow-wrap: break-word; cursor: pointer; }
.p-name:hover { color: var(--accent); text-decoration: underline; }
.p-meta { font-size: 12px; color: var(--muted); line-height: 1.35; overflow-wrap: break-word; }
.p-meta .live { color: var(--live); font-weight: 600; animation: pulse 1.6s infinite; }
.p-meta .final { color: var(--blue); font-weight: 600; }
.p-pts { font-family: 'Rajdhani'; font-size: 21px; font-weight: 700; min-width: 52px; text-align: right; }
.p-pts small { display: block; font-family: 'Inter'; font-size: 10px; color: var(--muted); font-weight: 500; line-height: 1; }
.p-pts .proj-under { color: var(--purple); font-weight: 600; margin-top: 3px; white-space: nowrap; }
.slot-actions { display: flex; gap: 6px; flex-shrink: 0; }
.swap-detail {
  border: 1px dashed rgba(167,139,250,.5); border-radius: 10px; background: rgba(167,139,250,.07);
  margin: -2px 0 8px; padding: 8px 12px; font-size: 12.5px; color: var(--muted); line-height: 1.55;
}
.swap-detail b { color: var(--purple); }

/* ===== Trades ===== */
.trades .standings-head { margin-bottom: 8px; }
.trade-offer { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-top: 8px; background: var(--bg-2); }
.trade-offer.in { border-color: rgba(192,132,252,.5); }
.trade-offer.review { border-color: rgba(251,191,36,.45); }
.trade-recent { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.trade-log { font-size: 12.5px; color: var(--muted); padding: 3px 0; line-height: 1.5; }
.trade-log b { color: var(--text); }
.trade-line { font-size: 14px; line-height: 1.5; }
.trade-offer .alert-btns { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.trade-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.trade-cols h4 { margin: 0 0 6px; font-family: 'Rajdhani'; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-size: 13px; }
.trade-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-bottom: 6px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2);
}
.trade-row:has(input:checked) { border-color: var(--accent); background: rgba(139,92,246,.12); }
.trade-row.locked { opacity: .5; cursor: not-allowed; }
.trade-row input { accent-color: var(--accent); flex-shrink: 0; }
.trade-row .headshot { width: 30px; height: 30px; }
.trade-row .p-info { display: flex; flex-direction: column; min-width: 0; }
.trade-row .p-name { font-size: 13.5px; }
.trade-row .p-meta { font-size: 11.5px; }
.trade-modal .field { margin-top: 12px; display: block; }
.trade-modal .field input { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 9px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font-size: 14px; }
@media (max-width: 640px) { .trade-cols { grid-template-columns: minmax(0, 1fr); } }

/* ===== Coach ID (the head coach's picture) ===== */
.owner-avatar, .coachid-avatar, .chip-avatar { --ring: #f97316; border-radius: 50%; flex-shrink: 0; object-fit: cover; box-shadow: 0 0 0 2px var(--ring), 0 0 14px color-mix(in srgb, var(--ring) 55%, transparent); }
.owner-avatar { width: 46px; height: 46px; }
.owner-avatar.initial, .coachid-avatar.initial, .chip-avatar.initial { display: inline-flex; align-items: center; justify-content: center; font-family: 'Rajdhani'; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--purple)); }
.owner-avatar.initial { font-size: 22px; }
.chip-avatar { width: 26px; height: 26px; vertical-align: middle; font-size: 13px; margin-right: 2px; }
.user-chip.clickable { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.user-chip small { color: var(--muted); font-weight: 500; }
.coachid-stage { display: flex; gap: 16px; align-items: center; margin: 6px 0 14px; }
.coachid-avatar { width: 120px; height: 120px; font-size: 48px; }
.coachid-controls { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.coachid-upload { position: relative; overflow: hidden; display: inline-block; text-align: center; }
.coachid-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.coachid-accents { display: flex; gap: 8px; }
.accent-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; box-shadow: 0 0 8px color-mix(in srgb, var(--c) 60%, transparent); }
.accent-dot.on { border-color: #fff; transform: scale(1.15); }
.note-box textarea { width: 100%; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); padding: 9px 10px; font-size: 14px; font-family: inherit; resize: vertical; }
.note-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.recap-coach.note-real { border-color: rgba(249,115,22,.6); }
.recap-coach.note-auto { opacity: .8; }
.recap-coach.note-sent { border-color: rgba(34,197,94,.5); }

/* ===== Weekly recap ===== */
.recap-score { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; align-items: center; text-align: center; margin: 4px 0 14px; }
.rs-team { display: flex; flex-direction: column; min-width: 0; }
.rs-name { font-family: 'Rajdhani'; font-weight: 700; font-size: 17px; overflow-wrap: break-word; }
.rs-pts { font-family: 'Rajdhani'; font-weight: 700; font-size: 38px; line-height: 1; }
.recap-score.W .me .rs-pts { color: var(--live); } .recap-score.L .me .rs-pts { color: var(--red); } .recap-score.T .me .rs-pts { color: var(--gold); }
.recap-coach { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--bg-2); margin-bottom: 8px; }
.recap-coach.opp { border-color: rgba(192,132,252,.45); }
.recap-owner { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: 'Rajdhani'; font-weight: 700; font-size: 22px; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--purple)); box-shadow: 0 0 14px rgba(139,92,246,.45); }
.recap-say { font-style: italic; margin-top: 3px; line-height: 1.45; }
.recap-h { font-family: 'Rajdhani'; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-size: 13px; margin: 14px 0 6px; }
.recap-sides { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.recap-side { border: 1px solid var(--border); border-radius: 12px; padding: 9px 11px; background: var(--bg-2); font-size: 13px; line-height: 1.6; }
.rs-label { font-family: 'Rajdhani'; font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.recap-next { font-size: 14px; line-height: 1.5; }
.recap-modal .alert-btns { margin-top: 16px; }
.recap-open { display: flex; justify-content: center; margin-top: 10px; }
@media (max-width: 640px) { .recap-sides { grid-template-columns: minmax(0,1fr); } .rs-pts { font-size: 30px; } }

/* ===== Matchup ===== */
.mu-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center;
  margin-bottom: 16px; text-align: center;
}
.mu-team-name { font-family: 'Rajdhani'; font-size: 20px; font-weight: 700; }
.mu-owner { font-size: 12.5px; color: var(--muted); }
.mu-score { font-family: 'Rajdhani'; font-size: 42px; font-weight: 700; line-height: 1; }
.mu-vs { color: var(--muted); font-weight: 700; }
.mu-odds { margin: -4px 0 14px; }
.mu-odds-row { display: flex; justify-content: space-between; align-items: baseline; font-family: 'Rajdhani'; font-weight: 700; }
.mu-odds-pct { font-size: 24px; line-height: 1; }
.mu-odds-pct.a { color: var(--purple); }
.mu-odds-pct.b { color: var(--blue); }
.mu-odds-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mu-odds.settled .mu-odds-label { color: var(--gold); }
.mu-odds-bar { position: relative; height: 10px; margin-top: 6px; border-radius: 999px; overflow: hidden; background: linear-gradient(90deg, #3b82f6, var(--blue)); }
.mu-odds-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--purple)); box-shadow: 2px 0 6px rgba(0,0,0,.45); }
.mu-odds-bar::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(6,6,9,.7); }
.mu-row { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); gap: 8px; align-items: center; border-bottom: 1px solid var(--border); padding: 6px 0; }
.mu-row .slot-tag { margin: 0 auto; }
.mu-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mu-side.right { flex-direction: row-reverse; text-align: right; }
.mu-act { margin-top: 4px; }
.mu-act .btn-small { padding: 4px 9px; font-size: 12px; }
.mu-list { margin-top: 6px; }
.mini-mu {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2);
  padding: 10px 14px; margin-bottom: 8px; font-size: 14px;
}
.mini-mu .sc { font-family: 'Rajdhani'; font-weight: 700; font-size: 18px; }

/* ===== Players pool ===== */
.pool-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pool-controls input {
  flex: 1; min-width: 200px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font-size: 14px; outline: none;
}
.pool-controls input:focus { border-color: var(--accent); }
.pos-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.pos-filter {
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border); cursor: pointer;
  background: var(--bg-2); color: var(--muted); font-weight: 700; font-size: 13px;
}
.pos-filter.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pool-row {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border); padding: 8px 4px;
}
.pool-row .owner-tag { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pool-row .owner-tag.fa { color: var(--accent); font-weight: 600; }
.pos-badge {
  min-width: 36px; text-align: center; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 3px 6px;
  background: var(--card); border: 1px solid var(--border); color: var(--muted); flex-shrink: 0;
}
.pos-QB { color: #f472b6; } .pos-RB { color: #4ade80; } .pos-WR { color: #60a5fa; }
.pos-TE { color: #fbbf24; } .pos-K { color: #c084fc; } .pos-DST { color: #94a3b8; }

/* ===== Draft ===== */
.draft-grid { display: grid; grid-template-columns: 1.3fr .9fr .9fr; gap: 16px; align-items: start; }
.draft-panes { display: none; margin-bottom: 10px; }
.draft-panes button { flex: 1; }
.proj { color: var(--purple); font-weight: 600; white-space: nowrap; }
.mu-score .proj-total { display: block; font-size: 12px; font-weight: 600; color: var(--purple); letter-spacing: .02em; }
.mu-score .proj-total.muted { color: var(--muted); font-weight: 500; }
.mini-mu.clickable { cursor: pointer; }
.mini-mu.clickable:hover, .mini-mu.open { border-color: var(--purple); }
.mini-mu .sc { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.mini-mu .sc .pj { font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600; color: var(--purple); }
.mu-expand:not(:empty) { margin: 6px 0 14px; }
.teams-admin { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.ta-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ta-row input[type="text"] { flex: 1 1 160px; min-width: 0; }
.ta-row select { flex: 1 1 180px; min-width: 0; }
/* phone: the three panels become swipeable pages (Pool · My Roster · Board) */
@media (max-width: 900px) {
  .draft-panes { display: flex; }
  .draft-grid {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .draft-grid::-webkit-scrollbar { display: none; }
  .draft-grid > * { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
}
.on-clock {
  border: 1px solid rgba(167,139,250,.55); background: rgba(167,139,250,.1);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.on-clock .oc-label { font-size: 12px; color: var(--purple); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.on-clock .oc-team { font-family: 'Rajdhani'; font-size: 22px; font-weight: 700; }
.on-clock.my-turn { border-color: var(--live); background: rgba(34,197,94,.1); animation: glowpulse 1.8s infinite; }
@keyframes glowpulse { 50% { box-shadow: 0 0 24px rgba(34,197,94,.35); } }
.draft-pick-row { display: flex; gap: 10px; align-items: center; padding: 6px 4px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.draft-pick-row .pk { color: var(--muted); min-width: 52px; font-variant-numeric: tabular-nums; }
.invite-box {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-2); border: 1px dashed var(--border); border-radius: 10px; padding: 12px 14px; margin: 10px 0;
}
.invite-code { font-family: 'Rajdhani'; font-size: 26px; font-weight: 700; letter-spacing: 4px; color: var(--gold); }

/* ===== Standings ===== */
.division-block { margin-bottom: 18px; }
.bracket { display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 12px; }
.bracket-round { min-width: 230px; flex: 1; }
.bracket-round h4 { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.bracket-game { border: 1px solid var(--border); border-radius: 10px; background: var(--bg-2); padding: 8px 10px; margin-bottom: 10px; font-size: 13.5px; }
.bracket-game .bg-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.bracket-game .seed { color: var(--muted); font-size: 11px; margin-right: 4px; }
.bracket-game .bg-row.winner { color: var(--accent); font-weight: 700; }
.champ-banner {
  background: linear-gradient(90deg, rgba(251,191,36,.16), transparent);
  border: 1px solid rgba(251,191,36,.4); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 14px; font-size: 15px;
}

/* ===== Badges ===== */
.live-badge { color: var(--live); font-weight: 700; animation: pulse 1.6s infinite; }
.final-badge { color: var(--blue); font-weight: 700; }
.lock-badge { color: var(--gold); font-weight: 600; }
@keyframes pulse { 50% { opacity: .45; } }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,8,14,.72); z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  width: 100%; max-width: 640px; max-height: 86vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.modal-head h3 { font-size: 20px; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.modal-close:hover { color: var(--text); }
.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.profile-head .headshot { width: 64px; height: 64px; }
.profile-head .ph-name { font-family: 'Rajdhani'; font-size: 24px; font-weight: 700; }
.profile-head .ph-meta { color: var(--muted); font-size: 13px; }
.stat-scroll { overflow-x: auto; }
.stat-scroll table { font-size: 12.5px; white-space: nowrap; }
.pick-list .slot-row { cursor: pointer; }
.pick-list .slot-row:hover { border-color: var(--accent); background: var(--card-hover); }
.subnote {
  background: rgba(167,139,250,.08); border: 1px dashed rgba(167,139,250,.45);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 12px;
}
.subnote b { color: var(--purple); }

/* ===== The Coach ===== */
/* looming behind the live-sub modal */
.modal-box.coach-loom { position: relative; overflow: hidden; }
.modal-box.coach-loom::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url('assets/logo.png') no-repeat right 16px top 16px / 300px auto;
  opacity: .12;
  mask-image: linear-gradient(to left, black 25%, transparent 80%);
  -webkit-mask-image: linear-gradient(to left, black 25%, transparent 80%);
}
/* watermark over the draft room */
#tab-draft { position: relative; }
#tab-draft::before {
  content: ''; position: fixed; right: 6vw; bottom: -30px; width: 480px; height: 660px;
  background: url('assets/logo.png') no-repeat bottom center / contain;
  opacity: .10; pointer-events: none; z-index: 0;
}
#tab-draft > * { position: relative; z-index: 1; }
/* draft panels are slightly translucent so the coach ghosts through */
#tab-draft .panel, #tab-draft .on-clock { background: rgba(16, 16, 26, .84); backdrop-filter: blur(2px); }
@media (max-width: 900px) { #tab-draft::before { width: 300px; height: 420px; opacity: .06; } }

.badge-mini { width: 30px; height: 30px; vertical-align: -8px; }
.coach-mid { width: 46px; height: 46px; flex-shrink: 0; }
.ai-coach { --glow: #c084fc; overflow: visible; }
img.ai-coach { border-radius: 50%; object-fit: cover; background: transparent; }
.ai-coach.coach-grit { --glow: #fb923c; }
.ai-coach.coach-analyst { --glow: #60a5fa; }
.ai-coach.coach-salty { --glow: #34d399; }
.ai-coach.coach-jitters { --glow: #fbbf24; }
.ai-coach.coach-oracle { --glow: #c084fc; }
.to-avatar { width: 34px; height: 34px; vertical-align: -10px; margin-right: 4px; }
.subnote.with-coach { display: flex; gap: 12px; align-items: center; }
.coach-hint { display: flex; gap: 10px; align-items: center; }

/* ===== Create-league: roster construction ===== */
.roster-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px;
}
@media (max-width: 480px) { .roster-grid { grid-template-columns: repeat(2, 1fr); } }
.rc-item { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.rc-label { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.rc-item select { width: 100%; padding: 8px 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); text-align: center; font-weight: 700; }
.rc-summary { font-size: 12.5px; color: var(--accent); font-weight: 600; margin-top: 6px; }

/* ===== Create-league: scoring editor ===== */
.scoring-editor { background: var(--bg-2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; margin-top: 6px; }
.scoring-editor summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.scoring-editor summary:hover { color: var(--text); }
.sc-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; }
.sc-label { color: var(--text); font-weight: 600; }
.sc-inputs { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.sc-inputs input { width: 64px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); text-align: center; font-weight: 700; }
.sc-inputs select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 12px; }

/* ===== League rules summary ===== */
.rules-details { background: var(--bg-2); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 14px; margin: 12px 0; }
.rules-details summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.rules-details summary:hover { color: var(--text); }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-top: 6px; }
@media (max-width: 640px) { .rules-grid { grid-template-columns: 1fr; } }
.rules-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.rules-row span:last-child { color: var(--muted); text-align: right; }

/* ===== Draft room: clock, ranks, coach's call ===== */
.pick-clock {
  font-family: 'Rajdhani'; font-size: 34px; font-weight: 700; color: var(--silver);
  min-width: 96px; text-align: center; letter-spacing: 1px;
}
.pick-clock.urgent { color: var(--red); animation: pulse .8s infinite; }
.draft-countdown { color: var(--accent); font-weight: 600; font-size: 13.5px; margin-left: 6px; }
.rank-chip {
  min-width: 38px; text-align: center; font-family: 'Rajdhani'; font-weight: 700; font-size: 14px;
  color: var(--silver); background: var(--card); border: 1px solid var(--border);
  border-radius: 7px; padding: 3px 4px; flex-shrink: 0;
}
.do-select { padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-weight: 700; }
.coach-call {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid rgba(139,92,246,.55); background: linear-gradient(90deg, rgba(124,58,237,.16), rgba(124,58,237,.04));
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px;
}
.coach-call .cc-body { flex: 1; min-width: 0; }
.coach-call .cc-label { font-size: 11px; color: var(--purple); text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700; }
.coach-call .cc-pick { font-family: 'Rajdhani'; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.coach-call .cc-rank { font-size: 12.5px; color: var(--muted); font-family: 'Inter'; font-weight: 600; }
.coach-call .cc-why { font-size: 13px; color: var(--text); }
.coach-call .cc-alts { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ===== Coach Engine: sideline dock, strip, alerts ===== */
.coach-dock {
  display: flex; gap: 16px; align-items: flex-start;
  border: 1px solid rgba(139,92,246,.5); border-radius: var(--radius);
  background: linear-gradient(115deg, rgba(124,58,237,.16), rgba(16,16,26,.6));
  padding: 14px 18px; margin-bottom: 16px;
}
.cd-img { width: 74px; height: 74px; object-fit: contain; filter: drop-shadow(0 0 18px rgba(124,58,237,.4)); flex-shrink: 0; }
.cd-body { flex: 1; min-width: 0; }
.cd-name {
  font-family: 'Rajdhani'; font-weight: 700; font-size: 16px; letter-spacing: 2px;
  color: var(--accent-soft, #c4b5fd); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.band-chip {
  font-family: 'Inter'; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  border: 1px solid rgba(215,215,228,.4); color: var(--silver); border-radius: 999px; padding: 2px 10px;
}
.cd-margin { font-family: 'Inter'; font-size: 12.5px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.cd-record { font-family: 'Inter'; font-size: 12px; color: var(--muted); letter-spacing: 0; font-weight: 600; }
.cd-record i { color: var(--gold); font-style: normal; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-left: 3px; }
.cd-switch { margin-left: auto; font-size: 11.5px; padding: 4px 9px; }
.cd-calm { margin-top: 6px; font-size: 14.5px; color: var(--text); font-style: italic; }
.cd-read, .cs-read { display: block; margin-top: 6px; font-size: 12px; color: var(--purple); font-weight: 600; letter-spacing: .01em; }
.cs-read { margin-top: 3px; }
.cd-alert { margin-top: 8px; }
.cd-say { font-size: 15px; color: var(--text); margin-bottom: 10px; line-height: 1.5; }
.alert-btns { display: inline-flex; gap: 8px; flex-wrap: wrap; }

.coach-stripe {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2);
  padding: 9px 14px; margin-bottom: 14px; font-size: 13.5px;
}
.coach-stripe:hover { border-color: rgba(139,92,246,.5); }
.cs-img { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.cs-body { flex: 1; min-width: 0; color: var(--muted); }
.cs-body b { color: var(--purple); }
.cs-alert { color: var(--text); }
.cs-go { color: var(--muted); font-size: 12px; white-space: nowrap; }

.slot-row.coach-pick { border-color: rgba(139,92,246,.65); box-shadow: 0 0 0 1px rgba(139,92,246,.35); }
.coach-pick-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--purple); border: 1px solid rgba(139,92,246,.5); border-radius: 999px; padding: 1px 8px; margin-left: 4px;
}

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--accent); color: var(--text);
  border-radius: 12px; padding: 12px 22px; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,.5); z-index: 60; max-width: 92vw;
}
.toast.error { border-color: var(--red); }

@media (max-width: 640px) {
  .topbar { justify-content: center; padding: 12px 12px; }
  .nav { width: 100%; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 34px), transparent); }
  .nav-btn { padding: 9px 12px; font-size: 14px; }
  main { padding: 14px 12px 60px; }
  .week-nav { padding: 12px 12px 0; }
  .mu-score { font-size: 30px; }
  .mu-odds-pct { font-size: 20px; }
  .p-pts { font-size: 17px; min-width: 42px; }
  .slot-row { gap: 8px; padding: 8px 9px; }
  .slot-tag { min-width: 38px; font-size: 12.5px; padding: 5px 3px; }
  .slot-row .headshot, .mu-side .headshot { width: 32px; height: 32px; }
  .p-name { font-size: 13.5px; }
  .p-meta { font-size: 11.5px; }
  .slot-actions .btn-small { padding: 6px 9px; font-size: 12.5px; }
  /* the slot tag already names the position: the badge stays only where it adds something (FLEX) */
  .slot-row:not(.flex-slot) .p-name .pos-badge { display: none; }
  /* two lineups side by side: no room for headshots on a phone */
  .mu-row { grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr); gap: 5px; }
  .mu-row .slot-tag { min-width: 38px; }
  .mu-side { gap: 5px; }
  .mu-side .headshot { display: none; }
  .mu-side .p-pts { min-width: 34px; }
}

/* ===== Injury / availability badges ===== */
.inj {
  display: inline-block; margin-left: 4px; padding: 1px 5px; border-radius: 5px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em; vertical-align: middle;
  border: 1px solid currentColor; line-height: 1.3; cursor: help;
}
.inj-Q { color: #fbbf24; }
.inj-D { color: #fb923c; }
.inj-O, .inj-IR, .inj-PUP, .inj-NFI { color: #f87171; }
.inj-SUSP { color: #a78bfa; }
.hurt { color: #f87171; font-weight: 700; white-space: nowrap; }
.hurt-questionable { color: #fbbf24; }
.hurt-doubtful { color: #fb923c; }

/* ===== Locker room (bench pleas) ===== */
.cs-switch { font-size: 11px; padding: 3px 8px; white-space: nowrap; }
.locker { margin-bottom: 14px; }
.plea { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-top: 10px; background: var(--bg-2); }
.plea-row { display: flex; gap: 10px; align-items: flex-start; }
.plea-row.reply { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.plea-body { flex: 1; min-width: 0; }
.plea-say { font-style: italic; color: var(--text); margin-top: 3px; line-height: 1.45; font-size: 14px; }
.plea-coach { font-size: 22px; width: 36px; text-align: center; flex-shrink: 0; }
.plea .alert-btns { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .coach-stripe { flex-wrap: wrap; }
  .cs-body { flex: 1 1 calc(100% - 46px); }
  .coach-stripe .alert-btns { display: flex; gap: 8px; }
  .cs-switch { margin-left: auto; }
}
.plea-body > .owner-tag { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.plea-reply-label { margin-top: 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; }
.plea-replies { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.plea-replies .btn-ghost { text-align: left; white-space: normal; line-height: 1.3; }
.plea-replies .reply-snap { border-color: rgba(251,146,60,.5); }
.plea-replies .reply-lasso { border-color: rgba(74,222,128,.5); }
.plea-log { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; }
.plea-log-row { font-size: 12.5px; color: var(--muted); padding: 3px 0; }
.plea-log-row .you { color: var(--purple); font-weight: 700; }

/* ===== Waivers ===== */
.waiver-banner { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; color: var(--muted); background: var(--bg-2); }
.waiver-banner b { color: var(--text); }
.waiver-banner.claims { border-color: rgba(139,92,246,.6); }
.waiver-banner.open { border-color: rgba(74,222,128,.5); }
.waiver-banner.locked { border-color: rgba(248,113,113,.45); }
.claims-panel { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; background: var(--bg-2); }
.claim-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.claim-row:first-of-type { border-top: 0; }
.claim-row .pk { min-width: 28px; color: var(--muted); font-weight: 700; }
.claim-row .claim-body { flex: 1; min-width: 0; }
.claim-row .btn-ghost { padding: 2px 8px; }
.field { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }
.field select { display: block; width: 100%; margin-top: 4px; }

/* ===== Résumé ===== */
.resume-head .team-select { background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.grade-chip { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--border); color: var(--muted); font-size: 11.5px; letter-spacing: .3px; cursor: help; }
.grade-chip.graded { border-style: solid; color: var(--text); font-size: 12.5px; }
.grade-chip.graded b { font-family: 'Rajdhani'; font-size: 16px; }
.grade-chip.g-A { border-color: var(--live); color: var(--live); } .grade-chip.g-B { border-color: var(--blue); color: var(--blue); }
.grade-chip.g-C { border-color: var(--gold); color: var(--gold); } .grade-chip.g-D, .grade-chip.g-F { border-color: var(--red); color: var(--red); }
.grade-chip small { color: var(--muted); font-size: 11px; }
.grade-bars { display: grid; gap: 6px; margin-top: 10px; max-width: 520px; }
.grade-bar { display: grid; grid-template-columns: 150px minmax(0,1fr) 34px; gap: 8px; align-items: center; font-size: 12.5px; }
.gb-label small { color: var(--muted); }
.gb-track { height: 8px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--border); overflow: hidden; }
.gb-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--purple)); }
.gb-val { text-align: right; font-family: 'Rajdhani'; font-weight: 700; }
@media (max-width: 640px) { .grade-bar { grid-template-columns: 118px minmax(0,1fr) 30px; } }
.resume-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 14px 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 8px; }
.stat-tile { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; background: var(--bg-2); }
.stat-tile.good { border-color: rgba(74,222,128,.45); }
.stat-tile.bad { border-color: rgba(248,113,113,.45); }
.st-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 700; }
.st-value { font-size: 24px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.st-value small { font-size: 13px; color: var(--muted); font-weight: 600; }
.st-sub { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.rs-week { border-top: 1px solid var(--border); padding: 10px 0; }
.rs-week-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.rs-score { font-weight: 700; }
.rs-score.W { color: #4ade80; } .rs-score.L { color: #f87171; }
.rs-call { font-size: 13px; color: var(--muted); padding: 3px 0 3px 6px; border-left: 2px solid var(--border); margin: 3px 0; }
.rs-call.good, .rs-call.success { border-left-color: #4ade80; }
.rs-call.miss, .rs-call.fail { border-left-color: #f87171; }
.rs-call .impact { color: var(--gold); font-weight: 700; }
.rs-call.none { border-left-color: transparent; font-style: italic; }
.plea .reply-random { border-color: rgba(251,191,36,.5); }
.plea-btn { font-weight: 800; letter-spacing: .6px; text-transform: uppercase; font-size: 11.5px; }

/* ===== CARDS — collectible achievement cards ===== */
.cards-hud { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 4px 4px 10px; }
.cards-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 30px; letter-spacing: 4px; line-height: 1;
  background: linear-gradient(180deg, #f4f4ff, #a9a9c9 60%, #6f6f92); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cards-count { font-family: 'Rajdhani', sans-serif; font-weight: 600; letter-spacing: 2px; color: var(--muted); font-size: 13px; margin-top: 4px; }
.cards-count b { color: var(--purple); font-size: 16px; }
.cards-enable { font-size: 11px; letter-spacing: 1px; border-color: rgba(192,132,252,.6); color: var(--purple); }
.cards-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 10px 0 0; letter-spacing: .3px; }

.fan-wrap { position: relative; padding: 18px 0 8px; }
.fan-track {
  display: flex; gap: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding: 26px calc(50% - var(--cardw, 240px) / 2) 34px; scrollbar-width: none; outline: none; perspective: 1200px;
}
.fan-track::-webkit-scrollbar { display: none; }
.fan-slot { flex: 0 0 var(--cardw, 240px); scroll-snap-align: center; scroll-snap-stop: always; margin: 0 -22px;
  transition: opacity .18s ease-out; cursor: pointer; }
.fan-slot > .gcard { transform-origin: 50% 120%; transition: transform .18s ease-out; will-change: transform; }
.fan-slot.active { cursor: default; }
.fan-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 20; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(14,14,22,.85); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; }
.fan-arrow.left { left: 4px; } .fan-arrow.right { right: 4px; }
@media (max-width: 640px) { .fan-arrow { display: none; } .fan-track { --cardw: 232px; } }
@media (min-width: 641px) { .fan-track { --cardw: 260px; } }

/* the card: 2.5 × 3.5 proportions, layered */
.gcard { width: var(--cardw, 240px); aspect-ratio: 5 / 7; perspective: 900px; position: relative; }
.gcard.large { --cardw: min(78vw, 300px); width: var(--cardw); margin: 0 auto; }
.gcard-inner { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .12s ease-out;
  box-shadow: 0 18px 40px rgba(0,0,0,.6), 0 2px 0 rgba(255,255,255,.06) inset, 0 -2px 0 rgba(0,0,0,.5) inset; background: #07070c; }
.fan-slot.active .gcard-inner { box-shadow: 0 26px 60px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.06), 0 0 40px -10px rgba(139,92,246,.45); }
.gcard-art { position: absolute; inset: 0; }
.gcard-svg { width: 100%; height: 100%; display: block; }
.gcard-frame { position: absolute; inset: 0; border-radius: 14px; pointer-events: none;
  border: 2px solid rgba(255,255,255,.08); box-shadow: inset 0 0 0 5px rgba(0,0,0,.55), inset 0 0 0 6px rgba(255,255,255,.07), inset 0 0 30px rgba(0,0,0,.6); }
.gcard-frame::after { content: ''; position: absolute; inset: 7px; border-radius: 9px; border: 1px solid rgba(255,255,255,.12); pointer-events: none; }
.gcard-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 14px 14px; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,5,10,0) 0%, rgba(5,5,10,.78) 40%, rgba(5,5,10,.95) 100%); }
.gcard-rarity { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 10.5px; letter-spacing: 3px; color: #b9b9d0; }
.gcard-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-style: italic; font-size: 22px; letter-spacing: 1px; line-height: 1.05; margin-top: 2px;
  background: linear-gradient(180deg, #ffffff, #cfcfe6 55%, #8d8da8); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.8)); }
.gcard-sub { font-size: 10.5px; color: #9a9ab5; letter-spacing: .6px; margin-top: 4px; text-transform: uppercase; }
/* light */
.gcard-glare { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255,255,255,.42) 0%, rgba(255,255,255,.10) 22%, rgba(255,255,255,0) 48%); }
.gcard-foil { position: absolute; inset: 0; pointer-events: none; opacity: 0; mix-blend-mode: color-dodge;
  background: linear-gradient(115deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.18) 30%, hsla(280,100%,75%,.45) 44%, hsla(190,100%,72%,.42) 52%, hsla(45,100%,75%,.40) 60%, rgba(255,255,255,0) 82%);
  background-size: 260% 260%; background-position: calc(var(--gx) * 1.4 - 20%) calc(var(--gy) * 1.4 - 20%); }
.gcard-foil { -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 44%, rgba(0,0,0,.28) 0%, rgba(0,0,0,.55) 55%, #000 100%); mask-image: radial-gradient(ellipse 62% 58% at 50% 44%, rgba(0,0,0,.28) 0%, rgba(0,0,0,.55) 55%, #000 100%); }
.r-common .gcard-foil { opacity: .16; } .r-rare .gcard-foil { opacity: .34; } .r-epic .gcard-foil { opacity: .5; } .r-legendary .gcard-foil { opacity: .58; }
.r-legendary .gcard-foil { -webkit-mask-image: radial-gradient(ellipse 60% 56% at 50% 44%, rgba(0,0,0,.22) 0%, rgba(0,0,0,.5) 55%, #000 100%), repeating-linear-gradient(45deg, #000 0 5px, rgba(0,0,0,.75) 5px 10px); -webkit-mask-composite: source-in; mask-image: radial-gradient(ellipse 60% 56% at 50% 44%, rgba(0,0,0,.22) 0%, rgba(0,0,0,.5) 55%, #000 100%), repeating-linear-gradient(45deg, #000 0 5px, rgba(0,0,0,.75) 5px 10px); mask-composite: intersect; }
.r-legendary .gcard-foil { background-image: linear-gradient(115deg, rgba(255,255,255,0) 0%, hsla(45,100%,80%,.5) 28%, hsla(300,100%,80%,.5) 42%, hsla(190,100%,80%,.5) 54%, hsla(45,100%,85%,.55) 66%, rgba(255,255,255,0) 84%); }
.r-rare .gcard-frame { border-color: rgba(196,181,253,.35); box-shadow: inset 0 0 0 5px rgba(0,0,0,.55), inset 0 0 0 6px rgba(196,181,253,.28), inset 0 0 30px rgba(0,0,0,.6); }
.r-epic .gcard-frame { border-color: rgba(240,171,252,.5); box-shadow: inset 0 0 0 5px rgba(0,0,0,.55), inset 0 0 0 6px rgba(240,171,252,.45), inset 0 0 34px rgba(103,232,249,.15); }
.r-legendary .gcard-frame { border-color: rgba(253,230,138,.7); box-shadow: inset 0 0 0 5px rgba(0,0,0,.6), inset 0 0 0 7px rgba(253,230,138,.6), inset 0 0 0 8px rgba(0,0,0,.6), inset 0 0 40px rgba(251,191,36,.18); }
.r-legendary .gcard-title { background: linear-gradient(180deg, #fff7cc, #fde68a 50%, #b45309); -webkit-background-clip: text; background-clip: text; }
.r-epic .gcard-title { background: linear-gradient(180deg, #ffffff, #f0abfc 55%, #7c3aed); -webkit-background-clip: text; background-clip: text; }
.r-rare .gcard-rarity { color: #c4b5fd; } .r-epic .gcard-rarity { color: #f0abfc; } .r-legendary .gcard-rarity { color: #fde68a; }
/* the Legendary hidden emblem: only under the right light */
.gcard-emblem { position: absolute; top: 10%; right: 8%; width: 30%; pointer-events: none; opacity: calc(var(--ex) * .85); mix-blend-mode: screen; transition: opacity .15s; filter: drop-shadow(0 0 12px rgba(253,230,138,.6)); }
.gcard-emblem svg { width: 100%; height: auto; }
/* locked */
.s-locked .gcard-title, .s-secret .gcard-title { background: linear-gradient(180deg, #b9b9d0, #6f6f92); -webkit-background-clip: text; background-clip: text; }
.s-secret .gcard-title { letter-spacing: 6px; }
.s-locked .gcard-glare, .s-secret .gcard-glare { opacity: .55; }
.s-locked .gcard-foil, .s-secret .gcard-foil { opacity: .12; background-image: linear-gradient(115deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.35) 45%, rgba(255,255,255,0) 70%); }
.s-locked .gcard-frame, .s-secret .gcard-frame { border-color: rgba(255,255,255,.05); }
.r-back .gcard-glare { opacity: .8; }
/* no motion */
.no-motion .gcard-inner { transition: none; transform: none; }
.no-motion .gcard-glare { background: linear-gradient(160deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 45%); }
@media (prefers-reduced-motion: reduce) { .fan-slot { transition: none; } .gcard-inner { transition: none; } }

/* detail panel under the hand */
.card-detail { margin: 0 auto; max-width: 520px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-2); padding: 12px 16px; transition: max-height .2s, opacity .2s; }
.card-detail.collapsed { display: none; }
.card-detail h3 { margin: 4px 0 6px; font-size: 22px; letter-spacing: 1px; }
.cd-top { display: flex; justify-content: space-between; align-items: center; }
.cd-rarity { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 3px; font-size: 11px; color: #b9b9d0; }
.cd-rarity.r-rare { color: #c4b5fd; } .cd-rarity.r-epic { color: #f0abfc; } .cd-rarity.r-legendary { color: #fde68a; }
.cd-status { font-size: 10.5px; letter-spacing: 2px; color: var(--muted); font-weight: 700; }
.cd-status.unlocked { color: #4ade80; }
.cd-desc { color: var(--text); margin: 0 0 8px; }
.cd-meta { font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* the reveal */
.card-reveal { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; background: rgba(4,4,8,.92); opacity: 0; transition: opacity .3s; padding: 16px; }
.card-reveal.on { opacity: 1; }
.cr-inner { text-align: center; width: 100%; max-width: 420px; }
.cr-kicker { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 6px; font-size: 18px; color: var(--purple); text-shadow: 0 0 18px rgba(139,92,246,.6); margin-bottom: 14px; }
.cr-stage { perspective: 1200px; cursor: pointer; }
.cr-flipper { position: relative; width: min(78vw, 300px); aspect-ratio: 5 / 7; margin: 0 auto; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.cr-flipper.flipped { transform: rotateY(180deg); }
.cr-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cr-face .gcard { width: 100%; height: 100%; }
.cr-front { transform: rotateY(180deg); overflow: hidden; border-radius: 14px; }
.cr-sweep { position: absolute; inset: -20%; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(105deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 65%); }
.cr-flipper.flipped .cr-sweep { animation: cr-sweep 1.6s .5s ease-out forwards; }
@keyframes cr-sweep { 0% { opacity: 0; transform: translateX(-60%); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateX(60%); } }
.cr-details { margin-top: 16px; }
.cr-details h2 { margin: 4px 0; font-size: 28px; letter-spacing: 2px; font-style: italic; }
.cr-details p { color: var(--text); margin: 4px 0 8px; }
.cr-details .btn-small { margin-top: 12px; }
.cr-tap { margin-top: 16px; background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 8px 16px; letter-spacing: 2px; font-size: 11px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .cr-flipper { transition: none; } .cr-flipper.flipped .cr-sweep { animation: none; opacity: 0; } }
.cards-hud-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cards-preview-tag { font-size: 11px; letter-spacing: 3px; color: var(--gold); -webkit-text-fill-color: var(--gold); vertical-align: middle; }

/* ===== card artwork: scenes, foil hooks, hierarchy ===== */
.gcard-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gcard-svg.scene text { paint-order: stroke; }
.gcard .art-gold { filter: brightness(calc(.8 + var(--sx, .5) * .55)) saturate(calc(.9 + var(--sx, .5) * .3)); transition: filter .12s; }
.gcard .art-glass { opacity: calc(var(--sx, .5) * .16); transition: opacity .12s; }
.gcard .art-hidden { opacity: var(--ex, 0); transition: opacity .15s; }
.no-motion .gcard .art-gold { filter: none; } .no-motion .gcard .art-glass { opacity: .08; } .no-motion .gcard .art-hidden { opacity: .35; }
/* the shell under a locked face keeps its own quiet sheen */
.gcard-art.shell + .gcard-foil { opacity: .1; }
/* hierarchy: the front card is the one in your hand */
.fan-slot:not(.active) .gcard-inner { filter: brightness(.68) saturate(.85); }
.fan-slot:not(.active) .gcard-glare { opacity: .25; }
.fan-slot:not(.active) .gcard-foil { opacity: .12 !important; }
.fan-slot.far .gcard-foil, .fan-slot.far .gcard-glare, .fan-slot.far .gcard-emblem { display: none; }
.fan-slot.far .gcard-inner { filter: brightness(.5) saturate(.7); }
.fan-slot { contain: layout paint; }
.cards-secret { color: var(--muted); font-weight: 600; letter-spacing: 1.5px; }

/* ===== SIDELINE: TIMEOUT + THROW THE FLAG ===== */
.sideline-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 10px 0 4px; }
.sl-btn { min-width: 0; }
.sl-btn .sl-label { overflow-wrap: anywhere; }
.sideline-controls.compact { margin: 6px 0 0; }
.sl-btn { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left;
  padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer;
  font-family: 'Inter', sans-serif; transition: border-color .15s, box-shadow .15s, transform .1s; min-height: 52px; }
.sl-btn .sl-icon { grid-row: 1 / span 2; font-size: 20px; line-height: 1; }
.sl-btn .sl-label { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1px; font-size: 13.5px; }
.sl-btn .sl-label b { color: var(--gold); }
.sl-btn .sl-sub { font-size: 11px; color: var(--muted); }
.sl-btn:not(:disabled):hover { transform: translateY(-1px); }
.sl-btn.sl-timeout:not(:disabled) { border-color: rgba(250,204,21,.55); box-shadow: 0 0 16px rgba(250,204,21,.15); }
.sl-btn.sl-flag:not(:disabled) { border-color: rgba(239,68,68,.55); box-shadow: 0 0 16px rgba(239,68,68,.15); }
.sl-btn:disabled { opacity: .45; cursor: not-allowed; }
.sideline-controls.compact .sl-btn { min-height: 44px; padding: 7px 10px; }
.sideline-controls.compact .sl-sub { display: none; }
.sl-test { grid-column: 1 / -1; background: none; border: 1px dashed rgba(250,204,21,.45); color: var(--gold); border-radius: 10px; padding: 6px 10px; font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1.5px; font-size: 11.5px; cursor: pointer; }
.sl-test.on { background: rgba(250,204,21,.12); border-style: solid; }
.sideline-controls.testing .sl-btn { border-style: dashed; }
.to-test { display: inline-block; vertical-align: middle; margin-left: 8px; font-size: 10px; letter-spacing: 2px; padding: 2px 7px; border-radius: 999px; background: rgba(250,204,21,.15); border: 1px solid rgba(250,204,21,.5); color: var(--gold); }

/* the timeout: the room dims, the clock is yours */
.timeout-overlay { position: fixed; inset: 0; z-index: 380; background: rgba(6,8,16,.94); overflow-y: auto; opacity: 0; transition: opacity .3s; padding: 16px; -webkit-overflow-scrolling: touch; }
.timeout-overlay.on { opacity: 1; }
.to-inner { max-width: 520px; margin: 0 auto; padding-bottom: 32px; }
.to-head { text-align: center; padding: 8px 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.to-kicker { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 8px; font-size: 20px; color: var(--gold); text-shadow: 0 0 18px rgba(250,204,21,.5); }
.to-clock { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 64px; line-height: 1; letter-spacing: 3px; font-variant-numeric: tabular-nums; margin: 4px 0; }
.to-clock.urgent { color: var(--red); animation: pulse 1s infinite; }
.to-meta { font-size: 12.5px; color: var(--muted); letter-spacing: 1px; }
.to-coach { background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.35); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.to-coach-name { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1.5px; color: var(--purple); font-size: 14px; margin-bottom: 4px; }
.to-say { font-size: 15px; line-height: 1.45; }
.to-say.to-call { margin-top: 6px; font-weight: 600; }
.to-slots { display: grid; gap: 8px; }
.to-slot { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.to-slot.pick { border-color: rgba(250,204,21,.6); box-shadow: 0 0 14px rgba(250,204,21,.12); }
.to-slot-head { font-size: 14px; }
.to-slot-line { color: var(--muted); }
.to-slot-line b { color: var(--text); }
.to-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.to-actions .plea-btn { flex: 1; min-width: 140px; padding: 12px 10px; font-size: 13px; }
.to-foot { margin-top: 12px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.45; }

/* the flag: yellow on the field, the referee talks */
.flag-overlay { position: fixed; inset: 0; z-index: 390; background: rgba(6,8,16,.94); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .25s; padding: 16px; overflow-y: auto; }
.flag-overlay.on { opacity: 1; }
.fl-inner { width: 100%; max-width: 440px; text-align: center; }
.fl-flag { font-size: 54px; line-height: 1; animation: fl-drop .7s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes fl-drop { 0% { transform: translateY(-140px) rotate(-30deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.fl-kicker { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 8px; font-size: 20px; color: var(--gold); text-shadow: 0 0 18px rgba(250,204,21,.5); margin-top: 6px; }
.fl-ref { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 8px; font-family: 'Rajdhani', sans-serif; letter-spacing: 3px; font-size: 13px; color: var(--text); }
.fl-stripes { width: 26px; height: 16px; border-radius: 3px; background: repeating-linear-gradient(90deg, #fff 0 4px, #111 4px 8px); box-shadow: 0 0 0 1px var(--border); }
.fl-say { font-size: 17px; line-height: 1.45; min-height: 52px; margin-bottom: 14px; }
.fl-prefix { color: var(--muted); font-size: 14px; }
.fl-choices { display: grid; gap: 8px; }
.fl-choice { padding: 12px 14px; font-size: 14px; text-align: left; border-radius: 12px; line-height: 1.35; }
.fl-review { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border: 1px dashed rgba(250,204,21,.5); border-radius: 12px; color: var(--gold); letter-spacing: 2px; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 14px; }
.fl-review-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse .8s infinite; }
.fl-verdict { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 3px; font-size: 16px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); color: var(--muted); }
.fl-verdict.over { color: #4ade80; border-color: rgba(74,222,128,.5); background: rgba(74,222,128,.08); }
.fl-note { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.fl-close { margin-top: 14px; background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 8px 16px; letter-spacing: 2px; font-size: 11px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .fl-flag { animation: none; } .to-clock.urgent, .fl-review-dot { animation: none; } }

/* ===== CARDS: the two view types (hand + grid) and the full-screen card ===== */
.cards-view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.cards-view-toggle button { background: none; border: 0; color: var(--muted); font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1.5px; font-size: 12px; padding: 6px 12px; cursor: pointer; }
.cards-view-toggle button.on { background: rgba(139,92,246,.25); color: var(--purple); }
.cards-grid { max-width: 620px; margin: 0 auto; }
.cg-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 2px 4px 8px; }
.cg-found { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1.5px; font-size: 15px; color: var(--muted); }
.cg-found b { color: #f0abfc; font-size: 17px; }
.cg-sort { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.cg-sort select { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 5px 8px; font-size: 12.5px; }
.cg-section { display: flex; align-items: center; gap: 12px; margin: 10px 0 8px; font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 3px; font-size: 14px; color: var(--text); text-transform: uppercase; }
.cg-section::before, .cg-section::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent); }
.cg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .cg-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cg-cell { position: relative; cursor: pointer; --cardw: 100%; contain: layout paint; transition: transform .12s; }
.cg-cell:hover, .cg-cell:focus-visible { transform: translateY(-2px); outline: none; }
.cg-cell .gcard { width: 100%; }
.cg-cell .gcard-inner { border-radius: 10px; box-shadow: 0 8px 20px rgba(0,0,0,.5); }
.cg-cell .gcard-frame, .cg-cell .gcard-frame::after { border-radius: 10px; }
.cg-cell .gcard-text { padding: 8px 7px 8px; }
.cg-cell .gcard-rarity { font-size: 7.5px; letter-spacing: 1.5px; }
.cg-cell .gcard-title { font-size: 12.5px; letter-spacing: .3px; line-height: 1.05; }
.cg-cell .gcard-sub { font-size: 7px; margin-top: 2px; }
.cg-cell .gcard-inner { transform: rotateX(calc(var(--rx) * .6)) rotateY(calc(var(--ry) * .6)); }
.cg-cell.s-locked .gcard-glare, .cg-cell.s-locked .gcard-foil, .cg-cell.s-secret .gcard-glare, .cg-cell.s-secret .gcard-foil { display: none; }
.cg-cell .gcard-emblem { width: 34%; }
.cg-cell.s-locked .gcard-inner, .cg-cell.s-secret .gcard-inner { filter: grayscale(1) brightness(.62); }
.cg-cell.s-locked .gcard-title, .cg-cell.s-secret .gcard-title { color: #b9b9d0; }
.cg-count { position: absolute; top: -6px; right: -4px; background: var(--gold); color: #1a1509; font-weight: 800; font-size: 11px; border-radius: 999px; padding: 2px 7px; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.cg-empty { grid-column: 1 / -1; color: var(--muted); font-size: 13px; padding: 16px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; }
/* full screen */
.card-full { position: fixed; inset: 0; z-index: 400; background: rgba(4,4,8,.94); overflow-y: auto; opacity: 0; transition: opacity .25s; padding: 16px; -webkit-overflow-scrolling: touch; }
.card-full.on { opacity: 1; }
.cf-inner { position: relative; max-width: 440px; margin: 0 auto; text-align: center; padding: 28px 0 32px; }
.cf-close { position: absolute; top: 0; right: 0; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid var(--border); color: var(--text); font-size: 15px; cursor: pointer; }
.cf-stage { --cardw: min(72vw, 300px); display: flex; justify-content: center; margin: 8px 0 16px; perspective: 1200px; }
.cf-stage .gcard { width: var(--cardw); }
.cf-stage .gcard-inner { transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .12s ease-out; box-shadow: 0 26px 60px rgba(0,0,0,.75), 0 0 40px -10px rgba(139,92,246,.45); }
.cf-stage.no-motion .gcard-glare { opacity: .25; }
.cf-top { display: flex; justify-content: space-between; align-items: center; max-width: 320px; margin: 0 auto; }
.cf-title { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-style: italic; font-size: 30px; letter-spacing: 2px; margin: 6px 0 12px; line-height: 1; }
.cf-how { text-align: left; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; max-width: 360px; margin: 0 auto; }
.cf-how-k { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 3px; font-size: 11px; color: var(--purple); margin-bottom: 4px; }
.cf-how-v { font-size: 15px; line-height: 1.45; color: var(--text); }
.cf-how-m { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.cf-how-m b { color: var(--text); }
.cf-back { margin-top: 16px; padding: 12px 22px; }

/* The app fits the phone and stays put: no double-tap zoom, no pinch (the
   viewport meta), no iOS text inflation, and nothing may be wider than the
   screen — a 1fr grid track will not shrink below its content's minimum
   width, so every grid child here gets min-width: 0 and the body clips. */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: clip; } /* clip, not hidden: hidden would unstick the top bar */
.lineup-grid > *, .hub-grid > *, .draft-grid > *, .mu-row > *, .roster-grid > *, .cg-grid > *, .sideline-controls > *, .mu-head > * { min-width: 0; }
/* iOS Safari zooms the whole page in when a form control's text is under
   16px and never zooms back out. On touch screens every control is 16px. */
@media (hover: none) and (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}

/* the locker-room conversation, in its own popup */
.plea-log-row { cursor: pointer; }
.plea-log-row .open { color: var(--purple); font-weight: 700; margin-left: 4px; }
.plea-chat { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; }
.chat-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-row.you { justify-content: flex-end; }
.chat-row .headshot { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--bg-2); }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; font-style: italic; background: var(--bg-2); border: 1px solid var(--border); }
.chat-row.them .bubble { border-bottom-left-radius: 4px; }
.chat-row.you .bubble { background: rgba(139,92,246,.22); border-color: rgba(139,92,246,.5); border-bottom-right-radius: 4px; }
.bubble .who { font-style: normal; font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.chat-row.you .bubble .who { color: var(--purple); }
.chat-note { font-size: 13px; color: #4ade80; margin: 4px 0 10px; }
.modal-actions { display: flex; justify-content: flex-end; }

/* coach-to-coach thread (the note pop-up, the recap, 💬 on Matchup) */
.chat-log { display: flex; flex-direction: column; gap: 6px; max-height: 44vh; overflow-y: auto; margin-bottom: 8px; padding-right: 2px; }
.chat-log .recap-coach { margin-bottom: 0; }
.chat-log .recap-coach.note-real { margin-right: 10%; }
.chat-log .recap-coach.note-sent { margin-left: 10%; flex-direction: row-reverse; text-align: right; }
.chat-week { font-family: 'Rajdhani'; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-align: center; margin: 4px 0 0; }
.recap-coach.note-new { box-shadow: 0 0 0 1px rgba(249,115,22,.55), 0 0 14px rgba(249,115,22,.25); }
.chat-empty { margin: 4px 0 8px; }
.chat-more { margin-top: 8px; }
.mu-chat { display: flex; justify-content: center; margin: 4px 0 8px; }
.chat-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #f97316; color: #111; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; margin-left: 4px; }

/* ===== the poster look: chalkboard, block type, purple marker, hologram lights ===== */
.gcard-inner { background: #0b0b10; }
/* chalk plays over the scene */
.gcard-chalk { position: absolute; inset: 0; pointer-events: none; opacity: .34; mix-blend-mode: screen; }
.gcard-chalk .gcard-svg { width: 100%; height: 100%; }
.r-common .gcard-chalk { opacity: .3; } .r-legendary .gcard-chalk { opacity: .38; }
/* the mark: the purple double slash */
.gcard-mark { position: absolute; top: 5.5%; right: 7%; height: 4.6%; width: 10%; display: flex; gap: 14%; pointer-events: none; }
.gcard-mark i { flex: 1; display: block; transform: skewX(-28deg); background: linear-gradient(160deg, #c084fc, #6d28d9); box-shadow: 0 0 6px rgba(168,85,247,.55); }
/* block titles, distressed like the wordmark; the kicker in marker */
.gcard-text { padding: 12px 14px 15px; background: linear-gradient(180deg, rgba(7,7,10,0) 0%, rgba(7,7,10,.82) 38%, rgba(7,7,10,.97) 100%); }
.gcard-rarity { font-family: 'Permanent Marker', 'Rajdhani', cursive; font-weight: 400; font-size: 13px; letter-spacing: 1.5px; color: #a855f7; transform: rotate(-2deg); transform-origin: left bottom; display: inline-block; text-shadow: 0 0 10px rgba(168,85,247,.45); }
.r-common .gcard-rarity { color: #e5e1ff; text-shadow: none; opacity: .85; }
.r-rare .gcard-rarity { color: #c4b5fd; } .r-epic .gcard-rarity { color: #d946ef; text-shadow: 0 0 10px rgba(217,70,239,.5); } .r-legendary .gcard-rarity { color: #fde68a; text-shadow: 0 0 10px rgba(253,230,138,.5); }
.gcard-title, .r-epic .gcard-title, .r-legendary .gcard-title, .s-locked .gcard-title, .s-secret .gcard-title {
  font-family: 'Anton', 'Rajdhani', sans-serif; font-weight: 400; font-style: normal; text-transform: uppercase; font-size: 24px; letter-spacing: .6px; line-height: 1; margin-top: 3px; padding-bottom: 7px; position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #ececf4 55%, #b9b9c9 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,.85));
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='80'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -7 5.2'/%3E%3C/filter%3E%3Crect width='240' height='80' filter='url(%23g)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='80'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 -7 5.2'/%3E%3C/filter%3E%3Crect width='240' height='80' filter='url(%23g)'/%3E%3C/svg%3E");
  -webkit-mask-size: 240px 80px; mask-size: 240px 80px; }
.r-legendary .gcard-title { background: linear-gradient(180deg, #fff7cc, #fde68a 50%, #c98a12); -webkit-background-clip: text; background-clip: text; }
.s-locked .gcard-title, .s-secret .gcard-title { background: linear-gradient(180deg, #a9a9bd, #5f5f74); -webkit-background-clip: text; background-clip: text; }
/* the purple brush bar under the title, rarity-colored */
.gcard-title::after { content: ''; position: absolute; left: 1px; bottom: 0; width: 58%; height: 4px; background: linear-gradient(90deg, #a855f7, #6d28d9 70%, rgba(109,40,217,.2)); clip-path: polygon(0 20%, 3% 0, 30% 15%, 55% 0, 80% 25%, 100% 10%, 98% 90%, 70% 100%, 45% 80%, 20% 100%, 2% 85%); }
.r-common .gcard-title::after { background: linear-gradient(90deg, #d8d8e6, #8d8da8 70%, rgba(141,141,168,.2)); }
.r-rare .gcard-title::after { background: linear-gradient(90deg, #c4b5fd, #7c3aed 70%, rgba(124,58,237,.2)); }
.r-epic .gcard-title::after { background: linear-gradient(90deg, #f0abfc, #a21caf 70%, rgba(162,28,175,.2)); }
.r-legendary .gcard-title::after { background: linear-gradient(90deg, #fde68a, #d97706 70%, rgba(217,119,6,.2)); }
.s-locked .gcard-title::after, .s-secret .gcard-title::after { background: linear-gradient(90deg, #4a4a5c, rgba(74,74,92,.2)); }
.gcard-sub { font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 11px; letter-spacing: 1.2px; color: #b7b7cc; margin-top: 5px; }
/* frame: a chalk rule inside a dark rim */
.gcard-frame { border: 2px solid rgba(255,255,255,.06); box-shadow: inset 0 0 0 5px rgba(0,0,0,.6), inset 0 0 0 6px rgba(243,240,255,.12), inset 0 0 34px rgba(0,0,0,.65); }
.gcard-frame::after { inset: 7px; border: 1px dashed rgba(243,240,255,.22); border-radius: 8px; }
.r-rare .gcard-frame { box-shadow: inset 0 0 0 5px rgba(0,0,0,.6), inset 0 0 0 6px rgba(196,181,253,.35), inset 0 0 34px rgba(0,0,0,.65); }
.r-epic .gcard-frame { box-shadow: inset 0 0 0 5px rgba(0,0,0,.6), inset 0 0 0 6px rgba(217,70,239,.55), inset 0 0 34px rgba(103,232,249,.12); }
.r-legendary .gcard-frame { box-shadow: inset 0 0 0 5px rgba(0,0,0,.65), inset 0 0 0 7px rgba(253,230,138,.65), inset 0 0 0 8px rgba(0,0,0,.6), inset 0 0 40px rgba(251,191,36,.16); }
/* premium hologram lights: a prism with a fine line-and-dot pattern, riding the tilt */
.gcard-holo { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: 0; overflow: hidden;
  background-image:
    repeating-linear-gradient(-55deg, rgba(255,255,255,0) 0 3px, rgba(255,255,255,.22) 3px 4px),
    radial-gradient(circle, rgba(255,255,255,.55) 0 .7px, rgba(255,255,255,0) 1.4px),
    linear-gradient(115deg, hsla(0,100%,72%,.55) 0%, hsla(48,100%,70%,.55) 16%, hsla(120,100%,70%,.5) 32%, hsla(190,100%,70%,.55) 48%, hsla(262,100%,74%,.6) 64%, hsla(310,100%,74%,.55) 80%, hsla(0,100%,72%,.55) 100%);
  background-size: 100% 100%, 7px 7px, 300% 300%;
  background-position: 0 0, 0 0, calc(var(--gx) * 1.6 - 30%) calc(var(--gy) * 1.6 - 30%);
  -webkit-mask-image: radial-gradient(ellipse 70% 64% at var(--gx) var(--gy), #000 0%, rgba(0,0,0,.6) 30%, rgba(0,0,0,.12) 62%, rgba(0,0,0,0) 80%);
  mask-image: radial-gradient(ellipse 70% 64% at var(--gx) var(--gy), #000 0%, rgba(0,0,0,.6) 30%, rgba(0,0,0,.12) 62%, rgba(0,0,0,0) 80%); }
.r-common .gcard-holo { opacity: .2; } .r-rare .gcard-holo { opacity: .34; } .r-epic .gcard-holo { opacity: .5; } .r-legendary .gcard-holo { opacity: .6; }
.s-locked .gcard-holo, .s-secret .gcard-holo { opacity: .1; }
/* the idle sweep: the front card breathes light even when the phone is still */
.gcard-holo::after { content: ''; position: absolute; inset: -40%; opacity: 0; mix-blend-mode: screen; pointer-events: none;
  background: linear-gradient(105deg, rgba(255,255,255,0) 36%, hsla(262,100%,80%,.55) 44%, hsla(190,100%,80%,.6) 50%, hsla(45,100%,80%,.55) 56%, rgba(255,255,255,0) 64%); }
.fan-slot.active .gcard:not(.hover) .gcard-holo::after, #card-full .gcard:not(.hover) .gcard-holo::after, .cr-front .gcard .gcard-holo::after, .gcard.large:not(.hover) .gcard-holo::after { animation: holo-sweep 6.5s ease-in-out infinite; }
@keyframes holo-sweep { 0% { transform: translateX(-45%) rotate(0.001deg); opacity: 0; } 12% { opacity: .9; } 50% { transform: translateX(45%); opacity: .9; } 62% { opacity: 0; } 100% { transform: translateX(45%); opacity: 0; } }
/* sparkle: epic and legendary glitter */
.gcard-spark { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: .8;
  background-image:
    radial-gradient(circle at 18% 22%, #fff 0 .8px, transparent 2px), radial-gradient(circle at 72% 14%, #fff 0 .6px, transparent 1.8px), radial-gradient(circle at 84% 46%, #fff 0 .9px, transparent 2.2px),
    radial-gradient(circle at 30% 62%, #fff 0 .6px, transparent 1.8px), radial-gradient(circle at 58% 38%, #fff 0 .7px, transparent 2px), radial-gradient(circle at 12% 84%, #fff 0 .6px, transparent 1.6px),
    radial-gradient(circle at 66% 78%, #fff 0 .8px, transparent 2px), radial-gradient(circle at 44% 90%, #fff 0 .6px, transparent 1.6px), radial-gradient(circle at 90% 70%, #fff 0 .7px, transparent 1.8px);
  animation: spark-twinkle 2.8s ease-in-out infinite alternate; }
.gcard-spark::after { content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 26% 40%, #fff 0 .7px, transparent 2px), radial-gradient(circle at 78% 28%, #fff 0 .9px, transparent 2.4px), radial-gradient(circle at 50% 16%, #fff 0 .6px, transparent 1.8px), radial-gradient(circle at 20% 56%, #fff 0 .8px, transparent 2px), radial-gradient(circle at 86% 88%, #fff 0 .6px, transparent 1.6px), radial-gradient(circle at 62% 60%, #fff 0 .7px, transparent 2px);
  animation: spark-twinkle 3.6s .9s ease-in-out infinite alternate-reverse; }
@keyframes spark-twinkle { 0% { opacity: .15; } 50% { opacity: .95; } 100% { opacity: .3; } }
.r-legendary .gcard-spark { opacity: 1; }
.fan-slot:not(.active) .gcard-spark, .fan-slot:not(.active) .gcard-holo { opacity: .1 !important; }
.fan-slot.far .gcard-spark, .fan-slot.far .gcard-holo, .fan-slot.far .gcard-chalk { display: none; }
.no-motion .gcard-holo::after, .no-motion .gcard-spark, .no-motion .gcard-spark::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .gcard-holo::after, .gcard-spark, .gcard-spark::after { animation: none !important; } }
/* the back: the board itself */
.r-back .gcard-inner { background: #0b0b10; }

/* ✉️ coach-to-coach inbox */
.inbox-btn { position: relative; padding-inline: 10px; }
.inbox-btn .chat-badge { position: absolute; top: -6px; right: -6px; }
.inbox-btn.has-unread { border-color: rgba(249,115,22,.7); box-shadow: 0 0 12px rgba(249,115,22,.25); }
.inbox-list { display: flex; flex-direction: column; gap: 8px; }
.inbox-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); cursor: pointer; font-family: inherit; }
.inbox-row:hover { border-color: var(--purple); }
.inbox-row.unread { border-color: rgba(249,115,22,.6); }
.inbox-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-last { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-go { color: var(--muted); }
.st-owner.clickable { cursor: pointer; color: var(--purple); }
.mu-chat .btn-small { font-size: 12.5px; }

/* the win celebration */
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 46; pointer-events: none; }
.confetti.hidden { display: none; }
.share-btn { background: linear-gradient(135deg, #f97316, #c026d3); color: #fff; border: none; }
.share-preview img { width: 100%; border-radius: 12px; display: block; margin: 6px 0 10px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.share-modal .alert-btns a.btn-small { text-decoration: none; display: inline-block; }

/* 🎧 ask the coach */
.cd-ask, .cs-ask { font-size: 11.5px; padding: 4px 9px; margin-right: 4px; }
.ask-log { display: flex; flex-direction: column; gap: 8px; max-height: 44vh; overflow-y: auto; margin: 4px 0 10px; }
.ask-q { align-self: flex-end; max-width: 88%; background: rgba(168,85,247,.16); border: 1px solid rgba(168,85,247,.4); border-radius: 12px 12px 2px 12px; padding: 8px 10px; }
.ask-q .owner-tag { display: block; margin-bottom: 2px; }
.ask-a { display: flex; gap: 10px; align-items: flex-start; max-width: 96%; background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px 12px 12px 2px; padding: 8px 10px; }
.ask-a.down { opacity: .75; border-style: dashed; }
.ask-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ask-empty { margin: 4px 0 10px; }
.to-ask { margin: 12px 0 4px; border: 1px solid rgba(168,85,247,.4); border-radius: 12px; padding: 10px; background: rgba(12,10,22,.7); }
.to-ask-head { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1px; font-size: 13px; margin-bottom: 6px; }
.to-ask .ask-log { max-height: 26vh; }

/* players pool: fits a phone; the owner rides in the meta line there */
.pool-row { flex-wrap: nowrap; }
.pool-row .p-info { flex: 1 1 0; min-width: 0; }
.pool-row .rank-chip, .pool-row .pos-badge, .pool-row .headshot, .pool-row .p-pts, .pool-row .btn-small, .pool-row .owner-tag { flex-shrink: 0; }
.pool-row .btn-small { white-space: nowrap; padding-inline: 10px; }
.pool-row .owner-tag { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.pool-row .owner-inline { color: var(--purple); }
.pool-scope { display: inline-flex; gap: 4px; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--border); }
@media (max-width: 640px) {
  .pool-row { gap: 7px; padding: 8px 2px; }
  .pool-row .owner-tag { display: none; }
  .pool-row .rank-chip { min-width: 30px; font-size: 12px; padding: 3px 2px; }
  .pool-row .headshot { width: 34px; height: 34px; }
  .pool-row .p-pts { min-width: 40px; font-size: 18px; }
  .pool-row .p-name { font-size: 13.5px; }
  .pool-row .p-meta { font-size: 11px; }
  .pool-scope { margin-left: 0; padding-left: 0; border-left: none; width: 100%; margin-top: 4px; }
}
/* bench on the Matchup tab and the bench tag on My Team */
.mu-bench-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 14px 0 4px; font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 1px; font-size: 14px; flex-wrap: wrap; }
.mu-bench-head small { font-family: 'Inter', sans-serif; font-weight: 400; letter-spacing: 0; color: var(--muted); font-size: 11.5px; }
.mu-row.bench { opacity: .82; }
.mu-row.bench .p-pts.muted { color: var(--muted); }
.slot-tag.bench { color: var(--muted); }
.slot-tag .tag-bench { display: block; font-size: 9px; letter-spacing: 1.5px; color: var(--muted); line-height: 1; margin-bottom: 1px; }

.pool-row .p-pts.proj-pts { color: var(--purple); }
.pool-row .p-pts.muted { color: var(--muted); }
.pool-row .p-pts small { white-space: nowrap; }

.mu-odds-basis { text-align: center; font-size: 11px; color: var(--muted); margin-top: 5px; }

/* native shell (iOS): safe areas */
html.native .topbar { padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
html.native #auth-screen { padding-top: calc(env(safe-area-inset-top, 0px) + clamp(205px, 56vw, 322px)); }
html.native .modal-backdrop { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html.native .timeout-overlay, html.native .flag-overlay, html.native .card-reveal, html.native .card-full { padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
html.native .toast { bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
html.native body { padding-bottom: env(safe-area-inset-bottom, 0px); -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
html.native input, html.native textarea { -webkit-user-select: text; user-select: text; }
html.native * { -webkit-tap-highlight-color: transparent; }
/* account + moderation */
.link-btn { background: none; border: none; padding: 0; color: var(--purple); cursor: pointer; font: inherit; font-size: inherit; text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.account-foot { margin-top: 14px; text-align: center; }
.account-foot a { color: var(--muted); }
.note-report { display: inline-block; margin-top: 4px; font-size: 11px; color: var(--muted); }

/* the sideline floaters (Matchup tab) */
.sideline-fab { position: fixed; right: 10px; bottom: 22px; z-index: 35; display: flex; flex-direction: column; gap: 10px; }
.sideline-fab.hidden { display: none; }
.fab { width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--border); background: rgba(13,17,23,.94); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; box-shadow: 0 8px 24px rgba(0,0,0,.55); cursor: pointer; font-family: 'Rajdhani', sans-serif; padding: 0; }
.fab .fab-icon { font-size: 21px; line-height: 1; }
.fab .fab-label { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.fab.sl-timeout:not(:disabled) { border-color: rgba(250,204,21,.75); box-shadow: 0 0 18px rgba(250,204,21,.28), 0 8px 24px rgba(0,0,0,.55); }
.fab.sl-flag:not(:disabled) { border-color: rgba(239,68,68,.75); box-shadow: 0 0 18px rgba(239,68,68,.28), 0 8px 24px rgba(0,0,0,.55); }
.fab:disabled { opacity: .4; cursor: not-allowed; }
.fab:not(:disabled):active { transform: scale(.94); }
html.native .sideline-fab { right: max(10px, env(safe-area-inset-right, 0px)); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
/* the Profile menu */
.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); cursor: pointer; font-family: inherit; }
.menu-row:hover { border-color: var(--purple); }
.menu-icon { font-size: 20px; width: 26px; text-align: center; }
.menu-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-main small { color: var(--muted); font-size: 12px; }
.menu-go { color: var(--muted); font-size: 20px; }
.menu-modal .modal-head h3 { display: flex; align-items: center; gap: 8px; }

/* notifications */
.bell-btn.has-unread { border-color: rgba(168,85,247,.7); box-shadow: 0 0 12px rgba(168,85,247,.25); }
.menu-row.static { cursor: default; }
.menu-row.static:hover { border-color: var(--border); }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: #2a2a3c; position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch:checked { background: var(--purple); }
.switch:checked::after { transform: translateX(18px); }
.notif-list { display: flex; flex-direction: column; gap: 6px; }
.notif-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); cursor: pointer; font-family: inherit; }
.notif-row.unread { border-color: rgba(168,85,247,.55); }
.notif-row .menu-main small { white-space: normal; }
.notif-when { color: var(--muted); font-size: 11px; flex-shrink: 0; margin-top: 2px; }
/* NFL scoreboard */
.scores-panel { margin-top: 16px; }
.score-list { display: flex; flex-direction: column; }
.score-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.score-row:last-child { border-bottom: none; }
.score-teams { display: flex; align-items: baseline; gap: 8px; font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .5px; }
.score-teams b { font-size: 19px; margin-left: 2px; }
.score-teams .lead { color: #fff; } .score-teams span:not(.lead):not(.score-at) { color: var(--muted); }
.score-row.pre .score-teams span { color: var(--text); }
.score-at { color: var(--muted); font-weight: 500; font-size: 13px; }
.score-status { font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.score-who { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); }
.score-who .you { color: var(--purple); }

/* ---- settled week: final but unofficial ---- */
.settle-note { font-size: 12.5px; color: var(--muted, #9aa3b5); text-align: center; padding: 6px 12px; }

/* ---- player news lines and the profile's news block ---- */
.p-news { font-size: 12px; color: var(--muted, #9aa3b5); margin-top: 2px; line-height: 1.3; cursor: pointer; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.p-news-when { opacity: .7; font-size: 11px; }
.news-block { margin: 4px 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.news-block h3 { margin: 0 0 4px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.news-block h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted, #9aa3b5); }
.news-head { margin: 0 0 6px; font-weight: 600; line-height: 1.35; }
.news-story { margin: 0 0 10px; font-size: 13.5px; line-height: 1.45; color: #d6dae3; }
.news-season summary { cursor: pointer; font-size: 13px; color: var(--muted, #9aa3b5); margin-bottom: 6px; }

/* ---- player profile: this week's matchup + projection, next up ---- */
.matchup-block { margin: 2px 0 12px; padding: 10px 12px; border-radius: 10px; background: rgba(124, 92, 255, .10); border: 1px solid rgba(124, 92, 255, .35); }
.mb-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mb-k { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; }
.mb-v { flex: 1 1 auto; }
.mb-proj { font-size: 15px; }
.mb-next { margin-top: 6px; font-size: 12.5px; color: var(--muted, #9aa3b5); display: flex; gap: 12px; flex-wrap: wrap; }
.mb-next small { text-transform: uppercase; letter-spacing: .04em; }
.next-wk small { opacity: .8; margin-right: 3px; }
table.gamelog .pts-col { background: rgba(124, 92, 255, .12); }
/* ---- roster-full picker: starters first ---- */
.pick-head { margin: 8px 0 2px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #9aa3b5); }
.drop-picker .slot-row.locked { opacity: .55; cursor: default; }

/* ---- foldables and dual screens ----
   Unfolded, the inner display is near-square and tablet-wide: the two-column
   grids kick in from 760px (above). On a true dual-screen device the browser
   reports two viewport segments; keep the two columns on either side of the
   hinge and never let a modal or the sideline floaters sit across it. */
@media (horizontal-viewport-segments: 2) {
  .lineup-grid, .hub-grid {
    grid-template-columns: env(viewport-segment-width 0 0) env(viewport-segment-width 1 0);
    column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0));
  }
  main, .hub-main, .week-nav { max-width: none; padding-left: 16px; padding-right: 16px; }
  .modal-box { max-width: calc(env(viewport-segment-width 0 0) - 24px); margin-right: auto; }
  .sideline-fab { right: calc(100vw - env(viewport-segment-right 0 0) + 10px); }
}
@media (vertical-viewport-segments: 2) {
  .modal-box { max-height: calc(env(viewport-segment-height 0 0) - 24px); }
}
/* landscape on a phone-height screen: keep modals usable, trim the header */
@media (max-height: 480px) and (orientation: landscape) {
  .modal-box { max-height: 92vh; }
  .topbar { padding-top: 4px; padding-bottom: 4px; }
}
/* landscape on a notched phone: keep content clear of the sensor housing on either side */
html.native main, html.native .hub-main, html.native .week-nav { padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); }
html.native .topbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
/* unfolded but not desktop-wide: give the lineup more room than the bench */
@media (min-width: 760px) and (max-width: 1023px) { .lineup-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
/* short landscape: compact floaters tucked into the corner, off the content */
@media (max-height: 480px) and (orientation: landscape) {
  .sideline-fab { right: 6px; bottom: 6px; gap: 6px; }
  .sideline-fab .fab { transform: scale(.78); transform-origin: bottom right; }
}
@media (max-height: 480px) and (orientation: landscape) { #tab-matchup main, #tab-matchup { padding-right: 84px; } }

/* ---- Weekly Draft ---- */
.weekly-head h2 { margin-bottom: 2px; }
.weekly-card .lc-name .owner-tag { margin-left: 6px; vertical-align: middle; }
.weekly-create { margin-top: 14px; }
.weekly-create summary { list-style: none; display: inline-block; cursor: pointer; }
.weekly-create summary::-webkit-details-marker { display: none; }
.weekly-create form { margin-top: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.form-row select, .form-row input { width: 100%; }
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; }
.draft-when { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: rgba(124, 92, 255, .12); border: 1px solid rgba(124, 92, 255, .4); }
.dw-k { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #9aa3b5); }
.dw-v { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 24px; margin: 2px 0; }
.dw-sub { font-size: 13px; color: var(--muted, #9aa3b5); }
.draft-opts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.board-row { border: 1px solid var(--border); border-radius: 12px; margin: 8px 0; background: var(--bg-2); }
.board-row.me { border-color: rgba(124, 92, 255, .6); }
.board-row summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.board-row summary::-webkit-details-marker { display: none; }
.board-row .pk { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 18px; min-width: 24px; color: var(--muted, #9aa3b5); }
.board-team { flex: 1; display: flex; flex-direction: column; }
.board-team small { color: var(--muted, #9aa3b5); font-size: 12px; }
.board-pts { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 24px; display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.board-pts small { font-family: 'Inter', sans-serif; font-weight: 500; font-size: 11.5px; color: var(--purple, #a78bfa); margin-top: 3px; }
.board-lineup { padding: 0 10px 10px; }
.board-winner { margin: 6px 0 12px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(245, 197, 24, .18), rgba(124, 92, 255, .18)); border: 1px solid rgba(245, 197, 24, .5); font-size: 16px; }
