/* Game theme: a cosmic creature lab with the infinity mark (warm-to-cool gradient). Original CSS art. */
:root {
  --bg: #0d0a22;
  --bg2: #151033;
  --panel: #1c1642;
  --panel2: #261e57;
  --line: #3a2f74;
  --text: #eef2ff;
  --muted: #93a1cf;
  --red: #5b2bd6;
  --red-d: #2c1173;
  --red-l: #8a5cff;
  --pink: #ff4fa3;
  --warm: #ff8a3d;
  --grad: linear-gradient(90deg, #ff8a3d, #ff4fa3 55%, #3dd6ff);
  --cyan: #3fe0d0;
  --cyan-d: #17998e;
  --lens: #45b1ff;
  --accent: #ffcb3d;
  --accent2: #ff7a59;
  --good: #3fd08a;
  --bad: #ff5d73;
  --c-common: #a4adbd;
  --c-uncommon: #3fc985;
  --c-rare: #4a92ff;
  --c-epic: #b06bff;
  --c-legendary: #ffb627;
  --f-prototype: #8a94a6;
  --f-stable: #1fb5a3;
  --f-advanced: #e0559f;
  --f-elite: #ff7a1a;
  --f-apex: #ffd23d;
  --radius: 16px;
  --nav-h: 68px;
  --lcd: "Silkscreen", "VT323", ui-monospace, monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; color: var(--text); }
body {
  font: 15px/1.45 Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px);
  /* 19/11 night (owner: "a dark-mode background more about the game"): InfiniWorld's night sky (tools/make_site_sky.py:
     nebulas in the brand colours, stars, far planets, an infinity constellation) under the same faint pattern of
     infinity signs and sparkles the light theme uses; before: a darkened lab photo under a grid */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='132'%3E%3Cpath transform='translate(12 20) scale(.55)' d='M13 4C6 4 3 8 3 12s3 8 10 8c8 0 14-16 22-16 7 0 10 4 10 8s-3 8-10 8C27 20 21 4 13 4z' fill='none' stroke='%23b89cff' stroke-opacity='.07' stroke-width='3.6'/%3E%3Cpath d='M96 84l1.8 5.6 5.6 1.8-5.6 1.8-1.8 5.6-1.8-5.6-5.6-1.8 5.6-1.8z' fill='%23ff9ccf' fill-opacity='.12'/%3E%3C/svg%3E") 0 0 / 132px 132px,
    linear-gradient(180deg, rgba(13, 10, 34, .1), rgba(13, 10, 34, .35)),
    url(/art/site-sky.svg?v=1) center / cover no-repeat,
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { font-family: Fredoka, Nunito, sans-serif; font-weight: 600; margin: 0 0 .5em; letter-spacing: .2px; }
h1 { font-size: 25px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
button { font: inherit; }
input, select { font: inherit; color: var(--text); background: #0c1428; border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 13px; width: 100%; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .35); }
input:focus, select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
[hidden] { display: none !important; }
.lcd { font-family: var(--lcd); letter-spacing: .5px; }

/* ------------------------------------------------------------------ header */
#top { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: linear-gradient(180deg, var(--red-l) 0%, var(--red) 38%, var(--red-d) 100%);
  box-shadow: 0 3px 0 #1c0b4d, 0 10px 26px rgba(0, 0, 0, .5); }
#top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .25) 0 14px, transparent 14px 28px); }
.lens { position: relative; flex: none; width: 52px; height: 30px; display: grid; place-items: center; }
.lens svg.inf { width: 52px; height: 26px; filter: drop-shadow(0 0 8px rgba(255, 79, 163, .6)); animation: lens 3.2s ease-in-out infinite; }
@keyframes lens { 50% { filter: drop-shadow(0 0 14px rgba(61, 214, 255, .9)) brightness(1.15); } }
svg.inf { overflow: visible; }
svg.inf path { fill: none; stroke: url(#infgrad); stroke-width: 3.8; stroke-linecap: round; }
.leds { display: flex; gap: 6px; align-self: flex-start; margin-top: 11px; }
.leds i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .45); box-shadow: inset 0 -2px 2px rgba(0, 0, 0, .3); }
.leds .r { background: #ff4d5e; animation: led 2.4s infinite; }
.leds .y { background: #ffd23d; animation: led 2.4s .8s infinite; }
.leds .g { background: #47e08f; animation: led 2.4s 1.6s infinite; }
@keyframes led { 0%, 70%, 100% { filter: brightness(.75); } 80% { filter: brightness(1.5); box-shadow: 0 0 8px currentColor; } }
.logo { display: flex; flex-direction: column; line-height: 1; color: #fff; margin-left: 2px; }
.logo b { font: 700 19px Fredoka, sans-serif; letter-spacing: .4px; text-shadow: 0 2px 0 #2c1173; white-space: nowrap; }
.logo b em, .side-brand b em, .hero h1 span { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
@media (max-width: 420px) {
  #top { gap: 8px; padding: 0 10px; }
  .leds { display: none; }
  .lens, .lens svg.inf { width: 40px; }
  .logo b { font-size: 16px; }
  .coins { padding: 4px 9px 4px 6px; }
}
.logo small { font: 400 9px var(--lcd); color: #d9ccff; letter-spacing: 1.5px; margin-top: 3px; }
.top-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.theme-t { width: 32px; height: 32px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .25); }
.theme-t svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.coins { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 7px; border-radius: 99px; font-weight: 800;
  background: #1a0b16; color: #fff; border: 2px solid rgba(0, 0, 0, .35); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .25);
  font-variant-numeric: tabular-nums; position: relative; }
.coins b { font-family: var(--lcd); font-weight: 400; font-size: 13px; letter-spacing: .5px; }
.coins.tokens { color: #c9fff7; padding-left: 9px; }
.coins.bump { animation: bump .45s; }
@keyframes bump { 40% { transform: scale(1.18); } }
.coin { width: 18px; height: 18px; border-radius: 50%; display: inline-block; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #ffcb3d 45%, #d68a00); box-shadow: inset 0 0 0 2px #b87400; }
.coin.sm { width: 14px; height: 14px; vertical-align: -2px; }
.tok { color: var(--cyan); font-weight: 900; text-shadow: 0 0 8px rgba(63, 224, 208, .8); }

main { max-width: 880px; margin: 0 auto; padding: 16px; }
#view.enter { animation: viewin .32s ease-out; }
@keyframes viewin { from { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------------ bottom device bar */
#tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 4px 4px env(safe-area-inset-bottom);
  background: linear-gradient(180deg, #1b2342, #0f1529); border-top: 3px solid var(--red-d);
  box-shadow: 0 -10px 24px rgba(0, 0, 0, .45); }
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #7f8bb8; font-size: 10.5px; font-weight: 800; position: relative; border-radius: 12px; transition: color .2s, background .2s; }
#tabs a svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
#tabs a.on { color: var(--cyan); background: rgba(63, 224, 208, .08); }
#tabs a.on svg { transform: translateY(-2px) scale(1.08); filter: drop-shadow(0 0 6px rgba(63, 224, 208, .8)); }
#tabs a.on::before { content: ""; position: absolute; top: 2px; width: 18px; height: 3px; border-radius: 3px; background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan); }
#tabs a:active svg { transform: scale(.9); }
.dot { position: absolute; top: 7px; right: calc(50% - 19px); width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent2); display: none; box-shadow: 0 0 0 2px #141b33; }
.dot.on { display: block; animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 2px #141b33, 0 0 0 0 rgba(255, 122, 89, .7); } 70% { box-shadow: 0 0 0 2px #141b33, 0 0 0 9px rgba(255, 122, 89, 0); } }

/* ------------------------------------------------------------------ panels (lab monitors) */
.panel { position: relative; background: linear-gradient(180deg, rgba(26, 37, 70, .86), rgba(20, 29, 56, .9)); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: var(--radius); padding: 14px; margin-bottom: 14px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 18px rgba(0, 0, 0, .25); }
.panel.hl { background: linear-gradient(135deg, #24306a, #3a2a6a); border-color: #4a54a0; }
.screen { position: relative; overflow: hidden; border-radius: 14px; padding: 14px; color: #d9fff9;
  background: radial-gradient(120% 120% at 20% 0%, #15403f, #0b1f26 70%); border: 3px solid #0a1418;
  box-shadow: inset 0 0 0 2px rgba(63, 224, 208, .25), inset 0 0 30px rgba(63, 224, 208, .12), 0 6px 18px rgba(0, 0, 0, .35); }
.screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px); }
.screen .muted { color: #7fc9bf; }
.label { font: 400 10px var(--lcd); letter-spacing: 1.5px; color: var(--cyan); text-transform: uppercase; display: block; margin-bottom: 4px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.big { font-size: 30px; font-weight: 400; font-family: var(--lcd); line-height: 1.1; }

/* Buttons: Infinidex hardware */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; cursor: pointer;
  padding: 11px 16px; border-radius: 12px; font-weight: 800; color: #2a1d00; background: linear-gradient(180deg, #ffe07a, var(--accent));
  box-shadow: 0 4px 0 #b88a14, 0 6px 14px rgba(0, 0, 0, .3); transition: transform .08s, box-shadow .08s, filter .2s; text-align: center; overflow: hidden; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b88a14; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn.alt { background: linear-gradient(180deg, #2a376a, var(--panel2)); color: var(--text); box-shadow: 0 4px 0 #0e1430; border: 1px solid var(--line); }
.btn.alt:active { box-shadow: 0 1px 0 #0e1430; }
.btn.good { background: linear-gradient(180deg, #6ff0b0, var(--good)); color: #052616; box-shadow: 0 4px 0 #1f8a55; }
.btn.bad { background: linear-gradient(180deg, #ff8a99, var(--bad)); color: #2b0008; box-shadow: 0 4px 0 #a3283b; }
.btn.cyan { background: linear-gradient(180deg, #8ff7ec, var(--cyan)); color: #032a26; box-shadow: 0 4px 0 #128177; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; box-shadow: 0 3px 0 #b88a14; }
.btn.alt.sm { box-shadow: 0 3px 0 #0e1430; }
.btn.block { width: 100%; }
.btn.shine::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shine 2.6s infinite; }
@keyframes shine { 60%, 100% { left: 130%; } }
/* chip rows wrap onto more lines, so every filter is always visible */
.chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 2px 2px 6px; margin-bottom: 10px; }
@media (max-width: 420px) { .chips { gap: 6px; } .chip { padding: 6px 11px; font-size: 12px; } }
.chip { flex: none; padding: 7px 13px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); font-weight: 800; font-size: 13px; cursor: pointer; white-space: nowrap; transition: all .2s; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--cyan); color: #032a26; border-color: var(--cyan); box-shadow: 0 0 12px rgba(63, 224, 208, .45); }
.chip .n { background: var(--accent2); color: #fff; border-radius: 99px; padding: 0 6px; margin-left: 4px; font-size: 11px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: #0d1630; border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px; text-align: center; }
.stat b { display: block; font: 400 20px var(--lcd); color: #fff; }
.stat span { font-size: 10px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Rarity colours (two ladders) */
.rt-common { color: var(--c-common); } .rt-uncommon { color: var(--c-uncommon); } .rt-rare { color: var(--c-rare); }
.rt-epic { color: var(--c-epic); } .rt-legendary { color: var(--c-legendary); }
.rt-prototype { color: var(--f-prototype); } .rt-stable { color: var(--f-stable); } .rt-advanced { color: var(--f-advanced); }
.rt-elite { color: var(--f-elite); } .rt-apex { color: var(--f-apex); }
.rdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.rd-common { background: var(--c-common); } .rd-uncommon { background: var(--c-uncommon); } .rd-rare { background: var(--c-rare); }
.rd-epic { background: var(--c-epic); } .rd-legendary { background: var(--c-legendary); }
.rd-prototype, .rd-stable, .rd-advanced, .rd-elite, .rd-apex { border-radius: 2px; transform: rotate(45deg); }
.rd-prototype { background: var(--f-prototype); } .rd-stable { background: var(--f-stable); } .rd-advanced { background: var(--f-advanced); }
.rd-elite { background: var(--f-elite); } .rd-apex { background: linear-gradient(135deg, #ff6fd8, #6fd3ff, #ffe66f); }
.rchip { display: inline-block; font-size: 12px; font-weight: 800; border-radius: 99px; padding: 3px 10px; margin: 2px 0;
  background: var(--bg2); border: 2px solid var(--line); }
.rchip.r-common { border-color: var(--c-common); } .rchip.r-uncommon { border-color: var(--c-uncommon); } .rchip.r-rare { border-color: var(--c-rare); }
.rchip.r-epic { border-color: var(--c-epic); } .rchip.r-legendary { border-color: var(--c-legendary); }
.rchip[class*=" f-"] { border-radius: 6px; background: #221a48; }
.rchip.f-prototype { border-color: var(--f-prototype); } .rchip.f-stable { border-color: var(--f-stable); }
.rchip.f-advanced { border-color: var(--f-advanced); } .rchip.f-elite { border-color: var(--f-elite); } .rchip.f-apex { border-color: var(--f-apex); }

/* ------------------------------------------------------------------ cards */
/* Premium full-art cards: a metal frame per rarity, a painted backdrop per primary type
   (static/art/bg-*.webp, original AI scenery), the sprite in front, glass name + info plates. */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.grid > .card { animation: cardin .35s backwards; }
.grid > .card:nth-child(2) { animation-delay: .03s; } .grid > .card:nth-child(3) { animation-delay: .06s; }
.grid > .card:nth-child(4) { animation-delay: .09s; } .grid > .card:nth-child(5) { animation-delay: .12s; }
.grid > .card:nth-child(6) { animation-delay: .15s; } .grid > .card:nth-child(n+7) { animation-delay: .18s; }
@keyframes cardin { from { opacity: 0; transform: translateY(12px) scale(.96); } }

.card {
  --rc: #b9c1d0;                                   /* rarity accent */
  --m1: #f4f6fa; --m2: #9aa3b2; --m3: #ffffff; --m4: #5b6474;   /* frame metal, light → dark */
  --rx: 0deg; --ry: 0deg;
  position: relative; aspect-ratio: 5 / 7.4; padding: 3.4%; border-radius: 7% / 4.75%;
  cursor: pointer; user-select: none; container-type: inline-size;
  background:
    linear-gradient(135deg, var(--m1) 0%, var(--m2) 20%, var(--m3) 42%, var(--m2) 58%, var(--m4) 78%, var(--m2) 100%);
  background-size: 100% 100%;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .45), inset 0 -2px 3px rgba(0, 0, 0, .35);
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .35s ease, box-shadow .25s;
  will-change: transform; }
.card.tilting { transition: transform .06s linear, box-shadow .25s; box-shadow: 0 14px 30px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .45); }

/* creature ladder: silver → emerald → sapphire → amethyst → gold */
.card.k-creature.r-uncommon { --rc: #42d892; --m1: #c8f7e0; --m2: #2ea56b; --m3: #e9fff4; --m4: #155c3b; }
.card.k-creature.r-rare { --rc: #5aa0ff; --m1: #d6e6ff; --m2: #2f6ee0; --m3: #f1f6ff; --m4: #173d8c; }
.card.k-creature.r-epic { --rc: #c07dff; --m1: #eedcff; --m2: #8b3fe0; --m3: #faf3ff; --m4: #4a1d8c; }
.card.k-creature.r-legendary { --rc: #ffc93d; --m1: #fff3c0; --m2: #e3a21f; --m3: #fffbe8; --m4: #94570a;
  background-size: 220% 220%; animation: metal 5s ease-in-out infinite, aura 3.4s ease-in-out infinite; }
/* Fusion ladder: gunmetal → teal chrome → rose gold → copper → prism, with a lab lattice etched in */
.card.k-fusion { --rc: #9aa6bb; --m1: #cfd6e2; --m2: #556072; --m3: #e9edf3; --m4: #2a303d;
  background:
    repeating-linear-gradient(60deg, rgba(255, 255, 255, .13) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(-60deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 7px),
    linear-gradient(135deg, var(--m1) 0%, var(--m2) 20%, var(--m3) 42%, var(--m2) 58%, var(--m4) 78%, var(--m2) 100%); }
.card.k-fusion.f-stable { --rc: #35e0cc; --m1: #c3fff6; --m2: #159c8f; --m3: #ebfffc; --m4: #0a5750; }
.card.k-fusion.f-advanced { --rc: #ff6fb5; --m1: #ffdcee; --m2: #d4478c; --m3: #fff2f8; --m4: #76204c; }
.card.k-fusion.f-elite { --rc: #ff8a2e; --m1: #ffe2c6; --m2: #e8680f; --m3: #fff4e8; --m4: #843700; }
.card.k-fusion.f-apex { --rc: #ffe66f;
  background:
    repeating-linear-gradient(60deg, rgba(255, 255, 255, .18) 0 1px, transparent 1px 7px),
    linear-gradient(135deg, #ff6fd8, #6fd3ff 20%, #b7ffcf 38%, #ffe66f 55%, #ff9a5a 72%, #c58bff 88%, #ff6fd8);
  background-size: 100% 100%, 260% 260%; animation: prism 4s linear infinite, aurap 3.4s ease-in-out infinite; }
@keyframes metal { 50% { background-position: 100% 100%; } }
@keyframes prism { 50% { background-position: 0 0, 100% 100%; } }

/* Rarity rims (static/art/rim-*.svg, made by tools/rims.py), drawn over the metal border. Each step up adds to the frame:
   Common / Prototype a plain groove · Uncommon / Stable corner rivets · Rare / Advanced corner brackets and small gems ·
   Epic / Elite scrolls, a gem crest and side gems · Legendary / Apex a winged crest and gems everywhere.
   Everything up to Epic / Elite stands still; only Legendary and Apex glow, glint and twinkle. */
.card.r-common { --rim: url(/art/rim-common.svg?v=2); }        .card.f-prototype { --rim: url(/art/rim-prototype.svg?v=2); }
.card.r-uncommon { --rim: url(/art/rim-uncommon.svg?v=2); }    .card.f-stable { --rim: url(/art/rim-stable.svg?v=2); }
.card.r-rare { --rim: url(/art/rim-rare.svg?v=2); }            .card.f-advanced { --rim: url(/art/rim-advanced.svg?v=2); }
.card.r-epic { --rim: url(/art/rim-epic.svg?v=2); }            .card.f-elite { --rim: url(/art/rim-elite.svg?v=2); }
.card.r-legendary { --rim: url(/art/rim-legendary.svg?v=2); }  .card.f-apex { --rim: url(/art/rim-apex.svg?v=2); }
.rim { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--rim, none) center / 100% 100% no-repeat; }
/* Styled cards (Glitch, Retro, Shadow, Prism) wear their own frame (see "special kinds"), and merged cards
   (level 2 / 3) wear the merge frame instead; the metal colour still tells the rarity. */
.card.lv2:not([class*=" st-"]) .rim, .card.lv3:not([class*=" st-"]) .rim { display: none; }
/* Legendary / Apex: a breathing aura, a glint that runs over the ornaments, a twinkle on the crest gem. */
@keyframes aura {
  0%, 100% { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 10px color-mix(in srgb, var(--rc) 40%, transparent), inset 0 0 0 1px rgba(255, 255, 255, .5); }
  50% { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 24px 3px color-mix(in srgb, var(--rc) 75%, transparent), inset 0 0 0 1px rgba(255, 255, 255, .65); } }
@keyframes aurap {
  0%, 100% { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 12px rgba(255, 111, 216, .45), 0 0 4px rgba(111, 211, 255, .4), inset 0 0 0 1px rgba(255, 255, 255, .55); }
  50% { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), -6px 0 22px 2px rgba(255, 111, 216, .6), 6px 0 22px 2px rgba(111, 211, 255, .6), inset 0 0 0 1px rgba(255, 255, 255, .7); } }
.card.r-legendary .rim::after, .card.f-apex .rim::after { content: ""; position: absolute; inset: 0;
  -webkit-mask: var(--rim) center / 100% 100% no-repeat; mask: var(--rim) center / 100% 100% no-repeat;
  background: linear-gradient(115deg, transparent 43%, rgba(255, 255, 255, .95) 50%, transparent 57%) 100% 0 / 300% 100% no-repeat;
  animation: glint 4.2s ease-in-out infinite; }
@keyframes glint { 0% { background-position: 100% 0; } 42%, 100% { background-position: 0 0; } }
.card.r-legendary .rim::before, .card.f-apex .rim::before { content: ""; position: absolute; z-index: 1; left: 50%; top: 2.2%; width: 26%; aspect-ratio: 1;
  opacity: 0; transform: translate(-50%, -50%) scale(.2);
  background: linear-gradient(90deg, transparent, #fff 50%, transparent) center / 100% 5% no-repeat,
    linear-gradient(0deg, transparent, #fff 50%, transparent) center / 5% 100% no-repeat,
    radial-gradient(closest-side, #fff, rgba(255, 244, 200, .55) 40%, transparent) center / 34% 34% no-repeat;
  animation: crestwink 4.2s ease-in-out infinite; }
@keyframes crestwink { 0%, 48%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0deg); }
  60% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(45deg); } 74% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(90deg); } }
.card.f-apex .rim { animation: rimhue 7s linear infinite; }
@keyframes rimhue { to { filter: hue-rotate(360deg); } }

.card-in { position: relative; z-index: 1; height: 100%; border-radius: 4.4cqw; overflow: hidden; color: #fff;
  background: #10162e var(--bg, none) center 38% / cover no-repeat;
  box-shadow: 0 0 0 .9cqw rgba(0, 0, 0, .55), 0 0 0 1.4cqw rgba(255, 255, 255, .25); }
/* the art layer fills the card; the sprite stands on a soft ground shadow */
.art { position: absolute; inset: 0; }
.art::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 9, 22, .62) 0%, rgba(6, 9, 22, 0) 20%, rgba(6, 9, 22, 0) 50%, rgba(6, 9, 22, .55) 70%, rgba(6, 9, 22, .9) 100%),
    radial-gradient(130% 85% at 50% 42%, transparent 55%, rgba(0, 0, 0, .5)); }
.art::after { content: ""; position: absolute; z-index: 1; left: 20%; right: 20%; top: 61%; height: 8%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); }
.art img { position: absolute; z-index: 2; left: 7%; width: 86%; top: 12.5%; height: 54%; object-fit: contain;
  filter: drop-shadow(0 0 1.6cqw rgba(255, 255, 255, .45)) drop-shadow(0 2.2cqw 2cqw rgba(0, 0, 0, .55)); transition: transform .35s; }
.card.tilting .art img { transform: translate(calc(var(--ry) * -.25cqw), calc(var(--rx) * .25cqw)) scale(1.06); }
.art img.broken { opacity: .15; }
.art-tag { position: absolute; right: 3.4cqw; top: 15.5cqw; z-index: 3; font: 800 5cqw/1 Nunito, sans-serif; padding: 1cqw 2.2cqw;
  border-radius: 1.6cqw; letter-spacing: .3cqw; color: #fff; background: rgba(42, 31, 85, .82); box-shadow: 0 0 0 .4cqw rgba(255, 255, 255, .25); }
.art-tag.custom { background: rgba(24, 130, 84, .9); }

.ct { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 1cqw; padding: 3.6cqw 4.6cqw 2cqw; }
.cn { font: 700 11cqw/1.15 Fredoka, sans-serif; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 .6cqw 0 rgba(0, 0, 0, .55), 0 0 3cqw rgba(0, 0, 0, .7); }
.lv { color: #ffd84d; font-size: 8.6cqw; letter-spacing: -.4cqw; flex: none; text-shadow: 0 .5cqw 0 #6b4200, 0 0 2.4cqw rgba(255, 200, 60, .85); }

.plate { position: absolute; z-index: 3; left: 3.2cqw; right: 3.2cqw; bottom: 3.2cqw; display: flex; flex-direction: column; gap: 1.5cqw;
  padding: 2.6cqw 3.6cqw 2.8cqw; border-radius: 3.2cqw;
  background: linear-gradient(180deg, rgba(16, 21, 46, .8), rgba(7, 9, 22, .94));
  box-shadow: inset 0 .55cqw 0 color-mix(in srgb, var(--rc) 75%, #fff), inset 0 0 0 .3cqw rgba(255, 255, 255, .1), 0 1cqw 3cqw rgba(0, 0, 0, .45); }
.cs { font-size: 6.6cqw; font-weight: 800; color: #d3dbf7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.types { display: flex; gap: 1.6cqw; overflow: hidden; }
.ty { font-style: normal; font: 800 5.4cqw/1 Nunito, sans-serif; color: #fff; border-radius: 99px; padding: 1cqw 2.6cqw;
  text-transform: uppercase; background: #888; white-space: nowrap; letter-spacing: .2cqw;
  box-shadow: inset 0 .5cqw 0 rgba(255, 255, 255, .35), inset 0 -.5cqw 0 rgba(0, 0, 0, .25); text-shadow: 0 .4cqw 0 rgba(0, 0, 0, .3); }
.cf { display: flex; flex-direction: column; gap: .6cqw; }
.cf b { display: flex; align-items: center; gap: 1.6cqw; flex-wrap: wrap; font-size: 6cqw; line-height: 1.15; text-transform: uppercase;
  letter-spacing: .3cqw; color: color-mix(in srgb, var(--rc) 55%, #fff); }
.pips { display: inline-flex; gap: .9cqw; filter: drop-shadow(0 0 1cqw color-mix(in srgb, var(--rc) 80%, transparent)); }
.pips i { width: 4.6cqw; height: 4.6cqw; background: rgba(255, 255, 255, .18); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.pips i.on { background: linear-gradient(135deg, #fff, var(--rc) 45%, color-mix(in srgb, var(--rc) 60%, #000)); }
.k-fusion .pips i { clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%); }
.credit { font-size: 5.6cqw; color: #aeb7da; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }

/* a light sweep crosses Legendary / Apex cards now and then */
.card-in::after { content: ""; position: absolute; z-index: 5; top: 0; bottom: 0; left: -60%; width: 45%; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5) 50%, transparent); transform: skewX(-12deg); }
.card.r-legendary .card-in::after, .card.f-apex .card-in::after { animation: sweep 5.5s ease-in-out infinite; }
.grid > .card:nth-child(3n+2) .card-in::after { animation-delay: 1.8s; }
.grid > .card:nth-child(3n) .card-in::after { animation-delay: 3.6s; }
@keyframes sweep { 0% { transform: translateX(0) skewX(-12deg); opacity: 0; } 4% { opacity: 1; }
  22% { transform: translateX(400%) skewX(-12deg); opacity: 0; } 100% { transform: translateX(400%) skewX(-12deg); opacity: 0; } }

/* foil: rainbow holo + glitter on the painted backdrop (behind the sprite), following the pointer */
.holo { position: absolute; inset: 0; z-index: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .85;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .9) 0 .3cqw, transparent .6cqw) 0 0 / 9cqw 11cqw,
    radial-gradient(circle, rgba(255, 255, 255, .7) 0 .25cqw, transparent .55cqw) 4.5cqw 5.5cqw / 13cqw 9cqw,
    repeating-linear-gradient(115deg, rgba(255, 95, 200, .55) 0%, rgba(89, 200, 255, .55) 6%, rgba(125, 255, 181, .55) 12%,
      rgba(255, 228, 92, .55) 18%, rgba(255, 95, 200, .55) 24%) var(--mx, 0%) var(--my, 0%) / 220% 220%;
  animation: holocard 8s linear infinite; }
.card.tilting .holo { animation: none; opacity: 1; }
@keyframes holocard { 0% { background-position: 0 0, 4.5cqw 5.5cqw, 0% 0%; } 50% { background-position: 0 0, 4.5cqw 5.5cqw, 100% 100%; }
  100% { background-position: 0 0, 4.5cqw 5.5cqw, 0% 0%; } }
/* Foil is just a light shine now (the holographic rainbow above is Prism's): a white sheen on the frame,
   a soft light running over the card and its border */
.card.foil .holo { mix-blend-mode: soft-light; opacity: 1;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .75) 46%, rgba(255, 255, 255, .15) 52%, transparent 64%) 0 0 / 260% 260% no-repeat,
    radial-gradient(circle, rgba(255, 255, 255, .6) 0 .22cqw, transparent .45cqw) 0 0 / 12cqw 14cqw;
  animation: foilshine 5.5s ease-in-out infinite; }
@keyframes foilshine { 0%, 100% { background-position: 110% 110%, 0 0; } 50% { background-position: -10% -10%, 0 0; } }
.card.foil.tilting .holo { background-position: var(--mx, 50%) var(--my, 50%), 0 0; }
.card.foil { background-image:
    linear-gradient(115deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, .3)),
    linear-gradient(135deg, var(--m1) 0%, var(--m2) 20%, var(--m3) 42%, var(--m2) 58%, var(--m4) 78%, var(--m2) 100%); }
.foil-tag { font-size: 5.4cqw; color: #1b1030; background: linear-gradient(90deg, #f4f6fb, #c9d3e6, #ffffff); padding: .3cqw 1.8cqw;
  border-radius: 1.2cqw; letter-spacing: .5cqw; font-weight: 900; }
/* 20/11: a fusion's generation seal, before its name: G2 bronze, G3 silver, G4 gold, G5+ prismatic */
.gen-seal { flex: none; display: inline-grid; place-items: center; min-width: 9cqw; height: 7.4cqw; margin-right: 1.2cqw; padding: 0 1.2cqw;
  border-radius: 1.8cqw; font: 900 4.6cqw/1 Nunito, sans-serif; font-style: normal; color: #2a1550; letter-spacing: .1cqw;
  background: linear-gradient(135deg, #ffd2ad, #c9783f); box-shadow: inset 0 0 0 .35cqw rgba(255, 255, 255, .55), 0 .4cqw 1.2cqw rgba(0, 0, 0, .25); }
.gen-seal.g1 { background: linear-gradient(135deg, #f1edff, #b3a5e8); }     /* 20/11: generation 1 shows too */
.gen-seal.g3 { background: linear-gradient(135deg, #ffffff, #aab4cc); }
.gen-seal.g4 { background: linear-gradient(135deg, #fff1b8, #e0a400); }
.gen-seal.g5 { color: #fff; background: linear-gradient(120deg, #ff6fc8, #a470ff, #5ff3ff, #7cffc4, #ff6fc8); background-size: 300% 100%;
  animation: genseal 4s linear infinite; text-shadow: 0 0 .8cqw rgba(0, 0, 0, .4); }
@keyframes genseal { to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) { .gen-seal.g5 { animation: none; } }
/* 20/11 (owner: "on the special cards show the generation too, matching the card's style"): app.js genSeal */
.gen-seal.gs-shiny { color: #5a3a00; background: linear-gradient(115deg, #fff3b0 0%, #ffd23d 38%, #fffbe6 50%, #ffc21a 62%, #fff0a0 100%);
  background-size: 250% 100%; animation: gs-sweep 3.2s ease-in-out infinite; position: relative;
  box-shadow: inset 0 0 0 .35cqw rgba(255, 255, 255, .8), 0 0 2cqw rgba(255, 210, 61, .75); }
.gen-seal.gs-shiny::after { content: "✦"; position: absolute; top: -2.2cqw; right: -1.6cqw; font-size: 3.8cqw; color: #fff;
  text-shadow: 0 0 1.2cqw #ffd23d; animation: gs-twinkle 1.8s ease-in-out infinite; }
.gen-seal.gs-prism { color: #2a1550; background: linear-gradient(120deg, #ffd1ec, #d9c8ff 20%, #c4f4ff 40%, #d4ffe6 60%, #fff3c4 80%, #ffd1ec);
  background-size: 300% 100%; animation: genseal 5s linear infinite;
  box-shadow: inset 0 0 0 .35cqw rgba(255, 255, 255, .95), 0 0 0 .3cqw rgba(160, 120, 255, .45), 0 0 2.4cqw rgba(140, 220, 255, .7); }
.gen-seal.gs-shadow { color: #efe6ff; background: linear-gradient(135deg, #2a0f4a, #07020f 70%); text-shadow: 0 0 1.2cqw #b07bff;
  box-shadow: inset 0 0 0 .35cqw rgba(176, 123, 255, .75), 0 0 2.2cqw rgba(140, 70, 255, .65); }
.gen-seal.gs-retro { border-radius: 0; font: 400 4.4cqw/1 Silkscreen, monospace; letter-spacing: 0; color: var(--gb0, #0f380f);
  background: var(--gb2, #8bac0f); box-shadow: 0 0 0 .55cqw var(--gb0, #0f380f), .7cqw .7cqw 0 .55cqw var(--gb0, #0f380f); }
.gen-seal.gs-glitch { color: #fff; background: #0b0b14; letter-spacing: .2cqw; text-shadow: -.55cqw 0 #ff2bd6, .55cqw 0 #00f0ff;
  box-shadow: inset 0 0 0 .3cqw rgba(0, 240, 255, .6), -.5cqw 0 0 rgba(255, 43, 214, .6), .5cqw 0 0 rgba(0, 240, 255, .6);
  animation: gs-glitch 2.6s steps(1) infinite; }
@keyframes gs-sweep { 50% { background-position: 100% 0; } }
@keyframes gs-twinkle { 0%, 100% { opacity: .2; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
@keyframes gs-glitch { 0%, 86%, 100% { transform: none; clip-path: none; } 88% { transform: translateX(-.8cqw); clip-path: inset(0 0 55% 0); }
  91% { transform: translateX(.8cqw) skewX(-8deg); clip-path: inset(40% 0 0 0); } 94% { transform: translateX(-.4cqw); } }
@media (prefers-reduced-motion: reduce) { .gen-seal.gs-shiny, .gen-seal.gs-shiny::after, .gen-seal.gs-prism, .gen-seal.gs-glitch { animation: none; } }
/* 20/11: a card of a past era (Era 1 once Aurora turned into Nocturna): an old gold seal on night violet */
.era-tag { font-size: 5cqw; color: #ffe6a3; background: linear-gradient(90deg, #2a1550, #4a2a86, #2a1550); padding: .3cqw 1.6cqw;
  border-radius: 1.2cqw; letter-spacing: .4cqw; font-weight: 900; box-shadow: inset 0 0 0 .35cqw rgba(255, 214, 120, .55); white-space: nowrap; }

.glare { position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; transition: opacity .3s; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .95), transparent 52%); }
.card.tilting .glare { opacity: 1; }

/* Merge level borders (static/art/frame-l2.svg, frame-l3.svg): level 2 = engraved silver filigree,
   level 3 = gold crest with gems and a soft aura */
.card.lv2::before, .card.lv3::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: url(/art/frame-l2.svg?v=2) center / 100% 100% no-repeat; }
.card.lv3::before { background-image: url(/art/frame-l3.svg?v=2); animation: crest 3.2s ease-in-out infinite; }
@keyframes crest { 50% { filter: brightness(1.22) drop-shadow(0 0 3px rgba(255, 214, 110, .85)); } }
.card.lv3 { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 236, 170, .9), 0 0 20px rgba(255, 190, 60, .55); }
/* level 3: a spark of gold light keeps running around the border */
@property --orbit { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.lvfx { position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; padding: 1.6%;
  background: conic-gradient(from var(--orbit), transparent 0 62%, rgba(255, 226, 140, .2) 72%, #fff6d0 80%, rgba(255, 226, 140, .2) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: orbit 3.6s linear infinite; }
@keyframes orbit { to { --orbit: 360deg; } }
.card.lv2 .lv { color: #f1f5ff; text-shadow: 0 .5cqw 0 #3a4256, 0 0 2.4cqw rgba(200, 220, 255, .9); }
.card.lv3 .ct, .card.lv2 .ct { padding-top: 4.4cqw; }

/* Undiscovered fusion: sealed capsule art (static/art/bg-mystery.webp) and a glowing question mark */
.card.mystery .card-in { background-image: url(/art/bg-mystery.webp?v=1); }
.mystery-q { position: absolute; z-index: 2; left: 0; right: 0; top: 14%; height: 52%; display: grid; place-items: center;
  font: 700 50cqw/1 Fredoka, sans-serif; color: rgba(228, 244, 255, .95);
  text-shadow: 0 0 5cqw rgba(120, 220, 255, .95), 0 0 14cqw rgba(190, 120, 255, .8); animation: mq 2.6s ease-in-out infinite; }
@keyframes mq { 50% { transform: scale(1.07); opacity: .78; } }
.card.mystery .cn { color: #cfe9ff; letter-spacing: 1cqw; }
.undisc { font: 400 4.8cqw var(--lcd); letter-spacing: .5cqw; color: #9ff3ff; }
.frow.secret .fn { color: #9fb3e8; letter-spacing: 2px; }
.core .q.secret { color: #e4f4ff; text-shadow: 0 0 12px rgba(120, 220, 255, .95), 0 0 26px rgba(190, 120, 255, .8); animation: mq 2.6s ease-in-out infinite; }
.rarity-pop.disc { top: auto; bottom: -16px; color: #1b1030; background: linear-gradient(90deg, #ff9fe0, #9fe3ff, #fff09f);
  animation-duration: 2.3s; }
.bar.disc i { background: linear-gradient(90deg, #b06bff, #3fe0d0); }

/* Who has it / who wants it */
.people { margin-top: 12px; }
.people .btn.on { box-shadow: inset 0 0 0 2px var(--cyan); color: var(--cyan); }
.people .n { font-weight: 800; opacity: .85; }
.ppl-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.ppl { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); }
.ppl a.grow { color: inherit; min-width: 0; }
.ppl .avatar { width: 32px; height: 32px; font-size: 15px; }

/* Latest discoveries (Home) */
.disc-row { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, .06); color: inherit; }
.disc-row:first-child { border-top: 0; }
.disc-row img { width: 46px; height: 46px; object-fit: contain; flex: none;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }

.badge { position: absolute; top: -7px; left: -7px; background: var(--accent2); color: #fff; font-weight: 800;
  border-radius: 99px; font-size: 12px; padding: 1px 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); z-index: 6; animation: pop .35s backwards .2s; }
.badge.new { background: var(--good); color: #062614; }
.badge.tokb { background: var(--cyan); color: #032a26; }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.2); } }
.card.sel { outline: 3px solid var(--cyan); outline-offset: 2px; box-shadow: 0 0 18px rgba(63, 224, 208, .55); }
.card.sel::after { content: "✓"; position: absolute; top: -9px; right: -9px; width: 25px; height: 25px; border-radius: 50%;
  background: var(--cyan); color: #032a26; font-weight: 900; display: grid; place-items: center; z-index: 6; animation: pop .25s; }
.card.dim { opacity: .35; filter: grayscale(.6); }

/* Type colours (chips) */
.t-NORMAL { background: #9a9a7a; } .t-FIRE { background: #ee7f30; } .t-WATER { background: #5a86f0; }
.t-GRASS { background: #5fb53e; } .t-ELECTRIC { background: #e0b414; } .t-ICE { background: #5fbcc6; }
.t-FIGHTING { background: #c03028; } .t-POISON { background: #a040a0; } .t-GROUND { background: #c09a40; }
.t-FLYING { background: #8a7ae0; } .t-PSYCHIC { background: #f0507f; } .t-BUG { background: #8fa018; }
.t-ROCK { background: #a89530; } .t-GHOST { background: #6a5196; } .t-DRAGON { background: #6a32f0; }
.t-DARK { background: #705848; } .t-STEEL { background: #8f90ac; } .t-FAIRY { background: #e28aa0; }

/* Card back: a friendly pastel sunset with little ∞ marks and sparkles (static/art/card-back.webp, drawn by
   tools/card_back.py) and the ∞ lens in the middle */
.card.back { padding: 0; transform: none; background: #b07cff url(/art/card-back.webp?v=2) center / cover no-repeat;
  box-shadow: 0 6px 16px rgba(40, 10, 80, .45), inset 0 0 0 1px rgba(255, 255, 255, .55); }
.card.back .card-in { background: none; box-shadow: none; }
.card.back .card-in::after { display: none; }
.back-mark { position: absolute; left: 50%; top: 49%; width: 30cqw; height: 30cqw; margin: -15cqw 0 0 -15cqw; border-radius: 50%;
  display: grid; place-items: center; border: 1.6cqw solid #fff;
  background: radial-gradient(circle at 50% 38%, #ffffff, #f6eeff 55%, #e6d6ff);
  box-shadow: 0 0 0 1cqw rgba(255, 255, 255, .45), 0 1.5cqw 4cqw rgba(90, 40, 160, .35), 0 0 8cqw rgba(255, 120, 200, .65);
  animation: lens 2.4s ease-in-out infinite; }
.back-mark svg.inf { width: 22cqw; height: 11cqw; }
.back-mark svg.inf path { stroke-width: 4.4; }
.back-hint { position: absolute; left: 50%; bottom: 10cqw; transform: translateX(-50%); white-space: nowrap; font: 400 5.6cqw var(--lcd);
  color: #7b3fe0; letter-spacing: .5cqw; padding: 1.2cqw 3.4cqw; border-radius: 99px; background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 0 .4cqw rgba(255, 255, 255, .55), 0 1cqw 3cqw rgba(90, 40, 160, .35); animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.flip-in { animation: flip .45s ease-out; }
@keyframes flip { 0% { transform: rotateY(90deg) scale(.95); } 100% { transform: rotateY(0) scale(1); } }
.glow-legendary { box-shadow: 0 0 30px 8px rgba(255, 182, 39, .85) !important; }

/* ------------------------------------------------------------------ booster packs */
/* A sealed foil pack drawn in CSS around real sprites: crimped metal ends, pillow shading,
   foil stripes, the game logo, a hero creature on a sunburst and the pack's ribbon. */
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 640px) { .packs { gap: 26px; padding: 0 16px; } }
.pack3 { --f1: #0c7a5f; --f2: #22d3a0; --f3: #07493a; --trim: #f0fffa; --trim2: #86d6bf; --ink: #04382c; --glow: rgba(80, 255, 200, .45);
  --rx: 0deg; --ry: 0deg;
  position: relative; display: block; width: 100%; aspect-ratio: 3 / 4.7; padding: 0; border: 0; background: none; color: #fff;
  font: inherit; cursor: pointer; container-type: inline-size; user-select: none;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .55));
  transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.pack3.standard { --f1: #183c9e; --f2: #4d8bff; --f3: #0c1b55; --trim: #f2f6ff; --trim2: #a5bbea; --ink: #0a1a4a; --glow: rgba(110, 170, 255, .5); }
.pack3.premium { --f1: #2a1b05; --f2: #7a5410; --f3: #0d0803; --trim: #fff3c8; --trim2: #e2a935; --ink: #2b1a00; --glow: rgba(255, 200, 80, .55); }
button.pack3:hover:not(:disabled) { transform: perspective(700px) translateY(-6px) rotate(-1.5deg) rotateX(var(--rx)) rotateY(var(--ry)); }
.pack3.tilting { transition: transform .06s linear; }
.pack3:disabled { cursor: not-allowed; filter: grayscale(.85) brightness(.55) drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.pack3.opening { animation: shake .55s ease-in-out; }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: rotate(-6deg) scale(1.05); } 40% { transform: rotate(6deg) scale(1.08); }
  60% { transform: rotate(-4deg) scale(1.1); } 80% { transform: rotate(3deg) scale(1.12); } }
.pk-crimp { position: absolute; left: 0; right: 0; height: 7.5%; z-index: 3;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .25) 0 1.4cqw, rgba(255, 255, 255, .15) 1.4cqw 2cqw, transparent 2cqw 3.4cqw),
    linear-gradient(180deg, var(--trim), var(--trim2) 55%, var(--trim)); }
.pk-crimp.top { top: 0; -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 5cqw 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 5cqw 100%; }
.pk-crimp.bot { bottom: 0; -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) 50% / 5cqw 100%;
  mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) 50% / 5cqw 100%; }
.pk-face { position: absolute; left: 0; right: 0; top: 6.5%; bottom: 6.5%; z-index: 1; overflow: hidden; border-radius: 1.2cqw;
  background:
    radial-gradient(120% 52% at 50% 50%, rgba(255, 255, 255, .2), transparent 62%),
    linear-gradient(90deg, rgba(0, 0, 0, .5), transparent 13%, transparent 87%, rgba(0, 0, 0, .5)),
    linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 10%, transparent 90%, rgba(0, 0, 0, .3)),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .07) 0 1.1cqw, transparent 1.1cqw 4.2cqw),
    linear-gradient(160deg, var(--f1), var(--f2) 36%, var(--f3) 72%, var(--f1)); }
.pack3.premium .pk-face { box-shadow: inset 0 0 0 1.3cqw rgba(255, 214, 120, .6), inset 0 0 0 2.3cqw rgba(0, 0, 0, .35); }
.pk-burst { position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; margin: -75% 0 0 -75%; z-index: 0;
  background: repeating-conic-gradient(rgba(255, 255, 255, .17) 0 6deg, transparent 6deg 13deg);
  -webkit-mask: radial-gradient(closest-side, #000 18%, transparent 72%); mask: radial-gradient(closest-side, #000 18%, transparent 72%);
  animation: spin 40s linear infinite; }
.pk-logo { position: absolute; z-index: 4; top: 5%; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; line-height: .95; }
.pk-logo b { font: 700 15.5cqw/1 Fredoka, sans-serif; letter-spacing: .6cqw; color: #fff; -webkit-text-stroke: 1.3cqw var(--ink); paint-order: stroke fill;
  text-shadow: 0 1.3cqw 0 var(--ink), 0 0 5cqw var(--glow); }
.pk-logo small { font: 400 5.6cqw var(--lcd); letter-spacing: 2.4cqw; color: var(--trim); margin-top: 1.6cqw; text-shadow: 0 .6cqw 0 var(--ink); }
.pk-lens { width: 22cqw; height: 11cqw; margin-bottom: 1.2cqw; display: grid; place-items: center; filter: drop-shadow(0 .8cqw 0 var(--ink)); }
.pk-lens svg.inf { width: 22cqw; height: 11cqw; }
.pk-lens svg.inf path { stroke: #fff; stroke-width: 4.6; }
.pk-hero { position: absolute; z-index: 3; left: 10%; width: 80%; top: 30%; height: 42%; object-fit: contain;
  filter: drop-shadow(0 0 2cqw rgba(255, 255, 255, .8)) drop-shadow(0 3cqw 3cqw rgba(0, 0, 0, .55)); animation: herofloat 3.2s ease-in-out infinite; }
@keyframes herofloat { 50% { transform: translateY(-2.4cqw); } }
.pk-side { position: absolute; z-index: 2; width: 44%; top: 40%; height: 30%; object-fit: contain;
  filter: brightness(.7) saturate(.9) drop-shadow(0 2cqw 2cqw rgba(0, 0, 0, .5)); }
.pk-side.l { left: -4%; } .pk-side.r { right: -4%; transform: scaleX(-1); }
.pk-ribbon { position: absolute; z-index: 4; left: -6%; right: -6%; top: 73%; padding: 2.4cqw 0 2.2cqw; text-align: center; transform: rotate(-4deg);
  font: 700 8.6cqw/1 Fredoka, sans-serif; letter-spacing: .7cqw; text-transform: uppercase; color: var(--ink);
  background: linear-gradient(180deg, #fff, var(--trim) 40%, var(--trim2)); box-shadow: 0 1cqw 0 rgba(0, 0, 0, .4), inset 0 -.6cqw 0 rgba(0, 0, 0, .15); }
.pk-foot { position: absolute; z-index: 4; left: 0; right: 0; bottom: 3.5%; display: flex; justify-content: center; }
.pk-foot > span { display: inline-flex; align-items: center; gap: 1.6cqw; font: 800 6.8cqw/1 Nunito, sans-serif; text-transform: uppercase;
  padding: 1.6cqw 4.4cqw; border-radius: 99px; background: rgba(0, 0, 0, .5); box-shadow: inset 0 0 0 .4cqw rgba(255, 255, 255, .25); }
.pk-foot .coin.sm { width: 7cqw; height: 7cqw; }
.pk-gloss { position: absolute; z-index: 5; left: 9%; width: 12%; top: 6.5%; bottom: 6.5%; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .26), transparent); }
.pk-sheen { position: absolute; z-index: 5; left: 0; right: 0; top: 6.5%; bottom: 6.5%; overflow: hidden; pointer-events: none; }
.pk-sheen::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; opacity: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); animation: sweep 4.8s ease-in-out infinite; }
.packs > .pack3:nth-child(2) .pk-sheen::before { animation-delay: 1.6s; }
.packs > .pack3:nth-child(3) .pk-sheen::before { animation-delay: 3.2s; }

/* Tear-open moment on the stage */
#stage.sealed .stage-grid, #stage.sealed .stage-actions { display: none; }
.tear-wrap { position: relative; width: min(230px, 58vw); aspect-ratio: 3 / 4.7; margin: 8px auto 4px; cursor: pointer; touch-action: none;
  animation: packin .55s cubic-bezier(.2, 1.4, .4, 1), packidle 2.6s ease-in-out .6s infinite; }
@keyframes packin { from { transform: translateY(50px) scale(.6); opacity: 0; } }
@keyframes packidle { 50% { transform: translateY(-7px) rotate(-1deg); } }
.tear-top, .tear-body { position: absolute; inset: 0; }
.tear-top { z-index: 2; clip-path: inset(0 0 89.5% 0); }
.tear-body { clip-path: inset(10.5% 0 0 0); }
.tear-top .pack3, .tear-body .pack3 { height: 100%; cursor: pointer; }
.tear-line { position: absolute; z-index: 3; left: 5%; right: 5%; top: 10.5%; border-top: 2px dashed rgba(255, 255, 255, .9);
  filter: drop-shadow(0 0 4px #fff); animation: blink 1.1s infinite; }
.slit { position: absolute; z-index: 1; left: 6%; right: 6%; top: 10.5%; height: 4px; margin-top: -2px; border-radius: 4px; }
.tear-hint { position: relative; text-align: center; font: 400 12px var(--lcd); color: #e2f4ff; letter-spacing: 1px; animation: blink 1.4s infinite; margin: 6px 0 0; }
.tear-wrap.ripping { animation: none; cursor: default; }
.ripping .tear-top { transform-origin: 0 100%; animation: rip .6s cubic-bezier(.3, .1, .5, 1) forwards; }
@keyframes rip { 25% { transform: translate(4px, -3px) rotate(-5deg); } 100% { transform: translate(140px, -190px) rotate(42deg); opacity: 0; } }
.ripping .tear-body { animation: dropout .75s .38s ease-in forwards; }
@keyframes dropout { to { transform: translateY(70vh) rotate(7deg); opacity: 0; } }
.ripping .tear-line { display: none; }
.ripping .slit { animation: slit .9s ease-out forwards; }
@keyframes slit { 0% { background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 235, .9); }
  35% { background: #fff; box-shadow: 0 0 50px 26px rgba(255, 255, 235, .9); } 100% { background: transparent; box-shadow: 0 0 140px 90px rgba(255, 255, 235, 0); } }

/* Pack opening stage */
#stage { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  padding: 24px 16px; overflow: hidden auto; background: radial-gradient(circle at 50% 42%, #24316a, #070b18 75%); animation: fadein .25s; }
@keyframes fadein { from { opacity: 0; } }
#stage .rays { position: fixed; inset: -60%; pointer-events: none; opacity: .7;
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .07) 0 8deg, transparent 8deg 16deg); animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#stage h2 { position: relative; font-family: var(--lcd); font-weight: 400; letter-spacing: 2px; color: var(--cyan); text-shadow: 0 0 10px rgba(63, 224, 208, .6); }
.stage-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 112px)); gap: 12px; justify-content: center; width: 100%; max-width: 400px; }
@media (min-width: 640px) { .stage-grid { grid-template-columns: repeat(5, minmax(0, 150px)); max-width: 820px; } }
.flipper { aspect-ratio: 5 / 7.4; perspective: 900px; animation: deal .55s cubic-bezier(.2, .9, .3, 1.2) backwards; animation-delay: calc(var(--i) * 110ms + .35s); }
@keyframes deal { from { transform: translateY(-30vh) scale(.4) rotate(-25deg); opacity: 0; } }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, 1.3, .5, 1); }
.flipper.flipped .flip-inner { transform: rotateY(180deg); }
.flip-back, .flip-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-front { transform: rotateY(180deg); }
.flip-back .card, .flip-front .card { height: 100%; width: 100%; }
.flipper:not(.flipped) .flip-back { cursor: pointer; animation: hover 2.2s ease-in-out infinite; animation-delay: calc(var(--i) * .2s); }
@keyframes hover { 50% { transform: translateY(-5px); } }
.stage-actions { position: relative; display: flex; gap: 10px; margin-top: 18px; width: 100%; max-width: 400px; }
.stage-actions .btn { flex: 1; }
.rarity-pop { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); z-index: 8; white-space: nowrap; pointer-events: none;
  font: 400 11px var(--lcd); letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; color: #1b1300; background: var(--accent);
  animation: rpop 1.6s ease-out forwards; }
@keyframes rpop { 0% { transform: translate(-50%, 10px) scale(.4); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -18px); opacity: 0; } }
.particle { position: fixed; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; z-index: 95;
  animation: particle var(--t, .9s) cubic-bezier(.15, .7, .3, 1) forwards; }
.particle.sq { border-radius: 2px; }
@keyframes particle { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot, 180deg)) scale(.15); opacity: 0; } }
.flash { position: fixed; inset: 0; z-index: 90; pointer-events: none; animation: flash .6s ease-out forwards; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
.fly { position: fixed; z-index: 96; pointer-events: none; transition: transform .75s cubic-bezier(.5, -0.3, .7, 1), opacity .75s; }
.float-num { position: fixed; z-index: 96; pointer-events: none; font: 400 14px var(--lcd); color: var(--accent); text-shadow: 0 0 8px rgba(0, 0, 0, .8);
  animation: floatup 1.1s ease-out forwards; }
.float-num.tok { color: var(--cyan); }
@keyframes floatup { to { transform: translateY(-36px); opacity: 0; } }

/* ------------------------------------------------------------------ home dashboard */
.dash-hero { margin-bottom: 14px; padding-top: 70px;
  background: linear-gradient(180deg, rgba(8, 20, 28, .1), rgba(8, 22, 30, .82) 62%, #0b1f26), url(/art/hero.webp?v=1) center 40% / cover no-repeat, #0b1f26; }
@media (min-width: 640px) { .dash-hero { padding-top: 110px; } }
.dash-hero h1 { margin: 2px 0 2px; color: #fff; }
.clock { font: 400 26px var(--lcd); color: var(--cyan); text-shadow: 0 0 12px rgba(63, 224, 208, .7); letter-spacing: 2px; }
.dash { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }
@media (min-width: 640px) { .dash { grid-template-columns: repeat(2, 1fr); } }
.mon { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 37, 70, .88), rgba(19, 27, 53, .92)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--line); overflow: hidden; }
.mon::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mc, var(--accent)); box-shadow: 0 0 12px var(--mc, var(--accent)); }
.mon.income { --mc: var(--accent); } .mon.packm { --mc: #3fe0a0; } .mon.labm { --mc: var(--cyan); }
.mon .icon { position: absolute; right: -8px; top: -8px; width: 74px; height: 74px; opacity: .12; stroke: #fff; fill: none; stroke-width: 1.6; }
.mon.ready { border-color: color-mix(in srgb, var(--mc) 60%, var(--line)); box-shadow: 0 0 18px color-mix(in srgb, var(--mc) 25%, transparent); }
.devbox { border-style: dashed; border-color: #6b5a1e; background: #221f38; }

/* ------------------------------------------------------------------ album = Infinidex */
.dexgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .dexgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 760px) { .dexgrid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.dex { position: relative; overflow: hidden; border-radius: 12px; padding: 6px 4px 5px; text-align: center; color: var(--text);
  display: flex; flex-direction: column; align-items: center; border: 2px solid #0a1418;
  background: radial-gradient(120% 120% at 30% 0%, #133638, #0b1d24 70%); box-shadow: inset 0 0 0 1px rgba(63, 224, 208, .15);
  transition: transform .2s, box-shadow .2s; }
.dex::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px); }
.dex:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(63, 224, 208, .5), 0 0 14px rgba(63, 224, 208, .25); }
.dex img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: brightness(0) opacity(.35); }
.dex.own { background: radial-gradient(120% 120% at 30% 0%, #1d5a58, #0e2a30 70%); box-shadow: inset 0 0 0 1px rgba(63, 224, 208, .45); }
.dex.own img { filter: drop-shadow(0 0 4px rgba(63, 224, 208, .5)); }
.dex .no { font: 400 9px var(--lcd); color: #7fc9bf; letter-spacing: .5px; }
.dex .fc { font: 400 9px var(--lcd); color: var(--accent); }
.dex .fc.zero { color: #3d6a6a; }
.dex.own .no::after { content: " ●"; color: var(--good); }
button.dex { cursor: pointer; font: inherit; }
.bar { height: 10px; background: #0a1418; border-radius: 99px; overflow: hidden; margin-top: 6px; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #9cfff2); border-radius: 99px; box-shadow: 0 0 10px rgba(63, 224, 208, .7);
  animation: fill 1s ease-out; transform-origin: left; }
@keyframes fill { from { transform: scaleX(0); } }
.flist { display: flex; flex-direction: column; gap: 6px; }
.frow { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; cursor: pointer; transition: background .2s, transform .15s; }
.frow:hover { background: var(--panel2); transform: translateX(2px); }
.frow.own { border-color: var(--cyan-d); background: #173144; }
.frow .fn { font-weight: 800; }
.frow .fp { font-size: 12px; color: var(--muted); }
.heart { background: none; border: 0; font-size: 21px; cursor: pointer; color: #6c75b0; padding: 2px 4px; transition: transform .2s; }
.heart:active { transform: scale(1.3); }
.heart.on { color: #ff5d8f; }
.tag { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 6px; background: var(--bg2); color: var(--muted); }
.tag.own { background: var(--good); color: #062614; }
.dex-entry { display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: start; margin: 10px 0 16px; }
@media (max-width: 460px) { .dex-entry { grid-template-columns: 1fr; } .dex-entry > .card { max-width: 200px; justify-self: center; width: 100%; } }
.dex-entry > .card { width: 100%; }

/* ------------------------------------------------------------------ trades */
.trade { background: linear-gradient(180deg, #1a2546, #141d38); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px;
  animation: cardin .35s backwards; }
.trade-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.trade-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; }
.trade-sides .arrow { align-self: center; font-size: 24px; color: var(--cyan); text-shadow: 0 0 10px rgba(63, 224, 208, .7); animation: swapx 2.4s ease-in-out infinite; }
@keyframes swapx { 50% { transform: scaleX(-1); } }
.side-label { font: 400 9px var(--lcd); color: var(--muted); letter-spacing: 1px; margin-bottom: 6px; }
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 116px)); gap: 12px 8px; }
.tv-cell { position: relative; padding-bottom: 9px; }
.tv-cell .valb { font-size: 11px; padding: 1px 8px; }
.tcards .card { border-radius: 8px; padding: 3px; }
.bubble { display: inline-block; background: #0c1630; border: 1px solid var(--line); border-radius: 12px 12px 12px 3px; padding: 6px 10px; font-size: 13px; font-weight: 700; margin: 4px 0 10px; }
.status { font: 400 9px var(--lcd); letter-spacing: 1px; border-radius: 6px; padding: 3px 7px; background: var(--bg2); color: var(--muted); }
.status.pending { color: var(--accent); animation: blink 1.6s infinite; }
.status.accepted { background: var(--good); color: #062614; }
.status.declined, .status.void, .status.cancelled { background: #4a2333; color: #ff9aaa; }
.status.countered { background: #4a3a17; color: var(--accent); }
.warn { background: #4a2333; color: #ffb3bf; border-radius: 10px; padding: 8px 10px; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.composer-bar { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 6px); z-index: 10; background: rgba(22, 30, 58, .97);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 14px; margin-top: 12px; box-shadow: 0 -6px 18px rgba(0, 0, 0, .35); }
.msgs { display: flex; flex-wrap: wrap; gap: 6px; }
.msgs .chip { font-size: 12px; }

/* ------------------------------------------------------------------ profile */
.showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.slot-empty { aspect-ratio: 5 / 7.4; border-radius: 12px; border: 2px dashed var(--line); display: grid; place-items: center;
  color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; padding: 6px; cursor: pointer; transition: border-color .2s; }
.slot-empty:hover { border-color: var(--cyan); }
.player { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 8px; color: var(--text); transition: transform .15s, border-color .2s; }
.player:hover { transform: translateX(3px); border-color: var(--cyan-d); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 18px Fredoka, sans-serif;
  background: radial-gradient(circle at 35% 30%, #ffe9a6, var(--accent) 50%, #d68a00); color: #3a2600; flex: none; border: 2px solid #fff3; }

/* ------------------------------------------------------------------ fusion lab: the chamber */
/* Two capsules feed the reactor through conduits. Sizes come from a few variables so the
   conduits and the reactor always line up with the middle of the glass. */
.lab-hero {
  --gw: clamp(54px, 18vw, 116px);            /* glass width */
  --gh: calc(var(--gw) * 1.62);              /* glass height */
  --cap: calc(var(--gw) * .2);               /* cap height */
  --tw: calc(var(--gw) * 1.26);              /* capsule (cap/base) width */
  --rxs: clamp(100px, 31vw, 290px);           /* reactor size */
  --line-y: calc(var(--cap) + var(--gh) / 2);
  position: relative; isolation: isolate; overflow: hidden; max-width: 900px; margin: 10px auto 16px;
  padding: 54px 10px 20px; border-radius: 22px; border: 1px solid rgba(110, 200, 255, .22);
  background:
    radial-gradient(ellipse 46% 52% at 50% 46%, rgba(63, 224, 208, .17), transparent 72%),
    radial-gradient(ellipse 110% 95% at 50% 42%, transparent 52%, rgba(2, 6, 16, .88)),
    linear-gradient(180deg, rgba(4, 10, 22, .15), rgba(4, 10, 22, .35)),
    url(/art/lab-chamber.webp?v=1) center 64% / cover no-repeat, #07101f;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(0, 0, 0, .35);
}
/* metal floor with a faint grid */
.lab-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(63, 224, 208, .1), transparent 3px),
    linear-gradient(180deg, rgba(4, 10, 22, .1), rgba(4, 10, 22, .78)),
    repeating-linear-gradient(90deg, rgba(110, 200, 255, .07) 0 1px, transparent 1px 46px);
  border-top: 1px solid rgba(110, 200, 255, .18); }

/* LCD status strip */
.ch-hud { position: absolute; z-index: 5; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  max-width: calc(100% - 24px); padding: 5px 14px 5px 11px; border-radius: 99px; white-space: nowrap;
  background: rgba(3, 10, 24, .78); border: 1px solid rgba(63, 224, 208, .35); backdrop-filter: blur(4px);
  box-shadow: 0 0 18px rgba(63, 224, 208, .14), inset 0 0 12px rgba(63, 224, 208, .08);
  font: 400 11px var(--lcd); letter-spacing: 1px; text-transform: uppercase; color: #bff6ef; transition: border-color .3s, color .3s; }
#ch-status { overflow: hidden; text-overflow: ellipsis; }
.ch-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blink 1.4s infinite; }
.ch-hud.busy .ch-dot { background: var(--lens); box-shadow: 0 0 8px var(--lens); animation-duration: .5s; }
.ch-hud.ok { border-color: rgba(63, 224, 208, .75); color: #ecfffc; }
.ch-hud.ok .ch-dot { background: var(--good); box-shadow: 0 0 10px var(--good); animation: none; }
.ch-hud.bad { border-color: rgba(255, 93, 115, .6); color: #ffd3da; }
.ch-hud.bad .ch-dot { background: var(--bad); box-shadow: 0 0 10px var(--bad); }

.ch-stage { display: grid; grid-template-columns: auto minmax(8px, 120px) auto minmax(8px, 120px) auto; justify-content: center; align-items: start; }

/* capsules */
.tube { position: relative; display: flex; flex-direction: column; align-items: center; width: var(--tw); padding: 0; border: 0; background: none;
  color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tube-cap { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 6px;
  width: var(--tw); height: var(--cap); border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #eef3fb 0%, #a9b6cf 28%, #5d6987 68%, #3a4360 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 4px 8px rgba(0, 0, 0, .5); }
.cap-led { width: 5px; height: 5px; border-radius: 50%; background: #2a3148; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .45); }
.tube:not(.empty) .cap-led { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); animation: ledrun 1.2s infinite; }
.tube:not(.empty) .cap-led:nth-child(2) { animation-delay: .2s; }
.tube:not(.empty) .cap-led:nth-child(3) { animation-delay: .4s; }
.tube.body:not(.empty) .cap-led { background: #ff7ad1; box-shadow: 0 0 6px #ff7ad1; }
@keyframes ledrun { 50% { opacity: .3; } }
.glass { position: relative; width: var(--gw); height: var(--gh); margin-top: -1px; overflow: hidden; border-radius: 6px 6px 16px 16px;
  background: linear-gradient(90deg, rgba(160, 220, 255, .16), rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, .02) 70%, rgba(160, 220, 255, .14)), rgba(5, 14, 30, .6);
  box-shadow: inset 0 0 0 2px rgba(190, 235, 255, .32), inset 0 0 26px rgba(63, 224, 208, .22), 0 0 26px rgba(63, 224, 208, .16);
  transition: box-shadow .3s; }
.tube.body .glass { box-shadow: inset 0 0 0 2px rgba(255, 205, 240, .3), inset 0 0 26px rgba(255, 120, 200, .2), 0 0 26px rgba(255, 120, 200, .14); }
.glass-shine { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, transparent 10%, rgba(255, 255, 255, .34) 15%, rgba(255, 255, 255, .06) 21%, transparent 26%,
    transparent 76%, rgba(255, 255, 255, .13) 81%, transparent 86%); }
.liquid { position: absolute; left: 0; right: 0; bottom: 0; height: 80%; transition: height .6s;
  background: linear-gradient(180deg, rgba(63, 224, 208, .3), rgba(23, 153, 142, .75)); }
.liquid::before { content: ""; position: absolute; left: -50%; right: -50%; top: -6px; height: 12px; border-radius: 45%;
  background: rgba(150, 255, 240, .45); animation: wave 3s linear infinite; }
@keyframes wave { 50% { transform: translateX(12%) scaleY(.6); } }
.tube.empty .liquid { height: 16%; opacity: .5; }
.tube.body .liquid { background: linear-gradient(180deg, rgba(255, 120, 200, .28), rgba(150, 60, 200, .72)); }
.tube.body .liquid::before { background: rgba(255, 180, 240, .42); }
.bub { position: absolute; bottom: -8px; left: var(--x); width: var(--s, 6px); height: var(--s, 6px); border-radius: 50%;
  background: rgba(255, 255, 255, .5); animation: rise var(--t, 3s) linear infinite; animation-delay: var(--d); }
@keyframes rise { to { transform: translateY(-180px); opacity: 0; } }
.specimen { position: absolute; z-index: 2; left: 50%; top: 50%; width: 96%; height: auto; aspect-ratio: 1; object-fit: contain;
  transform: translate(-50%, -50%); animation: bob 3s ease-in-out infinite;
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, .55)) drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }
@keyframes bob { 50% { transform: translate(-50%, -57%); } }
.tube-plus { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); font: 700 calc(var(--gw) * .42) Fredoka, sans-serif;
  color: rgba(255, 255, 255, .5); animation: blink 1.6s infinite; }
.tube-base { position: relative; width: var(--tw); height: calc(var(--cap) * 1.15); margin-top: -2px; border-radius: 4px 4px 10px 10px;
  background: linear-gradient(180deg, #8f9cbb, #4a5574 45%, #232b45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 16px rgba(0, 0, 0, .65); }
.tube-base i { position: absolute; left: 16%; right: 16%; top: 42%; height: 3px; border-radius: 2px; background: rgba(63, 224, 208, .22); }
.tube:not(.empty) .tube-base i { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.tube.body:not(.empty) .tube-base i { background: #ff7ad1; box-shadow: 0 0 10px #ff7ad1; }
/* light pool on the floor under each capsule */
.tube::after { content: ""; position: absolute; z-index: -1; pointer-events: none; left: 50%; width: 170%; height: 30px; transform: translateX(-50%);
  top: calc(var(--cap) + var(--gh) + var(--cap) * 1.15 - 16px); background: radial-gradient(ellipse at center, rgba(63, 224, 208, .32), transparent 68%); }
.tube.body::after { background: radial-gradient(ellipse at center, rgba(255, 122, 209, .28), transparent 68%); }
.tplate { display: flex; flex-direction: column; align-items: center; gap: 1px; width: calc(100% + 10px); margin-top: 10px; padding: 5px 6px 6px;
  border-radius: 10px; background: linear-gradient(180deg, rgba(20, 32, 62, .92), rgba(8, 14, 30, .94));
  border: 1px solid rgba(120, 180, 255, .22); box-shadow: 0 4px 12px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); transition: border-color .3s; }
.tube-label { font: 400 9px var(--lcd); letter-spacing: 2px; color: var(--cyan); }
.tube.body .tube-label { color: #ff9ad8; }
.tube-name { max-width: 100%; font-weight: 900; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tube-sub { max-width: 100%; font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tube.empty .tube-name { color: #c9d3f0; font-weight: 800; }
.tube:hover .glass, .tube:focus-visible .glass { box-shadow: inset 0 0 0 2px rgba(190, 235, 255, .55), inset 0 0 30px rgba(63, 224, 208, .4), 0 0 34px rgba(63, 224, 208, .35); }
.tube:focus-visible { outline: none; }

/* conduits: energy flows toward the reactor once a capsule is loaded */
.conduit { position: relative; align-self: start; margin-top: calc(var(--line-y) - 6px); height: 12px; border-radius: 6px;
  margin-left: -4px; margin-right: calc(var(--rxs) * -.05);
  background: linear-gradient(180deg, #8794b4, #3a4462 50%, #1e253c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 3px 8px rgba(0, 0, 0, .5); }
.conduit.r { margin-left: calc(var(--rxs) * -.05); margin-right: -4px; }
.conduit i { position: absolute; left: 3px; right: 3px; top: 4px; height: 4px; border-radius: 2px; overflow: hidden; background: rgba(6, 14, 30, .95); }
.conduit i::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: repeating-linear-gradient(90deg, transparent 0 8px, var(--cyan) 8px 20px, transparent 20px 32px); background-size: 32px 100%;
  filter: drop-shadow(0 0 3px var(--cyan)); animation: flow .7s linear infinite; }
.conduit.r i::after { background-image: repeating-linear-gradient(90deg, transparent 0 8px, #ff7ad1 8px 20px, transparent 20px 32px);
  filter: drop-shadow(0 0 3px #ff7ad1); animation-direction: reverse; }
@keyframes flow { to { background-position: 32px 0; } }
.lab-hero.has-head .conduit.l i::after, .lab-hero.has-body .conduit.r i::after { opacity: 1; }

/* reactor */
.rx-col { display: flex; flex-direction: column; align-items: center; margin-top: calc(var(--line-y) - var(--rxs) / 2); }
.reactor { position: relative; width: var(--rxs); height: var(--rxs); }
.rx-img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .92;
  filter: drop-shadow(0 0 16px rgba(80, 170, 255, .35)); animation: spin 90s linear infinite; }
.rx-glow { position: absolute; inset: 28%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(210, 255, 250, .5), rgba(63, 224, 208, .22) 45%, transparent 70%); animation: rxpulse 2.6s ease-in-out infinite; }
@keyframes rxpulse { 50% { transform: scale(1.14); opacity: .65; } }
.core { position: absolute; inset: 25%; z-index: 2; display: grid; place-items: center; overflow: hidden; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(8, 26, 48, .35), rgba(5, 14, 30, .72) 72%);
  box-shadow: inset 0 0 0 1px rgba(150, 240, 255, .35), inset 0 0 20px rgba(63, 224, 208, .35); transition: background .4s, box-shadow .4s; }
.lab-hero.ready .core { background: radial-gradient(circle at 50% 42%, rgba(22, 64, 96, .95), rgba(4, 11, 26, .97) 72%);
  box-shadow: inset 0 0 0 2px rgba(150, 240, 255, .6), inset 0 0 28px rgba(63, 224, 208, .55), 0 0 34px rgba(63, 224, 208, .6); }
/* hologram scanlines + a scanning beam once the result is shown */
.core::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: repeating-linear-gradient(0deg, rgba(140, 240, 255, .1) 0 1px, transparent 1px 3px); }
.core::after { content: ""; position: absolute; z-index: 3; left: 0; right: 0; height: 30%; top: -30%; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(63, 224, 208, .4), transparent); animation: scan 2.4s linear infinite; }
@keyframes scan { to { top: 100%; } }
.lab-hero.ready .core::before, .lab-hero.ready .core::after { opacity: 1; }
.core img { position: relative; z-index: 2; width: 94%; height: 94%; object-fit: contain; animation: holo-img 2.6s ease-in-out infinite; }
@keyframes holo-img { 50% { filter: drop-shadow(0 0 6px rgba(63, 224, 208, .9)) brightness(1.15); transform: translateY(-3px); } }
.core img.sil { position: absolute; inset: 9%; width: 82%; height: 82%; filter: drop-shadow(0 0 6px rgba(170, 120, 255, .85)); animation: none; }
.core .q { position: relative; z-index: 3; font: 700 calc(var(--rxs) * .17) Fredoka, sans-serif; color: #dffcff;
  text-shadow: 0 0 10px rgba(63, 224, 208, .95), 0 0 26px rgba(63, 224, 208, .7); animation: blink 1.4s infinite; }
.lab-swap { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; padding: 6px 14px; border-radius: 99px;
  border: 1px solid rgba(255, 203, 61, .5); background: linear-gradient(180deg, rgba(40, 52, 92, .96), rgba(16, 24, 48, .96));
  color: var(--accent); font: 800 12px Nunito, sans-serif; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); transition: transform .2s, box-shadow .2s; }
.lab-swap:hover { transform: translateY(-1px); box-shadow: 0 0 16px rgba(255, 203, 61, .45); }

/* fusing */
.lab-hero.fusing .rx-img { animation-duration: 1s; }
.lab-hero.fusing .rx-glow { animation-duration: .25s; }
.lab-hero.fusing .conduit i::after { opacity: 1; animation-duration: .18s; }
.lab-hero.fusing .tube.head .specimen { animation: suck-r 1.1s ease-in forwards; }
.lab-hero.fusing .tube.body .specimen { animation: suck-l 1.1s ease-in forwards; }
@keyframes suck-r { 30% { transform: translate(-50%, -60%) scale(1.08); } 100% { transform: translate(30%, -50%) scale(.12); opacity: 0; filter: brightness(4); } }
@keyframes suck-l { 30% { transform: translate(-50%, -60%) scale(1.08); } 100% { transform: translate(-130%, -50%) scale(.12); opacity: 0; filter: brightness(4); } }
.lab-hero.fusing .core { animation: corepulse .22s 5 alternate; }
@keyframes corepulse { to { box-shadow: inset 0 0 40px rgba(255, 255, 255, .9), 0 0 60px rgba(63, 224, 208, 1); } }
.lab-hero.fusing .liquid { height: 8%; }
@media (min-width: 900px) { .lab-hero { padding-top: 60px; } .tube-name { font-size: 14px; } }
/* the analysis panel lines up with the chamber */
#result { max-width: 900px; margin: 0 auto; }
.lab-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; margin-bottom: 12px;
  background: linear-gradient(90deg, rgba(63, 224, 208, .18), rgba(63, 224, 208, .05)); border: 1px solid var(--cyan-d); animation: glowb 2s infinite; }
@keyframes glowb { 50% { box-shadow: 0 0 16px rgba(63, 224, 208, .35); } }
.scanner { position: relative; }
.scanner::before, .scanner::after { content: ""; position: absolute; width: 22px; height: 22px; border: 3px solid var(--cyan); pointer-events: none; }
.scanner::before { left: 6px; top: 6px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.scanner::after { right: 6px; bottom: 6px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.lab-costs { display: flex; flex-wrap: wrap; gap: 6px; }
.lab-cta { border-color: var(--cyan-d); }

/* ------------------------------------------------------------------ modal, toast, login, misc */
#modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal-bg { position: absolute; inset: 0; background: rgba(4, 6, 16, .72); backdrop-filter: blur(3px); animation: fadein .2s; }
.modal-box { position: relative; width: 100%; max-width: 540px; max-height: 88vh; overflow: auto; background: linear-gradient(180deg, #19223f, #111933);
  border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-top: 4px solid var(--red);
  animation: slideup .32s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes slideup { from { transform: translateY(40%); opacity: 0; } }
@media (min-width: 600px) { #modal { align-items: center; } .modal-box { border-radius: 22px; } }
.detail { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: start; }
.detail > .card, .detail > .flipper { width: 100%; }
@media (max-width: 420px) { .detail { grid-template-columns: 1fr; } .detail > .card, .detail > .flipper { max-width: 210px; justify-self: center; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font-size: 14px; margin: 8px 0; }
.kv dt { font: 400 10px var(--lcd); color: var(--muted); letter-spacing: 1px; padding-top: 3px; } .kv dd { margin: 0; font-weight: 700; }
#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 22px); transform: translateX(-50%); z-index: 98;
  background: #0c1a22; color: #d9fff9; padding: 10px 16px 10px 30px; border-radius: 12px; font-weight: 800; border: 1px solid var(--cyan-d);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5), 0 0 16px rgba(63, 224, 208, .25); max-width: calc(100% - 32px); text-align: center; animation: toastin .3s cubic-bezier(.2, .9, .3, 1.3); }
#toast::before { content: ""; position: absolute; left: 12px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 8px var(--good); }
#toast.err { border-color: var(--bad); color: #ffd2d8; background: #2a0d16; }
#toast.err::before { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
@keyframes toastin { from { transform: translate(-50%, 20px); opacity: 0; } }
.login { max-width: 400px; margin: 24px auto; }
.login-hint { margin: 5px 2px 12px; line-height: 1.4; }
.login-swap { text-align: center; margin: 14px 0 0; }
.login-swap .linkbtn { color: var(--cyan); font-size: 13px; }
#sf h3 { margin-bottom: 4px; }
.hero { text-align: center; margin: 6px 0 22px; padding: 26px 14px 18px; border-radius: 20px; border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(180deg, rgba(13, 10, 34, .35), rgba(13, 10, 34, .9) 85%), url(/art/hero.webp?v=1) center / cover no-repeat, var(--bg2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.hero-inf { display: block; margin: 0 auto 10px; width: 120px; }
.hero-inf svg.inf { width: 120px; height: 60px; filter: drop-shadow(0 0 16px rgba(255, 79, 163, .55)); }
.hero-row { display: flex; justify-content: center; gap: 4px; margin: 10px 0 2px; }
.hero-row img { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); animation: bob 3s ease-in-out infinite; }
.hero-row img:nth-child(2) { animation-delay: -1s; } .hero-row img:nth-child(3) { animation-delay: -2s; }
.hero-lang { margin-top: 10px; }
.hero h1 { font-size: 30px; margin-bottom: 4px; }
.hero .lcd { color: var(--cyan); font-size: 11px; letter-spacing: 2px; }
footer.legal { color: #6f7aa8; font-size: 11px; text-align: center; margin-top: 26px; line-height: 1.5; }
.search { margin-bottom: 12px; }
.artists { columns: 2; column-gap: 16px; font-size: 13px; }
@media (min-width: 600px) { .artists { columns: 3; } }
.artists div { break-inside: avoid; padding: 2px 0; display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted #333b6e; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.section-title h2 { margin: 0; }


/* ------------------------------------------------------------------ album sub-navigation */
.subnav { margin-bottom: 12px; }

/* ------------------------------------------------------------------ locked cards */
.lockb { position: absolute; z-index: 7; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, #ffe7a0, #d99a22); box-shadow: 0 2px 6px rgba(0, 0, 0, .5), 0 0 0 2px #2b1a00; }
.lockb svg, .lockline svg { width: 14px; height: 14px; stroke: #2b1a00; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.lockline { display: flex; gap: 6px; align-items: flex-start; color: #ffe2a0; margin: 10px 0 0; }
.lockline svg { stroke: #ffd36b; flex: none; margin-top: 2px; }

/* ------------------------------------------------------------------ collections */
.set { transition: border-color .3s, box-shadow .3s; }
.set.done { border-color: #b8862a; box-shadow: 0 0 0 1px rgba(255, 210, 110, .35), 0 0 22px rgba(255, 190, 70, .18), inset 0 1px 0 rgba(255, 255, 255, .06);
  background: linear-gradient(180deg, rgba(58, 44, 18, .9), rgba(26, 24, 40, .92)); }
.set-reward { display: flex; gap: 10px; align-items: center; font-weight: 800; font-size: 13px; }
.medal { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font: 700 12px Fredoka, sans-serif;
  color: #2b1a00; background: linear-gradient(180deg, #fff1b8, #e9b13e); box-shadow: 0 0 0 1px #8a5a08, 0 0 12px rgba(255, 200, 80, .45); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.set-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
@media (min-width: 640px) { .set-slots { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); } }
.slot { cursor: pointer; }
.slot > .card { width: 100%; }
.slot-card { position: relative; aspect-ratio: 5 / 7.4; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 8px 6px; text-align: center; container-type: inline-size; transition: transform .2s, border-color .2s; }
.slot-card img { width: 78%; aspect-ratio: 1; object-fit: contain; }
.slot-card b { font: 600 11cqw/1.1 Fredoka, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.slot-card .slot-tag { font: 800 8cqw/1.2 Nunito, sans-serif; padding: 1.5cqw 4cqw; border-radius: 99px; }
.slot-card.missing { border: 2px dashed #3a4a7a; background: rgba(10, 16, 34, .55); color: #8b97c4; }
.slot-card.missing img { filter: brightness(0) invert(.32) opacity(.75); }
.slot-card.missing .slot-tag { background: rgba(255, 255, 255, .06); }
.slot-card.ready { border: 2px solid var(--cyan); background: radial-gradient(circle at 50% 40%, rgba(63, 224, 208, .22), rgba(10, 20, 40, .85) 70%);
  box-shadow: 0 0 14px rgba(63, 224, 208, .35); animation: readyslot 2s ease-in-out infinite; }
.slot-card.ready .slot-tag { background: var(--cyan); color: #032a26; }
@keyframes readyslot { 50% { box-shadow: 0 0 22px rgba(63, 224, 208, .6); } }
.slot:hover .slot-card { transform: translateY(-3px); }
.setpicks { display: flex; flex-direction: column; gap: 8px; }
.setpick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; cursor: pointer; text-align: left;
  color: var(--text); font: inherit; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.setpick:hover:not([disabled]) { border-color: var(--cyan); background: rgba(63, 224, 208, .08); }
.setpick[disabled] { opacity: .45; cursor: not-allowed; }
.set-done { text-align: center; padding: 6px 4px; }
.medal-big { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font: 700 44px Fredoka, sans-serif;
  color: #5a3a00; background: radial-gradient(circle at 35% 30%, #fff6cf, #f2c14e 50%, #a8680a); box-shadow: 0 0 0 4px #fff3c4, 0 0 0 7px #8a5a08, 0 0 40px rgba(255, 200, 80, .7);
  animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
.medal-big.mem { color: #0c2b3a; background: radial-gradient(circle at 35% 30%, #e9fffb, #3fe0d0 50%, #127e74); box-shadow: 0 0 0 4px #d9fff9, 0 0 0 7px #0d5c55, 0 0 40px rgba(63, 224, 208, .7); }

/* ------------------------------------------------------------------ memory match */
.mem-hud { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 14px; flex-wrap: wrap; }
.mem-hud b { font: 400 18px var(--lcd); color: var(--cyan); margin-left: 4px; }
.mem-board { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 8px; margin: 0 auto;
  max-width: clamp(300px, calc((100vh - 290px) / 1.48 + 24px), 560px); }
.mem-board.c5 { gap: 6px; max-width: clamp(320px, calc((100vh - 340px) / 1.48 + 30px), 640px); }
@media (min-width: 640px) { .mem-board { gap: 12px; } .mem-board.c5 { gap: 10px; } }
/* the middle square of the 5 x 5 board: the infinity mark */
.mem-lens { aspect-ratio: 5 / 7.4; display: grid; place-items: center; border-radius: 10px; container-type: inline-size;
  background: radial-gradient(circle at 50% 45%, rgba(63, 224, 208, .16), transparent 65%), #0b1030;
  border: 2px dashed rgba(63, 224, 208, .35); }
.mem-lens svg.inf { width: 70cqw; height: 35cqw; filter: drop-shadow(0 0 4cqw rgba(255, 79, 163, .6)); animation: lens 2.4s ease-in-out infinite; }
.flipper.mem { animation-delay: calc(var(--i) * 40ms); }
.flipper.mem:not(.flipped) .flip-back { animation: none; transition: transform .2s; }
.flipper.mem:not(.flipped):hover .flip-back { transform: translateY(-4px); }
.mem .back-hint { display: none; }
.flipper.mem.matched .flip-front .card { box-shadow: 0 0 0 2px var(--cyan), 0 0 18px 4px rgba(63, 224, 208, .7); animation: matched .5s ease-out; }
@keyframes matched { 40% { transform: scale(1.08); } }

/* home monitor */
.mon.memm { --mc: #ff7ad9; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* memory v2: move dots, won cards, unveiled secret fusion, missed cards at the end */
.mem-dots { display: flex; justify-content: center; gap: 8px; margin: -4px 0 12px; }
.mem-dots i { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #ff7ad9 55%, #a3127a);
  box-shadow: 0 0 8px rgba(255, 122, 217, .7); transition: all .3s; }
.mem-dots i.used { background: #26305a; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); }
.mem-won { margin: 14px auto 0; max-width: 560px; }
.mini-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-row.center { justify-content: center; }
.mini-row > .card { width: 82px; }
.flipper.mem.missed .flip-front .card { filter: grayscale(.6) brightness(.6); }
.flipper.mem.unveil .flip-front .card { animation: unveil .7s ease-out; }
@keyframes unveil { 0% { filter: brightness(3) saturate(0); transform: scale(.9); } 100% { filter: none; transform: none; } }

/* ------------------------------------------------------------------ shiny copies */
.card.shiny { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 0 1.5px #fff6c8, 0 0 18px rgba(255, 232, 140, .65); }
.sparkles { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.sparkles b { position: absolute; left: var(--x); top: var(--y); font: 400 10cqw/1 sans-serif; color: #fffbe0;
  text-shadow: 0 0 2cqw #ffe680, 0 0 5cqw #fff; animation: twinkle 2.4s var(--d) ease-in-out infinite; opacity: 0; }
@keyframes twinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 45% { transform: scale(1.1) rotate(90deg); opacity: 1; }
  60% { transform: scale(.7) rotate(120deg); opacity: .8; } }
.shiny-tag { font-size: 5cqw; color: #3a2600; background: linear-gradient(90deg, #fff3b0, #ffd23d, #fff3b0); padding: .3cqw 1.6cqw;
  border-radius: 1.2cqw; letter-spacing: .3cqw; font-weight: 900; box-shadow: 0 0 2cqw rgba(255, 220, 100, .7); }
.shiny-text { color: #ffe27a !important; text-shadow: 0 0 8px rgba(255, 220, 100, .5); }
.rarity-pop.shinypop { top: auto; bottom: -16px; color: #3a2600; background: linear-gradient(90deg, #fff3b0, #ffd23d, #fff3b0); box-shadow: 0 0 16px rgba(255, 220, 100, .9);
  animation-duration: 2.5s; z-index: 9; }
.dex.has-shiny::after { content: "✦"; position: absolute; top: 3px; right: 5px; color: #ffe27a; font-size: 12px; text-shadow: 0 0 6px #ffd23d; }

/* ------------------------------------------------------------------ glitch copies */
.card.glitch { background: repeating-linear-gradient(0deg, rgba(0, 255, 156, .9) 0 1px, #020806 1px 3px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .6), 0 0 0 1px #00ff9c, 2px 0 0 #ff00c8, -2px 0 0 #00e5ff, 0 0 22px rgba(0, 255, 156, .45) !important;
  animation: glitchframe 3.1s steps(1) infinite !important; }
@keyframes glitchframe { 0%, 100% { translate: 0 0; filter: none; } 86% { translate: 2px -1px; filter: hue-rotate(80deg); }
  88% { translate: -3px 1px; filter: invert(.12) saturate(2); } 90% { translate: 1px 0; filter: none; } 95% { translate: 0 2px; filter: hue-rotate(-60deg); } 97% { translate: 0 0; filter: none; } }
.card.glitch .card-in { filter: contrast(1.1); }
.card.glitch .cn { text-shadow: 2px 0 #ff00c8, -2px 0 #00e5ff, 0 0 3cqw rgba(0, 0, 0, .8); }
.glitchfx { position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 255, 156, .09) 0 1px, transparent 1px 3px); }
.glitchfx::before { content: ""; position: absolute; left: -5%; right: -5%; top: 30%; height: 9%; opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(90deg, rgba(255, 0, 200, .55), rgba(0, 229, 255, .55)); animation: glitchbar 2.3s steps(1) infinite; }
@keyframes glitchbar { 0% { top: 30%; opacity: 0; } 8% { top: 62%; opacity: .9; transform: translateX(-6%); } 11% { opacity: 0; }
  48% { top: 18%; opacity: .8; transform: translateX(5%); } 51% { opacity: 0; } 79% { top: 76%; opacity: .7; transform: translateX(-3%); } 81% { opacity: 0; } }
.glitch-tag { font: 400 5cqw var(--lcd); color: #00ff9c; background: #000; padding: .3cqw 1.6cqw; border-radius: 1cqw; letter-spacing: .4cqw;
  text-shadow: 1px 0 #ff00c8, -1px 0 #00e5ff; box-shadow: 0 0 0 .3cqw #00ff9c; }
.glitch-text { color: #00ff9c !important; text-shadow: 1px 0 #ff00c8, -1px 0 #00e5ff; }
.rarity-pop.glitchpop { top: auto; bottom: -16px; font-size: 13px; color: #00ff9c; background: #000; box-shadow: 0 0 0 1px #00ff9c, 3px 0 0 #ff00c8, -3px 0 0 #00e5ff;
  animation-duration: 2.5s; z-index: 9; }
body.glitching #stage, body.glitching #view, body.glitching .modal-box { animation: screenglitch .9s steps(3); }
@keyframes screenglitch { 0% { translate: 0 0; filter: none; } 20% { translate: -8px 2px; filter: hue-rotate(120deg) saturate(3); }
  40% { translate: 6px -3px; filter: invert(.85); } 60% { translate: -3px 0; filter: hue-rotate(-90deg) contrast(2); } 80% { translate: 4px 2px; filter: none; } 100% { translate: 0 0; } }

/* ------------------------------------------------------------------ special styles */
.style-tag { font: 900 5cqw/1 Nunito, sans-serif; padding: .6cqw 1.8cqw; border-radius: 1.2cqw; letter-spacing: .4cqw; }
.stylepop { top: auto; bottom: -16px; z-index: 9; animation-duration: 2.5s; }

/* Shadow: dark violet metal, smoke behind the creature, glowing violet name */
.card.st-shadow { background: linear-gradient(135deg, #3b2257, #120a1d 40%, #4d2a73 60%, #0b0612) !important;
  animation: shadowaura 3.2s ease-in-out infinite !important; }
@keyframes shadowaura {
  0%, 100% { box-shadow: 0 6px 16px rgba(0, 0, 0, .6), 0 0 0 1px #9b4dff, 0 0 14px rgba(155, 77, 255, .45); }
  50% { box-shadow: 0 6px 16px rgba(0, 0, 0, .6), 0 0 0 1px #b77dff, 0 0 30px 4px rgba(120, 40, 220, .75), 0 -6px 26px rgba(60, 0, 110, .6); } }
.card.st-shadow .card-in { background-color: #0a0612; }
.card.st-shadow .card-in::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(70% 55% at 50% 40%, rgba(60, 10, 110, .25), transparent 70%),
    linear-gradient(180deg, rgba(14, 4, 26, .78), rgba(14, 4, 26, .5) 40%, rgba(10, 2, 20, .88)); }
.card.st-shadow .art img { animation: shadowbreath 3.2s ease-in-out infinite; }
@keyframes shadowbreath { 0%, 100% { filter: drop-shadow(0 1.8cqw 1.6cqw rgba(0, 0, 0, .7)); }
  50% { filter: drop-shadow(0 0 2.4cqw rgba(176, 107, 255, .75)) drop-shadow(0 1.8cqw 1.6cqw rgba(0, 0, 0, .7)) brightness(1.12); } }
.shadow-aura { position: absolute; z-index: 1; left: 7%; width: 86%; top: 12.5%; height: 54%; pointer-events: none;
  -webkit-mask: var(--spr) center / contain no-repeat; mask: var(--spr) center / contain no-repeat;
  background: linear-gradient(0deg, rgba(20, 0, 40, .95) 0%, rgba(150, 60, 255, .95) 26%, rgba(230, 190, 255, .8) 42%, transparent 58%,
    rgba(150, 60, 255, .9) 78%, rgba(20, 0, 40, .95) 100%) 0 0 / 100% 200%;
  filter: blur(1.3cqw); transform-origin: 50% 85%; animation: shflame 1.6s linear infinite, shflick 2.2s ease-in-out infinite alternate; }
@keyframes shflame { to { background-position: 0 -200%; } }
@keyframes shflick { 0% { transform: scale(1.16, 1.2) translateY(-3%); opacity: .85; } 100% { transform: scale(1.22, 1.3) translateY(-6%); opacity: 1; } }
.shadowfx { position: absolute; inset: 8% 0 26%; z-index: 1; pointer-events: none; filter: blur(3cqw);
  background: radial-gradient(40% 35% at 50% 55%, rgba(110, 30, 200, .75), transparent 70%),
    radial-gradient(25% 25% at 35% 40%, rgba(60, 0, 110, .8), transparent 70%), radial-gradient(25% 25% at 65% 65%, rgba(60, 0, 110, .8), transparent 70%);
  animation: smoke 3.4s ease-in-out infinite alternate; }
@keyframes smoke { to { transform: scale(1.12) rotate(6deg); opacity: .75; } }
.card.st-shadow .cn { text-shadow: 0 0 3cqw #9b4dff, 0 .6cqw 0 #000; }
.card.st-shadow .plate { box-shadow: inset 0 .55cqw 0 #9b4dff, 0 1cqw 3cqw rgba(0, 0, 0, .5); }
.style-tag.shadow { color: #e6d4ff; background: #1a0b2b; box-shadow: 0 0 0 .3cqw #9b4dff, 0 0 2cqw rgba(155, 77, 255, .7); }
.shadow-text { color: #c9a2ff !important; text-shadow: 0 0 8px rgba(155, 77, 255, .7); }
.stylepop.shadow { color: #f0e2ff; background: #1a0b2b; box-shadow: 0 0 0 1px #9b4dff, 0 0 18px rgba(155, 77, 255, .9); }

/* Retro: a grey handheld with a green dot-matrix screen */
.card.st-retro { background: linear-gradient(180deg, #d9d6cf, #b9b5ab 60%, #9d998f) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .6), inset 0 -2px 3px rgba(0, 0, 0, .3) !important; }
/* Retro: each element has its own handheld palette (server/sprites.py GB_PALETTES); the card's colours follow it */
.card.st-retro { --gb0: #0f380f; --gb1: #306230; --gb2: #8bac0f; --gb3: #9bbc0f; }
.card.st-retro.ty-GRASS { --gb0: #0f380f; --gb1: #306230; --gb2: #8bac0f; --gb3: #9bbc0f; }
.card.st-retro.ty-FIRE { --gb0: #380e0a; --gb1: #8c2818; --gb2: #e87030; --gb3: #fcd08c; }
.card.st-retro.ty-WATER { --gb0: #0a1a40; --gb1: #204896; --gb2: #5496e6; --gb3: #c4e4fc; }
.card.st-retro.ty-ELECTRIC { --gb0: #3c2c08; --gb1: #967010; --gb2: #ecc428; --gb3: #fcf0aa; }
.card.st-retro.ty-ICE { --gb0: #0e3440; --gb1: #28788c; --gb2: #78d2dc; --gb3: #dcfafc; }
.card.st-retro.ty-GHOST { --gb0: #1e0e34; --gb1: #502c82; --gb2: #966ed2; --gb3: #decefa; }
.card.st-retro.ty-METAL { --gb0: #1c1e26; --gb1: #505664; --gb2: #969eac; --gb3: #dee2ea; }
.card.st-retro.ty-SWEET { --gb0: #460e2c; --gb1: #aa326e; --gb2: #f482b4; --gb3: #fedcec; }
.card.st-retro.ty-SKY { --gb0: #102850; --gb1: #386eb4; --gb2: #82bef0; --gb3: #e2f4ff; }
.card.st-retro.ty-LIGHT { --gb0: #3c2846; --gb1: #966eaa; --gb2: #e6bef0; --gb3: #fcf6ff; }
/* 14/11: a fusion of two elements also carries its second element's palette (--gc*), as its background does */
.card.st-retro.ty2-GRASS { --gc0: #0f380f; --gc1: #306230; --gc2: #8bac0f; --gc3: #9bbc0f; }
.card.st-retro.ty2-FIRE { --gc0: #380e0a; --gc1: #8c2818; --gc2: #e87030; --gc3: #fcd08c; }
.card.st-retro.ty2-WATER { --gc0: #0a1a40; --gc1: #204896; --gc2: #5496e6; --gc3: #c4e4fc; }
.card.st-retro.ty2-ELECTRIC { --gc0: #3c2c08; --gc1: #967010; --gc2: #ecc428; --gc3: #fcf0aa; }
.card.st-retro.ty2-ICE { --gc0: #0e3440; --gc1: #28788c; --gc2: #78d2dc; --gc3: #dcfafc; }
.card.st-retro.ty2-GHOST { --gc0: #1e0e34; --gc1: #502c82; --gc2: #966ed2; --gc3: #decefa; }
.card.st-retro.ty2-METAL { --gc0: #1c1e26; --gc1: #505664; --gc2: #969eac; --gc3: #dee2ea; }
.card.st-retro.ty2-SWEET { --gc0: #460e2c; --gc1: #aa326e; --gc2: #f482b4; --gc3: #fedcec; }
.card.st-retro.ty2-SKY { --gc0: #102850; --gc1: #386eb4; --gc2: #82bef0; --gc3: #e2f4ff; }
.card.st-retro.ty2-LIGHT { --gc0: #3c2846; --gc1: #966eaa; --gc2: #e6bef0; --gc3: #fcf6ff; }
.card.st-retro[class*=" ty2-"] .ct { background: linear-gradient(100deg, var(--gb3) 35%, var(--gc3) 85%); box-shadow: 0 .5cqw 0 var(--gc1); }
.card.st-retro[class*=" ty2-"] .plate { background: linear-gradient(110deg, var(--gb2) 30%, var(--gc2) 80%);
  box-shadow: inset 0 0 0 .5cqw var(--gb1), inset -1.2cqw -1.2cqw 0 -.7cqw var(--gc1); }
.card.st-retro[class*=" ty2-"] .types .ty:nth-child(2) { background: var(--gc1) !important; }
.card.st-retro .card-in { background: var(--gb3) var(--bg, none) center 38% / cover no-repeat !important; image-rendering: pixelated;
  box-shadow: 0 0 0 .9cqw #50505a, 0 0 0 1.6cqw #2c2c33, inset 0 0 4cqw color-mix(in srgb, var(--gb0) 45%, transparent); }
.card.st-retro .art::before { background: linear-gradient(var(--gb0), var(--gb0)) 16% 20% / 1.6cqw 1.6cqw no-repeat,
    linear-gradient(var(--gb0), var(--gb0)) 84% 28% / 1.6cqw 1.6cqw no-repeat, linear-gradient(var(--gb1), var(--gb1)) 74% 60% / 1.6cqw 1.6cqw no-repeat,
    linear-gradient(var(--gb1), var(--gb1)) 24% 54% / 1.6cqw 1.6cqw no-repeat; animation: gbtwinkle 1.6s steps(1) infinite; }
@keyframes gbtwinkle { 0% { opacity: 1; } 25% { opacity: 0; }
  50% { opacity: 1; background-position: 22% 16%, 78% 34%, 64% 64%, 30% 46%; } 75% { opacity: 0; } }
.card.st-retro .art::after { background: radial-gradient(closest-side, color-mix(in srgb, var(--gb0) 35%, transparent), transparent); }
.card.st-retro .art img { filter: none; image-rendering: pixelated; animation: gbbob 1.1s steps(1) infinite; }
@keyframes gbbob { 50% { translate: 0 -1.45cqw; } }   /* a two-frame idle, like a handheld sprite */
.retrofx { position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--gb0) 13%, transparent) 0 1px, transparent 1px 1.45cqw),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--gb0) 13%, transparent) 0 1px, transparent 1px 1.45cqw),
    radial-gradient(120% 90% at 50% 40%, transparent 55%, color-mix(in srgb, var(--gb0) 35%, transparent)); }
.card.st-retro .cn { font-family: var(--lcd); font-weight: 400; font-size: 8.4cqw; color: var(--gb0); text-shadow: none; }
.card.st-retro .ct { background: var(--gb3); box-shadow: 0 .5cqw 0 var(--gb1); }   /* the name stays readable over the pixel scene */
.card.st-retro .lv { color: var(--gb0); text-shadow: none; }
.card.st-retro .plate { background: var(--gb2); box-shadow: inset 0 0 0 .5cqw var(--gb1); }
.card.st-retro .cs, .card.st-retro .credit, .card.st-retro .cf b { color: var(--gb0); }
.card.st-retro .ty { background: var(--gb1) !important; box-shadow: none; text-shadow: none; }
.card.st-retro .pips { filter: none; }
.card.st-retro .pips i.on { background: var(--gb0); }
.card.st-retro .pips i { background: color-mix(in srgb, var(--gb0) 25%, transparent); }
.style-tag.retro { font-family: var(--lcd); font-weight: 400; color: #9bbc0f; background: #0f380f; }
.retro-text { color: #9bbc0f !important; font-family: var(--lcd); }
.stylepop.retro { font-family: var(--lcd); color: #9bbc0f; background: #0f380f; box-shadow: 0 0 0 2px #306230; }

/* Prism: the creature keeps its real colours (so the card stays sharp) with a rainbow aura glowing
   behind it, inside a soft rainbow frame. The aura is a blurred copy of the sprite's outline
   (a mask of the same picture) filled with a moving rainbow. */
.card.st-prism { background: linear-gradient(135deg, #ff8a95, #ffd08a, #fff6a0, #9dffc4, #9fdcff, #d2a8ff, #ff8a95) !important;
  background-size: 300% 300% !important; background-repeat: no-repeat !important;
  animation: prismframe 5s ease-in-out infinite alternate !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 14px rgba(255, 255, 255, .3) !important; }
/* the rainbow slides inside one oversized tile (0%..100%) so no tile seam ever shows */
@keyframes prismframe { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.prism-aura { position: absolute; z-index: 1; left: 7%; width: 86%; top: 12.5%; height: 54%; pointer-events: none;
  transform: scale(1.13); filter: blur(1.5cqw) saturate(1.6) brightness(1.15);
  -webkit-mask: var(--spr) center / contain no-repeat; mask: var(--spr) center / contain no-repeat;
  background: linear-gradient(115deg, #ff5f6d, #ffc371, #fff35c, #5cff9d, #5cc8ff, #b45cff, #ff5f6d) 0 0 / 300% 300% no-repeat;
  animation: prismsheen 3.5s ease-in-out infinite alternate; }
@keyframes prismsheen { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.card.st-prism .art img { filter: drop-shadow(0 0 .5cqw rgba(255, 255, 255, .9)) drop-shadow(0 2.2cqw 2cqw rgba(0, 0, 0, .55)); }
.card.st-prism.tilting .prism-aura { filter: blur(1.5cqw) saturate(1.8) brightness(1.3); }

/* ------------------------------------------------------------------ special kinds: frames and border effects */
/* Each style swaps the rarity rim for its own frame (static/art/rim-style-*.svg, made by tools/style_frames.py) and
   keeps it when merged (the level shows in the stars). Effects live on the border so the card stays sharp; shiny and
   foil add theirs on top of any frame, so one card can stack several (.kfx layers, built by kindFx in app.js). */
.card.st-glitch { --rim: url(/art/rim-style-glitch.svg?v=2); }
.card.st-prism { --rim: url(/art/rim-style-prism.svg?v=2); }
.card.st-shadow { --rim: url(/art/rim-style-shadow.svg?v=2); }
.card.st-retro { --rim: url(/art/rim-style-retro.svg?v=2); }
.card.st-retro.st-glitch { --rim: url(/art/rim-style-retro-glitch.svg?v=2); }
.card[class*=" st-"] .rim { display: block; animation: none; }
.card[class*=" st-"] .rim::before, .card[class*=" st-"] .rim::after { content: none; }
.card[class*=" st-"].lv2::before, .card[class*=" st-"].lv3::before, .card[class*=" st-"] .lvfx { display: none; }
.kfx { position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit; }
/* stars used by shiny and prism: a four-point glint */
.kfx b { position: absolute; left: var(--x); top: var(--y); width: 12cqw; aspect-ratio: 1; translate: -50% -50%; opacity: 0;
  background: linear-gradient(90deg, transparent, #fff 50%, transparent) center / 100% 12% no-repeat,
    linear-gradient(0deg, transparent, #fff 50%, transparent) center / 12% 100% no-repeat,
    radial-gradient(closest-side, #fff, rgba(255, 255, 255, .5) 45%, transparent) center / 42% 42% no-repeat;
  animation: kstar 2.8s var(--d) ease-in-out infinite; }
@keyframes kstar { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); } 40% { opacity: 1; transform: scale(1) rotate(45deg); }
  62% { opacity: 0; transform: scale(.3) rotate(90deg); } }

/* Foil: holographic stripes slide along the border and follow the pointer while the card tilts */
.kfx-foil { padding: 3.8%; mix-blend-mode: color-dodge; opacity: .85;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0 .35cqw, transparent .7cqw) 0 0 / 6cqw 7cqw,
    repeating-linear-gradient(115deg, #ff5fc8 0%, #59c8ff 5%, #7dffb5 10%, #ffe45c 15%, #ff5fc8 20%) 0 0 / 300% 300% no-repeat;
  animation: foilrun 4.5s ease-in-out infinite alternate; }
@keyframes foilrun { from { background-position: 0 0, 0% 0%; } to { background-position: 0 0, 100% 100%; } }
.card.tilting .kfx-foil { animation: none; opacity: 1; background-position: 0 0, var(--mx, 50%) var(--my, 50%); }

/* Shiny: a golden light runs around the border and stars pop on it */
.kfx-shiny::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 3.8%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  background: conic-gradient(from var(--orbit), transparent 0 68%, rgba(255, 220, 120, .35) 77%, #fffbe6 85%, rgba(255, 220, 120, .35) 92%, transparent);
  animation: orbit 2.6s linear infinite; }
.kfx-shiny b { filter: drop-shadow(0 0 1.2cqw #ffd23d) drop-shadow(0 0 2.4cqw rgba(255, 200, 60, .8)); }

/* Prism: a rainbow of refracted light circles the crystal frame, the crystals flash */
.kfx-prism::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 4.2%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  background: conic-gradient(from var(--orbit), transparent 0 52%, #ff5f6d 60%, #ffc371 66%, #fff35c 71%, #5cff9d 76%,
    #5cc8ff 81%, #b45cff 87%, transparent 95%);
  animation: orbit 3.4s linear infinite; }
.kfx-prism b { filter: drop-shadow(1px 0 0 #ff6fd8) drop-shadow(-1px 0 0 #6fd3ff) drop-shadow(0 0 1.6cqw rgba(255, 255, 255, .9)); }

/* Shadow: violet wisps rise along the thorny frame, the crest's eye glows */
.kfx-shadow i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: calc(var(--s) * 1.7); translate: -50% -50%; opacity: 0;
  border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%; filter: blur(.7cqw); mix-blend-mode: screen;
  background: radial-gradient(50% 60% at 50% 72%, rgba(214, 160, 255, .95), rgba(120, 40, 220, .6) 45%, transparent 72%);
  animation: wisp var(--t) var(--d) ease-in infinite; }
@keyframes wisp { 0% { opacity: 0; transform: translateY(0) scale(.5); } 25% { opacity: .95; }
  100% { opacity: 0; transform: translateY(-16cqw) scale(1.25) rotate(var(--r, 8deg)); } }
.card.st-shadow .rim::before { content: ""; position: absolute; left: 50%; top: 2.2%; width: 18%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(240, 210, 255, .95), rgba(155, 77, 255, .55) 45%, transparent);
  mix-blend-mode: screen; animation: eyepulse 2.8s ease-in-out infinite; }
@keyframes eyepulse { 0%, 100% { opacity: .35; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } 53% { opacity: .15; } 56% { opacity: 1; } }

/* Glitch: the frame jumps and splits into RGB, torn bars and dead pixels flicker on the border */
.card.st-glitch .rim { animation: rimglitch 2.4s steps(1) infinite; }
@keyframes rimglitch { 0%, 100% { translate: 0 0; filter: none; }
  28% { translate: 2px 0; filter: drop-shadow(2px 0 0 #ff00c8) drop-shadow(-2px 0 0 #00e5ff); } 31% { translate: 0 0; filter: none; }
  58% { translate: -2px 1px; filter: hue-rotate(110deg); } 60% { translate: 0 0; filter: none; }
  86% { translate: 1px -1px; filter: drop-shadow(-3px 0 0 #ff00c8) drop-shadow(3px 0 0 #00e5ff); } 89% { translate: 0 0; filter: none; } }
.kfx-glitch::before { content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 0, 200, .95), rgba(0, 229, 255, .95)) 0 22% / 14% 1.6% no-repeat,
    linear-gradient(90deg, #00ff9c, #ffffff) 100% 64% / 11% 1.2% no-repeat,
    linear-gradient(90deg, rgba(0, 229, 255, .95), #00ff9c) 38% 0 / 20% 1.3% no-repeat;
  animation: tears 1.9s steps(1) infinite; }
@keyframes tears { 0% { opacity: 0; } 12% { opacity: 1; background-position: -2% 22%, 102% 64%, 38% 0; } 16% { opacity: 0; }
  44% { opacity: 1; background-position: 3% 71%, 97% 18%, 70% 100%; } 47% { opacity: 0; }
  73% { opacity: 1; background-position: 0 46%, 104% 88%, 18% 0; } 77% { opacity: 0; } }
.kfx-glitch::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(#00ff9c, #00ff9c) 1.2% 35% / 2.4% 1.6% no-repeat, linear-gradient(#ff00c8, #ff00c8) 98.6% 52% / 2.4% 1.6% no-repeat,
    linear-gradient(#00e5ff, #00e5ff) 70% .6% / 3% 1.1% no-repeat, linear-gradient(#fff, #fff) 22% 99.4% / 2.2% 1.1% no-repeat;
  animation: deadpx 1.3s steps(1) infinite; }
@keyframes deadpx { 0%, 100% { opacity: 1; } 30% { opacity: 0; } 45% { opacity: 1; } 70% { opacity: .2; } 80% { opacity: 1; } }

/* Retro: the handheld's power LED blinks and the screen refreshes line by line */
.card.st-retro .rim::before { content: ""; position: absolute; left: 1.7%; top: 40.5%; width: 7%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 120, 120, .95), rgba(255, 30, 60, .55) 45%, transparent);
  animation: led 2.6s steps(1) infinite; }
@keyframes led { 0%, 100% { opacity: 1; } 46% { opacity: .15; } 50% { opacity: 1; } 54% { opacity: .15; } 58% { opacity: 1; } }
.retrofx::after { content: ""; position: absolute; left: 0; right: 0; top: -12%; height: 12%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--gb0, #0f380f) 18%, transparent), transparent); animation: gbscan 3.4s steps(18) infinite; }
@keyframes gbscan { to { top: 100%; } }
.style-tag.prism { color: #1b1030; background: linear-gradient(90deg, #ff9aa5, #ffe08a, #a6ffc9, #9fe0ff, #d6a6ff); }
.prism-text { background: linear-gradient(90deg, #ff8a95, #ffd36b, #8affb5, #7fd3ff, #c58bff); -webkit-background-clip: text; background-clip: text;
  color: transparent !important; }
.stylepop.prism { color: #1b1030; background: linear-gradient(90deg, #ff9aa5, #ffe08a, #a6ffc9, #9fe0ff, #d6a6ff); }

/* ------------------------------------------------------------------ card menu: tabs and action list */
.mtabs { margin: 14px 0 0; }
.mtabs .chip svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; vertical-align: -2px; stroke-linecap: round; stroke-linejoin: round; }
.acts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.act { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  color: var(--text); font: inherit; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); text-decoration: none;
  transition: background .15s, border-color .15s, transform .15s; }
.act:hover:not(.off):not([disabled]) { background: rgba(63, 224, 208, .08); border-color: var(--cyan); transform: translateX(2px); }
.act svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; color: var(--cyan); }
.act b { display: block; font-weight: 800; font-size: 14px; line-height: 1.25; }
.act small { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
.act.primary { background: linear-gradient(180deg, rgba(63, 208, 138, .2), rgba(63, 208, 138, .06)); border-color: #2f9e6a; }
.act.primary svg { color: var(--good); }
.act.on { border-color: rgba(63, 224, 208, .55); }
.act.off, .act[disabled] { opacity: .5; cursor: not-allowed; }
.people .ppl-list { margin-top: 8px; }
.fz-sec { margin-top: 14px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.fz-sec .label { margin-bottom: 8px; }
.fz-grid { max-height: 230px; overflow: auto; margin-top: 8px; }
.fz-grid .dex.picked { outline: 2px solid var(--cyan); box-shadow: 0 0 12px rgba(63, 224, 208, .6); }
.fz-prev { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; margin-top: 12px; }
.fz-prev > .card { width: 100%; }
.fz-prev .warn { margin: 4px 0; }
.rec-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.rec-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.rec-row.on { border-color: var(--cyan); background: rgba(63, 224, 208, .08); }
.rec-row.off { opacity: .5; cursor: not-allowed; }
.rec-row input { width: 18px; height: 18px; accent-color: var(--cyan); flex: none; }
.rec-row img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.rec-row b { display: block; font-size: 13px; } .rec-row small { display: block; font-size: 11.5px; color: var(--muted); }
.boost-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 111, 216, .18), rgba(111, 211, 255, .18), rgba(255, 230, 111, .18)); border: 1px solid #8a6bd1; }

/* ------------------------------------------------------------------ Lab: tap a creature to load a tube */
.tube.target .glass { box-shadow: inset 0 0 0 2px var(--cyan), 0 0 0 3px rgba(63, 224, 208, .22), 0 0 30px rgba(63, 224, 208, .55); }
.tube.target .tplate { border-color: rgba(63, 224, 208, .7); }
.tube.target .tube-label { color: var(--cyan); text-shadow: 0 0 8px rgba(63, 224, 208, .8); }
.tube.target.empty .tube-plus { color: var(--cyan); text-shadow: 0 0 12px rgba(63, 224, 208, .9); }
.lab-pick > .card { cursor: pointer; }
.lab-pick > .card.in-tube { outline: 2px solid var(--cyan); outline-offset: 2px; box-shadow: 0 0 16px rgba(63, 224, 208, .55); }
.fly-ghost { position: fixed; z-index: 96; pointer-events: none; object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(63, 224, 208, .9)); transition: transform .55s cubic-bezier(.5, -0.2, .4, 1), opacity .55s; }
@media (max-width: 420px) { #tabs a { font-size: 9.5px; } #tabs a svg { width: 21px; height: 21px; } }

/* Lab: kinds of parents */
.lab-pick > .card.other-kind, .fz-grid .dex.other-kind { opacity: .45; filter: saturate(.6); }
.lab-pick > .card.other-kind:hover, .fz-grid .dex.other-kind:hover { opacity: .8; }
.fz-grid .dex.kind-shiny { box-shadow: inset 0 0 0 1px #ffe27a; }
.fz-grid .dex.kind-shadow { box-shadow: inset 0 0 0 1px #9b4dff; }
.fz-grid .dex.kind-retro { box-shadow: inset 0 0 0 1px #8bac0f; }
.fz-grid .dex.kind-prism { box-shadow: inset 0 0 0 1px #ff9aa5, 0 0 6px rgba(160, 220, 255, .6); }
.fz-grid .dex.kind-glitch { box-shadow: inset 0 0 0 1px #00ff9c; }

/* ------------------------------------------------------------------ card zoom */
#modal .detail > .card, #modal .fz-prev > .card, #modal .mini-row > .card, .lab-result .detail > .card,
#modal .flipper.flipped .flip-front .card, #stage .flipper.flipped .flip-front .card, .dex-entry > .card { cursor: zoom-in; }
#zoom { position: fixed; inset: 0; z-index: 120; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 16px; }
.zoom-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(30, 40, 90, .8), rgba(3, 5, 14, .94) 70%);
  backdrop-filter: blur(6px); animation: fadein .2s; cursor: zoom-out; }
.zoom-wrap { position: relative; width: min(92vw, calc((100vh - 120px) / 1.48), 520px); animation: zoomin .4s cubic-bezier(.2, 1.3, .4, 1); }
.zoom-wrap > .card { width: 100%; box-shadow: 0 30px 70px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .15); }
@keyframes zoomin { from { transform: scale(.55) translateY(30px); opacity: 0; } }
.zoom-bar { position: relative; display: flex; gap: 10px; animation: fadein .3s .15s backwards; }
#zoom .ct, #zoom .plate, #zoom .art-tag, #zoom .art img { transition: opacity .3s, top .35s, height .35s, left .35s, width .35s; }
#zoom.art-only .ct, #zoom.art-only .plate, #zoom.art-only .art-tag { opacity: 0; }
#zoom.art-only .art img { top: 6%; height: 84%; left: 3%; width: 94%; }
#zoom.art-only .art::before { opacity: .35; }
.sort-select { width: auto; padding: 6px 30px 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 800; color: var(--text);
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%233fe0d0' stroke-width='2.5'/%3E%3C/svg%3E") no-repeat right 9px center / 14px;
  -webkit-appearance: none; appearance: none; cursor: pointer; box-shadow: none; }
.retro-glitch-text { color: #9bbc0f !important; font-family: var(--lcd); text-shadow: 1px 0 #ff00c8, -1px 0 #00e5ff; }

/* Odds under every booster */
.pack-col { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.odds-btn { font: 800 12px Nunito, sans-serif; color: var(--cyan); background: rgba(63, 224, 208, .08); border: 1px solid rgba(63, 224, 208, .45);
  border-radius: 99px; padding: 5px 12px; cursor: pointer; }
.odds-btn:hover { background: rgba(63, 224, 208, .18); }
.odds-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.odds-split > div { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; text-align: center; }
.odds-split b { display: block; font: 400 18px var(--lcd); color: var(--cyan); }
.odds-split span { font-size: 12px; color: var(--muted); }
.odds-kinds td:first-child { font-weight: 800; }

/* Fusion Lab tabs and the Invert tab */
.lab-tabs { margin: 10px 0 4px; }
.lab-tabs .chip svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.2; vertical-align: -2px; stroke-linecap: round; stroke-linejoin: round; }
.inv-panel { margin-bottom: 6px; }
.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; max-width: 440px; margin: 6px auto 4px; }
.inv-row .card { width: 100%; }
.inv-arrow { font-size: 30px; color: var(--cyan); text-shadow: 0 0 12px rgba(63, 224, 208, .9); animation: invspin 2.4s ease-in-out infinite; }
@keyframes invspin { 50% { transform: rotateY(180deg); } }
.inv-info { max-width: 520px; margin: 10px auto 0; }
.inv-info h2 { margin: 0 0 4px; }

/* Undiscovered fusion: its black silhouette behind the "?" */
.card.mystery .art img.silhouette { filter: drop-shadow(0 0 1.4cqw rgba(170, 120, 255, .75)) drop-shadow(0 0 4cqw rgba(90, 200, 255, .35));
  opacity: .92; animation: silpulse 3s ease-in-out infinite; }
@keyframes silpulse { 50% { filter: drop-shadow(0 0 2.4cqw rgba(170, 120, 255, .95)) drop-shadow(0 0 6cqw rgba(90, 200, 255, .5)); } }
.card.mystery .mystery-q { z-index: 3; font-size: 38cqw; top: 18%; text-shadow: 0 0 4cqw rgba(120, 220, 255, .95), 0 0 10cqw rgba(190, 120, 255, .8), 0 .8cqw 0 rgba(0, 0, 0, .6); }

/* ------------------------------------------------------------------ desktop shell: sidebar + top bar */
/* On a computer: a sidebar with your profile, the next income window and every page in groups
   (Play / Discover / Account), and a slim top bar with the page title and your coins. Phones keep
   the red Infinidex header and the bottom tab bar. */
#side, #page-title { display: none; }
@media (min-width: 900px) {
  :root { --side-w: 252px; --nav-h: 0px; }
  body { padding-bottom: 24px; padding-left: var(--side-w); }
  #tabs { display: none !important; }
  #side { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: var(--side-w); display: flex; flex-direction: column; gap: 2px;
    padding: 14px 12px; overflow-y: auto;
    background: linear-gradient(180deg, rgba(18, 25, 50, .97), rgba(9, 13, 28, .98)); border-right: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 8px 0 30px rgba(0, 0, 0, .35); }
  #side[hidden] { display: none !important; }
  #side > a, .side-foot button { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: #b8c3e6;
    font-weight: 700; font-size: 14px; transition: background .15s, color .15s; }
  #side > a svg, .side-foot svg, .sd-ico svg { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9;
    stroke-linecap: round; stroke-linejoin: round; }
  #side > a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
  #side > a.on { background: linear-gradient(90deg, rgba(255, 79, 163, .24), rgba(255, 79, 163, .05)); color: #fff; box-shadow: inset 3px 0 0 var(--red-l); }
  #side > a.on svg { stroke: var(--red-l); }
  #side > a.side-brand { padding: 4px 8px 14px; gap: 11px; background: none; box-shadow: none; }
  .side-brand b { display: block; font: 700 19px/1.05 Fredoka, sans-serif; color: #fff; }
  .side-brand small { font: 400 9px var(--lcd); letter-spacing: 1.6px; color: #c9b8ff; }
  .side-lens { width: 44px; height: 24px; flex: none; display: grid; place-items: center; }
  .side-lens svg.inf { width: 44px; height: 22px; filter: drop-shadow(0 0 8px rgba(255, 79, 163, .55)); }
  #side > a.side-me { margin: 2px 0 6px; padding: 10px 12px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); box-shadow: none; }
  #side > a.side-me.on { border-color: rgba(255, 95, 114, .5); }
  .side-me .avatar { width: 38px; height: 38px; font-size: 17px; }
  .side-me b, .side-drop b { display: block; color: #fff; font-size: 14px; line-height: 1.2; }
  .side-me small, .side-drop small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 700; }
  #side > a.side-drop { margin-bottom: 6px; padding: 10px 12px; border: 1px solid rgba(255, 203, 61, .26);
    background: linear-gradient(135deg, rgba(255, 203, 61, .1), rgba(255, 203, 61, .02)); }
  .sd-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(255, 203, 61, .14); color: var(--accent); }
  #side > a.side-drop.ready { border-color: var(--accent); animation: glowb 2s infinite; }
  .side-drop.ready small { color: var(--accent); }
  .side-h { margin: 12px 12px 4px; font: 400 9.5px var(--lcd); letter-spacing: 2px; color: #6f7ba6; text-transform: uppercase; }
  .sbadge { font-style: normal; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center;
    font: 800 11px Nunito, sans-serif; background: var(--accent); color: #2b1a00; }
  .sbadge.cyan { background: rgba(63, 224, 208, .14); color: var(--cyan); border: 1px solid rgba(63, 224, 208, .4); }
  .sbadge.soon { background: rgba(255, 255, 255, .07); color: #8e9acb; border: 1px solid rgba(255, 255, 255, .12); font-size: 10px; }
  .side-sep { width: calc(100% - 24px); margin: 10px 12px 4px; border: 0; border-top: 1px solid rgba(255, 255, 255, .09); }
  .side-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255, 255, 255, .07); }
  .side-foot button { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 13px; }
  .side-foot button:hover { background: rgba(255, 255, 255, .05); color: #fff; }
  #top { margin-left: 0; height: 60px; padding: 0 36px; background: rgba(8, 12, 26, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .07); box-shadow: none; }
  #top::after, #top .lens, #top .leds, #top .logo { display: none; }
  #page-title { display: block; margin: 0; font: 700 21px Fredoka, sans-serif; color: #fff; }
  main { max-width: 1280px; margin: 0 auto; padding: 24px 36px 30px; }
  #toast { left: calc(50% + var(--side-w) / 2); bottom: 26px; }
  .composer-bar { bottom: 10px; }
}
@media (min-width: 1200px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ home dashboard */
.home { display: flex; flex-direction: column; gap: 14px; }
.home-hello h1 { margin: 4px 0 2px; font-size: 28px; color: #fff; }
.home-hello p { margin: 0; }
.home-top { display: grid; grid-template-columns: 1fr; gap: 14px; }
.hcard { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 18px; color: inherit; overflow: hidden;
  background: linear-gradient(160deg, rgba(30, 41, 78, .92), rgba(14, 21, 42, .96)); border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.hcard h2 { margin: 2px 0 4px; font-size: 22px; color: #fff; }
.hcard p { margin: 0; }
.hcard .label { margin-bottom: 0; }
.hc-ico { width: 54px; height: 54px; flex: none; border-radius: 15px; display: grid; place-items: center; color: var(--accent);
  background: rgba(255, 203, 61, .12); border: 1px solid rgba(255, 203, 61, .3); }
.hc-ico svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.hcard.ready { border-color: rgba(255, 203, 61, .55); box-shadow: 0 0 26px rgba(255, 203, 61, .14), 0 10px 30px rgba(0, 0, 0, .3); }
.hc-packs.ready { border-color: rgba(63, 224, 160, .5); box-shadow: 0 0 26px rgba(63, 224, 160, .12), 0 10px 30px rgba(0, 0, 0, .3); }
.hc-pack { width: 62px; flex: none; transform: rotate(-7deg); transition: transform .3s; }
.hc-pack .pack3, .wt-pack .pack3 { pointer-events: none; }
.hc-packs:hover .hc-pack { transform: rotate(-2deg) translateY(-4px); }
.chev { font-size: 26px; line-height: 1; color: var(--muted); }
.hbanner { position: relative; display: flex; align-items: center; gap: 18px; padding: 24px 26px; border-radius: 20px; overflow: hidden; color: #fff;
  background: linear-gradient(90deg, rgba(3, 26, 36, .94) 0%, rgba(3, 26, 36, .74) 45%, rgba(3, 26, 36, .12)), url(/art/hero.webp?v=1) center 45% / cover no-repeat, #062530;
  border: 1px solid rgba(63, 224, 208, .35); box-shadow: 0 0 34px rgba(63, 224, 208, .1), 0 12px 30px rgba(0, 0, 0, .35); transition: transform .2s; }
.hbanner:hover { transform: translateY(-2px); }
.hbanner h2 { margin: 2px 0 4px; font-size: 24px; }
.hbanner p { margin: 0 0 12px; color: #bde9e3; font-size: 14px; }
.hb-bar { height: 8px; max-width: 460px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.hb-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--cyan), #9fe3ff, #ff9fe0); box-shadow: 0 0 10px var(--cyan); }
.hbanner .btn { flex: none; }
.sec-h { display: flex; align-items: center; gap: 10px; margin: 8px 0 -4px; font: 400 11px var(--lcd); letter-spacing: 2px; color: #9fb0e0; text-transform: uppercase; }
.sec-h a { margin-left: auto; font: 800 13px Nunito, sans-serif; letter-spacing: 0; text-transform: none; color: #fff; }
.sec-h a:hover { color: var(--accent); }
.wait-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.wait { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; color: inherit; text-align: left; cursor: pointer; font: inherit;
  background: rgba(22, 31, 60, .88); border: 1px solid rgba(255, 255, 255, .08); transition: transform .15s, border-color .15s; min-width: 0; }
.wait:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .22); }
.wait > .grow { min-width: 0; }
.wait b { display: block; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wait small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wait .chev { font-size: 22px; }
.wait.gold { border-color: rgba(255, 203, 61, .42); } .wait.green { border-color: rgba(63, 224, 160, .42); }
.wait.pink { border-color: rgba(255, 122, 217, .38); } .wait.cyan { border-color: rgba(63, 224, 208, .38); }
.wt-ico, .wt-thumb { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.wt-ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.wt-ico.gold { color: var(--accent); background: rgba(255, 203, 61, .12); } .wt-ico.cyan { color: var(--cyan); background: rgba(63, 224, 208, .12); }
.wt-ico.pink { color: #ff7ad9; background: rgba(255, 122, 217, .12); }
.wt-thumb img { width: 44px; height: 44px; object-fit: contain; }
.wt-pack { width: 32px; flex: none; margin: 0 7px; transform: rotate(-6deg); }
.home-cols { display: grid; grid-template-columns: 1fr; gap: 14px 24px; align-items: start; }
.hcol { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.coll-stats, .feed-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.coll-stats > div, .feed-stats > div { padding: 14px 16px; border-radius: 16px; background: rgba(22, 31, 60, .88); border: 1px solid rgba(255, 255, 255, .08); }
.coll-stats b, .feed-stats b { display: block; font: 700 26px/1.1 Fredoka, sans-serif; color: #fff; }
.coll-stats b small, .feed-stats b small { font-size: 14px; color: var(--muted); }
.coll-stats span, .feed-stats span { font-size: 12px; color: var(--muted); font-weight: 700; }
.coll-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cchip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 800; color: #dfe6ff;
  background: rgba(22, 31, 60, .88); border: 1px solid rgba(255, 255, 255, .1); }
.cchip b { color: var(--muted); font-size: 12px; }
.cchip i { width: 9px; height: 9px; border-radius: 50%; background: #a4adbd; }
.cchip.lv2 i { background: #d6e0f2; box-shadow: 0 0 5px #d6e0f2; } .cchip.lv3 i { background: #ffcb3d; box-shadow: 0 0 6px #ffcb3d; }
.cchip.foil i { background: conic-gradient(#ffffff, #c9d3e6, #ffffff, #aab6cf, #ffffff); } .cchip.shiny i { background: #ffd23d; box-shadow: 0 0 6px #ffd23d; }
.cchip.st-glitch i { background: #00ff9c; box-shadow: 2px 0 #ff00c8; } .cchip.st-shadow i { background: #9b4dff; box-shadow: 0 0 6px #9b4dff; }
.cchip.st-prism i { background: conic-gradient(#ff5f6d, #ffc371, #fff35c, #5cff9d, #5cc8ff, #b45cff, #ff5f6d); }
.cchip.st-retro i { background: #8bac0f; } .cchip.st-retro-glitch i { background: linear-gradient(90deg, #9bbc0f, #ff00c8); }
.home-links { margin-top: 6px; }

/* activity rows (discoveries, Lab) and opened packs */
.act-list, .act-packs, .feed-list { display: flex; flex-direction: column; gap: 9px; }
.act-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; color: inherit; text-align: left; font: inherit;
  cursor: pointer; background: rgba(22, 31, 60, .84); border: 1px solid rgba(255, 255, 255, .07); transition: border-color .15s, transform .15s; }
.act-row:hover { border-color: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.act-row > .grow { min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 14px; color: #dfe6ff; }
.act-row > .grow b { color: #fff; }
.act-sub { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-sub b { color: #dfe6ff; }
.act-thumb { width: 54px; height: 54px; flex: none; border-radius: 13px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 62%, rgba(255, 255, 255, .12), rgba(0, 0, 0, .2)); border: 1px solid rgba(255, 255, 255, .08); }
.act-thumb.disc { background: radial-gradient(circle at 50% 62%, rgba(159, 227, 255, .28), rgba(90, 40, 150, .25)); border-color: rgba(159, 227, 255, .35); }
.act-thumb.lab { background: radial-gradient(circle at 50% 62%, rgba(63, 224, 208, .28), rgba(0, 0, 0, .2)); border-color: rgba(63, 224, 208, .35); }
.act-thumb img { width: 50px; height: 50px; object-fit: contain; }
.tag.disc { background: linear-gradient(90deg, #ff9fe0, #9fe3ff); color: #1b1030; flex: none; }
.act-pack { padding: 14px; border-radius: 18px; background: rgba(22, 31, 60, .88); border: 1px solid rgba(255, 255, 255, .08); }
.act-pack.k-premium { border-color: rgba(255, 203, 61, .3); background: linear-gradient(160deg, rgba(70, 50, 12, .5), rgba(22, 31, 60, .9) 55%); }
.act-pack.k-free { background: linear-gradient(160deg, rgba(14, 70, 56, .45), rgba(22, 31, 60, .9) 55%); }
.act-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.act-head > .grow { min-width: 0; }
.avatar.sm { width: 34px; height: 34px; font-size: 15px; }
.act-user { display: block; color: #fff; font-weight: 800; }
.pk-chip { flex: none; font: 400 9px var(--lcd); letter-spacing: 1px; text-transform: uppercase; padding: 4px 9px; border-radius: 99px; border: 1px solid; }
.pk-chip.free { color: #4fe0a8; border-color: rgba(79, 224, 168, .4); } .pk-chip.standard { color: #8ab8ff; border-color: rgba(138, 184, 255, .4); }
.pk-chip.premium { color: var(--accent); border-color: rgba(255, 203, 61, .5); }
.act-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.page-head h1 { margin: 0 0 2px; } .page-head p { margin: 0 0 14px; }
.feed-stats { grid-template-columns: repeat(2, 1fr); margin-bottom: 14px; }
.feed-list { max-width: 900px; }
@media (min-width: 900px) {
  .home-top { grid-template-columns: 1fr 1fr; }
  .wait-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .feed-stats { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1300px) { .wait-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .hbanner { flex-direction: column; align-items: flex-start; padding: 20px; }
  .hcard { flex-wrap: wrap; padding: 16px; } .hc-income .btn { width: 100%; }
  .home-hello h1 { font-size: 24px; }
  .act-cards { gap: 5px; }
  .coll-stats b { font-size: 22px; }
}

/* mini cards in the feeds */
.mini { --mc: #a4adbd; position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer;
  font: inherit; border: 2px solid var(--mc); background: #0c1428; box-shadow: 0 4px 10px rgba(0, 0, 0, .45); transition: transform .15s, box-shadow .15s; }
.mini:hover { transform: translateY(-3px) scale(1.05); z-index: 1; }
.mini-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .9; }
.mini img { position: absolute; left: 4%; top: 8%; width: 92%; height: 66%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.mini-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 4px 3px; font-size: 10px; font-weight: 800; color: #fff; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .88) 55%); }
.mini-lv { position: absolute; top: 2px; right: 3px; font-size: 9px; line-height: 1; color: var(--accent); text-shadow: 0 1px 2px #000; }
.mini.r-uncommon { --mc: #3fc985; } .mini.r-rare { --mc: #4a92ff; } .mini.r-epic { --mc: #b06bff; } .mini.r-legendary { --mc: #ffb627; }
.mini.f-prototype { --mc: #8a94a6; } .mini.f-stable { --mc: #1fb5a3; } .mini.f-advanced { --mc: #e0559f; } .mini.f-elite { --mc: #ff7a1a; } .mini.f-apex { --mc: #ffd23d; }
.mini.foil::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; background-size: 250% 100%;
  background-image: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .55) 48%, rgba(255, 255, 255, .12) 54%, transparent 68%);
  animation: minifoil 4s linear infinite; }
/* Prism mini: rainbow border and a rainbow glow around the real-colour creature */
.mini.st-prism { border-color: transparent;
  background: linear-gradient(#0c1428, #0c1428) padding-box, linear-gradient(135deg, #ff8a95, #ffd08a, #fff6a0, #9dffc4, #9fdcff, #d2a8ff) border-box; }
.mini.st-prism img { filter: drop-shadow(2px 0 2px rgba(255, 95, 200, .95)) drop-shadow(-2px 0 2px rgba(92, 200, 255, .95)) drop-shadow(0 -2px 2px rgba(255, 243, 92, .9)); }
@keyframes minifoil { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.mini.shiny { box-shadow: 0 0 12px rgba(255, 210, 61, .65), 0 4px 10px rgba(0, 0, 0, .45); }
.mini.st-shadow .mini-bg { filter: brightness(.3) saturate(.3); } .mini.st-shadow { box-shadow: 0 0 12px rgba(155, 77, 255, .6); }
.mini.st-glitch { box-shadow: 2px 0 0 #ff00c8, -2px 0 0 #00e5ff, 0 4px 10px rgba(0, 0, 0, .45); }
.mini.best { box-shadow: 0 0 0 2px #fff, 0 0 18px var(--mc); }
.mini.best::before { content: "★"; position: absolute; z-index: 2; top: 1px; left: 3px; font-size: 11px; color: #fff; text-shadow: 0 0 6px var(--mc), 0 1px 2px #000; }
.mini.back { cursor: default; border-color: #c9a6ff; background: url(/art/card-back.webp?v=2) center / cover, #b07cff; }
.mini.back:hover { transform: none; }

/* ------------------------------------------------------------------ pack opening: per pack */
#stage.k-free { --pk2: #34e3ae; --pkg: rgba(70, 255, 190, .42); background: radial-gradient(circle at 50% 42%, #10564a, #040c0f 75%); }
#stage.k-standard { --pk2: #7fb0ff; --pkg: rgba(110, 170, 255, .45); background: radial-gradient(circle at 50% 42%, #24316a, #070b18 75%); }
#stage.k-premium { --pk2: #ffd76a; --pkg: rgba(255, 200, 80, .5); background: radial-gradient(circle at 50% 42%, #503910, #0c0804 75%); }
#stage .rays { background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--pk2, #fff) 13%, transparent) 0 8deg, transparent 8deg 16deg); }
.st-glow { position: fixed; left: 50%; top: 44%; width: 80vmin; height: 80vmin; margin: -40vmin 0 0 -40vmin; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--pkg, rgba(255, 255, 255, .2)), transparent 64%); animation: stglow 3s ease-in-out infinite; }
@keyframes stglow { 50% { transform: scale(1.12); opacity: .7; } }
.st-top { position: relative; }
#stage .st-top h2 { margin: 0 0 10px; color: var(--pk2, var(--cyan)); text-shadow: 0 0 14px var(--pkg, rgba(63, 224, 208, .6)); }
.st-snd { position: fixed; z-index: 4; top: 14px; right: 14px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .22); }
.st-snd svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tear-aura { position: absolute; inset: -16%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--pkg, rgba(255, 255, 255, .3)), transparent 62%); animation: stglow 2.2s ease-in-out infinite; }
.tear-orbit { position: absolute; z-index: -1; inset: 4% -20%; border-radius: 50%; pointer-events: none; border: 2px dashed rgba(255, 222, 130, .75);
  filter: drop-shadow(0 0 6px rgba(255, 200, 80, .9)); animation: tearorbit 5s linear infinite; }
.tear-orbit.o2 { inset: 18% -32%; animation-duration: 8s; animation-direction: reverse; opacity: .55; }
/* (not "orbit": that name animates the --orbit angle of the light running around card borders) */
@keyframes tearorbit { from { transform: rotateX(70deg) rotate(0deg); } to { transform: rotateX(70deg) rotate(360deg); } }
.pk-beam { position: absolute; z-index: 0; left: 50%; top: 10.5%; width: 64%; height: 0; transform: translate(-50%, -100%); pointer-events: none; opacity: 0;
  border-radius: 50% 50% 0 0; background: linear-gradient(0deg, #fff, var(--pk2, #fff) 30%, transparent); }
.ripping .pk-beam { animation: beam 1s ease-out forwards; }
@keyframes beam { 0% { height: 0; opacity: 0; } 25% { height: 70vh; opacity: .95; } 100% { height: 90vh; width: 130%; opacity: 0; } }
.ripping .tear-aura, .ripping .tear-orbit { animation: none; opacity: 0; transition: opacity .3s; }
#stage.shake { animation: stshake .5s; }
@keyframes stshake { 10%, 50%, 90% { transform: translate(-6px, 3px); } 30%, 70% { transform: translate(6px, -3px); } }
/* the cards fly out of the opened pack, fanned */
#stage .flipper { position: relative; animation: dealfan .65s cubic-bezier(.2, .9, .3, 1.15) backwards; animation-delay: calc(var(--i) * 110ms + .3s); }
@keyframes dealfan { from { transform: translateY(24vh) scale(.2) rotate(var(--rot, 0deg)); opacity: 0; } 50% { opacity: 1; } }
#stage .flip-back .card { box-shadow: 0 0 0 2px color-mix(in srgb, var(--pk2, #fff) 55%, transparent), 0 10px 22px rgba(0, 0, 0, .55); }
#stage .flipper.guar .flip-back .card { box-shadow: 0 0 0 2px #ffcb3d, 0 0 22px rgba(255, 203, 61, .6); }
#stage .flipper.guar .flip-back::after { content: "RARE+"; position: absolute; z-index: 3; top: -9px; left: 50%; transform: translateX(-50%); pointer-events: none;
  font: 400 10px var(--lcd); letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; color: #2b1a00;
  background: linear-gradient(90deg, #ffe9a6, #ffcb3d); box-shadow: 0 0 12px rgba(255, 203, 61, .8); }
/* charging up before the flip: colour = what the card is, strength = how rare */
#stage .flipper.charging .flip-back { animation: none; }
.flipper.charging .flip-back .card { box-shadow: 0 0 0 2px var(--ant), 0 0 18px var(--ant), 0 0 42px var(--ant) !important; }
.flipper.ch1 .flip-back .card { animation: chg1 .45s ease-in-out infinite; }
.flipper.ch2 .flip-back .card { animation: chg .1s linear infinite; }
.flipper.ch3 .flip-back .card { animation: chg3 .07s linear infinite; }
.flipper.charging::before { content: ""; position: absolute; z-index: -1; inset: -30%; border-radius: 50%; pointer-events: none; opacity: .5;
  background: radial-gradient(circle, var(--ant), transparent 62%); animation: chgglow .5s ease-in-out infinite alternate; }
.flipper.ch3::after { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; margin: -130% 0 0 -130%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--ant) 45%, transparent) 0 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 10%, transparent 60%); mask: radial-gradient(circle, #000 10%, transparent 60%); animation: spin 2s linear infinite; }
.flipper.ch-prism .flip-back .card { box-shadow: 0 0 0 2px #ff5f6d, 0 0 24px #5cc8ff, 0 0 46px #fff35c !important; animation: chg3 .07s linear infinite, chghue .6s linear infinite; }
@keyframes chg1 { 50% { transform: scale(1.035); } }
@keyframes chg { 25% { transform: translate(-1.5px, 1px) rotate(-.7deg); } 75% { transform: translate(1.5px, -1px) rotate(.7deg); } }
@keyframes chg3 { 25% { transform: translate(-3px, 2px) rotate(-1.5deg) scale(1.04); } 75% { transform: translate(3px, -2px) rotate(1.5deg) scale(1.06); } }
@keyframes chgglow { to { transform: scale(1.22); opacity: .9; } }
@keyframes chghue { to { filter: hue-rotate(360deg); } }

/* ------------------------------------------------------------------ big pulls: the spotlight */
#spot { --sc: #fff; position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; overflow: hidden; cursor: pointer; animation: fadein .25s;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--sc) 26%, #050814), #03050c 70%); }
#spot.out { animation: spout .26s forwards; }
@keyframes spout { to { opacity: 0; transform: scale(1.04); } }
#spot.shake .sp-inner { animation: spshake .5s .4s; }
@keyframes spshake { 10%, 50%, 90% { transform: translate(-8px, 4px); } 30%, 70% { transform: translate(8px, -4px); } }
.sp-scene { position: absolute; inset: -4%; background-size: cover; background-position: center; opacity: .3; animation: spzoom 6s ease-out forwards;
  -webkit-mask: radial-gradient(circle at 50% 45%, #000 18%, transparent 72%); mask: radial-gradient(circle at 50% 45%, #000 18%, transparent 72%); }
@keyframes spzoom { from { transform: scale(1.14); } }
.sp-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sp-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; max-width: 94vw; text-align: center; }
.sp-kicker { font: 400 12px var(--lcd); letter-spacing: 4px; text-transform: uppercase; color: var(--sc); text-shadow: 0 0 10px var(--sc); animation: spup .5s .15s backwards; }
.sp-title { position: relative; font: 700 clamp(40px, 9vw, 92px)/.95 Fredoka, sans-serif; letter-spacing: 3px; color: #fff;
  text-shadow: 0 0 24px var(--sc), 0 4px 0 rgba(0, 0, 0, .45); animation: sptitle .7s cubic-bezier(.2, 1.5, .4, 1) backwards; }
@keyframes sptitle { from { transform: scale(2.6); opacity: 0; letter-spacing: 30px; } }
.sp-card { width: min(250px, 58vw, calc((100vh - 290px) / 1.48)); animation: spcard .9s cubic-bezier(.2, 1.2, .3, 1) .1s backwards; }
.sp-card .card { width: 100%; box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc) 70%, #fff), 0 0 44px var(--sc), 0 30px 60px rgba(0, 0, 0, .6); }
@keyframes spcard { from { transform: perspective(900px) rotateY(540deg) scale(.2); opacity: 0; } 60% { opacity: 1; } }
.sp-name { animation: spup .5s .6s backwards; }
.sp-name b { display: block; font: 700 22px Fredoka, sans-serif; color: #fff; }
.sp-name > span { font-size: 13px; color: #c9d3f0; }
.sp-disc { font-weight: 800; font-size: 13px; padding: 6px 14px; border-radius: 99px; color: #1b1030; background: linear-gradient(90deg, #ff9fe0, #9fe3ff, #fff09f);
  box-shadow: 0 0 18px rgba(159, 227, 255, .6); animation: spup .5s .9s backwards; }
.sp-tap { font: 400 10px var(--lcd); letter-spacing: 2px; color: rgba(255, 255, 255, .55); animation: spup .4s 1.2s backwards, blink 1.4s 1.6s infinite; }
@keyframes spup { from { transform: translateY(16px); opacity: 0; } }
.rainbow-text { background: linear-gradient(90deg, #ff5f6d, #ffc371, #fff35c, #5cff9d, #5cc8ff, #b45cff, #ff5f6d); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Legendary / Apex: god rays and rising embers */
.sp-rays { position: absolute; left: 50%; top: 45%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--sc) 32%, transparent) 0 6deg, transparent 6deg 18deg); animation: spin 18s linear infinite;
  -webkit-mask: radial-gradient(circle, #000 4%, transparent 38%); mask: radial-gradient(circle, #000 4%, transparent 38%); }
.sp-rays.r2 { animation-duration: 30s; animation-direction: reverse; opacity: .6; }
.sp-apex .sp-rays { background: repeating-conic-gradient(from 0deg, rgba(255, 111, 216, .32) 0 6deg, transparent 6deg 12deg, rgba(111, 211, 255, .32) 12deg 18deg,
  transparent 18deg 24deg, rgba(255, 230, 111, .32) 24deg 30deg, transparent 30deg 36deg); }
.ember { position: absolute; bottom: -20px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #fff3b0;
  box-shadow: 0 0 10px var(--sc), 0 0 22px var(--sc); animation: ember var(--t) linear var(--d) infinite; }
@keyframes ember { to { transform: translate(30px, -110vh); opacity: 0; } }
.sp-legendary .sp-title { color: transparent; text-shadow: none; background: linear-gradient(180deg, #fffbe6, #ffd23d 45%, #c77a00 62%, #ffe9a6);
  -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 18px rgba(255, 190, 40, .8)) drop-shadow(0 4px 0 #5a3600); }
.sp-apex .sp-title, .sp-prism .sp-title { color: transparent; text-shadow: none; background: linear-gradient(90deg, #ff6fd8, #6fd3ff, #ffe66f, #5cff9d, #ff6fd8);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 16px rgba(255, 255, 255, .55));
  animation: sptitle .7s cubic-bezier(.2, 1.5, .4, 1) backwards, rainbowmove 2.4s linear infinite; }
@keyframes rainbowmove { to { background-position: 200% 0; } }
/* Shiny: twinkling stars */
.sp-shiny { background: radial-gradient(circle at 50% 45%, #4d3f12, #07060a 70%); }
.star { position: absolute; left: var(--x); top: var(--y); font-size: var(--s); line-height: 1; color: #fff7cc; opacity: 0;
  text-shadow: 0 0 10px #ffd23d, 0 0 22px #fff; animation: twinkle 1.6s ease-in-out var(--d) infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); } 50% { opacity: 1; transform: scale(1) rotate(90deg); } }
.sp-shiny .sp-title { color: transparent; text-shadow: none; background: linear-gradient(180deg, #fff, #fff3b0 50%, #ffd23d);
  -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 14px rgba(255, 230, 140, .9)); }
.sp-shiny .sp-title::before { content: "✦ "; } .sp-shiny .sp-title::after { content: " ✦"; }
/* Glitch: torn screen, RGB split, noise */
.sp-glitch, .sp-retro-glitch { background: #000; }
.sp-noise { position: absolute; inset: 0; opacity: .16; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .5) 0 1px, transparent 1px 3px); animation: noise .2s steps(2) infinite; }
@keyframes noise { 50% { transform: translateY(2px); } }
.slice { position: absolute; left: 0; right: 0; top: var(--y); height: var(--h); opacity: 0; mix-blend-mode: screen;
  background: linear-gradient(90deg, rgba(0, 255, 156, .4), rgba(255, 0, 200, .4), rgba(0, 229, 255, .4)); animation: slice 1.2s steps(1) var(--d) infinite; }
@keyframes slice { 0% { opacity: 1; transform: translateX(var(--dx)); } 10% { opacity: 0; } 40% { opacity: .8; transform: translateX(calc(var(--dx) * -1)); } 48%, 100% { opacity: 0; } }
.sp-glitch .sp-title, .sp-retro-glitch .sp-title { font-family: var(--lcd); font-weight: 400; color: #00ff9c; text-shadow: 3px 0 #ff00c8, -3px 0 #00e5ff;
  animation: sptitle .7s backwards, gltitle 1.4s steps(1) infinite; }
.sp-retro-glitch .sp-title { font-size: clamp(30px, 7vw, 70px); color: #9bbc0f; }
.sp-glitch .sp-title::before, .sp-glitch .sp-title::after, .sp-retro-glitch .sp-title::before, .sp-retro-glitch .sp-title::after {
  content: attr(data-text); position: absolute; inset: 0; overflow: hidden; }
.sp-glitch .sp-title::before, .sp-retro-glitch .sp-title::before { color: #ff00c8; transform: translateX(-6px); animation: glslice 1.1s steps(1) infinite; }
.sp-glitch .sp-title::after, .sp-retro-glitch .sp-title::after { color: #00e5ff; transform: translateX(6px); animation: glslice .9s steps(1) infinite reverse; }
@keyframes glslice { 0% { clip-path: inset(10% 0 55% 0); } 25% { clip-path: inset(70% 0 5% 0); transform: translateX(8px); }
  50% { clip-path: inset(30% 0 40% 0); transform: translateX(-10px); } 75% { clip-path: inset(0 0 80% 0); } }
@keyframes gltitle { 0%, 100% { transform: none; } 33% { transform: skewX(-12deg) translateX(4px); } 36% { transform: none; } 70% { transform: translateX(-6px); } 72% { transform: none; } }
.sp-glitch .sp-card, .sp-retro-glitch .sp-card { animation: spglcard .7s steps(5) .1s backwards; }
@keyframes spglcard { from { transform: scaleY(.02) scaleX(1.6); opacity: 0; } 40% { transform: scaleY(1) scaleX(.4); opacity: 1; } }
.sp-glitch .sp-card .card, .sp-retro-glitch .sp-card .card { animation: cardgl 2.2s steps(1) 1s infinite; }
@keyframes cardgl { 0%, 100% { transform: none; filter: none; } 5% { transform: translateX(-6px) skewX(4deg); filter: hue-rotate(90deg); } 7% { transform: none; filter: none; }
  50% { transform: translateX(5px); filter: saturate(3); } 52% { transform: none; filter: none; } }
/* Prism: rainbow rings and refracted light */
.sp-prism { background: radial-gradient(circle at 50% 45%, #2a2f4a, #05060c 70%); }
.sp-ring { position: absolute; left: 50%; top: 45%; width: 90vmin; height: 90vmin; margin: -45vmin 0 0 -45vmin; border-radius: 50%; animation: spin 4s linear infinite;
  background: conic-gradient(#ff5f6d, #ffc371, #fff35c, #5cff9d, #5cc8ff, #b45cff, #ff5f6d); filter: drop-shadow(0 0 18px #fff);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%, #000 60%, transparent 62%); mask: radial-gradient(circle, transparent 54%, #000 56%, #000 60%, transparent 62%); }
.sp-ring.r2 { width: 130vmin; height: 130vmin; margin: -65vmin 0 0 -65vmin; animation-duration: 7s; animation-direction: reverse; opacity: .55; }
.sp-bars { position: absolute; inset: -50%; animation: bars 3s linear infinite;
  background: repeating-linear-gradient(100deg, transparent 0 60px, rgba(255, 255, 255, .08) 60px 64px, transparent 64px 140px, rgba(92, 200, 255, .1) 140px 150px,
    transparent 150px 220px, rgba(255, 95, 109, .1) 220px 226px, transparent 226px 300px); }
@keyframes bars { to { transform: translateX(300px); } }
/* Shadow: dark flames rise, the edges close in */
.sp-shadow { background: radial-gradient(circle at 50% 45%, #1c0830, #000 70%); }
.sp-vign { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, transparent 30%, rgba(0, 0, 0, .9) 75%); animation: vign 2s ease-in-out infinite alternate; }
@keyframes vign { to { transform: scale(.88); } }
.flame { position: absolute; bottom: -60px; left: var(--x); width: var(--s); height: calc(var(--s) * 1.6); border-radius: 50% 50% 40% 40%;
  background: radial-gradient(ellipse at 50% 70%, rgba(155, 77, 255, .55), rgba(60, 10, 110, .28) 45%, transparent 70%); animation: flame var(--t) ease-in var(--d) infinite; }
@keyframes flame { from { transform: translateY(0) scale(1); opacity: .9; } to { transform: translateY(-70vh) scale(.4); opacity: 0; } }
.sp-shadow .sp-title { color: #eadcff; letter-spacing: 8px; text-shadow: 0 0 18px #9b4dff, 0 0 40px #5b1aa8, 0 4px 0 #000; }
.sp-shadow .sp-card { animation: spshadow 1.3s ease-out .1s backwards; }
@keyframes spshadow { from { filter: brightness(0); transform: translateY(40px) scale(.9); opacity: 0; } 55% { filter: brightness(0) drop-shadow(0 0 30px #9b4dff); opacity: 1; } }
/* Retro: the screen turns handheld green, everything moves in steps */
.sp-retro, .sp-retro-glitch { --sc: #9bbc0f; }
.sp-retro { background: #0f380f; }
.sp-gb { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(15, 56, 15, .22) 0 1px, transparent 1px 4px),
  repeating-linear-gradient(90deg, rgba(15, 56, 15, .16) 0 1px, transparent 1px 4px); }
.sp-retro .sp-scene, .sp-retro-glitch .sp-scene { filter: grayscale(1) sepia(1) hue-rotate(45deg) saturate(2) brightness(.6) contrast(1.2); }
.sp-wipe { position: absolute; inset: 0; background: #9bbc0f; animation: gbwipe .9s steps(8) forwards; }
@keyframes gbwipe { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(100% 0 0 0); } }
.sp-retro .sp-title { font-family: var(--lcd); font-weight: 400; color: #9bbc0f; letter-spacing: 6px; text-shadow: 4px 4px 0 #306230, 8px 8px 0 #0a260a;
  animation: spretro .8s steps(6) .5s backwards; }
@keyframes spretro { from { transform: translateY(-60vh); } }
.sp-retro .sp-kicker, .sp-retro .sp-tap, .sp-retro .sp-name > span { color: #9bbc0f; text-shadow: none; }
.sp-retro .sp-card { animation: spretrocard .6s steps(5) .9s backwards; }
@keyframes spretrocard { from { transform: scale(.2); opacity: 0; } }
.sp-retro .sp-card .card { box-shadow: 0 0 0 4px #306230, 0 0 0 8px #0f380f, 0 30px 60px rgba(0, 0, 0, .6); }
/* First discovery: radar pings */
.ping { position: absolute; left: 50%; top: 45%; width: 40vmin; height: 40vmin; margin: -20vmin 0 0 -20vmin; border-radius: 50%; border: 3px solid var(--sc);
  animation: ping 2s ease-out infinite; }
.ping.p2 { animation-delay: .66s; } .ping.p3 { animation-delay: 1.33s; }
@keyframes ping { from { transform: scale(.3); opacity: 1; } to { transform: scale(3); opacity: 0; } }
.sp-discovery .sp-title { color: transparent; text-shadow: none; background: linear-gradient(90deg, #ff9fe0, #9fe3ff, #fff09f);
  -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 14px rgba(159, 227, 255, .8)); }
@media (prefers-reduced-motion: reduce) { #spot, #spot * { animation: none !important; } }
.feed-list .act-cards { grid-template-columns: repeat(5, minmax(0, 104px)); }

/* Auction house (not built yet) */
.auction-soon { max-width: 520px; margin: 40px auto 10px; padding: 34px 26px; text-align: center; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 203, 61, .1), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 203, 61, .25); }
.auction-soon .as-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; color: var(--accent);
  background: rgba(255, 203, 61, .14); }
.auction-soon .as-ico svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.auction-soon h2 { margin: 14px 0 6px; font: 700 26px Fredoka, sans-serif; }
.auction-soon p { margin: 0 0 18px; }

/* ------------------------------------------------------------------ trade composer */
/* Pick what you give and what you get (tabs, search, filters), every card with its value; a summary on
   the right (sticky on a computer) with both sides, their value and income, and the fair-trade meter. */
.tc { display: grid; gap: 18px; align-items: start; margin-top: 4px; }
@media (min-width: 900px) {
  .tc { grid-template-columns: minmax(0, 1fr) 330px; }
  .tc-sum { position: sticky; top: 76px; }
  .tc-bar { display: none !important; }
}
.tc-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.tc-title h1 { margin: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); }
.seg button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 10px; border: 0; border-radius: 10px;
  background: none; color: var(--muted); font: 800 14px Nunito, sans-serif; cursor: pointer; transition: background .15s, color .15s; }
.seg button.on { background: #0c1328; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 12px rgba(0, 0, 0, .3); }
.seg button i, .tc-search .btn i { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid;
  place-items: center; background: var(--accent); color: #2b1a00; font: 800 11px Nunito, sans-serif; }
.seg button i:empty, .tc-search .btn i:empty { display: none; }
.tc-h { margin: 14px 0 8px; font: 700 16px Fredoka, sans-serif; }
.tc-search { display: flex; gap: 8px; align-items: center; }
.tc-search .search { flex: 1; margin: 0; }
.tc-search .btn { display: inline-flex; align-items: center; gap: 6px; }
#tc-filters { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
#tc-filters[hidden] { display: none; }
.tc-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: #c8d2f0; font: 700 12.5px Nunito, sans-serif; cursor: pointer; transition: border-color .15s, background .15s; }
.fchip:hover { border-color: rgba(255, 255, 255, .25); }
.fchip i { font-style: normal; font-size: 11px; color: var(--muted); }
.fchip.on { border-color: var(--accent); background: rgba(255, 203, 61, .12); color: #fff; }
.fchip.on i { color: #ffe9a6; }
.fchip .rd { width: 9px; height: 9px; display: inline-block; border-radius: 50%; }
.tc-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.tc-sort select, .tc-msg select { background: #0c1328; color: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px;
  font: 700 13px Nunito, sans-serif; }
.tc-sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.linkbtn { border: 0; background: none; padding: 2px 4px; color: var(--muted); font: 700 12px Nunito, sans-serif; cursor: pointer; }
.linkbtn:hover { color: #fff; }
.grid.tc-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 16px 12px; }
.tc-cell { position: relative; padding-bottom: 9px; cursor: pointer; }
.tc-cell > .card { transition: transform .15s, box-shadow .2s, outline-color .2s; }
.tc-cell:hover > .card { transform: translateY(-3px); }
.tc-cell > .card.sel { outline-color: var(--accent); box-shadow: 0 0 18px rgba(255, 203, 61, .5); }
.tc-cell > .card.sel::after { background: var(--accent); color: #2b1a00; }
.valb { position: absolute; left: 50%; bottom: 0; z-index: 8; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 99px; background: #0b1124; border: 1px solid rgba(63, 224, 208, .45); color: #dffbf7;
  font: 800 12px Nunito, sans-serif; box-shadow: 0 2px 6px rgba(0, 0, 0, .55); white-space: nowrap; }
.gem { width: 12px; height: 12px; flex: none; stroke: var(--cyan); fill: rgba(63, 224, 208, .25); stroke-width: 2; stroke-linejoin: round; }
.wishb { position: absolute; top: -6px; left: -6px; z-index: 8; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #ff5f8f; color: #fff; font-size: 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.cpb { position: absolute; right: 2px; bottom: 1px; z-index: 8; padding: 1px 6px; border-radius: 99px; background: #0b1124; color: var(--muted);
  border: 1px solid var(--line); font: 800 10px Nunito, sans-serif; }
.tc-sum { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #172042, #10172f); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.tc-prog { height: 5px; margin-top: -6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.tc-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffe9a6); transition: width .3s; }
.tc-lbl { font: 400 10px var(--lcd); letter-spacing: 1.5px; color: #aeb9e0; text-transform: uppercase; }
.tc-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; min-height: 30px; align-items: center; }
.tc-th { --mc: #a4adbd; position: relative; width: 44px; height: 62px; padding: 0; border-radius: 7px; border: 2px solid var(--mc);
  background: #0c1428; cursor: pointer; }
.tc-th img { display: block; width: 100%; height: 72%; object-fit: contain; }
.tc-th i { position: absolute; left: 0; right: 0; bottom: 1px; display: flex; justify-content: center; align-items: center; gap: 1px;
  font: 800 9px Nunito, sans-serif; font-style: normal; color: #dffbf7; }
.tc-th i .gem { width: 8px; height: 8px; }
.tc-th:hover { border-color: var(--bad); }
.tc-th:hover::after { content: "×"; position: absolute; top: -7px; right: -7px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bad); color: #fff; font: 800 12px/16px Nunito, sans-serif; text-align: center; }
.tc-th.r-uncommon { --mc: #3fc985; } .tc-th.r-rare { --mc: #4a92ff; } .tc-th.r-epic { --mc: #b06bff; } .tc-th.r-legendary { --mc: #ffb627; }
.tc-th.f-stable { --mc: #1fb5a3; } .tc-th.f-advanced { --mc: #e0559f; } .tc-th.f-elite { --mc: #ff7a1a; } .tc-th.f-apex { --mc: #ffd23d; }
.tc-tot { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: #c8d2f0; }
.tc-tot span { display: inline-flex; align-items: center; gap: 5px; }
.tc-swap { margin: -6px 0; text-align: center; color: var(--cyan); font-size: 18px; }
.fair { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.fair-track { position: relative; height: 8px; margin: 4px 0; border-radius: 99px;
  background: linear-gradient(90deg, #ff5d73, #ff9f43 26%, #3fd08a 40% 60%, #3fe0d0 74%, #5cc8ff); }
.fair-track i { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 3px #0b1124, 0 0 10px rgba(255, 255, 255, .8); transition: left .35s cubic-bezier(.3, 1.4, .5, 1); }
.fair-none .fair-track { filter: grayscale(1) brightness(.6); }
.fair-lbls { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); font-weight: 700; }
.fair b { font: 700 17px Fredoka, sans-serif; }
.fair-fair b { color: var(--good); } .fair-good b { color: var(--cyan); } .fair-meh b { color: #ff9f43; } .fair-bad b { color: var(--bad); }
.fair-none b { color: var(--muted); font-size: 14px; }
.fair-tag { display: inline-block; padding: 3px 9px; border-radius: 99px; border: 1px solid; font: 800 11px Nunito, sans-serif; white-space: nowrap; }
.fair-tag.fair-fair { color: var(--good); border-color: rgba(63, 208, 138, .5); background: rgba(63, 208, 138, .1); }
.fair-tag.fair-good { color: var(--cyan); border-color: rgba(63, 224, 208, .5); background: rgba(63, 224, 208, .1); }
.fair-tag.fair-meh { color: #ff9f43; border-color: rgba(255, 159, 67, .5); background: rgba(255, 159, 67, .1); }
.fair-tag.fair-bad { color: var(--bad); border-color: rgba(255, 93, 115, .5); background: rgba(255, 93, 115, .1); }
.fair-tag.fair-none { color: var(--muted); border-color: var(--line); }
.tc-msg { display: flex; flex-direction: column; gap: 4px; }
.tc-msg select { width: 100%; }
.tc-bar { position: sticky; z-index: 30; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); display: flex; align-items: center;
  justify-content: space-between; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: rgba(12, 19, 40, .96);
  border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.tc-bar .small { display: inline-flex; align-items: center; gap: 4px; }
.tv { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font: 800 11px Nunito, sans-serif; color: #dffbf7; letter-spacing: 0; }
.tv .gem { width: 10px; height: 10px; }

/* Retro mini cards look like the real Retro card: the pixel-art scene (backdrop() picks static/art/retro/) on the
   handheld's green screen, with its fine LCD grid */
.mini.st-retro { border-color: #9d998f; background: #9bbc0f; }
.mini.st-retro .mini-bg { background-color: #9bbc0f; image-rendering: pixelated; filter: none; opacity: 1; }
.mini.st-retro .mini-bg::after { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(15, 56, 15, .12) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(15, 56, 15, .12) 0 1px, transparent 1px 4px); }
.mini.st-retro img { filter: none; image-rendering: pixelated; }
.mini.st-retro .mini-name { color: #0f380f; background: linear-gradient(180deg, transparent, rgba(139, 172, 15, .95) 55%); font-family: var(--lcd); font-weight: 400; }

/* ------------------------------------------------------------------ card menu */
/* Tap a card: the card on the left (Flip turns it to its details), name, level, coins per window and
   value on the right, then every option as a full-width row (like cartinha's card page). Rows with a
   caret open a panel right under themselves: who has it, who wants it, history, a wishlist, report. */
.modal-box.cm-box { max-width: 780px; }
.cm { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 22px; align-items: start; }
.cm-left { position: sticky; top: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
@media (max-width: 640px) {
  .cm { grid-template-columns: 1fr; gap: 14px; }
  .cm-left { position: static; }
  .cm .cflip { width: min(210px, 62vw); }
}
.cflip { width: 100%; perspective: 1100px; }
.cflip-inner { position: relative; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, 1.25, .5, 1); }
.cflip.on .cflip-inner { transform: rotateY(180deg); }
.cflip-front, .cflip-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cflip-back { position: absolute; inset: 0; transform: rotateY(180deg); }
.cflip-front > .card { width: 100%; }
.cm-flipb { display: inline-flex; align-items: center; gap: 6px; }
.cm-flipb svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cflip.on + .cm-flipb svg { transform: scaleX(-1); }

/* the back of the card: its details */
.cback { height: 100%; padding: 3.4%; border-radius: 7% / 4.75%; container-type: inline-size;
  background: linear-gradient(135deg, #f4f6fa 0%, #9aa3b2 20%, #ffffff 42%, #9aa3b2 58%, #5b6474 78%, #9aa3b2 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5); }
.cback-in { height: 100%; display: flex; flex-direction: column; gap: 3cqw; padding: 8% 7% 6%; overflow: hidden; border-radius: 5% / 3.4%;
  color: #dfe6ff; background:
    radial-gradient(circle at 50% -10%, rgba(63, 224, 208, .22), transparent 55%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 5px, transparent 5px 10px), #10172f; }
.cback-h { padding-bottom: 3cqw; border-bottom: 1px solid rgba(255, 255, 255, .14); text-align: center; color: #fff;
  font: 700 8cqw/1.1 Fredoka, sans-serif; overflow-wrap: anywhere; }
.cback dl { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 1.7cqw 4cqw; margin: 0; font-size: 5.5cqw; line-height: 1.25; }
.cback dt { padding-top: .9cqw; color: #8f9bc4; font: 400 4cqw var(--lcd); letter-spacing: .4px; text-transform: uppercase; }
.cback dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.cback-disc { text-align: center; font-size: 4.5cqw; color: #aeb9e0; }
.cback-disc:empty { display: none; }
.cback-logo { text-align: center; font: 700 4.2cqw Fredoka, sans-serif; letter-spacing: 2px; color: rgba(255, 255, 255, .32); }

/* name, level, coins per window, value, copy number, owner */
.cm-right { min-width: 0; display: flex; flex-direction: column; }
.cm-eyebrow { color: var(--accent); font: 800 11.5px Nunito, sans-serif; letter-spacing: 1.6px; text-transform: uppercase; }
.cm-name { margin: 2px 0 10px; font: 700 28px/1.1 Fredoka, sans-serif; overflow-wrap: anywhere; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .06); font: 800 12px Nunito, sans-serif; white-space: nowrap; }
.cm-chip:not([class*=" rt-"]) { color: #dfe6ff; }
.cm-chip.val { color: #dffbf7; border-color: rgba(63, 224, 208, .35); }
.cm-chip.dim { color: var(--muted); font: 400 11px var(--lcd); letter-spacing: .5px; }
.cm-stars { color: var(--accent); letter-spacing: -1px; }
.cm-owner { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04); color: #dfe6ff; font-size: 13px; text-decoration: none; }
.cm-owner:hover { border-color: rgba(255, 255, 255, .25); }
.cm-owner .avatar { width: 28px; height: 28px; font-size: 13px; }
.cm-owner b { color: #fff; }
.cm-note { margin: 10px 0 0; color: #ffb3b3; font-size: 12.5px; }
.cm-right .mtabs { margin: 14px 0 0; }
.cm-right .acts { margin-top: 14px; gap: 7px; }
.cm-close { margin-top: 14px; }

/* option rows: the trade row is gold, rows with a caret open a panel */
.act > .grow { min-width: 0; }
.act.gold { background: linear-gradient(180deg, #f6e3a6, #caa65a); border-color: #ecd48e; color: #2b1d00; }
.act.gold svg { color: #2b1d00; }
.act.gold small { color: rgba(43, 29, 0, .72); }
.act.gold:hover:not(.off):not([disabled]) { background: linear-gradient(180deg, #fbecc0, #d7b56c); border-color: #fff1c6; }
.act-caret { flex: none; width: 8px; height: 8px; margin: -4px 4px 0; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s, margin .2s; }
.act.open { border-color: var(--cyan); background: rgba(63, 224, 208, .08); }
.act.open .act-caret { margin-top: 4px; transform: rotate(225deg); border-color: var(--cyan); }
.act-pane { margin: -2px 0 4px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .2); animation: fadein .2s; }
.act-pane .ppl:first-child { margin-top: 0; }
.act-pane .ppl + .ppl { margin-top: 6px; }

/* history of a copy */
.hist { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow: auto; }
.hist-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: #dfe6ff; font-size: 13px; }
.hist-row:nth-child(odd) { background: rgba(255, 255, 255, .03); }
.hist-row svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--cyan); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hist-row a { color: #fff; font-weight: 800; }
.hist-row .tiny { flex: none; white-space: nowrap; }
.hist-row.k-trade svg { stroke: var(--accent); }
.hist-row.k-merge svg { stroke: var(--good); }
.hist-row.k-disc svg { stroke: #9fe3ff; }

/* someone's wishlist, with how many of each card you have */
.cm-wl { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 8px; max-height: 300px; margin: 8px 0 10px; padding: 6px 6px 2px 2px; overflow: auto; }
.cm-wl-i { position: relative; }
.cm-have { position: absolute; top: -5px; right: -5px; z-index: 3; padding: 1px 6px; border-radius: 99px; background: var(--good); color: #062014;
  font: 800 10px Nunito, sans-serif; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); pointer-events: none; }

/* report: fixed reasons */
.rep { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.rep-b { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: #dfe6ff; text-align: left;
  font: 700 13px Nunito, sans-serif; cursor: pointer; }
.rep-b:hover { border-color: var(--bad); background: rgba(255, 93, 115, .08); }
.rep-ok { margin: 0; color: var(--good); font-weight: 800; }

/* trade lists: tap a card for its menu */
.tv-cell[data-mini] { cursor: pointer; }

/* Activity: show-offs */
.act-thumb.show { background: radial-gradient(circle at 50% 62%, rgba(255, 203, 61, .3), rgba(0, 0, 0, .2)); border-color: rgba(255, 203, 61, .4); }
.tag.show { flex: none; background: linear-gradient(90deg, #ffe08a, #ffb627); color: #2b1a00; }

/* ================================================================== round 16: ideas from cartinha */
/* ------------------------------------------------------------------ Packs page: guarantee counter, type packs */
.pity { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(255, 226, 122, .12), rgba(22, 31, 60, .9) 60%); border: 1px solid rgba(255, 226, 122, .3); }
.pity b { display: block; color: #fff3c4; }
.pity small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.pity-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; font-size: 22px; color: #ffe27a;
  background: rgba(255, 226, 122, .12); text-shadow: 0 0 10px rgba(255, 226, 122, .8); animation: blink 2.4s infinite; }
.pity-bar { height: 7px; border-radius: 99px; background: rgba(0, 0, 0, .35); overflow: hidden; margin-top: 7px; }
.pity-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffe27a, #ff9f3d, #ff6fd8); box-shadow: 0 0 10px rgba(255, 200, 80, .7); }
.pity.sm { margin: 12px 0 6px; padding: 9px 11px; }
.pity.sm .pity-ico { width: 30px; height: 30px; font-size: 16px; animation: none; }
.packs.typepacks { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 31%; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; }
.packs.typepacks .pack-col { scroll-snap-align: start; }
@media (min-width: 640px) { .packs.typepacks { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; } }
.typepack .pk-ribbon { font-size: 7cqw; }
.pack3.t-fire { --f1: #7a1d05; --f2: #ff6a2b; --f3: #3d0a02; --trim: #fff1e6; --trim2: #ffb07a; --ink: #4a1200; --glow: rgba(255, 120, 60, .55); }
.pack3.t-water { --f1: #063a7a; --f2: #2f9bff; --f3: #021c3d; --trim: #eaf6ff; --trim2: #8fc8ff; --ink: #031f45; --glow: rgba(80, 160, 255, .55); }
.pack3.t-grass { --f1: #1b5e12; --f2: #5fd35f; --f3: #0b2e07; --trim: #f0ffe8; --trim2: #a6e88a; --ink: #103a08; --glow: rgba(110, 230, 100, .5); }
.pack3.t-electric { --f1: #7a5d00; --f2: #ffd93d; --f3: #3a2c00; --trim: #fffbe0; --trim2: #ffe680; --ink: #3d2c00; --glow: rgba(255, 220, 60, .55); }
.pack3.t-psychic { --f1: #6e0a40; --f2: #ff6fa8; --f3: #33041d; --trim: #fff0f6; --trim2: #ffb0d0; --ink: #3d0622; --glow: rgba(255, 110, 170, .5); }
.pack3.t-fighting { --f1: #6a1a0a; --f2: #e0603f; --f3: #330a03; --trim: #fff0ea; --trim2: #f0a58c; --ink: #3a0e04; --glow: rgba(230, 100, 70, .5); }
.pack3.t-rock { --f1: #5a4818; --f2: #cdb058; --f3: #2a210a; --trim: #fbf5e2; --trim2: #e0cd8f; --ink: #33280a; --glow: rgba(220, 190, 100, .5); }
.pack3.t-poison { --f1: #4a0f6a; --f2: #c06be0; --f3: #22053a; --trim: #f7ecff; --trim2: #d6a8f0; --ink: #2a0640; --glow: rgba(190, 110, 230, .55); }
#stage.k-type { --pk2: #e6ecff; --pkg: rgba(220, 230, 255, .35); background: radial-gradient(circle at 50% 42%, #2a2f52, #070a16 75%); }

/* ------------------------------------------------------------------ pack opening (cartinha's sequence) */
/* the light is silver, and takes the colour of the special card when there is one */
#stage { --lt: #dfe7f5; }
#stage.lit .st-glow { background: radial-gradient(circle, color-mix(in srgb, var(--lt) 45%, transparent), transparent 64%); }
#stage.lit .rays { background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--lt) 16%, transparent) 0 8deg, transparent 8deg 16deg); }
#stage.sealed .st-hint, #stage.sealed .st-done { display: none; }
#stage .flipper { animation: none; }
#stage.dealing .flipper { animation: dealfan .65s cubic-bezier(.2, .9, .3, 1.15) backwards; animation-delay: calc(var(--i) * 110ms + .3s); }
#stage.rising .flipper { animation: cardrise .95s cubic-bezier(.2, .8, .25, 1) backwards; animation-delay: calc(var(--i) * 90ms); }
#stage.fading .flipper { animation: fadein .3s backwards; animation-delay: calc(var(--i) * 60ms); }
@keyframes cardrise {
  0% { transform: translate(var(--fx, 0), var(--fy, 0)) scale(.22) rotate(var(--rot, 0deg)); opacity: 0; filter: brightness(2.4); }
  18% { opacity: 1; }
  52% { transform: translate(calc(var(--fx, 0) * .35), calc(var(--fy, 0) * .35 - 70px)) scale(.86) rotate(var(--rot, 0deg)); filter: brightness(1.5); }
  100% { transform: none; filter: none; } }
.stage-grid.n3 { grid-template-columns: repeat(3, minmax(0, 132px)); max-width: 460px; }
@media (min-width: 640px) { .stage-grid.n3 { grid-template-columns: repeat(3, minmax(0, 170px)); max-width: 560px; } }
/* a reflection runs over each card once they line up */
.stage-grid.shine .flipper:not(.flipped) .flip-back::before { content: ""; position: absolute; inset: 0; z-index: 4; border-radius: 12px; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 62%) -160% 0 / 250% 100% no-repeat;
  animation: cardsheen 1s ease-out forwards; animation-delay: calc(var(--i) * 120ms); }
@keyframes cardsheen { to { background-position: 160% 0; } }
/* charge: the light rings close in on the pack, two rings pulse, and the zig-zag tear runs along the top */
.ring { position: absolute; left: 50%; top: 46%; width: 150%; aspect-ratio: 1; margin: -75% 0 0 -75%; border-radius: 50%; pointer-events: none; opacity: 0; z-index: 4;
  border: 3px solid var(--lt, #fff); box-shadow: 0 0 18px var(--lt, #fff), inset 0 0 18px var(--lt, #fff); }
.charging .ring.r0 { animation: ringin 1s cubic-bezier(.3, .6, .4, 1) forwards; }
.charging .ring.r1 { animation: ringpulse 1s .45s ease-out infinite; }
.charging .ring.r2 { animation: ringpulse 1s .8s ease-out infinite; }
@keyframes ringin { 0% { transform: scale(2.6); opacity: 0; } 30% { opacity: .9; } 100% { transform: scale(.62); opacity: .2; } }
@keyframes ringpulse { 0% { transform: scale(.55); opacity: .8; border-width: 4px; } 100% { transform: scale(1.25); opacity: 0; border-width: 1px; } }
.tear-wrap.charging { animation: packcharge .09s linear infinite; }
#stage.lit .tear-wrap.charging { animation: packcharge .07s linear infinite, heartbeat .62s ease-in-out infinite; }
@keyframes packcharge { 25% { translate: -1.5px .5px; } 75% { translate: 1.5px -.5px; } }
@keyframes heartbeat { 0%, 100% { scale: 1; } 12% { scale: 1.05; } 24% { scale: 1; } 36% { scale: 1.035; } }
.tear-wrap.charging .tear-aura { background: radial-gradient(circle, color-mix(in srgb, var(--lt) 70%, transparent), transparent 62%); animation: stglow .5s ease-in-out infinite; }
.zig { position: absolute; z-index: 5; left: 4%; width: 92%; top: 9%; height: 3.4%; overflow: visible; pointer-events: none; }
.zig polyline { fill: none; stroke: #fff; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 160; stroke-dashoffset: 160;
  filter: drop-shadow(0 0 3px var(--lt, #fff)) drop-shadow(0 0 6px var(--lt, #fff)); opacity: 0; }
.charging .zig polyline { opacity: 1; animation: zigdraw 1.1s .2s ease-in-out forwards; }
@keyframes zigdraw { to { stroke-dashoffset: 0; } }
.charging .tear-line { display: none; }
.ripping .zig, .ripping .ring { display: none; }
/* the flash: beam from above, the top strip spins away, the empty pack drops out to the right */
.ripping .tear-top { animation: ripspin .9s cubic-bezier(.3, .1, .5, 1) forwards; }
@keyframes ripspin { 20% { transform: translate(6px, -8px) rotate(-8deg); } 100% { transform: translate(34vw, -46vh) rotate(260deg); opacity: 0; } }
.ripping .tear-body { animation: dropright .8s .42s ease-in forwards; }
@keyframes dropright { 30% { transform: translateY(-10px); } to { transform: translate(38vw, 70vh) rotate(24deg); opacity: 0; } }
#stage.light .ripping .tear-top { animation-duration: .45s; }
#stage.light .ripping .tear-body { animation: dropout .4s .15s ease-in forwards; }
.pk-beam { background: linear-gradient(0deg, #fff, var(--lt, #fff) 30%, transparent); }
/* the hint: a special card's back already shines before you flip it */
.flip-back { position: absolute; }
.tell-holo { position: absolute; inset: 0; z-index: 3; border-radius: 12px; pointer-events: none; mix-blend-mode: screen; opacity: .85;
  background: conic-gradient(from var(--hr, 0deg), #ff5f6d, #ffc371, #fff35c, #5cff9d, #5cc8ff, #b45cff, #ff5f6d);
  -webkit-mask: radial-gradient(circle at 50% 46%, transparent 22%, #000 70%); mask: radial-gradient(circle at 50% 46%, transparent 22%, #000 70%);
  animation: tellspin 3s linear infinite; }
@property --hr { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes tellspin { to { --hr: 360deg; } }
.flipper.tell-special .flip-back .card { box-shadow: 0 0 0 2px #fff, 0 0 20px #ffe27a, 0 0 40px rgba(180, 92, 255, .6) !important; }
.flipper.tk-glitch .tell-holo { background: repeating-linear-gradient(0deg, #00ff9c 0 3px, #ff00c8 3px 5px, transparent 5px 9px); animation: glitchjit .25s steps(2) infinite; }
.flipper.tk-shadow .tell-holo { background: radial-gradient(circle, #b06bff, #2a0b45 70%); mix-blend-mode: hard-light; }
.flipper.tk-retro .tell-holo { background: repeating-linear-gradient(0deg, #9bbc0f 0 2px, #306230 2px 4px); opacity: .7; }
@keyframes glitchjit { 50% { transform: translateX(2px); } }
.flipper.tell-top .flip-back .card { box-shadow: 0 0 0 2px #ffd23d, 0 0 22px rgba(255, 210, 61, .75) !important; }
.flipper.tell-top .tell-holo { background: linear-gradient(135deg, transparent 20%, rgba(255, 226, 122, .65) 45%, transparent 55%, rgba(255, 210, 61, .5) 75%, transparent 90%);
  -webkit-mask: none; mask: none; animation: topglint 2.4s ease-in-out infinite; }
@keyframes topglint { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
.tell-lbl { position: absolute; z-index: 5; bottom: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font: 400 9px var(--lcd); letter-spacing: 1px; padding: 3px 7px; border-radius: 6px; color: #2b1a00; background: linear-gradient(90deg, #fff3b0, #ffd23d); }
.st-hint { position: relative; margin: 14px 0 0; text-align: center; font-size: 13px; color: #dfe8ff; }
.st-done { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; padding: 14px 16px; width: 100%; max-width: 560px;
  border-radius: 18px; background: rgba(8, 12, 28, .72); border: 1px solid rgba(255, 255, 255, .14); animation: fadein .3s; text-align: center; }
.st-done-h { font: 700 20px Fredoka, sans-serif; letter-spacing: .5px; color: #fff; }
.st-done-b { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
#stage.light .st-glow, #stage.light .rays { animation: none; }

/* ------------------------------------------------------------------ My cards: by creature, ♥ / 👥 under every card */
.cards-bar { margin: 10px 0; gap: 8px; }
.cards-bar .seg { grid-template-columns: auto auto; }
.cards-bar .seg button { padding: 7px 14px; font-size: 13px; }
.cards-bar .sort-select { margin-left: auto; }
.chip .cnt { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 3px; }
.chip.on .cnt { color: #ffe9a6; }
.ccell { position: relative; cursor: pointer; min-width: 0; }
.ccell .card { width: 100%; }
.kst { display: flex; justify-content: center; gap: 10px; margin-top: 5px; font: 800 11px Nunito, sans-serif; color: var(--muted); }
.kst span { display: inline-flex; align-items: center; gap: 3px; }
.kst .kw { color: #ff9fb2; }
.kst svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.tlock { position: absolute; z-index: 6; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 14, 30, .85); border: 1px solid rgba(255, 203, 61, .6); color: var(--accent); }
.tlock svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.card.missing { filter: grayscale(1) brightness(.55) contrast(.95); opacity: .78; }
.card.missing .kfx, .card.missing .glare { display: none; }
.ccell.miss:hover .card.missing { filter: grayscale(.7) brightness(.7); }
.cgroups { display: flex; flex-direction: column; gap: 10px; }
.cgrp { border-radius: 16px; background: rgba(22, 31, 60, .6); border: 1px solid rgba(255, 255, 255, .07); }
.cgrp > .grid { padding: 0 12px 14px; }
.cgrp-h { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cgrp-h img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.cgrp-h b { display: block; color: #fff; font: 600 16px Fredoka, sans-serif; }
.cgrp-h small { display: block; color: var(--muted); font-size: 12px; }
.cgrp-bar { display: block; height: 5px; margin-top: 5px; max-width: 260px; border-radius: 99px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.cgrp-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #9fe3ff); }
.cgrp .act-caret { transition: transform .2s; transform: rotate(45deg); }
.cgrp.open .act-caret { margin-top: 4px; transform: rotate(225deg); border-color: var(--cyan); }
.btn > svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.sm { white-space: nowrap; }
.fchip input { width: auto; margin: 0; padding: 0; box-shadow: none; accent-color: var(--accent); }
.fchip { white-space: nowrap; }

/* ------------------------------------------------------------------ reactions and stamps */
.act-wrap { display: flex; flex-direction: column; gap: 4px; }
.rx { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; }
.act-wrap > .rx { margin: 0 0 2px 12px; }
.rx-p, .rx-add { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 99px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: #dfe6ff; font: 800 12px Nunito, sans-serif; }
.rx-p b { font-weight: 800; }
.rx-p.on { border-color: var(--accent); background: rgba(255, 203, 61, .14); color: #fff; }
.rx-add { padding: 0 7px; color: var(--muted); }
.rx-add svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.rx-add i { font-style: normal; font-size: 11px; margin-left: -1px; }
.rx-add:hover, .rx-p:hover { border-color: rgba(255, 255, 255, .3); color: #fff; }
.rx-pick { position: absolute; z-index: 30; left: 0; bottom: calc(100% + 6px); display: flex; gap: 2px; padding: 5px; border-radius: 14px;
  background: #0d1530; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .55); animation: fadein .15s; }
.rx-pick button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; font-size: 19px; cursor: pointer; transition: transform .12s; }
.rx-pick button:hover { background: rgba(255, 255, 255, .08); transform: scale(1.2); }
.stamps { gap: 6px; margin-top: 4px; }
.stamp { padding: 6px 12px; border-radius: 10px; cursor: pointer; border: 1px dashed rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .04);
  color: #e8edff; font: 700 12.5px Fredoka, Nunito, sans-serif; transform: rotate(-1.5deg); }
.stamp:nth-child(even) { transform: rotate(1.5deg); }
.stamp b { margin-left: 6px; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); font-size: 11px; }
.stamp.on { border-style: solid; border-color: var(--accent); background: rgba(255, 203, 61, .14); }
.stamps.ro .stamp { cursor: default; }
.stamps.ro .stamp:not(:has(b)) { opacity: .35; }
.stamp-wrap { margin: 4px 0 12px; }

/* ------------------------------------------------------------------ Hall of fame (Home) */
.hof { display: grid; gap: 12px; }
@media (min-width: 760px) { .hof { grid-template-columns: 1.2fr 1fr; } }
.hof-box { padding: 14px; border-radius: 18px; background: rgba(22, 31, 60, .88); border: 1px solid rgba(255, 255, 255, .08); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; margin-top: 6px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pod .tv-cell { width: 100%; padding: 0; cursor: pointer; }
.pod.p1 .tv-cell { transform: scale(1.06); }
.pod-n { font: 800 11px Nunito, sans-serif; color: #ff9fb2; white-space: nowrap; }
.pod-base { width: 100%; display: grid; place-items: center; border-radius: 10px 10px 4px 4px; font: 700 20px Fredoka, sans-serif; color: #2b1a00; }
.pod.p1 .pod-base { height: 46px; background: linear-gradient(180deg, #fff3b0, #ffcb3d); box-shadow: 0 0 18px rgba(255, 203, 61, .45); }
.pod.p2 .pod-base { height: 32px; background: linear-gradient(180deg, #f2f5fb, #b9c3d6); }
.pod.p3 .pod-base { height: 24px; background: linear-gradient(180deg, #ffd2a8, #cd7f32); }
.hof-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 10px; color: inherit; }
.hof-row:hover { background: rgba(255, 255, 255, .04); }
.hof-row img { width: 34px; height: 34px; object-fit: contain; }
.hof-row b { color: #fff; font-size: 14px; }
.hof-rk { width: 22px; text-align: center; font: 400 12px var(--lcd); color: var(--accent); }
.hof-bar { display: block; height: 5px; margin-top: 3px; border-radius: 99px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.hof-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff6f9a, #ffb3c1); }
.hof-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.hof-tab { flex: 1 1 0; min-width: 0; padding: 6px 8px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(0, 0, 0, .2); font: 400 10px var(--lcd); letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted, #8fa0c8); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hof-tab:hover { color: #fff; }
.hof-tab.on { color: var(--cyan); border-color: rgba(70, 226, 214, .45); background: rgba(70, 226, 214, .1); }
button.hof-row { width: 100%; border: 0; background: none; text-align: left; font: inherit; cursor: pointer; }
.hof-sub { display: block; font-size: 11px; color: var(--muted, #8fa0c8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hof-row .grow { min-width: 0; }

/* ------------------------------------------------------------------ trades: YOU GIVE ⇄ YOU GET */
.tbs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.tb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 12px; border-radius: 14px; min-width: 0;
  background: rgba(0, 0, 0, .18); border: 1px solid rgba(255, 255, 255, .06); }
.tb.give { background: linear-gradient(180deg, rgba(255, 93, 115, .08), rgba(0, 0, 0, .18)); }
.tb.get { background: linear-gradient(180deg, rgba(63, 208, 138, .09), rgba(0, 0, 0, .18)); }
.tb-lbl { font: 400 10px var(--lcd); letter-spacing: 1.5px; text-transform: uppercase; color: #c9d4f5; }
.tb-name { font: 700 13.5px Nunito, sans-serif; color: #fff; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-val { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tb-val .gem { width: 12px; height: 12px; }
.tb-arrow { font-size: 22px; color: var(--accent); text-shadow: 0 0 10px rgba(255, 203, 61, .6); }
.tfan { position: relative; width: min(130px, 100%); aspect-ratio: 5 / 7.4; margin: 4px 0 2px; }
.tfan .tv-cell { position: absolute; inset: 0; padding: 0; cursor: pointer; transition: transform .2s; }
.tfan .tv-cell .card { width: 100%; height: 100%; }
.tfan.n2 .tv-cell { transform: translateX(calc((var(--k) - .5) * 26%)) rotate(calc((var(--k) - .5) * 9deg)); }
.tfan.n3 .tv-cell { transform: translateX(calc((var(--k) - 1) * 24%)) rotate(calc((var(--k) - 1) * 8deg)); }
.tfan .tv-cell:hover { z-index: 5; transform: translateY(-6px) scale(1.04); }
.tfan-more { position: absolute; z-index: 6; right: -6px; bottom: -6px; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: #2b1a00; font: 800 12px Nunito, sans-serif; }
.tstrip { margin-top: 8px; padding: 7px 10px; border-radius: 10px; text-align: center; font: 700 12.5px Nunito, sans-serif; background: rgba(255, 255, 255, .04); color: #c9d4f5; }
.tstrip .gem { width: 12px; height: 12px; vertical-align: -1px; }
.tstrip.fair-fair { background: rgba(63, 208, 138, .12); color: #9ff0c6; }
.tstrip.fair-good { background: rgba(63, 208, 138, .16); color: #b8ffd9; }
.tstrip.fair-meh { background: rgba(255, 203, 61, .12); color: #ffe39a; }
.tstrip.fair-bad { background: rgba(255, 93, 115, .14); color: #ffb3bf; }
.tacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn.gold { background: linear-gradient(180deg, #fff0b0, #ffcb3d 55%, #ff9f1c); color: #2b1a00; box-shadow: 0 4px 0 #b06a00; }
.btn.gold.sm { box-shadow: 0 3px 0 #b06a00; }
.status.expired { background: #2c2f45; color: #9aa3c7; }
.trade.surprise { border-color: rgba(255, 122, 217, .35); background: linear-gradient(160deg, rgba(90, 30, 80, .45), #141d38 60%); }
.sp-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 122, 217, .16); color: #ffb3ea; font-size: 12px; font-weight: 800; }
.sp-tag svg, .chip svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; vertical-align: -2px; }
.trade .rx { margin-top: 10px; }
/* review and accept */
.rv { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: start; margin: 10px 0; }
.rv .tb-arrow { margin-top: 40px; }
.rv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 6px; }
.rv-cards .tv-cell { cursor: pointer; padding: 0; }
.aogrid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-height: 46vh; overflow: auto; padding: 4px; }
/* the trade animation */
#tdone { position: fixed; inset: 0; z-index: 105; display: grid; place-items: center; padding: 20px; animation: fadein .25s; backdrop-filter: blur(8px);
  background: radial-gradient(circle at 50% 45%, rgba(40, 60, 120, .95), rgba(4, 7, 18, .97) 70%); }
.td-in { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 520px; }
.td-in h2 { margin: 6px 0; font-size: 24px; }
.td-swap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; width: min(440px, 92vw); }
.td-a, .td-b { position: relative; }
.td-a .card, .td-b .card { width: 100%; }
.td-a { animation: tdleft 1.1s .2s cubic-bezier(.5, 0, .3, 1) both; }
.td-b { animation: tdright 1.1s .2s cubic-bezier(.5, 0, .3, 1) both; }
@keyframes tdleft { 0% { transform: none; } 45% { transform: translate(60%, -30px) scale(.8) rotate(8deg); opacity: .7; } 100% { transform: translate(0, 0) scale(.86); opacity: .45; filter: grayscale(.6); } }
@keyframes tdright { 0% { transform: translateX(-30%) scale(.7); opacity: 0; } 45% { transform: translate(-60%, 30px) scale(.8) rotate(-8deg); opacity: .7; } 100% { transform: scale(1.06); opacity: 1; } }
.td-arrow { font-size: 30px; color: var(--accent); animation: spin 1.2s .2s ease-in-out; }

/* ------------------------------------------------------------------ surprise trade */
.sp-intro { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px; margin: 4px 0 12px;
  background: linear-gradient(140deg, rgba(255, 122, 217, .16), rgba(22, 31, 60, .9) 60%); border: 1px solid rgba(255, 122, 217, .3); }
.sp-intro p { margin: 4px 0 6px; }
.sp-gift { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 122, 217, .18); color: #ffb3ea; }
.sp-gift svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linejoin: round; }
.sp-bands { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sp-band { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.sp-band b { font-size: 13px; color: #fff; } .sp-band small { font-size: 11px; color: var(--muted); }
.sp-band.hot { border-color: rgba(255, 122, 217, .6); background: rgba(255, 122, 217, .1); }
.sp-band.hot small { color: #ffb3ea; }
.sp-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 8px 0 14px; }
.sp-res { display: flex; flex-direction: column; gap: 6px; }
.sp-res .flipper { width: 100%; animation: none; }
.sp-res.new .flipper .flip-back .card { box-shadow: 0 0 0 2px #ff7ad9, 0 0 18px rgba(255, 122, 217, .6); }
.sp-wait { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; background: rgba(22, 31, 60, .7); margin: 8px 0; }
.sp-wait .mini { width: 52px; flex: none; }
.sp-wait b { display: block; color: #fff; } .sp-wait small { color: var(--muted); font-size: 12px; }
.tc-cell.off { opacity: .45; pointer-events: none; }
.spr { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.sp-flip { width: min(200px, 60vw); animation: none; }

/* ------------------------------------------------------------------ settings */
.set-sec { padding: 14px; margin-bottom: 12px; border-radius: 18px; background: rgba(22, 31, 60, .85); border: 1px solid rgba(255, 255, 255, .07); }
.set-sec h2 { margin: 0 0 8px; }
.set-row, .tgl { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid rgba(255, 255, 255, .06); }
.set-sec h2 + .set-row, .set-sec h2 + .tgl { border-top: 0; }
.set-row.col { flex-direction: column; align-items: stretch; }
.set-row b, .tgl b { display: block; color: #fff; font-size: 14px; }
.set-row small, .tgl small { display: block; color: var(--muted); font-size: 12px; }
.set-row .seg { grid-template-columns: auto auto; }
.set-row .seg button { padding: 7px 14px; }
.tgl { position: relative; cursor: pointer; }
.tgl input { position: absolute; left: 0; top: 50%; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.tgl-ui { position: relative; width: 44px; height: 26px; flex: none; border-radius: 99px; background: #0c1428; border: 1px solid var(--line); transition: background .2s; }
.tgl-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #93a1cf; transition: transform .2s, background .2s; }
.tgl input:checked + .tgl-ui { background: rgba(63, 224, 208, .3); border-color: var(--cyan); }
.tgl input:checked + .tgl-ui::after { transform: translateX(18px); background: var(--cyan); }
.tgl input:focus-visible + .tgl-ui { outline: 2px solid var(--cyan); outline-offset: 2px; }
.lock-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.lock-i { display: flex; flex-direction: column; align-items: center; width: 70px; }
.lock-i .mini { width: 100%; }
.blk { display: inline-flex; align-items: center; gap: 4px; margin: 6px 8px 0 0; padding: 4px 6px 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .05); }
.notes { display: flex; flex-direction: column; gap: 8px; }
.note { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; color: #dfe6ff; }
.note .tag { flex: none; }
/* body.lite: no moving card effects in grids; body.reduce: (almost) no animation at all */
body.lite .grid .card .kfx, body.lite .grid .card .glare, body.lite .grid .card .sparkles, body.lite .grid .card .lvfx,
body.lite .grid .card .holo, body.lite .grid .card .glitchfx { display: none; }
body.lite .grid .card, body.lite .grid .card * { animation: none !important; }
body.reduce *, body.reduce *::before, body.reduce *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }

/* ------------------------------------------------------------------ profile: frame, collector badges */
.prof-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.prof-head .btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.avatar.xl { width: 60px; height: 60px; font-size: 28px; box-shadow: 0 0 0 3px rgba(255, 203, 61, .6), 0 0 18px rgba(255, 203, 61, .35); }
.likes { color: #ff9fb2; }
.cbadges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cbadge { padding: 5px 11px; border-radius: 99px; font: 800 12.5px Nunito, sans-serif; border: 1px solid; }
.cbadge.r1 { color: #ffe9a6; border-color: rgba(255, 203, 61, .6); background: rgba(255, 203, 61, .12); }
.cbadge.r2 { color: #e8edf8; border-color: rgba(200, 210, 230, .5); background: rgba(200, 210, 230, .08); }
.cbadge.r3 { color: #ffc89a; border-color: rgba(205, 127, 50, .6); background: rgba(205, 127, 50, .1); }
.sframe { --f1: #2b3a67; --f2: #3fe0d0; --f3: #0c1428; position: relative; margin: 10px 0 4px; padding: 26px 16px 18px; border-radius: 22px;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--f2) 18%, transparent), transparent 60%), linear-gradient(180deg, var(--f3), #0a1020);
  border: 3px solid var(--f1); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--f2) 45%, transparent), inset 0 0 40px color-mix(in srgb, var(--f2) 15%, transparent), 0 10px 30px rgba(0, 0, 0, .45); }
.sf-c { position: absolute; width: 34px; height: 34px; pointer-events: none; border: 3px solid var(--f2); filter: drop-shadow(0 0 6px var(--f2)); }
.sf-c.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.sf-c.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.sf-c.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.sf-c.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.sf-plate { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 3px 14px; border-radius: 8px; white-space: nowrap;
  font: 400 10px var(--lcd); letter-spacing: 1.5px; text-transform: uppercase; color: #0a1020; background: linear-gradient(180deg, #fff, var(--f2)); }
.sframe.fr-fire { --f1: #8a2a0a; --f2: #ff7b2e; --f3: #2a0c05; }
.sframe.fr-water { --f1: #0b3f8a; --f2: #4c9bff; --f3: #06142e; }
.sframe.fr-grass { --f1: #1e6a14; --f2: #5fd35f; --f3: #08200a; }
.sframe.fr-electric { --f1: #8a6a00; --f2: #ffd93d; --f3: #241c02; }
.sframe.fr-psychic { --f1: #8a0f50; --f2: #ff6fa8; --f3: #2a0517; }
.sframe.fr-ghost { --f1: #3a2a78; --f2: #8a78d8; --f3: #100a26; }
.sframe.fr-gold { --f1: #8a5a00; --f2: #ffd23d; --f3: #241602; border-image: linear-gradient(135deg, #fff3b0, #ffcb3d, #b06a00, #ffcb3d, #fff3b0) 1; border-radius: 0; }
.sframe.fr-gold .sf-c { border-color: #fff3b0; }
.frames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.frpick { margin: 0; padding: 22px 10px; min-height: 92px; cursor: pointer; color: #fff; font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.frpick b { font: 600 16px Fredoka, sans-serif; }
.frpick small { font-size: 11px; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.frpick small svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }
.frpick.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.frpick:disabled { cursor: not-allowed; opacity: .55; }

/* ------------------------------------------------------------------ chat without typing */
#chat-fab { position: fixed; z-index: 58; right: 14px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); display: inline-flex; align-items: center; gap: 7px;
  height: 46px; padding: 0 16px 0 13px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .18); cursor: pointer; color: #fff; font: 800 14px Nunito, sans-serif;
  background: linear-gradient(180deg, #2a376a, #18224a); box-shadow: 0 8px 22px rgba(0, 0, 0, .5); }
#chat-fab svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linejoin: round; }
#chat-fab .dot, #chat-fab .at { display: none; position: absolute; top: -4px; border-radius: 99px; font-style: normal; }
#chat-fab .dot { right: 6px; width: 11px; height: 11px; background: var(--accent2); box-shadow: 0 0 8px var(--accent2); }
#chat-fab .at { right: -6px; padding: 1px 6px; background: var(--accent); color: #2b1a00; font: 800 12px Nunito, sans-serif; }
#chat-fab.unread .dot { display: block; } #chat-fab.mention .at { display: block; } #chat-fab.mention .dot { display: none; }
#chat-fab.on { background: linear-gradient(180deg, #8ff7ec, var(--cyan)); color: #032a26; }
#chat { position: fixed; z-index: 59; right: 0; left: 0; bottom: 0; top: 64px; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, #16203f, #0d1530); border: 1px solid var(--line); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .6); animation: chatin .2s ease-out; }
@keyframes chatin { from { transform: translateY(30px); opacity: 0; } }
@media (min-width: 700px) { #chat { left: auto; top: auto; right: 18px; bottom: 76px; width: 400px; height: min(640px, calc(100vh - 110px)); border-radius: 20px; } }
@media (min-width: 900px) { #chat-fab { bottom: 18px; right: 18px; } }
.ch-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ch-head > b { font: 600 17px Fredoka, sans-serif; }
.live { font: 400 9px var(--lcd); letter-spacing: 1px; color: var(--good); }
.ch-tabs { display: flex; gap: 4px; margin-left: auto; }
.ch-tab { position: relative; padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: none; color: var(--muted); font: 800 12px Nunito, sans-serif; cursor: pointer; }
.ch-tab.on { background: #0c1328; color: #fff; border-color: rgba(255, 255, 255, .2); }
.ch-tab.unread::after { content: ""; position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent2); }
.ch-x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .06); color: #fff; font-size: 20px; cursor: pointer; }
.ch-pin { padding: 7px 12px; font-size: 12px; color: #ffe39a; background: rgba(255, 203, 61, .08); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.ch-list { flex: 1; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg .avatar.sm { width: 30px; height: 30px; font-size: 13px; flex: none; }
.msg-b { min-width: 0; max-width: 86%; padding: 7px 10px; border-radius: 4px 14px 14px 14px; background: rgba(255, 255, 255, .06); }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .msg-b { border-radius: 14px 4px 14px 14px; background: rgba(63, 224, 208, .12); }
.msg.ment .msg-b { box-shadow: inset 0 0 0 1px var(--accent); background: rgba(255, 203, 61, .1); }
.msg-h { display: block; font-size: 12px; margin-bottom: 2px; }
.msg-h a { color: #c9d4f5; font-weight: 800; }
.ch-ph { margin: 0; font-size: 14px; color: #fff; line-height: 1.5; }
.men { color: var(--accent); } .men.me { padding: 0 4px; border-radius: 6px; background: var(--accent); color: #2b1a00; }
.ch-cardchip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 2px; border-radius: 99px; vertical-align: middle; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .25); color: #fff; font: 800 13px Nunito, sans-serif; }
.ch-cardchip img { width: 24px; height: 24px; object-fit: contain; }
.ch-card { display: flex; gap: 10px; align-items: center; }
.ch-card .mini { width: 70px; flex: none; }
.ch-card .btn { margin-top: 6px; }
.stk { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-width: 86px; padding: 8px 10px; border-radius: 16px;
  border: 2px solid #fff; background: linear-gradient(160deg, #3a2a8a, #1d72e0); transform: rotate(-3deg); box-shadow: 0 6px 14px rgba(0, 0, 0, .4); cursor: default; font: inherit; color: #fff; }
.stk span { font-size: 30px; line-height: 1.1; }
.stk b { font: 700 13px Fredoka, sans-serif; letter-spacing: .5px; }
.stk-gg, .stk-thanks { background: linear-gradient(160deg, #1f8a55, #3fd08a); }
.stk-lucky { background: linear-gradient(160deg, #0f6a2a, #8be08a); }
.stk-nooo, .stk-fire { background: linear-gradient(160deg, #a3122a, #ff7a59); }
.stk-hype, .stk-wow { background: linear-gradient(160deg, #b0389a, #ffb627); }
.stk-lab { background: linear-gradient(160deg, #17998e, #3fe0d0); color: #032a26; }
.stk-sleep { background: linear-gradient(160deg, #2b3a67, #5c6aa8); }
.ch-comp { border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .18); }
.ch-ctabs { display: flex; gap: 4px; padding: 6px 8px 0; }
.ch-ctabs button { flex: 1; padding: 7px 4px; border: 0; border-radius: 10px 10px 0 0; background: none; color: var(--muted); font: 800 12.5px Nunito, sans-serif; cursor: pointer; }
.ch-ctabs button.on { background: rgba(255, 255, 255, .06); color: #fff; }
.ch-cbody { max-height: 34vh; min-height: 120px; overflow-y: auto; padding: 8px; background: rgba(255, 255, 255, .03); }
@media (min-width: 700px) { .ch-cbody { max-height: 230px; } }
.ch-phrases { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-pb { padding: 7px 11px; border-radius: 12px; border: 1px solid var(--line); background: #0c1328; color: #e8edff; font: 700 12.5px Nunito, sans-serif; cursor: pointer; text-align: left; }
.ch-pb:hover { border-color: var(--cyan); }
.ch-pb i { font-style: normal; color: var(--accent); }
.ch-stks { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; padding: 4px; }
.ch-stks .stk { cursor: pointer; transform: none; min-width: 0; }
.ch-stks .stk:hover { transform: rotate(-3deg) scale(1.05); }
.ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.ch-mycard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: #0c1328; color: #dfe6ff; font: 700 11px Nunito, sans-serif; }
.ch-mycard img { width: 44px; height: 44px; object-fit: contain; }
.ch-mycard span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-mycard i { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: 9px; color: var(--accent); }
.ch-mycard:hover { border-color: var(--cyan); }
.ch-pick .search { margin: 6px 0; }
.ch-pick i { font-style: normal; color: var(--accent); }
.ch-pl { display: flex; flex-direction: column; gap: 4px; }
.ch-opt { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, .04);
  color: #fff; font: 700 13px Nunito, sans-serif; cursor: pointer; text-align: left; }
.ch-opt:hover { border-color: var(--cyan); }
.ch-opt img { width: 30px; height: 30px; object-fit: contain; }
.ch-opt small { margin-left: auto; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.msg .rx { margin-top: 4px; }
.msg .rx-p, .msg .rx-add { height: 22px; font-size: 11px; padding: 0 7px; }
#side a[data-chat] { cursor: pointer; }

/* ------------------------------------------------------------------ Infinimix additions */
/* language switch (footer, sign-in, sidebar, settings) */
.langsw { display: inline-flex; gap: 2px; padding: 2px; border-radius: 99px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); vertical-align: middle; }
.langsw button { border: 0; background: none; color: var(--muted); font: 800 11px Nunito, sans-serif; padding: 3px 8px; border-radius: 99px; cursor: pointer; }
.langsw button.on { background: var(--grad); color: #1a0f2e; }
.side-foot .langsw { margin: 8px 12px 0; align-self: flex-start; }
/* a fusion whose picture is still being drawn */
.card.sketch .art img { filter: drop-shadow(0 0 2cqw rgba(255, 255, 255, .35)); animation: sketchpulse 2.4s ease-in-out infinite; }
@keyframes sketchpulse { 50% { opacity: .78; } }
.card.sketch .credit { color: #ffe08a; }
.art-note, .first-note { color: #ffe08a; }
.lab-swap { cursor: default; font: 800 11px Nunito, sans-serif; letter-spacing: .3px; }
.frow .fthumb { width: 40px; height: 40px; object-fit: contain; flex: none; margin-right: 4px; }
/* the Infinidex triangle: one square per pair */
.mx-legend { display: inline-flex; align-items: center; gap: 6px; font: 700 12px Nunito, sans-serif; color: var(--muted); margin-left: 8px; }
.mx-legend .lg { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 4px; background: var(--panel2); border: 2px solid var(--line);
  font: 800 9px Nunito, sans-serif; margin-left: 6px; }
.mx-legend .lg.own { border-color: var(--accent); } .mx-legend .lg.known { background: #3a2f74; }
.mx-wrap { overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.mx { display: grid; grid-template-columns: repeat(var(--n), minmax(28px, 1fr)); gap: 3px; max-width: 700px; min-width: 330px; margin: 0 auto; }
.mx > * { aspect-ratio: 1; min-width: 0; }
.mx-corner { display: grid; place-items: center; } .mx-corner svg.inf { width: 80%; height: 40%; }
.mx-h { display: block; } .mx-h img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.mx-c { display: grid; place-items: center; padding: 1px; border-radius: 7px; border: 2px solid transparent; background: rgba(58, 47, 116, .55);
  color: var(--muted); font: 800 13px Fredoka, sans-serif; cursor: pointer; }
.mx-c img { width: 100%; height: 100%; object-fit: contain; }
.mx-c.hid { background: rgba(255, 255, 255, .04); border: 1px dashed rgba(255, 255, 255, .16); }
.mx-c.self { background: rgba(255, 255, 255, .05); opacity: .5; } .mx-c.self.own { opacity: 1; }
.mx-c.own { border-color: var(--accent); box-shadow: 0 0 8px rgba(255, 203, 61, .35); }
.mx-c.mxr-elite { background: rgba(255, 122, 26, .22); }
.mx-c.mxr-apex { background: rgba(255, 210, 61, .25); }
.mx-c:hover { transform: scale(1.08); }
/* element badges the creature game adds */
.t-LIGHT { background: #c58af0; } .t-METAL { background: #8a93a8; } .t-SWEET { background: #f06fa8; } .t-SKY { background: #5aa8e8; }
/* element packs: two elements each */
.pack3.e-ember { --f1: #7a1d05; --f2: #ff6a2b; --f3: #021c3d; --trim: #fff1e6; --trim2: #8fc8ff; --ink: #3a0e04; --glow: rgba(255, 120, 60, .55); }
.pack3.e-grove { --f1: #1b5e12; --f2: #ff8fc0; --f3: #0b2e07; --trim: #f0ffe8; --trim2: #ffb0d0; --ink: #103a08; --glow: rgba(255, 140, 190, .5); }
.pack3.e-storm { --f1: #7a5d00; --f2: #ffd93d; --f3: #062a4d; --trim: #fffbe0; --trim2: #9fd0ff; --ink: #3d2c00; --glow: rgba(255, 220, 60, .55); }
.pack3.e-frost { --f1: #1d5a66; --f2: #9ff5f2; --f3: #262b38; --trim: #eefcff; --trim2: #c3cad8; --ink: #0e2a33; --glow: rgba(160, 240, 255, .5); }
.pack3.e-dusk { --f1: #3a1470; --f2: #d9a8ff; --f3: #14062a; --trim: #f7ecff; --trim2: #b48cf0; --ink: #22073f; --glow: rgba(190, 140, 255, .55); }

/* ------------------------------------------------------------------ 3D pack opening (static/pack3d.js, three.js) */
#stage.three { background: #04060f; }
#stage.three .rays, #stage.three .st-glow { display: none; }
.p3d { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: grab; }
#stage.three .st-top, #stage.three .stage-grid, #stage.three .st-hint, #stage.three .stage-actions, #stage.three .st-done { z-index: 1; }
#stage.three.pre .stage-grid, #stage.three.pre .st-hint, #stage.three.pre .stage-actions, #stage.three.pre .st-done { visibility: hidden; }
#stage.three.landed3d .stage-grid { animation: fadein .3s; }
/* the cards wait in 3D: the page's card shows up only when its 3D twin turns to its edge (app.js show()) */
#stage.three .flipper:not(.flipped):not(.turning) { visibility: hidden; }
/* 19/11 (owner: "a spoiler aura on the special or legendary cards"): a face-down card hiding a shiny, a style or a
   Legendary / Apex pulses with a glow in its colour, around the card and never over it (also over the 3D cards) */
#stage .flipper.aura::after { content: ""; position: absolute; inset: 0; border-radius: 12px; pointer-events: none; visibility: visible;
  /* 22/11 (owner: "more natural"): a soft rim light hugging the card, breathing slowly */
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--aura) 70%, #fff), 0 0 10px 1px color-mix(in srgb, var(--aura) 75%, transparent), 0 0 26px 4px color-mix(in srgb, var(--aura) 35%, transparent);
  animation: aura-pulse 3.2s ease-in-out infinite; }
html.light #stage .flipper.aura.au-shadow { --aura: #3d0a85 !important; }   /* a violet glow vanishes on the pastel sky */
#stage .flipper.aura.au-prism::after { animation: aura-pulse 1.5s ease-in-out infinite, aura-hue 2.6s linear infinite; }
#stage.sealed .flipper.aura::after, #stage.three:not(.landed3d) .flipper.aura::after, #stage .flipper.aura.flipped::after { display: none; }
@keyframes aura-pulse { 50% { opacity: .62; } }
@keyframes aura-hue { to { filter: hue-rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #stage .flipper.aura::after { animation: none; } }
#stage.three .flipper.turning, #stage.three .flipper.flipped { z-index: 2; }
#stage.three .stage-grid { pointer-events: none; }   /* taps reach the 3D cards underneath */
#stage.three .stage-grid .flipper.flipped { pointer-events: auto; }
#stage.three.landed3d .p3d { touch-action: pan-y; }
.p3d-hint { position: fixed; z-index: 2; left: 0; right: 0; bottom: max(30px, env(safe-area-inset-bottom)); margin: 0; text-align: center; pointer-events: none;
  font: 400 12px var(--lcd); letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, .8); text-shadow: 0 1px 8px #000;
  animation: fadein .5s, blink 1.6s .8s infinite; transition: color .2s, transform .2s; }
.p3d-hint.lit { color: #fff; transform: scale(1.08); text-shadow: 0 0 12px rgba(255, 255, 255, .8), 0 1px 8px #000; animation: fadein .5s; }
#stage.three .st-top h2 { transition: opacity .3s; }
#stage.three.pre .st-top h2 { opacity: 0; }
/* the big-pull spotlight over the 3D stage: see-through, the stage behind plays the effect */
#spot.over3d { background: radial-gradient(circle at 50% 45%, rgba(3, 5, 12, 0) 0, rgba(3, 5, 12, .15) 35%, rgba(3, 5, 12, .62) 85%) !important; }
#spot.over3d .sp-fx { display: none; }
#spot.over3d .sp-scene { opacity: .1; }
#stage.three > :not(.p3d) { transition: opacity .25s; }
#stage.three.spotting > :not(.p3d) { opacity: 0; }   /* the page's cards and buttons step back behind a big pull */
body.lite .grid .card .shadow-aura, body.lite .grid .card .glitch-rgb, body.lite .grid .card .glitch-slice, body.lite .grid .card .retro-ghost { display: none; }
@media (prefers-reduced-motion: reduce) { .shadow-aura, .art img, .art::after, .card.st-retro .art img, .card.st-shadow .art img, .glitch-rgb::before,
  .glitch-rgb::after, .glitch-slice, .retro-ghost, .card.st-retro .art::before { animation: none; } }
/* a card turned by hand (app.js GRABBABLE): the finger moves it, not the page */
#stage .flipper.flipped .flip-front .card, #spot .sp-card .card, #zoom .card { touch-action: none; }
.card.grabbed { transition: transform .03s linear, box-shadow .25s; cursor: grabbing;
  box-shadow: 0 22px 44px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(255, 255, 255, .5); }
.card.grabbed .glare { opacity: 1; }

/* ------------------------------------------------------------------ cards breathe */
/* Every creature floats gently on its card, each card at its own pace (--d from cardHTML), its ground shadow
   breathing with it. Grids in "lite" mode and reduced motion stay still. */
.art img { animation: cardidle 3.6s ease-in-out var(--d, 0s) infinite; }
.art::after { animation: cardshadow 3.6s ease-in-out var(--d, 0s) infinite; }
@keyframes cardidle { 50% { translate: 0 -1.3cqw; scale: 1.015; } }
@keyframes cardshadow { 50% { scale: .86; opacity: .75; } }
.card.st-shadow .art img { animation: shadowbreath 3.2s ease-in-out infinite, cardidle 3.6s ease-in-out var(--d, 0s) infinite; }

/* Glitch: magenta and cyan copies of the creature sit just behind it, so only their edges show, and jump about;
   slices of it tear sideways now and then */
.glitch-rgb { position: absolute; z-index: 1; left: 7%; width: 86%; top: 12.5%; height: 54%; pointer-events: none;
  animation: cardidle 3.6s ease-in-out var(--d, 0s) infinite; }
.glitch-rgb::before, .glitch-rgb::after { content: ""; position: absolute; inset: 0; opacity: .8;
  -webkit-mask: var(--spr) center / contain no-repeat; mask: var(--spr) center / contain no-repeat; }
.glitch-rgb::before { background: #ff00c8; animation: glred 2.2s steps(1) infinite; }
.glitch-rgb::after { background: #00e5ff; animation: glcyan 2.2s steps(1) infinite; }
@keyframes glred { 0%, 100% { translate: -1cqw 0; } 20% { translate: -2.4cqw .4cqw; } 23% { translate: -.6cqw 0; }
  60% { translate: -1.8cqw -.6cqw; } 63% { translate: -1cqw 0; } 85% { translate: -3.2cqw 0; opacity: 1; } 88% { translate: -1cqw 0; opacity: .8; } }
@keyframes glcyan { 0%, 100% { translate: 1cqw 0; } 20% { translate: 2.2cqw -.4cqw; } 23% { translate: .6cqw 0; }
  60% { translate: 1.6cqw .6cqw; } 63% { translate: 1cqw 0; } 85% { translate: 3cqw 0; opacity: 1; } 88% { translate: 1cqw 0; opacity: .8; } }
.glitch-slice { position: absolute; z-index: 3; left: 7%; width: 86%; top: 12.5%; height: 54%; pointer-events: none; opacity: 0;
  background: var(--spr) center / contain no-repeat; animation: glcut 2.9s steps(1) infinite; }
@keyframes glcut { 0%, 100% { opacity: 0; } 14% { opacity: 1; clip-path: inset(22% 0 66% 0); translate: 3.5cqw 0; filter: hue-rotate(90deg); }
  17% { opacity: 0; } 52% { opacity: 1; clip-path: inset(58% 0 30% 0); translate: -4.5cqw 0; filter: invert(.8); } 55% { opacity: 0; }
  80% { opacity: 1; clip-path: inset(40% 0 52% 0); translate: 2.5cqw 0; filter: none; } 82% { opacity: 0; } }

/* Retro: the old screen's ghost trails the two-frame bob (it shows the previous frame, faintly) */
.retro-ghost { position: absolute; z-index: 1; left: 7%; width: 86%; top: 12.5%; height: 54%; pointer-events: none;
  -webkit-mask: var(--spr) center / contain no-repeat; mask: var(--spr) center / contain no-repeat;
  background: color-mix(in srgb, var(--gb0, #0f380f) 32%, transparent); animation: gbghost 1.1s steps(1) infinite; }
@keyframes gbghost { 0% { translate: .8cqw -1.45cqw; } 50% { translate: .8cqw 0; } }
.chip.zero { opacity: .45; }   /* a filter that would show nothing with the others chosen */
/* Foil's border: the same light white shine as its card (the rainbow border, .kfx-foil above, is Prism's), with any
   other kind it is stacked with (shiny, Shadow, Glitch, Retro) */
.card.foil .kfx-foil { mix-blend-mode: screen; opacity: .9;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .95) 50%, transparent 62%) 0 0 / 300% 300% no-repeat;
  animation: foilborder 5.5s ease-in-out infinite; }
@keyframes foilborder { 0%, 100% { background-position: 110% 110%; } 50% { background-position: -10% -10%; } }
.card.foil.tilting .kfx-foil { animation: none; background-position: var(--mx, 50%) var(--my, 50%); }
/* Names wear their element's colour (lightened to read on the art); a fusion's name runs from one parent's colour
   into the other's (cardHTML / miniCard: nameLook) */
.cn, .mini-name { color: var(--nc, #fff); }
.cn.mix, .mini-name.mix { background: linear-gradient(90deg, var(--nc1) 10%, var(--nc2) 90%); -webkit-background-clip: text; background-clip: text;
  color: transparent; text-shadow: none; }
.cn.mix { filter: drop-shadow(0 .6cqw 0 rgba(0, 0, 0, .6)) drop-shadow(0 0 1.4cqw rgba(0, 0, 0, .6)); }
.mini-name.mix { filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .8)); }
.card.glitch .cn.mix { filter: drop-shadow(2px 0 0 #ff00c8) drop-shadow(-2px 0 0 #00e5ff); }
.card.st-retro .cn.mix, .mini.st-retro .mini-name.mix { background: none; color: var(--gb0, #0f380f); filter: none; }
/* "You have it" marks on cards in the feed and in trades: a green tick, or a pink plus when you don't have it yet */
.own-mark { position: absolute; z-index: 6; top: 4px; left: 4px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  font: 800 11px/1 Nunito, sans-serif; color: #fff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85), 0 2px 4px rgba(0, 0, 0, .45); pointer-events: none; }
.own-mark.have { background: #22c55e; }
.own-mark.need { background: #ff4fa3; }
.act-thumb { position: relative; }
.mini .own-mark { width: 14px; height: 14px; font-size: 9px; top: 3px; left: 3px; }
/* a fusion's two parents under its card in the card menu */
.cm-parents { margin-top: 10px; text-align: center; }
.cm-par { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; }
.cm-par .mini { width: 74px; flex: none; cursor: pointer; transition: transform .12s; }
.cm-par .mini:hover { transform: translateY(-3px) scale(1.04); }
.cm-plus { font: 700 18px Fredoka, sans-serif; color: var(--accent, #ffd23d); }

/* 14/11 (owner): the Activity page's rare finds: a showcase on top and glowing rare items in the list (app.js viewFeed) */
.rare-show { margin: 4px 0 14px; padding: 12px 0 4px; border-radius: 22px; background: radial-gradient(120% 140% at 50% 0%, rgba(164, 112, 255, .25), transparent 70%); }
.rare-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 0 14px 8px; }
.rare-h b { font: 700 19px/1.1 Fredoka, sans-serif; background: linear-gradient(90deg, #ffd23d, #ff4fa3, #3dd6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rare-h small { font: 700 11px Nunito, sans-serif; color: var(--muted); }
.rare-rail { display: flex; gap: 12px; overflow-x: auto; padding: 6px 14px 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rare-rail::-webkit-scrollbar { display: none; }
.rare-tile { position: relative; flex: none; width: 138px; min-height: 196px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 10px 8px 10px; border-radius: 20px; overflow: hidden; color: #fff; text-decoration: none; cursor: pointer; font: inherit;
  border: 2px solid var(--rc); background: radial-gradient(110% 80% at 50% 30%, color-mix(in srgb, var(--rc) 45%, #1b1340), #120c2a 75%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 25%, transparent), 0 10px 26px color-mix(in srgb, var(--rc) 40%, transparent); }
.rare-tile:active { transform: scale(.97); }
.rare-glow { position: absolute; inset: -30%; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc) 70%, transparent), transparent 55%);
  animation: rare-pulse 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes rare-pulse { 50% { opacity: .55; transform: scale(1.08); } }
.rare-img { position: relative; width: 104px; height: 104px; display: grid; place-items: center; animation: rare-float 3s ease-in-out infinite; }
.rare-img img { max-width: 100%; max-height: 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
@keyframes rare-float { 50% { transform: translateY(-5px); } }
.rare-tag { position: relative; padding: 2px 9px; border-radius: 99px; font: 700 12px/1.3 Fredoka, sans-serif; letter-spacing: .08em; color: #1b1340;
  background: var(--rc); box-shadow: 0 0 12px var(--rc); }
.rare-name { position: relative; max-width: 100%; font: 700 14px/1.15 Fredoka, sans-serif; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rare-who { position: relative; max-width: 100%; font: 700 10.5px/1.2 Nunito, sans-serif; text-align: center; opacity: .9; }
.rare-when { position: relative; font: 700 9.5px Nunito, sans-serif; opacity: .65; }
.rf-star { position: absolute; left: var(--x); top: var(--y); color: #fff6c8; font-size: 13px; text-shadow: 0 0 8px #ffd23d; animation: rf-twinkle 1.6s ease-in-out var(--d) infinite; pointer-events: none; }
@keyframes rf-twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(20deg); } }
.rf-slice { position: absolute; left: -10%; right: -10%; top: var(--y); height: 6px; background: linear-gradient(90deg, transparent, #00ff9c, #ff00c8, transparent);
  mix-blend-mode: screen; opacity: 0; animation: rf-glitch 1.8s steps(2) var(--d) infinite; pointer-events: none; }
@keyframes rf-glitch { 0%, 80%, 100% { opacity: 0; transform: translateX(0); } 84% { opacity: .9; transform: translateX(-14px); } 90% { opacity: .7; transform: translateX(10px); } }
.rf-prism { position: absolute; inset: -40%; background: conic-gradient(from 0deg, #ff5f6d, #ffc371, #fff35c, #5cff9d, #5cc8ff, #b45cff, #ff5f6d);
  opacity: .28; mix-blend-mode: screen; animation: rf-spin 6s linear infinite; pointer-events: none; }
@keyframes rf-spin { to { transform: rotate(1turn); } }
.rf-smoke { position: absolute; bottom: -20px; left: var(--x); width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle, rgba(155, 77, 255, .7), transparent 70%);
  animation: rf-rise 3s ease-in var(--d) infinite; pointer-events: none; }
@keyframes rf-rise { 0% { opacity: 0; transform: translateY(0) scale(.6); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-150px) scale(1.4); } }
.rf-pixels { position: absolute; inset: 0; background-image: linear-gradient(rgba(155, 188, 15, .18) 1px, transparent 1px), linear-gradient(90deg, rgba(155, 188, 15, .18) 1px, transparent 1px);
  background-size: 8px 8px; pointer-events: none; }
.rf-rays { position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 40%, transparent) 0 10deg, transparent 10deg 30deg);
  animation: rf-spin 12s linear infinite; opacity: .55; pointer-events: none; }
.rare-none { margin: 0 14px 8px; padding: 14px; border-radius: 16px; border: 2px dashed var(--line); text-align: center; font: 700 13px/1.35 Nunito, sans-serif; color: var(--muted); }
.feed-stats .fs-rare b { background: linear-gradient(90deg, #ffd23d, #ff4fa3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chip.chip-rare { border-color: #ff4fa3; }
.feed-item.fi-rare { position: relative; border-radius: 20px; padding: 2px; background: linear-gradient(135deg, var(--rc), color-mix(in srgb, var(--rc) 30%, transparent), var(--rc));
  box-shadow: 0 0 18px color-mix(in srgb, var(--rc) 45%, transparent); }
.feed-item.fi-rare > :not(.fi-rare-tag) { border-radius: 18px; }
.fi-rare-tag { position: absolute; z-index: 2; top: -9px; right: 14px; padding: 1px 9px; border-radius: 99px; font: 700 11px/1.5 Fredoka, sans-serif; letter-spacing: .06em;
  color: #1b1340; background: var(--rc); box-shadow: 0 0 10px var(--rc); }
.act-thumb.world { background: linear-gradient(135deg, #2f86ff, #3dd6ff); }
.tag.world { background: linear-gradient(90deg, #2f86ff, #3dd6ff); color: #fff; }
@media (prefers-reduced-motion: reduce) { .rare-glow, .rare-img, .rf-star, .rf-slice, .rf-prism, .rf-smoke, .rf-rays { animation: none; } }
/* 14/11 (owner): the rare finds showcase on Home (top of the side column) */
.rare-show.on-home { margin: 0 0 12px; min-width: 0; }
.rare-more { margin-left: auto; font: 800 12px Nunito, sans-serif; color: #ff4fa3; text-decoration: none; }
.rare-show.on-home .rare-tile { width: 124px; min-height: 182px; }
.rare-show.on-home .rare-img { width: 92px; height: 92px; }
/* 14/11 (owner): Infinidex creatures you haven't had yet: silhouettes */
.dex.unseen img, .mx-h.unseen img, .mx-c.self.unseen img { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .5)); opacity: .9; }
.dex.unseen .no { opacity: .7; letter-spacing: .08em; }
/* 15/11 (owner): a creature you had once (fused, traded or recycled since) shows in colour, a little softer than one you hold */
.dex.had img { filter: saturate(.8); opacity: .82; }
.mx-c.self.had { opacity: .85; } .mx-c.self.had img { filter: saturate(.8); }
/* 15/11 (owner): the progressive Infinidex: creatures only seen (met in InfiniWorld, or in one of your fusions) in grey
   with their name, the counters without totals, and a mystery slot at the end of the grid */
.dex.met img, .mx-h.met img, .mx-c.self.met img { filter: grayscale(1) brightness(1.05); opacity: .55; }
.mx-c.self.met { opacity: .7; }
.dex.met .no { opacity: .8; }
.dex-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.dex-stats span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 4px 6px; border-radius: 12px; text-align: center;
  background: color-mix(in srgb, var(--accent, #a470ff) 10%, transparent); font: 800 10px/1.15 Nunito, sans-serif; color: var(--muted); }
.dex-stats span b { font-size: 17px; color: var(--text); }
.dex.more { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 110px; border: 2px dashed var(--line, #cdb4fb);
  background: transparent !important; box-shadow: none !important; }
.dex.more::after { display: none; }
.dex-q { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font: 700 28px/1 Fredoka, sans-serif; font-style: normal; color: #fff;
  background: linear-gradient(135deg, #ff8a3d, #ff4fa3 55%, #3dd6ff); box-shadow: 0 0 16px rgba(255, 79, 163, .45); animation: dexq 2.4s ease-in-out infinite; }
@keyframes dexq { 50% { transform: scale(1.08) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .dex-q { animation: none; } }
.unseen-card .art .silhouette { opacity: .9; }

/* 14/11 (owner): better borders for rare finds: an animated frame per kind (shiny gold, glitch digital, prism rainbow,
   shadow smoke, retro pixels, legendary/apex gold), on the showcase tiles and on the rare items of the Activity list */
@property --ra { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.rare-tile, .feed-item.fi-rare { --rb: conic-gradient(from var(--ra), var(--rc), #fff, var(--rc), color-mix(in srgb, var(--rc) 40%, #000), var(--rc)); }
.rare-tile { border: 0; padding: 13px 9px 11px; }
.feed-item.fi-rare { background: none; padding: 3px; }
.rare-tile::before, .feed-item.fi-rare::before { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 3px; pointer-events: none;
  background: var(--rb); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rb-spin 3.2s linear infinite; }
.feed-item.fi-rare::before { padding: 2.5px; border-radius: 20px; }
@keyframes rb-spin { to { --ra: 360deg; } }
/* shiny: warm gold with a white glint */
.rk-shiny { --rb: conic-gradient(from var(--ra), #fff6c8, #ffd23d 18%, #fff 25%, #ffb84d 40%, #fff6c8 55%, #ffd23d 75%, #fff 82%, #fff6c8); }
/* glitch: a digital split frame that jitters */
.rk-glitch { --rb: linear-gradient(90deg, #00ff9c, #ff00c8 33%, #00e5ff 66%, #00ff9c); }
.rk-glitch::before { background-size: 300% 100%; animation: rb-glitch 1.4s steps(6) infinite; }
@keyframes rb-glitch { 0% { background-position: 0 0; transform: translate(0, 0); } 30% { transform: translate(1px, -1px); } 35% { transform: translate(-2px, 1px); }
  40% { transform: translate(0, 0); } 100% { background-position: 300% 0; } }
/* prism: the full rainbow turning */
.rk-prism { --rb: conic-gradient(from var(--ra), #ff5f6d, #ffc371, #fff35c, #5cff9d, #5cc8ff, #b45cff, #ff5f6d); }
.rk-prism::before { animation-duration: 2.4s; }
/* shadow: dark violet smoke, slow */
.rk-shadow { --rb: conic-gradient(from var(--ra), #9b4dff, #2a0b45 20%, #d9b8ff 35%, #3b0f66 55%, #9b4dff 75%, #1a0630 90%, #9b4dff); }
.rk-shadow::before { animation-duration: 6s; }
/* retro: marching handheld pixels */
.rk-retro { --rb: repeating-linear-gradient(90deg, var(--g3, #9bbc0f) 0 6px, var(--g1, #306230) 6px 12px); }     /* 20/11: the card's palette */
.rk-retro::before { background-size: 24px 100%; animation: rb-march 1s steps(4) infinite; }
@keyframes rb-march { to { background-position: 24px 0; } }
/* legendary / apex: gold and rose with a shine sweeping round */
.rk-legendary, .rk-apex { --rb: conic-gradient(from var(--ra), #ffd23d, #fff 8%, #ff8a3d 20%, #ffd23d 40%, #ff6fd8 60%, #ffd23d 80%, #fff 88%, #ffd23d); }
/* a soft glow outside the frame, in the kind's colour */
.rare-tile { box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 35%, transparent), 0 0 18px color-mix(in srgb, var(--rc) 45%, transparent), 0 10px 24px rgba(20, 10, 60, .35); }
.rk-glitch.rare-tile { box-shadow: -2px 0 12px rgba(0, 255, 156, .45), 2px 0 12px rgba(255, 0, 200, .45), 0 10px 24px rgba(20, 10, 60, .35); }
@media (prefers-reduced-motion: reduce) { .rare-tile::before, .feed-item.fi-rare::before { animation: none; } }
/* 15/11 (owner: "remove the Mix Token from the game; only the coin, InfiniCoins"): the token counter is gone */
#tokens, .hp-tok { display: none !important; }
.tok.cc { color: inherit; }

/* 15/11 (owner: "the rare finds area got an ugly background: make a livelier one"): each kind has its own bright,
   moving backdrop behind the creature (the old one mixed the kind's colour with dark violet and came out grey):
   shiny warm gold with turning rays, Prism a holographic rainbow with a sweeping sheen, Glitch teal scanlines that
   flicker, Shadow violet smoke swirling, Retro handheld-green pixels scrolling, legendary/apex rose-gold rays */
.rare-show { background: linear-gradient(120deg, rgba(255, 138, 61, .16), rgba(255, 79, 163, .16) 40%, rgba(164, 112, 255, .16) 70%, rgba(61, 214, 255, .16));
  background-size: 220% 220%; animation: rk-aurora 9s ease-in-out infinite; }
@keyframes rk-aurora { 50% { background-position: 100% 100%; } }
.rare-tile { isolation: isolate; background: radial-gradient(120% 90% at 50% 28%, color-mix(in srgb, var(--rc) 70%, #3a1690), #1a0b40 74%); }
.rare-bg::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rare-tile .rare-name, .rare-tile .rare-who, .rare-tile .rare-when { color: #fff; text-shadow: 0 1px 2px rgba(10, 4, 30, .85), 0 0 8px rgba(10, 4, 30, .5); }
.rare-tile .rare-who b { color: #fff; }
.rk-shiny.rare-tile { background: radial-gradient(90% 70% at 50% 32%, #fff6c4 0%, #ffcf3d 24%, #ec8a16 54%, #6a2a05 100%); }
.rk-shiny .rare-bg::after { inset: -60%; background: repeating-conic-gradient(from 0deg, rgba(255, 252, 220, .6) 0 7deg, transparent 7deg 22deg);
  animation: rf-spin 11s linear infinite; mix-blend-mode: soft-light; }
.rk-prism.rare-tile { background: linear-gradient(135deg, #ff6fa8, #ffb86b, #fff07a, #7dffb0, #6fd0ff, #b98bff, #ff6fa8); background-size: 320% 320%;
  animation: rk-holo 6s ease-in-out infinite; }
.rk-prism .rare-bg::after { background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0) 0 16px, rgba(255, 255, 255, .42) 16px 20px, rgba(255, 255, 255, 0) 20px 38px);
  background-size: 220% 220%; animation: rk-sheen 3.2s linear infinite; mix-blend-mode: overlay; }
@keyframes rk-holo { 50% { background-position: 100% 100%; } }
@keyframes rk-sheen { to { background-position: 100% 0; } }
.rk-glitch.rare-tile { background: radial-gradient(100% 80% at 50% 30%, #11706a, #062a30 60%, #020c10 100%); }
.rk-glitch .rare-bg::after { background: repeating-linear-gradient(0deg, rgba(0, 255, 156, .12) 0 2px, transparent 2px 4px),
  linear-gradient(90deg, rgba(255, 0, 200, .22), transparent 30%, transparent 70%, rgba(0, 229, 255, .24)); animation: rk-flick 2.2s steps(1) infinite; }
@keyframes rk-flick { 0%, 100% { opacity: 1; transform: none; } 46% { transform: translateX(3px); opacity: .7; } 48% { transform: translateX(-3px) skewX(-6deg); } 50% { transform: none; opacity: 1; } }
.rk-shadow.rare-tile { background: radial-gradient(100% 80% at 50% 32%, #7a34e6, #33106a 52%, #0e0526 100%); }
.rk-shadow .rare-bg::after { inset: -30%; background: radial-gradient(circle at 28% 72%, rgba(170, 96, 255, .6), transparent 40%),
  radial-gradient(circle at 74% 34%, rgba(225, 196, 255, .38), transparent 34%), radial-gradient(circle at 50% 100%, rgba(80, 20, 160, .7), transparent 45%);
  animation: rk-swirl 7s ease-in-out infinite; }
@keyframes rk-swirl { 50% { transform: rotate(28deg) scale(1.18); } }
.rk-retro.rare-tile { background: radial-gradient(100% 80% at 50% 30%, color-mix(in srgb, var(--g3, #9bbc0f) 60%, var(--g2, #8bac0f)), var(--g2, #8bac0f) 55%, var(--g1, #306230) 100%); }
.rk-retro .rare-bg::after { background-image: linear-gradient(color-mix(in srgb, var(--g0, #0f380f) 32%, transparent) 2px, transparent 2px), linear-gradient(90deg, color-mix(in srgb, var(--g0, #0f380f) 32%, transparent) 2px, transparent 2px);
  background-size: 10px 10px; animation: rk-scroll 2s steps(5) infinite; }
@keyframes rk-scroll { to { background-position: 10px 10px; } }
.rk-legendary.rare-tile, .rk-apex.rare-tile { background: radial-gradient(90% 70% at 50% 30%, #fff0b8, #ff9a4d 36%, #c8246a 76%, #3a0a2e 100%); }
.rk-legendary .rare-bg::after, .rk-apex .rare-bg::after { inset: -60%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .45) 0 6deg, transparent 6deg 20deg);
  animation: rf-spin 14s linear infinite reverse; mix-blend-mode: soft-light; }
.rk-shiny .rare-glow, .rk-prism .rare-glow, .rk-retro .rare-glow { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .rare-show, .rare-tile, .rare-bg::after { animation: none !important; } }
/* 15/11 (owner: "put the card itself in rare finds, with eye-catching callouts"): the tile holds the real card (its frame,
   shine and variant effects), floating and tilting a little, with a starburst sticker shouting what it is */
.rare-tile { width: 150px; min-height: 0; gap: 4px; padding: 12px 9px 10px; }
.rare-show.on-home .rare-tile { width: 140px; min-height: 0; }
.rare-card { position: relative; z-index: 1; width: 112px; display: block; animation: rare-float 3.2s ease-in-out infinite; }
.rare-show.on-home .rare-card { width: 104px; }
.rare-card .card { width: 100%; pointer-events: none; transform: rotate(-3deg); box-shadow: 0 10px 22px rgba(10, 4, 30, .55), 0 0 22px color-mix(in srgb, var(--rc) 55%, transparent); }
.rare-burst { position: absolute; z-index: 4; top: -15px; right: -19px; width: 56px; height: 56px; display: grid; place-items: center; transform: rotate(14deg);
  background: var(--rc); clip-path: polygon(50% 0, 61% 14%, 79% 8%, 80% 26%, 98% 30%, 88% 46%, 100% 61%, 82% 68%, 84% 87%, 66% 84%, 55% 100%, 43% 87%, 25% 94%, 21% 76%, 3% 71%, 13% 55%, 0 39%, 18% 32%, 16% 13%, 35% 15%);
  filter: drop-shadow(0 3px 0 rgba(10, 4, 30, .55)); animation: rare-burst 1.6s ease-in-out infinite; }
.rare-burst span { max-width: 46px; font: 800 9.5px/1 Fredoka, sans-serif; letter-spacing: .02em; color: #1b1340; text-align: center; word-break: normal; overflow-wrap: normal;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.rk-glitch .rare-burst, .rk-retro .rare-burst { background: linear-gradient(135deg, #00ff9c, #ff00c8); }
.rk-glitch .rare-burst span, .rk-shadow .rare-burst span { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.rk-prism .rare-burst { background: conic-gradient(#ff6fa8, #ffb86b, #fff07a, #7dffb0, #6fd0ff, #b98bff, #ff6fa8); }
.rk-shadow .rare-burst { background: radial-gradient(circle, #b57bff, #4b1a9a); }
@keyframes rare-burst { 0%, 100% { transform: rotate(14deg) scale(1); } 50% { transform: rotate(8deg) scale(1.12); } }
/* 15/11 (owner: "put DISCOVERY all together"): a long single word stays on one line in a wider starburst */
.rare-burst.wide { width: 68px; height: 48px; top: -13px; right: -24px; }
.rare-burst.wide span { max-width: none; white-space: nowrap; font-size: 8.5px; letter-spacing: 0; }
.rare-new { position: absolute; z-index: 4; left: -10px; top: 44%; padding: 2px 7px; border-radius: 6px; transform: rotate(-12deg);
  font: 800 10px/1.3 Fredoka, sans-serif; letter-spacing: .08em; color: #fff; background: #ff3d6e; box-shadow: 0 2px 0 #8a0f33, 0 0 10px #ff3d6e; }
.rare-kick { position: relative; z-index: 1; margin-top: 4px; padding: 1px 8px; border-radius: 99px; font: 800 10.5px/1.4 Fredoka, sans-serif; letter-spacing: .06em;
  text-transform: uppercase; color: #1b1340; background: var(--rc); box-shadow: 0 0 12px var(--rc); max-width: 100%; text-align: center; line-height: 1.2; padding: 2px 8px; border-radius: 10px; }
.rk-glitch .rare-kick, .rk-shadow .rare-kick { color: #fff; background: color-mix(in srgb, var(--rc) 70%, #000); }
.rare-tile .rare-who, .rare-tile .rare-when { z-index: 1; }
.rk-elite.rare-tile { background: radial-gradient(100% 80% at 50% 30%, #ffe2b8, #ff8a2a 42%, #b23a0e 78%, #3a0d05 100%); }
.rk-elite .rare-bg::after { inset: -60%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .35) 0 5deg, transparent 5deg 18deg); animation: rf-spin 16s linear infinite; mix-blend-mode: soft-light; }
.rk-discovery.rare-tile { background: radial-gradient(100% 80% at 50% 30%, #e6fbff, #72d8ff 40%, #6a4dff 78%, #1a0b50 100%); }
@media (prefers-reduced-motion: reduce) { .rare-card, .rare-burst { animation: none; } }
/* 15/11 (owner: "a simple genetic inheritance system"): gene chips (card menu, Lab) and icons (battle plates) */
.gene { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 6px; border-radius: 99px; font: 800 12px/1.2 Nunito, sans-serif;
  color: #fff; background: var(--gc, #8a55f0); box-shadow: 0 2px 0 color-mix(in srgb, var(--gc, #8a55f0) 60%, #000); border: 0; }
.gene i { font-style: normal; font-size: 13px; }
.gene em { font-style: normal; font-size: 9.5px; letter-spacing: .08em; padding: 0 5px; border-radius: 99px; background: #ffd23d; color: #4a2a00; }
.gene.pure { box-shadow: 0 2px 0 color-mix(in srgb, var(--gc) 60%, #000), 0 0 0 2px #ffd23d, 0 0 12px rgba(255, 210, 61, .7); }
.gene small { font: 800 10px Nunito, sans-serif; opacity: .85; }
.g-vigor { --gc: #e5435d; } .g-fury { --gc: #ff7a1a; } .g-guard { --gc: #4a7bd8; } .g-regen { --gc: #23a86b; } .g-focus { --gc: #9b4dff; }
/* 20/11: the other twenty genes had no colour (their boxes showed bare) */
.g-ignite { --gc: #f0441f; } .g-rage { --gc: #c2255c; } .g-flow { --gc: #2f8fe8; } .g-tide { --gc: #0ea5b7; } .g-thorns { --gc: #4d8f2a; }
.g-sap { --gc: #7fb238; } .g-static { --gc: #d9a400; } .g-overcharge { --gc: #d9822b; } .g-frostbite { --gc: #3bb7f0; } .g-frostarmor { --gc: #6f9fd8; }
.g-phantom { --gc: #7a5cc4; } .g-curse { --gc: #9c3f8f; } .g-bulwark { --gc: #8a6a4f; } .g-ironclad { --gc: #6b7a90; } .g-charm { --gc: #ec4fa0; }
.g-treat { --gc: #f07aa0; } .g-dazzle { --gc: #c99a00; } .g-keen { --gc: #3a8f8f; } .g-gust { --gc: #58a6c9; } .g-updraft { --gc: #a689e0; }
.cm-genes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 2px; }
.cm-gl { font: 800 11px Nunito, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cm-gtx { flex-basis: 100%; font: 700 11.5px/1.3 Nunito, sans-serif; color: var(--muted); }
.lab-genes { margin-top: 8px; padding: 9px 10px; border-radius: 16px; border: 1px dashed color-mix(in srgb, #23d6b0 55%, transparent);
  background: linear-gradient(135deg, rgba(35, 214, 176, .1), rgba(138, 85, 240, .08)); }
.lab-genes.pure { border-style: solid; border-color: #ffd23d; box-shadow: 0 0 14px rgba(255, 210, 61, .35); }
.lg-h { display: block; font: 800 11px Nunito, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #19a88a; margin-bottom: 6px; }
.lg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lg-p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.lg-ab { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; font: 800 10px Nunito, sans-serif; font-style: normal; color: #fff; background: #7a5cf0; }
.lg-plus, .lg-eq { font: 800 15px Fredoka, sans-serif; color: var(--muted); }
.lg-p .gene.off { opacity: .45; filter: saturate(.5); box-shadow: none; }
.lg-p .gene.on { outline: 2px solid #fff; outline-offset: 1px; }
.lg-out { display: flex; gap: 4px; flex-wrap: wrap; }
.lg-tx { display: block; margin-top: 6px; font: 700 11.5px/1.3 Nunito, sans-serif; color: var(--muted); }
.lab-genes.pure .lg-tx { color: #c88a00; }
.wp-genes { display: inline-flex; gap: 1px; margin-left: 3px; }
.gi { font-style: normal; font-size: 11px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.gi.pure { filter: drop-shadow(0 0 3px #ffd23d); }
/* 15/11 (owner: "frame the rare finds better, improve the composition, and put the sticker outside"): the header is
   one row (title + See all) over the subtitle; the rail starts on the padding (scroll-padding) and fades at its edges;
   each tile clips only its effects layer, so the sticker hangs over the top-right corner, outside the frame; the
   callout is a ribbon on the card's foot and the who/when/how sit in a footer band aligned across the row */
.rare-h { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 3px 10px; padding: 0 14px 2px; }
.rare-h > b { grid-column: 1; grid-row: 1; }
.rare-h .rare-more { grid-column: 2; grid-row: 1; margin: 0; padding: 4px 10px; border-radius: 99px; white-space: nowrap;
  background: color-mix(in srgb, #ff4fa3 13%, transparent); }
.rare-h small { grid-column: 1 / -1; grid-row: 2; line-height: 1.35; }
.rare-rail { gap: 14px; padding: 32px 14px 16px; scroll-padding-inline: 14px; align-items: stretch;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 24px), transparent); }
.rare-tile, .rare-show.on-home .rare-tile { width: 148px; overflow: visible; gap: 0; padding: 16px 9px 0; border-radius: 22px; }
.rare-show:not(.on-home) .rare-tile { width: 158px; }
.rare-card, .rare-show.on-home .rare-card { width: 110px; }
.rare-show:not(.on-home) .rare-card { width: 118px; }
.rare-bg { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
/* the sticker: on the tile's corner, half outside */
.rare-burst { top: -24px; right: -3px; z-index: 6; width: 60px; height: 60px; }
.rare-burst span { max-width: 48px; }
.rare-burst.wide { top: -21px; right: -5px; width: 72px; height: 52px; }
/* the callout ribbon on the card's foot */
.rare-kick { z-index: 2; margin-top: -9px; max-width: calc(100% + 4px); padding: 3px 9px; font-size: 10px; letter-spacing: .03em; border-radius: 9px;
  box-shadow: 0 3px 0 rgba(10, 4, 30, .45), 0 0 14px var(--rc); }
/* who, when and how in a footer band */
.rare-foot { position: relative; z-index: 1; align-self: stretch; margin: auto -9px 0; padding: 12px 8px 11px; display: flex; flex-direction: column;
  align-items: center; gap: 2px; border-radius: 0 0 22px 22px; background: linear-gradient(180deg, transparent, rgba(10, 4, 30, .5) 40%); }
.rare-tile .rare-who { display: flex; align-items: baseline; justify-content: center; gap: 5px; max-width: 100%; font: 800 12px/1.2 Nunito, sans-serif; opacity: 1; }
.rare-tile .rare-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rare-tile .rare-when { flex: none; font: 700 9.5px/1.2 Nunito, sans-serif; font-style: normal; opacity: .72; }
.rare-how { max-width: 100%; font: 700 10px/1.25 Nunito, sans-serif; text-align: center; color: #fff; opacity: .88; text-shadow: 0 1px 2px rgba(10, 4, 30, .85); }
/* 15/11 (owner: "explain what each inherited gene does and the %, simply enough for children"): the Lab's gene rows */
.lg-intro { display: block; margin: -2px 0 8px; font: 700 12px/1.35 Nunito, sans-serif; color: var(--muted); }
.lg-pick { display: block; margin-top: 7px; font: 700 11.5px/1.35 Nunito, sans-serif; color: var(--muted); }
.lg-foot { display: block; margin-top: 8px; font: 700 11.5px/1.3 Nunito, sans-serif; color: var(--muted); }
.gx-list { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.gx { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 10px 9px; border-radius: 15px;
  background: color-mix(in srgb, var(--gc) 10%, transparent); border: 1.5px solid color-mix(in srgb, var(--gc) 38%, transparent); }
.gx.pure { border-color: #ffd23d; box-shadow: 0 0 12px rgba(255, 210, 61, .35); }
.gx-ico { align-self: start; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; font-style: normal; font-size: 20px;
  background: var(--gc); box-shadow: 0 2px 0 color-mix(in srgb, var(--gc) 60%, #000); }
.gx-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gx-t > b { font: 800 13.5px/1.2 Nunito, sans-serif; color: var(--gc); }
html:not(.light) .gx-t > b { color: color-mix(in srgb, var(--gc) 55%, #fff); }
.gx-t > b em { font-style: normal; font-size: 9.5px; letter-spacing: .08em; padding: 0 5px; border-radius: 99px; background: #ffd23d; color: #4a2a00; vertical-align: 1px; }
.gx-t > small { font: 700 12.5px/1.35 Nunito, sans-serif; color: inherit; }
.gx-pc { padding: 5px 9px; border-radius: 12px; font: 700 17px/1 Fredoka, sans-serif; color: #fff; background: var(--gc); white-space: nowrap;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--gc) 60%, #000); }
.gx.pure .gx-pc { box-shadow: 0 2px 0 color-mix(in srgb, var(--gc) 60%, #000), 0 0 0 2px #ffd23d; }
.gx-bar { display: flex; height: 15px; margin-top: 3px; border-radius: 99px; overflow: hidden; font: 800 9.5px/15px Nunito, sans-serif; text-align: center; }
.gx-bar i { font-style: normal; color: #fff; background: color-mix(in srgb, var(--gc) 35%, #9a93b8); }
.gx-bar b { min-width: 22px; color: #fff; background: var(--gc); box-shadow: inset 2px 0 0 #fff; }
.gx-bar.gd b { font-size: 10px; background: repeating-linear-gradient(45deg, var(--gc) 0 4px, color-mix(in srgb, var(--gc) 55%, #fff) 4px 8px); }
/* 15/11 (owner: "I liked the Shadow effect in the game: put the same effect on the card"): the card's Shadow aura is now the
   battle's flames (battle3d.js SIL_FS). Two layers in the creature's own outline (its picture as a mask), softened
   together: a deep violet glow hugging the body, and the outline stretched upward and filled with violet tongues that
   rise (art/fx-shadowflame.webp, a tileable flame texture scrolling up), flickering taller and shorter. */
.shadow-aura { -webkit-mask: none; mask: none; background: none; filter: blur(.55cqw) saturate(1.15); transform: none; opacity: 1;
  animation: none; overflow: visible; }
.shadow-aura::before, .shadow-aura::after { content: ""; position: absolute; inset: 0; transform-origin: 50% 90%;
  -webkit-mask: var(--spr) center / contain no-repeat; mask: var(--spr) center / contain no-repeat; }
.shadow-aura::before { background: radial-gradient(closest-side, #9a4dff, #5a12c8 60%, #2a0058); transform: scale(1.1, 1.09);
  animation: shbody 2.6s ease-in-out infinite; }
.shadow-aura::after { background: url(/art/fx-shadowflame.webp?v=1) 0 0 / 46cqw auto repeat; transform: scale(1.18, 1.3) translateY(-3%);
  -webkit-mask: var(--spr) center / contain no-repeat, linear-gradient(to top, #000 45%, rgba(0, 0, 0, .55) 72%, transparent 96%);
  -webkit-mask-composite: source-in;
  mask: var(--spr) center / contain no-repeat, linear-gradient(to top, #000 45%, rgba(0, 0, 0, .55) 72%, transparent 96%); mask-composite: intersect;
  animation: shrise 1.7s linear infinite, shlick 1.25s ease-in-out infinite alternate; }   /* the tips fade out as they rise */
@keyframes shbody { 50% { transform: scale(1.13, 1.12); opacity: .85; } }
@keyframes shrise { to { background-position: 0 -92cqw; } }
@keyframes shlick { from { transform: scale(1.16, 1.26) translateY(-2%); } to { transform: scale(1.21, 1.36) translateY(-4%); } }
@media (prefers-reduced-motion: reduce) { .shadow-aura::before, .shadow-aura::after { animation: none; } }
/* 15/11 (owner: "a tab up top with only the new Infinimons found, with who found it well highlighted"): the finds block's
   two tabs and the new-Infinimon tiles (a cyan "first in the world" tile, the finder on a big gold badge) */
.rare-tabs { grid-column: 1 / -1; grid-row: 1; display: flex; gap: 4px; min-width: 0; padding: 3px; border-radius: 14px; background: rgba(120, 90, 210, .14); }
.rare-h small[data-pane] { grid-column: 1; grid-row: 2; }
.rare-h .rare-more { grid-column: 2; grid-row: 2; align-self: center; }
.rare-tabs button { flex: 1 1 0; min-width: 0; padding: 7px 6px; border: 0; border-radius: 11px; background: none; cursor: pointer; white-space: nowrap;
  font: 700 13.5px/1.1 Fredoka, sans-serif; color: var(--muted); }
.rare-tabs button.on { color: #2c2650; background: #fff; box-shadow: 0 2px 8px rgba(80, 50, 160, .2); }
html:not(.light) .rare-tabs button.on { color: #fff; background: rgba(255, 255, 255, .14); }
.rare-tabs button[data-rt="new"].on { color: #fff; background: linear-gradient(110deg, #1fb6ff, #6a4dff); }
.rare-tabs button[data-rt="rare"].on { background: linear-gradient(110deg, #ffd23d, #ff4fa3); color: #fff; }
.rare-tabs em { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 3px; padding: 0 5px; border-radius: 99px; font: 800 11px/1 Nunito, sans-serif;
  font-style: normal; color: #fff; background: #ff4f6f; vertical-align: 1px; }
.rare-show[data-tab="new"] [data-pane="rare"], .rare-show[data-tab="rare"] [data-pane="new"] { display: none; }
.rare-show[data-tab="new"] .rare-more { visibility: hidden; }
.rk-new.rare-tile { background: radial-gradient(100% 80% at 50% 30%, #e6fbff, #5fe3ff 40%, #3a6dff 78%, #10154a 100%); }
.rk-new .rare-bg::after { inset: -60%; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .35) 0 5deg, transparent 5deg 18deg);
  animation: rf-spin 18s linear infinite; mix-blend-mode: soft-light; }
.nt-by { position: relative; z-index: 2; margin-top: -11px; display: flex; align-items: center; gap: 7px; max-width: calc(100% + 8px); padding: 4px 13px 4px 4px;
  border-radius: 99px; color: #3a1a00; background: linear-gradient(100deg, #fff3a8, #ffd23d 45%, #ff9a3d);
  box-shadow: 0 3px 0 rgba(10, 4, 30, .45), 0 0 18px rgba(255, 210, 61, .75); }
.nt-av { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font: 700 16px/1 Fredoka, sans-serif; font-style: normal;
  color: #fff; background: linear-gradient(135deg, #ff4fa3, #6a4dff); box-shadow: 0 0 0 2px #fff; }
.nt-by > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; text-align: left; }
.nt-by small { font: 800 8.5px/1.2 Nunito, sans-serif; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.nt-by b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 17px/1.1 Fredoka, sans-serif; }
.new-tile .rare-foot { gap: 1px; }
/* 15/11 (owner: "show them smaller on the menu, 3 of each"): Home's finds are three small tiles side by side per tab, no
   sideways scroll; See all opens the full list (the Activity page keeps the big rail) */
.rare-show.on-home .rare-h .rare-more { visibility: visible; }
.rare-show.on-home .rare-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow: visible;
  padding: 24px 12px 12px; -webkit-mask-image: none; mask-image: none; }
.rare-show.on-home .rare-tile, .rare-show.on-home .new-tile { width: auto; min-width: 0; padding: 10px 5px 0; border-radius: 16px; }
.rare-show.on-home .rare-card { width: 86%; }
.rare-show.on-home .rare-burst { top: -17px; right: -5px; width: 42px; height: 42px; }
.rare-show.on-home .rare-burst span { max-width: 34px; font-size: 7.5px; }
.rare-show.on-home .rare-burst.wide { top: -15px; right: -6px; width: 52px; height: 36px; }
.rare-show.on-home .rare-burst.wide span { font-size: 6.5px; }
.rare-show.on-home .rare-new { left: -6px; padding: 1px 5px; font-size: 7.5px; }
.rare-show.on-home .rare-kick { margin-top: -7px; padding: 2px 5px; font-size: 7.5px; letter-spacing: .02em; border-radius: 7px; }
.rare-show.on-home .rare-foot { margin: auto -5px 0; padding: 8px 4px 7px; border-radius: 0 0 16px 16px; }
.rare-show.on-home .rare-tile .rare-who { gap: 3px; font-size: 10px; }
.rare-show.on-home .rare-tile .rare-when { font-size: 8px; }
.rare-show.on-home .rare-how { font-size: 8px; line-height: 1.2; }
.rare-show.on-home .nt-by { margin-top: -8px; gap: 4px; max-width: calc(100% + 6px); padding: 2px 7px 2px 2px; }
.rare-show.on-home .nt-av { width: 20px; height: 20px; font-size: 11px; box-shadow: 0 0 0 1.5px #fff; }
.rare-show.on-home .nt-by small { font-size: 6px; }
.rare-show.on-home .nt-by b { font-size: 12px; }
.rare-show.on-home .rare-tabs button { font-size: 12.5px; }
/* 15/11 (owner: "vary the colours by the card's element"): a New Infinimon's tile in its elements' colours (newTile sets
   --e1 and --e2), a white light behind the card; the NEW! burst and the glow around it take them too */
.rk-new.rare-tile.new-tile { background: radial-gradient(85% 55% at 50% 24%, rgba(255, 255, 255, .5), transparent 65%),
  linear-gradient(155deg, var(--e1) 6%, color-mix(in srgb, var(--e1) 55%, var(--e2)) 42%, var(--e2) 72%, color-mix(in srgb, var(--e2) 45%, #0d0730) 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--e1) 40%, transparent), -6px 0 18px color-mix(in srgb, var(--e1) 45%, transparent),
    6px 0 18px color-mix(in srgb, var(--e2) 45%, transparent), 0 10px 24px rgba(20, 10, 60, .35); }
.new-tile .rare-burst { background: linear-gradient(135deg, color-mix(in srgb, var(--e1) 70%, #fff), var(--e2)); }
/* 15/11 (owner: "put a Lab and an Exploration seal"): where a find came from, a tilted pill on the tile's top left */
.nt-src { position: absolute; z-index: 5; top: -9px; left: -7px; padding: 3px 9px 3px 7px; border-radius: 99px; transform: rotate(-7deg); white-space: nowrap;
  font: 800 10.5px/1.2 Nunito, sans-serif; letter-spacing: .02em; color: #fff; text-shadow: 0 1px 2px rgba(10, 4, 30, .5);
  box-shadow: 0 2px 0 rgba(10, 4, 30, .45), inset 0 0 0 1.5px rgba(255, 255, 255, .5); }
.nt-src.lab { background: linear-gradient(110deg, #b06bff, #ff4fa3); box-shadow: 0 2px 0 rgba(10, 4, 30, .45), inset 0 0 0 1.5px rgba(255, 255, 255, .5), 0 0 12px rgba(255, 79, 163, .55); }
.nt-src.world { background: linear-gradient(110deg, #13b896, #3d8bff); box-shadow: 0 2px 0 rgba(10, 4, 30, .45), inset 0 0 0 1.5px rgba(255, 255, 255, .5), 0 0 12px rgba(61, 139, 255, .55); }
.rare-show.on-home .nt-src { top: -8px; left: -5px; padding: 2px 7px 2px 5px; font-size: 8.5px; }
/* 15/11 (owner: "when it's collection time put a button up top to collect the income"): the Collect pill beside the coins */
.topclaim { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 5px; border: 0; border-radius: 99px; cursor: pointer;
  font: 800 12px/1 Nunito, sans-serif; color: #4a2a00; background: linear-gradient(110deg, #fff3a8, #ffd23d 45%, #ff9a3d);
  box-shadow: 0 2px 0 rgba(120, 60, 0, .55), 0 0 14px rgba(255, 210, 61, .7); animation: topclaim 1.6s ease-in-out infinite; }
.topclaim[hidden] { display: none; }
.topclaim .coin { width: 18px; height: 18px; }
.topclaim b { font: 700 13px/1 Fredoka, sans-serif; }
.topclaim small { font: 800 10px/1 Nunito, sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.topclaim:disabled { opacity: .6; animation: none; }
@keyframes topclaim { 50% { transform: scale(1.06); box-shadow: 0 2px 0 rgba(120, 60, 0, .55), 0 0 22px rgba(255, 210, 61, .95); } }
@media (max-width: 380px) { .topclaim small { display: none; } }
@media (prefers-reduced-motion: reduce) { .topclaim { animation: none; } }
@media (max-width: 440px) { #top:has(.topclaim:not([hidden])) .logo small { display: none; } }

/* 16/11 (owner): typing in the chat (13+), the month-of-birth question, typed messages, reports */
.ch-write { display: flex; gap: 6px; padding: 4px 2px 2px; }
.ch-write input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: 700 14px Nunito, sans-serif; }
.ch-write input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 19/11: the friends list on your profile */
.fr-list { display: flex; flex-direction: column; gap: 8px; }
.fr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.fr-who { flex: 1 1 180px; display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); text-decoration: none; }
.fr-who span:last-child { display: flex; flex-direction: column; min-width: 0; }
.fr-who b { font: 700 15px Fredoka, sans-serif; } .fr-who small { color: var(--muted); font: 700 12px Nunito, sans-serif; }
.fr-mut { font-style: normal; color: #1faa68; font-weight: 800; }
.fr-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
#friend-b.on { border-color: #1faa68; color: #1faa68; }
/* 19/11: My cards: the element chips */
.el-chips { margin-top: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.elchip { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px 3px 4px; border-radius: 99px; cursor: pointer;
  border: 1.5px solid color-mix(in srgb, var(--ec) 50%, var(--line)); background: var(--panel); color: var(--text); font: 800 12.5px Nunito, sans-serif; }
.elchip img, .elchip svg { width: 20px; height: 20px; }
.elchip.on { color: #fff; border-color: transparent; background: var(--ec); box-shadow: 0 3px 10px color-mix(in srgb, var(--ec) 45%, transparent); }
/* 19/11: a commission's new fusion, told by the game in the chat */
.msg.news { justify-content: center; }
.news-b { width: 100%; padding: 8px 10px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, transparent), color-mix(in srgb, #ff6fd8 12%, transparent)); text-align: center; }
.news-b p { margin: 6px 0 2px; font-size: 13px; line-height: 1.35; }
.news-b .ch-cardchip { margin: 0 auto; }
/* 19/11: @ mentions: the button, the suggestions over the box */
/* 19/11: the trade guard's rules on the trade page */
.tg-rules { margin: 8px 0 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); font-size: 13px; }
.tg-rules summary { cursor: pointer; font-weight: 800; }
.tg-rules ul { margin: 6px 0 2px; padding-left: 18px; }
.tg-rules li { margin: 3px 0; color: var(--muted); }
.ch-atbtn { flex: none; width: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); color: var(--accent); font: 900 17px Nunito, sans-serif; cursor: pointer; }
.ch-at { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 2px 4px; max-height: 120px; overflow-y: auto; }
.ch-at[hidden] { display: none; }
.ch-atopt { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: 800 13px Nunito, sans-serif; cursor: pointer; }
.ch-atopt:hover, .ch-atopt:focus-visible { border-color: var(--accent); }
.ch-wnote { display: block; padding: 4px 4px 2px; font: 700 10.5px Nunito, sans-serif; color: var(--muted); }
.ch-birth { padding: 4px 4px 2px; font-size: 13px; }
.ch-birth p { margin: 0 0 8px; line-height: 1.35; }
.ch-brow { display: flex; gap: 6px; flex-wrap: wrap; }
.ch-brow select { flex: 1; min-width: 92px; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--text); font: 700 13px Nunito, sans-serif; }
.ch-birth small { display: block; margin-top: 6px; font-weight: 700; font-size: 10.5px; color: var(--muted); }
.ch-tx { margin: 2px 0 0; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.ch-tx.gone { font-style: italic; color: var(--muted); font-size: 12.5px; }
.ch-acts { margin-left: auto; display: inline-flex; gap: 2px; }
.msg-h { display: flex; align-items: baseline; gap: 6px; }
.ch-rep { border: 0; background: none; padding: 0 4px; cursor: pointer; color: var(--muted); font-size: 12px; opacity: .55; }
.ch-rep:hover { opacity: 1; color: #e5435d; }

/* 16/11 (owner: "the phone HUD is glitching, it can be dragged sideways, the framing is odd"): the top bar (logo, theme,
   Collect, coins) was ~10 px wider than a phone, so every page panned sideways. It is compact on a phone now, and the
   page itself can never scroll sideways (clip keeps the sticky top bar working; the rails scroll inside themselves). */
html, body { overflow-x: clip; }
@media (max-width: 460px) {
  #top { gap: 6px; padding: 0 8px; }
  .lens, .lens svg.inf { width: 34px; }
  .logo { min-width: 0; flex: 0 1 auto; margin-left: 0; }
  .logo b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
  .top-right { gap: 5px; flex: none; }
  .theme-t { width: 28px; height: 28px; }
  .theme-t svg { width: 15px; height: 15px; }
  .topclaim { padding: 3px 9px 3px 4px; gap: 4px; }
  .topclaim small { display: none; }
  .topclaim .coin, #top .coins .coin { width: 16px; height: 16px; }
  .coins { padding: 3px 9px 3px 5px; gap: 4px; }
  .coins b { font-size: 12px; }
}

/* 18/11 (owner: "the genetic % on the card"): a fusion's family DNA on its plate */
.cdna { display: flex; gap: 1.3cqw; overflow: hidden; }
.cdna span { display: inline-flex; align-items: center; gap: .7cqw; flex: none; padding: .35cqw 1.7cqw .35cqw .35cqw; border-radius: 99px;
  font: 800 4.7cqw/1 Nunito, sans-serif; color: #fff; background: color-mix(in srgb, var(--c) 28%, rgba(8, 10, 28, .7));
  box-shadow: inset 0 0 0 .35cqw color-mix(in srgb, var(--c) 75%, transparent); }
.cdna img { width: 5.8cqw; height: 5.8cqw; object-fit: contain; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.cdna .more { padding: .35cqw 1.6cqw; color: #c9d1f2; background: rgba(255, 255, 255, .1); box-shadow: none; }
.card.st-retro .cdna span { color: var(--gb3); background: var(--gb1); box-shadow: none; }
/* the back: the DNA bar and its creatures */
.cback-dna { display: flex; flex-direction: column; gap: 1.6cqw; padding: 2.4cqw 2.6cqw; border-radius: 3cqw; background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1); }
.cbd-k { font: 400 4cqw var(--lcd); letter-spacing: .4px; text-transform: uppercase; color: #8f9bc4; }
.cbd-bar { display: flex; gap: .5cqw; height: 2.6cqw; border-radius: 99px; overflow: hidden; }
.cbd-bar i { background: var(--c); min-width: .8cqw; }
.cbd-leg { display: flex; flex-wrap: wrap; gap: 1cqw 2.6cqw; font: 800 4.6cqw/1.15 Nunito, sans-serif; color: #fff; }
.cbd-leg span { display: inline-flex; align-items: center; gap: .9cqw; }
.cbd-leg span::before { content: ""; width: 2cqw; height: 2cqw; border-radius: 50%; background: var(--c); flex: none; }
.cbd-leg img { width: 6cqw; height: 6cqw; object-fit: contain; }
.cbd-leg b { font-weight: 700; color: #dfe6ff; }
.cback dl { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent;
  gap: 1.3cqw 3.4cqw; font-size: 5cqw; line-height: 1.2; padding-right: 1cqw; }
.cback dl::-webkit-scrollbar { width: 1.4cqw; }
.cback dl::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(255, 255, 255, .25); }
.cback dt { padding-top: .6cqw; font-size: 3.7cqw; }
.cback dd small { font-weight: 700; color: #aeb9e0; }
.cback-in { gap: 2.4cqw; padding-top: 6%; }
.cback-h { padding-bottom: 2.2cqw; }

/* 18/11 (owner: "the glow effects are too strong in the whole game; sometimes you can't see the creature"): every
   light effect toned down: the screen flashes, the foil and prism shine, the shiny stars, the light sweep and the glare */
@keyframes flash { from { opacity: .42; } to { opacity: 0; } }
.holo { opacity: .45; }
.card.foil .holo { opacity: .55; }
.card.tilting .holo { opacity: .6; }
.kfx-foil { opacity: .5; }
.card.tilting .kfx-foil { opacity: .65; }
.glare { background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .55), transparent 50%); }
.card-in::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .26) 50%, transparent); }
.sparkles b { text-shadow: 0 0 1.2cqw #ffe680; }
@keyframes twinkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 45% { transform: scale(.9) rotate(90deg); opacity: .7; }
  60% { transform: scale(.6) rotate(120deg); opacity: .5; } }
@keyframes kstar { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); } 40% { opacity: .7; transform: scale(.85) rotate(45deg); }
  62% { opacity: 0; transform: scale(.3) rotate(90deg); } }
.prism-aura { filter: blur(1.5cqw) saturate(1.3); opacity: .7; }
.card.st-prism.tilting .prism-aura { filter: blur(1.5cqw) saturate(1.4) brightness(1.05); }
.card.st-prism .art img { filter: drop-shadow(0 0 .3cqw rgba(255, 255, 255, .6)) drop-shadow(0 2.2cqw 2cqw rgba(0, 0, 0, .55)); }
.shadow-aura { opacity: .8; }
.card.shiny { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 0 1.5px #fff6c8, 0 0 10px rgba(255, 232, 140, .4); }
.card.lv3 { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 236, 170, .9), 0 0 12px rgba(255, 190, 60, .35); }
@keyframes crest { 50% { filter: brightness(1.1) drop-shadow(0 0 2px rgba(255, 214, 110, .6)); } }
.mystery-q { text-shadow: 0 0 3cqw rgba(120, 220, 255, .7), 0 0 8cqw rgba(190, 120, 255, .5); }

/* 18/11 (owner: "a recolour into dark colours ... and a little less gloom"): the Shadow card a touch lighter: a softer
   veil over its scenery, gentler smoke, flames and pulse */
.card.st-shadow .card-in::before { background: radial-gradient(70% 55% at 50% 40%, rgba(80, 20, 140, .22), transparent 70%),
  linear-gradient(180deg, rgba(14, 4, 26, .58), rgba(14, 4, 26, .32) 40%, rgba(10, 2, 20, .7)); }
@keyframes shadowaura {
  0%, 100% { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 0 1px #9b4dff, 0 0 10px rgba(155, 77, 255, .35); }
  50% { box-shadow: 0 6px 16px rgba(0, 0, 0, .5), 0 0 0 1px #b77dff, 0 0 20px 2px rgba(120, 40, 220, .5), 0 -4px 18px rgba(60, 0, 110, .4); } }
@keyframes shadowbreath { 0%, 100% { filter: drop-shadow(0 1.8cqw 1.6cqw rgba(0, 0, 0, .6)); }
  50% { filter: drop-shadow(0 0 1.8cqw rgba(176, 107, 255, .45)) drop-shadow(0 1.8cqw 1.6cqw rgba(0, 0, 0, .6)); } }
.shadow-aura { opacity: .6; }
.shadowfx { opacity: .6; }
.mini.st-shadow .mini-bg { filter: brightness(.45) saturate(.6); }

/* 18/11 (owner: "a level system"): the level on the card face (the stars only show from 2) and in the card menu */
.clv { flex: none; display: inline-flex; align-items: baseline; gap: .5cqw; padding: .8cqw 2.4cqw; border-radius: 99px;
  font: 700 7.6cqw/1 Fredoka, sans-serif; color: #fff; background: linear-gradient(180deg, #7b6bff, #4429c2);
  box-shadow: inset 0 .5cqw 0 rgba(255, 255, 255, .35), 0 .6cqw 1.6cqw rgba(0, 0, 0, .45); text-shadow: 0 .4cqw 0 rgba(0, 0, 0, .35); }
.clv small { font: 800 4.6cqw/1 Nunito, sans-serif; opacity: .85; text-transform: uppercase; }
/* 19/11 (owner: "improve its visibility and how easy it is to understand"): the card's Level panel (app.js lvRow) */
.lv-box { --lv: #5536d6; --lv2: #8f7bff; --lvt: #3a2390; margin: 10px 0 2px; padding: 12px; border-radius: 16px; border: 1.5px solid color-mix(in srgb, var(--lv2) 45%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, #7b6bff 13%, var(--panel)), var(--panel)); }
html:not(.light) .lv-box { --lv: #c9bcff; --lvt: #e6ddff; }
/* the yellow call-outs keep dark text on their own light background in both themes */
.lv-h { display: flex; align-items: center; gap: 10px; }
.lv-badge { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #7b5cff, #c86bff); box-shadow: 0 4px 12px rgba(110, 70, 230, .35); }
.lv-badge small { font: 800 9.5px/1 Nunito, sans-serif; letter-spacing: .08em; text-transform: uppercase; opacity: .9; margin-top: 6px; }
.lv-badge b { font: 700 25px/1 Fredoka, sans-serif; margin-bottom: 4px; }
.lv-box.full .lv-badge { background: linear-gradient(135deg, #ff9d3d, #ffcf3d); box-shadow: 0 4px 12px rgba(230, 140, 30, .4); }
.lv-box.top .lv-badge { background: linear-gradient(135deg, #f7b500, #ff4fa3); }
.lv-hm { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lv-hm b { font: 700 16px/1.15 Fredoka, sans-serif; color: var(--lvt); }
.lv-hm small { font: 700 12px/1.3 Nunito, sans-serif; color: var(--muted); }
.lv-pw { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.lv-pw b { font: 800 15px Nunito, sans-serif; color: #b36b00; }
html:not(.light) .lv-pw b { color: #ffcf6a; }
.lv-pw small { font: 700 10.5px Nunito, sans-serif; color: var(--muted); }
.lv-bar { position: relative; height: 20px; margin: 10px 0 8px; border-radius: 99px; overflow: hidden; background: color-mix(in srgb, var(--lv2) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--lv2) 30%, transparent); }
.lv-bar i { position: absolute; left: 0; top: 0; bottom: 0; min-width: 6px; border-radius: 99px; background: linear-gradient(90deg, #7b5cff, #c86bff); transition: width .6s ease-out; }
.lv-box.full .lv-bar i, .lv-box.top .lv-bar i { background: linear-gradient(90deg, #ffcf3d, #ff9d3d); }
.lv-bar b { position: relative; display: block; text-align: center; font: 800 12px/20px Nunito, sans-serif; color: var(--lvt); }
.lv-box.full .lv-bar b, .lv-box.top .lv-bar b { color: #5a3a00; }
.lv-evo { display: flex; flex-direction: column; gap: 6px; margin: 0 0 8px; padding: 10px 12px; border-radius: 14px; color: #5a3a00;
  background: linear-gradient(135deg, #fff3c4, #ffd98a); border: 1.5px solid #f2b33d; animation: lv-evo-glow 2s ease-in-out infinite; }
.lv-evo b { font: 700 16px Fredoka, sans-serif; }
.lv-evo span { font: 700 12.5px/1.4 Nunito, sans-serif; }
.lv-evo .btn { align-self: flex-start; }
@keyframes lv-evo-glow { 50% { box-shadow: 0 0 0 4px rgba(255, 190, 60, .25); } }
.lv-pts { display: grid; gap: 8px; margin: 0 0 8px; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--lv2) 8%, transparent); }
.lv-pts.has { background: linear-gradient(135deg, #fff6d6, #ffe9a8); border: 1.5px solid #f2cd6e; }
.lv-pl { display: flex; flex-direction: column; gap: 2px; }
.lv-pl b { font: 800 14px Nunito, sans-serif; color: var(--lvt); }
.lv-pts.has .lv-pl b { color: #7a4a00; }
.lv-pl small { font: 700 12px/1.35 Nunito, sans-serif; color: var(--muted); }
.lv-pts.has .lv-pl small { color: #8a6420; }
.lv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.lv-pt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px 6px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.lv-pt i { font-style: normal; font-size: 19px; line-height: 1; }
.lv-sn { font: 800 11.5px/1.1 Nunito, sans-serif; }
.lv-pips { display: flex; gap: 3px; }
.lv-pips em { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--text) 18%, transparent); }
.lv-pips em.on { background: #f2a50c; box-shadow: 0 0 0 1px #c97f00 inset; }
.lv-pt.on { border-color: #f2cd6e; }
.lv-pt.can { border-color: #a58bff; box-shadow: 0 2px 0 #a58bff; }
.lv-pt.can:hover { transform: translateY(-1px); background: color-mix(in srgb, #a58bff 12%, var(--panel)); }
.lv-plus { position: absolute; top: -7px; right: -5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font: 800 14px/1 Nunito, sans-serif; color: #fff; background: linear-gradient(135deg, #7b5cff, #ff4fa3); box-shadow: 0 2px 6px rgba(120, 60, 220, .45); }
.lv-pt:disabled { cursor: default; }
.lv-reset { justify-self: start; border: 0; background: none; padding: 2px 0; font: 800 12px Nunito, sans-serif; color: var(--lv); cursor: pointer; text-decoration: underline; }
.lv-next { margin: 0 0 8px; font: 700 12.5px Nunito, sans-serif; color: var(--lvt); }
.lv-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 3px 10px;
  font: 700 11.5px/1.35 Nunito, sans-serif; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .lv-evo { animation: none; } }
/* 18/11 (E4): the daily missions on Home, and the Guild's choice in the Lab */
.dly { margin: 10px 0; padding: 12px 12px 10px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.dly-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dly-h b { font: 700 16px/1.2 Fredoka, sans-serif; }
.dly-h small { font: 700 11px/1.2 Nunito, sans-serif; color: var(--muted); }
.dly-m { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(127, 140, 200, .08); }
.dly-m.done { background: rgba(255, 196, 64, .14); box-shadow: inset 0 0 0 1px rgba(255, 196, 64, .45); }
.dly-m.claimed { opacity: .62; }
.dly-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dly-t b { font: 800 13px/1.25 Nunito, sans-serif; }
.dly-bar { display: block; height: 6px; border-radius: 99px; background: rgba(127, 140, 200, .2); overflow: hidden; }
.dly-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb347, #ffd36e); }
.dly-n { flex: none; font: 800 12px/1 Nunito, sans-serif; color: var(--muted); font-variant-numeric: tabular-nums; }
.dly-c, .dly-ok { flex: none; font-style: normal; font: 800 12.5px/1 Nunito, sans-serif; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.dly-ok { color: #2fd08a; font-size: 18px; }
.dly-go { flex: none; display: inline-flex; align-items: center; gap: 5px; }
.dly-m.bonus .dly-t b { font-size: 12.5px; }
.guild-pick { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.guild-pick h2 { margin: 2px 0 0; }
.guild-pick .btn.block { display: flex; align-items: center; justify-content: center; gap: 6px; }

/* 19/11: the sex at sign-up (and the one-time step of an older account): two big toggles */
.sex-pick { display: flex; gap: 8px; margin: 4px 0 2px; }
.sex-opt { flex: 1; position: relative; cursor: pointer; margin: 0; }
.sex-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sex-opt span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 8px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--panel2); color: var(--text); font-weight: 800; transition: border-color .15s, background .15s; }
.sex-opt span i { font-style: normal; font-size: 20px; line-height: 1; }
.sex-opt input:checked + span { border-color: var(--violet, #a470ff); background: rgba(164, 112, 255, .2); }
.sex-opt input:focus-visible + span { outline: 2px solid #ffd23d; outline-offset: 2px; }
.lv-pts.has .lv-reset { color: #7a4a00; }

/* 19/11 (owner: "let's improve the chat, it must be very WhatsApp style"): app.js Chat. WhatsApp's colours in both themes,
   its doodle wallpaper (ours: ∞, stars, eggs, gems), bubbles with a tail on the first of a run, the name in the player's
   colour, the clock time and ✓✓ inside the bubble, day chips, a round send button; full screen on a phone. */
#chat.wa { --wa-bg: #efeae2; --wa-head: #008069; --wa-headtx: #fff; --wa-bar: #f0f2f5; --wa-in: #fff; --wa-text: #111b21; --wa-sub: #667781;
  --wa-them: #fff; --wa-mine: #d9fdd3; --wa-green: #00a884; --wa-sys: #ffeecd; --wa-systx: #54656f; --wa-day: #fff; --wa-line: #d1d7db;
  --wa-doodle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240' fill='none' stroke='%23000' stroke-opacity='.06' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M26 40c-8 0-12 6-12 11s4 11 12 11c10 0 16-22 26-22 8 0 12 6 12 11s-4 11-12 11c-10 0-16-22-26-22z'/%3E%3Cpath d='M170 26l5 11 12 2-9 8 2 12-10-6-10 6 2-12-9-8 12-2z'/%3E%3Cellipse cx='60' cy='150' rx='14' ry='18'/%3E%3Cpath d='M47 148l6-5 6 5 6-5 6 5'/%3E%3Cpath d='M176 190l11-13h15l11 13-18 21z'/%3E%3Cpath d='M110 92q9-12 18 0t18 0'/%3E%3Cpath d='M118 196h14m-7-7v14'/%3E%3Cpath d='M214 104l6 6m0-6l-6 6'/%3E%3Ccircle cx='104' cy='34' r='4'/%3E%3Cpath d='M196 124c0-8 12-8 12 0s-12 14-12 14 12-6 12-14'/%3E%3Cpath d='M20 210l10-10 10 10-10 10z'/%3E%3C/svg%3E");
  background: var(--wa-bg) !important; color: var(--wa-text); border: 0; box-shadow: 0 10px 40px rgba(11, 20, 26, .35); }
html:not(.light) #chat.wa { --wa-bg: #0b141a; --wa-head: #202c33; --wa-headtx: #e9edef; --wa-bar: #202c33; --wa-in: #2a3942; --wa-text: #e9edef;
  --wa-sub: #8696a0; --wa-them: #202c33; --wa-mine: #005c4b; --wa-sys: #182229; --wa-systx: #ffd279; --wa-day: #182229; --wa-line: #2a373f;
  --wa-doodle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240' fill='none' stroke='%23fff' stroke-opacity='.045' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M26 40c-8 0-12 6-12 11s4 11 12 11c10 0 16-22 26-22 8 0 12 6 12 11s-4 11-12 11c-10 0-16-22-26-22z'/%3E%3Cpath d='M170 26l5 11 12 2-9 8 2 12-10-6-10 6 2-12-9-8 12-2z'/%3E%3Cellipse cx='60' cy='150' rx='14' ry='18'/%3E%3Cpath d='M47 148l6-5 6 5 6-5 6 5'/%3E%3Cpath d='M176 190l11-13h15l11 13-18 21z'/%3E%3Cpath d='M110 92q9-12 18 0t18 0'/%3E%3Cpath d='M118 196h14m-7-7v14'/%3E%3Cpath d='M214 104l6 6m0-6l-6 6'/%3E%3Ccircle cx='104' cy='34' r='4'/%3E%3Cpath d='M196 124c0-8 12-8 12 0s-12 14-12 14 12-6 12-14'/%3E%3Cpath d='M20 210l10-10 10 10-10 10z'/%3E%3C/svg%3E"); }
@media (max-width: 699px) { #chat.wa { top: 0; border-radius: 0; } }
#chat.wa .wa-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--wa-head); color: var(--wa-headtx); }
#chat.wa .wa-back { flex: none; border: 0; background: none; color: inherit; font: 400 34px/1 system-ui, sans-serif; padding: 0 2px 4px; cursor: pointer; }
#chat.wa .wa-gav { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #7b5cff, #ff4fa3); }
#chat.wa .wa-gav svg { width: 28px; height: 14px; }
#chat.wa .wa-gav svg path { stroke: #fff; }
#chat.wa .wa-ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
#chat.wa .wa-ttl b { font: 700 16.5px/1.2 Nunito, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#chat.wa .wa-ttl small { display: flex; align-items: center; gap: 5px; font: 600 12.5px Nunito, sans-serif; opacity: .85; }
#chat.wa .wa-live { width: 7px; height: 7px; border-radius: 50%; background: #25d366; box-shadow: 0 0 0 2px rgba(37, 211, 102, .3); }
#chat.wa .wa-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: inherit; font-size: 22px; cursor: pointer; }
@media (min-width: 700px) { #chat.wa .wa-back { display: none; } #chat.wa .wa-head { padding-left: 14px; } }
@media (max-width: 699px) { #chat.wa .wa-x { display: none; } }
#chat.wa .wa-chans { display: flex; gap: 6px; padding: 7px 10px; overflow-x: auto; background: var(--wa-bar); border-bottom: 1px solid var(--wa-line); scrollbar-width: none; }
#chat.wa .wa-chans .ch-tab { flex: none; padding: 5px 13px; border-radius: 99px; border: 0; background: color-mix(in srgb, var(--wa-text) 7%, transparent);
  color: var(--wa-sub); font: 700 13px Nunito, sans-serif; cursor: pointer; }
#chat.wa .wa-chans .ch-tab.on { background: color-mix(in srgb, var(--wa-green) 20%, transparent); color: var(--wa-green); }
html:not(.light) #chat.wa .wa-chans .ch-tab.on { color: #6ee7c3; }
#chat.wa .wa-pin { display: flex; align-items: center; gap: 8px; padding: 7px 12px; background: var(--wa-bar); color: var(--wa-sub); font: 600 12.5px/1.35 Nunito, sans-serif;
  border-bottom: 1px solid var(--wa-line); }
#chat.wa .wa-pin i { font-style: normal; flex: none; }
#chat.wa .wa-pin span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#chat.wa .wa-wall { gap: 2px; padding: 6px 12px 10px; background: var(--wa-doodle) var(--wa-bg); background-size: 240px; }
#chat.wa .msg { position: relative; gap: 6px; align-items: flex-start; }
#chat.wa .msg.first { margin-top: 7px; }
#chat.wa .msg.mine { padding-right: 8px; }
#chat.wa .msg:not(.mine):not(.news) { padding-left: 0; }
#chat.wa .wa-av, #chat.wa .wa-avsp { flex: none; width: 28px; height: 28px; }
#chat.wa .wa-av { border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 12.5px Nunito, sans-serif; text-decoration: none;
  background: hsl(var(--h) 52% 48%); }
#chat.wa .msg { --bub: var(--wa-them); }
#chat.wa .msg.mine { --bub: var(--wa-mine); }
#chat.wa .msg.ment:not(.mine) { --bub: color-mix(in srgb, #ffd279 34%, var(--wa-them)); }
#chat.wa .msg-b { position: relative; max-width: min(82%, 520px); padding: 6px 8px 5px 9px; border-radius: 8px; background: var(--bub); color: var(--wa-text);
  box-shadow: 0 1px .5px rgba(11, 20, 26, .14); }
#chat.wa .msg.first:not(.mine) .msg-b { border-top-left-radius: 0; margin-left: 6px; }
#chat.wa .msg.cont:not(.mine) .msg-b { margin-left: 6px; }
#chat.wa .msg.first.mine .msg-b { border-top-right-radius: 0; }
#chat.wa .msg.first:not(.mine) .msg-b::before { content: ""; position: absolute; top: 0; left: -8px; border-right: 8px solid var(--bub); border-bottom: 10px solid transparent; }
#chat.wa .msg.first.mine .msg-b::before { content: ""; position: absolute; top: 0; right: -8px; border-left: 8px solid var(--bub); border-bottom: 10px solid transparent; }
#chat.wa .msg-b.bare { background: none; box-shadow: none; padding: 0; }
#chat.wa .msg .msg-b.bare::before { display: none; }
#chat.wa .wa-name { display: block; margin-bottom: 1px; font: 800 12.5px/1.3 Nunito, sans-serif; text-decoration: none; color: hsl(var(--h) 62% 36%); }
html:not(.light) #chat.wa .wa-name { color: hsl(var(--h) 72% 70%); }
#chat.wa .ch-tx, #chat.wa .ch-ph { margin: 0; color: var(--wa-text); font-size: 14.5px; line-height: 1.38; display: inline; }
#chat.wa .ch-tx.gone { color: var(--wa-sub); font-style: italic; }
#chat.wa .wa-meta { float: right; position: relative; top: 5px; display: inline-flex; align-items: center; gap: 3px; margin: 2px 0 0 10px;
  font: 600 11px Nunito, sans-serif; color: var(--wa-sub); white-space: nowrap; }
#chat.wa .wa-tick { font-style: normal; font-size: 12px; letter-spacing: -4px; margin-right: 4px; color: #53bdeb; }
#chat.wa .msg-b.bare .wa-meta { float: none; top: 0; display: flex; justify-content: flex-end; width: fit-content; margin: 3px 0 0 auto; padding: 1px 7px;
  border-radius: 8px; background: color-mix(in srgb, var(--wa-them) 85%, transparent); }
#chat.wa .ch-acts { margin: 0; }
#chat.wa .ch-rep { color: var(--wa-sub); font-size: 11px; padding: 0 2px; }
#chat.wa .msg .rx { clear: both; margin-top: 5px; padding-top: 1px; }
#chat.wa .ch-card, #chat.wa .stk { margin: 2px 0; }
#chat.wa .ch-card .small { color: var(--wa-text); }
#chat.wa .ch-cardchip { background: color-mix(in srgb, var(--wa-text) 8%, transparent); color: var(--wa-text); border-color: color-mix(in srgb, var(--wa-text) 16%, transparent); }
#chat.wa .men { color: #027eb5; font-weight: 800; }
html:not(.light) #chat.wa .men { color: #53bdeb; }
#chat.wa .wa-day { display: flex; justify-content: center; margin: 10px 0 4px; pointer-events: none; }
#chat.wa .wa-day span { padding: 5px 12px; border-radius: 8px; background: var(--wa-day); color: var(--wa-sub); font: 700 12px Nunito, sans-serif;
  box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
#chat.wa .wa-sys { align-self: center; max-width: 88%; margin: 6px auto; padding: 6px 12px; border-radius: 8px; background: var(--wa-sys); color: var(--wa-systx);
  font: 600 12px/1.4 Nunito, sans-serif; text-align: center; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
#chat.wa .msg.news { margin: 6px 0; }
#chat.wa .news-b { max-width: 92%; margin: 0 auto; border: 0; border-radius: 8px; background: var(--wa-sys); color: var(--wa-systx); box-shadow: 0 1px .5px rgba(11, 20, 26, .13); }
#chat.wa .news-b p { color: var(--wa-text); }
#chat.wa .wa-foot { background: var(--wa-bar); padding-bottom: env(safe-area-inset-bottom); }
#chat.wa .wa-bar { display: flex; align-items: flex-end; gap: 6px; padding: 6px 8px; }
#chat.wa .wa-pill { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0; padding: 3px 4px; border-radius: 24px; background: var(--wa-in);
  box-shadow: 0 1px .5px rgba(11, 20, 26, .1); }
#chat.wa .wa-pill input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--wa-text); font: 600 15px Nunito, sans-serif; padding: 9px 4px; }
#chat.wa .wa-pill input::placeholder { color: var(--wa-sub); }
#chat.wa .wa-ico { flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; font-size: 19px; line-height: 1; cursor: pointer; color: var(--wa-sub); }
#chat.wa .wa-ico.wa-at { font: 900 18px Nunito, sans-serif; }
#chat.wa .wa-ico.on { background: color-mix(in srgb, var(--wa-green) 20%, transparent); }
#chat.wa .wa-send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--wa-green); color: #fff; box-shadow: 0 2px 5px rgba(11, 20, 26, .2); }
#chat.wa .wa-send svg { width: 22px; height: 22px; fill: currentColor; margin-left: 3px; }
#chat.wa .wa-send:active { transform: scale(.94); }
#chat.wa .wa-btns { justify-content: space-around; padding: 6px; }
#chat.wa .wa-big { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 0; border-radius: 12px; background: none;
  color: var(--wa-sub); font-size: 21px; cursor: pointer; }
#chat.wa .wa-big span { font: 800 11.5px Nunito, sans-serif; }
#chat.wa .wa-big.on { background: var(--wa-in); color: var(--wa-text); box-shadow: 0 1px .5px rgba(11, 20, 26, .1); }
#chat.wa .wa-tray { border-top: 1px solid var(--wa-line); }
#chat.wa .wa-tray .ch-cbody { max-height: 36vh; min-height: 150px; padding: 10px; background: none; }
@media (min-width: 700px) { #chat.wa .wa-tray .ch-cbody { max-height: 220px; } }
#chat.wa .ch-at { padding: 6px 10px 0; }
#chat.wa :is(.ch-pb, .ch-mycard, .ch-opt, .ch-atopt) { background: var(--wa-in); color: var(--wa-text); border-color: var(--wa-line); }
#chat.wa .ch-pb i, #chat.wa .ch-pick i { color: var(--wa-green); }
#chat.wa .ch-birth, #chat.wa .ch-pick { color: var(--wa-text); }
#chat.wa .ch-birth small, #chat.wa .tiny.muted { color: var(--wa-sub); }
/* the full-screen chat on a phone: the floating notices wait (they covered its header) */
@media (max-width: 699px) { body:has(#chat.wa:not([hidden])) .live-n { display: none; } }

/* 19/11 (owner: an "i" that takes you to the Guide): app.js wikiInfo */
.wk-i { display: inline-grid; place-items: center; flex: none; width: 19px; height: 19px; margin-left: 6px; border-radius: 50%; vertical-align: middle;
  font: italic 800 12px/1 Georgia, "Times New Roman", serif; text-decoration: none; color: #fff; background: linear-gradient(135deg, #7b5cff, #3f8ff0);
  box-shadow: 0 1px 4px rgba(60, 40, 160, .35); }
.wk-i:hover, .wk-i:focus-visible { filter: brightness(1.15); transform: scale(1.08); }
h1 .wk-i { width: 22px; height: 22px; font-size: 14px; }
.lv-h .wk-i { align-self: flex-start; margin-left: 2px; }

/* 19/11 (owner: the new logo in the game): the wordmark image in the top bar, the side brand and the welcome heroes */
.logo-img { display: block; height: 30px; width: auto; max-width: 100%; filter: drop-shadow(0 1px 0 rgba(20, 6, 60, .35)); }
@media (max-width: 440px) { .logo-img { height: 26px; } }
.side-logo { display: block; height: 34px; width: auto; margin-bottom: 3px; }
.hero h1.hero-logo { margin: 0 0 6px; line-height: 0; }
.hero-logo-img { display: block; width: min(340px, 86%); height: auto; margin: 0 auto; }
/* 19/11 (owner: "centre the logo better here"): on the desktop sidebar the ∞ sits over the name, all centred */
#side > a.side-brand { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2px; padding: 8px 8px 14px; }
#side > a.side-brand > span:last-child { display: flex; flex-direction: column; align-items: center; }
#side > a.side-brand .side-logo { height: 36px; margin: 0 auto 4px; }

/* 20/11 (owner: "in the top panel put more of what the player can collect, to make the information easier to see"): the
   top bar's strip of tiles (app.js paintTopInfo): packs, eggs, daily missions, full-pay descents. A ready one glows.
   On a computer it sits beside the coins; on a phone it is the top bar's second row, the tiles sharing its width. */
.topinfo { display: flex; gap: 6px; align-items: center; min-width: 0; }
.ti { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 5px; border-radius: 12px; cursor: pointer;
  color: #fff; text-decoration: none; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .16); font: inherit; }
.ti:hover { filter: brightness(1.12); }
.ti-ico { flex: none; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .13);
  font-size: 14px; line-height: 1; }
.ti-ico svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ti-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; text-align: left; }
.ti-t b { font: 700 14px/1.1 Fredoka, sans-serif; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ti-t small { font: 800 9.5px/1.2 Nunito, sans-serif; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti.ready { border-color: rgba(255, 214, 100, .75); background: linear-gradient(135deg, rgba(255, 210, 61, .3), rgba(255, 79, 163, .22));
  animation: ti-glow 2.4s ease-in-out infinite; }
.ti.ready .ti-ico { background: linear-gradient(135deg, #ffe066, #ff9a3d); color: #3a1a00; }
.ti.ready .ti-t b { color: #ffe08a; }
@keyframes ti-glow { 0%, 100% { box-shadow: 0 0 6px rgba(255, 200, 70, .25); } 50% { box-shadow: 0 0 16px rgba(255, 200, 70, .6); } }
@media (prefers-reduced-motion: reduce) { .ti.ready { animation: none; } }
html.light .ti { color: #2a1d55; background: #f5f0ff; border-color: #e1d6fb; }
html.light .ti-ico { background: #e9e0ff; color: #5b36c9; }
html.light .ti.ready { background: linear-gradient(135deg, #fff3c7, #ffe2f0); border-color: #ffc94d; }
html.light .ti.ready .ti-t b { color: #b0420f; }
@media (min-width: 900px) {
  .topinfo { margin-left: auto; }
  #top .topinfo:not([hidden]) + .top-right { margin-left: 10px; }
}
@media (max-width: 899px) {
  #top { flex-wrap: wrap; height: auto; min-height: 60px; row-gap: 6px; padding-top: 7px; padding-bottom: 7px; }
  .topinfo { order: 9; flex: 1 0 100%; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 5px; }
  .ti { min-width: 0; height: 42px; padding: 3px 3px; display: grid; grid-template-columns: auto auto; grid-template-areas: "i n" "l l";
    justify-content: center; align-content: center; align-items: center; column-gap: 4px; row-gap: 2px; }
  .ti-t { display: contents; }
  .ti-ico { grid-area: i; width: 19px; height: 19px; border-radius: 6px; font-size: 11px; }
  .ti-ico svg { width: 12px; height: 12px; }
  .ti-t b { grid-area: n; font-size: 14px; line-height: 1; }
  .ti-t small { grid-area: l; justify-self: center; max-width: 100%; text-align: center; font-size: 9.5px; line-height: 1.1; }
}

/* 20/11 (owner: "when scrolling down, compress the top panel organically on the phone"): on a phone the top bar is fixed
   and folds with the scroll (app.js topFold: --tc 0 = open, 1 = folded): the subtitle fades, the logo, the paddings and
   the tiles shrink, the tiles' labels fold away under their numbers. The page starts under the open bar (--top-h0), so
   the fold never moves the page. A descent hides the bar (battle.css), so its room goes too. */
@media (max-width: 899px) {
  #top { position: fixed; left: 0; right: 0; top: 0; transition: box-shadow .25s;
    padding-top: calc(7px - 4px * var(--tc, 0)); padding-bottom: calc(7px - 4px * var(--tc, 0)); row-gap: calc(6px - 2px * var(--tc, 0)); }
  body { padding-top: var(--top-h0, 64px); }
  body.inrun { padding-top: 0; }
  #top .logo small { transition: none; opacity: calc(1 - 2 * var(--tc, 0)); max-height: calc(12px * (1 - var(--tc, 0)));
    margin-top: calc(3px * (1 - var(--tc, 0))); overflow: hidden; }
  #top .logo-img { height: calc(30px - 6px * var(--tc, 0)); }
  #top .lens { transition: none; transform: scale(calc(1 - .2 * var(--tc, 0))); }
  #top .top-right { transform: scale(calc(1 - .08 * var(--tc, 0))); transform-origin: right center; }
  .ti { height: calc(46px - 16px * var(--tc, 0)); row-gap: calc(2px * (1 - var(--tc, 0))); }
  .ti-t small { opacity: calc(1 - 1.8 * var(--tc, 0)); max-height: calc(20px * (1 - var(--tc, 0))); overflow: hidden;
    white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 9px; line-height: 1.05; }
}
@media (max-width: 440px) { #top .logo-img { height: calc(26px - 4px * var(--tc, 0)); } }

/* 20/11 (owner: "except in the chat, everything that uses an emoji: our own symbols in the game's palette"): icons.js
   draws them where the emojis were, at the size of the text around them */
.gi { display: inline-block; width: 1.2em; height: 1.2em; vertical-align: -.24em; flex: none; overflow: visible; }

/* 20/11 (owner: "in the Friends tab allow searching"): the search, the players it finds */
.fr-q { width: 100%; margin: 6px 0 2px; }
.fr-count { margin: 6px 2px 8px; }
.fr-row[hidden] { display: none; }
.fr-found { margin-top: 14px; }
.fr-found .fr-h { display: block; margin: 0 2px 6px; font: 800 11px Nunito, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.fr-acts .btn .gi { width: 15px; height: 15px; vertical-align: -2px; }
.fr-none { margin: 10px 2px; }

/* 20/11 (owner: "put the generation next to the fusion quality, bottom right"): the seal ends the quality row */
.cf .gen-seal { margin: 0 0 0 auto; height: 6.6cqw; min-width: 8.4cqw; font-size: 4.2cqw; text-transform: none; }

/* 20/11 (owner: "I liked the menu layout you made, implement it in the game"): the game panel (app.js renderSide) */
@media (min-width: 900px) {
  :root { --side-w: 268px; }
  body.side-rail { --side-w: 92px; }
  html body #side.gsp { padding: 12px 14px; gap: 0; color: #f3ecff; scrollbar-width: none; border-right: 1px solid rgba(255, 255, 255, .08); box-shadow: 8px 0 30px rgba(10, 4, 30, .35);
    background: radial-gradient(120% 50% at 0% 0%, #3a1f86 0%, transparent 60%), radial-gradient(90% 40% at 100% 100%, #5a1c6e 0%, transparent 65%), #120b2e; }
  html body #side.gsp.rail { padding: 12px 10px; }
  #side.gsp::-webkit-scrollbar { display: none; }
  .gsp-in { display: flex; flex-direction: column; gap: 9px; min-height: 100%; }
  .gsp-logo { display: flex; justify-content: center; padding: 2px 0; } .gsp-logo .side-logo { height: 40px; margin: 0; }
  .gsp-hud { position: relative; display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px; border-radius: 18px; color: #f3ecff; text-decoration: none;
    background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03)); border: 1.5px solid rgba(255, 211, 61, .55); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 18px rgba(0,0,0,.35); }
  .gsp-hud.on { border-color: #ffd23d; box-shadow: 0 0 0 2px rgba(255, 210, 61, .3), inset 0 1px 0 rgba(255,255,255,.18); }
  .gsp-ring { position: relative; box-sizing: border-box; width: 66px; height: 66px; border-radius: 50%; padding: 4px; background: conic-gradient(#ffd23d var(--p), rgba(255,255,255,.14) 0); }
  .gsp-ring .avatar { box-sizing: border-box; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #120b2e; font: 700 22px Fredoka, sans-serif; display: grid; place-items: center; background-color: #2b1a66; }
  .gsp-lvl { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); padding: 0 7px; border-radius: 99px; background: linear-gradient(180deg, #ffe27a, #e0a400);
    color: #3a2400; font: 900 11px/1.6 Nunito, sans-serif; font-style: normal; box-shadow: 0 2px 0 #9c6a00; white-space: nowrap; }
  .gsp-who { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
  .gsp-who > b { font: 700 18px/1.1 Fredoka, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gsp-who small { font: 700 11px Nunito, sans-serif; color: #b9acdc; }
  .gsp-bar { display: grid; grid-template-columns: 14px minmax(0, 1fr); align-items: center; gap: 6px; }
  .gsp-bar .gi { width: 14px; height: 14px; }
  .gsp-bar i { display: block; height: 6px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
  .gsp-bar i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3dd6ff, #7b5cff); }
  .gsp-bar.al i b { background: linear-gradient(90deg, #ff8fd8, #c43bd6); }
  .gsp-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .gsp-pill { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 6px 4px; border-radius: 12px; color: #f3ecff; text-decoration: none;
    background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); }
  .gsp-pill b { font: 700 13px Fredoka, sans-serif; } .gsp-pill .gi { width: 18px; height: 18px; } .gsp-pill:hover { background: rgba(255,255,255,.08); }
  .gsp-play { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 18px; color: #fff; text-decoration: none; transition: transform .12s, filter .12s;
    background: linear-gradient(135deg, #7b5cff 0%, #c43bd6 55%, #ff5fa8 100%); box-shadow: 0 5px 0 #5a2499, 0 10px 24px rgba(196, 59, 214, .45), inset 0 1px 0 rgba(255,255,255,.4); }
  .gsp-play:hover { filter: brightness(1.08); transform: translateY(-1px); } .gsp-play:active { transform: translateY(3px); box-shadow: 0 2px 0 #5a2499, inset 0 1px 0 rgba(255,255,255,.4); }
  .gsp-play .gi { width: 40px; height: 40px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
  .gsp-play span { display: flex; flex-direction: column; min-width: 0; } .gsp-play b { font: 700 20px/1 Fredoka, sans-serif; letter-spacing: .3px; } .gsp-play small { font: 800 11.5px Nunito, sans-serif; opacity: .9; margin-top: 3px; }
  .gsp-play.on { box-shadow: 0 5px 0 #5a2499, 0 0 0 3px rgba(255, 210, 61, .65), 0 10px 24px rgba(196, 59, 214, .45); }
  .gsp-nav { display: flex; flex-direction: column; gap: 7px; }
  .gsp-btn { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border-radius: 15px; color: #f3ecff; text-decoration: none; transition: background .12s, transform .12s;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
  .gsp-btn:hover { background: rgba(255,255,255,.11); transform: translateX(2px); }
  .gsp-btn.on { background: rgba(123, 92, 255, .28); border-color: rgba(164, 128, 255, .8); box-shadow: 0 0 0 2px rgba(123,92,255,.25), inset 0 -3px 0 rgba(0,0,0,.25); }
  .gsp-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--c); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.25); }
  .gsp-ic .gi { width: 25px; height: 25px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
  .gsp-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; } .gsp-txt b { font: 700 15px/1.15 Fredoka, sans-serif; } .gsp-txt small { font: 700 11.5px Nunito, sans-serif; color: #b9acdc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gsp-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-style: normal;
    background: linear-gradient(180deg, #ff6b8a, #e0244f); color: #fff; font: 900 12px Nunito, sans-serif; box-shadow: 0 2px 0 #8a1230; }
  .gsp-more { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 0; border-radius: 12px; background: none; color: #b9acdc; cursor: pointer; font: 800 12px Nunito, sans-serif; letter-spacing: 1px; text-transform: uppercase; }
  .gsp-more .gi { width: 16px; height: 16px; } .gsp-more span { flex: 1; text-align: left; } .gsp-more i { font-style: normal; transition: transform .15s; } .gsp-more.open i { transform: rotate(180deg); }
  .gsp-more:hover { background: rgba(255,255,255,.06); color: #fff; }
  .gsp-mlist { display: flex; flex-direction: column; gap: 2px; margin-top: -4px; } .gsp-mlist[hidden] { display: none; }
  .gsp-mrow { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: #cfc2f5; text-decoration: none; font: 700 13px Nunito, sans-serif; }
  .gsp-mrow svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .gsp-mrow span { flex: 1; } .gsp-mrow:hover { background: rgba(255,255,255,.07); color: #fff; } .gsp-mrow.on { background: rgba(123, 92, 255, .25); color: #fff; }
  .gsp-soon { font-style: normal; padding: 0 6px; border-radius: 99px; background: rgba(255,255,255,.08); font: 800 10px/1.6 Nunito, sans-serif; color: #b9acdc; }
  .gsp-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 6px; }
  .gsp-vip { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 12px; font: 800 12px Nunito, sans-serif; color: #3a2400; text-decoration: none;
    background: linear-gradient(180deg, #ffe27a, #ffb800); box-shadow: 0 3px 0 #b07800; white-space: nowrap; }
  .gsp-vip .gi { width: 16px; height: 16px; } .gsp-vip.vipon { background: linear-gradient(120deg, #6a1fd0, #d6337f 60%, #ffb02e); color: #fff; box-shadow: 0 3px 0 #4a1590; }
  .gsp-round { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; padding: 0; cursor: pointer; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); color: #f3ecff; font: 900 16px Nunito, sans-serif; }
  .gsp-round svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .gsp-round:hover { background: rgba(255,255,255,.16); }
  .gsp-lang { display: flex; justify-content: center; } .gsp-lang .langsw button { color: #cfc2f5; }
  /* folded: a rail of icons */
  #side.gsp.rail .gsp-logo .side-lens { width: 44px; }
  #side.gsp.rail .gsp-hud { grid-template-columns: 1fr; justify-items: center; padding: 8px 4px; }
  #side.gsp.rail .gsp-ring { width: 54px; height: 54px; }
  #side.gsp.rail .gsp-who, #side.gsp.rail .gsp-txt, #side.gsp.rail .gsp-play span, #side.gsp.rail .gsp-more span, #side.gsp.rail .gsp-more i,
  #side.gsp.rail .gsp-mrow span, #side.gsp.rail .gsp-soon, #side.gsp.rail .gsp-vip span { display: none; }
  #side.gsp.rail .gsp-res { grid-template-columns: 1fr; } #side.gsp.rail .gsp-pill:not(:first-child) { display: none; }
  #side.gsp.rail .gsp-play, #side.gsp.rail .gsp-btn, #side.gsp.rail .gsp-mrow, #side.gsp.rail .gsp-more { justify-content: center; padding-left: 0; padding-right: 0; }
  #side.gsp.rail .gsp-play .gi { width: 34px; height: 34px; }
  #side.gsp.rail .gsp-badge { position: absolute; top: -5px; right: 4px; }
  #side.gsp.rail .gsp-btn:hover { transform: none; }
  #side.gsp.rail .gsp-foot { flex-direction: column; } #side.gsp.rail .gsp-vip { width: 36px; flex: none; padding: 8px 0; }
}

/* 20/11: the game panel's own text colours (the page's link colour reached its buttons) */
@media (min-width: 900px) {
  #side.gsp a, #side.gsp .gsp-who > b, #side.gsp .gsp-txt b, #side.gsp .gsp-pill b { color: #f3ecff; }
  #side.gsp .gsp-play, #side.gsp .gsp-play b, #side.gsp .gsp-play small { color: #fff; }
  #side.gsp .gsp-txt small, #side.gsp .gsp-who small { color: #b9acdc; }
  #side.gsp .gsp-mrow { color: #cfc2f5; } #side.gsp .gsp-mrow:hover, #side.gsp .gsp-mrow.on { color: #fff; }
  #side.gsp .gsp-vip { color: #3a2400; } #side.gsp .gsp-vip.vipon { color: #fff; }
}

/* 20/11 (owner: "on the PC adapt the whole game to play in this widescreen space"): the pages and the descent use the
   whole width beside the menu (they were capped at 1280px / 1040px); the descent's command deck stays a compact block in
   the middle so the moves don't stretch; reading pages keep a comfortable width */
@media (min-width: 900px) {
  html body main { max-width: 2000px; padding: 20px 28px 28px; }
  html body .wrun { max-width: none; }
  html body .wrun.hud > #wpanel { align-self: center; width: min(calc(100% - 16px), 1060px); margin-left: auto; margin-right: auto; }
  html body .wrun.hud > .wr-top { margin-left: 10px; margin-right: 10px; }
  html body .dsk { max-width: none; }
  html body .dx2 { max-width: 1600px; }
  html body .lab2 { max-width: 1600px; }
  html body main:has(> .lab2) { max-width: 2000px; }
  html body .lab2.inc-page { max-width: 1600px; }
  html body .hp { max-width: 1800px; }
  html body .fr-page { max-width: 1200px; }
}

/* 20/11 (owner: "another kind of scroll bar: the program's basic one is ugly, nothing that says it is a browser game"):
   every scroll bar is a slim rounded pill in the game's colours, with no arrows and a clear track */
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border-radius: 99px; border: 3px solid transparent; background: linear-gradient(180deg, #b38bff, #ff6fb8) padding-box; }
::-webkit-scrollbar-thumb:horizontal { background: linear-gradient(90deg, #b38bff, #ff6fb8) padding-box; }
::-webkit-scrollbar-thumb:hover { border-width: 2px; background: linear-gradient(180deg, #c9a6ff, #ff8fc8) padding-box; }
::-webkit-scrollbar-thumb:active { background: linear-gradient(180deg, #9b6dff, #ff4fa3) padding-box; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: #b38bff transparent; } }

/* 20/11 (owner: "the language to click beside the dark/light mode"): a small pill with the globe and the language */
.theme-t.lang-t { width: auto; padding: 0 9px 0 7px; gap: 4px; border-radius: 99px; display: inline-flex; align-items: center; }
.theme-t.lang-t .gi { width: 16px; height: 16px; }
.theme-t.lang-t b { font: 900 11.5px Nunito, sans-serif; letter-spacing: .5px; }
@media (max-width: 899px) { .theme-t.lang-t { padding: 0 7px 0 5px; } .theme-t.lang-t .gi { width: 14px; height: 14px; } .theme-t.lang-t b { font-size: 10.5px; } }

/* 20/11 (owner: "remove these generic emoticons and put icons that refer to the game"): the main buttons' tiles are game
   slots holding the game's own pictures; the old Infini+ square is back under them */
html body #side.gsp .gsp-ic.gsa { position: relative; overflow: hidden; width: 42px; height: 42px; border-radius: 13px;
  background: radial-gradient(circle at 50% 26%, #4d2cb4, #1c0e48 78%);
  box-shadow: inset 0 0 0 2px var(--rim), inset 0 -3px 0 rgba(0, 0, 0, .35), 0 0 12px color-mix(in srgb, var(--rim) 40%, transparent); }
html body #side.gsp .gsp-ic.gsa-home { background: none; box-shadow: 0 0 12px color-mix(in srgb, var(--rim) 45%, transparent); }
.gsa-full { display: block; width: 100%; height: 100%; }
.gsa-svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.gsa-zap { width: 32px; height: 32px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.gsa-cards { position: relative; width: 42px; height: 42px; }
.gsa-cards img { position: absolute; top: 7px; width: 18px; height: 27px; border-radius: 3px; object-fit: cover;
  box-shadow: 0 0 0 1.5px #fff, 0 2px 4px rgba(0, 0, 0, .45); }
.gsa-cards img:first-child { left: 6px; transform: rotate(-13deg); filter: brightness(.82); }
.gsa-cards img:last-child { left: 17px; transform: rotate(9deg); }
.gsa-lab { position: relative; display: grid; place-items: center; width: 42px; height: 42px; }
.gsa-lab img { position: absolute; inset: -4px; width: 50px; height: 50px; object-fit: cover; }
html body #side.gsp .gsa-lab .gi { position: relative; width: 21px; height: 21px; filter: drop-shadow(0 0 5px #3dd6ff) drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.gsa-fr { position: relative; width: 42px; height: 42px; }
.gsa-face { position: absolute; width: 25px; height: 25px; border-radius: 50%; font-size: 0;
  background: radial-gradient(circle at 50% 30%, #c9b2ff, #8b5cff 55%, #5b33d6); box-shadow: 0 0 0 1.5px #fff, 0 2px 4px rgba(0, 0, 0, .4); }
.gsa-face:first-child { left: 3px; top: 4px; } .gsa-face:last-child { right: 3px; bottom: 4px; }
html body #side.gsp a.vip-banner.side { margin: 8px 0 4px; }
#side.gsp.rail a.vip-banner.side { justify-content: center; padding: 8px 0; margin: 6px 0; }
#side.gsp.rail a.vip-banner.side .vb-body, #side.gsp.rail a.vip-banner.side .vb-star { display: none; }
#side.gsp.rail .vip-banner.side .vb-badge { width: 38px; height: 38px; }
#side.gsp.rail .vip-banner.side .vb-badge svg { width: 22px; height: 22px; }
/* 20/11: a face picture hides its letter's shadow too (a dark letter showed over the explorer on the profile) */
.faced { text-shadow: none !important; -webkit-text-stroke: 0 !important; }
/* 20/11 (owner: "add a carousel here"): the finds rail's arrows */
.rcar { position: relative; }
.rcar-b { position: absolute; z-index: 5; top: 50%; width: 40px; height: 40px; margin-top: -6px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font: 800 26px/1 Fredoka, sans-serif; color: #fff; padding-bottom: 3px;
  background: linear-gradient(160deg, #a470ff, #6a2fd8); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 6px 16px rgba(20, 8, 60, .55), 0 0 18px rgba(164, 112, 255, .6);
  transition: transform .12s, filter .12s; }
.rcar-b:hover { transform: scale(1.08); filter: brightness(1.12); }
.rcar-b:active { transform: scale(.95); }
.rcar-b.prev { left: 4px; } .rcar-b.next { right: 4px; }
.rcar-b[hidden] { display: none; }
.rare-show.on-home .rcar-b { display: none; }

/* 20/11 (owner: "the Activity tab is not well framed"): the list fills the page's width like the finds and the numbers
   above it; a rare row leaves room for its label, which sits above the moving border (not cut by it), in the page's language */
@media (min-width: 900px) { html body .feed-list { max-width: none; } }
.feed-item.fi-rare { margin-top: 9px; }
.feed-item.fi-rare .fi-rare-tag { z-index: 4; top: -11px; }

/* 20/11 (owner: "Redo art"): the card sheet's tab where the player writes what is wrong with the picture */
.rart-t { display: block; width: 100%; margin-top: 8px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line, rgba(255,255,255,.18));
  background: rgba(0, 0, 0, .18); color: inherit; font: 600 14px/1.4 Nunito, sans-serif; resize: vertical; min-height: 78px; }
html.light .rart-t { background: #fff; }
.rart-t:focus { outline: none; border-color: #a470ff; box-shadow: 0 0 0 3px rgba(164, 112, 255, .25); }
.rart-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.rart-n { opacity: .6; font-size: 11.5px; }
.rart-ok { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: #39c98a; font-weight: 800; }
.rart-ok .gi { width: 16px; height: 16px; flex: none; }

/* 20/11 (owner: "in this tab apply the filters to find the card"): the showcase slot picker's filters stay on top while
   the cards scroll under them */
.pk-box .pkf { position: sticky; top: 0; z-index: 3; margin: 6px -4px 8px; padding: 8px 4px 4px; background: var(--panel, #1c1446);
  box-shadow: 0 10px 14px -10px rgba(0, 0, 0, .45); }
html.light .pk-box .pkf { background: #fff; }
.pkf-row { display: flex; gap: 8px; align-items: center; }
.pkf-row .search { flex: 1; min-width: 0; margin: 0; }
.pkf-row .sort-select { flex: none; max-width: 46%; }
.pkf-chips, .pkf-els { margin-top: 8px; }
.pkf-els { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pkf-els::-webkit-scrollbar { display: none; }
.pkf-n { margin: 6px 2px 0; }

/* 20/11 (owner: "sometimes the keyboard comes up but I can't see what I'm typing"; "the chat is very laggy on the
   phone"): on a phone the chat takes exactly the visible screen (app.js Chat fitVV: visualViewport), so the message
   box sits right above the keyboard; the page under it doesn't scroll; no big shadow under a full-screen window */
@media (max-width: 699px) {
  html body #chat { top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100%); box-shadow: none; animation: none; }
  body.chat-full { overflow: hidden; }
}

/* 20/11 (owner: "the specials slightly stronger"): the special's perk on the card sheet */
.cm-sp { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cm-spk { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 12px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #2a0f6e, #5b1aa0); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); }
.cm-spk b { font: 800 13.5px Nunito, sans-serif; } .cm-spk small { font: 700 12px/1.35 Nunito, sans-serif; opacity: .9; }
.cm-spk.sp-shiny { background: linear-gradient(120deg, #8a5a00, #e0a400 55%, #ffd23d); color: #2a1600; }
.cm-spk.sp-shadow { background: linear-gradient(120deg, #0d0018, #3a0a66 60%, #6a1fd0); }
.cm-spk.sp-retro { background: linear-gradient(120deg, #0b3d00, #1f7a12 60%, #3fae2a); font-family: ui-monospace, Consolas, monospace; }
.cm-spk.sp-prism { background: linear-gradient(110deg, #ff4f6d, #ff9a3d, #ffd23d, #5fe39a, #3dd6ff, #5b7bff, #c46bff); color: #1d0a52; }
.cm-spk.sp-prism small { opacity: 1; }
.cm-spk.sp-glitch { background: linear-gradient(120deg, #001a14, #003d33 60%, #0a5a4a); text-shadow: -1px 0 #ff00c8, 1px 0 #00e5ff; }

/* 21/11: /?embed=card: only the card, on a clear page (the universe log's card sheet shows it in a frame) */
html.embed-card, html.embed-card body { background: transparent !important; margin: 0; padding: 0 !important; overflow: hidden; min-height: 0; }
html.embed-card body > *:not(#view), html.embed-card #side, html.embed-card #tabs, html.embed-card #chat-fab, html.embed-card #chat,
html.embed-card body::before, html.embed-card body::after { display: none !important; }
html.embed-card #view { display: grid; place-items: center; width: 100vw; height: 100vh; max-width: none; margin: 0; padding: 6px; box-sizing: border-box; }
html.embed-card .embed-card-w { width: min(100%, calc((100vh - 12px) * 5 / 7.4)); }
html.embed-card .embed-card-w .card { width: 100%; }
/* 21/11: the embedded card page and its frame use the same colour scheme, so the frame stays see-through */
html.embed-card { color-scheme: normal !important; }

/* 21/11 (owner: "in Who has it, see that person's cards and their stats"): each owner's copies under their name */
.ppl-cards { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 10px 44px; margin-top: -2px; }
.ppl-cards::-webkit-scrollbar { display: none; }
.ppl-c { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 78px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.ppl-c .card { width: 78px; pointer-events: none; }
.ppl-c:active { transform: scale(.96); }
.ppl-st { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; font: 800 10.5px/1.2 Nunito, sans-serif; }
.ppl-st b { font-weight: 800; }
.ppl-st i { font-style: normal; padding: 0 5px; border-radius: 99px; color: #fff; background: #9aa3b5; }
.ppl-st i.g-average { background: #5ca8ff; } .ppl-st i.g-good { background: #2fbf6a; } .ppl-st i.g-perfect { background: linear-gradient(90deg, #ffcf3d, #ff8fd0); color: #3a2400; }
.ppl-st em { font-style: normal; color: var(--muted); }
.ppl-more { align-self: center; flex: none; padding: 4px 9px; border-radius: 99px; font: 800 11px Nunito, sans-serif; color: var(--muted); border: 1px dashed var(--line); }

/* 21/11: the music's switch in the side menu (off: faded) and its volume in Settings */
#side.gsp .gsp-round.off { opacity: .5; }
.mus-range { width: min(180px, 45vw); accent-color: #a470ff; }

/* 21/11: the top bar's sound button (all the sound on/off) */
.theme-t.snd-top.off { opacity: .55; }

/* 21/11 (owner: "improve the pack's layout so it is symmetric"): the cards in centred rows: 4 cards are 2 x 2 on a phone
   (one row of 4 on a computer), 5 are 3 + 2, 6 are 3 + 3; an unfinished row sits in the middle (the 3D cards land on
   these same places: pack3d.js reads them) */
.stage-grid { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; }
.stage-grid > .flipper { flex: 0 0 calc((100% - 24px) / 3); max-width: 112px; }
.stage-grid.n4 { max-width: 300px; }
.stage-grid.n4 > .flipper { flex-basis: calc((100% - 12px) / 2); max-width: 140px; }
.stage-grid.n3 > .flipper { max-width: 132px; }
@media (min-width: 640px) {
  .stage-grid > .flipper { flex: 0 0 150px; max-width: 150px; }
  .stage-grid.n4 { max-width: 820px; }
  .stage-grid.n4 > .flipper { flex-basis: 150px; max-width: 150px; }
  .stage-grid.n3 > .flipper { flex-basis: 170px; max-width: 170px; }
}

/* 21/11 (owner: "send it to several people: the first who makes it takes it"): the Infusion sheet and the Workshop */
.mut-wait { display: flex; flex-direction: column; gap: 3px; margin: 8px 0; padding: 9px 12px; border-radius: 12px;
  background: color-mix(in srgb, #a470ff 12%, transparent); border: 1px solid color-mix(in srgb, #a470ff 35%, transparent); }
.mut-wait b { font: 800 13px Nunito, sans-serif; }
.mut-wait small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.mut-asked { color: #a470ff; font-weight: 800; }
.mut-race { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 700; color: #a470ff; }

/* 21/11 (owner: "the special card like in the game"): the log's card turns like the zoomed one; small, a vertical drag
   still scrolls the sheet; big (the log's zoom), any drag turns it */
html.embed-card .embed-card-w .card { touch-action: pan-y; cursor: zoom-in; }
html.embed-card.embed-big .embed-card-w .card { touch-action: none; cursor: grab; }
html.embed-card.embed-big .embed-card-w .card.grabbed { cursor: grabbing; }
html.embed-card.embed-big .embed-card-w { width: min(84vw, calc((100vh - 40px) / 1.48), 500px); }   /* room to turn it */

/* 21/11 (owner: "in the trade, add every filter"): each family's label at the start of its row */
.tc-fl { min-width: 74px; font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 600px) { .tc-fl { flex-basis: 100%; min-width: 0; margin-top: 2px; } }

/* 21/11 (owner: "the trade filters like the battle one"): the picker's compact bar (lab.css pk-*) in the trade */
.tc-tools { margin: 8px 0 12px; }
.tc-tools .pk-bar .pk-sort select { max-width: 132px; }
.tc-dir { justify-content: center; width: 38px; padding: 0; cursor: pointer; color: var(--text); font: 800 15px Nunito, sans-serif; }
.tc-togs .chip .cnt, .tc-tools .pk-pop .chip .cnt { font-style: normal; font-size: 11px; color: var(--muted); }
.tc-togs .chip.on .cnt, .tc-tools .pk-pop .chip.on .cnt { color: inherit; opacity: .85; }
/* the one-line toggles (nowrap, they scroll sideways) must not widen the page: the column keeps the screen's width */
.tc, .tc-main, .tc-tools, #tc-filters, .tc-togs { min-width: 0; max-width: 100%; }
.tc-tools .pk-bar { min-width: 0; }
.tc-togs.pk-row { flex-wrap: wrap; overflow: visible; }      /* only four toggles: they wrap, none hides off the edge */

/* 21/11 (owner: "you can't read anything here; every filter list in the game's style"): the game's own list for every
   <select> (static/gsel.js); the browser's list, if it ever shows, at least readable */
.gsel-pop { position: fixed; z-index: 10000; overflow-y: auto; overscroll-behavior: contain; padding: 6px; border-radius: 16px;
  border: 2px solid rgba(164, 112, 255, .6); background: #1b1442; box-shadow: 0 16px 44px rgba(6, 3, 24, .6), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  animation: gsel-in .14s ease-out; scrollbar-width: thin; scrollbar-color: rgba(164, 112, 255, .5) transparent; }
@keyframes gsel-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.gsel-o { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 8px 12px; margin: 1px 0; border: 0; border-radius: 11px;
  background: none; color: #f1ecff; font: 800 14px/1.2 Nunito, sans-serif; text-align: left; cursor: pointer; }
.gsel-o .gsel-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsel-o:hover, .gsel-o.kb { background: rgba(164, 112, 255, .18); }
.gsel-o.on { background: linear-gradient(90deg, #2a86ff, #8b5cff); color: #fff; box-shadow: 0 2px 10px rgba(91, 51, 214, .4); }
.gsel-o.on.kb { box-shadow: 0 0 0 2px #fff inset, 0 2px 10px rgba(91, 51, 214, .4); }
.gsel-o[disabled] { opacity: .4; cursor: default; }
.gsel-ck { flex: none; font-style: normal; font-weight: 900; }
.gsel-g { padding: 8px 12px 4px; font: 800 11px Nunito, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: #a99fd0; }
.gsel-sep { height: 1px; margin: 5px 8px; background: rgba(164, 112, 255, .3); }
html.light .gsel-pop { background: #fff; border-color: rgba(124, 92, 255, .4); box-shadow: 0 16px 40px rgba(80, 50, 150, .25); }
html.light .gsel-o { color: #241a4d; }
html.light .gsel-o:hover, html.light .gsel-o.kb { background: rgba(124, 92, 255, .1); }
html.light .gsel-o.on { color: #fff; }
html.light .gsel-g { color: #6b6784; }
select option { background: #1b1442; color: #f1ecff; }
html.light select option { background: #fff; color: #241a4d; }

/* 21/11 (owner: "green online, yellow AFK, red offline"): the presence dot and its words */
.pres { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--pc); vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(10, 6, 30, .35), 0 0 8px var(--pc); }
.pres-on { --pc: #2fd96b; } .pres-afk { --pc: #ffc531; } .pres-off { --pc: #ff4d5e; }
.pres-t-on { color: #2fd96b; } .pres-t-afk { color: #e8a800; } .pres-t-off { color: #ff6b78; }
.hp-pres { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font: 800 12.5px Nunito, sans-serif; }
.zc-ttl small .pres { width: 8px; height: 8px; margin-right: 5px; vertical-align: 0; }
.zc-ttl small .zc-pres { font-weight: 800; }
.zc-head .zc-ttl small .pres-t-on { color: #6dffa6; } .zc-head .zc-ttl small .pres-t-afk { color: #ffd862; } .zc-head .zc-ttl small .pres-t-off { color: #ff9aa4; }
.ztab-avw { position: relative; display: inline-flex; flex: none; }
.ztab-avw .ztab-pres { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; box-shadow: 0 0 0 2px #1b1240; }
html.light .ztab-avw .ztab-pres { box-shadow: 0 0 0 2px #fff; }

/* 21/11 (owner: "an 'i' that takes you to the wiki"): the ⓘ next to the Explorer and Fusionist levels */
.hp-lvi { display: flex; justify-content: flex-end; margin-top: -2px; }
.lab2-who .wk-i, .wk-craft h2 .wk-i, .wk-exchip .wk-i { vertical-align: 2px; }

/* 21/11 (owner: "the font is broken" on a pack's odds): an element tag in running text, outside a card (the card's own
   .ty sizes itself to the card with cqw, which outside a card follows the whole screen) */
.ty.ty-inline { display: inline-block; font: 800 11px/1.5 Nunito, sans-serif; padding: 0 8px; vertical-align: 1px; }

/* 21/11 (owner): the recycler shows each copy's full information, favourites and locked copies can't be picked, and a
   confirmation lists the cards that will be lost; My cards has a fourth view (Competitive: the fusion pickers' list) */
.rec-row { align-items: flex-start; }
.rec-row > input { margin-top: 12px; }
.rec-row > img { width: 48px; height: 48px; }
.rec-row[data-var] { border-color: var(--vc); }
.rec-var, .rcf-var { font-style: normal; font-size: 11px; font-weight: 800; color: var(--vc, #b07cff); }
.rci { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rci i { font-style: normal; font: 800 11px/1.5 Nunito, sans-serif; padding: 0 7px; border-radius: 99px; background: color-mix(in srgb, var(--accent, #a470ff) 12%, transparent); white-space: nowrap; }
.rci .rci-pw { background: linear-gradient(90deg, #ffe7a8, #ffc65c); color: #6b4300; }
.rci .rci-pot.g-perfect { background: linear-gradient(90deg, #ffe27a, #ff9ed8); color: #5b2b00; }
.rci .rci-pot.g-good { background: #d8f7e6; color: #136b3e; }
.rci .rci-pot.g-average { background: #e7ecff; color: #2f3f8f; }
.rci .rci-pot.g-bad { background: #ffe1e1; color: #8a1d1d; }
.rci .rci-el { background: color-mix(in srgb, var(--c) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); }
.rci .rci-gen { background: #3a2390; color: #fff; }
.rci-st { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 3px; font: 700 11px Nunito, sans-serif; color: var(--muted); }
.rci-st i { font-style: normal; white-space: nowrap; }
.rec-why { margin-top: 4px; font-weight: 800 !important; color: #b36b00 !important; }
.rcell { display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.rcell-i { padding: 0 2px; }
.rcell-i .rci { margin-top: 0; gap: 3px; }
.rcell-i .rci .rci-el, .rcell-i .rci .rci-g, .rcell-i .rci .rci-ph { display: none; }
.rcell-i .rci-st { font-size: 10px; gap: 1px 6px; }
.rcf-h { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: linear-gradient(180deg, #fff1ea, #ffd9c7); color: #6b2a00; }
.rcf-ico { font-size: 26px; line-height: 1; }
.rcf-h b { display: block; font-size: 16px; } .rcf-h small { display: block; font-weight: 700; margin-top: 2px; }
.rcf-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; max-height: 46vh; overflow-y: auto; }
.rcf-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: color-mix(in srgb, var(--accent, #a470ff) 8%, transparent); }
.rcf-row img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.rcf-row b { display: block; font-size: 13px; } .rcf-row small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.rcf-ok { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font: 800 13px Nunito, sans-serif; cursor: pointer; }
.rcf-ok input { width: 20px; height: 20px; accent-color: #ff4f6f; flex: none; }
.rcf-btns .btn.bad[disabled] { opacity: .45; }
.cards-bar .seg.seg4 { grid-template-columns: repeat(4, auto); max-width: 100%; }
.cards-bar .seg.seg4 button { min-width: 0; padding: 7px 10px; white-space: nowrap; }
@media (max-width: 480px) { .cards-bar .seg.seg4 { grid-template-columns: repeat(4, 1fr); width: 100%; } .cards-bar .seg.seg4 button { padding: 7px 4px; font-size: 12px; } }
.cpro { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.cpro[hidden], .cclassic[hidden] { display: none; }
.cpro .cpro-grid { max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
@media (min-width: 900px) { .cpro .cpro-grid { grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); } }

/* 21/11 (owner: "add an Original seal"; later: "only a very small Original seal, top right, that doesn't get in the art's
   way"): a little gold star coin on the frame's top-right corner, outside the art */
.card .orig-seal { position: absolute; z-index: 7; top: -1.6cqw; right: -1.6cqw; width: clamp(13px, 9cqw, 22px); height: clamp(13px, 9cqw, 22px);
  display: grid; place-items: center; border-radius: 50%; pointer-events: auto; cursor: help;
  font: 900 clamp(8px, 5.6cqw, 13px)/1 Nunito, sans-serif; color: #fff; text-shadow: 0 0 2px #9a5a00, 0 1px 0 #9a5a00;
  background: radial-gradient(circle at 35% 30%, #fff6c8, #ffd23d 45%, #e08a00 100%); border: 1.5px solid #fffbe6;
  box-shadow: 0 0 0 1px rgba(140, 80, 0, .55), 0 1px 4px rgba(60, 30, 0, .45), 0 0 6px rgba(255, 210, 61, .55); }
.orig-mini { font-style: normal; margin-left: 6px; padding: 1px 8px; border-radius: 99px; font: 900 10.5px Nunito, sans-serif; color: #5b3500;
  background: linear-gradient(135deg, #fff6c8, #ffd23d 45%, #f0960a); vertical-align: 1px; }
.act.orig-row.on { border-color: #ffd23d; background: linear-gradient(90deg, rgba(255, 210, 61, .14), transparent); }

/* 21/11 (owner): a copy that went up a grade at its fusion */
.card .tier-up { font-style: normal; margin-left: .8cqw; color: #ffd23d; text-shadow: 0 0 1.2cqw rgba(255, 210, 61, .8); }
.lsim-tier { margin: 8px 0; padding: 8px 12px; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 210, 61, .18), rgba(164, 112, 255, .14)); font: 800 13px Nunito, sans-serif; }
.lsim-tier small { display: block; font-weight: 700; color: var(--muted); margin-top: 2px; }

/* 21/11 (owner): the player's cards right under the stamps on the profile */
.hp-cards { margin-top: 14px; }
.hp-cards .hp-h { margin-bottom: 4px; }

/* 21/11 (owner: "make the main class") */
.wk-main .wk-h { display: flex; align-items: center; gap: 6px; }
.wk-mainpick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0; }
.wk-mp { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; text-align: left;
  background: color-mix(in srgb, var(--accent, #a470ff) 10%, transparent); color: inherit; font: inherit; }
.wk-mp span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wk-mp b { font: 900 15px Fredoka, Nunito, sans-serif; }
.wk-mp small { font: 700 11.5px Nunito, sans-serif; color: var(--muted); }
.wk-mp.on { border-color: #ffd23d; background: linear-gradient(135deg, rgba(255, 210, 61, .18), rgba(164, 112, 255, .14)); }
.wk-mp.on small { color: #b07800; }
html:not(.light) .wk-mp.on small { color: #ffd23d; }
.wk-mp[disabled] { cursor: default; }
.wk-mp:not(.on)[disabled], .wk-mp:not(.on):has(small) { opacity: .92; }
.wk-mainb { font-style: normal; display: inline-block; margin-left: 2px; padding: 1px 8px; border-radius: 99px; font: 900 10.5px Nunito, sans-serif;
  background: linear-gradient(135deg, #fff6c8, #ffd23d 45%, #f0960a); color: #5b3500; vertical-align: 2px; }
.wk-mainb.off { background: rgba(140, 130, 180, .22); color: var(--muted); }
.hp-lv .hp-mainb { font-style: normal; margin-left: 5px; color: #ffd23d; text-shadow: 0 0 6px rgba(255, 210, 61, .7); }
.hp-lv.main { box-shadow: inset 0 0 0 1.5px rgba(255, 210, 61, .65); }

/* 21/11 (owner): the showcase slot picker's two views */
.pkf-view { display: inline-grid; grid-template-columns: auto auto; margin: 8px 0; }
.pkf-view button { padding: 7px 16px; font-size: 13px; }
.pkf[hidden], #pk[hidden] { display: none; }
.pk-box .cpro .cpro-grid { max-height: none; }

/* 21/11 (owner): the main class notice */
.cn-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 6px; }
.cn-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px 12px; border-radius: 16px; cursor: pointer;
  border: 2px solid transparent; color: inherit; font: inherit; text-align: center; background: color-mix(in srgb, var(--accent, #a470ff) 10%, transparent); }
.cn-opt.ex { background: linear-gradient(160deg, rgba(61, 214, 255, .16), rgba(47, 134, 255, .08)); }
.cn-opt.al { background: linear-gradient(160deg, rgba(255, 79, 163, .16), rgba(164, 112, 255, .1)); }
.cn-opt:hover { border-color: rgba(164, 112, 255, .6); }
.cn-opt.cur { border-color: #ffd23d; }
.cn-ic { font-size: 30px; line-height: 1; }
.cn-ic .gi { width: 34px; height: 34px; }
.cn-opt b { font: 900 17px Fredoka, Nunito, sans-serif; }
.cn-opt small { font: 700 11.5px/1.3 Nunito, sans-serif; color: var(--muted); }
.cn-cur { font-style: normal; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 1px 9px; border-radius: 99px; white-space: nowrap;
  font: 900 10px Nunito, sans-serif; background: linear-gradient(135deg, #fff6c8, #ffd23d 45%, #f0960a); color: #5b3500; }
.cn-later { display: block; margin: 6px auto 0; }
@media (max-width: 380px) { .cn-opts { grid-template-columns: 1fr; } }

/* 21/11 (owner): the side card's level is the main class's: a Fusionist main's ring and badge in the Lab's pink */
.gsp-ring.al { background: conic-gradient(#ff4fa3 var(--p), rgba(255,255,255,.14) 0); }
.gsp-lvl { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.gsp-lvl .gi { width: 11px; height: 11px; }
.gsp-lvl.al { background: linear-gradient(180deg, #ff9ed8, #d4247f) !important; color: #fff !important; }

/* 21/11 (owner): each main class's perks in short lines */
.cls-perks { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.cls-perks li { font: 800 11.5px/1.3 Nunito, sans-serif; }
.cls-perks li.up { color: #1f9a5a; }
html:not(.light) .cls-perks li.up { color: #5fe39a; }
.cls-perks li.down { color: var(--muted); font-weight: 700; }
.cn-opt .cls-perks { align-self: stretch; }

/* 21/11 (owner): the Workshop on one page, with its price table */
.wk-jump { position: sticky; top: 0; z-index: 3; padding: 6px 0; backdrop-filter: blur(6px); }
.wk-part { margin-top: 18px; }
.wk-ph { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font: 900 19px Fredoka, Nunito, sans-serif; }
.wk-ph .n { font-size: 11px; padding: 0 7px; border-radius: 99px; background: #ff4f6f; color: #fff; }
.wk-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wk-pt { width: 100%; border-collapse: collapse; font: 700 13px Nunito, sans-serif; border-radius: 14px; overflow: hidden;
  background: color-mix(in srgb, var(--accent, #a470ff) 7%, transparent); }
.wk-pt th { text-align: left; padding: 7px 10px; font: 900 11.5px Nunito, sans-serif; color: var(--muted); background: color-mix(in srgb, var(--accent, #a470ff) 12%, transparent); }
.wk-pt td { padding: 6px 10px; border-top: 1px solid color-mix(in srgb, var(--accent, #a470ff) 14%, transparent); }
.wk-pnotes { grid-column: 1 / -1; margin: 0; padding-left: 18px; font: 600 12px/1.4 Nunito, sans-serif; color: var(--muted); }
@media (max-width: 640px) { .wk-prices { grid-template-columns: 1fr; } }

/* 21/11: the class of the window picker */
.cn-use { display: block; margin-top: 6px; font-size: 11px; opacity: .8; }

/* 21/11: the class of the window on the side card (owner: "more in the game's style") */
.gsp-cls { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; padding: 3px 4px 3px 3px; border-radius: 99px; width: fit-content; max-width: 100%;
  white-space: nowrap; color: #fff; font: 800 12px Fredoka, Nunito, sans-serif; letter-spacing: .2px;
  background: linear-gradient(135deg, #36d6ff, #4b6dff); box-shadow: 0 3px 0 rgba(30, 40, 120, .45), inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 14px rgba(70, 150, 255, .35); }
.gsp-cls.al { background: linear-gradient(135deg, #b46cff, #ff6fb5); box-shadow: 0 3px 0 rgba(110, 30, 110, .45), inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 14px rgba(220, 100, 255, .35); }
.gsp-cls.none { background: linear-gradient(135deg, #ffd25a, #ff9b3d); color: #4a2600; cursor: pointer; padding-right: 10px;
  box-shadow: 0 3px 0 rgba(140, 70, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .5); animation: gspClsPulse 1.6s ease-in-out infinite; }
@keyframes gspClsPulse { 50% { filter: brightness(1.12); transform: translateY(-1px); } }
.gsp-cls-ic { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .95); flex: none; }
.gsp-cls-ic svg, .gsp-cls-ic .gi { width: 13px; height: 13px; color: #4b6dff; }
.gsp-cls.al .gsp-cls-ic svg, .gsp-cls.al .gsp-cls-ic .gi { color: #c24fe0; }
.gsp-cls b { text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.gsp-cls em { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 99px; background: rgba(0, 0, 0, .22); }
.gsp-cls em svg, .gsp-cls em .gi { width: 10px; height: 10px; }
.gsp-cls.none svg, .gsp-cls.none .gi { width: 14px; height: 14px; }

/* 21/11: the Lab in order mode (an order for a Fusionist, built on the fusion screen) */
.lab-order { display: flex; align-items: center; gap: 10px; margin: 8px 0 10px; padding: 10px 12px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 201, 79, .18), rgba(255, 122, 200, .14)); border: 1px solid rgba(255, 201, 79, .55); }
.lab-order-ic { font-size: 24px; }
.lab-order b { display: block; font: 800 15px Fredoka, Nunito, sans-serif; }
.lab-order small { display: block; font-size: 11.5px; opacity: .8; }
.wk-tolab { margin-top: 10px; }

/* 21/11 (owner): "who makes the fusion?" under the Lab's creatures */
.lab-who { margin: 10px 0; padding: 10px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.lw-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.lw-opt { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; text-align: left; padding: 10px; border-radius: 14px;
  border: 2px solid var(--line); background: rgba(255, 255, 255, .04); color: inherit; cursor: pointer; }
.lw-opt i { grid-row: span 2; font-style: normal; font-size: 22px; }
.lw-opt b { font: 800 15px Fredoka, Nunito, sans-serif; }
.lw-opt small { font-size: 11px; opacity: .75; }
.lw-opt.on { border-color: #b46cff; background: linear-gradient(135deg, rgba(180, 108, 255, .2), rgba(255, 111, 181, .14)); box-shadow: 0 0 14px rgba(180, 108, 255, .3); }
.lw-list { display: grid; gap: 6px; margin: 10px 0 6px; max-height: 260px; overflow: auto; }
.lw-al { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: inherit; text-align: left; cursor: pointer; }
.lw-al .avatar { width: 32px; height: 32px; font-size: 14px; flex: none; }
.lw-al small { display: block; font-size: 11px; opacity: .75; }
.lw-al.on { border-color: #4fd18b; background: rgba(79, 209, 139, .12); }
.lw-al i { font-style: normal; color: #4fd18b; font-weight: 900; }
.lw-al:disabled { opacity: .5; cursor: default; }

/* 21/11: the battle replay's controls (#/replay/<id>) */
.rp-bar { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border-radius: 99px; background: rgba(14, 8, 36, .88); color: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .45); font: 700 13px Nunito, sans-serif; }
.rp-bar button, .rp-bar a { min-width: 34px; height: 30px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .12); color: #fff; font: 800 13px Nunito, sans-serif; cursor: pointer; display: grid; place-items: center; text-decoration: none; }
.rp-bar button.on { background: linear-gradient(135deg, #b46cff, #ff6fb5); }
.rp-tag { color: #ffc94f; } .rp-t { opacity: .85; min-width: 92px; text-align: center; }
.ch-pkbtn { display: block; width: calc(100% - 8px); margin: 0 4px 8px; }

/* 22/11 (owner): the first discoverer's signature, tiny, under the card's plate */
.card .csig { position: absolute; z-index: 3; right: 6.5%; bottom: .6%; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: italic 700 clamp(4px, 2.8cqi, 9px)/1.1 "Barlow Semi Condensed", Nunito, sans-serif; letter-spacing: .3px; color: rgba(255, 255, 255, .78);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8); pointer-events: none; }

/* 22/11: the site's live cards: room around the card so its glow fades out instead of ending in a box */
html.embed-card.embed-pad #view { padding: 13% 16% !important; }

/* 23/11: the new picture's report "!" next to Flip */
.cm-flipr { display: flex; align-items: center; justify-content: center; gap: 6px; }
.cm-newrep { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  font: 900 15px/1 Nunito, sans-serif; color: #fff; background: linear-gradient(135deg, #ff9f43, #ff4d6d); box-shadow: 0 2px 8px rgba(255, 77, 109, .45); }
.cm-newrep:hover { transform: scale(1.08); }

/* 23/11 (owner: "big lists of cards freeze the site"): a card in a grid that is off-screen is not drawn at all (nor its
   effects and animations) until it comes near the screen */
.grid > .card, .grid > a > .card, .grid > .cw, .grid > .ccell, .ls-grid > .pk-t, .dexgrid > .dex, .fl-list > .fl-it {
  content-visibility: auto; contain-intrinsic-size: auto 260px; }
.ls-grid > .pk-t, .dexgrid > .dex, .fl-list > .fl-it { contain-intrinsic-size: auto 130px; }
.cgroups > .cgrp { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* 23/11 (owner: "a profile or a big batch of cards freezes"): a card scrolled out of sight stops all its effects (the
   idle float, sparkles, rim, holo) until it comes back - app.js watches every card with one IntersectionObserver. */
.card.offs, .card.offs *, .card.offs::before, .card.offs::after, .card.offs *::before, .card.offs *::after {
  animation-play-state: paused !important; }

/* 23/11: the sign-up's terms, invite and e-mail code (app.js viewLogin / codeScreen) */
.su-terms { max-height: 190px; overflow-y: auto; padding: 4px 14px 10px; border-radius: 12px; border: 1px solid var(--line, #33285e);
  background: rgba(124, 92, 255, .07); font-size: 13px; line-height: 1.5; color: inherit; }
.su-terms h1 { font-size: 17px; margin: 8px 0 2px; } .su-terms h2 { font-size: 14px; margin: 12px 0 4px; color: #8a6bff; }
.su-terms .box { background: rgba(154, 123, 255, .12); border-left: 3px solid #9a7bff; padding: 6px 10px; border-radius: 8px; }
.su-terms section { margin: 0; } .su-terms ul { padding-left: 18px; margin: 4px 0; } .su-terms p { margin: 4px 0; }
.su-terms .ver { color: var(--muted, #b3a9da); font-size: 12px; }
.su-chk { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.su-chk input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: #9a7bff; }
.su-chk input:disabled + span { opacity: .55; }
.su-tread a { color: #b9a5ff; }
.su-inv.ok { color: #5cffb0; } .su-inv.bad { color: #ff8a95; }
.su-code { max-width: 420px; margin: 0 auto; text-align: center; }
.su-digits { font: 700 34px/1 Fredoka, sans-serif !important; letter-spacing: 12px; text-align: center; padding: 12px !important; }
.su-warn { color: #ffb36b; }

/* 23/11: the Invites page (invites.js) */
.iv { display: grid; gap: 16px; max-width: 900px; margin: 0 auto; }
.iv h2 { margin-top: 0; } .iv h4 { margin: 18px 0 6px; }
.iv-codes { display: grid; gap: 8px; }
.iv-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px;
  background: rgba(92, 255, 176, .07); border: 1px dashed rgba(92, 255, 176, .4); }
.iv-code.used { opacity: .7; border-style: solid; border-color: var(--line, #33285e); background: transparent; }
.iv-c { font: 700 22px/1 Fredoka, sans-serif; letter-spacing: 3px; color: #18a86f; }
.iv-code.used .iv-c { color: var(--muted, #b3a9da); text-decoration: line-through; }
.iv-st { font-size: 13px; font-weight: 700; color: var(--muted, #b3a9da); } .iv-st.ok { color: #5cffb0; }
.iv-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.iv-pitch p { margin: 6px 0; } .iv-ben { margin: 8px 0 12px; padding-left: 18px; } .iv-ben li { margin: 4px 0; font-weight: 700; }
.iv-form { display: grid; gap: 10px; margin-top: 10px; }
.iv-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 800; color: var(--muted, #b3a9da); }
.iv-form input, .iv-form select, .iv-form textarea { font: 600 15px Nunito, sans-serif; padding: 9px 11px; border-radius: 10px;
  border: 1px solid rgba(124, 92, 255, .3); background: rgba(124, 92, 255, .06); color: inherit; }
.iv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.iv-note { color: var(--muted, #b3a9da); font-size: 14px; }
.iv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px;
  background: radial-gradient(120% 140% at 0 0, rgba(92, 255, 176, .16), transparent 60%), rgba(154, 123, 255, .12); border: 1px solid rgba(92, 255, 176, .35); }
.iv-head small { display: block; font-weight: 800; color: var(--muted, #b3a9da); text-transform: uppercase; font-size: 12px; }
.iv-big { display: block; font: 700 34px/1.1 Fredoka, sans-serif; letter-spacing: 3px; color: #18a86f; }
.iv-link { font-size: 13px; opacity: .8; word-break: break-all; }
.iv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.iv-stats span { display: grid; padding: 10px 12px; border-radius: 12px; background: rgba(124, 92, 255, .1); font-size: 12px; font-weight: 700; color: var(--muted, #b3a9da); }
.iv-stats b { font: 700 22px/1.1 Fredoka, sans-serif; color: inherit; } .iv-stats .due b { color: #e0a800; }
.iv-tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.iv-tab th, .iv-tab td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--line, #33285e); }
.iv-tab th { font-size: 12px; color: var(--muted, #b3a9da); }
.iv-pays { padding-left: 18px; } .iv-people { display: flex; flex-wrap: wrap; gap: 6px; }
.iv-people a { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); font-weight: 700; font-size: 13px; text-decoration: none; color: inherit; }
.iv-people a.vip { background: linear-gradient(90deg, rgba(255, 210, 61, .25), rgba(154, 123, 255, .25)); }
@media (max-width: 560px) { .iv-row { grid-template-columns: 1fr; } .iv-c { font-size: 19px; } }

:root[data-theme="dark"] .iv-c, :root[data-theme="dark"] .iv-big { color: #5cffb0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .iv-c, :root:not([data-theme="light"]) .iv-big { color: #5cffb0; } }
