/* The card game (src/components/roster/page.php) */
@font-face { font-family: "Mukta"; src: url("/assets/fonts/Mukta.woff2") format("woff2"); font-display: swap; }

:root {
    color-scheme: dark;
    --bg: #1a1a1a; --surface: #242424; --surface-2: #303030; --surface-3: #3a3a3a; --line: #4a4a4a;
    --ink: #e7e7e7; --ink-2: #c2c2c2; --ink-3: #999;
    --brand: #3b7fff; --brand-2: #3b7fff; --good: #43c285; --bad: #ff7f76;
    --common: #a3adbb; --rare: #4ba3ff; --epic: #b87bff; --legendary: #ffc452;
    --cut: 7%; --spring: cubic-bezier(.2, 1.3, .4, 1);
    /* ? A card : a top left and a bottom right corner cut */
    --shape: polygon(var(--cut) 0, 100% 0, 100% 95%, calc(100% - var(--cut)) 100%, 0 100%, 0 5%);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-gutter: stable; background: var(--bg); color: var(--ink); font: 16px/1.45 "Mukta", system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(90% 50% at 50% -8%, rgb(59 127 255 / .17), transparent 70%), radial-gradient(60% 40% at 100% 100%, rgb(139 92 246 / .07), transparent 70%), var(--bg); background-attachment: fixed; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.1; }
h2 { font-size: 1.25rem; line-height: 1.2; text-wrap: balance; }
h3 { font-size: 1rem; }
:where(button, .btn, .set-tile, .tile) { transition: background-color .15s, border-color .15s, box-shadow .2s, scale .12s, translate .2s, opacity .15s; }
:where(button, .btn):active:not(:disabled, .flip, .card) { scale: .97; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ico, i[data-icon] { display: inline-flex; width: 1.2em; height: 1.2em; flex: none; vertical-align: -.22em; }
.ico svg, i[data-icon] svg { width: 100%; height: 100%; }
i[data-icon] .ico { width: 100%; height: 100%; }
.mono, .amount { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.amount { white-space: nowrap; }
.amount .ico { margin-right: .3em; color: var(--legendary); width: 1em; height: 1em; vertical-align: -.14em; }
.btn.main .amount .ico, .btn.gold .amount .ico { color: inherit; }
.amount.plus { color: var(--good); }

/* * Top bar */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); background: rgb(22 22 24 / .82); border-bottom: 1px solid rgb(255 255 255 / .07); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand img { border-radius: 8px; }
.tabs { display: flex; gap: 4px; margin: 0 auto; padding: 4px; border-radius: 14px; background: rgb(255 255 255 / .04); }
.tabs a { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; color: var(--ink-2); text-decoration: none; }
.tabs a:hover { background: var(--surface-2); color: var(--ink); }
.tabs a[aria-current] { color: #fff; background: linear-gradient(180deg, rgb(59 127 255 / .32), rgb(59 127 255 / .16)); box-shadow: inset 0 0 0 1px rgb(59 127 255 / .45); }
.tabs a[aria-current] .ico { color: #8fb4ff; }
.tools { display: flex; align-items: center; gap: 6px; }
.credits { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px; border: 1px solid rgb(255 196 82 / .28); border-radius: 99px; background: linear-gradient(120deg, rgb(255 196 82 / .14), var(--surface-2) 70%); font-weight: 700; font-variant-numeric: tabular-nums; }
.credits i { color: var(--legendary); }
.credits:hover { background: var(--surface-3); }
.credits.gain { animation: gain .7s; }
.credits.loss { animation: loss .7s; }
@keyframes gain { 30% { background-color: #1f5a41; } }
@keyframes loss { 30% { background-color: #5c2528; } }
.round { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.round:hover { background: var(--surface-3); color: var(--ink); }
.dot { position: absolute; top: -3px; right: -3px; min-width: 18px; padding: 0 4px; border-radius: 9px; background: var(--brand); color: #fff; font-size: .72rem; line-height: 18px; }

main { flex: 1; width: min(1260px, 100%); margin: 0 auto; padding: 24px 16px 48px; }
.empty { padding: 48px 16px; text-align: center; color: var(--ink-3); grid-column: 1 / -1; }
.loading { display: grid; justify-items: center; gap: 18px; padding: 18vh 0; color: var(--ink-3); }
.loading span { width: 70px; aspect-ratio: 5 / 7; border-radius: 8px; background: linear-gradient(100deg, var(--surface-2) 40%, var(--surface-3) 50%, var(--surface-2) 60%) 0 / 250% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.foot { padding: 20px 16px 30px; text-align: center; font-size: .84rem; color: var(--ink-3); }
.foot p { margin: 4px auto; max-width: 74ch; }
.link { padding: 2px 4px; border: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.more { display: inline-flex; align-items: center; gap: 2px; padding: 8px 0; border: 0; background: none; color: var(--ink-2); text-decoration: none; }
.more:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.back-link { margin-bottom: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 18px; border: 0; border-radius: 11px; background: var(--surface-3); color: var(--ink); text-decoration: none; text-align: center; }
.btn:hover:not(:disabled) { background: #343945; }
.btn.main { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 82%, #fff), var(--brand) 60%); color: #fff; font-weight: 700; box-shadow: 0 6px 18px rgb(59 127 255 / .28), inset 0 1px 0 rgb(255 255 255 / .22); }
.btn.main:hover:not(:disabled) { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 70%, #fff), color-mix(in srgb, var(--brand) 88%, #fff) 60%); box-shadow: 0 8px 24px rgb(59 127 255 / .4), inset 0 1px 0 rgb(255 255 255 / .26); }
.btn.gold { background: var(--legendary); color: #2a1c00; }
.btn.gold:hover:not(:disabled) { background: #ffd47e; }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn.small { min-height: 38px; padding: 4px 14px; font-size: .94rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.section-head { margin-bottom: 18px; }
.block { margin-top: 36px; }
.block > .row { margin-bottom: 12px; }
.notice { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.seg button { min-height: 36px; padding: 2px 14px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 0 0 1px #454b59; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.filters input[type="search"], .filters select, #rank-search { min-height: 44px; min-width: 0; padding: 6px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.filters input[type="search"] { flex: 1 1 220px; }
.check { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 6px; color: var(--ink-2); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

/* * Cards : the rarity is told by the frame, the pips and the word. --x and --y (0 to 1) : where the light is, --o : its strength */
.card { --r: var(--common); --x: .5; --y: .5; --o: 0; position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; padding: 0; border: 0; background: none; perspective: 900px; text-align: left; container-type: inline-size; border-radius: 8px; }
.card.rare { --r: var(--rare); } .card.epic { --r: var(--epic); } .card.legendary { --r: var(--legendary); }
.card .tilt { position: absolute; inset: 0; }
.card.live .tilt { transform: rotateX(calc((.5 - var(--y)) * 20deg)) rotateY(calc((var(--x) - .5) * 24deg)); transition: transform .35s ease-out; }
.card.live.tilting .tilt { transition: transform .08s linear; will-change: transform; }
button.card { transition: translate .18s ease-out; }
button.card:hover:not(.locked) { translate: 0 -4px; }
.card-in { position: absolute; inset: 0; overflow: hidden; clip-path: var(--shape); background: linear-gradient(160deg, color-mix(in srgb, var(--r) 80%, #fff), var(--r) 22%, color-mix(in srgb, var(--r) 35%, #000) 52%, var(--r)); }
.rim { position: absolute; inset: 0; overflow: hidden; clip-path: var(--shape); }
.rim span { position: absolute; inset: -30%; background: conic-gradient(#ffdf8e, #fff6d6, #c98f1f, #ffe9b0, #a86f10, #fff3c4, #e0a83c, #ffdf8e); }
.card.legendary .card-in { background: none; }
.art { position: absolute; inset: 2.2%; overflow: hidden; background: #090a0d; clip-path: var(--shape); }
.depth { position: absolute; inset: 0; }
.card.live .depth { transform: translate(calc((.5 - var(--x)) * 4.5%), calc((.5 - var(--y)) * 4.5%)) scale(1.06); transition: transform .35s ease-out; }
.card.live.tilting .depth { transition: none; }
.depth > img, .depth > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.art.portrait .depth > img { height: 80%; object-position: 50% 0; }
.art.wide .depth > video, .art.wide .depth > img:not(.blur) { height: 76%; }
.depth > .blur { filter: blur(14px) brightness(.5); transform: scale(1.2); }
.art.logo { background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--r) 40%, #303030), #1a1a1a 70%); }
/* ? Many logos are black : a light plate behind */
.art.logo .depth > img { inset: 14% 11% auto; width: 78%; height: 46%; padding: 6%; object-fit: contain; object-position: 50% 50%; background: rgb(240 242 246 / .94); border-radius: 4px; }
.collage { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 2px; opacity: .55; }
.collage img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; min-height: 0; }
.code { position: absolute; top: 3.6%; right: 5%; padding: .1em .55em; font-size: 5.4cqi; line-height: 1.5; background: rgb(0 0 0 / .74); color: #fff; border-radius: 3px; font-variant-numeric: tabular-nums; }
.plate { position: absolute; left: 2.2%; right: 2.2%; bottom: 1.6%; padding: 24cqi 6cqi 5cqi; background: linear-gradient(transparent, rgb(6 7 10 / .86) 45%, #06070a); clip-path: polygon(0 0, 100% 0, 100% 83%, 93% 100%, 0 100%); }
.plate b { display: block; font-size: 9.4cqi; line-height: 1.08; color: #fff; overflow-wrap: anywhere; }
.plate small { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-top: 2cqi; font-size: 6cqi; line-height: 1.2; color: #cfd3dc; }
.card.model .art { background: #1a1a1a; }
.card.model .model-art { position: absolute; inset: 0; display: block; background: radial-gradient(ellipse at 50% 30%, rgb(59 127 255 / .45), transparent 55%), linear-gradient(145deg, #303030, #1a1a1a 72%); }
.card.model .model-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.card.model .plate { padding: 8cqi 5cqi 6cqi; background: linear-gradient(transparent, rgb(26 26 26 / .94) 20%, #1a1a1a); }
.model-identity { display: flex; align-items: center; gap: 5cqi; min-width: 0; }
.model-avatar { width: 23cqi; height: 23cqi; flex: none; border: 2px solid var(--brand); border-radius: 50%; object-fit: cover; }
.model-copy { display: block; flex: 1; min-width: 0; }
.model-copy b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-copy small { display: flex; justify-content: flex-start; align-items: center; gap: 2cqi; margin-top: 2cqi; font-size: 5.2cqi; white-space: nowrap; }
.flag-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 4px; color: #e7e7e7; font-size: .58rem; font-weight: 700; line-height: 1; }
.country-flag { width: 10cqi; height: 7cqi; flex: none; border-radius: 2px; object-fit: cover; }
.platform-icon { width: 7cqi; height: 7cqi; flex: none; object-fit: contain; object-position: center; }
.model .plate > small { margin-top: 3cqi; }
.model-card-meta { display: flex; justify-content: flex-start !important; align-items: center; gap: 5px !important; }
.model-card-meta .flag-icon { width: 16px; height: 16px; }
.model-sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.model-sheet-head > img { width: 74px; height: 74px; flex: none; border: 2px solid var(--brand); border-radius: 50%; object-fit: cover; }
.model-sheet-head h2 { padding: 0; }
.model-sheet-head p { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--ink-2); }
.model-sheet-head .flag-icon { width: 20px; height: 20px; }
.model-sheet-head .platform-icon { width: 24px; height: 24px; }
.card.live .plate b, .card.live .plate small { transform: translate(calc((var(--x) - .5) * 2cqi), calc((var(--y) - .5) * 2cqi)); }
.pips { display: inline-flex; gap: 1.2cqi; color: var(--r); margin-left: auto; }
.pips svg { width: 5.6cqi; height: 5.6cqi; }
.worth { color: #fff; font-variant-numeric: tabular-nums; }
.badge { position: absolute; top: 3.6%; left: 9%; padding: .1em .55em; font-size: 6cqi; line-height: 1.5; border-radius: 3px; background: #fff; color: #111; font-weight: 700; }
.badge.new { background: var(--brand); color: #fff; }
.weekly-mark { position: absolute; top: 12%; right: 5%; z-index: 2; display: grid; place-items: center; width: 11cqi; height: 11cqi; border-radius: 50%; background: linear-gradient(135deg, #fff0c2, #ffc452 45%, #c98f1f); color: #2a1c00; box-shadow: 0 0 0 1.5px rgb(0 0 0 / .55), 0 0 12px rgb(255 196 82 / .6); }
.weekly-mark .ico { width: 64%; height: 64%; }
.motion-mark { position: absolute; left: 5%; top: 11%; width: 9cqi; height: 9cqi; color: #fff; filter: drop-shadow(0 1px 2px #000); }
.motion-mark .ico { width: 100%; height: 100%; }
.card.epic:not(.locked)::before, .card.legendary:not(.locked)::before { content: ""; position: absolute; inset: 6%; box-shadow: 0 0 26px 3px color-mix(in srgb, var(--r) 42%, transparent); border-radius: 12px; }
.card.big.epic:not(.locked)::before, .card.big.legendary:not(.locked)::before { box-shadow: 0 0 70px 8px color-mix(in srgb, var(--r) 45%, transparent); }

/* * Foil. The layers are only drawn on the live card, and wider than it : moved by transform, never painted again.
   ? At rest, a still reflection tells the foil cards in the grids */
.foil, .glare { position: absolute; pointer-events: none; opacity: 0; transition: opacity .3s; }
.card:not(.live) .foil, .card:not(.live) .glare { display: none; }
.card.live .foil, .card.live .glare { opacity: var(--o); }
.card.epic:not(.live, .locked, .back) .card-in::after, .card.legendary:not(.live, .locked, .back) .card-in::after, .card.rare:not(.live, .locked, .back) .card-in::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(118deg, transparent 30%, rgb(255 255 255 / .13) 46%, transparent 54%); }
.card.epic:not(.live, .locked, .back) .card-in::after { background: linear-gradient(118deg, rgb(255 90 190 / .1), transparent 30%, rgb(140 110 255 / .2) 46%, rgb(80 220 255 / .12) 56%, transparent 72%); }
.card.legendary:not(.live, .locked, .back) .card-in::after { background: linear-gradient(118deg, rgb(255 190 80 / .16), transparent 28%, rgb(255 240 200 / .24) 46%, rgb(255 170 60 / .14) 58%, transparent 74%); }
.foil.soft { inset: -60%; background: linear-gradient(115deg, transparent 42%, rgb(255 255 255 / .22) 50%, transparent 58%); transform: translate(calc((var(--x) - .5) * 60%), calc((var(--y) - .5) * 20%)); }
.foil.prism { inset: -60%; mix-blend-mode: color-dodge; background: linear-gradient(115deg, transparent 34%, rgb(255 70 110 / .34) 42%, rgb(255 214 80 / .34) 45%, rgb(80 255 160 / .34) 48%, rgb(70 180 255 / .42) 52%, rgb(190 100 255 / .34) 56%, transparent 64%); transform: translate(calc((var(--x) - .5) * 62%), calc((var(--y) - .5) * 34%)); }
.foil.lines { inset: 0; mix-blend-mode: overlay; background: repeating-linear-gradient(0deg, rgb(255 255 255 / .16) 0 1px, transparent 1px 4px); }
/* ? The light shows the pattern around the pointer only */
.foil.rainbow, .foil.etch, .foil.glitter { inset: 2%; overflow: hidden; clip-path: var(--shape); mix-blend-mode: color-dodge; mask-image: radial-gradient(circle at calc(var(--x) * 100%) calc(var(--y) * 100%), #000 8%, rgb(0 0 0 / .5) 34%, transparent 66%); }
.foil.rainbow::before { content: ""; position: absolute; inset: -70%; background: repeating-linear-gradient(112deg, hsl(330 100% 62% / .5) 0, hsl(285 100% 66% / .5) 4%, hsl(215 100% 62% / .5) 8%, hsl(170 100% 52% / .46) 12%, hsl(95 90% 55% / .4) 16%, hsl(48 100% 58% / .46) 20%, hsl(330 100% 62% / .5) 24%); transform: translate(calc((.5 - var(--x)) * 42%), calc((.5 - var(--y)) * 42%)); }
.card.legendary .foil.rainbow { opacity: calc(var(--o) * .55); }
.foil.etch { mix-blend-mode: soft-light; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill='none' stroke='white' stroke-width='1.4'%3E%3Cpath d='M14 0v8.5M14 8.5 0 16.6v16.2l14 8.1 14-8.1V16.6zM14 40.9V49'/%3E%3C/g%3E%3C/svg%3E"); }
.foil.glitter::before, .foil.glitter::after { content: ""; position: absolute; inset: -30%; }
.foil.glitter::before { background: var(--glitter-a); transform: translate(calc((var(--x) - .5) * 16%), calc((var(--y) - .5) * 16%)); }
.foil.glitter::after { background: var(--glitter-b); mix-blend-mode: multiply; transform: translate(calc((.5 - var(--x)) * 20%), calc((.5 - var(--y)) * 20%)); opacity: .9; }
.foil.gold { inset: 2%; clip-path: var(--shape); mix-blend-mode: overlay; background: linear-gradient(140deg, rgb(255 214 120 / .55), transparent 30%, rgb(255 190 70 / .3) 55%, transparent 75%, rgb(255 235 180 / .5)); }
.foil.sweep { inset: -20% -120%; background: linear-gradient(108deg, transparent 45%, rgb(255 246 214 / .5) 50%, transparent 55%); transform: translateX(-36%); }
.glare { inset: -60%; mix-blend-mode: soft-light; background: radial-gradient(circle at 50% 50%, rgb(255 255 255 / .85), transparent 32%); transform: translate(calc((var(--x) - .5) * 46%), calc((var(--y) - .5) * 46%)); }
@media (prefers-reduced-motion: no-preference) {
    body:not(.still) .card.live .rim span { animation: turn 9s linear infinite; }
    body:not(.still) .card.live .foil.sweep { animation: sweep 5s ease-in-out infinite 1s; }
}
@keyframes turn { to { transform: rotate(1turn); } }
@keyframes sweep { 0%, 35% { transform: translateX(-36%); } 75%, 100% { transform: translateX(36%); } }

.card.locked .card-in { background: var(--line); }
.card.locked .art { background: repeating-linear-gradient(135deg, #12141a 0 10px, #161920 10px 20px); display: grid; place-items: center; color: #3a404d; }
.card.locked .art > .ico { width: 26%; height: auto; aspect-ratio: 1; }
.card.locked .plate { background: none; }
.card.locked .plate b { color: var(--ink-1); font-weight: 400; }
.card.locked { opacity: .8; }
.card.locked .depth { place-content: center; }
.card.locked .depth .ico { font-size: 28cqi; margin-bottom: 0.5em; }
.card.back { --r: #8f3539; }
.card.back.epic { --r: var(--epic); } .card.back.legendary { --r: var(--legendary); }
.card.back .card-in { background: linear-gradient(160deg, color-mix(in srgb, var(--r) 70%, #fff), color-mix(in srgb, var(--r) 45%, #000) 45%, var(--r)); }
.card.back .art { display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--r) 45%, #14090b), #0d0709 72%); }
.card.back .art::before { content: ""; position: absolute; inset: 7%; border: 1px solid color-mix(in srgb, var(--r) 60%, transparent); clip-path: var(--shape); }
.card.back .art img { width: 40%; border-radius: 18%; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 18px 14px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 12px 10px; margin-top: 12px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 14px; overflow-x: auto; padding: 8px 2px 16px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.strip > * { scroll-snap-align: start; }
.tiles-strip { grid-template-rows: repeat(2, auto); grid-auto-columns: minmax(230px, 1fr); }
.tile { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; }
.tile:hover { background: var(--surface-2); }
.tile > img { width: 46px; height: 46px; flex: none; border: 2px solid var(--brand); border-radius: 50%; object-fit: cover; object-position: 50% 10%; }
.tile b, .tile small { display: block; line-height: 1.3; }
.tile small { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* * Packs */
.statuses { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin-bottom: 28px; }
.status { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border: 1px solid rgb(255 255 255 / .08); border-radius: 16px; background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%); }
.status > .ico { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: rgb(59 127 255 / .16); color: #8fb4ff; }
.status.is-ready { border-color: rgb(67 194 133 / .45); } .status.is-ready > .ico { background: rgb(67 194 133 / .18); color: var(--good); }
.status.pity > .ico { background: rgb(255 196 82 / .16); color: var(--legendary); }
.status.gold { border-color: rgb(255 196 82 / .45); background: linear-gradient(120deg, rgb(255 196 82 / .14), var(--surface) 60%); }
.status.gold > .ico { color: var(--legendary); }
.status > div { flex: 1; min-width: 0; }
.status b, .status small { display: block; line-height: 1.25; }
.status small { color: var(--ink-3); }
.meter { display: block; height: 6px; margin-top: 7px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; width: 100%; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #d9772f, var(--legendary)); transform-origin: 0 50%; transition: transform .6s ease-out; }
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.offer { --p: 59 127 255; position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 18px 22px; border: 1px solid rgb(var(--p) / .28); border-radius: 22px; background: radial-gradient(80% 60% at 50% 22%, rgb(var(--p) / .32), transparent 75%), linear-gradient(180deg, var(--surface-2), var(--surface)); text-align: center; transition: border-color .2s, translate .25s ease-out, box-shadow .25s; }
.offer:hover { border-color: rgb(var(--p) / .55); box-shadow: 0 16px 40px rgb(var(--p) / .14); }
.offer-tag { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; background: rgb(255 196 82 / .18); color: var(--legendary); font-size: .8rem; font-weight: 700; }
.offer-tag .ico { width: 1em; height: 1em; }
@media (prefers-reduced-motion: no-preference) { body:not(.still) .offer .pack { animation: float 4s ease-in-out infinite; } body:not(.still) .offer:nth-child(2) .pack { animation-delay: -1.3s; } body:not(.still) .offer:nth-child(3) .pack { animation-delay: -2.6s; } }
@keyframes float { 50% { translate: 0 -7px; } }
.offer.weekly { --p: 45 175 130; } .offer.trend { --p: 139 92 246; }
.offer p { flex: 1; color: var(--ink-2); max-width: 30ch; }
.offer h2 { margin-top: 10px; }
.offer-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.pack-button { padding: 0; border: 0; background: none; border-radius: 12px; }
.pack-button:disabled { cursor: not-allowed; filter: saturate(.5); }
.pack { --p: #3b7fff; --x: .5; --y: .5; --o: 0; position: relative; width: min(200px, 56vw); aspect-ratio: 5 / 8; perspective: 900px; container-type: inline-size; }
.pack.weekly { --p: #2daf82; } .pack.trend { --p: #8b5cf6; }
.pack > .tilt { position: absolute; inset: 0; filter: drop-shadow(0 18px 24px rgb(0 0 0 / .55)); transition: transform .35s ease-out; }
.pack.live > .tilt { transform: rotateX(calc((.5 - var(--y)) * 18deg)) rotateY(calc((var(--x) - .5) * 26deg)); }
.pack.live.tilting > .tilt { transition: transform .08s linear; }
.pack-body, .pack-top { position: absolute; left: 0; right: 0; background: linear-gradient(100deg, rgb(255 255 255 / .26), transparent 16% 34%, rgb(255 255 255 / .1) 44%, transparent 56% 74%, rgb(0 0 0 / .22) 92%), linear-gradient(172deg, color-mix(in srgb, var(--p) 75%, #fff), var(--p) 30%, color-mix(in srgb, var(--p) 40%, #000)); }
.pack-top { top: 0; height: 12.5%; clip-path: polygon(0 22%, 3.1% 0, 6.2% 22%, 9.4% 0, 12.5% 22%, 15.6% 0, 18.7% 22%, 21.9% 0, 25% 22%, 28.1% 0, 31.2% 22%, 34.4% 0, 37.5% 22%, 40.6% 0, 43.7% 22%, 46.9% 0, 50% 22%, 53.1% 0, 56.2% 22%, 59.4% 0, 62.5% 22%, 65.6% 0, 68.7% 22%, 71.9% 0, 75% 22%, 78.1% 0, 81.2% 22%, 84.4% 0, 87.5% 22%, 90.6% 0, 93.7% 22%, 96.9% 0, 100% 22%, 100% 100%, 0 100%); }
.pack-top::after { content: ""; position: absolute; inset: 34% 0 auto; height: 40%; background: repeating-linear-gradient(90deg, rgb(0 0 0 / .18) 0 2px, transparent 2px 5px); }
.pack-body { top: 12.5%; bottom: 0; overflow: hidden; border-top: 2px dashed rgb(255 255 255 / .4); clip-path: polygon(0 0, 100% 0, 100% 97.4%, 96.9% 100%, 93.7% 97.4%, 90.6% 100%, 87.5% 97.4%, 84.4% 100%, 81.2% 97.4%, 78.1% 100%, 75% 97.4%, 71.9% 100%, 68.7% 97.4%, 65.6% 100%, 62.5% 97.4%, 59.4% 100%, 56.2% 97.4%, 53.1% 100%, 50% 97.4%, 46.9% 100%, 43.7% 97.4%, 40.6% 100%, 37.5% 97.4%, 34.4% 100%, 31.2% 97.4%, 28.1% 100%, 25% 97.4%, 21.9% 100%, 18.7% 97.4%, 15.6% 100%, 12.5% 97.4%, 9.4% 100%, 6.2% 97.4%, 3.1% 100%, 0 97.4%); }
.pack .window { position: absolute; inset: 7% 9% 29%; display: grid; place-items: center; overflow: hidden; clip-path: polygon(10% 0, 100% 0, 100% 93%, 90% 100%, 0 100%, 0 7%); background: #1a1a1a; }
.pack .window img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.pack-logo { display: grid; place-items: center; width: 46cqi; aspect-ratio: 1; border: 2px solid rgb(231 231 231 / .75); border-radius: 18%; color: #e7e7e7; }
.pack-logo .ico { width: 62%; height: 62%; }
.pack-label { position: absolute; left: 0; right: 0; bottom: 8%; padding: 0 8%; text-align: center; color: #fff; line-height: 1.1; }
.pack-label b { display: block; font-size: 9.4cqi; }
.pack-label small { font-size: 7cqi; opacity: .92; }
/* ? The light stays on the pack : cut along its outline, gone with its top */
.shine { position: absolute; inset: 0; overflow: hidden; pointer-events: none; mix-blend-mode: soft-light; clip-path: polygon(0% 2.75%, 3.13% 0, 6.25% 2.75%, 9.38% 0, 12.5% 2.75%, 15.63% 0, 18.75% 2.75%, 21.88% 0, 25% 2.75%, 28.13% 0, 31.25% 2.75%, 34.38% 0, 37.5% 2.75%, 40.63% 0, 43.75% 2.75%, 46.88% 0, 50% 2.75%, 53.13% 0, 56.25% 2.75%, 59.38% 0, 62.5% 2.75%, 65.63% 0, 68.75% 2.75%, 71.88% 0, 75% 2.75%, 78.13% 0, 81.25% 2.75%, 84.38% 0, 87.5% 2.75%, 90.63% 0, 93.75% 2.75%, 96.88% 0, 100% 2.75%, 100% 97.7%, 96.88% 100%, 93.75% 97.7%, 90.63% 100%, 87.5% 97.7%, 84.38% 100%, 81.25% 97.7%, 78.13% 100%, 75% 97.7%, 71.88% 100%, 68.75% 97.7%, 65.63% 100%, 62.5% 97.7%, 59.38% 100%, 56.25% 97.7%, 53.13% 100%, 50% 97.7%, 46.88% 100%, 43.75% 97.7%, 40.63% 100%, 37.5% 97.7%, 34.38% 100%, 31.25% 97.7%, 28.13% 100%, 25% 97.7%, 21.88% 100%, 18.75% 97.7%, 15.63% 100%, 12.5% 97.7%, 9.38% 100%, 6.25% 97.7%, 3.13% 100%, 0% 97.7%); transition: opacity .12s; }
.pack.open .shine { opacity: 0; }
.crinkle { position: absolute; inset: 0; }
.crinkle::before { content: ""; position: absolute; inset: -40% -80%; background: linear-gradient(104deg, transparent 40%, rgb(255 255 255 / .75) 48%, rgb(255 220 255 / .5) 52%, transparent 60%); transform: translateX(calc((var(--x) - .5) * 60%)); }
.pack .glare { opacity: var(--o); inset: 0; transform: none; mix-blend-mode: normal; background: radial-gradient(circle at calc(var(--x) * 100%) calc(var(--y) * 100%), rgb(255 255 255 / .75), transparent 46%); }
.tape { display: grid; grid-template-rows: 1fr 1fr; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.sale { --r: var(--common); display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-left: 3px solid var(--r); border-radius: 12px; background: var(--surface); text-align: left; }
.sale.rare { --r: var(--rare); } .sale.epic { --r: var(--epic); } .sale.legendary { --r: var(--legendary); }
.sale:hover { background: var(--surface-2); }
.sale-face { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 2px solid var(--r); border-radius: 50%; background: var(--surface-3); color: var(--ink-3); }
.sale-face > img:not(.sale-flag) { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 15%; }
.sale-face .sale-flag { position: absolute; right: -4px; bottom: -2px; width: 18px; height: 18px; border-radius: 2px; object-fit: cover; }
.tile .sale-face { width: 46px; height: 46px; }
.sale:hover .sale-face, .tile:hover .sale-face, .who:hover .sale-face, tr:hover .who .sale-face { box-shadow: 0 0 12px color-mix(in srgb, var(--r) 45%, transparent); }
.sale .amount { flex: none; }
.sale > span:not(.amount, .sale-face) { flex: 1; min-width: 0; }
.sale b, .sale small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25; }
.sale small { color: var(--ink-3); }
.table-wrap { overflow-x: auto; border-radius: 12px; }
.plain { width: 100%; border-collapse: collapse; margin: 12px 0; }
.plain th, .plain td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.plain th:first-child, .plain td:first-child { text-align: left; }
.plain th { font-weight: 400; color: var(--ink-3); }

/* * Album */
.sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.set-tile { position: relative; display: grid; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-decoration: none; overflow: hidden; }
.set-tile:hover { background: var(--surface-2); border-color: #5a5f6b; translate: 0 -2px; }
.set-tile.complete { border-color: rgb(255 196 82 / .6); background: linear-gradient(160deg, rgb(255 196 82 / .14), var(--surface) 55%); }
.set-tile { isolation: isolate; }
.set-logo { display: block; width: 84px; height: 58px; margin: 8px auto 14px; border-radius: 12px; object-fit: contain; }
.set-tile .set-logo { width: 100%; height: 112px; margin: 0 0 12px; }
.set-tile .globe-mark { display: grid; place-items: center; background: var(--surface-2); }
.set-tile .globe-mark .globe-svg { width: 56px; height: 56px; color: var(--brand); }
.set-head > .globe-mark { display: grid; place-items: center; width: 84px; height: 58px; border-radius: 12px; background: var(--surface-2); color: var(--brand); }
.set-head > .globe-mark .globe-svg { width: 34px; height: 34px; }
.empty-flag { display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); font-size: 2rem; }
.set-tile small { color: var(--ink-3); }
.ready { position: absolute; top: 10px; right: 10px; display: flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; background: var(--legendary); color: #2a1c00; font-size: .84rem; font-weight: 700; }
.set-head { display: grid; grid-template-columns: auto 1fr minmax(260px, 420px); align-items: center; gap: 18px; margin-bottom: 26px; }
.set-head > img { width: 84px; height: 58px; border-radius: 12px; object-fit: contain; }
.set-head > div:first-child { grid-column: span 2; }
.track { position: relative; height: 74px; margin-right: 34px; }
.track .meter { position: absolute; left: 0; right: 0; top: 14px; height: 10px; margin: 0; }
.reward { position: absolute; top: 0; display: grid; justify-items: center; padding: 0; border: 0; background: none; color: var(--ink-3); translate: -50% 0; line-height: 1.15; }
.reward .ico { display: grid; place-items: center; width: 38px; height: 38px; padding: 8px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--bg); }
.reward span:not(.ico) { color: var(--ink-2); font-size: .85rem; } .reward small { font-size: .78rem; }
.reward.can { color: var(--legendary); cursor: pointer; }
.reward.can .ico { background: var(--legendary); color: #2a1c00; }
@media (prefers-reduced-motion: no-preference) { .reward.can .ico { animation: nudge 1.6s ease-in-out infinite; } }
@keyframes nudge { 50% { transform: translateY(-4px) scale(1.06); } }
.subject { margin-bottom: 30px; }
.subject > .row { margin-bottom: 10px; }
.subject:nth-of-type(n+4) { content-visibility: auto; contain-intrinsic-size: auto none auto 300px; }

/* * Market */
.subtabs { display: flex; gap: 4px; margin-top: 12px; border-bottom: 1px solid var(--line); overflow: auto hidden; }
.subtabs a { position: relative; padding: 10px 14px; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.subtabs a:hover { color: var(--ink); }
.subtabs a[aria-current] { color: var(--ink); }
.subtabs a[aria-current]::after { content: ""; position: absolute; inset: auto 10px -1px; border-bottom: 3px solid var(--brand-2); }
.listings { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 20px 14px; margin: 10px 0 20px; }
.quote { padding: 8px 2px 0; line-height: 1.3; }
.quote > span { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 1.06rem; }
.quote em { padding: 0 7px; border-radius: 6px; background: #17402f; color: #8ff0c0; font-style: normal; font-size: .85rem; }
.quote small { color: var(--ink-3); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta .ico { width: 1em; height: 1em; }
.delta.up .ico { color: var(--good); } .delta.down .ico { color: var(--bad); }
.quotes, .board { width: 100%; border-collapse: collapse; }
.quotes th, .board th { padding: 8px; text-align: left; font-weight: 400; font-size: .88rem; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.quotes th button { border: 0; padding: 4px 0; background: none; color: inherit; }
.quotes th[aria-sort] button { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.quotes td, .board td { padding: 6px 8px; border-bottom: 1px solid rgb(44 48 59 / .6); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quotes tbody tr, .board tbody tr { cursor: pointer; }
.quotes tbody tr:hover, .board tbody tr:hover { background: var(--surface-2); }
.who { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 0; border: 0; background: none; text-align: left; }
.who > img, .no-jewel { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; object-position: 50% 10%; background: var(--surface-3); flex: none; }
.country-marker { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 9px; background: var(--surface-3); color: var(--ink-2); }
.country-marker .country-flag { width: 28px; height: 19px; }
.no-jewel { display: grid; place-items: center; color: var(--ink-3); }
.who b, .who small { display: block; line-height: 1.25; }
.who small { color: var(--ink-3); }
.spark { display: block; width: 110px; height: 30px; overflow: visible; }
.spark path { fill: none; stroke: #7f8796; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.orders { display: grid; gap: 8px; }
.order { display: grid; grid-template-columns: minmax(0, 1fr) 84px 70px minmax(90px, auto) 110px 90px; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-left: 3px solid var(--rare); border-radius: 12px; background: var(--surface); }
.order.sell { border-left-color: var(--legendary); }
.order > :last-child { justify-self: end; }
.sub { margin: 28px 0 12px; }

/* * Details */
dialog { color: inherit; opacity: 0; transition-property: opacity, transform, display, overlay; transition-duration: .25s; transition-timing-function: ease-out; transition-behavior: allow-discrete;
    @media (prefers-reduced-motion: no-preference) { transform: translateY(16px) scale(.98); }
    @media (prefers-reduced-motion: reduce) { transition-duration: .1s; } }
dialog[open] { opacity: 1; @starting-style { opacity: 0; }
    @media (prefers-reduced-motion: no-preference) { transform: none; @starting-style { transform: translateY(16px) scale(.98); } } }
dialog::backdrop { background-color: rgb(4 4 7 / 0); transition-property: background-color, display, overlay; transition-duration: .25s; transition-behavior: allow-discrete; }
dialog[open]::backdrop { background-color: rgb(4 4 7 / .82); @starting-style { background-color: rgb(4 4 7 / 0); } }
.sheet { width: min(980px, 100vw); max-width: none; max-height: 92dvh; padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; }
.sheet[data-kind="settings"] { width: min(560px, 100vw); }
.sheet-body { flex: 1; min-height: 0; padding: 24px; overflow: auto; overscroll-behavior: contain; }
/* ? Placed on the dialog, not in what scrolls. Never a sticky float here : Firefox counts its offset in the layout (the content went down) */
.sheet .x { position: absolute; top: 14px; right: 18px; z-index: 3; box-shadow: 0 0 0 4px var(--surface); }
.sheet-body > h2:first-of-type, .sheet .profile-head, .sheet .detail-body > h2 { padding-right: 56px; }
.detail { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 30px; }
.big-wrap { display: grid; justify-items: center; align-content: start; gap: 16px; }
.big-wrap .card { max-width: 330px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; margin: 14px 0; }
.facts div { padding: 8px 12px; border-radius: 11px; background: var(--surface-2); }
.facts small { display: block; color: var(--ink-3); }
.facts b { font-variant-numeric: tabular-nums; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick .btn { flex-direction: column; gap: 0; min-height: 60px; font-size: 1.1rem; }
.quick small { font-size: .86rem; opacity: .85; }
.order-form { display: grid; gap: 12px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.order-form .seg { justify-self: start; }
.fields { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.fields label { display: grid; gap: 4px; color: var(--ink-2); font-size: .92rem; }
.fields input { width: 100%; min-height: 46px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); color: var(--ink); font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.order-form.tried input:invalid { border-color: var(--bad); }
.error { display: flex; align-items: center; gap: 7px; color: var(--bad); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 32px; padding: 2px 12px; border: 1px solid var(--line); border-radius: 99px; background: none; color: var(--ink-2); font-size: .9rem; }
.chip:hover { border-color: #565d6d; color: var(--ink); }
.total { color: var(--ink-2); }
.mine { display: grid; gap: 6px; margin-top: 10px; }
.mine .order { grid-template-columns: 1fr auto auto auto; padding-left: 14px; }
.depth { display: grid; }
#trade .depth { position: static; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; transform: none; }
.depth h3 { margin-bottom: 4px; font-size: .92rem; font-weight: 400; color: var(--ink-3); }
.depth button { position: relative; display: flex; justify-content: space-between; width: 100%; min-height: 30px; margin-bottom: 2px; padding: 2px 10px; border: 0; border-radius: 7px; background: var(--surface-2); overflow: hidden; font-variant-numeric: tabular-nums; }
.depth button:hover { background: var(--surface-3); }
.bar-fill { position: absolute; inset: 0; transform-origin: 100% 50%; background: rgb(255 196 82 / .2); }
.buys .bar-fill { transform-origin: 0 50%; background: rgb(75 163 255 / .22); }
.depth button span:not(.bar-fill) { position: relative; }
.credits-line { margin-top: 14px; }
.chart-title { margin-top: 18px; font-weight: 400; color: var(--ink-2); }
.chart { position: relative; margin: 8px 0 4px; }
.chart svg { display: block; width: 100%; height: 150px; overflow: visible; }
.chart .grid-line { stroke: var(--line); vector-effect: non-scaling-stroke; }
.chart .area { fill: rgb(59 127 255 / .12); }
.chart .line { fill: none; stroke: var(--brand-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--ink-3); pointer-events: none; }
.chart .point { position: absolute; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--brand-2); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.chart .tip { position: absolute; top: -6px; padding: 4px 10px; border-radius: 8px; background: #000; font-size: .88rem; white-space: nowrap; pointer-events: none; }
.chart .y { position: absolute; right: 0; font-size: .76rem; color: var(--ink-3); transform: translateY(-100%); pointer-events: none; }
.axis { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-3); }
.signals { display: grid; gap: 8px; margin-top: 10px; }
.signals div { display: grid; grid-template-columns: 8em 1fr 5em; gap: 10px; align-items: center; font-size: .94rem; }
.track-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.track-bar span { display: block; height: 100%; background: #6f94c9; transform-origin: 0 50%; }
.signals .mono { text-align: right; }
details summary { cursor: pointer; color: var(--ink-2); padding: 6px 0; }
.inbox { display: grid; gap: 6px; margin-top: 14px; }
.event { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; border-radius: 12px; background: var(--surface-2); text-align: left; }
.event:hover { background: var(--surface-3); }
.event > span:not(.ico) { flex: 1; }
.settings h3 { margin: 22px 0 4px; color: var(--ink-3); font-weight: 400; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.setting b, .setting small { display: block; line-height: 1.3; }
.setting small { color: var(--ink-3); }
.setting select { min-height: 40px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.setting input[role="switch"] { appearance: none; flex: none; position: relative; width: 50px; height: 28px; margin: 0; border-radius: 99px; background: #4a5060; cursor: pointer; transition: background-color .18s; }
.setting input[role="switch"]::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: translate .18s; }
.setting input[role="switch"]:checked { background: var(--brand); }
.setting input[role="switch"]:checked::before { translate: 22px 0; }
.setting input[type="range"] { --track: 5px; --thumb: 18px; appearance: none; width: 170px; height: 36px; margin: 0; background: none; cursor: pointer; }
.setting input[type="range"]::-webkit-slider-runnable-track { height: var(--track); border-radius: 9px; background: linear-gradient(to right, var(--brand-2) var(--value, 50%), #5a6070 var(--value, 50%)); }
.setting input[type="range"]::-webkit-slider-thumb { appearance: none; width: var(--thumb); height: var(--thumb); margin-block-start: calc((var(--track) - var(--thumb)) / 2); border: 0; border-radius: 50%; background: #fff; }
.setting input[type="range"]::-moz-range-track { height: var(--track); border-radius: 9px; background: #5a6070; }
.setting input[type="range"]::-moz-range-progress { height: var(--track); border-radius: 9px; background: var(--brand-2); }
.setting input[type="range"]::-moz-range-thumb { width: var(--thumb); height: var(--thumb); border: 0; border-radius: 50%; background: #fff; }

/* * Ranks */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.chips button { flex: none; min-height: 40px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-2); scroll-snap-align: start; }
.chips button:hover { color: var(--ink); }
.chips button[aria-pressed="true"] { border-color: var(--brand-2); background: rgb(59 127 255 / .28); color: var(--ink); }
.ranks-head { margin: 6px 0 20px; }
#rank-search { width: 150px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 12px; max-width: 720px; margin: 0 auto 26px; }
.step { --r: #c3cad6; display: grid; justify-items: center; gap: 6px; padding: 18px 12px; border: 1px solid color-mix(in srgb, var(--r) 45%, var(--line)); border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--r) 22%, var(--surface)), var(--surface) 70%); }
.step:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--r) 30%, var(--surface)), var(--surface-2) 70%); }
.step.p1 { --r: var(--legendary); order: 2; padding-block: 28px; } .step.p2 { order: 1; } .step.p3 { --r: #cf8a52; order: 3; }
.jewel img, .jewel .no-jewel { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; object-position: 50% 10%; border: 3px solid var(--r); }
.jewel .no-jewel { display: grid; place-items: center; }
.jewel .no-jewel .country-flag { width: 48px; height: auto; border: 0; border-radius: 2px; }
.step.p1 .jewel img, .step.p1 .jewel .no-jewel { width: 98px; height: 98px; }
.medal { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--r, var(--surface-3)); color: #17130a; font-weight: 700; font-variant-numeric: tabular-nums; }
.step .medal { margin-bottom: -20px; z-index: 1; justify-self: center; translate: 34px 0; }
.step-name { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; max-width: 100%; overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 0 8px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-size: .78rem; font-weight: 400; line-height: 1.7; }
.tag .ico { width: 1.05em; height: 1.05em; }
.tag.gold { background: rgb(255 196 82 / .2); color: var(--legendary); } .tag.me { background: var(--brand); color: #fff; }
.step .tag { margin: 0; }
.board .who b { display: inline; }
.board tr.me { background: rgb(59 127 255 / .16); }
.pager { margin-top: 18px; }
.my-rank { position: sticky; bottom: 14px; display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 10px 18px; border: 1px solid var(--brand-2); border-radius: 16px; background: #242424; box-shadow: 0 10px 30px rgb(0 0 0 / .5); cursor: pointer; }
.my-rank > span:nth-of-type(1) { min-width: 2em; font-size: 1.2rem; font-weight: 700; }
.my-rank img, .my-rank .no-jewel { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; object-position: 50% 10%; }
.my-rank > .amount { margin-left: auto; }
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: linear-gradient(140deg, var(--brand-2), #6b2327); font-size: 1.6rem; font-weight: 700; }
.showcase { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.rank-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px 24px; margin-top: 12px; }
.rank-list > div { display: flex; align-items: center; gap: 12px; }
.rank-list .mono { margin-left: auto; color: var(--ink-2); }
.rank-list .meter { flex: 1; max-width: 120px; margin: 0; }
.rank-list .medal { --r: var(--surface-3); color: var(--ink); flex: none; }
.medal.m1 { --r: var(--legendary) !important; color: #17130a !important; } .medal.m2 { --r: #c3cad6 !important; color: #17130a !important; } .medal.m3 { --r: #cf8a52 !important; color: #17130a !important; }

/* * Opening */
.stage { --ray: transparent; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: radial-gradient(circle at 50% 42%, #1d2236, #07070a 72%); overflow: hidden; }
.stage-body { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 20px 16px max(20px, env(safe-area-inset-bottom)); }
.stage .x { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px; z-index: 6; }
.particles { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.hint { color: var(--ink-2); }
.stage .pack { width: min(270px, 58vw, 42dvh); touch-action: none; }
.stage .pack.open .tilt { filter: drop-shadow(0 0 40px rgb(255 214 150 / .7)); }
.tear { position: absolute; top: -4%; left: -8%; width: 116%; height: 24%; z-index: 4; margin: 0; opacity: 0; cursor: grab; }
.tear:active { cursor: grabbing; }
.tear-ring { position: absolute; inset: -1% -3% auto; height: 16%; border-radius: 8px; pointer-events: none; }
.pack:has(.tear:focus-visible) .tear-ring { outline: 2px solid #fff; }
.tear-cut { position: absolute; top: 12%; left: 0; right: 0; height: 4px; z-index: 3; border-radius: 4px; background: #fff; box-shadow: 0 0 18px 3px #ffd9b0; transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { body:not(.still) .hint { animation: hint 1.8s ease-in-out infinite; } }
@keyframes hint { 50% { opacity: .45; } }
/* ? The stack of the opened cards : --d is the place under the top one, --rot and --tx its small disorder, --out the side it leaves on */
.open-head { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 16px; right: 16px; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.count { padding: 4px 14px; border-radius: 99px; background: rgb(255 255 255 / .08); color: var(--ink-2); font-size: .95rem; }
.btn.ghost { background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .12); }
.btn.ghost:hover:not(:disabled) { background: rgb(255 255 255 / .16); }
.deck { position: relative; width: min(360px, 76vw, 44dvh); aspect-ratio: 5 / 7; margin-top: 28px; border-radius: 14px; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.deck:focus-visible { outline-offset: 12px; }
.deal { --d: 0; position: absolute; inset: 0; z-index: calc(100 - var(--d)); pointer-events: none; transform: translate(var(--tx, 0), calc(var(--d) * -14px)) rotate(var(--rot, 0deg)) scale(calc(1 - var(--d) * .05)); transition: transform .5s cubic-bezier(.2, 1.15, .4, 1), opacity .3s; }
.deal::before { content: ""; position: absolute; inset: 5% 7% -1%; border-radius: 14px; box-shadow: 0 26px 46px rgb(0 0 0 / .62); pointer-events: none; }
/* ? The cards under the top one are in its shadow */
.deal:not(.top)::after { content: ""; position: absolute; inset: 0; clip-path: var(--shape); background: rgb(4 4 7 / calc(.25 + var(--d) * .12)); pointer-events: none; }
.deal.top { pointer-events: auto; transform: scale(1.02); }
.deal.hidden { opacity: 0; }
.deal.gone { z-index: 200; opacity: 0; pointer-events: none; transform: translate(calc(var(--out, 1) * 110vw), -12vh) rotate(calc(var(--out, 1) * 34deg)); transition: transform .5s cubic-bezier(.4, 0, 1, .6), opacity .5s ease-in; }
/* ? The top card leans further than in the grids, its light follows */
.deck .card.live .tilt { transform: rotateX(calc((.5 - var(--y)) * 30deg)) rotateY(calc((var(--x) - .5) * 34deg)); }
.deck .card.live .glare { mix-blend-mode: overlay; }
@media (prefers-reduced-motion: reduce) { .deal, .deal.gone { transition-duration: .01s; } }
.rays { position: absolute; left: 50%; top: 50%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; opacity: 0; pointer-events: none; transition: opacity .6s; background: repeating-conic-gradient(transparent 0 8deg, color-mix(in srgb, var(--ray, transparent) 26%, transparent) 14deg, transparent 20deg 30deg); mask-image: radial-gradient(circle, #000 6%, transparent 42%); }
.halo { position: absolute; left: 50%; top: 50%; width: 120vmin; height: 120vmin; margin: -60vmin; border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity .8s; background: radial-gradient(circle, color-mix(in srgb, var(--ray, transparent) 42%, transparent), transparent 62%); }
.rays.on, .halo.on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { body:not(.still) .rays.on { animation: turn 40s linear infinite; } body:not(.still) .halo.on { animation: breathe 3.2s ease-in-out infinite; } }
@keyframes breathe { 50% { transform: scale(1.12); } }
.call { position: relative; display: grid; justify-items: center; gap: 2px; min-height: 5.2em; text-align: center; line-height: 1.2; }
.call b { display: flex; align-items: center; gap: 8px; color: var(--r); font-size: .95rem; letter-spacing: .1em; text-transform: uppercase; }
.call b .tag { letter-spacing: 0; text-transform: none; }
.call .pips { margin: 0; gap: 3px; }
.call .pips svg { width: 13px; height: 13px; }
.call-name { font-size: clamp(1.3rem, 4.6vw, 1.75rem); font-weight: 700; color: #fff; text-wrap: balance; }
.call small { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; margin-top: 2px; color: var(--ink-2); font-size: .95rem; }
.call small .tag { margin: 0; }
.progress { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: min(520px, 90vw); }
.progress span { --c: rgb(255 255 255 / .2); width: 8px; height: 8px; border-radius: 99px; background: rgb(255 255 255 / .16); transition: width .3s var(--spring), background-color .3s; }
.progress .common { --c: var(--common); } .progress .rare { --c: var(--rare); } .progress .epic { --c: var(--epic); } .progress .legendary { --c: var(--legendary); }
.progress .seen { background: color-mix(in srgb, var(--c) 60%, transparent); }
.progress .now { width: 24px; background: var(--c); }
.stage .hint { font-size: .92rem; }
.sum-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 10px; font-size: 1.6rem; text-align: center; }
.sum-title .muted { font-size: 1rem; font-weight: 400; }
.summary { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: min(1060px, 100%); max-height: 68dvh; overflow-y: auto; padding: 8px; }
.summary > div { position: relative; width: min(178px, 28vw); }
.summary.many > div { width: min(112px, 17vw); }
.summary .sold .card { opacity: .38; }
.stamp { position: absolute; left: 50%; top: 42%; padding: 2px 10px; border: 2px solid var(--good); border-radius: 7px; background: rgb(8 20 14 / .86); color: #a8f2ca; font-size: .84rem; white-space: nowrap; transform: translate(-50%, -50%) rotate(-9deg); }
.auto { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; color: var(--ink-2); }
@media (max-height: 640px) { .stage .hint, .progress { display: none; } .deck { margin-top: 36px; } }

/* ? A popover : above the open dialogs */
.toasts { position: fixed; inset: auto auto max(24px, env(safe-area-inset-bottom)) 50%; margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: visible; translate: -50% 0; pointer-events: none; }
.toasts:popover-open { display: grid; gap: 8px; justify-items: center; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 20px; border-radius: 99px; background: #000; border: 1px solid #3a3f4c; box-shadow: 0 8px 24px rgb(0 0 0 / .5); }
@media (prefers-reduced-motion: no-preference) { .toast { animation: toast .3s var(--spring); } }
@keyframes toast { from { opacity: 0; transform: translateY(14px) scale(.94); } }

/* ? The dialogs of the site (dialog.js), their style is not loaded here */
.soloq-dialog { width: min(420px, 92vw); padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.soloq-dialog p { margin: 8px 0 14px; color: var(--ink-2); }
.soloq-dialog input { width: 100%; }
.soloq-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.soloq-dialog-actions button { min-height: 44px; padding: 6px 18px; border: 0; border-radius: 11px; background: var(--surface-3); }
.soloq-dialog-actions [value="ok"] { background: var(--brand); }

@media (max-width: 480px) { .tools { gap: 4px; } .login { padding: 4px 10px; } .credits { padding: 4px 10px; } }
@media (max-width: 1020px) { .brand span { display: none; } .tabs a { padding: 8px 10px; } }
@media (max-width: 900px) { .shelf { grid-template-columns: 1fr; } .offer { display: grid; grid-template-columns: 128px 1fr; justify-items: start; text-align: left; gap: 6px 18px; padding: 18px; } .offer .pack-button { grid-row: 1 / span 5; align-self: center; } .offer .pack { width: 128px; } .offer-actions { justify-content: flex-start; } .offer h2 { margin: 0; } .set-head { grid-template-columns: auto 1fr; } .track { grid-column: 1 / -1; margin: 0 22px 0 0; } }
@media (max-width: 760px) {
    .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); background: #1a1a1a; border-top: 1px solid var(--line); }
    .tabs a { flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: .78rem; line-height: 1.1; }
    .tabs { border-radius: 0; background: rgb(22 22 24 / .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
    .tabs a[aria-current] { background: none; box-shadow: none; }
    .tabs a[aria-current]::after { content: ""; position: absolute; inset: -6px 26% auto; border-top: 3px solid var(--brand); border-radius: 0 0 3px 3px; }
    /* ? No backdrop-filter here : it would hold the fixed tabs inside the bar */
    .bar { gap: 8px; padding-block: 8px; background: rgb(22 22 24 / .97); backdrop-filter: none; -webkit-backdrop-filter: none; }
    .offer-tag { top: 10px; left: 10px; right: auto; z-index: 1; } .tools { margin-left: auto; } .credits { padding: 4px 12px; }
    main { padding-top: 18px; } .foot { padding-bottom: 100px; } .toasts { bottom: 88px; width: calc(100% - 32px); }
    h1 { font-size: 1.5rem; }
    .statuses { grid-template-columns: 1fr; gap: 8px; }
    .grid, .listings { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; } .listings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .set-tile { padding: 10px; }
    .opt { display: none; } .spark { width: 60px; } .quotes td, .quotes th, .board td, .board th { padding: 6px 4px; }
    .sheet { width: 100vw; max-height: 94dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; } .sheet-body { padding: 16px; } .sheet .x { right: 12px; }
    .detail { grid-template-columns: 1fr; gap: 18px; } .big-wrap .card { max-width: 250px; }
    .order { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; } .order .who { grid-column: 1 / -1; } .order .best { display: none; } .mine .order { grid-template-columns: 1fr auto auto auto; }
    .podium { gap: 8px; } .step { padding: 14px 6px; } .step.p1 { padding-block: 20px; } .jewel img, .jewel .no-jewel { width: 54px; height: 54px; } .step.p1 .jewel img, .step.p1 .jewel .no-jewel { width: 70px; height: 70px; } .step .medal { translate: 24px 0; width: 28px; height: 28px; }
    .my-rank { bottom: 76px; } .showcase { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ranks-head .row { width: 100%; } #rank-search { flex: 1; }
    .signals div { grid-template-columns: 7em 1fr 4em; }
    .slots { grid-template-columns: repeat(min(var(--n), 5), minmax(0, 1fr)); }
}
.sheet-body > p:not(.muted) { margin-top: 12px; }
