/* Classeur · Gentle Mates TCG */
html, body { margin: 0; }
img { max-width: 100%; }

/* Layout : vitrine de collection — barre fine, héros logo + ruban de stats, filtres, bannière d'extension, grille de cartes plein format, détail de la progression en pied de page */
:root {
  color-scheme: dark;
  interpolate-size: allow-keywords;
  --bg: #0A090C;
  --panel: #121015;
  --panel-2: #19161D;
  --line: #24202A;
  --line-2: #353039;
  --fg: #F3F0F5;
  --muted: #9C94A3;
  --faint: #8A8291;
  --accent: #EF7FE3;
  --danger: #FF6F80;
  --bar: #E8E2EC;
  --bar-track: #2A2530;
  /* rarity colour code: slate, grey, green, blue, purple, gold, holo, coral */
  --r-es: #9AA6BC;
  --r-c: #D2CDD8;
  --r-pc: #63D68E;
  --r-r: #5EA8FF;
  --r-e: #B583FF;
  --r-l: #F4BC4E;
  --r-s: #E9D6F7;
  --r-p: #FF8F6B;
  --holo: linear-gradient(100deg, #F6C7E1, #CBD8FF 55%, #C6F2E4);
  --holo-vivid: linear-gradient(90deg, #FF4FD8, #8A6CFF 50%, #2FE3C2);
  /* card type colour code */
  --t-joueur: #7CC4FF;
  --t-coach: #FFB86B;
  --t-objet: #7FE0C4;
  --t-moment: #C9A7FF;
  --t-essence: #B8BEC9;
  --t-support: #FF9AA2;
  --font-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
h1, h2, h3 { text-wrap: balance; margin: 0; }
.display { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .005em; }
.wrap { max-width: 1400px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(10, 9, 12, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; cursor: pointer; color: var(--fg); font-weight: 600; font-size: .92rem; }
.brand img { height: 30px; width: auto; }
.brand span { padding-left: 12px; border-left: 1px solid var(--line-2); color: var(--muted); font-weight: 500; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg); font-weight: 600; font-size: .86rem; cursor: pointer; }
.btn:hover { border-color: var(--faint); }
a.btn { text-decoration: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(18, 16, 21, .8); color: var(--fg); cursor: pointer; }
.icon-btn:hover { border-color: var(--faint); }

/* Hero */
main { display: grid; gap: 28px; padding-block: 24px 80px; }
.hero { position: relative; overflow: hidden; isolation: isolate; border: 1px solid var(--line); border-radius: 24px; text-align: center;
  background: radial-gradient(55% 65% at 50% 32%, rgba(239, 127, 227, .17), transparent 70%), radial-gradient(35% 45% at 22% 12%, rgba(130, 90, 255, .10), transparent 70%), radial-gradient(30% 40% at 82% 18%, rgba(255, 170, 90, .06), transparent 70%), var(--panel); }
.hero-top { padding: clamp(40px, 7vw, 84px) clamp(16px, 4vw, 48px) 0; }
.hero-logo img { display: block; width: min(560px, 88%); height: auto; margin: 0 auto; filter: drop-shadow(0 18px 44px rgba(239, 127, 227, .22)); }
.hero-sub { margin: 18px auto 0; max-width: 56ch; color: var(--muted); font-size: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .hero-logo img { animation: logo-in .9s var(--ease) both; }
  .hero-sub { animation: rise .7s .15s var(--ease) both; }
}
@keyframes logo-in { from { opacity: .35; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: .35; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Ribbon of stats */
.ribbon { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); text-align: left; }
.ribbon > * { padding: 18px 22px 20px; border-left: 1px solid var(--line); min-width: 0; }
.ribbon > :first-child { border-left: 0; }
.rb-label { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.rb-big { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.rb-big b { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1; }
.rb-big .of { color: var(--muted); font-size: 1.05rem; font-weight: 500; }
.rb-big .pct { margin-left: auto; font-family: var(--font-mono); font-size: .85rem; color: var(--fg); }
.rb-item { display: grid; gap: 6px; align-content: start; background: none; border: 0; border-left: 1px solid var(--line); color: var(--fg); text-align: left; cursor: pointer; font: inherit; }
.rb-item:hover { background: rgba(255, 255, 255, .02); }
.rb-val { font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.15; }
.rb-val small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.rb-note { font-size: .76rem; color: var(--muted); }
.bar { display: block; height: 3px; border-radius: 3px; background: var(--bar-track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--bar); }
@media (max-width: 960px) {
  .ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ribbon > :first-child { grid-column: 1 / -1; }
  .ribbon > * { border-top: 1px solid var(--line); }
  .ribbon > :first-child { border-top: 0; }
  .ribbon > :nth-child(2n) { border-left: 0; }
}

/* Filters */
.browse { display: grid; gap: 18px; scroll-margin-top: 70px; }
.search { position: relative; flex: 1 1 220px; min-width: 0; max-width: 300px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); color: var(--fg); font-size: .88rem; }
.search input::placeholder { color: var(--faint); }
.linkish { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; font-size: inherit; }
.view { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); }
.view button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; color: var(--muted); font-size: .8rem; font-weight: 600; cursor: pointer; }
.view button[aria-pressed="true"] { background: var(--panel-2); color: var(--fg); }

/* Set banner */
.group { display: grid; gap: 18px; }
.group + .group { margin-top: 26px; }
.set-banner { position: relative; overflow: hidden; isolation: isolate; display: grid; place-items: center; min-height: clamp(130px, 14vw, 186px); padding: 20px 16px 48px; border-radius: 18px; border: 1px solid var(--line); background: radial-gradient(70% 90% at 50% 40%, rgba(239, 127, 227, .12), transparent 70%), var(--panel-2); }
.set-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.set-banner.has-art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 9, 12, .05) 0%, rgba(10, 9, 12, .62) 100%); }
.set-h { margin: 0; width: 100%; display: grid; place-items: center; line-height: 0; }
.set-logo { width: min(380px, 72%); height: auto; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .45)); }
.set-title { font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1; }
.set-meta { position: absolute; left: 18px; right: 18px; bottom: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 14px; font-size: .8rem; color: rgba(255, 255, 255, .82); }
.set-meta b { font-family: var(--font-mono); font-weight: 600; color: #fff; }
.set-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .14); }
.set-bar i { display: block; height: 100%; background: #fff; }

/* Card grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); gap: 22px 18px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; } }
.card { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; perspective: 1000px; text-align: left; -webkit-tap-highlight-color: transparent; }
.card:focus-visible { outline: none; }
.card:focus-visible .card-3d { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-3d { position: relative; display: block; aspect-ratio: 63 / 88; max-width: 100%; border-radius: 12px; overflow: hidden; background: var(--panel-2);
  transform: translateY(var(--ty, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transition: transform .55s var(--ease), box-shadow .45s var(--ease);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 12px 26px -16px rgba(0, 0, 0, .9); }
.card.is-hover .card-3d, .dcard.is-hover .card-3d { transition: transform .1s linear, box-shadow .35s var(--ease); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 60px -24px color-mix(in oklab, var(--glow) 70%, transparent), 0 18px 34px -18px rgba(0, 0, 0, .9); }
.card.is-hover { --s: 1.04; --ty: -6px; }
.card:focus-visible { --ty: -4px; }
.card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.has-img > .face { visibility: hidden; }
.card-glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; mix-blend-mode: overlay;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .12) 28%, rgba(255, 255, 255, 0) 55%); }
.card-foil { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; mix-blend-mode: color-dodge;
  background: linear-gradient(115deg, transparent 18%, rgba(255, 60, 200, .55) 32%, rgba(80, 220, 255, .5) 44%, rgba(255, 235, 90, .45) 56%, rgba(150, 110, 255, .5) 68%, transparent 82%);
  background-size: 240% 240%; background-position: var(--fx, 50%) var(--fy, 50%); }
.is-hover .card-glare { opacity: 1; }
.is-hover .card-foil { opacity: .42; }
.card-cap { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 7px; padding: 54px 12px 11px; pointer-events: none;
  background: linear-gradient(to top, rgba(7, 6, 9, .95) 0%, rgba(7, 6, 9, .78) 45%, rgba(7, 6, 9, 0) 100%); }
.cap-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cap-name { min-width: 0; font-family: var(--font-display); font-weight: 800; font-size: .98rem; line-height: 1.05; text-transform: uppercase; color: #fff; overflow-wrap: anywhere; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.cap-num { flex: none; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; color: rgba(255, 255, 255, .72); }
.cap-own { display: flex; flex-wrap: wrap; gap: 4px; min-height: 19px; }
.chip { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 99px; font-size: .66rem; font-weight: 650; letter-spacing: .01em; white-space: nowrap; }
.chip.on { background: #F5F2F7; color: #121015; }
.chip.rev { background: linear-gradient(100deg, #F6C7E1, #CBD8FF 55%, #C6F2E4); color: #2A1830; }
.chip.miss { border: 1px dashed rgba(255, 255, 255, .38); color: rgba(255, 255, 255, .78); }
.card.is-missing .card-img, .card.is-missing .face { filter: grayscale(1) brightness(.48); }
.card.is-missing.is-hover .card-img, .card.is-missing.is-hover .face { filter: grayscale(.4) brightness(.8); }
.card .face-name { display: none; }

/* Rarity colour code */
[data-r] { --rc: var(--faint); --rbg: var(--rc); }
[data-r="ES"] { --rc: var(--r-es); }
[data-r="C"] { --rc: var(--r-c); }
[data-r="PC"] { --rc: var(--r-pc); }
[data-r="R"] { --rc: var(--r-r); }
[data-r="E"] { --rc: var(--r-e); }
[data-r="L"] { --rc: var(--r-l); }
[data-r="S"] { --rc: var(--r-s); --rbg: var(--holo); }
[data-r="P"] { --rc: var(--r-p); }
.cap-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cap-own { min-width: 0; }
.rpill { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 19px; padding: 0 6px; border-radius: 6px; font-family: var(--font-mono); font-size: .64rem; font-weight: 700; letter-spacing: .04em; line-height: 1; white-space: nowrap;
  color: var(--rc); background: color-mix(in oklab, var(--rc) 16%, rgba(10, 9, 12, .72)); border: 1px solid color-mix(in oklab, var(--rc) 55%, transparent); }
.rpill[data-r="S"] { background: var(--holo); color: #2A1830; border-color: transparent; }
.card .card-3d::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rbg); pointer-events: none; }
.rdot { flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--rbg); transform: rotate(45deg); }
.tag.rtag { border-color: color-mix(in oklab, var(--rc) 45%, var(--line)); }
.rinline { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ptable tr[data-r] .bar i { background: var(--rbg); }

/* Type colour code: rounded label (rarity stays a square code) */
[data-t] { --tc: var(--muted); }
[data-t="Joueur"] { --tc: var(--t-joueur); }
[data-t="Coach"] { --tc: var(--t-coach); }
[data-t="Objet"] { --tc: var(--t-objet); }
[data-t="Moment"] { --tc: var(--t-moment); }
[data-t="Essence"] { --tc: var(--t-essence); }
[data-t="Support"] { --tc: var(--t-support); }
.tpill { flex: none; display: inline-flex; align-items: center; height: 19px; padding: 0 8px; border-radius: 99px; font-size: .64rem; font-weight: 650; letter-spacing: .01em; white-space: nowrap;
  color: var(--tc); background: color-mix(in oklab, var(--tc) 15%, rgba(10, 9, 12, .72)); border: 1px solid color-mix(in oklab, var(--tc) 45%, transparent); }
.tdot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--tc); }
.tag.ttag { border-color: color-mix(in oklab, var(--tc) 45%, var(--line)); }
.cap-meta { flex-wrap: wrap; row-gap: 4px; }
.cap-tags { display: inline-flex; gap: 4px; margin-left: auto; }
/* Reverse finish: a permanent rainbow foil with glitter, drifting slowly */
.rev-shine { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .5;
  background: linear-gradient(115deg, rgba(255, 70, 190, 0) 0%, rgba(255, 70, 190, .55) 12%, rgba(110, 220, 255, .55) 24%, rgba(255, 236, 120, .5) 36%, rgba(170, 120, 255, .55) 48%, rgba(255, 70, 190, 0) 60%, rgba(110, 220, 255, .45) 78%, rgba(255, 70, 190, 0) 100%);
  background-size: 250% 250%; background-position: 0% 40%; }
.rev-shine::after { content: ""; position: absolute; inset: 0; mix-blend-mode: overlay; opacity: .6;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .95) 0 1px, transparent 1.6px), radial-gradient(circle, rgba(255, 255, 255, .75) 0 .8px, transparent 1.4px);
  background-size: 23px 29px, 37px 31px; background-position: 0 0, 11px 17px; }
@media (prefers-reduced-motion: no-preference) { .rev-shine { animation: revshine 7s ease-in-out infinite alternate; } }
@keyframes revshine { from { background-position: 0% 40%; } to { background-position: 100% 60%; } }
.is-hover .rev-shine { opacity: .62; }
.dvisual { display: grid; gap: 14px; justify-items: center; }
.dvisual > .dcard { width: 100%; }
.vtoggle { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.vtoggle button { border: 0; background: none; padding: 6px 16px; border-radius: 8px; color: var(--muted); font-size: .82rem; font-weight: 600; cursor: pointer; }
.vtoggle button[aria-pressed="true"] { background: #F5F2F7; color: #121015; }
.vtoggle button.rev[aria-pressed="true"] { background: var(--holo); color: #2A1830; }

/* Colour-coded filter menus */
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; max-width: 100%; padding: 0 30px 0 12px; border-radius: 9px; border: 1px solid var(--line-2); white-space: nowrap; cursor: pointer; color: var(--fg); font-size: .86rem;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239C94A3' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center; }
.dd-btn[aria-expanded="true"] { border-color: var(--faint); }
.dd-btn.active { border-color: var(--accent); }
.dd-btn.active[data-r] { border-color: color-mix(in oklab, var(--rc) 75%, transparent); }
.dd-btn.active[data-t] { border-color: color-mix(in oklab, var(--tc) 75%, transparent); }
.dd-btn.active[style] { border-color: color-mix(in oklab, var(--ec) 80%, transparent); }
.dd-btn .eicon { height: 14px; }
.dd-list { position: absolute; z-index: 16; top: calc(100% + 6px); left: 0; display: grid; gap: 2px; min-width: 240px; max-width: calc(100vw - 32px); max-height: min(380px, 60vh); overflow: auto; padding: 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: 0 22px 46px -18px rgba(0, 0, 0, .95); }
.dd-list.right { left: auto; right: 0; }
.dd-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px 9px; border: 0; border-radius: 8px; background: none; color: var(--fg); font-size: .86rem; text-align: left; cursor: pointer; }
.dd-opt:hover, .dd-opt:focus-visible { background: var(--panel-2); outline: none; }
.dd-opt:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.ecell:focus-visible, .rb-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dd-opt[aria-selected="true"] { background: var(--panel-2); }
.dd-label { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 7px; }
.dd-label small { color: var(--faint); font-size: .74rem; }
.dd-none { flex: none; display: inline-block; }
.dd-check { flex: none; color: var(--accent); }

/* ---------- Filter bar ---------- */
.fbar { position: sticky; top: 63px; z-index: 14; display: grid; gap: 10px 12px; align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "tabs search view" "chips chips end"; margin-inline: -16px; padding: 12px 16px; border-bottom: 1px solid transparent; background: rgba(10, 9, 12, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color .2s, box-shadow .2s; }
@media (min-width: 1101px) { .fbar.stuck { border-bottom-color: var(--line); box-shadow: 0 14px 28px -20px rgba(0, 0, 0, .95); } }
.fbar > .tabs { grid-area: tabs; }
.fbar > .fsearch { grid-area: search; justify-self: end; width: min(300px, 100%); }
.fbar > .vseg { grid-area: view; justify-self: end; }
.fbar > .chips { grid-area: chips; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.fbar > .fbar-end { grid-area: end; justify-self: end; }
.fhint { margin: -6px 0 0; font-size: .8rem; color: var(--faint); }

/* Status tabs: a segmented control with counts */
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 600; font-size: .86rem; white-space: nowrap; cursor: pointer; transition: color .15s, background .15s; }
.tabs button:hover { color: var(--fg); }
.tabs .t-i { display: grid; color: var(--faint); transition: color .15s; }
.tabs .n { min-width: 22px; padding: 1px 6px; border-radius: 99px; background: var(--bg); color: var(--muted); font-family: var(--font-mono); font-size: .7rem; font-weight: 600; text-align: center; }
.tabs button[aria-pressed="true"] { background: var(--panel-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2), 0 6px 14px -8px rgba(0, 0, 0, .9); }
.tabs button[aria-pressed="true"] .t-i { color: var(--accent); }
.tabs button[aria-pressed="true"] .n { background: color-mix(in oklab, var(--accent) 22%, transparent); color: #FFD6F8; }
.tabs button[data-own="fav"][aria-pressed="true"] .t-i { color: #FF5FA2; }
.tabs button[data-own="fav"][aria-pressed="true"] .t-i svg { fill: currentColor; }

/* Search inside the collection */
.fsearch { max-width: none; }
.fsearch input { height: 42px; border-radius: 12px; }
.fsearch input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent); }

/* Cards / list toggle with icons */
.vseg { padding: 4px; border-radius: 12px; }
.vseg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 8px; }
.vseg button[aria-pressed="true"] svg { color: var(--accent); }

/* Filter chips: dashed "+ Filtre" when off, coloured with the value and a × when on */
.chips-ic { display: grid; place-items: center; width: 22px; color: var(--faint); }
.dd-btn { gap: 7px; height: 34px; padding: 0 14px 0 11px; border-radius: 99px; border: 1px dashed var(--line-2); background: transparent; background-image: none; color: var(--muted); font-weight: 600; font-size: .84rem; transition: color .15s, border-color .15s, background .15s; }
.dd-btn > svg { flex: none; }
.dd-btn:hover { color: var(--fg); border-color: var(--faint); border-style: solid; }
.dd-btn[aria-expanded="true"] { color: var(--fg); border-style: solid; border-color: var(--faint); background: var(--panel); }
.dd-btn.active { --cc: var(--accent); padding-right: 36px; border: 1px solid color-mix(in oklab, var(--cc) 60%, transparent); background: color-mix(in oklab, var(--cc) 13%, var(--panel)); color: var(--fg); }
.dd-btn.active[data-r] { --cc: var(--rc); }
.dd-btn.active[data-t] { --cc: var(--tc); }
.dd-btn.active[style*="--ec"] { --cc: var(--ec); }
.dd-btn.active[data-r], .dd-btn.active[data-t], .dd-btn.active[style*="--ec"] { border-color: color-mix(in oklab, var(--cc) 60%, transparent); }
.dd-k { color: var(--muted); font-weight: 500; }
.dd-btn.active .dd-k::after { content: ""; display: inline-block; width: 1px; height: 12px; margin-left: 8px; vertical-align: -1px; background: var(--line-2); }
.dd-btn .tdot { width: 8px; height: 8px; }
.dd-x { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.dd-x:hover { background: rgba(255, 255, 255, .1); color: var(--fg); }
.vmark { flex: none; width: 11px; height: 15px; border-radius: 2.5px; background: #E8E2EC; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.vmark.rev { background: var(--holo); }
.chip-reset { height: 34px; padding: 0 10px; border: 0; border-radius: 99px; background: none; color: var(--accent); font-weight: 600; font-size: .84rem; cursor: pointer; }
.chip-reset:hover { background: color-mix(in oklab, var(--accent) 12%, transparent); }
.fbar-end { display: inline-flex; align-items: center; gap: 12px; }
.fbar-count { font-size: .8rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dd-sort .dd-btn { border-style: solid; border-color: var(--line); background: var(--panel); color: var(--fg); padding-right: 12px; }
.dd-sort .dd-btn:hover { border-color: var(--line-2); }
.dd-sort .dd-k { color: var(--muted); }
.dd-sort .dd-btn .chev { color: var(--muted); transition: transform .2s var(--ease); }
.dd-sort .dd-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.dd-list::before { content: attr(aria-label); display: none; }
.dd-scrim { display: none; }

@media (max-width: 1100px) {
  /* Narrow windows: not pinned, three compact rows (status and view / search and sort / filters). */
  .fbar { position: static; margin-inline: 0; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; box-shadow: none;
    grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "tabs tabs tabs" "search view end" "chips chips chips"; }
  .fbar > .fsearch { justify-self: stretch; width: auto; }
  .vseg button span { display: none; }
  .vseg button { padding: 0 10px; }
  .fbar > .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px; }
  .fbar > .chips::-webkit-scrollbar { display: none; }
  .fbar > .chips > * { flex: none; }
  .tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .fbar-count { display: none; }
  /* The chips row scrolls sideways, so menus open as a panel at the bottom of the screen */
  .fbar:has(.dd-list) { z-index: 30; }
  .dd-list, .dd-list.right { position: fixed; z-index: 41; left: 50%; right: auto; top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(440px, calc(100% - 16px)); min-width: 0; max-width: none; max-height: 70vh; padding: 8px; border-radius: 18px; }
  .dd-list::before { display: block; padding: 6px 9px 10px; font-size: .72rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
  .dd-opt { min-height: 42px; }
  .dd-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(5, 4, 7, .62); }
}
@media (max-width: 680px) {
  /* Phones: search + "Filtres" button, status pills, then only the filters that are on. Everything else lives in the sheet. */
  .fbar { gap: 12px 10px; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "search fbtn" "tabs tabs" "chips chips" "count count"; }
  .fbar > .vseg, .fbar .dd-sort, .fhint, .chips-ic { display: none; }
  .fbar > .fbtn { display: inline-flex; grid-area: fbtn; }
  .fbar-count { display: block; grid-area: count; margin-top: -2px; font-size: .78rem; }
  .fbar > .fbar-end { display: contents; }
  .fbar > .chips .dd:not(:has(.dd-btn.active)) { display: none; }
  .fbar > .chips:not(:has(.dd-btn.active)) { display: none; }
}
@media (max-width: 1100px) {
  /* Narrow windows: status pills that scroll sideways on touch screens */
  .tabs { margin-inline: -16px; padding: 0 16px; width: auto; max-width: none; gap: 6px; border: 0; border-radius: 0; background: none; scroll-padding-inline: 16px; scroll-snap-type: x proximity; }
  .tabs button { scroll-snap-align: start; height: 36px; padding: 0 12px 0 11px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--panel); }
  .tabs button[aria-pressed="true"] { border-color: #F5F2F7; background: #F5F2F7; color: #121015; box-shadow: none; }
  .tabs button[aria-pressed="true"] .t-i, .tabs button[data-own="fav"][aria-pressed="true"] .t-i { color: #121015; }
  .tabs button[aria-pressed="true"] .n { background: rgba(18, 16, 21, .12); color: #121015; }
}
@media (max-width: 1100px) and (hover: hover) and (pointer: fine) {
  /* With a mouse a sideways row can't be swiped: wrap onto more lines instead */
  .tabs { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .fbar > .chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; }
}

/* Filter button and sheet (phones) */
.fbtn { display: none; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); color: var(--fg); font-weight: 650; font-size: .88rem; cursor: pointer; }
.fbtn:has(.fbadge:not([hidden])) { border-color: color-mix(in oklab, var(--accent) 55%, var(--line-2)); }
.fbadge { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #2A0B26; font-size: .72rem; font-weight: 700; }
.fsheet { width: 100%; max-width: min(560px, 100%); max-height: 88vh; margin: auto auto 0; padding: 0; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--panel); color: var(--fg); overflow: hidden; box-shadow: 0 -20px 60px -20px #000; }
.fsheet[open] { display: flex; flex-direction: column; }
.fsheet::backdrop { background: rgba(5, 4, 7, .62); }
@media (prefers-reduced-motion: no-preference) { .fsheet[open] { animation: sheet-up .34s var(--ease); } }
@keyframes sheet-up { from { transform: translateY(48px); opacity: 0; } }
.fs-grab { width: 40px; height: 4px; margin: 10px auto 0; border-radius: 4px; background: var(--line-2); }
.fs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px 10px; }
.fs-head h2 { margin: 0; font-family: var(--font-display); font-weight: 900; font-stretch: 72%; font-size: 1.7rem; text-transform: uppercase; line-height: 1; }
.fs-body { display: grid; gap: 22px; padding: 6px 18px 20px; overflow: auto; overscroll-behavior: contain; }
.fs-sec h3 { margin: 0 0 10px; font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.fs-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fpill { --cc: var(--accent); display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--bg); color: var(--fg); font-weight: 600; font-size: .88rem; text-align: left; cursor: pointer; }
.fpill[data-r] { --cc: var(--rc); }
.fpill[data-t] { --cc: var(--tc); }
.fpill[style*="--ec"] { --cc: var(--ec); }
.fpill[aria-pressed="true"] { border-color: color-mix(in oklab, var(--cc) 70%, transparent); background: color-mix(in oklab, var(--cc) 16%, var(--panel-2)); }
.fs-grid .fpill { border-radius: 12px; padding: 8px 12px; }
.fpill .fp-l { display: grid; min-width: 0; }
.fpill small { font-size: .72rem; font-weight: 500; color: var(--muted); }
.fs-foot { display: flex; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--panel); }
.fs-foot .btn { flex: 1; min-height: 46px; }
.fs-foot .btn.light { flex: 2; }

.ebox.sm { width: 30px; }
.chip.miss.mrev { border-color: rgba(203, 216, 255, .6); color: #DCD6FF; }
@media (max-width: 560px) { .cap-name { font-size: .8rem; } .card-cap { padding: 40px 9px 9px; gap: 5px; } }

/* Drawn card face (cards without an image) */
.face { --c: #7E7688; position: absolute; inset: 0; display: block; container-type: inline-size; }
.face-in { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 3cqi; padding: 6cqi; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  background: radial-gradient(130% 85% at 18% 0%, color-mix(in oklab, var(--c) 72%, white) 0%, var(--c) 46%, color-mix(in oklab, var(--c) 45%, #0D0810) 100%); }
.face-in::after { content: ""; position: absolute; inset: 2.6cqi; border: max(1px, .7cqi) solid rgba(255, 255, 255, .4); border-radius: 4cqi; pointer-events: none; }
.face[data-ink="dark"] .face-in { color: #261C02; text-shadow: none; background: radial-gradient(130% 85% at 18% 0%, color-mix(in oklab, var(--c) 55%, white) 0%, var(--c) 55%, color-mix(in oklab, var(--c) 82%, #6A4700) 100%); }
.face-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-weight: 600; font-size: 7cqi; line-height: 1; }
.face-rar { padding: 1.4cqi 2.6cqi; border-radius: 99px; background: rgba(0, 0, 0, .28); font-size: 6.2cqi; }
.face-art { position: relative; flex: 1; display: grid; place-items: center; border-radius: 3cqi; overflow: hidden; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .09) 0 2.2cqi, transparent 2.2cqi 5.4cqi), rgba(255, 255, 255, .1); }
.face-art span { font-family: var(--font-display); font-stretch: 70%; font-weight: 900; font-size: 34cqi; line-height: 1; opacity: .3; text-shadow: none; }
.face-bottom { display: grid; gap: 1.6cqi; padding-bottom: 22cqi; }
.dcard .face-bottom { padding-bottom: 0; }
.face-name { font-family: var(--font-display); font-weight: 800; font-size: 10cqi; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.face-type { font-size: 6cqi; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; opacity: .88; }

/* List view */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.ctable { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .88rem; }
.ctable th, .ctable td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.ctable thead th { font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--panel); }
.ctable tbody tr:last-child td { border-bottom: 0; }
.ctable tbody tr:hover td { background: rgba(255, 255, 255, .015); }
.ctable .c { text-align: center; }
.ctable td.num { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); white-space: nowrap; }
.row-open { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; color: var(--fg); }
.thumb { position: relative; flex: none; width: 34px; aspect-ratio: 63 / 88; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb i { position: absolute; inset: 0; background: var(--c); }
.row-open b { display: block; font-weight: 600; }
.row-open small { display: block; color: var(--muted); font-size: .76rem; }
.row-open:hover b { text-decoration: underline; }
.ctable tr.is-missing .thumb { filter: grayscale(1) brightness(.55); }
.ctable tr.is-missing b { color: var(--muted); }
.ess { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* Steppers */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; background: var(--bg); }
.stepper button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--fg); cursor: pointer; }
.stepper button:hover:not(:disabled) { background: var(--panel-2); }
.stepper button:disabled { color: var(--line-2); cursor: default; }
.stepper output { min-width: 2em; text-align: center; font-family: var(--font-mono); font-weight: 600; font-size: .9rem; }
.stepper.lg button { width: 40px; height: 40px; }
.qty-ro { font-family: var(--font-mono); font-weight: 600; }

/* Progress detail */
.progress { display: grid; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.progress h2 { font-size: 1.5rem; line-height: 1; }
.progress-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px 48px; align-items: start; }
@media (max-width: 900px) { .progress-cols { grid-template-columns: minmax(0, 1fr); } }
.ptable-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ptable caption { text-align: left; padding-bottom: 6px; font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.ptable th, .ptable td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; font-weight: 400; }
.ptable thead th { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding-top: 0; }
.ptable td.r, .ptable th.r { text-align: right; }
.ptable td.rate { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); white-space: nowrap; }
.plink { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; color: var(--fg); cursor: pointer; text-align: left; white-space: nowrap; }
.plink:hover .pl-name { text-decoration: underline; }
.plink .code, .plink .game { font-size: .76rem; color: var(--faint); }
.plink .code { font-family: var(--font-mono); }
.pcell { display: grid; grid-template-columns: 4.2em minmax(56px, 1fr); align-items: center; gap: 10px; min-width: 140px; }
.pcell .n { font-family: var(--font-mono); font-size: .8rem; }
.pcell .of { color: var(--faint); }

/* State boxes */
.state-box { display: grid; gap: 10px; justify-items: center; padding: 56px 20px; text-align: center; border: 1px dashed var(--line-2); border-radius: 16px; color: var(--muted); }
.state-box strong { color: var(--fg); font-size: 1.05rem; }

/* Detail dialog */
#dlg-card { width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: var(--fg); overflow: auto; }
#dlg-card::backdrop { background: rgba(6, 5, 8, .74); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (prefers-reduced-motion: no-preference) { #dlg-card[open]::backdrop { animation: fade .3s ease both; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.dlg-close { position: fixed; z-index: 3; top: calc(14px + env(safe-area-inset-top, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); }
.detail { min-height: 100%; display: flex; align-items: center; justify-content: center; gap: 28px; padding: calc(64px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.dvisual { flex: none; width: min(420px, 40vw); }
.dcard { display: block; perspective: 1200px; }
.dcard .card-3d { border-radius: 16px; }
.dside { width: min(440px, 100%); display: grid; gap: 12px; align-content: start; }
.dpanel { display: grid; gap: 14px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); font-size: .74rem; font-weight: 600; color: var(--fg); }
.tag.missing { border-style: dashed; color: var(--muted); }
.d-name { font-size: 1.45rem; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere; }
.d-set { margin: 4px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .86rem; }
.numchip { font-family: var(--font-mono); font-size: .76rem; font-weight: 600; color: var(--fg); padding: 2px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line-2); }
.d-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .8rem; color: var(--muted); }
.d-stats b { font-family: var(--font-mono); font-weight: 600; color: var(--fg); font-size: .92rem; margin-right: 5px; }
.d-illus { margin: 0; text-align: right; font-size: .76rem; color: var(--faint); }
.d-empty { margin: 0; font-size: .82rem; color: var(--faint); }

/* Card text dropdowns (closed by default) */
.accs { display: grid; border-top: 1px solid var(--line); }
.acc { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 2px; cursor: pointer; font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); border-radius: 6px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { color: var(--fg); }
.acc-hint { font-family: var(--font-mono); font-size: .72rem; letter-spacing: 0; text-transform: none; color: var(--faint); }
.kw { padding: 2px 8px; border-radius: 99px; background: rgba(239, 127, 227, .14); color: var(--accent); letter-spacing: .04em; }
.chev { margin-left: auto; flex: none; color: var(--faint); transition: transform .25s var(--ease); }
.acc[open] .chev { transform: rotate(180deg); }
.acc-body { padding: 0 2px 14px; }
.acc-body p { margin: 0; font-size: .9rem; line-height: 1.55; }
.acc::details-content { block-size: 0; overflow: clip; transition: block-size .28s var(--ease), content-visibility .28s allow-discrete; }
.acc[open]::details-content { block-size: auto; }
.attacks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.attacks li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.attacks li + li { padding-top: 10px; border-top: 1px solid var(--line); }
.attacks b { font-weight: 600; font-size: .92rem; }
.attacks .cost { display: block; font-size: .76rem; color: var(--muted); }
.attacks .note { display: block; font-size: .82rem; margin-top: 2px; }
.attacks .dmg { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.d-quote { font-style: italic; color: var(--muted); }

.own-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.own-label { display: grid; }
.own-label strong { font-weight: 600; }
.own-label span { font-size: .78rem; color: var(--muted); }
.d-head h3 { font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.note { margin: 0; padding-left: 12px; border-left: 2px solid var(--line-2); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .86rem; }
@media (max-width: 820px) {
  .detail { flex-direction: column; align-items: center; justify-content: flex-start; gap: 18px; }
  .dvisual { width: min(300px, 76vw); }
}

.btn.light { background: #F5F2F7; border-color: #F5F2F7; color: #121015; }
.btn.light:hover { background: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.block { width: 100%; min-height: 42px; }
.top-right { display: flex; align-items: center; gap: 14px; }
@media (max-width: 560px) { .conn, .brand span { display: none; } }
.eicon { flex: none; display: block; height: 15px; width: auto; max-width: 28px; object-fit: contain; }
.eicon.lg { height: 17px; }
.ebox { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 46px; }
.tag.etag { padding: 0 9px; }
.tag.etag .eicon { height: 15px; }
.face-emblem { width: 60cqi; height: auto; filter: brightness(0) invert(1); opacity: .55; }
.face[data-ink="dark"] .face-emblem { filter: brightness(0); opacity: .3; }

/* Booster opening mode */
#dlg-booster { width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--fg); overflow: auto; }
#dlg-booster::backdrop { background: var(--bg); }
.bst-head { position: sticky; top: 0; z-index: 3; background: rgba(10, 9, 12, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bst-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: calc(12px + env(safe-area-inset-top, 0px)) 12px; }
.bst-head h2 { font-size: 1.4rem; line-height: 1; }
.bst-body { padding-block: 20px 40px; }
.bst-pick { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.bst-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bst-search { max-width: 340px; }
.rchips { display: flex; flex-wrap: wrap; gap: 6px; }
.rchip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--muted); font-size: .78rem; font-weight: 600; cursor: pointer; }
.rchip[aria-pressed="true"] { color: var(--fg); border-color: var(--rc, var(--fg)); background: color-mix(in oklab, var(--rc, var(--fg)) 12%, var(--panel)); }
.bst-help { margin: 12px 0 16px; font-size: .82rem; color: var(--muted); line-height: 1.7; }
kbd { font-family: var(--font-mono); font-size: .74rem; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--panel); color: var(--fg); }
.bst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 12px; }
.pk { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; text-align: left; -webkit-tap-highlight-color: transparent; }
.pk-img { position: relative; display: block; aspect-ratio: 63 / 88; border-radius: 8px; overflow: hidden; background: var(--panel-2); box-shadow: 0 0 0 1px rgba(255, 255, 255, .05); transition: transform .2s var(--ease), box-shadow .2s; }
.pk-img::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rbg); }
.pk .face-top, .pk .face-bottom { display: none; }
.pk:hover .pk-img { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 14px 26px -14px rgba(0, 0, 0, .9); }
.pk:focus-visible { outline: none; }
.pk:focus-visible .pk-img { outline: 2px solid var(--accent); outline-offset: 2px; }
.pk-num { position: absolute; left: 6px; bottom: 9px; padding: 1px 5px; border-radius: 4px; background: rgba(7, 6, 9, .82); font-family: var(--font-mono); font-size: .64rem; color: #fff; }
.pk-count { position: absolute; top: 6px; right: 6px; min-width: 26px; height: 22px; padding: 0 6px; display: grid; place-items: center; border-radius: 99px; background: var(--accent); color: #1C0A1A; font-family: var(--font-mono); font-size: .72rem; font-weight: 700; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .8); }
@media (prefers-reduced-motion: no-preference) { .pk.bump .pk-img { animation: bump .32s var(--ease); } }
@keyframes bump { 40% { transform: scale(.93); } 100% { transform: none; } }
.bst-tray { position: sticky; top: 84px; display: grid; gap: 12px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); max-height: calc(100vh - 110px); overflow: auto; }
.tray-head { display: flex; align-items: baseline; gap: 10px; }
.tray-head strong { font-size: .95rem; font-weight: 600; }
.tray-count { font-family: var(--font-mono); font-size: .9rem; color: var(--muted); }
.tray-toggle { display: none; margin-left: auto; font-size: .8rem; }
.tray-empty { margin: 0; font-size: .84rem; color: var(--muted); }
.tray-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tray-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) { .tray-item.flash { animation: flash .7s ease; } }
@keyframes flash { from { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 16%, var(--bg)); } }
.tray-item .thumb { width: 30px; }
.ti-name { min-width: 0; display: grid; }
.ti-name b { font-size: .84rem; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.ti-name small { font-size: .7rem; color: var(--muted); font-family: var(--font-mono); }
.ti-ver { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--panel-2); }
.ti-ver button { border: 0; background: none; padding: 3px 7px; border-radius: 6px; font-size: .68rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.ti-ver button[aria-pressed="true"] { background: #F5F2F7; color: #121015; }
.ti-ver button.rev[aria-pressed="true"] { background: var(--holo); color: #2A1830; }
.ti-del { width: 26px; height: 26px; border: 0; border-radius: 7px; background: none; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.ti-del:hover { color: var(--fg); background: var(--panel-2); }
.tray-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.tray-msg { margin: 0; min-height: 1.3em; font-size: .78rem; color: var(--muted); }
.tray-actions { display: grid; gap: 10px; }
@media (max-width: 900px) {
  .bst-pick { grid-template-columns: minmax(0, 1fr); }
  .bst-tray { top: auto; bottom: 0; max-height: 62vh; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -20px 40px -18px rgba(0, 0, 0, .95); }
  .tray-toggle { display: inline-flex; }
  .bst-tray:not(.expanded) .tray-list, .bst-tray:not(.expanded) .tray-sum, .bst-tray:not(.expanded) .tray-empty { display: none; }
  .bst-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
}
.rc { display: grid; gap: 26px; padding-top: 16px; }
.rc-head h3 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; }
.rc-head p { margin: 8px 0 0; color: var(--muted); }
.rc-head p b { color: var(--fg); font-weight: 600; }
.rc-prog { display: grid; gap: 8px; max-width: 560px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.rc-nums { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.rc-nums b { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1; }
.rc-nums .gain { margin-left: auto; font-family: var(--font-mono); font-weight: 600; color: var(--accent); }
.bar2 { display: flex; height: 4px; border-radius: 4px; background: var(--bar-track); overflow: hidden; }
.bar2 i { display: block; height: 100%; }
.bar2 .old { background: var(--bar); }
.bar2 .new { background: var(--accent); }
.rc-sec h4 { margin: 0 0 14px; font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 18px; }
.rc-grid.small { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px 12px; }
@media (max-width: 560px) { .rc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rc-grid.small { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rc-item { display: grid; gap: 8px; align-content: start; }
.rc-card { position: relative; display: block; perspective: 1000px; }
.rc-card .card-3d::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rbg); pointer-events: none; }
.rc-card.is-hover { --s: 1.04; --ty: -4px; }
.rc-card.is-hover .card-3d { transition: transform .1s linear, box-shadow .35s var(--ease); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 60px -24px color-mix(in oklab, var(--glow) 70%, transparent), 0 18px 34px -18px rgba(0, 0, 0, .9); }
.rc-badge { position: absolute; z-index: 2; top: -9px; left: 50%; transform: translateX(-50%); padding: 3px 10px; border-radius: 99px; background: var(--accent); color: #1C0A1A; font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .8); }
.rc-badge.rev { background: var(--holo); color: #2A1830; }
.rc-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .8rem; }
.rc-cap b { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.rc-cap span { flex: none; color: var(--muted); font-family: var(--font-mono); font-size: .72rem; }
@media (prefers-reduced-motion: no-preference) { .rc-grid .rc-card { animation: reveal .75s var(--ease) both; animation-delay: var(--d, 0ms); } }
@keyframes reveal { from { opacity: .15; transform: rotateY(85deg) scale(.9); } to { opacity: 1; transform: none; } }
.rc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rc-warn { margin: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--danger); color: var(--danger); font-size: .86rem; font-weight: 600; }

/* ---------- App shell: navigation, account menu, views ---------- */
body[data-mode="landing"] .app-only { display: none !important; }
body[data-mode="app"] .landing-only { display: none !important; }
.topbar .wrap { gap: 16px; }
a.brand { text-decoration: none; }
.brand .wordmark { padding-left: 12px; border-left: 1px solid var(--line-2); font-family: var(--font-display); font-weight: 900; font-stretch: 72%; font-size: 1.3rem; line-height: 1; text-transform: uppercase; color: var(--fg); }
.brand .wordmark span { padding: 0; border: 0; color: var(--accent); font-weight: 900; }
.mainnav { display: flex; gap: 4px; margin-left: 4px; margin-right: auto; }
.mainnav a { padding: 8px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.mainnav a:hover { color: var(--fg); background: var(--panel); }
.mainnav a[aria-current="page"] { color: var(--fg); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--accent); }
.umenu { position: relative; }
.avatar-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); color: var(--fg); font-weight: 600; font-size: .86rem; cursor: pointer; }
.avatar-btn:hover { border-color: var(--faint); }
.chev-s { color: var(--muted); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 25; min-width: 230px; display: grid; gap: 2px; padding: 6px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: 0 22px 46px -18px rgba(0, 0, 0, .95); }
.menu-head { display: grid; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.menu-head b { font-weight: 600; }
.menu-head span { font-size: .76rem; color: var(--muted); }
.menu a, .menu button { display: flex; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--fg); font-size: .88rem; text-decoration: none; text-align: left; cursor: pointer; }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--panel-2); outline: none; }
.menu .danger { color: var(--danger); }
.discord { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; border: 0; border-radius: 12px; background: #5865F2; color: #fff; font-weight: 650; font-size: .98rem; cursor: pointer; box-shadow: 0 10px 30px -12px rgba(88, 101, 242, .8); transition: background .2s, transform .2s var(--ease); }
.discord:hover { background: #4752C4; transform: translateY(-1px); }
.discord:disabled { opacity: .7; cursor: progress; transform: none; }
.discord.sm { min-height: 36px; padding: 0 14px; font-size: .86rem; border-radius: 10px; box-shadow: none; }
.discord.lg { min-height: 54px; padding: 0 26px; font-size: 1.06rem; border-radius: 14px; }
.btn.danger-outline { background: transparent; color: var(--danger); border-color: color-mix(in oklab, var(--danger) 40%, var(--line-2)); }
@media (max-width: 680px) {
  .brand .wordmark, #avatar-name, .chev-s, #btn-booster .lbl { display: none; }
  .avatar-btn { padding: 0 3px; }
  #btn-booster { padding: 0 11px; }
  .mainnav a { padding: 8px 9px; }
  .topbar .wrap { gap: 10px; }
}

/* Stats page */
.eyebrow { margin: 0; font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.spanel { display: grid; gap: 12px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.sp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sp-head h2 { font-size: 1.15rem; font-weight: 650; line-height: 1.1; }
.sp-head span { font-size: .8rem; color: var(--muted); }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 12px; }
.mcard { position: relative; display: grid; gap: 7px; align-content: start; padding: 0; border: 0; background: none; color: var(--fg); text-align: left; cursor: pointer; }
.mcard .card-3d { border-radius: 9px; }
.mcard:hover .card-3d { --ty: -3px; }
.mcard:focus-visible { outline: none; }
.mcard:focus-visible .card-3d { outline: 2px solid var(--accent); outline-offset: 2px; }
.mcard .card-3d::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rbg); }
.mcard .face-name { display: none; }
.mc-badge { position: absolute; top: 6px; right: 6px; z-index: 2; min-width: 30px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 99px; background: #F5F2F7; color: #121015; font-family: var(--font-mono); font-size: .72rem; font-weight: 700; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .8); }
.mc-badge.rev { background: var(--holo); color: #2A1830; }
.mc-name { font-size: .78rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.mc-name small { display: block; margin-top: 2px; font-family: var(--font-mono); font-weight: 500; font-size: .66rem; color: var(--muted); }
.empty-note { margin: 0; font-size: .86rem; color: var(--muted); }

/* Profile page */
.profile-card { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: clamp(20px, 4vw, 32px); border-radius: 20px; border: 1px solid var(--line);
  background: radial-gradient(60% 140% at 0% 0%, rgba(88, 101, 242, .2), transparent 60%), radial-gradient(40% 120% at 100% 100%, rgba(239, 127, 227, .1), transparent 70%), var(--panel); }
.pf-id { display: grid; gap: 6px; flex: 1; min-width: 220px; }
.pf-id h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: .95; overflow-wrap: anywhere; }
.dchip { display: inline-flex; align-items: center; gap: 7px; justify-self: start; padding: 4px 10px; border-radius: 99px; background: rgba(88, 101, 242, .18); color: #C9CDFF; font-size: .78rem; font-weight: 600; }
.pf-note { margin: 0; font-size: .78rem; color: var(--faint); }
.pstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
@media (max-width: 760px) { .pstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pstat { display: grid; gap: 6px; align-content: start; padding: 16px 18px; background: var(--panel); min-width: 0; }
.pstat > span { font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.pstat b { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pstat small { font-size: .78rem; color: var(--muted); }
.vitrine { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px 14px; }
@media (max-width: 560px) { .vitrine { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pref-row:last-child { border-bottom: 0; padding-bottom: 0; }
.pref-row b { font-weight: 600; }
.pref-row span { display: block; font-size: .8rem; color: var(--muted); }

/* Landing (signed out) */
main.lp { display: block; padding-block: 0; }
.lp-hero { position: relative; isolation: isolate; overflow: hidden; }
.lp-hero::before { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 50% at 72% 42%, rgba(239, 127, 227, .2), transparent 70%), radial-gradient(30% 40% at 18% 20%, rgba(130, 90, 255, .12), transparent 70%); }
.lp-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; padding-block: clamp(40px, 7vw, 96px); }
.lp-copy { display: grid; gap: 22px; }
.lp-game { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lp-game img { height: 54px; width: auto; filter: drop-shadow(0 8px 20px rgba(239, 127, 227, .25)); }
.lp-game .eyebrow { color: var(--muted); }
.lp-h1 { font-size: clamp(3rem, 7.4vw, 6.2rem); font-stretch: 72%; font-weight: 900; line-height: .86; }
.lp-h1 em { font-style: normal; background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lede { margin: 0; max-width: 50ch; font-size: 1.08rem; color: var(--muted); }
.lp-lede b { color: var(--fg); font-weight: 600; }
.lp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.lp-note { margin: 0; max-width: 34ch; font-size: .82rem; color: var(--faint); }
.lp-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.lp-facts div { display: grid; }
.lp-facts b { font-family: var(--font-display); font-weight: 900; font-stretch: 72%; font-size: 2rem; line-height: 1; }
.lp-facts span { font-size: .78rem; color: var(--muted); }
.lp-fan { --cw: clamp(150px, 16vw, 222px); --dx: 62px; --rot: 7deg; position: relative; height: calc(var(--cw) * 1.75); max-width: 100%; }
.lp-fan:not(.dealt) { --dx: 6px; --rot: 1.5deg; }
.lp-fan.dealt:hover { --dx: 76px; --rot: 8.5deg; }
.lp-card { position: absolute; left: 50%; bottom: 4%; width: var(--cw); margin-left: calc(var(--cw) / -2); perspective: 900px; transform-origin: 50% 130%;
  transform: translateX(calc(var(--i) * var(--dx))) translateY(calc(var(--a) * 14px + var(--lift, 0px))) rotate(calc(var(--i) * var(--rot)));
  transition: transform .8s var(--ease); transition-delay: calc(var(--a) * 60ms); z-index: var(--z); }
.lp-card:hover { --lift: -30px; z-index: 9; transition-delay: 0ms; transition-duration: .4s; }
.lp-card .card-3d { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 44px -20px rgba(0, 0, 0, .95); }
.lp-card.is-hover .card-3d { transition: transform .1s linear, box-shadow .3s; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 34px 60px -22px color-mix(in oklab, var(--glow) 70%, transparent); }
@media (max-width: 900px) {
  .lp-hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .lp-fan { --cw: clamp(112px, 28vw, 170px); --dx: clamp(40px, 11vw, 64px); height: calc(var(--cw) * 2); order: -1; }
  .lp-fan.dealt:hover { --dx: clamp(44px, 12vw, 72px); }
}
.lp-section { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.lp-head { display: grid; gap: 10px; margin-bottom: 30px; max-width: 60ch; }
.lp-head h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-stretch: 72%; font-weight: 900; line-height: .92; }
.lp-head p { margin: 0; color: var(--muted); }
.lp-head .eyebrow { color: var(--muted); }
.lp-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .lp-feats { grid-template-columns: minmax(0, 1fr); } }
.lp-feat { display: grid; gap: 14px; align-content: start; padding: 14px 14px 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.lp-feat h3 { font-size: 1.15rem; font-weight: 650; padding-inline: 4px; }
.lp-feat p { margin: 0; font-size: .92rem; color: var(--muted); padding-inline: 4px; }
.lp-vig { position: relative; height: 236px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; padding: 34px 16px 14px; }
.lp-tag { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 2px 8px; border-radius: 99px; background: rgba(18, 16, 21, .9); border: 1px solid var(--line-2); font-size: .64rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.lp-mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; height: 100%; align-content: center; justify-items: center; }
.lp-mini { position: relative; width: min(74px, 100%); aspect-ratio: 63 / 88; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.lp-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lp-mini.off img { filter: grayscale(1) brightness(.45); }
.lp-mini i { position: absolute; left: 4px; bottom: 4px; padding: 1px 5px; border-radius: 99px; font-style: normal; font-size: .56rem; font-weight: 700; background: #F5F2F7; color: #121015; }
.lp-mini.off i { background: rgba(0, 0, 0, .55); color: rgba(255, 255, 255, .8); border: 1px dashed rgba(255, 255, 255, .4); }
.lp-bst { display: grid; gap: 8px; height: 100%; align-content: center; }
.lp-input { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--accent); background: var(--panel); font-family: var(--font-mono); font-size: .86rem; }
.lp-caret { display: inline-block; width: 1px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--fg); }
@media (prefers-reduced-motion: no-preference) { .lp-caret { animation: blink 1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }
.lp-pull { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); }
.lp-pull .t { position: relative; width: 26px; aspect-ratio: 63 / 88; border-radius: 3px; overflow: hidden; }
.lp-pull .t img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lp-pull b { font-size: .8rem; font-weight: 600; }
.lp-pull small { display: block; font-family: var(--font-mono); font-size: .66rem; color: var(--muted); }
.lp-pill { padding: 2px 8px; border-radius: 99px; font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.lp-pill.new { background: var(--accent); color: #1C0A1A; }
.lp-pill.dup { border: 1px solid var(--line-2); color: var(--muted); }
.lp-pill.rev { background: var(--holo); color: #2A1830; }
.lp-prog { display: grid; gap: 11px; height: 100%; align-content: center; }
.lp-prow { display: grid; grid-template-columns: 32px minmax(0, 1fr) 46px; align-items: center; gap: 10px; }
.lp-prow .bar { height: 4px; }
.lp-prow .bar i { background: var(--rbg); }
.lp-prow .n { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); text-align: right; }
.lp-essences { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
@media (max-width: 900px) { .lp-essences { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lp-ess { display: grid; gap: 10px; justify-items: start; padding: 20px 18px; background: var(--bg); min-width: 0; }
.lp-ess img { height: 30px; width: auto; max-width: 48px; object-fit: contain; object-position: left center; }
.lp-ess b { font-weight: 650; }
.lp-ess span { font-size: .8rem; color: var(--muted); }
.lp-closing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(28px, 5vw, 48px); border-radius: 24px; border: 1px solid var(--line);
  background: radial-gradient(60% 120% at 85% 50%, rgba(239, 127, 227, .16), transparent 70%), var(--panel); }
.lp-closing h2 { font-size: clamp(2rem, 5vw, 3.6rem); font-stretch: 72%; font-weight: 900; line-height: .9; max-width: 14ch; }
.lp-closing p { margin: 10px 0 0; color: var(--muted); max-width: 46ch; }
.lp-footer { padding-block: 32px 48px; color: var(--faint); font-size: .8rem; display: grid; gap: 6px; }
.lp-footer p { margin: 0; }
.lp-footer a { color: var(--muted); text-decoration: none; }
.lp-footer a:hover { color: var(--fg); text-decoration: underline; }

/* Toasts: a stack shown in the top layer, so it stays above open dialogs */
.toasts { position: fixed; inset: auto auto calc(20px + env(safe-area-inset-bottom, 0px)) 50%; transform: translateX(-50%); margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; z-index: 60;
  width: min(460px, calc(100% - 32px)); height: auto; display: grid; gap: 8px; justify-items: center; color: var(--fg); pointer-events: none; }
.toasts:not(:popover-open) { display: none; }
.toast { --tcol: #6FE3A5; display: flex; align-items: center; gap: 10px; max-width: 100%; padding: 8px 14px 8px 8px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(28, 23, 32, .96); color: var(--fg); font-size: .88rem; font-weight: 500; line-height: 1.35; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.toast[data-type="info"] { --tcol: #8EC5FF; }
.toast[data-type="fav"] { --tcol: #FF5FA2; }
.toast[data-type="pack"] { --tcol: #CBD8FF; }
.toast[data-type="error"] { --tcol: #FF6F80; border-color: color-mix(in oklab, #FF6F80 50%, var(--line-2)); }
.t-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--tcol); background: color-mix(in oklab, var(--tcol) 16%, transparent); }
.t-msg { min-width: 0; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: no-preference) { .toast.in { animation: toast-in .32s var(--ease) both; } .toast.out { animation: toast-out .24s ease both; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* Booster button styled like a foil pack */
.btn-pack { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 16px 0 11px; border-radius: 11px; border: 1.5px solid transparent; cursor: pointer; color: var(--fg); font-weight: 650; font-size: .88rem; white-space: nowrap;
  background: linear-gradient(120deg, #2A1B2E, #1B1726 55%, #14232A) padding-box, linear-gradient(110deg, #FF6FD8, #9C8CFF 33%, #4FE0C2 66%, #FF6FD8) border-box; background-size: 100% 100%, 200% 100%;
  box-shadow: 0 8px 24px -12px rgba(255, 111, 216, .55); transition: transform .2s var(--ease), box-shadow .3s; }
.btn-pack::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; transform: translateX(-110%);
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .16) 45%, rgba(203, 216, 255, .2) 52%, transparent 66%); }
.btn-pack:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -12px rgba(239, 127, 227, .65); }
.pack-ic { display: grid; place-items: center; transform: rotate(-8deg); transition: transform .3s var(--ease); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.btn-pack:hover .pack-ic { transform: rotate(5deg) scale(1.1); }
@media (prefers-reduced-motion: no-preference) {
  .btn-pack:hover::after { animation: packsheen .9s var(--ease); }
  .btn-pack:hover { animation: packborder 2.4s linear infinite; }
}
@keyframes packsheen { to { transform: translateX(110%); } }
@keyframes packborder { to { background-position: 0 0, 200% 0; } }
@media (max-width: 680px) { .btn-pack { padding: 0 11px; } }

/* Avatars: an essence emblem or a crop of a card */
.av-slot { display: inline-flex; line-height: 0; }
.av { position: relative; display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, color-mix(in oklab, var(--c, #8A8294) 42%, #1A1520), #0E0C11 78%); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--c, #8A8294) 75%, transparent); }
.av-ess img { width: 66%; height: auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.av-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(2.1); transform-origin: 50% 30%; }
.av-card::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--c, #8A8294) 75%, transparent); }
.av.md { width: 48px; height: 48px; }
.av.lg { width: 92px; height: 92px; box-shadow: inset 0 0 0 3px color-mix(in oklab, var(--c, #8A8294) 80%, transparent), 0 0 0 3px var(--panel), 0 0 0 5px #5865F2; }
.av.lg.av-card::after { box-shadow: inset 0 0 0 3px color-mix(in oklab, var(--c, #8A8294) 80%, transparent); }
.av-pick { display: grid; gap: 16px; }
.av-group { display: grid; gap: 8px; }
.av-cap { font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.av-row { display: flex; flex-wrap: wrap; gap: 8px; }
.av-opt { display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; background: none; line-height: 0; cursor: pointer; transition: transform .15s var(--ease); }
.av-opt:hover { transform: translateY(-2px); }
.av-opt[aria-checked="true"] { box-shadow: 0 0 0 2px var(--accent); }

/* Favourites (hearts) */
.tile-wrap { position: relative; min-width: 0; }
.fav-btn { position: absolute; top: 8px; right: 8px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: #fff;
  background: rgba(10, 9, 12, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s var(--ease), color .2s; }
.tile-wrap:hover .fav-btn, .fav-btn:focus-visible, .fav-btn.on { opacity: 1; transform: none; }
@media (hover: none) { .fav-btn { opacity: 1; transform: none; } }
.fav-btn:hover { color: #FF5FA2; }
.fav-btn.on { color: #FF5FA2; background: rgba(10, 9, 12, .78); }
.fav-btn.on svg, .fav-toggle.on svg { fill: currentColor; }
@media (prefers-reduced-motion: no-preference) { .pop { animation: pop .38s var(--ease); } }
@keyframes pop { 45% { transform: scale(1.28); } }
.d-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fav-toggle { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); cursor: pointer; transition: color .2s, border-color .2s; }
.fav-toggle:hover { color: #FF5FA2; border-color: #FF5FA2; }
.fav-toggle.on { color: #FF5FA2; border-color: color-mix(in oklab, #FF5FA2 60%, transparent); background: color-mix(in oklab, #FF5FA2 14%, var(--panel-2)); }

/* Stats page, editorial layout: a label column and a content column per topic */
.st-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px 56px; align-items: end; padding-block: 16px 32px; border-bottom: 1px solid var(--line); }
.st-big { margin: 10px 0 0; font-family: var(--font-display); font-weight: 900; font-stretch: 72%; font-size: clamp(5rem, 15vw, 10rem); line-height: .8; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.st-big small { margin-left: 8px; font-size: .36em; color: var(--muted); letter-spacing: 0; }
.st-sub { margin: 16px 0 0; max-width: 46ch; color: var(--muted); }
.st-sub b { color: var(--fg); font-weight: 600; }
.st-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.st-kpis div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.st-kpis div:nth-child(odd) { padding-right: 24px; }
.st-kpis div:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
.st-kpis dt { font-size: .84rem; color: var(--muted); }
.st-kpis dd { margin: 0; font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600; }
.st-kpis dd small { color: var(--faint); font-weight: 500; }
@media (max-width: 480px) {
  .st-kpis div { flex-direction: column; align-items: flex-start; gap: 3px; }
  .st-kpis div:nth-child(odd) { padding-right: 14px; }
  .st-kpis div:nth-child(even) { padding-left: 14px; }
}
.st-sec { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px 56px; padding-block: 40px; border-bottom: 1px solid var(--line); }
.st-sec:last-child { border-bottom: 0; }
.st-label { display: grid; gap: 10px; align-content: start; align-self: start; position: sticky; top: 84px; }
.st-label h2 { font-size: 2rem; font-stretch: 72%; font-weight: 900; line-height: .92; }
.st-label p { margin: 0; font-size: .86rem; color: var(--muted); }
.st-label .linkish { justify-self: start; font-size: .84rem; }
.st-body { min-width: 0; }
.st-legend { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: .78rem; color: var(--muted); }
.st-legend li { display: flex; align-items: center; gap: 8px; }
.lg-pk { position: relative; flex: none; width: 19px; height: 26px; border-radius: 3px; overflow: hidden; background: #3A3440; }
.lg-pk.miss { background: none; border: 1px dashed var(--faint); }
@media (max-width: 860px) {
  .st-hero, .st-sec { grid-template-columns: minmax(0, 1fr); }
  .st-label { position: static; }
  .st-sec { padding-block: 28px; }
}
.binder-ext + .binder-ext { margin-top: 28px; }
.binder-ext h3 { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 12px; font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.binder-ext h3 span { font-family: var(--font-mono); letter-spacing: 0; }
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 16px 14px; }
.page { display: grid; gap: 6px; }
.page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 6px; border-radius: 8px; background: #0F0D12; border: 1px solid var(--line); }
.pocket { position: relative; display: block; aspect-ratio: 63 / 88; padding: 0; border: 1px dashed #322B38; border-radius: 3px; background: transparent; overflow: hidden; cursor: pointer; }
.pocket.on { border: 0; background: var(--panel-2); }
.pocket img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pocket .pn { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: .54rem; color: var(--faint); }
.pocket:hover, .pocket:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 1px; z-index: 1; }
.pocket.ghost { border: 1px solid #1B171F; cursor: default; }
.pk-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; gap: 2px; height: 7px; padding: 2px; background: #0F0D12; }
.pk-bar i { flex: 1; border-radius: 1.5px; background: rgba(255, 255, 255, .1); }
.pk-bar i.on { background: #F5F2F7; }
.pk-bar i.r.on { background: var(--holo-vivid); }
.pocket.ghost:hover { outline: 0; }
.page-num { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .66rem; color: var(--faint); }
.rrow { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 10px 22px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rrow:first-child { padding-top: 0; }
.rrow:last-child { border-bottom: 0; padding-bottom: 0; }
.rlabel { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--fg); text-align: left; cursor: pointer; }
.rlabel > span:last-child { display: grid; }
.rlabel b { font-weight: 600; font-size: .92rem; }
.rlabel small { font-family: var(--font-mono); font-size: .68rem; color: var(--faint); }
.rlabel:hover b { text-decoration: underline; }
.pipwrap { display: grid; gap: 8px; min-width: 0; }
.pipline { display: grid; grid-template-columns: 54px minmax(0, 1fr) 56px; gap: 10px; align-items: center; }
.pl { font-size: .72rem; color: var(--muted); }
.pips { display: flex; flex-wrap: wrap; gap: 3px; }
.pips i { width: 8px; height: 11px; border-radius: 2px; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--rc) 40%, transparent); }
.pips i.on { background: var(--rbg); box-shadow: none; }
.pips.rev i { width: 9px; height: 9px; border-radius: 50%; }
.pips.rev i.on { background: var(--holo); }
.pc { font-family: var(--font-mono); font-size: .82rem; text-align: right; }
.pc small { color: var(--faint); }
@media (max-width: 640px) { .rrow { grid-template-columns: minmax(0, 1fr); } }
.st-ess, .st-types { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.st-ess { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.st-types { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; }
@media (max-width: 760px) { .st-ess, .st-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ecell { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ic n" "c c" "b b"; gap: 8px 10px; align-items: center; padding: 14px; border: 0; background: var(--bg); color: var(--fg); text-align: left; cursor: pointer; }
.ecell:hover { background: var(--panel); }
.ecell > img, .ecell > .tdot { grid-area: ic; }
.ecell > img { height: 20px; width: 30px; object-fit: contain; object-position: left center; }
.ecell > .tdot { width: 9px; height: 9px; }
.en { grid-area: n; display: grid; min-width: 0; }
.en b { font-weight: 600; font-size: .88rem; }
.en small { font-size: .72rem; color: var(--faint); overflow-wrap: anywhere; }
.ec { grid-area: c; font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600; }
.ec small { color: var(--faint); font-weight: 500; }
.ebar { grid-area: b; height: 3px; border-radius: 3px; background: var(--bar-track); overflow: hidden; }
.ebar i { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--tc)); }
.st-trade { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
@media (max-width: 640px) { .st-trade { grid-template-columns: minmax(0, 1fr); } }
.st-trade li { border-bottom: 1px solid var(--line); }
.st-trade button { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 8px 0; border: 0; background: none; color: var(--fg); text-align: left; cursor: pointer; }
.st-trade button:hover b { text-decoration: underline; }
.st-trade .thumb { width: 30px; }
.st-trade b { font-weight: 600; font-size: .88rem; }
.st-trade small { display: block; font-family: var(--font-mono); font-size: .68rem; color: var(--muted); }
.st-trade .plus { font-family: var(--font-display); font-weight: 900; font-stretch: 72%; font-size: 1.45rem; line-height: 1; }

/* My data (GDPR) and account deletion */
.sp-link { font-size: .8rem; color: var(--muted); text-decoration: none; }
.sp-link:hover { color: var(--fg); text-decoration: underline; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #2A0910; }
.btn.danger:hover:not(:disabled) { background: #FF8593; }
.btn.danger:disabled { opacity: .35; cursor: not-allowed; }
.modal { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); margin: auto; padding: 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); color: var(--fg); box-shadow: 0 40px 90px -30px #000; overflow: auto; }
.modal::backdrop { background: rgba(6, 5, 8, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@media (prefers-reduced-motion: no-preference) { .modal[open] { animation: rise .3s var(--ease) both; } }
.del { display: grid; gap: 16px; padding: 24px; }
.del h2 { font-size: 2rem; font-stretch: 72%; font-weight: 900; line-height: .92; }
.del p { margin: 0; color: var(--muted); font-size: .9rem; }
.del-list { margin: 0; padding: 12px 14px 12px 30px; display: grid; gap: 4px; border-radius: 12px; border: 1px solid color-mix(in oklab, var(--danger) 32%, var(--line)); background: color-mix(in oklab, var(--danger) 7%, var(--panel-2)); font-size: .88rem; }
.del-list b { font-family: var(--font-mono); font-weight: 600; }
.del-field { display: grid; gap: 8px; }
.del-field label { font-size: .88rem; }
.del-field b { font-family: var(--font-mono); letter-spacing: .06em; }
.del-field input { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--fg); font-family: var(--font-mono); font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; }
.del-field input:focus-visible { outline: none; border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in oklab, var(--danger) 22%, transparent); }
.del-msg { color: var(--fg) !important; font-weight: 600; }
.del-msg.err { color: var(--danger) !important; }
.del-msg:empty { display: none; }
.del-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

/* Home page when signed in */
.btn-open { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 26px; border-radius: 14px; background: #F5F2F7; color: #121015; font-weight: 650; font-size: 1.06rem; text-decoration: none; box-shadow: 0 10px 30px -12px rgba(245, 242, 247, .45); transition: transform .2s var(--ease), background .2s; }
.btn-open:hover { background: #fff; transform: translateY(-1px); }
.btn-open svg { transition: transform .2s var(--ease); }
.btn-open:hover svg { transform: translateX(3px); }

/* Navbar search (cards and collectors) */
.gsearch { position: relative; }
.gs-field { position: relative; display: flex; align-items: center; }
.gs-ic { position: absolute; left: 11px; display: grid; color: var(--faint); pointer-events: none; }
#gq { width: 260px; height: 38px; padding: 0 34px 0 34px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--fg); font-size: .88rem; transition: border-color .2s, width .25s var(--ease); }
#gq::placeholder { color: var(--faint); }
#gq:focus-visible { outline: none; border-color: var(--accent); }
#gq::-webkit-search-cancel-button { display: none; }
.gs-kbd { position: absolute; right: 9px; min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; border: 1px solid var(--line-2); color: var(--faint); font-family: var(--font-mono); font-size: .7rem; pointer-events: none; }
#gq:focus ~ .gs-kbd, #gq:not(:placeholder-shown) ~ .gs-kbd { display: none; }
.gs-toggle, .gs-close { display: none; }
.gs-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 25; width: min(420px, calc(100vw - 24px)); max-height: min(520px, 75vh); overflow: auto; padding: 6px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: 0 26px 56px -20px rgba(0, 0, 0, .95); }
.gs-group { padding: 8px 10px 4px; font-size: .68rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.gs-opt { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 7px 10px; border-radius: 9px; cursor: pointer; }
.gs-opt[aria-selected="true"], .gs-opt:hover { background: var(--panel-2); }
.gs-opt .thumb { width: 30px; }
.gs-opt b { display: block; font-weight: 600; font-size: .88rem; overflow-wrap: anywhere; }
.gs-opt small { display: block; font-family: var(--font-mono); font-size: .7rem; color: var(--muted); }
.gs-opt .av { width: 30px; height: 30px; }
.gs-tag { font-size: .7rem; font-weight: 600; white-space: nowrap; color: var(--muted); }
.gs-tag.on { color: #6FE3A5; }
.gs-all { grid-template-columns: 34px minmax(0, 1fr); color: var(--accent); font-weight: 600; font-size: .86rem; }
.gs-all span:first-child { display: grid; place-items: center; }
.gs-empty { margin: 0; padding: 14px 10px; font-size: .86rem; color: var(--muted); }
.toplink { color: var(--muted); font-weight: 600; font-size: .88rem; text-decoration: none; }
.toplink:hover { color: var(--fg); }

/* Navbar: progressively compact as the screen narrows */
@media (max-width: 1340px) { #btn-booster .lbl { display: none; } #btn-booster { padding: 0 11px; } }
@media (max-width: 1180px) { #gq { width: 200px; } .brand .wordmark { display: none; } }
@media (max-width: 1040px) {
  .gs-toggle { display: inline-grid; }
  .gs-field { display: none; }
  .gsearch.open .gs-field { display: flex; position: fixed; z-index: 30; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top, 0px)); }
  .gsearch.open #gq { width: 100%; height: 42px; padding-right: 44px; background: var(--panel-2); box-shadow: 0 16px 40px -10px #000; }
  .gsearch.open .gs-close { display: grid; place-items: center; position: absolute; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
  .gsearch.open .gs-kbd { display: none; }
  .gs-pop { position: fixed; left: 12px; right: 12px; top: calc(60px + env(safe-area-inset-top, 0px)); width: auto; z-index: 30; }
}
@media (max-width: 900px) { .mainnav a[data-nav="accueil"], .mainnav a[data-nav="docs"] { display: none; } }
@media (max-width: 600px) { .mainnav a[data-nav="collectionneurs"] { display: none; } .toplink { display: none; } }
@media (max-width: 420px) {
  .brand img { height: 24px; }
  .mainnav { margin-left: 0; gap: 0; }
  .mainnav a { padding: 8px 7px; font-size: .85rem; }
  .top-right { gap: 8px; }
  .gs-toggle, #btn-booster { width: 36px; height: 36px; padding: 0; justify-content: center; }
}

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 10px; padding: 4px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: .86rem; cursor: pointer; }
.sw-track { position: relative; width: 44px; height: 26px; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.sw-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #F5F2F7; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); transition: transform .25s var(--ease); }
.switch[aria-checked="true"] { color: var(--fg); }
.switch[aria-checked="true"] .sw-track { background: #3FBF83; }
.switch[aria-checked="true"] .sw-knob { transform: translateX(18px); }
.switch:focus-visible { outline: none; }
.switch:focus-visible .sw-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Collectors */
.pg-head { display: grid; gap: 10px; padding-block: 16px 24px; }
.pg-head h1 { overflow-wrap: anywhere; font-size: clamp(2.1rem, 9vw, 4.6rem); font-stretch: 72%; font-weight: 900; line-height: .88; }
.pg-head p:last-child { margin: 0; max-width: 62ch; color: var(--muted); }
.demo-note { margin: 0 0 20px; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--line-2); color: var(--muted); font-size: .84rem; max-width: 80ch; }
.mem-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; font-size: .86rem; }
.mem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.mem { position: relative; display: grid; gap: 14px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); text-decoration: none; transition: border-color .2s, transform .2s var(--ease); }
.mem:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mem:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mem-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mem-top > span:last-child { display: grid; gap: 4px; min-width: 0; }
.mem-name { font-weight: 650; font-size: 1.02rem; overflow-wrap: anywhere; }
.mem-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mchip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: .68rem; font-weight: 650; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.mchip.me { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.mchip.pub { color: #6FE3A5; border-color: color-mix(in oklab, #6FE3A5 40%, transparent); }
.mem-prog { display: grid; gap: 7px; }
.mem-prog .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .8rem; color: var(--muted); }
.mem-prog b { font-family: var(--font-display); font-weight: 900; font-stretch: 72%; font-size: 1.9rem; line-height: 1; color: var(--fg); }
.mem-trade { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); }
.mem-trade b { color: var(--fg); font-family: var(--font-mono); }
.mem-favs { display: flex; gap: 6px; min-height: 52px; }
.mem-favs .thumb { width: 37px; border-radius: 4px; }
.mem-favs .none { align-self: center; font-size: .78rem; color: var(--faint); }
.mem.cta { align-content: center; justify-items: start; border-style: dashed; background: transparent; }
.mem.cta p { margin: 0; font-size: .86rem; color: var(--muted); }
.mb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; padding-block: 20px 32px; border-bottom: 1px solid var(--line); }
.mb-head h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-stretch: 72%; font-weight: 900; line-height: .9; overflow-wrap: anywhere; }
.mb-id { display: grid; gap: 8px; flex: 1; min-width: 220px; }
.mb-kpis { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0; }
.mb-kpis div { display: grid; }
.mb-kpis dt { font-size: .74rem; color: var(--muted); }
.mb-kpis dd { margin: 0; font-family: var(--font-mono); font-weight: 600; font-size: 1.1rem; }
.mb-kpis dd small { color: var(--faint); font-weight: 500; }
.mb-trades { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
@media (max-width: 760px) { .mb-trades { grid-template-columns: minmax(0, 1fr); } }
.mb-h3 { margin: 0 0 6px; font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.st-trade.one { grid-template-columns: minmax(0, 1fr); }
.st-trade.cap li:nth-child(n+11):not(.more) { display: none; }
.st-trade:not(.cap) li.more { display: none; }
.st-trade li.more { border-bottom: 0; padding: 10px 0 0; font-size: .86rem; }
.st-trade li.more button { display: inline; width: auto; padding: 0; color: var(--accent); font-weight: 600; }
.lg-back { justify-self: start; display: inline-block; margin: 12px 0 8px; font-size: .88rem; text-decoration: none; }
.bst-head .eyebrow { margin-bottom: 4px; }

/* Documentation extras */
.dc-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.dc-steps li { color: #CFC8D6; font-size: .95rem; line-height: 1.6; }
.dc-rar { display: grid; border-top: 1px solid var(--line); }
.dc-rar > div { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.dc-rar small { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); }
.dc-ess { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dc-ess > div { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: .86rem; }
.dc-ess img { width: 26px; height: 18px; object-fit: contain; }
.dc-ess span { display: grid; }
.dc-ess small { font-size: .72rem; color: var(--muted); }
.lg-body kbd, .bst-help kbd { padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--panel-2); font-family: var(--font-mono); font-size: .8em; }
.lg-body .acc { border-bottom: 1px solid var(--line); }

/* Import preview */
.imp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.imp-stats div { padding: 10px 12px; background: var(--panel-2); }
.imp-stats dt { font-size: .72rem; color: var(--muted); }
.imp-stats dd { margin: 2px 0 0; font-family: var(--font-mono); font-weight: 600; font-size: 1.15rem; }
.imp-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 240px; overflow: auto; border-top: 1px solid var(--line); }
.imp-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .84rem; }
.imp-list li span:last-child { flex: none; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.imp-list .up { color: #6FE3A5; }
.imp-list .down { color: var(--danger); }
.imp-warn { margin-top: 10px !important; font-size: .82rem !important; }

/* Legal notice page */
.legal { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px 64px; padding-block: 24px 72px; }
.lg-head { grid-column: 1 / -1; display: grid; gap: 10px; justify-items: start; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.lg-head h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-stretch: 72%; font-weight: 900; line-height: .9; max-width: 15ch; }
.lg-head > p { margin: 0; color: var(--muted); }
.lg-draft { max-width: 72ch; padding: 10px 14px; border-radius: 10px; border: 1px dashed rgba(255, 199, 59, .45); font-size: .86rem; color: var(--fg) !important; }
mark.todo { padding: 1px 5px; border-radius: 5px; background: rgba(255, 199, 59, .18); color: #FFE19A; }
.lg-toc { position: sticky; top: 84px; align-self: start; display: grid; gap: 2px; }
.lg-toc button { padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: .88rem; text-align: left; cursor: pointer; }
.lg-toc button:hover { background: var(--panel); color: var(--fg); }
.lg-body { display: grid; gap: 44px; max-width: 72ch; min-width: 0; }
.lg-body section { display: grid; gap: 12px; scroll-margin-top: 84px; }
.lg-body h2 { font-size: 1.7rem; font-stretch: 72%; font-weight: 900; line-height: 1; }
.lg-body h3 { margin: 6px 0 0; font-size: 1rem; font-weight: 650; }
.lg-body p, .lg-body li { margin: 0; color: #CFC8D6; font-size: .95rem; line-height: 1.6; }
.lg-body b { color: var(--fg); font-weight: 600; }
.lg-body ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.lg-body a { color: var(--accent); }
.lg-body dl { margin: 0; display: grid; grid-template-columns: 220px minmax(0, 1fr); border-top: 1px solid var(--line); }
.lg-body dt, .lg-body dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.lg-body dt { color: var(--muted); }
.lg-cta { font-weight: 600; }
@media (max-width: 820px) {
  .legal { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .lg-toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .lg-toc button { border: 1px solid var(--line-2); font-size: .82rem; }
  .lg-body dl { grid-template-columns: minmax(0, 1fr); }
  .lg-body dt { padding-bottom: 0; border-bottom: 0; }
}
.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 28px 40px; margin-top: 48px; border-top: 1px solid var(--line); color: var(--faint); font-size: .8rem; }
.site-foot p { margin: 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--fg); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-3d { transition: none; }
}
