:root {
  --bg: #0b0a10;
  --bg2: #100f17;
  --panel: #15141d;
  --panel2: #1c1b26;
  --line: #2a2836;
  --text: #eeedf5;
  --muted: #8d8ba3;
  --dim: #5e5c72;
  --accent: #ff3d7f;
  --accent2: #7c5cff;
  --gold: #f5b301;
  --ok: #3ecf8e;
  --radius: 14px;
  --display: 'Unbounded', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--text); }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.01em; }
[hidden] { display: none !important; }
.wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
main { flex: 1; padding-bottom: 48px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(11, 10, 16, .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-in { width: min(1200px, 100% - 32px); margin: 0 auto; display: flex; align-items: center; gap: 22px; height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 900; font-size: 17px; letter-spacing: .04em; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent2)); font-size: 15px; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; padding: 8px 11px; border-radius: 9px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); }
.nav a.on::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: -11px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav a.nav-hot, .nav a.nav-hot:hover, .nav a.nav-hot.on { color: #ff3b5c; }
.nav a.nav-hot.on::after { background: #ff3b5c; }
.nav a.nav-gold, .nav a.nav-gold:hover, .nav a.nav-gold.on { color: #facc15; }
.nav a.nav-gold.on::after { background: #facc15; }
/* bouton « Plus » et son menu (Échanges, Wiki, Classement) */
.nav-more-btn { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 8px 11px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; }
.nav-more-btn:hover, .nav-more-btn.open { color: var(--text); background: var(--panel); }
.nav-more-btn.on { color: var(--text); }
.nav-more-btn.on::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -11px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-more-btn svg { transition: transform .15s; }
.nav-more-btn.open svg { transform: rotate(180deg); }
.nav-menu { position: fixed; z-index: 60; min-width: 190px; padding: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 2px; animation: fade .15s; }
.nav-menu[hidden] { display: none; }
.nav-menu a { position: relative; padding: 10px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; }
.nav-menu a:hover { color: var(--text); background: var(--panel2); }
.nav-menu a.on { color: var(--text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.nav-menu .dot { top: 50%; right: 12px; transform: translateY(-50%); }
.dot { position: absolute; top: 6px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.res { display: flex; align-items: center; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 700; font-size: 13px; white-space: nowrap; }
.chip small { color: var(--muted); font-weight: 500; }
.chip.shards { color: #7dd3fc; }
.chip.online { gap: 7px; color: var(--muted); font-variant-numeric: tabular-nums; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ecf8e; box-shadow: 0 0 0 0 rgba(62,207,142,.6); animation: live-pulse 2s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(62,207,142,.6); } 70% { box-shadow: 0 0 0 6px rgba(62,207,142,0); } 100% { box-shadow: 0 0 0 0 rgba(62,207,142,0); } }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: hsl(var(--hue, 300) 70% 45%); border: 2px solid rgba(255,255,255,.2); }
@media (max-width: 1100px) {   /* la barre de navigation passe sur sa propre ligne */
  .top-in { flex-wrap: wrap; height: auto; padding: 10px 0 0; gap: 10px; }
  .nav { order: 3; flex-basis: 100%; padding-bottom: 6px; }
  .nav a.on::after, .nav-more-btn.on::after { bottom: -1px; }
  .res { margin-left: auto; }
  #res-free small { display: none; }
}

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); font-weight: 700; white-space: nowrap; transition: transform .12s, filter .12s, background .12s; }
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--bc, var(--accent)); border-color: transparent; color: #fff; box-shadow: 0 6px 24px -6px var(--bc, var(--accent)); }
.btn.light { background: #fff; color: #111; border-color: #fff; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.off { opacity: .45; pointer-events: none; }
.btn .pill { background: rgba(0,0,0,.25); padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.seg { display: inline-flex; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--sc, #fff); color: #111; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---------- page head ---------- */
.phead { padding: 36px 0 22px; }
.phead h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 900; margin: 6px 0 6px; }
.phead p { color: var(--muted); margin: 0; max-width: 640px; }
.section-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 40px 0 16px; }
.section-title h2 { font-size: 24px; font-weight: 800; }
.section-title .spacer { flex: 1; }
.link { color: var(--accent); font-weight: 600; font-size: 13px; }

/* ---------- cartes ---------- */
.card {
  --w: 160px; --rc: #999;
  position: relative; width: var(--w); aspect-ratio: 5 / 7; flex: none;
  font-size: calc(var(--w) * .074);
  border-radius: calc(var(--w) * .07); padding: calc(var(--w) * .03);
  background: linear-gradient(150deg, color-mix(in srgb, var(--rc) 90%, #fff), color-mix(in srgb, var(--rc) 50%, #000));
  box-shadow: 0 8px 22px -6px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.1) inset;
  transition: transform .18s ease, box-shadow .18s;
  user-select: none;
}
.card.click { cursor: pointer; }
.card.click:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -8px color-mix(in srgb, var(--rc) 60%, transparent); }
.card-in { height: 100%; border-radius: calc(var(--w) * .05); background: #14121b; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: .3em; padding: .38em .5em .3em; font-weight: 800; }
.card-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--display); font-size: .82em; }
.card-gem { flex: none; width: 1.25em; height: 1.25em; border-radius: 50%; display: grid; place-items: center; background: var(--rc); color: #0b0a10; font-size: .62em; font-weight: 900; box-shadow: 0 0 .6em color-mix(in srgb, var(--rc) 70%, transparent); }
.card-art { position: relative; flex: 1; margin: 0 .32em; border-radius: .32em; overflow: hidden; background: #222; }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-num { position: absolute; left: .45em; bottom: .3em; font-family: var(--mono); font-size: .52em; color: rgba(255,255,255,.85); text-shadow: 0 1px 2px #000; }
.card-series { font-size: .54em; padding: .45em .65em 0; color: #c7c5d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-stats { display: flex; justify-content: space-between; padding: .2em .65em .5em; font-size: .56em; font-weight: 800; letter-spacing: .03em; color: #e4e2f0; }
.card-stats b { font-weight: 900; }
.card .badge-new { position: absolute; top: -.75em; left: 50%; transform: translateX(-50%); z-index: 3; overflow: hidden; background: linear-gradient(135deg, #fff6c2, #ffd23f 45%, #ff9f1c); color: #2a1600; font-weight: 900; font-size: .75em; letter-spacing: .04em; text-transform: uppercase; padding: .28em .9em; border-radius: 999px; border: 1px solid rgba(255,255,255,.85); box-shadow: 0 0 8px rgba(255,210,63,.9), 0 0 18px rgba(255,160,30,.6), 0 2px 8px rgba(0,0,0,.45); animation: new-glow 1.6s ease-in-out infinite; }
.card .badge-new::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.95) 50%, transparent 70%); transform: translateX(-120%); animation: new-shine 2.2s ease-in-out infinite; }
@keyframes new-glow { 50% { box-shadow: 0 0 14px rgba(255,220,90,1), 0 0 30px rgba(255,160,30,.85), 0 2px 8px rgba(0,0,0,.45); } }
@keyframes new-shine { 0%, 35% { transform: translateX(-120%); } 75%, 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .card .badge-new, .card .badge-new::after { animation: none; } }
.card .count { position: absolute; bottom: -.5em; right: -.45em; z-index: 3; min-width: 1.9em; text-align: center; background: linear-gradient(135deg, #ff3d7f, #8b2cf5); color: #fff; border: .14em solid #0b0a10; font-family: var(--display); font-weight: 900; font-size: 1em; line-height: 1; padding: .3em .5em; border-radius: 999px; box-shadow: 0 .2em .6em rgba(0,0,0,.55); letter-spacing: .02em; }
.card .wish-mark { position: absolute; top: -.45em; left: -.35em; z-index: 4; width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 50%; background: #ff3d8b; color: #fff; font-size: 1.1em; line-height: 1; border: .15em solid #0b0a10; box-shadow: 0 0 .7em rgba(255, 61, 139, .85); }
/* illustration générée */
.art-gen { position: absolute; inset: 0; background:
  radial-gradient(circle at 50% 32%, hsl(var(--h2) 85% 70% / .85), transparent 58%),
  repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 2px, transparent 2px 9px),
  linear-gradient(165deg, hsl(var(--h1) 70% 46%), hsl(calc(var(--h1) + 50) 60% 16%)); }
.art-kanji { position: absolute; right: -.08em; top: -.12em; font-size: 3.6em; font-weight: 900; line-height: 1; color: rgba(255,255,255,.14); font-family: serif; }
.art-sil { position: absolute; bottom: -2%; left: 50%; width: 82%; transform: translateX(-50%); fill: hsl(var(--h1) 45% 10% / .9); }
.art-ini { position: absolute; left: 50%; top: 43%; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 900; font-size: 1.25em; color: hsl(var(--h2) 90% 88%); letter-spacing: .02em; }
/* brillance holo pour Légendaire & Mythique */
.card.r-L .card-art::after, .card.r-M .card-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .4;
  background: linear-gradient(115deg, transparent 20%, rgba(255,0,150,.5) 35%, rgba(0,255,255,.5) 45%, rgba(255,255,0,.5) 55%, transparent 70%);
  background-size: 250% 250%; animation: holo 4s linear infinite;
}
.card.r-M { box-shadow: 0 0 calc(var(--w) * .12) -2px color-mix(in srgb, var(--rc) 70%, transparent), 0 0 0 1px rgba(255,255,255,.15) inset; }
@keyframes holo { from { background-position: 0% 0%; } to { background-position: 250% 250%; } }
/* carte manquante */
.card-miss { --w: 160px; width: var(--w); aspect-ratio: 5/7; border-radius: calc(var(--w) * .07); border: 1px dashed var(--line); background: var(--bg2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--dim); font-size: calc(var(--w) * .074); flex: none; }
.card-miss .q { font-size: 2em; font-weight: 900; font-family: var(--display); color: #3a3850; }
.card-miss .n { font-family: var(--mono); font-size: .6em; }
.card-miss .rr { font-size: .62em; font-weight: 700; color: var(--rc); }
.card-miss .nm { font-size: .6em; padding: 0 .6em; text-align: center; color: var(--muted); }
/* dos de carte */
.card-back { width: var(--w, 160px); aspect-ratio: 5/7; border-radius: calc(var(--w, 160px) * .07); background:
  radial-gradient(circle at 50% 50%, rgba(255,255,255,.12), transparent 50%),
  repeating-linear-gradient(45deg, #2a1d3d 0 8px, #22182f 8px 16px); border: 3px solid #3b2d52; display: grid; place-items: center; font-family: var(--display); font-weight: 900; color: rgba(255,255,255,.3); font-size: calc(var(--w, 160px) * .2); }

/* ---------- booster (pack) ---------- */
.pack {
  --pc: #e8b931; --pw: 150px;
  position: relative; width: var(--pw); aspect-ratio: 5 / 7.6; font-size: calc(var(--pw) * .08);
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.55)); cursor: pointer; transition: transform .2s, filter .2s;
}
.pack:hover { transform: translateY(-5px) rotate(-1deg); }
.pack.sel { transform: translateY(-6px) scale(1.04); filter: drop-shadow(0 0 22px color-mix(in srgb, var(--pc) 55%, transparent)) drop-shadow(0 14px 22px rgba(0,0,0,.55)); }
.pack-cap, .pack-body { position: absolute; left: 0; right: 0; background:
  linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.28) 46%, rgba(255,255,255,0) 60%),
  linear-gradient(160deg, color-mix(in srgb, var(--pc) 80%, #fff), var(--pc) 40%, color-mix(in srgb, var(--pc) 55%, #000)); }
.pack-cap { top: 0; height: 9%; border-radius: .5em .5em 0 0; background-size: 300% 100%, 100% 100%;
  -webkit-mask: linear-gradient(#000, #000) top/100% 80% no-repeat, radial-gradient(circle at 50% 100%, transparent .18em, #000 .2em) bottom/.5em 20% repeat-x;
  transition: transform .5s cubic-bezier(.3,.8,.3,1), opacity .5s; }
.pack-body { top: 8.6%; bottom: 0; border-radius: 0 0 .5em .5em; display: flex; flex-direction: column; align-items: center; padding: .7em .6em; background-size: 300% 100%, 100% 100%; animation: foil 6s ease-in-out infinite; }
.pack-cap { animation: foil 6s ease-in-out infinite; }
@keyframes foil { 0%, 100% { background-position: 100% 0, 0 0; } 50% { background-position: 0% 0, 0 0; } }
.pack-brand { font-family: var(--display); font-weight: 900; font-size: .55em; letter-spacing: .2em; color: rgba(0,0,0,.6); }
.pack-emblem { margin: .55em 0 .4em; width: 3.6em; height: 3.6em; border-radius: 50%; display: grid; place-items: center; font-size: 1em; background: radial-gradient(circle, #2b2b33, #121217); border: .18em solid color-mix(in srgb, var(--pc) 70%, #fff); box-shadow: 0 0 0 .25em rgba(0,0,0,.25); }
.pack-emblem span { font-size: 2em; font-weight: 900; color: color-mix(in srgb, var(--pc) 75%, #fff); font-family: serif; }
.pack-name { font-family: var(--display); font-weight: 900; font-size: .95em; color: rgba(0,0,0,.78); text-align: center; line-height: 1.1; }
.pack-sub { font-size: .48em; color: rgba(0,0,0,.6); text-align: center; margin-top: .25em; line-height: 1.2; }
.pack-count { margin-top: auto; font-size: .48em; font-weight: 800; background: rgba(0,0,0,.55); color: #fff; padding: .25em .8em; border-radius: 999px; }
.pack.dark .pack-brand, .pack.dark .pack-name, .pack.dark .pack-sub { color: rgba(255,255,255,.85); }
.pack-label { text-align: center; font-size: 12px; font-weight: 700; margin-top: 10px; color: var(--muted); }
.pack-label.free { color: var(--ok); }
.pack-label .ic { color: #7dd3fc; }

/* ---------- accueil boosters ---------- */
.hero { position: relative; margin-top: 24px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); min-height: 280px; background: var(--panel); }
.hero-slide { position: absolute; inset: 0; display: flex; align-items: center; padding: 34px 40px; gap: 24px; opacity: 0; pointer-events: none; transition: opacity .6s;
  background: radial-gradient(ellipse at 80% 50%, color-mix(in srgb, var(--hc) 30%, transparent), transparent 60%), linear-gradient(120deg, #15141d, color-mix(in srgb, var(--hc) 14%, #15141d)); }
.hero-slide.on { opacity: 1; pointer-events: auto; position: relative; }
.hero-txt { flex: 1; min-width: 0; }
.hero-txt .kicker { color: var(--hc); }
.hero-txt h1 { font-size: clamp(32px, 5.4vw, 58px); font-weight: 900; line-height: 1; margin: 12px 0 10px; }
.hero-txt p { color: var(--muted); margin: 0 0 18px; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-cards { position: relative; width: 300px; height: 220px; flex: none; }
.hero-cards .card { position: absolute; top: 10px; }
.hero-txt p b { color: var(--text); }
/* diapo parrainage : cadeau et les deux récompenses */
.hero-ref { position: relative; width: 300px; height: 220px; flex: none; display: grid; place-items: center; }
.hr-gift { font-size: 92px; filter: drop-shadow(0 0 28px color-mix(in srgb, var(--hc) 70%, transparent)); animation: hr-float 3.2s ease-in-out infinite; }
@keyframes hr-float { 50% { transform: translateY(-8px) rotate(-4deg); } }
.hr-r { position: absolute; top: 18px; right: 6px; display: flex; flex-direction: column; align-items: center; padding: 10px 16px; border-radius: 14px; background: rgba(11,10,16,.75);
  border: 1.5px solid var(--hc); box-shadow: 0 0 18px color-mix(in srgb, var(--hc) 45%, transparent); transform: rotate(6deg); }
.hr-r.f { top: auto; right: auto; bottom: 18px; left: 6px; transform: rotate(-6deg); border-color: #7dd3fc; box-shadow: 0 0 18px rgba(125,211,252,.4); }
.hr-r b { font-family: var(--display); font-size: 22px; color: #7dd3fc; }
/* diapo « Installer l'app » : un téléphone avec l'icône Aniimora sur son écran d'accueil */
.hero-app { position: relative; width: 300px; height: 220px; flex: none; display: grid; place-items: center; }
.ha-phone { position: relative; width: 132px; height: 236px; margin-top: -8px; border-radius: 24px; border: 4px solid #2a2836; background: linear-gradient(160deg, #241a3d, #0f0d16 70%);
  box-shadow: 0 0 0 1px #3a3650, 0 18px 40px rgba(0,0,0,.55), 0 0 40px color-mix(in srgb, var(--hc) 35%, transparent); transform: rotate(-6deg); animation: hr-float 3.6s ease-in-out infinite; }
.ha-notch { width: 46px; height: 8px; border-radius: 0 0 8px 8px; background: #2a2836; margin: 0 auto; }
.ha-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; padding: 18px 12px; align-items: start; justify-items: center; }
.ha-grid i { width: 22px; height: 22px; border-radius: 6px; background: rgba(255,255,255,.08); }
.ha-icon { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ha-icon img { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 0 0 2px var(--hc), 0 0 16px var(--hc); animation: ha-pop 2.4s ease-in-out infinite; }
.ha-icon b { font-size: 6.5px; font-weight: 700; color: #fff; }
@keyframes ha-pop { 50% { transform: scale(1.18); } }
.ha-tag { position: absolute; right: 18px; top: 26px; padding: 8px 14px; border-radius: 14px; font-family: var(--display); font-size: 18px; color: #fff;
  background: rgba(11,10,16,.8); border: 1.5px solid var(--hc); box-shadow: 0 0 18px color-mix(in srgb, var(--hc) 45%, transparent); transform: rotate(6deg); }
.hr-r small { color: var(--muted); font-size: 11.5px; font-weight: 700; }
.hero-dots { position: absolute; left: 40px; bottom: 16px; display: flex; gap: 6px; z-index: 2; }
.hero-dots button { width: 18px; height: 4px; border-radius: 3px; border: 0; background: rgba(255,255,255,.2); padding: 0; }
.hero-dots button.on { width: 30px; background: var(--accent); }
@media (max-width: 720px) { .hero-cards, .hero-ref, .hero-app { display: none; } .hero-slide { padding: 26px 20px 40px; } .hero-dots { left: 20px; } }

.status { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.status .chip { background: var(--bg2); font-weight: 600; }
.status .chip b { color: var(--text); }
.status .chip.gold { border-color: color-mix(in srgb, var(--gold) 50%, transparent); color: var(--gold); }

.picker { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 18px; justify-items: center; padding: 10px 0; }
.bpanel { position: sticky; top: 80px; padding: 20px; }
.bp-head { display: flex; gap: 12px; align-items: center; }
.bp-emb { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-family: serif; font-weight: 900; border: 2px solid var(--pc); color: var(--pc); flex: none; }
.bp-head h3 { font-size: 19px; }
.bp-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.bp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 12px; }
.bp-stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.bp-stat b { display: block; font-size: 17px; font-family: var(--display); }
.bp-stat small { color: var(--muted); font-size: 11px; }
.bp-wish { margin: 10px 0 0; padding: 8px 11px; border-radius: 10px; font-size: 12px; background: rgba(255,61,127,.08); border: 1px solid rgba(255,61,127,.25); color: #ff9fbd; }
.odds { margin: 16px 0; }
.odds h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; color: var(--muted); margin: 0 0 8px; text-transform: uppercase; font-weight: 500; }
.odd { display: grid; grid-template-columns: 92px 1fr 54px; align-items: center; gap: 8px; font-size: 12px; margin: 5px 0; }
.odd .bar { height: 5px; border-radius: 3px; background: var(--bg2); overflow: hidden; }
.odd .bar i { display: block; height: 100%; background: var(--rc); border-radius: 3px; min-width: 2px; }
.odd span:first-child { color: var(--rc); font-weight: 700; }
.odd span:last-child { text-align: right; font-family: var(--mono); color: var(--muted); }
.bp-note { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }
.bp-note.err { color: #ff7b8f; }
@media (max-width: 900px) { .picker { grid-template-columns: 1fr; } .bpanel { position: static; } }

.feed { display: flex; gap: 14px; overflow-x: auto; padding: 14px 2px 10px; scrollbar-width: thin; }
.feed-item { flex: none; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.feed-item .who { font-size: 12px; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .who.me { color: var(--accent); }
.feed-item .when { font-size: 11px; color: var(--muted); margin-top: -6px; }
/* Grand écran : les gros tirages passent en colonne fixe dans la marge gauche (vide) */
@media (min-width: 1580px) {
  .feed-box { position: fixed; z-index: 5; top: 84px; bottom: 16px; width: 156px; left: calc(((100vw - 1200px) / 2 - 156px) / 2); display: flex; flex-direction: column; align-items: center; text-align: center; }
  .feed-box .section-title { margin: 0 0 6px; justify-content: center; }
  .feed-box .section-title h2 { font-size: 20px; }
  .feed-box .live { letter-spacing: 0; font-size: 9.5px; white-space: nowrap; }
  .feed-box .feed { flex: 1; min-height: 0; align-self: stretch; flex-direction: column; align-items: center; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; padding: 8px 4px 16px;
    -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent); mask-image: linear-gradient(to bottom, #000 90%, transparent); }
}
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: #ff6b81; }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #ff3b5c; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: end; max-width: 640px; }
.pod { text-align: center; }
.pod .av { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; font-weight: 900; font-size: 24px; background: hsl(var(--hue) 65% 45%); border: 3px solid rgba(255,255,255,.2); }
.pod .nm { font-weight: 800; }
.pod .tt { font-size: 11px; color: var(--accent); }
.pod .base { margin-top: 10px; border-radius: 12px 12px 0 0; background: var(--panel2); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--display); font-weight: 900; }
.pod .base b { font-size: 24px; }
.pod .base small { font-family: 'Inter'; font-weight: 500; color: var(--muted); font-size: 11px; }
.pod.p1 .base { height: 120px; background: linear-gradient(#3d3010, #1d1a10); border-color: #6b5313; color: var(--gold); }
.pod.p2 .base { height: 90px; }
.pod.p3 .base { height: 70px; background: linear-gradient(#3a2416, #1c1612); border-color: #5c3a22; color: #e59b62; }

/* ---------- collection ---------- */
.coll-head { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; padding-top: 36px; }
.bigstats { display: flex; gap: 28px; flex-wrap: wrap; margin: 12px 0 14px; }
.bigstats div b { font-family: var(--display); font-size: 30px; font-weight: 900; }
.bigstats div b span { color: var(--dim); }
.bigstats div b.acc { color: var(--accent); }
.bigstats small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.sprog { display: grid; grid-template-columns: 1fr 1.3fr 48px; gap: 10px; align-items: center; font-size: 12.5px; margin: 7px 0; }
.sprog .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sprog .bar { height: 5px; border-radius: 3px; background: var(--bg2); overflow: hidden; }
.sprog .bar i { display: block; height: 100%; background: var(--accent); }
.sprog .v { text-align: right; font-family: var(--mono); color: var(--muted); font-size: 11.5px; }
@media (max-width: 800px) { .coll-head { grid-template-columns: 1fr; } }

.filters { display: flex; flex-direction: column; gap: 12px; margin: 26px 0 16px; }
.frow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search { flex: 1; min-width: 200px; max-width: 360px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); outline: none; }
.search:focus, .sel:focus { border-color: var(--accent2); }
.sel { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg2); outline: none; }
.flabel { font-size: 12px; color: var(--muted); }
.rchips { display: flex; gap: 6px; flex-wrap: wrap; }
.rchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); font-size: 12.5px; font-weight: 600; }
.rchip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--rc, #fff); }
.rchip.on { background: #fff; color: #111; border-color: #fff; }
.count-line { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-bottom: 12px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 14px; justify-items: center; }
.cgrid .card, .cgrid .card-miss { --w: min(160px, 100%); width: 100%; max-width: 160px; }
.cgrid .card { font-size: 11.5px; }
.cgrid .card-miss { font-size: 11.5px; }
.more { display: flex; justify-content: center; margin-top: 24px; }

.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.album { display: flex; gap: 12px; align-items: center; padding: 12px; cursor: pointer; transition: border-color .15s; }
.album:hover { border-color: var(--accent2); }
.album .thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; position: relative; flex: none; display: grid; place-items: center; font-family: var(--display); font-size: 18px; font-weight: 900; background: linear-gradient(150deg, hsl(var(--h1) 60% 40%), hsl(calc(var(--h1) + 50) 50% 15%)); }
.album .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.album h4 { margin: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album .meta { font-size: 12px; color: var(--muted); }
.album .rr { font-family: var(--mono); font-size: 10.5px; display: flex; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.album .rr span { color: var(--rc); }
.album .info { flex: 1; min-width: 0; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 800; background: var(--gold); color: #111; }

/* ---------- missions ---------- */
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .mgrid { grid-template-columns: 1fr; } }
.mbox { padding: 20px; }
.mbox h3 { font-size: 18px; margin: 4px 0 14px; display: flex; align-items: center; gap: 10px; }
.mbox h3 .spacer { flex: 1; }
.mbox h3 small { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; }
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.sday { border: 1px solid var(--line); background: var(--bg2); border-radius: 12px; padding: 12px 4px; text-align: center; font-size: 12px; }
.sday .d { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.sday .r { font-weight: 800; margin-top: 6px; color: #7dd3fc; }
.sday .ic { width: 28px; height: 28px; margin: 6px auto 0; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-size: 13px; }
.sday.done { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 10%, var(--bg2)); }
.sday.done .ic { background: var(--ok); color: #062; border-color: var(--ok); }
.sday.now { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.sday.gold .ic { border-color: var(--gold); color: var(--gold); }
.mrow { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mrow:last-of-type { border-bottom: 0; }
.mrow .lbl { font-weight: 600; font-size: 13.5px; }
.mrow .lbl small { color: var(--muted); font-weight: 500; margin-left: 6px; font-family: var(--mono); font-size: 11px; }
.mrow .bar { grid-column: 1; height: 5px; border-radius: 3px; background: var(--bg2); overflow: hidden; }
.mrow .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffb547); }
.mrow .side { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 10px; }
.mrow .rew { color: #7dd3fc; font-weight: 800; font-size: 13px; }
.mrow .st { font-size: 12px; color: var(--muted); min-width: 70px; text-align: right; }
.mrow .st.ok { color: var(--ok); }
.mfoot { font-size: 12px; color: var(--muted); margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ach-it { padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.ach-it .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bg2); border: 1px solid var(--line); flex: none; font-size: 16px; }
.ach-it.done .ic { background: color-mix(in srgb, var(--gold) 18%, transparent); border-color: var(--gold); }
.ach-it b { font-size: 13px; display: block; }
.ach-it small { color: var(--muted); font-size: 11.5px; }
.ach-it .grow { flex: 1; min-width: 0; }

/* ---------- marché ---------- */
.mkt { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px 14px; }
.lst { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lst .card { --w: 160px; }
.lst-info { width: 160px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.lst-info .price { font-family: var(--display); font-weight: 900; font-size: 18px; color: #7dd3fc; }
.lst-info .seller { color: var(--muted); font-size: 11px; }
.lst.sold { opacity: .35; }
.notice { display: flex; gap: 14px; padding: 16px 18px; align-items: flex-start; margin-bottom: 20px; }
.notice .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(124,92,255,.15); color: #b4a3ff; flex: none; }
.notice b { display: block; margin-bottom: 2px; }
.notice p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- wiki ---------- */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.witem { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); transition: border-color .15s; }
.witem:hover { border-color: var(--rc); }
.witem .th { width: 38px; height: 38px; border-radius: 9px; flex: none; position: relative; overflow: hidden; border: 1.5px solid var(--rc); }
.witem .th.lock { background: var(--bg2); display: grid; place-items: center; color: var(--dim); border-style: dashed; }
.witem .grow { flex: 1; min-width: 0; }
.witem b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.witem small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.witem .rl { font-weight: 900; color: var(--rc); font-size: 12px; }
.fiche-hero { position: relative; overflow: hidden; padding: 30px 0 26px; border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, hsl(var(--h1) 40% 12%), var(--bg) 70%); }
.fiche-hero .wm { position: absolute; right: 4%; top: -10px; font-size: 180px; font-family: serif; font-weight: 900; color: rgba(255,255,255,.05); pointer-events: none; line-height: 1; }
.crumbs { font-size: 12px; color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 6px; }
.tags span { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); }
.fiche-hero h1 { font-size: clamp(34px, 6vw, 64px); font-weight: 900; }
.fiche-body { display: grid; grid-template-columns: 1fr 300px; gap: 24px; margin-top: 26px; align-items: start; }
@media (max-width: 800px) { .fiche-body { grid-template-columns: 1fr; } }
.fiche-main { padding: 22px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.kv div { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kv small { display: block; color: var(--muted); font-size: 11px; }
.kv b { font-size: 15px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.ptable td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.ptable td:last-child { text-align: right; font-family: var(--mono); color: var(--muted); }
.fiche-side { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fiche-side .card { --w: 260px; }

/* ---------- classement ---------- */
.rk-list { margin-top: 26px; }
.rk { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 14px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.rk .pos { font-family: var(--mono); color: var(--muted); }
.rk .who { display: flex; align-items: center; gap: 10px; font-weight: 700; min-width: 0; }
.rk .who .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 13px; background: hsl(var(--hue) 65% 45%); flex: none; }
.rk .who small { color: var(--accent); font-size: 11px; font-weight: 600; display: block; }
.rk .num { font-family: var(--display); font-weight: 900; font-size: 17px; text-align: right; }
.rk .num small { display: block; font-family: 'Inter'; font-weight: 500; font-size: 10.5px; color: var(--muted); }
.rk .mth { font-size: 12px; color: var(--muted); min-width: 80px; text-align: right; }
.rk.me { background: linear-gradient(90deg, rgba(255,61,127,.14), transparent); border-left: 3px solid var(--accent); border-radius: 8px; }
.rk-sticky { position: sticky; bottom: 0; background: var(--bg); }

/* ---------- profil ---------- */
.prof { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding: 34px 0 26px; }
.prof .av { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 40px; font-weight: 900; background: hsl(var(--hue) 65% 45%); border: 4px solid rgba(255,255,255,.18); }
.prof h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 900; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rank-badge { font-family: 'Inter'; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); letter-spacing: 0; }
.rank-badge i { font-style: normal; color: var(--accent); margin-right: 5px; }
.vitrine { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 14px; justify-items: center; }
.vitrine .card { --w: 170px; }
.vslot { width: 170px; aspect-ratio: 5/7; border-radius: 12px; border: 1px dashed var(--line); display: grid; place-items: center; color: var(--dim); font-size: 12px; text-align: center; padding: 10px; }
.field { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field input[type=text] { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); outline: none; }
.field input[type=range] { accent-color: var(--accent); }
textarea.save { width: 100%; min-height: 90px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); padding: 10px; font-family: var(--mono); font-size: 11px; resize: vertical; }

/* ---------- modale & toasts ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(5,4,10,.72); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: fade .18s; }
.modal { width: min(760px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
.modal.sm { width: min(440px, 100%); }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 16px; flex: 1; }
.modal-b { padding: 18px; overflow-y: auto; }
.x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg2); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
.cd { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
.cd .card { --w: 240px; }
@media (max-width: 600px) { .cd { grid-template-columns: 1fr; justify-items: center; } }
.cd-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.bc-group { margin-bottom: 18px; }
.bc-group h4 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--rc); }
.bc-group h4 small { margin-left: auto; color: var(--muted); font-family: var(--mono); font-weight: 500; font-size: 11px; }
.bc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.bc { position: relative; aspect-ratio: 5/6; border-radius: 9px; overflow: hidden; border: 1.5px solid var(--rc); cursor: pointer; background: var(--bg2); }
.bc.miss .art-img, .bc.miss .art-gen { filter: grayscale(1) brightness(.65); }
.bc.miss .nm { opacity: .8; }
.bc .q { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--rc); filter: none; }
.bc .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 4px 3px; font-size: 9.5px; font-weight: 700; background: linear-gradient(transparent, rgba(0,0,0,.85)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc .hw { position: absolute; top: 4px; right: 4px; z-index: 2; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #ff3d8b; color: #fff; font-size: 12px; line-height: 1; border: 2px solid #0b0a10; box-shadow: 0 0 10px rgba(255, 61, 139, .85); }
.bc .cnt { position: absolute; top: 4px; left: 4px; z-index: 2; font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 999px; background: #0b0a10; color: #fff; }
.bc-wrap { position: relative; }
.bc-wrap .bc.miss + .hw2 { filter: none; }

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #fff; color: #111; padding: 10px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: toast .3s cubic-bezier(.2,.9,.3,1.3); max-width: 90vw; }
.toast.err { background: #ff5070; color: #fff; }
.toast.ok { background: var(--ok); color: #04210f; }
@keyframes toast { from { opacity: 0; transform: translateY(14px) scale(.95); } }

.foot { border-top: 1px solid var(--line); padding: 18px max(16px, calc((100% - 1200px) / 2)); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.foot a { color: var(--text); text-decoration: underline; }

/* ---------- ouverture ---------- */
body.opening .top, body.opening .foot { display: none; }
.op { position: fixed; inset: 0; z-index: 60; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--oc, #7c5cff) 22%, #0b0a10), #07060b 70%); display: flex; flex-direction: column; overflow: hidden; }
.op::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1.4px); background-size: 90px 90px; opacity: .25; animation: drift 60s linear infinite; pointer-events: none; }
@keyframes drift { to { background-position: 900px 450px; } }
.op-bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.op-bar .t { flex: 1; text-align: center; font-weight: 800; }
.op-bar .t i { font-style: normal; color: var(--oc); margin-right: 6px; font-family: serif; }
.op-stage { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 16px 30px; min-height: 0; }
.op-count { position: absolute; top: 4px; left: 22px; font-family: var(--display); font-weight: 900; font-size: 30px; }
.op-count small { color: var(--muted); font-size: 15px; }
.op .pack { --pw: min(250px, 58vw, 40vh); cursor: grab; touch-action: none; }
.op .pack:hover { transform: none; }
.tear-line { position: absolute; left: 4%; right: 4%; top: 7.5%; height: 3px; z-index: 3; border-radius: 2px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.7) 0 6px, transparent 6px 11px); opacity: .8; }
.tear-line i { position: absolute; left: 0; top: -2px; height: 7px; width: calc(var(--tear, 0) * 100%); background: #fff; border-radius: 4px; box-shadow: 0 0 12px #fff; }
.pack.torn .pack-cap { transform: translate(60%, -220%) rotate(28deg); opacity: 0; }
.pack.torn .tear-line { opacity: 0; }
.pack.gone { animation: packgone .55s .35s forwards ease-in; }
@keyframes packgone { to { transform: translateY(60%) scale(.8); opacity: 0; } }
.op-hint { margin-top: 26px; color: var(--muted); font-size: 13px; text-align: center; }
.gold-note { margin-top: 12px; color: var(--gold); font-weight: 800; font-size: 13px; text-shadow: 0 0 12px rgba(245,179,1,.6); }
.pity-note { margin-top: 6px; color: #ff7b8f; font-weight: 800; font-size: 13px; }
.rv { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.rv-card { position: relative; perspective: 1200px; }
.rv-card::before { content: ''; position: absolute; inset: -30%; background: radial-gradient(circle, color-mix(in srgb, var(--rc) 45%, transparent), transparent 62%); filter: blur(10px); z-index: -1; animation: glow 2s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .6; transform: scale(.95); } }
.rv-card .card { --w: min(270px, 62vw); animation: flipin .7s cubic-bezier(.2,.9,.25,1.05); }
@keyframes flipin { 0% { transform: rotateY(180deg) scale(.6); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
.rv-card.r-M .card { animation: flipin .7s cubic-bezier(.2,.9,.25,1.05), shake .45s .7s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px) rotate(-1deg); } 40%, 80% { transform: translateX(6px) rotate(1deg); } }
.rv-r { margin-top: 20px; font-weight: 800; font-size: 13px; color: var(--rc); letter-spacing: .04em; }
.rv-n { font-family: var(--display); font-size: clamp(22px, 4vw, 32px); font-weight: 900; text-align: center; }
.rv-s { color: var(--muted); font-size: 13px; text-align: center; }
.rv-thumbs { display: flex; gap: 6px; margin: 14px 0; }
.rv-thumbs span { width: 22px; height: 30px; border-radius: 4px; background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.rv-thumbs span.on { border-color: var(--rc); background: color-mix(in srgb, var(--rc) 35%, transparent); }
.rv-prog { width: min(320px, 80vw); height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); margin: 16px 0; overflow: hidden; }
.rv-prog i { display: block; height: 100%; border-radius: inherit; background: var(--rc); box-shadow: 0 0 10px var(--rc); transition: width .25s; }
.rv-ctrl { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; justify-content: center; }
.splash { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; justify-content: center; align-items: center; cursor: pointer;
  background: radial-gradient(ellipse at 40% 50%, color-mix(in srgb, var(--rc) 40%, #0b0a10), #07060b 75%); animation: fade .3s; }
.splash .rr { position: absolute; top: 24px; left: 0; right: 0; text-align: center; font-family: var(--display); font-weight: 900; letter-spacing: .35em; color: var(--rc); font-size: 14px; }
.splash .row { display: flex; align-items: center; gap: 22px; padding: 0 20px; animation: slidein .6s cubic-bezier(.2,.9,.3,1); }
.splash .row .card-back { --w: 110px; box-shadow: 0 0 40px color-mix(in srgb, var(--rc) 60%, transparent); }
.splash small { font-family: var(--mono); color: var(--rc); letter-spacing: .14em; font-size: 11px; }
.splash h2 { font-size: clamp(26px, 5vw, 52px); font-weight: 900; }
.splash .skip { position: absolute; bottom: 22px; right: 22px; }
@keyframes slidein { from { opacity: 0; transform: translateX(-40px); } }
.flash { position: fixed; inset: 0; z-index: 75; background: #fff; pointer-events: none; animation: flash .7s forwards; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
.sum { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; }
.sum h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 900; }
.sum .sub { color: var(--muted); font-size: 13px; margin: 4px 0; }
.sum .best { color: var(--rc); font-weight: 800; font-size: 13px; }
.fan { display: flex; justify-content: center; align-items: flex-start; margin: 26px 0 30px; height: 300px; }
.fan .card { --w: min(170px, 19vw); margin: 0 -10px; animation: fanin .5s backwards cubic-bezier(.2,.9,.3,1.1); }
.fan .card:hover { z-index: 5; transform: translateY(-14px) scale(1.06) !important; }
@keyframes fanin { from { opacity: 0; transform: translateY(40px) scale(.8); } }
.sum-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 600px) { .fan { height: 200px; } .fan .card { margin: 0 -14px; } }

/* =====================================================================
   EN LIGNE : connexion, marché, échanges, profils
   ===================================================================== */
.mode-badge { margin-left: 6px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; padding: 2px 6px; border-radius: 5px; background: rgba(124,92,255,.2); color: #b4a3ff; font-weight: 500; }
body.authpage .nav, body.authpage .res { visibility: hidden; }
body.authpage .nav-menu { display: none; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 40px 0; justify-content: center; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.busy, [data-act].busy { opacity: .6; pointer-events: none; }
.btn.busy::after { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; }

.auth { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 30px 16px; }
.auth-card { width: min(420px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.auth-card .logo { margin-bottom: 4px; }
.auth-card h1 { font-size: 26px; font-weight: 900; }
.auth-card p { margin: 0; font-size: 13px; }
.auth-card form, .sell-form { display: flex; flex-direction: column; gap: 12px; }
.auth-card label, .sell-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.auth-card input, .sell-form input { padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); outline: none; font-size: 14px; }
.auth-card input:focus, .sell-form input:focus { border-color: var(--accent2); }
.auth-err { color: #ff7b8f; font-size: 13px; }
.auth-msg { color: var(--ok); font-size: 13px; }
.auth-note { font-size: 12px !important; color: #b4a3ff; background: rgba(124,92,255,.1); border: 1px solid rgba(124,92,255,.25); border-radius: 10px; padding: 10px 12px; }
.auth-oauth { display: grid; gap: 8px; margin: 4px 0 2px; }
.btn.oauth { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; }
.btn.oauth svg { width: 20px; height: 20px; flex: none; }
.btn.oauth.google { background: #fff; border-color: #fff; color: #1f1f1f; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; margin: 10px 0 2px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-forgot { text-align: center; }
.btn.oauth.discord { background: #5865f2; border-color: #5865f2; color: #fff; }

.plink { font-weight: 700; color: var(--text); text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 2px; }
.plink:hover { color: var(--accent); }
.sub-h { font-size: 16px; margin: 28px 0 12px; }
.lst-info .ltag { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.lst-info .ltag.auc { color: var(--gold); border-color: rgba(245,179,1,.4); }
.lst-act { width: 160px; display: flex; justify-content: flex-end; }
.bid-row { display: flex; gap: 6px; width: 100%; }
.bid-in { width: 100%; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg2); outline: none; }
.hist td { font-size: 12.5px; }
.hist td:last-child { text-align: left; color: var(--text); font-family: inherit; }
.modal.wide { width: min(980px, 100%); }

.pl-results { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.pl-res { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.pl-res:hover { background: var(--panel2); }
.tr-friends { margin-top: 10px; }
.tr-friends > small { display: block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.tr-fr { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-fr-it { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 13px; transition: border-color .15s; }
.tr-fr-it:hover { border-color: var(--accent); }
.tr-fr-it b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-fr-it .fr-mu { font-size: 11px; }
.tr-fr-empty { font-size: 12.5px; margin: 0; }
.av { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 900; background: hsl(var(--hue) 65% 45%); flex: none; }
.av.sm { width: 26px; height: 26px; font-size: 12px; }
.prof > .av { width: 104px; height: 104px; font-family: var(--display); font-size: 40px; border: 4px solid rgba(255,255,255,.18); }

.trade { padding: 16px; margin-bottom: 12px; }
.tr-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.tr-st { margin-left: auto; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); color: var(--gold); }
.tr-st.ok { color: var(--ok); } .tr-st.ko { color: var(--muted); }
.tr-msg { margin: 10px 0 0; font-style: italic; color: #c7c5d6; font-size: 13px; }
.tr-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin-top: 12px; }
.tr-sides small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.tr-cards { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 40px; }
.tr-arrow { font-size: 22px; color: var(--accent); }
.tr-sh { font-family: var(--display); font-weight: 900; color: #7dd3fc; }
@media (max-width: 640px) { .tr-sides { grid-template-columns: 1fr; } .tr-arrow { transform: rotate(90deg); justify-self: center; } }

.tc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .tc { grid-template-columns: 1fr; } }
.tc-col h4 { margin: 0 0 8px; display: flex; justify-content: space-between; }
.tc-col h4 small { font-family: var(--mono); color: var(--muted); font-weight: 500; }
.tc-col .search { max-width: none; width: 100%; margin-bottom: 8px; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 7px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.bc.sel { outline: 3px solid var(--accent); outline-offset: 1px; }
.bc .nw { position: absolute; top: 3px; left: 3px; font-size: 8.5px; font-weight: 800; background: var(--ok); color: #04210f; padding: 1px 5px; border-radius: 5px; }
.tc-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.tc-foot .search { flex: 1; max-width: none; }
.tc-foot input[type=number] { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg2); }

/* logo du site */
.logo-img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(139, 44, 245, .45)); flex: none; }
.auth-card .logo-img { width: 52px; height: 52px; }

/* =====================================================================
   RARETÉ SECRÈTE : cadre irisé qui tourne, reflet renforcé
   ===================================================================== */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes secretspin { to { --ang: 360deg; } }
.card.r-S {
  background: conic-gradient(from var(--ang), #ff5ef0, #9ff3ff, #ffe66d, #7cff9e, #b18cff, #ff5ef0);
  animation: secretspin 3.5s linear infinite;
  box-shadow: 0 0 calc(var(--w) * .18) -2px rgba(159, 243, 255, .75), 0 0 calc(var(--w) * .08) rgba(255, 94, 240, .5), 0 0 0 1px rgba(255,255,255,.3) inset;
}
.card.r-S .card-gem { background: conic-gradient(from var(--ang), #ff5ef0, #9ff3ff, #ffe66d, #ff5ef0); animation: secretspin 3.5s linear infinite; }
.card.r-S .card-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .65;
  background: linear-gradient(115deg, transparent 10%, rgba(255,0,200,.6) 28%, rgba(0,255,255,.6) 42%, rgba(255,255,0,.6) 56%, rgba(120,255,140,.5) 68%, transparent 85%);
  background-size: 250% 250%; animation: holo 2.5s linear infinite;
}
.card.r-S .card-name { background: linear-gradient(90deg, #ffb3f7, #c9f9ff, #fff3a6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rv-card.r-S .card { animation: flipin .9s cubic-bezier(.2,.9,.25,1.05), shake .6s .9s, secretspin 3.5s linear infinite; }
.rv-card.r-S::before { background: conic-gradient(from var(--ang), rgba(255,94,240,.55), rgba(159,243,255,.55), rgba(255,230,109,.55), rgba(255,94,240,.55)); border-radius: 50%; animation: secretspin 3s linear infinite, glow 2s ease-in-out infinite; }
.rainbow-text { background: linear-gradient(90deg, #ff5ef0, #9ff3ff, #ffe66d, #7cff9e, #b18cff); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.splash.secret { background: radial-gradient(ellipse at 50% 50%, rgba(159,243,255,.35), rgba(255,94,240,.25) 35%, #07060b 75%), #07060b; }
.splash.secret .rr { font-size: 22px; letter-spacing: .5em; }

/* boutons d'ouverture (jeton gratuit / éclats) */
.open-btns { display: flex; flex-direction: column; gap: 8px; }
.odds-g + .odds-g { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.odds-g small { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.odds-guar { margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #f5b301; background: rgba(245, 179, 1, .08); border: 1px solid rgba(245, 179, 1, .3); }

/* booster illustré (image 2:3 à fond transparent) */
.pack.pack-img { aspect-ratio: 2 / 3; }
.pack.pack-img .pack-cap, .pack.pack-img .pack-body {
  position: absolute; inset: 0; top: 0; bottom: auto; width: 100%; height: 100%; object-fit: contain;
  background: none; padding: 0; border-radius: 0; animation: none; -webkit-mask: none; mask: none; display: block;
  -webkit-user-drag: none; user-select: none;
}
.pack.pack-img .pack-cap { clip-path: inset(0 0 91% 0); }
.pack.pack-img .pack-body { clip-path: inset(9% 0 0 0); }
.pack.pack-img.torn .pack-cap { transform: translate(35%, -45%) rotate(18deg); opacity: 0; }
.card-rar { color: var(--rc); letter-spacing: .04em; }

/* codes de rareté (C, R, SR, SSR, UR, CR) */
.card-gem { width: auto; min-width: 1.25em; padding: 0 .38em; border-radius: 999px; letter-spacing: .02em; }
.odd { grid-template-columns: 150px 1fr 58px; }

/* icône de la monnaie (remplace ◆ partout) */
.gem { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -.25em; margin: 0 .08em; object-fit: contain; filter: drop-shadow(0 0 3px rgba(150, 120, 255, .45)); }

/* images de cartes : visage plutôt vers le haut du cadre */
.card-art img { object-position: center 30%; }

/* image d'un perso, recadrée dans n'importe quel cadre (carte, vignette, wiki, échange) */
.art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }

/* ouverture multiple */
.pack-stack { position: relative; }
.pack-x { position: absolute; right: -14px; top: -10px; z-index: 4; background: var(--oc, var(--accent)); color: #111; font-family: var(--display); font-weight: 900; font-size: 18px; padding: 4px 12px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.op-stage.scroll { overflow-y: auto; justify-content: flex-start; }
.multi { width: min(1100px, 100%); text-align: center; padding: 6px 0 30px; }
.multi h1 { font-size: clamp(24px, 4vw, 36px); font-weight: 900; }
.multi .mx { color: var(--oc); }
.multi .sub { color: var(--muted); font-size: 13px; margin: 4px 0; }
.rar-count { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.rar-count span { font-weight: 800; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rc); color: var(--rc); }
.multi-h { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 24px 0 12px; }
.multi-hits, .multi-grid { display: flex; flex-wrap: wrap; gap: 14px 12px; justify-content: center; }
.multi-hits .card, .multi-grid .card { animation: fanin .5s backwards cubic-bezier(.2,.9,.3,1.1); }
.multi .sum-actions { margin-top: 28px; }

/* miniatures des cartes déjà révélées */
.rv-thumbs span { width: 34px; height: 46px; position: relative; overflow: hidden; border-radius: 6px; }
.rv-thumbs span.on { border: 2px solid var(--rc); background: #14121b; box-shadow: 0 0 10px color-mix(in srgb, var(--rc) 50%, transparent); }
.rv-thumbs span .art-gen { font-size: 6px; }

/* page du booster : choix du mode et du nombre avant d'ouvrir */
.op-mode, .op-qty { margin-top: 14px; }
.op-qty button { min-width: 64px; font-family: var(--display); font-weight: 900; }
.op-go { margin-top: 18px; padding: 13px 26px; font-size: 16px; }
.op-note { margin: 12px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); text-align: center; }
.op-note.err { color: #ff7b8f; font-family: inherit; }
.op-choose.busy { opacity: .5; pointer-events: none; }
.op-pack-n { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .06em; margin-top: 2px; }

/* cœur des envies sur une carte manquante de la collection */
.wish-heart { position: absolute; top: 6px; right: calc(50% - 74px); z-index: 2; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #ff3d8b; color: #fff; font-size: 14px; line-height: 1; border: 2px solid #0b0a10; box-shadow: 0 0 10px rgba(255, 61, 139, .85); }

/* ---------- tombola ---------- */
.rf-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.rf-prize { display: flex; gap: 22px; align-items: center; padding: 22px; background: radial-gradient(circle at 20% 30%, rgba(255, 59, 92, .18), transparent 60%), var(--panel); }
.rf-prize h2 { font-size: 26px; font-weight: 900; margin: 6px 0 2px; }
.rf-cd { margin-top: 16px; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.rf-cd b { color: var(--text); font-family: var(--mono); font-size: 18px; }
.rf-bet { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.rf-bet .notice { margin: 0; }
.rf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.rf-stats > div { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.rf-stats b { display: block; font-size: 20px; font-weight: 900; }
.rf-stats b.acc { color: var(--accent); }
.rf-stats small { color: var(--muted); font-size: 12px; }
.rf-form { display: flex; flex-direction: column; gap: 10px; }
.rf-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.rf-form input { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); font-size: 18px; font-weight: 800; }
.rf-quick { display: flex; gap: 8px; flex-wrap: wrap; }
.rf-list { padding: 4px 0; }
.rf-row { display: grid; grid-template-columns: 48px 1fr auto 170px; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.rf-row:last-child { border-bottom: 0; }
.rf-row.me { background: rgba(124, 92, 255, .08); }
.rf-row .pos { font-family: var(--mono); color: var(--muted); }
.rf-row .who { display: flex; align-items: center; gap: 10px; font-weight: 700; min-width: 0; }
.rf-row .who .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 13px; background: hsl(var(--hue) 65% 45%); flex: none; }
.rf-row .tk { font-weight: 800; white-space: nowrap; }
.rf-row .pc { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.rf-row .pc b { font-family: var(--mono); font-size: 13px; min-width: 64px; text-align: right; }
.rf-row .bar { width: 80px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.rf-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff3b5c, #f5b301); border-radius: 99px; }
.rf-res { padding: 20px; }
.rf-last { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.rf-last h3 { font-size: 20px; font-weight: 900; margin: 6px 0 12px; }
.rf-hist { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 12px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.rf-hist > div { display: grid; grid-template-columns: 100px 1fr auto; gap: 12px; }
@media (max-width: 860px) { .rf-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .rf-prize { flex-direction: column; text-align: center; }
  .rf-row { grid-template-columns: 36px 1fr auto; }
  .rf-row .pc { grid-column: 2 / -1; justify-content: flex-start; }
  .rf-hist > div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- avatars avec photo + menu du profil ---------- */
.avatar, .av { position: relative; overflow: hidden; cursor: default; }
.avatar { cursor: pointer; color: var(--text); padding: 0; font: inherit; font-weight: 800; }
.avatar i, .av i { font-style: normal; }
.avatar img, .av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar:has(img) i, .av:has(img) i { visibility: hidden; }
.pm-wrap { position: relative; }
.prof-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 300px; max-width: calc(100vw - 24px); padding: 16px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 14px; }
.prof-menu[hidden] { display: none; }
.pm-head { display: flex; align-items: center; gap: 12px; }
.pm-av { width: 52px !important; height: 52px !important; font-size: 20px; border: 2px solid rgba(255,255,255,.25); }
.pm-id { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pm-id b { font-family: var(--display); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-prov { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; min-width: 0; }
.pm-prov span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-prov svg { width: 15px; height: 15px; flex: none; }
.pm-prov.discord { color: #8b96ff; }
.pm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pm-stats > div { padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); min-width: 0; }
.pm-stats small { display: block; color: var(--muted); font-size: 11px; }
.pm-stats b { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.pm-stats b span { color: var(--muted); font-weight: 500; }
.pm-links { display: flex; flex-direction: column; gap: 2px; }
.pm-link { padding: 8px 10px; border-radius: 10px; font-weight: 700; color: #ff7b5c; }
.pm-link:hover { background: rgba(255,255,255,.05); }
/* bouton « Installer l'app » (menu du profil et pied de page), masqué quand le jeu est déjà ouvert comme une app */
button.pm-link { border: 0; background: none; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.foot .install-link { border: 0; background: none; padding: 0; font: inherit; color: var(--text); text-decoration: underline; cursor: pointer; }
@media (display-mode: standalone) { .install-link { display: none !important; } }
html.standalone .install-link { display: none !important; }
.inst-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.inst-steps b { color: var(--text); }
.inst-ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--panel2); border: 1px solid var(--line); vertical-align: middle; margin: 0 2px; }
.pm-logout { text-align: left; padding: 10px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.pm-logout:hover { color: var(--text); }

/* ---------- profil : en-tête aux couleurs du joueur ---------- */
.ph { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; margin: 26px 0 8px; padding: 30px 30px 26px;
  border-radius: 22px; border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse 60% 120% at 0% 0%, hsl(var(--hue) 75% 45% / .38), transparent 70%),
              radial-gradient(ellipse 50% 90% at 100% 100%, rgba(124, 92, 255, .18), transparent 70%), var(--panel); }
.ph::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255,255,255,.025) 22px 23px); }
.ph-av { width: 124px !important; height: 124px !important; font-family: var(--display); font-size: 46px;
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px hsl(var(--hue) 85% 62%), 0 0 44px hsl(var(--hue) 85% 55% / .55); }
.ph-main { min-width: 0; }
.ph h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 900; margin: 6px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; overflow-wrap: anywhere; }
.ph-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.ph-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text); }
.ph-pill svg { width: 13px; height: 13px; }
.ph-pill.me { background: var(--accent); border-color: var(--accent); color: #fff; }
.ph-pill.prov.discord { background: rgba(88,101,242,.18); border-color: rgba(88,101,242,.5); color: #b8bfff; }
.ph-pill.prov.google { background: rgba(255,255,255,.08); }
.ph-next { margin: 14px 0; max-width: 460px; }
.ph-next-t { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.ph-next-t b { color: var(--text); }
.ph-bar { height: 7px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.ph-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, hsl(var(--hue) 85% 60%), var(--accent)); }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-stats { display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); gap: 10px; align-self: stretch; }
.ph-stats > div { padding: 12px 14px; border-radius: 14px; background: rgba(11,10,16,.55); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.ph-stats b { font-family: var(--display); font-size: 24px; font-weight: 900; white-space: nowrap; }
.ph-stats b span { color: var(--dim); font-size: 15px; }
.ph-stats b.acc { color: var(--accent); }
.ph-stats small { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 900px) { .ph { grid-template-columns: auto 1fr; } .ph-stats { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) {
  .ph { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 24px 16px; }
  .ph h1, .ph-meta, .ph-actions { justify-content: center; }
  .ph-next { margin-inline: auto; width: 100%; }
  .ph-stats { grid-template-columns: repeat(2, 1fr); width: 100%; }
}

/* ---------- profil : collection et univers ---------- */
.prof-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; margin-top: 30px; }
@media (max-width: 860px) { .prof-grid { grid-template-columns: 1fr; } }
.pc, .pu { padding: 20px; }
.pc h3, .pu h3 { font-family: var(--display); font-size: 17px; font-weight: 800; margin: 0 0 14px; }
.pc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pc-head span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pc-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.06); gap: 2px; }
.pc-bar i { display: block; height: 100%; min-width: 3px; }
.pc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); background: color-mix(in srgb, var(--rc) 10%, transparent); color: var(--rc); }
.pc-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--rc); }
.pc-chip b { color: var(--text); }
.pc-chip small { color: var(--muted); font-weight: 600; }
.pu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 18px; }
.pu-it { min-width: 0; }
.pu-it[data-act] { cursor: pointer; }
.pu-it[data-act]:hover .pu-t span { color: var(--text); }
.pu-t { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 5px; }
.pu-t span { color: #c9c7d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pu-t b { font-family: var(--mono); font-size: 12px; flex: none; }
.pu-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.pu-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); border-radius: 99px; }
.pu-it.done .pu-t b { color: var(--ok); }
.pu-it.done .pu-bar i { background: var(--ok); }
.count-pill { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.prof-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 30px 0 8px; }

/* ---------- classement ---------- */
.rk-tabs { margin-bottom: 10px; }
.rk-desc { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.rk-search { max-width: 380px; margin-bottom: 26px; }
.rk-search .search { width: 100%; }
.you { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: #fff; vertical-align: 2px; }
.podium { max-width: 760px; margin: 0 auto; gap: 14px; }
.pod-top { position: relative; width: max-content; margin: 0 auto 8px; }
.pod .pod-av { width: 76px; height: 76px; font-size: 28px; margin: 0; border: 0; box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--rc, #9aa4b2), 0 0 30px color-mix(in srgb, var(--rc, #9aa4b2) 45%, transparent); }
.pod.p1 { --rc: var(--gold); }
.pod.p2 { --rc: #c3c9d6; }
.pod.p3 { --rc: #e59b62; }
.pod.p1 .pod-av { width: 96px; height: 96px; font-size: 34px; }
.pod-medal { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-size: 12px; font-weight: 900; color: #15141d; background: var(--rc); box-shadow: 0 0 0 3px var(--bg); }
.pod .nm { margin-top: 12px; font-family: var(--display); font-size: 15px; }
.pod .tt { color: var(--rc); font-weight: 700; margin-top: 2px; }
.pod .tt i { font-style: normal; opacity: .8; }
.pod .base { border-color: color-mix(in srgb, var(--rc) 40%, var(--line)); }
.pod .base b { color: var(--rc); }
.pod.p2 .base { height: 96px; background: linear-gradient(#2a2c35, #18171f); }
.pod.p1 .base { height: 128px; }
.pod.p3 .base { height: 80px; }
.rk { grid-template-columns: 52px 1fr auto auto; }
.rk .who-t { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.rk .who-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk .who small { font-size: 11px; }
.rk-bar { display: block; width: min(180px, 100%); height: 4px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.rk-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.rk-sticky .rk { background: linear-gradient(90deg, rgba(255,61,127,.2), var(--bg) 70%); border-left: 3px solid var(--accent); }
@media (max-width: 600px) { .rk { grid-template-columns: 40px 1fr auto; } .rk .mth { display: none; } .pod .pod-av { width: 60px; height: 60px; } .pod.p1 .pod-av { width: 74px; height: 74px; } }

/* ---------- titres de collectionneur ---------- */
button.rank-badge { cursor: pointer; color: var(--text); font-family: 'Inter'; display: inline-flex; align-items: center; gap: 0; transition: border-color .15s, background .15s; }
button.rank-badge:hover { border-color: var(--accent); background: rgba(255,61,127,.08); }
.rb-q { margin-left: 7px; width: 15px; height: 15px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10px; font-weight: 800; background: rgba(255,255,255,.08); color: var(--muted); }
.tl { display: flex; flex-direction: column; gap: 8px; }
.tl-it { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); opacity: .65; }
.tl-it.got { opacity: 1; }
.tl-it.cur { opacity: 1; border-color: var(--accent); background: linear-gradient(90deg, rgba(255,61,127,.14), var(--panel2)); }
.tl-jp { font-weight: 900; color: var(--accent); text-align: center; font-size: 15px; }
.tl-n b { display: block; font-family: var(--display); font-size: 14px; }
.tl-n small { color: var(--muted); font-size: 12px; }
.tl-st { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.tl-it.got .tl-st { color: var(--ok); }
.tl-it.cur .tl-st { color: var(--accent); }

/* ---------- wiki : liste ---------- */
.wiki-filters { margin-bottom: 18px; gap: 10px; flex-wrap: wrap; }
.wiki-filters .sel { max-width: 240px; }
.wgrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.witem { position: relative; padding: 9px 12px 9px 9px; }
.witem .th { width: 44px; height: 44px; border-radius: 10px; }
.witem .th .art-img, .witem .th .art-gen { position: absolute; inset: 0; }
.witem.locked .th { filter: grayscale(1) brightness(.55); border-style: dashed; }
.witem.locked b { color: #c9c7d8; }
.witem .rl { font-family: var(--display); font-size: 13px; }
.witem .lk { width: 15px; height: 15px; color: var(--dim); flex: none; }
.witem .lk svg { width: 100%; height: 100%; display: block; }

/* ---------- wiki : fiche ---------- */
.fiche-hero { padding: 26px 0 30px; isolation: isolate; }
.fh-bg { position: absolute; inset: -40px; z-index: -2; background-size: cover; background-position: center 25%; filter: blur(28px) saturate(1.3); opacity: .35; }
.fiche-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11,10,16,.35), var(--bg) 96%), radial-gradient(ellipse 60% 100% at 10% 0%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%); }
.fh-wm { position: absolute; right: 3%; top: 50%; transform: translateY(-50%); z-index: -1; font-family: var(--display); font-weight: 900; font-size: clamp(80px, 16vw, 210px);
  color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.07); pointer-events: none; line-height: 1; }
.fiche-hero .tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.fiche-hero .tags span { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 8px; border: 1px solid var(--line); }
.fiche-hero .tags .tg-s { background: var(--accent); border-color: var(--accent); color: #fff; }
.fiche-hero .tags .tg-r { background: rgba(11,10,16,.5); }
.fiche-hero .tags .tg-o { border-color: transparent; color: var(--muted); }
.fiche-body { grid-template-columns: 1fr 300px; gap: 28px; }
.fiche-main { min-width: 0; padding: 0; background: none; border: 0; }
.fs-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.fs-tabs button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.fs-tabs button:hover { border-color: var(--accent); }
.fs { padding: 22px 0 6px; scroll-margin-top: 80px; }
.fs + .fs { border-top: 1px solid var(--line); margin-top: 18px; }
.fs-k { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.fs h2 { font-size: 24px; font-weight: 900; margin: 0 0 14px; }
.fs-lead { font-size: 17px; line-height: 1.55; margin: 6px 0 16px; }
.fw { display: flex; flex-direction: column; gap: 8px; }
.fw-row { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 70px auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.fw-n { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.fw-bar i { display: block; height: 100%; border-radius: 99px; }
.fw-p { font-family: var(--mono); font-size: 12px; text-align: right; }
.fm { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.fm > div { padding: 12px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); min-width: 140px; }
.fm small { display: block; color: var(--muted); font-size: 11px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.fm b { font-family: var(--display); font-size: 20px; color: #7dd3fc; }
.fm .btn { align-self: center; }
.fu { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.fu-it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); min-width: 0; transition: border-color .15s; }
.fu-it:hover { border-color: var(--rc); }
.fu-it .th { width: 40px; height: 40px; border-radius: 9px; overflow: hidden; position: relative; flex: none; border: 1.5px solid var(--rc); display: grid; place-items: center; font-family: var(--display); font-weight: 900; color: var(--dim); }
.fu-it .th .art-img, .fu-it .th .art-gen { position: absolute; inset: 0; }
.fu-it.unk .th { border-style: dashed; background: var(--bg2); }
.fu-it b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-it small { font-size: 11px; font-weight: 700; }
.fu-it > span:last-child { min-width: 0; }
.flock { padding: 26px; margin-top: 4px; }
.flock-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); color: var(--accent); background: var(--panel2); }
.flock-ic svg { width: 20px; height: 20px; }
.flock h2 { font-size: 26px; font-weight: 900; margin: 12px 0 6px; }
.flock p { color: var(--muted); max-width: 520px; }
.flock p b { color: var(--text); }
.flock-ch { font-size: 12px; }
.flock-sk { display: flex; flex-direction: column; gap: 8px; margin-top: 22px; }
.flock-sk i { display: block; height: 9px; border-radius: 99px; background: linear-gradient(90deg, var(--panel2), #23222e, var(--panel2)); }
.flock-sk i:nth-child(2) { width: 85%; } .flock-sk i:nth-child(3) { width: 60%; }
.fiche-side { position: sticky; top: 84px; align-items: stretch; gap: 10px; }
.fs-card { position: relative; display: flex; justify-content: center; }
.fs-card .card { --w: 240px; }
.fs-card.locked .card { filter: grayscale(1) brightness(.5); pointer-events: none; }
.fs-q { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 70px; font-weight: 900; color: rgba(255,255,255,.75); text-shadow: 0 4px 24px rgba(0,0,0,.7); pointer-events: none; }
.fs-line { font-weight: 800; font-size: 13px; text-align: center; margin-top: 4px; }
.fs-sub { font-size: 11.5px; color: var(--muted); text-align: center; }
.fs-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.fs-info { margin: 8px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.fs-info div { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.fs-info dt { color: var(--muted); }
.fs-info dd { margin: 0; font-weight: 700; text-align: right; }
@media (max-width: 860px) { .fiche-body { grid-template-columns: 1fr; } .fiche-side { position: static; order: -1; max-width: 340px; margin: 0 auto; width: 100%; } }
@media (max-width: 560px) { .fw-row { grid-template-columns: 1fr 60px auto; } .fw-bar { display: none; } }

/* ---------- amis ---------- */
.ph-pill.fr { background: rgba(52,211,153,.14); border-color: rgba(52,211,153,.45); color: #8ef0c6; }
.btn.friend.on { border-color: rgba(52,211,153,.5); color: #8ef0c6; }
.btn.friend.on:hover { border-color: #ff7b8f; color: #ff7b8f; }
.fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.fr-it { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); min-width: 0; transition: border-color .15s; }
.fr-it:hover { border-color: var(--accent); }
.fr-it > a { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; text-decoration: none; }
.fr-t { min-width: 0; }
.fr-t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-t small { color: var(--muted); font-size: 11.5px; }
.fr-mu { font-size: 11px; font-weight: 800; color: #8ef0c6; white-space: nowrap; }
.fr-h { font-size: 16px; margin: 20px 0 10px; }
@media (max-width: 980px) { .vitrine { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .vitrine .card { --w: 150px; } }

/* ---------- parrainage ---------- */
.ref { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.ref-top { display: flex; gap: 18px; align-items: stretch; flex-wrap: wrap; }
.ref-how { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 10px; }
.ref-how p { margin: 0; line-height: 1.5; }
.ref-gem { color: #7dd3fc; }
.ref-link { display: flex; gap: 8px; }
.ref-link input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }
.ref-claim { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 14px 22px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(125,211,252,.16), rgba(255,61,127,.12)); border: 1px solid rgba(125,211,252,.4); }
.ref-claim b { font-family: var(--display); font-size: 26px; color: #7dd3fc; }
.ref-claim span { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.ref-me { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.ref-me input { max-width: 220px; }
.ref-prog { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.ref-prog small { color: var(--muted); font-size: 11.5px; }
.ref-bar { display: block; height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.ref-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #7dd3fc); }
.ref-ok { color: #8ef0c6; font-weight: 800; font-size: 12px; }
.ref-ready { color: #7dd3fc; font-weight: 800; font-size: 11.5px; }
.ref-list { margin-top: 12px; }
.ref-invite { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(125,211,252,.1); border: 1px solid rgba(125,211,252,.35); font-size: 13px; }

/* ---------- annonce : indices un par un ---------- */
.sp-clues { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 0 20px; animation: fade .4s; }
.sp-clue { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sp-clue b { position: relative; font-family: var(--display); font-weight: 900; font-size: clamp(22px, 3vw, 30px); line-height: 1.15; }
.sp-clue .q { color: rgba(255,255,255,.18); letter-spacing: .2em; }
.sp-clue .v { display: none; }
.sp-clue.on .q { display: none; }
.sp-clue.on .v { display: inline-block; animation: clue-in .45s cubic-bezier(.2,.9,.3,1.3); }
.sp-clue.main { margin-top: 10px; }
.sp-clue.main b { font-size: clamp(32px, 6vw, 64px); }
.sp-clue.main.on .v { text-shadow: 0 0 28px color-mix(in srgb, var(--rc) 70%, transparent); }
@keyframes clue-in { from { opacity: 0; transform: translateY(10px) scale(.92); filter: blur(4px); } }

/* bouton « Recycler les doublons » : vert pour qu'on le repère */
.btn.recycle { background: var(--ok); border-color: var(--ok); color: #06231a; font-weight: 800; box-shadow: 0 0 18px rgba(62,207,142,.35); }
.btn.recycle:hover { background: #5be0a6; border-color: #5be0a6; }
.sp-tap { margin: 6px 0 0; font-size: 13px; color: var(--muted); opacity: 0; transition: opacity .3s; }
.splash.wait .sp-tap { opacity: 1; animation: tap-pulse 1.4s ease-in-out infinite; }
.splash.wait .sp-clue.main .q { color: color-mix(in srgb, var(--rc) 55%, transparent); }
@keyframes tap-pulse { 50% { opacity: .45; } }

/* aperçu en direct de la couleur d'avatar (réglages) */
.hue-dot { width: 30px; height: 30px; border-radius: 50%; flex: none; background: hsl(var(--hue) 65% 45%); border: 3px solid rgba(255,255,255,.2);
  box-shadow: 0 0 14px hsl(var(--hue) 85% 55% / .5); transition: background .08s, box-shadow .08s; }

/* photo de profil envoyée par le joueur (réglages) */
.ph-up { flex-wrap: wrap; }
.ph-up .ph-up-av { width: 44px; height: 44px; font-size: 18px; border: 2px solid rgba(255,255,255,.2); }
.ph-up label.btn { cursor: pointer; }
.ph-up small { flex-basis: 100%; padding-left: 122px; font-size: 11.5px; }
@media (max-width: 560px) { .ph-up small { padding-left: 0; } }

/* parchemin Missions dans la barre du haut (remplace le bouton son, déplacé dans les réglages) */
.quest-btn { position: relative; font-size: 17px; text-decoration: none; transition: border-color .15s, transform .15s; }
.quest-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.quest-btn .dot { top: -2px; right: -2px; }
.ai-note { font-size: 11px; color: var(--dim); font-family: var(--mono); letter-spacing: .04em; margin-top: 4px; }
.quest-btn.on { border-color: var(--accent); background: rgba(255,61,127,.12); }

/* ---------- jeux : upgrade et coin flip ---------- */
.gm-tabs { margin: 0 0 18px; }
.gm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gm-head h3 { margin: 0; font-size: 16px; }
.gm-head b { margin-left: auto; font-family: var(--display); font-size: 18px; color: #7dd3fc; }
.gm-stake { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gm-gems input { width: 120px; }
.gm-chosen { display: flex; flex-wrap: wrap; gap: 6px; min-height: 34px; align-items: center; font-size: 12.5px; }
.gm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 999px; border: 1px solid var(--rc); background: var(--panel2); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.gm-chip .th { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; position: relative; flex: none; }
.gm-chip .th .art-img, .gm-chip .th .art-gen { position: absolute; inset: 0; }
.gm-chip b { color: #7dd3fc; font-size: 11px; }
.gm-chip i { font-style: normal; color: var(--muted); }
.gm-chip:hover { border-color: #ff7b8f; }
.gm-pick-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.gm-pick-head .search { flex: 1; min-width: 160px; }
.gm-grid { max-height: 340px; }
.bc .gm-cv { position: absolute; top: 4px; right: 4px; z-index: 2; font-size: 9.5px; font-weight: 800; padding: 1px 5px; border-radius: 999px; background: rgba(11,10,16,.85); color: #7dd3fc; }
.gm-rule { display: block; font-size: 11.5px; line-height: 1.45; margin-top: 10px; }
/* upgrade */
.gm-up { display: grid; grid-template-columns: minmax(0, 1fr) 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.gm-center { padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; position: sticky; top: 84px; }
.gm-ring { --p: 0; position: relative; width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ok) 0 calc(var(--p) * 1%), #ff3d5c calc(var(--p) * 1%) 100%); box-shadow: 0 0 26px rgba(0,0,0,.35); transition: box-shadow .3s; }
.gm-ring.idle { background: rgba(255,255,255,.07); }
.gm-ring > div { position: relative; z-index: 1; width: 150px; height: 150px; border-radius: 50%; background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gm-ring b { font-family: var(--display); font-size: 30px; white-space: nowrap; }
.gm-ring small { color: var(--muted); font-size: 12px; }
/* trait : pivote autour du centre, visible sur la bande colorée (+ dépasse un peu dehors) */
.gm-needle { position: absolute; z-index: 2; left: 50%; top: -8px; width: 6px; height: calc(50% + 8px); margin-left: -3px; transform-origin: 50% 100%;
  background: linear-gradient(#fff 0 34px, transparent 34px); border-radius: 3px; filter: drop-shadow(0 0 6px #fff); pointer-events: none; }
.gm-ring.idle .gm-needle { opacity: .35; }
.gm-ring.hit { box-shadow: 0 0 40px rgba(62,207,142,.8); }
.gm-ring.miss { box-shadow: 0 0 40px rgba(255,61,92,.7); }
.gm-res { margin: 0; font-size: 13px; color: var(--muted); min-height: 36px; }
.gm-target { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gm-tcard { display: flex; justify-content: center; }
.gm-tcard .card { --w: 150px; }
.gm-tgrid { max-height: 260px; }
.gm-hist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.gm-h { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.gm-h .th { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; position: relative; flex: none; border: 1.5px solid var(--rc); }
.gm-h .th .art-img, .gm-h .th .art-gen { position: absolute; inset: 0; }
.gm-h b { display: block; font-size: 13px; }
.gm-h small { color: var(--muted); font-size: 11.5px; }
.gm-h em { font-style: normal; font-weight: 800; font-size: 12px; }
.gm-h.won em { color: var(--ok); } .gm-h.lost em { color: #ff7b8f; } .gm-h.lost { opacity: .75; }
.gm-win { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
/* coin flip */
.gm-flip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.gm-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.gm-go p { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted); }
.gm-go p b { color: var(--text); }
.gm-open { display: flex; flex-direction: column; gap: 8px; }
.gm-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); flex-wrap: wrap; }
.gm-row.own { border-color: rgba(255,61,127,.45); }
.gm-row.sel { border-color: var(--accent); background: rgba(255,61,127,.08); }
.gm-who { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.gm-who small { color: var(--muted); font-size: 11.5px; }
.gm-who.win b, .gm-who.win .plink { color: var(--ok); }
.gm-who.lose { opacity: .5; }
.gm-who.lose .av { filter: grayscale(1); }
.gm-who.lose b, .gm-who.lose .plink { color: var(--muted); }
.gm-wtag { font-style: normal; font-size: 11px; font-weight: 800; color: var(--ok); padding: 2px 8px; border-radius: 999px; background: rgba(62,207,142,.12); border: 1px solid rgba(62,207,142,.4); white-space: nowrap; }
.gm-res { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.gm-row.me-won { border-color: rgba(62,207,142,.5); border-left: 4px solid var(--ok); }
.gm-row.me-won .gm-res { color: var(--ok); }
.gm-row.me-lost { border-color: rgba(255,123,143,.4); border-left: 4px solid #ff7b8f; }
.gm-row.me-lost .gm-res { color: #ff7b8f; }
.gm-vs { color: var(--dim); font-size: 12px; font-weight: 800; }
.gm-rv { margin-left: auto; font-family: var(--display); font-size: 16px; color: #7dd3fc; }
.gm-thumbs { display: flex; align-items: center; gap: 3px; }
.gm-thumbs .th { width: 26px; height: 26px; border-radius: 6px; overflow: hidden; position: relative; border: 1.5px solid var(--rc); }
.gm-thumbs .th .art-img, .gm-thumbs .th .art-gen { position: absolute; inset: 0; }
.gm-thumbs em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 3px; }
.gm-thumbs em.gm-g { color: #7dd3fc; font-weight: 800; }
.gm-coin { position: relative; width: 140px; height: 140px; transform-style: preserve-3d; }
.gm-coin.spin { animation: gm-spin 2.6s cubic-bezier(.2,.75,.25,1) forwards; }
@keyframes gm-spin { to { transform: rotateY(var(--end)); } }
.gm-face { position: absolute; inset: 0; border-radius: 50%; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(circle at 35% 30%, #ffe38a, #d4a017 60%, #8a6408); border: 4px solid #f5d061; box-shadow: 0 0 30px rgba(245,179,1,.45); color: #2a1d00; }
.gm-face.b { transform: rotateY(180deg); }
.gm-face b { font-size: 12px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-face .gm-cav { width: 56px; height: 56px; font-size: 22px; border: 2px solid rgba(0,0,0,.25); }
@media (max-width: 1100px) { .gm-up { grid-template-columns: 1fr 1fr; } .gm-center { grid-column: 1 / -1; position: static; order: -1; } }
@media (max-width: 760px) { .gm-up, .gm-flip { grid-template-columns: 1fr; } }
.gm-tot { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.gm-tot b { margin-left: 0 !important; }
.gm-grid .bc.sel { outline: 3px solid var(--accent); outline-offset: 1px; box-shadow: 0 0 16px rgba(255,61,127,.55); }
.bc .gm-in { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 900; font-size: 13px; box-shadow: 0 2px 10px rgba(0,0,0,.5); }
.gm-grid .bc.sel .art-img, .gm-grid .bc.sel .art-gen { filter: brightness(.6); }
.gm-hp { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 2px; }
.gm-hp .av { width: 20px; height: 20px; font-size: 10px; }
.gm-fi .gm-fr { font-size: 11.5px; font-weight: 800; margin-top: -4px; }
.gm-fi.won .gm-fr { color: var(--ok); }
.gm-fi.lost .gm-fr { color: #ff7b8f; }
.gm-fi.lost .card { filter: grayscale(.85) brightness(.7); }

/* collection : visuels des cartes non possédées (case « spoil ») */
.coll-spoil { margin-left: auto; font-size: 13px; }
.spoil { position: relative; display: flex; justify-content: center; }
.spoil .card { filter: grayscale(.55) brightness(.62); transition: filter .2s; }
.spoil:hover .card { filter: grayscale(.2) brightness(.85); }
.spoil-tag { position: absolute; left: 50%; bottom: 26%; transform: translateX(-50%); z-index: 3; padding: 3px 10px; border-radius: 999px; background: rgba(11,10,16,.85); border: 1px solid var(--line); font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; pointer-events: none; }
/* coin flip : salon (page à part) — joueur A | pièce | joueur B, puis l'éditeur de mise */
.gm-cd b { color: var(--text); font-variant-numeric: tabular-nums; }
.gm-busy { font-size: 12px; font-weight: 800; color: var(--dim); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
/* coin flip : case « Prêt automatique » et badge dans la liste */
.gm-autochk { display: flex; align-items: flex-start; gap: 10px; flex-basis: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); cursor: pointer; }
.gm-autochk.on { border-color: rgba(250,204,21,.55); background: rgba(250,204,21,.07); }
.gm-autochk input { margin-top: 3px; accent-color: #facc15; }
.gm-autochk span { display: flex; flex-direction: column; gap: 2px; }
.gm-autochk b { font-size: 13.5px; }
.gm-autochk.on b { color: #facc15; }
.gm-autochk small { color: var(--muted); font-size: 12px; }
.gm-room > .gm-autochk { max-width: 560px; }
.gm-autob { font-size: 11px; font-weight: 800; color: #facc15; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(250,204,21,.45); background: rgba(250,204,21,.08); white-space: nowrap; }
.gm-room { display: flex; flex-direction: column; gap: 16px; }
.gm-room-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.gm-room-top .gm-cd { margin-left: auto; }
.gm-arena { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 230px) minmax(0, 1fr); gap: 16px; align-items: stretch; padding: 20px; border-radius: 18px;
  background: radial-gradient(circle at 50% 40%, rgba(245,179,1,.12), transparent 60%), var(--panel); border: 1px solid var(--line); }
.gm-pl { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 16px 12px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1.5px solid var(--line); min-width: 0; transition: border-color .2s, box-shadow .2s; }
.gm-pl.ready { border-color: var(--ok); box-shadow: 0 0 18px rgba(62,207,142,.25); }
.gm-pl.win { border-color: #f5d061; box-shadow: 0 0 22px rgba(245,179,1,.4); }
.gm-pl .gm-pav { width: 64px; height: 64px; font-size: 26px; }
.gm-pn { font-weight: 800; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-pv { font-family: var(--display); font-size: 22px; color: #7dd3fc; }
.gm-pl .gm-thumbs { flex-wrap: wrap; justify-content: center; }
/* cartes misées dans le salon : de vraies petites cartes, lisibles */
.gm-pstake { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0; }
.gm-pstake .card { --w: 92px; }
.gm-pgems { font-size: 13px; font-weight: 800; color: #7dd3fc; }
@media (max-width: 640px) { .gm-pstake { gap: 6px; } .gm-pstake .card { --w: 70px; } }
.gm-pc { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.gm-pw { font-size: 13px; padding: 10px 0; }
.gm-badge { margin-top: auto; font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.gm-badge.ok { color: var(--ok); border-color: rgba(62,207,142,.5); background: rgba(62,207,142,.08); }
.gm-badge.win { color: #f5d061; border-color: rgba(245,179,1,.5); background: rgba(245,179,1,.08); }
.gm-wait { margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 0; }
.gm-wait small { font-size: 12px; max-width: 220px; }
.gm-dots { display: flex; gap: 6px; }
.gm-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); animation: gm-dot 1.2s infinite ease-in-out; }
.gm-dots i:nth-child(2) { animation-delay: .2s; } .gm-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes gm-dot { 0%, 80%, 100% { opacity: .3; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.gm-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.gm-coin3d { perspective: 800px; }
.gm-coin.idle { animation: gm-idle 3.2s ease-in-out infinite; }
.gm-coin.landed { animation: none; transform: rotateY(var(--end)); }
@keyframes gm-idle { 0%, 100% { transform: rotateY(-18deg) translateY(0); } 50% { transform: rotateY(18deg) translateY(-6px); } }
.gm-pot { font-size: 13px; color: var(--muted); }
.gm-pot b { color: #7dd3fc; font-family: var(--display); font-size: 17px; }
.gm-status { margin: 0; font-size: 13px; color: var(--muted); min-height: 40px; }
.gm-r { display: block; font-size: 20px; } .gm-r.win { color: var(--ok); } .gm-r.lose { color: #ff7b8f; }
.gm-ready-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; }
.gm-ready-bar p { margin: 0 auto 0 0; font-size: 13.5px; }
.gm-room-end { justify-content: center; }
@media (max-width: 640px) {
  .gm-arena { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 12px; gap: 10px; }
  .gm-mid { grid-column: 1 / -1; order: -1; }
  .gm-coin { width: 110px; height: 110px; }
  .gm-face .gm-cav { width: 44px; height: 44px; font-size: 18px; }
  .gm-pl { padding: 12px 8px; }
  .gm-pl .gm-pav { width: 48px; height: 48px; font-size: 20px; }
}
