/* Comet UT app styles. Direction and reasons: DESIGN.md. */
/* Font URLs carry ?v= so they are served immutable (security.py); bump it, and the preloads in ui.py, when a font file changes. */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/Archivo-VF.woff2?v=1") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #06070A;
  --core: #0A0C11;
  --raise: #11141B;
  --hair: rgba(255, 255, 255, 0.08);
  --hair-strong: rgba(255, 255, 255, 0.14);
  --shell: rgba(255, 255, 255, 0.03);
  --text: #F2F4F6;
  --muted: #9AA3AD;
  --chalk: #F4F1EA;
  --gold: #F2C14E;
  --gold-grad: linear-gradient(135deg, #FFE7A3 0%, #F2C14E 45%, #C98A1B 100%);
  --fresh: #3FCF8E;
  /* CometRating grade ladder, S best to C. Read by .tier (chip) and .cs-grade (card strip); no other grade colours. */
  --nr-s: #F2C14E; --nr-ap: #5FDB72; --nr-a: #3CC8B4; --nr-bp: #5AA9F0; --nr-b: #9C8CF2; --nr-c: #C9765A;
  --warn: #FF9F43;
  /* FUT attribute scale */
  --s-elite: #3BE38A; --s-high: #86DB55; --s-good: #D8D24A; --s-mid: #F2A43A; --s-low: #F2703A; --s-poor: #EE4B50;
  /* Rarity is data, not theme */
  --rarity-gold: #D9B25A; --rarity-silver: #B7BEC8; --rarity-bronze: #C08555;
  --rarity-icon: #EADFB8; --rarity-hero: #9A7BFF; --rarity-promo: #5B9BFF;
  --font: "Archivo", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  /* A short spring with one soft overshoot: toggles and segmented controls settle on it (reduced motion: no motion). */
  --spring: linear(0, 0.2 6%, 0.53 14%, 0.83 24%, 1.01 35%, 1.06 43%, 1.05 52%, 1.01 66%, 0.995 80%, 1);
  /* Control roles: Solve is gold (--gold-grad), the source toggle green, the formation picker blue, Clear quiet. */
  --src-bg: rgba(255, 255, 255, 0.03); --src-line: var(--hair); --src-on: rgba(242, 193, 78, 0.12);
  --src-line-on: rgba(242, 193, 78, 0.55); --src-ink: #F6D77C;  /* the source toggle: gray, gold when chosen */
  --pick-bg: rgba(91, 155, 255, 0.10); --pick-line: rgba(91, 155, 255, 0.55); --pick-ink: #D6E5FF;
  --card-ratio: 300 / 419;
  /* Corner radii (DESIGN.md: pills fully round, bezel core 26, panels 20-24, small boxes 8). Use these, not raw px. */
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 12px; --r-xl: 14px; --r-2xl: 16px; --r-3xl: 18px;
  --r-panel-s: 20px; --r-panel: 22px; --r-panel-l: 24px; --r-core: 26px; --r-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); overflow-x: clip; }   /* clip, never hidden: a stray wide child never makes the page scroll sideways, and sticky still works */
body {
  margin: 0; min-height: 100dvh; background: transparent; color: var(--text); overflow-x: clip;
  font-family: var(--font); font-size: 0.875rem; line-height: 1.5; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
/* Starlight sky (identity: a Rolls-Royce headliner over a floodlit pitch). Body stays transparent so
   these fixed layers show; html carries the base black. The layer is fixed and non-interactive. */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.sky { width: 100%; height: 100%; }
/* The shooting star (static/sky.js adds it, except for no-GPU, reduced motion and Data Saver): one flight at a time. */
.sky-shot {
  position: fixed; z-index: -1; pointer-events: none; width: 140px; height: 1.2px; border-radius: 1px; opacity: 0;
  background: linear-gradient(90deg, rgba(255,236,190,0), rgba(255,244,220,0.85));
}
.sky-shot.on { animation: sky-shot 1.1s linear; }   /* sky.js adds .on for one flight, then waits */
@keyframes sky-shot {
  0% { opacity: 0; transform: scaleX(var(--dir, 1)) rotate(22.8deg) translateX(-140px); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: scaleX(var(--dir, 1)) rotate(22.8deg) translateX(420px); }
}
@media (prefers-reduced-motion: reduce) { .sky-shot { display: none; } }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; border-radius: var(--r-sm); }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 40; padding: 10px 16px; border-radius: var(--r-pill); background: var(--chalk); color: var(--bg); font-weight: 700; }
.skip-link:focus { top: calc(16px + env(safe-area-inset-top)); }
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; flex: none; }

/* ---------- floating island nav ---------- */
.island-wrap { position: fixed; top: calc(16px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 70; /* above every page bar and panel (they stop at 60) so the nav menus never hide behind them */ display: flex; justify-content: center;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); pointer-events: none; }
.island {
  pointer-events: auto; display: flex; align-items: center; gap: 8px; width: min(var(--page), 100%);
  padding: 6px 6px 6px 20px; border-radius: var(--r-pill); border: 1px solid var(--hair);
  background: rgba(12, 14, 19, 0.72); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 48px -24px rgba(0, 0, 0, 0.8);
}
.wordmark { margin-right: 12px; text-decoration: none; font-weight: 800; font-stretch: 125%; font-size: 1.0625rem; letter-spacing: 0.02em; white-space: nowrap; }
.wordmark span { color: var(--gold); }
.wordmark { display: inline-flex; align-items: center; flex: none; min-height: 40px; }
/* The logo is the Home link: the nav links' hover shade and a press, so it reads as one. */
.island .wordmark { margin-left: -10px; padding: 0 10px; border-radius: var(--r-pill); transition: background-color 200ms var(--ease), transform 160ms var(--ease); }
.island .wordmark:hover { background: rgba(255, 255, 255, 0.07); }
.island .wordmark:active { transform: scale(0.97); }
.brand-lockup { display: block; width: 168px; height: 32px; object-fit: contain; }
/* The nav logo: the comet mark in a lit gold-rimmed circle that stands out of the bar (the Home button), then the wordmark.
   The mark is seated at 80% so its tail tips stay inside the circle. */
/* The orb and the wordmark are one link, so they share one hover: the same soft pill the other nav items get. */
.island .wordmark:has(.brand-orb) { gap: 10px; margin-left: -10px; padding: 0 14px 0 4px; }
.brand-orb { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #0A0D12; box-shadow: 0 1px 6px rgba(0, 0, 0, .55); }
.brand-orb img { display: block; width: 29px; height: 29px; transition: filter 300ms var(--ease); }
.brand-word { display: block; width: 142px; height: 26px; object-fit: contain; }
.island .wordmark:hover .brand-orb img { filter: brightness(1.15); }
/* A short gold grab-bar centred under the logo, with a faint glow (like the one that pulls a sheet down on a phone): the cue that this goes somewhere. */
.plat-switch.is-ghost { visibility: hidden; }
.island .wordmark:has(.brand-orb) { position: relative; }
.island .wordmark:has(.brand-orb)::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 26px; height: 3px; margin-left: -13px; border-radius: 3px; background: var(--gold); opacity: .85;
  box-shadow: 0 0 7px rgba(255, 209, 90, .5); transition: opacity 300ms var(--ease), box-shadow 300ms var(--ease), width 300ms var(--ease), margin-left 300ms var(--ease); }
.island .wordmark:has(.brand-orb):hover::after { width: 38px; margin-left: -19px; opacity: 1; box-shadow: 0 0 10px rgba(255, 209, 90, .7); }
.island .wordmark:focus-visible { outline: 2px solid var(--chalk); outline-offset: 4px; border-radius: var(--r-pill); }
@media (max-width: 520px) { .brand-word { display: none; } .island .wordmark:has(.brand-orb) { gap: 0; padding-right: 4px; } }
.au-brand .brand-lockup { width: 236px; height: 45px; }
.island-links { display: flex; gap: 2px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 11px; border-radius: var(--r-pill);
  color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap;
  transition: color 140ms var(--ease), background-color 140ms var(--ease);
}
.nav-link small, .sheet-link small { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--hair); border-radius: var(--r-pill); padding: 1px 6px; }
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 -2px 0 -0.5px var(--gold); }
/* More: the features that have no place in the bar. A tool-pop (one open at a time, outside click and Escape close it). */
.nav-more > summary { cursor: pointer; list-style: none; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary .icon-sm { width: 12px; height: 12px; transform: rotate(90deg); transition: transform 300ms var(--ease); }
.nav-more[open] > summary { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.nav-more[open] > summary .icon-sm { transform: rotate(-90deg); }
.nav-more-pop { right: auto; left: 0; top: calc(100% + 10px); min-width: 220px; }
.nav-more-pop a.opt { color: var(--text); text-decoration: none; }
.nav-more-pop a.opt[aria-current="page"] { color: var(--gold); }
.nav-ic { width: 18px; height: 18px; margin-right: 8px; object-fit: contain; vertical-align: -4px; flex: none; }
.nav-more > summary:focus-visible, .nav-more-pop a.opt:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
/* My Club with a synced club and Pro: the label is a link, the arrow beside it opens the pages inside it. Both are plain nav buttons. */
/* More: the three dots turn a quarter as the menu opens (closed: the base summary rule rotates them, open: this one clears it). */
.nav-dots { width: 40px; padding: 0; justify-content: center; }
.nav-dots .icon-sm, .nav-more[open] > .nav-dots .icon-sm { width: 18px; height: 18px; transform: none; }

.nav-more > summary:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-more[open] > summary:hover { background: rgba(255, 255, 255, 0.08); }
.nav-more > summary[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 -2px 0 -0.5px var(--gold); }
.nav-search { position: relative; flex: 1; min-width: 160px; margin-left: auto; max-width: 340px; }
.nav-search .icon-sm { position: absolute; left: 14px; top: 12px; color: var(--muted); pointer-events: none; }
.nav-search input {
  width: 100%; height: 40px; padding: 0 16px 0 38px; border-radius: var(--r-pill); border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.04); color: var(--text); transition: border-color 140ms var(--ease), background-color 140ms var(--ease);
}
.nav-search input::placeholder { color: var(--muted); }
.nav-search input:focus { outline: none; border-color: var(--hair-strong); background: rgba(255, 255, 255, 0.07); }
.nav-search input:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.plat-switch { display: inline-flex; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.03); }
.plat-switch a {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--r-pill);
  color: var(--muted); text-decoration: none; font-size: 0.8125rem; font-weight: 600; transition: color 150ms ease, background-color 150ms ease;
}
.plat-switch a img, .plat-switch a svg { width: 16px; height: 16px; opacity: 0.7; }
.plat-switch a[aria-current="true"] { background: rgba(255, 255, 255, 0.10); color: var(--text); }
.plat-switch a[aria-current="true"] img, .plat-switch a[aria-current="true"] svg { opacity: 1; }
.plat-part { display: contents; }  /* ui.plat_part: a swap target that layouts never see */
.player-search { display: none; }
.island-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 5px 0 18px; border-radius: var(--r-pill);
  background: var(--gold-grad); color: #1A1204; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform 400ms var(--ease);
}
.island-btn .nub {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-pill); background: rgba(6, 7, 10, 0.08);
  font-size: 0.8125rem; transition: transform 500ms var(--ease);
}
.island-btn:hover .nub { transform: translate(2px, -1px) scale(1.06); }
.island-btn:active { transform: scale(0.98); }
.menu-btn { display: none; position: relative; width: 44px; height: 44px; border: 0; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.06); cursor: pointer; }
.menu-btn span { position: absolute; left: 14px; width: 16px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 500ms var(--ease); }
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child, .sheet-x span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child, .sheet-x span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.sheet-x { position: fixed; margin: 0; }  /* top and left come from the header's menu button when the menu opens */

.sheet {  /* a modal <dialog>: top layer, so no z-index; closed it is display:none from the UA sheet */
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; color: inherit;
  overflow-y: auto; overscroll-behavior: contain;  /* the More links run past a phone screen */
  padding: calc(96px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(6, 7, 10, 0.86); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
}
.sheet::backdrop { background: transparent; }  /* the sheet itself carries the dim and blur */
.sheet-inner { display: grid; gap: 24px; }
.sheet nav { display: grid; }
.sheet-link {
  display: flex; align-items: center; gap: 10px; padding: 14px 4px; border-bottom: 1px solid var(--hair);
  font-size: 1.75rem; font-weight: 700; font-stretch: 115%; text-decoration: none;
}
/* Fast fade, links rise together; display and overlay are discrete so the exit plays before the dialog leaves the top layer. */
@media (prefers-reduced-motion: no-preference) {
  .sheet { opacity: 0; transition: opacity 180ms var(--ease), display 180ms allow-discrete, overlay 180ms allow-discrete; }
  .sheet[open] { opacity: 1; }
  .sheet-link { opacity: 0; transform: translateY(12px); transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
  .sheet[open] .sheet-link { opacity: 1; transform: none; }
  @starting-style { .sheet[open] { opacity: 0; } .sheet[open] .sheet-link { opacity: 0; transform: translateY(12px); } }
}
.sheet-link[aria-current="page"] { color: var(--gold); }
.sheet-link.is-more { padding: 10px 4px; color: var(--muted); font-size: 1.25rem; font-weight: 600; }
.sheet .nav-search { max-width: none; margin: 0; }
.sheet .nav-search input { height: 48px; }
.sheet .nav-search .icon-sm { top: 16px; }

/* ---------- page frame ---------- */
:root { --page: 1440px; }  /* the page and the nav island share it (1240 until 2026-11-22: owner, less empty margin) */
.main { width: min(var(--page), 100%); margin: 0 auto;
  padding: calc(120px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.hero { display: grid; justify-items: start; gap: 14px; padding: 24px 0 36px; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.8125rem; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; transition: color 140ms var(--ease); }
.crumbs a:hover { color: var(--text); }
.eyebrow {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--r-pill); border: 1px solid var(--hair);
  background: var(--shell); color: var(--muted); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
}
.hero h1, .detail-main h1, .solver-title {
  font-size: clamp(2.75rem, 7vw, 5.75rem); font-weight: 800; font-stretch: 125%; line-height: 0.95; letter-spacing: -0.03em;
  padding-bottom: 0.06em; /* room for descenders under background-clip */
  color: var(--text);
}
.fresh-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.8125rem; }
.fresh-note .dot { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--fresh); }
.fresh-note.stale .dot { background: var(--warn); }
.fresh-note.stale { color: #D9B89A; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 3px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  border: 1px solid var(--hair); background: var(--shell); color: var(--muted); text-decoration: none; font-size: 0.8125rem; font-weight: 600; white-space: nowrap;
  transition: color 140ms var(--ease), background-color 140ms var(--ease), border-color 140ms var(--ease), transform 140ms var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--hair-strong); }
.chip:active { transform: scale(0.97); }
.chip[aria-current="true"] { background: var(--gold-grad); color: #1A1204; border-color: transparent; box-shadow: 0 6px 20px -8px rgba(242, 193, 78, 0.6); }
.toolbar-end { margin-left: auto; display: flex; gap: 8px; flex: none; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); }
.seg a {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 36px; height: 28px; padding: 0 12px; border-radius: var(--r-pill);
  color: var(--muted); text-decoration: none; font-size: 0.8125rem; font-weight: 600; transition: color 150ms ease, background-color 150ms ease;
}
.seg a[aria-current="true"] { background: rgba(255, 255, 255, 0.10); color: var(--text); }
/* Segmented controls (.seg, .plat-switch): one highlight slides under the chosen item (ui.py page script). */
.seg, .plat-switch { position: relative; isolation: isolate; }
.seg-thumb { position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 0; width: var(--tw, 0); transform: translateX(var(--tx, 0));
  border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.10); pointer-events: none; opacity: 0; }
.has-thumb > .seg-thumb { opacity: 1; }
.thumb-live > .seg-thumb { transition: transform 360ms var(--spring), width 360ms var(--spring); }
.has-thumb > :is([aria-current="true"], [aria-selected="true"], [aria-pressed="true"]) { background: transparent; }
.cf-seg > .seg-thumb { top: var(--ty, 4px); bottom: auto; height: var(--th, 0); transform: translate(var(--tx, 0), 0); }
.cf-seg.has-thumb input:checked + span { background: transparent; border-color: transparent; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .thumb-live > .seg-thumb { transition: none; } }

/* ---------- double-bezel container ---------- */
.bezel { padding: 6px; border-radius: 32px; border: 1px solid rgba(255, 255, 255, 0.07); background: var(--shell); }
.bezel-core {
  border-radius: var(--r-core); background: var(--core); padding: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- price pill (identity motif) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 5px; border-radius: var(--r-pill);
  background: var(--raise); border: 1px solid rgba(242, 193, 78, 0.28); white-space: nowrap; font-size: 0.8125rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.pill .coin { width: 18px; height: 18px; }
.pill b { font-weight: 800; font-stretch: 110%; }
.pill .age { font-style: normal; font-size: 0.6875rem; color: var(--muted); }
.pill .age.stale { color: var(--warn); }
.pill.none { padding: 0 12px; border-color: var(--hair); color: var(--muted); font-weight: 600; }

/* ---------- item card ---------- */
.item-card { position: relative; aspect-ratio: var(--card-ratio); }
.item-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.plate {
  position: absolute; inset: 5% 9%; display: grid; align-content: start; gap: 2px; padding: 14% 10%;
  border: 2px solid var(--rarity, var(--rarity-gold)); border-radius: 12px 12px 40% 40% / 12px 12px 18% 18%;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rarity, var(--rarity-gold)) 30%, var(--raise)), var(--raise));
}
.plate .p-rating { font-size: 2.2em; font-weight: 800; font-stretch: 115%; line-height: 1; }
.plate .p-pos { font-size: 0.9em; font-weight: 700; color: var(--muted); }
.plate .p-name { margin-top: 40%; font-weight: 800; font-size: 0.95em; line-height: 1.15; overflow-wrap: anywhere; text-align: center; }
.r-gold { --rarity: var(--rarity-gold); } .r-silver { --rarity: var(--rarity-silver); } .r-bronze { --rarity: var(--rarity-bronze); }
.r-icon { --rarity: var(--rarity-icon); } .r-hero { --rarity: var(--rarity-hero); } .r-promo { --rarity: var(--rarity-promo); }
.item-card img + .plate { visibility: hidden; }
/* While card art loads: the plate's rarity shape holds the space, text hidden; the art fades in over it (class aw, removed on load). */
.js .item-card img.aw { opacity: 0; }
.item-card img.art { transition: opacity 200ms var(--ease); }
/* a quiet card silhouette where the art will land (measured: x 9-96%, y 12-93% of the image), not a gold box */
.js .item-card img.aw + .plate { visibility: visible; inset: 12% 4% 7% 9%; padding: 0; border: 0; border-radius: 0; background: rgba(255, 255, 255, .05);
  clip-path: polygon(12% 0, 88% 0, 100% 7%, 100% 87%, 50% 100%, 0 87%, 0 7%); }
.js .item-card img.aw + .plate > * { visibility: hidden; }

/* ---------- card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 32px 18px; list-style: none; margin: 0; padding: 0; }
.tile { min-width: 0; }
/* Off-screen repeating items skip layout and paint. `auto` in the intrinsic size remembers a row's real height once seen, so the scrollbar holds still. A hovered tile is on screen: paint containment would clip its lift and shadow, so it opts out. */
.card-grid > .tile { content-visibility: auto; contain-intrinsic-size: auto 270px; }
.card-grid > .tile:hover, .card-grid > .tile:focus-within { content-visibility: visible; }
.tile a { display: grid; justify-items: center; text-decoration: none; border-radius: var(--r-2xl); }
.tile .item-card { width: 100%; transition: transform 600ms var(--ease), filter 600ms var(--ease); }
.tile .pill { margin-top: 4px; position: relative; transition: transform 600ms var(--ease); }
.tile a:hover .item-card { transform: translateY(-6px) scale(1.03); filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55)); }
.tile a:hover .pill { transform: translateY(-4px); }
.tile-meta { position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 6px; max-width: 100%; margin-top: 4px; transition: transform 600ms var(--ease); }
.tile-meta .pill { margin-top: 0; }
.tile-price { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 4px; max-width: 100%; }  /* price and Item Score never part */
.tile-price > * { flex: none; }
.tile-price .pill, .tile-price .is-chip { gap: 3px; padding: 0 7px 0 4px; font-size: 0.75rem; }
.tile-price .pill .coin { width: 16px; height: 16px; }
.tile-price b { font-stretch: 100%; }
.tile a:hover .tile-meta { transform: translateY(-4px); }
.tile a:hover .tile-meta .pill { transform: none; }
.is-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 6px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font-size: 0.75rem; white-space: nowrap; }
.is-chip img { width: 14px; height: 14px; }
.is-chip b { font-weight: 800; font-stretch: 110%; }
.dock-is { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hair); color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.dock-is b { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 0.9375rem; font-weight: 800; }

/* ---------- list ---------- */
.bezel-core:has(.player-table) { padding: 8px 12px; }
.player-table { width: 100%; border-collapse: collapse; }
.player-table th { padding: 14px 8px; text-align: left; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--hair); }
.player-table td { padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
.player-table tr:last-child td { border-bottom: 0; }
.player-table tbody tr { position: relative; transition: background-color 300ms var(--ease); }
.player-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.player-table .item-card { width: 46px; flex: none; font-size: 7px; }
.who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.who a { font-weight: 700; font-size: 0.875rem; text-decoration: none; }
.who a::after { content: ""; position: absolute; inset: 0; }
.who a:focus-visible { outline: none; }
.player-table tr:has(a:focus-visible) { outline: 2px solid var(--chalk); outline-offset: -2px; }
.badges { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.badges small { color: var(--muted); font-size: 0.75rem; margin-left: 2px; }
.badge { width: 20px; height: 20px; object-fit: contain; }
.badge.flag { width: 22px; height: 14px; object-fit: cover; border-radius: 2px; }
.ovr {
  display: inline-grid; place-items: center; width: 40px; height: 32px; border-radius: var(--r-md); font-weight: 800; font-stretch: 115%; font-size: 1rem;
  color: var(--rarity); background: color-mix(in srgb, var(--rarity) 14%, transparent); border: 1px solid color-mix(in srgb, var(--rarity) 40%, transparent);
}
.pos { display: inline-block; padding: 2px 8px; border-radius: var(--r-xs); border: 1px solid var(--hair-strong); font-weight: 700; font-size: 0.75rem; }
.alt { display: block; margin-top: 3px; color: var(--muted); font-size: 0.6875rem; }
.col-stat { width: 52px; text-align: center; }
.player-table th.col-stat { text-align: center; }
.statbox {
  display: inline-grid; place-items: center; width: 38px; height: 28px; border-radius: var(--r-sm); font-weight: 700; font-size: 0.8125rem;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.s-elite { --c: var(--s-elite); } .s-high { --c: var(--s-high); } .s-good { --c: var(--s-good); }
.s-mid { --c: var(--s-mid); } .s-low { --c: var(--s-low); } .s-poor { --c: var(--s-poor); }
.num { text-align: right; }
.player-table th.num { text-align: right; }

/* ---------- pager / empty ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 32px; color: var(--muted); font-size: 0.8125rem; }
.pager .chip { height: 44px; padding: 0 18px; }
.empty { display: grid; justify-items: start; gap: 10px; padding: 32px 8px; color: var(--muted); }
.empty h2 { color: var(--text); font-size: 1.375rem; font-weight: 700; font-stretch: 110%; }
.empty a:not(.chip) { color: var(--text); }
.state { justify-items: start; }
.state .state-ic { color: var(--muted); }
.state .state-more { color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.state .state-more:hover { color: var(--text); }
.state.is-error .state-ic { color: var(--chalk); }
.state h2 { margin: 0; }

/* ---------- player detail: card + price column beside attributes and PlayStyles (DESIGN.md §4.9) ---------- */
.main > .crumbs { margin: 8px 0 20px; }
.pd { display: grid; grid-template-columns: 248px minmax(0, 1fr); grid-template-areas: "side head" "side main"; gap: 16px 36px; align-items: start; }
.pd-head { grid-area: head; display: grid; gap: 8px; min-width: 0; }
.pd-eyebrow { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pd-head h1 { font-size: clamp(1.875rem, 3.4vw, 2.75rem); line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
.pd-idline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 0.875rem; font-weight: 600; }
.pd-pos { font-weight: 800; letter-spacing: .04em; }
.pd-alt { color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.pd-origin { display: inline-flex; align-items: center; gap: 6px; color: #C9D0D6; }
.pd-origin .badge { width: 20px; height: 20px; object-fit: contain; }
.pd-side { grid-area: side; position: sticky; top: calc(104px + env(safe-area-inset-top)); display: grid; gap: 12px; min-width: 0; }
/* Card column: the card, the strip under its point (SM | WF | NR), then price and Item Score on one quiet line. */
.pd-card { display: grid; justify-items: center; padding: 12px 16px 14px; border: 1px solid var(--hair); border-radius: var(--r-panel-l);
  background: radial-gradient(16rem 12rem at 50% 30%, rgba(242, 193, 78, 0.10), transparent 70%), var(--core); }
.pd-card .item-card { width: 100%; max-width: 200px; }
.pd-label { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.pd-value { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.pd-coins, .pd-is { display: inline-flex; align-items: center; gap: 5px; }
.pd-coins b, .pd-is b { font-weight: 800; }
.pd-coins .coin { width: 16px; height: 16px; }
.pd-coins.none { color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.pd-value > * + * { padding-left: 14px; border-left: 1px solid var(--hair); }
.pd-specs { margin: 0; padding: 2px 14px; border: 1px solid var(--hair); border-radius: var(--r-3xl); background: var(--core); }
.pd-specs .spec { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; }
.pd-specs .spec + .spec { border-top: 1px solid var(--hair); }
.pd-specs dt { color: var(--muted); font-size: 0.75rem; }
.pd-specs dd { margin: 0; }
.pd-specs b { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8125rem; font-weight: 700; }
.pd-specs .spec-none { color: var(--muted); font-weight: 600; }
/* Main: attributes left; chemistry then positions on the right. Phones stack chemistry first, next to what it changes. */
.pd-main { grid-area: main; display: grid; grid-template-columns: minmax(0, 1fr) 330px; grid-template-areas: "attrs chem" "attrs pos"; grid-template-rows: auto 1fr; gap: 14px; align-items: start; min-width: 0; }
.pd-attrs { grid-area: attrs; position: relative; }
.chem-panel { grid-area: chem; }
.pos-panel { grid-area: pos; scroll-margin-top: calc(110px + env(safe-area-inset-top)); }
.pd-panel { min-width: 0; padding: 16px; border: 1px solid var(--hair); border-radius: var(--r-panel); background: rgba(10, 12, 17, .9); }
.pd-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.pd-panel-head h2, .pd-h2 { font-size: 1.0625rem; font-weight: 800; letter-spacing: -.01em; }

/* AcceleRATE: one colour per run type, shared by the badge, the style pill outlines and the legend */
:root { --acc-explosive: #FF8A3D; --acc-controlled: #2EC5D3; --acc-lengthy: #B08CFF; --chem: #3D7BFF; --chem-gain: #B8F26A; }  /* chemistry is blue; a point a hovered card would add is lime */
[data-accel-type="explosive"] { --tc: var(--acc-explosive); }
[data-accel-type="controlled"] { --tc: var(--acc-controlled); }
[data-accel-type="lengthy"] { --tc: var(--acc-lengthy); }
.attrs-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 10px 16px; margin-bottom: 14px; }
.accel-badge { display: grid; justify-items: end; gap: 3px; }
.accel-badge b { display: inline-flex; align-items: center; gap: 6px; color: var(--tc); font-size: 1rem; font-weight: 800; transition: color .35s var(--ease); }
.accel-badge .icon-sm { color: currentColor; }

/* PlayStyles: owned icons in the summary; opening it shows the whole grid */
.ps-panel { min-width: 0; }
.ps-panel > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; list-style: none; cursor: pointer; border-radius: var(--r-lg); }
.ps-panel > summary::-webkit-details-marker { display: none; }
.ps-panel > summary:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.ps-strip { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.ps-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-sm); }
.ps-ico .ps-art { width: 32px; height: 32px; }
.ps-ico.plus { background: rgba(242, 193, 78, .12); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, .5); }
.ps-none { color: var(--muted); font-size: 0.8125rem; }
.ps-more { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border: 1px solid var(--hair-strong); border-radius: var(--r-pill); transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.ps-panel > summary:hover .ps-more, .ps-panel[open] .ps-more { border-color: var(--gold); background: rgba(242, 193, 78, .1); }
.ps-chev { width: 14px; height: 14px; fill: none; stroke: var(--text); stroke-width: 1.8; transition: transform .25s var(--ease); }
.ps-panel[open] .ps-chev { transform: rotate(180deg); }
/* The full grid covers the attribute groups instead of pushing them down, so the page never changes height. */
.psg { position: absolute; z-index: 6; top: 72px; left: 16px; right: 16px; max-height: calc(100% - 88px); display: flex; flex-direction: column; border: 1px solid var(--hair-strong); border-radius: var(--r-2xl);
  background: #0b0e14; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); overflow: auto; animation: psg-in .22s var(--ease); }
@keyframes psg-in { from { opacity: 0; transform: translateY(-6px); } }
.psg-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 12px; }
.psg-row + .psg-row { border-top: 1px solid var(--hair); }
.psg-cat { color: #C9D0D6; font-size: 0.75rem; font-weight: 700; }
.psg-row ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.psg-ico { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--r-md); background: none; cursor: pointer; }
.psg-ico img { width: 34px; height: 34px; }
.psg-ico.off img { opacity: .28; filter: grayscale(1); }
.psg-ico.plus { background: rgba(242, 193, 78, .12); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, .55); }
.psg-ico:hover, .psg-ico:focus-visible { background: rgba(255, 255, 255, .08); }
.psg-ico.own { background: rgba(255, 255, 255, .06); }

/* Face stat ring: --p is a registered number, so the ring and the colour move when the scenario changes */
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.attr header { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--hair); }
.gauge { position: relative; display: grid; place-items: center; flex: none; width: 46px; height: 46px; transition: --p .45s var(--ease); }
.gauge::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.5px)); }
.gauge b { position: relative; color: var(--c); font-size: 1.0625rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.attr .face-delta, .attr-values em { padding: 1px 5px; border-radius: 5px; background: rgba(63, 207, 142, .15); color: var(--fresh); font-size: 0.6875rem; font-style: normal; font-weight: 800; }
.attr .face-delta { margin-left: auto; }

/* Chemistry: three diamonds (hover previews, click sets, click the top one again for 0) and every style as a pill */
@font-face { font-family: "chemistry"; src: url("/assets/fonts/chemistry.woff") format("woff"); font-display: block; }
.chem-diamonds { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-md); cursor: pointer; }
.chem-diamonds:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.chem-d { display: grid; place-items: center; width: 34px; height: 34px; }
.chem-d svg { width: 22px; height: 22px; }
.chem-d path { fill: transparent; stroke: rgba(255, 255, 255, .32); stroke-width: 1.6; transition: fill .2s var(--ease), stroke .2s var(--ease); }
.chem-d.on path { fill: var(--chem); stroke: var(--chem); }
.chem-diamonds.previewing .chem-d.on path { fill: color-mix(in srgb, var(--chem) 60%, transparent); }
.style-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.sp { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px 0 6px; border: 1.5px solid var(--tc, var(--hair-strong)); border-radius: var(--r-pill);
  background: var(--core); color: #C9D0D6; font: inherit; font-size: 0.7188rem; font-weight: 700; cursor: pointer;
  transition: border-color .4s var(--ease), background-color .4s var(--ease), color .2s var(--ease); }
.sp-glyph { font-family: "chemistry"; font-size: 0.9375rem; font-weight: 400; line-height: 1; color: var(--tc, var(--muted)); transition: color .4s var(--ease); }
.sp:hover, .sp.previewing { color: var(--text); background: rgba(255, 255, 255, .06); }
.sp[aria-checked="true"] { color: #07090D; background: var(--tc, var(--text)); border-color: var(--tc, var(--text)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc, #fff) 25%, transparent); }
.sp[aria-checked="true"] .sp-glyph { color: #07090D; }
.sp:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.sp:disabled { opacity: .4; cursor: not-allowed; }
.accel-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; color: var(--muted); font-size: 0.7188rem; }
.accel-legend span { display: inline-flex; align-items: center; gap: 6px; }
.accel-legend span::before { content: ""; width: 10px; height: 10px; border: 1.5px solid var(--tc); border-radius: var(--r-pill); }

/* Positions: a tab per eligible position (best NR on it), the chosen position's roles as a short list */
.pos-none { color: var(--muted); font-size: 0.8125rem; }
.pos-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pos-tab { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--hair-strong); border-radius: var(--r-md); background: var(--core); color: #C9D0D6; font: inherit; font-size: 0.75rem; font-weight: 800; cursor: pointer; }
.pos-tab b { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.pos-tab.primary span { color: var(--gold); }
.pos-tab:hover { border-color: rgba(255, 255, 255, .3); color: var(--text); }
.pos-tab[aria-selected="true"] { border-color: var(--gold); background: rgba(242, 193, 78, .12); color: var(--text); }
.pos-tab[aria-selected="true"] b { color: var(--text); }
.pos-tab:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.role-list { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--hair); border-radius: var(--r-xl); overflow: hidden; }
.role-list[hidden] { display: none; }
.role-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; }
.role-row + .role-row { border-top: 1px solid var(--hair); }
.rr-name { overflow: hidden; color: #C9D0D6; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.rr-name b { margin-left: 4px; color: var(--fresh); font-size: 0.75rem; }
.role-row strong { text-align: right; font-size: 0.9375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.role-row small.tier { padding: 2px 6px; border-radius: var(--r-xs); font-size: 0.6875rem; font-weight: 800; }
.role-row.best { background: rgba(63, 207, 142, .07); }
.role-row.best strong { color: var(--fresh); }
.section-title { margin-top: 24px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.01em; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.stat {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px 8px; padding: 16px 18px; border-radius: var(--r-panel-s);
  background: var(--core); border: 1px solid var(--hair);
}
.stat-label { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; }
.stat b { font-size: 1.875rem; font-weight: 800; font-stretch: 115%; line-height: 1; color: var(--c); }
.stat .bar { grid-column: 1 / -1; height: 4px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.stat .bar i { display: block; width: var(--v); height: 100%; border-radius: inherit; background: var(--c); }
.fine { margin-top: 12px; color: var(--muted); font-size: 0.75rem; max-width: 60ch; }


/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .island-links .nav-link small { display: none; }
  .island-btn { display: none; }
  .island .plat-switch a { width: 40px; justify-content: center; padding: 0; }
  .island .plat-switch .plat-label { display: none; }
}
@media (max-width: 1120px) {
  .pd-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "chem" "attrs" "pos"; }
}
@media (max-width: 960px) {
  .pd { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "side" "main"; }
  .pd-side { position: static; grid-template-columns: 170px minmax(0, 1fr); align-items: start; }
  .pd-specs { grid-column: 1 / -1; }
  .col-stat { display: none; }
}
/* Seven nav links plus search, platform and refresh need ~1000px: below that the nav is the menu sheet (measured 2026-10-07). */
@media (max-width: 1000px) {
  .island { padding: 6px 6px 6px 18px; }
  .island > .island-links, .island > .nav-search, .island > .plat-switch { display: none; }
  .menu-btn { display: block; margin-left: auto; }
  .island > .nav-user, .island > .nav-auth-up, .island > .nav-cr { margin-left: auto; }
  .island > .nav-cr + .nav-user { margin-left: 8px; }
  .island > .nav-user + .menu-btn, .island > .nav-auth-up + .menu-btn { margin-left: 0; }
  .player-search { display: block; margin: 0 0 20px; }
  .player-search label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
  .player-search-field { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 4px 4px 14px; border: 1px solid var(--hair-strong); border-radius: var(--r-xl); background: rgba(255,255,255,.05); }
  .player-search-field .icon-sm { color: var(--muted); }
  .player-search-field input[type="search"] { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent; }
  .player-search-field input[type="search"]:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
  .player-search-field button { min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-md); background: var(--gold); color: var(--bg); font-weight: 700; cursor: pointer; }
}
@media (max-width: 860px) {
  .toolbar { flex-wrap: wrap; }
  .toolbar .chips { width: 100%; }
  .toolbar-end { margin-left: 0; width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .seg a { white-space: nowrap; }
}
@media (max-width: 640px) {
  .main { padding: calc(96px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) calc(64px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .hero { padding: 12px 0 24px; }
  .chip { height: 44px; }
  .seg a { height: 38px; }
  .bezel { border-radius: var(--r-panel-l); padding: 4px; }
  .bezel-core { border-radius: var(--r-panel-s); padding: 18px 12px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .pill { height: 26px; font-size: 0.75rem; gap: 4px; padding-right: 8px; }
  .pill .coin { width: 16px; height: 16px; }
  .player-table th:nth-child(3), .player-table td:nth-child(3) { display: none; }
  .player-table .item-card { width: 38px; }
  .who { gap: 10px; }
  .badges small { display: none; }
  .pd-side { grid-template-columns: 124px minmax(0, 1fr); gap: 10px; }
  .pd-card { padding: 8px; border-radius: var(--r-3xl); }
  .pd-panel { padding: 12px; border-radius: var(--r-3xl); }
  .psg-row { grid-template-columns: 1fr; gap: 4px; }
  .accel-badge { justify-items: start; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; transition-delay: 0ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .tile a:hover .item-card, .tile a:hover .pill { transform: none; }
}

/* ---------- player profile parts (detail page) ---------- */
.stars { gap: 2px !important; }
.stars > span { margin-right: 6px; font-size: 0.9375rem; font-weight: 800; font-stretch: 115%; }
.star { width: 13px; height: 13px; color: rgba(255, 255, 255, 0.4); } /* off star: 3:1 non-text contrast on every surface */
.star.on { color: var(--gold); }
.accel .icon-sm { color: var(--gold); }

.ps-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ps {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 6px; border-radius: var(--r-pill);
  border: 1px solid var(--hair); background: var(--core); font-weight: 600; font-size: 0.8125rem;
}
.ps.plus { border-color: rgba(242, 193, 78, 0.45); background: linear-gradient(180deg, rgba(242, 193, 78, 0.10), transparent), var(--core); }
.ps { padding-left: 6px; height: 40px; gap: 7px; }
.ps-art { width: 31px; height: 31px; object-fit: contain; flex: none; }
.ps.plus .ps-art { width: 34px; height: 34px; }
.role { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--core); font-size: 0.8125rem; font-weight: 600; }
.role b { color: var(--muted); font-weight: 800; }
.role.pp { border-color: rgba(63, 207, 142, 0.48); background: rgba(63, 207, 142, 0.08); }
.role.pp b { color: var(--fresh); }
.fit-panel > summary { cursor: pointer; list-style: none; }
.fit-panel > summary::-webkit-details-marker { display: none; }
.fit-panel:not([open]) > summary { border-bottom: 0; }
.fit-panel { width: 100%; margin-top: 16px; border: 1px solid var(--hair-strong); border-radius: var(--r-3xl); background: var(--core); overflow: hidden; }
.fit-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 15px 16px; border-bottom: 1px solid var(--hair); }
.fit-heading h3 { margin: 0; font-size: 1rem; }
.fit-heading p, .fit-method { margin: 4px 0 0; color: var(--muted); font-size: 0.6875rem; line-height: 1.45; }
.fit-heading > span { padding: 4px 7px; border: 1px solid var(--hair-strong); border-radius: var(--r-pill); color: var(--muted); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: .05em; }
.fit-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 20px; margin: 0; padding: 4px 16px; list-style: none; }
.fit-row { border-bottom: 1px solid var(--hair); transition: background .15s; }
.fit-row:hover, .fit-row:focus-within, .fit-row[open] { background: rgba(255,255,255,.055); }
.fit-row summary { display: grid; grid-template-columns: 32px minmax(0,1fr) 37px; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; }
.fit-row summary::-webkit-details-marker { display: none; }
.fit-row p { margin: -2px 0 9px 40px; color: var(--muted); font-size: 0.6875rem; line-height: 1.45; }
.fit-pos { color: var(--gold); font-size: 0.75rem; font-weight: 800; }
.fit-role { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; }
.fit-tier { color: var(--fresh); }
.fit-score { display: grid; place-items: center; width: 32px; height: 29px; border: 1px solid rgba(63,207,142,.3); border-radius: var(--r-sm); background: rgba(63,207,142,.1); color: var(--fresh); font-size: 0.8125rem; }
.fit-method { padding: 8px 16px 14px; }
.fit-row summary { grid-template-columns: 32px minmax(0,1fr) auto; }
.fit-score { width: auto; min-width: 32px; padding: 0 7px; gap: 5px; display: inline-flex; font-variant-numeric: tabular-nums; }
.fit-score small, .nr-grade { color: var(--gold); font-size: 0.6875rem; font-weight: 800; }
.nr-table { width: calc(100% - 40px); margin: 0 0 8px 40px; border-collapse: collapse; font-size: 0.7188rem; font-variant-numeric: tabular-nums; }
.nr-table th, .nr-table td { padding: 4px 6px 4px 0; text-align: left; border-bottom: 1px solid var(--hair); }
.nr-table thead th { color: var(--muted); font-weight: 600; font-size: 0.6875rem; }
.nr-table tbody th { font-weight: 600; }
@media (max-width: 640px) { .fit-list { grid-template-columns: 1fr; } }

.attr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
.attr { padding: 16px 18px; border-radius: var(--r-panel-s); border: 1px solid var(--hair); background: var(--core); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.attr h3 { font-size: 0.8125rem; font-weight: 700; color: #C9D0D6; }
.attr ul { display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; }
.attr li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; font-size: 0.8125rem; }
.attr li > span:first-child { color: #C9D0D6; }
.attr li b { color: var(--c); font-weight: 700; }
.attr-values { display: inline-flex; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; }
.attr li.boosted { padding: 3px 5px; margin: -3px -5px; border-radius: var(--r-xs); }
.attr li.boosted:is(:hover,:focus-visible) { background: rgba(255,255,255,.08); }
/* Bar: base in the attribute's colour, the chemistry boost (--e beyond --b) in mint behind it */
.attr li .bar { position: relative; grid-column: 1 / -1; height: 4px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.attr li .bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--e); border-radius: inherit; background: var(--fresh); }
.attr li .bar i { position: relative; display: block; width: var(--b); height: 100%; border-radius: inherit; background: var(--c); }
@media (max-width: 1100px) { .attr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .attr-grid, .pd-attrs .attr-grid { grid-template-columns: 1fr; } }

/* ---------- my club ---------- */
.club-coins { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; font-stretch: 112%; line-height: 1; }
.club-coins .coin-lg { width: 40px; height: 40px; }
.chip-count { margin-left: 2px; font-size: 0.6875rem; opacity: 0.75; }  /* 4.77:1 on the page ground (0.7 was 4.28:1) */
.tile-static { display: grid; justify-items: center; }
.tile-static .pill, .tile a .pill { margin-top: 4px; position: relative; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; min-height: 20px; }
.tag { padding: 1px 8px; border-radius: var(--r-pill); border: 1px solid var(--hair); color: var(--muted); font-size: 0.6875rem; font-weight: 600; white-space: nowrap; }
.tag.gold { color: var(--gold); border-color: rgba(242, 193, 78, 0.45); }
.tag.warn { color: var(--warn); border-color: rgba(255, 159, 67, 0.45); }
.tag.nr { color: var(--gold); border-color: rgba(242, 193, 78, 0.45); font-variant-numeric: tabular-nums; }
.best-xi { margin: 0 0 28px; padding: 18px; border: 1px solid var(--hair); border-radius: var(--r-panel); background: var(--core); }
.bx-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-bottom: 14px; }
.bx-head h2 { margin: 0; font-size: 1.125rem; }
.bx-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.75rem; }
.bx-stats { display: flex; gap: 20px; margin: 0 0 0 auto; }
.bx-stats dt { color: var(--muted); font-size: 0.6875rem; font-weight: 700; }
.bx-stats dd { margin: 2px 0 0; font-size: 1.1875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.bx-stats dd small { color: var(--muted); font-size: 0.75rem; }
.best-xi .pitch { max-width: 720px; margin: 0 auto; }
.best-xi .btn-sm { text-decoration: none; }
@media (max-width: 640px) { .bx-stats { margin: 0; gap: 14px; } .best-xi { padding: 12px; } }
.empty p code { font-size: 0.75rem; }

/* ---------- temporary local refresh control (docs/engineering/SCHEDULES.md) ---------- */
.refresh-form { display: contents; }
.refresh-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: var(--r-pill); white-space: nowrap;
  border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.04); color: var(--muted); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer;
  transition: color 140ms var(--ease), border-color 140ms var(--ease);
}
.refresh-btn:hover { color: var(--text); border-color: var(--hair-strong); }
.refresh-btn.failed { color: var(--warn); border-color: rgba(255, 159, 67, 0.45); }
.refresh-btn.busy { cursor: default; color: var(--gold); }
.refresh-btn .spin { width: 12px; height: 12px; border-radius: var(--r-pill); border: 2px solid rgba(242, 193, 78, 0.3); border-top-color: var(--gold); animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sheet .refresh-btn { height: 48px; justify-content: center; }
@media (max-width: 1440px) { .island .refresh-btn .lbl { display: none; } .island .refresh-btn { width: 40px; justify-content: center; padding: 0; } }
@media (max-width: 1240px) { .nav-search { min-width: 120px; } }
@media (prefers-reduced-motion: reduce) { .refresh-btn .spin { animation: none; } }

/* Account controls in the island: Sign in (quiet) and Sign up (gold) when signed out, the avatar menu when signed in. */
.nav-auth {
  display: inline-flex; align-items: center; justify-content: center; flex: none; height: 40px; padding: 0 16px; border-radius: var(--r-pill); white-space: nowrap;
  border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.04); color: var(--text); font-size: 0.8125rem; font-weight: 600; text-decoration: none;
  transition: border-color 300ms var(--ease), filter 300ms var(--ease);
}
.nav-auth:hover { border-color: var(--hair-strong); }
.nav-auth-up { border-color: transparent; background: var(--gold-grad); color: #101722; }
.nav-auth-up:hover { filter: brightness(1.08); border-color: transparent; }
.nav-auth:focus-visible, .nav-avatar:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.sheet .nav-auth { height: 48px; flex: 1; }
.nav-user { flex: none; }
.nav-cr { display: inline-flex; align-items: center; gap: 2px; flex: none; height: 32px; padding: 0 10px 0 8px; border: 1px solid var(--hair-strong); border-radius: 999px; color: var(--text); font-size: 0.8125rem; text-decoration: none; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .nav-cr:hover { border-color: rgba(242, 193, 78, 0.45); } }
.nav-cr .cr-mark { margin-right: 2px; }
.nav-cr + .nav-user { margin-left: 8px; }
.nav-plan { margin-left: 8px; background: rgba(255, 255, 255, 0.08); color: var(--muted); vertical-align: 1px; }
.nav-avatar {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); cursor: pointer; list-style: none;
  background: var(--gold-grad); color: #101722; font-size: 0.9375rem; font-weight: 800; box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.25);
  transition: box-shadow 300ms var(--ease);
}
.nav-avatar::-webkit-details-marker { display: none; }
.nav-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.nav-avatar span { font-size: 0.875rem; letter-spacing: 0.02em; }
.nav-user[open] > .nav-avatar, .nav-avatar:hover { box-shadow: 0 0 0 3px rgba(242, 193, 78, 0.45); }
.nav-user-pop { right: 0; left: auto; top: calc(100% + 12px); min-width: 230px; padding: 8px; border-radius: var(--r-3xl); }
.nav-user-pop .opt, .nav-user-pop button.opt { width: 100%; color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; font-size: 0.8125rem; text-align: left; }
.nav-user-pop .opt:hover { background: rgba(255, 255, 255, 0.07); }
.nav-user-pop hr { margin: 6px 4px; border: 0; border-top: 1px solid var(--hair); }
.nav-user-head { padding: 8px 10px 10px; font-size: 0.875rem; font-weight: 700; border-bottom: 1px solid var(--hair); margin-bottom: 6px; overflow-wrap: anywhere; }
/* The bar must never push the PC / Console switch out of shape: it keeps its size and the search box gives way first. */
.plat-switch { flex: none; }
.nav-search { min-width: 96px; }
@media (max-width: 1440px) { .island .nav-auth:not(.nav-auth-up) { border-color: transparent; background: none; padding: 0 8px; } }
@media (max-width: 1240px) { .island .nav-auth:not(.nav-auth-up) { display: none; } }   /* the sign-up popup links to Sign in */

/* ---------- SBCs (plan §5): set grid, set detail, challenge solver ---------- */
.muted { color: var(--muted); font-size: 0.75rem; }
/* The app's tooltip: data-tip="..." on any control, shown on hover and keyboard focus. Replaces native title= tips. */
[data-tip].tip-hush::after { display: none !important; }  /* after a click that opened another tab: no tooltip left behind */
:where([data-tip]) { position: relative; }  /* zero specificity: a mark placed absolute keeps its place */
/* The box exists only while shown: an invisible tip at a page edge still widened the page (sideways scroll). */
[data-tip]:hover::after, [data-tip]:focus-visible::after, [data-tip]:focus-within::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 5px); z-index: 30; translate: -50% 0;
  padding: 4px 7px; border-radius: var(--r-sm); border: 1px solid var(--hair-strong); background: #12151C; color: var(--text);
  font-size: 0.6875rem; font-weight: 600; line-height: 1.2; white-space: nowrap; pointer-events: none;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.8); animation: tip-in 160ms var(--ease);
}
@keyframes tip-in { from { opacity: 0; translate: -50% 4px; } }
[data-tip][data-tip-pos="below"]::after { bottom: auto; top: calc(100% + 5px); }
a:focus-visible .cs-nr[data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 5px); z-index: 30; translate: -50% 0; padding: 4px 7px; border-radius: var(--r-sm); border: 1px solid var(--hair-strong); background: #12151C; color: var(--text); font-size: 0.6875rem; font-weight: 600; line-height: 1.2; white-space: nowrap; pointer-events: none; }  /* a card is one link: its keyboard focus shows the strip pill's tip too */
.card-strip .cs-nr[data-tip] { position: static; }  /* the tip centres on the strip, which is centred on the card */
.card-strip .cs-nr[data-tip]::after { white-space: normal; width: max-content; max-width: min(100cqw, 200px); text-align: center; font-weight: 500; }  /* wrapped to the card's own width: never past its edge, never over a neighbour */
@media (prefers-reduced-motion: reduce) { [data-tip]::after { animation: none; } }
.warn-text { color: var(--warn); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 5px 0 16px; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font: inherit; font-size: 0.8125rem; font-weight: 700;
  text-decoration: none; white-space: nowrap; transition: transform 140ms var(--ease), border-color 140ms var(--ease);
}
.btn .nub { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.08); transition: transform 400ms var(--ease); }
.btn:hover { border-color: rgba(242, 193, 78, 0.45); }
.btn:hover .nub { transform: translateX(2px) scale(1.05); }
.btn:active { transform: scale(0.98); }
.btn-gold { height: 48px; padding-left: 20px; border-color: transparent; background: var(--gold-grad); color: #1A1204; box-shadow: 0 10px 30px -12px rgba(242, 193, 78, 0.7); }
.btn-gold .nub { width: 38px; height: 38px; background: rgba(26, 18, 4, 0.12); }
.btn:disabled { cursor: progress; opacity: 0.75; }
.btn:not(:has(.nub)) { justify-content: center; padding: 0 20px; }   /* the 5px right edge is for the nub: a plain label centres */
/* Solve, the one filled action: hover and keyboard focus lift it and cross a light band over the face once (transform only). */
.btn-gold { position: relative; overflow: hidden; isolation: isolate; transition: transform 300ms var(--ease), box-shadow 300ms var(--ease); }
.btn-gold::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%); }
.btn-gold:not(:disabled):focus-visible { transform: translateY(-2px); border-color: transparent;
  box-shadow: 0 16px 40px -8px rgba(242, 193, 78, 0.95), 0 0 0 1px rgba(255, 231, 163, 0.45); }
.btn-gold:not(:disabled):focus-visible::before { transform: translateX(120%); transition: transform 700ms var(--ease); }
@media (hover: hover) and (pointer: fine) {  /* a phone keeps :hover after a tap, so the lift would stick */
  .btn-gold:not(:disabled):hover { transform: translateY(-2px); border-color: transparent;
    box-shadow: 0 16px 40px -8px rgba(242, 193, 78, 0.95), 0 0 0 1px rgba(255, 231, 163, 0.45); }
  .btn-gold:not(:disabled):hover::before { transform: translateX(120%); transition: transform 700ms var(--ease); }
}
.btn-gold:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .btn-gold:not(:disabled):hover, .btn-gold:not(:disabled):focus-visible, .challenges .btn:hover { transform: none; }
  .btn-gold::before { display: none; }
}
/* Clear: quiet secondary, no fill or border until hover */
.sbc-pitch-bar [data-act="clear"] { background: transparent; border-color: transparent; color: var(--muted); }
.sbc-pitch-bar [data-act="clear"]:hover { color: var(--text); border-color: var(--hair-strong); }

/* Page header: compact title, tools on the same line (owner review 2026-09-25: less hero, more function) */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 4px 0 14px; }
.page-h1 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; font-stretch: 115%; line-height: 1.12; letter-spacing: -0.01em; color: var(--text); }
.page-h1 .count { margin-left: 8px; color: var(--muted); font-size: 0.875rem; font-weight: 600; font-stretch: 100%; letter-spacing: 0; }
.page-chips { margin: 0 0 18px; }
.sbc-tools { display: flex; align-items: center; gap: 6px; }
.tool-search { position: relative; display: flex; align-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); color: var(--muted); transition: border-color 300ms var(--ease); overflow: hidden; }
.tool-search .glyph { position: absolute; left: 11px; }
.tool-search input { width: 100%; height: 100%; padding: 0 12px 0 36px; border: 0; background: none; color: var(--text); font-size: 0.8125rem; outline: none; opacity: 0; transition: opacity 250ms var(--ease); }
.tool-search:focus-within, .tool-search.has-value { width: 220px; border-color: var(--hair-strong); }
.tool-search:focus-within input, .tool-search.has-value input { opacity: 1; }
.tool-search:focus-within { outline: 2px solid var(--chalk); outline-offset: 2px; }
.tool-pop { position: relative; }
.tool-btn { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); color: var(--muted); cursor: pointer; list-style: none; }
.tool-btn::-webkit-details-marker { display: none; }
.tool-btn:hover, .tool-pop[open] .tool-btn { color: var(--text); border-color: var(--hair-strong); }
.tool-btn.is-on { color: var(--gold); border-color: rgba(242, 193, 78, 0.5); }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 8; display: grid; min-width: 200px; padding: 6px; border-radius: var(--r-2xl);
  border: 1px solid var(--hair-strong); background: #12151C; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
}
.tool-pop[open] > .menu-pop, .xf.open .xf-in { animation: reveal-down 180ms var(--ease); }  /* the panel is uncovered top to bottom under a clip */
@keyframes reveal-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@media (prefers-reduced-motion: reduce) { .tool-pop[open] > .menu-pop, .xf.open .xf-in { animation: none; } .star-btn .glyph, .done-ico { transition: none; } }
.pop-label { padding: 6px 10px 4px; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.01em; }
.opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; white-space: nowrap; border-radius: var(--r-md); font-size: 0.8125rem; cursor: pointer; }
.opt:hover { background: rgba(255, 255, 255, 0.06); }
.opt input { margin: 0; flex: none; accent-color: var(--gold); }  /* nowrap above: a wrapped label leaves its radio off the first line */
.sort-fields, .sort-way { display: grid; }
.sort-way { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--hair); }
@media (max-width: 720px) {  /* on a phone the list is a sheet at the foot of the screen: the button may sit at either edge */
  .sort-pop .menu-pop { position: fixed; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); top: auto; z-index: 60; min-width: 0; padding: 10px; box-shadow: 0 -12px 48px rgba(0, 0, 0, .7); }
  .sort-pop .opt { min-height: 44px; }
}

.glyph { width: 16px; height: 16px; flex: none; }
.is-icon { width: 16px; height: 16px; object-fit: contain; }
.is-icon.big { width: 40px; height: 40px; }
.fav-star { fill: currentColor; color: var(--gold); }

/* SBC cards: fixed rhythm so every card ends on the same line (title 2 lines, reward, description 2 lines, footer) */
.sbc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.sbc-cards.is-done { opacity: 0.72; }
.done-title { margin: 28px 0 12px; }
.sbc-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; height: 100%; min-width: 0; padding: 16px; border-radius: var(--r-core);
  border: 1px solid rgba(255, 255, 255, 0.07); background: var(--core);
  box-shadow: 0 0 0 5px var(--shell), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 500ms var(--ease), transform 500ms var(--ease);
}
.sbc-card { content-visibility: auto; contain-intrinsic-size: auto 260px; }
/* Evolution cards are taller (before/after art) and hold a requirements popover that hangs below the card, so a hovered or focused card paints in full. */
.evo-card { contain-intrinsic-size: auto 320px; }
.evo-card:hover, .evo-card:focus-within { content-visibility: visible; }
.sbc-card:hover { border-color: rgba(242, 193, 78, 0.3); transform: translateY(-2px); }
.sbc-card[data-done="true"] { border-color: rgba(63, 207, 142, 0.35); }
.card-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-top h2 { flex: 1; min-width: 0; margin: 0; font-size: 1rem; font-weight: 700; font-stretch: 108%; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; align-content: center; }
.stretch { color: inherit; text-decoration: none; }
/* The title's own ::after is clipped by its line-clamp (overflow hidden), so the card gets a cover link outside it. */
.evo-cover { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.evo-card .evo-ba { pointer-events: none; }   /* the arrow between the cards must not catch the click */
.evo-card .evo-chip, .evo-card .evo-choice, .evo-card .evo-rate { position: relative; z-index: 3; }   /* their tooltips still show over the cover */
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.stretch:focus-visible { outline: none; }
:is(.sbc-card, .sh-pass):has(.stretch:focus-visible) { outline: 2px solid var(--chalk); outline-offset: 4px; }  /* the card a stretched link opens shows the ring */
.set-icon, .set-thumb { flex: none; display: grid; place-items: center; width: 44px; height: 44px; }
.set-icon img, .set-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.set-emblem { display: grid; place-items: center; width: 100%; height: 100%; }
.shield-ico { width: 88%; height: 88%; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45)); }
.kind-ic { display: inline-grid; place-items: center; flex: none; color: var(--muted); }
.kind-ic .glyph { width: 16px; height: 16px; }
.sbc-art-none { color: rgba(242, 193, 78, 0.75); font-size: 0.8125rem; font-weight: 800; font-stretch: 125%; }
.sbc-card .sbc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.sbc-desc { margin: 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.45; }
.card-foot { display: grid; gap: 10px; margin-top: auto; }
.card-row { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; }
.card-progress { color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.card-row .done-toggle { margin-left: auto; }

.reward { display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 80px; }
.reward-art { flex: none; display: grid; place-items: center; width: 58px; height: 80px; }
.reward-art:not(.reward-card) img { max-height: 80px; width: auto; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5)); }
.reward-card .item-card { width: 58px; }
.reward-other { height: 58px; border-radius: var(--r-2xl); border: 1px solid rgba(242, 193, 78, 0.35); color: var(--gold); }
.reward-other .glyph { width: 24px; height: 24px; }
.reward-text { display: grid; gap: 3px; min-width: 0; }
.reward-label { display: flex; align-items: center; gap: 8px; color: var(--gold); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.reward-label .tag { letter-spacing: 0; text-transform: none; }
.reward-text b { font-size: 0.875rem; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reward-text small { color: var(--muted); font-size: 0.75rem; }
.reward-link { position: relative; z-index: 2; display: grid; color: inherit; text-decoration: none; border-radius: var(--r-md); }  /* above a tile's stretched link: the card opens the player, the rest opens the SBC */
.reward .cs-nr { display: inline-flex; align-items: center; justify-self: start; height: 1.9em; padding: 0 0.75em 0 0.65em !important; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
/* Layout B (owner, 2026-11-21): the reward panel of a challenge page, a large card with its facts on the right. Explicit card width: .item-card.layered sizes its type in cqw. */
.reward-m { align-items: flex-start; gap: 14px; }
.reward-m .reward-text { flex: 1; gap: 5px; align-content: start; }
.reward-m .reward-art { width: 116px; height: auto; }  /* list tile: the catalog card at a readable size; explicit width, .item-card.layered sizes its type in cqw */
.reward-m .reward-card .item-card { width: 116px; }
.reward-b { align-items: flex-start; gap: 18px; }
.reward-b .reward-art { width: 150px; height: auto; }
.reward-b .reward-card .item-card { width: 150px; }
.reward-b .reward-text { gap: 6px; flex: 1; align-content: start; }
.reward-b .reward-text b { font-size: 1.125rem; }
.reward-b .cs-nr { font-size: 0.9375rem; }
.reward-facts { display: grid; gap: 0; margin: 6px 0 0; }
.reward-facts > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--hair); font-size: 0.8125rem; }
.reward-facts dt { color: var(--muted); }
.reward-facts dd { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.reward-facts dd img, .reward-facts dd .glyph { width: 16px; height: 16px; }
.insights { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); }
.insights h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 0.9375rem; font-weight: 700; }
.insights .ic-chip { color: var(--muted); }
.insight-cells { display: grid; margin: 0; }
.insight-cells > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 0.8125rem; }
.insight-cells dt { color: var(--muted); }
.insight-cells dd { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.insight-cells .up { color: #3FCF8E; } .insight-cells .down { color: var(--warn); }

.stat-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; border: 1px solid var(--hair); border-radius: var(--r-xl); overflow: hidden; }
.stat-strip > div { display: grid; gap: 3px; padding: 8px 11px; min-width: 0; }
.stat-strip > div + div { border-left: 1px solid var(--hair); }
.stat-strip dt { color: var(--muted); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.stat-strip dd { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.8125rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-strip dd .glyph { color: var(--muted); }
.sbc-card.soon .stat-strip > div:first-child dd { color: var(--warn); }

/* Favourite star and done toggle: one tap, animated, no menus */
.star-toggle, .done-toggle { position: relative; z-index: 2; margin: 0; }
.star-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: none; color: var(--muted); cursor: pointer; transition: color 140ms var(--ease), border-color 140ms var(--ease); }
.star-btn:hover { color: var(--text); border-color: var(--hair-strong); }
.star-btn[aria-pressed="true"] { color: var(--gold); border-color: rgba(242, 193, 78, 0.5); }
.done-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); cursor: pointer; transition: color 140ms var(--ease); }
.done-btn { position: relative; }
.done-ico { grid-area: 1 / 1; width: 30px; height: 30px; overflow: visible; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; transition: opacity 200ms var(--ease), filter 200ms var(--ease); }
.done-ico circle, .done-ico path { vector-effect: non-scaling-stroke; }  /* 1.5px and 2px on screen at any zoom: no blur */
.done-disc { stroke-width: 1.5px; }
.done-tick { stroke-width: 2px; }
.done-ico.i-on { opacity: 0; filter: blur(2px); }  /* ring and filled tick crossfade, the outgoing one blurring away */
.done-btn[aria-pressed="true"] .i-on { opacity: 1; filter: none; }
.done-btn[aria-pressed="true"] .i-off { opacity: 0; filter: blur(2px); }
.done-btn:hover { color: var(--text); }
.done-btn[aria-pressed="true"] { color: var(--fresh); }
.i-on .done-disc { fill: var(--fresh); stroke: var(--fresh); }
.i-on .done-tick { stroke: #06120C; }
.pop { animation: pop 450ms var(--ease); }
@keyframes pop { 30% { transform: scale(0.9); } 65% { transform: scale(1.08); } }

/* Set page: one summary panel; reward and facts are equal-height cells */
.set-summary { display: grid; gap: 16px; padding: 18px; margin-bottom: 20px; border-radius: var(--r-core); border: 1px solid rgba(255, 255, 255, 0.07); background: var(--core); box-shadow: 0 0 0 5px var(--shell), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.set-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.set-id .set-thumb { width: 56px; height: 56px; }
.set-id .eyebrow { margin-bottom: 6px; }
.set-id .sbc-desc { margin-top: 4px; }
.summary-cells { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); border: 1px solid var(--hair); border-radius: var(--r-3xl); overflow: hidden; }
.summary-cells .cell { display: grid; align-content: center; gap: 4px; margin: 0; padding: 12px 14px; min-width: 0; }
.summary-cells .cell + .cell { border-left: 1px solid var(--hair); }
.summary-cells dt { color: var(--muted); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.summary-cells dd { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 0.875rem; font-weight: 700; min-width: 0; }
.summary-cells dd .glyph { color: var(--muted); }
.summary-cells .soon dd { color: var(--warn); }
.cell-reward .reward { min-height: 0; }

.challenges { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.challenge { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-panel); border: 1px solid var(--hair); background: var(--core); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.challenge[data-done="true"] { border-color: rgba(63, 207, 142, 0.4); }
.ch-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ch-top h3 { flex: 1; min-width: 0; margin: 0; font-size: 0.9375rem; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; align-content: center; }
.ch-badges { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.ch-badges .badge { width: 24px; height: 24px; object-fit: contain; }
.ch-badges .badge.flag { width: 26px; height: 18px; border-radius: 3px; object-fit: cover; }
.req-pop { position: relative; }
.req-pop summary { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: var(--r-lg); border: 1px solid var(--hair); color: #D6DBE0; font-size: 0.8125rem; font-weight: 600; cursor: pointer; list-style: none; }
.req-pop summary::-webkit-details-marker { display: none; }
.req-pop summary .glyph { color: var(--muted); }
.req-pop[open] summary, .req-pop summary:hover { border-color: var(--hair-strong); color: var(--text); }
.req-pop .target { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; color: var(--text); }
.req-body { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 7; padding: 10px; border-radius: var(--r-2xl); border: 1px solid var(--hair-strong); background: #12151C; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8); }
.req-body .rules { display: grid; }
.req-body::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }  /* bridges the gap so the pointer can cross it */
.ch-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }

.rules { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.rule { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: var(--r-lg); border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.025); font-size: 0.7812rem; color: #D6DBE0; }
.rule.ok::before { content: "\2713"; flex: none; color: var(--fresh); font-size: 0.75rem; font-weight: 800; line-height: 1; }
.rule.bad { border-color: rgba(255, 159, 67, 0.45); color: var(--text); }
.rule small { margin-left: auto; color: var(--warn); font-size: 0.6875rem; font-weight: 700; }
.rule small.muted { color: var(--muted); font-weight: 500; }
.rule .is-icon { width: 14px; height: 14px; }
.rule .badge { width: 18px; height: 18px; object-fit: contain; }
.rule .badge.flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; }

/* Challenge page */
.solve-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 20px; }
.solve-head > div { flex: 1; min-width: 0; }
.solve-head .set-thumb { width: 56px; height: 56px; }
.solve-head .ch-badges .badge.flag { width: 30px; height: 21px; }
.solve-head .title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }  /* crests centred on the title, before it */
.solve-head .eyebrow { margin-bottom: 6px; }
.solve-head .sbc-desc { margin-top: 4px; }
.solver { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.solver-main { display: grid; gap: 14px; min-width: 0; }
.solver-side { position: sticky; top: calc(104px + env(safe-area-inset-top)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.side-card { min-width: 0; padding: 16px; border-radius: var(--r-panel-s); border: 1px solid var(--hair); background: var(--core); }
.side-card .section-title { margin: 0 0 10px; }
.side-card .rules { display: grid; }
.solve-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.source { margin: 0; padding: 0; border: 0; min-width: 0; }
.source legend { margin-bottom: 8px; padding: 0; color: var(--muted); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.seg-radio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); }
.opt-seg { position: relative; display: grid; place-items: center; min-height: 28px; padding: 0 6px; border-radius: var(--r-pill); color: var(--muted); font-size: 0.8125rem; font-weight: 600; text-align: center; cursor: pointer; transition: background-color 150ms ease, color 150ms ease; }
.opt-seg input { position: absolute; opacity: 0; pointer-events: none; }
.opt-seg:has(input:checked) { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.opt-seg:has(input:focus-visible) { outline: 2px solid var(--chalk); outline-offset: 1px; }
.opt-seg.is-off { opacity: 0.4; cursor: not-allowed; }
/* Source toggle (ui.source_toggle): Market | Both | Club on every page. Its own accent, green, so it never reads as Solve (gold). */
.src-toggle { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.25rem), 1fr)); gap: 2px; padding: 3px; border-radius: var(--r-lg); border: 1px solid var(--src-line); background: var(--src-bg); }
.src-opt { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 8px; border-radius: 9px; color: var(--muted); font-size: 0.7812rem; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background-color 250ms var(--ease), color 250ms var(--ease); }
.src-opt input { position: absolute; opacity: 0; pointer-events: none; }
.src-opt:hover { color: var(--text); }
.src-opt:has(input:checked) { background: var(--src-on); color: var(--src-ink); box-shadow: inset 0 0 0 1px var(--src-line-on); }
.src-opt:has(input:focus-visible) { outline: 2px solid var(--chalk); outline-offset: 1px; }
.src-opt:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }
.src-ico { width: 15px; height: 17px; flex: none; fill: currentColor; transition: color 250ms var(--ease); }
.src-ico.is-both { width: 18px; }
.src-ico.is-both circle { fill-opacity: 0.62; }  /* overlapping rounds: the overlap reads denser */
.src-ico .in { fill: var(--core); }
.budget { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--hair-strong); background: var(--core); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); }
.budget input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); caret-color: var(--gold); font: inherit; font-size: 0.8125rem; font-weight: 700; outline: none; }
.budget:focus-within { border-color: var(--hair-strong); outline: 2px solid var(--chalk); outline-offset: 2px; }
.solve-form .btn-gold { justify-self: stretch; justify-content: space-between; }
.formation-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.formation-pick select { min-height: 42px; padding: 0 12px; border: 1px solid var(--gold); border-radius: var(--r-lg); background: var(--core); color: var(--text); font: inherit; font-weight: 700; }
.swapped { display: grid; gap: 6px; color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.swapped ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.swapped li { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 2px 0 10px; border: 1px solid rgba(255, 159, 67, .45); border-radius: var(--r-pill); background: rgba(255, 159, 67, .08); color: var(--text); font-size: 0.7812rem; }
.swapped a { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--muted); font-size: 1rem; text-decoration: none; }
.swapped a:hover, .swapped a:focus-visible { background: rgba(255, 255, 255, .1); color: var(--text); }
.adjust { border: 1px solid var(--hair); border-radius: var(--r-xl); }
.adjust summary { padding: 10px 12px; cursor: pointer; font-size: 0.8125rem; font-weight: 700; }
.adjust summary small { display: block; color: var(--muted); font-weight: 500; }
.adjust ul { display: grid; gap: 2px; margin: 0; padding: 0 8px 8px; list-style: none; }
.adjust li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: 34px; font-size: 0.75rem; }
.adj-pos { color: var(--gold); font-weight: 800; font-size: 0.6875rem; }
.adj-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adj-name small { color: var(--muted); }
.adj-seg { display: inline-flex; padding: 2px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); }
.adj-seg label { position: relative; padding: 4px 8px; border-radius: var(--r-pill); color: var(--muted); font-size: 0.6875rem; font-weight: 700; cursor: pointer; }
.adj-seg input { position: absolute; opacity: 0; pointer-events: none; }
.adj-seg label:has(input:checked) { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.adj-seg label:has(input[value^="keep"]:checked) { color: var(--fresh); }
.adj-seg label:has(input[value^="out"]:checked) { color: var(--warn); }
.adj-seg label:has(input:focus-visible) { outline: 2px solid var(--chalk); outline-offset: 1px; }
.solve-note { padding: 14px 16px; border-radius: var(--r-2xl); border: 1px solid var(--hair); background: var(--core); font-size: 0.8125rem; display: grid; gap: 10px; justify-items: start; }
.solve-note.warn { border-color: rgba(255, 159, 67, 0.45); background: rgba(255, 159, 67, 0.06); }
.solve-note a { color: var(--text); }
.solve-why { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); }
.inline-solve { margin: 0; }
.solve-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.solve-status b { font-size: 0.9375rem; }
.solve-status.good b { color: var(--fresh); }
.solve-status.warn b { color: var(--warn); }
.solve-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0; }
.solve-facts dt { color: var(--muted); font-size: 0.6875rem; }
.solve-facts dd { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 1rem; font-weight: 800; }
.submit-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.squad-stage { position: relative; }
.squad-core { padding: 16px; }
.solving-veil { position: absolute; inset: 6px; z-index: 5; display: none; place-items: center; align-content: center; gap: 12px; border-radius: var(--r-core); background: rgba(6, 7, 10, 0.72); color: var(--text); font-weight: 700; backdrop-filter: blur(3px); }
.squad-stage.solving .solving-veil { display: grid; }
/* The one loader (ui.loader): a gold sweep with a fading tail, the comet of the mark. Used by SBC solve, the loader
   page, Squad Builder's list and slow page changes. */
.spinner { width: 40px; height: 40px; flex: none; border-radius: var(--r-pill);
  background: conic-gradient(from 90deg, rgba(242, 193, 78, 0) 0turn, rgba(242, 193, 78, 0.18) 0.35turn, var(--gold) 0.9turn, rgba(242, 193, 78, 0) 0.9turn);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  animation: spin 850ms linear infinite; }
.loader { display: grid; justify-items: center; align-content: center; gap: 14px; min-height: 180px; padding: 32px 16px;
  color: var(--muted); font-size: 0.875rem; font-weight: 600; text-align: center; }
.loading-page .loader { min-height: min(60vh, 520px); }
.pc-grid .loader-row { grid-column: 1 / -1; }
.pc-grid .loader { min-height: 240px; }
/* A slow page change: the sweep on a dark disc in the middle of the screen, over whatever is there. */
html.nav-wait body::before { content: ""; position: fixed; z-index: 59; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px;
  border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: rgba(12, 14, 19, 0.94); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55); }
html.nav-wait body::after { content: ""; position: fixed; z-index: 60; left: 50%; top: 50%;
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: var(--r-pill);
  background: conic-gradient(from 90deg, rgba(242, 193, 78, 0) 0turn, rgba(242, 193, 78, 0.18) 0.35turn, var(--gold) 0.9turn, rgba(242, 193, 78, 0) 0.9turn);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  animation: spin 850ms linear infinite; }
.stage-empty { display: grid; justify-items: center; gap: 12px; padding: 48px 16px; color: var(--muted); text-align: center; }
/* Item-score challenge (sbc_ui.item_picker / sign_in_prompt): pick club cards against the target, or sign in here. */
.is-pick { display: grid; gap: 14px; }
.is-total { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.is-sum, .is-n { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.875rem; font-weight: 700; }
.is-sum b, .is-n b { color: var(--text); font-size: 1.125rem; font-weight: 800; font-stretch: 110%; font-variant-numeric: tabular-nums; }
.is-pick.is-met .is-sum b { color: var(--fresh); }
.is-add { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.is-add .glyph { width: 16px; height: 16px; }
.is-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; max-height: 560px; overflow-y: auto; }
.is-card { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 6px 4px; border: 1px solid transparent; border-radius: var(--r-xl); background: none; color: var(--muted); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: border-color 250ms var(--ease), background-color 250ms var(--ease); }
.is-card .item-card { width: 100%; max-width: 96px; }
.is-card small { display: inline-flex; align-items: center; gap: 4px; }
.is-card:hover { border-color: var(--hair-strong); }
.is-card:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.is-card[aria-pressed="true"] { border-color: var(--fresh); background: rgba(63, 207, 142, 0.08); color: var(--text); }
.is-card:disabled { opacity: 0.4; cursor: not-allowed; }
.is-card > b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 0.75rem; }
.is-cost { display: inline-flex; }
.is-hits { max-height: 340px; }
.is-hits[hidden] { display: none; }
.is-none { margin: 0; color: var(--muted); }
.is-more { justify-self: center; }
.src-row { display: flex; align-items: center; gap: 10px; }
.src-row .src-toggle { flex: 1; min-width: 0; }
.src-signin { flex: none; color: var(--gold); font-size: 0.8125rem; font-weight: 700; text-decoration: none; }
.src-signin:hover { text-decoration: underline; }
.src-lock { width: 14px; height: 14px; }
.req-row { justify-content: space-between; }
.req-row b { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-variant-numeric: tabular-nums; }
.is-rows { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.is-rows[hidden] { display: none; }
.is-hit, .is-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 1px solid var(--hair); border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.025); color: var(--text); font: inherit; font-size: 0.875rem; text-align: left; cursor: pointer; }
.is-hit > span, .is-row > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.is-hit small, .is-row small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.is-hit:hover, .is-row:hover { border-color: var(--hair-strong); }
.is-hit:disabled { opacity: 0.4; cursor: not-allowed; }
.is-row { border-color: var(--fresh); background: rgba(63, 207, 142, 0.08); }
.is-market [hidden] { display: none; }
@media (max-width: 960px) {
  .solver.is-item .solver-side { order: -1; }  /* item score: the requirements and Solve come before the solution area */
}

/* Pitch (squad_ui): slots sit at EA's formation coordinates; label and chemistry under each card */
.pitch { position: relative; aspect-ratio: 100 / 112; border-radius: var(--r-panel-s); overflow: hidden;
  background: radial-gradient(80% 60% at 50% 45%, rgba(63, 207, 142, 0.08), transparent 75%), linear-gradient(180deg, #0A1310, #070B0A); }
.pitch-lines { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 0.35; vector-effect: non-scaling-stroke; }
.pitch-lines .dot { fill: rgba(255, 255, 255, 0.18); }
.formation-tag { position: absolute; top: 10px; left: 12px; z-index: 2; padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: rgba(6, 7, 10, 0.6); color: var(--text); font-size: 0.7188rem; font-weight: 700; }
/* x is squeezed into 5-95% so wide formations keep their full-backs and wingers off the touchline */
.pitch-slot:hover, .pitch-slot:focus-within { z-index: 40; }  /* its tooltip must paint over the cards and pills drawn after it */
.pitch-slot { position: absolute; z-index: 1; left: calc(5% + var(--x) * 0.9%); top: calc(var(--y) * 1%); width: 14%; transform: translate(-50%, -50%); }
.squad-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 14px; padding: 10px 0; }
.squad-row .slot { width: 140px; }
.slot { display: grid; justify-items: center; min-width: 0; }
.slot .item-card { width: 100%; }
.slot > .pill { position: relative; z-index: 2; margin-bottom: -8px; }  /* price sits on the card top */
/* Squad Builder: the price sits on the card's crest, inside the card, so it takes no height and can't reach the row above */
.slot-art > .pill { position: absolute; top: 3%; left: 50%; z-index: 5; transform: translateX(-50%); margin: 0; }
.slot-foot { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2px 7px; border-radius: var(--r-pill); background: rgba(6, 7, 10, 0.72); }
.slot-pos { color: var(--text); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.slot-pos em { margin-left: 2px; color: var(--warn); font-style: normal; }
.slot.is-off .slot-pos { color: var(--warn); }
/* Chemistry mark (squad_ui.CHEM_DIAMONDS / squad.js DIAM): three diamonds, green when earned, never gold. */
.pips { display: inline-flex; }
/* Hovering a search card: every slot whose chemistry would change shows its new diamonds and the change. */
.slot-foot[data-shift]::after { content: attr(data-shift); font-size: 11px; font-weight: 800; color: var(--chem-gain); }
.slot-foot[data-shift^="\2212"]::after { color: var(--warn); }
.chem-ico { display: block; width: 19px; height: 14px; flex: none; }
.chem-ico path { fill: rgba(255, 255, 255, 0.16); }
.chem-ico path.on { fill: var(--chem); }
.chem-ico path.gain { fill: var(--chem-gain); }

.slot-nr { color: var(--gold); font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pc-nr b { align-self: center; margin-left: 2px; padding: 1px 4px; border-radius: 5px; font-size: 0.5625rem; line-height: 1.2; }
/* CometRating grade chip: tint + ink from the --nr-* ladder; S is the solid gold plate with dark ink. */
.tier { background: color-mix(in srgb, var(--tc) 18%, transparent); color: var(--tc); --tc: var(--muted); }
.tier[data-tier="S"] { --tc: var(--bg); background: var(--gold-grad); }
.tier[data-tier="A+"] { --tc: var(--nr-ap); }
.tier[data-tier="A"] { --tc: var(--nr-a); }
.tier[data-tier="B+"] { --tc: var(--nr-bp); }
.tier[data-tier="B"] { --tc: var(--nr-b); }
.tier[data-tier="C"] { --tc: var(--nr-c); }
.tc-nr { margin-left: auto; padding-left: 8px; color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.pitch .pill { height: 22px; font-size: 11px; gap: 3px; padding: 0 6px 0 3px; }
.pitch .pill .coin { width: 14px; height: 14px; }
.pill.club { padding: 0 11px; border-color: rgba(63, 207, 142, 0.45); color: var(--fresh); font-weight: 700; }
.pitch .pill.club { padding: 0 6px; }
.club-wrap { display: grid; justify-items: center; gap: 3px; }
.club-wrap .pill { margin-top: -10px; position: relative; }
.tag.done { color: var(--fresh); border-color: rgba(63, 207, 142, 0.45); }
.link-btn { padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 0.8125rem; text-decoration: underline; cursor: pointer; }

/* Streamlined items: one card per definition with ×count */
.item-groups { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 14px; list-style: none; margin: 0; padding: 4px 0; }
.item-group { display: grid; justify-items: center; gap: 4px; width: 118px; }
.item-group-card { position: relative; width: 100%; }
.item-group-card .item-card { width: 100%; }
.times { position: absolute; top: 4px; right: -6px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--gold-grad); color: #1A1204; font-size: 0.75rem; font-weight: 800; }
.item-group small { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.7188rem; }
.item-group .pill { margin-top: -10px; position: relative; }

@media (max-width: 1100px) {
  .summary-cells { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-cells .cell-reward { grid-column: 1 / -1; border-bottom: 1px solid var(--hair); }
  .summary-cells .cell-reward + .cell { border-left: 0; }
}
@media (max-width: 960px) {
  .solver { grid-template-columns: minmax(0, 1fr); }   /* never wider than the screen, even with large text */
  .solver-side { position: static; }
}
@media (max-width: 640px) {
  .page-head { flex-wrap: wrap; }
  .tool-search:focus-within, .tool-search.has-value { width: 170px; }
  .sbc-cards, .challenges { grid-template-columns: 1fr; }
  .summary-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-cells .cell:nth-child(4) { border-left: 0; }
  .summary-cells .cell:nth-child(n+4) { border-top: 1px solid var(--hair); }
  .solve-head { flex-wrap: wrap; }
  .solve-head > div { flex: 1 1 calc(100% - 70px); } /* the title keeps the row; Mark done goes under it */
  .solve-head > :last-child { margin-left: 70px; }
  .squad-core { padding: 8px; }
  .pitch { aspect-ratio: 100 / 128; }
  .pitch-slot { width: 17%; }
  .pitch .pill { height: 17px; font-size: 9px; padding: 0 4px 0 2px; }
  .pitch .pill .coin { width: 11px; height: 11px; }
  .slot-foot { gap: 3px; padding: 1px 4px; }
  .slot-pos, .slot-nr { font-size: 9px; }
  .pips i { width: 4px; height: 4px; }
  .squad-row .slot { width: 110px; }
  .item-group { width: 96px; }
  .btn { height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .sbc-card:hover { transform: none; }
  .pop { animation: none; }
  .spinner, html.nav-wait body::after { animation: none; }
}

/* ---------- Squad Builder (squad_pages + squad.js): summary | pitch | rail ---------- */
.main:has(.sq) { width: min(1520px, 100%); }
.sq [hidden] { display: none !important; }
.sq { display: grid; grid-template-columns: 268px minmax(0, 1fr) 372px; grid-template-areas: "bar bar bar" "sum stage rail"; gap: 18px; align-items: start; }
.sq-bar { grid-area: bar; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sq-title { margin: 0 8px 0 0; font-size: 1.375rem; font-weight: 800; font-stretch: 125%; }
.formation-pick select, .sq-find select { height: 36px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font: inherit; font-size: 0.8125rem; font-weight: 700; }
.sq-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm, .icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font: inherit; font-size: 0.8125rem; font-weight: 700; cursor: pointer; transition: transform 140ms var(--ease), border-color 140ms var(--ease); }
.icon-btn { width: 36px; padding: 0; font-size: 1rem; flex: none; }
.btn-sm:hover, .icon-btn:hover:not(:disabled) { border-color: rgba(242, 193, 78, 0.45); }
.btn-sm:active, .icon-btn:active { transform: scale(0.97); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.btn-sm.btn-gold { height: 36px; padding: 0 16px; border-color: transparent; background: var(--gold-grad); color: #1A1204; } /* .btn-sm comes later and would grey it out */
.sq-summary, .sq-rail { position: sticky; top: calc(96px + env(safe-area-inset-top)); display: grid; gap: 14px; padding: 16px; border-radius: var(--r-panel); border: 1px solid var(--hair); background: var(--core); }
.sq-summary { grid-area: sum; max-height: calc(100vh - 116px - env(safe-area-inset-top)); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
.sq-summary { grid-area: sum; max-height: calc(100dvh - 116px - env(safe-area-inset-top)); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; }
.sq-rail { grid-area: rail; max-height: calc(100vh - 116px - env(safe-area-inset-top)); padding: 14px; }
.sq-rail { grid-area: rail; max-height: calc(100dvh - 116px - env(safe-area-inset-top)); padding: 14px; }
.rail-pane { display: grid; gap: 12px; min-height: 0; max-height: calc(100vh - 146px - env(safe-area-inset-top)); grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; }
.rail-pane { display: grid; gap: 12px; min-height: 0; max-height: calc(100dvh - 146px - env(safe-area-inset-top)); grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; }
/* seg, club note, search, filters panel, chips, grid, More: the grid is the one row that shrinks */
.rail-pane[data-pane="players"] { grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto; }
.rail-pane[data-pane="manager"] { grid-template-rows: auto auto auto auto minmax(0, 1fr); }
.sq-stage { grid-area: stage; display: grid; gap: 14px; min-width: 0; }
.sq-label { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.01em; }
.sq-label small { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 0.7812rem; color: color-mix(in srgb, var(--text) 72%, var(--muted)); }
.sq-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.sq-stats dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.6875rem; font-weight: 700; }
.sq-stats dt .chem-ico { width: 15px; height: 11px; flex: none; }
.sq-stats dt .stat-ico { width: 12px; height: 12px; }
.sq-stats dd { display: flex; align-items: baseline; gap: 2px; margin: 2px 0 0; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sq-stats dd small { color: var(--muted); font-size: 0.8125rem; }
.sq-stats dd .coin { width: 18px; height: 18px; align-self: center; margin-right: 3px; }
.bdg { width: 16px; height: 16px; object-fit: contain; flex: none; }
.sq-explain ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 0.7812rem; }
.sq-explain small { color: var(--muted); }
/* Chemistry: one chip per club / nation / league that gives points; hover or focus lists the players */
.chem-groups { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; }
.cg { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 8px 0 6px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--raise); cursor: default; }
.cg .bdg { width: 18px; height: 18px; }
.cg:hover, .cg:focus-visible { border-color: var(--hair-strong); }
.cg:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
/* The tip hangs from the whole list (.cg is static), so it is as wide as the panel and never adds a sideways scroll. */
.cg-tip { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; z-index: 30; display: grid; gap: 3px; padding: 10px 12px; border-radius: var(--r-lg); border: 1px solid var(--hair-strong); background: var(--raise); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8); font-size: 0.7812rem; overflow-wrap: anywhere; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 160ms; }
.cg-tip b { margin-bottom: 3px; font-size: 0.75rem; }
.cg-tip small { color: var(--muted); }
.cg:hover .cg-tip, .cg:focus-visible .cg-tip { opacity: 1; visibility: visible; transform: none; }
.chem-groups .muted { font-size: 12.5px; }
/* Manager: a row in the summary, off the pitch */
.mgr-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px 6px 6px; border-radius: var(--r-xl); border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background-color 140ms var(--ease); }  /* a hairline-divided row in the summary, not its own box */
.mgr-row:hover, .mgr-row.is-selected { background: rgba(255, 255, 255, 0.06); }
.mgr-face { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: var(--r-md); background: var(--core); object-fit: cover; color: var(--muted); font-size: 1.125rem; }
.mgr-row.is-empty .mgr-face { border: 1px dashed var(--hair-strong); background: none; }
/* No manager yet: only the "+" is gold and dotted, so it still reads as "add one"; the row stays plain. */
.mgr-row.is-empty .mgr-face { border: 1px dotted rgba(242, 193, 78, 0.8); color: var(--gold); }
.mgr-txt { display: grid; flex: 1; min-width: 0; }
.mgr-txt small { color: var(--muted); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mgr-txt b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.8125rem; }
.mgr-row.is-empty .mgr-txt b { color: var(--muted); font-weight: 600; }
.mgr-row .mgr-bdg { display: flex; gap: 4px; }
.mgr-row .mgr-bdg .bdg { width: 18px; height: 18px; }
.sq-summary > .mgr-row { padding-top: 10px; border-top: 1px solid var(--hair); border-radius: 0; margin-top: -2px; }
.sq-explain { padding-top: 12px; border-top: 1px solid var(--hair); font-size: 0.7812rem; }
.sq-explain li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; }
.sq-explain li span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sq-explain li small { grid-column: 2 / -1; margin-top: -4px; }
.sq-explain p { margin: 0 0 8px; }

/* Pitch slots: the card is the thing you hold. Empty slots are card outlines, not boxes. */
.pitch-wrap { position: relative; }
.sq .formation-tag { left: auto; right: 12px; }
.sq .pitch { aspect-ratio: 100 / 120; }
.sq .pitch-slot { width: 15.5%; }
.sq .slot { cursor: grab; border-radius: var(--r-lg); outline-offset: 4px; }
.sq .slot:not(.is-empty) { touch-action: none; }
.sq .slot:focus-visible { outline: 2px solid var(--chalk); }
.sq .slot .item-card { transition: transform 300ms var(--ease), filter 300ms var(--ease); }
.sq .slot:hover .item-card { transform: translateY(-3px) scale(1.03); }
.sq .slot.is-selected .item-card, .sq .slot.is-selected .slot-blank { filter: drop-shadow(0 8px 18px rgba(242, 193, 78, 0.45)); }  /* a glow, no outline traced round the card */
.sq .slot.is-lifted .item-card, .sq .pc.is-lifted .item-card { opacity: 0.18; transform: none; }
.sq .slot.drop-target .item-card, .sq .slot.drop-target .slot-blank { filter: drop-shadow(0 0 2px var(--fresh)) drop-shadow(0 10px 22px rgba(63, 207, 142, 0.45)); transform: scale(1.06); }
.slot-blank { position: relative; width: 100%; aspect-ratio: var(--card-ratio); border: 0; border-radius: 0; background: none; }
.sq .slot-blank { width: 76%; margin-block: 6%; }  /* smaller than a card, so a placed card fills past the outline */
.slot-blank::before { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.07); -webkit-mask: url(/assets/card-shell.svg) center / contain no-repeat; mask: url(/assets/card-shell.svg) center / contain no-repeat; transition: background-color 300ms var(--ease); }
.sq .slot-blank::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.4); font-size: clamp(16px, 2.2vw, 28px); font-weight: 300; }
.sq .slot:hover .slot-blank::before, .sq .slot.is-selected .slot-blank::before { background: rgba(242, 193, 78, 0.16); }
.sq .slot.drop-target .slot-blank::before { background: rgba(63, 207, 142, 0.22); }
.sq.is-dragging, .sq.is-dragging * { cursor: grabbing !important; user-select: none; }
.sq-ghost { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; will-change: transform; filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.6)); transform-origin: 30% 20%; }
.sq-ghost .item-card { width: 100%; transform: scale(1.06); }
.sq-ghost.gone { opacity: 0; transition: opacity 180ms; }

/* Holographic cards (holographic, and pristine = holographic + autograph), the way the game shows them:
   1. an iridescent rim that hugs the card's own outline (.holo-glow: a conic rainbow masked by the card art, blurred);
   2. a soft pink-violet halo behind the card (drop-shadow on the art, so it follows the shape, not an oval);
   3. every 11 s, a marbled oil-slick liquid floods the card from top-left to bottom-right (~2 s) and clears.
   The liquid is our own texture (static/holo-liquid.svg) masked by the card art AND a travelling feathered band.
   One clock for every holo card on the page: ui._SCRIPT pins each run to startTime 0. --art = the card image URL. */
.item-card.holo { isolation: isolate; container-type: inline-size; }
.item-card.holo > img:not(.ly-cut), .item-card.layered.holo > .ly-frame { filter: drop-shadow(0 0 5cqw rgba(232, 121, 249, 0.42)); }
.holo-glow { position: absolute; inset: -1.6%; z-index: -1; pointer-events: none; filter: blur(1.6cqw); opacity: 0.95; }
.holo-glow i { position: absolute; inset: 0; background: conic-gradient(from 200deg, #e879f9, #8b5cf6, #5eead4, #a78bfa, #f0abfc, #fcd34d, #e879f9);
  -webkit-mask: var(--art) center / contain no-repeat; mask: var(--art) center / contain no-repeat; }
.item-card.holo.pristine .holo-glow i { background: conic-gradient(from 200deg, #f0abfc, #c084fc, #fcd34d, #99f6e4, #e9d5ff, #fde68a, #f0abfc); }
.item-card.holo::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: url(/assets/holo-liquid.svg) 0 0 / 130% 130%;
  -webkit-mask: var(--art) center / contain no-repeat, linear-gradient(135deg, transparent 44.5%, #000 48%, #000 51%, transparent 54.5%) 82% 82% / 300% 300% no-repeat;
  -webkit-mask-composite: source-in; mask: var(--art) center / contain no-repeat, linear-gradient(135deg, transparent 44.5%, #000 48%, #000 51%, transparent 54.5%) 82% 82% / 300% 300% no-repeat;
  mask-composite: intersect; animation: holo-shine 11s linear infinite; }
@keyframes holo-shine {
  0%, 65% { opacity: 0; background-position: 0 0; -webkit-mask-position: center, 82% 82%; mask-position: center, 82% 82%; }
  67% { opacity: var(--holo-a, 0.95); }
  84% { opacity: var(--holo-a, 0.95); }
  87%, 100% { opacity: 0; background-position: 18% 22%; -webkit-mask-position: center, 18% 18%; mask-position: center, 18% 18%; }
}
.item-card.holo:not(.layered) { --holo-a: 0.7; }  /* rendered composites have the player baked in: a lighter pass over the face */
@media (prefers-reduced-motion: reduce) { .item-card.holo::after { animation: none; } }
/* no glow or shine until the card itself is there: a loading card is only the quiet silhouette */
html.js .item-card:is(:has(> img.aw), .layered:not(.ly-broken):not(:has(> .ly-frame.in))) > .holo-glow,
html.js .item-card.holo:is(:has(> img.aw), .layered:not(.ly-broken):not(:has(> .ly-frame.in)))::after { visibility: hidden; }

/* Card art on the pitch: the owned mark and the hover strip of actions ride on it */
.slot-art { position: relative; width: 100%; }
/* "In your club": sits where a price would (on the card top), so every card shows one or the other */
.slot-acts { position: absolute; top: 14%; right: -12px; z-index: 4; display: grid; gap: 4px; opacity: 0; transform: translateX(-4px); pointer-events: none; transition: opacity 180ms var(--ease), transform 180ms var(--ease); }
.slot-acts > * { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: rgba(10, 12, 17, 0.92); color: var(--text); cursor: pointer; }
.slot-acts svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.slot-acts > *:hover, .slot-acts > *:focus-visible { border-color: var(--gold); color: var(--gold); }
.slot-acts > *:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.slot-acts [data-sa="remove"]:hover { border-color: var(--warn); color: var(--warn); }
.slot-acts [aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.sq .slot:hover .slot-acts, .sq .slot:focus-within .slot-acts, .sq .slot.is-selected .slot-acts { opacity: 1; transform: none; pointer-events: auto; }
.sq.is-dragging .slot-acts { display: none; }
/* The position label is the role button */
.slot-foot .slot-pos { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--text); cursor: pointer; }
.slot-foot.is-tight .slot-pos small { display: none; }  /* squeezed between two cards: position and chemistry only (squad.js spread) */
.slot-pos small { padding-left: 5px; border-left: 1px solid var(--hair-strong); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.slot-focus { font-weight: 600; }
.slot-pos small i { margin-left: 3px; color: var(--fresh); font-style: normal; }
button.slot-pos:hover small, button.slot-pos:focus-visible small { color: var(--gold); }
button.slot-pos:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; border-radius: 4px; }
.role-pop { position: absolute; z-index: 40; width: 290px; max-height: 340px; overflow-y: auto; overscroll-behavior: contain; padding: 10px; border-radius: var(--r-2xl); border: 1px solid var(--hair-strong); background: var(--raise); box-shadow: 0 22px 48px -18px rgba(0, 0, 0, 0.85); }
.role-pop .sq-label { flex-wrap: wrap; margin-bottom: 8px; color: var(--text); }
.role-pop .sq-label small { flex-basis: 100%; color: var(--muted); }
.role-pop ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.role-pop button { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 6px 10px; border: 1px solid transparent; border-radius: var(--r-md); background: none; color: var(--text); font: inherit; font-size: 0.8125rem; text-align: left; cursor: pointer; }
.rp-name span { color: var(--muted); font-size: 0.75rem; }
.role-pop .tc-nr { margin: 0; padding: 0; }
.role-pop button:hover, .role-pop button:focus-visible { background: var(--core); border-color: var(--hair-strong); }
.role-pop button:focus-visible { outline: 2px solid var(--chalk); outline-offset: -2px; }
.role-pop button[aria-pressed="true"] { border-color: var(--gold); }

/* Bench: the same card slots, smaller, no chemistry */
.sq-bench .bench-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; padding: 14px 0 10px; border-top: 1px solid var(--hair); }
.sq-bench .slot { width: min(100%, 96px); justify-self: center; }

/* Rail: player search as real cards */
.sq-rail .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sq-rail .seg button { height: 32px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: inherit; font-size: 0.7812rem; font-weight: 700; cursor: pointer; }
.sq-rail .seg button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.rail-pane[data-pane="manager"] .seg { grid-template-columns: 1fr 1fr; }
.sq-rail .fine { margin: 0; }
.sq-find { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
/* "More filters": an icon button (count badge when active) opening a panel that slides open under the search row. */
.xf-btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--muted); cursor: pointer; transition: color 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease); }
.xf-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.xf-btn:hover, .xf-btn[aria-expanded="true"] { color: var(--text); border-color: var(--gold); }
.xf-btn b { position: absolute; top: -3px; right: -3px; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-pill); background: var(--gold); color: #06070A; font-size: 0.625rem; font-weight: 800; animation: pop-in 220ms var(--ease); }
@keyframes pop-in { from { transform: scale(0.4); opacity: 0; } }
.xf { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 320ms var(--ease), opacity 240ms var(--ease); }
.xf.open { grid-template-rows: 1fr; opacity: 1; margin-block: 2px 4px; }
.xf-in { overflow: hidden; display: grid; gap: 12px; min-height: 0; padding: 0 2px; }
.xf.open .xf-in { padding: 14px; border-radius: var(--r-3xl); border: 1px solid var(--hair); background: var(--core); }
.xf:not(.open) .xf-in { visibility: hidden; transition: visibility 0s 320ms; }
/* The filter sheet: a title with Clear all, a two-column grid of compact controls, then the PlayStyle dropdown. */
.xf-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xf-head b { font-size: 0.875rem; }
.xf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.xf-row { display: grid; gap: 6px; align-content: start; min-width: 0; }
.xf-wide { grid-column: 1 / -1; }
.xf-l { color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.xf-l small { margin-left: 4px; font-weight: 600; opacity: 0.7; }
.xf-switch { cursor: pointer; }  /* the one switch (filter_panel.switch); .is-row is the full-width panel row */
.xf-sw { position: relative; display: inline-flex; align-items: center; min-height: 30px; }
.xf-switch input { position: absolute; opacity: 0; pointer-events: none; }
.xf-switch i { position: relative; flex: none; width: 36px; height: 20px; border-radius: var(--r-pill); background: var(--shell); border: 1px solid var(--hair-strong); transition: background 200ms var(--ease), border-color 200ms var(--ease); }
.xf-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform 320ms var(--spring), background 200ms var(--ease); }
.xf-switch input:checked + i { background: rgba(242, 193, 78, .22); border-color: var(--gold); }
.xf-switch input:checked + i::after { transform: translateX(16px); background: var(--gold); }
.xf-switch input:focus-visible + i { outline: 2px solid var(--chalk); outline-offset: 2px; }
.xf-switch.is-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: var(--r-lg); background: var(--raise); font-size: 0.8438rem; font-weight: 600; }
.xf-foot { display: inline-flex; padding: 2px; border-radius: var(--r-pill); background: var(--raise); }
.xf-foot button { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 10px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: background 200ms var(--ease), color 200ms var(--ease); }
.xf-foot button[aria-pressed="true"] { background: var(--gold); color: #06070A; }
.xf-foot svg { width: 13px; height: 13px; fill: currentColor; }
.xf-foot .flip svg { transform: scaleX(-1); }
.xf-stars { display: inline-flex; gap: 2px; }
.xf-stars button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; background: none; color: rgba(255, 255, 255, 0.4); cursor: pointer; transition: color 160ms var(--ease), transform 160ms var(--ease); }
.xf-stars button svg { width: 17px; height: 17px; fill: currentColor; }
.xf-stars button[aria-pressed="true"] { color: var(--gold); }
.xf-stars:hover button { color: rgba(242, 193, 78, 0.55); }
.xf-stars button:hover ~ button { color: rgba(255, 255, 255, 0.4); }
.xf-stars button:hover { transform: scale(1.15); }
.xf-range { display: inline-flex; align-items: center; gap: 6px; }
.xf-range { display: flex; }
.xf-range input { flex: 1; min-width: 0; width: auto; height: 30px; padding: 0 8px; border-radius: var(--r-md); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font: inherit; font-size: 0.8125rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.xf-range input:focus { outline: none; border-color: var(--gold); }
.xf-range i { width: 8px; height: 2px; border-radius: 1px; background: var(--hair-strong); }
.xf-ps-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 36px; padding: 0 12px; border-radius: var(--r-lg); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font: inherit; font-size: 0.8125rem; font-weight: 700; cursor: pointer; transition: border-color 200ms var(--ease); }
.xf-ps-btn svg { width: 12px; height: 12px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 220ms var(--ease); }
.xf-ps-btn[aria-expanded="true"] { border-color: var(--gold); }
.xf-ps-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.xf-ps-pop { display: grid; gap: 6px; margin-top: 6px; padding: 8px; border-radius: var(--r-lg); border: 1px solid var(--hair-strong); background: var(--raise); }
.xf-ps-pop[hidden] { display: none; }
.xf-plus { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px; color: var(--muted); font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.xf-ps-pop input[type="search"] { height: 32px; padding: 0 10px; border-radius: var(--r-md); border: 1px solid var(--hair-strong); background: var(--core); color: var(--text); font: inherit; font-size: 0.8125rem; }
.xf-ps-pop input[type="search"]:focus { outline: none; border-color: var(--gold); }
.xf-ps-pop ul { display: grid; gap: 1px; max-height: 214px; margin: 0; padding: 0; list-style: none; overflow: hidden auto; overscroll-behavior: contain; }
.xf-ps-pop li[hidden] { display: none; }
.xf-ps-pop li button { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 8px; border: 0; border-radius: var(--r-md); background: none; color: var(--text); font: inherit; font-size: 0.8125rem; font-weight: 600; text-align: left; cursor: pointer; transition: background 150ms var(--ease); }
.xf-ps-pop li button:hover, .xf-ps-pop li button:focus-visible { background: rgba(255, 255, 255, 0.07); }
.xf-ps-pop li button:focus-visible { outline: 2px solid var(--chalk); outline-offset: -2px; }
.xf-ps-pop li img { width: 22px; height: 22px; flex: none; }
.xf-ps-pop .ps-none { width: 22px; flex: none; }
.xf-ps-pop .ps-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xf-ps-pop small { color: var(--muted); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.ps-tick { position: relative; width: 16px; height: 16px; flex: none; border-radius: 5px; border: 1px solid var(--hair-strong); transition: background 150ms var(--ease), border-color 150ms var(--ease); }
[aria-selected="true"] > .ps-tick { background: var(--gold); border-color: var(--gold); }
[aria-selected="true"] > .ps-tick::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid #06070A; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.xf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.xf-chips:empty { display: none; }
.xf-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px 0 5px; border-radius: var(--r-pill); border: 1px solid rgba(242, 193, 78, 0.45); background: rgba(242, 193, 78, 0.1); color: var(--text); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: background 150ms var(--ease); }
.xf-chip:hover { background: rgba(242, 193, 78, 0.2); }
.xf-chip img { width: 18px; height: 18px; }
.xf-chip i { color: var(--muted); font-style: normal; font-size: 0.875rem; line-height: 1; }
.xf-clear { height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: color 200ms var(--ease), background 200ms var(--ease); }
.xf-clear:not(:disabled):hover { color: #06070A; background: var(--warn); }
.xf-clear:disabled { opacity: 0.4; cursor: default; }
@media (prefers-reduced-motion: reduce) { .xf, .xf-switch i::after, .xf-ps-btn svg, .xf-chip, .xf-btn b { transition: none; animation: none; } }
.sq-find input, #mp-q { height: 38px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font: inherit; font-size: 0.8125rem; }
.sq-filter { position: relative; display: flex; align-items: center; gap: 8px; min-height: 28px; }
.sq-filter .chip { height: 28px; padding: 0 12px; color: var(--text); border-color: var(--gold); cursor: pointer; }
.pc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 14px 8px; margin: 0; padding: 2px 2px 8px; list-style: none; overflow: hidden auto; overscroll-behavior: contain; transition: opacity 150ms; }
.pc-grid .sq-none { grid-column: 1 / -1; padding: 12px 4px; }
.linkish { padding: 0; border: 0; background: none; color: var(--gold); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pc { position: relative; display: grid; justify-items: center; gap: 3px; width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; cursor: grab; }
.pc:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; border-radius: var(--r-lg); }
.pc-art { position: relative; width: 100%; }
.pc-art .item-card { width: 100%; transition: transform 300ms var(--ease); }
.pc:hover .pc-art .item-card { transform: translateY(-3px) scale(1.03); }
.pc.in-squad { opacity: 0.45; }
/* Under the card: CometRating (value + grade) and price / owned / loan; wraps to two lines on narrow tiles, never overflows. */
.pc-foot .pill, .sq .slot > .pill, .slot-art > .pill { height: 20px; font-size: 11px; gap: 3px; padding: 0 7px 0 2px; }
.pc-foot .pill .coin, .sq .slot > .pill .coin, .slot-art > .pill .coin { width: 14px; height: 14px; }
.pc-foot .pill { height: 18px; gap: 2px; padding: 0 5px 0 1px; font-size: 9px; }
.pc-foot .pill .coin { width: 12px; height: 12px; }
.pc-nr { white-space: nowrap; flex: none; display: inline-flex; align-items: baseline; gap: 2px; color: var(--gold); font-size: 0.7188rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pc-nr small { font-size: 0.5rem; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); }
.chem-badge { position: absolute; left: -3px; top: 2px; z-index: 4; display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: 1px; height: 22px; padding: 0 5px 0 3px; border-radius: var(--r-pill); background: #0A0C11; border: 1px solid var(--hair-strong); font-size: 11px; font-weight: 800; }
.chem-badge .chem-ico { width: 17px; height: 12px; margin-right: 2px; }
.chem-badge[data-chem="0"] b { color: var(--muted); }
.chem-badge.off { width: 22px; padding: 0; place-items: center; grid-template-columns: 1fr; color: var(--warn); border-color: var(--warn); }
.sq-label .chem-badge { position: static; }
/* A search card, laid out like a pitch slot: price on the crest at the top centre, then "+" for the slot's role and the chemistry diamonds. */
.pc-foot { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 22px; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(6, 7, 10, 0.72); font-size: 11px; font-weight: 800; }
.pc-foot:empty { display: none; }
.pc-plus { color: var(--fresh); letter-spacing: 0.04em; }
.pc-art > .pill { position: absolute; top: 3%; left: 50%; z-index: 5; transform: translateX(-50%); width: max-content; max-width: 100%; margin: 0; height: 20px; font-size: 0.6875rem; gap: 3px; padding: 0 7px 0 2px; }
.pc-art > .pill .coin { width: 14px; height: 14px; }
[data-stat="chem"] small { margin-left: 4px; font-size: 0.55em; font-weight: 800; vertical-align: 0.15em; }

/* Manager picker */
.mp-head { display: flex; align-items: center; gap: 10px; }
.mp-head b { flex: 1; font-size: 0.9375rem; }
.mp-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mp-nations, .mp-managers, .mp-leagues { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mp-nations > li > button, .mp-leagues button, .mp-mgr { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid transparent; border-radius: var(--r-lg); background: none; color: var(--text); font: inherit; font-size: 0.8125rem; text-align: left; cursor: pointer; }
.mp-nations > li > button:hover, .mp-leagues button:hover, .mp-mgr:hover, .mp-nations > li > button[aria-expanded="true"] { border-color: var(--hair-strong); background: var(--raise); }
.mp-nations > li > button span, .mp-leagues button span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mp-nations small, .mp-leagues small { color: var(--muted); font-size: 0.6875rem; }
.mp-nations .bdg, .mp-leagues .bdg { width: 22px; height: 22px; }
.gain { margin-left: auto; color: var(--fresh); font-style: normal; font-weight: 800; font-size: 0.75rem; }
.mp-managers { padding: 4px 0 8px 18px; }
.mp-mgr img { width: 40px; height: 40px; border-radius: var(--r-md); object-fit: cover; background: var(--raise); }
.mp-mgr span { display: grid; min-width: 0; }
.mp-mgr small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.6875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-mgr[aria-pressed="true"], .mp-leagues button[aria-pressed="true"] { border-color: var(--gold); }
.mp-leagues { grid-template-columns: 1fr; }

.toast { position: fixed; inset: auto; margin: 0; overflow: visible; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 95; width: max-content; max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: var(--r-3xl); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font-size: 0.8125rem; font-weight: 600; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.on.has-undo { pointer-events: auto; display: flex; align-items: center; gap: 4px; padding-right: 6px; }
.toast button { position: relative; min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: none; color: var(--gold); font: inherit; font-weight: 800; cursor: pointer; }
.toast button:hover { background: rgba(255, 255, 255, 0.08); }
.toast button:focus-visible { outline: 2px solid var(--chalk); outline-offset: 1px; }
@media (pointer: coarse) { .toast button::before { content: ""; position: absolute; inset: -6px -4px; } }
/* Rail tabs, filters, preview, locks, Build */
.rail-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin-bottom: 12px; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); }
.rail-tabs button { height: 34px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: inherit; font-size: 0.8125rem; font-weight: 800; cursor: pointer; transition: color 140ms var(--ease), background-color 140ms var(--ease); }
.rail-tabs button[aria-selected="true"] { background: var(--gold-grad); color: #1A1204; }
.rail-tabs button:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.sq-rail { grid-template-rows: auto minmax(0, 1fr); }
.rail-pane { max-height: calc(100vh - 196px - env(safe-area-inset-top)); }
.rail-pane { max-height: calc(100dvh - 196px - env(safe-area-inset-top)); }
.sq-filter { flex-wrap: wrap; gap: 6px; }
.sq-filter .chip { height: 28px; padding: 0 11px; gap: 5px; font-size: 0.75rem; border-color: var(--hair); color: var(--muted); }
.sq-filter .chip.is-on { border-color: var(--gold); color: var(--text); }
.sq-filter .chip[aria-expanded="true"] { background: var(--raise); color: var(--text); }
.sq-filter .chip .bdg { width: 14px; height: 14px; }
/* An applied filter: × clears it (back to any league / nation / ...). Shown on hover, always on touch screens. */
.sq-filter .chip.is-on { padding-right: 26px; }
.chip-x { display: grid; place-items: center; width: 20px; height: 20px; margin: 0 6px 0 -32px; padding: 0; border: 0; border-radius: var(--r-pill); background: var(--raise); color: var(--text); cursor: pointer;
  opacity: 0; transition: opacity 150ms var(--ease), background 150ms var(--ease); }
.chip-x svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.chip.is-on:hover + .chip-x, .chip-x:hover, .chip-x:focus-visible { opacity: 1; }
.chip-x:hover { background: var(--warn); color: #06070A; }
@media (hover: none) { .chip-x { opacity: 1; } }
.sq-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 6px; max-height: 340px; padding: 8px; border-radius: var(--r-2xl); border: 1px solid var(--hair-strong); background: var(--raise); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8); }
.sq-pop input { height: 34px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--core); color: var(--text); font: inherit; font-size: 0.8125rem; }
.sq-pop ul { display: grid; align-content: start; gap: 2px; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.sq-pop button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 4px 10px; border: 1px solid transparent; border-radius: var(--r-md); background: none; color: var(--text); font: inherit; font-size: 0.8125rem; text-align: left; cursor: pointer; }
.sq-pop button:hover, .sq-pop button:focus-visible { background: var(--core); border-color: var(--hair-strong); }
.sq-pop button:focus-visible { outline: 2px solid var(--chalk); outline-offset: -2px; }
.sq-pop button[aria-pressed="true"] { border-color: var(--gold); }
.sq-pop button span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sq-pop small { color: var(--muted); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.sq-pop .bdg { width: 20px; height: 20px; }
.sq .slot { position: relative; }
/* Hover preview: the card sits exactly where it will be placed. Empty slot: it takes the placeholder's place in the
   flow (the placeholder hides). Filled slot: it covers the current card, which fades. The position label stays clear. */
.slot-ghost { pointer-events: none; width: 100%; opacity: 0.86; filter: drop-shadow(0 0 1.5px var(--gold)) drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55)); animation: ghost-in 200ms var(--ease); }
.slot-art > .slot-ghost { position: absolute; inset: 0; z-index: 3; }
.sq .slot.is-ghosting .slot-blank { display: none; }
.sq .slot.is-ghosting .slot-art > .item-card { opacity: 0.25; transition: opacity 200ms var(--ease); }
@keyframes ghost-in { from { opacity: 0; transform: translateY(6px) scale(0.97); } }
[data-stat="chem"][data-preview="up"] { color: var(--chem-gain); }
[data-stat="chem"][data-preview="down"] { color: var(--warn); }
.lock { width: 11px; height: 11px; fill: none; stroke: var(--gold); stroke-width: 2.2; }
.ex-acts { display: flex; gap: 8px; margin-top: 12px; }
.ex-acts .btn-sm { height: 32px; font-size: 0.75rem; }
.ex-acts [aria-pressed="true"] { border-color: var(--gold); }
.sq-links .bdg, .sq-explain .bdg { margin-top: 1px; }

.bd { display: grid; gap: 14px; }
.bd-field { display: grid; gap: 6px; margin: 0; }
.bd-field .sq-label { margin: 0; }
.bd-field output { color: var(--text); font-size: 0.8125rem; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.bd-budget { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--hair-strong); background: var(--core); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); }
.bd-budget input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); caret-color: var(--gold); font: inherit; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.bd-budget input:focus { outline: none; }
/* Squad Builder: one budget under the Players | Build tabs. It limits the Market and All lists and is where Build and Upgrades start */
.sq-budget-row { display: grid; grid-template-columns: auto minmax(118px, 1fr) auto; align-items: center; gap: 8px; margin-top: -4px; }
.sq-budget-row[hidden], .sq-rail:has([data-pane="manager"]:not([hidden])) .sq-budget-row { display: none; }
.sq-budget-row .sq-label { margin: 0; }
.sq-budget-row .bd-budget { gap: 6px; margin: 0; padding: 0 4px 0 8px; }
.sq-budget-row input { min-width: 6.5ch; }
.sq-budget-row input::-webkit-inner-spin-button { display: none; }
.sq-budget-row input { -moz-appearance: textfield; appearance: textfield; }
.sq-budget-x { display: grid; place-items: center; flex: none; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); cursor: pointer; }
.sq-budget-x[hidden] { display: none; }
.sq-budget-x:hover, .sq-budget-x:focus-visible { color: var(--text); background: rgba(255, 255, 255, 0.08); outline: none; }
.sq-budget-x svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sq-budget-add { display: inline-flex; gap: 3px; }
.sq-budget-add .chip { height: 30px; padding: 0 6px; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .sq-budget-row { grid-template-columns: auto minmax(0, 1fr); } .sq-budget-add { grid-column: 2; } }
/* tabs, budget, pane: the pane is the row that shrinks (the Manager pane has no budget row) */
@media (min-width: 1001px) {  /* below this the rail stacks under the pitch and scrolls with the page */
  .sq-rail:has(> .sq-budget-row:not([hidden])):not(:has([data-pane="manager"]:not([hidden]))) { grid-template-rows: auto auto minmax(0, 1fr); }
  .sq-rail:has(> .sq-budget-row:not([hidden])):not(:has([data-pane="manager"]:not([hidden]))) .rail-pane { max-height: calc(100dvh - 192px - env(safe-area-inset-top)); }
}
.sq-budget { margin: 10px 0 0; }  /* the Players list's budget, under the source toggle (Market and All only) */
.sq-budget[hidden] { display: none; }
.sq-budget .sq-label { margin: 0; flex: none; }
.bd-budget:focus-within { outline: 2px solid var(--chalk); outline-offset: 2px; }
.bd input[type="range"] { width: 100%; accent-color: var(--gold); }
.bd .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bd .seg:has([data-bform]) { grid-template-columns: 1fr 1fr; }
.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 0.8125rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--gold); }
.bd-go { width: 100%; height: 42px; font-size: 0.875rem; }
.bd-go:disabled { opacity: 0.45; cursor: default; }
.bd .fine { margin: -4px 0 0; }
.bd-results { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.bd-took { margin: 0; }
.bd-note { padding: 10px 12px; border-radius: var(--r-lg); border: 1px solid rgba(255, 159, 67, 0.4); color: var(--text); font-size: 0.7812rem; }
.bd-sug { display: grid; gap: 8px; width: 100%; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-2xl); background: var(--raise); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 300ms var(--ease), transform 300ms var(--ease); }
.bd-sug:hover, .bd-sug:focus-visible { border-color: var(--gold); }
.bd-sug:active { transform: scale(0.99); }
.bd-top { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; }
.bd-top b { font-size: 0.875rem; }
.bd-chem, .bd-rt { font-weight: 800; font-variant-numeric: tabular-nums; }
.bd-chem small, .bd-rt small { margin-left: 2px; color: var(--muted); font-size: 0.6875rem; font-weight: 700; }
.bd-top .pill { margin-left: auto; height: 22px; font-size: 0.6875rem; }
.bd-top .pill .coin { width: 14px; height: 14px; }
.bd-faces { display: flex; align-items: center; gap: 4px; }
.bd-face .item-card { width: 34px; }
.bd-faces em { color: var(--muted); font-style: normal; font-size: 0.75rem; font-weight: 700; }
.sq.is-previewing .pitch { outline: 1px solid rgba(242, 193, 78, 0.35); outline-offset: -1px; }
@media (prefers-reduced-motion: reduce) { .slot-ghost { animation: none; } }
/* Tactics: a card in the left column; roles are set on the pitch */
.sq-tactics { display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--hair); }
.sq-tactics > .sq-label { flex-wrap: wrap; margin: 0; }
.sq-tactics > .sq-label small { flex-basis: 100%; font-size: 0.8125rem; }
/* Build-up and Defence as in the game: name on the left, the current choice between two arrows on the right. */
.tc-cyc { display: grid; gap: 4px; }
.tc-cyc .sq-label { margin: 0; }
.tc-pick { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; padding: 2px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); }
.tc-val { overflow: hidden; text-align: center; }  /* the word slides inside this window */
.tc-word { display: inline-block; font-size: 0.7812rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; will-change: transform; }
.tc-arr { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); cursor: pointer; transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 160ms var(--ease); }
.tc-arr svg { width: 11px; height: 11px; fill: currentColor; }
.tc-arr:not(.is-prev) svg { transform: scaleX(-1); }  /* the drawn triangle points left: previous keeps it, next mirrors it */
.tc-arr:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.tc-arr:active { transform: scale(.9); }
.tc-arr:focus-visible { outline: 2px solid var(--chalk); outline-offset: 1px; }
.tc-line { display: grid; grid-template-columns: auto minmax(0, 1fr) 2.2ch; align-items: center; gap: 10px; }
.tc-line .sq-label { margin: 0; }
.tc-line output { color: var(--muted); font-size: 0.875rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.tc-line input[type="range"] { --p: 50%; -webkit-appearance: none; appearance: none; width: 100%; height: 8px; margin: 0; border-radius: var(--r-pill); background: linear-gradient(90deg, rgba(255, 255, 255, .72) var(--p), rgba(255, 255, 255, .16) var(--p)); cursor: pointer; }
.tc-line input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 3px; height: 16px; border-radius: 2px; background: #fff; }
.tc-line input[type="range"]::-moz-range-thumb { width: 3px; height: 16px; border: 0; border-radius: 2px; background: #fff; }
.tc-line input[type="range"]:focus-visible { outline: 2px solid var(--chalk); outline-offset: 4px; }
.sq-tactics input[type="range"] { width: 100%; accent-color: var(--gold); }
.tc-share { display: grid; gap: 8px; padding: 10px 12px; border-radius: var(--r-xl); border: 1px solid var(--hair); background: var(--raise); }
.tc-share summary { color: var(--text); font-size: 0.7812rem; font-weight: 700; cursor: pointer; }
.tc-share[open] summary { margin-bottom: 4px; }
.tc-share .fine { margin: 0; }
.tc-code-row { display: flex; align-items: center; gap: 10px; }
.tc-code { flex: 1; font: 800 17px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.08em; color: var(--gold); }
.tc-import { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.tc-import input { height: 34px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--core); color: var(--text); font: 600 13px ui-monospace, Consolas, monospace; letter-spacing: 0.06em; }
.sq-rail .tc-seg { display: flex; }
.tc-seg button { flex: 1 1 0; min-width: 0; padding: 0 4px; font-size: 0.75rem; white-space: nowrap; }
.tc input[type="range"] { width: 100%; accent-color: var(--gold); }
.tc-roles, .tc-overview { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tc-roles button, .tc-overview button { display: grid; gap: 6px; width: 100%; padding: 9px 12px; border: 1px solid var(--hair); border-radius: var(--r-xl); background: none; color: var(--text); font: inherit; font-size: 0.8125rem; text-align: left; cursor: pointer; transition: border-color 300ms var(--ease); }
.tc-roles button:hover, .tc-overview button:hover { border-color: var(--hair-strong); background: var(--raise); }
.tc-roles button[aria-pressed="true"] { border-color: var(--gold); background: var(--raise); }
.tc-rname { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.tc-rname small { color: var(--muted); font-size: 0.6875rem; }
.tc-fit { color: var(--fresh); font-style: normal; font-weight: 800; }
.tc-traits { display: flex; flex-wrap: wrap; gap: 4px; }
.tc-traits span { padding: 1px 7px; border-radius: var(--r-pill); font-size: 0.6875rem; font-weight: 700; border: 1px solid var(--hair); }
.t-plus { color: var(--fresh); border-color: rgba(63, 207, 142, 0.35) !important; }
.t-eq { color: var(--muted); }
.t-neg { color: var(--warn); border-color: rgba(255, 159, 67, 0.35) !important; }
.tc-overview button { grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; }
.tc-overview button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tc-r { color: var(--muted); font-size: 0.75rem; }
.tc-slot .sq-label { margin-bottom: 8px; }
.slot-role { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; }
.slot-role em { margin-left: 2px; color: var(--fresh); font-style: normal; }
@media (max-width: 1240px) {
  .sq { grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "bar bar" "sum sum" "stage rail"; }
  .sq-summary { position: static; max-height: none; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .sq-stats { grid-template-columns: repeat(4, auto); }
  .sq-explain, .sq-tactics { grid-column: 1 / -1; }
}
@media (min-width: 761px) and (max-width: 1000px) {  /* tablet: a 380px rail left the pitch ~340px wide and every label hit a card */
  .sq { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "sum" "stage" "rail"; }
  .sq-rail { position: static; max-height: none; }
  .sq-rail .rail-pane { max-height: none; }
}
@media (max-width: 760px) {
  /* phone: search comes straight after the pitch; the bench (rarely used) goes below it */
  .sq { grid-template-columns: minmax(0, 1fr); grid-template-areas: "bar" "sum" "mgr" "stage" "explain" "rail" "tactics" "links" "bench"; }
  .mgr-row, .sq-summary > .mgr-row { grid-area: mgr; border-top: 0; margin-top: 0; padding-top: 6px; }
  .sq-tactics { grid-area: tactics; padding: 14px 0; border-top: 1px solid var(--hair); }
  .sq-stage { display: contents; }
  .pitch-wrap { grid-area: stage; }
  .sq-bench { grid-area: bench; }
  /* price / Owned sits on the card's crest instead of above it, so it can't collide with the row above */
  .sq .pitch .slot > .pill { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); margin: 0; }
  .slot-focus { display: none; }   /* phone: "LB | FB ++", the focus word only fits on wider pitches */
  .sq .pitch { aspect-ratio: 100 / 140; }   /* the pitch lines' own ratio: rows get room, cards stop overlapping */
  .sq .pitch-slot { width: 16%; }
  .slot-acts { right: -6px; }
  .slot-acts > * { width: 30px; height: 30px; }
  .sq-summary { display: contents; }
  .sq-stats { grid-area: sum; grid-template-columns: repeat(auto-fit, minmax(min(100%, 4.25rem), 1fr)); padding: 12px 0; border-bottom: 1px solid var(--hair); }
  .sq-stats dd { font-size: 1.1875rem; }
  .sq-explain { grid-area: explain; padding: 12px 0; border-top: 1px solid var(--hair); }
  .sq-links { grid-area: links; }
  .sq-rail { position: static; max-height: none; }
  .rail-pane { max-height: none; }
  .pc-grid, .mp-list { max-height: 70vh; }
  .sq-bench .bench-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sq-actions { margin-left: 0; }
  .icon-btn, .btn-sm { height: 44px; }
  .icon-btn { width: 44px; }
  .pc-foot .pill { height: 18px; font-size: 9.5px; padding: 0 5px; }
  .pc-foot .pill .coin { width: 11px; height: 11px; }
  .pc-grid { gap: 12px 6px; }
}
@media (prefers-reduced-motion: reduce) { .sq .slot .item-card, .pc-art .item-card, .toast { transition: none; } }

/* ---- layered card (ui.layered_card): 576x800 rarity frame + player photo + our card face ----
   Every position is a percentage of the frame canvas, measured against the game's own layout (the same on every
   rarity: a narrower gold card and a wide icon card share it). Type is sized in cqw, so the card is one piece at any
   width. Ink (--rt), pill fill (--rl) and the promo tint (--rc) come from the rarity at the card's level. */
.item-card.layered { container-type: inline-size; aspect-ratio: 576 / 800; font-family: var(--font); font-variant-numeric: tabular-nums; color: var(--rt); --rp: var(--rt); }
/* While the frame and photo load, the card's shape shows in its own frame colour, so a list never flashes empty boxes.
   Inset inside every frame shape: once the frame is drawn it covers it, and a frame marked .in fades it out. */
:is(.pl-card, .tile a, .pd-card) > .item-card.layered::before { content: ""; position: absolute; inset: 9% 8% 6%; z-index: 0; background: rgba(255, 255, 255, .05); clip-path: polygon(12% 0, 88% 0, 100% 7%, 100% 87%, 50% 100%, 0 87%, 0 7%); transition: opacity 300ms var(--ease); }  /* a quiet card silhouette while the frame loads, not a gold box */
:is(.pl-card, .tile a, .pd-card) > .item-card.layered:is(:has(> .ly-frame.in), .ly-broken)::before { opacity: 0; }  /* lists and the player page only: pitch cards (squad.js) keep their true frame shape */
.item-card.layered img { inset: auto; }
.item-card.layered .ly-frame { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: contain; }
.item-card.layered .ly-cut { position: absolute; z-index: 2; left: 22%; top: 17.6%; width: 64.3%; height: 46.3%; object-fit: contain; opacity: 0; transition: opacity 360ms var(--ease); }
.item-card.layered .ly-cut.full { left: 0; top: 0; width: 100%; height: 100%; }  /* promo "dynamic" images span the canvas */
/* The square head art starts right of the rating column (which ends at 28.8%) and keeps its right edge, standing on the
   name, so hair never covers the rating or position (251852). */
.item-card.layered .ly-cut.head { left: 29%; width: 57.3%; object-position: 50% 100%; }
.item-card.layered .ly-cut.full, .item-card.layered .ly-cut.head, html:not(.js) .item-card.layered .ly-cut { opacity: 1; }
.item-card.layered.holo::after { z-index: 1; }  /* the holographic pass runs behind the player, over the frame */
.ly-face { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ly-face > * { position: absolute; }
.ly-rating { left: 17%; top: 22.3%; width: 11.8%; display: grid; justify-items: center; line-height: 1; }
.ly-rating b { font-size: 12.4cqw; font-weight: 700; font-stretch: 108%; letter-spacing: -0.02em; }
.ly-rating span { margin-top: 0.4cqw; font-size: 6cqw; font-weight: 600; font-stretch: 100%; }
.ly-left { left: 4%; top: 51.4%; width: 12.9%; display: grid; gap: 1.2cqw; }
.item-card.layered .ly-left img { position: static; width: 100%; height: auto; filter: drop-shadow(0 0.4cqw 0.6cqw rgba(0, 0, 0, 0.35)); }
/* Right column: the other positions in ONE tall hexagon (rarity ink, filled with its dominant colour), the preferred
   foot (R / L) in a small one under it. Codes are centred in the shape, so CDM and ST read the same. */
.ly-right { left: 82.4%; top: 20%; width: 15.6%; display: flex; flex-direction: column; align-items: center; gap: 1.6cqw; }
.ly-alt, .ly-foot { position: relative; display: flex; flex-direction: column; align-items: center; isolation: isolate; background: var(--rp); color: var(--rp);
  clip-path: polygon(50% 0, 100% 2.2cqw, 100% calc(100% - 2.2cqw), 50% 100%, 0 calc(100% - 2.2cqw), 0 2.2cqw); }
.ly-alt { width: 100%; padding: 2cqw 0; }
.ly-foot { width: 72%; padding: 2.4cqw 0; font-size: 5.6cqw; font-weight: 800; line-height: 1; }
.ly-alt::before, .ly-foot::before { content: ""; position: absolute; inset: 0.55cqw; z-index: -1; background: var(--rc); clip-path: inherit; }
.ly-alt span { width: 100%; padding: 1cqw 0; text-align: center; font-size: 5.4cqw; font-weight: 800; font-stretch: 82%; line-height: 1; letter-spacing: -0.02em; white-space: nowrap; }
.ly-alt span + span { border-top: 0.35cqw solid color-mix(in srgb, var(--rp) 45%, transparent); }
/* On the card's point (ui.card_strip / squad.js strip): a plate in the card's own fill (--rc) and pill ink (--rp), the same
   pair as the position hexagons, so it reads as part of the frame. NR is the inverted segment; its grade letter carries
   the tier colour. Sized in cqw: one piece with the card at any width, and nothing outside the card box. */
.item-card:has(> .card-strip) { container-type: inline-size; }
.card-strip { position: absolute; z-index: 4; left: 50%; top: 87.2%; transform: translateX(-50%); display: flex; max-width: 98%; pointer-events: auto; }
/* Everything in the plate is sized in em from one font size. Small cards (pitch, bench, shelves) get 9.4% of their width, 9.5px
   at least and 12.5px at most, so their CometRating reads; from about 190px up it is the old 6.6%, so the player page card keeps its size. */
.cs-items { display: inline-flex; align-items: center; max-width: 100%; height: 1.62em; padding: .09em; border: .08em solid var(--rp, #1a1204); border-radius: var(--r-pill);
  background: var(--rc, #c9a44a); color: var(--rp, #1a1204); font-family: var(--font); font-size: max(9.5px, 6.6cqw, min(9.4cqw, 12.5px)); line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap;
  box-shadow: 0 .14em .36em rgba(0, 0, 0, .45); }
.cs-items > span { display: inline-flex; align-items: center; gap: .16em; height: 100%; padding: 0 .36em; }
.cs-items > span:not(.cs-nr) + span:not(.cs-nr) { border-left: .06em solid color-mix(in srgb, var(--rp, #1a1204) 40%, transparent); }
.cs-items svg { width: .88em; height: .88em; flex: none; fill: currentColor; }
.cs-items b { font-weight: 800; }
.cs-nr { gap: .32em !important; margin-left: .08em; padding: 0 .46em 0 .5em !important; border-radius: var(--r-pill); background: #0B0D12; color: var(--text); box-shadow: inset 0 0 0 .06em rgba(255, 255, 255, .14); }
.cs-nr b { font-size: 1em; font-weight: 800; font-variant-numeric: tabular-nums; }  /* the one CometRating pill (card strip, tables): a bold number the eye finds first (owner, 2026-11-19; it was light), then the grade in its tier colour */
.cs-nr:not(:has(.cs-grade:not([hidden]))) { padding-right: .5em !important; }  /* no grade: the number is the pill's last thing, same room as the left */
/* No circle: "A+" and "B+" were cropped inside one at card-strip sizes */
.cs-grade { flex: none; color: var(--g, var(--muted)); font-size: .92em; font-style: normal; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.cs-grade[hidden] { display: none; }
a.cs-nr { text-decoration: none; }
.cs-grade[data-tier="S"] { --g: var(--nr-s); } .cs-grade[data-tier="A+"] { --g: var(--nr-ap); }
.cs-grade[data-tier="A"] { --g: var(--nr-a); } .cs-grade[data-tier="B+"] { --g: var(--nr-bp); } .cs-grade[data-tier="B"] { --g: var(--nr-b); }
.cs-grade[data-tier="C"] { --g: var(--nr-c); }
/* Marks on the card: owned (club crest, top right, no outline) and loan (the game's blue disc, matches left). */
.item-card:has(> .ly-own, > .ly-loan) { container-type: inline-size; }
.ly-own { position: absolute; z-index: 4; top: 9.5%; right: 11%; width: 8.5%; pointer-events: auto; filter: drop-shadow(0 0.4cqw 0.8cqw rgba(0, 0, 0, 0.55)); }
.ly-own svg { display: block; width: 100%; height: auto; }
.ly-own path { fill: var(--fresh); }
.ly-own path.in { fill: #06110C; }
.ly-own.is-not path { fill: var(--muted); } .ly-own.is-not path.in { fill: #06110C; }
.ly-own.is-not path.sl { fill: none; stroke: #ff6b6b; stroke-width: 1.8; stroke-linecap: round; }
.ly-loan { position: absolute; z-index: 4; right: 4%; top: 47%; display: grid; place-items: center; width: 13%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4f9bff, #1558c9 70%); color: #fff; font-size: 7cqw; font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 0.5cqw rgba(255, 255, 255, 0.9), 0 0.6cqw 1.4cqw rgba(0, 0, 0, 0.45); }
.ly-loan.is-clock { font-size: inherit; }
.ly-loan.is-clock svg { width: 62%; height: 62%; }
.ly-name { left: 11%; top: 64.1%; width: 78%; height: 7.2%; display: grid; place-items: center; overflow: hidden; font-size: 8.4cqw; font-weight: 700; font-stretch: 100%; letter-spacing: -0.01em; white-space: nowrap; text-overflow: ellipsis; }
.ly-name.ly-long { font-size: 6.6cqw; font-stretch: 96%; }
/* Pristine (autographed): the name is a signature where the stats would be; badges sit a little higher and larger */
.ly-sign { left: 6%; top: 61.5%; width: 88%; height: 15.5%; display: grid; place-items: center; overflow: hidden; font-family: "Mrs Saint Delafield", cursive; font-size: 15cqw; font-weight: 400; line-height: 1; white-space: nowrap; }
.item-card.layered.pristine .ly-badges { top: 78.4%; height: 9%; }
.item-card.layered.pristine .ly-badges img { height: 9cqw; max-width: 12.5cqw; }
.item-card.layered.pristine .ly-badges .ly-flags { height: 7cqw; }
.ly-stats { left: 12.6%; top: 72%; width: 74.6%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; text-align: center; line-height: 1.12; }
.ly-stats dt { font-size: 5.2cqw; font-weight: 700; font-stretch: 96%; }
/* a stat an Evolution raised, as in the game: a green mixed with the card's own ink, so it is deep on a gold card and light on a dark one */
.ly-stats dd.up { color: #147b40; color: color-mix(in srgb, var(--rt) 40%, #12a85a); font-weight: 800; }
.ly-stats dd { margin: 0; font-size: 7cqw; font-weight: 700; font-stretch: 100%; letter-spacing: -0.02em; }
@container (max-width: 130px) {  /* small cards (grids, squad search, pitch): heavier, larger face stats */
  .ly-stats dt { font-size: 5.6cqw; font-weight: 800; }
  .ly-stats dd { font-size: 7.8cqw; font-weight: 700; font-stretch: 94%; }
  .ly-alt span, .ly-foot { font-size: 5.8cqw; }
}
.ly-badges { left: 20%; top: 81.8%; width: 60%; height: 6%; display: flex; justify-content: center; align-items: center; gap: 2.8cqw; }
.item-card.layered .ly-badges img { position: static; width: auto; height: 8.4cqw; max-width: 10.5cqw; object-fit: contain; filter: drop-shadow(0 0.3cqw 0.5cqw rgba(0, 0, 0, 0.25)); }
.item-card.layered .ly-badges .ly-flags { height: 5.6cqw; border-radius: 0.5cqw; }
.item-card.layered .ly-badges .ly-leagues { max-width: 20cqw; }  /* league logos are cut to their mark: a wide wordmark (LIGA BBVA) gets room */
.item-card.layered.ly-broken { border-radius: 8%; background: linear-gradient(160deg, var(--rc), #0b0d12); }  /* frame failed: the tint still reads as the card */
@media (prefers-reduced-motion: reduce) { .item-card.layered .ly-cut { transition: none; } }
/* SBC on the Squad Builder pitch (squad_pages.editor(sbc=...)): each requirement shows its live state. */
.sq-reqs { display: grid; gap: 8px; }
.sq-reqs .rules { flex-direction: column; flex-wrap: nowrap; }
.sq-reqs .rule { position: relative; padding-left: 30px; transition: border-color .25s var(--ease), background-color .25s var(--ease); }
.sq-reqs .rule::before { content: ""; position: absolute; left: 10px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%;
  border: 1.5px solid var(--hair-strong); font-size: 0.625rem; font-weight: 900; line-height: 10px; text-align: center; }
.sq-reqs .rule[data-state="ok"] { border-color: rgba(63, 207, 142, .45); background: rgba(63, 207, 142, .07); }
.sq-reqs .rule[data-state="ok"]::before { content: "\2713"; border-color: var(--fresh); background: var(--fresh); color: #06110C; }
.sq-reqs .rule[data-state="pending"]::before { border-color: var(--gold); border-style: dashed; }
.sq-reqs .rule[data-state="no"] { border-color: rgba(238, 75, 80, .5); background: rgba(238, 75, 80, .07); }
.sq-reqs .rule[data-state="no"]::before { content: "!"; border-color: var(--s-poor); background: var(--s-poor); color: #fff; }
.sq-reqs .rule-have { margin-left: auto; color: var(--muted); font-size: 0.6875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sq-reqs.is-met .sq-label small { color: var(--fresh); }
/* SBC challenge page (squad_pages.sbc_board): the pitch on the left, one rail on the right. The rail shows the
   solve controls and live requirements; clicking a slot swaps it for the player search until you go back. */
.sq-sbc { grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "stage rail"; }
.sq-sbc .sq-stage { align-content: start; justify-items: center; }
.sq-sbc .sbc-pitch-bar, .sq-sbc .pitch-wrap { width: 100%; max-width: 760px; }
.sq-sbc .pitch-wrap { position: relative; }
.sq-sbc .sq-rail { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sq-sbc .rail-pane[data-pane="sbc"] { grid-template-rows: none; align-content: start; max-height: none; }
.sbc-pitch-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sbc-stats { display: inline-flex; align-items: center; gap: 14px; color: var(--muted); font-size: 0.7812rem; font-weight: 600; }
.sbc-stats b { color: var(--text); font-size: 0.9375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sbc-stats [data-stat="buy"] { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-size: 0.9375rem; font-weight: 800; }
.sbc-stat { display: inline-flex; align-items: center; gap: 7px; }
.sbc-stat .chem-ico { width: 19px; height: 14px; }
.stat-ico { flex: none; width: 15px; height: 15px; color: var(--gold); fill: currentColor; stroke: none; }
.sbc-formation { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--pick-line); border-radius: var(--r-pill); background: var(--pick-bg); color: var(--pick-ink); font-size: 0.8125rem; font-weight: 800; }
.formation-pick .ui-select-btn::before, .sbc-formation::before { content: ""; flex: none; width: 9px; height: 13px; border: 1.5px solid currentColor; border-radius: 3px;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat; }
.sbc-solve-card { display: grid; gap: 10px; }
.sbc-budget { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--hair-strong); border-radius: var(--r-sm); background: var(--core); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); }
.sbc-budget input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); caret-color: var(--gold); font: inherit; font-size: 0.8125rem; font-weight: 700; }
.sbc-budget:focus-within { border-color: rgba(242, 193, 78, .5); }
.sbc-keep { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; font-weight: 700; }
.sbc-solve { width: 100%; justify-content: center; }
.sbc-solve:disabled { opacity: .45; cursor: not-allowed; }
.sq-sbc .rail-head { display: flex; align-items: center; gap: 10px; }
.sq-sbc .rail-head b { font-size: 0.9375rem; }
.sq-sbc [data-source-seg] { display: none; }
.sbc-result { display: grid; gap: 8px; }
.sbc-result:empty { display: none; }
.sbc-result .solve-note { margin: 0; }
.sbc-submit { justify-self: start; gap: 6px; color: var(--muted); }
@media (max-width: 1000px) { .sq-sbc { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "rail"; } .sq-sbc .sq-rail { position: static; max-height: none; } }
/* Search palette (ui._SCRIPT): a dialog a tenth of the way down, so the results have room below the input */
.search-sheet { width: min(640px, calc(100vw - 24px)); max-height: 80vh; margin: 10vh auto auto; padding: 0; overflow: hidden; border: 1px solid var(--hair-strong); border-radius: var(--r-core); background: var(--core); color: var(--text); }
.search-sheet[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.search-sheet::backdrop { background: rgba(0, 0, 0, .74); }
.ss-bar { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--hair); color: var(--muted); }
.ss-bar input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font-size: 1rem; }
.ss-pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; }
.ss-pills[hidden] { display: none; }
.ss-pills .opt-seg { padding: 0 12px; white-space: nowrap; }
.ss-list { overflow-y: auto; padding: 6px; }
.ss-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.01em; }
.ss-head .glyph { width: 14px; height: 14px; }
.ss-head.is-hot { color: var(--gold); }
.ss-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 5px 10px 5px 6px; border-radius: var(--r-md); color: var(--text); text-decoration: none; }
.ss-row.is-plain { grid-template-columns: minmax(0, 1fr) auto; padding-left: 10px; }
.ss-row[aria-selected="true"], .ss-row:hover { background: rgba(255, 255, 255, .07); }
/* No layers: the rendered card cropped to head and shoulders (measured on the feed's 300x419 cards: x 50-250, y 60-260). */
.ss-face { position: relative; width: 48px; height: 48px; border-radius: var(--r-md); overflow: hidden; background: var(--raise); }
.ss-face img { position: absolute; left: -25%; top: -30%; width: 150%; height: auto; max-width: none; }
/* The small card: a cut-corner gem ringed in the card's ink, the frame's own art inside, the player on it. */
.ss-face.is-tile { --gem: polygon(18% 0, 82% 0, 100% 18%, 100% 82%, 82% 100%, 18% 100%, 0 82%, 0 18%); border-radius: 0; background: var(--ring); clip-path: var(--gem); }
.ss-face.is-tile > span { position: absolute; inset: 2px; overflow: hidden; clip-path: var(--gem); background-color: var(--fill); background-size: 170% auto; background-position: 50% 40%; background-repeat: no-repeat; }
.ss-face.is-tile img { left: -6%; top: auto; bottom: -4%; width: 112%; }        /* head-and-shoulders cutouts */
.ss-face.is-tile img.full { left: -32%; top: -27%; bottom: auto; width: 150%; }  /* full-body cutouts: the head and chest */
.ss-name em.ss-ver { justify-self: start; max-width: 100%; margin-top: 2px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--fill); color: var(--ink); font-size: 0.6875rem; font-weight: 800; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ring) 70%, transparent); }
.ss-face.is-badge { display: grid; place-items: center; background: none; }
.ss-face.is-badge img { position: static; width: 32px; height: 32px; object-fit: contain; }
.ss-name { display: grid; gap: 1px; min-width: 0; font-size: 0.9062rem; font-weight: 700; line-height: 1.25; }
.ss-name, .ss-name b, .ss-name em { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ss-name i { color: var(--muted); font-style: normal; font-weight: 600; }
.ss-name em { color: var(--muted); font-size: 0.75rem; font-weight: 600; font-style: normal; }
.ss-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.75rem; font-weight: 800; }
.ss-meta img { width: 22px; height: 22px; object-fit: contain; }
.ss-meta img.ss-lg { width: auto; max-width: 44px; }  /* league logos are cut to their mark: a wordmark gets its width */
.ss-meta > span { min-width: 30px; text-align: center; }
.ss-ovr { display: grid; place-items: center; min-width: 32px; height: 26px; border-radius: var(--r-sm); background: rgba(242, 193, 78, .14); color: var(--gold); font-size: 0.8125rem; font-weight: 800; }
.ss-none { padding: 14px 10px; color: var(--muted); font-size: 0.8125rem; }
@media (max-width: 720px) { .search-sheet { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; } .ss-bar input { font-size: 1rem; } }

/* Evolutions (docs/features/evolutions.md; owner review 2026-10-09). Gold marks path choices and the best chain;
   mint marks stat gains. Selectors next to player cards are direct-child only, so card text keeps its own styles. */
.evo-btn { padding: 0 16px; justify-content: center; }
.evo-btn-gold { background: var(--gold-grad); color: #1A1204; border-color: transparent; }
.evo-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.evo-tools { margin: 0; }
.evo-small { margin: 0; color: var(--muted); font-size: 0.7812rem; }
.evo-search { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.evo-search .tool-search { width: auto; flex: 1 1 auto; min-width: 0; max-width: 340px; height: 44px; }
.evo-search .tool-search input { opacity: 1; font-size: 0.875rem; }
.evo-search .tool-search:focus-within, .evo-tools .tool-search:focus-within { outline: 2px solid var(--chalk); outline-offset: 2px; }
.evo-card > .card-top { align-items: center; gap: 8px; }
.evo-name { flex: 1; display: grid; min-width: 0; }  /* the name, and the Season Pass line under it */
.evo-card > .card-top > h2 { flex: 1 1 auto; min-width: 0; }
.evo-choice { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; color: var(--gold); vertical-align: middle; }
.evo-choice > svg { width: 18px; height: 18px; }
.page-h1 > .evo-choice { width: 30px; height: 30px; margin-left: 10px; }
.page-h1 > .evo-choice > svg { width: 24px; height: 24px; }
.evo-req-tip { position: relative; z-index: 10; display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--hair); border-radius: var(--r-pill); color: var(--muted); cursor: help; }
.evo-req-tip:hover, .evo-req-tip:focus-visible { color: var(--text); border-color: var(--hair-strong); }
.evo-req-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; display: none; min-width: 230px; padding: 12px; border: 1px solid var(--hair-strong); border-radius: var(--r-xl); background: #0B0E14; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); color: var(--text); text-align: left; cursor: default; }
.evo-req-tip:hover > .evo-req-pop, .evo-req-tip:focus > .evo-req-pop { display: block; }
.evo-req-pop > b { display: block; margin-bottom: 6px; font-size: 0.8125rem; }
.evo-req-pop > dl, .evo-req-list { display: grid; margin: 0; }
.evo-req-pop > dl > div, .evo-req-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 0.8125rem; }
.evo-req-pop > dl > div + div, .evo-req-list > div + div { border-top: 1px solid var(--hair); }
.evo-req-pop dt, .evo-req-list dt { color: var(--muted); }
.evo-req-pop dd, .evo-req-list dd { margin: 0; font-weight: 700; text-align: right; }
.evo-ba { display: flex; align-items: center; justify-content: center; gap: 8px; }
.evo-ba > .item-card { width: 112px; }
.evo-arrow { display: grid; justify-items: center; align-content: center; gap: 4px; flex: none; width: 72px; margin: 0 8px; color: var(--gold); z-index: 2; }  /* a long arrow with room either side; a tier change sits above it */
.evo-arrow > svg { width: 64px; height: 24px; }
.evo-arrow-tier { display: inline-flex; align-items: center; gap: 4px; }
.evo-arrow-tier .evo-tier { margin: 0; }
.evo-arrow-tier > b { color: var(--muted); font-size: 0.75rem; font-weight: 800; }
/* depth: the card you own sits slightly behind, the evolved card steps forward out of the frame */
.evo-ba > .item-card:first-child:not(:last-child) { transform: translateY(6px) scale(.93); filter: brightness(.82) saturate(.85); transform-origin: right center; }
.evo-ba > .item-card:last-child:not(:first-child) { transform: translateY(-6px) scale(1.07); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); transform-origin: left center; z-index: 1; transition: transform 250ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .evo-ba:hover > .item-card:last-child:not(:first-child) { transform: translateY(-9px) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .evo-ba > .item-card { transition: none !important; } }
.evo-ex-none { margin: 0; padding: 18px 12px; border: 1px dashed var(--hair); border-radius: var(--r-xl); color: var(--muted); font-size: 0.8125rem; text-align: center; }
/* the detail page */
.evo-cr .nr-meter, .evb-cr { white-space: nowrap; }
.evo-cr .nr-meter { display: inline-flex; align-items: center; }
.evo-tier { margin-left: 5px; padding: 1px 5px; border-radius: var(--r-xs); font-size: 0.6562rem; font-style: normal; font-weight: 800; vertical-align: 1px; }
.evo-pl .pl-card { width: 88px; }
.evo-pl .pl-card .item-card { width: 100%; }
.evo-pl .pl-row { padding-block: 4px; }
.evo-pl .pl-stats b { font-size: 1.125rem; font-weight: 800; }
.evo-pl .pl-stats em { font-size: 0.75rem; }
.evo-pl .nr-meter b { font-size: 1.375rem; }
.evo-pl .pl-who b { font-size: 1rem; }
@media (min-width: 1101px) { .evo-pl .pl-row, .evo-pl .pl-head { grid-template-columns: 84px minmax(130px, 1.1fr) 50px minmax(270px, 1.4fr) 84px 84px 72px 100px 84px !important; grid-template-areas: "card who pos stats sm wf extra price nr" !important; } .evo-pl .pl-card { width: 84px; } }
@media (max-width: 1100px) { .evo-pl .pl-row { grid-template-columns: 84px minmax(0, 1fr) 60px auto 96px !important; } .evo-pl .pl-card { width: 84px; } }
@media (max-width: 640px) { .evo-pl .pl-row { grid-template-columns: 72px minmax(0, 1fr) auto !important; } .evo-pl .pl-card { width: 72px; } }
/* Evo Builder: your card on the left, choices as whole-card tiles on the right */
.evb { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.evb-aside { position: sticky; top: 92px; display: grid; gap: 14px; padding: 16px; border: 1px solid var(--hair); border-radius: var(--r-2xl); background: rgba(10, 12, 17, .92); }
.evb-aside .evo-player-cards { display: grid; place-items: center; padding: 8px 0; }
.evb-aside .evo-player-cards > .evo-ba > .item-card { width: 124px; }
.evb-aside .evo-arrow { width: 52px; margin: 0 4px; }
.evb-aside .evo-arrow > svg { width: 44px; }
.evb-aside .evo-chainbar { margin: 0; padding: 0; border: 0; background: none; }
.evb-aside .evo-rings { margin-top: 0; }
.evb-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0; font-variant-numeric: tabular-nums; }
.evb-sum > b { font-size: 1.25rem; font-weight: 800; }
.evb-sum > span:last-child { margin-left: auto; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.evb-off > summary { cursor: pointer; padding: 10px 2px; color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.evb-off[open] > summary { margin-bottom: 8px; }
.evb-main { display: grid; gap: 16px; min-width: 0; }
.evb-want label { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.evb-want label > span { color: var(--muted); font-size: 0.8125rem; }
.evb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.evb-tile { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; height: 100%; padding: 12px; border: 1px solid var(--hair); border-radius: var(--r-xl); background: rgba(255, 255, 255, .02); color: var(--text); text-decoration: none; transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease); }
.evb-tile:hover, .evb-tile:focus-visible { border-color: rgba(242, 193, 78, .65); background: rgba(242, 193, 78, .05); transform: translateY(-2px); }
.evb-tile-card .item-card { width: 130px; }
.evb-tile-body { display: grid; gap: 7px; align-content: start; min-width: 0; }
.evb-tile-title { font-size: 0.875rem; font-weight: 800; line-height: 1.3; }
.evb-tile-sub { color: var(--muted); font-size: 0.7812rem; }
.evb-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.evb-tag { padding: 2px 8px; border-radius: var(--r-pill); background: var(--raise); font-size: 0.7188rem; font-weight: 700; }
.evb-tag.is-gold { background: rgba(242, 193, 78, .16); color: var(--gold); }
.evb-gains { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; }
.evb-cr { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 8px; border-radius: var(--r-md); background: var(--raise); font-variant-numeric: tabular-nums; }
.evb-cr small { color: var(--muted); font-size: 0.6562rem; font-weight: 800; letter-spacing: .03em; }
.evb-cr b { font-size: 0.9375rem; font-weight: 800; }
.evb-cr em { color: var(--fresh); font-size: 0.75rem; font-style: normal; font-weight: 800; }
.evb-ovr, .evb-face { padding: 2px 7px; border-radius: var(--r-sm); background: rgba(63, 207, 142, .12); color: var(--fresh); font-size: 0.75rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.evb-face.is-off { background: var(--raise); color: var(--muted); }
.evb-gains .evo-ps > img { width: 22px; height: 22px; }
.evb-cta { justify-self: start; margin-top: 2px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--gold-grad, var(--gold)); color: #1a1204; font-size: 0.7812rem; font-weight: 800; }
@media (max-width: 900px) { .evb { grid-template-columns: 1fr; } .evb-aside { position: static; } }
@media (max-width: 520px) { .evb-tiles { grid-template-columns: 1fr; } .evb-tile { grid-template-columns: 100px minmax(0, 1fr); } .evb-tile-card .item-card { width: 100px; } }

/* what an Evolution improves, at a glance */
.evo-up { display: grid; gap: 14px; }
.evo-up-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 0; list-style: none; }
.evo-up-ovr { display: grid; justify-items: center; min-width: 58px; padding: 6px 12px; border-radius: var(--r-xl); background: var(--gold-grad, var(--gold)); color: #1a1204; line-height: 1.05; }
.evo-up-ovr b { font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.evo-up-ovr small { font-size: 0.625rem; font-weight: 800; letter-spacing: .06em; }
.evo-up-star { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--raise); color: var(--text); font-weight: 800; }
.evo-up-star > svg { width: 16px; height: 16px; fill: var(--gold); }
.evo-up-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--raise); }
.evo-up-mark.plus { background: rgba(242, 193, 78, .14); box-shadow: inset 0 0 0 1.5px rgba(242, 193, 78, .7); }
.evo-up-mark > img, .evo-up-mark > svg { width: 24px; height: 24px; }
.evo-up-role { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--raise); font-size: 0.8125rem; font-weight: 700; }
.evo-up-role.plus { box-shadow: inset 0 0 0 1.5px rgba(242, 193, 78, .7); color: var(--gold); }
.evo-up-role > svg { width: 15px; height: 15px; }
.evo-up-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.evo-up-g { padding: 10px 12px; border-radius: var(--r-xl); background: rgba(255, 255, 255, .03); border: 1px solid var(--hair); }
.evo-up-g > h4 { margin: 0 0 8px; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.01em; }
.evo-up-g > ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.evo-up-g li { display: grid; grid-template-columns: minmax(96px, 1.4fr) minmax(36px, 1fr) 34px 48px; align-items: center; gap: 8px; font-size: 0.7812rem; font-weight: 600; }
.evo-up-g li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #C9D0D6; }
.evo-up-g li > b { color: var(--fresh); font-variant-numeric: tabular-nums; text-align: right; }
.evo-up-g li > .evo-up-cap { color: var(--muted); font-size: 0.6875rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }  /* the cap: +25 lifts a stat to 80 at most */
.evo-up-bar { height: 6px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); overflow: hidden; }
.evo-up-bar > i { display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1d9c5c, var(--fresh)); }
.evo-up.compact { gap: 10px; }
.evo-up.compact .evo-up-groups { grid-template-columns: 1fr; gap: 8px; }
.evo-up.compact .evo-up-g { padding: 8px 10px; }
.evo-up.compact .evo-up-ovr { min-width: 48px; padding: 4px 10px; } .evo-up.compact .evo-up-ovr b { font-size: 1.125rem; }
.evo-up.compact .evo-up-mark { width: 30px; height: 30px; } .evo-up.compact .evo-up-mark > img, .evo-up.compact .evo-up-mark > svg { width: 20px; height: 20px; }

.evo-pl .pl-stats > span.up b { color: var(--fresh); }
.evo-pl .pl-row .pl-stats small { display: none; }  /* the header names them; on narrow screens the header is hidden */
.evo-pl .pl-stats em { color: var(--fresh); font-size: 0.6875rem; font-style: normal; font-weight: 800; }
.evo-pl .pl-stats em { line-height: 1; }
.evo-cr { display: grid; justify-items: end; gap: 2px; }
.evo-pl .evo-ps > img { width: 20px; height: 20px; }
.evo-pl .pl-ps { display: flex; gap: 4px; }
.evo-pl .pl-sm { grid-area: sm; } .evo-pl .pl-wf { grid-area: wf; }
.evo-stars { display: inline-flex; align-items: center; gap: 1px; color: rgba(255, 255, 255, .18); }  /* skill moves and weak foot as the game shows them: five stars, the earned ones gold */
.evo-stars > svg { width: 12px; height: 12px; fill: currentColor; }
.evo-stars > svg.on { color: var(--gold); }
.evo-pl .pl-head .pl-sm, .evo-pl .pl-head .pl-wf { text-align: center; }
.evo-pl .pl-row .pl-sm, .evo-pl .pl-row .pl-wf { display: flex; justify-content: center; }
.evo-chain-n { display: inline-flex; align-items: center; align-self: center; gap: 3px; line-height: 1; color: var(--gold); font-size: 0.75rem; font-weight: 800; }
.evo-chain-n > svg { width: 14px; height: 14px; }
.evo-chain-count { margin-left: 4px; font-size: 0.75rem; font-weight: 800; }
.evo-search > .evo-chain { display: flex; align-self: center; gap: 0; margin: 0; }  /* the Builder's own `.evo-chain` list rule (grid, 18px bottom margin) also hits this details: reset it so the button sits on the row's centre line */
.evo-chain > summary { display: flex; align-items: center; justify-content: center; gap: 4px; }
.evo-chain > summary > svg { width: 20px; height: 20px; }
.evo-chain-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .04); }
.evo-chain-seg .opt-seg { min-height: 30px; font-size: 0.75rem; font-weight: 700; }
.evo-chain-seg .opt-seg:has(input[value="m"]:checked) { background: rgba(242, 193, 78, .16); color: var(--gold); }
.evo-chain-pop > .evo-btn { position: sticky; bottom: 0; justify-self: end; }
.evo-chain-pop .evo-chain-find { width: 100%; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--raise); color: var(--text); }
.evo-pl .pl-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
@media (max-width: 640px) { .evo-chain-pop { position: fixed; left: 12px; right: 12px; top: 88px; width: auto; max-height: 72vh; z-index: 60; } }
.evo-chain-pop { display: grid; gap: 10px; width: min(420px, 92vw); max-height: 60vh; overflow: auto; }
.evo-chain-rows { display: grid; gap: 8px; }
.evo-chain-row { display: grid; gap: 4px; }
.evo-chain-row[hidden] { display: none; }
.evo-chain-row > b { font-size: 0.8125rem; }
.evo-elig-tools select { min-height: 36px; }
.evo-elig-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
@media (max-width: 1100px) {  /* the stats after the Evolution are the point of this list: they stay, on a second line */
  .evo-pl .pl-head { display: none; }
  .evo-pl .pl-row { grid-template-columns: 64px minmax(0, 1fr) 64px auto 84px; grid-template-areas: "card who pos price nr" "card stats stats sm wf"; row-gap: 6px; }
  .evo-pl .pl-row .pl-stats { display: grid; }
  .evo-pl .pl-row .pl-stats small { display: block; }
  .evo-pl .pl-row .pl-extra { display: none; }
}
@media (max-width: 640px) {
  .evo-pl .pl-row { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "card who who" "card stats stats" "card sm wf" "card price nr"; }
  .evo-pl .pl-row .pl-pos { display: none; }
}
@media (min-width: 1101px) { .evo-pl .pl-row, .evo-pl .pl-head { grid-template-columns: 72px minmax(150px, 1fr) 64px 252px 92px 110px 84px; } }

.evo-rings { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; text-align: center; }
.evo-rings > li { display: grid; justify-items: center; gap: 3px; align-content: start; }
.evo-rings .gauge { width: 40px; height: 40px; }
.evo-rings .gauge b { font-size: 0.875rem; }
.evo-rings > li.up .gauge b { color: var(--fresh); }
.evo-ring-l { color: var(--muted); font-size: 0.6562rem; font-weight: 700; letter-spacing: .04em; }
.evo-rings em { padding: 0 5px; border-radius: 5px; background: rgba(63, 207, 142, .15); color: var(--fresh); font-size: 0.6875rem; font-style: normal; font-weight: 800; line-height: 16px; }

.evo-tiles dd > .glyph { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; color: var(--muted); }
.evo-hero { display: grid; place-items: center; padding: 28px 12px; border: 1px solid var(--hair); border-radius: var(--r-xl); }
.evo-hero .evo-ba > .item-card { width: 210px; }
.evo-rec { position: relative; }
.evo-rec-mark { position: absolute; top: 10px; left: 10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--raise); color: var(--gold); }
.evo-rec-mark > .glyph { width: 15px; height: 15px; }
@media (max-width: 520px) { .evo-hero .evo-ba > .item-card { width: 130px; } }
/* the list: big cards, facts as icons */
.evo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.evo-grid .evo-ba > .item-card { width: 128px; }
.evo-grid .evo-card.cosmetic .evo-ba > .item-card { width: 140px; }
.evo-grid .evo-arrow { width: 56px; margin: 0 4px; }
.evo-grid .evo-arrow > svg { width: 52px; }
@media (min-width: 1101px) { .evo-grid .evo-ba > .item-card { width: clamp(100px, 10vw, 128px); } .evo-grid .evo-card.cosmetic .evo-ba > .item-card { width: clamp(104px, 10.6vw, 140px); } }  /* 3 columns shrink with the viewport */
@media (max-width: 1100px) { .evo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .evo-grid { grid-template-columns: minmax(0, 1fr); } .evo-grid .evo-ba > .item-card { width: 120px; } }
.evo-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.evo-fact { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.evo-fact > .glyph { width: 18px; height: 18px; color: var(--muted); }
.evo-cost { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.evo-cost > .coin { width: 14px; height: 14px; }
.evo-deltas, .evo-ups { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.evo-deltas > li { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: var(--r-sm); background: var(--raise); color: var(--fresh); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.evo-deltas > li > b { color: var(--text); font-weight: 800; }
.evo-deltas > li.evo-ps { padding: 0 3px; }
.evo-deltas > li.evo-ps > .ps-art { width: 22px; height: 22px; }
.evo-deltas > li.evo-off { color: var(--muted); font-weight: 600; }
.evo-ups > li { padding: 4px 10px; border-radius: var(--r-md); background: var(--raise); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.evo-ups > li.evo-design { display: inline-flex; align-items: center; gap: 8px; padding-block: 4px; }  /* the new card design, shown as its frame */
.evo-design img { width: 28px; height: auto; }
.evo-sp { display: flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--muted); font-size: 0.75rem; font-weight: 600; }  /* Season Pass mark and level under an Evolution name */
.evo-sp img { width: 16px; height: 16px; }
.tier[data-tier="D"] { --tc: var(--muted); }
.evo-rate { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; margin: 0 10px 0 0; padding: 0; border-radius: var(--r-md); font-size: 1.25rem; font-style: normal; font-weight: 800; line-height: 1; vertical-align: 0; }
.evo-rate.is-none { background: var(--raise); color: var(--muted); }
.evo-detail-head > .page-h1 > .evo-rate { width: 40px; height: 40px; font-size: 1.375rem; }
.evo-pills, .evo-for { display: flex; flex-wrap: wrap; gap: 6px; }
.evo-pill, .evo-pos { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-xs); background: var(--raise); color: var(--text); font-size: 0.6875rem; font-weight: 700; }
.evo-pos { color: var(--muted); background: transparent; border: 1px solid var(--hair); }
.evo-pill.is-new { background: var(--gold); color: var(--bg); }
.evo-pill.is-soon { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.evo-add { display: grid; gap: 6px; }
.evo-adds { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 0.875rem; }
.evo-ovr { font-weight: 800; }
.evo-cross { color: var(--gold); font-size: 0.8125rem; font-weight: 700; }
.evo-deltas > li.evo-ps-row { display: inline-flex; gap: 2px; padding: 0 3px; }
.evo-ps-row > .evo-ps > .ps-art { width: 22px; height: 22px; }
.evo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; color: var(--muted); font-size: 0.7812rem; }
.evo-build-link { color: var(--gold); font-size: 0.8125rem; font-weight: 700; text-decoration: none; }
.evo-build-link:hover { text-decoration: underline; }
.evo-main { display: grid; gap: 16px; min-width: 0; }
#levels, #eligible, #best { scroll-margin-top: calc(96px + env(safe-area-inset-top)); }

/* detail */
.evo-detail-head { display: grid; gap: 4px; margin: 4px 0 14px; }
.evo-detail-head > .page-h1 { display: flex; align-items: center; }
.evo-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.evo-tiles > div { display: grid; gap: 4px; padding: 9px 14px; border: 1px solid var(--hair); border-radius: var(--r-xl); background: var(--raise); }
.evo-tiles dt { color: var(--muted); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.evo-tiles dd { margin: 0; font-size: 0.875rem; font-weight: 700; }
.evo-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.evo-recommended { margin-bottom: 18px; }
.evo-rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.evo-rec { display: grid; justify-items: center; gap: 12px; padding: 16px; border: 1px solid var(--hair); border-radius: var(--r-panel-s); background: rgba(10, 12, 17, .9); color: inherit; text-decoration: none; transition: border-color 160ms var(--ease-out), transform 140ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .evo-rec:hover { border-color: rgba(242, 193, 78, 0.35); } }
.evo-rec { min-width: 0; container-type: inline-size; }
/* two cards + arrow (88px with margins) + gaps + the 7% the after card grows: never wider than the box */
.evo-rec > .evo-ba > .item-card { width: min(150px, calc((100cqw - 108px) / 2.1)); }
.evo-rec .cs-items { font-size: min(8.8cqw, 12.5px); }   /* no 9.5px floor here: on these small cards it pushed the pill past the strip */
.evo-panels { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 14px; margin-bottom: 18px; }
.evo-panels > .pd-panel > .pd-h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.evo-path-on { color: var(--gold); font-size: 0.75rem; font-weight: 700; }
.evo-section-title { margin: 0 0 12px; }
.evo-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0 0 18px; padding: 0; list-style: none; }
.evo-level { display: grid; align-content: start; gap: 10px; padding: 14px; border: 1px solid var(--hair); border-radius: var(--r-3xl); background: rgba(10, 12, 17, .9); }
.evo-level > h3 { display: flex; align-items: baseline; gap: 8px; font-size: 0.9375rem; font-weight: 800; }
.evo-level > h3 > span { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.evo-level > .evo-lv-card { justify-self: start; }
.evo-level > .evo-lv-card > .item-card { width: 84px; }
.evo-date { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.evo-card .stat-strip { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.evo-card .stat-strip > div:nth-child(odd) { border-left: 0; }
.evo-card .stat-strip > div:nth-child(n+3) { border-top: 1px solid var(--hair); }
.evo-card .stat-strip dd { flex-wrap: wrap; gap: 0 6px; white-space: normal; }
.evo-diff { margin: 0; color: var(--muted); font-size: 0.7812rem; }
.evo-chain { display: grid; gap: 14px; margin: 0 0 18px; padding: 0; list-style: none; }
.evo-chain > li { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--hair); border-radius: var(--r-3xl); background: rgba(10, 12, 17, .9); }
.evo-chain > li > h3 { font-size: 0.9375rem; font-weight: 800; }
.evo-unverified { color: var(--warn); }
.cr-chip { display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid var(--hair); border-radius: 999px; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.cr-chip { gap: 4px; }
.cr-mark { display: inline-block; width: 16px; height: 16px; flex: none; vertical-align: -2px; margin-right: 3px; color: var(--gold); }
.btn-gold .cr-mark { color: currentColor; }
/* /pricing: the Pro card (both periods inside, Annual picked), Free beside it, then the proof, the folded table and the questions */
/* /pricing (pricing_pages.py): one period switch, two cards of one size with the same rows, quiet actions at the foot */
.pr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; max-width: 920px; margin-inline: auto; }
.pr .pr-period { justify-self: start; display: inline-flex; gap: 4px; width: max-content; max-width: 100%; }
.pr-period .opt-seg span { display: inline-flex; align-items: center; gap: 8px; }
.pr-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pr-card { display: grid; grid-template-rows: auto auto 1fr auto; gap: 18px; padding: 24px; border: 1px solid var(--hair-strong); border-radius: var(--r-3xl); background: var(--shell); }
.pr-card.is-pro { border-color: rgba(242, 193, 78, 0.45); background: linear-gradient(180deg, rgba(242, 193, 78, 0.07), rgba(242, 193, 78, 0) 55%), var(--shell); }
.pr-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; }
.pr-card h2 { margin: 0; font-size: 1.125rem; font-weight: 800; letter-spacing: 0.01em; }
.pr-card.is-pro h2 { color: var(--gold); }
.pr-founder, .pr-tag, .ac-founder, .nav-plan { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 0.6875rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.pr-founder, .ac-founder, .nav-plan.is-pro { background: var(--gold-grad); color: #1A1204; }
.pr-tag { padding: 3px 10px; background: rgba(63, 207, 142, 0.15); color: var(--fresh); font-size: 0.8125rem; }
.pr-mine { padding: 2px 8px; border: 1px solid var(--hair-strong); border-radius: 999px; color: var(--muted); font-size: 0.6875rem; font-weight: 800; }
.pr-amount { display: grid; gap: 4px; min-height: 64px; align-content: start; }
.pr-amount p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 0; color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.pr-amount b { color: var(--text); font-size: 2.25rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.pr-amount s { color: var(--muted); font-size: 1rem; }
.pr-amount small { color: var(--muted); font-size: 0.8125rem; }
/* Monthly is the default (owner, 2026-11-18): Annual's price and bonus show only once Annual is picked */
.pr-card.is-pro .pr-amount[data-period="year"], .pr-perks [data-period="year"],
.pr:has(input[name="period"][value="year"]:checked) .pr-amount[data-period="month"] { display: none; }
.pr:has(input[name="period"][value="year"]:checked) .pr-amount[data-period="year"] { display: grid; }
.pr:has(input[name="period"][value="year"]:checked) .pr-perks [data-period="year"] { display: flex; }
.pr-perks { display: grid; align-content: start; gap: 12px; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--hair); list-style: none; }
.pr-perks li { display: flex; gap: 10px; align-items: flex-start; }
.pr-perks li > span { display: grid; gap: 1px; }
.pr-perk { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; }
.pr-perk b { font-size: 1.0625rem; }
.pr-perks small { color: var(--muted); font-size: 0.75rem; }
.pr-perks .cr-mark { width: 24px; height: 24px; margin: 0; }
.pr-perks .pr-ic { margin-top: 3px; flex: none; }
.pr-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 40px; }
.pr-card footer small { color: var(--muted); font-size: 0.75rem; }
.pr-act { height: 40px; padding: 0 18px; }
.pr-link { color: var(--gold); font-weight: 700; text-decoration: none; }
.pr-link:hover { text-decoration: underline; }
.pr-soon { color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
@media (max-width: 720px) { .pr-cards { grid-template-columns: minmax(0, 1fr); } .pr-card.is-pro { order: -1; } }
.pr-go[data-period="year"], .pr:has(input[name="period"][value="year"]:checked) .pr-go[data-period="month"] { display: none; }
.pr:has(input[name="period"][value="year"]:checked) .pr-go[data-period="year"] { display: inline-flex; }
/* /checkout (pricing_pages.checkout): our plan summary beside Paddle's inline frame; one column on a phone, summary first */
.co { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: start; max-width: 960px; }
.co-sum { display: grid; gap: 16px; padding: 24px; border: 1px solid rgba(242, 193, 78, 0.45); border-radius: var(--r-3xl);
  background: linear-gradient(180deg, rgba(242, 193, 78, 0.07), rgba(242, 193, 78, 0) 55%), var(--shell); }
.co-sum header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.co-sum h2 { margin: 0; color: var(--gold); font-size: 1.125rem; font-weight: 800; }
.co-sum .pr-period { display: inline-flex; gap: 4px; width: max-content; max-width: 100%; }
.co-price { display: none; align-items: baseline; gap: 6px; color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.co-price b { color: var(--text); font-size: 2.25rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.co-sum:has(input[value="month"]:checked) .co-price[data-period="month"], .co-sum:has(input[value="year"]:checked) .co-price[data-period="year"] { display: flex; }
.co-totals { display: grid; gap: 8px; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--hair); font-variant-numeric: tabular-nums; }
.co-totals div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 0.875rem; }
.co-totals div[hidden] { display: none; }
.co-totals dd { margin: 0; color: var(--text); }
.co-totals .co-total { padding-top: 8px; border-top: 1px solid var(--hair); color: var(--text); font-weight: 800; font-size: 1rem; }
.co-then { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.co-then:empty { display: none; }
.co-trust { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.8125rem; }
.co-trust li { display: flex; gap: 8px; align-items: center; }
.co-trust .pr-ic { flex: none; }
.co-trust a { color: inherit; }
.co-pay { min-width: 0; padding: 8px; border: 1px solid var(--hair); border-radius: var(--r-3xl); background: var(--core); }
.co-fail { margin: 0; padding: 32px 16px; color: var(--muted); text-align: center; }
@media (max-width: 720px) { .co { grid-template-columns: minmax(0, 1fr); } .co-sum { padding: 18px; } .co-pay { padding: 0; border: 0; background: none; } }
.pr-compare > summary, .pr-q > summary, .ac-history > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.pr-compare h2 { margin: 0 0 8px; font-size: 1rem; font-weight: 800; }
.pr-faq { display: grid; border-top: 1px solid var(--hair); }
.pr-q { border-bottom: 1px solid var(--hair); }
.pr-q p { margin: 0 0 14px; color: var(--muted); }
@media (max-width: 480px) { .pr-card { padding: 18px; } }
.pr-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pr-table th, .pr-table td { padding: 12px 10px; text-align: center; border-bottom: 1px solid var(--hair); }
.pr-table tbody th { text-align: left; font-weight: 600; color: var(--text); }
.pr-table thead th { font-size: 1.125rem; font-weight: 800; vertical-align: top; }
.pr-table tfoot td { border-bottom: 0; padding-top: 16px; }
.pr-table .pr-pro { color: var(--gold); }
.pr-price { display: block; margin-top: 2px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.pr-price b { color: var(--text); font-size: 0.9375rem; }
.pr-pro .pr-price b { color: var(--gold); }
.pr-ic { width: 16px; height: 16px; vertical-align: -3px; }
.pr-ic.is-yes { color: var(--fresh); }
.pr-pro .pr-ic.is-yes { color: var(--gold); }
.pr-note { display: block; margin-top: 6px; white-space: normal; color: var(--muted); font-size: 0.75rem; }
.pr-no, .pr-soon, .pr-mine { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.pr-costs ul { display: grid; margin: 0; padding: 0; list-style: none; }
.pr-costs li, .ac-ledger li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.pr-costs li:last-child, .ac-ledger li:last-child { border-bottom: 0; }
.pr-safe { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 0.875rem; }
.ac-plan { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ac-plan > b { font-size: 1.125rem; }
.ac-plan-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.ac-warn { color: var(--warn); font-weight: 700; }
.ac-refund { position: relative; }
.ac-refund .menu-pop { width: min(320px, calc(100vw - 32px)); gap: 10px; padding: 12px; }
.ac-refund label, .foot-fb-pop label { display: grid; gap: 6px; font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.ac-refund textarea, .foot-fb-pop textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--hair-strong); background: var(--core); color: var(--text); font: inherit; resize: vertical; }
.ac-cr { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.ac-cr-big { display: inline-flex; align-items: center; gap: 6px; }
.ac-cr-big b { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ac-cr-big .cr-mark { width: 26px; height: 26px; margin: 0; }
.ac-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.ac-facts li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-xl); font-size: 0.8125rem; }
.ac-facts span { color: var(--muted); font-size: 0.75rem; }
@media (max-width: 480px) { .ac-facts { grid-template-columns: minmax(0, 1fr); } }
.ac-month { margin: 12px 0 0; font-weight: 700; }
.ac-history { margin-top: 4px; }
.ac-ledger { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.8125rem; }
.pr-table td { white-space: nowrap; }
@media (max-width: 480px) { .pr-table th, .pr-table td { padding: 10px 4px; font-size: 0.875rem; } .pr-table thead th { font-size: 1rem; } .pr-price b { display: block; } }
.cr-allowance { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.evo-tasks > p { margin: 0; color: var(--muted); font-size: 0.7812rem; line-height: 1.45; }
.evo-fork-name { margin: 0; color: var(--gold); font-size: 0.7812rem; font-weight: 700; }
.evo-elig-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 6px; }
.evo-elig-tools > .evo-search { margin: 0; }
.evo-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.evo-picks-sm { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 14px; margin-top: 12px; }
.evo-pick > a { display: block; border-radius: var(--r-2xl); transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .evo-pick > a:hover { transform: translateY(-6px) scale(1.03); } }
.evo-pick > a > .item-card { width: 100%; }
.evo-more { margin-top: 16px; }
.evo-slot { display: block; margin-top: 6px; color: var(--muted); font-size: 0.75rem; text-align: center; }
.evo-ready { color: var(--fresh); }
.evo-ready > .glyph { width: 22px; height: 22px; }
.evo-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; margin: 12px 0 0; padding: 0; list-style: none; }
.evo-mine-card { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--hair); border-radius: var(--r-2xl); }
.evo-mine-card:not(:has(.evo-mine-art)) { grid-template-columns: minmax(0, 1fr); }
.evo-mine-art { display: block; border-radius: var(--r-xl); }
.evo-mine-art > .item-card { width: 100%; }
.evo-mine-body { display: grid; align-content: center; gap: 10px; min-width: 0; }
.evo-mine-body > h3 { margin: 0; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.evo-mine-lvl { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
.evo-mine-lvl > i { height: 6px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.08); }
.evo-mine-lvl > i.done { background: var(--gold); }
.evo-mine-lvl > i.now { background: rgba(242, 193, 78, 0.45); }

/* planner */
.evo-player { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin: 4px 0 16px; }
.evo-player-cards > .evo-ba > .item-card { width: 140px; }
.evo-player-meta { display: grid; gap: 6px; }
.evo-player-meta > .page-h1 > a { color: inherit; text-decoration: none; }
.evo-player-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: 0.8125rem; }
.evo-player-sub > b { color: var(--text); font-size: 1.125rem; }
.evo-pos { padding: 2px 8px; border: 1px solid var(--hair); border-radius: var(--r-sm); color: var(--text); font-size: 0.75rem; font-weight: 700; }
.evo-chainbar { display: grid; gap: 10px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--hair); border-radius: var(--r-panel-s); background: rgba(10, 12, 17, .9); }
.evo-chainbar-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.evo-chainbar-head > h2 { font-size: 0.9375rem; font-weight: 800; }
.evo-chainbar-head > h2 > span, .evo-chainbar-meta { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.evo-chainbar-head > .evo-build-link { margin-left: auto; }
.evb-want { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.evo-lvl { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.evo-step { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 4px 0 12px; border: 1px solid rgba(63, 207, 142, 0.35); border-radius: var(--r-md); background: rgba(63, 207, 142, 0.12); font-size: 0.8125rem; font-weight: 700; }
.evo-step > small { color: var(--gold); font-size: 0.7188rem; font-weight: 700; }
.evo-clear { height: 34px; margin-left: auto; padding: 0 14px; font-size: 0.8125rem; }
.evo-step-x > .glyph { width: 16px; height: 16px; }
.evo-step-alt, .evo-step-x { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: var(--r-sm); color: var(--muted); font-weight: 800; text-decoration: none; }
.evo-step-alt:hover, .evo-step-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.evo-step-x { color: #C98A8A; }  /* remove: its own trash icon in a muted red, never mistaken for the A/B path pills */
.evo-step-x:hover { color: #FF8A8A; background: rgba(255, 138, 138, 0.12); }
.evo-step-paths { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: rgba(0, 0, 0, 0.3); }
.evo-step-alt.is-on { background: var(--gold-grad); color: #1A1204; }
.evo-alert { margin: 0; padding: 8px 12px; border: 1px solid rgba(255, 159, 67, 0.5); border-radius: var(--r-lg); font-size: 0.8125rem; }
.evo-recs { margin-bottom: 18px; }
.evo-rec-list, .evo-avail-list, .evo-bars { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.evo-rec-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--hair); border-radius: var(--r-2xl); }
.evo-rec-list > .evo-rec-row:first-child { border-color: rgba(242, 193, 78, 0.35); }
.evo-rec-card { display: block; }
.evo-rec-card > .item-card { width: 88px; }
.evo-rec-body { display: grid; gap: 6px; min-width: 0; }
.evo-chain-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 0.875rem; font-weight: 800; }
.evo-chain-path > [aria-hidden] { color: var(--gold); }
.evo-chain-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.evo-chain-tags:empty { display: none; }
.evo-avail { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 14px; padding: 12px; border: 1px solid var(--hair); border-radius: var(--r-2xl); }
.evo-avail > .item-card { width: 96px; }
.evo-avail-body { display: grid; gap: 8px; min-width: 0; }
.evo-avail-body > h3 { display: flex; align-items: center; gap: 6px; font-size: 0.9375rem; font-weight: 800; }
.evo-avail-body > h3 > a { color: var(--text); text-decoration: none; }
.evo-avail-body > h3 > a:hover { text-decoration: underline; }
.evo-paths { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.evo-path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.evo-path > b { color: var(--gold); font-size: 0.7812rem; }
.evo-path > .btn { height: 36px; margin-left: auto; }
.evo-loose { display: grid; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.8125rem; }
.evo-synced { margin: -6px 0 14px; color: var(--muted); font-size: 0.7812rem; }
.evo-synced.is-stale { color: var(--warn); }
/* toggles: an .opt-seg pill that is a link; the pitch icon carries squad players, the spark carries cosmetic */
.evo-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--hair-strong); color: var(--muted); text-decoration: none; white-space: nowrap; }
.evo-toggle.is-on { border-color: rgba(242, 193, 78, 0.55); color: var(--gold); background: rgba(242, 193, 78, 0.12); }
.evo-toggle:hover { color: var(--text); }
.evo-toggle > .glyph { width: 18px; height: 18px; }
.evo-toggle > span { font-weight: 800; font-variant-numeric: tabular-nums; }
.evo-toggle > span:empty { display: none; }
/* My Evolutions rows: the card with the player's name under it, then the route of steps joined by long arrows */
.evo-rec-row { grid-template-columns: 96px minmax(0, 1fr) auto; align-items: start; }
.evo-rec-card { display: grid; justify-items: center; gap: 6px; color: var(--text); text-decoration: none; }
.evo-rec-card > .item-card { width: 96px; }
.evo-rec-name { max-width: 100%; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; font-weight: 800; }
.evo-route { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; margin: 0; }
.evo-route-step { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-md); background: var(--raise); font-size: 0.875rem; font-weight: 800; }
.evo-route .evo-arrow { width: 88px; margin: 0 6px; }
.evo-route .evo-arrow > svg { width: 76px; }
.evo-route > .evo-arrow:last-child { display: none; }
.evb-tile-title .evo-route { gap: 4px 2px; font-weight: 800; }
.evb-tile-title .evo-route-step { padding: 3px 8px; font-size: 0.8125rem; }
.evb-tile-title .evo-arrow { width: 48px; margin: 0 2px; }
.evb-tile-title .evo-arrow > svg { width: 40px; height: 18px; }
.evo-sp-ic { width: 16px; height: 16px; flex: none; }
@media (max-width: 520px) { .evo-rec-row { grid-template-columns: 96px minmax(0, 1fr); } .evo-rec-row > .btn { grid-column: 1 / -1; } .evo-route .evo-arrow { width: 60px; } .evo-route .evo-arrow > svg { width: 50px; } }
/* requirements on the detail page: a compact grid of small tiles, not a tall list */
.evo-panels .evo-req-list { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.evo-panels .evo-req-list > div { display: grid; align-content: start; gap: 2px; padding: 8px 10px; border: 1px solid var(--hair); border-radius: var(--r-lg); background: rgba(255, 255, 255, .03); }
.evo-panels .evo-req-list > div + div { border-top: 1px solid var(--hair); }
.evo-panels .evo-req-list dd { text-align: left; }
.evo-panels .evo-req-list dt { font-size: 0.6875rem; }

/* player-page panel */
.evo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-xl); }
.evo-bar > a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--text); font-weight: 800; text-decoration: none; }
.evo-bar > a:hover { text-decoration: underline; }
.evo-bar > .evo-meta { margin-left: auto; }
.evo-why { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.8125rem; }
@media (max-width: 860px) {
  .evo-panels { grid-template-columns: minmax(0, 1fr); }
  .page-head:has(> .evo-head-actions) { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .evo-ba > .item-card { width: 96px; }
  .evo-grid .evo-ba > .item-card, .evo-grid .evo-card.cosmetic .evo-ba > .item-card { width: 118px; }
  .evo-player-cards > .evo-ba > .item-card, .evb-aside .evo-player-cards > .evo-ba > .item-card { width: 108px; }
  .evo-rec-row > .btn { justify-self: start; }
  .evo-avail { grid-template-columns: 76px minmax(0, 1fr); }
  .evo-avail > .item-card { width: 76px; }
  .evo-path > .btn { margin-left: 0; }
  .evo-req-pop { right: -8px; min-width: 210px; }
}
/* Club page: protection */
.tag.prot { color: var(--text); border-color: var(--hair-strong); }

/* Price history (player detail): one smooth gold line over a faint fill; hover, touch or arrow keys read a day. */
.ph .pd-panel-head { align-items: baseline; }
.ph-range { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.ph-sum { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0 0 12px; }
.ph-sum div { display: grid; gap: 2px; }
.ph-sum dt { color: var(--muted); font-size: 0.75rem; }
.ph-sum dd { margin: 0; display: flex; align-items: center; gap: 5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ph-sum .coin { width: 14px; height: 14px; }
.ph-week.is-up dd { color: var(--fresh); } .ph-week.is-down dd { color: var(--s-poor); }
.ph-plot { position: relative; touch-action: pan-y; border-radius: var(--r-sm); }
.ph-plot:focus-visible { outline: 2px solid var(--chalk); outline-offset: 4px; }
.ph-chart { display: block; width: 100%; height: auto; overflow: visible; }
.ph-grid line { stroke: var(--hair); }
.ph-chart text { fill: var(--muted); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.ph-area { fill: url(#ph-fill); }
.ph-line { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ph-guide { stroke: var(--hair-strong); stroke-dasharray: 3 3; }
.ph-dot { fill: var(--gold); stroke: var(--core); stroke-width: 2; }
.ph-guide, .ph-dot, .ph-tip { visibility: hidden; }
.ph-plot.is-on .ph-guide, .ph-plot.is-on .ph-dot, .ph-plot.is-on .ph-tip { visibility: visible; }
.ph-tip { position: absolute; z-index: 2; left: var(--x, 0); top: var(--y, 0); transform: translate(-50%, calc(-100% - 12px)); display: grid; gap: 1px;
  padding: 6px 10px; border: 1px solid var(--hair-strong); border-radius: var(--r-md); background: #11141B; white-space: nowrap; pointer-events: none;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .8); font-size: 0.75rem; color: var(--muted); }
.ph-tip b { color: var(--text); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.ph-tip.at-start { transform: translate(-12px, calc(-100% - 12px)); } .ph-tip.at-end { transform: translate(calc(-100% + 12px), calc(-100% - 12px)); }
.ph-empty { color: var(--muted); font-size: 0.875rem; }
.sbc-policy.seg[hidden] { display: none; }
.sbc-policy button { font-size: 0.7188rem; }
.ph-line, .ph-grid line, .ph-guide, .ph-dot { vector-effect: non-scaling-stroke; }
@media (max-width: 600px) { .ph-chart text { font-size: 1.3125rem; } .ph-dot { r: 8px; } }

/* Saved squads dialog: a solid bezel-core panel (no glass, DESIGN.md); the list is the content, the form is one row. */
.sq-saved { width: min(440px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 48px)); padding: 18px; color: var(--text);
  background: var(--core); border: 1px solid var(--hair); border-radius: var(--r-panel); }
.sq-saved { max-height: min(560px, calc(100dvh - 48px)); }
.sq-saved::backdrop { background: rgba(6, 7, 10, .72); }
.sq-saved-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sq-saved-head h2 { font-size: 1.0625rem; font-weight: 800; }
.sq-saved-note { margin: 6px 0 14px; color: var(--muted); font-size: 0.8125rem; }
.sq-saved-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.sq-saved-form label { flex-basis: 100%; color: var(--muted); font-size: 0.75rem; }
.sq-saved-form input { flex: 1 1 180px; min-height: 44px; padding: 0 12px; color: var(--text); background: var(--raise);
  border: 1px solid var(--hair); border-radius: var(--r-lg); font: inherit; }
.sq-saved-form .btn-sm { min-height: 44px; }
.sq-saved-list { display: grid; gap: 6px; list-style: none; padding: 0; margin: 0; }
.sq-saved-list li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-xl); }
.sq-saved-list li > div { display: grid; flex: 1; min-width: 0; }
.sq-saved-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-saved-list span { color: var(--muted); font-size: 0.75rem; }
.sq-saved-list .sq-saved-empty { display: block; color: var(--muted); font-size: 0.875rem; border-style: dashed; }

/* Season Pass + Objectives (objectives_pages.py). Same material as SBC panels; gold hairline marks the paid track. */
/* ---------- Objectives and the expiry pill (objectives_pages.py, expiry.py, requirements.py) ---------- */
.exp { display: inline-flex; align-items: center; flex: none; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07);
  color: var(--muted); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.exp.is-soon { background: rgba(242, 164, 58, .16); color: #F2A43A; }
.exp.is-urgent { background: rgba(255, 107, 107, .16); color: #FF7A7A; }
.ob-bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 18px; }
.ob-bar-row .page-chips { margin: 0; }
.ob-tools { margin: 0; }
.ob-split { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.ob-side { position: sticky; top: calc(96px + env(safe-area-inset-top)); display: grid; gap: 10px; }
.ob-list { max-height: calc(100vh - 190px - env(safe-area-inset-top)); overflow: auto; padding: 6px; border: 1px solid var(--hair); border-radius: var(--r-panel); background: var(--core); scrollbar-width: thin; }
.ob-list { max-height: calc(100dvh - 190px - env(safe-area-inset-top)); overflow: auto; padding: 6px; border: 1px solid var(--hair); border-radius: var(--r-panel); background: var(--core); scrollbar-width: thin; }
.ob-list ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.ob-item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: var(--r-xl); color: inherit; text-decoration: none; }
.ob-item:hover { background: rgba(255, 255, 255, .05); }
.ob-item[aria-current="true"] { background: var(--raise); box-shadow: inset 0 0 0 1px var(--hair-strong); }
.ob-item.is-done { background: rgba(63, 207, 142, .08); }
.ob-item.is-done[aria-current="true"] { box-shadow: inset 0 0 0 1px rgba(63, 207, 142, .4); }
.ob-item:focus-visible { outline: 2px solid var(--chalk); outline-offset: -2px; }
.ob-txt { display: grid; gap: 2px; min-width: 0; }
.ob-txt b { font-size: 0.9062rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ob-meta { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.ob-item.is-done .ob-meta { color: var(--fresh); }
.ob-bar { position: relative; grid-column: 1 / -1; height: 3px; overflow: hidden; border-radius: var(--r-pill); background: rgba(255, 255, 255, .1); }
.ob-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--fresh); }
.ob-detail { min-width: 0; padding: 20px; border: 1px solid var(--hair); border-radius: var(--r-core); background: var(--core); }
.ob-detail > header { display: grid; gap: 10px; margin: 0 0 16px; }
.ob-detail h2 { margin: 0; font-size: clamp(1.375rem, 2.4vw, 1.875rem); font-weight: 800; font-stretch: 115%; line-height: 1.15; overflow-wrap: anywhere; }
.ob-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.exp.is-done { background: rgba(63, 207, 142, .16); color: var(--fresh); }
.ob-prize { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0 0 16px; padding: 14px 18px; border: 1px solid var(--hair-strong); border-radius: var(--r-3xl); background: rgba(255, 255, 255, .04); }
.ob-prize h3 { margin: 0; color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.ob-prize .ob-awards { justify-content: flex-start; }
.ob-prize { --w: 112px; --t: 60px; }
.ob-rows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ob-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 10px 14px; border: 1px solid var(--hair); border-radius: var(--r-xl); background: rgba(255, 255, 255, .025); }
.ob-rows.has-state .ob-task { grid-template-columns: 22px minmax(0, 1fr) auto; }
.ob-state { display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-pill); border: 2px solid var(--hair-strong); }
.ob-state .glyph { width: 14px; height: 14px; }
.ob-task.is-done { border-color: rgba(63, 207, 142, .45); background: rgba(63, 207, 142, .09); }
.ob-task.is-done .ob-state { border-color: var(--fresh); background: var(--fresh); color: #06150E; }
.ob-body { display: grid; gap: 3px; min-width: 0; }
.ob-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ob-head b { font-size: 0.9375rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ob-body p { margin: 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.4; }
.ob-body .ob-fit { margin: 0; color: var(--fresh); font-size: 0.8125rem; }
.ob-body .ob-fit.is-short { color: var(--warn); }
.rq-list { display: contents; list-style: none; }
.rq { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 1px 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); font-size: 0.7188rem; font-weight: 600; line-height: 1.2; }
.rq:has(.rq-ic) { padding-left: 3px; }
.rq b { color: var(--muted); font-size: inherit; font-weight: 600; }
.rq-ic { display: grid; place-items: center; width: 16px; height: 16px; flex: none; }
.rq-img { width: 14px; height: 14px; object-fit: contain; }
.rq-img.is-frame { width: 11px; height: 16px; }
.ob-awards { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: flex-end; row-gap: 10px; margin: 0; padding: 0; list-style: none; }
.ob-rows { --w: 116px; --t: 44px; }
.ob-awards .sp-tile { flex: none; width: var(--w); padding: 0 10px; text-align: center; }
.ob-awards .sp-tile + .sp-tile { border-left: 1px solid rgba(242, 193, 78, .35); }
.ob-awards .sp-tile:first-child { padding-left: 0; width: calc(var(--w) - 10px); }
.ob-awards .sp-tile:last-child { padding-right: 0; width: calc(var(--w) - 10px); }
.ob-awards .sp-tile:only-child { width: calc(var(--w) - 20px); }
.ob-awards .sp-tile > a { display: block; }
.ob-awards .sp-art { width: var(--t); margin: 0 auto; }
.ob-awards .sp-tile.is-player .sp-art { width: calc(var(--t) * 1.5); }
.ob-awards .sp-tile.is-chem .sp-art { width: calc(var(--t) * 1.15); }
.ob-awards .card-strip { display: none; }
.ob-awards .sp-tile > b, .ob-awards .sp-tile > a > b { height: auto; margin-top: 6px; overflow: visible; white-space: normal; text-overflow: clip; overflow-wrap: anywhere; font-size: 0.75rem; line-height: 1.25; }
.sort-pop .tool-btn.has-label { display: flex; align-items: center; gap: 8px; width: auto; padding: 0 14px 0 12px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.sort-pop .tool-btn.has-label .glyph { width: 18px; height: 18px; }
/* A chemistry-style consumable (rewards.chem_art): the game's card redrawn as one svg. */
.sp-chem { display: block; width: 100%; aspect-ratio: 525 / 725; }
.sp-chem svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.sp-chem text { font-family: var(--font); font-weight: 800; text-anchor: middle; fill: #2A1F0C; }
.sp-chem .off { fill-opacity: .4; }
.sp-gen { display: grid; place-items: center; width: 62%; aspect-ratio: 1; border-radius: var(--r-pill); border: 2px solid var(--hair-strong); background: rgba(255, 255, 255, .06);
  color: var(--gold); font-size: 0.9375rem; font-weight: 800; font-stretch: 115%; }
.sp-gen .glyph { width: 52%; height: 52%; }
@media (max-width: 900px) {
  .ob-split { grid-template-columns: minmax(0, 1fr); }
  .ob-side { position: static; }
  .ob-list { max-height: 300px; }
  .ob-detail { padding: 14px; }
  .ob-task { grid-template-columns: minmax(0, 1fr); }
  .ob-rows.has-state .ob-task { grid-template-columns: 22px minmax(0, 1fr); }
  .ob-task .ob-awards { grid-column: -2 / -1; justify-content: flex-start; }
}
.reward-mark { color: var(--gold); font-size: 0.9375rem; font-weight: 800; font-stretch: 115%; }

/* Promos list: one row per promo, newest first. Name leads; counts and dates are secondary. */
.promo-lede { margin: -4px 0 14px; color: var(--muted); font-size: 0.875rem; }
.promo-list { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.promo-row { display: flex; align-items: center; gap: 14px; min-height: 44px;
  padding: 14px 4px; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--text); text-decoration: none; transition: background-color 140ms var(--ease); }
.promo-row:hover { background: rgba(255, 255, 255, 0.04); }
.promo-art { display: flex; flex: none; min-width: 140px; }
.promo-art .item-card { width: 44px; margin-right: -6px; }
.promo-text { display: grid; gap: 2px; min-width: 0; }
.promo-row b { font-size: 1rem; font-weight: 800; }
.promo-text > span { color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .promo-art { min-width: 104px; } .promo-art .item-card { width: 36px; } }

/* UI pass 2026-10-07: tap targets. Every control is at least 24px everywhere (WCAG 2.5.8) and 44px on touch screens;
   the list table scrolls inside its panel instead of widening the page. */
.table-scroll { overflow-x: auto; }
.crumbs a { min-height: 32px; }
.linkish { display: inline-flex; align-items: center; min-height: 28px; }
.tc-share summary { display: flex; align-items: center; min-height: 32px; }
.slot-pos { min-height: 24px; }
input[type="range"] { height: 24px; }
.check input[type="checkbox"] { width: 18px; height: 18px; }
@media (pointer: coarse), (max-width: 720px) {
  .refresh-btn, .tool-btn, .star-btn { height: 44px; min-width: 44px; }
  .tool-btn, .star-btn, .xf-btn { width: 44px; height: 44px; }
  .seg a { min-height: 44px; min-width: 44px; }
  .crumbs a, .linkish, .tc-share summary { min-height: 44px; }
  /* six controls in one row on a phone: two icon buttons, then four equal text buttons; with large text they wrap
     instead of overlapping or pushing Code off the screen */
  .sq-actions { margin-left: 0; width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  .sq-actions > .btn-sm, .sq-actions > .sq-code { flex: 1 1 0; min-width: max-content; }
  .sq-actions > .sq-code > summary { width: 100%; }
  .sq-actions .btn-sm { padding: 0 6px; }
  .btn-sm, .icon-btn { min-height: 44px; min-width: 44px; }
  /* Squad Builder on a phone: the rail tabs, budget steps and search reach 44px; the card actions sit too close to grow
     that far, so each gets an invisible hit area as big as its neighbours allow (position labels: see button.slot-pos::before) */
  .rail-tabs button, .sq-find input, .sq-budget-add .chip { height: 44px; }
  .sq-budget-add .chip { min-width: 44px; }
  .pr-link { display: inline-flex; align-items: center; min-height: 44px; }
  .sq .sq-code-box .tc-import input { height: 44px; }   /* beats the compact box rule further down */
  .slot-acts { gap: 6px; }
  .slot-acts > * { position: relative; width: 34px; height: 34px; }
  .slot-acts > *::before { content: ""; position: absolute; inset: -3px -5px; }
}

@media (max-width: 1100px) { .nav-link { padding: 0 9px; } .wordmark { margin-right: 6px; } }
/* My Season (Season Pass page): the focal panel. Level and Season Points lead in display type; gold bar = progress to
   the next level; the facts answer "can I finish before the season ends". Reached levels go quiet, the next one is ringed. */
.my-season { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 28px; align-items: center; margin: 4px 0 14px;
  padding: 12px 18px; border: 1px solid rgba(242, 193, 78, .32); border-radius: var(--r-xl);
  background: radial-gradient(90% 200% at 0% 0%, rgba(242, 193, 78, .1), transparent 60%), var(--core); }
.ms-main { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "title bar" "title ends"; align-items: center; gap: 2px 16px; min-width: 0; }
.my-season h2 { grid-area: title; display: flex; align-items: center; gap: 12px; margin: 0; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.ms-badge { display: grid; place-items: center; align-content: center; flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(242, 193, 78, .22), rgba(242, 193, 78, .06)); box-shadow: inset 0 0 0 2px var(--gold); }
.ms-badge small { color: var(--gold); font-size: 0.5rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; line-height: 1; }
.ms-badge b { color: var(--text); font-size: 1.375rem; font-weight: 800; font-stretch: 125%; line-height: 1.05; font-variant-numeric: tabular-nums; }
.ms-sp { display: grid; gap: 1px; }
.ms-sp b { color: var(--text); font-size: 1.25rem; font-weight: 800; font-stretch: 115%; line-height: 1; font-variant-numeric: tabular-nums; }
.ms-bar { grid-area: bar; height: 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .08); overflow: hidden; }
.ms-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold-grad); }
.ms-ends { grid-area: ends; display: flex; justify-content: space-between; gap: 12px; margin: 0; color: var(--muted); font-size: 0.7188rem; font-weight: 700; }
.ms-facts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; }
.ms-facts div { display: flex; flex-direction: column-reverse; gap: 0; }
.ms-facts dt { color: var(--muted); font-size: 0.7188rem; }
.ms-facts dd { margin: 0; font-size: 0.9375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) { .my-season { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .my-season { padding: 12px 14px; } .ms-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "bar" "ends"; } .ms-facts { gap: 4px 18px; } }

/* ---------- My Club (club_pages.py), redesigned 2026-10-09 ----------
   Read: club home for an FUT grinder (what do I have, what is it worth, what can I do now). Focal point: the squad on
   the pitch. Gold only on money (value) and the one primary action per panel; rarity colours mark the card mix. */
.club-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; padding: 18px 0 14px; }
.club-head h1 { margin: 6px 0 8px; font-size: clamp(1.875rem, 4.4vw, 3.25rem); font-weight: 800; font-stretch: 120%; line-height: 1;
  color: var(--text); }
.ch-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; color: var(--muted); font-size: 0.875rem; }
.ch-coins { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ch-coins .coin { width: 20px; height: 20px; }
.ch-sync::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: var(--r-pill); background: var(--fresh); vertical-align: 1px; }
.ch-sync.stale { color: #D9B89A; } .ch-sync.stale::before { background: var(--warn); }
.club-tabs { margin: 0 0 18px; }

.club-band { display: grid; grid-template-columns: 1.1fr 1.6fr 1fr; margin: 0 0 22px; border: 1px solid var(--hair); border-radius: var(--r-panel-l); background: var(--core); overflow: hidden; }
.club-band > * { display: grid; align-content: start; gap: 6px; padding: 18px 20px; min-width: 0; }
.club-band > * + * { border-left: 1px solid var(--hair); }
.cb-l { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.cb-big { display: inline-flex; align-items: center; gap: 8px; font-size: 1.875rem; font-weight: 800; font-stretch: 115%; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cb-value .cb-big { color: var(--gold); }
.cb-big .coin { width: 24px; height: 24px; }
.cb-s { color: var(--muted); font-size: 0.8125rem; }
.cb-mix ul { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 2px 0 0; padding: 0; list-style: none; }
.cb-mix a { display: grid; justify-items: center; gap: 3px; min-width: 44px; color: var(--muted); font-size: 0.75rem; font-weight: 600; text-decoration: none; }
.mix-card { position: relative; display: grid; place-items: center; width: 44px; aspect-ratio: 576 / 800; transition: transform 300ms var(--ease); }
.mix-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mix-card b { position: relative; color: #fff; font-size: 0.9375rem; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0, 0, 0, .85), 0 0 8px rgba(0, 0, 0, .6); }
.cb-mix a:hover .mix-card { transform: translateY(-3px); }
.cb-mix a:hover { color: var(--text); }
.cb-fodder { color: var(--text); text-decoration: none; transition: background-color 300ms var(--ease); }
.cb-fodder:hover { background: rgba(255, 255, 255, .04); }

/* Squad left, every other card stacked right; the last side card takes the leftover height, so no column is left empty. */
.club-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.club-grid:has(> .club-side:empty) { grid-template-columns: minmax(0, 1fr); }
.club-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.club-side:empty { display: none; }
.club-side > :last-child { flex: 1; }
.club-squad .pitch-slot { width: 16.5%; }  /* bigger cards: the strip scales with the card, and the CometRating has to be readable */
.club-squad { align-self: start; position: sticky; top: calc(84px + env(safe-area-inset-top)); }
.club-squad, .club-hl, .club-evos, .fd-panel { padding: 18px; border: 1px solid var(--hair); border-radius: var(--r-panel-l); background: var(--core); }
.club-squad h2, .club-hl h2, .club-evos h2, .fd-panel h2 { font-size: 1.125rem; font-weight: 800; }
.cs-head, .sec-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.cs-head p, .sec-head p { margin-top: 4px; color: var(--muted); font-size: 0.8125rem; }
.cs-stats { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 0 0 10px; }
.cs-stats dt { color: var(--muted); font-size: 0.75rem; }
.cs-stats dd { margin: 2px 0 0; font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cs-stats small { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.seg-gain { margin-left: 6px; padding: 1px 6px; border-radius: var(--r-pill); background: rgba(79, 214, 140, .14); color: var(--fresh); font-size: 0.6875rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.club-hl ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.club-hl a { display: grid; justify-items: center; gap: 2px; height: 100%; padding: 12px 8px; border-radius: var(--r-2xl); color: var(--text); text-align: center;
  text-decoration: none; background: var(--raise); transition: background-color 300ms var(--ease); }
.club-hl a:hover { background: rgba(255, 255, 255, .06); }
.hl-card { width: 96px; margin-bottom: 6px; transition: transform 400ms var(--ease); }
.hl-card .item-card { width: 100%; }
.club-hl a:hover .hl-card { transform: translateY(-4px); }
.hl-k { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 0.75rem; }
.hl-k .glyph { width: 14px; height: 14px; flex: none; }
.hl-v { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.hl-v .coin { width: 14px; height: 14px; }
.hl-up { width: 13px; height: 13px; color: var(--fresh); stroke-width: 2.2; }
.club-hl a > b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; }
.hl-v { color: var(--gold); font-size: 0.7812rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.club-evos ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; margin: 0; padding: 0; list-style: none; }
.club-evos li { display: grid; justify-items: center; align-content: start; gap: 6px; min-width: 0; text-align: center; }
.club-evos li > :first-child { width: 96px; }
.club-evos li > b { font-size: 0.8125rem; }
.ev-s { color: var(--muted); font-size: 0.75rem; } .ev-s.is-ready { color: var(--fresh); font-weight: 700; }

.fd-lede { margin: -6px 0 16px; color: var(--muted); font-size: 0.875rem; }
.fd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; align-items: start; }
.fd-sum { display: flex; gap: 28px; margin: 0 0 12px; }
.fd-sum dt { color: var(--muted); font-size: 0.75rem; }
.fd-sum dd { margin: 2px 0 0; font-size: 1.75rem; font-weight: 800; font-stretch: 115%; font-variant-numeric: tabular-nums; }
.fd-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.fd-table th, .fd-table td { padding: 10px 8px; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: middle; }
.fd-table thead th { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.fd-table tbody th { font-weight: 600; }
.fd-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.fd-table small { color: var(--muted); }
.fd-table a { color: var(--text); font-weight: 700; text-decoration: none; }
.fd-table a:hover { color: var(--gold); }
.fd-r { display: inline-block; min-width: 28px; margin-right: 8px; color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.fd-used { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.fd-need { color: var(--warn); font-size: 0.8125rem; font-weight: 700; white-space: nowrap; }
.fd-empty { color: var(--muted); font-size: 0.875rem; }

@media (max-width: 1100px) { .club-grid, .fd-grid { grid-template-columns: minmax(0, 1fr); } .club-squad { position: static; } }
@media (max-width: 720px) {
  .club-band { grid-template-columns: 1fr; }
  .club-band > * + * { border-left: 0; border-top: 1px solid var(--hair); }
  .club-hl ul { grid-template-columns: 1fr; }
  .club-squad, .club-hl, .club-evos, .fd-panel { padding: 14px; border-radius: var(--r-panel-s); }
}
.fd-table tbody tr:has(a) { position: relative; }
.fd-table tbody tr:has(a):hover { background: rgba(255, 255, 255, .03); }
.fd-table th a::after { content: ""; position: absolute; inset: 0; } /* the whole row opens the challenge */
.fd-table tbody tr:has(a:focus-visible) { outline: 2px solid var(--chalk); outline-offset: -2px; }
.fd-table th a:focus-visible { outline: none; }
.club-head > .btn-sm { margin-bottom: 6px; }

/* Players: location chips left, search / Filters / Sort right; the filter dropdown is a GET form like the SBC list. */
.club-bar { flex-wrap: wrap; justify-content: space-between; margin-bottom: 10px; }
.club-tools { margin-left: auto; }
.tool-count { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-pill); background: var(--gold); color: #06070A; font-size: 0.6562rem; font-weight: 800; }
.cf-pop { width: min(360px, calc(100vw - 32px)); gap: 12px; padding: 12px 14px 14px; }
.cf-field { display: grid; gap: 6px; }
.cf-field select { height: 40px; padding: 0 10px; border-radius: var(--r-lg); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font-size: 0.8125rem; }
.cf-field .xf-range { display: flex; align-items: center; gap: 8px; }
.cf-field .xf-range input { width: 100%; height: 40px; padding: 0 10px; border-radius: var(--r-lg); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font-size: 0.8125rem; }
.cf-field .xf-range i { width: 10px; height: 1px; background: var(--hair-strong); flex: none; }
.cf-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-3xl); background: var(--raise); }
.cf-seg .opt-seg { flex: 1 1 auto; min-height: 32px; padding: 0 12px; white-space: nowrap; }  /* wraps as whole pills, never mid-label */
.cf-acts { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.cp-sum { margin: 0 0 12px; color: var(--muted); font-size: 0.8125rem; }
.cp-sum b { color: var(--text); }
.cp-clear { color: var(--gold); font-weight: 700; }

/* The protection lock sits on the card's top-right corner; its tooltip says what it protects against. */
.tile.has-lock { position: relative; }
.tile-lock { position: absolute; top: -6px; right: 7%; z-index: 3; } /* the frame art is inset ~10% in the card box */
.lock-btn { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: var(--r-pill); border: 1px solid var(--hair-strong);
  background: #12151C; color: var(--muted); cursor: pointer; transition: color 200ms var(--ease), border-color 200ms var(--ease); }
.lock-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lock-btn[aria-pressed="true"] { color: var(--gold); border-color: rgba(242, 193, 78, .55); }
.lock-btn:hover { color: var(--text); border-color: var(--gold); }
.lock-btn:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.lock-btn::after { position: absolute; top: calc(100% + 8px); right: -4px; width: 210px; padding: 8px 10px; border-radius: var(--r-md);
  border: 1px solid var(--hair-strong); background: #12151C; color: var(--text); font-size: 0.75rem; font-weight: 600; line-height: 1.35; text-align: left;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .8); opacity: 0; visibility: hidden; transition: opacity 160ms var(--ease); pointer-events: none; }
.lock-btn:hover::after, .lock-btn:focus-visible::after { content: attr(data-tip); opacity: 1; visibility: visible; }
@media (pointer: coarse), (max-width: 720px) { .lock-btn { width: 44px; height: 44px; } .tile-lock { top: -12px; right: 3%; } .club-hl ul { gap: 8px; } }
.mix-card:not(:has(img)) { border-radius: var(--r-sm); border: 1px solid var(--hair-strong); background: var(--raise); }
@media (max-width: 720px) { .club-tools { position: relative; } .club-filter { position: static; } } /* the dropdown anchors to the toolbar edge, inside the screen */
.pd-evo { justify-content: center; width: 100%; }

/* My Club > Tactics */
.tag-soon { margin-left: 4px; padding: 1px 7px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); color: var(--muted); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; }  /* a feature still being built (ui.SOON_TAG) */
/* A feature's Coming soon page (ui.soon_page): centred name, one line, what it does, Sign in, framed screenshots. */
.soon-page { display: grid; justify-items: center; gap: 18px; max-width: 980px; margin: 0 auto; padding: 32px 0 48px; text-align: center; }
.soon-h1 { margin: 0; font-size: clamp(2.125rem, 6vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.soon-line { margin: 0; color: var(--muted); font-size: 1rem; }
.soon-badge { margin-top: -6px; padding: 6px 16px; border-radius: var(--r-pill); border: 1px solid var(--gl-gold-line, rgba(242, 193, 78, 0.45)); background: rgba(242, 193, 78, 0.12); color: var(--gold); font-size: 0.875rem; font-weight: 800; letter-spacing: 0.02em; }
.soon-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.soon-list li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--hair); border-radius: var(--r-md); background: var(--raise); font-size: 0.875rem; font-weight: 600; }
.soon-list .icon-sm { color: var(--gold); flex: none; }
.soon-cta { margin-top: 4px; }
/* Gallery's Coming soon demo: fill a Set, climb the grades, earn tokens; runs once while .is-play is on, else the finished picture */
.gs-demo { display: grid; justify-items: center; gap: 16px; width: min(640px, 100%); margin: 8px 0 0; }
.gs-beats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: beat; }
.gs-beats li { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 0.875rem; font-weight: 700; counter-increment: beat; }
.gs-beats li::before { content: counter(beat); display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-pill); background: var(--gold); color: var(--core); font-size: 0.75rem; font-weight: 800; }
.gs-stage { display: grid; justify-items: center; gap: 24px; width: 100%; padding: 24px 16px; border: 1px solid var(--gl-gold-line); border-radius: var(--r-panel-s); background: var(--gl-panel); }
.gs-slots { display: flex; justify-content: center; gap: 8px; }
.gs-slot { display: grid; place-items: center; width: 56px; height: 78px; color: var(--muted); }
.gs-slot img { height: 100%; width: auto; } .gs-slot .glyph { width: 28px; height: 28px; }
.gs-climb { display: grid; gap: 12px; width: min(100%, 360px); }
.gs-bar { display: block; height: 8px; border-radius: var(--r-pill); background: var(--gl-wash-2); overflow: hidden; }
.gs-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); transform-origin: left; }
.gs-grades { display: flex; justify-content: space-between; } .gs-gr .gd { width: 40px; height: 40px; }
.gs-tokens { display: inline-flex; align-items: center; gap: 12px; } .gs-tokens img { width: 44px; height: 44px; }
.gs-count { font-size: 2rem; font-weight: 800; font-stretch: 110%; line-height: 1; font-variant-numeric: tabular-nums; }
.gs-tokens span { color: var(--muted); font-size: 0.875rem; font-weight: 700; }
.gs-demo.is-play .gs-beats li { animation: gs-dim 0.3s var(--ease) calc(var(--i) * 2.7s) backwards; }
.gs-demo.is-play .gs-slot { animation: gs-pop 0.45s var(--ease) calc(0.3s + var(--i) * 0.35s) backwards; }
.gs-demo.is-play .gs-bar i { animation: gs-fill 2.8s cubic-bezier(0.2, 0.7, 0.3, 1) 2.6s backwards; }
.gs-demo.is-play .gs-gr { animation: gs-lit 0.4s var(--ease) calc(2.6s + (var(--i) + 1) * 0.52s) backwards; }
.gs-demo.is-play .gs-tokens { animation: gs-pop 0.5s var(--ease) 5.4s backwards; }
@keyframes gs-dim { from { opacity: 0.3; } }
@keyframes gs-pop { from { opacity: 0; transform: translateY(14px) scale(0.9); } }
@keyframes gs-fill { from { transform: scaleX(0); } }
@keyframes gs-lit { from { opacity: 0.3; filter: grayscale(1); transform: scale(0.85); } }
@media (prefers-reduced-motion: reduce) { .gs-demo.is-play * { animation: none !important; } }
.soon-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; width: 100%; margin-top: 14px; }
.soon-shot { margin: 0; padding: 6px; border: 1px solid var(--hair-strong); border-radius: var(--r-lg); background: var(--raise); }
.soon-shot img { display: block; width: 100%; height: auto; border-radius: calc(var(--r-lg) - 4px); }
/* The owner sees a switched-off feature: a fixed corner marker, links to the switch. */
.owner-preview { position: fixed; right: 14px; bottom: 14px; z-index: 60; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid rgba(242, 193, 78, 0.45); border-radius: var(--r-pill); background: var(--bg); color: var(--gold); font-size: 0.75rem; font-weight: 700; text-decoration: none; }
.tag-pro { padding: 1px 7px; border-radius: var(--r-pill); border: 1px solid rgba(242, 193, 78, 0.45); color: var(--gold); font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.chip[aria-current] .tag-pro { color: #1A1204; border-color: rgba(26, 18, 4, 0.4); }
.tt-status { margin: 0 0 16px; font-size: 0.875rem; }
.tt-wait { display: grid; justify-items: center; gap: 10px; padding: 64px 20px; text-align: center; }
.tt-wait h2 { margin: 4px 0 0; font-size: 1.375rem; }
.tt-wait p { margin: 0; color: var(--muted); }
.tt-bar { width: min(420px, 100%); height: 6px; overflow: hidden; border-radius: var(--r-pill); background: var(--raise); }
.tt-bar i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--gold); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 400ms var(--ease); }
.tt-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.tt-rail { position: sticky; top: calc(100px + env(safe-area-inset-top)); display: grid; gap: 6px; max-height: calc(100vh - 120px - env(safe-area-inset-top)); overflow: auto; padding: 2px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--hair-strong) transparent; }
.tt-rail { position: sticky; top: calc(100px + env(safe-area-inset-top)); display: grid; gap: 6px; max-height: calc(100dvh - 120px - env(safe-area-inset-top)); overflow: auto; padding: 2px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--hair-strong) transparent; }
.tt-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 1px solid var(--hair); border-radius: var(--r-xl); background: var(--core); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.tt-row b { font-size: 1rem; font-weight: 800; font-stretch: 115%; white-space: nowrap; }
.tt-row:hover, .tt-row:focus-visible { border-color: var(--hair-strong); background: var(--raise); }
.tt-row:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.tt-row[aria-pressed="true"] { border-color: var(--gold); background: var(--raise); }
.tt-row.is-best { border-color: rgba(63, 207, 142, 0.55); }
.tt-row.is-best[aria-pressed="true"] { border-color: var(--gold); }
.tt-mini { width: 32px; height: 40px; }
.tt-mini rect { fill: none; stroke: var(--hair-strong); stroke-width: 2; }
.tt-mini circle { fill: var(--muted); }
.tt-row[aria-pressed="true"] .tt-mini circle { fill: var(--gold); }
.tt-fit { color: var(--muted); font-size: 0.8125rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tt-row.is-best .tt-fit { color: var(--fresh); }
.tt-row[aria-pressed="true"] .tt-fit { color: var(--gold); }
.tt-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.tt-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tt-head h2 { margin: 0; font-size: 2.125rem; font-weight: 800; font-stretch: 115%; line-height: 1; }
.tt-best { padding: 4px 10px; border-radius: var(--r-pill); background: rgba(63, 207, 142, 0.14); color: var(--fresh); font-size: 0.75rem; font-weight: 800; }
.tt-code { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tt-code code { padding: 8px 12px; border-radius: var(--r-lg); border: 1px solid var(--hair-strong); background: var(--raise); font-size: 1.0625rem; letter-spacing: 0.05em; user-select: all; }
.tt-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 16px 0; }
.tt-kpis div { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-lg); border: 1px solid var(--hair); background: var(--raise); }
.tt-kpis dt { color: var(--muted); font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tt-kpis dd { margin: 0; font-size: 1.125rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tt-loading { display: grid; place-items: center; min-height: 420px; margin: 0; border: 1px dashed var(--hair); border-radius: var(--r-2xl); }
.tt-pitch { container-type: inline-size; }
.tt-pitch .pitch { aspect-ratio: 100 / 112; width: 100%; max-width: 860px; margin-inline: auto; }
.tt-pitch .pitch-slot { width: 13%; }
@container (max-width: 760px) { .tt-pitch .slot-focus { display: none; } }
@container (max-width: 480px) { .tt-pitch .slot-pos small, .tt-pitch .pips { display: none; } }
@media (max-width: 980px) {
  .tt-layout { grid-template-columns: minmax(0, 1fr); }
  .tt-rail { position: static; display: flex; max-height: none; padding-bottom: 8px; overflow-x: auto; scroll-snap-type: x proximity; }
  .tt-row { flex: 0 0 auto; scroll-snap-align: start; }
}
@media (max-width: 760px) { .tt-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tt-head h2 { font-size: 1.75rem; } }
.tt-pitch .slot { grid-template-columns: minmax(0, 1fr); }  /* a long role label must not widen the column and the card with it */
.tt-pitch .slot-foot { justify-self: center; white-space: nowrap; }
/* Squad Builder: upgrades */
.sq-upgrades { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--hair); }
.sq-upgrades .sq-label { margin: 0; }
.sq-upgrades .fine { margin: 0; }
.up-chip { margin-left: 2px; padding: 0 5px; border-radius: var(--r-pill); background: rgba(63, 207, 142, 0.16); color: var(--fresh); font-size: 0.6875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.pc-grid .sq-up-head { display: flex; align-items: baseline; gap: 8px; grid-column: 1 / -1; margin: 2px 2px -4px; font-size: 0.7812rem; }
.pc-grid .sq-up-head small { color: var(--muted); }
.pc-grid .sq-up-rest { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--hair); }
.pc-grid .sq-up-row { grid-column: 1 / -1; min-width: 0; }
.sq-up-scroll { display: flex; gap: 8px; margin: 0; padding: 2px 2px 8px; list-style: none; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.sq-up-scroll:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; border-radius: var(--r-lg); }
.sq-up-scroll > li { flex: 0 0 calc((100% - 16px) / 3); min-width: 96px; scroll-snap-align: start; }
.is-up .pc-foot > .holo-mark { width: 12px; height: 12px; margin-left: 2px; }
.pc-grid .is-up .pc { padding: 6px 4px 8px; border-radius: var(--r-xl); background: rgba(63, 207, 142, 0.07); box-shadow: inset 0 0 0 1px rgba(63, 207, 142, 0.35); }
.up-cap { color: var(--muted); font-size: 0.6875rem; line-height: 1.35; text-align: center; font-variant-numeric: tabular-nums; }
.up-cap b { color: var(--fresh); }
.up-cap .coin { width: 11px; height: 11px; vertical-align: -1px; }
/* Every pitch: a long role label must not widen its column (the card is width: 100% of it); labels shorten with the pitch */
.pitch { container: pitch / inline-size; width: 100%; }  /* containment drops content sizing: keep the pitch filling its box */
.pitch .slot { grid-template-columns: minmax(0, 1fr); }
.pitch .slot-foot { justify-self: center; white-space: nowrap; }
@container (max-width: 700px) { .pitch .slot-focus { display: none; } }
@container (max-width: 440px) { .pitch .slot-pos small { display: none; } }
/* Phone Squad Builder: skill moves and weak foot pushed the strip past the ~56px card into the next card and label; the CometRating stays */
@container pitch (max-width: 520px) { .sq .pitch .cs-items > span:not(.cs-nr) { display: none; } }
.ob-fit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cf-field input[type="date"] { height: 40px; padding: 0 10px; border-radius: var(--r-lg); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font-size: 0.8125rem; color-scheme: dark; }
.cs-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.cs-head { align-items: center; }
/* My Club tiles: tradeable or not, as an icon on the card's top-left (the lock sits top-right) */
.tile.has-lock { position: relative; }
/* The game's trade mark in white: a ring, two arrows; untradeable adds a bar with a gap (.cut is the background colour, so keep it equal to the disc) */
.trade-ic { --trade-back: rgba(12, 15, 20, 0.88); position: absolute; top: -6px; left: 7%; z-index: 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--trade-back); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55); }
.trade-ic svg { width: 24px; height: 24px; fill: currentColor; stroke: none; }
.trade-ic .ring, .pill-locked .ring { fill: none; stroke: currentColor; stroke-width: 1.9; }
.trade-ic .cut { fill: none; stroke: rgb(12, 15, 20); stroke-width: 5.6; stroke-linecap: butt; }
.trade-ic .bar, .pill-locked .bar { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: butt; }
/* Under a My Club card: the same mark, grayed, in the price pill's place (its .cut matches the pill's own background) */
.pill.pill-locked { padding: 0 10px; border-color: var(--hair); color: var(--muted); }
.pill-locked svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.pill-locked .cut { fill: none; stroke: var(--raise); stroke-width: 5.6; stroke-linecap: butt; }
.ic-chip { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); color: var(--muted); vertical-align: middle; }
.ic-chip .glyph { width: 14px; height: 14px; }
.ic-chip.is-good { border-color: rgba(79, 214, 140, .45); color: var(--fresh); }
.ic-chip.is-gold { border-color: rgba(242, 193, 78, .5); color: var(--gold); }
.reward-label .trade-ic { position: relative; top: auto; left: auto; width: 24px; height: 24px; } .reward-label .trade-ic svg { width: 20px; height: 20px; }
/* One dropdown for the app (static/ui-select.js): the native select stays for forms, hidden; this is what people use */
.ui-select { position: relative; display: inline-flex; min-width: 0; }
.ui-select > select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.ui-select-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 36px; padding: 0 12px 0 14px;
  border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font: inherit; font-size: 0.8125rem; font-weight: 700;
  white-space: nowrap; cursor: pointer; transition: border-color 200ms var(--ease); }
.ui-select-btn:hover, .ui-select-btn[aria-expanded="true"] { border-color: var(--gold); }
.ui-select-btn:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.ui-select-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ui-select-val { overflow: hidden; text-overflow: ellipsis; }
.ui-select-btn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease); }
.ui-select-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.ui-select-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; display: grid; min-width: 100%; width: max-content; max-width: min(320px, 90vw);
  max-height: 300px; overflow: auto; margin: 0; padding: 6px; list-style: none; border-radius: var(--r-2xl); border: 1px solid var(--hair-strong);
  background: #12151C; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8); outline: none; scrollbar-width: thin; scrollbar-color: var(--hair-strong) transparent; }
.ui-select-list[hidden] { display: none; }
.ui-select.is-up .ui-select-list { top: auto; bottom: calc(100% + 6px); }
.ui-select-list [role=option] { padding: 8px 12px; border-radius: var(--r-md); font-size: 0.8125rem; cursor: pointer; white-space: nowrap; }
.ui-select-list [role=option]:hover, .ui-select-list .is-active { background: rgba(255, 255, 255, 0.07); }
.ui-select-list [aria-selected="true"] { color: var(--gold); font-weight: 700; }
.ui-select-list [aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.ui-select-group { padding: 8px 12px 4px; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.01em; }
.ui-select-ic { width: 18px; height: 18px; flex: none; object-fit: contain; }
.ui-select-list:has(.ui-select-flag) { max-width: min(420px, 92vw); }  /* name, then the flag: room for both */
.ui-select-flag { width: 20px; height: 14px; flex: none; margin-left: auto; padding-left: 10px; box-sizing: content-box; object-fit: contain; }
.ui-select-list [role=option]:is(:has(.ui-select-ic), :has(.ui-select-flag)), .ui-select-btn:has(.ui-select-ic) { display: flex; align-items: center; gap: 8px; }
.ui-select-btn:has(.ui-select-ic) .ui-select-val { flex: 1; margin-right: auto; text-align: left; }
.ui-select-list:has(.ui-select-find) { max-height: 320px; overflow: auto; }
.ui-select-find { position: sticky; top: 0; z-index: 1; padding: 0 0 6px; background: var(--core); }
.ui-select-find input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--hair-strong); border-radius: var(--r-md); background: var(--raise); color: var(--text); font: inherit; font-size: 0.8125rem; }
.cf-field .ui-select { display: flex; }
.cf-field .ui-select-btn { height: 40px; border-radius: var(--r-lg); font-weight: 600; }
.formation-pick .ui-select-btn { min-width: 150px; justify-content: flex-start; gap: 10px; border-color: var(--pick-line); background: var(--pick-bg); color: var(--pick-ink); font-weight: 800; }
.formation-pick select { min-width: 150px; }  /* the native select is the button's size before ui-select.js swaps it in: no layout shift */
/* Formations by back line: one hue per line, the same in the lane picker (Squad Builder) and the plain list (SBC) */
[data-back="3"] { --back: var(--nr-a); } [data-back="4"] { --back: var(--nr-bp); } [data-back="5"] { --back: var(--s-mid); }
.formation-pick .ui-select-group[data-back] { color: var(--back); }
.formation-pick .ui-select-list:not(.is-lanes) [role=option][data-back] { box-shadow: inset 2px 0 0 var(--back); }
.ui-select-list.is-lanes { gap: 14px; width: min(600px, calc(100vw - 32px)); max-width: none; padding: 12px; overflow-y: auto; overscroll-behavior: contain; }
.ui-lane { display: grid; gap: 6px; }
.ui-lane-name { color: var(--back); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.01em; }
.ui-lane-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.ui-select-list.is-lanes [role=option] { display: grid; justify-items: center; gap: 4px; padding: 6px 4px 7px; border: 1px solid var(--hair); border-radius: var(--r-md);
  background: var(--shell); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ui-select-list.is-lanes [role=option]:hover, .ui-select-list.is-lanes .is-active { border-color: var(--back); background: rgba(255, 255, 255, 0.06); }
.ui-select-list.is-lanes [aria-selected="true"] { border-color: var(--gold); }
.ui-select-list.is-lanes svg { width: 100%; max-width: 64px; aspect-ratio: 100 / 72; border-radius: 4px; background: rgba(63, 207, 142, 0.07); }
.ui-select-list.is-lanes circle { fill: var(--muted); }
.ui-select-list.is-lanes circle.is-back { fill: var(--back); }
@media (max-width: 480px) { .ui-lane-row { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); } }
.formation-pick .ui-select-btn:hover, .formation-pick .ui-select-btn[aria-expanded="true"] { border-color: var(--pick-ink); background: rgba(91, 155, 255, 0.18); }
.formation-pick .ui-select-val { flex: 1; margin-right: auto; }
/* Evolved card: the game's DNA ring, bottom right, inked in the card's own colours (--rt text, --rc fill). */
.item-card:has(> .ly-evo) { container-type: inline-size; }
.ly-evo { position: absolute; z-index: 5; right: 6%; bottom: 11%; display: grid; place-items: center; width: 12.5%; aspect-ratio: 1; border-radius: 50%;
  border: 0.9cqw solid var(--rp, #1a1204); background: var(--rc, #c9a44a); color: var(--rp, #1a1204);
  box-shadow: 0 0 0 0.5cqw color-mix(in srgb, var(--rc, #c9a44a) 40%, transparent), 0 0.6cqw 1.4cqw rgba(0, 0, 0, 0.45); }
.ly-evo svg { width: 70%; height: 70%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ly-evo + .ly-loan { right: 21%; }

/* My Club filters: a side panel shaped like the game's Club Search. Results behind it update live as you pick. */
.club-filter { position: relative; }
.club-filter .cf-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: min(380px, calc(100vw - 32px)); max-height: min(72dvh, 680px);
  overflow: hidden auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 10px; padding: 14px 16px 18px;
  border: 1px solid var(--hair-strong); border-radius: var(--r-xl); background: #12151C; box-shadow: 0 24px 56px -16px rgba(0, 0, 0, .85); }
.club-tools .club-filter .cf-pop { left: auto; right: 0; }  /* My Club's toolbar sits at the right edge: open leftwards, on screen */
/* Any panel marked data-sheet inside an open <details> is a bottom sheet on a phone, dragged down by its grab or
   data-sheet-head (ui.py page script). filter_panel.panel uses it; a page adopts it with the two attributes. */
@media (max-width: 720px) {
  details[open] > [data-sheet] { position: fixed; inset: auto 0 0 0; width: 100%; max-height: 88dvh; padding-bottom: calc(28px + env(safe-area-inset-bottom)); border-left: 0; border-top: 1px solid var(--hair-strong);
    border-radius: var(--r-core) var(--r-core) 0 0; padding-top: 18px; box-shadow: 0 -28px 56px -28px rgba(0, 0, 0, .85); transition: transform 280ms var(--ease); }
  @starting-style { details[open] > [data-sheet] { transform: translateY(100%); } }
  details[open] > [data-sheet].dragging { transition: none; }
  [data-sheet-head] { touch-action: none; }
}
@media (prefers-reduced-motion: reduce) { details[open] > [data-sheet] { transition: none; } }
.cf-head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.cf-head b { margin-right: auto; font-size: 1.125rem; font-weight: 800; }
.cf-close { width: 36px; padding: 0; font-size: 1.25rem; }
.cf-group { border-radius: var(--r-lg); background: var(--raise); }
.cf-group > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; list-style: none; cursor: pointer; font-size: 0.8438rem; font-weight: 700; }
.cf-group > summary::-webkit-details-marker { display: none; }
.cf-group > summary b { margin-left: auto; color: var(--gold); font-weight: 700; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-group > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); transition: transform 200ms var(--ease); }
.cf-group[open] > summary::after { transform: rotate(225deg) translateY(-2px); }
.cf-group > summary:focus-visible { outline: 2px solid var(--chalk); outline-offset: -2px; border-radius: var(--r-lg); }
.cf-find { width: calc(100% - 16px); height: 36px; margin: 0 8px 6px; padding: 0 10px; border-radius: var(--r-md); border: 1px solid var(--hair-strong); background: var(--shell); color: var(--text); font-size: 0.8125rem; }
.cf-list { display: grid; max-height: 260px; overflow-y: auto; padding: 0 6px 8px; }
.cf-opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 8px; border-radius: var(--r-md); font-size: 0.8125rem; cursor: pointer; }
.cf-opt[hidden] { display: none; }
.cf-opt:hover { background: rgba(255, 255, 255, .05); }
.cf-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cf-opt:has(input:checked) { background: rgba(242, 193, 78, .12); color: var(--gold); font-weight: 700; }
.cf-opt:has(input:focus-visible) { outline: 2px solid var(--chalk); outline-offset: -2px; }
.cf-opt img { flex: none; width: 20px; height: 20px; object-fit: contain; }
.cf-opt img.cf-frame { width: 16px; height: 22px; }
.cf-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-opt small { margin-left: auto; color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.cf-any { color: var(--muted); }
.cf-dna { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--fresh); color: var(--fresh); }
.cf-dna svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.cp-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: var(--r-pill); border: 1px solid rgba(242, 193, 78, .45); color: var(--gold); font-weight: 700; text-decoration: none; }
.pd-note { margin-top: 12px; color: var(--muted); font-size: 0.8125rem; }

/* SBC solve card: Solve with the "not in this SBC" list beside it. */
.sbc-go { display: flex; gap: 8px; align-items: center; }
.sbc-go .sbc-solve { flex: 1; }
.sbc-bans svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.sbc-bans-pop { width: 260px; gap: 2px; }
.sbc-bans-pop ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; max-height: 280px; overflow-y: auto; }
.sbc-bans-pop li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 4px 0 10px; border-radius: var(--r-md); font-size: 0.8125rem; }
.sbc-bans-pop li:hover { background: rgba(255, 255, 255, .05); }
.sbc-bans-pop li b { margin-right: 6px; color: var(--gold); font-variant-numeric: tabular-nums; }
.sbc-bans-pop .icon-btn { width: 32px; height: 32px; padding: 0; }
.solve-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.solve-chips li { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--raise); font-size: 0.8125rem; }
.solve-chips b { font-variant-numeric: tabular-nums; }
.solve-chips small { color: var(--muted); font-size: 0.75rem; }
.solve-chips .ly-own { position: static; display: inline-block; width: 12px; filter: none; }
.solve-chips .ly-own svg { display: block; width: 12px; height: auto; }
.solve-chips .coin { width: 14px; height: 14px; }
.sbc-submit svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sbc-submit:hover { color: var(--text); }
.sbc-submit.is-busy { pointer-events: none; opacity: .7; }
.sbc-submit.is-busy svg { animation: spin 900ms linear infinite; }
@media (prefers-reduced-motion: reduce) { .sbc-submit.is-busy svg { animation: none; } }
@media (pointer: coarse) { .sbc-bans-pop .icon-btn { width: 44px; height: 44px; } }
.sbc-go .tool-pop { position: relative; display: inline-flex; } .sbc-go .sbc-bans-pop { left: auto; right: 0; top: calc(100% + 6px); }
.sbc-bans-pop svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 4px; }
.admin-row p { margin: 4px 0 0; max-width: 60ch; }
.admin-h { font-size: 1rem; margin: 18px 4px 0; }
.psg-tooltip { position: fixed; z-index: 30; width: min(288px, calc(100vw - 24px)); padding: 12px 14px; border: 1px solid var(--hair-strong); border-radius: var(--r-lg); background: #11141B; box-shadow: 0 8px 24px #0008; font-size: 0.8125rem; pointer-events: none; }
.psg-tooltip[hidden], .psg-status[hidden] { display: none; }
.psg-tooltip b { font-size: 0.875rem; }
.psg-tooltip p { margin: 4px 0 0; color: var(--muted); }
.psg-status { padding: 10px 14px; color: var(--warn); font-size: 0.8125rem; }
.psg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; padding: 10px 14px; border-top: 1px solid var(--hair); }
@media (pointer: coarse) { .psg-ico { width: 44px; height: 44px; } }

/* Capture: one image on the stage, format choices and one export action. */
.asset-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pd-title-row { display: flex; align-items: center; gap: 16px; }
.pd-title-row h1 { min-width: 0; }
.pd-title-row > .icon-btn { margin-left: auto; }
.player-capture { width: min(1080px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); margin: auto; padding: 20px; overflow-y: auto; color: var(--text); background: var(--core); border: 1px solid var(--hair-strong); border-radius: var(--r-panel-l); box-shadow: 0 24px 80px #0008; }
.player-capture::backdrop { background: #06070ad9; }
.player-capture { opacity: 1; transform: scale(1); transform-origin: center; }
.player-capture[data-motion="pointer"] { transition: transform 200ms var(--ease), opacity 200ms var(--ease); }
.player-capture[data-motion="pointer"][data-phase="enter-from"],
.player-capture[data-motion="pointer"][data-phase="closing"] { opacity: 0; transform: scale(.98); }
.player-capture[data-motion="pointer"][data-phase="closing"] { transition-duration: 180ms; }
@media (prefers-reduced-motion: reduce) {
  .player-capture[data-motion="pointer"] { transition: none !important; opacity: 1; transform: none; }
}
body:has(.player-capture[open]) { overflow: hidden; }
.player-capture > header { display: flex; align-items: center; gap: 20px; padding: 0 0 16px; }
.capture-heading { display: flex; align-items: center; gap: 8px; color: var(--gold); }
.capture-heading h2 { margin: 0; font-size: 1.125rem; font-weight: 800; color: var(--text); }
.capture-player { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; margin-left: auto; font-size: 0.875rem; font-weight: 700; }
.asset-concept { color: var(--gold); font-size: 0.75rem; }
.capture-stage { position: relative; height: min(58dvh, 560px); min-height: 220px; overflow: hidden; background: #06070a; border-radius: var(--r-lg); }
.capture-stage::before, .capture-stage::after { content: ''; position: absolute; z-index: 1; width: 20px; height: 20px; pointer-events: none; border-color: var(--gold); border-style: solid; opacity: .55; }
.capture-stage::before { left: 12px; top: 12px; border-width: 1px 0 0 1px; }
.capture-stage::after { right: 12px; bottom: 12px; border-width: 0 1px 1px 0; }
.capture-stage > img { position: absolute; inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); object-fit: contain; }
.capture-status { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; pointer-events: none; color: var(--muted); font-size: 0.875rem; }
.capture-status button { pointer-events: auto; }
.player-capture [hidden] { display: none; }
.player-capture > footer { display: flex; align-items: center; gap: 20px; padding-top: 16px; }
.capture-formats { display: flex; flex-wrap: wrap; gap: 4px; }
.capture-formats .opt-seg { display: flex; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid transparent; }
.capture-formats .opt-seg:has(input:checked) { background: #f2c14e12; border-color: #f2c14e55; color: var(--gold); }
.capture-size { margin-left: auto; color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; text-align: right; }
.capture-export { width: 44px; height: 44px; background: var(--gold); color: #1a1204; border-color: transparent; }
@media (max-width: 600px) {
  .player-capture { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 16px; border-radius: var(--r-panel-s); }
  .player-capture > header { gap: 12px; flex-wrap: wrap; }
  .capture-heading { flex: 1; }
  .capture-player { order: 3; flex-basis: 100%; margin: 0; }
  .capture-stage { height: 48dvh; min-height: 200px; }
  .capture-stage > img { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
  .capture-stage::before { top: 6px; left: 6px; }
  .capture-stage::after { bottom: 6px; right: 6px; }
  .player-capture > footer { gap: 12px; flex-wrap: wrap; }
  .capture-formats { flex-basis: 100%; }
  .capture-formats .opt-seg { flex: 1; padding: 0 10px; }
  .capture-size { margin: 0 auto 0 0; text-align: left; }
  .player-capture .icon-btn { min-width: 44px; min-height: 44px; }
}

/* Home (/): newcomer strip, card shelf, Countdowns, Promos · For your club · Expiring soon, What's new. Calendar shares the rows. */
.hm-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 8px; padding: 14px 18px;
  border: 1px solid rgba(242, 193, 78, 0.28); border-radius: var(--r-3xl); background: linear-gradient(90deg, rgba(242, 193, 78, 0.08), transparent 70%); }
.hm-intro p { margin: 0; color: var(--muted); font-size: 0.9375rem; } .hm-intro b { color: var(--text); }
.hm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.hm-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.125rem; font-weight: 800; }
.hm-view { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 0 6px 0 12px; border-radius: var(--r-pill); color: var(--muted);
  font-size: 0.8125rem; font-weight: 700; text-decoration: none; transition: color 140ms var(--ease), background-color 140ms var(--ease); }
.hm-view:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.hm-view .icon-sm { width: 16px; height: 16px; }
.hm-sec { margin-top: 40px; }

.hm-shelf { margin-top: 24px; }
.hm-tabs button { min-height: 36px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: inherit; font-size: 0.8438rem;
  font-weight: 700; cursor: pointer; transition: background-color 140ms var(--ease), color 140ms var(--ease); }
.hm-tabs button[aria-selected="true"] { background: rgba(255, 255, 255, 0.10); color: var(--text); }
.hm-tabs button:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.hm-shelf-core { padding: 24px 20px; border: 1px solid var(--hair); border-radius: var(--r-core); background: var(--core); }
.hm-panel[hidden] { display: none; }
.hm-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 26px 14px; }
.hm-grid .tile-meta { flex-wrap: wrap; gap: 4px; }  /* one line when it fits; a long price drops under the rise mark rather than past the card */
.hm-grid .tile a { width: 100%; min-width: 0; }
.hm-evo-name { display: block; max-width: 100%; margin-top: 4px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.hm-grid .is-chip { display: none; } /* the shelf is for browsing: price only; Item Score lives on Players and SBC pages */
.hm-rise { display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px; border-radius: var(--r-pill); background: rgba(63, 207, 142, 0.14); color: var(--fresh); font-size: 0.7188rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.hm-rise .glyph { width: 12px; height: 12px; flex: none; stroke-width: 2.4; }
.hm-hot { padding: 2px 6px; background: rgba(255, 138, 61, 0.16); color: #FF9A52; }
.hm-hot .glyph { width: 17px; height: 17px; fill: currentColor; stroke-width: 1.4; }

.hm-cd { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.hm-cd a { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 16px 10px 10px; border: 1px solid var(--hair);
  border-radius: var(--r-3xl); background: var(--core); color: var(--text); text-decoration: none; transition: border-color 300ms var(--ease); }
.hm-cd a:hover { border-color: var(--hair-strong); }
.hm-cd-art { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--r-xl); background: var(--raise); color: var(--muted); overflow: hidden; }
.hm-cd-art img { width: 100%; height: 100%; object-fit: contain; } .hm-cd-art .glyph { width: 22px; height: 22px; }
.hm-cd-text { display: grid; min-width: 0; }
.hm-cd-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8438rem; font-weight: 700; color: var(--muted); }
.hm-cd-in { font-size: 1.375rem; font-weight: 800; font-stretch: 115%; font-variant-numeric: tabular-nums; }
.hm-cd-side { display: grid; justify-items: end; gap: 6px; color: var(--muted); font-size: 0.7812rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-tag { display: inline-flex; align-items: center; flex: none; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.07); color: var(--muted);
  font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.hm-tag.is-promo, .hm-tag.is-totw, .hm-tag.is-season { background: rgba(242, 193, 78, 0.14); color: var(--gold); }
.hm-tag.is-live { background: rgba(63, 207, 142, 0.14); color: var(--fresh); }
.hm-tag.is-sbc { background: rgba(130, 150, 255, 0.14); color: #A9B5FF; }
.hm-tag.is-objective { background: rgba(63, 207, 142, 0.14); color: var(--fresh); }
.hm-tag.is-reset { background: rgba(242, 164, 58, 0.16); color: #F2A43A; }
.hm-tag.is-drop, .hm-tag.is-new { background: rgba(242, 193, 78, 0.14); color: var(--gold); }
.hm-tag.is-flash { background: rgba(242, 164, 58, 0.16); color: #F2A43A; }
.sh-stack { display: grid; gap: 16px; }
.hm-row.ob-row { min-height: 60px; }
.hm-row > .ob-txt { flex: 1; min-width: 0; }
.hm-row .ob-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9062rem; }
.pm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pm { display: flex; align-items: center; gap: 14px; min-height: 116px; padding: 10px 14px 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-3xl); color: inherit; text-decoration: none;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.pm:hover { border-color: var(--hair-strong); background: #0D1016; }
.pm:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.pm-frames { display: flex; align-items: center; flex: none; }
.pm-frame { width: 64px; height: auto; margin-left: -26px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); transition: transform 200ms var(--ease); }
.pm-frame:first-child { margin-left: 0; }
.pm:hover .pm-frame { transform: translateY(-3px); }
.pm > b { min-width: 0; font-size: 0.9375rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
@media (min-width: 901px) and (max-width: 1100px) { .sh-pass .sp-fan { gap: 6px; } }
@media (max-width: 720px) { .pm-grid { grid-template-columns: minmax(0, 1fr); } .cal-list { grid-template-columns: minmax(0, 1fr); } .cal-card { min-height: 84px; padding: 12px; gap: 12px; }
  .cal-art { width: 48px; height: 48px; } .cal-main b { font-size: 1rem; } .cal-at { font-size: 1.0625rem; } }

.hm-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; margin-top: 40px; }
.hm-col { min-width: 0; }
.hm-rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hm-rows > li { min-width: 0; }
.hm-row .tag-pro { flex: none; }
.hm-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px 6px 8px; border: 1px solid var(--hair); border-radius: var(--r-xl);
  background: var(--core); color: var(--text); text-decoration: none; transition: border-color 300ms var(--ease), background-color 300ms var(--ease); }
.hm-row:hover { border-color: var(--hair-strong); background: #0D1016; }
.hm-row-ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--r-md); background: var(--raise); color: var(--muted); overflow: hidden; }
.hm-row-ic img { width: 100%; height: 100%; object-fit: contain; } .hm-row-ic img.hm-frame { width: 26px; height: 36px; } .hm-row-ic .glyph { width: 18px; height: 18px; }
.hm-row > b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8438rem; font-weight: 700; }
.hm-row-end { flex: none; color: var(--muted); font-size: 0.7812rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-row-end.is-soon { padding: 2px 8px; border-radius: var(--r-pill); background: rgba(255, 159, 67, 0.14); color: var(--warn); }
.hm-row > .icon-sm { flex: none; width: 16px; height: 16px; color: var(--muted); }
.hm-none { padding: 18px 12px; border: 1px dashed var(--hair); border-radius: var(--r-xl); color: var(--muted); font-size: 0.8125rem; text-align: center; }

.hm-wn { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.hm-wn a { display: grid; grid-template-rows: auto 168px auto auto;  /* card art big enough to read rating and stats */
  gap: 8px; height: 100%; padding: 12px; border: 1px solid var(--hair); border-radius: var(--r-3xl);
  background: var(--core); color: var(--text); text-decoration: none; transition: border-color 300ms var(--ease), transform 300ms var(--ease); }
.hm-wn a:hover { border-color: var(--hair-strong); transform: translateY(-2px); }
.hm-wn-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 26px; }
.hm-wn-art { display: grid; place-items: center; min-height: 0; color: var(--muted); }
.hm-wn-art img { max-width: 100%; max-height: 168px; object-fit: contain; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5)); }
.hm-wn-art .glyph { width: 40px; height: 40px; }
.hm-wn-art img.hm-mark { width: 88px; height: 88px; object-fit: contain; }  /* SP / CP reward art on objective tiles */
.hm-tasks { color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.hm-wn-end { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 0.7812rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-wn-end .glyph { width: 14px; height: 14px; }
.hm-wn-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 8px; border-top: 1px solid var(--hair); font-size: 0.8438rem; text-align: center; }

/* Calendar: what ends, as cards across the whole width. Each shows only its expiry, red inside a day, amber inside three. */
.cal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 12px 14px; margin: 0; padding: 0; list-style: none; }
.cal-day { grid-column: 1 / -1; padding: 22px 2px 2px; color: var(--text); font-size: 1.125rem; font-weight: 800; font-stretch: 112%; }
.cal-day:first-child { padding-top: 4px; }
.cal-card { display: flex; align-items: center; gap: 16px; min-height: 92px; padding: 14px 18px 14px 14px; border: 1px solid var(--hair); border-radius: var(--r-panel-s); background: var(--core); color: inherit; text-decoration: none;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.cal-card:hover { border-color: var(--hair-strong); background: #0D1016; }
.cal-card:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.cal-card.is-soon { border-color: rgba(242, 164, 58, .3); }
.cal-card.is-urgent { border-color: rgba(255, 107, 107, .45); background: linear-gradient(90deg, rgba(255, 107, 107, .08), transparent 60%), var(--core); }
.cal-art { display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: var(--r-xl); background: var(--raise); color: var(--muted); overflow: hidden; }
.cal-art img { width: 100%; height: 100%; object-fit: contain; }
.cal-art .glyph { width: 26px; height: 26px; }
.cal-main { display: grid; gap: 8px; flex: 1; min-width: 0; }
.cal-main b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 1.0625rem; font-weight: 700; line-height: 1.25; }
.cal-tags { display: flex; align-items: center; gap: 8px; }
.cal-tags .hm-tag { height: 24px; padding: 0 10px; font-size: 0.8125rem; }
.cal-end { display: grid; justify-items: end; gap: 6px; flex: none; }
.cal-at { font-size: 1.25rem; font-weight: 800; font-stretch: 110%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-end .exp { height: 26px; font-size: 0.8125rem; }

@media (max-width: 1000px) { .hm-three { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .hm-cd { grid-template-columns: minmax(0, 1fr); }
  .hm-shelf-core { padding: 18px 12px; border-radius: var(--r-panel-s); }
  .hm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-grid > li:nth-child(n+7) { display: none; } /* six cards on a phone; View all has the rest */
  .hm-wn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Players (/local/players): one row per card, the card first and largest. Every number is in the text colour; the card
   carries tier and quality, gold marks only the CometRating pips. docs/features/players-list.md */
.pl-view { flex: none; }
.ft-tools .tool-search { width: min(320px, 100%); } .ft-tools .tool-search input { opacity: 1; } /* a list page is a search: the box stays open */
.pl-view a { display: inline-grid; place-items: center; min-width: 40px; }
.pl-results { margin-top: 14px; }
.pl-list { display: grid; margin: 0; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--hair); border-radius: var(--r-2xl); background: var(--core); }
/* One grid for the header and every row, fixed columns, so prices, stats and CometRating line up down the list. */
.pl-row, .pl-head { display: grid; grid-template-columns: 72px minmax(180px, 1fr) 72px 204px 92px 172px 56px;
  grid-template-areas: "card who pos stats extra price nr"; align-items: center; gap: 16px; padding: 8px 18px 8px 12px; }
.pl-row { content-visibility: auto; contain-intrinsic-size: auto 100px; border-top: 1px solid var(--hair); color: var(--text); text-decoration: none; transition: background-color 200ms var(--ease); }
.pl-row:hover { background: var(--raise); }
.pl-head { padding-block: 10px; color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.pl-head .pl-stats > span { text-align: center; }
.pl-card { grid-area: card; display: block; width: 72px; }
.pl-card .item-card { width: 100%; }
.pl-who { grid-area: who; display: grid; gap: 4px; min-width: 0; }
.pl-row .pl-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; font-weight: 800; }
.pl-sub { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pl-sub small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.75rem; }
.pl-pos { grid-area: pos; display: grid; gap: 2px; }
.pl-pos b { font-size: 0.875rem; font-weight: 800; }
.pl-pos small { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.pl-stats { grid-area: stats; display: grid; grid-template-columns: repeat(6, 1fr); }
.pl-stats > span { display: grid; justify-items: center; line-height: 1.15; }
.pl-stats small { color: var(--muted); font-size: 0.625rem; font-weight: 700; }
.pl-stats b { font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pl-price { grid-area: price; display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.pl-price > * { flex: none; }
.pl-nr { grid-area: nr; display: grid; justify-items: end; }
.nr-meter { display: grid; justify-items: end; gap: 4px; font-variant-numeric: tabular-nums; }
.nr-meter b { font-size: 0.9375rem; font-weight: 800; line-height: 1; }
.nr-pips { display: flex; gap: 2px; }
.nr-pips i { width: 9px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.16); }
.nr-pips i.on { background: var(--gold); }
.src-mark { display: inline-grid; place-items: center; width: 32px; height: 28px; border: 1px solid var(--hair-strong); border-radius: var(--r-pill); background: var(--raise); color: var(--chalk); }
.src-mark .src-ic { width: 20px; height: 20px; object-fit: contain; }
.src-mark svg { fill: currentColor; } .src-mark svg .in { fill: var(--raise); }
.cf-opt .src-mark { width: 26px; height: 22px; } .cf-opt .src-mark .src-ic { width: 16px; height: 16px; }

@media (max-width: 1100px) {
  .pl-row, .pl-head { grid-template-columns: 64px minmax(0, 1fr) 64px 172px 56px; grid-template-areas: "card who pos price nr"; gap: 14px; }
  .pl-card { width: 64px; } .pl-row .pl-stats, .pl-row .pl-extra, .pl-head .pl-stats, .pl-head .pl-extra { display: none; }
  .pl-row { contain-intrinsic-size: auto 89px; }  /* content height (row minus 17px padding and border): rows rendered late do not shift the list */
}
@media (max-width: 640px) {  /* the card shows rating and position; price and CometRating sit under the name */
  .pl-head { display: none; }
  .pl-row { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "card who who" "card price nr"; gap: 6px 12px; padding: 8px 12px 8px 8px; }
  .pl-card { width: 56px; } .pl-row .pl-pos { display: none; } .pl-row { contain-intrinsic-size: auto 81px; }
  .pl-price { justify-content: flex-start; }
}
.filter-note { margin: 6px 0; color: var(--muted); font-size: 0.8125rem; }
/* Card signatures. Self-hosted (SIL Open Font License 1.1, Google Fonts v14, latin subset) so no visitor's address goes to Google. */
@font-face { font-family: "Mrs Saint Delafield"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/MrsSaintDelafield.woff2?v=1") 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; }

/* My Club trade lists (Marquee Predictor): a match list, one table of cards, plain words. */
.tl-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.7fr); gap: 18px; align-items: start; }
.tl-grid h2, .tl-last h2 { font-size: 1.125rem; font-weight: 800; margin: 0 0 10px; }
.tl-grid nav h2 + .tl-list { margin-bottom: 16px; }
.tl-grid > nav { position: sticky; top: calc(96px + env(safe-area-inset-top)); }  /* the match list stays in view beside the long card table */
.tl-v { color: var(--muted); font-weight: 600; }
.tl-teams { display: grid; gap: 6px; min-width: 0; flex: 1; }
.tl-team { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-team > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; font-weight: 800; }
.tl-crest { width: 24px; height: 24px; object-fit: contain; flex: none; }
.tl-vs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.tl-slot { display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: var(--raise);
  border: 1px solid rgba(242, 193, 78, .55); color: var(--chalk); font-size: 0.75rem; }
.tl-table th .coin, .tl-table th .tl-ic { display: inline-block; vertical-align: -3px; margin-right: 5px; }
.tl-info { position: relative; display: inline-grid; place-items: center; margin-left: 8px; color: var(--muted); cursor: help; vertical-align: -2px; }
.tl-info:hover, .tl-info:focus-visible { color: var(--chalk); outline: none; }
.tl-tip { display: none; position: absolute; left: 50%; top: calc(100% + 10px); translate: -50% 0; z-index: 30; width: max-content; padding: 12px 14px;
  border-radius: var(--r-sm); border: 1px solid var(--hair-strong); background: #12151C; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .8);
  font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.tl-info:hover .tl-tip, .tl-info:focus-visible .tl-tip { display: block; }
.tl-tip ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.tl-tip li { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.tl-tip li > span { color: var(--muted); }
.tl-tip li b { margin-left: auto; }
.tl-list { display: grid; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tl-pick { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: var(--r-2xl);
  color: var(--text); text-decoration: none; font-weight: 800; gap: 6px; transition: background-color .3s cubic-bezier(0.32, 0.72, 0, 1); }
.tl-pick:hover { background: rgba(255, 255, 255, .04); }
.tl-pick[aria-current="true"] { background: var(--raise); border-color: rgba(242, 193, 78, .55); }
.tl-pick:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.tl-table td, .tl-table th { padding: 8px; }
.tl-card { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.tl-card .item-card { width: 46px; flex: none; font-size: 7px; }
.tl-card > span { display: grid; gap: 2px; }
.tl-card small { color: var(--muted); font-weight: 600; }
.tl-gain { color: var(--fresh); font-variant-numeric: tabular-nums; }
.tl-more { margin-top: 12px; }
.tl-last { margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.tl-last h2 { margin: 0; }
.tl-hits { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 0; padding: 0; flex: 1 1 320px; }
.tl-hits li::before { margin-right: 6px; font-weight: 800; }
.tl-hits .is-hit::before { content: "✓"; color: var(--fresh); }
.tl-hits .is-miss::before { content: "✕"; color: var(--muted); }
.tl-hits .is-miss { color: var(--muted); }
.tl-made { display: flex; align-items: center; gap: 8px; margin: 0; }
.tl-made span { color: var(--muted); }
@media (max-width: 900px) { .tl-grid { grid-template-columns: minmax(0, 1fr); } .tl-grid > nav { position: static; } }

/* ---------- number and date fields: one look with the dropdown button ---------- */
input[type="number"], input[type="date"] { color-scheme: dark; font-variant-numeric: tabular-nums; transition: border-color 200ms var(--ease); }
input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cf-field .xf-range input, .cf-field input[type="date"] { font-weight: 600; }
.cf-field .xf-range input:hover, .cf-field input[type="date"]:hover, .budget:hover, .bd-budget:hover,
.cf-field .xf-range input:focus, .cf-field input[type="date"]:focus, .budget:focus-within, .bd-budget:focus-within { border-color: var(--gold); outline: none; }
.budget:focus-within, .bd-budget:focus-within { outline: 2px solid var(--chalk); outline-offset: 2px; }
.cf-field .xf-range input:focus-visible, .cf-field input[type="date"]:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
/* Players: the extra filters and the row's skill moves, weak foot, foot and PlayStyle+ icons */
.cf-seg { display: flex; gap: 4px; }
.cf-seg label { flex: 1; }
.cf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cf-seg span { display: grid; place-items: center; height: 34px; border-radius: var(--r-md); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--muted); font-size: 0.75rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cf-seg input:checked + span { border-color: var(--gold); background: rgba(242, 193, 78, .12); color: var(--text); }
.cf-seg input:focus-visible + span { outline: 2px solid var(--chalk); outline-offset: 2px; }
.cf-psgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; padding: 6px 10px 10px; }
.cf-ps { position: relative; display: grid; place-items: center; height: 38px; border-radius: var(--r-md); cursor: pointer; }
.cf-ps input { position: absolute; opacity: 0; pointer-events: none; }
.cf-ps img { opacity: .5; transition: opacity .2s var(--ease), filter .2s var(--ease); }
.cf-ps:hover img { opacity: .7; }
.cf-ps:has(input:checked) { background: rgba(242, 193, 78, .14); box-shadow: inset 0 0 0 1.5px var(--gold); }
.cf-ps:has(input:checked) img { opacity: 1; }
.cf-ps:has(input:focus-visible) { outline: 2px solid var(--chalk); outline-offset: 2px; }
.cf-group > .xf-row, .cf-group > .xf-switch.is-row { margin: 0 10px 10px; }
.cf-group > .xf-switch.is-row { background: var(--shell); }
.pl-extra { grid-area: extra; display: grid; gap: 4px; justify-items: start; min-width: 64px; }
.pl-sw { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.pl-sw span { display: inline-flex; align-items: center; gap: 3px; }
.pl-sw b { color: var(--text); font-weight: 800; }
.pl-sw svg { width: 11px; height: 11px; fill: var(--gold); }
.pl-ps { display: flex; gap: 2px; }

/* ---------- phone: every control is at least 44px to tap ---------- */
@media (max-width: 720px) {
  .wordmark { display: inline-flex; align-items: center; min-height: 44px; }
  .hm-view, .done-btn, .cf-find, .ui-select-btn, .bd-budget, .budget, .opt-seg, .opt, .evo-build-link, .sq-actions button, .hm-tabs button, .seg button { min-height: 44px; }
  .cf-opt { min-height: 44px; }
  .site-foot a, .au-foot a { display: inline-flex; align-items: center; min-height: 44px; }
  .style-pills, .sq-filter { gap: 8px; }  /* small pills keep 8px apart so a thumb lands on the one it means */
  .tc-pick { grid-template-columns: 44px minmax(0, 1fr) 44px; } .tc-arr { width: 44px; height: 44px; }
  .tc-line input[type="range"] { box-sizing: content-box; padding-block: 18px; background-clip: content-box; }  /* a 44px tap box, the same 8px track */
  .tc-import input, .tc-import button { height: 44px; }
  /* the pitch label stays small; its tap area grows to 44px without moving anything */
  button.slot-pos { position: relative; }
  button.slot-pos::before { content: ""; position: absolute; inset: -6px -14px -14px; }
  .club-tabs .chip, .page-chips .chip { height: 44px; }
}

/* ---------- beta accounts: Account page and owner's Testers list (cometut/account_pages.py) ---------- */
a.refresh-btn { text-decoration: none; }
.account { display: grid; gap: 14px; max-width: 46rem; }
.bezel:has(> .account) { max-width: calc(46rem + 14px); }
.account h2 { margin: 10px 0 0; font-size: 1.125rem; }
.account .field { display: grid; gap: 6px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.account .steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.account form { margin: 0; }
.ac-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-danger { color: #E5484D; border-color: rgba(229, 72, 77, 0.45); }
.copy-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.copy-row input { flex: 1 1 9rem; min-width: 0; height: 44px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--hair-strong);
  background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; font-size: 0.875rem; }
.copy-row input:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
form.inline { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
form.inline input[type=email] { height: 32px; width: 11rem; padding: 0 10px; border-radius: var(--r-md); border: 1px solid var(--hair-strong);
  background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; font-size: 0.8125rem; }
.account .data { width: 100%; border-collapse: collapse; }
.account .data th, .account .data td { padding: 10px 6px; border-top: 1px solid var(--hair); text-align: left; }
.account .data form { display: flex; gap: 6px; justify-content: flex-end; }

/* ---- /privacy and /terms (cometut/legal_pages.py) ---- */
.legal { max-width: 46rem; line-height: 1.6; }
.legal h2 { margin: 26px 0 6px; font-size: 1.125rem; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal ul { margin: 0 0 10px; color: var(--text); }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal a { color: var(--gold); }
.main:has(.legal) > .hero, .main:has(.legal) > .bezel, .main:has(.legal) > .legal-tabs, .main:has(.legal) > .state { width: min(52rem, 100%); margin-inline: auto; }
.main:has(.legal) > .hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal { max-width: none; }
.legal h2 { scroll-margin-top: 96px; }
.legal-scroll { overflow-x: auto; margin: 0 0 12px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.legal-table th { color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.site-foot, .au-foot { display: grid; justify-items: center; gap: 10px; padding: 8px 16px 32px; font-size: 0.8125rem; text-align: center; color: var(--muted); }
.site-foot nav, .au-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.site-foot p, .au-foot p { margin: 0; max-width: 46rem; font-size: 0.75rem; }
.site-foot a, .au-foot a { color: var(--muted); text-decoration: none; }  /* plain links; the hover colour shows they are live */
.site-foot a:hover, .au-foot a:hover { color: var(--text); }
.site-foot .foot-groups { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 8px clamp(24px, 8vw, 72px); text-align: left; }
.foot-group { display: grid; align-content: start; gap: 2px; }
.foot-group > a, .foot-fb > summary { display: flex; align-items: center; min-height: 24px; }  /* WCAG 2.2 target size */
@media (max-width: 720px) { .foot-group > a, .foot-fb > summary { min-height: 44px; } }  /* a thumb, like every phone control */
.foot-group h2 { margin: 0 0 4px; font-size: 0.75rem; font-weight: 700; color: var(--text); }
.foot-fb { position: relative; }
.foot-fb > summary { cursor: pointer; list-style: none; }
.foot-fb > summary::-webkit-details-marker { display: none; }
.foot-fb > summary:hover { color: var(--text); }
.foot-fb .menu-pop { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; width: min(300px, calc(100vw - 32px)); gap: 10px; padding: 12px; text-align: left; }
.legal-tabs { margin: 0 0 18px; }
.ac-emails { display: grid; gap: 12px; justify-items: start; }
.ac-optin { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.ac-optin input { width: 20px; height: 20px; margin: 0; accent-color: var(--gold); flex: none; }
.contact-form { display: grid; gap: 14px; max-width: 34rem; margin-bottom: 24px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; }
.contact-form input, .contact-form textarea { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--hair-strong); background: var(--core); color: var(--text); font: inherit; }
.contact-form textarea { resize: vertical; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.contact-form select { font: inherit; }
.contact-form .btn { justify-self: start; }
.faq-q { border-bottom: 1px solid var(--hair); }
.faq-q:first-child { border-top: 1px solid var(--hair); }
.faq-q > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; cursor: pointer; list-style: none; }
.faq-q > summary::-webkit-details-marker { display: none; }
.faq-q > summary h2 { margin: 0; font-size: 1rem; line-height: 1.4; }
.faq-q > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 200ms var(--ease, ease); }
.faq-q[open] > summary::after { transform: rotate(225deg); }
.faq-q > summary:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.faq-q > p { margin: 0 0 16px; }
.partner-who { display: grid; gap: 12px; margin: 18px 0; padding: 0; list-style: none; }
.partner-who li { display: flex; gap: 12px; align-items: center; line-height: 1.5; }
.partner-who .glyph { flex: none; width: 22px; height: 22px; color: var(--gold); }
.partner-who b { margin-right: 6px; }
.ff { display: grid; gap: 6px; scroll-margin-top: 90px; }
.ff > label { font-weight: 600; }
.ff-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ff-msgs { display: grid; flex: 1; min-width: 0; gap: 4px; justify-items: start; }
.ff-msgs:empty, .ff-foot:not(:has(.ff-count)):not(:has(.ff-err:not([hidden]))):not(:has(.ff-hint:not([hidden]))) { display: none; }
.ff-hint, .ff-err { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 0.8125rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.ff-hint { color: var(--fresh); }
.ff-err { color: var(--s-poor); }
.ff-hint .glyph, .ff-err .glyph { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.ff-hint[hidden], .ff-err[hidden], .ff-banner[hidden], .ff-done[hidden], .ff-form[hidden] { display: none; }
.ff-fix { padding: 0; border: 0; background: none; color: var(--gold); font: inherit; font-size: 0.8125rem; font-weight: 700; cursor: pointer; min-height: 32px; }
.ff-fix:hover { color: var(--text); }
.ff-count { flex: none; color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.ff-count.is-near { color: var(--warn); }
.ff-count.is-full { color: var(--s-poor); font-weight: 700; }
.contact-form [aria-invalid="true"] { border-color: var(--s-poor); }
.link-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 8px; align-items: stretch; }
.link-row select { min-height: 44px; }
.link-input { display: flex; align-items: center; min-width: 0; border: 1px solid var(--hair-strong); border-radius: var(--r-md); background: var(--core); }
.link-input:focus-within { outline: 2px solid var(--gold); outline-offset: 1px; }
.link-input:has(input[aria-invalid="true"]) { border-color: var(--s-poor); }
.contact-form .link-input input { flex: 1; min-width: 0; min-height: 42px; padding-left: 4px; border: 0; background: transparent; }
.contact-form .link-input input:focus-visible { outline: none; }
.link-prefix { padding-left: 12px; color: var(--muted); font-size: inherit; white-space: nowrap; }  /* the same size as the name typed after it */
.link-input.no-prefix .link-prefix { display: none; }
.contact-form .link-input.no-prefix input { padding-left: 12px; }
.links { display: grid; gap: 8px; }
.links .link-row { grid-template-columns: 9.5rem minmax(0, 1fr) 44px; }
.link-remove { min-height: 44px; border: 1px solid var(--hair-strong); border-radius: var(--r-md); background: none; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.link-remove:hover { color: var(--text); border-color: var(--text); }
.link-add { justify-self: start; }
.ff-banner { padding: 12px 14px; border: 1px solid var(--s-poor); border-radius: var(--r-md); background: rgba(238, 75, 80, 0.08); font-size: 0.875rem; font-weight: 600; line-height: 1.4; }
.ff-submit { display: inline-flex; align-items: center; gap: 8px; justify-self: start; }
.ff-spin { display: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ff-spin 0.7s linear infinite; }
.is-busy .ff-spin { display: inline-block; }
.is-busy .ff-submit { opacity: 0.85; cursor: progress; }
@keyframes ff-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ff-spin { animation-duration: 1.8s; } }
.ff-done { display: grid; justify-items: start; gap: 10px; max-width: 34rem; margin-bottom: 24px; padding: 24px; border: 1px solid var(--hair); border-radius: var(--r-xl); background: var(--shell); outline: none; scroll-margin-top: 90px; }
.ff-done h2 { margin: 0; }
.ff-done p { margin: 0; color: var(--muted); }
.ff-done-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(63, 207, 142, 0.14); color: var(--fresh); }
.ff-done-ic .glyph { width: 24px; height: 24px; }
@media (max-width: 480px) {
  .link-row { grid-template-columns: minmax(0, 1fr); }
  .links .link-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .links .link-row select { grid-column: 1 / -1; }
}
.contact-field { display: grid; gap: 6px; font-weight: 600; }
.contact-topics { gap: 4px; padding: 4px; border-radius: var(--r-xl); }
.contact-topics .opt-seg { min-height: 44px; padding: 0 10px; }
.contact-topics .opt-seg span { display: inline-flex; align-items: center; gap: 8px; }
.contact-topics .opt-seg .glyph { flex: none; width: 18px; height: 18px; }
@media (max-width: 480px) { .contact-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.au-foot { padding: 16px 0 0; }
.legal-draft { display: inline-block; margin: 0 0 18px !important; padding: 4px 10px; border: 1px solid var(--warn); border-radius: var(--r-pill);
  color: var(--warn) !important; font-size: 0.75rem; font-weight: 800; letter-spacing: .06em; }

/* ---- Sign-in (cometut/auth_pages.py, static/auth.js, ADR 0010) ---- */
.au { position: relative; z-index: 1; display: grid; justify-items: center; align-content: center; gap: 26px; min-height: 100dvh; padding: 32px 16px; }
.au-brand { color: var(--text); font-size: 1.375rem; font-weight: 800; font-stretch: 125%; letter-spacing: .02em; text-decoration: none; }
.au-brand span { color: var(--gold); }
.au-card { display: grid; gap: 16px; width: min(100%, 420px); padding: 28px; border: 1px solid var(--hair); border-radius: var(--r-panel-l); background: rgba(10, 12, 17, .88);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5); backdrop-filter: blur(14px); }
.au-card h1 { margin: 0; font-size: 1.625rem; font-weight: 800; letter-spacing: -.01em; }
.au-google { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border-radius: var(--r-pill); background: #fff; color: #1f1f1f;
  font-size: 0.9062rem; font-weight: 700; text-decoration: none; transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .au-google:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); } }
.au-google svg { width: 18px; height: 18px; }
.au-or { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); font-size: 0.7188rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.au-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--hair-strong); border-radius: var(--r-pill); }
.au-seg a { display: grid; place-items: center; min-height: 44px; border-radius: var(--r-pill); color: var(--muted); font-size: 0.8125rem; font-weight: 700; text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease); }
.au-seg a[aria-selected="true"] { background: rgba(255, 255, 255, .1); color: var(--text); }
.au-form { display: grid; gap: 14px; }
.au-form[hidden] { display: none; }
.au-field { display: grid; gap: 6px; color: var(--muted); font-size: 0.7812rem; font-weight: 700; }
.au-input { position: relative; display: block; }
.au-input input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--hair-strong); border-radius: var(--r-xl); background: var(--raise); color: var(--text); font: inherit; font-size: 0.9375rem; font-weight: 600; }
.au-input input:focus { outline: none; border-color: rgba(242, 193, 78, .6); box-shadow: 0 0 0 3px rgba(242, 193, 78, .14); }
.au-input input[type="password"], .au-input input[data-strength] { padding-right: 48px; }
.au-eye { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-lg); background: none; color: var(--muted); cursor: pointer; }
.au-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.au-eye:hover, .au-eye.on { color: var(--text); }
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.8125rem; font-weight: 600; }
.au-row a, .au-alt a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); font-weight: 700; text-decoration: none; }
.au-alt a { color: var(--text); }
.au-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); cursor: pointer; }
.au-check input { position: absolute; opacity: 0; pointer-events: none; }
.au-check i { position: relative; width: 36px; height: 20px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise); transition: background .2s var(--ease), border-color .2s var(--ease); }
.au-check i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .25s var(--ease), background .2s var(--ease); }
.au-check input:checked + i { border-color: var(--fresh); background: rgba(63, 207, 142, .2); }
.au-check input:checked + i::after { transform: translateX(16px); background: var(--fresh); }
.au-check input:focus-visible + i { outline: 2px solid var(--chalk); outline-offset: 2px; }
.au-go { width: 100%; justify-content: center; min-height: 48px; }
.au-go:disabled, .au-link:disabled { opacity: .5; cursor: default; }
.au-err { margin: 0; padding: 10px 12px; border: 1px solid rgba(238, 75, 80, .45); border-radius: var(--r-lg); background: rgba(238, 75, 80, .08); font-size: 0.8125rem; font-weight: 600; }
.au-info { margin: 0; color: var(--fresh); font-size: 0.8125rem; font-weight: 700; text-align: center; }
.au-alt { margin: 0; color: var(--muted); font-size: 0.8438rem; text-align: center; }
.au-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: -6px; }
.au-meter i { height: 4px; border-radius: 2px; background: var(--hair-strong); transition: background .25s var(--ease); }
.au-meter[data-score="1"] i:nth-child(-n+1) { background: var(--s-poor); }
.au-meter[data-score="2"] i:nth-child(-n+2) { background: var(--s-low); }
.au-meter[data-score="3"] i:nth-child(-n+3) { background: var(--s-good); }
.au-meter[data-score="4"] i { background: var(--fresh); }
.au-sent { margin: 0; color: var(--muted); font-size: 0.875rem; font-weight: 700; text-align: center; }
.au-digits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.au-digit { min-width: 0; height: 56px; padding: 0; border: 1px solid var(--hair-strong); border-radius: var(--r-xl); background: var(--raise); color: var(--text); font: inherit; font-size: 1.5rem; font-weight: 800; text-align: center; }
.au-digit:focus { outline: none; border-color: rgba(242, 193, 78, .6); box-shadow: 0 0 0 3px rgba(242, 193, 78, .14); }
.au-resend { display: flex; justify-content: center; }
.au-link { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--gold); font: inherit; font-size: 0.8438rem; font-weight: 700; cursor: pointer; }
@media (max-width: 480px) { .au-card { padding: 22px 18px; border-radius: var(--r-panel-s); } .au-digits { gap: 6px; } .au-digit { height: 52px; } }
/* Account: sign-in methods, devices */
.ac-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.ac-row > span, .ac-row summary > span { color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.ac-row b { font-weight: 700; }
.ac-inline { display: flex; align-items: center; gap: 8px; }
.ac-inline .au-field > span:first-child { display: none; }
.ac-fold { display: block; }
.ac-fold > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; list-style: none; cursor: pointer; }
.ac-fold > summary::-webkit-details-marker { display: none; }
.ac-fold .au-form { padding: 6px 0 12px; }
.ac-devices { display: grid; margin: 0 0 10px; padding: 0; list-style: none; }
.ac-devices li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--hair); }
.ac-devices span { display: grid; gap: 2px; }
.ac-devices small { color: var(--muted); font-size: 0.75rem; font-weight: 600; }

/* ---------- Objectives: the game's split, groups down the left and the task rows on the right ---------- */
/* ---------- Season hub and section switch ---------- */
.sect { max-width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 0 18px; }
.sect a { flex: none; white-space: nowrap; }
.sect-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 18px; }
.sect-row .sect { margin: 0; }
.sp-season { margin: 0; }
.sect::-webkit-scrollbar { display: none; }
.sh-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "pass ob" "soon promos"; gap: 16px; align-items: stretch; }
.sh-pass { grid-area: pass; }
.sh-ob { grid-area: ob; }
.sh-promos { grid-area: promos; }
.sh-soon { grid-area: soon; }
.sh-tile { display: block; min-width: 0; padding: 22px; border: 1px solid var(--hair); border-radius: var(--r-core); background: var(--core); color: inherit; text-decoration: none; }
.sh-pass { position: relative; display: grid; align-content: space-between; gap: 18px; transition: border-color 200ms var(--ease);
  background: radial-gradient(120% 140% at 90% 0%, rgba(242, 193, 78, .16), transparent 60%), var(--core); }
.sh-pass:hover { border-color: rgba(242, 193, 78, .5); }
.sh-pass:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }
.sh-pass-text { display: grid; gap: 16px; align-content: start; }
.sh-pass h2 { margin: 0; font-size: clamp(1.625rem, 3.4vw, 2.625rem); font-weight: 800; font-stretch: 118%; line-height: 1.05; }
.sh-promos { padding: 22px; }
@media (max-width: 900px) { .sh-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pass" "ob" "soon" "promos"; } }
.sh-pass { overflow: hidden; }
@media (max-width: 720px) {
  .sh-pass h2 { font-size: 1.625rem; overflow-wrap: anywhere; }
  .sh-tile { padding: 18px; }
}

/* ---------- Season Pass: the game's track, sideways ----------
   One coherent block (replaces v1, v3 and v4). Standard above Premium, every level the same width, explicit grid cells so
   hiding Premium never moves anything. Players, Evolutions, picks and the biggest pack are the highlights. */
.sp-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; margin: 4px 0 12px; padding: 10px 24px; overflow: hidden;
  border: 1px solid var(--hair); border-radius: 28px;
  background: radial-gradient(120% 150% at 88% 0%, var(--glow, rgba(242, 193, 78, .18)), transparent 58%), var(--wash, none), linear-gradient(135deg, #10131c, #0a0c11); }
/* One look per pass: Heritage is warm bronze with a fine pinstripe, Ones to Watch a cold blue glow. The gold accent stays. */
.sp-hero[data-season="heritage"] { --glow: rgba(214, 140, 70, .32); --wash: repeating-linear-gradient(135deg, rgba(255, 214, 160, .035) 0 2px, transparent 2px 16px); border-color: rgba(214, 140, 70, .28); }
.sp-hero[data-season="otw"] { --glow: rgba(80, 150, 255, .30); --wash: radial-gradient(60% 90% at 8% 100%, rgba(150, 90, 255, .16), transparent 70%); border-color: rgba(100, 150, 255, .28); }
.sp-hero-main { display: grid; gap: 6px; min-width: 0; }
.sp-hero h1 { margin: 0; min-width: 0; font-size: clamp(1.375rem, 2.6vw, 1.875rem); font-weight: 800; font-stretch: 120%; line-height: 1; overflow-wrap: break-word; }
.sp-facts { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; }
.sp-facts div { display: grid; gap: 2px; }
.sp-facts dt { color: var(--muted); font-size: 0.75rem; }
.sp-facts dd { margin: 0; font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-fan { display: flex; align-items: flex-start; gap: 10px; }
.sp-fan a { display: block; transition: transform 200ms var(--ease); }
.sp-fan a:hover { transform: translateY(-4px); }
.sp-fan a:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; border-radius: var(--r-xl); }
.sp-fan .item-card { width: 104px; }  /* the card strip needs 104px: narrower and its text overflows the card */
/* Five cards share the tile's width evenly: as large as the tile allows, and the height follows the card ratio. */
.sh-pass .sp-fan { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.sh-pass .sp-fan .item-card { width: 100%; }
.hm-row .ob-ic { width: 36px; height: 36px; flex: none; object-fit: contain; }

.sp-rail-wrap { --arrow-y: 50%; position: relative; }
.sp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.sp-focus { display: inline-flex; flex-wrap: wrap; gap: 2px; max-width: 100%; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); }
.sp-focus button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--r-pill); background: none; color: var(--muted);
  font: inherit; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease); }
.sp-focus button[hidden] { display: none; }
.sp-focus button span { font-size: 0.6875rem; opacity: .7; font-variant-numeric: tabular-nums; }
.sp-focus .glyph { display: none; width: 14px; height: 14px; }
.sp-focus button[aria-pressed="true"] { background: rgba(255, 255, 255, .12); color: var(--text); }
.sp-focus button[data-k][aria-pressed="true"] { border-color: rgba(242, 193, 78, .45); background: rgba(242, 193, 78, .16); color: #FFE7A3; }
.sp-focus button[aria-pressed="true"] .glyph { display: block; }
.sp-focus button:focus-visible, .sp-prem:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.sp-prem { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 18px 0 8px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise);
  color: var(--muted); font: inherit; font-size: 0.875rem; font-weight: 700; cursor: pointer; transition: border-color 200ms var(--ease), color 200ms var(--ease); }
.sp-prem[hidden] { display: none; }
.sp-prem-knob { position: relative; flex: none; width: 40px; height: 24px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .16); transition: background-color 200ms var(--ease); }
.sp-prem-knob::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: var(--r-pill); background: var(--text); transition: transform 200ms var(--ease); }
.sp-prem[aria-checked="true"] { border-color: rgba(242, 193, 78, .55); color: var(--gold); }
.sp-prem[aria-checked="true"] .sp-prem-knob { background: var(--gold); }
.sp-prem[aria-checked="true"] .sp-prem-knob::after { transform: translateX(16px); background: #1A1204; }
.sp-map { display: flex; gap: 3px; width: min(560px, 100%); margin: 0 auto 12px; }
.sp-tick { position: relative; flex: 1; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; }
.sp-tick::before { content: ""; position: absolute; left: 0; right: 0; top: 14px; height: 4px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .14); transition: background-color 200ms var(--ease); }
.sp-tick.is-reached::before { background: var(--gold); }
.sp-tick.is-in::before { background: var(--text); }
.sp-tick.is-in.is-reached::before { background: var(--gold); box-shadow: 0 0 0 2px rgba(242, 193, 78, .35); }
.sp-tick:hover::before { background: var(--text); }
.sp-tick:focus-visible { outline: 2px solid var(--chalk); outline-offset: 1px; border-radius: var(--r-xs); }

.sp-stage { --lab: 46px; position: relative; display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); width: calc(100vw - var(--sbw, 0px)); margin-left: calc(50% - (100vw - var(--sbw, 0px)) / 2); }
.sp-rail { grid-column: 2; }
.sp-rail { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; cursor: grab; padding: 6px 0 14px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
.sp-rail-wrap[data-end="true"] .sp-rail { -webkit-mask-image: none; mask-image: none; }
.sp-rail::-webkit-scrollbar { display: none; }
.sp-rail:focus-visible { outline: 2px solid var(--chalk); outline-offset: -2px; }
.sp-rail.is-drag { cursor: grabbing; user-select: none; }
.sp-rail img { -webkit-user-drag: none; }
/* The track starts at the window's left edge: Standard and Premium have their own column (.sp-names) and the levels scroll
   beside it, never under it. 360px per level: rewards.fit() sizes tiles for it. */
.sp-levels { display: grid; grid-auto-columns: 360px; grid-template-rows: auto auto auto; width: max-content; margin: 0; padding: 0 8px; list-style: none; transition: transform 420ms var(--ease); }
.sp-rail.is-drag .sp-levels { transition: none; }
.sp-levels > li { display: contents; }
.sp-names { grid-column: 1; grid-row: 1; position: relative; }
.sp-lane-name { position: absolute; left: 0; right: 0; display: grid; place-items: center; color: var(--muted); font-size: 0.8125rem; font-weight: 700; line-height: 1;
writing-mode: vertical-rl; transform: rotate(180deg); }
.sp-lane-name.is-premium { color: var(--gold); }
/* The level bar, as in the game: SP cost on the left, the level number on the right, then the bar that fills with your
   Season Points (empty without a sync). A gap between levels. */
.sp-node { grid-column: var(--c); grid-row: 1; display: grid; align-content: end; gap: 6px; min-width: 0; padding: 4px 5px 10px; }
.sp-node-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sp-badge { font-size: 1.375rem; font-weight: 800; font-stretch: 115%; line-height: 1; font-variant-numeric: tabular-nums; }
.sp-sp { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.sp-sp img { width: 14px; height: auto; }
.sp-seg { display: block; height: 8px; overflow: hidden; border-radius: var(--r-pill); background: rgba(255, 255, 255, .12); }
.sp-seg i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--gold-grad); transform: translateX(calc(var(--off, 100%) * -1)); transition: transform 600ms var(--ease); }  /* a transform, not width: no layout on each frame */
.sp-pc { display: none; color: var(--gold); font-size: 0.6875rem; font-weight: 700; }
.sp-node.is-next .sp-badge { color: var(--gold); }
.sp-node.is-next .sp-seg { box-shadow: 0 0 0 2px rgba(242, 193, 78, .3); }

/* One box per slot: a single reward or a bundle is one box (all of it is yours); a choice is one box per option with
   "or" between them (take one). Boxes fill the level, so both rows line up. */
.sp-lane { grid-column: var(--c); grid-row: 2; display: flex; min-width: 0; padding: 5px; }
.sp-lane.is-premium { grid-row: 3; }
.sp-lane.is-reached { opacity: .62; }
.sp-rail-wrap[data-prem="off"] .sp-lane.is-premium, .sp-rail-wrap[data-prem="off"] .sp-lane-name.is-premium { display: none; }
.sp-rail-wrap[data-prem="off"] .sp-pc { display: block; }
.sp-slot { display: flex; align-items: stretch; width: 100%; }
.sp-box { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; margin: 0; padding: 12px 8px 10px; list-style: none;
  border: 1px solid var(--hair); border-radius: var(--r-3xl); background: rgba(255, 255, 255, .03); }
.sp-slot.is-choice .sp-box { gap: 4px; padding-inline: 5px; }
.sp-slot { position: relative; }
.sp-lane.is-premium .sp-box { border-color: rgba(242, 193, 78, .3); background: linear-gradient(180deg, rgba(242, 193, 78, .09), rgba(242, 193, 78, .025)); }
.sp-lane.is-locked .sp-box { border-style: dashed; background: none; }
.sp-lane.is-next .sp-box { border-color: rgba(242, 193, 78, .6); }
/* "OR": a gold divider through the middle of the one box, so the options read as one level's choice */
.sp-or { flex: none; align-self: stretch; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 26px; margin: -4px 0; list-style: none; }
.sp-or::before, .sp-or::after { content: ""; flex: 1; width: 1px; background: rgba(242, 193, 78, .35); }
.sp-or span { color: var(--gold); font-size: 0.8125rem; font-weight: 800; font-stretch: 125%; line-height: 1; text-transform: uppercase; }
.sp-slot > .cmp-open.is-icon { position: absolute; top: 8px; right: 8px; z-index: 2; width: 32px; min-height: 32px; padding: 0; justify-content: center; background: var(--core); }
.sp-tile { flex: 1 1 0; min-width: 0; }
.sp-tile > a { display: block; color: inherit; text-decoration: none; transition: transform 200ms var(--ease); }
.sp-tile > a:hover { transform: translateY(-4px); }
.sp-tile > a:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; border-radius: var(--r-lg); }
.sp-art { position: relative; display: grid; place-items: center; width: min(100%, var(--t, 116px)); margin: 0 auto; aspect-ratio: var(--card-ratio); }
.sp-art > * { grid-area: 1 / 1; }
.sp-art > img { width: 90%; height: auto; }  /* card frames carry their own margin; other art is inset to match */
.sp-art .item-card { width: 100%; }
/* The strip is sized in the card's width, which on a 58-116px card can fall below readable: size it in em from a floor,
   and let the plate grow past the card's edges rather than clip its text. */
.sp-tile .card-strip { top: auto; bottom: -2%; max-width: none; font-size: max(9.6cqw, 9px); }
.sp-tile .cs-items { max-width: none; font-size: max(9.6cqw, 9.5px); }
.sp-tile .cs-items svg { width: .9em; height: .9em; }
.sp-tile .cs-items > span { gap: .14em; padding: 0 .3em; }
.sp-tile .cs-nr { margin-left: .06em; padding: 0 .38em 0 .32em !important; }
.sp-tile.is-sp .sp-art > img { width: 88%; height: auto; }
.sp-tile.is-coins .sp-art > img { width: 84%; height: auto; }
.sp-art > .sp-club-art { position: static; width: 52%; height: auto; aspect-ratio: 1; transform: translateY(-4%); border-radius: 8%; }
.sp-tile > b, .sp-tile > a > b { display: block; height: 18px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; font-weight: 600; line-height: 18px; text-align: center; }
.sp-art > .ic-chip { position: absolute; z-index: 1; top: -6px; right: -6px; width: 22px; height: 22px; background: var(--core); }
.js .sp-col .sp-lane > * { opacity: 0; transform: translateY(10px); transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
.js .sp-col.is-in .sp-lane > * { opacity: 1; transform: none; }
.sp-nav { position: absolute; top: var(--arrow-y); z-index: 3; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: var(--r-pill);
  border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.sp-nav:hover { border-color: var(--gold); }
.sp-nav:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.sp-nav.is-prev { left: calc(var(--lab, 46px) + 12px); }
.sp-nav.is-next { right: 16px; }
.sp-rail-wrap[data-start="true"] .sp-nav.is-prev, .sp-rail-wrap[data-end="true"] .sp-nav.is-next { display: none; }

.sp-card { position: relative; width: var(--px, 124px); }
.sp-card a { display: grid; justify-items: center; gap: 6px; color: inherit; text-decoration: none; transition: transform 200ms var(--ease); }
.sp-card a:hover { transform: translateY(-4px); }
.sp-card a:focus-visible, .sp-evo a:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; border-radius: var(--r-lg); }
.sp-card a > b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; font-weight: 700; line-height: 1.25; text-align: center; }
.sp-card .item-card { width: 100%; }
.sp-card > .ic-chip { position: absolute; top: -4px; right: -8px; width: 22px; height: 22px; background: var(--core); }
.sp-evo { position: relative; }
.sp-evo a { display: grid; justify-items: center; gap: 6px; width: 90px; color: inherit; text-decoration: none; }
.sp-evo img { display: block; width: 84px; height: auto; }
.sp-evo b { font-size: 0.75rem; font-weight: 700; line-height: 1.2; text-align: center; }
.sp-pack { display: grid; justify-items: center; gap: 4px; width: 76px; text-align: center; }
.sp-pack img { width: 56px; height: auto; }
.sp-pack b { font-size: 0.75rem; font-weight: 700; line-height: 1.2; }
.sp-chip a { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.sp-chip a:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; border-radius: var(--r-pill); }
.sp-club { display: grid; justify-items: center; align-content: start; gap: 4px; width: 68px; text-align: center; }
.sp-club-card { position: relative; display: block; width: 58px; }
.sp-club-frame { display: block; width: 58px; height: auto; }
.sp-club-art { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; transform: translate(-50%, -54%); border-radius: var(--r-xs); object-fit: cover; }
.sp-club b { font-size: 0.6875rem; font-weight: 700; line-height: 1.2; }
.sp-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px 2px 6px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .06); font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.sp-chip-ic { display: grid; place-items: center; flex: none; width: 22px; height: 24px; color: var(--muted); }
.sp-chip-ic img { width: auto; max-width: 22px; max-height: 26px; }
.sp-coin { width: 18px; height: 18px; }
.cmp-open { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: none; color: var(--text);
  font: inherit; font-size: 0.8125rem; font-weight: 700; cursor: pointer; transition: border-color 200ms var(--ease); }
.cmp-open:hover { border-color: var(--gold); }
.cmp-open:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.sp-rail[data-focus] .sp-tile { opacity: .16; transition: opacity 200ms var(--ease); }
.sp-rail[data-focus~="player"] .sp-tile[data-k="player"], .sp-rail[data-focus~="evo"] .sp-tile[data-k="evo"],
.sp-rail[data-focus~="club"] .sp-tile[data-k="club"], .sp-rail[data-focus~="pack"] .sp-tile[data-k="pack"] { opacity: 1; }

.sp-haul { margin-top: 48px; }
.sp-haul-head { display: grid; justify-items: center; gap: 16px; text-align: center; }
.sp-haul h2 { margin: 0; font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 800; font-stretch: 120%; line-height: 1; }
.sp-haul h3 { margin: 36px 0 18px; color: var(--muted); font-size: 1rem; font-weight: 700; text-align: center; }
.sp-haul h3 span { margin-left: 4px; font-size: 0.75rem; opacity: .7; }
.sp-haul .seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); }
.sp-haul .seg button { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }
.sp-haul .seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .12); color: var(--text); }
.sp-haul .seg button:focus-visible { outline: 2px solid var(--chalk); outline-offset: 1px; }
.sp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 16px; justify-items: center; margin: 0; padding: 0; list-style: none; }
.sp-gallery.is-evo { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.sp-gallery .sp-card { width: 128px; }
.sp-gallery .sp-card .item-card { width: 128px; }
.sp-cap { display: grid; justify-items: center; align-content: start; gap: 2px; width: 100%; text-align: center; }
.sp-cap b { max-width: 100%; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; font-size: 0.8125rem; font-weight: 700; line-height: 1.25; }
.sp-cap small { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.sp-cap small.is-premium { color: var(--gold); }
.sp-evo a { width: 120px; }
.sp-gallery .sp-evo { justify-self: center; }
.sp-haul[data-track="standard"] [data-t="premium"], .sp-haul[data-track="premium"] [data-t="standard"] { display: none; }
.sp-tallies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sp-tally h3 { margin: 0 0 12px; font-size: 0.875rem; }
.sp-tally[data-t="premium"] h3 { color: var(--gold); }
.sp-tally ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

@media (max-width: 1100px) { .sp-hero .sp-fan a:nth-child(n+4) { display: none; } }
@media (max-width: 900px) { .sp-hero .sp-fan a:nth-child(n+3) { display: none; } .sp-tallies { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
  .sp-seg i { transition: none; }
  .js .sp-col .sp-lane > * { opacity: 1; transform: none; transition: none; }
  .sp-levels, .sp-tile > a { transition: none; }
}

/* ---------- Compare (cometut/compare.py, docs/features/compare.md) ---------- */
.cmp-sheet { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 22px 22px 26px; overflow: auto; border: 1px solid var(--hair-strong); border-radius: var(--r-core); background: var(--core); color: var(--text); }
.cmp-sheet { width: min(960px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 22px 22px 26px; overflow: auto; border: 1px solid var(--hair-strong); border-radius: var(--r-core); background: var(--core); color: var(--text); }
.cmp-sheet::backdrop { background: rgba(0, 0, 0, .74); }
.cmp-close { display: flex; justify-content: flex-end; margin: 0 0 4px; }
.cmp-close button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); cursor: pointer; }
.cmp-close button:focus-visible, .cmp-x:focus-visible, .cmp-add input:focus-visible, .cmp-results button:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.cmp-close .glyph { width: 18px; height: 18px; }
.cmp-page { margin-top: 20px; }
.cmp { display: grid; gap: 16px; }
.cmp-scroll { overflow-x: auto; }
.cmp table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; font-variant-numeric: tabular-nums; }
.cmp th[scope="row"] { position: sticky; left: 0; width: 108px; padding: 9px 8px; background: var(--core); color: var(--muted); font-size: 0.8125rem; font-weight: 600; text-align: left; }
.cmp td { padding: 9px 6px; font-weight: 700; vertical-align: middle; }
.cmp tbody tr { border-top: 1px solid var(--hair); }
.cmp td small { display: block; color: var(--muted); font-size: 0.6875rem; font-weight: 600; }
.cmp td.is-best { color: var(--gold); background: rgba(242, 193, 78, .1); }
.cmp td small { color: #e5736a; }  /* how far behind the best card in the row */
.cmp tbody tr:nth-child(-n+2) td { font-size: 1.125rem; font-weight: 800; }  /* OVR and the first stat row lead the table */
.cmp tbody tr:not(:has(td.is-best)):hover td { background: rgba(255, 255, 255, .03); }
.cmp-head { position: relative; padding-bottom: 16px; vertical-align: top; }
.cmp-head .item-card { width: 150px; margin: 0 auto; }
.cmp-x { position: absolute; top: 0; right: 6px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--hair-strong); border-radius: var(--r-pill); background: var(--raise); color: var(--text); cursor: pointer; }
.cmp-x .glyph { width: 14px; height: 14px; }
.cmp > .state { justify-self: center; text-align: center; }
.cmp-slots { display: flex; justify-content: center; gap: 20px; }
.cmp-slot { width: 150px; aspect-ratio: 5 / 7; border: 2px dashed var(--hair-strong); border-radius: var(--r-2xl); background: var(--raise); opacity: .6; }
.cmp-add { position: relative; display: grid; width: min(420px, 100%); margin: 0 auto; }
.cmp-add input { height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font: inherit; font-size: 0.875rem; }
.cmp-results { position: absolute; top: 48px; left: 0; right: 0; z-index: 5; display: grid; gap: 2px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--hair-strong); border-radius: var(--r-2xl); background: var(--core); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.cmp-results[hidden] { display: none; }
.cmp-results button { display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 0 10px; gap: 0 8px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: var(--r-md); background: none; color: var(--text); font: inherit; font-size: 0.8125rem; text-align: left; cursor: pointer; }
.cmp-results button:hover { background: rgba(255, 255, 255, .07); }
.cmp-results small { grid-column: 1 / -1; color: var(--muted); }
.cmp td img.cmp-ps { display: inline-block; margin: 0 2px; vertical-align: middle; }
.cmp td { position: relative; }
.cmp td.is-best:has(.cmp-bar), .cmp td.is-best { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent); }
.cmp td[class*="s-"] { color: var(--c); }
.cmp td[class*="s-"].is-best { color: var(--c); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.cmp-bar { display: block; height: 4px; margin: 6px auto 0; width: 80%; border-radius: var(--r-pill); background: linear-gradient(to right, var(--c) var(--w), rgba(255, 255, 255, .1) var(--w)); }
.cmp td .pos-set { justify-content: center; }
.cmp td .evo-stars { justify-content: center; }
.cmp-results li { list-style: none; }
.cmp-results .item-card { flex: none; }
.cmp-results button > span { display: grid; min-width: 0; text-align: left; }
.cmp-results button > span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 720px) {
  .cmp-sheet { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 14px; border: 0; border-radius: 0; }
  .cmp-sheet { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 14px; border: 0; border-radius: 0; }
  .cmp table { min-width: calc(76px + var(--cols, 2) * 90px); }  /* two cards and the add box fit a phone; more cards scroll */
  .cmp th[scope="row"] { width: 76px; padding: 9px 4px; font-size: 0.75rem; }
  .cmp-head .item-card { width: 84px; }
  .cmp-x { right: 0; width: 28px; height: 28px; }
}

/* Season Pass on a phone */
@media (max-width: 720px) {
  .sp-hero { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; border-radius: var(--r-panel); }
  .sp-fan { justify-content: center; }
  .sp-fan .item-card { width: 104px; }
  .sh-pass .sp-fan { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sh-pass .sp-fan a:nth-child(n+4) { display: none; }
  .sp-bar { gap: 10px; }
  .sp-focus { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: var(--r-panel-l); }
  .sp-focus button:not([data-k]) { grid-column: 1 / -1; justify-content: center; }
  .sp-focus button { justify-content: center; }
  .sp-focus button, .sp-haul .seg button { height: 44px; }
  .sp-prem { height: 44px; }
  .sp-tick { height: 44px; }
  .sp-tick::before { top: 20px; }
  .sp-stage { --lab: 30px; }
  .sp-lane-name { font-size: 0.75rem; }
  .sp-levels { grid-auto-columns: 300px; }
  .sp-art { width: min(100%, calc(var(--t, 116px) * .75)); }  /* 300px levels: rewards.fit() sizes scaled to match */
  .sp-slot > .cmp-open.is-icon { width: 44px; min-height: 44px; }
  .sp-nav { display: none; }
  .sp-gallery { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
  .sp-gallery .sp-card .item-card { width: 112px; }
  .cmp-open { min-height: 44px; }
}

/* Consumables (consumables_pages.py): a card per chemistry style, with what it lifts, where it plays best and its price. */
.cm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.cm { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border: 1px solid var(--hair); border-radius: var(--r-panel); background: var(--core); scroll-margin-top: calc(110px + env(safe-area-inset-top)); }
.cm:target { border-color: rgba(242, 193, 78, .6); }
.cm-art { flex: none; width: 92px; }
.cm-info { display: grid; gap: 10px; min-width: 0; }
.cm-info h2 { margin: 0; font-size: 1.125rem; font-weight: 800; font-stretch: 112%; line-height: 1.2; }
.cm-price { display: inline-flex; align-items: center; gap: 6px; font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-lifts, .cm-best { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cm-lifts li { display: inline-flex; gap: 5px; align-items: baseline; padding: 2px 9px; border-radius: var(--r-pill); background: rgba(242, 193, 78, .12); font-size: 0.75rem; font-weight: 600; }
.cm-lifts li span { color: var(--muted); }
.cm-lifts li b { color: var(--gold); font-weight: 700; }
.cm-best li { padding: 2px 9px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); font-size: 0.75rem; font-weight: 600; }
@media (max-width: 720px) { .cm-grid { grid-template-columns: minmax(0, 1fr); } }

/* Card versions (cometut/versions.py): each version's frame and rating under the card, holographic ones shimmer */
.pd-versions { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 12px; max-width: 100%; }
.pv { position: relative; display: grid; justify-items: center; gap: 1px; width: 40px; padding: 4px 2px 3px; overflow: hidden;
  border: 1px solid var(--hair); border-radius: var(--r-md); color: var(--text); text-decoration: none; transition: border-color .2s var(--ease); }
.pv img, .pv-plate { display: block; width: 30px; height: 42px; object-fit: contain; }
.pv-plate { border-radius: var(--r-xs); background: var(--hair-strong); }
.pv b { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pv:hover { border-color: var(--hair-strong); }
.pv[aria-current="page"] { border-color: var(--gold); background: rgba(242, 193, 78, 0.08); }
.pv.is-holo::after { background: linear-gradient(115deg, #ff7ad9, #7ad7ff, #fff08a, #9dff9a, #ff7ad9); background-size: 300% 100%; }
.pv.is-holo::after { content: ""; position: absolute; inset: 0; opacity: .32; mix-blend-mode: screen; pointer-events: none;
  animation: holo-sheen 4s linear infinite; }
.holo-mark { display: inline-block; flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: conic-gradient(from 0deg, #ff7ad9, #7ad7ff, #fff08a, #9dff9a, #ff7ad9);
  box-shadow: 0 0 0 2px rgba(6, 7, 10, .85), 0 0 8px rgba(122, 215, 255, .55); animation: holo-spin 6s linear infinite; }
@keyframes holo-spin { to { filter: hue-rotate(360deg); } }
@keyframes holo-sheen { to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) { .pv.is-holo::after, .holo-mark { animation: none; } }
.item-card > .holo-mark { position: absolute; top: 7%; right: 6%; z-index: 3; width: 16px; height: 16px; }

/* ---------- touch: small controls keep their look, their tap area grows to 44px ---------- */
@media (pointer: coarse) and (min-width: 721px) {  /* at 720px and under .opt-seg is 44px already */
  .opt-seg::before { content: ""; position: absolute; inset: -8px 0; }
}
@media (pointer: coarse) {
  .chip-x { position: relative; }
  .chip-x::before { content: ""; position: absolute; inset: -12px -8px -12px -4px; }
  .evo-step-x { position: relative; }
  .evo-step-x::before { content: ""; position: absolute; inset: -8px -6px; }
}
/* Row 7 (modern web audit): the rest grow to ~44px without moving anything. Up to 720px the controls are already 44px
   (see the touch rules below), so this covers tablets and big touch screens. Insets stay under half the gap so hit areas never overlap. */
@media (pointer: coarse) and (min-width: 721px) {
  .pos-tab, .star-btn, .btn-sm, .icon-btn { position: relative; }
  .pos-tab::after { content: ""; position: absolute; inset: -3px; }   /* 6px gaps between tabs: 32px grows to 38px, never overlapping */
  .star-btn::after { content: ""; position: absolute; inset: -7px; }
  .btn-sm::after, .icon-btn::after { content: ""; position: absolute; inset: -4px; }
}

/* ---------- page and dialog motion (polish slice 5) ---------- */
/* Pages cross-fade instead of cutting; the island stays put across the change. */
@view-transition { navigation: auto; }
.island { view-transition-name: island; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; }
.pd-card > .item-card { view-transition-name: card-hero; }  /* the card a list click named card-hero lands here (ui.py) */
::view-transition-group(card-hero), ::view-transition-group(sbc-hero) { animation-duration: 320ms; animation-timing-function: var(--ease); }
.set-summary, .evo-detail-head { view-transition-name: sbc-hero; }  /* the SBC or Evolution card a list click named sbc-hero lands here (shell.js) */
/* Saved squads and Compare open with a short rise and leave the same way; interrupting either reverses from where it is. */
dialog.sq-saved, dialog.cmp-sheet, dialog.search-sheet { opacity: 0; transform: translateY(12px) scale(.98);
  transition: opacity 220ms var(--ease), transform 280ms var(--ease), overlay 280ms allow-discrete, display 280ms allow-discrete; }
dialog.sq-saved[open], dialog.cmp-sheet[open], dialog.search-sheet[open] { opacity: 1; transform: none; }
@starting-style { dialog.sq-saved[open], dialog.cmp-sheet[open], dialog.search-sheet[open] { opacity: 0; transform: translateY(12px) scale(.98); } }
dialog.sq-saved::backdrop, dialog.cmp-sheet::backdrop, dialog.search-sheet::backdrop { transition: opacity 280ms var(--ease), overlay 280ms allow-discrete, display 280ms allow-discrete; opacity: 0; }
dialog.sq-saved[open]::backdrop, dialog.cmp-sheet[open]::backdrop, dialog.search-sheet[open]::backdrop { opacity: 1; }
@starting-style { dialog.sq-saved[open]::backdrop, dialog.cmp-sheet[open]::backdrop, dialog.search-sheet[open]::backdrop { opacity: 0; } }
.sheet-grab { display: none; }
@media (max-width: 720px) {  /* phone: a sheet at the foot of the screen, dragged down by its handle or header */
  dialog.sq-saved, dialog.cmp-sheet { width: 100%; max-width: 100%; max-height: 88dvh; margin: auto 0 0; transform: translateY(100%); opacity: 1;
    border-radius: var(--r-core) var(--r-core) 0 0; border-bottom: 0; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
  dialog.sq-saved[open], dialog.cmp-sheet[open] { transform: none; }
  @starting-style { dialog.sq-saved[open], dialog.cmp-sheet[open] { transform: translateY(100%); opacity: 1; } }
  dialog.dragging { transition: none; }
  .sheet-grab { display: block; position: relative; width: 40px; height: 5px; margin: -6px auto 12px; border-radius: var(--r-pill); background: var(--hair-strong); touch-action: none; }
  .sheet-grab::before { content: ""; position: absolute; inset: -16px -60px; }
  .sq-saved-head, .cmp-close { touch-action: none; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  dialog.sq-saved, dialog.cmp-sheet, dialog.search-sheet, dialog.sq-saved::backdrop, dialog.cmp-sheet::backdrop, dialog.search-sheet::backdrop { transition: none; }
}

/* Owner's CometRating tier editor (/local/admin/ratings) */
.rt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.rt-state { color: var(--muted); font-size: 0.8125rem; margin-right: auto; }
.rt-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.rt-grid { display: grid; gap: 2px; }
.rt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 8px; border-radius: var(--r-md, 10px); }
.rt-row.is-own { background: rgba(255, 255, 255, 0.05); }
.rt-name { font-weight: 600; }
.rt-segs { display: inline-grid; grid-template-columns: repeat(5, auto); gap: 2px; }
.rt-prev { position: sticky; top: 90px; display: grid; gap: 6px; }
.rt-card { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); font-size: 0.8125rem; }
.rt-card span:nth-child(2) { color: var(--muted); }
.rt-n { text-align: right; }
.rt-d { text-align: right; color: var(--muted); font-weight: 700; }
.rt-d.up { color: var(--chem-gain); }
.rt-d.down { color: #F29B5B; }
.rt-pub { margin-top: 16px; color: var(--muted); font-size: 0.8125rem; }
@media (max-width: 800px) { .rt-cols { grid-template-columns: 1fr; } .rt-prev { position: static; } .rt-row { flex-wrap: wrap; } .rt-segs { grid-template-columns: repeat(5, auto); } }
.rt-segs .opt-seg { white-space: nowrap; padding: 0 8px; }

/* The one sign-up prompt (ui.signup_prompt): a line and a gold button, shown only where a club would have changed the answer. */
.su-prompt { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px 16px; color: var(--muted); font-size: 0.875rem; }
.su-prompt .nav-auth { height: 40px; }

/* Squad search: the funnel is a small round button ending the League / Nation / Club row; its panel stacks the shared filter fields. */
.sq-filter .xf-btn, .sq-filter .xf-btn:is(:hover, [aria-expanded="true"]) { width: 28px; height: 28px; margin-left: auto; }
.sq-filter .xf-btn svg { width: 15px; height: 15px; }
.xf-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.xf-stack > .cf-field:has(.cf-seg), .xf-stack > .xf-ps-field { grid-column: 1 / -1; }
.xf-stack { max-height: min(36vh, 300px); overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
@media (max-width: 480px) { .xf-stack { grid-template-columns: minmax(0, 1fr); } }
.xf-stack .cf-seg { flex-wrap: wrap; }
.xf-stack .cf-seg label { flex: 1 1 auto; }
.xf-stack .cf-seg span { padding: 0 10px; }
@media (pointer: coarse) { .sq-filter .xf-btn { width: 36px; height: 36px; } }

/* touch targets: the last controls under 44px at 375px on a touch screen (measured 2026-10-30) */
@media (pointer: coarse), (max-width: 720px) {
  .tool-search { height: 44px; }
  .tool-search:not(:focus-within):not(.has-value) { width: 44px; }
  .pl-view > a { min-width: 44px; }
  .pv { width: 44px; }
  .plat-switch > a { min-height: 44px; }
  .xf-range input, .cf-field .xf-range input { height: 44px; }
}

/* Squad Builder (owner review 30 Oct): filter pills shorter, selected pill slides; stars and feet instead of words */
.xf-stack .cf-seg { gap: 2px; padding: 3px; }
.xf-stack .cf-seg span { height: 28px; padding: 0 9px; border-color: transparent; background: none; }
.xf-stack .cf-seg input:checked + span { border-color: transparent; background: none; color: var(--text); }
.cf-seg .stars { display: inline-flex; gap: 1px; }
.cf-seg .stars svg { width: 10px; height: 10px; fill: currentColor; }
.cf-seg .ft-ic { width: 14px; height: 14px; fill: currentColor; }
.cf-seg .ft-ic.is-left { transform: scaleX(-1); }
.cf-seg input:checked + span .stars, .cf-seg input:checked + span .ft-ic { color: var(--gold); }
/* the player-list popovers (League, Nation, Club): names only, long ones wrap to two lines, never sideways */
.sq-pop ul { overflow-x: hidden; }
.sq-pop button span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; overflow-wrap: anywhere; }
/* Code pill (top right): the tactic code to copy and a box to paste one */
.sq-code { position: relative; }
.sq-code > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; }
.sq-code > summary::-webkit-details-marker { display: none; }
.sq-code > summary .glyph { width: 14px; height: 14px; }
.sq-code-box { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; display: grid; gap: 8px; width: 240px; padding: 10px; border-radius: var(--r-2xl); border: 1px solid var(--hair-strong); background: var(--raise); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8); }
.sq-code-box .tc-code { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--hair-strong); border-radius: var(--r-pill); background: var(--core); cursor: pointer; }
.sq-code-box .tc-code code { font: inherit; }
.sq-code-box .tc-code .glyph { width: 15px; height: 15px; color: var(--muted); }
.sq-code-box .tc-import input { height: 30px; font-size: 0.75rem; }
.sq-code-box .tc-import .btn-sm { height: 30px; padding: 0 10px; }
.sq-bar { position: relative; z-index: 60; }  /* the Code panel hangs below the bar, over the summary */
.role-pop { overflow-x: hidden; }
.role-pop .sq-label { display: flex; align-items: baseline; gap: 8px; }
.role-pop .sq-label small { flex-basis: auto; }
.role-pop .sq-label .rp-cr { margin-left: auto; }
.cf-seg { position: relative; isolation: isolate; }
.xf-stack .cf-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); gap: 2px; padding: 3px; border-radius: var(--r-xl); border: 1px solid var(--hair); background: var(--shell); }
.xf-stack .cf-seg span { padding: 0 6px; }
.xf-stack .cf-seg label { min-width: 0; }
.xf-stack { overflow-x: hidden; }
.xf-stack .xf-range input { min-width: 0; }
.xf-stack .cf-field:has(input[name="sm"], input[name="wf"]) .cf-seg { grid-template-columns: auto repeat(4, minmax(0, 1fr)); }
.cf-seg .stars svg { width: 8px; height: 8px; }
.cf-seg .stars { color: var(--text); }
.cf-seg .ft-ic { width: 9px; height: 18px; }
.xf-stack .cf-seg span { padding: 0 4px; }
.cf-seg .ft-ic { width: 14px; height: 18px; }
.cf-seg .stars svg { width: 9px; height: 9px; }
/* SBC pages (owner review 30 Oct): picker bar, favourite star, Solve outline, submit, tick */
.is-total .is-bar { flex: 1 1 140px; min-width: 120px; height: 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.is-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--gold-grad); transition: width 300ms var(--ease), background 300ms var(--ease); }
.is-pick.is-met .is-bar i { background: var(--fresh); }
.is-pick.is-over .is-bar i { background: #E5484D; }
.is-pick.is-over .is-sum b { color: #E5484D; }
.is-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.is-filter input { flex: 1 1 160px; min-width: 0; height: 34px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--raise); color: var(--text); font: inherit; font-size: 0.8125rem; }
.is-card { position: relative; }
.is-card[aria-pressed="true"] { border-color: var(--fresh); box-shadow: 0 0 0 1px var(--fresh), 0 0 18px -4px var(--fresh); }
.is-card[aria-pressed="true"]::after { content: ""; position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: var(--r-pill); background: var(--fresh) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306110C' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17.5 19 7'/%3E%3C/svg%3E") center / 12px no-repeat; z-index: 5; }
.trade-ic.is-mini { top: 2px; left: 2px; width: 18px; height: 18px; color: var(--muted); }
.trade-ic.is-mini svg { width: 15px; height: 15px; }
.item-group-card .times { top: auto; bottom: 18%; right: -6px; }
.item-group .pill, .is-card .pill { height: 22px; font-size: 0.6875rem; gap: 3px; padding: 0 6px 0 3px; }
.item-group .pill .coin { width: 14px; height: 14px; }
.star-btn { width: 30px; height: 30px; border: 0; background: none; }
.star-btn .glyph { grid-area: 1 / 1; width: 22px; height: 22px; stroke-width: 1.6; transition: opacity 200ms var(--ease), filter 200ms var(--ease); }
/* two stacked glyphs crossfade, the outgoing one blurring away (as billing.js does for totals) */
.star-btn .g-on { fill: var(--gold); stroke: var(--gold); opacity: 0; filter: blur(2px); }
.star-btn[aria-pressed="true"] .g-on { opacity: 1; filter: none; }
.star-btn[aria-pressed="true"] .g-off { opacity: 0; filter: blur(2px); }
.star-btn:hover { border: 0; }
.star-btn[aria-pressed="true"] { border: 0; }
@media (max-width: 720px) { .star-btn { width: 44px; height: 44px; } }  /* the same star, a 44px tap box */
.btn-solve { border: 1px solid var(--hair-strong); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07); transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease), background 220ms var(--ease), color 220ms var(--ease); }
.btn-solve:hover, .btn-solve:focus-visible, .challenges .btn-solve:hover { transform: translateY(-2px); color: #fff; border-color: var(--gold); background: rgba(242, 193, 78, 0.12);
  box-shadow: 0 10px 26px -10px rgba(242, 193, 78, 0.75), 0 0 0 1px rgba(242, 193, 78, 0.45), inset 0 1px 0 rgba(255, 231, 163, 0.25); }
.btn-solve:active { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .btn-solve, .btn-solve:hover, .btn-solve:focus-visible, .challenges .btn-solve:hover { transform: none; transition: none; } }
.req-title { text-transform: none; letter-spacing: 0; font-size: 0.875rem; font-weight: 700; color: var(--text); }
.submit-form .btn { height: 48px; padding-left: 20px; border-color: rgba(63, 207, 142, 0.7); background: rgba(63, 207, 142, 0.14); color: var(--text); }
.submit-form { margin-top: 14px; animation: submit-in 320ms var(--ease) both; }
.solver-main > .submit-form { margin: 0 0 14px; }
@keyframes submit-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.req-tick { width: 18px; height: 18px; vertical-align: -4px; fill: none; stroke: var(--fresh); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .submit-form { animation: none; } }
/* A clock time starts as UTC text and the script rewrites it in the viewer's zone: hold it back until then (it shows by itself after 1.5 s if the script never runs). */
html.js time[data-local]:not([data-in]):not([data-p]) { visibility: hidden; animation: time-show 0s 1.5s forwards; }
@keyframes time-show { to { visibility: visible; } }
/* Card shell first: the player, face text and badges stay hidden until the frame image has loaded, then all appear together (the cut-out used to show alone, before its frame). */
/* Only lazy frames are gated (an eager frame is in the first paint), and the gate lifts by itself after 1.2 s if the CDN is slow. */
html.js .item-card.layered:has(> .ly-frame[loading=lazy]):not(.ly-broken):not(:has(> .ly-frame.in)) > :is(.ly-face, .ly-cut) { opacity: 0; animation: ly-show 0s 1.2s forwards; }
@keyframes ly-show { to { opacity: 1; } }
html.js .item-card.layered > .ly-face { transition: opacity 360ms var(--ease); }
html.js .item-card.layered:not(.ly-broken):not(:has(> .ly-frame.in)) > .ly-cut.head, html.js .item-card.layered:not(.ly-broken):not(:has(> .ly-frame.in)) > .ly-cut.full { opacity: 0; }
@media (prefers-reduced-motion: reduce) { html.js .item-card.layered > .ly-face { transition: none; } }

/* Testers + Traffic (cometut/account_pages.py) */
.tr-scroll { overflow-x: auto; }
.account .data .num, .account .data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px 24px; margin-top: 20px; }
.tr-rank td:last-child { width: 30%; }
.tr-bar { display: block; height: 6px; border-radius: 3px; background: var(--accent, #c9a24b); min-width: 2px; }

/* Pro Clubs PlayStyles: one list, a row per answer */
.pcb-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.pcb-build { display: grid; grid-template-columns: 28px minmax(0, 1.2fr) minmax(0, 1.6fr) auto; gap: 8px 16px; align-items: center; padding: 12px 14px; border-radius: var(--r-xl); background: var(--raise); border: 1px solid var(--hair); }
.pcb-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--shell); color: var(--muted); }
.pcb-mark.is-check { color: var(--fresh); }
.pcb-mark .glyph { width: 16px; height: 16px; }
.pcb-main, .pcb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.pcb-main > span, .pcb-meta > span, .pcb-meta time { color: var(--muted); font-size: 0.8125rem; }
@media (max-width: 760px) {
  .pcb-build { grid-template-columns: 28px minmax(0, 1fr); }
  .pcb-meta { grid-column: 1 / -1; }
}


/* Pro Clubs player card (cometut/proclubs_card.py): the owner's frame and pose images, our overlays in % of the frame */
.pcc { --glass: rgba(40, 42, 46, .22); --plate: linear-gradient(160deg, rgba(240, 242, 245, .55), rgba(120, 126, 136, .55)); --ink: #fff; --slot: rgba(70, 72, 78, .78);
  container-type: inline-size; width: 100%; max-width: 270px; }  /* card at most 240 px: the images are built at 2x that */
.pcc.t-bronze { --glass: rgba(70, 40, 22, .22); --plate: linear-gradient(160deg, rgba(232, 178, 140, .7), rgba(128, 78, 50, .7)); --slot: rgba(120, 74, 48, .8); }
.pcc.t-gold { --glass: rgba(110, 84, 26, .3); --plate: linear-gradient(160deg, rgba(255, 236, 170, .7), rgba(196, 150, 60, .7)); --ink: #1d1404; --slot: rgba(196, 154, 64, .85); }
.pcc-card { position: relative; margin: 0 5.4%; aspect-ratio: 434 / 600; }  /* --metal colours the pentagon slots */
@media (scripting: enabled) { .pcc-card:not(.is-ready) { visibility: hidden; } }  /* whole card at once, once the frame has loaded */
.pcc.t-bronze .pcc-card { --metal: linear-gradient(160deg, #e3b58f, #8a5a3a); }
.pcc.t-gold .pcc-card { --metal: linear-gradient(160deg, #f6dc8a, #b8892c); }
.pcc-card > *, .pcc-pose img { position: absolute; }
.pcc-frame { inset: 0; width: 100%; height: 100%; filter: brightness(var(--dim, 1)) saturate(var(--sat, 1)) drop-shadow(0 8px 18px rgba(0, 0, 0, .45)); }
/* the frames read bright and flat: a touch darker, gold most (the generated gold is the brightest metal) */
.pcc.t-bronze { --dim: .93; } .pcc.t-silver { --dim: .9; } .pcc.t-gold { --dim: .8; --sat: 1.08; }
/* holographic sweep: a feathered diagonal band crosses the card left to right (1.2 s of every 4.5 s), masked by the frame's own
   shape (--art, set on the card) so it never leaves the card. One clock for every card: ui._SCRIPT pins each run to time 0. */
.pcc-card::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(105deg, transparent 36%, rgba(255, 255, 255, .22) 44%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, .22) 56%, transparent 64%) 100% 0 / 300% 100% no-repeat;
  -webkit-mask: var(--art) center / 100% 100% no-repeat; mask: var(--art) center / 100% 100% no-repeat; animation: pcc-shine 4.5s linear infinite; }
@keyframes pcc-shine { 0% { background-position: 100% 0; } 27%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .pcc-card::after { animation: none; display: none; } }
.pcc-card:not(.is-ready)::after { visibility: hidden; }
.pcc-pose { inset: 0; overflow: hidden; clip-path: inset(3% 3.5% 18.5% 3.5% round 2%); }
.pcc-pose img { height: auto; max-width: none; }
.pcc-badge { left: 6.2%; top: 4.8%; width: 16.6%; height: 17.5%; border-radius: 10%; background: var(--glass); }
/* FC logo, then the flag under it, placed as in the owner's reference capture (placement.json) */
.pcc-logo { position: absolute; left: 22.7%; top: 15.6%; width: 60%; height: auto; }
.pcc-flag { position: absolute; left: 26.7%; top: 59.6%; width: 48%; height: 22%; object-fit: cover; }
.pcc-lvp { left: 69.6%; top: 2.9%; width: 26.4%; height: 24%; border-radius: 0 9% 0 100% / 0 7% 0 38%; background: var(--plate); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; padding-top: 5%; line-height: 1; }
.pcc-lvp span { font-size: 5.4cqw; font-weight: 500; letter-spacing: .02em; }
.pcc-lvp b { font-size: 12.5cqw; font-weight: 800; margin-top: 2%; }
/* Left pentagons and right PlayStyle tiles where the game draws them (measured on the reference captures). */
.pcc-slot { width: 14.2%; aspect-ratio: 1; left: -4.9%; background: var(--metal, linear-gradient(160deg, #e9ecef, #9aa1aa)); clip-path: polygon(50% 2%, 98% 38%, 80% 96%, 20% 96%, 2% 38%); }
.pcc-slot::before { content: ""; position: absolute; inset: 9%; clip-path: inherit; background: var(--slot); }
.pcc-slot.p1 { top: 31.1%; } .pcc-slot.p2 { top: 46.3%; } .pcc-slot.p3 { top: 61.5%; }
.pcc-dia { width: 14.5%; aspect-ratio: 1; left: 90.6%; display: grid; place-items: center; }
.pcc-dia .ps-art { width: 125%; max-width: none; height: auto; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .8)) drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.pcc-dia.is-empty, .pcc-reg:not(.is-filled)::before { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: var(--slot); }
.pcc-dia.d1 { top: 41.5%; } .pcc-dia.d2 { top: 52.6%; }
.pcc-foot { left: 8%; right: 5%; top: 85.4%; height: 9.6%; display: flex; align-items: center; gap: 6%; }
.pcc-foot img { height: 100%; width: auto; aspect-ratio: 1; }
.pcc-foot b { color: var(--ink); font-family: "Archivo", system-ui, sans-serif; font-stretch: 125%; font-weight: 900; font-size: 5.6cqw; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.pcc-foot b.long { font-size: 4.1cqw; }
.pcc-strip { list-style: none; display: flex; justify-content: center; gap: 3cqw; margin: 4cqw 0 0; padding: 0; }
.pcc-reg { width: 13cqw; aspect-ratio: 1; display: grid; place-items: center; color: var(--ink-2, #9aa1ad); position: relative; }
.pcc-reg:not(.is-filled)::before { content: ""; position: absolute; inset: 6%; opacity: .55; }
.pcc-reg.is-locked svg { position: relative; width: 34%; }
.pcc-reg small { position: absolute; bottom: -2%; right: 0; font-size: 2.6cqw; font-weight: 700; }
.pcc-reg .ps-art { width: 125%; max-width: none; height: auto; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .8)); }
.pcc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 28px 18px; justify-items: center; margin: 12px 0 28px; }
.pcc-cell { width: 100%; max-width: 270px; display: grid; gap: 10px; justify-items: center; }
.pcc-cell .seg-radio { width: 100%; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.pcc-cell .opt-seg { padding: 0 2px; text-decoration: none; }
.pcc-cell .opt-seg[aria-current] { background: rgba(255, 255, 255, 0.1); color: var(--text); }

/* Pro Clubs landing (proclubs_pages.landing_body) */
.pcl-fact { color: var(--muted); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pcl-go { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.pcl-lines { margin: 0 0 4px; }
.pcl-lines .opt-seg, .pcs-levels .opt-seg { padding: 0 14px; text-decoration: none; white-space: nowrap; }
.pcl-lines .opt-seg[aria-current], .pcs-levels .opt-seg[aria-current] { background: rgba(255, 255, 255, .12); color: var(--text); }
.pcl-line { margin: 20px 0 0; }
.pcl-line h2 { margin: 0 0 10px; color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.pcl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 180px)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.pcl-card { display: block; border-radius: 12px; transition: transform 200ms var(--ease-out); }
.pcl-card:focus-visible { transform: translateY(-3px); }
@media (hover: hover) and (pointer: fine) { .pcl-card:hover { transform: translateY(-3px); } }
.pcl-card:focus-visible { outline: 2px solid var(--chalk); outline-offset: 4px; }
.pcl-card { position: relative; }
.pcl-hot { position: absolute; z-index: 1; top: -6px; left: -2px; background: #2a1608; box-shadow: 0 0 0 2px var(--bg, #06070a); }  /* Trending: the Home flame, on the corner */
.pc-head { justify-content: flex-start; }
.pc-back { padding-left: 10px; }
@media (max-width: 640px) {
  .pcl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pcl-lines .opt-seg { padding: 0 10px; }
}

/* Pro Clubs Builder (proclubs_pages.builder_body) */
.pcs-pick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 16px; }
.pcs-pick .ui-select { min-width: 150px; }
.pcs-levels { grid-template-columns: repeat(var(--n), auto) auto; align-items: center; }
.pcs-levels .opt-seg { padding: 0 10px; }
.pcs-pick .pcs-levels .ui-select { min-width: 84px; margin-left: 2px; }
.pcs-copy-msg { color: var(--muted); font-size: 0.8125rem; }
.pcs-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: start; }
.pcs-side, .pcs-main { display: grid; gap: 16px; align-content: start; min-width: 0; }
.pcs-card { display: grid; justify-items: center; }
.pcs-ap { --bar: var(--fresh); display: grid; gap: 6px; }
.pcs-ap.is-over { --bar: var(--warn); }
.pcs-ap-row { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.pcs-ap-row b { font-size: 1.25rem; }
.pcs-left { margin-left: auto; color: var(--muted); }
.pcs-ap.is-over .pcs-left { color: var(--bar); font-weight: 700; }
.pcs-bar { position: relative; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pcs-bar::after { content: ""; position: absolute; inset: 0; background: var(--bar); clip-path: inset(0 calc(100% - var(--w)) 0 0 round 99px); transition: clip-path 380ms var(--ease); }
.pcs-box h2 { display: flex; align-items: center; gap: 6px; font-size: .95rem; margin: 0 0 8px; }
.pcs-sigs, .pcs-specs, .pcs-slots, .pcs-needs { list-style: none; margin: 0; padding: 0; }
.pcs-sigs, .pcs-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pcs-sig { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.8125rem; }
.pcs-sig .ps-art { width: 32px; height: auto; flex: none; }
.pcs-sig b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcs-slot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pcs-slot .pcc-reg { width: 32px; flex: none; }
.pcs-slot .ui-select { flex: 1; min-width: 0; }
.pcs-slot.is-locked { color: var(--muted); font-size: .85rem; }
/* Specializations: three tiles; each opens its sheet across the whole row (the row is the popover's box) */
.pcs-specs { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pcs-spec details { position: static; }
.pcs-spec summary { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 6px 8px; border-radius: var(--r-xl); border: 1px solid var(--hair); background: var(--raise); text-align: center; cursor: pointer; list-style: none; }
.pcs-spec summary::-webkit-details-marker { display: none; }
.pcs-spec summary:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.pcs-spec summary b { font-size: 0.75rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.pcs-spec.is-locked summary { color: var(--muted); }
.pcs-spec.is-locked .pcs-tile { filter: grayscale(1); opacity: .45; }
.pcs-spec.is-on summary { border-color: var(--fresh); background: rgba(63, 207, 142, .08); }
.pcs-spec details[open] summary { border-color: var(--hair-strong); }
.pcs-state { position: absolute; top: 6px; right: 6px; width: 14px; height: 14px; color: var(--muted); }
.pcs-state svg { width: 100%; height: 100%; }
.pcs-spec:is(.is-met, .is-on) .pcs-state { color: var(--fresh); }
.pcs-tile { width: 34px; display: grid; place-items: center; }
.pcs-tile .ps-art, .pcs-tile .pcc-reg { width: 34px; height: auto; }
.pcs-sheet { left: 0; right: 0; min-width: 0; gap: 12px; padding: 14px; }
.pcs-sheet h3 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 0.875rem; }
.pcs-ps { color: var(--muted); font-size: .85rem; font-weight: 500; }
.pcs-needs { display: grid; gap: 10px; }
.pcs-need { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; font-size: 0.8125rem; }
.pcs-need b { font-variant-numeric: tabular-nums; }
.pcs-need.is-met b { color: var(--fresh); }
.pcs-mini { position: relative; grid-column: 1 / -1; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pcs-mini::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: var(--gold); }
.pcs-need.is-met .pcs-mini::after { background: var(--fresh); }
.pcs-reach:disabled { opacity: .5; cursor: not-allowed; }
.pcs-swap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pcs-swap .opt-seg { white-space: nowrap; padding: 0 4px; text-decoration: none; }
.pcs-swap .opt-seg[aria-current] { background: rgba(255, 255, 255, .14); color: var(--text); }
/* Face-stat panels (the player page's .attr): the unbought part of a bar, up to the cap tick, in four steps of one hue,
   cheap (tier 1) to dear (tier 4); the dark mark is the start value */
.pcf { padding: 14px; }
.pcf li.pcf-row { grid-template-columns: minmax(0, 1fr) 28px 26px 26px; gap: 4px; font-variant-numeric: tabular-nums; }
.pcf-name { color: #C9D0D6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcf-v { text-align: right; }
.pcf-row.t1 { --t: rgba(242, 193, 78, .16); } .pcf-row.t2 { --t: rgba(242, 193, 78, .3); }
.pcf-row.t3 { --t: rgba(242, 193, 78, .46); } .pcf-row.t4 { --t: rgba(242, 193, 78, .66); }
.pcf-bar { position: relative; grid-column: 1 / -1; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .06); }
.pcf-bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pc); border-radius: inherit; background: var(--t); }
.pcf-bar i { position: absolute; inset: 0; background: var(--c); clip-path: inset(0 calc(100% - var(--pv)) 0 0 round 99px); transition: clip-path 380ms var(--ease); }
.pcf-bar s { position: absolute; top: 0; bottom: 0; left: var(--ps); width: 2px; background: rgba(0, 0, 0, .5); }
.pcf-bar::after { content: ""; position: absolute; top: -2px; bottom: -2px; left: calc(var(--pc) - 1px); width: 2px; border-radius: 1px; background: var(--text); opacity: .75; }
.pcs-step { display: grid; place-items: center; height: 24px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--text); text-decoration: none; font-weight: 700; }
.pcs-step:hover { background: rgba(255, 255, 255, .14); }
.pcs-step[aria-disabled] { opacity: .3; }
@media (max-width: 900px) {
  .pcs-grid { grid-template-columns: minmax(0, 1fr); }
  .pcs-card .pcc { max-width: 240px; }
}
@media (max-width: 640px) {
  .pcf li.pcf-row { grid-template-columns: minmax(0, 1fr) 30px 36px 36px; }
  .pcs-step { height: 34px; }
}

/* Hallmark · v2.0.0 · redesign: full · scope: app · shape: app screen · theme: locked (DESIGN.md, Comet UT) · genre: playful · signature: the grade diamond (the game's own grade badge, drawn by us) as the anchor of every Set · deal: none (locked system) */
/* Hallmark critique · the game's Gallery leads with the grade badge and the art; ours led with small grey text. Each screen now has one figure that leads (your total, your Set's grade, each Set's diamond or crest) and the rest sits under it as figures, not sentences. */
/* Hallmark waive · 4 (card in card): the player card inside its tile button is the game's own card; the tile is the tap target · 48 inline colours: the shared card component (ui.layered_card) paints rarity colours inline, outside this block · 20 stamp: these lines head the Gallery block, not app.css line 1, which belongs to the whole app (DESIGN.md) · 54: the sr-only h1 on the Summary is for screen readers, the tab says it on screen */
/* Gallery (cometut/gallery_pages.py): layout only. Controls are the app's own (.chips, .chip, .seg, .opt-seg, .tool-pop,
   .is-card, .solve-facts, .solver-side, .side-card, .btn-gold, .btn-sm, .pill). Motion: --ease on transform and opacity. */
:root {
  /* grade metals: the game's D bronze, C silver, B gold, S purple; A (no game screen shows it yet) a teal of the same family.
     A grade's gold is the grade, never a coin or a choice: it only sits in diamonds, the ladder and the bar's ticks. */
  --gr-d: #C98552; --gr-c: #C3CDD1; --gr-b: #E3BC55; --gr-a: #3FC7B3; --gr-s: #A57CF5; --gr-l: #D9DEE3; --gr-none: #8A929C; --gr-empty: #3A414B;
  --gl-face: #0B0E12;
  --gl-lit: rgba(255, 255, 255, 0.5); --gl-lit-2: rgba(255, 255, 255, 0.18); --gl-shade: rgba(0, 0, 0, 0.42); --gl-shade-2: rgba(0, 0, 0, 0.2);
  --gl-wash: rgba(255, 255, 255, 0.05); --gl-wash-2: rgba(255, 255, 255, 0.1); --gl-wash-3: rgba(255, 255, 255, 0.2); --gl-dash: rgba(255, 255, 255, 0.35);
  --gl-panel: rgba(18, 21, 28, 0.97); --gl-veil: rgba(10, 12, 17, 0.82); --gl-sink: rgba(0, 0, 0, 0.8);
  --gl-gold-line: rgba(242, 193, 78, 0.45); --gl-fresh-line: rgba(63, 207, 142, 0.45); --gl-fresh-tint: rgba(63, 207, 142, 0.1); --gl-warn-line: rgba(255, 159, 67, 0.5);
  --gl-holo: rgba(232, 121, 249, 0.42);
}
.gl-token { width: 18px; height: 18px; flex: none; }
/* First Owner: our pennant with a 1, outlined when off and solid when on (.gl-fo[aria-pressed=true]) */
.fo-mark { display: inline-grid; width: 18px; height: 18px; } .fo-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fo-mark .n { stroke-width: 1.9; }
.gl-sets [hidden], .gl-work [hidden], .gl-rail-wrap [hidden] { display: none !important; }
.gl-h2 { margin: 0; color: var(--text); font-size: 1rem; font-weight: 700; text-wrap: balance; }
.gl-lbl { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }

[data-g] { --g: var(--gr-none); } [data-g="D"] { --g: var(--gr-d); } [data-g="C"] { --g: var(--gr-c); } [data-g="B"] { --g: var(--gr-b); } [data-g="A"] { --g: var(--gr-a); } [data-g="S"] { --g: var(--gr-s); } [data-g="L"] { --g: var(--gr-l); }
/* the grade diamond (ui.grade_diamond): a metal rim lit top left, a dark face, the letter in the metal */
.gd { display: block; flex: none; color: var(--g); overflow: visible; }
.gd .gd-rim { fill: var(--g); } .gd .gd-hi { fill: var(--gl-lit); } .gd .gd-hi2 { fill: var(--gl-lit-2); }
.gd .gd-lo { fill: var(--gl-shade); } .gd .gd-lo2 { fill: var(--gl-shade-2); }
.gd .gd-in { fill: var(--gl-face); stroke: color-mix(in srgb, var(--g) 55%, transparent); stroke-width: 0.6; }
.gd text { fill: var(--g); font: 800 16px/1 var(--font-ui, inherit); paint-order: stroke; stroke: var(--gl-lit-2); stroke-width: 0.5; }
.gd[data-g=""] .gd-rim { fill: var(--gr-empty); } .gd[data-g=""] .gd-hi, .gd[data-g=""] .gd-hi2 { fill: var(--gl-wash-2); }

/* art: crests, league logos, rarity frames */
.gl-art, .gl-chip-art, .gl-h-art { display: grid; place-items: center; flex: none; color: var(--muted); }
.gl-art { width: 56px; height: 56px; } .gl-chip-art { width: 28px; height: 28px; margin-left: -4px; } .gl-h-art { width: 44px; height: 44px; }
.gl-art img, .gl-chip-art img, .gl-h-art img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.gl-art .gl-frame, .gl-h-art .gl-frame { height: 100%; } .gl-chip-art .gl-frame { height: 28px; }
.gl-holo { position: relative; isolation: isolate; container-type: inline-size; display: grid; place-items: center; height: 100%; aspect-ratio: 576 / 800; }
.gl-holo > img { height: 100%; filter: drop-shadow(0 0 5cqw var(--gl-holo)); }
.gl-art.is-none .glyph, .gl-chip-art.is-none .glyph { width: 60%; height: 60%; }
.gl-info { display: inline-grid; place-items: center; margin-left: 4px; color: var(--muted); vertical-align: middle; cursor: help; }
.gl-info .glyph { width: 16px; height: 16px; } .gl-info:hover, .gl-info:focus-visible { color: var(--text); }

/* first visit: what the Gallery pays and the page's three moves; closed with X for good (in this browser) */
.gl-intro { display: grid; gap: 16px; margin: 0 0 16px; padding: 16px; border: 1px solid var(--gl-gold-line); border-radius: var(--r-panel-s); background: var(--gl-panel); }
.gl-intro[hidden] { display: none; }
.gl-intro-top { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 16px; }
.gl-intro-top > img { width: 40px; height: 40px; }
.gl-intro-top p { display: grid; gap: 4px; margin: 0; } .gl-intro-top p b { font-size: 1.375rem; font-weight: 800; font-stretch: 110%; line-height: 1.15; font-variant-numeric: tabular-nums; }
.gl-intro-top p span { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.gl-intro-x { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: none; color: var(--muted); cursor: pointer; }
.gl-intro-x:hover { color: var(--text); } .gl-intro-x:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; } .gl-intro-x .glyph { width: 16px; height: 16px; }
.gl-intro-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.gl-intro-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 12px; counter-increment: step; }
.gl-intro-steps li::before { content: counter(step); grid-row: 1 / 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-pill); background: var(--gl-wash-2); font-size: 0.8125rem; font-weight: 800; }
.gl-intro-steps b { font-size: 0.875rem; font-weight: 700; } .gl-intro-steps span { color: var(--muted); font-size: 0.8125rem; }

/* the list: the plan, the rail, the Sets */
.gl-bar { margin: 0 0 16px; padding: 12px; border: 1px solid var(--hair); border-radius: var(--r-panel-s); background: var(--core); }
.gl-bar.is-plan { position: sticky; top: calc(96px + env(safe-area-inset-top)); z-index: 6; border-color: var(--gl-gold-line); background: var(--gl-panel); }
.gl-goal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.gl-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.gl-big { position: relative; display: block; }
.gl-big .gl-fi { position: absolute; left: 16px; top: 50%; display: grid; transform: translateY(-50%); pointer-events: none; }
.gl-big .gl-fi img { width: 20px; height: 20px; }
.gl-field input { width: 100%; height: 44px; padding: 0 16px; border-radius: var(--r-lg); border: 1px solid var(--hair-strong); background: var(--shell); color: var(--text); font: inherit; font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.gl-big input { width: 192px; padding-left: 44px; }
.gl-field input:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.gl-limits .btn-sm { height: 44px; padding: 0 16px; border-radius: var(--r-lg); list-style: none; } .gl-limits summary::-webkit-details-marker { display: none; }
.gl-limits .btn-sm.is-on { border-color: var(--gl-gold-line); color: var(--gold); } .gl-limits .btn-sm .glyph { width: 16px; height: 16px; }
.gl-limits .menu-pop { left: 0; right: auto; gap: 12px; width: min(320px, calc(100dvw - 32px)); padding: 16px; }
.gl-field { display: grid; gap: 8px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.gl-plan { height: 48px; padding-inline: 24px; } .gl-plan .glyph { width: 16px; height: 16px; margin-left: 8px; }
.gl-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.gl-sum .solve-facts { gap: 4px 24px; } .gl-sum .solve-facts dd { font-size: 1rem; } .gl-sum .btn-sm { margin-left: auto; }
.gl-facts { gap: 8px 24px; } .gl-facts dd { font-variant-numeric: tabular-nums; }
.gl-none { color: var(--muted); font-size: 0.875rem; font-weight: 600; }

.gl-rail-wrap { position: relative; margin: 0 0 12px; }
.gl-rail { --fl: 0px; --fr: 0px; margin: 0; padding: 4px; gap: 8px; cursor: grab; user-select: none; -webkit-mask-image: linear-gradient(90deg, transparent, var(--core) var(--fl), var(--core) calc(100% - var(--fr)), transparent); mask-image: linear-gradient(90deg, transparent, var(--core) var(--fl), var(--core) calc(100% - var(--fr)), transparent); }
.gl-rail.is-drag { cursor: grabbing; } .gl-rail.is-drag a { pointer-events: none; }
.gl-rail-wrap.has-left .gl-rail { --fl: 56px; } .gl-rail-wrap.has-right .gl-rail { --fr: 56px; }
.gl-tab { flex: none; height: 48px; padding: 0 16px; border-radius: var(--r-lg); font-size: 0.875rem; gap: 8px; }
.gl-tab .gl-token { width: 18px; height: 18px; }
.gl-rail-btn { position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--gl-panel); color: var(--text); cursor: pointer; transform: translateY(-50%); transition: transform 250ms var(--ease); }
.gl-rail-btn:active { transform: translateY(-50%) scale(0.94); } .gl-rail-btn .glyph { width: 16px; height: 16px; } .gl-rail-btn:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.gl-rail-btn.is-prev { left: 4px; } .gl-rail-btn.is-next { right: 4px; }
.gl-tools { margin: 0 0 16px; }
.gl-choices { min-width: 220px; gap: 4px; } .gl-choices .opt-seg { justify-items: start; min-height: 36px; padding: 0 12px; }

/* a Set tile like the game's category grid: name and your figure on the left, the anchor on the right (the grade diamond
   once there is a grade, the Set's own art until then), coins to finish under them */
.gl-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.gl-item { position: relative; }
.gl-set { display: grid; grid-template-columns: minmax(0, 1fr) 72px; grid-template-rows: auto auto 1fr; align-items: start; gap: 8px 12px; height: 100%; min-height: 148px; padding: 16px; border: 1px solid var(--hair); border-radius: var(--r-panel-s); background: var(--core); color: var(--text); text-decoration: none; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .gl-set:hover { border-color: var(--hair-strong); transform: translateY(-2px); } } .gl-set:active { transform: scale(0.97); transition-duration: 140ms; }
.gl-set:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.gl-tname { grid-column: 1; display: -webkit-box; overflow: hidden; font-size: 1rem; font-weight: 700; line-height: 1.25; overflow-wrap: break-word; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gl-val { grid-column: 1; display: inline-flex; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 800; font-stretch: 110%; line-height: 1.1; font-variant-numeric: tabular-nums; }
.gl-val svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.gl-set .gl-foot { grid-column: 1 / -1; align-self: end; }
.gl-dia { grid-column: 2; grid-row: 1 / 3; justify-self: end; display: grid; place-items: center; width: 72px; height: 72px; pointer-events: none; }
.gl-dia .gd { width: 68px; height: 68px; } .gl-dia .gl-art { width: 60px; height: 60px; }
.gl-set.is-plan { border-color: var(--gl-gold-line); }
.gl-set.is-done { opacity: 0.5; } .gl-set.is-done .gl-art { filter: grayscale(1); }
.gl-set:not(.is-done) .gl-cost-done, .gl-set.is-done .gl-foot > :not(.gl-cost-done) { display: none; }
/* Set done on a list card: a trophy toggle bottom right, outside the link; the foot leaves room for it */
.gl-undo { position: absolute; bottom: 12px; right: 12px; z-index: 2; margin: 0; }
.gl-set .gl-foot { padding-right: 48px; }
.gl-undo-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--core); color: var(--muted); cursor: pointer; transition: transform 140ms var(--ease-out); }
.gl-undo-btn[aria-pressed="true"] { border-color: var(--gl-gold-line); background: var(--gl-panel); color: var(--gold); }
.gl-undo-btn:hover { color: var(--text); } .gl-undo-btn:active { transform: scale(0.97); } .gl-undo-btn:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.gl-undo-btn .glyph { width: 16px; height: 16px; }
.gl-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.gl-cost { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gl-cost b { font-size: 1.125rem; font-weight: 800; font-stretch: 110%; }
.gl-cost.is-none { color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.gl-cost.is-done { color: var(--fresh); font-size: 0.875rem; font-weight: 700; }
.gl-cost .glyph { width: 16px; height: 16px; } .gl-cost .gd { width: 22px; height: 22px; flex: none; }
.gl-next { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.gl-next.is-goal { color: var(--text); }

/* one Set: one header band (your grade and score lead, the lineup's figures beside, the bar across the foot) */
.gl-page-head .page-h1 { display: flex; align-items: center; gap: 12px; min-width: 0; overflow-wrap: break-word; }
.gl-page-head .page-h1 > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-head { display: grid; margin: 0 0 24px; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "you cells" "bar bar"; align-items: center; gap: 16px 40px; }
.gl-hud-you { grid-area: you; display: flex; align-items: center; gap: 16px; }
.gl-gd { display: inline-grid; } .gl-hud-you .gl-gd .gd { width: 64px; height: 64px; }
.gl-hud-fig { display: grid; gap: 4px; }
.gl-hud-fig > b { font-size: 2.5rem; font-weight: 800; font-stretch: 110%; line-height: 1; font-variant-numeric: tabular-nums; }
.gl-hud-fig > b.is-zero { color: var(--muted); }
.gl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.gl-count { color: var(--muted); font-size: 0.875rem; font-weight: 600; } .gl-count b { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.gl-tokpill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); font-size: 0.875rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gl-donetag { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--gl-fresh-line); color: var(--fresh); font-size: 0.875rem; font-weight: 800; }
.gl-donetag .glyph { width: 16px; height: 16px; } .gl-donetag[hidden] { display: none; }
.gl-hud-cells { grid-area: cells; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px 24px; margin: 0; }
.gl-hud-cells > div { display: grid; gap: 4px; min-width: 0; } .gl-hud-cells > div[hidden] { display: none; }
.gl-hud-cells dt { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.gl-hud-cells dd { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gl-hud-cells dd .coin { width: 20px; height: 20px; } .gl-gd-s { display: inline-grid; } .gl-gd-s:empty { display: none; } .gl-gd-s .gd { width: 24px; height: 24px; }
.gl-of { color: var(--muted); font-weight: 700; }
.gl-barline { grid-area: bar; position: relative; height: 12px; margin: 8px 8px 24px 0; border-radius: var(--r-pill); background: var(--gl-wash); }
.gl-barline > i { position: absolute; inset: 0; border-radius: inherit; transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform 300ms var(--ease); }
.gl-barline .plan { background: var(--gl-wash-3); } .gl-barline .have { background: var(--fresh); }
.gl-barline .tick { position: absolute; top: -4px; bottom: -4px; width: 4px; border-radius: 2px; background: var(--g); transform: translateX(-2px); opacity: 0.6; }
.gl-barline .tick.is-hit { opacity: 1; }
.gl-barline .tick em { position: absolute; top: 100%; left: 50%; margin-top: 4px; transform: translateX(-50%); color: var(--g); font-size: 0.75rem; font-style: normal; font-weight: 800; }

.gl-work { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 24px; }
.gl-main { min-width: 0; }
.gl-lineup, .gl-pool { display: grid; gap: 12px 8px; margin: 0; padding: 0; list-style: none; isolation: isolate; }
.gl-lineup { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.gl-pool { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); margin-top: 12px; }
.gl-slot, .gl-tile { position: relative; isolation: isolate; display: grid; justify-items: center; gap: 4px; min-width: 0; }
.gl-slot [data-art], .gl-tile [data-art] { display: block; width: 100%; max-width: 112px; }
.gl-slot .is-card .item-card, .gl-tile .is-card .item-card { max-width: 112px; }
.gl-slot .is-card[aria-pressed="false"] .ly-own, .gl-tile:not(.is-club) .ly-own { display: none; }
/* One job per corner: the owned crest top right (inside the card), First Owner bottom left; take out and leave out sit
   under the card beside the price. Collected = a green border and a light green fill; the app's corner tick is off here. */
.gl-slot .is-card::after, .gl-tile .is-card::after { content: none; }
.gl-cardbox { position: relative; display: grid; width: 100%; max-width: 112px; }   /* the card's own width, so First Owner sits on its corner */
.gl-slot .is-card[aria-pressed="true"], .gl-tile .is-card[aria-pressed="true"] { border-color: var(--fresh); background: var(--gl-fresh-tint); color: var(--text); box-shadow: none; }
.gl-slot .is-card:disabled { opacity: 1; cursor: default; }
.gl-sc { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.gl-slot-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 4px; width: 100%; max-width: 124px; min-height: 32px; }
.gl-slot-foot > .gl-buy { grid-column: 2; } .gl-slot-foot > .gl-x, .gl-slot-foot > .gl-ban { grid-column: 3; justify-self: end; }
.gl-tile[hidden] { display: none; }
.gl-slot .ly-own { display: none; }
.gl-buy { display: inline-flex; } .gl-slot:has(.is-card[aria-pressed="true"]) .gl-buy { visibility: hidden; }
.gl-fo { position: absolute; top: -4px; right: -10px; z-index: 5; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--hair-strong); border-radius: var(--r-pill); background: var(--core); color: var(--muted); cursor: pointer; transition: transform 140ms var(--ease-out), color 160ms var(--ease-out); }
.gl-fo .fo-mark { width: 20px; height: 20px; }
.gl-fo:hover { color: var(--text); } .gl-fo:active { transform: scale(0.97); }
.gl-fo[aria-pressed="true"] { border-color: var(--chalk); background: var(--chalk); color: var(--core); } .gl-fo[aria-pressed="true"] .fo-mark .b { fill: var(--core); } .gl-fo[aria-pressed="true"] .fo-mark .n { stroke: var(--chalk); }
.gl-fo:disabled { cursor: default; }
.gl-x, .gl-ban { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: var(--r-pill); border: 1px solid var(--hair); background: none; color: var(--muted); cursor: pointer; transition: transform 140ms var(--ease-out); }
.gl-x .glyph, .gl-ban .glyph { width: 12px; height: 12px; }
.gl-x:hover, .gl-ban:hover { color: var(--text); border-color: var(--hair-strong); } .gl-x:active, .gl-ban:active { transform: scale(0.97); }
.gl-fo:focus-visible, .gl-x:focus-visible, .gl-ban:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.gl-ban[aria-pressed="true"] { color: var(--warn); border-color: var(--gl-warn-line); }
.gl-tile .is-card:disabled { cursor: not-allowed; } .gl-tile.is-ban .is-card { opacity: 0.4; }
.gl-tile .pill, .gl-slot .pill { height: 28px; } .gl-off { color: var(--muted); font-size: 0.75rem; }
/* a preview: the lineup it would be, new cards marked, your taps paused until Use or Cancel */
.gl-lineup.is-preview .is-card, .gl-lineup.is-preview .gl-fo, .gl-lineup.is-preview .gl-x { pointer-events: none; }
.gl-lineup.is-preview .gl-slot:not(.is-new) { opacity: 0.55; }
.gl-slot.is-new .is-card { border-color: var(--chalk); border-style: dashed; }
.gl-preview { position: sticky; top: calc(92px + env(safe-area-inset-top)); z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 16px; padding: 12px; border: 1px solid var(--hair-strong); border-radius: var(--r-panel-s); background: var(--gl-panel); }
.gl-pv-what { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; } .gl-pv-cost { display: inline-flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gl-pv-cost .coin { width: 20px; height: 20px; } .gl-preview .btn-sm:first-of-type { margin-left: auto; }
.gl-swap { margin-top: 24px; } .gl-swap > summary { list-style: none; cursor: pointer; } .gl-swap > summary::-webkit-details-marker { display: none; }
.gl-swap > summary { height: 44px; padding: 0 16px; }
.gl-swap[open] > summary { border-color: var(--gl-gold-line); }
.gl-swap .gl-tools { margin: 16px 0 0; } .gl-more { margin: 16px auto 0; display: flex; width: max-content; }

.gl-side { z-index: 5; isolation: isolate; } .gl-side .side-card { display: grid; gap: 16px; }
/* the grade ladder: reached grades ticked (not buttons), planned ones outlined, the others preview a lineup, unreachable ones locked */
.gl-goals { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.gl-rung { --g: var(--hair-strong); }
.gl-rung-b { position: relative; display: grid; justify-items: center; align-content: start; gap: 8px; width: 100%; min-height: 80px; padding: 8px 4px; border-radius: var(--r-lg); border: 1px solid transparent; background: none; color: var(--text); font: inherit; font-size: 0.75rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gl-rung-b .gd { width: 40px; height: 40px; }
.gl-rung-v { display: inline-flex; align-items: center; gap: 4px; min-height: 16px; } .gl-rung-v .coin { width: 14px; height: 14px; } .gl-rung-v .glyph, .gl-rung-v .fo-mark { width: 16px; height: 16px; }
button.gl-rung-b { border-color: var(--hair); cursor: pointer; transition: transform 140ms var(--ease-out), border-color 160ms var(--ease-out); }
button.gl-rung-b:hover { border-color: var(--g); } button.gl-rung-b:active { transform: scale(0.97); }
.gl-rung-b:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.gl-rung.is-reached .gl-rung-v { color: var(--fresh); }
.gl-rung.is-planned .gl-rung-b { border: 1px dashed var(--gl-dash); cursor: help; } .gl-rung.is-planned .gd { opacity: 0.75; } .gl-rung.is-planned .gl-rung-v { color: var(--muted); }
.gl-rung.is-now .gl-rung-b { border-color: var(--hair-strong); background: var(--gl-wash); }
.gl-rung.is-solve .gl-rung-b { border-style: dashed; } .gl-rung.is-solve .gl-rung-v { color: var(--muted); }
.gl-rung.is-pv .gl-rung-b { border-color: var(--chalk); background: var(--gl-wash); }
.gl-rung.is-off .gl-rung-b { color: var(--muted); cursor: help; } .gl-rung.is-off .gd { opacity: 0.35; filter: grayscale(0.6); }
.gl-rung-b.is-busy { opacity: 0.6; }
.gl-msg { margin: 0; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.gl-dock-gap .gd { width: 22px; height: 22px; } .gl-dock-gap { display: inline-flex; align-items: center; gap: 4px; } .gl-dock-gap .coin { width: 16px; height: 16px; }
.gl-tag-grid { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.gl-tag { display: grid; grid-template-columns: 28px minmax(0, 1fr) 36px 44px 56px; align-items: center; gap: 8px; min-height: 36px; padding: 4px; border-radius: var(--r-md); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.gl-tag:hover { background: var(--gl-wash); }
.gl-tag b { overflow: hidden; color: var(--muted); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; } .gl-tag.is-on b { color: var(--text); }
.gl-tag-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-md); background: var(--raise); color: var(--muted); }
.gl-tag.is-on .gl-tag-ic { color: var(--text); } .gl-tag-ic .glyph, .gl-tag-ic .fo-mark { width: 16px; height: 16px; } .gl-tag-ic img { width: 24px; height: 24px; object-fit: contain; }
.gl-steps { display: inline-flex; gap: 4px; } .gl-steps i { width: 8px; height: 8px; border-radius: 2px; border: 1px solid var(--hair-strong); } .gl-steps i.is-on { background: var(--chalk); border-color: var(--chalk); }
.gl-cnt { color: var(--muted); text-align: right; } .gl-bon { text-align: right; font-weight: 800; } .gl-tag:not(.is-on) .gl-bon { color: var(--muted); font-weight: 700; }
.gl-more-tags > summary { list-style: none; cursor: pointer; margin: 8px 0; } .gl-more-tags > summary::-webkit-details-marker { display: none; }
/* Set done: the button becomes Undo in the same place and size; the lineup greys; Next Set beside it */
.gl-donebar { display: flex; gap: 8px; } .gl-donef { flex: 1; margin: 0; }
.gl-done, .gl-nextset { width: 100%; height: 44px; justify-content: center; gap: 8px; } .gl-done .glyph, .gl-nextset .glyph { width: 16px; height: 16px; }
.gl-nextset { flex: 1; width: auto; }
.gl-work.is-done .gl-lineup { opacity: 0.45; filter: grayscale(0.5); transition: opacity 300ms var(--ease); }
.gl-dock { display: none; }

.gl-tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 212px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.gl-tags li { padding: 16px; border: 1px solid var(--hair); border-radius: var(--r-xl); background: var(--core); }
.gl-tags h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 1rem; font-weight: 700; text-wrap: balance; }
.gl-tags dl { display: flex; gap: 16px; margin: 0; } .gl-tags dt { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.gl-tags dd { margin: 4px 0 0; font-weight: 800; font-variant-numeric: tabular-nums; }

@media (max-width: 960px) {
  .gl-work { grid-template-columns: minmax(0, 1fr); padding-bottom: 84px; }
  .gl-side { position: static; order: 2; }
  .gl-main { display: contents; } .gl-lineup { order: 1; } .gl-swap, .gl-main > .state { order: 3; }
  .gl-dock { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px; border: 1px solid var(--hair-strong); border-radius: var(--r-panel-s); background: var(--gl-panel); }
  .gl-dock b { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
  .gl-dock > span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
  .gl-dock .gl-dock-gap { margin-left: auto; font-size: 0.8125rem; } .gl-dock .gl-dock-gap b { color: var(--text); }
  .gl-dock .gl-gd .gd { width: 32px; height: 32px; }
  .gl-preview { top: auto; bottom: calc(84px + env(safe-area-inset-bottom)); position: sticky; }
  .gl-main > .gl-preview { order: 0; }
}
@media (max-width: 700px) {
  .gl-head { grid-template-columns: minmax(0, 1fr); grid-template-areas: "you" "cells" "bar"; gap: 16px; }
  .gl-hud-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gl-hud-cells dd { font-size: 1.25rem; }
  .gl-hud-fig > b { font-size: 2rem; } .gl-hud-you .gl-gd .gd { width: 56px; height: 56px; }
  .gl-bar.is-plan { position: static; }
  .gl-sum { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; flex-wrap: nowrap; justify-content: space-between; min-height: 60px; margin: 0; padding: 8px 8px 8px 16px; border: 1px solid var(--gl-gold-line); border-radius: var(--r-panel-s); background: var(--gl-panel); }
  .gl-sum .solve-facts > div:nth-child(n+3) { display: none; } .gl-sum .btn-sm { height: 44px; }
  .gl-bar.is-plan ~ .gl-sets { padding-bottom: 84px; }
  .gl-fields, .gl-goal { flex: 1 1 100%; } .gl-fields { display: grid; grid-template-columns: 1fr 1fr; } .gl-big input { width: 100%; height: 48px; }
  .gl-limits { grid-column: 1 / -1; } .gl-limits .btn-sm { width: 100%; height: 48px; justify-content: center; } .gl-plan { width: 100%; height: 52px; justify-content: center; }
  .gl-sets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gl-set { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; min-height: 0; padding: 12px; gap: 8px; }
  .gl-dia { grid-column: 1; grid-row: 1; justify-self: start; width: 52px; height: 52px; } .gl-dia .gd { width: 52px; height: 52px; } .gl-dia .gl-art { width: 44px; height: 44px; }
  .gl-tname { font-size: 0.9375rem; } .gl-val { font-size: 1.25rem; } .gl-set .gl-foot { flex-wrap: wrap; gap: 4px; } .gl-cost b { font-size: 1rem; }
  .gl-lineup { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 4px; } .gl-pool { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gl-fo { top: -4px; right: -6px; } .gl-x, .gl-ban { width: 32px; height: 32px; }
  .gl-goals { gap: 4px; } .gl-rung-b { min-height: 76px; } .gl-rung-b .gd { width: 36px; height: 36px; }
  .gl-page-head { flex-wrap: wrap; }
  .gl-intro-steps { grid-template-columns: minmax(0, 1fr); } .gl-intro-top p b { font-size: 1.125rem; }
}
@media (prefers-reduced-motion: reduce) { .gl-set, .gl-fo, .gl-x, .gl-ban, .gl-rung-b, .gl-undo-btn, .gl-barline > i, .gl-rail-btn { transition: none; } .gl-set:hover { transform: none; } }

/* Pro Clubs v3: PlayStyle slots as tiles with a chart picker, Max, hold-to-repeat, one Share button */
.pcs-slots { position: relative; }
.pcs-slot details { position: static; }
.pcs-slot summary { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px; border-radius: var(--r-xl); border: 1px solid var(--hair); background: var(--raise); cursor: pointer; list-style: none; }
.pcs-slot summary::-webkit-details-marker { display: none; }
.pcs-slot summary:hover { border-color: var(--hair-strong); }
.pcs-slot summary:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.pcs-slot details[open] summary { border-color: var(--gold); }
.pcs-slot summary b { font-size: 0.8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcs-slot summary b.is-none { color: var(--muted); font-weight: 500; }
.pcs-box { --slot: rgba(255, 255, 255, .16); }
.pcs-slot .pcs-tile { width: 32px; flex: none; }
.pcs-slot .pcs-tile .ps-art, .pcs-slot .pcs-tile .pcc-reg { width: 32px; }
.pcs-chart { left: 0; right: 0; min-width: 0; padding: 10px; max-height: min(70vh, 460px); overflow-y: auto; }
.pcs-chart-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pcs-pt { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; height: 100%; padding: 8px 4px 6px; border-radius: var(--r-xl); border: 1px solid var(--hair);
  background: var(--raise); color: var(--text); text-decoration: none; text-align: center; cursor: pointer; transition: border-color 120ms, background 120ms; }
.pcs-pt .ps-art { width: 34px; height: auto; }
.pcs-pt b { font-size: 0.6875rem; font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
a.pcs-pt:hover, a.pcs-pt:focus-visible { border-color: var(--gold); background: rgba(242, 193, 78, .08); }
.pcs-pt:focus-visible { outline: 2px solid var(--chalk); outline-offset: 1px; }
.pcs-pt.is-on { border-color: var(--fresh); background: rgba(63, 207, 142, .08); cursor: default; }
.pcs-pt.is-unverified { border-style: dashed; }
.pcs-pt.is-clear { color: var(--muted); }
.pcs-x { display: grid; place-items: center; width: 34px; height: 34px; }
.pcs-x svg { width: 16px; height: 16px; }
.pcs-pt.is-off { cursor: not-allowed; border-style: dashed; }
.pcs-pt.is-off > :not(.pcs-pt-need) { opacity: .35; filter: grayscale(1); }
.pcs-pt-need { display: none; position: absolute; z-index: 3; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 170px;
  align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--hair-strong); background: #10131a; color: var(--text);
  font-size: 0.6875rem; font-weight: 600; line-height: 1.2; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); pointer-events: none; }
.pcs-pt-need svg { width: 12px; height: 12px; flex: none; color: var(--gold); }
.pcs-pt.is-off:is(:hover, :focus) .pcs-pt-need { display: flex; }
.pcs-chart-grid li:nth-child(-n+3) .pcs-pt-need { bottom: auto; top: calc(100% + 6px); }  /* the first row's note opens downwards, inside the panel */
.pcs-chart-grid li:nth-child(3n+1) .pcs-pt-need { left: 0; transform: none; }
.pcs-chart-grid li:nth-child(3n) .pcs-pt-need { left: auto; right: 0; transform: none; }
.pcf li.pcf-row { grid-template-columns: minmax(0, 1fr) 28px 26px 26px 38px; }
.pcs-step, .pcs-max { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pcs-max { display: grid; place-items: center; height: 24px; border-radius: 6px; border: 1px solid var(--hair-strong); color: var(--muted); text-decoration: none; font-size: 0.6562rem; font-weight: 700; }
a.pcs-max:hover, a.pcs-max:focus-visible { color: var(--text); border-color: var(--gold); }
.pcs-max[aria-disabled] { opacity: .3; }
.player-capture [data-copy-link] { margin-left: auto; }
.player-capture .capture-export[data-plain] { width: auto; padding: 0 18px; }
@media (max-width: 640px) {
  .pcf li.pcf-row { grid-template-columns: minmax(0, 1fr) 30px 36px 36px 44px; }
  .pcs-max { height: 34px; }
}
/* level control: the quick pills, a divider, then the exact level, read as one control */
.pcs-levels { gap: 2px; }
.pcs-pick .pcs-levels .ui-select { min-width: 78px; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--hair-strong); border-radius: 0; }
.pcs-levels .ui-select-btn { border-color: transparent; background: transparent; box-shadow: none; }
.pcs-levels .ui-select-btn:hover { background: rgba(255, 255, 255, .06); }

/* Pro Clubs v3 phase 2: the three places, Build my pro, My pros, the shared page */
.pcc.is-neutral { --dim: .84; --sat: .7; }
.pcj-tabs { margin: 0 0 14px; }
.pcl-hero { display: flex; justify-content: center; height: 128px; overflow: hidden; margin: 2px 0 14px; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 52%, transparent); mask-image: linear-gradient(#000 52%, transparent); }
.pcl-hero > div { width: 150px; flex: none; margin: 8px -22px 0; transform-origin: 50% 100%; }
.pcl-fan-a { transform: rotate(-9deg) translateY(10px); } .pcl-fan-b { transform: translateY(-2px); z-index: 1; } .pcl-fan-c { transform: rotate(9deg) translateY(10px); }
.pcl-hero .pcc-card::after { display: none; }  /* the header cards are still: no shine */
.pcw-name { display: grid; gap: 4px; font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.pcw-name input, .pcm-rename input { height: 40px; padding: 0 12px; border-radius: var(--r-xl); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font: inherit; font-size: 0.875rem; min-width: 0; }
.pcw-name input:focus-visible, .pcm-rename input:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.pcm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 24px 16px; }
.pcm-pro { position: relative; display: grid; gap: 8px; justify-items: center; align-content: start; } .pcm-pro .pcc { width: 100%; max-width: 200px; }
.pcm-open { display: block; width: 100%; max-width: 200px; transition: transform 300ms var(--ease); } .pcm-open:hover, .pcm-open:focus-visible { transform: translateY(-3px); }
.pcm-pro h3 { margin: 0; font-size: 0.875rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcm-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; } .pcm-actions details { position: static; } .pcm-actions summary { list-style: none; cursor: pointer; }
.pcm-actions summary::-webkit-details-marker { display: none; }
.pcm-pop { left: 0; right: 0; top: 100%; min-width: 0; padding: 10px; display: grid; gap: 8px; z-index: 4; }
.pcm-rename, .pcm-link { display: flex; gap: 6px; flex-wrap: wrap; } .pcm-link input { flex: 1; min-width: 0; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font-size: 0.75rem; }
.pcs-pro { font-size: 0.8125rem; font-weight: 700; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcs-cta { justify-self: start; }
.pcf-grid.pcf-ro li.pcf-row { grid-template-columns: minmax(0, 1fr) 28px; }
@media (max-width: 640px) {
  .pcl-hero { height: 104px; } .pcl-hero > div { width: 120px; margin-inline: -18px; }
  .pcm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
}

/* Pro Clubs v3 flow: preset pills, the Save popover */
.pcs-save-slot { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.pcs-save { position: relative; } .pcs-save summary { list-style: none; cursor: pointer; } .pcs-save summary::-webkit-details-marker { display: none; }
.pcs-save-pop { right: 0; left: auto; top: calc(100% + 6px); min-width: 260px; max-width: min(320px, calc(100vw - 32px)); padding: 14px; display: grid; gap: 12px; z-index: 5; }
.pcs-save-pop h3 { margin: 0; font-size: 0.875rem; }
.pcs-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pcs-perks li { display: flex; align-items: center; gap: 10px; font-size: 0.8125rem; color: #C9D0D6; }
.pcs-perks svg { width: 18px; height: 18px; flex: none; color: var(--gold); }
@media (max-width: 640px) { .pcs-save-slot { margin-left: 0; } .pcs-save-pop { right: auto; left: 0; } }

/* Pro Clubs v3 polish: fixed PlayStyle tiles, a picker that never scrolls the page, quiet Specializations buttons, green AP cost */
.pcs-slots { grid-auto-rows: 92px; }
.pcs-slot summary, .pcs-slot.is-locked { box-sizing: border-box; height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; text-align: center; }
.pcs-slot summary b, .pcs-slot.is-locked > span:last-child { max-width: 100%; font-size: 0.75rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; overflow-wrap: anywhere; }
.pcs-slot.is-locked { border: 1px dashed var(--hair); border-radius: var(--r-xl); }
.pcs-slot .pcs-tile { width: 36px; height: 36px; display: grid; place-items: center; }
.pcs-slot .pcs-tile .ps-art, .pcs-slot .pcs-tile .pcc-reg { width: 36px; height: 36px; }
.pcs-chart { overscroll-behavior: contain; max-height: min(60vh, 360px); }
.pcs-cost { color: var(--fresh); font-weight: 700; }
.pcs-slot { display: block; min-width: 0; } .pcs-slot.is-locked { display: flex; }  /* every tile fills its grid cell, whatever the name */
.pcs-slot details, .pcs-slot summary { width: 100%; }

/* Pro Clubs v3 craft pass: one segmented control for level and presets, Save and Share as one group, motion on one easing (--ease) */
.seg-radio.pcs-seg { display: flex; flex-wrap: wrap; gap: 2px; width: fit-content; max-width: 100%; border-radius: var(--r-xl); }
.pcs-seg .opt-seg { min-height: 36px; padding: 0 12px; text-decoration: none; white-space: nowrap; transition: background-color 180ms var(--ease), color 180ms var(--ease); }
.pcs-seg .opt-seg[aria-current] { background: var(--hair-strong); color: var(--text); }
.pcs-seg .opt-seg:focus-visible { outline: 2px solid var(--chalk); outline-offset: -2px; }
.pcs-presets { margin: 0 0 16px; }
.pcs-pick .pcs-levels .ui-select { margin-left: 8px; }
.pcs-actions { display: inline-flex; align-items: center; gap: 8px; }
.pcs-camera { width: 36px; height: 36px; }
.pcs-camera .asset-icon { width: 18px; height: 18px; }
.pcs-savebtn { position: relative; transition: transform 160ms var(--ease), opacity 160ms var(--ease); }
.pcs-savebtn:active { transform: scale(0.96); }
.pcs-spin { position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; opacity: 0; }
.pcs-tick { position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; opacity: 0; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.pcs-savebtn.is-pending { pointer-events: none; }
.pcs-savebtn.is-pending .pcs-lbl { opacity: 0; }
.pcs-savebtn.is-pending .pcs-spin { opacity: 1; animation: pcs-spin 700ms linear infinite; }
.pcs-savebtn.is-saved .pcs-tick { animation: pcs-draw 1000ms var(--ease) both; }  /* the check draws, holds, then gives way to the word */
.pcs-savebtn.is-saved { animation: pcs-pop 420ms var(--ease) both; }
.pcs-savebtn.is-saved .pcs-lbl { animation: pcs-fade 240ms var(--ease) 800ms both; }
.pcs-mine { animation: pcs-in 280ms var(--ease) 200ms both; }
.pcs-count { display: inline-block; min-width: 1.4em; text-align: center; font-variant-numeric: tabular-nums; animation: pcs-bump 520ms var(--ease) 320ms both; }
.pcs-save-pop, .pcs-chart, .pcm-pop { animation: pcs-in 200ms var(--ease) both; }
.pcj-body { animation: pcs-in 260ms var(--ease) both; }
@keyframes pcs-spin { to { transform: rotate(360deg); } }
@keyframes pcs-draw { 0% { stroke-dashoffset: 1; opacity: 1; } 35%, 75% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes pcs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pcs-pop { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes pcs-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pcs-bump { 0% { opacity: 0; transform: scale(0.6); } 60% { opacity: 1; transform: scale(1.25); } 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .pcs-savebtn, .pcs-savebtn *, .pcs-mine, .pcs-count, .pcs-save-pop, .pcs-chart, .pcm-pop, .pcj-body { animation: none; transition: none; }
  .pcs-savebtn.is-pending .pcs-spin { opacity: 0.6; }
  .pcs-savebtn.is-saved .pcs-tick { display: none; }
  .pcf-bar i, .pcs-bar::after { transition: none; }
}
@media (max-width: 640px) { .pcs-save-slot { flex-wrap: wrap; } }

/* Presets v4: a preset is a Specialization; the recipe shows where the AP goes */
.pcs-recipe { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; margin: 0 0 16px; padding: 12px 16px; border-radius: var(--r-xl); border: 1px solid var(--hair); background: var(--raise); animation: pcs-in 240ms var(--ease) both; }
.pcs-gives { display: flex; align-items: center; gap: 12px; }
.pcs-pp { display: inline-flex; align-items: center; gap: 8px; } .pcs-pp .ps-art { width: 32px; height: auto; } .pcs-pp b { font-size: 0.8125rem; }
.pcs-perk { display: grid; font-size: 0.8125rem; font-weight: 600; } .pcs-perk small { color: var(--muted); font-size: 0.6875rem; font-weight: 500; }
.pcs-split { display: grid; gap: 8px; min-width: 0; }
.pcs-splitbar { display: flex; gap: 2px; height: 8px; border-radius: 99px; overflow: hidden; background: var(--hair); }
.pcs-splitbar > span { min-width: 4px; }
.pcs-seg-floors { background: var(--gold); } .pcs-seg-key { background: var(--fresh); } .pcs-seg-playstyles { background: var(--s-good); } .pcs-seg-rest { background: var(--hair-strong); }
.pcs-split ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.pcs-split li { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); } .pcs-split li b { color: var(--text); font-weight: 700; }
.pcs-split li i { width: 8px; height: 8px; border-radius: 50%; background: var(--hair-strong); }
.pcs-k-floors i { background: var(--gold); } .pcs-k-key i { background: var(--fresh); } .pcs-k-playstyles i { background: var(--s-good); }
.pcs-lv { margin-left: 6px; color: var(--muted); font-size: 0.6875rem; font-weight: 600; }
.pcs-seg .opt-seg.is-later { color: var(--muted); }
.pcs-equip .opt-seg { padding: 0 10px; }
@media (max-width: 900px) { .pcs-recipe { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .pcs-recipe { animation: none; } }

/* Presets v5: the working on a preset, as data */
.pcs-work { grid-column: 1 / -1; list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--hair); display: flex; flex-wrap: wrap; gap: 6px 24px; font-variant-numeric: tabular-nums; }
.pcs-work li { display: inline-flex; align-items: baseline; gap: 8px; font-size: 0.8125rem; min-width: 0; }
.pcs-work small { color: var(--muted); font-size: 0.75rem; font-weight: 500; } .pcs-work b { font-weight: 700; overflow-wrap: anywhere; }

/* Mastery and body (Phase 2): the in-match breakdown on a row, the body sliders, the Mastery popover */
.pcf-b { margin-left: 6px; font-size: 0.6875rem; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.pcs-body { display: grid; gap: 10px; }
.pcs-sl { display: grid; grid-template-columns: 56px minmax(0, 1fr) 52px; align-items: center; gap: 10px; font-size: 0.8125rem; color: #C9D0D6; }
.pcs-sl input[type=range] { width: 100%; min-width: 0; accent-color: var(--gold); }
.pcs-sl output { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.pcs-acc { margin: 0; display: flex; justify-content: space-between; align-items: baseline; font-size: 0.8125rem; }
.pcs-acc small { color: var(--muted); font-size: 0.75rem; }
.pcs-ml-pop { display: grid; gap: 8px; padding: 12px; min-width: min(320px, calc(100vw - 32px)); }
.pcs-ml { display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: center; gap: 10px; font-size: 0.8125rem; }
.pcs-ml span { display: grid; min-width: 0; } .pcs-ml small { color: var(--muted); font-size: 0.6875rem; font-weight: 500; }

/* Round 3: the archetype switcher, the body pad, the Mastery panel, the requirement tooltip, over budget and the level confirm */
.pcs-switch { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; }
.pcs-sw-line { display: flex; align-items: center; gap: 8px; min-width: 0; } .pcs-sw-line small { color: var(--muted); font-size: 0.75rem; }
.pcs-sw-line .seg-radio { flex-wrap: wrap; }
.pcs-pad { position: relative; width: 100%; max-width: 240px; aspect-ratio: 1; border-radius: var(--r-xl); border: 1px solid var(--hair); background: var(--raise); cursor: grab; touch-action: none; margin: 4px 0 8px; }
.pcs-pad:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pcs-pad-x, .pcs-pad-y { position: absolute; background: var(--hair); } .pcs-pad-x { left: 0; right: 0; top: 50%; height: 1px; } .pcs-pad-y { top: 0; bottom: 0; left: 50%; width: 1px; }
.pcs-dot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(242, 193, 78, .22); transition: left 90ms var(--ease), top 90ms var(--ease); }
.pcs-pad small { position: absolute; font-size: 0.6875rem; color: var(--muted); } .pcs-ax-h { left: 8px; top: 6px; } .pcs-ax-w { right: 8px; bottom: 6px; }
.pcs-bodyread { margin: 0; font-size: 0.8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pcl-mastery { margin: 0 0 24px; padding: 16px; border-radius: var(--r-xl); border: 1px solid var(--hair); background: var(--raise); display: grid; gap: 12px; }
.pcl-mastery header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; } .pcl-mastery h2 { margin: 0; font-size: 1.125rem; }
.pcl-m-act { display: flex; gap: 8px; }
.pcl-m-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 8px 24px; }
.pcl-m-rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; font-size: 0.8125rem; }
.pcl-m-rows li > span { display: grid; min-width: 0; } .pcl-m-rows small { color: var(--muted); font-size: 0.6875rem; }
.opt-seg[aria-pressed=true] { background: var(--gold); color: #1a1405; }
.pcs-mchip b { margin-left: 4px; color: var(--gold); }
.pcs-pt { position: relative; }
.pcs-reqs { display: none; position: absolute; z-index: 5; left: 0; bottom: calc(100% + 6px); min-width: 170px; padding: 10px 12px; border-radius: var(--r-xl); border: 1px solid var(--hair-strong); background: var(--raise); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); text-align: left; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.pcs-reqs span { display: block; text-align: left; } .pcs-reqs .is-unmet { color: #ff6b6b; } .pcs-reqs .is-met { color: var(--fresh); }
.pcs-pt:hover > .pcs-reqs, .pcs-pt:focus > .pcs-reqs, .pcs-pt.is-hold > .pcs-reqs { display: grid; gap: 2px; }
.pcs-slot.is-unmet .pcs-tile { opacity: .7; } .pcs-unmet { display: grid; text-align: left; } .pcs-unmet small { color: #ff6b6b; font-size: 0.6875rem; font-weight: 600; }
.pcs-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-xl); border: 1px solid var(--warn); background: var(--raise); font-size: 0.8125rem; }
.pcs-confirm span { flex: 1 1 220px; }
.pcs-savebtn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Club import: My Club before a sync, the import guide, its fixes page, the welcome after a first sync ---------- */
.ci-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; max-width: 1080px; margin: 0 auto; padding: 56px 0 64px; }
.ci-copy { display: grid; gap: 24px; justify-items: start; }
.ci-copy h1 { margin: 0; font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 800; font-stretch: 125%; line-height: 1.02; letter-spacing: -0.01em; text-wrap: balance; }
.ci-gets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 1080px; margin: 0 auto 56px; padding: 0; list-style: none; }
.ci-gets li { display: grid; gap: 6px; align-content: start; padding: 18px; border: 1px solid var(--hair); border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.03); }
.ci-gets b { font-size: 1rem; font-weight: 700; }
.ci-gets li > span:last-child { color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
.ci-get-ic { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 12px; background: rgba(242, 193, 78, 0.10); color: var(--gold); }
.ci-get-ic svg { width: 22px; height: 22px; }
@media (max-width: 900px) { .ci-gets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .ci-gets { grid-template-columns: 1fr; } }
.ci-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ci-note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 0.8125rem; }
.ci-note svg { flex: none; width: 18px; height: 18px; color: var(--fresh); }
.ci-show { display: grid; gap: 14px; }
.ci-film-box { position: relative; }
.ci-film-toggle { position: absolute; right: 10px; bottom: 10px; background: rgba(6, 7, 10, 0.72); }
.ci-film-toggle .g-play, .ci-film-toggle[aria-label^="Play"] .g-pause { display: none; }
.ci-film-toggle[aria-label^="Play"] .g-play { display: block; }
html:not(.js) .ci-film-toggle { display: none; }
.ci-film { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--r-lg); border: 1px solid var(--hair-strong); background: var(--raise); }
.ci-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ci-path li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.03); }
.ci-path i { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-grad); color: #1a1204; font-style: normal; font-size: 0.8125rem; font-weight: 800; }
.ci-path b { font-size: 0.875rem; font-weight: 700; line-height: 1.25; }
.ci-time { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.ci-time svg { width: 14px; height: 14px; }
@media (max-width: 560px) { .ci-path { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .ci-hero { grid-template-columns: 1fr; gap: 32px; padding: 32px 0 40px; } }

.ci-wrap { max-width: 46rem; margin: 0 auto; padding-bottom: 24px; }
.ci-again { margin: -8px 0 16px; color: var(--muted); }
.ci-steps { display: grid; gap: 10px; max-width: 46rem; margin: 0 0 24px; padding: 0; list-style: none; }
.ci-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; padding: 18px 20px; border: 1px solid var(--hair);
  border-radius: var(--r-panel); background: var(--core); transition: border-color .3s var(--ease), opacity .3s var(--ease); }
.ci-step h2 { margin: 6px 0 4px; font-size: 1.0625rem; font-weight: 700; }
.ci-say { margin: 0; color: var(--muted); }
.ci-say a, .ci-help a, .ci-again a { color: var(--text); text-underline-offset: 2px; }
.ci-act { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.ci-n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--hair-strong);
  color: var(--muted); font-size: 0.9375rem; font-weight: 800; font-style: normal; }
.ci-n i { font-style: normal; }
.ci-tick { display: none; width: 18px; height: 18px; }
.ci-step[data-state="done"] .ci-n { border-color: transparent; background: rgba(63, 207, 142, .16); color: var(--fresh); }
.ci-step[data-state="done"] .ci-tick { display: block; }
.ci-step[data-state="done"] .ci-n i { display: none; }
.ci-step[data-state="done"] .ci-act, .ci-step[data-state="todo"] .ci-act { display: none; }
.ci-step[data-state="now"] { border-color: rgba(242, 193, 78, .45); }
.ci-step[data-state="now"] .ci-n { border-color: transparent; background: var(--gold-grad); color: #1A1204; }
.ci-step[data-state="todo"] { opacity: .55; }
.ci-step[data-state="bad"] { border-color: rgba(255, 159, 67, .5); }
.ci-step[data-state="bad"] .ci-say { color: var(--warn); }
.ci-wait { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; color: var(--text); font-weight: 600; }
.ci-wait[hidden], .ci-step[data-state="done"] .ci-wait { display: none; }
.ci-spin { width: 16px; height: 16px; flex: none; border: 2px solid rgba(242, 193, 78, .25); border-top-color: var(--gold); border-radius: 50%; animation: ci-turn .8s linear infinite; }
@keyframes ci-turn { to { transform: rotate(1turn); } }
.ci-help { color: var(--muted); }

.ci-faqs { display: grid; gap: 8px; max-width: 46rem; margin: 0 0 24px; }
.ci-faq { border: 1px solid var(--hair); border-radius: var(--r-xl); background: var(--core); }
.ci-faq summary { padding: 16px 18px; font-weight: 700; cursor: pointer; list-style-position: inside; }
.ci-faq summary:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; border-radius: var(--r-xl); }
.ci-faq p { margin: 0; padding: 0 18px 18px; color: var(--muted); line-height: 1.55; }
.ci-faq code { color: var(--text); }

.ci-welcome { display: grid; gap: 16px; margin: 0 0 22px; padding: 20px 22px; border: 1px solid rgba(63, 207, 142, .35);
  border-radius: var(--r-panel); background: linear-gradient(180deg, rgba(63, 207, 142, .08), rgba(63, 207, 142, 0) 70%), var(--core); }
.ci-w-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ci-w-top h2 { margin: 0; font-size: 1.375rem; font-weight: 800; font-stretch: 115%; }
.ci-x { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--muted); }
.ci-x:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.ci-counts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; }
.ci-counts li { display: flex; align-items: baseline; gap: 8px; }
.ci-counts b { font-size: 1.625rem; font-weight: 800; font-stretch: 120%; font-variant-numeric: tabular-nums; }
.ci-counts span { color: var(--muted); }
.ci-next { display: flex; flex-wrap: wrap; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .ci-spin { animation: none; } .ci-step { transition: none; } }

/* Prices: PC or Console, a saved preference in the menus (ui.platform_pick). */
.plat-pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 10px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.plat-pick-seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: rgba(255, 255, 255, 0.03); }
.plat-pick-seg a { min-height: 28px; display: grid; place-items: center; padding: 0 12px; border-radius: var(--r-pill); color: var(--muted); text-decoration: none; transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.plat-pick-seg a[aria-current="true"] { background: rgba(255, 255, 255, 0.10); color: var(--text); }
.plat-pick-seg a:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.sheet-inner .plat-pick { padding: 12px 4px; font-size: 0.9375rem; }
.nav-user-pop .plat-pick { border-bottom: 1px solid var(--hair); margin-bottom: 6px; padding-bottom: 10px; }
.nav-more-pop .plat-pick { border-top: 1px solid var(--hair); margin-top: 6px; padding-top: 10px; }

/* Signed out: why the sign-up popup opened (static/auth.js). */
.auth-toast { position: fixed; left: 50%; bottom: 24px; z-index: 2147483000; transform: translate(-50%, 16px); max-width: calc(100vw - 32px); padding: 12px 18px; border: 1px solid rgba(242, 193, 78, .45); border-radius: var(--r-pill); background: var(--shell); color: var(--text); font-size: 0.875rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease), transform 300ms var(--ease); }
.auth-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.ci-cta .btn { height: 48px; padding: 0 24px; }   /* the pair under a hero: one height */

/* Signed out: a control that needs an account (static/auth.js): greyed, a lock, and a click opens sign-up. */
.needs-account { opacity: .5; cursor: pointer !important; filter: grayscale(.6); }
.needs-account:hover { opacity: .7; }
.needs-account.is-quiet, .needs-account.is-quiet:hover { opacity: 1; filter: none; }  /* star and done: no grey, no lock */
button.needs-account.is-quiet::before { content: none; }
button.needs-account::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3' y='7' width='10' height='7' rx='1.5' fill='black'/%3E%3Cpath d='M5.5 7V5a2.5 2.5 0 0 1 5 0v2' stroke='black' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3' y='7' width='10' height='7' rx='1.5' fill='black'/%3E%3Cpath d='M5.5 7V5a2.5 2.5 0 0 1 5 0v2' stroke='black' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Import guide (cometut/club_import.py) */
.ci-wrap .page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ci-browser { margin: 0 0 14px; padding: 12px 16px; border: 1px solid rgba(255, 159, 67, .45); border-radius: var(--r-md); background: rgba(255, 159, 67, .08); color: var(--text); font-size: 0.875rem; }
a.ci-again { margin: 0 0 14px; color: var(--text); }

/* ---------- Pro Clubs round 4: archetype picker, Presets, Mastery panel, two boost colours, Body dropdown, holographic default card ---------- */
:root { --boost-m: #f2c14e; --boost-b: #6cc4ff; }
.pcf-m, .pcf-bd { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 6px; }
.pcf-m { color: var(--boost-m); } .pcf-bd { color: var(--boost-b); }
.pcf-bs { display: inline; }
.pcf-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 8px; font-size: 12px; color: var(--muted); }
.pcf-legend span { display: inline-flex; align-items: center; gap: 6px; } .pcf-legend i { font-style: normal; font-weight: 700; margin: 0; }
.pcs-pick { position: relative; }
.pcs-arch { position: static; }
.pcs-archbtn, .pcs-bodybtn { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; }
.pcs-archbtn::-webkit-details-marker, .pcs-bodybtn::-webkit-details-marker { display: none; }
.pcs-archbtn svg, .pcs-bodybtn svg { width: 14px; height: 14px; transition: transform 180ms var(--ease); }
.pcs-arch[open] .pcs-archbtn svg, .pcs-bodypop[open] .pcs-bodybtn svg { transform: rotate(180deg); }
.pcs-arch-pop { left: 0; right: 0; top: calc(100% + 6px); max-height: min(78vh, 760px); overflow: auto; padding: 14px; gap: 16px; z-index: 30; }
.pcs-arch-body { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: flex-start; }
.pcs-arch-line h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pcs-arch-pop .pcl-cards { display: flex; flex-wrap: wrap; gap: 10px; } .pcs-arch-pop .pcl-cards li { width: 92px; }
.pcs-arch-pop .pcl-card[aria-current] { outline: 2px solid var(--gold); outline-offset: 3px; }
.pcs-presetrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.pcs-presetlbl { color: var(--muted); font-size: 13px; font-weight: 600; }
.pcs-presetrow .pcs-presets { margin: 0; }
.pcs-preset.is-later { opacity: .6; }
.pcs.is-previewing .pcf-v { color: var(--gold); }
.pcs.is-over .pcs-save-slot .btn-sm, .pcs.is-over .pcs-save-slot summary { opacity: .45; cursor: not-allowed; }
.pcs-bodypop { position: relative; display: inline-block; }
.pcs-bodypanel { left: 0; right: auto; width: min(300px, calc(100dvw - 32px)); padding: 14px; gap: 10px; z-index: 20; }
.pcs-bodypanel .pcs-pad { max-width: 210px; margin: 0 auto; }
.pcs-fx { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; min-height: 20px; font-size: 12px; } .pcs-fx .pcf-bd { margin: 0; } .pcs-fx small { color: var(--muted); }
.pcs-acc-p, .pcs-acc { margin: 0; display: flex; align-items: baseline; gap: 8px; font-size: 13px; } .pcs-acc-p small, .pcs-acc small { color: var(--muted); }
.pcs-bodyact { display: flex; justify-content: space-between; gap: 8px; }
.pcs-body { gap: 8px; }
/* Mastery: a panel that opens */
details.pcl-mastery { padding: 0; gap: 0; display: block; }
.pcl-mastery > summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; border-radius: inherit; }
.pcl-mastery > summary::-webkit-details-marker { display: none; }
.pcl-mastery > summary:focus-visible { outline: 2px solid var(--chalk); outline-offset: -2px; }
.pcl-m-t { font-size: 16px; font-weight: 700; }
.pcl-m-sum { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 10px; border-radius: 99px; border: 1px solid var(--hair); }
.pcl-m-sum.is-on { color: #1a1405; background: var(--gold); border-color: var(--gold); }
.pcl-m-chev { width: 16px; height: 16px; color: var(--muted); transition: transform 180ms var(--ease); }
.pcl-mastery[open] .pcl-m-chev { transform: rotate(180deg); }
.pcl-m-body { display: grid; gap: 14px; padding: 0 16px 16px; border-top: 1px solid var(--hair); padding-top: 14px; }
.pcl-m-act { display: flex; gap: 8px; }
.pcl-m-rows { gap: 10px; }
.pcl-m-rows li { padding: 10px 12px; border-radius: var(--r-xl); border: 1px solid var(--hair); background: rgba(255, 255, 255, .02); }
.pcl-m-rows li.is-set { border-color: rgba(242, 193, 78, .45); background: rgba(242, 193, 78, .06); }
.pcl-m-n { font-weight: 600; }
/* a Specialization: the lock or the tick, the sheet's action by state */
.pcs-state i { position: absolute; inset: 0; font-style: normal; display: none; }
.pcs-spec.is-locked .st-lock, .pcs-spec:not(.is-locked) .st-check { display: block; }
.pcs-spec.is-locked .pcs-act-met, .pcs-spec:not(.is-locked) .pcs-act-reach { display: none; }
a.pcs-pt.is-off:hover, a.pcs-pt.is-off:focus-visible { border-color: var(--hair); background: none; }
/* the default card (no level yet): silver with a holographic sheen */
.pcc.is-neutral .pcc-card::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: color-dodge; opacity: .5;
  background: linear-gradient(115deg, rgba(255, 70, 160, .0) 15%, rgba(255, 70, 160, .55) 28%, rgba(255, 220, 60, .55) 40%, rgba(70, 255, 190, .55) 52%, rgba(70, 150, 255, .55) 64%, rgba(190, 90, 255, .55) 76%, rgba(190, 90, 255, 0) 88%) 0 0 / 260% 100% no-repeat;
  -webkit-mask: var(--art) center / 100% 100% no-repeat; mask: var(--art) center / 100% 100% no-repeat; animation: pcc-holo 7s ease-in-out infinite alternate; }
@keyframes pcc-holo { from { background-position: 0 0; } to { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .pcc.is-neutral .pcc-card::before { animation: none; background-position: 40% 0; } }
.pcc.is-neutral { --dim: .9; --sat: .85; }
@media (max-width: 720px) { .pcs-arch-pop { padding: 10px; } .pcs-arch-pop .pcl-cards li { width: calc((100% - 20px) / 3); } .pcs-arch-line { flex: 1 1 100%; } }
.pcl-m-rows { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.pcl-m-rows li { display: grid; gap: 8px; justify-content: stretch; align-items: start; }
.pcl-m-rows .pcs-seg { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pcl-m-rows .pcs-seg .opt-seg { min-height: 30px; padding: 0 4px; font-size: 12px; justify-content: center; }
.pcl-m-rows .opt-seg[data-lv="0"][aria-pressed=true] { background: var(--hair-strong); color: var(--text); }
.pcl-m-n small { display: block; }
/* Only after the person has typed or left a field, never on load (:user-invalid). */
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: var(--s-poor); }

/* Popover panels follow their button: anchored to it, flipped above or to the other side when they would leave the screen,
   and fixed so no overflow container clips them. Where anchoring is missing (or on a phone, which has its own sheets)
   the absolute rules above stand. */
@supports (anchor-name: --a) {
  @media (min-width: 721px) {
    details.tool-pop { anchor-scope: --tp; }
    details.tool-pop > summary { anchor-name: --tp; }
    /* those three fill their row; the nav menus sit in .island, whose backdrop-filter makes "fixed" mean "fixed to the island",
       so they keep their absolute placement (they open below the bar, never near an edge) */
    details.tool-pop > .menu-pop:not(.pcs-sheet, .pcs-chart, .pcs-arch-pop, .pcs-sigmenu, .pcs-mpop, .pcm-pop, .nav-more-pop, .nav-user-pop) {
      position: fixed; position-anchor: --tp; position-area: block-end span-inline-start; inset: auto; margin-block: 6px;
      position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    }
  }
}

/* Round 4 refinement pass (hallmark floor, modern-web-guidance menu): an open trigger reads as open, every new control shows focus at once, motion has a reduced-motion fallback */
.pcs-arch[open] > .pcs-archbtn, .pcs-bodypop[open] > .pcs-bodybtn { border-color: var(--gold); color: var(--text); }
.pcs-archbtn:focus-visible, .pcs-bodybtn:focus-visible, .pcs-preset:focus-visible, .pcl-m-rows .opt-seg:focus-visible, .pcl-m-act .btn-sm:focus-visible, .pcs-bodyact .btn-sm:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.pcs-arch-pop .pcl-card:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .pcs-archbtn svg, .pcs-bodybtn svg, .pcl-m-chev { transition: none; } }
/* Native customizable select (audit row 9). Where the browser supports it, static/ui-select.js leaves the plain <select> alone
   and this draws it like the .ui-select button and list above. Other browsers keep the script's version. */
@supports (appearance: base-select) {
  :where(select:not([multiple]):not([data-native])), :where(select:not([multiple]):not([data-native]))::picker(select) { appearance: base-select; }
  :where(select:not([multiple]):not([data-native])) { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; box-sizing: border-box; min-width: 0; height: 36px; padding: 0 12px 0 14px;
    border-radius: var(--r-pill); border: 1px solid var(--hair-strong); background: var(--raise); color: var(--text); font: inherit; font-size: 0.8125rem; font-weight: 700;
    white-space: nowrap; cursor: pointer; transition: border-color 200ms var(--ease); }
  select:not([multiple]):not([data-native]):hover, select:not([multiple]):not([data-native]):open { border-color: var(--gold); }
  select:not([multiple]):not([data-native]):focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
  select:not([multiple]):not([data-native]):disabled { opacity: 0.5; cursor: not-allowed; }
  select:not([multiple]):not([data-native])::picker-icon { content: ""; flex: none; width: 6px; height: 6px; margin: -3px 3px 0 0; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; transition: rotate 200ms var(--ease), margin 200ms var(--ease); }
  select:not([multiple]):not([data-native]):open::picker-icon { rotate: 225deg; margin-top: 3px; }
  select:not([multiple]):not([data-native])::picker(select) { box-sizing: border-box; min-width: anchor-size(width); max-width: min(320px, 90vw); max-height: 300px; margin-block: 6px; padding: 6px;
    border-radius: var(--r-2xl); border: 1px solid var(--hair-strong); background: #12151C; color: var(--text); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
    scrollbar-width: thin; scrollbar-color: var(--hair-strong) transparent; }
  select:not([multiple]):not([data-native]) option { padding: 8px 12px; border-radius: var(--r-md); font-size: 0.8125rem; font-weight: 400; white-space: nowrap; cursor: pointer; }
  select:not([multiple]):not([data-native]) option:hover, select:not([multiple]):not([data-native]) option:focus-visible { background: rgba(255, 255, 255, 0.07); }
  select:not([multiple]):not([data-native]) option:checked { color: var(--gold); font-weight: 700; }
  select:not([multiple]):not([data-native]) option:disabled { opacity: 0.4; cursor: not-allowed; }
  select:not([multiple]):not([data-native]) option::checkmark { display: none; }
  select:not([multiple]):not([data-native]) optgroup { padding: 8px 12px 4px; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.01em; }
  .formation-pick select:not([multiple]) optgroup[data-back] { color: var(--back); }
  .formation-pick select:not([multiple]) optgroup[data-back] option { box-shadow: inset 2px 0 0 var(--back); color: var(--text); text-transform: none; letter-spacing: normal; font-size: 0.8125rem; }
  /* the contexts that styled the .ui-select wrapper */
  .cf-field select:not([multiple]) { width: 100%; height: 40px; border-radius: var(--r-lg); font-weight: 600; }
  .formation-pick select:not([multiple]) { min-width: 150px; min-height: 0; justify-content: flex-start; border-color: var(--pick-line); background: var(--pick-bg); color: var(--pick-ink); font-weight: 800; }
  .formation-pick select:not([multiple]):hover, .formation-pick select:not([multiple]):open { border-color: var(--pick-ink); background: rgba(91, 155, 255, 0.18); }
  .formation-pick select:not([multiple])::picker-icon { margin-left: auto; }
  .pcs-pick select:not([multiple]) { min-width: 150px; }
  .pcs-slot select:not([multiple]) { flex: 1; min-width: 0; }
  .pcs-pick .pcs-levels select:not([multiple]) { min-width: 78px; margin-left: 8px; border-width: 0 0 0 1px; border-radius: 0; border-color: var(--hair-strong); background: transparent; }
  .pcs-levels select:not([multiple]):hover { background: rgba(255, 255, 255, .06); }
  @media (max-width: 720px) { select:not([multiple]):not([data-native]) { min-height: 44px; } }
  /* the picker is its own top-layer box: it does not inherit the page font on its own */
  select:not([multiple]):not([data-native])::picker(select), select:not([multiple]):not([data-native]) option { font-family: var(--font); letter-spacing: normal; }
  /* the pitch icon the .ui-select button drew with ::before, drawn on the label over the select's left padding */
  .formation-pick { position: relative; }
  .formation-pick::before { content: ""; position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 9px; height: 13px; pointer-events: none;
    border: 1.5px solid var(--pick-ink); border-radius: 3px; background: linear-gradient(var(--pick-ink), var(--pick-ink)) center / 100% 1.5px no-repeat; }
  .formation-pick select:not([multiple]) { padding-left: 33px; }
}

/* Pro Clubs round 5: saved state (name beside the card, Unsaved changes, undo, redo) and the Saved toast */
.pcs-savedbar { flex-wrap: wrap; }
.pcs-dirty { font-size: 12px; color: var(--muted); }
.pcs-savedbar.is-dirty .pcs-dirty { color: var(--gold); font-weight: 600; }
.pcs-hist { width: 36px; height: 36px; } .pcs-hist svg { width: 16px; height: 16px; } .pcs-hist:disabled { opacity: .35; cursor: default; }
.pcs-proname { width: 100%; margin: 0 0 10px; padding: 8px 12px; border-radius: var(--r-xl); border: 1px solid var(--hair); background: var(--raise); color: var(--text); font: inherit; font-size: 16px; font-weight: 700; text-align: center; }
.pcs-proname:hover { border-color: var(--hair-strong); } .pcs-proname:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.pcs-toast { position: fixed; z-index: 90; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); translate: -50% 0; padding: 10px 18px; border-radius: 99px; background: var(--gold); color: #1a1405; font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: pcs-toast 2.2s var(--ease) both; }
.pcs-toast.is-bad { background: var(--raise); color: var(--text); border: 1px solid var(--warn); }
@keyframes pcs-toast { 0% { opacity: 0; transform: translateY(8px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pcs-toast { animation: none; } }

/* round 5: long names wrap; boosts green up, red down (source in the tooltip); Body as the game lays it out; Mastery in the Comet UT palette */
:root { --boost-up: var(--fresh); --boost-down: #ff6b6b; }
.pcs-sig b, .pcs-slot summary b, .pcs-pt b, .pcs-spec summary b { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.2; }
.pcs-sig { align-items: flex-start; }
.pcf-m, .pcf-bd { color: var(--boost-up); } .pcf-m.is-down, .pcf-bd.is-down { color: var(--boost-down); }
.pcf-m + .pcf-bd { margin-left: 3px; }
.pcs-bodyval { margin: 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pcs-bodypanel { width: min(560px, calc(100dvw - 32px)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.pcs-bodyleft { display: grid; gap: 8px; align-content: start; }
.pcs-baseval h3 { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.pcs-baseval .pcs-fx { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-height: 0; font-size: 13px; }
.pcs-baseval .pcs-fx li { display: grid; grid-template-columns: minmax(0, 1fr) auto 3ch; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.pcs-baseval .pcs-fx b { font-variant-numeric: tabular-nums; } .pcs-baseval .pcs-fx i { font-style: normal; font-weight: 700; text-align: right; }
.pcs-fx .is-up { color: var(--boost-up); } .pcs-fx .is-down { color: var(--boost-down); }
@media (max-width: 560px) { .pcs-bodypanel { grid-template-columns: minmax(0, 1fr); } }
.pcl-m-why { margin: 0; font-size: 13px; color: var(--muted); }
.pcl-m-rows .pcs-seg { background: rgba(255, 255, 255, .03); border: 1px solid var(--hair); }
.pcl-m-rows .pcs-seg .opt-seg { background: transparent; color: var(--muted); }
.pcl-m-rows .pcs-seg .opt-seg:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.pcl-m-rows .pcs-seg .opt-seg[aria-pressed=true] { background: var(--gold); color: #1a1405; }
.pcl-m-rows .pcs-seg .opt-seg[data-lv="0"][aria-pressed=true] { background: var(--hair-strong); color: var(--text); }
.pcs-sigtxt { display: grid; gap: 2px; min-width: 0; }
.pcs-sig.is-granted { padding: 6px 8px; border-radius: var(--r-xl); border: 1px solid var(--fresh); background: rgba(63, 207, 142, .06); }
.pcs-displaced { color: var(--muted); font-size: 11px; }
.pcs-sigact { font-size: 12px; font-weight: 600; color: var(--gold); text-decoration: none; } .pcs-sigact:hover { text-decoration: underline; }
.pcs-sigact:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.pcs-apb { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
.pcs-cost .pcs-apb { width: 14px; height: 14px; vertical-align: -2px; margin: 0 0 0 2px; }
/* the frames are raster art: a Comet UT tint is a CSS filter on the frame (grey becomes warm gold), not a recolour of its parts; first version on the default card only */
.pcc.is-neutral .pcc-frame { filter: brightness(var(--dim, 1)) sepia(.55) saturate(1.5) hue-rotate(-6deg) drop-shadow(0 8px 18px rgba(0, 0, 0, .45)); }
.pcs-ap-row > span:first-child { display: inline-flex; align-items: center; gap: 6px; } .pcs-ap-row .pcs-apb { margin: 0; width: 22px; height: 22px; }

/* round 6: My Pros as icons, no sharing */
.pcm-actions { display: flex; align-items: center; gap: 8px; } .pcm-actions .icon-btn { width: 36px; height: 36px; display: grid; place-items: center; } .pcm-actions svg { width: 18px; height: 18px; }
.pcm-del { display: grid; gap: 8px; } .pcm-del p { margin: 0; font-size: 13px; }
/* PlayStyle picker by the game's rows, wide enough to pick in one look */
.pcs-chart { width: min(560px, calc(100dvw - 32px)); max-height: 70vh; overflow: auto; }
.pcs-chart-grid { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.pcs-grp h4 { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pcs-grprow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.pcs-clearrow { max-width: 140px; }
.pcs-swapq { color: var(--muted); font-size: 12px; }

/* round 6: Mastery tiles that step through None, 10, 30, 55; archetype picker is just the cards with big names; black and gold default card */
.pcl-m-rows { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.pcl-m-rows li { display: block; padding: 0; border: 0; background: none; }
.pcl-mt { width: 100%; display: grid; gap: 10px; text-align: left; padding: 12px 14px; border-radius: var(--r-xl); border: 1px solid var(--hair); background: linear-gradient(160deg, #15171d, #0d0f13); color: var(--text); cursor: pointer; transition: border-color 180ms var(--ease), transform 160ms var(--ease); }
.pcl-mt:hover { border-color: var(--hair-strong); } .pcl-mt:active { transform: scale(.97); } .pcl-mt:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.pcl-mt.is-set { border-color: rgba(242, 193, 78, .55); background: linear-gradient(160deg, #1d1809, #0d0f13); }
.pcl-pips { display: flex; gap: 6px; }
.pcl-pip { flex: 1; text-align: center; font-style: normal; font-size: 12px; font-weight: 700; padding: 5px 0; border-radius: 8px; color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--hair); }
.pcl-pip.is-on { color: #1a1405; background: linear-gradient(160deg, #f6dc8a, #c9962f); border-color: transparent; }
.pcs-arch-pop { max-height: min(80vh, 780px); }
.pcs-arch-cards { display: flex; flex-wrap: wrap; gap: 14px; }
.pcs-arch-pop .pcl-cards li { width: 120px; }
.pcs-arch-pop .pcl-card { display: grid; gap: 8px; justify-items: center; }
.pcl-cname { font-size: 15px; font-weight: 800; letter-spacing: .01em; text-align: center; }
.pcs-arch-pop .pcl-card[aria-current] .pcl-cname { color: var(--gold); }
@media (max-width: 720px) { .pcs-arch-pop .pcl-cards li { width: calc((100% - 28px) / 3); } .pcl-cname { font-size: 13px; } }
/* default card: black and gold, a slow gold glint across it (replaces the rainbow sheen and the beige tint) */
.pcc.is-neutral .pcc-frame { filter: grayscale(1) brightness(.5) contrast(1.25) sepia(.9) saturate(1.6) hue-rotate(-8deg) drop-shadow(0 8px 18px rgba(0, 0, 0, .55)); }
.pcc.is-neutral .pcc-card::before { mix-blend-mode: screen; opacity: .55; background: linear-gradient(110deg, transparent 38%, rgba(255, 214, 120, .0) 40%, rgba(255, 214, 120, .75) 50%, rgba(255, 214, 120, 0) 60%, transparent 62%) 100% 0 / 280% 100% no-repeat;
  animation: pcc-gold 5.5s ease-in-out infinite; }
@keyframes pcc-gold { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .pcc.is-neutral .pcc-card::before { animation: none; background-position: 40% 0; } }
.plat-pick-seg a img { display: block; width: 18px; height: 18px; object-fit: contain; }
#clerk-mount { display: grid; gap: 16px; }
#clerk-mount .au-google { width: 100%; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
#clerk-mount .btn-gold { width: 100%; justify-content: center; }

/* round 7: Body edit beside the readout; PlayStyles in a centred popup with a lane per row; Signatures that swap; Unlock on one line; a preset told as a player */
.pcs-bodyrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.pcs-bodyrow .pcs-bodyval { flex: 1; min-width: 0; }
.pcs-bodybtn { white-space: nowrap; }
.pcs-bodypop .pcs-bodypanel { left: auto; right: 0; }

.pcs-slot details[open]::before { content: ""; position: fixed; inset: 0; z-index: 60; background: rgba(5, 7, 10, .62); }
.pcs-slot details[open] > .pcs-chart { position: fixed; inset: auto; top: 50%; left: 50%; right: auto; bottom: auto; z-index: 61; width: min(940px, calc(100vw - 24px)); max-height: min(84vh, 640px); padding: 18px 20px;
  transform: translate(-50%, -50%); animation: pcs-pop 180ms var(--ease) both; overflow: auto; }
@keyframes pcs-pop { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.pcs-chart-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pcs-grp { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }
.pcs-grp:first-child { border-top: 0; padding-top: 0; }
.pcs-grp h4 { margin: 0; font-size: 13px; color: var(--text); }
.pcs-grprow { display: flex; flex-wrap: wrap; gap: 8px; }
.pcs-grprow > li { width: 92px; }
.pcs-clearrow { max-width: none; justify-self: end; }
.pcs-chart .pcs-grprow li:nth-child(n) .pcs-pt-need { top: calc(100% + 6px); bottom: auto; left: 50%; right: auto; transform: translateX(-50%); }
.pcs-chart .pcs-grprow li:first-child:nth-child(n) .pcs-pt-need { left: 0; transform: none; }
@media (max-width: 640px) {
  .pcs-grp { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pcs-grprow { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .pcs-grprow > li { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .pcs-slot details[open] > .pcs-chart { animation: none; } }

.pcs-sigs { align-items: stretch; }
.pcs-sig, .pcs-sig.is-granted { display: block; padding: 0; border: 0; background: none; }
.pcs-sigpop { position: relative; }
.pcs-sigsum { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 52px; padding: 6px 8px; border-radius: var(--r-xl); border: 1px solid var(--hair); background: var(--raise); cursor: pointer; list-style: none; }
.pcs-sigsum::-webkit-details-marker { display: none; }
.pcs-sigsum:hover { border-color: var(--hair-strong); } .pcs-sigsum:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.pcs-sigpop[open] > .pcs-sigsum { border-color: var(--gold); }
.pcs-sigsum .ps-art { width: 32px; height: auto; flex: none; }
.pcs-sigsum b { flex: 1; min-width: 0; font-size: 0.8125rem; font-weight: 600; line-height: 1.2; align-self: center; }
.pcs-sigsum svg { width: 14px; height: 14px; flex: none; color: var(--muted); }
.pcs-sig.is-granted .pcs-sigsum { border-color: var(--fresh); background: rgba(63, 207, 142, .07); }
.pcs-sigpop.is-single > .pcs-sigsum { pointer-events: none; cursor: default; } .pcs-sigpop.is-single .pcs-sigsum svg, .pcs-sigpop.is-single .pcs-sigmenu { display: none; }
.pcs-sigmenu { left: 0; right: auto; min-width: 220px; padding: 6px; z-index: 30; }
.pcs-sig:nth-child(2) .pcs-sigmenu { left: auto; right: 0; }
.pcs-sigmenu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pcs-sigopt { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-xl); color: var(--text); text-decoration: none; }
.pcs-sigopt:hover, .pcs-sigopt:focus-visible { background: rgba(255, 255, 255, .08); outline: 0; }
.pcs-sigopt[aria-current] { background: rgba(63, 207, 142, .1); }
.pcs-sigopt .ps-art { width: 30px; height: auto; flex: none; }
.pcs-sigopt span { display: grid; gap: 1px; } .pcs-sigopt b { font-size: 0.8125rem; font-weight: 600; } .pcs-sigopt small { color: var(--muted); font-size: 0.6875rem; }
.pcs-sigact, .pcs-displaced { display: none; }

.pcs-reach { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.pcs-reach .pcs-cost { display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.pcs-reach .pcs-cost .pcs-apb { margin: 0; width: 16px; height: 16px; vertical-align: 0; }
.pcs-equip { text-decoration: none; justify-self: start; }

.pcs-recipe { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto; align-items: center; gap: 18px 28px; }
.pcs-who h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.05rem; }
.pcs-who p { margin: 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.35; }
.pcs-accel { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; border: 1px solid currentColor; }
.pcs-accel.is-explosive { color: #ff9f43; background: rgba(255, 159, 67, .12); }
.pcs-accel.is-lengthy { color: #6aa9ff; background: rgba(106, 169, 255, .12); }
.pcs-accel.is-controlled { color: var(--fresh); background: rgba(63, 207, 142, .1); }
.pcs-faces { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.pcs-faces li { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 0.75rem; color: var(--muted); }
.pcs-faces i { display: block; height: 6px; border-radius: 99px; background: var(--hair); position: relative; overflow: hidden; }
.pcs-faces i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--gold), #ffe08a); }
.pcs-pstyles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.pcs-pstyles li { display: grid; justify-items: center; gap: 2px; width: 64px; font-size: 0.6875rem; line-height: 1.15; text-align: center; color: var(--muted); }
.pcs-pstyles .ps-art { width: 32px; height: auto; }
@media (max-width: 860px) { .pcs-recipe { grid-template-columns: minmax(0, 1fr); } .pcs-pstyles { justify-content: flex-start; } }

/* Admin panel (cometut/admin_pages.py): section pills, the three-way switch, the environment badge, the confirm dialog */
.admin-nav, .best-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); width: fit-content; max-width: 100%; }
.admin-nav .opt-seg, .best-nav .opt-seg { padding: 0 14px; text-decoration: none; }
.best-nav { margin: 0 0 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.best-nav .opt-seg { flex: none; white-space: nowrap; }
.best-lead { margin: 4px 0 12px; color: var(--muted); font-size: 0.8125rem; }
.best-lead a { color: var(--text); }
.pl-ver { color: var(--text-2, var(--muted)); }
.admin-nav .opt-seg[aria-current="page"], .best-nav .opt-seg[aria-current="page"] { background: rgba(255, 255, 255, 0.1); color: var(--text); }
.admin-seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--hair); background: var(--shell); }
.admin-seg .opt-seg { padding: 0 12px; white-space: nowrap; }
.admin-row input[type="file"] { min-width: 0; max-width: 100%; color: var(--muted); font: inherit; font-size: 0.8125rem; }
.admin-row input[type="file"]::file-selector-button { margin-right: 10px; padding: 8px 14px; border: 1px solid var(--hair-strong); border-radius: var(--r-pill);
  background: var(--raise); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.admin-row input[type="file"]::file-selector-button:hover { border-color: var(--gold); }
@media (max-width: 720px) {  /* the three-way pills share the row on a phone instead of running off it */
  .admin-seg { display: flex; width: 100%; }
  .admin-seg .opt-seg { flex: 1; justify-content: center; padding: 0 6px; }
}
.admin-row > .admin-ctl, .admin-row > .admin-val { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; text-align: right; }
.admin-row form.inline { display: flex; gap: 6px; align-items: center; }
.admin-env { display: inline-block; padding: 2px 10px; border-radius: var(--r-pill); border: 1px solid var(--hair-strong); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; }
.admin-env.is-live { color: var(--warn); border-color: currentColor; }
.admin-env.is-staging { color: var(--gold); border-color: currentColor; }
.admin-dialog { width: min(400px, calc(100vw - 32px)); padding: 18px; color: var(--text); background: var(--core); border: 1px solid var(--hair); border-radius: var(--r-panel); }
.admin-dialog::backdrop { background: rgba(6, 7, 10, .72); }
.admin-dialog h2 { font-size: 1.0625rem; font-weight: 800; margin: 0 0 16px; }
.admin-dialog-btns { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 720px) { .admin-row { flex-wrap: wrap; } .admin-row > .admin-ctl, .admin-row > .admin-val { justify-content: flex-start; text-align: left; } }

/* Players rail: one compact bar (search, tools) and a panel that opens under it, so the card grid gets the height */
.rail-pane[data-pane="players"] { display: flex; flex-direction: column; }
.sq-search { display: grid; flex: 1 1 auto; grid-template-rows: auto auto auto minmax(0, 1fr) auto; row-gap: 0; min-height: 0; }
.sq-search > .sq-tools { margin-top: 10px; } .sq-search .pc-grid { margin-top: 4px; padding-bottom: 0; gap: 8px 8px; } .sq-search > [data-act="more"] { margin-top: 8px; }
.sq-search .sq-tools { grid-row: 3; } .sq-search .pc-grid { grid-row: 4; } .sq-search > [data-act="more"] { grid-row: 5; }
.sq-find { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
.sq-find .chip { height: 28px; padding: 0 10px; font-size: 0.75rem; }
.sq-tools { display: grid; gap: 10px; }
.sq-tools[hidden] { display: none; }
.sq-sortrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.sq-sortrow select, .sq-sortrow .ui-select { width: auto; flex: 0 1 auto; }
.sq-search > [data-source-seg] { grid-row: 2; margin-top: 10px; }
.sq-tools-btn[aria-expanded="true"] { background: var(--raise); border-color: var(--gold); }
/* Build tab: replace-or-fill pills, the cost inside the button, "N left" beside it */
.bd-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; padding: 2px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .04); }
.bd-gorow { display: flex; align-items: center; gap: 12px; }
.bd-go, .sbc-solve { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.cr-cost { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; opacity: .85; }
.cr-left { color: var(--muted); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sbc-go .cr-left { margin-left: 2px; }
.bd-swaps { display: grid; gap: 4px; margin-top: 6px; }
.bd-swap { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.bd-rev { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bd-rev-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; color: var(--muted); }
.bd-rev-nm { flex: 1 1 100%; order: 5; color: var(--text); font-size: 0.75rem; overflow-wrap: anywhere; }
.bd-rev-cr { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 700; }
.bd-rev-cr .up { color: var(--fresh); } .bd-rev-cr .dn { color: #ff6b6b; }
.bd-rev-act { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.rail-tabs { margin-bottom: 0; }
.sq-search > [data-act="more"]:not(:focus) { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); }

/* round 8: one tooltip per PlayStyle (below the tile), the game's AcceleRATE colours, a calmer toolbar */
.pcs-pt-need { align-items: flex-start; text-align: left; max-width: 220px; }
.pcs-pt-need .pcs-lines { display: grid; gap: 2px; }
.pcs-pt-need .is-met { color: var(--fresh); } .pcs-pt-need .is-unmet { color: #ff6b6b; }
.pcs-pt:not(.is-off) .pcs-pt-need svg { display: none; }
.pcs-pt:is(:hover, :focus-visible):not(.is-clear) > .pcs-pt-need, .pcs-pt.is-hold > .pcs-pt-need { display: flex; }
.pcs-slot details[open] > .pcs-chart { padding-bottom: 72px; }
.pcs-reqs { display: none !important; }

.pcs-acc[data-accel-type] b, .pcs-acc-p[data-accel-type] b { color: var(--tc); font-weight: 800; }
.pcs-accel.is-explosive { color: var(--acc-explosive); background: color-mix(in srgb, var(--acc-explosive) 14%, transparent); }
.pcs-accel.is-controlled { color: var(--acc-controlled); background: color-mix(in srgb, var(--acc-controlled) 14%, transparent); }
.pcs-accel.is-lengthy { color: var(--acc-lengthy); background: color-mix(in srgb, var(--acc-lengthy) 14%, transparent); }

.pcs-archbtn { border-color: rgba(242, 193, 78, .65); box-shadow: 0 0 0 1px rgba(242, 193, 78, .18) inset; font-weight: 700; }
.pcs-resetbtn { width: 36px; height: 36px; display: grid; place-items: center; } .pcs-resetbtn svg { width: 18px; height: 18px; }
.pcs-mypro { font-weight: 700; }
.pcs-mastery { position: relative; display: inline-block; }
.pcs-mastery > summary { list-style: none; cursor: pointer; } .pcs-mastery > summary::-webkit-details-marker { display: none; }
.pcs-mastery[open] > summary { border-color: var(--gold); }
.pcs-mpop { left: 0; right: auto; width: min(300px, calc(100dvw - 32px)); gap: 8px; padding: 14px; z-index: 30; }
.pcs-mpop h3 { margin: 0; font-size: 0.95rem; } .pcs-mattrs { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.pcs-mpop .pcs-seg { margin: 4px 0; } .pcs-mpop .pcs-seg .opt-seg { text-decoration: none; }
.pcs-mall { color: var(--gold); font-size: 0.8125rem; font-weight: 600; text-decoration: none; } .pcs-mall:hover { text-decoration: underline; }

/* round 9: equal Specialization tiles, a value you can type, the signed-out lines */
.pcs-specs { grid-auto-rows: 1fr; align-items: stretch; }
.pcs-spec, .pcs-spec details { height: 100%; }
.pcs-spec summary { box-sizing: border-box; height: 100%; align-content: start; }
.pcs-spec details[open] { position: static; }
input.pcf-v { width: 100%; min-width: 0; box-sizing: border-box; padding: 1px 2px; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; color: inherit; text-align: right;
  background: transparent; border: 1px solid transparent; border-radius: 6px; }
input.pcf-v:hover { border-color: var(--hair-strong); }
input.pcf-v:focus { outline: 0; border-color: var(--gold); background: rgba(255, 255, 255, .06); }
.pcs-nosave, .pcs-local { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.pcs-local a { color: var(--gold); font-weight: 600; text-decoration: none; } .pcs-local a:hover { text-decoration: underline; }

/* Players (/local/players), rebuilt 2026-11-17: a compact row (a small card with no stats on its face), one type scale, one header style.
   Scoped to .pl-main / .pl-grid so the Evolutions list keeps its own. docs/features/players-list.md */
.pos-set { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; width: 100%; }
.pos-set > * { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border: 1px solid var(--hair); border-radius: var(--r-sm); background: var(--raise);
  color: var(--muted); font-size: 0.75rem; font-style: normal; font-weight: 700; line-height: 1; }
.pos-set > b { border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--text); font-weight: 800; }
.pos-set:is([data-n="3"], [data-n="5"], [data-n="6"]) > * { flex: 0 0 calc((100% - 8px) / 3); min-width: 0; }  /* three across: five and six fall in two even rows */
.pos-set[data-n="4"] > * { flex: 0 0 calc((100% - 4px) / 2); min-width: 0; }
.pl-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 22px 14px; }
.pl-grid > .tile { contain-intrinsic-size: auto 250px; }
.pl-main { --sec: color-mix(in srgb, var(--text) 68%, var(--core)); }  /* the one muted ink for headers and secondary lines */
/* card | player (176px holds 99% of names; median 13 letters) | OVR | six stats | skills | PlayStyles | Comet Rating | price */
/* --skx: the Skill Moves and Weak Foot columns, there only while their filter is on (players_pages._skills) */
.pl-main.has-sm, .pl-main.has-wf { --skx: 56px; } .pl-main.has-sm.has-wf { --skx: 56px 56px; }
.pl-main .pl-row, .pl-main .pl-head { grid-template-columns: 80px minmax(130px, 190px) 52px 232px var(--skx,) minmax(150px, 1fr) 140px 104px; grid-template-areas: none; gap: 16px; padding: 6px 18px 6px 12px; }
.pl-main .pl-row { contain-intrinsic-size: auto 112px; }
.pl-main .pl-head { padding-block: 9px; }
.pl-main :is(.pl-card, .pl-who, .pl-pos, .pl-stats, .pl-price, .pl-ovr, .pl-abil, .pl-cr, .pl-sm, .pl-wf) { grid-area: auto; min-width: 0; }
.pl-main .pl-skx { display: contents; }  /* its cells are columns of the row */
.pl-main .pl-card { width: 80px; }
.pl-main .pl-card .p-name { display: none; }  /* the fallback plate (image not loaded): the name is beside it already */
/* the table card has no name or stats: its rating and the club, nation and league badges take that room, larger */
.pl-main .pl-card .ly-rating { top: 20%; }
.pl-main .pl-card .ly-rating b { font-size: 19cqw; }
.pl-main .pl-card .ly-rating span { font-size: 9cqw; }
.pl-main .pl-card .item-card.layered .ly-badges { left: 8%; top: 66%; width: 84%; height: 20%; gap: 3cqw; }
.pl-main .pl-card .item-card.layered .ly-badges img { height: 21cqw; max-width: 25cqw; }
.pl-main .pl-card .item-card.layered .ly-badges .ly-flags { height: 14cqw; border-radius: 1cqw; }
.pl-main .pl-card .item-card.layered .ly-badges .ly-leagues { max-width: 40cqw; }
.pl-main .pl-who { gap: 3px; }
.pl-main .pl-row .pl-name { color: var(--text); font-size: 1rem; font-weight: 700; }
.pl-main .pl-sec { color: var(--sec); font-size: 0.8125rem; font-weight: 500; line-height: 1.25; font-variant-numeric: tabular-nums; }  /* positions, role, foot, Item Score */
.pl-main .pl-row .pl-pos { overflow: hidden; color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-overflow: ellipsis; white-space: nowrap; }
.pl-main .pl-row .pl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-main .pl-stats b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.pl-main .pl-ovr { display: grid; place-items: center; }
/* OVR: the number inside a gauge ring, both in the rating band's colour, on a clear fill (players_pages._ovr) */
.pl-main .pl-ovr b { --band: var(--muted); position: relative; isolation: isolate; display: grid; place-items: center; width: 44px; height: 44px;
  color: var(--text); font-size: 1.0625rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }  /* white: the ring carries the band */
.pl-main .pl-ovr b::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%;  /* the ring: a gauge filled to the rating */
  background: conic-gradient(var(--band) var(--fill, 0%), rgba(255, 255, 255, 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px)); }
.pl-main .pl-stats b { color: var(--c, var(--text)); font-weight: 700; }
.pl-main .pl-stats small { color: var(--sec); font-size: 0.625rem; }
.pl-main .pl-row .pl-stats:not([data-gk]) small { display: none; }  /* outfield labels are the header's; keepers' differ */
.pl-main .pl-ovr b[data-band="gold"] { --band: #F2C14E; } .pl-main .pl-ovr b[data-band="gold-dark"] { --band: #D9A23A; }
.pl-main .pl-ovr b[data-band="gold-light"] { --band: #EAD08F; } .pl-main .pl-ovr b[data-band="silver"] { --band: var(--rarity-silver); }
.pl-main .pl-ovr b[data-band="bronze"] { --band: var(--rarity-bronze); }
.pl-main .pl-abil { display: grid; align-content: center; }
.pl-main :is(.pl-sm, .pl-wf) { display: inline-flex; align-items: center; gap: 5px; }
.pl-main :is(.pl-sm, .pl-wf) b { font-size: 0.9375rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pl-main :is(.pl-sm, .pl-wf) svg { width: 16px; height: 16px; fill: var(--gold); }
.pl-main .pl-cr { display: grid; justify-items: start; gap: 3px; }
.pl-main .cs-nr { display: inline-flex; align-items: center; height: 1.9em; padding: 0 0.75em 0 0.65em !important; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.pl-main .pl-role { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.pl-main .pl-role i { margin-left: 1px; color: var(--fresh); font-style: normal; font-weight: 800; }  /* + and ++ in green, as on the pitch */
/* PlayStyles: their own column, two rows of large icons filling the cell's height, the rest as +N */
.pl-main .pl-ps { display: flex; flex-wrap: wrap; align-content: center; align-items: center; gap: 6px; max-height: 80px; overflow: hidden; }
.pl-main .pl-ps img { width: 34px; height: 34px; flex: none; }
.pl-main .pl-price { display: grid; justify-items: start; justify-content: stretch; gap: 5px; white-space: nowrap; }
.pl-main .pl-isc { display: inline-flex; align-items: center; gap: 5px; padding-left: 2px; }
.pl-main .pl-isc img { opacity: 0.8; }
/* the header: every cell in one style; the sorted one is lit with an arrow (players-cols.js re-sorts in place) */
.pl-main .pl-head { color: var(--sec); }
.pl-main .pl-th { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; color: var(--sec); font: inherit; font-size: 0.75rem; font-weight: 600; text-decoration: none; }
.pl-main .pl-head .pl-stats { display: grid; grid-template-columns: repeat(6, 1fr); justify-items: center; }
.pl-main .pl-head .pl-ovr { text-align: left; }
.pl-main a.pl-th { cursor: pointer; }
.pl-main a.pl-th:hover, .pl-main .pl-th[aria-sort] { color: var(--text); }
.pl-main .pl-th[aria-sort]::after { content: ""; width: 0; height: 0; border: 4px solid transparent; }
.pl-main .pl-th[aria-sort="descending"]::after { border-top: 6px solid var(--gold); border-bottom: 0; }
.pl-main .pl-th[aria-sort="ascending"]::after { border-bottom: 6px solid var(--gold); border-top: 0; }
.pl-main .pl-th:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; border-radius: var(--r-sm); }
/* quick filters: OVR, price, league and position on the page itself */
.ft-tools { flex-wrap: wrap; }
.qf { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: end; gap: 12px 18px; padding-top: 6px; }
.qf .xf-l { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; color: var(--soft); font-size: 0.75rem; font-weight: 700; }
.qf .xf-l .coin { width: 14px; height: 14px; }
.qf-range { display: grid; grid-template-columns: auto auto auto auto; align-items: end; column-gap: 6px; }
.qf-range .xf-l { grid-column: 1 / -1; }
.qf-range input { width: 76px; height: 36px; padding: 0 8px; border: 1px solid var(--hair-strong); border-radius: var(--r-md); background: var(--core); color: var(--text); font: inherit; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.qf-range input:focus-visible { outline: 2px solid var(--chalk); outline-offset: 1px; }
.qf-range i { align-self: center; width: 8px; height: 1px; background: var(--muted); }
.qf-league { display: block; min-width: 190px; }
.qf-pos { display: block; flex: 1 1 320px; min-width: 0; }
.qf-pos .opt-seg { display: inline-grid; min-width: 40px; margin: 0 4px 4px 0; border: 1px solid var(--hair); color: var(--soft); font-weight: 700; }
.qf-pos .opt-seg:has(input:checked) { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--text); }
.pl-none { color: var(--muted); }
/* applied filters beside Sort (players_pages._chips): one tap removes one */
.ft-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.ft-chips:empty { display: none; }
.ft-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 12px; border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--text); font-size: 0.8125rem; font-weight: 700; text-decoration: none; }
.ft-chip i { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--muted); font-style: normal; font-size: 0.9375rem; line-height: 1; }
.ft-chip:hover i, .ft-chip:focus-visible i { background: rgba(255, 255, 255, 0.1); color: var(--text); }
@media (min-width: 861px) and (max-width: 1180px) {  /* tablet landscape: PlayStyles fold to one row */
  .pl-main .pl-row, .pl-main .pl-head { grid-template-columns: 72px minmax(120px, 164px) 50px 204px var(--skx,) minmax(0, 1fr) 112px 96px; gap: 10px; }
  .pl-main.has-sm, .pl-main.has-wf { --skx: 52px; } .pl-main.has-sm.has-wf { --skx: 52px 52px; }  /* the price must stay on screen */
  .pl-main .pl-card { width: 72px; } .pl-main .pl-ps { max-height: 30px; } .pl-main .pl-ps img { width: 26px; height: 26px; }
  .pl-main :is(.pl-row, .pl-head) .pl-stats { display: grid; }  /* the generic list rule hides them under 1100px */
}
@media (max-width: 860px) {  /* two lines: card, name and positions, OVR, Comet Rating and price on top; the stats and skills under them */
  .pl-main .pl-head { display: none; }
  .pl-main .pl-row { grid-template-columns: 56px minmax(0, 1fr) auto auto auto; grid-template-areas: "card who ovr cr price" "card stats stats skills skills"; gap: 4px 10px; padding: 6px 12px 6px 8px; align-items: center; contain-intrinsic-size: auto 92px; }
  .pl-main .pl-row .pl-card { grid-area: card; width: 56px; } .pl-main .pl-row .pl-who { grid-area: who; } .pl-main .pl-row .pl-ovr { grid-area: ovr; }
  .pl-main .pl-row .pl-cr { grid-area: cr; } .pl-main .pl-row .pl-price { grid-area: price; } .pl-main .pl-row .pl-stats { grid-area: stats; }
  .pl-main .pl-row .pl-stats { display: grid; }
  .pl-main .pl-row .pl-stats:not([data-gk]) small { display: block; }  /* no header on a phone: each stat carries its label */
  .pl-main .pl-row .pl-abil { display: none; }  /* PlayStyles drop on narrow screens; a skill filter's values take the spot */
  .pl-main .pl-row .pl-skx { display: flex; grid-area: skills; justify-self: end; gap: 10px; }
  .pl-main .pl-row .pl-ovr b { width: 36px; height: 36px; font-size: 0.9375rem; }
  .pl-main .pl-row .pl-role, .pl-main .pl-row .pl-ps { display: none; }
  .qf { gap: 8px 12px; } .qf-range { flex: 1 1 140px; } .qf-range input { width: 100%; min-width: 0; height: 40px; } .qf-range { grid-template-columns: 1fr auto 1fr; }
  .qf-league { flex: 1 1 100%; } .qf-league .ui-select, .qf-league select { width: 100%; }
  .qf-pos .opt-seg { min-width: 36px; min-height: 36px; margin-right: 2px; }
}
@media (max-width: 560px) { .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 10px; } .pl-main .pl-row .pl-price .pl-isc { display: none; }
  /* phone: the name gets the whole first line; OVR, Comet Rating and price under it; stats and skills last */
  .pl-main .pl-row { grid-template-columns: 60px auto auto minmax(0, 1fr); grid-template-areas: "card who who skills" "card ovr cr price" "card stats stats stats"; }
  .pl-main .pl-row .pl-card { width: 60px; } .pl-main .pl-row .pl-price { justify-self: end; }
  }

/* a Coming soon page with one picture: that picture is large and centred */
.soon-shots:has(.soon-shot:only-child) { grid-template-columns: minmax(0, 760px); justify-content: center; }

/* Evo Builder: chain steps, order help, greyed Evolutions, first-visit tour */
.evb-flow { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.evb-flow-step { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--hair); border-radius: var(--r-xl); background: rgba(255, 255, 255, .02); }
.evb-flow-step h3 { margin: 0; font-size: 0.8125rem; font-weight: 800; }
.evb-order { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 10px 14px; border: 1px solid rgba(242, 193, 78, .5); border-radius: var(--r-xl); background: rgba(242, 193, 78, .07); }
.evb-order b { color: var(--gold); }
.evb-order .btn { margin-left: auto; }
.evb-tile.is-off { opacity: .5; grid-template-columns: minmax(0, 1fr); cursor: not-allowed; }
.evb-tile.is-off:hover { transform: none; border-color: var(--hair); background: rgba(255, 255, 255, .02); }
.evb-tour { position: relative; width: fit-content; max-width: 100%; margin: 12px 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border: 1px solid rgba(242, 193, 78, .6); border-radius: var(--r-pill); background: rgba(10, 12, 17, .96); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-weight: 700; }
.evb-tour[hidden] { display: none; }
.evb-tour b { color: var(--gold); font-variant-numeric: tabular-nums; }
.evb-tour-x { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: pointer; }
.evb-tour-x:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.evb-tour-on { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: var(--r-xl); }
@media (max-width: 480px) { .evb-tour { width: 100%; justify-content: space-between; } }

/* Evo Builder round 2: one lane per chain, larger tier box, no underline on the card name */
.evo-player .page-h1 a { text-decoration: none; }
.evo-tier { padding: 2px 8px; font-size: 0.8125rem; vertical-align: 0; }
.evb-lanes { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.evb-lane-row { display: grid; gap: 8px; min-width: 0; padding: 12px; border: 1px solid var(--hair); border-radius: var(--r-xl); background: rgba(255, 255, 255, .02); color: var(--text); text-decoration: none; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.evb-lane-row:hover, .evb-lane-row:focus-visible { border-color: rgba(242, 193, 78, .65); background: rgba(242, 193, 78, .05); }
.evb-lane-title { font-size: 0.875rem; font-weight: 800; }
.evb-lane { display: flex; align-items: center; gap: 0; margin: 0; padding: 4px 2px 8px; list-style: none; overflow-x: auto; max-width: 100%; }
.evb-lane > li { flex: none; }
.evb-lane-card .item-card { width: 140px; }
.evb-lane-card.is-last .item-card { width: 170px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); }
.evb-lane-step { display: grid; justify-items: center; gap: 2px; min-width: 96px; }
.evb-lane-lab { display: grid; justify-items: center; gap: 1px; max-width: 150px; font-size: 0.75rem; text-align: center; }
.evb-lane-lab b { font-weight: 800; line-height: 1.2; }
.evo-path { display: block; color: var(--muted); font-size: 0.6875rem; font-style: italic; font-weight: 600; }
.evb-lane .evo-arrow { width: 60px; margin: 0; }
.evb-lane-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.evb-lane-info .evo-deltas { margin: 0; }
.evb-lane { overflow-y: hidden; }
.evb-lanes, .evb-lanes > li { min-width: 0; }
.evb-main > *, .evb > * { min-width: 0; }
.evb-lane { position: relative; }   /* absolutely placed card badges and sr-only text clip with the lane instead of widening the page */

/* ---- Sign-in code boxes and the Invite Only page (cometut/auth_pages.py, static/auth.js) ---- */
.au-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.au-digit { width: 100%; min-width: 0; min-height: 56px; padding: 0; border: 1px solid var(--hair-strong); border-radius: var(--r-xl); background: var(--raise); color: var(--text);
  font: inherit; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; caret-color: var(--gold); }
.au-digit:focus { outline: none; border-color: rgba(242, 193, 78, .6); box-shadow: 0 0 0 3px rgba(242, 193, 78, .14); }
.au-otp.is-bad .au-digit { border-color: rgba(238, 75, 80, .7); }
.au-sent { margin: 0; color: var(--muted); font-size: 0.8125rem; }
.au-sent b { color: var(--text); overflow-wrap: anywhere; }
.au-resend { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 0; background: none; color: var(--gold); font: inherit; font-size: 0.8125rem; font-weight: 700; cursor: pointer; }
.au-resend:disabled { color: var(--muted); cursor: default; }
.au-err.is-ok { border-color: var(--hair-strong); background: none; color: var(--muted); }
.au-note b { color: var(--text); overflow-wrap: anywhere; }
.au-input textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--hair-strong); border-radius: var(--r-xl); background: var(--raise); color: var(--text); font: inherit; font-size: 0.9375rem; font-weight: 600; resize: vertical; }
.au-input textarea:focus { outline: none; border-color: rgba(242, 193, 78, .6); box-shadow: 0 0 0 3px rgba(242, 193, 78, .14); }
.au-ask { border-top: 1px solid var(--hair); padding-top: 4px; }
.au-ask summary { display: flex; align-items: center; min-height: 44px; color: var(--gold); font-size: 0.875rem; font-weight: 700; cursor: pointer; }
.au-ask .au-form { padding: 6px 0 4px; }
.au-out { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--hair-strong); border-radius: var(--r-pill); color: var(--text); text-decoration: none; font-weight: 700; }
@media (max-width: 400px) { .au-card { padding: 22px 18px; } .au-otp { gap: 6px; } .au-digit { min-height: 52px; font-size: 1.375rem; } }
.au-google[hidden], .au-or[hidden] { display: none; }

/* Account page: the extension row (static/account-extension.js). */
.ext-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ext-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.ext-state::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.ext-row[data-mode="linked"] .ext-state::before { background: var(--fresh); }
.ext-row[data-mode="missing"] .ext-state::before { background: var(--warn); }

/* Motion tokens (emilkowalski/skills, MIT): ease-out for entrances, nothing eases in; transform and opacity only */
:root { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); }

/* Sign-in dialog: the sign-in page framed over the page the visitor is on (static/auth.js) */
.au-dialog { width: min(100% - 32px, 440px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--hair-strong); border-radius: var(--r-3xl); background: #0A0C11; color: var(--text); overflow: auto; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); }
.au-dialog::backdrop { background: rgba(3, 4, 7, .72); }
.au-dialog iframe { display: block; width: 100%; height: 480px; border: 0; }
.au-x { position: absolute; top: 10px; right: 10px; z-index: 1; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 1.375rem; line-height: 1; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .au-x:hover { color: var(--text); } }
.au-x:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.au-dialog[open], .welcome[open] { animation: none; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
@starting-style { .au-dialog[open], .welcome[open] { opacity: 0; transform: scale(.95); } }
@media (prefers-reduced-motion: reduce) { @starting-style { .au-dialog[open], .welcome[open] { transform: none; } } }
.au-body.is-embed { background: transparent; }
.au-body.is-embed .au { min-height: 0; padding: 0; }
.au-body.is-embed .au-card { width: 100%; border: 0; background: transparent; box-shadow: none; }
.au-gains { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.au-gains li { display: grid; gap: 1px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-xl); }
.au-gains b { color: var(--gold); font-size: 0.9375rem; }
.au-gains span { color: var(--muted); font-size: 0.8125rem; }
.au-tick, .welcome-tick { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 0.8125rem; line-height: 1.4; cursor: pointer; }
.au-tick input, .welcome-tick input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--gold); }
.au-tick a, .welcome-tick a { color: var(--text); }
.au-google:disabled, .au-form .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* Welcome sheet: once, after the first sign-in (cometut/welcome.py) */
.welcome { width: min(100% - 32px, 440px); padding: 24px; border: 1px solid var(--hair-strong); border-radius: var(--r-3xl); background: #0A0C11; color: var(--text); }
.welcome::backdrop { background: rgba(3, 4, 7, .78); }
.welcome-form { display: grid; gap: 18px; }
.welcome-form h2 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.welcome-form fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.welcome-form legend { padding: 0 0 8px; color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.welcome-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.welcome-seg .opt-seg { min-height: 40px; }
.welcome-form .btn { justify-self: stretch; }

/* Getting Started: first-run strip on Home and My Club (cometut/getting_started.py) */
.gs { display: grid; gap: 10px; margin: 0 0 20px; }
.gs h2 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 1rem; font-weight: 800; }
.gs h2 span { color: var(--muted); font-size: 0.8125rem; font-weight: 700; }
.gs ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.gs-step > a, .gs-step.is-done:first-child { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: center; min-height: 56px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: var(--r-xl); color: var(--text); text-decoration: none; transition: border-color 160ms var(--ease-out), transform 120ms var(--ease-out); }
.gs-step b { font-size: 0.8125rem; }
.gs-step small { grid-column: 2; color: var(--muted); font-size: 0.75rem; }
.gs-mark { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--hair-strong); color: var(--muted); font-size: 0.75rem; font-weight: 800; }
.gs-mark svg { width: 14px; height: 14px; }
.gs-step.is-done .gs-mark { border-color: transparent; background: rgba(63, 207, 142, .15); color: var(--fresh); }
.gs-step.is-done b { color: var(--muted); }
.gs-step.is-next > a { border-color: rgba(242, 193, 78, .55); background: rgba(242, 193, 78, .06); }
.gs-step.is-next .gs-mark { border-color: transparent; background: var(--gold-grad); color: #1A1204; }
@media (hover: hover) and (pointer: fine) { .gs-step > a:hover { border-color: rgba(242, 193, 78, .45); } }
.gs-step > a:active { transform: scale(.97); }
.gs-step > a:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
@media (max-width: 720px) { .gs ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .gs ol { grid-template-columns: minmax(0, 1fr); } }
/* A club source a visitor cannot use yet looks like any choice; pressing it opens Create Account (static/auth.js) */
.src-opt.needs-account { opacity: 1; filter: none; }

/* Admin: full width panels (the account column cap does not apply), week tiles and the account funnel */
.admin .admin-panel, .admin .bezel:has(> .admin-panel) { max-width: none; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; align-items: start; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.kpi { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--hair); border-radius: var(--r-2xl); background: var(--shell); }
.kpi span { color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.kpi b { font-size: 1.625rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 0.75rem; }
.kpi small.up { color: var(--fresh); }
.kpi small.down { color: var(--warn); }
.funnel-bars { display: grid; gap: 8px; margin: 10px 0 4px; padding: 0; list-style: none; }
.funnel-bars li { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) 56px 44px; gap: 10px; align-items: center; font-size: 0.8125rem; }
.funnel-bars i { display: block; width: var(--w); height: 12px; border-radius: 999px; background: var(--gold-grad); }
.funnel-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.funnel-bars small { color: var(--muted); text-align: right; }
@media (max-width: 480px) { .funnel-bars li { grid-template-columns: 96px minmax(0, 1fr) 44px; } .funnel-bars small { display: none; } }
/* The locked club price (signed out): the club icon and a lock, a link to Create Account (sbc_ui.locked_club_pill) */
.pill-locked { color: var(--muted); text-decoration: none; cursor: pointer; transition: border-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.pill-locked .pill-lock { width: 13px; height: 13px; }
@media (hover: hover) and (pointer: fine) { .pill-locked:hover { color: var(--text); border-color: rgba(242, 193, 78, .45); } }
.pill-locked:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }

/* One-time question card (cometut/surveys.py): bottom corner, never over the content's main action on a phone */
.ask { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: min(360px, calc(100vw - 32px)); padding: 16px; border: 1px solid var(--hair-strong); border-radius: var(--r-2xl); background: #0D1016; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9); transform-origin: bottom right; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
@starting-style { .ask { opacity: 0; transform: scale(.95); } }
@media (prefers-reduced-motion: reduce) { @starting-style { .ask { transform: none; } } }
.ask form { display: grid; gap: 12px; }
.ask h2 { margin: 0; padding-right: 28px; font-size: 0.9375rem; font-weight: 800; line-height: 1.35; }
.ask-opts { display: grid; gap: 6px; }
.ask-opts .opt-seg { min-height: 40px; border: 1px solid var(--hair); background: none; font: inherit; font-size: 0.8125rem; font-weight: 700; color: var(--text); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ask-opts .opt-seg:hover { border-color: rgba(242, 193, 78, .5); } }
.ask-opts .opt-seg:active { transform: scale(.97); }
.ask-note { display: grid; gap: 6px; font-size: 0.75rem; font-weight: 600; }
.ask-note input { min-height: 38px; padding: 6px 10px; border-radius: var(--r-md); border: 1px solid var(--hair-strong); background: var(--core); color: var(--text); font: inherit; }
.ask-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1.25rem; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .ask-x:hover { color: var(--text); } }
.admin-notes { margin: 6px 0 12px; padding-left: 18px; color: var(--muted); font-size: 0.8125rem; }
/* Price survey (testers) */
.sv-core { display: grid; gap: 18px; }
.sv-q { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.sv-q legend { padding: 0 0 8px; font-weight: 700; font-size: 0.875rem; }
.sv-seg { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; max-width: 100%; }
.sv-seg .opt-seg { min-height: 40px; padding: 0 12px; }
.sv-why { display: grid; gap: 6px; font-size: 0.8125rem; }
.sv-why input { min-height: 40px; padding: 6px 10px; border-radius: var(--r-md); border: 1px solid var(--hair-strong); background: var(--core); color: var(--text); font: inherit; }
.sv-h { margin: 8px 0 0; font-size: 1rem; }
.sv .btn { justify-self: start; }
/* Home: the one next-best-action card for a returning player (home_pages.next_action) */
.hm-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 20px; padding: 14px 16px; border: 1px solid rgba(242, 193, 78, .4); border-radius: var(--r-2xl); background: rgba(242, 193, 78, .05); }
.hm-next div { display: grid; gap: 2px; }
.hm-next b { font-size: 0.9375rem; }
.hm-next span { color: var(--muted); font-size: 0.8125rem; }
/* My Club: Saved With Your Club (cometut/club_record.py) */
.cr-shelf { display: grid; gap: 10px; }
.cr-total { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.cr-total b { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cr-total span { color: var(--muted); font-size: 0.8125rem; }
.cr-shelf ul { display: grid; margin: 0; padding: 0; list-style: none; }
.cr-shelf li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--hair); }
.cr-shelf li:last-child { border-bottom: 0; }
.cr-shelf li a { min-width: 0; overflow: hidden; color: var(--text); font-size: 0.8125rem; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.cr-shelf li > span { display: flex; align-items: center; gap: 8px; flex: none; }
.cr-shelf small.up { color: var(--fresh); font-size: 0.75rem; font-weight: 700; }

/* Import guide, step 4: the person has to press Open the Web App, so it is nudged (a hand-drawn arrow and a label, a ring
   that pulses three times and stops); once they have, a small copy of the bar shows what to press next. */
.ci-nudge { align-items: center; }
.ci-hint { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); }
.ci-hint svg { flex: none; }
.ci-hint em { font-style: normal; font-weight: 700; font-size: .9375rem; rotate: -4deg; white-space: nowrap; opacity: 0; animation: ci-fade .4s ease-out 1s forwards; }
.ci-draw { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; animation: ci-stroke .9s ease-out .3s forwards; }
.ci-head { animation-duration: .3s; animation-delay: 1.15s; }
.ci-step.ci-clicked .ci-hint { display: none; }
.ci-step[data-state="now"]:not(.ci-clicked) [data-webapp] { animation: ci-ring 1.8s ease-out .6s 3; }
.ci-await[hidden] { display: none; }
.ci-await { display: grid; gap: 10px; margin: 14px 0 0; }
.ci-await p { margin: 0; color: var(--muted); }
.ci-await b { color: var(--text); }
.ci-step[data-state="done"] .ci-await { display: none; }
.ci-mini { display: inline-flex; align-items: center; gap: 8px; width: max-content; max-width: 100%; padding: 5px 5px 5px 10px; border: 1px solid var(--hair-strong); border-radius: 9px; background: #0B0D12; font-size: .8125rem; }
.ci-mini i { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); opacity: .85; }
.ci-mini em { font-style: normal; font-weight: 700; }
.ci-mini b { padding: 5px 10px; border-radius: 6px; background: var(--gold); color: #1A1204; animation: ci-ring 1.8s ease-out .4s 3; }
@keyframes ci-stroke { 0% { opacity: 0; stroke-dashoffset: 1; } 1% { opacity: 1; stroke-dashoffset: 1; } 100% { opacity: 1; stroke-dashoffset: 0; } }
@keyframes ci-fade { to { opacity: 1; } }
@keyframes ci-ring { from { box-shadow: 0 0 0 0 rgba(242, 193, 78, .55); } to { box-shadow: 0 0 0 14px rgba(242, 193, 78, 0); } }
@media (prefers-reduced-motion: reduce) { .ci-draw { animation: none; stroke-dashoffset: 0; opacity: 1; } .ci-hint em { animation: none; opacity: 1; } .ci-step[data-state="now"]:not(.ci-clicked) [data-webapp], .ci-mini b { animation: none; } }

/* Motion pass (owner 2026-11-19, launch build list #18; rules from emilkowalski/skills, MIT). Only the pages still being
   finished: Account, sign-in and Create Account, the welcome sheet, Pricing, credits, the one-time question, Getting Started,
   Evolutions, Gallery Planner, Pro Clubs. Press 100-160 ms at scale(.97); popovers 160 ms from their trigger; dialogs 220 ms,
   centred; transform and opacity only. Tables, credit ledgers, price lists and lists of cards stay still. */
:root { --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); }
.account :is(.btn, .btn-sm), .pr-card .btn, .au-form .btn, .welcome .btn, .ask .btn, .nav-cr {
  transition: transform 140ms var(--ease-out), border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
:is(.account :is(.btn, .btn-sm), .pr-card .btn, .au-form .btn, .welcome .btn, .ask .btn, .au-google):not(:disabled):active,
.nav-cr:active, .evo-rec:active, .evo-pick > a:active, .pcl-card:active { transform: scale(.97); }
/* popovers on these pages: grow from the button (they hang below it, right edges aligned) */
.ac-refund[open] > .menu-pop, .gl-limits[open] > .menu-pop, .tool-pop[open] > .gl-choices {
  transform-origin: top right; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); }
@starting-style { .ac-refund[open] > .menu-pop, .gl-limits[open] > .menu-pop, .tool-pop[open] > .gl-choices { opacity: 0; transform: scale(.95); } }
@media (max-width: 720px) { .gl-limits[open] > .menu-pop { transform-origin: top left; } }
.au-dialog[open]::backdrop, .welcome[open]::backdrop { transition: opacity 200ms var(--ease-out); }
@starting-style { .au-dialog[open]::backdrop, .welcome[open]::backdrop { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  :is(.account :is(.btn, .btn-sm), .pr-card .btn, .au-form .btn, .welcome .btn, .ask .btn, .au-google, .nav-cr, .evo-rec, .evo-pick > a, .pcl-card, .gs-step > a,
    .ask-opts .opt-seg, .pcl-mt, .gl-set, .gl-undo-btn, .gl-fo, .gl-x, .gl-ban, button.gl-rung-b):active { transform: none; }
  .pcl-card:focus-visible { transform: none; }
  @starting-style { .ac-refund[open] > .menu-pop, .gl-limits[open] > .menu-pop, .tool-pop[open] > .gl-choices { transform: none; } }
}
.welcome-out { justify-self: center; color: var(--muted); font-size: 0.8125rem; }
.welcome-out:hover { color: var(--text); }

/* Players: results bar, sticky list header, PlayStyle tips */
.pl-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; min-height: 32px; font-size: 0.8125rem; color: var(--sec); }
.pl-bar b { color: var(--text); font-weight: 600; }
.pl-list.pl-main { overflow: clip; }  /* hidden made the list the header's scroll box, so top: 84px pushed it down over the first row */
.pl-main .pl-head { position: sticky; top: calc(84px + env(safe-area-inset-top)); z-index: 5; background: var(--shell); border-bottom: 1px solid var(--hair); }
.pl-main .pl-ps > span { display: inline-flex; }
.ft-tools .pl-view { margin-left: auto; }
/* Holo shine paused while the card is off screen (static/shell.js): same look, no repaint for cards nobody can see */
.item-card.holo[data-off]::after, .pv.is-holo[data-off]::after { animation-play-state: paused; }

/* /checkout, after paying: our own finish (billing.js done()) */
.co[hidden], .co-done[hidden] { display: none; }
.co-done { position: relative; display: grid; justify-items: center; gap: 14px; max-width: 520px; margin: 24px auto; padding: 40px 24px; text-align: center;
  border: 1px solid rgba(242, 193, 78, 0.45); border-radius: var(--r-3xl);
  background: linear-gradient(180deg, rgba(242, 193, 78, 0.12), rgba(242, 193, 78, 0) 60%), var(--shell); }
.co-confetti { position: absolute; inset: -60px 0 0; width: 100%; height: calc(100% + 60px); pointer-events: none; }
.co-seal { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--gold-grad); color: #1A1204; }
.co-seal .pr-ic { width: 30px; height: 30px; }
.co-done h2 { margin: 0; color: var(--gold); font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.co-sub { margin: 0; color: var(--muted); }
.co-gains { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; margin: 8px 0; }
.co-gains div { display: grid; gap: 4px; padding: 14px 8px; border: 1px solid var(--hair); border-radius: var(--r-2xl, 16px); background: var(--core); }
.co-gains dt { color: var(--muted); font-size: 0.75rem; }
.co-gains dd { display: flex; justify-content: center; align-items: center; gap: 4px; margin: 0; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.co-gains dd.is-pro { color: var(--gold); }
.co-acts { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 520px) { .co-gains { grid-template-columns: minmax(0, 1fr); } }

/* Motion on /pricing and /checkout (find-animation-opportunities, 2026-11-19): each one bridges a change the player caused.
   Reduced motion keeps the fades and drops the movement. */
.pr-amount, .co-price { transition: opacity 200ms var(--ease-out), transform 220ms var(--ease-out); }
@starting-style { .pr-amount, .co-price { opacity: 0; } }
.co-pay { position: relative; }
.co-pay > .loader { position: absolute; inset: 0; transition: opacity 200ms var(--ease-out); }
.co-pay .checkout-frame { opacity: 0; transition: opacity 280ms var(--ease-out); }
.co-pay.is-ready .checkout-frame { opacity: 1; }
.co-pay.is-ready > .loader { opacity: 0; pointer-events: none; }
.co-done { transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
@starting-style { .co-done { opacity: 0; } }
.co-done .co-gains div { animation: co-rise 360ms var(--ease-out) both; }
.co-done .co-gains div:nth-child(2) { animation-delay: 70ms; }
.co-done .co-gains div:nth-child(3) { animation-delay: 160ms; }
@keyframes co-rise { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  @starting-style { .pr-amount, .co-price { transform: translateY(4px); } .co-done { transform: scale(0.96); } }
  @keyframes co-rise { from { opacity: 0; transform: translateY(8px); } }
  .co-seal { animation: co-seal 520ms var(--spring) both 80ms; }
  @keyframes co-seal { from { opacity: 0; transform: scale(0.7); } }
}
.pr-amount small + small { display: block; }
/* an opened question: the answer fades up (a height animation on ::details-content stalled in Chrome 156, so the box snaps) */
.pr-q[open] > p { animation: co-rise 200ms var(--ease-out) both; }

/* Account > Plan (account_pages.plan_box, static/plan.js): one card, its actions, the invoices; dialogs like Saved squads */
.acp { display: grid; gap: 14px; }
.acp-card { display: grid; gap: 6px; padding: 18px; border: 1px solid rgba(242, 193, 78, 0.45); border-radius: var(--r-3xl);
  background: linear-gradient(180deg, rgba(242, 193, 78, 0.07), rgba(242, 193, 78, 0) 60%), var(--shell); }
.acp-head { display: flex; align-items: center; gap: 10px; }
.acp-head b { font-size: 1.125rem; font-weight: 800; }
.acp-price { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.acp-price b { color: var(--text); font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.acp-when { margin: 0; color: var(--muted); font-size: 0.875rem; }
.acp-when.is-ending { color: var(--gold); font-weight: 700; }
.acp-when.is-warn { color: var(--warn); font-weight: 700; }
.acp-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.acp-quiet { margin-left: auto; color: var(--muted); }
.acp-inv h3 { margin: 0 0 6px; font-size: 0.9375rem; font-weight: 800; }
.acp-inv ul { display: grid; margin: 0; padding: 0; list-style: none; }
.acp-inv li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 8px 0;
  border-bottom: 1px solid var(--hair); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.acp-inv li:last-child { border-bottom: 0; }
.acp-inv li.muted { display: block; }
.acp-help { justify-self: start; color: var(--muted); font-size: 0.8125rem; }
.acp-dlg { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 18px; color: var(--text);
  background: var(--core); border: 1px solid var(--hair); border-radius: var(--r-panel); }
.acp-dlg-card { width: min(520px, calc(100vw - 32px)); }
.acp-dlg::backdrop { background: rgba(6, 7, 10, .72); }
.acp-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.acp-dlg-head h2 { margin: 0; font-size: 1.0625rem; font-weight: 800; }
.acp-dlg-lead { margin: 0 0 10px; color: var(--muted); }
.acp-dlg-lead b { color: var(--text); }
.acp-lose { display: grid; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 0.875rem; }
.acp-lose li::before { content: "-"; margin-right: 8px; color: var(--muted); }
.acp-sum { display: grid; gap: 8px; margin: 0 0 16px; font-variant-numeric: tabular-nums; }
.acp-sum div { display: flex; justify-content: space-between; gap: 12px; }
.acp-sum dt { color: var(--muted); }
.acp-sum dd { margin: 0; font-weight: 700; text-align: right; }
.acp-sum .loader { min-height: 0; padding: 0; flex-direction: row; gap: 8px; font-weight: 400; color: var(--muted); }
.acp-sum .spinner { width: 16px; height: 16px; }
.acp-dlg-acts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.acp-danger { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.acp-frame { position: relative; min-height: 300px; }
.acp-frame > .loader { position: absolute; inset: 0; transition: opacity 200ms var(--ease-out); }
.acp-frame .acp-card-frame { opacity: 0; transition: opacity 280ms var(--ease-out); }
.acp-frame.is-ready .acp-card-frame { opacity: 1; }
.acp-frame.is-ready > .loader { opacity: 0; pointer-events: none; }
dialog.acp-dlg { opacity: 0; transform: translateY(12px) scale(.98);
  transition: opacity 220ms var(--ease), transform 280ms var(--ease), overlay 280ms allow-discrete, display 280ms allow-discrete; }
dialog.acp-dlg[open] { opacity: 1; transform: none; }
@starting-style { dialog.acp-dlg[open] { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { dialog.acp-dlg, dialog.acp-dlg[open] { transform: none; } }
@media (max-width: 520px) { .acp-quiet { margin-left: 0; } .acp-inv li { gap: 10px; } }

/* ---- /account (account_pages._account_page): a side list of sections, then three rows of quiet panels.
   Flat surfaces, one accent (gold) for the plan's price and the primary action, no boxed facts, no red warning box. ---- */
.acx { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 24px; align-items: start; }
.acx-nav { position: sticky; top: 96px; display: grid; gap: 2px; }
.acx-nav a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--r-lg); color: var(--muted);
  font-size: 0.875rem; font-weight: 600; text-decoration: none; transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.acx-nav a:hover { color: var(--text); }
.acx-nav a[aria-current] { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.acx-nav a:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
@media (max-width: 1000px) {
  .acx { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .acx-nav { position: static; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 0 2px; }
  .acx-nav a { flex: none; min-height: 36px; border: 1px solid var(--hair); border-radius: var(--r-pill); padding: 0 14px; }
}
.acd { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 860px) { .acd { grid-template-columns: minmax(0, 1fr); } }
.acd-card, .acd-plan .acp-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px; border: 1px solid var(--hair);
  border-radius: var(--r-3xl); background: var(--shell); scroll-margin-top: 96px; }
.acd-card h2 { margin: 0; font-size: 1.0625rem; font-weight: 800; }
.acd-card h3 { margin: 6px 0 0; font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.acd-wide { grid-column: 1 / -1; }
.acd-plan { display: flex; flex-direction: column; gap: 12px; min-width: 0; scroll-margin-top: 96px; }
.acd-plan .acp { flex: 1; display: flex; flex-direction: column; }
.acd-plan .acp-card { flex: 1; gap: 6px; background: var(--shell); }
.acd-plan .acp-price b { font-size: 2rem; color: var(--gold); }
.acd-plan .acp-acts { margin-top: auto; padding-top: 14px; }
.acd .acp-inv li > span { display: grid; gap: 2px; }
.acd .acp-inv small { color: var(--muted); font-size: 0.75rem; }
.acd-credits .ac-cr-big b { font-size: 2.5rem; line-height: 1; }
.acd-credits .ac-cr-big .cr-mark { width: 30px; height: 30px; color: var(--gold); }
.acd-credits .ac-facts { margin: 4px 0 0; gap: 16px; }
.acd-credits .ac-facts li { padding: 0; border: 0; border-radius: 0; }
.acd-credits .ac-month { margin: auto 0 0; }
@media (max-width: 480px) { .acd-credits .ac-facts { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.ac-plat a { gap: 8px; display: flex; align-items: center; min-height: 36px; padding: 0 14px; font-weight: 700; }
.ac-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.ac-rows li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; min-height: 52px; padding: 6px 0;
  border-bottom: 1px solid var(--hair); }
.ac-rows li:last-child { border-bottom: 0; }
.ac-rows li > b { font-weight: 700; }
.ac-rows li.is-quiet > b { color: var(--muted); font-weight: 600; }
.ac-rows .ext-row { flex: 0 1 auto; margin-left: auto; justify-content: flex-end; flex-wrap: nowrap; }
.ac-del { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: #F0686C; font-size: 0.875rem; font-weight: 700; text-decoration: none; }
.ac-del:hover { text-decoration: underline; text-underline-offset: 3px; }
.acd .ac-emails { gap: 0; }
.ac-tg-connect, .ac-tg-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 44px; }
.ac-tg-acts { margin-top: 8px; }
button.ac-del { background: none; border: 0; cursor: pointer; font-family: inherit; }
/* The Solve button shows its price only where it is charged: a Market solve is free (sbc_pages solve panel). */
.solve-form:has(input[name="mode"][value="market"]:checked) .cr-cost { display: none; }

#ext-act[hidden] { display: none; }

/* Plan dialogs: Cancel in two steps, Switch with both prices side by side, Update Card around Paddle's frame. */
.acp-cancel .acp-step { display: none; }
.acp-cancel[data-step="1"] [data-step-of="1"], .acp-cancel[data-step="2"] [data-step-of="2"] { display: block; }
.acx .acp-lose { gap: 0; margin: 0 0 14px; }
.acx .acp-lose li { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--hair); }
.acx .acp-lose li:last-child { border-bottom: 0; }
.acx .acp-lose li::before { content: none; }
.acx .acp-lose li > span { display: grid; gap: 1px; }
.acx .acp-lose small { color: var(--muted); font-size: 0.75rem; }
.acp-ic, .acx .acp-lose .cr-mark { flex: none; width: 20px; height: 20px; margin: 0; color: var(--gold); }
.acp-offer { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 16px; padding: 12px 14px; border: 1px solid rgba(242, 193, 78, 0.35);
  border-radius: var(--r-xl); background: rgba(242, 193, 78, 0.06); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.acp-offer > span { display: grid; gap: 1px; flex: 1; }
.acp-offer small { color: var(--muted); font-size: 0.75rem; }
.acp-offer:hover { border-color: rgba(242, 193, 78, 0.6); }
.acp-offer:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.acp-why { margin: 0 0 16px; padding: 0; border: 0; }
.acp-why legend { margin-bottom: 10px; font-weight: 700; }
.acp-why .seg-radio { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; border: 0; background: none; }
.acp-why .opt-seg { min-height: 36px; padding: 0 14px; border: 1px solid var(--hair-strong); }
.acp-why .opt-seg:has(input:checked) { border-color: rgba(242, 193, 78, 0.55); background: rgba(242, 193, 78, 0.10); color: var(--text); }
.acp-danger:disabled { opacity: .4; cursor: not-allowed; }
.acp-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; margin: 0 0 12px; }
.acp-vs > .icon-sm { color: var(--muted); }
.acp-opt { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: var(--r-xl); font-variant-numeric: tabular-nums; }
.acp-opt small { color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.acp-opt b { font-size: 1.25rem; font-weight: 800; }
.acp-opt span { color: var(--muted); font-size: 0.8125rem; }
.acp-opt.is-to { border-color: rgba(242, 193, 78, 0.45); }
.acp-opt.is-to b { color: var(--gold); }
.acp-lock { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; color: var(--muted); font-size: 0.8125rem; }
.ac-rows .ext-row .btn-sm { white-space: nowrap; }
@media (max-width: 480px) { .ac-rows .ext-row { flex-wrap: wrap; justify-content: flex-start; } }
/* Account email ticks: a drawn box in the theme (gold when on, a dark tick), not the browser's checkbox. */
.acd .ac-optin { align-items: flex-start; gap: 12px; padding: 4px 0; }
.acd .ac-optin > span { display: grid; gap: 2px; padding-top: 1px; }
.acd .ac-optin > span .muted { font-size: 0.8125rem; }
.acd .ac-optin input { appearance: none; display: grid; place-content: center; width: 22px; height: 22px; margin: 0; flex: none; cursor: pointer;
  border: 1.5px solid var(--hair-strong); border-radius: 7px; background: rgba(255, 255, 255, 0.04);
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease); }
.acd .ac-optin input::after { content: ""; width: 12px; height: 12px; background: #1A1204; scale: 0; transition: scale 180ms var(--spring);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 4.8 9 10 3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.acd .ac-optin:hover input { border-color: rgba(242, 193, 78, 0.6); }
.acd .ac-optin input:checked { background: var(--gold); border-color: var(--gold); }
.acd .ac-optin input:checked::after { scale: 1; }
.acd .ac-optin input:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
.acd .ac-optin input:disabled { opacity: .6; }
@media (prefers-reduced-motion: reduce) { .acd .ac-optin input, .acd .ac-optin input::after { transition: none; } }

/* Evolutions list: Evo Lab is its own section (All leaves it out), so its chip stands apart */
.chip.chip-lab { margin-left: 12px; position: relative; }
.chip.chip-lab::before { content: ""; position: absolute; left: -9px; top: 20%; bottom: 20%; width: 1px; background: var(--hair-strong); }
/* Evolutions on a phone: the tools on one row, My Evolutions and Evo Builder side by side under them; smaller cards so a
   screen holds more than one Evolution (owner kept the card grid, 2026-11-23) */
@media (max-width: 640px) {
  .evo-head-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .evo-head-actions > .evo-tools { grid-column: 1 / -1; }
  .evo-head-actions > .evo-btn { width: 100%; padding: 0 10px; }
  .evo-grid .evo-card { padding: 12px; gap: 8px; }
  .evo-grid .evo-ba > .item-card { width: 100px; }
  .evo-grid .evo-arrow { width: 40px; margin: 0 2px; }
  .evo-grid .evo-arrow > svg { width: 36px; }
}

/* Evo Builder preview: Apply and Cancel at the top of the choices, beside where Use chain was pressed */
.evb-preview-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(242, 193, 78, .5); border-radius: var(--r-xl); background: var(--core); }
.evb-preview-bar .evo-chainbar-meta { margin-right: auto; font-weight: 700; color: var(--gold); }

/* Evolution list card v3: smaller and calmer (owner, 2026-11-23). Name with its type tag on the right (the tag drops under a
   long name), one grade + positions block, price and time as icon chips. */
.evo-card { gap: 8px; padding: 14px; }
.evo-card > .card-top { align-items: flex-start; }
.evo-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.evo-card .evo-title > h2 { flex: 1 1 auto; min-width: 0; min-height: 0; font-size: 0.9375rem; -webkit-line-clamp: 2; }
.evo-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin-left: auto; }
.evo-card .evo-pill { height: 20px; padding: 0 7px; white-space: nowrap; }
.evo-mid { display: grid; gap: 6px; }
.evo-grade { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.evo-card .evo-rate { width: 24px; height: 22px; margin: 0; border-radius: var(--r-xs); font-size: 0.8125rem; }
.evo-card .evo-pos { padding: 2px 7px; font-size: 0.6875rem; }
.evo-sub { margin: 0; color: var(--muted); font-size: 0.75rem; font-weight: 600; }
.evo-card .evo-deltas > li { height: 22px; padding: 0 7px; font-size: 0.6875rem; }
.evo-card .evo-deltas > li.evo-ps > .ps-art { width: 18px; height: 18px; }
.evo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.evo-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); background: var(--raise); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.evo-chip > .glyph { width: 14px; height: 14px; }
.evo-chip.is-time { color: var(--text); background: color-mix(in srgb, var(--chalk) 14%, transparent); }
.evo-chip.is-time > .glyph { color: var(--chalk); }
.evo-chip.is-train { background: color-mix(in srgb, var(--fresh) 16%, transparent); }
.evo-chip.is-train > .glyph { color: var(--fresh); }
.evo-chip.is-red { background: color-mix(in srgb, var(--s-poor) 20%, transparent); color: var(--s-poor); }
.evo-chip.is-red > .glyph { color: inherit; }
.evo-grid .evo-ba > .item-card { width: clamp(84px, 8vw, 104px); }
.evo-grid .evo-card.cosmetic .evo-ba > .item-card { width: clamp(90px, 8.6vw, 112px); }
.evo-grid .evo-arrow { width: 40px; margin: 0 2px; }
.evo-grid .evo-arrow > svg { width: 36px; }
@media (max-width: 1100px) { .evo-grid .evo-ba > .item-card { width: 104px; } .evo-grid .evo-card.cosmetic .evo-ba > .item-card { width: 112px; } }
@media (max-width: 640px) { .evo-grid .evo-ba > .item-card, .evo-grid .evo-card.cosmetic .evo-ba > .item-card { width: 92px; } }

/* Footer pages: form pages hug their one column; small entrances for the rare moments (feedback box, sent panel, FAQ answer). */
.main:has(.legal) > .bezel:has(.contact-form) { max-width: calc(34rem + 70px); margin-left: max(0px, (100% - 52rem) / 2); }  /* starts where the 52rem title starts */
@media (prefers-reduced-motion: no-preference) {
  .foot-fb[open] > .menu-pop { transform-origin: bottom left; transition: opacity 150ms cubic-bezier(0.23, 1, 0.32, 1), transform 150ms cubic-bezier(0.23, 1, 0.32, 1); }
  .ff-done:not([hidden]) { transition: opacity 250ms cubic-bezier(0.23, 1, 0.32, 1), transform 250ms cubic-bezier(0.23, 1, 0.32, 1); }
  @starting-style {
    .foot-fb[open] > .menu-pop { opacity: 0; transform: scale(0.97) translateY(4px); }
    .ff-done:not([hidden]) { opacity: 0; transform: translateY(8px); }
  }
  @supports (interpolate-size: allow-keywords) {
    .faq-q { interpolate-size: allow-keywords; }
    .faq-q::details-content { height: 0; overflow: clip; transition: height 200ms cubic-bezier(0.23, 1, 0.32, 1), content-visibility 200ms allow-discrete; }
    .faq-q[open]::details-content { height: auto; }
  }
}

/* Sign-in steps (static/auth.js sets #clerk-mount[data-at]): each step shows only what it needs. */
#clerk-mount[data-at="code"] .au-gains, #clerk-mount[data-at="code"] .au-tick,
#clerk-mount[data-at="code"] .au-alt, #clerk-mount[data-at="password"] .au-gains, #clerk-mount[data-at="password"] .au-tick { display: none; }
#clerk-mount .au-sent { text-align: center; font-size: 0.875rem; }
.au-links { display: flex; justify-content: center; gap: 4px 20px; flex-wrap: wrap; }
.au-wait { min-height: 160px; padding: 24px 0 8px; color: var(--muted); font-size: 0.875rem; font-weight: 600; }

/* One checkbox for the whole site (owner 2026-11-29: the browser's white box looked broken on the dark UI). The My Club
   opt-in look (.acd .ac-optin), everywhere: a dark rounded box, gold with a dark tick when on. :where keeps it lowest in
   priority, so a control that hides its input (switches, card ticks) still does. */
:where(input[type="checkbox"]) { appearance: none; display: inline-grid; place-content: center; width: 20px; height: 20px; margin: 0;
  flex: none; vertical-align: middle; cursor: pointer; border: 1.5px solid var(--hair-strong); border-radius: 6px;
  background: rgba(255, 255, 255, 0.04); transition: background-color 180ms var(--ease), border-color 180ms var(--ease); }
:where(input[type="checkbox"])::after { content: ""; width: 12px; height: 12px; background: #1A1204; scale: 0; transition: scale 180ms var(--spring);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 4.8 9 10 3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
:where(input[type="checkbox"]):hover { border-color: rgba(242, 193, 78, 0.6); }
:where(input[type="checkbox"]):checked { background: var(--gold); border-color: var(--gold); }
:where(input[type="checkbox"]):checked::after { scale: 1; }
:where(input[type="checkbox"]):focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; }
:where(input[type="checkbox"]):disabled { opacity: .5; cursor: default; }

/* No GPU (static/shell.js sets html.no-gpu): a blur behind a fixed bar is repainted by the CPU on every scroll frame. Solid
   backgrounds instead, the same colours made opaque enough to read over the page. */
.no-gpu *, .no-gpu *::before, .no-gpu *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.no-gpu .island { background: rgba(12, 14, 19, 0.97); }
.no-gpu .au-card { background: #0A0C11; }
.no-gpu .sheet { background: #06070A; }
.no-gpu .solving-veil { background: rgba(6, 7, 10, 0.9); }
/* No GPU, continued (2026-11-29 perf record): the island keeps a containing block for its fixed menus (they relied on
   backdrop-filter for that) through a transform; drop shadows and looping shine are repainted on every scroll frame too. */
.no-gpu .island { transform: translateZ(0); }
.no-gpu .tile a:hover .item-card, .no-gpu .shield-ico, .no-gpu .reward-art img, .no-gpu .item-card.holo > img, .no-gpu .item-card.layered.holo > .ly-frame,
.no-gpu .item-card.layered .ly-left img, .no-gpu .ly-own, .no-gpu .item-card.layered .ly-badges img, .no-gpu .evo-ba > .item-card,
.no-gpu .sp-chem svg, .no-gpu .pm-frame, .no-gpu .hm-wn-art img, .no-gpu .evb-lane-card.is-last .item-card,
.no-gpu .pcc-dia .ps-art, .no-gpu .pcc-reg .ps-art, .no-gpu .gl-holo > img { filter: none; }
.no-gpu .item-card.holo::after, .no-gpu .pv.is-holo::after, .no-gpu .holo-mark, .no-gpu .pcc-card::after,
.no-gpu .pcc.is-neutral .pcc-card::before { animation: none; }
