/* ==========================================================================
   Byb. app redesign: your photo opens Me, four tabs in a floating bar,
   a shared header on the main tabs, and a save bar on Edit profile.
   Loaded after glass.css.
   ========================================================================== */

/* ---- floating tab bar (4 tabs) */
.tabbar { grid-template-columns: repeat(4, minmax(0, 1fr)); left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 496px;
  padding: 6px; gap: 4px; border-radius: 24px; border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.tab { min-height: 54px; border-radius: 18px; font-weight: 600; }
.tab.on { background: var(--pitch-soft); }
.app[data-tab="yes"] { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
.glass .tabbar { border: 1px solid var(--g-edge); border-top: 1px solid var(--g-edge); box-shadow: var(--g-hi), 0 14px 40px rgba(0,0,0,.22); }

/* ---- header on Home, Teams, Table and Group */
.apphead { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.group-pill { display: flex; align-items: center; gap: 8px; min-width: 0; height: 44px; padding: 0 12px 0 6px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 15px var(--body); }
.group-pill .badge { border-radius: 999px; }
.group-pill > span.ellipsis { max-width: 46vw; }
.glass .group-pill, .glass .iconbtn.round { border-color: var(--g-edge); box-shadow: var(--g-hi); -webkit-backdrop-filter: var(--g-blur); backdrop-filter: var(--g-blur); }
.apphead-right { display: flex; align-items: center; gap: 8px; flex: none; }
.iconbtn.round { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); }
.iconbtn.round .dot { top: 2px; right: 0; }
.me-btn { width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; background: none; display: grid; place-items: center; flex: none; }
.me-photo { display: grid; place-items: center; border-radius: 999px; object-fit: cover; flex: none;
  background: linear-gradient(140deg, #ff9a4a, #e0440f); color: #1a0b02; font-family: var(--display); font-weight: 800;
  box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px rgba(232,104,31,.55); }
.group-menu { position: absolute; top: 52px; left: 0; right: 0; z-index: 30; box-shadow: 0 18px 40px rgba(0,0,0,.3); background: var(--paper); }
.glass .group-menu { background: color-mix(in srgb, var(--ground) 95%, transparent); -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%); }

/* ---- the Me sheet */
#mesheet .scrim { z-index: 55; }
.mesheet { gap: 14px; max-height: 92vh; overflow: auto; padding-top: 10px; animation: sheetUp .32s cubic-bezier(.2,.8,.2,1) both; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mesheet { animation: none; } }
.grabber { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line); }
.ms-photo { position: relative; flex: none; text-decoration: none; }
.ms-photo .me-photo { box-shadow: none; }
.ms-cam { position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: var(--ground);
  display: grid; place-items: center; border: 3px solid var(--paper); }
.ms-cam svg { width: 14px; height: 14px; }
.glass .ms-cam { border-color: transparent; }
.ms-name { font: 700 20px/1.15 var(--body); }
.tag.ovr-tag { background: var(--pitch-soft); color: var(--pitch); }
.tag.tier-tag { background: rgba(201,138,75,.2); color: #b06f2c; }
.ms-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 18px; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--pitch), var(--pitch-deep)); }
.ms-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); text-align: center; font-size: 12px; opacity: .92; }
.ms-stats b { display: block; font: 800 24px/1 var(--display); }
.ms-cardlink { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.18); font-weight: 600; font-size: 14px; }
.ms-icon { width: 30px; height: 30px; border-radius: 10px; background: var(--chip); display: grid; place-items: center; flex: none; color: var(--ink); }
.ms-icon svg { width: 18px; height: 18px; }

/* ---- Edit profile: the save bar only shows once something has changed */
.screen.has-savebar { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.savebar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 496px; margin: 0 auto; z-index: 40;
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 20px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.25); animation: sheetUp .25s cubic-bezier(.2,.8,.2,1) both; }
.glass .savebar { background: var(--g-strong); border-color: var(--g-edge); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); }
.savebar .btn { min-height: 44px; }

/* ---- Table: form dots instead of D / L / G */
.trow.form-cols { grid-template-columns: 16px minmax(0, 1fr) 18px 18px 18px 18px 20px 30px 42px; gap: 3px; padding: 0 10px; font-size: 13px; }
.trow.form-cols > :nth-child(n+3):not(:last-child) { text-align: center; }
.trow.form-cols .pts { font-size: 17px; }
.trow.form-cols .tform { gap: 2px; }
.trow.form-cols .fdot { width: 7px; height: 7px; }
.trow .lead { color: var(--gold); font-weight: 800; }
.trow.me { background: var(--pitch-soft) !important; }
.tform { display: flex; justify-content: flex-end; gap: 3px; }
.fdot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.fdot.W { background: var(--pitch); }
.fdot.D { background: var(--muted); opacity: .6; }
.fdot.L { background: var(--danger); }
.you-card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, var(--pitch), var(--pitch-deep)); }
.you-card .you-pos { font: 800 34px/1 var(--display); }
.you-card .fdot.D { background: #fff; opacity: .5; }
.you-card .fdot.W { background: #9fe0b4; }
.you-card .fdot.L { background: #f6b3ad; }

/* Rating panel: radar chart + sliders (lib/radar.js) */
.rate-panel { display: flex; flex-direction: column; gap: 12px; }
.rp-radar { width: 100%; max-width: 320px; height: auto; align-self: center; overflow: visible; }
.rp-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.rp-avg { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 4 4; }
.rp-shape { fill: var(--bib); fill-opacity: .26; stroke: var(--bib); stroke-width: 2.5; stroke-linejoin: round; }
.rp-dot { fill: var(--paper); stroke: var(--bib); stroke-width: 2.5; }
.rp-lab { font: 700 12px var(--body); letter-spacing: .08em; fill: var(--muted); }
.rp-val { font: 800 20px var(--display); fill: var(--ink); }
.rp-val.hi { fill: var(--rate-hi); } .rp-val.lo { fill: var(--danger); }
.rp-core { fill: var(--ground); stroke: var(--line); }
.rp-ovr { font: 800 26px var(--display); fill: var(--ink); }
.rp-ovr-l { font: 700 9px var(--body); letter-spacing: .1em; fill: var(--muted); }
.rp-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.rp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rp-legend .sw-me { width: 14px; height: 10px; border-radius: 3px; border: 2px solid var(--bib); background: color-mix(in srgb, var(--bib) 35%, transparent); }
.rp-legend .sw-avg { width: 16px; border-top: 2px dashed var(--muted); }
.rp-presets-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: -4px; }
.rp-presets-head b { font-size: 14px; }
.rp-presets-head span { font-size: 12.5px; color: var(--muted); }
.rp-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rp-preset { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 10px; border-radius: 14px; border: 1.5px solid var(--field-line); background: var(--field); color: var(--ink); text-align: left; cursor: pointer; font: inherit; transition: border-color .15s, background .15s, transform .1s; }
.rp-preset:hover { border-color: var(--bib); }
.rp-preset:active { transform: scale(.98); }
.rp-preset.on { border-color: var(--bib); background: color-mix(in srgb, var(--bib) 14%, var(--field)); }
.rp-preset svg { width: 36px; height: 36px; flex: none; }
.rp-preset .pp-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.rp-preset .pp-shape { fill: var(--bib); fill-opacity: .35; stroke: var(--bib); stroke-width: 1.5; stroke-linejoin: round; }
.rp-preset > span { display: flex; flex-direction: column; min-width: 0; }
.rp-preset b { font-size: 13.5px; line-height: 1.2; }
.rp-preset small { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.rp-rows { display: flex; flex-direction: column; border-top: 1px solid var(--line-soft); padding-top: 4px; }
.rp-row { display: grid; grid-template-columns: 106px minmax(0, 1fr) 52px; align-items: center; gap: 10px; min-height: 52px; }
.rp-row label { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rp-num { width: 52px; height: 42px; padding: 0 4px; text-align: center; font: 800 22px var(--display); font-variant-numeric: tabular-nums; }
.rp-num.hi { color: var(--rate-hi); } .rp-num.lo { color: var(--danger); }
/* Sliders: tall touch target; vertical swipes still scroll the page (touch-action), only sideways drags move the thumb */
.rate-panel input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; touch-action: pan-y; cursor: pointer; }
.rate-panel input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--bib) var(--p, 50%), var(--line) var(--p, 50%)); }
.rate-panel input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: #fff; border: 4px solid var(--bib); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.rate-panel input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.rate-panel input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--bib); }
.rate-panel input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--bib); }
.rate-panel input[type=range]:focus-visible { outline: 2px solid var(--pitch); outline-offset: 2px; border-radius: 8px; }

/* Player card radar (lib/radar.js cardRadar). The card is always dark green, so fixed light colours. */
.pcard .pc-radar { border-radius: 16px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.08); padding: 6px 8px; }
.pc-radar svg { display: block; width: 100%; height: auto; overflow: visible; }
.pc-ring { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1; }
.pc-shape { fill: var(--bib); fill-opacity: .34; stroke: #f2843a; stroke-width: 2.5; stroke-linejoin: round; }
.pc-dot { fill: #fff; stroke: #f2843a; stroke-width: 2.5; }
.pc-lab { font: 700 12px var(--body); letter-spacing: .08em; fill: rgba(255,255,255,.72); }
.pc-val { font: 800 26px var(--display); fill: #fff; font-variant-numeric: tabular-nums; }
.pc-up { font: 700 11px var(--body); fill: var(--boost); }

/* Player card as a full-art holo trading card (lib/holocard.js). Sized with container units so it scales with the screen. */
.holocard { position: relative; container-type: inline-size; width: 100%; max-width: 380px; margin: 0 auto; aspect-ratio: 300 / 420; border-radius: 14px; overflow: hidden; background: #0b1a11; box-shadow: 0 18px 32px rgba(0,0,0,.4); isolation: isolate; }
.hc-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.hc-nophoto { display: grid; place-items: center; background: radial-gradient(circle at 80% 0%, rgba(255,251,230,.35), rgba(255,251,230,0) 55%), linear-gradient(180deg, #07120c 0%, #173d25 62%, #22562f 100%); }
.hc-nophoto span { font: 800 46cqw/1 var(--display); color: rgba(255,255,255,.14); margin-top: -18cqw; }
.hc-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 46%, rgba(6,14,9,.93) 74%); }
.hc-holo { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: var(--holo);
  background: linear-gradient(115deg, rgba(255,255,255,0) 18%, rgba(255,60,150,.55) 30%, rgba(255,220,60,.55) 38%, rgba(60,255,180,.55) 46%, rgba(60,170,255,.55) 54%, rgba(170,80,255,.55) 62%, rgba(255,255,255,0) 74%);
  background-size: 260% 260%; animation: hc-holo 5s ease-in-out infinite alternate; }
@keyframes hc-holo { 0% { background-position: 0% 0%; } 100% { background-position: 100% 100%; } }
@media (prefers-reduced-motion: reduce) { .hc-holo { animation: none; background-position: 50% 50%; } }
.hc-frame { position: absolute; inset: 2.7cqw; border-radius: 6px; box-shadow: inset 0 0 0 2px var(--tier); pointer-events: none; }
.hc-body { --u: calc(100cqw / 300); position: absolute; inset: calc(var(--u) * 20) calc(var(--u) * 20) calc(var(--u) * 18); display: flex; flex-direction: column; color: #fff; }
.hc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.hc-rating { display: flex; flex-direction: column; }
.hc-rating b { font: 800 calc(var(--u) * 64) / .85 var(--display); text-shadow: 0 3px 14px rgba(0,0,0,.5); font-variant-numeric: tabular-nums; }
.hc-rating span { font: 800 calc(var(--u) * 11) var(--body); letter-spacing: .2em; color: var(--tier-line); text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.hc-tier { display: flex; flex-direction: column; align-items: flex-end; gap: calc(var(--u) * 6); }
.hc-tier i { font: normal calc(var(--u) * 22) / 1 var(--body); color: var(--tier); text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.hc-tier span { font: 800 calc(var(--u) * 9.5) var(--body); letter-spacing: .14em; color: var(--tier-ink); background: var(--tier); border-radius: 4px; padding: calc(var(--u) * 2) calc(var(--u) * 6); }
.hc-tier em { font: 600 calc(var(--u) * 10.5) var(--body); font-style: normal; background: rgba(0,0,0,.45); border-radius: 999px; padding: calc(var(--u) * 3) calc(var(--u) * 8); white-space: nowrap; }
.hc-grow { flex: 1 1 auto; }
.hc-name { font: 800 calc(var(--u) * 34) / 1 var(--display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.hc-name.long { font-size: calc(var(--u) * 27); }
.hc-move { display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--u) * 3) calc(var(--u) * 8); margin-top: calc(var(--u) * 8); font-size: calc(var(--u) * 12.5); color: #dfe7e1; min-width: 0; }
.hc-move b { white-space: nowrap; }
.hc-desc { flex-basis: 100%; color: #b6c4ba; }
.hc-tag { font: 800 calc(var(--u) * 9.5) var(--body); letter-spacing: .08em; color: #f59a5c; background: rgba(232,104,31,.22); border-radius: 4px; padding: calc(var(--u) * 2) calc(var(--u) * 5); white-space: nowrap; flex: none; }
.hc-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.14); padding-top: calc(var(--u) * 8); margin-top: calc(var(--u) * 8); }
.hc-stats > span { display: flex; flex-direction: column; align-items: center; }
.hc-stats b { font: 800 calc(var(--u) * 20) / 1 var(--display); font-variant-numeric: tabular-nums; display: inline-flex; align-items: flex-start; }
.hc-stats small { font: 700 calc(var(--u) * 9.5) var(--body); letter-spacing: .1em; color: #b6c4ba; }
.hc-up { font: normal 700 calc(var(--u) * 9) var(--body); color: var(--boost); margin-left: 1px; }
.hc-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: calc(var(--u) * 8); font: 700 calc(var(--u) * 9) var(--body); letter-spacing: .12em; text-transform: uppercase; color: #93a198; }
.hc-foot span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard.pc-extra { gap: 10px; }

/* Home (redesign board 1) */
.home2 { gap: 14px; }
.hm-title { display: flex; flex-direction: column; gap: 2px; }
.hm-title > span { font-size: 14px; color: var(--muted); }
.hm-title .h1 { font: 800 38px/.95 var(--display); text-transform: uppercase; letter-spacing: .01em; margin: 0; }
.hm-game { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; padding: 18px; background: linear-gradient(160deg, #1d3d29 0%, #132519 70%); border: 1px solid rgba(95,194,131,.2); color: #eef2ee; display: flex; flex-direction: column; gap: 14px; }
.hm-game.live { border-color: rgba(242,112,31,.45); }
.hm-circle { position: absolute; right: -70px; top: -50px; width: 210px; height: 210px; border-radius: 50%; border: 1.5px solid rgba(232,238,233,.1); pointer-events: none; z-index: -1; }
.hm-line { position: absolute; right: 35px; top: 0; bottom: 0; width: 1.5px; background: rgba(232,238,233,.08); pointer-events: none; z-index: -1; }
.hm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hm-pill { padding: 5px 10px; border-radius: 999px; background: rgba(95,194,131,.18); color: #9fe6b8; font: 700 11.5px var(--body); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.hm-game.live .hm-pill { background: rgba(242,112,31,.2); color: #f59a5c; }
.hm-meta { font-size: 13px; color: #b6c4ba; white-space: nowrap; }
.hm-time { font: 800 56px/.9 var(--display); margin: 0; color: #fff; }
.hm-time small { font-size: 24px; margin-left: 4px; }
.hm-venue { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #b6c4ba; margin-top: 4px; }
.hm-venue span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-sub { margin: 0; color: #b6c4ba; }
.hm-count { display: flex; flex-direction: column; gap: 8px; }
.hm-count b { font-size: 15px; }
.hm-count .row span { font-size: 13px; color: #b6c4ba; }
.hm-slots { display: grid; gap: 3px; }
.hm-slots i { height: 6px; border-radius: 3px; background: rgba(232,238,233,.14); }
.hm-slots i.on { background: #5fc283; }
.hm-ask { font-size: 13.5px; font-weight: 600; color: #fff; margin-bottom: -6px; }
.hm-inout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 5px; border-radius: 16px; background: rgba(6,17,10,.5); }
.hm-inout button { height: 48px; border-radius: 12px; border: 0; background: transparent; color: #b6c4ba; font: 700 16px var(--body); display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: background .2s ease, color .2s ease; }
.hm-inout button.in[aria-pressed="true"] { background: #eef2ee; color: #0f2a19; }
.hm-inout button.out[aria-pressed="true"] { background: rgba(242,139,130,.18); color: #f6b3ad; }
.hm-inout button:focus-visible { outline: 2px solid #5fc283; outline-offset: 2px; }
.hm-who { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.hm-who-row { display: flex; align-items: center; gap: 12px; }
.hm-faces { display: flex; padding-left: 8px; flex: none; }
.hm-faces > * { margin-left: -8px; box-shadow: 0 0 0 2px var(--paper); border-radius: 50%; }
.hm-more { width: 34px; height: 34px; background: var(--chip); color: var(--muted); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.hm-who-row b { font-size: 15px; font-weight: 600; }
.hm-who-line { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-link { border: 0; background: none; padding: 10px 0; font: 600 14px var(--body); color: var(--pitch); cursor: pointer; flex: none; }
.hm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm-tiles .wide { grid-column: 1 / -1; }
.hm-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; }
.hm-tile b { font-size: 15px; }
.hm-tile svg { color: var(--muted); flex: none; }
.hm-tsub { font-size: 13px; color: var(--muted); }
.hm-split { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 2px; }
.hm-split i { display: block; }
.hm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.hm-pay { font-size: 13px; font-weight: 700; color: var(--rate-mid); }
.hm-act { display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 15px var(--body); text-decoration: none; }
.hm-act.go { background: var(--pitch); border-color: var(--pitch); color: #fff; font-weight: 700; }
:root[data-theme="dark"] .hm-act.go { background: #46a86a; border-color: #46a86a; color: #06110a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm-act.go { background: #46a86a; border-color: #46a86a; color: #06110a; } }
.hm-act svg { width: 18px; height: 18px; }

/* Player card panel: totals as separate tiles under the radar */
.pcard.pc-extra { gap: 12px; }
.pcard.pc-extra .totals { border-top: 0; padding-top: 0; gap: 8px; }
.pcard.pc-extra .totals > div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pcard.pc-extra .totals b { font-size: 24px; }
.pcard.pc-extra .totals span { font: 700 10.5px var(--body); letter-spacing: .08em; opacity: .8; }
.pcard.pc-extra .pc-awards { border-top: 1px solid rgba(255,255,255,.12); padding-top: 10px; }

/* Formation view: a moved player slides across and glows when they land (matchday.js slideTokens) */
.pitch-view .tok.sliding { position: relative; z-index: 3; }
.pitch-view .tok.sliding .ring { box-shadow: 0 6px 18px rgba(0,0,0,.45); transform: scale(1.12); }
.pitch-view .tok .ring { transition: transform .3s ease, box-shadow .6s ease; }
.pitch-view .tok.landed .ring { box-shadow: 0 0 0 4px rgba(255,255,255,.85), 0 0 18px rgba(255,255,255,.55); }

/* Teams: the balance sentence always takes two lines' space, so the pitch below never jumps when it wraps */
.balance-note { display: block; line-height: 1.4; min-height: 2.8em; }

/* Home: Who's in squad grid (See all) */
.hm-squad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
.hm-sq { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; color: var(--ink); text-decoration: none; }
.hm-sq-face { position: relative; }
.hm-sq-face .avatar { width: 48px; height: 48px; }
.hm-sq.me .hm-sq-face .avatar { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px rgba(242,112,31,.6); }
.hm-sq-face i { position: absolute; right: -6px; bottom: -3px; font: 800 9px var(--body); font-style: normal; letter-spacing: .04em; background: var(--ground); color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 4px; }
.hm-sq-name { font-size: 12.5px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-sq.me .hm-sq-name { color: var(--bib-text); }
.hm-wait { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.hm-wait-label { font: 700 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hm-wait-p { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.hm-wait-face { width: 30px; height: 30px; border-radius: 50%; border: 1.5px dashed var(--field-line); display: grid; place-items: center; font: 700 11px var(--body); color: var(--muted); }
.hm-who.open { gap: 14px; }

/* Home: "Your side" tile once teams are out (takes the team's colour) */
.hm-side { border: 0; gap: 4px; }
.hm-side.A { background: var(--team-a); color: var(--team-a-ink); }
.hm-side.B { background: var(--team-b); color: var(--team-b-ink); }
.hm-side svg { color: currentColor; opacity: .8; }
.hm-side-label { font: 700 11px var(--body); letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.hm-side-name { font: 800 22px/1.05 var(--display); text-transform: uppercase; }
.hm-side-mates { display: flex; align-items: center; gap: 8px; margin-top: 4px; min-width: 0; }
.hm-side-faces { display: flex; padding-left: 6px; flex: none; }
.hm-side-faces > * { margin-left: -6px; box-shadow: 0 0 0 2px var(--team-a); border-radius: 50%; }
.hm-side.B .hm-side-faces > * { box-shadow: 0 0 0 2px var(--team-b); }
.hm-side-more { width: 26px; height: 26px; background: rgba(0,0,0,.25); color: inherit; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.hm-side-note { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Home: "your season" tile when you're paid up: games played, won, drawn, lost and form */
.hm-tlabel { font: 700 11px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hm-gstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.hm-gstats span { display: flex; flex-direction: column; align-items: center; background: var(--ground); border-radius: 8px; padding: 4px 0 3px; }
.hm-gstats b { font: 800 19px/1 var(--display); font-variant-numeric: tabular-nums; }
.hm-gstats small { font: 700 9.5px var(--body); letter-spacing: .08em; color: var(--muted); }
.hm-formrow { display: flex; align-items: center; gap: 8px; }
.hm-formrow small { font: 700 9.5px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hm-form { justify-content: flex-start; gap: 4px; }
.hm-form .fdot { width: 10px; height: 10px; }
.hm-paid { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--pitch); margin-top: auto; }
:root[data-theme="dark"] .hm-paid { color: #5fc283; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm-paid { color: #5fc283; } }

/* Home: the main action as a full-width feature button */
.hm-hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 16px 10px 12px; border-radius: 20px;
  background: linear-gradient(135deg, #5fc283 0%, #3f9d61 55%, #2f8a50 100%); color: #06110a; text-decoration: none; box-shadow: 0 10px 24px rgba(47,138,80,.35), inset 0 1px 0 rgba(255,255,255,.25); transition: transform .12s ease, box-shadow .2s ease; }
.hm-hero:active { transform: scale(.985); box-shadow: 0 4px 12px rgba(47,138,80,.3); }
.hm-hero:focus-visible { outline: 3px solid #9fe0b4; outline-offset: 3px; }
.hm-hero-icon { width: 44px; height: 44px; border-radius: 50%; background: #06110a; color: #5fc283; display: grid; place-items: center; flex: none; }
.hm-hero-icon svg { width: 20px; height: 20px; }
.hm-hero-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.hm-hero-text b { font: 800 22px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.hm-hero-text small { font-size: 13px; font-weight: 600; opacity: .75; margin-top: 3px; }
/* Edit game: a quieter full-width button under the main one */
.hm-act.hm-edit-btn { height: 48px; margin-top: -2px; font-weight: 600; color: var(--muted); }
.hm-act.hm-edit-btn svg { width: 16px; height: 16px; }

/* Teams (redesign board 5) */
.tm-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tm-title > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-title .h1 { font: 800 38px/.95 var(--display); text-transform: uppercase; margin: 0; }
.tm-title > div:first-child > span { font-size: 14px; color: var(--muted); }
.tm-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); flex: none; }
.tm-seg button { height: 34px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font: 600 13px var(--body); cursor: pointer; }
.tm-seg button.on { background: var(--chip); color: var(--ink); }
.tm-balance { border-radius: 20px; background: var(--paper); border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.tm-bal-top, .tm-bal-foot { border: 0; background: none; padding: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; width: 100%; }
.tm-bal-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tm-side { display: flex; flex-direction: column; min-width: 64px; }
.tm-side.B { align-items: flex-end; }
.tm-side small { font: 700 11.5px var(--body); letter-spacing: .1em; text-transform: uppercase; }
.tm-side.A small { color: var(--team-a-text); }
.tm-side.B small { color: var(--team-b-text); }
.tm-side b { font: 800 26px/1 var(--display); font-variant-numeric: tabular-nums; }
.tm-mid { display: flex; flex-direction: column; align-items: center; }
.tm-mid b { font: 800 34px/1 var(--display); font-variant-numeric: tabular-nums; }
.tm-mid small { font-size: 12px; font-weight: 700; color: var(--pitch); white-space: nowrap; }
.tm-mid small.warn { color: var(--warn-ink); }
.tm-bar { display: flex; gap: 3px; height: 8px; }
.tm-bar i { display: block; height: 8px; }
.tm-bar i:first-child { border-radius: 4px 0 0 4px; } .tm-bar i:last-child { border-radius: 0 4px 4px 0; }
.tm-bal-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.tm-bal-foot span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-bal-foot b { color: var(--pitch); font-weight: 600; flex: none; }
.tm-compare { display: flex; flex-direction: column; gap: 7px; padding-top: 2px; }
.tm-h2h { display: grid; grid-template-columns: 28px minmax(0, 1fr) 80px minmax(0, 1fr) 28px; align-items: center; gap: 6px; font-size: 12.5px; }
.tm-h2h b { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tm-h2h b.win { font-weight: 800; color: var(--ink); }
.tm-h2h small { text-align: center; font: 700 10.5px var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tm-hb { height: 5px; border-radius: 3px; background: var(--line-soft); display: flex; overflow: hidden; }
.tm-hb.r { justify-content: flex-end; }
.tm-hb i { display: block; height: 5px; border-radius: 3px; }
.tm-poscount { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 8px; }
.tm-poscount small { font: 700 10px var(--body); letter-spacing: .08em; text-transform: uppercase; }
.tm-sheets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.tm-sheet { border-radius: 18px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; min-width: 0; }
.tm-sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; }
.tm-sheet-head span:first-child { font: 800 19px/1 var(--display); text-transform: uppercase; }
.tm-sheet-head span:last-child { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tm-sheet-head.A { background: var(--ta-tile); color: var(--ta-ink); }
.tm-sheet-head.B { background: var(--tb-tile); color: var(--tb-ink); }
.tm-row { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 36px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.tm-row:last-child { border-bottom: 0; }
.tm-row.me { background: var(--pitch-soft); }
.tm-pos { width: 28px; flex: none; font: 700 10.5px var(--body); color: var(--muted); }
.tm-name { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-r { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.tm-up { color: var(--pitch); display: inline-flex; flex: none; }
.tm-up svg { width: 14px; height: 14px; }
.tm-row .tag { flex: none; }
.tm-nobody { margin: 0; padding: 12px; font-size: 13px; color: var(--muted); }
button.tm-row:hover { background: var(--chip); }
.tm-btn { height: 48px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 14px var(--body); display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; }
.tm-btn.go { background: var(--pitch); border-color: var(--pitch); color: #fff; font-weight: 700; }
:root[data-theme="dark"] .tm-btn.go { background: #46a86a; border-color: #46a86a; color: #06110a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tm-btn.go { background: #46a86a; border-color: #46a86a; color: #06110a; } }

/* Teams: buttons styled like Home (feature button + quieter button underneath) */
.tm-actions { display: flex; flex-direction: column; gap: 10px; }
button.hm-hero { border: 0; width: 100%; font: inherit; text-align: left; cursor: pointer; }
button.hm-act { width: 100%; font: inherit; cursor: pointer; }
.tm-actions .hm-act.hm-edit-btn { margin-top: 0; font: 600 15px var(--body); }

/* Matchday poster: the shared image itself, shown on screen */
.poster-img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 18px 36px rgba(0,0,0,.35); background: #0a120d; }
.tm-actions a.hm-act.hm-edit-btn { text-decoration: none; }
.tm-actions .hm-act.hm-edit-btn svg { width: 16px; height: 16px; }

/* Feature button arrow: bigger so it reads as tappable, the same near-black as the button text */
.hm-hero > svg { width: 24px; height: 24px; flex: none; stroke-width: 2.6; color: #06110a; }

/* Match screen (redesign) */
.mt { gap: 14px; }
.mt-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 6px; }
.mt-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mt-sub { font: 700 12px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mt-head .h1 { font: 800 28px/1 var(--display); text-transform: uppercase; margin: 0; }
.mt-home { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); font: 600 14px var(--body); text-decoration: none; flex: none; }
.mt-clock { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; padding: 16px 18px 18px; background: linear-gradient(160deg, #1d3d29 0%, #132519 70%); border: 1px solid rgba(95,194,131,.2); color: #eef2ee; display: flex; flex-direction: column; gap: 10px; }
.mt-clock.live { border-color: rgba(242,112,31,.45); }
.mt-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; font: 700 11.5px var(--body); letter-spacing: .1em; text-transform: uppercase; background: rgba(95,194,131,.18); color: #9fe6b8; }
.mt-pill.live { background: rgba(242,112,31,.2); color: #f59a5c; }
.mt-pill.paused { background: rgba(227,176,79,.18); color: #e3b04f; }
.mt-pill i { width: 8px; height: 8px; border-radius: 50%; background: #f2701f; animation: mt-pulse 1.4s ease-in-out infinite; }
@keyframes mt-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .mt-pill i { animation: none; } }
.mt-clock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mt-time { font: 800 72px/.9 var(--display); min-width: 0; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.mt-time.idle { color: rgba(255,255,255,.35); }
.mt-pause { display: inline-flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.1); color: #fff; font: 700 15px var(--body); cursor: pointer; flex: none; }
.mt-pause svg { width: 18px; height: 18px; }
.mt-clock.paused .mt-pause { background: #46a86a; border-color: #46a86a; color: #06110a; }
.mt-note { font-size: 13px; color: #b6c4ba; }
.mt-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* Score tiles: dark, with the team colour as an accent (top edge, name, score and the + button) */
.mt-team { --tc: var(--ta-tile); --tci: var(--ta-ink); position: relative; overflow: hidden; border-radius: 20px; padding: 16px 12px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 14%, #121b15) 0%, #121b15 60%); border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); color: #eef2ee; }
.mt-team.B { --tc: var(--tb-tile); --tci: var(--tb-ink); }
.mt-team::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--tc); }
.mt-team-name { font: 800 18px var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--tc); }
.mt-score { font: 800 112px/.9 var(--display); font-variant-numeric: tabular-nums; color: #ffffff; }
.mt-steps { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; margin-top: 4px; }
.mt-steps button { border-radius: 50%; display: grid; place-items: center; cursor: pointer; font: 800 30px/1 var(--display); transition: transform .1s ease; }
.mt-steps .minus { width: 46px; height: 46px; border: 1.5px solid rgba(255,255,255,.22); background: transparent; color: #cfd8d1; font-size: 26px; }
.mt-steps .plus { width: 68px; height: 68px; border: 0; background: var(--tc); color: var(--tci); font-size: 38px; box-shadow: 0 8px 18px color-mix(in srgb, var(--tc) 35%, transparent); }
.mt-steps button:active { transform: scale(.94); }
.mt-steps button:disabled { opacity: .3; cursor: default; }
.mt-ft { margin-top: auto; }

/* Table screen: title and underline tabs (board 6) */
.tb-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tb-title > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tb-title .h1 { font: 800 38px/.95 var(--display); text-transform: uppercase; margin: 0; }
.tb-title > div > span { font-size: 14px; color: var(--muted); }
.tb-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.tb-tabs button { height: 40px; padding: 0; border: 0; border-bottom: 2.5px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); font: 700 15px var(--body); cursor: pointer; }
.tb-tabs button.on { color: var(--ink); border-bottom-color: var(--pitch); }
:root[data-theme="dark"] .tb-tabs button.on { border-bottom-color: #5fc283; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tb-tabs button.on { border-bottom-color: #5fc283; } }
.tb .card.flush { border-radius: 18px; }

/* Results */
.rs-month { display: flex; flex-direction: column; gap: 10px; }
.rs-month-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 2px; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.rs-month-head b { font: 800 20px var(--display); text-transform: uppercase; flex: 1 1 auto; }
.rs-chev { display: inline-flex; color: var(--pitch); transition: transform .15s; }
.rs-chev.open { transform: rotate(90deg); }
.rs-count { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--chip); border-radius: 999px; padding: 3px 9px; }
.rs-card { border-radius: 18px; background: var(--paper); border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.rs-card.focus { border: 2px solid var(--pitch); }
.rs-card.editing { border: 2px solid var(--ink); }
.rs-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.rs-you { font-weight: 700; white-space: nowrap; }
.rs-you.W { color: var(--pitch); } .rs-you.L { color: var(--danger); }
.rs-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.rs-score b { font: 800 36px/1 var(--display); font-variant-numeric: tabular-nums; }
.rs-team { font: 700 13px var(--body); letter-spacing: .1em; text-transform: uppercase; }
.rs-team.A { color: var(--team-a-text); } .rs-team.B { color: var(--team-b-text); text-align: right; }
.rs-team.lost { opacity: .55; }
.rs-motm { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.rs-motm span { color: var(--gold); }
.rs-motm b { color: var(--ink); }
.rs-lineups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.rs-lineups > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rs-p { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink); text-decoration: none; min-width: 0; }
.rs-p.r { justify-content: flex-end; flex-direction: row-reverse; }
.rs-p span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-p small { font: 700 9.5px var(--body); color: var(--muted); }
.rs-p b { font: 800 10.5px/1 var(--body); background: var(--pitch); color: #fff; border-radius: 999px; padding: 3px 6px; flex: none; }
.rs-admin { display: flex; gap: 14px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
.rs-admin button { border: 0; background: none; padding: 4px 0; font: 600 13.5px var(--body); color: var(--pitch); cursor: pointer; }
.rs-admin button.danger { color: var(--danger); }
.rs-edit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rs-step { display: flex; align-items: center; justify-content: space-between; background: var(--ground); border-radius: 12px; padding: 4px; font-weight: 700; font-size: 14px; }
.rs-step button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--field-line); background: var(--paper); color: var(--ink); font: 700 20px var(--body); cursor: pointer; }

/* Awards */
.aw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.aw-tile { --ac: var(--pitch); border-radius: 18px; background: var(--paper); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 6px; min-height: 132px; box-sizing: border-box; min-width: 0; }
.aw-tile.gold { --ac: #e3b04f; } .aw-tile.orange { --ac: #f2701f; } .aw-tile.blue { --ac: #7ea3e0; } .aw-tile.bib { --ac: #c4520f; }
.aw-k { min-width: 36px; height: 36px; padding: 0 8px; box-sizing: border-box; align-self: flex-start; border-radius: 12px; background: color-mix(in srgb, var(--ac) 18%, transparent); color: var(--ac); display: flex; align-items: center; justify-content: center; font: 800 17px var(--display); }
.aw-t { font: 700 11.5px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.aw-n { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-d { font-size: 13px; color: var(--muted); }
.aw-h { font: 800 20px var(--display); text-transform: uppercase; margin: 6px 0 -2px; }
.aw-list { display: flex; flex-direction: column; gap: 8px; }
.aw-game { display: flex; align-items: center; gap: 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); padding: 12px 14px; color: var(--ink); text-decoration: none; }
.aw-date { font: 800 15px var(--display); text-transform: uppercase; color: var(--pitch); width: 74px; flex: none; }
.aw-rows { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); min-width: 0; }
.aw-rows span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-rows b { color: var(--ink); }
.aw-rows i { font-style: normal; margin-right: 6px; }
.aw-rows i.star { color: #e3b04f; } .aw-rows i.bibi { color: #f2701f; } .aw-rows i.named { color: #7ea3e0; }
.aw-game > svg { color: var(--muted); flex: none; }

/* Group (redesign board 7) */
.gp { gap: 12px; }
.gp-add { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--pitch); color: #fff; font: 700 14px var(--body); text-decoration: none; flex: none; }
:root[data-theme="dark"] .gp-add { background: #46a86a; color: #06110a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gp-add { background: #46a86a; color: #06110a; } }
.gp-iconbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--line); color: var(--ink); flex: none; }
.gp-money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gp-tile { border-radius: 18px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gp-tl { display: flex; justify-content: space-between; align-items: center; font: 700 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.gp-tl svg { width: 14px; height: 14px; }
.gp-tile b { font: 800 28px/1.05 var(--display); font-variant-numeric: tabular-nums; }
.gp-tile b.owed { color: var(--rate-mid); }
.gp-ts { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-invite { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.gp-inv-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--pitch-soft); color: var(--pitch); flex: none; }
.gp-inv-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.gp-inv-text b { font-size: 15px; font-weight: 600; }
.gp-inv-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-sq { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--chip); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.gp-wa { height: 40px; padding: 0 12px; border-radius: 12px; display: inline-flex; align-items: center; background: var(--pitch); color: #fff; font: 700 13px var(--body); text-decoration: none; flex: none; }
:root[data-theme="dark"] .gp-wa { background: #46a86a; color: #06110a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gp-wa { background: #46a86a; color: #06110a; } }
.gp-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.gp-search { position: relative; }
.gp-search svg { position: absolute; left: 14px; top: 13px; color: var(--muted); pointer-events: none; }
.gp-search input { width: 100%; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 0 14px 0 42px; font: 15px var(--body); box-sizing: border-box; }
.gp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.gp-chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--field-line); background: transparent; color: var(--muted); font: 600 13px var(--body); cursor: pointer; }
.gp-chip span { opacity: .7; margin-left: 2px; }
.gp-chip.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.gp-list { border-radius: 18px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.gp-row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 14px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.gp-row:last-child { border-bottom: 0; }
.gp-av { display: inline-flex; flex: none; border-radius: 50%; }
.gp-av .avatar { width: 38px; height: 38px; }
.gp-av.pending .avatar { background: transparent !important; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--field-line); outline: none; border: 1.5px dashed var(--field-line); box-sizing: border-box; }
.gp-av.me .avatar { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px rgba(242,112,31,.55); }
.gp-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.gp-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-ovr { font: 800 20px var(--display); color: var(--pitch); font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .gp-ovr { color: #5fc283; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gp-ovr { color: #5fc283; } }
.gp-row > svg { color: var(--muted); flex: none; }
.gp-add, .gp-wa { white-space: nowrap; }
.gp-inv-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp .tb-title > div:first-child { flex: 1 1 auto; }
.group-menu .gm-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--ink); flex: none; }
/* Group: Settings as a compact third tile beside Subs and Fines (main Manager only) */
.gp-money.with-settings { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 74px; }
.gp-settings { align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; }
.gp-settings svg { width: 24px; height: 24px; color: var(--ink); }
.gp-settings span { font: 700 11px var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* Group: Add player and Group settings as full-width buttons */
.gp-actions { display: flex; flex-direction: column; gap: 8px; }
.gp-long { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 700 15px var(--body); text-decoration: none; }
.gp-long svg { width: 18px; height: 18px; }
.gp-long.go { background: var(--pitch); border-color: var(--pitch); color: #fff; }
:root[data-theme="dark"] .gp-long.go { background: #46a86a; border-color: #46a86a; color: #06110a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gp-long.go { background: #46a86a; border-color: #46a86a; color: #06110a; } }
.hm-tiles .wide > .btn { width: 100%; justify-content: center; }
/* Group: Add player is the feature button; settings is the quieter one; WhatsApp invite toned down to an outline */
.gp-actions { gap: 10px; }
.gp-actions .hm-hero-icon svg { width: 20px; height: 20px; }
.gp-settings-btn { text-decoration: none; margin-top: 0; }
.gp-settings-btn svg { width: 16px; height: 16px; }
.gp-wa, :root[data-theme="dark"] .gp-wa { background: transparent; color: var(--ink); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gp-wa { background: transparent; color: var(--ink); border: 1px solid var(--line); } }

/* Group settings (redesign A, one page) */
.gs { gap: 10px; }
.gs-head { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; padding: 16px; background: linear-gradient(160deg, #1d3d29 0%, #132519 70%); border: 1px solid rgba(95,194,131,.2); color: #eef2ee; display: flex; flex-direction: column; gap: 12px; }
.gs-head .hm-circle { right: -70px; top: -60px; width: 200px; height: 200px; }
.gs-head-top { display: flex; align-items: center; gap: 12px; }
.gs-head-top .badge { border-radius: 16px; flex: none; }
.gs-head-top > div { display: flex; flex-direction: column; min-width: 0; }
.gs-head-top b { font-size: 18px; }
.gs-head-top span { font-size: 13px; color: #b6c4ba; }
.gs-head-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(232,238,233,.1); padding-top: 10px; font-size: 13px; color: #b6c4ba; }
.gs-head-code b { color: #eef2ee; letter-spacing: .04em; }
.gs-head-code button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.1); color: #eef2ee; font: 600 13px var(--body); cursor: pointer; }
.gs-head-code button svg { width: 14px; height: 14px; }
.gs-label { font: 700 12px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 8px 4px 0; }
.gs-card { border-radius: 18px; background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.gs-card.flush { padding: 0; gap: 0; overflow: hidden; }
.gs-item + .gs-item { border-top: 1px solid var(--line-soft); }
.gs-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 0 14px; border: 0; background: none; color: var(--ink); font: 600 15px var(--body); text-align: left; cursor: pointer; }
.gs-row > svg { color: var(--muted); flex: none; }
.gs-val { color: var(--muted); font-weight: 600; font-size: 14px; max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-edit { padding: 0 14px 14px 58px; gap: 8px; }
.gs-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--pitch-soft); color: var(--pitch); flex: none; }
.gs-ic.gold { background: color-mix(in srgb, #e3b04f 18%, transparent); color: #c99528; }
:root[data-theme="dark"] .gs-ic { color: #5fc283; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gs-ic { color: #5fc283; } }
:root[data-theme="dark"] .gs-ic.gold { color: #e3b04f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gs-ic.gold { color: #e3b04f; } }
.gs-pill { font: 800 10.5px var(--body); letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; background: var(--chip); color: var(--muted); white-space: nowrap; }
.gs-pill.ok { background: var(--pitch-soft); color: var(--pitch); }
.gs-pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.gs-prov { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--ground); }
.gs-prov > .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gs-prov-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gs-logo { width: 38px; height: 38px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.gs-toggle { display: flex; align-items: center; gap: 12px; padding: 4px 4px 0; }
.gs-toggle > .grow { display: flex; flex-direction: column; }
.gs-toggle.solo { padding: 12px 14px; flex-direction: row; }
.gs-fees { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line-soft); padding: 10px 4px 2px; }
.gs-fee-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gs-fee { text-align: left; border-radius: 14px; padding: 10px 12px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.gs-fee > span:last-child { font-size: 12px; color: var(--muted); line-height: 1.35; }
.gs-fee-top { display: flex; align-items: center; justify-content: space-between; }
.gs-fee-top b { font-size: 14px; }
.gs-fee-top i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--field-line); box-sizing: border-box; }
.gs-fee.on { border-color: var(--pitch); background: var(--pitch-soft); }
.gs-fee.on .gs-fee-top i { border-color: var(--pitch); background: var(--pitch); box-shadow: inset 0 0 0 3px var(--paper); }
.gs-person { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px; border-bottom: 1px solid var(--line-soft); font-size: 15px; font-weight: 600; }
.gs-note { margin: 0; padding: 10px 14px 12px; font-size: 12.5px; color: var(--muted); }
.gs-danger { border-radius: 18px; border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 6%, transparent); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.gs-danger-btn { height: 44px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent); background: transparent; color: var(--danger); font: 700 14px var(--body); cursor: pointer; }
/* Bib colour picker: a little bib in each colour instead of a dot */
.swatch .bibswatch { width: 30px; height: 30px; margin: -2px 0; flex: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }

/* Group, calmer: three blocks (Money, Actions, Members) */
.gp2 { gap: 18px; }
.gp-block { display: flex; flex-direction: column; gap: 10px; }
.gp-block .gs-label { margin: 0 4px; }
.gp-moneycard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 18px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.gp-moneycard a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; color: var(--ink); text-decoration: none; min-width: 0; }
.gp-moneycard a + a { border-left: 1px solid var(--line); }
.gp-moneycard b { font: 800 28px/1.05 var(--display); font-variant-numeric: tabular-nums; }
.gp-moneycard b.owed { color: var(--rate-mid); }
.gp-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gp-pair.one { grid-template-columns: 1fr; }
.gp-half { height: 50px; border-radius: 16px; text-decoration: none; font: 700 15px var(--body); }
.gp-half svg { width: 18px; height: 18px; }
.gp-half.on { border-color: var(--pitch); background: var(--pitch-soft); color: var(--pitch); }
.gp-invite-panel { border-radius: 18px; background: var(--paper); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.gp-inv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.gp-inv-top > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gp-inv-top b { font-size: 15px; }
.gp-inv-top span { font-size: 12.5px; color: var(--muted); }
.gp-code { font: 800 15px var(--display) !important; letter-spacing: .06em; color: var(--ink) !important; background: var(--chip); border-radius: 8px; padding: 4px 10px; flex: none; }
.gp-inv-qr { width: 180px; height: 180px; align-self: center; }
.gp-inv-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gp-inv-btns .hm-act { height: 46px; border-radius: 14px; text-decoration: none; font: 700 14px var(--body); }
.gp-inv-btns .hm-act svg { width: 16px; height: 16px; }
.gp-members { border-radius: 18px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.gp-members-tools { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line-soft); }
.gp-members .gp-search input { background: var(--ground); }
.gp-members .gp-list { border: 0; border-radius: 0; background: transparent; }
.gp-none { margin: 0; padding: 16px 14px; }
.gp-pair .gp-half, .gp-inv-btns .hm-act { font: 700 15px var(--body); }

/* Edit profile (redesign) */
.ep { gap: 10px; }
.ep-head { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; padding: 16px; background: linear-gradient(160deg, #1d3d29 0%, #132519 70%); border: 1px solid rgba(95,194,131,.2); color: #eef2ee; display: flex; flex-direction: column; gap: 14px; }
.ep-head .hm-circle { right: -70px; top: -60px; width: 200px; height: 200px; }
.ep-head-top { display: flex; align-items: center; gap: 14px; }
.ep-photo { width: 84px; height: 84px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center; background: linear-gradient(140deg, #ff9a4a, #e0440f); color: #1a0b02; font: 800 32px var(--display); box-shadow: 0 0 0 3px #132519, 0 0 0 5px rgba(242,112,31,.6); }
.ep-photo img { width: 100%; height: 100%; object-fit: cover; }
.ep-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ep-head-text b { font: 800 24px/1.05 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.ep-head-text span { font-size: 13.5px; color: #b6c4ba; }
.ep-photo-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ep-pbtn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); color: #eef2ee; font: 700 14px var(--body); cursor: pointer; }
.ep-pbtn svg { width: 18px; height: 18px; }
.ep-pbtn:focus-within { outline: 2px solid #5fc283; outline-offset: 2px; }
.ep-remove { align-self: center; border: 0; background: none; color: #f6b3ad; font: 600 13.5px var(--body); cursor: pointer; padding: 2px 6px; margin-top: -4px; }
.ep-form { display: flex; flex-direction: column; gap: 10px; }
.ep-card { gap: 14px; padding: 14px; }
.ep-field { display: flex; flex-direction: column; gap: 6px; }
.ep-lab { display: flex; justify-content: space-between; align-items: baseline; }
.ep-lab label { font: 700 12px var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ep-count { font-size: 12px; color: var(--muted); }
.ep-card .input { background: var(--ground); }
.ep-hint { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.ep-pos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ep-pos-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--ground); color: var(--ink); font: inherit; cursor: pointer; }
.ep-pos-btn b { font: 800 20px/1 var(--display); }
.ep-pos-btn span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ep-pos-btn.on { border-color: var(--pitch); background: var(--pitch-soft); }
.ep-pos-btn.on b { color: var(--pitch); }
:root[data-theme="dark"] .ep-pos-btn.on b { color: #5fc283; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ep-pos-btn.on b { color: #5fc283; } }
.ep-foot { margin: 4px 4px 0; line-height: 1.7; }

/* Me sheet (redesign): dark header card, player-card feature button, settings-style rows */
.mesheet { gap: 10px; }
.mesheet .gs-label { margin-top: 10px; }
.ms-head { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px;
  background: linear-gradient(160deg, #1d3d29 0%, #132519 70%); border: 1px solid rgba(95,194,131,.2); color: #eef2ee; }
.ms-head .hm-circle { right: -80px; top: -70px; width: 200px; height: 200px; }
.ms-head .ms-photo .me-photo { border-radius: 50%; box-shadow: 0 0 0 3px #132519, 0 0 0 5px rgba(242,112,31,.6); }
.ms-head .ms-cam { background: #eef2ee; color: #132519; border-color: #132519; }
.ms-head-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ms-head .ms-name { font: 800 22px/1.05 var(--display); text-transform: uppercase; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ms-sub { font-size: 13.5px; color: #b6c4ba; }
.ms-tags { display: flex; gap: 6px; margin-top: 3px; }
.ms-tag { font: 800 10.5px var(--body); letter-spacing: .08em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; color: var(--t, #e2ad7c); background: color-mix(in srgb, var(--t, #c98a52) 20%, transparent); border: 1px solid color-mix(in srgb, var(--t, #c98a52) 45%, transparent); }
.ms-tag.ovr { --t: #5fc283; }
.ms-close { align-self: flex-start; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #eef2ee; cursor: pointer; margin: -4px -4px 0 0; }
.ms-close:focus-visible { outline: 2px solid #5fc283; outline-offset: 2px; }
/* the player card button: the main thing in the sheet */
.ms-cardhero { min-height: 84px; padding: 12px 14px 12px 16px; gap: 16px; }
.ms-cardhero .hm-hero-text b { font-size: 24px; }
.ms-mini { position: relative; flex: none; width: 46px; height: 62px; border-radius: 7px; transform: rotate(-7deg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--a) 70%, #fff) 0%, var(--a) 45%, color-mix(in srgb, var(--a) 70%, #000) 100%); color: var(--i);
  box-shadow: 0 0 0 2px #06110a, 0 6px 14px rgba(0,0,0,.35); }
.ms-mini b { font: 800 22px/1 var(--display); }
.ms-mini small { font: 800 9.5px var(--body); letter-spacing: .08em; }
.ms-mini i { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 45%, transparent 60%); animation: msShine 3.2s ease-in-out infinite; }
@keyframes msShine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .ms-mini i { animation: none; opacity: .4; } }
.ms-arrow { flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(6,17,10,.12); display: grid; place-items: center; color: #06110a; }
.ms-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; opacity: 1; }
.ms-stats > span { display: flex; flex-direction: column; gap: 4px; padding: 10px 4px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.ms-stats b { font: 800 24px/1 var(--display); color: var(--ink); }
.ms-row { min-height: 56px; gap: 12px; padding: 0 14px; font: 600 15px var(--body); }
.ms-row > svg { color: var(--muted); flex: none; }
.ms-join { color: var(--pitch); }
:root[data-theme="dark"] .ms-join { color: #5fc283; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ms-join { color: #5fc283; } }
.ms-seg { background: var(--paper); border: 1px solid var(--line); }
.ms-seg button.on { background: var(--chip); }
.hm-act.ms-out { margin-top: 8px; color: var(--ink); }
.mesheet > * { flex-shrink: 0; }

/* Player card tiers: the card is framed and tinted in the player's metal; only Legendary is holo */
.holocard { --metal: linear-gradient(135deg, #7a4a24 0%, #e2ad7c 28%, #9a6034 50%, #f0c49a 72%, #7a4a24 100%); }
.holocard[data-tier="NEW"] { --metal: linear-gradient(135deg, #1f6b3c 0%, #9fe0b4 30%, #2f8a50 52%, #b8ecc9 74%, #1f6b3c 100%); }
.holocard[data-tier="SILVER"] { --metal: linear-gradient(135deg, #7d8680 0%, #f4f7f5 28%, #a3aca6 50%, #ffffff 72%, #7d8680 100%); }
.holocard[data-tier="GOLD"] { --metal: linear-gradient(135deg, #8f6414 0%, #ffe08a 28%, #c08f2a 50%, #fff1b8 72%, #8f6414 100%); }
.holocard[data-tier="LEGEND"] { --metal: conic-gradient(from 0deg, #ff5fa2, #ffd95f, #5fffc0, #5fb4ff, #b07aff, #ff5fa2); }
/* metal rim round the edge */
.holocard::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 2cqw; background: var(--metal); pointer-events: none; z-index: 2;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.holocard[data-tier="LEGEND"]::after { animation: hc-rainbow 6s linear infinite; }
@keyframes hc-rainbow { to { filter: hue-rotate(360deg); } }
.hc-frame { inset: 3.4cqw; box-shadow: inset 0 0 0 1.5px var(--tier-line); opacity: .8; }
/* tint the photo in the tier colour: a glow at the top and a coloured fade into the stats */
.hc-shade { background:
  radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--tier) 30%, transparent), transparent 70%),
  linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 44%, color-mix(in srgb, var(--tier) 16%, rgba(6,14,9,.94)) 74%); }
.hc-nophoto { background: radial-gradient(circle at 80% 0%, color-mix(in srgb, var(--tier) 55%, transparent), transparent 60%),
  linear-gradient(180deg, #07120c 0%, color-mix(in srgb, var(--tier) 28%, #0d2416) 62%, color-mix(in srgb, var(--tier) 40%, #173d25) 100%); }
.holocard[data-tier="LEGEND"] .hc-nophoto { background: radial-gradient(circle at 80% 0%, rgba(201,184,255,.5), transparent 60%), linear-gradient(180deg, #0c0a1a 0%, #2a1f4d 62%, #3b2a66 100%); }
.hc-stats { border-top-color: color-mix(in srgb, var(--tier) 40%, transparent); }
.hc-stats small, .hc-foot { color: color-mix(in srgb, var(--tier-line) 60%, #b6c4ba); }
/* metal tiers: a soft white gloss that sweeps across now and then */
.hc-sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.75) 48%, transparent 60%); background-size: 300% 100%; animation: hc-sheen 7s ease-in-out infinite; }
@keyframes hc-sheen { 0%, 60% { background-position: 110% 0; } 100% { background-position: -10% 0; } }
.holocard[data-tier="NEW"] .hc-sheen, .holocard[data-tier="BRONZE"] .hc-sheen { opacity: .6; }
/* Legendary: full holo, stronger than before, and a rainbow tier tag */
.holocard[data-tier="LEGEND"] .hc-holo { opacity: .9; }
.holocard[data-tier="LEGEND"] .hc-tier span { background: linear-gradient(90deg, #ff9cc6, #ffe59c, #9cffd9, #9cd0ff, #d2b3ff); background-size: 200% 100%; animation: hc-tag 4s linear infinite; }
.holocard[data-tier="LEGEND"] .hc-tier i { background: linear-gradient(90deg, #ff9cc6, #ffe59c, #9cffd9, #9cd0ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes hc-tag { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .holocard::after, .hc-sheen, .holocard[data-tier="LEGEND"] .hc-tier span { animation: none; } .hc-sheen { opacity: 0; } }
/* the same metals on the Me sheet's mini card and tier tag */
.ms-mini[data-tier="SILVER"] { background: linear-gradient(150deg, #ffffff 0%, #cfd6d1 45%, #8a938d 100%); }
.ms-mini[data-tier="GOLD"] { background: linear-gradient(150deg, #fff1b8 0%, #e8b84f 45%, #9a6f1c 100%); }
.ms-mini[data-tier="BRONZE"] { background: linear-gradient(150deg, #f0c49a 0%, #c98a52 45%, #7a4a24 100%); }
.ms-mini[data-tier="LEGEND"] { background: linear-gradient(150deg, #ff9cc6 0%, #ffe59c 30%, #9cffd9 55%, #9cd0ff 78%, #d2b3ff 100%); }
.ms-tag[data-tier="LEGEND"] { color: #170d2b; border-color: transparent; background: linear-gradient(90deg, #ff9cc6, #ffe59c, #9cffd9, #9cd0ff, #d2b3ff); }
.hc-tier span { text-transform: uppercase; }
.hc-photo:not(.hc-nophoto) + .hc-shade { box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--tier) 12%, transparent); }
.holocard[data-tier="LEGEND"] .hc-photo:not(.hc-nophoto) + .hc-shade { box-shadow: none; }

/* Player card panel (radar, totals, awards): a normal page card so it matches Form and Record in both themes */
.card.pc-extra { gap: 12px; }
.card.pc-extra .pc-radar { border-radius: 14px; background: var(--ground); border: 1px solid var(--line-soft); padding: 6px 8px; }
.card.pc-extra .pc-ring { stroke: var(--line); }
.card.pc-extra .pc-lab { fill: var(--muted); }
.card.pc-extra .pc-val { fill: var(--ink); }
.card.pc-extra .pc-dot { fill: var(--paper); }
.card.pc-extra .pc-shape { fill-opacity: .28; }
.card.pc-extra .totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; text-align: center; }
.card.pc-extra .totals > div { background: var(--ground); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.card.pc-extra .totals b { font: 800 24px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.card.pc-extra .totals span { font: 700 10.5px var(--body); letter-spacing: .08em; color: var(--muted); }
.card.pc-extra .pc-awards { border-top: 1px solid var(--line-soft); padding-top: 10px; }

/* Home: updates (votes, late drop-outs, new joiners, awards, Stinky Bib) in one card under the greeting */
.hm-inbox { border-radius: 18px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; }
.hm-note { display: flex; align-items: center; border-top: 1px solid var(--line-soft); }
.hm-note:first-child { border-top: 0; }
.hm-note-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 60px; color: var(--ink); text-decoration: none; }
.hm-note-main > svg { flex: none; color: var(--muted); }
.hm-note-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hm-note-text b { font: 700 15px/1.25 var(--body); }
.hm-note-text small { font-size: 13px; color: var(--muted); line-height: 1.35; }
.hm-note-ic { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; }
.hm-note-ic svg { width: 18px; height: 18px; }
.hm-note-ic.green { background: var(--pitch-soft); color: var(--pitch); }
.hm-note-ic.warn { background: var(--warn-bg); color: var(--warn-ink); }
.hm-note-ic.orange { background: color-mix(in srgb, var(--bib) 18%, transparent); color: var(--bib); }
:root[data-theme="dark"] .hm-note-ic.green { color: #5fc283; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm-note-ic.green { color: #5fc283; } }
.hm-note-av { flex: none; display: grid; }
.hm-note-x { flex: none; width: 40px; height: 40px; margin-right: 6px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.hm-note-more { border: 0; border-top: 1px solid var(--line-soft); background: none; height: 42px; color: var(--pitch); font: 700 13.5px var(--body); cursor: pointer; }
:root[data-theme="dark"] .hm-note-more { color: #5fc283; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm-note-more { color: #5fc283; } }
/* Me sheet: the grab bar is the close button (tap it, swipe down, tap outside or press Esc) */
.ms-grab { align-self: stretch; display: grid; place-items: center; height: 24px; margin: -6px 0 -4px; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 12px; }
.ms-grab .grabber { width: 44px; transition: width .15s ease, background .15s ease; }
.ms-grab:hover .grabber, .ms-grab:focus-visible .grabber { width: 56px; background: var(--muted); }
.ms-grab:focus-visible { outline: none; }
