/* Archivo (SIL Open Font License), served from this app so it works offline. */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Biñho Cup — "Night match": a black table, card-yellow for whatever needs you now (your turn,
   the main button, live), cream like the marble for the second-loudest things, red for red cards.
   Stickers keep their hard drop shadows. One family, two widths: expanded Archivo for the shouty
   bits, normal width for reading. Always dark, like a game night. */
:root {
  --paper: #12140f;      /* page: the table */
  --card: #1d2019;       /* stickers */
  --ink: #f4f1e8;        /* text */
  --ink-2: #a9a696;      /* secondary text */
  --line: #3b3f34;       /* sticker edge */
  --drop: #000000;       /* hard shadow */
  --pitch: #ffd23f;      /* the accent: card yellow (kept the old token name so every component follows) */
  --pitch-ink: #1f1a00;
  --pitch-soft: #3a3214; /* a winner's row, the side to shoot */
  --ply: #f1e8d0;        /* cream, like the marble: second-loudest buttons, the pot, 1st place */
  --ply-ink: #1c1a10;
  --yellow: #ffd23f;
  --yellow-ink: #2e2500;
  --red: #ef4136;
  --red-ink: #ffffff;
  --mute: #2a2d24;       /* inactive fills */
  --wide: 125;
  --display: 'Archivo', 'Arial Black', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --r: 14px;
  --edge: 2.5px;
  --tabbar: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font-family: var(--body); font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent; min-height: 100dvh; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--paper); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--pitch); outline-offset: 2px; }
[hidden] { display: none !important; }
.wrap { max-width: 600px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: calc(env(safe-area-inset-top, 0px) + 10px) calc(var(--tabbar) + env(safe-area-inset-bottom, 0px) + 28px); }
.wrap.home { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 32px); }

.disp { font-family: var(--display); font-stretch: 125%; font-variation-settings: 'wdth' 125; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; line-height: .92; }
.eyebrow { font-family: var(--display); font-variation-settings: 'wdth' 110; font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* Sticker: the one surface style */
.sticker { background: var(--card); border: var(--edge) solid var(--line); border-radius: var(--r); box-shadow: 4px 4px 0 var(--drop); }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 10px; padding-block: 6px 12px; }
.topbar .title { align-self: center; }
.topbar .title { flex: 1; min-width: 0; }
.cupname { margin: 0 0 12px; font-size: clamp(28px, 8.4vw, 40px); text-wrap: balance; overflow-wrap: anywhere; }
.codechip { flex: none; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 10px 7px; background: var(--card); border: var(--edge) solid var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--drop); }
.codechip b { font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 20px; letter-spacing: .08em; line-height: 1; }
.codechip span { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); line-height: 1; }
.iconbtn { flex: none; width: 46px; height: 46px; display: grid; place-items: center; background: var(--card); border: var(--edge) solid var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--drop); }
.iconbtn svg { width: 22px; height: 22px; }
.pillrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--mute); color: var(--ink-2); }
.pill.live { background: var(--pitch); color: var(--pitch-ink); }
.pill.warn { background: var(--yellow); color: var(--yellow-ink); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.live .dot { animation: pulse 1.3s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- status banner ---------- */
.status { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-bottom: 16px; }
.status .ball { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: var(--edge) solid var(--line); box-shadow: 3px 3px 0 var(--drop); }
.status h2 { margin: 0; font-size: 22px; }
.status p { margin: 3px 0 0; font-size: 14.5px; }
.status.up { background: var(--pitch); color: var(--pitch-ink); }
.status.up .ball { animation: bounce .9s infinite; }
.status.deck { background: var(--mute); color: var(--ink); }
.status.deck h2 { color: var(--yellow); }
.status.champ { background: var(--ply); color: var(--ply-ink); }
@keyframes bounce { 50% { transform: translateY(-6px); } }
.status .actions { margin-left: auto; }
.status .btn { color: var(--ink); }

/* ---------- panels ---------- */
.panel { padding: 16px; }
.panel h2 { margin: 0 0 12px; font-size: 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.panel h2 small { font-family: var(--body); font-variation-settings: 'wdth' 100; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); text-transform: none; }
.panel h3 { margin: 18px 0 8px; }
.panel h3:first-child { margin-top: 0; }
.note { color: var(--ink-2); font-size: 14px; margin: 8px 0 0; }
.note.warn { color: var(--red); font-weight: 600; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 12px; border: var(--edge) solid var(--line); background: var(--card); font-weight: 800; font-size: 16px; box-shadow: 3px 3px 0 var(--drop); transition: transform .06s, box-shadow .06s; text-decoration: none; color: inherit; }
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--drop); }
.btn.go { background: var(--pitch); color: var(--pitch-ink); }
.btn.big { min-height: 60px; font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 20px; text-transform: uppercase; letter-spacing: .01em; }
.btn.ply { background: var(--ply); color: var(--ply-ink); }
.btn.flat { box-shadow: none; border-color: transparent; background: var(--mute); }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 14px; box-shadow: 2px 2px 0 var(--drop); }
.btn.wide { width: 100%; }
.btn.flat, .btn.small.flat { box-shadow: none; border-color: transparent; background: var(--mute); }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-height: 44px; padding: 8px 14px; border-radius: 11px; border: var(--edge) solid var(--line); background: var(--card); font-weight: 700; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .lbl { font-size: 14px; font-weight: 700; color: var(--ink-2); }
input[type=text], input[type=number], select { width: 100%; min-width: 0; min-height: 50px; padding: 10px 14px; border-radius: 12px; border: var(--edge) solid var(--line); background: var(--card); font-size: 17px; font-weight: 600; }
input::placeholder { color: var(--ink-2); opacity: .7; font-weight: 500; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-top: 1.5px dashed var(--mute); }
.toggle:first-child { border-top: 0; padding-top: 4px; }
.toggle .t { min-width: 0; font-weight: 700; }
.toggle .t small { display: block; color: var(--ink-2); font-weight: 500; font-size: 13.5px; }
.switch { flex: none; position: relative; width: 58px; height: 34px; border-radius: 999px; border: var(--edge) solid var(--line); background: var(--mute); padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: var(--card); border: var(--edge) solid var(--line); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--pitch); }
.switch[aria-checked="true"]::after { transform: translateX(24px); }

/* stepper */
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 50px; height: 50px; border-radius: 12px; border: var(--edge) solid var(--line); background: var(--card); font-size: 26px; font-weight: 900; line-height: 1; box-shadow: 3px 3px 0 var(--drop); }
.stepper .val { font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 38px; min-width: 40px; text-align: center; }
.boardminis { display: flex; gap: 6px; flex-wrap: wrap; }
.boardmini { width: 34px; height: 22px; border-radius: 5px; background: var(--pitch); border: 2px solid var(--line); position: relative; }
.boardmini::after { content: ""; position: absolute; left: 50%; top: 2px; bottom: 2px; width: 2px; margin-left: -1px; background: rgba(255,255,255,.6); }

/* ---------- entries ---------- */
.entries { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.entries li { display: inline-flex; align-items: center; gap: 2px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--mute); font-weight: 700; }
.entries li.me { background: var(--yellow); color: var(--yellow-ink); }
.entries li button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; font-size: 18px; line-height: 1; color: inherit; opacity: .6; }
.entries li.nox { padding-right: 12px; }

/* invite card */
.invite { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px; background: var(--pitch); color: var(--pitch-ink); }
.invite .qr { width: 104px; height: 104px; background: #fff; border-radius: 10px; padding: 6px; border: var(--edge) solid var(--line); }
.invite .qr svg { display: block; width: 100%; height: 100%; }
.invite h2 { margin: 0; font-size: 20px; }
.invite p { margin: 4px 0 10px; font-size: 14px; }
.invite .btn { box-shadow: 2px 2px 0 var(--drop); color: var(--ink); }

/* pot */
.pot { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--ply); color: var(--ply-ink); display: grid; gap: 4px; }
.pot b { font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 34px; line-height: 1; }
.pot .split { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- home ---------- */
.hero { display: grid; gap: 18px; padding-top: 18px; }
.hero h1 { margin: 0; font-size: clamp(48px, 15vw, 84px); }
.hero h1 span { display: block; color: var(--pitch); }
.hero .lede { font-size: 17px; max-width: 34ch; margin: 0; color: var(--ink-2); }
.pitchart { position: relative; height: 150px; border-radius: var(--r); background: var(--card); border: var(--edge) solid var(--line); box-shadow: 4px 4px 0 var(--drop); overflow: hidden; }
.pitchart::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: rgba(255,255,255,.5); }
.pitchart::after { content: ""; position: absolute; left: 50%; top: 50%; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; border: 3px solid rgba(255,255,255,.5); }
.pitchart .marble { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 30%, #e9ece6 70%); border: var(--edge) solid #10140f; box-shadow: 3px 3px 0 #10140f; z-index: 2; left: 18%; top: 58%; animation: flick 3.2s cubic-bezier(.2,.8,.3,1) infinite; }
.pitchart .pin { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #c9d1cc; border: 2px solid #10140f; z-index: 1; }
.pitchart .goal { position: absolute; right: -2px; top: 50%; width: 18px; height: 54px; margin-top: -27px; border: 3px solid #fff; border-right: 0; border-radius: 6px 0 0 6px; }
@keyframes flick { 0%, 12% { left: 18%; top: 58%; } 55% { left: 62%; top: 22%; } 100% { left: calc(100% - 46px); top: calc(50% - 17px); } }
.codeboxes { display: flex; gap: 8px; }
.codeboxes input { text-align: center; font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 30px; text-transform: uppercase; padding: 6px 0; min-height: 64px; letter-spacing: .3em; }
.recent { display: grid; gap: 8px; }
.recent a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; color: inherit; text-decoration: none; font-weight: 700; }
.recent a small { color: var(--ink-2); font-weight: 600; }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card); border-top: var(--edge) solid var(--line);
  padding: 6px max(10px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); }
.tabbar .in { max-width: 600px; margin: 0 auto; display: flex; gap: 6px; }
.tabbar button { flex: 1; min-height: 52px; border: 0; border-radius: 12px; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); position: relative; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.tabbar .badge { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; }

/* ---------- boards ---------- */
.boards { display: grid; gap: 12px; }
.board { overflow: hidden; }
.board .bhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 14px; background: var(--pitch); color: var(--pitch-ink); border-bottom: var(--edge) solid var(--line); }
.board .bhead .disp { font-size: 18px; }
.board.open .bhead { background: var(--mute); color: var(--ink-2); }
.board .bbody { padding: 12px 14px; display: grid; gap: 10px; }
.board button.bbody { width: 100%; text-align: left; border: 0; background: none; }
.vsline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.vsline .n { font-weight: 800; font-size: 17px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vsline .n.r { text-align: right; }
.vsline .sc { font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 30px; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.qrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.qrow + .qrow { border-top: 1.5px dashed var(--mute); }
.qrow .pos { font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 22px; width: 30px; color: var(--ink-2); }
.qrow .who { flex: 1; min-width: 0; font-weight: 800; }
.qrow .who small { display: block; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.qrow.me { background: var(--yellow); color: var(--yellow-ink); }
.qrow.me .who small, .qrow.me .pos { color: var(--yellow-ink); }
.empty { padding: 22px 14px; text-align: center; color: var(--ink-2); font-weight: 600; }

/* ---------- bracket ---------- */
.lane-title { margin: 20px 0 10px; font-size: 16px; }
.lane-title:first-child { margin-top: 0; }
.bscroll { overflow-x: auto; margin-inline: -16px; padding: 4px 16px 14px; -webkit-overflow-scrolling: touch; }
.bracket { display: flex; gap: 14px; min-width: min-content; }
.col { display: flex; flex-direction: column; width: 178px; flex: none; }
.col .rl { height: 22px; }
.col .ms { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; flex: 1; }
.mcard { display: block; width: 100%; padding: 0; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 3px 3px 0 var(--drop); }
.mcard .side { display: flex; justify-content: space-between; gap: 6px; padding: 7px 10px; font-weight: 700; font-size: 14.5px; }
.mcard .side + .side { border-top: 1.5px solid var(--mute); }
.mcard .side span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard .side .s { font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-variant-numeric: tabular-nums; }
.mcard .side.w { background: var(--pitch-soft); }
.mcard .side.l { color: var(--ink-2); }
.mcard .side.tbd { color: var(--ink-2); font-weight: 500; font-style: italic; }
.mcard .tag { padding: 3px 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; background: var(--mute); color: var(--ink-2); }
.mcard.live .tag { background: var(--pitch); color: var(--pitch-ink); }
.mcard.ready .tag { background: var(--mute); color: var(--yellow); }
.mcard.bye { opacity: .5; box-shadow: none; }
.mcard.mine { outline: 3px solid var(--yellow); outline-offset: 1px; }

/* ---------- standings ---------- */
.podium { display: grid; gap: 10px; }
.place { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.place .p { flex: none; font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 24px; min-width: 70px; }
.place .w { flex: 1; min-width: 0; font-weight: 800; font-size: 18px; }
.place .c { font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 24px; font-variant-numeric: tabular-nums; }
.place.first { background: var(--ply); color: var(--ply-ink); }

/* ---------- wheel ---------- */
.wheelbox { position: relative; width: min(100%, 360px); aspect-ratio: 1; margin: 6px auto 4px; }
.wheelbox canvas { width: 100%; height: 100%; display: block; }
.pointer { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); width: 0; height: 0; border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 30px solid var(--ink); }
.callout { text-align: center; min-height: 66px; display: grid; place-content: center; gap: 4px; }
.callout .disp { font-size: 32px; }
.callout .lucky { display: inline-block; justify-self: center; background: var(--yellow); color: var(--yellow-ink); padding: 3px 10px; border-radius: 8px; font-weight: 800; }

/* ---------- rules ---------- */
.rules dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.rules dt { color: var(--ink-2); font-weight: 600; }
.rules dd { margin: 0; font-weight: 800; }
.rules ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.card-y, .card-r { display: inline-block; width: 12px; height: 16px; border-radius: 2px; vertical-align: -2px; margin-right: 4px; border: 1.5px solid var(--line); }
.card-y { background: var(--yellow); } .card-r { background: var(--red); }

/* ---------- sheets ---------- */
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(10, 14, 10, .62); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 640px; max-height: 100%; overflow-y: auto; background: var(--paper); border-top: var(--edge) solid var(--line); border-radius: 20px 20px 0 0;
  padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--mute); margin: 0 auto 12px; }
.sheet .shead { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet.full { height: 100%; border-radius: 0; display: grid; align-content: center; justify-items: center; text-align: center; padding-top: calc(env(safe-area-inset-top, 0px) + 18px); }
.bigqr { width: min(80vw, 62vh, 460px); aspect-ratio: 1; background: #fff; padding: 14px; border-radius: 18px; border: var(--edge) solid var(--line); box-shadow: 5px 5px 0 var(--drop); }
.bigqr svg { width: 100%; height: 100%; display: block; }
.bigcode { font-size: clamp(54px, 16vw, 110px); letter-spacing: .1em; margin: 16px 0 4px; }

/* scoreboard */
.callbar { padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; border: var(--edge) solid var(--line); background: var(--card); }
.callbar h3 { margin: 0 0 2px; font-size: 20px; }
.callbar.y { background: var(--yellow); color: var(--yellow-ink); }
.callbar.r { background: var(--red); color: var(--red-ink); }
.callbar.win { background: var(--pitch); color: var(--pitch-ink); }
.callbar .row { margin-top: 10px; }
.score { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.side-card { padding: 12px; display: grid; gap: 10px; min-width: 0; align-content: start; }
.side-card.kick { background: var(--pitch-soft); }
.side-card .nm { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-card .kickl { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--pitch); height: 14px; line-height: 14px; margin-top: -4px; }
.side-card .big { font-family: var(--display); font-variation-settings: 'wdth' 125; font-weight: 900; font-size: 92px; line-height: .85; font-variant-numeric: tabular-nums; }
.side-card .goal { min-height: 64px; font-size: 20px; }
.cards { display: flex; gap: 8px; }
.cards button { flex: 1; min-height: 46px; border-radius: 10px; border: var(--edge) solid var(--line); font-weight: 900; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.cards .yc { background: var(--yellow); color: var(--yellow-ink); }
.cards .rc { background: var(--red); color: var(--red-ink); }
.cards button:disabled, .side-card .goal:disabled { opacity: .35; }
.tray { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; min-height: 18px; font-size: 12.5px; color: var(--ink-2); }
.tray .c { width: 11px; height: 15px; border-radius: 2px; border: 1.5px solid var(--line); background: var(--mute); }
.tray .c.y { background: var(--yellow); } .tray .c.r { background: var(--red); }
.pegs { display: flex; gap: 4px; flex-wrap: wrap; }
.peg { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.peg.gone { background: none; box-shadow: inset 0 0 0 1.5px var(--ink-2); opacity: .5; }
.log { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.log span { padding: 3px 9px; border-radius: 8px; background: var(--mute); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.log i { width: 9px; height: 12px; border-radius: 2px; } .log i.g { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); } .log i.y { background: var(--yellow); } .log i.r { background: var(--red); }

/* card flip */
.flip { width: 96px; height: 134px; margin: 12px auto 4px; perspective: 700px; }
.flip .inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.flip .face { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; border-radius: 9px; border: var(--edge) solid var(--line); backface-visibility: hidden; font-weight: 900; text-transform: uppercase; font-size: 14px; text-align: center; }
.flip .fy { background: var(--yellow); color: var(--yellow-ink); }
.flip .fr { background: var(--red); color: var(--red-ink); transform: rotateY(180deg); }

.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 12px); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: 3px 3px 0 var(--pitch); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* payouts, prizes, pay handles */
.prow { display: grid; grid-template-columns: 52px minmax(0, 1fr) 92px; gap: 8px; align-items: center; margin-top: 8px; }
.prow.two { grid-template-columns: 52px minmax(0, 1fr); margin-top: 0; }
.place .w small { display: block; font-size: 14px; font-weight: 600; opacity: .85; }
.invite .payline { grid-column: 1 / -1; margin: 0; padding-top: 10px; border-top: 1.5px dashed currentColor; font-size: 15px; }
.payline { margin: 0; font-weight: 600; }

/* profile stats and history */
.statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
.statgrid div { display: grid; gap: 2px; min-width: 0; }
.statgrid b { font-family: var(--display); font-variation-settings: 'wdth' 110; font-weight: 900; font-size: 22px; line-height: 1.1; }
@media (max-width: 380px) { .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qrow .pos.w { color: var(--pitch); }
.qrow .pos.l { color: var(--red); }
a.qrow { color: inherit; text-decoration: none; }
main a:not(.btn):not(.sticker):not(.qrow) { color: inherit; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 2px; }
/* On the scoreboard, yellow only ever means a yellow card: goals are cream, like the marble. */
.side-card .btn.goal { background: var(--ply); color: var(--ply-ink); }
.note a { color: inherit; font-weight: 700; }

/* scouting: tappable player names and the recent-form strip */
.linkname { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: inherit; cursor: pointer; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.form { display: flex; gap: 6px; margin-top: 6px; }
.form span { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-family: var(--display); font-weight: 900; border: 2px solid var(--line); }
.form .w { background: var(--yellow); color: var(--yellow-ink); }
.form .l { background: var(--mute); color: var(--red); }
