:root {
  /* FX Performing Arts: black stage, red curtain, white light */
  --stage: #000000;
  --stage-2: #262626;
  --paper: #F5F5F5;
  --surface: #FFFFFF;
  --ink: #1A1A1A;
  --muted: #5C5C5C;
  --line: #D9D9D9;
  --red: #C8102E;
  --red-ink: #B00E28;
  --red-soft: #FBE4E7;
  --pick: #000000;
  --pick-on: #FFFFFF;
  --pick-soft: #EDEDED;
  --win: #1B7A45;
  --loss: #C8102E;
  --win-soft: #DCF0E4;
  --loss-soft: #FBE4E7;
  --display: 'Big Shoulders Display', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --stage: #000000; --stage-2: #2E2E2E; --paper: #121212; --surface: #1D1D1D;
    --ink: #F2F2F2; --muted: #A6A6A6; --line: #353535;
    --red: #D91E36; --red-ink: #FF7482; --red-soft: #3A1418;
    --pick: #FFFFFF; --pick-on: #000000; --pick-soft: #2C2C2C;
    --win: #4CC282; --loss: #FF6B79; --win-soft: #15351F; --loss-soft: #3A1418;
  }
}
:root[data-theme="dark"] {
  --stage: #000000; --stage-2: #2E2E2E; --paper: #121212; --surface: #1D1D1D;
  --ink: #F2F2F2; --muted: #A6A6A6; --line: #353535;
  --red: #D91E36; --red-ink: #FF7482; --red-soft: #3A1418;
  --pick: #FFFFFF; --pick-on: #000000; --pick-soft: #2C2C2C;
  --win: #4CC282; --loss: #FF6B79; --win-soft: #15351F; --loss-soft: #3A1418;
}
*, *::before, *::after { box-sizing: inherit; }
html { background: var(--stage); scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); -webkit-text-size-adjust: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
h2 { font: 700 26px/1.1 var(--display); margin: 24px 0 12px; }

/* header band: black stage with a red curtain edge */
.band { background: var(--stage); color: #fff; border-bottom: 6px solid var(--red); }
.band-inner { max-width: 720px; margin: 0 auto; padding: 18px 16px 12px; display: flex; align-items: center; gap: 14px; }
#logo { width: 60px; height: 72px; object-fit: contain; flex: none; }
@media (max-width: 480px) { #logo { width: 48px; height: 58px; } }
.titles { flex: 1; min-width: 0; }
.studio { font: 800 32px/1 var(--display); letter-spacing: .3px; }
.sub { font-size: 15px; opacity: .85; }
.tabs { max-width: 720px; margin: 0 auto; display: flex; padding: 0 8px; }
.tabs button {
  flex: 1; background: none; border: 0; color: rgba(255,255,255,.72); cursor: pointer;
  font: 600 16px var(--body); padding: 12px 8px 10px; border-bottom: 4px solid transparent;
}
.tabs button.on { color: #fff; border-bottom-color: #fff; }
.ghost { background: transparent; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 6px; padding: 6px 12px; font: 500 14px var(--body); cursor: pointer; }

main { max-width: 720px; margin: 0 auto; padding: 16px 16px 8px; }
.narrow { max-width: 420px; margin: 24px auto 0; }

/* forms */
.field { display: block; font-weight: 600; font-size: 15px; margin-bottom: 14px; }
.field input, .field select, .field textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px; font: 400 17px var(--body);
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
input:focus-visible, select:focus-visible, button:focus-visible, textarea:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.primary {
  background: var(--red); color: #fff; border: 0; border-radius: 8px; padding: 13px 22px;
  font: 800 20px var(--display); letter-spacing: .4px; cursor: pointer;
}
.primary:disabled { opacity: .6; cursor: wait; }
.wide { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--red-ink); font: 600 16px var(--body); padding: 8px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px; margin-bottom: 18px; }
.seg button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 6px; font: 600 16px var(--body); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--pick); color: var(--pick-on); }

/* sheets */
.lockline { margin: 0 0 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.chip {
  flex: none; display: flex; align-items: center; gap: 8px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: 600 15px var(--body); cursor: pointer;
}
.chip.on { border-color: var(--stage-2); box-shadow: inset 0 0 0 1px var(--stage-2); }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--paper); color: var(--muted); }
.tag.paid { background: var(--win); color: #fff; }
.tag.unpaid { background: var(--red-soft); color: var(--red-ink); }
.pay { background: var(--red-soft); border-left: 4px solid var(--red); border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.pay p { margin: 6px 0 0; }

/* games */
.games { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.game { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.game-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); padding: 8px 12px 2px; }
.tbflag { font-style: normal; font-weight: 700; color: var(--red-ink); margin-left: 6px; }
.team {
  position: relative; display: grid; grid-template-columns: 24px 34px 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-left: 4px solid transparent; cursor: pointer;
}
.team + .team { border-top: 1px solid var(--line); }
.team input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.box { width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 4px; display: grid; place-items: center; }
.team input:focus-visible + .box { outline: 3px solid var(--red); outline-offset: 2px; }
.team.picked { border-left-color: var(--pick); background: var(--pick-soft); }
.team.picked .box { background: var(--pick); border-color: var(--pick); }
.team.picked .box::after { content: ''; width: 6px; height: 11px; border: solid var(--pick-on); border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg); }
.team.picked.won { border-left-color: var(--win); background: var(--win-soft); }
.team.picked.won .box { background: var(--win); border-color: var(--win); }
.team.picked.won .box::after { border-color: #fff; }
.team.picked.lost { border-left-color: var(--loss); background: var(--loss-soft); }
.team.picked.lost .box { background: var(--loss); border-color: var(--loss); }
.team.picked.lost .box::after { width: 12px; height: 3px; border: 0; background: #fff; transform: none; }
.team.picked.won, .team.picked.lost { border-left-width: 6px; }
.result { font-weight: 700; font-size: 12px; margin-left: 6px; }
.result.w { color: var(--win); } .result.l { color: var(--loss); }
.team img { width: 34px; height: 34px; object-fit: contain; }
.tname { font-weight: 600; line-height: 1.2; min-width: 0; }
.tname small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.num { font: 600 24px/1 var(--display); text-align: right; min-width: 52px; }
.num small { display: block; font: 400 11px var(--body); color: var(--muted); margin-top: 2px; }
.team.won .num { color: var(--win); }
.is-locked .team { cursor: default; }

.tb { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 14px; }
.tb label { display: block; font-weight: 600; margin-bottom: 8px; }
.tb input { width: 140px; padding: 12px; font: 600 22px var(--display); color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }

.savebar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--surface); border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}
.savebar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.count { font: 600 20px var(--display); }

/* standings */
.pot { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--red); color: #fff; border-radius: 10px; overflow: hidden; }
.pot div { padding: 12px 8px; text-align: center; }
.pot div + div { border-left: 1px solid rgba(255,255,255,.3); }
.pot b { display: block; font: 800 38px/1 var(--display); }
.pot span { font-size: 13px; }
.board { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 12px; }
.board th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.board td { padding: 12px; border-bottom: 1px solid var(--line); }
.board tr:last-child td { border-bottom: 0; }
.board .rk { font: 700 22px var(--display); width: 44px; color: var(--muted); }
.board .wl { font: 700 22px var(--display); white-space: nowrap; }
.board tr.lead td { background: var(--pick-soft); }
.board tr.lead .rk { color: var(--red-ink); }
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hist li span:first-child { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); padding: 20px 0; text-align: center; }

/* admin */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.arow { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.arow:last-child { border-bottom: 0; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.actions select { padding: 8px; font: 500 15px var(--body); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 8px 12px; font: 600 14px var(--body); cursor: pointer; }
.btn.go { background: var(--win); border-color: var(--win); color: #fff; }
.btn.warn { color: var(--loss); }
.notice { background: var(--red-soft); border-left: 4px solid var(--red); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }

#toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 10; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--loss); color: #fff; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }
@media (max-width: 420px) {
  .studio { font-size: 27px; }
  .pot b { font-size: 28px; }
  .arow { grid-template-columns: 1fr; }
  .actions { justify-content: flex-start; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tabs button { font-size: 15px; padding-left: 4px; padding-right: 4px; }

/* sheet pager */
.pager { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.pager-title { text-align: center; padding: 8px; }
.pager-title strong { font: 700 24px var(--display); margin-right: 6px; }
.arrow { height: 56px; border: 0; background: none; color: var(--ink); font: 700 30px/1 var(--display); cursor: pointer; }
.arrow:disabled { opacity: .25; cursor: default; }
.buy { width: 100%; margin-bottom: 14px; padding: 12px; border: 2px dashed var(--stage-2); border-radius: 10px; background: none; color: var(--stage-2); font: 700 17px var(--body); cursor: pointer; }
.paychoice { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 12px 14px; margin: 0 0 14px; }
.paychoice legend { font-weight: 600; padding: 0 4px; }
.paychoice label { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.paychoice input { width: 20px; height: 20px; accent-color: var(--red); }
.venmo-link { display: inline-block; margin-top: 8px; font-weight: 700; color: var(--red-ink); }

/* chat */
.chat-list { height: calc(100vh - 270px); min-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; align-self: flex-start; background: var(--paper); border-radius: 12px 12px 12px 4px; padding: 8px 12px; }
.msg.mine { align-self: flex-end; background: var(--pick); color: var(--pick-on); border-radius: 12px 12px 4px 12px; }
.msg .who { font-size: 12px; font-weight: 700; opacity: .8; }
.msg .who span { font-weight: 400; margin-left: 6px; }
.msg .text { overflow-wrap: anywhere; }
.msg .del { background: none; border: 0; color: inherit; opacity: .7; font-size: 12px; padding: 4px 0 0; cursor: pointer; text-decoration: underline; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form input { flex: 1; padding: 12px; font: 400 17px var(--body); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }

/* admin */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.pcard.owes { border-left: 4px solid var(--red); }
.prow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prow strong { font-size: 17px; margin-right: auto; }
.phone { font-variant-numeric: tabular-nums; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); margin-top: 8px; }

.owed { margin-top: 6px; font-size: 15px; }
.owed strong { color: var(--red-ink); }

.venmo-btn { display: inline-block; margin-top: 10px; background: #008CFF; color: #fff; text-decoration: none; font: 700 16px var(--body); padding: 12px 16px; border-radius: 8px; }
.venmo-btn:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.payrules { margin: 10px 0 0; padding-left: 20px; }
.payrules li { margin-bottom: 6px; }

/* void sheets and settings */
.pay.void { background: var(--pick-soft); border-left-color: var(--muted); }
.tag.void { background: var(--pick-soft); color: var(--muted); text-decoration: line-through; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field select { appearance: auto; }
.buy { border-color: var(--ink); color: var(--ink); }
h2 { font-weight: 800; letter-spacing: .3px; }

/* sponsor footer: white plate keeps the logo true in dark mode */
.sponsor { max-width: 720px; margin: 24px auto 0; padding: 0 16px calc(120px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.sponsor span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sponsor a { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.sponsor img { display: block; width: 240px; max-width: 100%; height: auto; }
.sponsor a:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.addadmin { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-top: 12px; }
.addadmin .field { margin-bottom: 0; }
/* solid green fills keep white text readable in dark mode */
:root { --win-fill: #1B7A45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --win-fill: #1E7F49; } }
:root[data-theme="dark"] { --win-fill: #1E7F49; }
.btn.go { background: var(--win-fill); border-color: var(--win-fill); }
.tag.paid { background: var(--win-fill); }

/* sheet name: tap to rename */
.sheet-name { background: none; border: 0; padding: 4px 8px; margin: 0; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; font: inherit; }
.sheet-name strong { font: 800 26px/1.1 var(--display); letter-spacing: .3px; }
.sheet-name .pencil { font-size: 16px; color: var(--muted); }
.sheet-name:hover .pencil, .sheet-name:focus-visible .pencil { color: var(--red-ink); }
.sheet-name:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.rename { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 2px 0 4px; }
.rename input { flex: 1 1 120px; min-width: 0; max-width: 200px; font: 600 17px var(--body); padding: 8px 10px; border: 2px solid var(--ink); border-radius: 8px; background: var(--surface); color: var(--ink); }

/* rules */
.rules h3 { font: 800 22px/1.1 var(--display); letter-spacing: .3px; margin: 18px 0 6px; color: var(--red-ink); }
.rules h3:first-child { margin-top: 0; }
.rules ul { margin: 0; padding-left: 20px; }
.rules li { margin: 6px 0; line-height: 1.45; }
.guestlinks { display: flex; gap: 18px; flex-wrap: wrap; }

/* five tabs fit on small phones; scrolls sideways only if a phone is narrower still */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 1 0 auto; white-space: nowrap; }
@media (max-width: 480px) { .tabs { padding: 0 2px; } .tabs button { font-size: 14px; padding-left: 7px; padding-right: 7px; } }

.rename .btn { padding: 8px 10px; }

/* leaderboard: tap a name to see picks after lock */
.namebtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.namebtn:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: env(safe-area-inset-top, 0px) 0 0; }
.modal.hidden { display: none; }
.modal-card { background: var(--surface); color: var(--ink); width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto; border-radius: 14px 14px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 640px) { .modal { align-items: center; } .modal-card { border-radius: 14px; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.modal-head h3 { font: 800 26px/1.1 var(--display); margin: 0 0 4px; }
.viewpicks { list-style: none; margin: 0; padding: 0; }
.viewpicks li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 10px; border-top: 1px solid var(--line); border-left: 5px solid transparent; }
.viewpicks li.win { background: var(--win-soft); border-left-color: var(--win); }
.viewpicks li.loss { background: var(--loss-soft); border-left-color: var(--loss); }
.vp-game { display: flex; flex-direction: column; font-size: 15px; }
.vp-pick { display: flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.vp-pick img { object-fit: contain; }
.vp-mark { width: 16px; text-align: center; }
li.win .vp-mark { color: var(--win); } li.loss .vp-mark { color: var(--loss); }
body.noscroll { overflow: hidden; }

/* last week's winner banner */
.winner-banner { background: var(--stage); color: #fff; border-radius: 12px; padding: 14px 16px 12px; margin-bottom: 14px; border-top: 5px solid var(--red); }
:root[data-theme="dark"] .winner-banner { border: 1px solid #333; border-top: 5px solid var(--red); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .winner-banner { border: 1px solid #333; border-top: 5px solid var(--red); } }
.wb-label { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #ff8a96; }
.wb-name { font: 800 30px/1.05 var(--display); letter-spacing: .3px; margin: 4px 0 10px; }
.wb-sheet { font: 500 15px var(--body); opacity: .75; }
.wb-money { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.18); border-radius: 8px; overflow: hidden; }
.wb-money div { background: #1c1c1c; padding: 8px 10px; }
.wb-money b { display: block; font: 800 28px/1 var(--display); }
.wb-money div:first-child b { color: #fff; }
.wb-money div:last-child b { color: #ff8a96; }
.wb-money span { font-size: 13px; opacity: .85; }
.wb-note { font-size: 13px; opacity: .8; margin-top: 8px; }

/* past picks */
.pastweek h3 { font: 800 24px/1.1 var(--display); margin: 18px 0 8px; }
.pastsheet { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.pastsheet.winner { border-color: var(--win); }
.pastsheet summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.pastsheet summary::-webkit-details-marker { display: none; }
.pastsheet summary::after { content: '▾'; color: var(--muted); margin-left: 6px; }
.pastsheet[open] summary::after { content: '▴'; }
.pastsheet summary .wl { margin-left: auto; font-weight: 700; }
.pastsheet > p { margin: 0 14px 8px; }
.pastsheet .tag { margin-left: 6px; }

.tabs .short { display: none; }
@media (max-width: 480px) { .tabs .full { display: none; } .tabs .short { display: inline; } }

/* everyone's picks grid */
.gridwrap { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.gridwrap:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.pickgrid { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.pickgrid th, .pickgrid td { padding: 6px 6px; text-align: center; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap; }
.pickgrid thead th { position: sticky; top: 0; z-index: 2; background: var(--stage); color: #fff; font-weight: 700; vertical-align: bottom; line-height: 1.15; }
.pickgrid thead th span { display: block; }
.pickgrid .gh-at { font-size: 10px; opacity: .6; }
.pickgrid .gh-score { font-size: 10px; font-weight: 500; opacity: .8; margin-top: 2px; }
.pickgrid .gh-tb { font-size: 10px; color: #ff8a96; margin-top: 2px; }
.pickgrid thead th.tbcol { box-shadow: inset 0 -3px 0 var(--red); }
.pickgrid .gp-name { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; max-width: 120px; box-shadow: 1px 0 0 var(--line); }
.pickgrid thead .gp-name { z-index: 3; background: var(--stage); }
.gridname { background: none; border: 0; padding: 0; font: 600 13px var(--body); color: var(--ink); cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; max-width: 112px; display: block; }
.gridname small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.pickgrid td { font-weight: 700; min-width: 40px; }
.pickgrid td.gw { background: var(--win-soft); color: var(--win); }
.pickgrid td.gl { background: var(--loss-soft); color: var(--loss); text-decoration: line-through; text-decoration-thickness: 1px; }
.pickgrid td.gtb, .pickgrid td.gwl { color: var(--ink); font-weight: 600; }
.pickgrid tbody tr:last-child th, .pickgrid tbody tr:last-child td { border-bottom: 0; }

/* invite */
.head-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.ghost.invite { border-color: var(--red); background: var(--red); font-weight: 700; }
.invite-card { display: flex; align-items: center; gap: 10px; width: 100%; margin: 12px 0 4px; padding: 12px 14px; background: var(--surface); color: var(--ink); border: 2px dashed var(--red); border-radius: 10px; font: 500 15px var(--body); text-align: left; cursor: pointer; }
.invite-card strong { color: var(--red-ink); }
.invite-card:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.ic-icon { font-size: 22px; }
.invite-preview { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0 0 14px; line-height: 1.45; word-break: break-word; }
.invite-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.invite-actions a, .invite-actions button { text-decoration: none; text-align: center; flex: 1 1 140px; }
.invite-actions .fb { background: #1877F2; color: #fff; border-color: #1877F2; }
.invite-actions > * { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 14px; border-radius: 8px; font: 700 16px var(--body); letter-spacing: 0; box-sizing: border-box; }
@media (max-width: 480px) { .head-actions { flex-direction: column; align-items: stretch; gap: 6px; } }

/* mathematically eliminated */
.board tr.out td { background: var(--loss-soft); color: var(--loss); }
.board tr.out .namebtn { color: var(--loss); text-decoration-color: var(--loss); }
.board tr.out .muted { color: var(--loss); opacity: .8; }
.outtag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--loss); color: #fff; font: 700 11px var(--body); vertical-align: middle; letter-spacing: .3px; }
.pickgrid th.gp-name.out { background: var(--loss-soft); }
.pickgrid th.gp-name.out .gridname, .pickgrid th.gp-name.out .gridname small { color: var(--loss); }
.outkey { color: var(--loss); font-weight: 700; }

.board .outcol { width: 1%; padding-left: 4px; padding-right: 8px; text-align: right; white-space: nowrap; }
.board .outtag { margin-left: 0; font-size: 12px; padding: 2px 8px; }
