/* ============ PokéLit — interface ============
 * Design system (visual pass 17-10-2026): layered indigo backgrounds, a warm
 * accent (gold) and a cool one (cyan), panels with a thin border and inner
 * glow, and two local fonts (OFL):
 *   - Pixelify Sans: titles, buttons, numbers (the pixel-art identity).
 *   - Nunito: long text (descriptions, notices, help), for readability.
 */
/* Pixelify Sans with redrawn digits so they are not confused (tools/make_font.py). */
@font-face {
  font-family: 'Pixelify';
  src: url('../assets/fonts/PixelifyPS-400.ttf') format('truetype');
  font-weight: 400 550;
  font-display: block;
}
@font-face {
  font-family: 'Pixelify';
  src: url('../assets/fonts/PixelifyPS-700.ttf') format('truetype');
  font-weight: 551 900;
  font-display: block;
}
/* Nunito (variable 500-800), Latin only: if missing, the system font. */
@font-face {
  font-family: 'Nunito';
  src: url('../assets/fonts/Nunito-latin.woff2') format('woff2');
  font-weight: 500 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  src: url('../assets/fonts/Nunito-latin-ext.woff2') format('woff2');
  font-weight: 500 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* text */
  --ink: #f3f6ff;
  --muted: #aebde3;          /* 7:1 on --s1 */
  --faint: #8293c0;
  /* backgrounds and surfaces (back to front) */
  --bg: #060a18;
  --s0: #0e0e0e;
  --s1: #151515;
  --s2: #1e1e1e;
  --s3: #282828;
  --well: rgba(4, 8, 22, .42);        /* inset inside a panel */
  --line: rgba(150, 180, 255, .16);
  --line2: rgba(170, 200, 255, .3);
  --hi: rgba(255, 255, 255, .07);     /* top inner glow */
  /* accents */
  --gold: #ffd24a;
  --gold2: #f4a21f;
  --gold-ink: #3a2300;
  --cyan: #5fd8ff;
  --cyan2: #2a9fe0;
  --red: #ff5f6d;
  --green: #5fe08a;
  --pink: #ff8ad8;
  /* compatibility with old rules */
  --box1: #1e1e1e;
  --box2: #151515;
  --edge: #dfe8ff;
  --edge-in: #424242;
  --edge-out: #050916;
  --shadow: #050a1c;
  --r1: #a7b4c8; --r2: #5fe08a; --r3: #4fb4ff; --r4: #c47bff; --r5: #ffcb3d;
  /* shape */
  --rad-s: 8px; --rad: 12px; --rad-l: 16px;
  --sp1: 4px; --sp2: 8px; --sp3: 12px; --sp4: 16px; --sp5: 24px;
  --elev1: 0 2px 0 rgba(0,0,0,.25), 0 6px 14px rgba(0,0,0,.25);
  --elev2: 0 18px 48px rgba(0,0,0,.55), 0 2px 0 rgba(0,0,0,.3);
  --font: 'Pixelify', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.35 var(--font);
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: none;
}
canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
/* Pinned to the visible viewport (iPhone: 100vh included the Safari bar and the canvas came out stretched). */
#game { display: block; position: fixed; left: 0; top: 0; width: 100%; height: 100%; height: 100dvh; touch-action: none; }
button { font: inherit; color: inherit; }
input { font: inherit; }
/* Long text: Nunito, antialiased and without the pixel shadow. */
p, .sub, .note, .ds, label, .err, .legal p, .news-day li, .set-row small, .mission small, .ach small,
.support-ask p, .lay-help, .credits, .keys, .rates .note, .login-tag, .login-official, .boot-in p, #res-text, .q, .answer {
  font-family: var(--font-body); -webkit-font-smoothing: antialiased; text-shadow: none;
}
.sub, .note, .ds, .err, label { font-weight: 600; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- screen layers ---------- */
.scr {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  /* Installed app edge to edge: nothing under the notch or the corners. */
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  animation: fade .2s ease-out;
}
.scr.hidden { display: none; }
/* Screens that open with the top bar visible: they start below it. */
@media (min-height: 521px) {
  #scr-goals, #scr-dex, #scr-upgrades, #scr-gacha, #scr-friends, #scr-rank, #scr-lobby, #scr-profile, #scr-club { padding-top: 66px; }
  #scr-upgrades .ban-modal { padding-top: 66px; }     /* (26-10-2026) the Upgrades pop-ups too: the top bar covered their Close */
}
/* (26-10-2026) Screens 521–620 px tall (a laptop's browser window, a tablet with its bars): the top bar covered the title
   row of these windows, Back included. */
@media (min-height: 521px) and (max-height: 620px) {
  #scr-ivs, #scr-pc, #scr-mega, #scr-demon { padding-top: 66px; }
  #scr-ivs > .box, #scr-pc > .box, #scr-mega > .box, #scr-demon > .box { max-height: 100% !important; margin-top: 0 !important; }
}
.scr.dim { background: radial-gradient(ellipse at 50% 35%, rgba(19,19,19,.62), rgba(3,5,14,.9) 75%); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: translateY(6px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- panel ---------- */
.box {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 90px),
    linear-gradient(180deg, var(--s2), var(--s1) 70%, #121212);
  border: 1px solid var(--line2);
  border-radius: var(--rad-l);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(0,0,0,.25), 0 0 0 1px rgba(2,4,12,.7), var(--elev2);
  padding: 22px 24px;
  text-shadow: 0 2px 0 var(--shadow);
  animation: pop .24s cubic-bezier(.2,.8,.3,1);
  max-height: 100%;
  overflow: auto;
}
.box h1, .box h2, .box h3 { margin: 0 0 6px; font-weight: 700; letter-spacing: .5px; }
.box h2 { font-size: 26px; color: #fff; }
.box h3 { font-size: 18px; }
/* Window title: gold diamond in front (header only). */
.box > .row.between > h2::before, .box > h2:first-child::before {
  content: ''; display: inline-block; width: 9px; height: 9px; margin: 0 10px 0 2px; vertical-align: 4px;
  background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 2px rgba(255,210,74,.25);
}
.box.center > h2:first-child::before, #scr-over h2::before { display: none; }
.sub { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.gold { color: var(--gold); }
.center { text-align: center; }

/* ---------- buttons ----------
 * Base (secondary), .gold (primary), .ghost, .danger, .google; .small.
 * All with a 3 px "lip" underneath that sinks when pressed. */
.btn {
  appearance: none; cursor: pointer; position: relative;
  padding: 10px 20px;
  border: 1px solid rgba(170,200,255,.38);
  border-radius: 10px;
  background: linear-gradient(180deg, #3e3e3e, #2d2d2d 55%, #262626);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 0 #0e0e0e, 0 5px 10px rgba(0,0,0,.3);
  font-size: 17px; font-weight: 700; color: var(--ink);
  text-shadow: 0 2px 0 rgba(5,10,28,.6);
  transition: transform .07s, filter .12s, box-shadow .07s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 0 #0e0e0e, 0 2px 4px rgba(0,0,0,.3); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn:disabled { filter: saturate(.25) brightness(.72); opacity: .7; cursor: not-allowed; transform: none; }
.btn.gold {
  background: linear-gradient(180deg, #ffe58a, #ffc93c 50%, #f4a21f);
  color: var(--gold-ink); text-shadow: 0 1px 0 rgba(255,255,255,.45);
  border-color: #fff3c4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -2px 0 rgba(160,90,0,.25), 0 3px 0 #9a5d06, 0 6px 14px rgba(244,162,31,.25);
}
.btn.gold:active { box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 0 #9a5d06, 0 2px 6px rgba(244,162,31,.2); }
.btn.ghost {
  background: rgba(255,255,255,.04); border-color: var(--line2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.btn.ghost:hover { background: rgba(255,255,255,.1); filter: none; border-color: rgba(200,220,255,.5); }
.btn.ghost:active { box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: 14px; border-radius: 9px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

/* Main menu list: big "Jugar" and the rest as tiles with an icon. */
.menu-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-item {
  appearance: none; cursor: pointer; position: relative;
  display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center;
  text-align: left; padding: 9px 12px; border-radius: var(--rad);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--hi);
  font-size: 18px; font-weight: 700; letter-spacing: .3px; line-height: 1.15;
  text-shadow: 0 2px 0 var(--shadow);
  transition: background .12s, border-color .12s, transform .08s;
  min-width: 0;
}
.menu-item small { display: block; grid-column: 2; font: 600 12px/1.25 var(--font-body); -webkit-font-smoothing: antialiased;
  color: var(--muted); letter-spacing: 0; text-shadow: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item:hover, .menu-item:focus-visible { background: linear-gradient(180deg, rgba(120,170,255,.16), rgba(120,170,255,.06)); border-color: rgba(160,200,255,.45); }
.menu-item:active { transform: translateY(1px); }
.menu-item:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.menu-item.play {
  grid-column: span 2; grid-template-columns: 44px 1fr; padding: 12px 16px;
  font-size: 28px; color: var(--gold-ink); text-shadow: 0 1px 0 rgba(255,255,255,.5);
  background: linear-gradient(180deg, #ffe58a, #ffc93c 55%, #f4a21f);
  border: 1px solid #fff3c4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 0 #9a5d06, 0 8px 22px rgba(244,162,31,.3);
}
.menu-item.play small { color: rgba(58,35,0,.78); font-size: 13px; }
.menu-item.play:hover, .menu-item.play:focus-visible { background: linear-gradient(180deg, #fff0b0, #ffd35a 55%, #f7ae2c); border-color: #fff8dc; }
.menu-item.play:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 0 #9a5d06; }
.menu-item.play .mi-ico img { width: 34px; height: 34px; }
/* The PMD arrow is no longer needed: the tile shows the focus state. */
.menu-item::before { content: none; }
.mi-ico { grid-row: span 2; display: flex; }

/* ---------- forms ---------- */
.tabs { display: flex; gap: 4px; margin-bottom: 14px; padding: 4px; border-radius: 12px; background: var(--well); border: 1px solid var(--line); }
.tab {
  flex: 1; padding: 8px; cursor: pointer; border-radius: 9px;
  background: transparent; border: 1px solid transparent;
  text-align: center; font-weight: 700; color: var(--muted);
  transition: background .12s, color .12s;
}
button.tab { appearance: none; font: inherit; font-weight: 700; color: var(--muted); text-shadow: inherit; }
.tab:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.tab.on, button.tab.on { color: var(--ink); border-color: var(--line2); background: linear-gradient(180deg, #383838, #2d2d2d); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 2px 6px rgba(0,0,0,.3); }
label { display: block; font-size: 14px; color: var(--muted); margin: 8px 0 4px; }
.field {
  width: 100%; padding: 10px 12px;
  background: #0e0e0e; color: #fff;
  border: 1px solid var(--line2); border-radius: 10px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.35);
  font: 600 17px var(--font-body); -webkit-font-smoothing: antialiased; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.field::placeholder { color: var(--faint); }
.field:focus { border-color: var(--cyan); box-shadow: inset 0 2px 4px rgba(0,0,0,.35), 0 0 0 3px rgba(95,216,255,.2); }
.err { color: #ffb4bc; min-height: 20px; font-size: 14px; margin: 8px 0 0; }
.note { color: var(--muted); font-size: 13px; margin-top: 14px; }
.note a, .sub a { color: #9fdcff; }

/* ---------- logo ---------- */
.logo { text-align: center; margin-bottom: 18px; }
.logo .t1 { font-size: 46px; font-weight: 700; line-height: 1; letter-spacing: 1px; color: var(--gold);
  text-shadow: 0 3px 0 #a35a00, 0 6px 0 #101010, 0 10px 18px rgba(0,0,0,.45); }
/* With a gradient (if the browser can clip the background to the text). */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo .t1, .boot-in h1, .about-logo {
    background: linear-gradient(180deg, #fff7d1 0%, #ffe07a 38%, #ffc12e 62%, #f08f12 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
    filter: drop-shadow(0 3px 0 #9a4f00) drop-shadow(0 3px 0 #101010) drop-shadow(0 6px 10px rgba(0,0,0,.45));
  }
}
.logo .t2 { display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 700; color: var(--cyan); margin-top: 8px; letter-spacing: 6px; padding-left: 6px;
  text-transform: uppercase; text-shadow: 0 2px 0 var(--shadow); }
.logo .t2::before, .logo .t2::after { content: ''; flex: 0 0 28px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan)); }
.logo .t2::after { background: linear-gradient(90deg, var(--cyan), transparent); }
.login-box { width: min(420px, 100%); }

/* ---------- personality test ---------- */
.test-box { width: min(620px, 100%); }
.progress { height: 8px; background: var(--well); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 18px; }
.progress i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--gold2), var(--gold)); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); transition: width .25s; }
.q { font-size: 21px; font-weight: 800; line-height: 1.3; margin: 0 0 16px; min-height: 2.6em; }
.test-head { margin-bottom: 12px; gap: 8px; }
.test-head .sub { margin: 0; }
.answers { display: flex; flex-direction: column; gap: 8px; }
.answer {
  appearance: none; text-align: left; cursor: pointer; color: var(--ink);
  padding: 12px 16px 12px 36px; position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border: 1px solid var(--line2); border-radius: var(--rad);
  box-shadow: inset 0 1px 0 var(--hi);
  font-size: 16px; font-weight: 700; line-height: 1.3;
  transition: background .12s, border-color .12s, transform .08s;
}
.answer::before {
  content: ''; position: absolute; left: 14px; top: 50%; width: 9px; height: 9px; margin-top: -5px;
  border-radius: 2px; transform: rotate(45deg); background: var(--line2); transition: background .12s;
}
.answer:hover, .answer:focus-visible { background: linear-gradient(180deg, rgba(120,170,255,.18), rgba(120,170,255,.07)); border-color: rgba(170,210,255,.6); }
.answer:hover::before, .answer:focus-visible::before { background: var(--gold); }
.answer:active { transform: translateY(1px); }

.result { width: min(560px, 100%); text-align: center; }
.result .trait { font-size: 30px; color: var(--gold); margin: 4px 0; }
/* A Pokémon's stage: pedestal in its type color (--stage-c). */
.stage {
  display: block; margin: 8px auto 6px;
  background:
    radial-gradient(ellipse 44% 12% at 50% 88%, rgba(120,170,255,.35), transparent 70%),
    radial-gradient(circle at 50% 58%, rgba(120,170,255,.16), transparent 62%),
    linear-gradient(180deg, #1c1c1c, #0d0d0d);
  background:
    radial-gradient(ellipse 44% 12% at 50% 88%, color-mix(in srgb, var(--stage-c, #5b83d6) 60%, transparent), transparent 70%),
    radial-gradient(circle at 50% 58%, color-mix(in srgb, var(--stage-c, #5b83d6) 24%, transparent), transparent 62%),
    linear-gradient(180deg, #1c1c1c, #0d0d0d);
  border: 1px solid var(--stage-c, #5b83d6);
  border-radius: var(--rad-l);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(0,0,0,.35), 0 0 0 1px rgba(2,4,12,.7), 0 10px 26px rgba(0,0,0,.45);
}
.stage.shiny { border-color: #9ae6ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px rgba(2,4,12,.7), 0 0 24px rgba(154,230,255,.45); }

/* ---------- Pokémon grid ---------- */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px; max-height: 56vh; overflow-y: auto; padding: 4px;
}
/* Card: frame in its rarity color (.r1-.r5 -> --rc, menu.js). */
.cell {
  --rc: rgba(167,180,200,.3);
  position: relative; cursor: pointer; text-align: center;
  background:
    radial-gradient(ellipse 70% 40% at 50% 62%, rgba(255,255,255,.05), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18));
  border: 1px solid var(--line); border-radius: var(--rad);
  box-shadow: inset 0 1px 0 var(--hi), inset 0 -3px 0 var(--rc);
  padding: 4px 2px 8px; transition: transform .08s, border-color .12s, background .12s;
}
.cell.r1 { --rc: rgba(167,180,200,.55); } .cell.r2 { --rc: var(--r2); } .cell.r3 { --rc: var(--r3); }
.cell.r4 { --rc: var(--r4); } .cell.r5 { --rc: var(--r5); }
.cell.r5:not(.locked) { background: radial-gradient(ellipse 80% 50% at 50% 70%, rgba(255,203,61,.14), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18)); }
.cell:hover { transform: translateY(-2px); border-color: rgba(190,215,255,.5); background-color: rgba(255,255,255,.06); }
.cell.on { border-color: var(--gold); box-shadow: inset 0 1px 0 var(--hi), inset 0 -3px 0 var(--rc), 0 0 0 1px var(--gold), 0 0 16px rgba(255,210,74,.25); }
.cell.locked { cursor: default; opacity: .72; box-shadow: inset 0 1px 0 var(--hi), inset 0 -3px 0 rgba(130,147,192,.35); }
.cell.locked:hover { transform: none; border-color: var(--line); }
.cell canvas { display: block; margin: 0 auto; }
.cell b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .no { position: absolute; top: 4px; left: 7px; font-size: 11px; color: var(--faint); }
.cell .stars { font-size: 10px; letter-spacing: -1px; }
.cell .partner { position: absolute; top: 3px; right: 5px; font-size: 12px; }

.wide { width: min(980px, 100%); }
.split { display: grid; grid-template-columns: 1fr 300px; gap: 18px; }
.panel {
  background: var(--well); border: 1px solid var(--line); border-radius: var(--rad); padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.stat { display: grid; grid-template-columns: 90px 1fr 34px; gap: 8px; align-items: center; font-size: 14px; margin: 5px 0; }
.stat .bar { height: 8px; background: rgba(0,0,0,.4); border-radius: 6px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.stat .bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold2), var(--gold)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
/* Type chip: type color (inline) with a glow and dark border. */
.type {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: #0e1220; text-shadow: 0 1px 0 rgba(255,255,255,.3); margin-right: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(0,0,0,.2), 0 1px 0 rgba(0,0,0,.35);
}
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- legendary encounter (18-10-2026, ui/rift-intro.js) ----------
 * Shattering glass (canvas #ri-fx), its giant silhouette rising amid lightning,
 * the roar that reveals it in color and the banner with its portrait and name. */
#rift-intro { position: fixed; inset: 0; z-index: 60; overflow: hidden; --ri-c: #c9a6ff; --ri-c2: #c9a6ff; --ri-ink: #12081f;
  --ri-h: clamp(110px, 30vh, 260px); --ri-y: 66%; cursor: pointer; touch-action: none; user-select: none; }
#rift-intro.hidden { display: none; }
#rift-intro.shake { animation: riShakeAll .6s; }
@keyframes riShakeAll { 0%,100% { translate: 0 0; } 10% { translate: -14px 8px; } 25% { translate: 12px -9px; } 40% { translate: -9px 6px; } 55% { translate: 7px -4px; } 75% { translate: -3px 2px; } }
#ri-fx { position: absolute; inset: 0; width: 100%; height: 100%; }

/* The giant silhouette: rises from below, lightning lets it be seen and the roar reveals it. */
#ri-mon { position: absolute; left: 50%; top: 40%; height: min(84vh, 120vw); width: auto; aspect-ratio: 1; image-rendering: pixelated; opacity: 0;
  transform: translate(-50%, -18%) scale(.85); filter: brightness(0) drop-shadow(0 0 16px var(--ri-c)) drop-shadow(0 0 2px var(--ri-c)); }
#rift-intro.go #ri-mon { animation: riRise 1.2s 1s cubic-bezier(.2,.7,.3,1) forwards, riStrobe .28s 1.3s, riStrobe .28s 1.8s; }
#rift-intro.roar #ri-mon { animation: riReveal .7s ease-out forwards; }
@keyframes riRise { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes riStrobe { 0%, 100% { filter: brightness(0) drop-shadow(0 0 16px var(--ri-c)); } 30% { filter: brightness(1.6) drop-shadow(0 0 30px #fff); } 60% { filter: brightness(.2) drop-shadow(0 0 16px var(--ri-c)); } }
@keyframes riReveal { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1.14); filter: brightness(5) drop-shadow(0 0 40px #fff); }
                      100% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: brightness(1) drop-shadow(0 0 26px var(--ri-c)); } }

/* Cinema bars. */
#rift-intro .ri-lb { position: absolute; left: 0; right: 0; height: 10vh; background: #000; transform: scaleY(0); z-index: 3; }
#rift-intro .ri-top { top: 0; transform-origin: top; } #rift-intro .ri-bot { bottom: 0; transform-origin: bottom; }
#rift-intro.go .ri-lb { animation: riLb .35s .45s ease-out forwards; }
@keyframes riLb { to { transform: scaleY(1); } }

/* Thin stripes behind, moving the opposite way. */
#rift-intro .ri-back i { position: absolute; left: -20%; right: -20%; top: var(--ri-y); height: calc(var(--ri-h) * .16); background: #000; z-index: 1;
  border-top: 1px solid var(--ri-c); border-bottom: 1px solid var(--ri-c); box-shadow: 0 0 14px color-mix(in srgb, var(--ri-c) 55%, transparent);
  transform: translateY(-50%) rotate(-8deg) translate(130%, calc(var(--ri-h) * -.74)); }
#rift-intro .ri-back i + i { transform: translateY(-50%) rotate(-8deg) translate(130%, calc(var(--ri-h) * .74)); border-color: var(--ri-c2); box-shadow: 0 0 14px color-mix(in srgb, var(--ri-c2) 55%, transparent); }
#rift-intro.go .ri-back i { animation: riBack .45s 2.3s cubic-bezier(.2,.9,.25,1) forwards; }
#rift-intro.go .ri-back i + i { animation: riBack2 .45s 2.36s cubic-bezier(.2,.9,.25,1) forwards; }
@keyframes riBack { to { transform: translateY(-50%) rotate(-8deg) translate(0, calc(var(--ri-h) * -.74)); } }
@keyframes riBack2 { to { transform: translateY(-50%) rotate(-8deg) translate(0, calc(var(--ri-h) * .74)); } }

/* The banner. */
#rift-intro .ri-band { position: absolute; left: -15%; right: -15%; top: var(--ri-y); height: var(--ri-h); overflow: hidden; z-index: 2;
  background: #000;
  border-top: 2px solid var(--ri-c); border-bottom: 2px solid var(--ri-c2);
  box-shadow: 0 0 22px color-mix(in srgb, var(--ri-c) 70%, transparent), 0 0 70px color-mix(in srgb, var(--ri-c) 30%, transparent), inset 0 0 60px #000;
  transform: translateY(-50%) rotate(-8deg) translateX(-135%); }
#rift-intro .ri-band::before, #rift-intro .ri-band::after { content: ''; position: absolute; left: 0; right: 0; height: 1px; opacity: .55; }
#rift-intro .ri-band::before { top: 8px; background: linear-gradient(90deg, transparent, var(--ri-c) 20%, var(--ri-c) 80%, transparent); }
#rift-intro .ri-band::after { bottom: 8px; background: linear-gradient(90deg, transparent, var(--ri-c2) 20%, var(--ri-c2) 80%, transparent); }
#rift-intro.go .ri-band { animation: riBand .38s 2.4s cubic-bezier(.15,1.25,.35,1) forwards; }
@keyframes riBand { to { transform: translateY(-50%) rotate(-8deg) translateX(0); } }
#rift-intro .ri-dots { position: absolute; inset: 0; opacity: .9;
  background: radial-gradient(circle, rgba(255,255,255,.07) 26%, transparent 30%) 0 0 / 9px 9px,
              radial-gradient(ellipse at 75% 50%, color-mix(in srgb, var(--ri-c) 22%, transparent), transparent 55%); }
#rift-intro.go .ri-dots { animation: riDots 1.2s linear infinite; }
@keyframes riDots { to { background-position: 90px 0, 0 0; } }
#rift-intro .ri-shine { position: absolute; top: -20%; bottom: -20%; width: 18%; left: -30%; transform: skewX(-25deg);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ri-c) 35%, transparent), rgba(255,255,255,.35), transparent); }
#rift-intro.go .ri-shine { animation: riShine .7s 3.15s ease-in-out, riShine .7s 4s ease-in-out; }
@keyframes riShine { from { left: -30%; } to { left: 130%; } }

/* Label, name letter by letter, tagline and types. */
#rift-intro .ri-text { position: absolute; left: 22%; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-start;
  gap: calc(var(--ri-h) * .025); max-width: 48%; }
#rift-intro .ri-tag { font-family: Pixelify, 'Segoe UI', sans-serif; font-weight: 800; font-size: calc(var(--ri-h) * .085); padding: .2em .8em; background: #000;
  color: var(--ri-c); border: 1px solid var(--ri-c); letter-spacing: .18em; text-transform: uppercase; text-shadow: 0 0 8px var(--ri-c);
  box-shadow: 0 0 12px color-mix(in srgb, var(--ri-c) 60%, transparent); transform: rotate(-3deg) translateY(-260%); opacity: 0; white-space: nowrap; }
#rift-intro.go .ri-tag { animation: riTag .4s 2.75s cubic-bezier(.2,1.5,.4,1) forwards; }
@keyframes riTag { to { transform: rotate(-3deg) translateY(0); opacity: 1; } }
#rift-intro .ri-name { margin: 0; font-family: Pixelify, 'Segoe UI', sans-serif; font-weight: 900; line-height: .95; white-space: nowrap; color: #fff;
  font-size: clamp(30px, min(9vw, calc(var(--ri-h) * .38)), 130px); letter-spacing: .02em;
  text-shadow: 0 0 2px #fff, 0 0 18px var(--ri-c), 0 0 42px color-mix(in srgb, var(--ri-c) 70%, transparent), .05em .06em 0 color-mix(in srgb, var(--ri-c2) 60%, #000); }
#rift-intro .ri-name span { display: inline-block; opacity: 0; transform: translateY(-140%) scale(2.4) rotate(-14deg); }
#rift-intro.go .ri-name span { animation: riLetter .32s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes riLetter { 60% { opacity: 1; } to { opacity: 1; transform: none; } }
#rift-intro .ri-quote { margin: 0; color: #d9d9e3; font-weight: 600; font-style: italic; font-size: calc(var(--ri-h) * .075); letter-spacing: .04em; white-space: nowrap;
  clip-path: inset(0 100% 0 0); }
#rift-intro.go .ri-quote { animation: riType .6s 3.35s steps(24) forwards; }
@keyframes riType { to { clip-path: inset(0 0 0 0); } }
#rift-intro .ri-types { display: flex; gap: 4px; opacity: 0; transform: translateX(-30px); }
#rift-intro .ri-types .type { font-size: calc(var(--ri-h) * .065); border: 1px solid rgba(255,255,255,.35); box-shadow: 0 0 10px rgba(255,255,255,.12); }
#rift-intro.go .ri-types { animation: riTypes .3s 3.55s ease-out forwards; }
@keyframes riTypes { to { opacity: 1; transform: none; } }
/* (01-11-2026) The Titan's intro: a longer timeline (the throne lights up first), gold frame, the three phase gems. */
#rift-intro.titan.go #ri-mon { animation: riRise 1.4s 1.5s cubic-bezier(.2,.7,.3,1) forwards, riStrobe .28s 1.9s, riStrobe .28s 2.4s; }
#rift-intro.titan.roar #ri-mon { animation: riReveal .7s ease-out forwards; }
#rift-intro.titan.go .ri-back i { animation-delay: 3s; } #rift-intro.titan.go .ri-back i + i { animation-delay: 3.06s; }
#rift-intro.titan.go .ri-band { animation-delay: 3.1s; border-top-color: #ffd23f; border-bottom-color: #ffd23f; }
#rift-intro.titan.go .ri-tag { animation-delay: 3.45s; color: #ffd23f; border-color: #ffd23f; text-shadow: 0 0 8px #ffd23f; }
#rift-intro.titan.go .ri-quote { animation-delay: 4.05s; color: #ffe9a0; font-style: normal; font-weight: 900; letter-spacing: .12em; }
#rift-intro.titan.go .ri-types { animation-delay: 4.25s; }
#rift-intro.titan.go .ri-shine { animation: riShine .7s 3.85s ease-in-out, riShine .7s 4.7s ease-in-out; }
#rift-intro.titan .ri-ph { font-family: Pixelify, 'Segoe UI', sans-serif; font-weight: 800; font-size: calc(var(--ri-h) * .075); color: #ffd23f; border: 1px solid #ffd23f; padding: .1em .5em; background: #000;
  box-shadow: 0 0 10px color-mix(in srgb, #ffd23f 50%, transparent); letter-spacing: .1em; }
#rift-intro.titan .ri-ph.txt { color: #fff; border-color: rgba(255,255,255,.4); box-shadow: none; }

/* Portrait inside the star. */
#rift-intro .ri-badge { position: absolute; left: 76%; top: var(--ri-y); width: calc(var(--ri-h) * 1.15); aspect-ratio: 1; z-index: 2; transform: translate(-50%, -50%) scale(0) rotate(-120deg); }
#rift-intro.go .ri-badge { animation: riBadge .5s 2.62s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes riBadge { to { transform: translate(-50%, -50%) scale(1) rotate(6deg); } }
#rift-intro .ri-rays { position: absolute; inset: -55%; border-radius: 50%; opacity: .45; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--ri-c) 70%, #fff) 0deg 3deg, transparent 3deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 68%); mask: radial-gradient(circle, #000 25%, transparent 68%); animation: riSpin 12s linear infinite; }
#rift-intro .ri-burst, #rift-intro .ri-burst2 { position: absolute; inset: 0; clip-path: polygon(50.0% 0.0%, 58.2% 13.9%, 71.7% 5.0%, 73.1% 21.1%, 89.1% 18.8%, 83.3% 33.9%, 98.7% 38.9%, 87.0% 50.0%, 98.7% 61.1%, 83.3% 66.1%, 89.1% 81.2%, 73.1% 78.9%, 71.7% 95.0%, 58.2% 86.1%, 50.0% 100.0%, 41.8% 86.1%, 28.3% 95.0%, 26.9% 78.9%, 10.9% 81.2%, 16.7% 66.1%, 1.3% 61.1%, 13.0% 50.0%, 1.3% 38.9%, 16.7% 33.9%, 10.9% 18.8%, 26.9% 21.1%, 28.3% 5.0%, 41.8% 13.9%); }
#rift-intro .ri-burst { inset: 5%; background: radial-gradient(circle, color-mix(in srgb, var(--ri-c) 22%, #000) 0%, #000 70%); animation: riSpin 7s linear infinite; }
#rift-intro .ri-burst2 { background: var(--ri-c); filter: drop-shadow(0 0 10px var(--ri-c)); animation: riSpin 9s linear infinite reverse; }
#rift-intro .ri-burst2::after { content: ''; position: absolute; inset: 3%; clip-path: inherit; background: #000; }
@keyframes riSpin { to { rotate: 360deg; } }
#rift-intro .ri-face { position: absolute; left: 50%; top: 50%; width: 52%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(-6deg); image-rendering: pixelated;
  border: 2px solid var(--ri-c); box-shadow: 0 0 16px var(--ri-c), inset 0 0 18px #000; background: #000; }
#rift-intro .ri-face.shiny { border-color: #9ae6ff; box-shadow: 0 0 18px 6px #9ae6ff, inset 0 0 18px #000; }
#rift-intro.go .ri-face { animation: riFace .5s 2.62s ease-out; }
@keyframes riFace { 0% { filter: brightness(3); } 100% { filter: none; } }

/* Roar flash. */
#rift-intro .ri-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 4; }
#rift-intro.roar .ri-flash { animation: riFlash .55s ease-out; }
@keyframes riFlash { 0% { opacity: .95; } 100% { opacity: 0; } }

/* "Fight!" and the exit: everything flies out toward you. */
#rift-intro .ri-fight { position: absolute; left: 50%; top: 30%; z-index: 5; transform: translate(-50%, -50%) scale(4) rotate(-8deg); opacity: 0; white-space: nowrap;
  font-family: Pixelify, 'Segoe UI', sans-serif; font-weight: 900; font-size: clamp(44px, 12vw, 160px); color: #fff; letter-spacing: .06em;
  text-shadow: 0 0 3px #fff, 0 0 24px var(--ri-c), 0 0 60px var(--ri-c), 0 0 110px color-mix(in srgb, var(--ri-c) 60%, transparent); pointer-events: none; }
#rift-intro.fight .ri-fight { animation: riFight .5s cubic-bezier(.2,1.5,.4,1) forwards; }
@keyframes riFight { 0% { opacity: 0; transform: translate(-50%, -50%) scale(4) rotate(-8deg); } 60% { opacity: 1; } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-8deg); } }
#rift-intro.fight .ri-band, #rift-intro.fight .ri-badge { filter: brightness(.5); transition: filter .25s; }
#rift-intro.out .ri-band, #rift-intro.out .ri-badge, #rift-intro.out .ri-back, #rift-intro.out #ri-mon, #rift-intro.out .ri-fight, #rift-intro.out .ri-lb { animation: riZoom .42s ease-in forwards; }
@keyframes riZoom { to { scale: 2.2; opacity: 0; } }
#rift-intro.out .ri-skip { opacity: 0; }
#rift-intro .ri-skip { position: absolute; right: 16px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 6; color: rgba(255,255,255,.75); font-size: 13px; font-weight: 700;
  text-shadow: 0 1px 0 #000; animation: riPulse 1.2s ease-in-out infinite; transition: opacity .2s; }
#rift-intro .ri-skip .t-touch { display: none; }
.touch #rift-intro .ri-skip .t-touch { display: inline; } .touch #rift-intro .ri-skip .t-key { display: none; }
@keyframes riPulse { 50% { opacity: .45; } }

/* Portrait mobile: taller banner, text on top and the star below. */
@media (orientation: portrait) and (max-width: 700px) {
  #rift-intro { --ri-h: clamp(220px, 40vh, 340px); --ri-y: 68%; }
  #ri-mon { top: 34%; height: min(64vh, 140vw); }
  #rift-intro .ri-fight { top: 18%; }
  #rift-intro .ri-text { left: 50%; top: 30%; transform: translate(-50%, -50%); align-items: center; max-width: 80%; text-align: center; }
  #rift-intro .ri-name { font-size: clamp(40px, 14vw, 76px); }
  #rift-intro .ri-tag { font-size: clamp(11px, 3.6vw, 17px); }
  #rift-intro .ri-quote { white-space: normal; font-size: clamp(12px, 3.6vw, 17px); }
  #rift-intro .ri-types .type { font-size: clamp(11px, 3.4vw, 15px); }
  #rift-intro .ri-badge { left: 50%; top: calc(var(--ri-y) + var(--ri-h) * .16); width: calc(var(--ri-h) * .58); }
}
@media (prefers-reduced-motion: reduce) { #rift-intro .ri-burst, #rift-intro .ri-burst2, #rift-intro.go .ri-dots { animation: none; } }
/* Collection: search and types (18-10-2026). */
.dex-search { margin-bottom: 8px; }
.dex-search .field { width: 100%; max-width: 360px; padding: 7px 12px; font-size: 14px; }
.dex-types { gap: 4px; margin-bottom: 6px; }
.chip.type-f { padding: 2px 9px; font-size: 12px; border-color: color-mix(in srgb, var(--tc) 60%, transparent); }
.chip.type-f::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tc); margin-right: 5px; vertical-align: 0; }
.chip.type-f.on { background: var(--tc); color: #0e1220; border-color: #fff; text-shadow: 0 1px 0 rgba(255,255,255,.35); }
.chip {
  appearance: none; cursor: pointer; padding: 4px 11px; border-radius: 999px; color: var(--ink);
  background: rgba(255,255,255,.04); border: 1px solid var(--line2); font-size: 13px; font-weight: 700;
  text-shadow: 0 1px 0 var(--shadow); transition: background .12s, border-color .12s;
}
.chip:hover { background: rgba(255,255,255,.1); }
.chip.on { border-color: var(--gold); color: var(--gold); background: rgba(255,210,74,.12); box-shadow: inset 0 0 0 1px rgba(255,210,74,.35); }

/* ---------- main menu ---------- */
#scr-menu { justify-content: space-between; align-items: stretch; padding: 0; }
/* Spotlight behind the partner and a veil on the right, over the background world. */
#scr-menu::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 42% 60% at 28% 52%, rgba(14,14,14,.55), transparent 70%),
    linear-gradient(90deg, rgba(4,8,22,.35), transparent 30%, transparent 55%, rgba(4,8,22,.55));
}
.menu-left {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 30px; min-width: 0;
}
.menu-left .logo .t1 { font-size: clamp(36px, 6vw, 68px); }
.partner-card { text-align: center; margin-top: 6px; display: flex; flex-direction: column; align-items: center; }
/* The partner on a light pedestal in its type color (no box). */
#menu-partner.stage {
  border: 0; box-shadow: none; border-radius: 0; margin: 0 auto 2px;
  background: radial-gradient(ellipse 34% 11% at 50% 88%, rgba(120,170,255,.45), transparent 72%);
  background:
    radial-gradient(ellipse 30% 8% at 50% 88%, rgba(255,255,255,.22), transparent 70%),
    radial-gradient(ellipse 40% 13% at 50% 88%, color-mix(in srgb, var(--stage-c, #5b83d6) 70%, transparent), transparent 72%),
    radial-gradient(ellipse 34% 46% at 50% 62%, color-mix(in srgb, var(--stage-c, #5b83d6) 22%, transparent), transparent 70%);
}
#menu-partner.stage.shiny { box-shadow: none; filter: drop-shadow(0 0 12px rgba(154,230,255,.35)); }
.partner-card .nm { font-size: 26px; font-weight: 700; text-shadow: 0 3px 0 var(--shadow), 0 0 14px rgba(0,0,0,.6); }
.partner-card .lv { display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 4px;
  color: var(--muted); font-size: 14px; text-shadow: 0 2px 0 var(--shadow); }
.partner-card .seg { margin-top: 8px; }
.menu-right {
  width: min(520px, 44vw); min-width: min(400px, 100%); display: flex; flex-direction: column;
  /* Leaves room for the top bar; if it does not all fit, it scrolls
     (auto margins center it without overflowing at the top). */
  padding: 74px 24px 18px; gap: 12px; overflow-y: auto;
}
.menu-right > .box { padding: 14px; }
.menu-right > :first-child { margin-top: auto; }
.menu-right > :last-child { margin-bottom: auto; }
#menu-stats { font: 600 14px/1.5 var(--font-body) !important; -webkit-font-smoothing: antialiased; text-shadow: none; }
#menu-stats b { font-family: var(--font); font-weight: 700; color: #fff; }
/* Short laptops: slightly more compact menu. */
@media (max-height: 780px) and (min-height: 521px) {
  .menu-right { padding-top: 66px; gap: 10px; }
  .menu-right > .box { padding: 12px; }
  .menu-item { font-size: 17px; padding: 7px 10px; }
  .menu-item.play { font-size: 25px; padding: 9px 14px; }
}
@media (max-height: 660px) and (min-height: 521px) {
  .menu-item small { font-size: 11px; }
  .menu-left .logo .t1 { font-size: clamp(32px, 5vw, 52px); }
  #menu-partner { height: min(30vh, 200px); width: auto; }
  .menu-right > .box:last-child { padding: 8px 12px; }
}
.topbar {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); right: calc(16px + env(safe-area-inset-right)); z-index: 25;
  display: flex; gap: 8px; align-items: center;
}
.pill {
  display: flex; align-items: center; gap: 8px; min-height: 38px;
  padding: 5px 14px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(30,30,30,.94), rgba(14,14,14,.94));
  border: 1px solid var(--line2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px rgba(2,4,12,.6), 0 4px 10px rgba(0,0,0,.3);
  font-weight: 700; text-shadow: 0 2px 0 var(--shadow);
}
.topbar .btn.small.ghost { background: linear-gradient(180deg, rgba(30,30,30,.94), rgba(14,14,14,.94)); min-height: 38px; min-width: 38px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px rgba(2,4,12,.6), 0 4px 10px rgba(0,0,0,.3); }
.topbar .btn.small.ghost:hover { background: linear-gradient(180deg, rgba(49,49,49,.96), rgba(24,24,24,.96)); }
.coin {
  display: inline-block; width: 18px; height: 18px; vertical-align: -3px;
  background: var(--ico-coin) no-repeat center / contain; image-rendering: pixelated;
}
.credits-line {
  position: fixed; left: calc(14px + env(safe-area-inset-left)); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 25;
  font: 600 12px var(--font-body); -webkit-font-smoothing: antialiased; color: rgba(190,206,240,.8);
  text-shadow: 0 1px 2px #000;
}

/* ---------- upgrades ---------- */
.upg { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.upg-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.14)); }
.upg-item .ic { font-size: 26px; text-align: center; width: 40px; height: 40px; align-items: center; border-radius: 10px;
  background: radial-gradient(circle at 50% 40%, rgba(255,255,255,.12), rgba(255,255,255,.02)); box-shadow: inset 0 0 0 1px var(--line); }
.pips { display: flex; gap: 3px; margin-top: 5px; }
.pips i { width: 12px; height: 6px; border-radius: 2px; background: rgba(0,0,0,.45); box-shadow: inset 0 1px 1px rgba(0,0,0,.4); }
.pips i.on { background: linear-gradient(180deg, #ffe58a, var(--gold2)); box-shadow: 0 0 6px rgba(255,210,74,.35); }

/* ---------- gacha ---------- */
.banner {
  position: relative; border-radius: var(--rad-l); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 80% 30%, rgba(255,210,63,.35), transparent 45%),
    radial-gradient(circle at 15% 80%, rgba(196,123,255,.35), transparent 50%),
    linear-gradient(135deg, #3a1d6e, #1b2f78 55%, #0f4d6e);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 1px rgba(2,4,12,.6), 0 10px 28px rgba(0,0,0,.4);
  padding: 18px;
}
/* Light rays behind the featured ones and a glowing floor (over the background set by gacha-ui.js). */
.banner::before {
  content: ''; position: absolute; z-index: -1; left: 50%; bottom: -60%; width: 160%; aspect-ratio: 1; transform: translateX(-50%);
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.07) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 62%); mask: radial-gradient(circle, #000 20%, transparent 62%);
  pointer-events: none;
}
.banner::after {
  content: ''; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 42%;
  background: radial-gradient(ellipse 60% 55% at 50% 100%, rgba(255,230,160,.28), transparent 70%), linear-gradient(0deg, rgba(6,8,24,.55), transparent);
  pointer-events: none;
}
.banner h3 { font-size: 28px; color: var(--gold); text-shadow: 0 3px 0 #141414, 0 0 18px rgba(255,210,74,.35); }
.banner #banner-desc, .banner .sub { color: #e4dcff; }
.banner .feat {
  /* Below the text, never over it: legendaries at ×2 are big. */
  display: flex; align-items: flex-end; justify-content: center; gap: 6px;
  margin: 8px -10px -18px; height: 190px; overflow: hidden;
}
.banner .feat canvas { flex: 0 0 auto; }
.rates { font-size: 14px; }
/* (23-10-2026) The banner's target (suggestion #0018). */
.gw { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 5px 8px 5px 5px; border-radius: 12px; width: max-content; max-width: 100%;
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.gw canvas { flex: none; }
.gw .gw-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.gw .gw-t b { font-size: 14px; }
.gw .gw-t small { color: var(--muted); font-size: 12px; }
.gw .btn { flex: none; }
.gw-box { width: min(760px, 96vw); max-height: calc(100dvh / var(--uiz, 1) - 40px); overflow: hidden; display: flex; flex-direction: column; }     /* (03-11-2026, bug #0210) the window is zoomed (--uiz) from 1600×900 up: 90vh overflowed the screen, the search bar and the Confirm row were cut off */
.gw-box .field { width: 100%; margin: 6px 0 8px; }
.gw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; overflow: auto; min-height: 0; padding: 2px; }
.gw-cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 7px; border-radius: 12px; cursor: pointer; color: #fff; font: inherit;
  background: rgba(255,255,255,.04); border: 1px solid var(--line2); }
.gw-cell b { font-size: 12px; line-height: 1.1; text-align: center; }
.gw-cell.r4 { border-color: rgba(196,123,255,.5); } .gw-cell.r5 { border-color: rgba(255,210,63,.6); }
.gw-cell.on { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 12px rgba(154,230,255,.4); }
.gw-cell:hover { background: rgba(255,255,255,.1); }
.gw-cell .gw-own { position: absolute; top: 4px; right: 5px; font: 600 9px var(--font-body); color: var(--muted); font-style: normal; }
@media (max-height: 520px) {
  #scr-gacha #gacha-want { flex: none; margin: 4px 0 0; padding: 1px 4px 1px 8px; max-width: 100%; gap: 8px; min-height: 26px; }
  .gw canvas { display: none; }
  .gw .gw-t { flex-direction: row; align-items: baseline; gap: 6px; }
  .gw .gw-t b { font-size: 11px; }
  .gw .gw-t small { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
  .gw .btn { padding: 2px 8px; font-size: 11px; min-height: 22px; line-height: 1.1; }
}
/* (22-10-2026) The animated backdrop of the gacha: full screen under a translucent box. */
#scr-gacha { overflow: hidden; }
#gacha-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#scr-gacha .box { position: relative; z-index: 1; background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 120px), rgba(0,0,0,.66); }
/* (23-10-2026) 12 tabs (3 Mega + 9 regions): where there is room the box is wider and the tabs wrap in centred
   rows, nothing to scroll sideways. Low phones keep the one scrolling row (the banner needs the height). */
@media (min-height: 500px) {
  #scr-gacha .box.wide { width: min(1200px, 100%); }
  #scr-gacha .gen-tabs { flex-wrap: wrap; justify-content: center; overflow: visible; row-gap: 6px; }
  #scr-gacha .gen-tab { padding: 5px 10px; }
}
.rates h3 { margin-bottom: 8px; }
.rates div { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--line); }
.rates div:last-of-type { border-bottom: 0; }
#pull-1, #pull-10, #pull-10b, #pull-100, #pull-100b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }

#pull-fx {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  align-items: center; gap: 18px; padding: 14px 10px;
  /* If the 10 cards do not fit (landscape mobile) it can scroll, and
     "Continuar" always stays visible at the bottom (it used to end up off-screen
     with no way to close without reloading the page). */
  overflow-y: auto; overscroll-behavior: contain;
  background:
    radial-gradient(circle at 50% 42%, rgba(120,90,255,.28), transparent 45%),
    radial-gradient(circle at 50% 45%, #232323, #03060f 72%);
}
/* Rays slowly rotating behind the pull (static with reduced motion). */
#pull-fx > .pull-rays { position: fixed; left: 50%; top: 45%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.045) 0 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 45%); mask: radial-gradient(circle, #000 8%, transparent 45%);
  animation: spin 40s linear infinite; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Vertical centering that does not clip at the top when it does not fit. */
#pull-fx::before, #pull-fx::after { content: ''; margin: auto; }
#pull-close { position: sticky; bottom: 8px; z-index: 2; flex-shrink: 0; min-width: 180px; }
@media (max-height: 520px) {
  #pull-fx { gap: 10px; }
  .pull-results { gap: 6px; }
  .pcard { width: 100px; padding: 5px 3px; border-radius: 10px; }
  .pcard canvas { width: 84px; height: auto; }
  .pcard b { font-size: 12px; }
  .pcard .tag { font-size: 10px; }
  .pcard .stars { font-size: 11px; }
}
#pull-fx.hidden { display: none; }
.ball {
  width: 120px; height: 120px; border-radius: 50%; position: relative;
  background: linear-gradient(180deg, #ff4d4d 0 47%, #1a1a1a 47% 53%, #f4f4f4 53% 100%);
  border: 5px solid #1a1a1a;
  box-shadow: 0 0 0 0 var(--glow, #fff);
}
.ball::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: #f4f4f4; border: 5px solid #1a1a1a;
}
.ball.drop { animation: drop .55s cubic-bezier(.3,1.6,.6,1) both; }
.ball.shake { animation: shake .45s ease-in-out 3; }
.ball.burst { animation: burst .45s ease-out forwards; }
@keyframes drop { from { transform: translateY(-60vh) rotate(-200deg); } to { transform: none; } }
@keyframes shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }
@keyframes burst {
  0% { box-shadow: 0 0 0 0 var(--glow); }
  60% { box-shadow: 0 0 80px 40px var(--glow); transform: scale(1.15); }
  100% { box-shadow: 0 0 200px 120px transparent; transform: scale(0); opacity: 0; }
}
/* Support message at the end of a run (run-ui.js). */
.support-ask { position: relative; margin-top: 4px; padding: 10px 34px 12px 12px; border-radius: var(--rad); text-align: center;
  background: linear-gradient(180deg, rgba(255,210,74,.12), rgba(255,210,74,.04)); border: 1px solid rgba(255,210,74,.45); }
.support-ask p { margin: 0 0 8px; font-size: 13px; color: var(--ink); line-height: 1.4; }
.support-ask .btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.support-ask .x { position: absolute; top: 4px; right: 6px; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 2px 6px; }
.pull-results { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 900px; }
/* Pull card: frame and halo in its rarity color (--rc). */
.pcard {
  position: relative; overflow: hidden;
  width: 150px; padding: 10px 6px; text-align: center; border-radius: 14px;
  background:
    radial-gradient(ellipse 70% 45% at 50% 58%, rgba(255,255,255,.12), transparent 70%),
    linear-gradient(180deg, #212121, #0f0f0f);
  /* (22-10-2026) Foil backdrop: the Pokémon's two type colors in the corners (--t1/--t2, gacha-ui.js),
     fine diagonal foil lines, a sheen at the top and the rarity glow behind the sprite. */
  background:
    linear-gradient(165deg, rgba(255,255,255,.1), transparent 32%),
    repeating-linear-gradient(115deg, transparent 0 6px, rgba(255,255,255,.035) 6px 7px),
    radial-gradient(ellipse 75% 50% at 50% 60%, color-mix(in srgb, var(--rc, #fff) 34%, transparent), transparent 70%),
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--t1, #8a93a8) 55%, transparent), transparent 48%),
    radial-gradient(circle at 88% 96%, color-mix(in srgb, var(--t2, #8a93a8) 50%, transparent), transparent 48%),
    linear-gradient(180deg, #17171e, #050507);
  border: 2px solid var(--rc, #fff);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.22), 0 0 0 1px rgba(2,4,12,.7), 0 0 18px var(--rc, #fff);
  animation: card-in .38s cubic-bezier(.2,1.3,.4,1) both;
  text-shadow: 0 2px 0 var(--shadow);
}
@keyframes card-in { from { transform: translateY(18px) scale(.8) rotateY(70deg); opacity: 0; } to { transform: none; opacity: 1; } }
.pcard .stars { color: var(--rc); font-size: 14px; display: inline-block; padding: 0 9px; border-radius: 999px; background: rgba(0,0,0,.45); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc, #fff) 35%, transparent); }
.pcard b { display: block; font-size: 16px; }
.pcard .tag { font: 700 12px var(--font-body); -webkit-font-smoothing: antialiased; margin-top: 3px; color: var(--muted); text-shadow: none; }
.pcard .new { display: inline-block; padding: 1px 8px; border-radius: 999px; font-family: var(--font); color: var(--gold-ink); background: var(--gold); box-shadow: 0 0 10px rgba(255,210,74,.5); }
/* Shine sweeping across epics, legendaries and shinies. */
.pcard.r4::after, .pcard.r5::after, .pcard.shiny::after {
  content: ''; position: absolute; top: -20%; bottom: -20%; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  animation: sheen 2.6s ease-in-out .5s infinite;
}
@keyframes sheen { 0% { left: -60%; } 45%, 100% { left: 130%; } }
.pcard.r5 { animation: card-in .38s cubic-bezier(.2,1.3,.4,1) both, legend 1.4s ease-in-out infinite alternate; }
@keyframes legend { to { box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 0 0 1px rgba(2,4,12,.7), 0 0 36px var(--rc), 0 0 70px var(--rc); } }

/* ---------- level-up cards ----------
 * --cc = card color (type of the move or of the reward, run-ui.js).
 * .t-new new · .t-up upgrade · .t-evo evolution · .t-stat bonus. */
.cards { display: flex; flex-direction: column; gap: 10px; width: min(560px, 100%); }
.card {
  --cc: #8fa3d0;
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  background: linear-gradient(90deg, rgba(255,255,255,.07), rgba(255,255,255,.02) 60%);
  background: linear-gradient(90deg, color-mix(in srgb, var(--cc) 18%, transparent), rgba(255,255,255,.02) 65%);
  border: 1px solid var(--line2); border-radius: var(--rad);
  box-shadow: inset 4px 0 0 var(--cc), inset 0 1px 0 var(--hi), 0 3px 0 rgba(0,0,0,.25);
  padding: 12px 14px 12px 18px; transition: transform .08s, background .12s, border-color .12s;
  animation: rise .28s cubic-bezier(.2,.9,.3,1) both;
}
/* (01-11-2026) item cards: a lit disc behind the icon, the numbers coloured (run-ui.js itemDesc) */
.card.item .ico { flex: none; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: radial-gradient(circle at 50% 40%, rgba(255,210,74,.28), rgba(255,210,74,.04) 70%); box-shadow: inset 0 0 0 1px rgba(255,210,74,.35); }
.card.item .ds b.up { color: #7fe3a0; font-weight: 800; }
.card.item .ds b.dn { color: #ff8a95; font-weight: 800; }
.card.item .ds b.nb { color: #ffd23f; font-weight: 800; }
.card.shop .price { flex: none; display: inline-flex; align-items: center; gap: 4px; font: 800 14px var(--font-body); color: var(--gold); margin-right: 26px; white-space: nowrap; }
.card.shop .price.no { color: #ff7a85; }
.card.shop.off { opacity: .55; cursor: default; }
.card.shop.off:hover { transform: none; }
.card.shop.busy { pointer-events: none; opacity: .7; }
/* (26-10-2026) "Keep it for the whole run" under the shop's cards, and Auto bond under the bond's */
#scr-shop .shop-keep, #scr-bond .bond-auto { display: flex; align-items: center; gap: 12px; width: min(560px, 100%); margin: 10px auto 0; padding: 8px 12px; border-radius: 12px;     /* (as wide as the cards) */
  border: 1px solid var(--line); background: rgba(255,255,255,.03); text-align: left; }
#scr-shop .shop-keep .grow, #scr-bond .bond-auto .grow { min-width: 0; }
#scr-shop #shop-cards, #scr-bond #bond-cards { margin-left: auto; margin-right: auto; }     /* the cards and the switch in one centred column, like the title */
#scr-shop .shop-keep b, #scr-bond .bond-auto b { display: block; font-size: 14px; }
#scr-shop .shop-keep small, #scr-bond .bond-auto small { display: block; color: var(--muted); font: 600 12px/1.35 var(--font-body); -webkit-font-smoothing: antialiased; text-shadow: none; margin-top: 1px; }
#scr-shop .shop-keep .switch, #scr-bond .bond-auto .switch { flex: none; min-width: 58px; }
@media (max-height: 520px) {
  #scr-shop .shop-keep, #scr-bond .bond-auto { margin-top: 6px; padding: 5px 10px; }
  #scr-shop .shop-keep small, #scr-bond .bond-auto small { display: none; }
  #scr-shop .shop-keep + .row { margin-top: 6px !important; }
}
.cards .card:nth-child(2) { animation-delay: .05s; }
.cards .card:nth-child(3) { animation-delay: .1s; }
.cards .card:nth-child(4) { animation-delay: .15s; }
.card:hover, .card:focus-visible { border-color: var(--cc); transform: translateX(4px); background-color: rgba(255,255,255,.04); }
.card .ico { flex: 0 0 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 0 0 1px rgba(255,255,255,.08), 0 2px 0 rgba(0,0,0,.3); }
.card .txt { flex: 1; min-width: 0; }
.card .nm { font-weight: 700; font-size: 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card .ds { color: var(--muted); font-size: 14px; line-height: 1.35; margin-top: 2px; }
.card .key { font-size: 13px; color: var(--muted); border: 1px solid var(--line2); border-bottom-width: 3px; border-radius: 7px; padding: 1px 8px; }
.tag-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; color: #10131a; text-shadow: none; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 1px 0 rgba(0,0,0,.3); }
/* New move: "NUEVO" ribbon in the corner. */
.card.t-new::after { content: attr(data-badge); position: absolute; top: 9px; right: -26px; width: 96px; padding: 2px 0; transform: rotate(35deg);
  text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #161616; background: var(--cyan); text-shadow: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.card.t-new .txt { padding-right: 22px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 18px; }
/* End of run: if it does not fit, the stats scroll and "Volver al menú"
   always stays visible at the bottom. */
#scr-over .box { display: flex; flex-direction: column; overflow: hidden; }
#scr-over .box > h2, #btn-again { flex: none; }
#over-stats { overflow-y: auto; min-height: 0; flex: 0 1 auto; padding-right: 2px; }
#btn-again { align-self: center; min-width: 200px; }
/* With the summary visible, achievements pop up at the top (at the bottom they covered the button). */
body:has(#scr-over:not(.hidden)) .ach-pop { top: max(8px, env(safe-area-inset-top)) !important; bottom: auto !important; }
.stats > div { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.18)); border: 1px solid var(--line); border-radius: var(--rad); padding: 8px 10px;
  box-shadow: inset 0 1px 0 var(--hi); }
.stats > div > span:first-child { display: block; color: var(--muted); font-size: 12px; letter-spacing: .5px; text-transform: uppercase; }
.stats b { font-size: 22px; }
/* Summary: coins earned, highlighted. */
.stats > .st-coins { border-color: rgba(255,210,74,.55);
  box-shadow: inset 0 1px 0 rgba(255,240,190,.18), inset 0 0 26px rgba(255,190,50,.12), 0 0 14px rgba(255,190,50,.12); }
.stats > .st-coins b { font-size: 26px; text-shadow: 0 2px 0 #6a3a00, 0 0 14px rgba(255,210,74,.35); }
.stats .st-sub { font: 600 12px var(--font-body); -webkit-font-smoothing: antialiased; color: var(--muted); text-shadow: none; }
.stats > .st-record { text-align: center; color: var(--gold); border-color: rgba(255,210,74,.5); box-shadow: inset 0 0 20px rgba(255,190,50,.1); }
#scr-over h2 { font-size: 30px; }
#scr-over.dead h2 { color: #ffb4bc; }

kbd {
  display: inline-block; padding: 0 6px; border: 1px solid var(--line2); border-bottom-width: 3px;
  border-radius: 6px; background: rgba(255,255,255,.05); font: 700 13px var(--font); text-shadow: none; color: var(--ink);
}

.toast {
  position: fixed; left: 50%; bottom: calc(30px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  padding: 10px 18px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(35,35,35,.97), rgba(17,17,17,.97)); border: 1px solid var(--line2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px rgba(2,4,12,.7), 0 10px 26px rgba(0,0,0,.5);
  font: 700 15px var(--font-body); -webkit-font-smoothing: antialiased; text-shadow: none; animation: toast-in .22s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(170,200,255,.28); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(170,200,255,.45); }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 760px) and (min-height: 521px) {
  #scr-menu { flex-direction: column; overflow-y: auto; }
  .menu-right { width: 100%; min-width: 0; background: rgba(5,10,25,.7); }
  .split { grid-template-columns: 1fr; }
  .logo .t1 { font-size: 34px; }
}

/* ============ pixel art icons ============ */
img.pix { image-rendering: pixelated; image-rendering: crisp-edges; vertical-align: middle; }
.stars-row { display: inline-flex; gap: 1px; vertical-align: middle; }
.cell .stars-row { display: flex; justify-content: center; margin-top: 2px; }
.badge-r { position: absolute; top: 3px; right: 4px; }
/* Favourites (♥) */
.badge-fav { position: absolute; top: 18px; left: 5px; line-height: 0; filter: drop-shadow(0 1px 0 rgba(0,0,0,.6)); }
.like-btn { appearance: none; background: none; border: 0; padding: 2px 4px; margin-left: 6px; cursor: pointer; vertical-align: middle; line-height: 0;
  filter: grayscale(1) brightness(.75); opacity: .55; transition: filter .15s, opacity .15s, transform .15s; }
.like-btn:hover { opacity: .9; transform: scale(1.12); }
.like-btn.on { filter: drop-shadow(0 0 6px rgba(255,95,109,.55)); opacity: 1; }
.like-btn.pop { animation: like-pop .35s ease-out; }
@keyframes like-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.fav-tab b { display: inline-flex; align-items: center; gap: 4px; }
.gen-tab.fav-tab.on b { color: #ff8a95; }
.gen-tab.fav-tab.on { border-color: #ff5f6d; background: linear-gradient(180deg, rgba(255,95,109,.2), rgba(255,95,109,.06)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 12px rgba(255,95,109,.18); }
.move-icons { display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 10px; }
.card .ico img { display: block; }
.upg-item .ic { display: flex; justify-content: center; }

/* ============ generation tabs ============ */
.gen-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; margin-top: 6px; }
.gen-tab {
  appearance: none; cursor: pointer; flex: 0 0 auto; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; line-height: 1.1;
  padding: 6px 13px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--hi);
  text-shadow: 0 2px 0 var(--shadow); transition: background .12s, border-color .12s;
}
.gen-tab b { font-size: 15px; }
/* Mega banner (22-10-2026) */
.gen-tab.mega-tab { border-color: rgba(255,95,208,.5); background: linear-gradient(180deg, rgba(255,95,208,.18), rgba(120,40,160,.08)); }
.gen-tab.mega-tab b { color: #ff8ae6; }
.gen-tab.mega-tab.on { border-color: #ff5fd0; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 14px rgba(255,95,208,.35); }
.banner.mega { background: radial-gradient(circle at 80% 30%, rgba(255,95,208,.45), transparent 45%), radial-gradient(circle at 15% 80%, rgba(120,60,255,.4), transparent 50%), linear-gradient(135deg, #3a0a4a, #5a1a7a 55%, #1a0a3a); }
.banner.mega h3 { color: #ff8ae6; text-shadow: 0 3px 0 #141414, 0 0 18px rgba(255,95,208,.45); }
.banner.mega::after { background: radial-gradient(ellipse 60% 55% at 50% 100%, rgba(255,160,230,.3), transparent 70%), linear-gradient(0deg, rgba(6,8,24,.55), transparent); }
.pcard.stone { animation: card-in .38s cubic-bezier(.2,1.3,.4,1) both, legend 1.4s ease-in-out infinite alternate; }
.pcard.stone .tag .new { color: #ff8ae6; }
.pv-box.mega-box { border-color: rgba(255,95,208,.45); }
.pv-box.mega-box b { color: #ff8ae6; }
.pv-box.mega-box.locked { opacity: .75; }
.pv-box.mega-box .move-icons { display: block; }
.gen-tab small { font: 700 11px var(--font-body); -webkit-font-smoothing: antialiased; color: var(--muted); text-shadow: none; }
.gen-tab:hover { border-color: rgba(190,215,255,.5); background-color: rgba(255,255,255,.05); }
.gen-tab.on { border-color: var(--gold); background: linear-gradient(180deg, rgba(255,210,74,.2), rgba(255,210,74,.06)); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 12px rgba(255,210,74,.15); }
.gen-tab.on b { color: var(--gold); }

/* ============ normal / shiny ============ */
.seg { display: flex; justify-content: center; gap: 0; margin: 2px auto 8px; width: max-content; padding: 3px;
  background: var(--well); border: 1px solid var(--line2); border-radius: 11px; overflow: hidden; }
.seg button { appearance: none; cursor: pointer; background: transparent; border: 0; border-radius: 8px; color: var(--muted);
  padding: 4px 13px; font-size: 14px; display: flex; gap: 5px; align-items: center;
  text-shadow: 0 2px 0 var(--shadow); }
.seg button.on { background: linear-gradient(180deg, rgba(154,230,255,.3), rgba(154,230,255,.14)); color: #dff8ff; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.pcard.shiny { animation: card-in .38s cubic-bezier(.2,1.3,.4,1) both, legend 1.1s ease-in-out infinite alternate; }
.caught > span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.caught-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.caught-row > div { text-align: center; }
.caught-row small { display: block; font-size: 12px; color: #c9f3ff; }

/* ============ sound ============ */
.sound-panel { position: fixed; top: calc(62px + env(safe-area-inset-top)); right: calc(16px + env(safe-area-inset-right)); z-index: 30; width: 270px; padding: 14px 16px; }
.sound-inline { margin: 6px auto 16px; max-width: 320px; }
.snd-row { display: grid; grid-template-columns: 20px 64px 1fr; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 14px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px;
  background: rgba(0,0,0,.45); box-shadow: inset 0 1px 2px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.06); outline: none; }
input[type=range]:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff3c4, var(--gold) 55%, var(--gold2)); border: 2px solid #fff7d6; box-shadow: 0 2px 4px rgba(0,0,0,.4); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 2px solid #fff7d6; }
#btn-sound { padding: 5px 9px; display: flex; }

/* ============ cloud, legal notice ============ */
.btn.google { background: linear-gradient(180deg, #ffffff, #e2e8f4); color: #202020; text-shadow: none; border-color: #fff;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #8a97b4, 0 5px 10px rgba(0,0,0,.3); }
.btn.google:active { box-shadow: inset 0 1px 0 #fff, 0 1px 0 #8a97b4; }
.btn.danger { background: linear-gradient(180deg, #e04a5c, #b02a3f); border-color: #ff9aa5; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 3px 0 #5e1220, 0 5px 10px rgba(0,0,0,.3); }
.btn.danger:active { box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 0 #5e1220; }
.sync { display: inline-block; width: 9px; height: 9px; margin-left: 8px; border-radius: 50%;
  box-shadow: 0 0 0 2px #121212; vertical-align: 1px; }
.sync.ok { background: #5fe08a; box-shadow: 0 0 0 2px #121212, 0 0 6px rgba(95,224,138,.6); }
.sync.syncing, .sync.pending { background: #ffd23f; }
.sync.offline { background: #ff5f6d; }
.sync.local { background: #9fb1c9; }
.sync.guest { display: none; }
.legal-link { color: var(--muted); }
.legal-link:hover { color: #fff; }
.credits-line a { color: inherit; }
.legal h3 { margin: 16px 0 4px; color: var(--gold); font-size: 17px; }
.legal p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: #dbe3f7; }
.legal a { color: #9fd4ff; }
#scr-legal { z-index: 65; }   /* in front of Settings and Support (60) */
.boot { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #191919, var(--bg) 70%); color: var(--muted); font-size: 18px; }

/* ---------- friends, room, invites and leaderboard ---------- */
.fr-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.fr-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--rad);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.14)); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--hi);
}
.fr-row b { font-size: 17px; }
.fr-row .st { color: var(--muted); font: 600 13px var(--font-body); -webkit-font-smoothing: antialiased; text-shadow: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #6b7a94; flex: 0 0 10px; box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.dot.on { background: var(--green); box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 0 8px var(--green); }
.dot.play { background: var(--gold); }
.dot.pend { background: var(--r4); }
#fr-add { margin: 10px 0 0; }
#fr-add .field { min-width: 180px; }

.lobby-members { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.lob-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px;
  border-radius: var(--rad); border: 2px solid var(--pc, var(--line2));
  background: radial-gradient(ellipse 60% 35% at 50% 60%, rgba(255,255,255,.07), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.2));
  box-shadow: inset 0 1px 0 var(--hi);
  min-height: 170px; justify-content: center; text-align: center;
}
.lob-card b { font-size: 17px; color: var(--pc); }
.lob-card small { color: var(--muted); font-size: 12px; }
.lob-card .conn { font-size: 12px; color: var(--green); }
.lob-card .conn.wait { color: var(--gold); }
.lob-card .ndg { font-size: 10px; line-height: 1.25; color: var(--muted, #9aa); opacity: .85; overflow-wrap: anywhere; }
.lob-card .ndg:empty { display: none; }
.lob-card.empty { border-style: dashed; border-color: var(--line2); color: var(--muted); background: transparent; }

.invite-pop {
  position: fixed; right: calc(18px + env(safe-area-inset-right)); bottom: calc(54px + env(safe-area-inset-bottom)); z-index: 70; width: min(340px, calc(100% - 32px));
  padding: 14px 16px; animation: pop .2s ease-out; border-color: rgba(255,210,74,.5);
}
.invite-pop img { vertical-align: middle; }

.rk-tools { gap: 8px; margin-bottom: 8px; }
.rk-tools .field { width: 220px; padding: 6px 10px; font-size: 15px; }
.rk-list { display: flex; flex-direction: column; gap: 4px; max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.rk-row {
  display: grid; grid-template-columns: 54px auto 1fr auto 26px; gap: 10px; align-items: center;
  padding: 4px 12px; border-radius: var(--rad); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.14));
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--hi);
}
.rk-row .pos { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 4px; color: var(--muted); }
/* Podium: gold, silver and bronze, taller and glowing. */
.rk-row.top1, .rk-row.top2, .rk-row.top3 { --pod: #ffd24a; padding-top: 7px; padding-bottom: 7px; border-width: 1px; border-color: var(--pod);
  background: linear-gradient(90deg, rgba(255,255,255,.09), rgba(255,255,255,.02) 60%);
  box-shadow: inset 4px 0 0 var(--pod), inset 0 1px 0 rgba(255,255,255,.12), 0 0 12px rgba(0,0,0,.25); }
.rk-row.top2 { --pod: #cfd9ea; }
.rk-row.top3 { --pod: #e3a06a; }
.rk-row.top1 .pos, .rk-row.top2 .pos, .rk-row.top3 .pos { color: var(--pod); font-size: 22px; }
.rk-row.top1 .time { color: var(--gold); text-shadow: 0 2px 0 #5a3500, 0 0 12px rgba(255,210,74,.35); }
/* Hall of Fame rows (ranking-ui.js loadHof): taken ones look like a #1, open ones are dim with a "?" */
.rk-row.hof .who b { font-size: 14px; }
.rk-row.hof .who small { display: block; margin-top: 2px; }
.rk-row.hof.open { opacity: .62; border-style: dashed; }
.rk-row.hof .hof-q { display: inline-flex; width: 44px; height: 40px; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; color: var(--muted); }
.rk-row.hof .time.hof-open { color: var(--muted); }
.rk-row .mons { display: flex; }
.rk-row .who { display: flex; flex-direction: column; min-width: 0; }
.rk-row .who b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-row .who small { color: var(--muted); font: 600 12px var(--font-body); -webkit-font-smoothing: antialiased; text-shadow: none; }
.rk-row .time { font-size: 22px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.rk-row.mine { border-color: var(--cyan); background: linear-gradient(90deg, rgba(95,216,255,.16), rgba(95,216,255,.03)); }
.rk-rep { background: none; border: 0; padding: 4px; cursor: pointer; opacity: .35; line-height: 0; }
.rk-rep:hover { opacity: 1; }
.rk-rep.sent { opacity: .12; cursor: default; }
.rk-row.mod-row { grid-template-columns: 54px 1fr auto; }
.rk-row.mod-row.rep { grid-template-columns: 54px auto 1fr auto auto; }
.mod-warn { color: #ff8a96 !important; }
.mod-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rk-me { margin-top: 10px; padding: 10px 12px; border-radius: var(--rad); background: var(--well); border: 1px solid var(--line); font-size: 15px; min-height: 20px; }

.cards.done .card { pointer-events: none; opacity: .45; }
.cards.done .card.picked { opacity: 1; border-color: var(--gold); }
#lvl-wait { color: var(--gold); font-size: 15px; }

@media (max-height: 520px) {
  .rk-row.top1, .rk-row.top2, .rk-row.top3 { padding-top: 4px; padding-bottom: 4px; }
}
@media (max-width: 760px) {
  .rk-row { grid-template-columns: 40px auto 1fr auto 22px; gap: 6px; }
}

/* ---------- tickets and per-Pokémon upgrades ---------- */
.tickets-line img, #tickets-pill img, #cost-1 img, #cost-10 img { vertical-align: middle; }
.upg-head { display: flex; gap: 14px; align-items: center; margin: 6px 0 12px; }
.upg-head .stage { width: 120px; height: 96px; flex: 0 0 120px; }
select.field { font-family: var(--font); }

/* ---------- gacha slot machine ---------- */
#slot { width: min(528px, 92vw, 66vh); height: auto; image-rendering: pixelated; cursor: pointer;
  filter: drop-shadow(0 0 30px rgba(255,90,90,.35)); animation: pop .25s ease-out both; }

/* ---------- missions, achievements, profile and items ---------- */
.goals-body { max-height: 62vh; overflow-y: auto; padding-right: 6px; }
.goals-h { margin: 6px 0 4px; }
.goals-h h3 { margin: 0; }
.mission {
  display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center;
  padding: 10px 12px; margin-bottom: 6px; border-radius: var(--rad);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.14)); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--hi);
}
.mission.ready { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold), inset 0 1px 0 var(--hi), inset 0 0 22px rgba(255,190,50,.1); }
.mission.claimed { opacity: .55; }
.mission small, .ach small { color: var(--muted); font-size: 12px; }
.mission .bar, .ach .bar { height: 7px; background: rgba(0,0,0,.45); border-radius: 6px; overflow: hidden; margin: 5px 0 3px; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.mission .bar i, .ach .bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--cyan2), var(--cyan)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.mission.ready .bar i, .ach.ok .bar i { background: linear-gradient(90deg, var(--gold2), var(--gold)); }
.m-rw, .a-rw { font-size: 13px; color: var(--ink); }
.m-rw img, .a-rw img, .tag-chip img { vertical-align: middle; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.ach {
  display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--rad);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.14)); border: 1px solid var(--line);
}
.ach.ok { border-color: rgba(255,210,74,.6); background: linear-gradient(180deg, rgba(255,210,74,.1), rgba(0,0,0,.12)); }
.ach .a-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.leg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.leg-cell { display: flex; flex-direction: column; align-items: center; padding: 4px; border-radius: 10px; background: var(--well); border: 1px solid var(--line); }
.leg-cell.ok { border-color: rgba(255,210,74,.55); background: radial-gradient(ellipse at 50% 70%, rgba(255,210,74,.14), transparent 70%), var(--well); }
.leg-cell small { font-size: 10px; color: var(--muted); text-align: center; }
.fav-slots { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.fav-slot {
  width: 140px; min-height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--rad); background: var(--well); border: 2px dashed var(--line2); cursor: pointer; text-align: center;
}
.fav-slots.view .fav-slot { cursor: default; border-style: solid; border-color: rgba(255,210,74,.55); }
.fav-slot b { font-size: 14px; }
.profile-box { width: min(640px, 100%); max-height: 90vh; overflow-y: auto; }
.prof-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: -10px; }
.prof-head h2 { margin: 0; }
.prof-title { color: var(--gold); font-size: 15px; border: 1px solid var(--gold); background: rgba(255,210,74,.1); border-radius: 999px; padding: 1px 10px; }
.prof-marks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.prof-marks div { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.16)); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; }
.prof-marks span { color: var(--muted); font-size: 12px; }
.prof-marks b { font-size: 18px; }
.prof-medals { display: flex; flex-wrap: wrap; gap: 8px; }
.prof-medals .pm { width: 84px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.prof-medals small { font-size: 10px; color: var(--muted); }
a.plink { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(244,248,255,.4); }
a.plink:hover { color: var(--gold); }
#user-pill, #tickets-pill { cursor: pointer; }     /* (01-11-2026, suggestion #0122) the tickets open the gacha */
.ach-pop {
  position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 80;
  display: flex; gap: 10px; align-items: center; padding: 10px 16px; animation: pop .2s ease-out;
  border-color: var(--gold) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px rgba(2,4,12,.7), 0 0 24px rgba(255,210,74,.25), var(--elev2) !important;
}
.ach-pop b { display: block; color: var(--gold); }
.ach-pop small { color: var(--muted); }
/* Evolution: gold frame with a pulsing glow and a ribbon. */
.card.evo { --cc: var(--gold); border-color: var(--gold);
  background: linear-gradient(90deg, rgba(255,210,74,.26), rgba(255,210,74,.05) 70%);
  box-shadow: inset 4px 0 0 var(--gold), inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px rgba(255,210,74,.3), 0 0 18px rgba(255,210,74,.22); }
.card.evo .nm { color: var(--gold); }
/* Bond (legendary reward): pink */
.bond-title { color: var(--pink); }
.card.bond { --cc: var(--pink); border-color: var(--pink); background: linear-gradient(90deg, rgba(255,138,216,.2), rgba(255,138,216,.04) 70%); }
.card.bond .nm { color: var(--pink); }
/* Forget a move (rare rift reward): red */
.forget-title { color: #ff7a7a; }
.card.forget:hover { border-color: #ff7a7a; }
@media (max-height: 520px) {
  #scr-bond .bond-hint { display: none; }
  #scr-bond .box, #scr-forget .box { width: min(820px, 100%); }
  #bond-cards, #forget-cards { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
}
@media (max-width: 760px) { .prof-marks { grid-template-columns: repeat(2, 1fr); } }
/* (On landscape mobile it fits in one row: only on very narrow screens is it a column.) */
@media (max-width: 560px) { .mission { grid-template-columns: 1fr; } }

/* ================= mobile and touch ================= */
html, body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
body { touch-action: manipulation; }
/* iPhone: without this, holding a finger on the joystick brought up "Copy / Select
   All" (Safari only honors the -webkit- version and does not inherit it properly). */
body, body * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* Keyboard hints make no sense on touch. */
body.touch kbd, body.touch .card .key, body.touch .kbd-hint { display: none !important; }
/* Settings > Controls: the keyboard block goes, the controller buttons stay (21-10-2026). */
body.touch .pc-keys { display: none; }
body.touch .pad-keys kbd { display: inline-block !important; }
#rotate {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 10, 30, .94);
}
#rotate.hidden { display: none; }
#rotate .box { max-width: 320px; }
#rotate-ico { animation: rot-hint 1.6s steps(4) infinite; display: inline-block; }
@keyframes rot-hint { 0%, 30% { transform: rotate(0deg); } 60%, 100% { transform: rotate(90deg); } }

/* ---------- settings ---------- */
#scr-settings { z-index: 60; }
/* Button placement (layout-ui.js): in front of Settings */
#scr-layout { z-index: 66; display: block; background: radial-gradient(circle at 50% 40%, #24452c, #0d1a12); touch-action: none; }
#scr-layout.hidden { display: none; }
.lay-thing { position: absolute; z-index: 2; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.lay-thing.held { cursor: grabbing; filter: drop-shadow(0 0 8px rgba(255,210,63,.8)); }
.lay-thing.hidden { display: none; }
.lay-bar { display: flex; gap: 9px; }
.lay-slot { position: relative; width: 54px; height: 54px; flex: none; border-radius: 12px; background: linear-gradient(180deg, rgba(20,20,20,.92), rgba(9,14,30,.85)); border: 1.2px solid rgba(150,180,230,.35); }
.lay-slot.on { border: 2.5px solid var(--gold); }
.lay-slot.item { margin-right: 9px; background: rgba(10,16,28,.55); }
.lay-slot i { position: absolute; left: 4px; top: 2px; font-style: normal; font-size: 10px; color: rgba(180,200,230,.7); }
.lay-tag { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); font-size: 11px; color: var(--gold); white-space: nowrap; pointer-events: none; }
.lay-pause { border-radius: 11px; background: rgba(8,13,30,.72); border: 1.5px solid rgba(200,220,255,.55); box-sizing: border-box; }
.lay-pause b { position: absolute; top: 9px; width: 5px; height: 18px; border-radius: 1.5px; background: #f4f8ff; }
.lay-pause b:first-child { left: 11px; } .lay-pause b:last-child { left: 20px; }
.lay-stick { border-radius: 50%; background: rgba(16,16,16,.3); border: 3px solid rgba(244,248,255,.6); box-sizing: border-box; }
.lay-stick .knob { position: absolute; left: 50%; top: 50%; width: 42%; height: 42%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(255,210,63,.85); border: 3px solid #a55f00; box-sizing: border-box; }
.lay-panel { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(340px, calc(100% - 32px)); padding: 10px 14px; text-align: center; opacity: .95; }
.lay-panel h3 { margin: 0 0 6px; font-size: 14px; }
#lay-mode { justify-content: center; align-items: center; gap: 6px; margin: 0; }
.lay-help { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.lay-turn { color: var(--gold); font-size: 13px; margin: 4px 0; }
.lay-btns { justify-content: center; gap: 8px; margin-top: 6px; }
/* ============ Settings (01-11-2026 overhaul: a rail of pages, search, segmented choices, real switches) ============ */
.box.settings { width: min(900px, 100%); max-height: calc(100dvh / var(--uiz, 1) - 24px); display: flex; flex-direction: column; padding: 18px 20px 16px; }
.set-head { gap: 10px; margin-bottom: 12px; }
.set-head h2 { margin: 0; flex: none; }
.set-q { position: relative; flex: 0 1 300px; min-width: 120px; margin-left: auto; display: flex; align-items: center; }
.set-q input { width: 100%; height: 36px; padding: 0 30px 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--ink); font: 600 14px var(--font-body); text-shadow: none; }
.set-q input::placeholder { color: var(--faint, var(--muted)); }
.set-q input:focus { outline: none; border-color: rgba(255,210,74,.6); box-shadow: 0 0 0 3px rgba(255,210,74,.15); }
.set-q input::-webkit-search-cancel-button { display: none; }
.set-q-x { position: absolute; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: var(--ink); font: 700 16px/24px var(--font-body); cursor: pointer; }
.set-main { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 14px; flex: 1 1 auto; min-height: 0; }
.set-rail { display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 12px; background: var(--well); border: 1px solid var(--line); align-self: start; max-height: 100%; overflow-y: auto; }
.set-tab { appearance: none; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; background: transparent; border: 1px solid transparent; color: var(--muted); font: 700 15px var(--font); text-align: left; cursor: pointer; text-shadow: 0 2px 0 var(--shadow); transition: background .12s, color .12s; }
.set-tab svg { flex: none; opacity: .75; }
.set-tab:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.set-tab.on { background: linear-gradient(180deg, rgba(255,210,74,.17), rgba(255,210,74,.05)); border-color: rgba(255,210,74,.35); color: var(--gold); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.set-tab.on svg { opacity: 1; }
.set-tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.set-body { overflow-y: auto; padding-right: 6px; min-height: 0; overscroll-behavior: contain; }
.set-intro { margin: 2px 0 8px; }
.set-intro h3 { margin: 0; font-size: 22px; color: #fff; }
.set-intro p { margin: 2px 0 0; color: var(--muted); }
.set-h { display: flex; align-items: center; gap: 8px; color: var(--gold); font-size: 15px; letter-spacing: .5px; text-transform: uppercase; margin: 18px 0 4px; }
.set-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,210,74,.4), transparent); }
.set-h:first-child, .set-intro + .set-h { margin-top: 6px; }
.set-sub { margin: 0 0 4px; }
.set-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.set-row .grow { flex: 1 1 280px; min-width: 0; }
.set-row b { display: block; }
.set-row small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; margin-top: 1px; }
.set-row .switch { min-width: 58px; }
.set-row .seg, .set-row .set-sw, .set-row > .btn { margin-left: auto; }
.set-crumb { margin: 14px 0 0; font: 700 11.5px var(--font-body); letter-spacing: .3px; color: var(--muted); }
.set-crumb + .set-row { padding-top: 4px; }
.set-foot { display: flex; justify-content: flex-end; padding: 14px 0 2px; }
.set-inline { gap: 8px; }
/* a segmented choice: one pill, the chosen option lit in gold */
.set-row .seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid var(--line2); flex: none; }
.set-row .seg .chip { border-color: transparent; background: transparent; box-shadow: none; padding: 4px 12px; white-space: nowrap; }
.set-row .seg .chip:hover { background: rgba(255,255,255,.08); }
.set-row .seg .chip.on { background: linear-gradient(180deg, #ffe58a, #f4a21f); color: var(--gold-ink); border-color: #fff3c4; text-shadow: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 0 #9a5d06; }
/* a switch: track and knob, gold when on */
.set-row .set-sw { appearance: none; display: inline-flex; align-items: center; gap: 9px; padding: 2px 0; background: none; border: 0; cursor: pointer; color: var(--muted); font: 700 13px var(--font-body); text-shadow: none; flex: none; }
.set-row .set-sw i { position: relative; display: block; width: 44px; height: 24px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--line2); transition: background .15s, border-color .15s, box-shadow .15s; }
.set-row .set-sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #c9ccd6; box-shadow: 0 1px 2px rgba(0,0,0,.5); transition: transform .15s, background .15s; }
.set-row .set-sw[aria-checked="true"] { color: var(--gold); }
.set-row .set-sw[aria-checked="true"] i { background: linear-gradient(180deg, #ffe58a, #f4a21f); border-color: #fff3c4; box-shadow: 0 0 10px rgba(255,210,74,.3); }
.set-row .set-sw[aria-checked="true"] i::after { transform: translateX(20px); background: #fff; }
.set-row .set-sw:focus-visible i { outline: 2px solid var(--cyan); outline-offset: 3px; }
/* phones: in landscape the rail is icons only; in portrait it is a strip on top */
@media (max-height: 520px) {
  .box.settings { padding: 10px 12px 8px; }
  .set-head { margin-bottom: 6px; }
  .set-q { flex-basis: 220px; }
  .set-main { grid-template-columns: 50px minmax(0, 1fr); gap: 10px; }
  .set-tab { justify-content: center; padding: 8px 0; }
  .set-tab span { display: none; }
  .set-intro h3 { font-size: 18px; }
  .set-intro p, .set-sub { font-size: 12.5px; }
}
@media (orientation: portrait) and (max-width: 700px) {
  .box.settings { padding: 12px 12px 10px; }
  .set-head { flex-wrap: wrap; }
  .set-head h2 { font-size: 22px; }
  .set-q { order: 3; flex: 1 1 100%; margin: 0; }
  .set-main { display: flex; flex-direction: column; gap: 8px; }
  .set-rail { flex-direction: row; overflow-x: auto; max-height: none; scrollbar-width: none; align-self: stretch; width: 100%; box-sizing: border-box; }
  .set-rail::-webkit-scrollbar { display: none; }
  .set-tab { flex: 1 0 auto; flex-direction: column; gap: 3px; padding: 6px 8px; font-size: 11px; }
  .set-row .grow { flex-basis: 100%; }
  .set-row .seg, .set-row .set-sw, .set-row > .btn { margin-left: 0; }
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.set-chips { margin: 6px 0 10px; }
/* (26-10-2026) Held by Potato mode (settings-ui.js): greyed out until it is turned off */
.set-row.locked, .set-chips.locked { opacity: .4; pointer-events: none; filter: grayscale(1); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; font-size: 14px; }
.keys span { color: var(--muted); }
.credits { margin: 4px 0 12px; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.credits b { color: var(--ink); }
.about-logo { text-align: center; font-size: 34px; font-weight: 700; color: var(--gold); text-shadow: 2px 2px 0 #a55f00, 4px 4px 0 var(--shadow); margin-top: 6px; }

.row.wrap { flex-wrap: wrap; }
.touch-hint { display: none; }
body.touch .touch-hint { display: block; }
#pause-sound + .row, #scr-pause .row { flex-wrap: wrap; }
a.btn { text-decoration: none; display: inline-block; color: var(--ink); }

/* ================= short screens (landscape mobile) =================
 * Everything more compact: the top bar leaves room, the menu goes in two
 * columns and the credits line is hidden (it is in Settings → About). */
@media (max-height: 520px) {
  /* Always max(…, env(safe-area-inset-*)): with the installed app fullscreen
     in landscape, the notch sits on one side and must not cover anything. */
  .scr { padding: max(50px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  /* No top bar above: no need to leave room for it. */
  #scr-login, #scr-test, #scr-result, #scr-starters, #scr-nick, #scr-levelup, #scr-pause,
  #scr-over, #scr-item, #scr-settings, #scr-legal, #scr-profile, #scr-bond, #scr-forget, #scr-support {
    padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .split { grid-template-columns: 1fr; }
  .logo .t1 { font-size: 30px; }
  .box { padding: 10px 14px; border-radius: 10px; }
  .box h2 { font-size: 20px; }
  .box h3 { font-size: 16px; }
  .sub { font-size: 13px; margin-bottom: 8px; }
  .note { margin-top: 8px; font-size: 12px; }
  .btn { padding: 7px 14px; }
  .btn.small { padding: 4px 9px; font-size: 13px; }
  .topbar { top: max(5px, env(safe-area-inset-top)); right: max(6px, env(safe-area-inset-right)); gap: 5px; }
  .pill { padding: 2px 8px; font-size: 13px; gap: 5px; }
  #user-pill { max-width: 130px; overflow: hidden; white-space: nowrap; }
  .topbar .btn.small { padding: 2px 6px; }
  .news-btn span { display: none; }
  .credits-line { display: none !important; }
  .sound-panel, .more-menu { top: calc(46px + env(safe-area-inset-top)); right: max(6px, env(safe-area-inset-right)); }

  #scr-menu { flex-direction: row; padding: 0; overflow: hidden; }
  .menu-left { padding: max(50px, env(safe-area-inset-top)) 8px max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .menu-left .logo { margin-bottom: 2px; }
  .menu-left .logo .t1 { font-size: 28px; }
  .logo .t2 { font-size: 10px; margin-top: 3px; letter-spacing: 4px; gap: 6px; }
  .logo .t2::before, .logo .t2::after { flex-basis: 16px; }
  #menu-partner { height: min(40vh, 150px); width: auto; }
  .partner-card { margin-top: 2px; }
  .partner-card .nm { font-size: 17px; }
  .partner-card .lv { font-size: 12px; }
  .menu-right { width: min(54vw, 420px); min-width: 0; padding: max(50px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) 8px; gap: 6px; justify-content: flex-start; overflow-y: auto; }
  .menu-right .box { padding: 6px; border-radius: 14px; }
  .menu-right > .box:last-child { display: none; }
  .menu-right > :first-child { margin-top: 0; }
  .ach-pop { top: auto; bottom: max(8px, env(safe-area-inset-bottom)); }
  .toast { bottom: max(14px, env(safe-area-inset-bottom)); max-width: calc(100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)); }
  .invite-pop { right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  .menu-list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
  .menu-item { font-size: 15px; padding: 4px 8px; grid-template-columns: 22px 1fr; column-gap: 7px; border-radius: 10px; }
  .menu-item small { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-item.play { grid-column: span 2; font-size: 21px; padding: 6px 12px; grid-template-columns: 28px 1fr; }
  .menu-item.play .mi-ico img { width: 26px; height: 26px; }
  .menu-item.play small { font-size: 11px; }
  .mi-ico img { width: 20px; height: 20px; }
  .box.settings { max-height: calc(100dvh - 12px); }

  /* Start: two columns (logo and guest on the left, form on the right) so
     "Entrar" and "Jugar como invitado" are visible without scrolling. */
  .login-box .logo { margin: 4px 0 6px; }
  .login-box .login-tag { display: none; }
  .login-box .login-official { margin: 0 0 8px; font-size: 11px; }
  .login-box .tabs { margin-bottom: 6px; }
  .login-box label { margin: 4px 0 2px; font-size: 13px; }
  .login-box .field { padding: 7px 10px; font-size: 16px; }
  .login-box .err { min-height: 0; margin: 4px 0 0; }
  .login-box .err:empty { display: none; }
  .login-box #login-form .note { margin-top: 4px; }
  .login-box .row[style] { margin-top: 6px !important; }
  .login-guest .row { margin-top: 0 !important; }
  .login-foot .note { margin-top: 6px; }
  .login-box .login-btns { margin-top: 4px; }

  /* End of run: wider and in 4 columns so almost everything fits. */
  #scr-over .box { width: min(720px, 100%) !important; }
  #scr-over .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 6px 0 8px; gap: 6px; }
  #scr-over .stats > div { padding: 5px 8px; }
  #scr-over .stats b { font-size: 18px; }

  /* Test result: the box shrinks so "Let's go together!" is visible. */
  .result .trait { font-size: 22px; }
  .result #res-text { margin: 4px 0; font-size: 14px; }
  #res-stage { height: min(150px, 30vh); width: auto; margin: 4px auto; }
  .result .row { margin-top: 6px !important; }

  /* Gacha: shorter banner and the pull buttons always visible. */
  #scr-gacha .split { grid-template-columns: minmax(0, 1fr) minmax(170px, 30%); gap: 10px; margin-top: 2px !important; }
  #scr-gacha .gen-tabs { margin-top: 0; padding-bottom: 4px; scrollbar-width: none; }
  #scr-gacha .gen-tabs::-webkit-scrollbar { display: none; }
  #scr-gacha .gen-tab { padding: 3px 9px; }
  #scr-gacha .banner { padding: 8px 12px; }
  #scr-gacha .banner h3 { font-size: 19px; margin: 0; }
  #scr-gacha #banner-desc { display: none; }
  #scr-gacha .banner .feat { height: 86px; margin: 2px -6px -8px; }
  #scr-gacha .banner .feat canvas { max-height: 100%; width: auto; }
  #scr-gacha .split .row { margin-top: 8px !important; gap: 8px; }
  #scr-gacha .note { margin-top: 4px; }
  #scr-gacha .rates { padding: 8px; font-size: 12px; max-height: calc(100dvh - 140px); overflow-y: auto; }
}
@media (max-height: 520px) and (max-width: 700px) {
  #scr-gacha .split { grid-template-columns: 1fr; }
}
@media (max-height: 400px) {
  #res-stage { height: min(110px, 26vh); }
  .result .sub { margin-bottom: 2px; }
}
/* Very short phones (iPhone SE and similar): no subtitles in the menu, so it all fits. */
@media (max-height: 400px) {
  .menu-right { padding-top: max(48px, env(safe-area-inset-top)); }
  .menu-item small { display: none; }
  .menu-item:not(.play) .mi-ico { grid-row: auto; }
  .menu-item { font-size: 14px; padding: 5px 8px; }
  .menu-item.play { font-size: 19px; }
  .menu-item.play small { display: block; }
  #menu-partner { height: min(36vh, 130px); }
}

/* ---------- loading screen (the first thing you see and what Google reads) ---------- */
.boot-in { text-align: center; padding: 20px; max-width: 640px; }
.boot-in h1 { margin: 0; font-size: clamp(44px, 9vw, 76px); line-height: 1.05; font-weight: 700; letter-spacing: 1px; }
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .boot-in h1, .about-logo { color: var(--gold); text-shadow: 0 3px 0 #a35a00, 0 6px 0 var(--shadow); }
}
.boot-sub { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 10px 0 14px; padding-left: 8px;
  font: 700 16px var(--font); letter-spacing: 8px; text-transform: uppercase; color: var(--cyan); text-shadow: 0 2px 0 var(--shadow); }
.boot-sub::before, .boot-sub::after { content: ''; width: 36px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--cyan)); }
.boot-sub::after { background: linear-gradient(90deg, var(--cyan), transparent); }
.boot-in p { margin: 6px 0; color: var(--muted); font-size: 16px; font-weight: 600; }
.boot-in a { color: #9fd4ff; }
.boot-ld { color: #dfe7ff !important; margin-top: 10px !important; font-size: 14px !important; letter-spacing: .3px; }
/* Indeterminate loading bar (we do not know how much is left: only that it is moving). */
.boot-bar { position: relative; width: min(260px, 70vw); height: 8px; margin: 22px auto 0; border-radius: 8px; overflow: hidden;
  background: rgba(0,0,0,.45); border: 1px solid var(--line); box-shadow: inset 0 1px 2px rgba(0,0,0,.5); }
.boot-bar i { position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 8px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--gold), transparent); animation: boot-run 1.25s ease-in-out infinite; }
@keyframes boot-run { to { left: 100%; } }
.boot.noscript { z-index: 90; }
/* "Press to start": on top of everything, with the background world visible. */
.tapstart { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: radial-gradient(ellipse at center, rgba(5,9,20,.3), rgba(5,9,20,.85)); animation: fade .4s; }
.tapstart .boot-in p { color: #e6edff; text-shadow: 0 1px 3px #000; }
.tap-blink { display: inline-block; color: var(--gold-ink) !important; font: 700 19px var(--font) !important; margin-top: 26px !important;
  padding: 10px 26px; border-radius: 999px; background: linear-gradient(180deg, #ffe58a, #ffc93c 55%, #f4a21f);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 0 #9a5d06, 0 0 0 0 rgba(255,210,74,.5); text-shadow: 0 1px 0 rgba(255,255,255,.45) !important;
  animation: tap-pulse 1.6s ease-in-out infinite; }
@keyframes tap-pulse { 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 0 #9a5d06, 0 0 0 10px rgba(255,210,74,0); transform: scale(1.04); } }
@keyframes blink { 50% { opacity: .25; } }
/* ---------- title screen: "Night of Judgment" (js/ui/title-fx.js) ---------- */
.tapstart { background: none; overflow: hidden; }
.title-in { position: relative; z-index: 1; margin-top: -14vh; animation: title-in 1.4s cubic-bezier(.2,.8,.2,1) .5s both; }
.title-in h1 { font-size: clamp(60px, 13vw, 132px) !important; letter-spacing: 2px; animation: title-float 5s ease-in-out 2s infinite; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .title-in h1 {
    background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.95) 50%, transparent 58%) no-repeat,
                linear-gradient(180deg, #fffbe6 0%, #ffe48a 30%, #ffc12e 55%, #e07a0c 78%, #ffd56a 100%);
    background-size: 300% 100%, 100% 100%; background-position: 160% 0, 0 0;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 2px 0 #7a3a00) drop-shadow(0 4px 0 #2a0d05) drop-shadow(0 0 22px rgba(255,170,40,.45)) drop-shadow(0 10px 18px rgba(0,0,0,.7));
    animation: title-float 5s ease-in-out 2s infinite, title-shine 5.5s ease-in-out 1.8s infinite;
  }
}
.title-in .boot-sub { color: #ff6a3d; letter-spacing: 12px; font-size: clamp(14px, 2.2vw, 20px);
  text-shadow: 0 0 12px rgba(255,80,40,.75), 0 2px 0 #000; }
.title-in .boot-sub::before, .title-in .boot-sub::after { width: clamp(30px, 8vw, 80px); background: linear-gradient(90deg, transparent, #ff6a3d); box-shadow: 0 0 8px #ff4a20; }
.title-in .boot-sub::after { background: linear-gradient(90deg, #ff6a3d, transparent); }
.tapstart .title-in p:not(.tap-blink) { color: #f1e8ff; font-size: clamp(14px, 1.8vw, 18px); text-shadow: 0 2px 6px #000, 0 0 2px #000; letter-spacing: .3px; }
.title-in .tap-blink { margin-top: 30px !important; padding: 12px 34px; font-size: 20px !important; letter-spacing: .5px;
  animation: tap-pulse 1.6s ease-in-out infinite, title-in .8s ease-out 1.6s both; }
.title-news { position: absolute; z-index: 1; left: 16px; right: 16px; margin: 0 auto; width: fit-content; bottom: max(14px, env(safe-area-inset-bottom));
  max-width: calc(100% - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 6px 14px; border-radius: 999px; font: 700 12px var(--font); color: #ffe7a8; letter-spacing: .4px;
  background: rgba(10,8,24,.6); border: 1px solid rgba(255,200,90,.28); box-shadow: 0 0 18px rgba(255,170,40,.12);
  animation: title-in .8s ease-out 2.2s both; }
.title-news:empty { display: none; }
.tapstart.out .title-in { animation: title-out .7s cubic-bezier(.5,0,.8,.4) forwards; }
.tapstart.out .title-news { animation: title-fade .3s forwards; }
@keyframes title-in { from { opacity: 0; transform: translateY(18px) scale(.94); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes title-out { to { opacity: 0; transform: scale(2.4); filter: blur(10px); } }
@keyframes title-fade { to { opacity: 0; } }
@keyframes title-float { 50% { transform: translateY(-6px); } }
@keyframes title-shine { 0%, 55% { background-position: 160% 0, 0 0; } 85%, 100% { background-position: -60% 0, 0 0; } }
@media (orientation: portrait) { .title-in { margin-top: -26vh; } }
@media (max-height: 480px) { .title-in { margin-top: -6vh; } .title-in h1 { font-size: clamp(44px, 16vh, 84px) !important; } .title-in .tap-blink { margin-top: 14px !important; } }
@media (prefers-reduced-motion: reduce) { .title-in, .title-in h1, .title-in .tap-blink, .title-news, .tapstart.out .title-in { animation: none !important; } }

.login-tag { margin: -6px 0 12px; font-size: 13px; color: var(--muted); text-align: center; }
.login-official { margin: -6px 0 12px; font-size: 12px; color: var(--muted); text-align: center; opacity: .9; }
.login-links { margin-top: 10px; font-size: 13px; text-align: center; }
.login-links a { color: #9fd4ff; }
/* Fade-in when switching scenes (menu <-> run), ui.js fadeIn. */
.fader { position: fixed; inset: 0; z-index: 150; background: #03050d; pointer-events: none; opacity: 0; visibility: hidden; }
.fader.on { visibility: visible; animation: fader-out .5s ease-out forwards; }
@keyframes fader-out { from { opacity: 1; } to { opacity: 0; } }
/* ---------- support the project ---------- */
#scr-support { z-index: 60; }
.box.support { width: min(560px, 100%); }
/* Upgrades: buttons and ban */
.upg-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ban-picker { grid-column: 1 / -1; }
.ban-modal { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.72); }
.ban-modal .ban-picker { width: min(720px, 100%); max-height: 100%; overflow-y: auto; background: #0b0b12 !important; border: 1px solid rgba(255,95,109,.45); box-shadow: 0 12px 40px rgba(0,0,0,.8); }
.ban-moves { display: flex; flex-wrap: wrap; gap: 6px; }
.ban-moves .chip { display: inline-flex; align-items: center; gap: 5px; }
.ban-moves .chip.ban { background: rgba(255,95,109,.25); border-color: #ff5f6d; color: #ffd3d8; text-decoration: line-through; }
/* (26-10-2026) The moves of its types, apart (they only come up in an extra slot); TM / shiny tags on the chips */
.ban-picker .ban-h { margin: 14px 0 2px; font-size: 13px; color: var(--muted); }
.ban-picker .ban-sub { margin: 0 0 8px; font-size: 12px; }
.ban-tag { font-size: 10px; font-weight: 800; padding: 1px 5px; border-radius: 6px; background: rgba(120,170,255,.18); color: #b8d4ff; text-decoration: none; }
.ban-tag.sh { background: rgba(255,214,90,.18); color: #ffe08a; }
.ban-modal .mv2-picker { border-color: rgba(255,210,74,.45); }     /* (27-10-2026) Repertoire's second move: a choice, not a ban */
/* What's new */
.news-btn { position: relative; }
.news-btn .dot { display: none; position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; background: #ff5f6d; box-shadow: 0 0 0 2px var(--shadow), 0 0 8px rgba(255,95,109,.7); }
.news-btn.new .dot { display: block; }
/* (26-10-2026) / --uiz: from 1600×900 up the window is zoomed and 100dvh with it (the news ran off the top and the bottom of the screen) */
.box.news-box { width: min(640px, 100%); max-height: calc(100dvh / var(--uiz, 1) - 90px); display: flex; flex-direction: column; }
.news-body { overflow-y: auto; padding-right: 4px; }
.news-day { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.news-day:last-child { border-bottom: 0; }
.news-day h3 { color: var(--gold); margin: 14px 0 6px; font-size: 18px; }
.news-day h3 small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 2px; }
.news-part { margin: 6px 0 8px; }
.news-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; color: #0b1020; text-shadow: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.news-tag.new { background: #5fe08a; } .news-tag.chg { background: #4fb4ff; } .news-tag.fix { background: #ffb347; }
.news-day ul { margin: 0; padding-left: 20px; }
.news-day li { margin: 5px 0; line-height: 1.45; font-size: 15px; color: #dbe3f7; }
@media (max-width: 760px) { .news-btn span { display: none; } }
.sup-tab { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 15px; }
.sup-tab td { padding: 5px 4px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sup-tab td.num { text-align: right; white-space: nowrap; }
.sup-tab tr.tot td { font-weight: 700; color: var(--gold); border-bottom: 0; }
#btn-support span { margin-left: 2px; }
@media (max-height: 520px) { #btn-support span { display: none; } }
/* ============ Pokémon on landscape mobile ============
 * The list on the left and the detail card (with "Choose as partner") on the
 * right, always visible: the card used to sit below the list and you had to
 * scroll to the bottom to find the button. */
@media (max-height: 520px) {
  #scr-dex .box { height: 100%; display: flex; flex-direction: column; padding: 8px 10px; }
  #scr-dex .gen-tabs { margin-top: 2px; padding-bottom: 4px; flex: 0 0 auto; }
  #scr-dex .split { grid-template-columns: 1fr minmax(190px, 36%); gap: 8px; flex: 1; min-height: 0; margin-top: 2px !important; }
  #scr-dex .split > div:first-child { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  #scr-dex .gen-tabs, #scr-dex .filters { scrollbar-width: none; }
  #scr-dex .gen-tabs::-webkit-scrollbar, #scr-dex .filters::-webkit-scrollbar { display: none; }
  #scr-dex .filters { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 4px; flex: 0 0 auto; }
  #scr-dex .dex-search { margin-bottom: 4px; flex: 0 0 auto; }
  #scr-dex .dex-search .field { padding: 4px 10px; font-size: 13px; min-height: 0; }
  #scr-dex .chip.type-f { min-height: 30px; }
  #scr-dex .chip { flex: 0 0 auto; padding: 2px 8px; font-size: 12px; }
  #scr-dex .grid { max-height: none; flex: 1; min-height: 0; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 5px; }
  #scr-dex .cell canvas { width: 69px; height: 60px; }
  #scr-dex .cell b { font-size: 11px; }
  #dex-detail { min-height: 0; overflow-y: auto; padding: 6px 8px; display: flex; flex-direction: column; }
  #dex-detail .stage { width: 132px; height: 114px; margin: 2px auto 4px; }
  #dex-detail h3 { margin: 0; }
  #dex-detail .stat { grid-template-columns: 62px 1fr 34px; gap: 4px; font-size: 12px; margin: 2px 0; }
  #dex-detail p { margin: 4px 0 !important; font-size: 12px !important; }
  #dex-detail .move-icons { margin-bottom: 4px; }
  /* The choose button, right below the name and types: visible without scrolling
     and no longer covers anything (it used to stick to the bottom and hide the name). */
  #dex-detail > * { order: 3; }
  #dex-detail > .stage, #dex-detail > .seg, #dex-detail > .center { order: 1; }
  #dex-detail > .btn { order: 2; flex: none; margin: 2px 0 6px; padding: 6px; font-size: 14px; }
  #dex-detail .center > div:first-child { font-size: 11px !important; }
  #dex-detail .center > div:last-child { margin: 2px 0 !important; }
  #dex-detail .center h3 { line-height: 1.1; }
  #dex-detail .center img { width: 16px; height: 16px; vertical-align: -2px; }
  #dex-detail .stage { width: 112px; height: 96px; margin: 0 auto 2px; }
}
@media (max-height: 400px) {
  #dex-detail .stage { width: 96px; height: 82px; }
  #dex-detail .center > div:first-child { display: none; }
}

/* Start on short screens (landscape mobile, 720 px laptops): two columns,
   logo and guest on the left and the form on the right. */
@media (max-height: 760px) {
  .login-box { width: min(760px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    grid-template-areas: "head body" "guest body" "foot body"; grid-template-rows: auto auto 1fr; column-gap: 18px; align-items: start; }
  .login-head { grid-area: head; }
  .login-body { grid-area: body; }
  .login-guest { grid-area: guest; }
  .login-foot { grid-area: foot; }
}

/* ============ top bar: "⋯" menu with the secondary items ============
 * On narrow or short screens ~10 buttons do not fit: Support, Install,
 * Fullscreen and Exit move into a dropdown menu (ui.js, moreMenu). */
#btn-more { display: none; padding: 5px 9px; }
.more-menu { position: fixed; top: calc(62px + env(safe-area-inset-top)); right: calc(16px + env(safe-area-inset-right)); z-index: 30;
  width: min(290px, calc(100vw - 20px)); padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.more-menu button { appearance: none; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 6px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-align: left;
  font-weight: 700; color: var(--ink); text-shadow: 0 2px 0 var(--shadow); }
.more-menu button:hover, .more-menu button:focus-visible { border-color: rgba(190,215,255,.5); background: rgba(120,170,255,.14); }
@media (max-height: 520px), (max-width: 900px) {
  .topbar .tb-sec { display: none !important; }
  #btn-more { display: flex; }
}

/* ============ guest: Friends and Leaderboard locked ============ */
.mi-ico { position: relative; justify-self: start; }
.menu-item .lock { position: absolute; right: -7px; bottom: -5px; line-height: 0; filter: drop-shadow(1px 1px 0 var(--shadow)); }
.menu-item.locked { opacity: .85; }
.guest-dlg .box { width: min(400px, 100%); text-align: center; }
.guest-dlg .box h3 { display: flex; gap: 8px; align-items: center; justify-content: center; }

/* ============ fingers: touch targets of at least 40 px ============ */
@media (pointer: coarse) {
  .btn.small, .topbar .btn.small { min-height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
  .menu-item { min-height: 40px; }
  .chip, #scr-dex .chip { min-height: 40px; display: inline-flex; align-items: center; gap: 4px; }
  .gen-tab, .tab, .seg button { min-height: 40px; }
  /* Text links: taller touch area without moving anything around them. */
  #f-forgot, #rec-never, .login-foot a, .legal-link { display: inline-block; padding: 12px 6px; margin: -12px -6px; }
  .login-foot a { margin: -12px 0; }
}

/* ============ gacha: the pull also respects the notch ============ */
#pull-fx { padding: max(14px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }

/* ============ reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .tap-blink, #rotate-ico, .box, .scr, .pcard, .pcard.r5, .pcard.shiny, .toast, .ach-pop, .invite-pop, #slot, .tapstart,
  .card, .pcard::after, .boot-bar i, #pull-fx > .pull-rays, .fader.on { animation: none !important; }
  .card, .cell, .btn, .menu-item, .answer, .chip, .gen-tab, .tab { transition: none !important; }
  .card:hover, .menu-item:active, .cell:hover { transform: none; }
  .boot-bar i { left: 30%; }
}
.toast.act { display: flex; align-items: center; }
.toast .btn { margin-left: 12px; vertical-align: middle; white-space: nowrap; flex: none; }
/* Personality test on landscape mobile: more compact (everything visible without scrolling). */
@media (max-height: 520px) {
  .test-box .progress { margin-bottom: 8px; }
  .test-head { margin-bottom: 6px; }
  .q { font-size: 18px; min-height: 0; margin-bottom: 10px; }
  .answers { gap: 6px; }
  .answer { padding: 8px 14px 8px 30px; font-size: 15px; }
}

/* ============ interface pass (17-10-2026) ============ */
/* Start: "Entrar" and "Entrar con Google" stacked; on landscape mobile,
   side by side (Google used to overflow at the bottom). */
.login-btns { flex-direction: column; align-items: stretch; gap: 10px; }
.login-btns .btn { flex: none; }
.login-box .err:empty { display: none; }
@media (max-height: 520px) {
  .login-btns { flex-direction: row; flex-wrap: nowrap; gap: 8px; }
  .login-btns .btn { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
  .login-btns #btn-google { flex: 0 1 auto; padding: 7px 10px; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
  .login-box .tab { padding: 4px 8px; }
  .login-box .field { padding: 5px 10px; }
}
/* The credits line (bottom left) is not drawn over the windows. */
body:has(.scr.dim:not(.hidden)) .credits-line { display: none; }
/* Missions: only the list scrolls (there used to be two scrollbars on mobile). */
#scr-goals .box { display: flex; flex-direction: column; }
#scr-goals .box > * { flex: none; }
#scr-goals .goals-body { flex: 0 1 auto; min-height: 0; }
/* Missions: reward and button aligned from row to row. */
.m-rw { min-width: 96px; text-align: right; }
.mission .btn { min-width: 96px; }
/* Upgrades: price on one line and equal-width buttons. */
.upg-btns .btn { white-space: nowrap; min-width: 84px; justify-content: center; }
/* Support: the text scrolls and "Cerrar" always stays visible. */
.box.support { display: flex; flex-direction: column; }
.box.support > .row { flex: none; }
#sup-body { overflow-y: auto; min-height: 0; padding-right: 4px; }
/* Legal notice and profile: the header with "Cerrar" stays on top when scrolling. */
.box.legal > .row.between:first-child, .profile-box > .row.end:first-child {
  position: sticky; top: 2px; z-index: 2; margin: -12px -23px 6px; padding: 12px 23px 8px; background: var(--box1); box-shadow: 0 1px 0 var(--line); }
@media (max-height: 520px) {
  .box.legal > .row.between:first-child, .profile-box > .row.end:first-child { margin: -8px -13px 4px; padding: 8px 13px 6px; }
}
/* Settings: same height on every tab (the window used to jump when switching). */
.box.settings { min-height: min(560px, calc(100dvh / var(--uiz, 1) - 24px)); }
@media (max-height: 520px) { .box.settings { height: calc(100dvh - 12px); } }
.set-body .sound-inline { margin-left: 0; }
/* Pause: buttons in a column and equal width (one used to be left alone below). */
@media (min-height: 521px) {
  #scr-pause .box > .row { flex-direction: row; justify-content: center; gap: 10px; margin: 0 auto 6px; }     /* (in a column until 18-10-2026) */
}
/* Friends and Leaderboard: only the list scrolls (on landscape mobile it used to be
   a list inside a box that also scrolled, and "tu puesto" ended up off-screen). */
#scr-friends .box, #scr-rank .box { display: flex; flex-direction: column; }
#scr-friends .box > *, #scr-rank .box > * { flex: none; }
#scr-friends .fr-list, #scr-rank .rk-list { flex: 0 1 auto; min-height: 60px; max-height: none; }
@media (min-height: 521px) {
  #scr-friends .fr-list { max-height: 52vh; }
  #scr-rank .rk-list { max-height: 46vh; }
}
/* Upgrades on landscape mobile: shorter header, more room for the list. */
@media (max-height: 520px) {
  .upg-head { margin: 2px 0 8px; gap: 10px; }
  .upg-head .stage { width: 80px; height: 64px; flex: 0 0 80px; margin: 0; }
}

/* ============ room chat (js/ui/chat-ui.js) ============
 * Room: box below the players. On short screens (landscape mobile), on the right
 * (so "Start game" does not move down). Group run: latest messages at the
 * top left, below the teammates' HP; they do not capture touches. */
.lchat { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.lchat-log { max-height: min(150px, 22vh); overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 6px 10px;
  border-radius: 8px; background: rgba(0,0,0,.25); border: 2px solid rgba(244,248,255,.14); font-size: 14px; }
.lchat-log:empty { display: none; }
.lchat-line, .chat-line { overflow-wrap: anywhere; line-height: 1.3; }
.lchat-line b, .chat-line b { margin-right: 6px; }
.lchat-line b::after, .chat-line b::after { content: ':'; }
.lchat-line.mine span { color: #fff7d6; }
.lchat-empty { margin: 0; color: var(--muted); font-size: 13px; }
.lchat-form { display: flex; gap: 8px; }
.lchat-form .field, .chat-row .field { flex: 1; min-width: 0; padding: 6px 10px; font-size: 16px; }

/* (left, top and width are set by chat-ui.js, using hud.js's measurements) */
.chat-run { position: fixed; z-index: 15; display: flex; pointer-events: none;
  font-size: calc(13px * var(--cs, 1)); text-shadow: 1px 1px 0 rgba(0,0,0,.85); }
.chat-run.typing { z-index: 26; }
/* Like the HUD pause button (40 px, radius 10), right below it. */
.chat-btn { position: fixed; z-index: 16; width: 42px; height: 42px; padding: 0; display: flex; align-items: center; justify-content: center;
  border-radius: 11px; background: rgba(8,13,30,.72); border: 1.5px solid rgba(200,220,255,.55); color: #f4f8ff; cursor: pointer; touch-action: manipulation; }
.chat-btn.on { border-color: var(--gold); color: var(--gold); z-index: 27; }
.chat-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
/* Typing: the input on top (below the HP) and the messages below. */
.chat-run.typing .chat-col { flex-direction: column-reverse; justify-content: flex-end; }
.chat-run.typing .chat-form { margin: 0 0 3px; }
.chat-lines { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.chat-line { max-width: 100%; padding: 2px 8px; border-radius: 7px; background: rgba(5,10,24,.58); color: #eef4ff;
  transition: opacity .6s; animation: fade .2s ease-out; }
.chat-line.old { opacity: 0; }
.chat-run.typing .chat-line { background: rgba(5,10,24,.8); }
.chat-form { pointer-events: auto; display: flex; flex-direction: column; gap: 6px; margin-top: 3px; }
.chat-row { display: flex; gap: 6px; align-items: center; }
.chat-quick { display: flex; gap: 6px; flex-wrap: wrap; }     /* (PC too since 21-10-2026: the map markers) */
.chat-quick .chip { min-height: 40px; padding: 4px 14px; font-size: 15px; background: rgba(5,10,24,.75); }
body:not(.touch) .chat-quick .chip { min-height: 30px; padding: 2px 10px; font-size: 13px; }
/* (26-10-2026) The global chat in a run (Enter): the channel by the input (Tab switches it in a group run); a global line
   carries a small globe and a cyan name. */
.chat-chan { flex: none; min-height: 34px; padding: 0 12px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,.25); background: rgba(5,10,24,.85);
  color: #fff; font-family: var(--font); font-size: 14px; white-space: nowrap; cursor: pointer; }
.chat-chan.g { border-color: rgba(95,216,255,.7); color: var(--cyan); }
.chat-chan:disabled { cursor: default; }
.chat-line.g b { color: var(--cyan); }
.chat-line.g i { display: inline-block; margin-right: 5px; color: var(--cyan); font-style: normal; opacity: .85; }
.chat-row .field:disabled { opacity: .7; }
/* Gacha: tickets for coins (21-10-2026) */
#gacha-xch { gap: 6px; align-items: center; margin-top: 4px; }
#gacha-xch .note { margin: 0; font-size: 12px; flex: 1; min-width: 160px; }
#gacha-xch .coin { display: inline-block; vertical-align: middle; }
/* Profile: recent runs (21-10-2026) */
.prof-runs { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.prof-run { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px; background: rgba(255,255,255,.04); }
.prof-run.void { opacity: .55; }
.prof-run .pr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prof-run .pr-txt b, .prof-run .pr-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-run small { color: var(--muted); font-size: 12px; }
.prof-run .pr-num { text-align: right; display: flex; flex-direction: column; flex: none; }
.prof-run .pr-num b { font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .chat-line { animation: none; } }

/* ============ visual pass (17-10-2026): compact cards on landscape mobile ============ */
@media (max-height: 520px) {
  .cards { gap: 7px; }
  .card { padding: 7px 12px 7px 16px; gap: 12px; }
  .card .ico { flex-basis: 42px; height: 42px; border-radius: 10px; }
  .card .nm { font-size: 17px; }
  .card .ds { font-size: 13px; margin-top: 0; }
  #scr-levelup .sub, #scr-item .sub { margin-bottom: 8px; }
  #lvl-reroll { margin-top: 8px !important; }
}
/* Menu on large screens: subtitles on two lines (not truncated) and the partner at double size. */
@media (min-height: 700px) {
  .menu-item small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
@media (min-width: 1500px) and (min-height: 950px) {
  #menu-partner { width: 520px; height: 400px; }
  .partner-card .nm { font-size: 30px; }
}

/* =====================================================================
 * OLED theme (17-10-2026): pure black, thin light borders and gold as the
 * only accent. It goes last to override what comes before.
 * ===================================================================== */
:root {
  --bg: #000; --s0: #000; --s1: #050506; --s2: #0a0a0c; --s3: #141418;
  --well: rgba(255,255,255,.035); --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.16); --hi: rgba(255,255,255,.05);
  --box1: #0a0a0c; --box2: #000; --edge-in: #26262c; --edge-out: #000; --shadow: #000;
  --muted: #a8a8b2; --faint: #74747e;
  --elev2: 0 24px 60px rgba(0,0,0,.92), 0 2px 0 #000;
}
body { background: #000; }
.box {
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 120px), #000;
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 0 1px #000, var(--elev2);
}
.scr.dim { background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.55), rgba(0,0,0,.9) 75%); }
.btn {
  background: linear-gradient(180deg, #141417, #0a0a0c);
  border-color: rgba(255,255,255,.17);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 3px 0 #000, 0 6px 14px rgba(0,0,0,.6);
  text-shadow: 0 2px 0 #000;
}
.btn:hover { filter: none; border-color: rgba(255,255,255,.38); background: linear-gradient(180deg, #1b1b1f, #0e0e11); }
.btn:active { box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 1px 0 #000; }
.btn.ghost { background: rgba(255,255,255,.025); border-color: rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.btn.ghost:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.34); }
.btn.gold { background: linear-gradient(180deg, #ffe58a, #ffc93c 50%, #f4a21f); border-color: #fff3c4; text-shadow: 0 1px 0 rgba(255,255,255,.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -2px 0 rgba(160,90,0,.25), 0 3px 0 #9a5d06, 0 6px 14px rgba(244,162,31,.25); }
.btn.gold:hover { background: linear-gradient(180deg, #fff0b0, #ffd35a 55%, #f7ae2c); border-color: #fff8dc; }
.btn:focus-visible, .menu-item:focus-visible, .answer:focus-visible { outline: 2px solid #ffe08a; outline-offset: 3px; }
.tab.on, button.tab.on { background: linear-gradient(180deg, #1c1c21, #111114); border-color: rgba(255,255,255,.22); }
.field { background: #000; border-color: rgba(255,255,255,.16); }
.field:focus { border-color: rgba(255,224,138,.7); box-shadow: 0 0 0 3px rgba(255,210,74,.14); }
.pill { background: rgba(0,0,0,.9); border-color: rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 12px rgba(0,0,0,.6); }
.answer { background: #050506; border-color: rgba(255,255,255,.14); }
.answer:hover { background: #0c0c0f; border-color: rgba(255,224,138,.45); }
.menu-item { background: #050506; border-color: rgba(255,255,255,.13); }
.menu-item:hover, .menu-item:focus-visible { background: #0b0b0e; border-color: rgba(255,224,138,.5); }

/* =====================================================================
 * Ring menu: the partner in the center, three shortcuts on each side in an
 * arc ("(" on the left, ")" on the right) and JUGAR below.
 * ===================================================================== */
#scr-menu.scr { padding: 0; display: flex; align-items: center; justify-content: center; flex-direction: row; overflow-y: auto; }
#scr-menu::before { background: radial-gradient(ellipse 46% 56% at 50% 52%, rgba(0,0,0,.6), transparent 72%); }
#scr-menu .hub {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: clamp(18px, 4vw, 70px);
  width: min(1240px, 100%); min-height: 100%; box-sizing: border-box; margin: auto;
  padding: max(72px, calc(env(safe-area-inset-top) + 60px)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
#scr-menu .hub-side { display: flex; flex-direction: column; gap: clamp(14px, 3vh, 26px); }
#scr-menu .hub-l { align-items: flex-end; }
#scr-menu .hub-r { align-items: flex-start; }

/* Ring button: black pill with the icon medallion facing inward. */
#scr-menu .hub-btn {
  --ax: 0px; --in: 8px;
  width: clamp(210px, 22vw, 280px); min-height: 66px;
  display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; align-items: center;
  padding: 7px 22px 7px 7px; border-radius: 999px;
  background: radial-gradient(120% 140% at 0% 50%, rgba(255,255,255,.05), transparent 60%), #000;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px #000, 0 14px 34px rgba(0,0,0,.85);
  font-size: 20px; letter-spacing: .4px; text-shadow: 0 2px 0 #000;
  translate: var(--ax) 0;
  transition: translate .28s cubic-bezier(.2,.9,.25,1.2), border-color .2s, box-shadow .2s, background .2s, scale .1s;
}
#scr-menu .hub-btn small { grid-column: 2; font-size: 12.5px; color: var(--muted); }
#scr-menu .hub-btn .mi-ico {
  grid-row: 1 / span 2; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 35%, #1a1a1f, #000 70%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), inset 0 -6px 12px rgba(0,0,0,.8), 0 0 0 4px #000;
  transition: box-shadow .25s, transform .3s cubic-bezier(.2,.9,.25,1.4);
}
#scr-menu .hub-btn .mi-ico img { width: 30px; height: 30px; }
/* Arc: the top and bottom ones move toward the center, the middle one stays out. */
#scr-menu .hub-l .hub-btn:is(:first-child, :last-child) { --ax: 42px; }
#scr-menu .hub-r .hub-btn:is(:first-child, :last-child) { --ax: -42px; }
#scr-menu .hub-r .hub-btn { --in: -8px; }
/* Left side mirrored: medallion on the right and text aligned toward it. */
#scr-menu .hub-l .hub-btn { grid-template-columns: 1fr 56px; padding: 7px 7px 7px 22px; text-align: right;
  background: radial-gradient(120% 140% at 100% 50%, rgba(255,255,255,.05), transparent 60%), #000; }
#scr-menu .hub-l .hub-btn .mi-ico { grid-column: 2; grid-row: 1 / span 2; }
#scr-menu .hub-l .hub-btn small { grid-column: 1; }
#scr-menu .hub-btn:hover, #scr-menu .hub-btn:focus-visible {
  translate: calc(var(--ax) + var(--in)) 0; background-color: #000;
  border-color: rgba(255,224,138,.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px #000, 0 0 28px rgba(255,196,70,.18), 0 14px 34px rgba(0,0,0,.85);
}
#scr-menu .hub-btn:hover .mi-ico, #scr-menu .hub-btn:focus-visible .mi-ico {
  transform: scale(1.1) rotate(-6deg);
  box-shadow: inset 0 0 0 1.5px rgba(255,224,138,.85), inset 0 -6px 12px rgba(0,0,0,.8), 0 0 0 4px #000, 0 0 18px rgba(255,200,80,.45);
}
#scr-menu .hub-btn:active { scale: .97; }
#scr-menu .hub-btn.locked { opacity: .78; }
/* Entrance: they come in from outside, staggered. */
#scr-menu:not(.hidden) .hub-l .hub-btn { animation: hub-in-l .55s cubic-bezier(.2,.9,.2,1) both; }
#scr-menu:not(.hidden) .hub-r .hub-btn { animation: hub-in-r .55s cubic-bezier(.2,.9,.2,1) both; }
#scr-menu:not(.hidden) .hub-side .hub-btn:nth-child(2) { animation-delay: .07s; }
#scr-menu:not(.hidden) .hub-side .hub-btn:nth-child(3) { animation-delay: .14s; }
#scr-menu:not(.hidden) .hub-side .hub-btn:nth-child(4) { animation-delay: .21s; }
@keyframes hub-in-l { from { opacity: 0; transform: translateX(-46px); } }
@keyframes hub-in-r { from { opacity: 0; transform: translateX(46px); } }

/* Center: logo, the partner inside its ring, JUGAR and stats. */
#scr-menu .hub-core { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
#scr-menu .hub-logo { margin-bottom: 4px; }
#scr-menu .hub-logo .t1 { font-size: clamp(34px, 4.6vw, 56px); }
#scr-menu .hub-logo .t2 { color: #ff6a3d; text-shadow: 0 0 10px rgba(255,80,40,.6), 0 2px 0 #000; }
#scr-menu .hub-logo .t2::before { background: linear-gradient(90deg, transparent, #ff6a3d); }
#scr-menu .hub-logo .t2::after { background: linear-gradient(90deg, #ff6a3d, transparent); }
#scr-menu .partner-card { position: relative; margin-top: 0; }
#scr-menu #menu-partner { position: relative; z-index: 1; height: min(32vh, 250px); width: auto; }
#scr-menu .hub-ring { position: absolute; left: 50%; top: min(16vh, 125px); width: 0; height: 0; pointer-events: none; }
#scr-menu .hub-ring i { position: absolute; border-radius: 50%; left: 50%; top: 50%; translate: -50% -50%; }
#scr-menu .hub-ring i:nth-child(1) { width: min(40vh, 320px); height: min(40vh, 320px); border: 1.5px dashed rgba(255,214,120,.28); animation: hub-spin 60s linear infinite; }
#scr-menu .hub-ring i:nth-child(2) { width: min(34vh, 270px); height: min(34vh, 270px); border: 1px solid rgba(255,255,255,.09);
  background: radial-gradient(circle, rgba(0,0,0,.65) 40%, transparent 71%); }
#scr-menu .hub-ring i:nth-child(3) { width: min(37vh, 296px); height: min(37vh, 296px);
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,214,120,.75) 96%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 2px), #000 calc(50% - 1.5px), #000 50%, transparent calc(50% + .5px));
          mask: radial-gradient(circle, transparent calc(50% - 2px), #000 calc(50% - 1.5px), #000 50%, transparent calc(50% + .5px));
  animation: hub-spin 7s linear infinite reverse; }
@keyframes hub-spin { to { rotate: 360deg; } }
#scr-menu .partner-card .nm { position: relative; z-index: 1; font-size: 28px; }
#scr-menu .partner-card .lv, #scr-menu .partner-card .seg { position: relative; z-index: 1; }
#scr-menu .menu-item.play {
  width: min(360px, 82vw); margin-top: 16px; grid-template-columns: 46px 1fr; padding: 12px 22px; border-radius: 999px;
  font-size: 30px; text-align: left;
  background: linear-gradient(180deg, #ffe58a, #ffc93c 55%, #f4a21f); border-color: #fff3c4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 0 #9a5d06, 0 0 34px rgba(255,190,50,.28), 0 10px 26px rgba(0,0,0,.8);
  animation: play-glow 2.4s ease-in-out infinite;
}
#scr-menu .menu-item.play:hover { background: linear-gradient(180deg, #fff0b0, #ffd35a 55%, #f7ae2c); }
@keyframes play-glow { 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 0 #9a5d06, 0 0 52px rgba(255,190,50,.5), 0 10px 26px rgba(0,0,0,.8); } }
#scr-menu .hub-stats { margin-top: 12px; font: 600 13px/1.5 var(--font-body); color: var(--muted); text-shadow: 0 1px 2px #000; }
#scr-menu .hub-stats b { color: #fff; }
/* (22-10-2026) Mega: the ring pill under Play, magenta like the Mega banner. */
#scr-menu .hub-cta { display: flex; flex-direction: column; align-items: center; }
#scr-menu .hub-btn.mega-hub { --ax: 0px; --in: 0px; margin-top: 8px; min-height: 56px; padding: 4px 20px 4px 4px; text-align: left; border-color: rgba(255,95,208,.45);
  animation: hub-in-m .55s cubic-bezier(.2,.9,.2,1) .28s both; }
#scr-menu .hub-btn.mega-hub { grid-template-columns: 48px 1fr; }
#scr-menu .hub-btn.mega-hub .mi-ico { width: 48px; height: 48px; }
#scr-menu .hub-btn.mega-hub small { font-size: 12px; }
#scr-menu .hub-cta + .hub-stats { margin-top: 8px; line-height: 1.35; }
#scr-menu .hub-stats .hs-dot { display: none; }
/* Laptops (768 px tall): the stats on one line so they clear the credits line. */
@media (max-height: 800px) and (min-width: 821px) {
  #scr-menu .hub-stats .hs-br { display: none; }
  #scr-menu .hub-stats .hs-dot { display: inline; }
}
#scr-menu .hub-btn.mega-hub:hover, #scr-menu .hub-btn.mega-hub:focus-visible { translate: 0 -2px; border-color: #ff8ae6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px #000, 0 0 28px rgba(255,95,208,.3), 0 14px 34px rgba(0,0,0,.85); }
#scr-menu .hub-btn.mega-hub .mi-ico { box-shadow: inset 0 0 0 1px rgba(255,138,230,.45), inset 0 -6px 12px rgba(0,0,0,.8), 0 0 0 4px #000; }
#scr-menu .hub-btn.mega-hub:hover .mi-ico, #scr-menu .hub-btn.mega-hub:focus-visible .mi-ico {
  box-shadow: inset 0 0 0 1.5px #ff8ae6, inset 0 -6px 12px rgba(0,0,0,.8), 0 0 0 4px #000, 0 0 18px rgba(255,95,208,.55); }
#scr-menu .hub-btn.mega-hub.owned .mi-ico { box-shadow: inset 0 0 0 1.5px #ff8ae6, inset 0 -6px 12px rgba(0,0,0,.8), 0 0 0 4px #000, 0 0 14px rgba(255,95,208,.5); }
@keyframes hub-in-m { from { opacity: 0; transform: translateY(18px); } }

/* Narrow screen (portrait mobile): the center on top and both sides below, mirrored. */
@media (max-width: 820px) and (min-height: 521px) {
  #scr-menu .hub { grid-template-columns: 1fr 1fr; grid-template-areas: "core core" "l r"; row-gap: 18px; column-gap: 10px; align-content: center;
    padding-top: max(64px, calc(env(safe-area-inset-top) + 54px)); }
  #scr-menu .hub-core { grid-area: core; }
  #scr-menu .hub-l { grid-area: l; } #scr-menu .hub-r { grid-area: r; }
  #scr-menu .hub-side { gap: 10px; }
  #scr-menu .hub-btn { width: 100%; min-height: 54px; font-size: 16px; column-gap: 8px; grid-template-columns: 44px 1fr; padding: 5px 12px 5px 5px; --in: 0px; }
  #scr-menu .hub-l .hub-btn { grid-template-columns: 1fr 44px; padding: 5px 5px 5px 12px; }
  #scr-menu .hub-r .hub-btn { --in: 0px; }
  #scr-menu .hub-btn .mi-ico { width: 44px; height: 44px; }
  #scr-menu .hub-btn .mi-ico img { width: 24px; height: 24px; }
  #scr-menu .hub-btn small { font-size: 10.5px; }
  #scr-menu .hub-l .hub-btn:is(:first-child, :last-child) { --ax: 10px; }
  #scr-menu .hub-r .hub-btn:is(:first-child, :last-child) { --ax: -10px; }
  #scr-menu #menu-partner { height: min(26vh, 190px); }
  #scr-menu .hub-ring { top: min(13vh, 95px); }
  #scr-menu .hub-ring i:nth-child(1) { width: min(32vh, 250px); height: min(32vh, 250px); }
  #scr-menu .hub-ring i:nth-child(2) { width: min(27vh, 210px); height: min(27vh, 210px); }
  #scr-menu .hub-ring i:nth-child(3) { width: min(29.5vh, 230px); height: min(29.5vh, 230px); }
  #scr-menu .menu-item.play { font-size: 24px; margin-top: 10px; }
  #scr-menu .hub-btn.mega-hub { width: min(300px, 70vw); margin-top: 8px; }
}
/* Short height (landscape mobile): everything more compact and no subtitles. */
@media (max-height: 520px) {
  #scr-menu .hub { padding-top: max(50px, calc(env(safe-area-inset-top) + 44px)); padding-bottom: 8px; column-gap: 14px; }
  #scr-menu .hub-logo, #scr-menu .hub-stats { display: none; }
  #scr-menu .hub-side { gap: 8px; }
  #scr-menu .hub-btn { width: clamp(150px, 26vw, 230px); min-height: 46px; font-size: 15px; grid-template-columns: 38px 1fr; padding: 4px 14px 4px 4px; }
  #scr-menu .hub-l .hub-btn { grid-template-columns: 1fr 38px; padding: 4px 4px 4px 14px; }
  #scr-menu .hub-btn small { display: none; }
  #scr-menu .hub-btn .mi-ico { width: 38px; height: 38px; grid-row: auto; }
  #scr-menu .hub-btn .mi-ico img { width: 22px; height: 22px; }
  #scr-menu .hub-l .hub-btn:is(:first-child, :last-child) { --ax: 22px; }
  #scr-menu .hub-r .hub-btn:is(:first-child, :last-child) { --ax: -22px; }
  #scr-menu #menu-partner { height: min(40vh, 150px); }
  #scr-menu .hub-ring { top: min(20vh, 75px); }
  #scr-menu .hub-ring i:nth-child(1) { width: 46vh; height: 46vh; }
  #scr-menu .hub-ring i:nth-child(2) { width: 39vh; height: 39vh; }
  #scr-menu .hub-ring i:nth-child(3) { width: 42.5vh; height: 42.5vh; }
  #scr-menu .partner-card .nm { font-size: 20px; }
  #scr-menu .menu-item.play { font-size: 20px; padding: 6px 16px; margin-top: 6px; width: min(260px, 40vw); grid-template-columns: 30px 1fr; }
  /* Mega next to Play, icon only (the label is the aria-label). */
  #scr-menu .hub-cta { flex-direction: row; gap: 8px; margin-top: 6px; }
  #scr-menu .hub-cta .menu-item.play { margin-top: 0; width: min(230px, 36vw); }
  #scr-menu .hub-btn.mega-hub { margin-top: 0; width: 48px; min-height: 48px; padding: 0; grid-template-columns: 1fr; font-size: 0; }
  #scr-menu .hub-btn.mega-hub .mi-ico { width: 46px; height: 46px; grid-row: auto; box-shadow: inset 0 0 0 1px rgba(255,138,230,.45), inset 0 -6px 12px rgba(0,0,0,.8); }
  #scr-menu .hub-btn.mega-hub .mi-ico img { width: 26px; height: 26px; }
}
.topbar .btn.small.ghost { background: rgba(0,0,0,.9); border-color: rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 12px rgba(0,0,0,.6); }
.topbar .btn.small.ghost:hover { background: #0c0c0f; border-color: rgba(255,224,138,.5); }
.logo .t2 { color: #ff6a3d; text-shadow: 0 0 10px rgba(255,80,40,.55), 0 2px 0 #000; }
.logo .t2::before { background: linear-gradient(90deg, transparent, #ff6a3d); }
.logo .t2::after { background: linear-gradient(90deg, #ff6a3d, transparent); }
/* Narrow phones: tickets are shown in the gacha, so the bar does not overflow. */
@media (max-width: 440px) { #tickets-pill { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  #scr-menu .hub-btn, #scr-menu .hub-ring i, #scr-menu .menu-item.play { animation: none !important; transition: none !important; }
}

/* =====================================================================
 * Epic loading screen (17-10-2026): OLED black, gold logo with a glint,
 * the Judgment wheel spinning behind it and an ember bar.
 * ===================================================================== */
.boot { background: radial-gradient(ellipse 60% 50% at 50% 46%, rgba(255,170,40,.10), transparent 70%), #000; overflow: hidden; }
.boot:not(.noscript)::before, .boot:not(.noscript)::after {
  content: ''; position: absolute; left: 50%; top: 46%; border-radius: 50%; pointer-events: none;
  translate: -50% -50%;
}
.boot:not(.noscript)::before { width: min(78vmin, 560px); aspect-ratio: 1; border: 1.5px dashed rgba(255,214,120,.26);
  box-shadow: 0 0 40px rgba(255,190,60,.08), inset 0 0 40px rgba(255,190,60,.06); animation: hub-spin 50s linear infinite; }
.boot:not(.noscript)::after { width: min(64vmin, 460px); aspect-ratio: 1;
  background: conic-gradient(from 0deg, transparent 0 72%, rgba(255,214,120,.8) 97%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 2px), #000 calc(50% - 1.5px), #000 50%, transparent calc(50% + .5px));
          mask: radial-gradient(circle, transparent calc(50% - 2px), #000 calc(50% - 1.5px), #000 50%, transparent calc(50% + .5px));
  animation: hub-spin 2.4s linear infinite; }
.boot .boot-in { position: relative; z-index: 1; }
.boot .boot-in h1 { font-size: clamp(56px, 12vw, 116px); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .boot .boot-in h1 {
    background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.95) 50%, transparent 58%) no-repeat,
                linear-gradient(180deg, #fffbe6 0%, #ffe48a 30%, #ffc12e 55%, #e07a0c 78%, #ffd56a 100%);
    background-size: 300% 100%, 100% 100%; background-position: 160% 0, 0 0;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 2px 0 #7a3a00) drop-shadow(0 4px 0 #2a0d05) drop-shadow(0 0 22px rgba(255,170,40,.45));
    animation: title-shine 3.2s ease-in-out .6s infinite;
  }
}
.boot .boot-sub { color: #ff6a3d; letter-spacing: 12px; text-shadow: 0 0 12px rgba(255,80,40,.75), 0 2px 0 #000; }
.boot .boot-sub::before { background: linear-gradient(90deg, transparent, #ff6a3d); }
.boot .boot-sub::after { background: linear-gradient(90deg, #ff6a3d, transparent); }
.boot .boot-in p { color: #cfc8d8; }
.boot .boot-bar { height: 4px; background: rgba(255,255,255,.06); border: 0; box-shadow: none; width: min(300px, 70vw); margin-top: 28px; }
.boot .boot-bar i { background: linear-gradient(90deg, transparent, #ff6a3d, #ffd56a, transparent); box-shadow: 0 0 14px rgba(255,170,40,.7); }
.boot .boot-ld { color: #ffe7a8 !important; letter-spacing: 2px; text-transform: uppercase; font-size: 12px !important; }

/* =====================================================================
 * Epic gacha: black portal with a gold frame, spinning rays,
 * big pull buttons and the reveal of the rarity's color.
 * ===================================================================== */
#scr-gacha .box > .row.between h2 { font-size: 30px; }
#scr-gacha .banner {
  border: 1.5px solid rgba(255,214,120,.55);
  background:
    radial-gradient(ellipse 55% 60% at 50% 100%, rgba(255,190,60,.22), transparent 70%),
    radial-gradient(circle at 85% 15%, rgba(196,123,255,.28), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(80,120,255,.18), transparent 50%),
    #000;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 60px rgba(255,190,60,.12), 0 0 30px rgba(255,190,60,.15), 0 16px 40px rgba(0,0,0,.9);
}
#scr-gacha .banner::before {
  background: repeating-conic-gradient(from 0deg, rgba(255,220,140,.10) 0 5deg, transparent 5deg 15deg);
  animation: spin 50s linear infinite;
}
#scr-gacha .banner h3 { font-size: 32px; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  #scr-gacha .banner h3 {
    background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.95) 50%, transparent 58%) no-repeat,
                linear-gradient(180deg, #fffbe6, #ffd56a 50%, #f08f12);
    background-size: 300% 100%, 100% 100%; background-position: 160% 0, 0 0;
    -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
    filter: drop-shadow(0 2px 0 #3a1a00) drop-shadow(0 0 14px rgba(255,190,60,.4));
    animation: title-shine 5s ease-in-out 1s infinite;
  }
}
#scr-gacha #pull-1, #scr-gacha #pull-10, #scr-gacha #pull-10b, #scr-gacha #pull-100b { min-height: 54px; border-radius: 999px; font-size: 18px; }
#scr-gacha #pull-1 { background: #000; border: 1.5px solid rgba(255,214,120,.55); box-shadow: 0 0 18px rgba(255,190,60,.12), 0 3px 0 #000; }
#scr-gacha #pull-1:hover:not(:disabled) { border-color: #ffe08a; box-shadow: 0 0 26px rgba(255,190,60,.3), 0 3px 0 #000; }
#scr-gacha #pull-10:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 0 #9a5d06, 0 0 28px rgba(255,190,60,.4); animation: play-glow 2.4s ease-in-out infinite; }
#scr-gacha #pull-10b, #scr-gacha #pull-100b { background: linear-gradient(180deg, #e6c2ff, #b06bff 50%, #7a2fe0); border-color: #f3e1ff; color: #fff; text-shadow: 0 1px 0 #3a0a6a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 3px 0 #4a148c, 0 0 28px rgba(176,107,255,.45); }
#scr-gacha #pull-1:disabled, #scr-gacha #pull-10:disabled, #scr-gacha #pull-10b:disabled, #scr-gacha #pull-100b:disabled {
  background: #050506; border: 1px solid rgba(255,255,255,.12); color: var(--faint); text-shadow: none; box-shadow: none; filter: none; opacity: 1; animation: none; }
#scr-gacha .rates { background: #000; border: 1px solid rgba(255,255,255,.12); }
#scr-gacha .rates div { border-bottom-color: rgba(255,255,255,.07); }

/* Pull: black background, rays and a glow in the best rarity's color (--best, gacha-ui.js). */
#pull-fx {
  --best: #9fb1c9;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--best) 30%, transparent), transparent 45%),
    #000;
}
#pull-fx > .pull-rays { background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--best) 22%, transparent) 0 5deg, transparent 5deg 15deg); }
#pull-fx > .pull-flash { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; }
#pull-fx.flash > .pull-flash {
  background: radial-gradient(circle, #fff, color-mix(in srgb, var(--best) 70%, #fff) 40%, transparent 75%);
  animation: pull-flash .8s ease-out forwards; }
@keyframes pull-flash { from { opacity: 1; } to { opacity: 0; } }
#pull-fx.legend { animation: pull-shake .5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes pull-shake { 10%, 90% { translate: -2px 0; } 20%, 80% { translate: 4px 1px; } 30%, 50%, 70% { translate: -7px -1px; } 40%, 60% { translate: 7px 1px; } }
#pull-fx .pcard { background:
    linear-gradient(165deg, rgba(255,255,255,.1), transparent 32%),
    repeating-linear-gradient(115deg, transparent 0 6px, rgba(255,255,255,.035) 6px 7px),
    radial-gradient(ellipse 75% 50% at 50% 60%, color-mix(in srgb, var(--rc, #fff) 34%, transparent), transparent 70%),
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--t1, #8a93a8) 55%, transparent), transparent 48%),
    radial-gradient(circle at 88% 96%, color-mix(in srgb, var(--t2, #8a93a8) 50%, transparent), transparent 48%),
    #000; }

/* =====================================================================
 * Epic leaderboard: gold, silver and bronze podium with glints, black
 * rows sliding in one after another and your own row in gold.
 * ===================================================================== */
#scr-rank .box > .row.between h2 { font-size: 30px; }
#scr-rank .rk-row { flex-shrink: 0; background: #050506; border: 1px solid rgba(255,255,255,.09);
  animation: rk-in .4s cubic-bezier(.2,.9,.2,1) both; }
#scr-rank .rk-row:nth-child(2) { animation-delay: .04s; } #scr-rank .rk-row:nth-child(3) { animation-delay: .08s; }
#scr-rank .rk-row:nth-child(4) { animation-delay: .12s; } #scr-rank .rk-row:nth-child(5) { animation-delay: .15s; }
#scr-rank .rk-row:nth-child(n+6) { animation-delay: .18s; }
@keyframes rk-in { from { opacity: 0; transform: translateY(10px); } }
#scr-rank .rk-row.top1, #scr-rank .rk-row.top2, #scr-rank .rk-row.top3 {
  position: relative; overflow: hidden; padding-top: 12px; padding-bottom: 12px; border-width: 1.5px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pod) 22%, #000), #000 70%);
  box-shadow: inset 4px 0 0 var(--pod), 0 0 22px color-mix(in srgb, var(--pod) 25%, transparent);
}
#scr-rank .rk-row.top1 { padding-top: 16px; padding-bottom: 16px; box-shadow: inset 5px 0 0 var(--pod), 0 0 34px rgba(255,200,60,.35); }
#scr-rank .rk-row.top1 .time { font-size: 30px; }
#scr-rank .rk-row.top1 .who b { font-size: 19px; color: #fff3c4; }
#scr-rank .rk-row.top1 .pos { font-size: 28px; }
#scr-rank .rk-row.top1 .pos img { animation: crown 1.8s ease-in-out infinite; }
@keyframes crown { 50% { transform: translateY(-2px) scale(1.12); filter: drop-shadow(0 0 6px rgba(255,210,74,.9)); } }
#scr-rank .rk-row.top1::after, #scr-rank .rk-row.top2::after, #scr-rank .rk-row.top3::after {
  content: ''; position: absolute; top: -30%; bottom: -30%; width: 30%; left: -40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.16), transparent);
  animation: sheen 3.4s ease-in-out 1s infinite;
}
#scr-rank .rk-row.top2::after { animation-delay: 1.4s; } #scr-rank .rk-row.top3::after { animation-delay: 1.8s; }
/* Trophies: silver and bronze (the icon is gold). */
#scr-rank .rk-row.top2 .pos img { filter: grayscale(1) brightness(1.45) contrast(1.05) drop-shadow(0 0 4px rgba(220,230,255,.5)); }
#scr-rank .rk-row.top3 .pos img { filter: sepia(1) saturate(2.4) hue-rotate(-28deg) brightness(.78) contrast(1.1) drop-shadow(0 0 4px rgba(227,140,90,.55)); }
#scr-rank .rk-row.mine { border-color: #ffe08a; background: linear-gradient(90deg, rgba(255,210,74,.16), #000 70%); box-shadow: 0 0 18px rgba(255,200,60,.2); }
#scr-rank .rk-me { background: #000; border-color: rgba(255,214,120,.35); }
@media (prefers-reduced-motion: reduce) {
  .boot::before, .boot::after, .boot .boot-in h1, #scr-gacha .banner::before, #scr-gacha .banner h3,
  #scr-gacha #pull-10, #pull-fx.legend, #pull-fx.flash > .pull-flash, #scr-rank .rk-row, #scr-rank .rk-row::after, #scr-rank .rk-row.top1 .pos img { animation: none !important; }
}

/* Profile: below the top bar, fully fitting and with the name visible
   (a negative margin-top used to push it under the fixed header with "Cerrar"). */
#scr-profile.scr { padding-top: max(66px, calc(env(safe-area-inset-top) + 58px)); }
.profile-box { max-height: calc(100dvh / var(--uiz, 1) - 86px); }
.profile-box .prof-head { margin-top: 2px; }
.profile-box > .row.end:first-child { top: -22px; margin: -22px -24px 6px; padding: 12px 24px 10px; border-radius: var(--rad-l) var(--rad-l) 0 0; }
@media (max-height: 520px) { .profile-box > .row.end:first-child { top: -10px; margin: -10px -14px 4px; padding: 8px 14px 6px; } }
.box.legal > .row.between:first-child, .profile-box > .row.end:first-child { background: #000; }
@media (max-height: 520px) {
  #scr-profile.scr { padding-top: max(48px, calc(env(safe-area-inset-top) + 42px)); }
  .profile-box { max-height: calc(100dvh - 56px); }
}

/* =====================================================================
 * Gacha banner as a poster (17-10-2026): black background with the
 * region's light, huge watermark name, giant legendary silhouette
 * glowing in the accent color, rising sparks and a sweeping glint.
 * --c1/--c2/--c3 region colors, --acc accent (gacha-ui.js).
 * ===================================================================== */
#scr-gacha .banner {
  --acc: #ffd24a; --c1: #3a1d6e; --c2: #1b2f78; --c3: #0f4d6e;
  min-height: 330px; padding: 20px 22px;
  border: 1.5px solid color-mix(in srgb, var(--acc) 60%, transparent);
  background:
    radial-gradient(ellipse 55% 70% at 50% 92%, color-mix(in srgb, var(--acc) 34%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 90% at 50% 100%, color-mix(in srgb, var(--c2) 85%, transparent), transparent 75%),
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--c3) 70%, transparent), transparent 45%),
    radial-gradient(circle at 6% 6%, color-mix(in srgb, var(--c1) 70%, transparent), transparent 45%),
    #000 !important;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 80px color-mix(in srgb, var(--acc) 14%, transparent),
              0 0 34px color-mix(in srgb, var(--acc) 22%, transparent), 0 18px 44px rgba(0,0,0,.9);
}
/* Region name as a watermark, behind everything. */
#scr-gacha .banner { --mark: ''; }
#scr-gacha .banner .bn-mark { display: none; }
#scr-gacha .banner::before {
  content: attr(data-mark); position: absolute; z-index: -1; left: 0; right: 0; bottom: 34%; top: auto; width: auto; aspect-ratio: auto;
  transform: none; text-align: center; white-space: nowrap; overflow: hidden;
  -webkit-mask: linear-gradient(180deg, #000 30%, transparent 95%); mask: linear-gradient(180deg, #000 30%, transparent 95%);
  font: 700 clamp(90px, 13vw, 168px)/1 var(--font); letter-spacing: 10px;
  color: color-mix(in srgb, var(--acc) 13%, transparent);
  background: none; animation: none; pointer-events: none;
}
/* Rising sparks (two layers at different speeds) + diagonal glint. */
#scr-gacha .banner::after {
  content: ''; position: absolute; inset: 0; z-index: 0; height: auto; pointer-events: none;
  background-image:
    radial-gradient(circle, color-mix(in srgb, var(--acc) 90%, #fff) 0 1.4px, transparent 2px),
    radial-gradient(circle, rgba(255,255,255,.85) 0 1px, transparent 1.6px),
    radial-gradient(circle, color-mix(in srgb, var(--acc) 70%, transparent) 0 1px, transparent 1.8px);
  background-size: 120px 140px, 90px 110px, 160px 170px;
  background-position: 10px 0, 50px 30px, 80px 60px;
  -webkit-mask: linear-gradient(0deg, #000 40%, transparent 95%); mask: linear-gradient(0deg, #000 40%, transparent 95%);
  animation: bn-sparks 9s linear infinite; opacity: .75;
}
@keyframes bn-sparks { to { background-position: 10px -140px, 50px -190px, 80px -110px; } }
#scr-gacha .banner > h3, #scr-gacha .banner > p { position: relative; z-index: 2; }
/* (23-10-2026) Centred and symmetric: title, text and figures on the banner's axis. */
#scr-gacha .banner { text-align: center; }
#scr-gacha .banner h3 { font-size: clamp(30px, 3.4vw, 40px); letter-spacing: 1px; margin-left: auto; margin-right: auto; }
#scr-gacha .banner #banner-desc { color: #fff; text-shadow: 0 2px 6px #000; max-width: 78%; margin-left: auto; margin-right: auto; }
#scr-gacha .banner #gacha-owned { margin-left: auto; margin-right: auto; }
#scr-gacha .banner .sub { color: color-mix(in srgb, var(--acc) 55%, #fff); text-shadow: 0 2px 6px #000; }

/* Legendaries' stage: the main one big in the center, the others behind. */
#scr-gacha .banner .feat { position: relative; z-index: 1; height: 230px; margin: 0 -22px -20px; gap: 22px; align-items: flex-end; justify-content: center; overflow: visible; }
/* (23-10-2026) The giant figure behind the main one is a soft coloured aura in its shape, not a black cut-out. */
#scr-gacha .banner .bn-ghost {
  position: absolute; left: 50%; bottom: -30px; translate: -50% 0; width: 420px; height: 360px; z-index: 0; pointer-events: none;
  filter: blur(16px) saturate(1.8) brightness(1.5); mix-blend-mode: screen;
  opacity: .42; animation: bn-breathe 5s ease-in-out infinite;
}
@keyframes bn-breathe { 50% { opacity: .62; translate: -50% -8px; } }
/* A glowing ring spinning under the main one's feet. */
#scr-gacha .banner .bn-mon.main::after {
  /* a square ring, spun and then flattened (scaleY after rotate), so it stays an ellipse on the floor */
  content: ''; position: absolute; left: 50%; bottom: -70px; margin-left: -85px; width: 170px; height: 170px; z-index: -1; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 20%, color-mix(in srgb, var(--acc) 90%, #fff) 30%, transparent 42%, transparent 60%, color-mix(in srgb, var(--acc) 75%, #fff) 72%, transparent 84%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 64%, #000 72%, transparent 76%); mask: radial-gradient(circle, transparent 60%, #000 64%, #000 72%, transparent 76%);
  transform: scaleY(.26) rotate(0deg); animation: bn-ring 6s linear infinite; opacity: .9; filter: drop-shadow(0 0 4px var(--acc));
}
@keyframes bn-ring { to { transform: scaleY(.26) rotate(360deg); } }
#scr-gacha .banner .bn-mon { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; }
#scr-gacha .banner .bn-mon::before {
  content: ''; position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: 70%; height: 60%; z-index: -1; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--acc) 45%, transparent), transparent 70%);
  filter: blur(6px);
}
#scr-gacha .banner .bn-mon:not(.main) { margin: 0 0 10px; filter: brightness(.82) saturate(.9); }
#scr-gacha .banner .bn-mon.main.shiny { filter: drop-shadow(0 0 14px rgba(154,230,255,.6)); }
#scr-gacha .banner .bn-mon.main.shiny::after { background: conic-gradient(from 0deg, transparent 0 20%, #cfefff 30%, transparent 42%, transparent 60%, #9ae6ff 72%, transparent 84%); filter: drop-shadow(0 0 4px #9ae6ff); }
#scr-gacha .banner .bn-mon.main { z-index: 2; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--acc) 55%, transparent)); }
#scr-gacha .banner .bn-mon.main::before { width: 90%; background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--acc) 65%, transparent), transparent 70%); }

/* Light glint sweeping across the poster every few seconds. */
#scr-gacha .banner .feat::after {
  content: ''; position: absolute; top: -260px; bottom: -40px; left: -40%; width: 30%; z-index: 3; pointer-events: none;
  width: 16%; transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent);
  animation: bn-sweep 7s ease-in-out 1s infinite;
}
@keyframes bn-sweep { 0% { left: -40%; } 40%, 100% { left: 130%; } }

@media (max-width: 760px), (max-height: 520px) {
  #scr-gacha .banner { min-height: 0; }
  #scr-gacha .banner #banner-desc { max-width: none; }
  #scr-gacha .banner .feat { height: 170px; }
  #scr-gacha .banner .bn-ghost { width: 300px; height: 260px; }
  #scr-gacha .banner .bn-mon.main canvas { width: 150px; height: auto; }
  #scr-gacha .banner .bn-mon:not(.main) canvas { width: 110px; height: auto; }
}
/* (23-10-2026) Landscape phones: one line for the title and the owned line (the Mega banner wrapped and got cut),
   the figures at the right, no giant aura, a small ring. (After the rules above, which used to override these.) */
@media (max-height: 520px) and (orientation: landscape) {
  #scr-gacha .banner { padding: 6px 10px 4px; text-align: center; }
  #scr-gacha .banner h3 { font-size: 15px !important; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: none !important; letter-spacing: 0; position: relative; z-index: 3; }
  #scr-gacha .banner #gacha-owned { font-size: 12px; max-width: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 3; margin: 0 auto; }
  #scr-gacha .banner .feat { height: 70px; margin: 2px 0 -4px; gap: 14px; justify-content: center; padding: 0; }
  #scr-gacha .banner .feat canvas { max-height: 100%; width: auto; }
  #scr-gacha .banner .bn-ghost { display: none; }
  #scr-gacha .banner .bn-mon:not(.main) { margin: 0 0 2px; }
  #scr-gacha .banner .bn-mon.main::after { width: 70px; height: 70px; margin-left: -35px; bottom: -30px; opacity: .7; }
}
/* Low phones (390 px): tighter text so the figures keep their size under it. */
@media (max-height: 420px) and (orientation: landscape) {
  #scr-gacha #banner { padding: 4px 10px 2px !important; }
  #scr-gacha .banner h3 { font-size: 13px !important; line-height: 1.15; }
  #scr-gacha .banner #gacha-owned { font-size: 11px; line-height: 1.15; margin-top: 1px; }
  #scr-gacha .banner .feat { gap: 10px; }
  #scr-gacha .banner .bn-mon.main::after { width: 60px; height: 60px; margin-left: -30px; bottom: -26px; }
  /* smaller pull buttons: the room goes to the banner, and the figures may use the canvas' bottom margin */
  #scr-gacha #pull-1, #scr-gacha #pull-10, #scr-gacha #pull-10b, #scr-gacha #pull-100b { min-height: 42px; font-size: 15px; }
  #scr-gacha .split .row { margin-top: 5px !important; }
  #scr-gacha .banner .bn-mon { overflow: visible; }
  #scr-gacha .banner .bn-mon canvas { max-height: 116%; margin-bottom: -6px; }
  /* the banner column fills the split's height (it stopped short, leaving the room unused) */
  #scr-gacha .split { align-items: stretch; align-content: stretch; grid-template-rows: minmax(0, 1fr) auto; }
  #scr-gacha .split > div:first-child { align-self: stretch; height: auto; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #scr-gacha .banner::after, #scr-gacha .banner .bn-ghost, #scr-gacha .banner .feat::after { animation: none !important; }
}

/* Gacha summon (js/ui/summon-fx.js) and cards flipping one by one. */
#pull-fx { overflow-x: hidden; }
#pull-fx > .summon-cv { position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; z-index: 4; cursor: pointer; }

/* =====================================================================
 * Gacha: face-down cards that flip one at a time (gacha-ui.js).
 *   .down  black back with the gold Poké Ball · .tease  the rare one shakes
 *   and glows in its color before flipping · .up  flips
 * ===================================================================== */
#pull-fx .pcard, #pull-fx .pcard.r5, #pull-fx .pcard.shiny { animation: none; }   /* (the dealing is done by deal() in gacha-ui.js) */
@keyframes deal { from { opacity: 0; transform: translateY(40px) scale(.85) rotate(-4deg); } }
#pull-fx .pcard .pback {
  position: absolute; inset: 0; z-index: 5; border-radius: 12px; pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, transparent 0 17px, #ffd24a 17.5px 20px, transparent 20.5px),
    linear-gradient(#ffd24a, #ffd24a) 50% 46% / 46px 3px no-repeat,
    radial-gradient(circle at 50% 46%, #ffd24a 0 6px, #000 6.5px 9px, transparent 9.5px),
    repeating-linear-gradient(45deg, rgba(255,214,120,.05) 0 6px, transparent 6px 12px),
    radial-gradient(ellipse at 50% 46%, #1a1408, #000 70%);
  box-shadow: inset 0 0 0 1.5px rgba(255,214,120,.55), inset 0 0 0 6px #000, inset 0 0 0 7px rgba(255,214,120,.25);
  transition: opacity .18s .2s;
}
#pull-fx .pcard.down { border-color: rgba(255,214,120,.5); box-shadow: 0 0 0 1px #000, 0 10px 24px rgba(0,0,0,.8); }
#pull-fx .pcard.down::after { display: none; }
#pull-fx .pcard.tease { animation: tease .65s ease-in-out both; box-shadow: 0 0 0 1px #000, 0 0 30px var(--rc), 0 0 60px var(--rc); }
@keyframes tease { 0%, 100% { transform: none; } 20% { transform: rotate(-3deg) scale(1.04); } 40% { transform: rotate(3deg) scale(1.06); } 60% { transform: rotate(-3deg) scale(1.08); } 80% { transform: rotate(2deg) scale(1.1); } }
#pull-fx .pcard.up { animation: none; }
#pull-fx .pcard.up .pback { opacity: 0; transition: none; }
#pull-fx .pcard.r4.up, #pull-fx .pcard.r5.up, #pull-fx .pcard.shiny.up { animation: legend 1.3s ease-in-out .7s infinite alternate; }
@keyframes card-flip {
  0% { transform: perspective(700px) rotateY(180deg) scale(1.05); filter: brightness(2.6); }
  50% { transform: perspective(700px) rotateY(90deg) scale(1.15); filter: brightness(3); }
  100% { transform: none; filter: none; }
}

/* =====================================================================
 * Epic level-up cards: black with the move's color, icon medallion,
 * sweeping glint, fan-out entrance and gold title.
 * ===================================================================== */
/* (22-10-2026) Translucent: the paused run shows through the dim layer, the box and the cards. */
#scr-levelup.scr.dim { background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.22), rgba(0,0,0,.6) 80%); }
#scr-levelup .box { width: min(720px, 96vw);
  border-color: rgba(255,214,120,.35); }
#scr-levelup .cards { width: 100%; }
#scr-levelup .box {
  border-color: rgba(255,214,120,.35); background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 120px), rgba(0,0,0,.5);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 0 1px rgba(0,0,0,.6), 0 0 50px rgba(255,190,60,.12), var(--elev2); }
/* The move preview (ui/move-preview.js) at the right of the text. */
#scr-levelup .card .mv-prev { flex: 0 0 200px; width: 200px; height: 112px; border-radius: 10px; image-rendering: pixelated; background: #0d1a12;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 45%, transparent), 0 0 0 1px #000, 0 0 14px color-mix(in srgb, var(--cc) 25%, transparent); }
@media (max-width: 640px) { #scr-levelup .card .mv-prev { flex-basis: 128px; width: 128px; height: 72px; } }
@media (max-width: 400px) { #scr-levelup .card .mv-prev { display: none; } }

#scr-levelup h2 { font-size: 40px; letter-spacing: 1px; animation: lv-pop .5s cubic-bezier(.2,1.5,.4,1) both; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  #scr-levelup h2 {
    background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.95) 50%, transparent 58%) no-repeat,
                linear-gradient(180deg, #fffbe6, #ffd56a 50%, #f08f12);
    background-size: 300% 100%, 100% 100%; background-position: 160% 0, 0 0;
    -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
    filter: drop-shadow(0 2px 0 #3a1a00) drop-shadow(0 0 16px rgba(255,190,60,.45));
    animation: lv-pop .5s cubic-bezier(.2,1.5,.4,1) both, title-shine 3s ease-in-out .5s infinite;
  }
}
@keyframes lv-pop { from { opacity: 0; transform: scale(1.8); filter: blur(4px); } }
#scr-levelup .card {
  background: radial-gradient(120% 160% at 0% 50%, color-mix(in srgb, var(--cc) 22%, transparent), transparent 55%), rgba(0,0,0,.62);
  border: 1.5px solid color-mix(in srgb, var(--cc) 55%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 0 0 1px #000, 0 0 18px color-mix(in srgb, var(--cc) 18%, transparent), 0 10px 26px rgba(0,0,0,.8);
  padding: 14px 16px; border-radius: 16px;
  animation: lv-card .5s cubic-bezier(.2,1.2,.3,1) both;
  transition: transform .18s cubic-bezier(.2,1.4,.4,1), box-shadow .2s, border-color .2s;
}
#scr-levelup .cards .card:nth-child(1) { animation-delay: .12s; }
#scr-levelup .cards .card:nth-child(2) { animation-delay: .22s; }
#scr-levelup .cards .card:nth-child(3) { animation-delay: .32s; }
#scr-levelup .cards .card:nth-child(4) { animation-delay: .42s; }
@keyframes lv-card { from { opacity: 0; transform: perspective(800px) rotateX(-70deg) translateY(-20px); filter: brightness(2.5); } }
/* Glint sweeping across each card. */
#scr-levelup .card::before {
  content: ''; position: absolute; top: -40%; bottom: -40%; left: -30%; width: 22%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.13), transparent);
  animation: lv-sheen 3.6s ease-in-out 1s infinite;
}
#scr-levelup .cards .card:nth-child(2)::before { animation-delay: 1.3s; }
#scr-levelup .cards .card:nth-child(3)::before { animation-delay: 1.6s; }
@keyframes lv-sheen { 0% { left: -30%; } 40%, 100% { left: 130%; } }
#scr-levelup .card:hover, #scr-levelup .card:focus-visible {
  transform: translateY(-3px) scale(1.02); border-color: var(--cc);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px #000, 0 0 34px color-mix(in srgb, var(--cc) 45%, transparent), 0 14px 30px rgba(0,0,0,.85);
}
#scr-levelup .card:active { transform: scale(.98); }
#scr-levelup .card .ico {
  flex: 0 0 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--cc) 35%, #111), #000 72%) !important;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cc) 70%, transparent), inset 0 -6px 12px rgba(0,0,0,.8), 0 0 16px color-mix(in srgb, var(--cc) 35%, transparent);
}
#scr-levelup .card .nm { font-size: 20px; }
#scr-levelup .card .ds { color: #c9c9d3; }
#scr-levelup .card .key { border-color: color-mix(in srgb, var(--cc) 50%, transparent); color: #fff; background: #000; }
/* Evolution: pulsing gold. */
#scr-levelup .card.t-evo { --cc: #ffd24a; animation: lv-card .5s cubic-bezier(.2,1.2,.3,1) both, lv-evo 1.6s ease-in-out .6s infinite; }
@keyframes lv-evo { 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px #000, 0 0 40px rgba(255,200,60,.55), 0 10px 26px rgba(0,0,0,.8); } }
@media (prefers-reduced-motion: reduce) {
  #scr-levelup .card, #scr-levelup .card::before, #scr-levelup h2,
  #pull-fx .pcard, #pull-fx .pcard.tease, #pull-fx .pcard.up { animation: none !important; }
}

/* =====================================================================
 * Gacha cards background (17-10-2026): no spinning rays.
 * Black with a soft aurora in the best rarity's color drifting slowly,
 * rising blurred lights (bokeh) and a floor reflection under the cards.
 * ===================================================================== */
#pull-fx > .pull-rays { display: none !important; }
#pull-fx {
  background:
    radial-gradient(ellipse 60% 38% at 50% 108%, color-mix(in srgb, var(--best) 30%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 55% at 50% 42%, color-mix(in srgb, var(--best) 14%, transparent), transparent 70%),
    #000;
}
#pull-fx > .pull-aurora {
  position: fixed; inset: -20%; margin: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 38% 30% at 25% 30%, color-mix(in srgb, var(--best) 26%, transparent), transparent 70%),
    radial-gradient(ellipse 34% 28% at 75% 25%, color-mix(in srgb, var(--best) 18%, #6a3cff 8%), transparent 70%),
    radial-gradient(ellipse 45% 30% at 55% 75%, color-mix(in srgb, var(--best) 16%, transparent), transparent 70%);
  filter: blur(30px); opacity: .9;
  animation: aurora 16s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(4%, -3%) rotate(6deg) scale(1.08); }
  100% { transform: translate(-4%, 2%) rotate(-5deg) scale(1.02); }
}
/* Bokeh: blurred dots of light rising slowly (two layers, different speeds). */
#pull-fx > .pull-bokeh, #pull-fx > .pull-bokeh::after {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle, color-mix(in srgb, var(--best) 70%, #fff) 0 2px, transparent 3.5px),
    radial-gradient(circle, rgba(255,255,255,.7) 0 1.4px, transparent 2.6px),
    radial-gradient(circle, color-mix(in srgb, var(--best) 50%, transparent) 0 3.5px, transparent 7px);
  background-size: 190px 230px, 130px 170px, 310px 280px;
  background-position: 20px 0, 80px 40px, 150px 90px;
  -webkit-mask: linear-gradient(0deg, transparent, #000 25%, #000 70%, transparent);
          mask: linear-gradient(0deg, transparent, #000 25%, #000 70%, transparent);
  animation: bokeh 22s linear infinite; opacity: .55;
}
#pull-fx > .pull-bokeh::after { content: ''; inset: 0; background-size: 260px 300px, 170px 210px, 400px 360px; animation-duration: 34s; opacity: .7; filter: blur(1.5px); }
@keyframes bokeh { to { background-position: 20px -230px, 80px -300px, 150px -190px; } }
/* Floor reflection under the cards. */
#pull-fx .pull-results { position: relative; }
#pull-fx .pull-results::after {
  content: ''; position: absolute; left: 8%; right: 8%; bottom: -26px; height: 40px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--best) 40%, transparent), transparent 70%);
  filter: blur(8px);
}
@media (prefers-reduced-motion: reduce) { #pull-fx > .pull-aurora, #pull-fx > .pull-bokeh, #pull-fx > .pull-bokeh::after { animation: none !important; } }

/* Summon: «Salta» (skip) button (summon-fx.js). */
#pull-fx > .summon-skip { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 6; margin: 0; }
#pull-fx > .summon-cv { touch-action: none; -webkit-user-select: none; user-select: none; }

/* Card flip (gacha-ui.js, flip): flash in its color and a reflection. */
/* (19-10-2026) No permanent will-change / backface-visibility on the cards: on phones every card
   became its own GPU layer and the animated sprite canvas inside was sometimes composited ABOVE
   the card back -> flicker and the Pokémon visible before the flip. While a card is face down,
   its content is hidden for real (not just covered by the back). */
#pull-fx .pcard.down > :not(.pback) { visibility: hidden; }
body.touch #pull-fx .pcard.pick .pback { animation: none; }
#pull-fx .pcard .pburst {
  position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; translate: -50% -50%; z-index: 6; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9), color-mix(in srgb, var(--rc) 70%, transparent) 30%, transparent 62%);
  mix-blend-mode: screen; animation: pburst .6s ease-out forwards;
}
@keyframes pburst { from { opacity: 1; scale: .3; } to { opacity: 0; scale: 1.35; } }
#pull-fx .pcard .psheen {
  position: absolute; top: -30%; bottom: -30%; left: -50%; width: 38%; z-index: 6; pointer-events: none; transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  animation: psheen .7s ease-out .12s forwards;
}
@keyframes psheen { to { left: 130%; } }

/* Cards to flip by hand (gacha-ui.js). */
#pull-fx .pcard.pick { cursor: pointer; transition: transform .18s cubic-bezier(.2,1.4,.4,1), box-shadow .2s; }
#pull-fx .pcard.pick:hover { transform: translateY(-6px) scale(1.04); box-shadow: 0 0 0 1px #000, 0 0 26px rgba(255,210,90,.45), 0 14px 28px rgba(0,0,0,.85); }
#pull-fx .pcard.pick:active { transform: scale(.97); }
#pull-fx .pcard.pick .pback { animation: back-glow 2.2s ease-in-out infinite; }
@keyframes back-glow { 50% { box-shadow: inset 0 0 0 1.5px rgba(255,214,120,.95), inset 0 0 0 6px #000, inset 0 0 0 7px rgba(255,214,120,.45), inset 0 0 26px rgba(255,190,60,.25); } }
/* (02-11-2026, suggestion #0154) «Flip all» sticks to the bottom like «Continue», but as a ghost button it vanished over the
   ×100 grid of card backs (players scrolled looking for it): now a solid dark plate with a gold rim, above the cards; the
   ×100 keeps room under its last row so no card hides behind it. */
#pull-fx > .pull-all { flex-shrink: 0; min-width: 200px; position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 5; will-change: transform;   /* its own layer: the animated card backs were composited over it */
  background: linear-gradient(180deg, rgba(34,38,56,.97), rgba(14,16,28,.97)); border: 1px solid rgba(255,214,120,.75); color: #fff;
  box-shadow: 0 0 0 1px #000, 0 0 0 3px rgba(255,214,120,.18), 0 10px 28px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.14); }
#pull-fx > .pull-all:hover { background: linear-gradient(180deg, rgba(48,52,74,.98), rgba(20,22,36,.98)); border-color: #ffe58a; }
#pull-fx.many > .pull-all { margin-top: -4px; }
#pull-fx.many { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }

/* =====================================================================
 * Legendary card (gacha-ui.js, legendFx).
 * ===================================================================== */
/* Before flipping: shakes harder and harder and golden light leaks through the back. */
#pull-fx .pcard.tease5 { animation: tease5 1.05s ease-in both; box-shadow: 0 0 0 1px #000, 0 0 40px #ffcb3d, 0 0 90px rgba(255,180,40,.7); z-index: 3; }
#pull-fx .pcard.tease5 .pback { box-shadow: inset 0 0 0 2px #ffe08a, inset 0 0 0 6px #000, inset 0 0 40px rgba(255,190,60,.9); }
#pull-fx .pcard.tease5 .pback::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    linear-gradient(62deg, transparent 47%, #fff3c4 49%, #ffcb3d 50%, transparent 52%),
    linear-gradient(-48deg, transparent 47.5%, #fff3c4 49.5%, #ffcb3d 50%, transparent 51.5%),
    linear-gradient(8deg, transparent 48%, #ffcb3d 49.6%, transparent 51%);
  filter: drop-shadow(0 0 6px #ffcb3d); animation: crack-in 1.05s ease-in both;
}
@keyframes crack-in { 0%, 30% { opacity: 0; clip-path: circle(0 at 50% 46%); } 100% { opacity: 1; clip-path: circle(80% at 50% 46%); } }
@keyframes tease5 {
  0% { transform: none; }
  15% { transform: translateX(-2px) rotate(-1deg); } 25% { transform: translateX(2px) rotate(1deg); }
  40% { transform: translateX(-4px) rotate(-2deg) scale(1.03); } 50% { transform: translateX(4px) rotate(2deg) scale(1.04); }
  62% { transform: translateX(-6px) rotate(-3deg) scale(1.06); } 72% { transform: translateX(6px) rotate(3deg) scale(1.08); }
  82% { transform: translateX(-7px) rotate(-3deg) scale(1.1); } 90% { transform: translateX(7px) rotate(3deg) scale(1.12); }
  100% { transform: scale(1.12); }
}
/* After: spinning holographic frame, rainbow veil and golden halo. */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
#pull-fx .pcard.leg { z-index: 2; border-color: transparent; }
#pull-fx .pcard.leg::before {
  content: ''; position: absolute; inset: -2px; z-index: 4; border-radius: 15px; padding: 3px; pointer-events: none;
  background: conic-gradient(from var(--ang), #ffcb3d, #fff6d0, #ff9f1c, #ffe08a, #b06bff, #ffcb3d);
  -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: holo-spin 3s linear infinite;
}
@keyframes holo-spin { to { --ang: 360deg; } }
#pull-fx .pcard .pholo {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; mix-blend-mode: color-dodge; opacity: .35;
  background: linear-gradient(115deg, transparent 20%, rgba(255,90,200,.6) 35%, rgba(90,220,255,.6) 45%, rgba(255,240,120,.6) 55%, transparent 70%);
  background-size: 250% 250%; animation: holo-move 3.5s ease-in-out infinite alternate;
}
@keyframes holo-move { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
#pull-fx .pcard.leg b { color: #ffe08a; text-shadow: 0 0 10px rgba(255,190,60,.8), 0 2px 0 #000; }
#pull-fx .pcard.r5.leg { animation: leg-glow 1.6s ease-in-out infinite alternate; }
@keyframes leg-glow {
  from { box-shadow: 0 0 0 1px #000, 0 0 24px rgba(255,200,60,.55), 0 0 60px rgba(255,170,40,.25); }
  to { box-shadow: 0 0 0 1px #000, 0 0 40px rgba(255,210,80,.9), 0 0 100px rgba(255,170,40,.5); }
}
/* Burst on the card (fixed layer centered on the card). */
#pull-fx > .leg-burst { position: fixed; width: 0; height: 0; z-index: 7; pointer-events: none; margin: 0; }
#pull-fx > .leg-burst i {
  position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); border-radius: 50%;
  background: #fff3c4; box-shadow: 0 0 8px #ffcb3d, 0 0 16px #ff9f1c;
  animation: leg-spark var(--d) cubic-bezier(.15,.7,.3,1) forwards;
}
@keyframes leg-spark { from { transform: translate(-50%, -50%) scale(1.4); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.2); opacity: 0; } }
#pull-fx > .leg-burst .lw { position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; translate: -50% -50%;
  border: 4px solid #ffe08a; box-shadow: 0 0 20px #ffcb3d; animation: leg-wave .9s ease-out forwards; }
#pull-fx > .leg-burst .lw.l2 { animation-delay: .15s; border-color: #fff; opacity: 0; }
@keyframes leg-wave { from { scale: .3; opacity: 1; } to { scale: 14; opacity: 0; } }
#pull-fx > .leg-burst .lrays { position: absolute; left: 0; top: 0; width: 900px; height: 900px; translate: -50% -50%; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,214,120,.35) 0 4deg, transparent 4deg 14deg);
  -webkit-mask: radial-gradient(circle, #000 5%, transparent 55%); mask: radial-gradient(circle, #000 5%, transparent 55%);
  animation: leg-rays 1.5s ease-out forwards; }
@keyframes leg-rays { from { rotate: 0deg; scale: .4; opacity: 1; } to { rotate: 40deg; scale: 1.2; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #pull-fx .pcard.tease5, #pull-fx .pcard.leg::before, #pull-fx .pcard .pholo, #pull-fx .pcard.r5.leg { animation: none !important; } }

/* Legendaries' personal passive (menu.js, passiveBox). */
.pv-box { display: flex; flex-direction: column; gap: 3px; margin: 8px 0 4px; padding: 8px 10px; border-radius: 10px; text-align: left;
  background: linear-gradient(90deg, rgba(255,210,74,.12), rgba(255,210,74,.02)); border: 1px solid rgba(255,214,120,.45); box-shadow: 0 0 14px rgba(255,190,60,.12); }
.pv-box b { color: var(--gold); font-size: 14px; display: flex; align-items: center; gap: 5px; }
.pv-box span { font: 600 12.5px/1.35 var(--font-body); color: #e2e2ea; text-shadow: none; }
#menu-partner-info { flex-wrap: wrap; }
#menu-partner-info .pv-box { flex-basis: 100%; max-width: 320px; margin: 8px auto 0; }
/* (03-11-2026, help #0224 Kookaburrarat, iPhone 14) On short screens the legendary's passive box pushed Play below the screen
   (the hub column does not scroll): there it is a one-line chip with the passive's name next to the type chips; the full
   description stays in the Pokédex and the Upgrades. */
@media (max-height: 560px) {
  #menu-partner-info .pv-box { flex-basis: auto; max-width: none; margin: 0 0 0 4px; padding: 2px 8px; flex-direction: row; align-items: center; gap: 4px; box-shadow: none; }
  #menu-partner-info .pv-box b { font-size: 12px; white-space: nowrap; }
  #menu-partner-info .pv-box span { display: none; }
}
@media (max-height: 340px) { #menu-partner-info .pv-box { display: none; } }     /* (the smallest phones with the browser bar: Play first) */

/* =====================================================================
 * Upgrades (17-10-2026): big hero with a halo in its type color, black
 * cards with a medallion, glowing notched bar, affordable ones glowing
 * gold, maxed ones with a gold frame and a flash on purchase.
 * ===================================================================== */
#scr-upgrades .upg-head { gap: 18px; margin: 8px 0 16px; padding: 14px 16px; border-radius: 16px;
  background: radial-gradient(120% 140% at 0% 50%, rgba(255,255,255,.04), transparent 60%), #000; border: 1px solid rgba(255,255,255,.1); }
#scr-upgrades .upg-hero { position: relative; flex: 0 0 160px; height: 128px; display: grid; place-items: center; --tc: #ffd24a; }
#scr-upgrades .upg-hero .stage { width: 160px; height: 128px; flex: none; position: relative; z-index: 1; }
#scr-upgrades .upg-halo { position: absolute; inset: -10px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--tc) 40%, transparent), transparent 62%);
  animation: upg-halo 3s ease-in-out infinite; }
@keyframes upg-halo { 50% { transform: scale(1.08); opacity: .7; } }
#scr-upgrades .upg-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
#scr-upgrades .upg-title b { font-size: 26px; color: #fff; text-shadow: 0 2px 0 #000; }
#scr-upgrades .upg-title span { font: 700 13px var(--font-body); color: var(--gold); padding: 2px 10px; border-radius: 999px;
  border: 1px solid rgba(255,214,120,.45); background: rgba(255,210,74,.08); }
#scr-upgrades #upg-pv .pv-box { margin: 4px 0 8px; max-width: 520px; }
#scr-upgrades .upg { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
#scr-upgrades .upg-item {
  position: relative; overflow: hidden; grid-template-columns: 54px 1fr auto; gap: 12px; padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(90deg, rgba(255,210,74,calc(var(--p) * .10)), transparent 70%), #000;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 20px rgba(0,0,0,.6);
  transition: transform .15s cubic-bezier(.2,1.4,.4,1), border-color .2s, box-shadow .2s;
}
#scr-upgrades .upg-item:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.28); }
#scr-upgrades .upg-item .ic { width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #1c1c22, #000 72%);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.16), inset 0 -6px 12px rgba(0,0,0,.8); }
#scr-upgrades .upg-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
#scr-upgrades .upg-row b { font-size: 17px; }
#scr-upgrades .upg-lv { font: 800 12px var(--font); color: var(--muted); letter-spacing: .5px; }
#scr-upgrades .upg-unit { display: block; font: 600 12.5px var(--font-body); color: #b8b8c4; margin-top: 1px; }
#scr-upgrades .pips { gap: 3px; margin-top: 7px; }
#scr-upgrades .pips i { flex: 1; max-width: 22px; height: 7px; border-radius: 3px; background: rgba(255,255,255,.07); box-shadow: none; }
#scr-upgrades .pips i.on { background: linear-gradient(180deg, #fff1b0, #ffc93c 55%, #f08f12); box-shadow: 0 0 8px rgba(255,190,50,.55); }
/* Affordable: breathing gold. */
#scr-upgrades .upg-item.can { border-color: rgba(255,214,120,.45); }
#scr-upgrades .upg-item.can .ic { box-shadow: inset 0 0 0 1.5px rgba(255,214,120,.7), inset 0 -6px 12px rgba(0,0,0,.8), 0 0 14px rgba(255,190,60,.3); }
#scr-upgrades .upg-item.can [data-buy] { animation: play-glow 2.4s ease-in-out infinite; }
/* Maxed: gold frame and steady glow. */
#scr-upgrades .upg-item.maxed { border-color: rgba(255,214,120,.8); box-shadow: inset 0 0 0 1px rgba(255,214,120,.25), 0 0 20px rgba(255,190,60,.18), 0 8px 20px rgba(0,0,0,.6); }
#scr-upgrades .upg-item.maxed .upg-lv { color: var(--gold); text-shadow: 0 0 8px rgba(255,190,60,.7); }
#scr-upgrades .upg-btns .btn { border-radius: 999px; min-width: 96px; min-height: 38px; font-size: 15px; }
/* Just bought: flash, ring and spinning medal. */
#scr-upgrades .upg-item.bought { animation: upg-pop .5s cubic-bezier(.2,1.5,.4,1); }
#scr-upgrades .upg-item.bought::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at 30px 50%, rgba(255,240,180,.75), transparent 55%); animation: upg-flash .7s ease-out forwards; }
#scr-upgrades .upg-item.bought .ic { animation: upg-spin .6s cubic-bezier(.2,.9,.3,1.2); }
#scr-upgrades .upg-item.bought .pips i.on:nth-last-child(1 of .on) { animation: upg-pip .7s ease-out; }
@keyframes upg-pop { 40% { transform: scale(1.04); } }
@keyframes upg-flash { from { opacity: 1; } to { opacity: 0; } }
@keyframes upg-spin { from { transform: rotateY(0) scale(1.2); } to { transform: rotateY(360deg) scale(1); } }
@keyframes upg-pip { 0% { transform: scaleY(2.2); filter: brightness(2); } 100% { transform: none; filter: none; } }
@media (max-width: 760px), (max-height: 520px) {
  #scr-upgrades .upg-hero { flex-basis: 96px; height: 80px; }
  #scr-upgrades .upg-hero .stage { width: 96px; height: 77px; }
  #scr-upgrades .upg-title b { font-size: 20px; }
  #scr-upgrades .upg { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { #scr-upgrades .upg-halo, #scr-upgrades .upg-item, #scr-upgrades .upg-item *, #scr-upgrades .upg-item::after { animation: none !important; } }
#scr-upgrades .upg-hero .stage { border: 0 !important; box-shadow: none !important; border-radius: 0; background: radial-gradient(ellipse 34% 10% at 50% 86%, color-mix(in srgb, var(--tc) 65%, transparent), transparent 72%) !important; }

/* Settings: field of view (18-10-2026). */
.set-fov { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.set-fov span { font: 800 18px var(--font); color: var(--muted); width: 14px; text-align: center; }
.set-fov input { flex: 1; }
.set-fov .btn { flex: none; }
/* Sliders visible on OLED black: light track and gold filled part (--v). */
input[type=range] { background: linear-gradient(90deg, #f0a81c, #ffd24a) 0 0 / var(--v, 0%) 100% no-repeat, #1a1a20;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }

/* Gacha: the ones you already own per rarity (18-10-2026). */
.g-own { color: var(--text, #eef3ff); }
.g-own.full { color: var(--gold); }
.g-own.full::after { content: " ✓"; }

/* Pokédex: its 4 moves with names (18-10-2026). */
.own-moves { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; }
/* Shiny-only moves (21-10-2026): in the Pokédex card and on the level-up cards. */
.shiny-moves-h { font-size: 13px; margin: 8px 0 4px; color: #9ae6ff; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.shiny-moves-h .muted { color: var(--muted); font-size: 12px; }
.shiny-moves.locked { opacity: 0.45; filter: grayscale(0.7); }
.shiny-chip { background: linear-gradient(90deg, #9ae6ff, #d6a8ff); color: #10131a; display: inline-flex; align-items: center; gap: 3px; }
.card.shiny { box-shadow: 0 0 0 1px #9ae6ff88, 0 0 18px #9ae6ff55; animation: shinycard 2.4s ease-in-out infinite; }
@keyframes shinycard { 0%, 100% { box-shadow: 0 0 0 1px #9ae6ff88, 0 0 14px #9ae6ff44; } 50% { box-shadow: 0 0 0 1px #d6a8ffcc, 0 0 24px #d6a8ff88; } }
.own-moves span { display: inline-flex; align-items: center; gap: 4px; }

/* Admin panel (18-10-2026). */
.adm-card h4 { margin: 14px 0 6px; color: var(--gold); }
.adm-grid { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin-top: 8px; font-size: 14px; }
.adm-grid span { color: var(--muted); }
.adm-row { gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.adm-ban { color: #ff5f6d; font-size: 13px; margin-left: 6px; }
.adm-on { cursor: pointer; display: flex; justify-content: space-between; }
#maint-wall, #block-wall { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
#maint-wall.hidden, #block-wall.hidden { display: none; }
#note-wall { position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; padding: 16px; }
#note-wall.hidden { display: none; }
#note-wall .box { max-width: 560px; max-height: 100%; overflow-y: auto; border-color: #ff5a5a; box-shadow: 0 0 40px rgba(255,90,90,.35); }
#nw-emoji { font-size: 56px; line-height: 1.1; animation: nw-bob 1.6s ease-in-out infinite; }
#nw-body { white-space: pre-line; text-align: left; line-height: 1.5; margin: 12px 0 18px; }
#nw-ok:disabled { opacity: .5; cursor: not-allowed; }
@keyframes nw-bob { 50% { transform: translateY(-6px) rotate(-6deg); } }
@media (max-height: 560px) { #nw-emoji { font-size: 30px; } #note-wall h2 { margin: 2px 0; } #nw-body { font-size: 12.5px; line-height: 1.35; margin: 6px 0 10px; } #note-wall .box { max-width: 680px; padding-top: 10px; padding-bottom: 12px; } }
.news-admin { border-left: 3px solid var(--gold); padding-left: 10px; }
#adm-tabs { flex-wrap: wrap; }
#adm-tabs .tab { flex: 1 0 auto; padding-left: 10px; padding-right: 10px; }
.adm-bal { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 6px 0; }
.adm-bal label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
.adm-more { margin-top: 10px; } .adm-more summary { cursor: pointer; color: var(--gold); }
.adm-owned { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; max-height: 220px; overflow: auto; }
.adm-owned .leg { color: var(--gold); }
.adm-err { border-top: 1px solid rgba(255,255,255,.08); padding: 8px 0; font-size: 13px; }
.adm-err code { word-break: break-all; color: #ff9aa5; }
.adm-hist { display: flex; align-items: flex-end; gap: 2px; height: 90px; margin-top: 6px; }
.adm-hist i { flex: 1; background: var(--gold); min-height: 1px; border-radius: 2px 2px 0 0; }

/* Pause: your build (18-10-2026). */
.build { text-align: left; margin: 6px 0 12px; }
.b-head { font-family: var(--font); font-weight: 800; color: var(--gold); margin-bottom: 6px; }
.b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 6px; }
.b-grid.two { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.b-cell { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); cursor: help; min-height: 44px; }
.b-cell:hover { border-color: var(--gold); background: rgba(255,210,74,.07); }
.b-cell.evo { border-color: rgba(255,210,63,.6); } .b-cell.bond { border-color: rgba(255,138,216,.6); } .b-cell.pv { border-color: rgba(196,123,255,.5); }
.b-cell.empty { justify-content: center; color: var(--muted); border-style: dashed; cursor: default; }
.b-txt { display: flex; flex-direction: column; min-width: 0; } .b-txt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .b-txt small { color: var(--muted); font-size: 11px; }
.b-star { font-size: 22px; color: #c47bff; width: 28px; text-align: center; }
.b-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); margin: 6px 0; } .b-stats b { color: var(--text, #eef3ff); }
.b-taken { display: flex; flex-wrap: wrap; gap: 6px; } .b-chip { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.06); cursor: help; }
.b-tip { position: fixed; z-index: 10000; max-width: 300px; padding: 8px 10px; border-radius: 10px; background: rgba(6,6,10,.97); border: 1px solid var(--gold); font-size: 13px; line-height: 1.4; pointer-events: none; box-shadow: 0 6px 22px rgba(0,0,0,.6); }
.b-tip.hidden { display: none; }
@media (max-height: 520px) { #scr-pause .box { max-height: 96vh; overflow: auto; } .b-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }

/* ============ all devices (18-10-2026) ============ */
/* Large screens: menus and windows scaled to the screen size (ui.js, fitScreen). */
body > :not(#game):not(#b-tip) { zoom: var(--uiz, 1); }
/* Landscape mobile: the 3 level-up cards in a row (they used to be a column and the 3rd overflowed). */
@media (max-height: 520px) and (orientation: landscape) {
  #scr-levelup .box, #scr-item .box { width: min(960px, 98vw); padding: 10px 14px; }
  #scr-levelup h2, #scr-item h2 { font-size: 22px; margin: 0; }
  #cards.cards, #item-cards.cards { flex-direction: row; width: 100%; align-items: stretch; }
  #cards .card, #item-cards .card { flex: 1 1 0; min-width: 0; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 8px 12px;
    box-shadow: inset 0 4px 0 var(--cc), inset 0 1px 0 var(--hi), 0 3px 0 rgba(0,0,0,.25); }
  #scr-levelup .card .mv-prev { flex: 0 1 99px; width: min(100%, 176px); height: 99px; min-height: 0; margin-top: 2px; object-fit: contain; }   /* (26-10-2026) it shrinks: it ran out of the card */
  #cards .card .key, #item-cards .card .key { display: none; }
  #cards .card .txt, #item-cards .card .txt { width: 100%; }
  #cards .card .ds, #item-cards .card .ds { font-size: 12px; line-height: 1.3; }
}
@media (max-height: 520px) and (orientation: landscape) { #scr-pause .box > .row { flex-direction: row; width: auto; justify-content: center; } #scr-pause .box > .row .btn { flex: 0 1 auto; } }

/* Gacha on mobile (18-10-2026): no infinite glow animations on the cards (animated box-shadow, very expensive). */
body.touch #pull-fx .pcard.r4.up, body.touch #pull-fx .pcard.r5.up, body.touch #pull-fx .pcard.shiny.up { animation: none; box-shadow: 0 0 0 1px #000, 0 0 18px var(--rc); }
body.touch #pull-fx .pcard.tease { box-shadow: 0 0 0 1px #000, 0 0 16px var(--rc); }
/* (19-10-2026) Card flicker on mobile: permanent 3D layers, color blending
 * (mix-blend-mode) and animated glows over the sprites (canvas) being redrawn. Removed. */
body.touch #pull-fx .pcard { will-change: auto; backface-visibility: visible; }
body.touch #pull-fx .pcard .pholo { mix-blend-mode: normal; opacity: .14; animation: none; }
body.touch #pull-fx .pcard .pburst { mix-blend-mode: normal; }
body.touch #pull-fx .pcard.pick .pback, body.touch #pull-fx .pcard.leg::before, body.touch #pull-fx .pcard.r5.leg { animation: none; }
body.touch #pull-fx .pcard.r5.leg { box-shadow: 0 0 0 1px #000, 0 0 26px rgba(255,200,60,.7); }
body.touch #pull-fx .pcard canvas { transform: translateZ(0); }

/* Level-up cards on landscape mobile, cleaner (18-10-2026): the label (Mejora,
   Nv.1>2, type) above the name, all centered, smaller icon and all three the same height. */
@media (max-height: 520px) and (orientation: landscape) {
  #scr-levelup .box { padding: 8px 12px 10px; }
  #scr-levelup h2 { font-size: 24px !important; }
  #scr-levelup .sub { margin: 0 0 6px; font-size: 13px; }
  #cards .card { justify-content: flex-start; gap: 5px; padding: 10px 8px 12px; border-radius: 14px; }
  #cards .card .ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; }
  #cards .card .ico svg, #cards .card .ico img, #cards .card .ico canvas { width: 26px; height: 26px; }
  #cards .card .nm { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 15px; line-height: 1.15; }
  #cards .card .nm .tag-chip { order: -1; font-size: 10px; padding: 2px 8px; margin: 0; }
  #cards .card .ds { font-size: 12px; line-height: 1.3; color: var(--muted, #b8c2d6); }
  #lvl-reroll { margin-top: 8px !important; padding: 6px 14px; }
}

/* =====================================================================
 * PokéLit Plaza (19-10-2026): menu Hub button and the hub menus (ui/hub-ui.js).
 * ===================================================================== */
#scr-menu .plaza-btn {
  position: relative; display: grid; grid-template-columns: 44px auto auto; align-items: center; column-gap: 10px;
  margin: 2px 0 6px; padding: 5px 14px 5px 5px; border-radius: 999px; text-align: left; font-size: 19px;
  background: radial-gradient(120% 160% at 0% 50%, rgba(95,168,255,.16), transparent 60%), #000;
  border: 1px solid rgba(140,190,255,.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px #000, 0 0 26px rgba(95,168,255,.2), 0 10px 26px rgba(0,0,0,.85);
  animation: plaza-in .5s cubic-bezier(.2,.9,.2,1) both;
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
#scr-menu .plaza-btn:hover, #scr-menu .plaza-btn:focus-visible {
  transform: translateY(-2px); border-color: rgba(255,224,138,.7); background-color: #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px #000, 0 0 34px rgba(255,200,80,.3), 0 12px 28px rgba(0,0,0,.85);
}
#scr-menu .plaza-btn .pz-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #172238, #000 70%); box-shadow: inset 0 0 0 1px rgba(140,190,255,.35), 0 0 0 3px #000; }
#scr-menu .plaza-btn .pz-t { line-height: 1.1; }
#scr-menu .plaza-btn small { display: block; font: 600 11.5px/1.3 var(--font-body); color: var(--muted); }
#scr-menu .plaza-btn .pz-live { display: inline-flex; align-items: center; gap: 5px; font: 800 10px/1 var(--font-body); letter-spacing: 1px;
  color: #5fe08a; padding: 4px 7px; border-radius: 999px; background: rgba(95,224,138,.1); border: 1px solid rgba(95,224,138,.35); }
#scr-menu .plaza-btn .pz-live i { width: 7px; height: 7px; border-radius: 50%; background: #5fe08a; box-shadow: 0 0 8px #5fe08a; animation: pz-dot 1.4s ease-in-out infinite; }
@keyframes pz-dot { 50% { opacity: .3; } }
@keyframes plaza-in { from { opacity: 0; transform: translateY(-14px) scale(.94); } }
@media (max-height: 640px) {
  #scr-menu .plaza-btn { font-size: 16px; grid-template-columns: 36px auto auto; margin: 0 0 4px; }
  #scr-menu .plaza-btn .pz-ico { width: 36px; height: 36px; }
  #scr-menu .plaza-btn small { display: none; }
}

/* ---------- PokéLit Plaza (ui/hub-ui.js) — 19-10-2026: social overhaul, phones full screen ---------- */
#hub-ui { position: fixed; inset: 0; z-index: 15; pointer-events: none; font-family: var(--font-body);
  --hub-glass: rgba(6,6,10,.84); --hub-line: rgba(255,255,255,.14); --hub-top: max(10px, env(safe-area-inset-top)); }
#hub-ui.hidden { display: none; }
#hub-ui > * { pointer-events: auto; }
#hub-ui .hidden { display: none !important; }
/* Photo: everything out of the way for a frame (the flash stays). */
#hub-ui.photo > :not(.hub-flash) { visibility: hidden !important; }
.hub-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none !important; z-index: 9; }
.hub-flash.on { animation: hub-flash .5s ease-out; }
@keyframes hub-flash { 0% { opacity: .9; } 100% { opacity: 0; } }

/* Top bar */
#hub-ui .hub-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; pointer-events: none;
  padding: var(--hub-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); }
.hub-top > * { pointer-events: auto; }
.hub-pill { appearance: none; cursor: pointer; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; min-width: 40px; padding: 0 13px;
  border-radius: 999px; background: var(--hub-glass); border: 1px solid var(--hub-line); color: #fff; font: 800 14px var(--font-body);
  box-shadow: 0 6px 18px rgba(0,0,0,.6); transition: border-color .15s, transform .1s, background .15s; white-space: nowrap; }
.hub-pill:hover { border-color: rgba(255,224,138,.6); }
.hub-pill:active { transform: scale(.95); }
.hub-pill.on { border-color: rgba(255,224,138,.85); background: #1a1406; }
.hub-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff4d5e; color: #fff;
  font: 800 11px/18px var(--font-body); font-style: normal; text-align: center; box-shadow: 0 0 0 2px #000; }
.hub-top .hub-title { appearance: none; cursor: pointer; background: none; border: 0; padding: 0; color: inherit;
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; text-shadow: 0 2px 0 #000, 0 0 12px #000; }
.hub-title b { font: 700 21px var(--font); color: var(--gold); letter-spacing: .5px; white-space: nowrap; }
.hub-status { display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--font-body); color: #dfe6ff; padding: 3px 10px;
  border-radius: 999px; background: rgba(0,0,0,.72); border: 1px solid var(--hub-line); white-space: nowrap; }
.hub-title:hover .hub-status { border-color: rgba(255,224,138,.6); }
.hub-status i { width: 8px; height: 8px; border-radius: 50%; background: #ffd23f; }
.hub-status.online i { background: #5fe08a; box-shadow: 0 0 8px #5fe08a; animation: pz-dot 1.6s ease-in-out infinite; }
.hub-status.offline i { background: #ff6a5a; }
.hub-status.connecting i { animation: pz-dot .7s ease-in-out infinite; }
.hub-status b { color: #fff; }
.hub-tools { display: flex; gap: 7px; }

/* Tabs and chips shared by the panels */
.hub-tabs { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: #0a0a10; border: 1px solid var(--hub-line); }
.hub-tabs button { appearance: none; cursor: pointer; flex: 1 1 auto; min-width: 0; padding: 7px 10px; border-radius: 9px; border: 0; background: none;
  color: var(--muted); font: 800 13px var(--font-body); white-space: nowrap; }
.hub-tabs button.on { background: var(--gold); color: #3a2300; }
.hub-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hub-chip { appearance: none; cursor: pointer; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--hub-line); background: #0c0c12;
  color: #fff; font: 700 13px var(--font-body); white-space: nowrap; transition: background .12s, border-color .12s; }
.hub-chip:hover { border-color: rgba(255,210,74,.55); background: #16140a; }
.hub-chip.on { background: var(--gold); color: #3a2300; border-color: #fff3c4; }
.hub-sec { font: 800 11px var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin: 10px 0 5px; text-align: left; }

/* Actions panel (emotes / actions / quick chat) */
.hub-emotes { position: absolute; top: calc(var(--hub-top) + 50px); right: max(12px, env(safe-area-inset-right)); width: min(400px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px; padding: 9px; border-radius: 16px; background: var(--hub-glass);
  border: 1px solid var(--hub-line); box-shadow: 0 12px 30px rgba(0,0,0,.7); animation: fade .15s ease-out; z-index: 4; }
.hub-soc-body { display: flex; flex-direction: column; gap: 8px; }
.hub-emo-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.hub-emo-grid button { appearance: none; cursor: pointer; aspect-ratio: 1; min-height: 38px; border-radius: 11px; border: 1px solid transparent;
  background: rgba(255,255,255,.05); font-size: 22px; line-height: 1; transition: transform .12s, background .12s; padding: 0; }
.hub-emo-grid button:hover { transform: scale(1.12); background: rgba(255,210,74,.15); border-color: rgba(255,210,74,.5); }
.hub-chips.say .hub-chip { white-space: normal; text-align: left; }

/* A request from another player; walking to / following someone */
.hub-ask { position: absolute; left: 50%; top: calc(var(--hub-top) + 52px); transform: translateX(-50%); z-index: 6; overflow: hidden;
  display: flex; align-items: center; gap: 10px; padding: 9px 10px 11px 14px; border-radius: 16px; max-width: calc(100vw - 24px);
  background: #0b0a06; border: 1px solid rgba(255,210,74,.6); box-shadow: 0 0 30px rgba(255,190,50,.25), 0 12px 30px rgba(0,0,0,.8); animation: hub-pop .25s cubic-bezier(.2,.9,.25,1.3) both; }
.hub-ask .ha-i { font-size: 26px; }
.hub-ask .ha-t { font: 700 14px var(--font-body); color: #fff; }
.hub-ask .ha-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--gold); transform-origin: left; animation: hub-bar 14s linear forwards; }
@keyframes hub-bar { to { transform: scaleX(0); } }
.hub-x-mini { appearance: none; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--hub-line); background: #000; color: #fff; flex: none; }
.hub-follow { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--hub-glass); border: 1px solid rgba(255,224,138,.5); color: #fff; font: 700 13px var(--font-body);
  box-shadow: 0 8px 22px rgba(0,0,0,.7); white-space: nowrap; max-width: calc(100vw - 300px); }
.hub-follow b { color: var(--gold); overflow: hidden; text-overflow: ellipsis; }
.hub-follow .btn { padding: 5px 12px; font-size: 13px; }

/* Chat */
.hub-chat { position: absolute; left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 6px; }
.hub-log { max-height: 30vh; overflow-y: auto; padding: 8px 10px; border-radius: 12px; background: rgba(4,4,8,.62); border: 1px solid transparent;
  font: 600 13px/1.4 var(--font-body); color: #eef0f8; text-shadow: 0 1px 2px #000; scrollbar-width: thin; transition: background .3s, border-color .3s; }
.hub-log:empty { display: none; }
.hub-chat:hover .hub-log, .hub-chat:focus-within .hub-log, .hub-chat.fresh .hub-log { background: var(--hub-glass); border-color: var(--hub-line); }
.hub-line { padding: 1px 0; overflow-wrap: anywhere; animation: fade .2s ease-out; }
.hub-line b { color: #9fd0ff; cursor: pointer; }
.hub-line b.me { color: var(--gold); cursor: default; }
.hub-line b.fr { color: #7dffa0; }
.hub-line b::after { content: ':'; color: #8a93b0; }
.hub-line.mention { background: rgba(255,210,74,.14); border-left: 3px solid var(--gold); padding-left: 6px; border-radius: 4px; }
.hub-t { color: #6f7890; font-size: 11px; margin-right: 6px; }
.hub-sys { color: #c9bcff; }
.hub-form { display: flex; gap: 6px; }
.hub-form input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--hub-line);
  background: var(--hub-glass); color: #fff; font: 600 14px var(--font-body); outline: none; }
.hub-form input:focus { border-color: rgba(255,224,138,.7); box-shadow: 0 0 0 3px rgba(255,210,74,.15); }
.hub-send { appearance: none; cursor: pointer; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid #fff3c4; color: #3a2300; font-size: 16px;
  background: linear-gradient(180deg, #ffe58a, #f4a21f); box-shadow: 0 3px 0 #9a5d06; }
#hub-ui .hub-chat-toggle { display: none; }
.hub-act { position: absolute; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); appearance: none; cursor: pointer;
  min-width: 120px; max-width: 46vw; padding: 12px 20px; border-radius: 999px; border: 1px solid #fff3c4; color: #3a2300; font: 800 16px var(--font-body);
  background: linear-gradient(180deg, #ffe58a, #ffc93c 55%, #f4a21f);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 3px 0 #9a5d06, 0 0 26px rgba(255,190,50,.35), 0 8px 20px rgba(0,0,0,.7);
  animation: hub-act-in .25s cubic-bezier(.2,.9,.25,1.3) both; }
.hub-act:active { transform: translateY(2px); }
@keyframes hub-act-in { from { opacity: 0; transform: translateY(12px) scale(.9); } }
body:not(.touch) .hub-act { font-size: 14px; padding: 9px 16px; }
body:not(.touch) .hub-act::before { content: "E"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 5px;
  background: #3a2300; color: #ffd23f; font-size: 12px; vertical-align: 1px; }
/* Touch: the chat lives at the top (the bottom half belongs to the joystick and the action button) and collapses into the 💬 button.
   Open: input first (still visible with the keyboard up), then the last messages. Closed: only fresh messages, for a few seconds,
   and touches go through to the game. */
body.touch #hub-ui .hub-chat-toggle { display: inline-flex; }
body.touch #hub-ui .hub-chat { top: calc(var(--hub-top) + 50px); bottom: auto; left: max(10px, env(safe-area-inset-left));
  width: min(340px, 42vw); flex-direction: column-reverse; gap: 4px; }
body.touch .hub-log { max-height: 26vh; padding: 5px 9px; font-size: 12px; line-height: 1.35; }
body.touch .hub-form input { height: 36px; font-size: 13px; }
body.touch .hub-send { width: 36px; height: 36px; }
body.touch .hub-chat.closed .hub-form { display: none; }
body.touch #hub-ui .hub-chat.closed { pointer-events: none; }
body.touch .hub-chat.closed .hub-log { max-height: 58px; opacity: 0; transition: opacity .4s; background: rgba(4,4,8,.55); scrollbar-width: none; }
body.touch .hub-chat.closed.fresh .hub-log { opacity: 1; }
body.touch .hub-chat:not(.closed) { z-index: 3; }
body.touch #hub-ui.chat-open .hub-title b { visibility: hidden; }
body.touch .hub-pill > span { display: none; }
body.touch .hub-pill { padding: 0; width: 40px; }

/* Panels */
.hub-modal { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.58); animation: fade .15s ease-out; z-index: 7; }
.hub-box { position: relative; width: min(440px, 100%); max-height: calc(100% - 8px); overflow: hidden; padding: 18px; border-radius: 18px; text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255,210,74,.08), transparent 60%), #050507; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 0 0 1px #000, 0 24px 60px rgba(0,0,0,.9); animation: hub-pop .22s cubic-bezier(.2,.9,.25,1.3) both; box-sizing: border-box; }
@keyframes hub-pop { from { opacity: 0; transform: scale(.92); } }
.hub-box h3 { margin: 2px 0 6px; font-size: 21px; color: #fff; }
.hub-x { position: absolute; top: 10px; right: 10px; appearance: none; cursor: pointer; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--hub-line); background: #000; color: #fff; font-size: 15px; z-index: 2; }
#hub-card-cv { width: 100%; height: auto; aspect-ratio: 320 / 260; image-rendering: pixelated; display: block;
  border-radius: 14px; background: radial-gradient(circle at 50% 70%, rgba(95,168,255,.18), transparent 62%), #000; border: 1px solid rgba(255,255,255,.08); }

/* Player card */
.hub-box.hub-card-box { width: min(720px, 100%); display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 18px; align-items: center; text-align: left; }
.hub-card-info h3 { padding-right: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-card-mon { color: var(--muted); font-size: 14px; }
.hub-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hub-card-tags:empty { display: none; }
.hub-tag { padding: 3px 9px; border-radius: 999px; background: #10101a; border: 1px solid var(--hub-line); font: 700 12px var(--font-body); color: #dfe6ff; }
.hub-tag.fr { color: #7dffa0; border-color: rgba(125,255,160,.4); }
.hub-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.hub-card-grid .btn { font-size: 13px; padding: 8px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-card-grid .btn.pulse { animation: hub-glow 1s ease-in-out infinite; }
@keyframes hub-glow { 50% { box-shadow: 0 0 0 3px rgba(255,210,74,.45), 0 0 18px rgba(255,210,74,.5); } }

/* People */
.hub-box.hub-people-box { width: min(760px, 100%); height: min(560px, 100%); display: flex; flex-direction: column; gap: 8px; text-align: left; }
.hub-people-box h3 { padding-right: 44px; }
.hub-mystatus .hub-sec { margin-top: 0; }
.hub-people-list { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-rows: 46px; gap: 6px; align-content: start; }
.hub-person { appearance: none; cursor: pointer; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 10px;
  border-radius: 12px; border: 1px solid var(--hub-line); background: #0b0b12; color: #fff; text-align: left; font-family: var(--font-body); }
.hub-person:hover { border-color: rgba(255,210,74,.55); }
.hub-person.fr { border-color: rgba(125,255,160,.35); }
.hub-person .hp-st { font-size: 17px; text-align: center; }
.hub-person .hp-name { min-width: 0; display: flex; flex-direction: column; }
.hub-person .hp-name b, .hub-person .hp-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-person .hp-name b { font-size: 14px; }
.hub-person.fr .hp-name b { color: #7dffa0; }
.hub-person .hp-name small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.hub-person .hp-far { font: 700 11px var(--font-body); color: #5fe08a; }
.hub-empty { grid-column: 1 / -1; text-align: center; margin: 20px 0; }
.hub-people-foot { display: flex; align-items: center; gap: 8px; }

/* Trade (22-10-2026) */
.hub-box.hub-trade-box { width: min(760px, 100%); display: flex; flex-direction: column; gap: 8px; text-align: left; }
.hub-trade-box h3 { padding-right: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hub-trade-side { border: 1px solid var(--hub-line); border-radius: 14px; padding: 8px; background: rgba(255,255,255,.025); min-width: 0; }
.hub-trade-side.mine { border-color: rgba(255,210,74,.35); background: rgba(255,210,74,.04); }
.hub-trade-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.hub-trade-head b { font-size: 13.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-trade-head .hub-tag { font-size: 11px; padding: 2px 8px; flex: none; }
.hub-tag.ok { color: #7dffa0; border-color: rgba(125,255,160,.45); }
.hub-tag.lk { color: var(--gold); border-color: rgba(255,210,74,.5); }
.hub-trade-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hub-trade-slots.locked { opacity: .92; }
.hub-trade-slot { appearance: none; font: inherit; color: #dfe6ff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 74px;
  padding: 4px 3px; border-radius: 11px; border: 1px solid var(--hub-line); background: #0a0a10; min-width: 0; }
.hub-trade-slot.empty { border-style: dashed; color: #5a5a6e; font-size: 22px; background: transparent; }
button.hub-trade-slot { cursor: pointer; }
button.hub-trade-slot:hover { border-color: rgba(255,210,74,.6); }
.hub-trade-slot.sh { border-color: rgba(255,210,74,.45); background: radial-gradient(circle at 50% 30%, rgba(255,210,74,.14), transparent 70%), #0a0a10; }
.hub-trade-slot i { display: block; height: 42px; }
.hub-trade-slot canvas { image-rendering: pixelated; display: block; }
.hub-trade-slot span { font: 700 11px var(--font-body); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-trade-msg { margin: 0; min-height: 1.3em; text-align: center; }
.hub-trade-btns { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.hub-trade-btns .btn.pulse { animation: hub-glow 1s ease-in-out infinite; }
.hub-trade-pick { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #050507; border-radius: inherit; }
.hub-trade-pick-head { display: flex; align-items: center; gap: 8px; }
.hub-trade-pick-head b { font-size: 15px; color: #fff; }
.hub-trade-pick-list { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; align-content: start; }
.hub-trade-item { appearance: none; cursor: pointer; font: inherit; color: #dfe6ff; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 3px; min-height: 84px;
  border-radius: 11px; border: 1px solid var(--hub-line); background: #0a0a10; min-width: 0; }
.hub-trade-item:hover { border-color: rgba(255,210,74,.6); }
.hub-trade-item.sh { border-color: rgba(255,210,74,.45); }
.hub-trade-item i { display: block; height: 42px; }
.hub-trade-item canvas { image-rendering: pixelated; display: block; }
.hub-trade-item b { font-size: 11.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-trade-item small { font: 700 11px var(--font-body); color: var(--muted); }
.hub-trade-item.sh small { color: var(--gold); }
.hub-trade-pick-list .hub-empty { grid-column: 1 / -1; }


/* Champions */
.hub-champs { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; text-align: left; }
.champ { display: grid; grid-template-columns: 34px 1fr; align-items: center; padding: 8px 12px; border-radius: 12px; background: #0b0b0f; border: 1px solid rgba(255,255,255,.08); }
.champ .m { grid-row: span 2; font-size: 24px; }
.champ .sub { font-size: 12.5px; }

/* ---------- Plaza on phones (landscape, short screens): compact bar, every panel full screen, nothing to scroll ---------- */
@media (max-height: 520px) {
  #hub-ui { --hub-top: max(6px, env(safe-area-inset-top)); }
  .hub-pill { height: 36px; min-width: 36px; font-size: 13px; }
  body.touch .hub-pill { width: 36px; font-size: 16px; }
  .hub-tools { gap: 5px; }
  .hub-title b { font-size: 16px; }
  .hub-status { font-size: 11px; padding: 2px 8px; }
  .hub-emotes { top: calc(var(--hub-top) + 42px); max-height: calc(100dvh - var(--hub-top) - 50px); width: min(420px, 56vw); }
  .hub-emo-grid button { min-height: 0; font-size: 20px; }
  .hub-chip { padding: 6px 10px; font-size: 12.5px; }
  .hub-ask { top: calc(var(--hub-top) + 44px); padding: 6px 8px 8px 10px; }
  .hub-ask .ha-t { font-size: 13px; }
  .hub-log { max-height: 22vh; }
  body.touch #hub-ui .hub-chat { top: calc(var(--hub-top) + 42px); }
  .hub-act { padding: 10px 18px; font-size: 15px; }
  .hub-follow { bottom: max(10px, env(safe-area-inset-bottom)); }

  .hub-modal { padding: 0; place-items: stretch; background: #050507; }
  .hub-box { width: 100% !important; height: 100% !important; max-height: none; border-radius: 0; border: 0; animation: fade .15s ease-out;
    padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .hub-box h3 { font-size: 18px; margin: 0 0 2px; }
  .hub-x { top: max(6px, env(safe-area-inset-top)); right: max(8px, env(safe-area-inset-right)); width: 34px; height: 34px; }
  .hub-sec { margin: 6px 0 4px; font-size: 10.5px; }
  .hub-tabs button { padding: 6px 8px; font-size: 12.5px; }

  .hub-box.hub-card-box { grid-template-columns: minmax(0, 36%) minmax(0, 1fr); gap: 14px; align-content: center; }
  #hub-card-cv { max-height: calc(100dvh - 24px); width: auto; max-width: 100%; justify-self: center; }
  .hub-card-grid { gap: 6px; }
  .hub-card-grid .btn { font-size: 12.5px; padding: 7px 4px; }

  .hub-box.hub-people-box { gap: 6px; }
  .hub-people-list { grid-auto-rows: 40px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .hub-person .hp-name b { font-size: 13px; }

  .hub-box.hub-trade-box { gap: 5px; }
  .hub-trade-cols { gap: 8px; }
  .hub-trade-side { padding: 6px; }
  .hub-trade-slot { min-height: 58px; padding: 2px; }
  .hub-trade-slot i, .hub-trade-item i { height: 34px; }
  .hub-trade-slot span { font-size: 10px; }
  .hub-trade-btns .btn { padding: 6px 9px; font-size: 12.5px; }
  .hub-trade-pick { padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .hub-trade-pick-list { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); overflow-y: auto; }
  .hub-trade-item { min-height: 70px; }
}
/* Very short phones (iPhone SE and similar, with the browser bars): even tighter. */
@media (max-height: 380px) {
  .hub-card-grid .btn { padding: 6px 4px; font-size: 12px; }
  .hub-people-list { grid-auto-rows: 36px; }
}
/* Narrow screens that are not short (portrait tablets, small windows): the panels stack. */
@media (max-width: 640px) and (min-height: 521px) {
  .hub-box.hub-card-box { grid-template-columns: 1fr; height: auto; }
  #hub-card-cv { max-width: 220px; margin: 0 auto; }
  .hub-follow { max-width: calc(100vw - 24px); bottom: 74px; }
}

/* ================= Phones: every window full screen (19-10-2026) =================
 * Landscape phones (short screens). Every window (.scr) takes the whole screen: the box loses its margins and
 * rounded corners and becomes a column (title row · content · buttons) that fits the screen. While a window is
 * open the top bar keeps only coins and tickets, on the right of the title row (body.win-open, --tb-w: see
 * js/ui/phone.js). (26-10-2026) Long contents scroll with a finger (they were in pages, ‹ 1/3 ›, and nothing scrolled);
 * a window that is still taller than the screen scrolls as a whole. */

@media (max-height: 520px) {
  .scr:not(#scr-menu):not(#scr-layout) { padding: 0 !important; align-items: stretch !important; justify-content: stretch !important; }
  .scr:not(#scr-menu):not(#scr-layout) > .box {
    width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important; min-height: 0;
    margin: 0 !important; border-radius: 0 !important; border: 0 !important; box-shadow: none !important;
    padding: max(6px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)) !important;
    display: flex; flex-direction: column; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; animation: fade .15s ease-out;
  }
  .scr:not(#scr-menu):not(#scr-layout) > .box > * { flex: none; }
  /* The title row: room on the right for the coins (the top bar stays visible over the window). */
  .scr:not(#scr-menu):not(#scr-layout) > .box > .row.between:first-child,
  .scr:not(#scr-menu):not(#scr-layout) > .box > .row.end:first-child { padding-right: var(--tb-w, 0px); min-height: 34px; margin-bottom: 4px; flex-wrap: nowrap; gap: 8px; }
  .scr:not(#scr-menu):not(#scr-layout) > .box > .row.between:first-child h2 { margin: 0; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .scr:not(#scr-menu):not(#scr-layout) > .box h2 { font-size: 19px; margin: 0 0 4px; }
  .scr:not(#scr-menu):not(#scr-layout) > .box .sub { margin: 0 0 4px; }
  /* Top bar over a window: only coins and tickets. */
  body.win-open .topbar > :not(:first-child):not(#tickets-pill) { display: none !important; }
  body.win-open .sound-panel, body.win-open .more-menu { display: none !important; }
  body.win-open .topbar { top: max(6px, env(safe-area-inset-top)); }
  /* Tabs that used to scroll sideways: they wrap and shrink. */
  .gen-tabs { overflow: hidden !important; flex-wrap: wrap; gap: 4px; padding: 2px 0 4px; margin-top: 2px; }
  .gen-tab { padding: 3px 8px; font-size: 12px; line-height: 1.15; }
  .gen-tab small, .gen-tab .sub { font-size: 10px; }
  .tabs { flex-wrap: wrap; }
}

/* Phones only: the Pokédex drop-downs. */
.dex-ctl { display: none; }

@media (max-height: 520px) {
  /* Contents that fill the window (they scroll). */
  #news-body, #set-body, #legal-body, #sup-body, #fr-list, #rk-list, #mod-list, #adm-body, #goals-body, #prof-body {
    flex: 1 1 auto !important; min-height: 0 !important; max-height: none !important; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
  .scr:not(#scr-menu):not(#scr-layout) > .box > .tabs, .scr:not(#scr-menu):not(#scr-layout) > .box > .gen-tabs, .scr:not(#scr-menu):not(#scr-layout) > .box > .filters { margin: 0 0 6px; }

  /* ---- Start: the two-column layout of short screens (logo and guest left, form right), full screen ---- */
  #scr-login > .box.login-box { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-areas: "head body" "guest body" "foot body";
    grid-template-rows: auto auto 1fr; column-gap: 22px; align-content: center; align-items: start; }
  #scr-login .login-head, #scr-login .login-guest, #scr-login .login-foot { align-self: start; }

  /* ---- Pokédex: drop-downs instead of the chip rows, grid in pages, the card on the right ---- */
  #scr-dex .gen-tabs, #scr-dex #dex-types, #scr-dex #dex-filters { display: none !important; }
  #scr-dex .split { flex: 1 1 auto !important; display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 36%); gap: 10px; min-height: 0; margin-top: 0 !important; }
  #scr-dex .dex-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  #scr-dex .dex-top { display: flex; gap: 6px; margin-bottom: 6px; flex: none; }
  #scr-dex .dex-search { flex: 1 1 110px; margin: 0 !important; min-width: 0; }
  #scr-dex .dex-search .field { height: 32px; padding: 3px 10px; font-size: 13px; }
  .dex-ctl { display: flex; gap: 6px; flex: 3 1 0; min-width: 0; }
  .dex-ctl select { flex: 1 1 0; min-width: 0; height: 32px; padding: 2px 6px; font-size: 12.5px; }
  #scr-dex #dex-grid { flex: 1 1 auto; min-height: 0; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); grid-auto-rows: 92px; gap: 5px; align-content: start; }
  #scr-dex .cell { padding: 2px 2px 3px; min-height: 0; }
  #scr-dex .cell canvas { width: 56px; height: 48px; }
  #scr-dex .cell .no { font-size: 9px; }
  #scr-dex .cell b { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; }
  #dex-detail { display: grid !important; grid-template-columns: 104px minmax(0, 1fr); column-gap: 8px; align-content: start; overflow: hidden; padding: 6px 8px !important; min-height: 0; }
  #dex-detail > * { grid-column: 1 / -1; order: 0 !important; margin-left: 0; margin-right: 0; }
  #dex-detail > .stage { grid-column: 1; grid-row: 1 / span 2; width: 104px !important; height: 90px !important; margin: 0 !important; }
  #dex-detail > .center { grid-column: 2; grid-row: 1; text-align: left; align-self: center; }
  #dex-detail > .seg { grid-column: 2; grid-row: 2; align-self: start; justify-self: start; margin: 2px 0 0; }
  #dex-detail .center > div:first-child { display: block !important; font-size: 11px !important; }
  #dex-detail .center h3 { font-size: 16px; }
  #dex-detail .center img { width: 13px; height: 13px; }
  #dex-detail .stat { margin: 1px 0; font-size: 11.5px; }
  #dex-detail .pv-box { margin: 4px 0; font-size: 11.5px; padding: 5px 7px; }
  #dex-detail p { font-size: 12px !important; margin: 3px 0 !important; }
  #dex-detail .move-icons span { font-size: 11.5px; }
  #dex-detail > .btn { margin: 4px 0 0 !important; padding: 6px !important; font-size: 13.5px !important; }

  /* ---- Upgrades: the Pokémon on the left, the upgrades on the right in two columns ---- */
  #scr-upgrades > .box { display: grid !important; grid-template-columns: minmax(0, 32%) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 12px; }
  #scr-upgrades > .box > .row.between:first-child { grid-column: 1 / -1; }
  #scr-upgrades .upg-head { grid-column: 1; grid-row: 2 / span 2; flex-direction: column; align-items: stretch !important; margin: 0 !important; padding: 8px 10px !important; gap: 6px !important; min-height: 0; overflow: hidden; }
  #scr-upgrades .upg-hero { flex: none !important; height: min(30dvh, 100px) !important; }
  #scr-upgrades .upg-hero .stage { width: auto !important; height: 100% !important; }
  #scr-upgrades .upg-title { gap: 6px !important; margin: 0 !important; }
  #scr-upgrades .upg-title b { font-size: 18px !important; }
  #scr-upgrades .upg-title span { font-size: 11px !important; padding: 1px 8px !important; }
  #scr-upgrades .upg-head .sub { display: none; }
  #scr-upgrades .upg-head .row { margin-top: 4px !important; flex-wrap: wrap; gap: 6px; }
  #scr-upgrades .upg-head label { display: none; }
  #scr-upgrades #upg-mon { min-width: 0 !important; width: 100% !important; flex: 1 1 100%; height: 32px; padding: 2px 6px; font-size: 13px; }
  #scr-upgrades #upg-pv .pv-box { font-size: 11px; margin: 0 !important; padding: 4px 6px; }
  #scr-upgrades #upg-list { grid-column: 2; grid-row: 2; min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-auto-rows: min-content; gap: 6px !important; align-content: start; }
  #scr-upgrades .upg-item { padding: 6px 8px !important; grid-template-columns: 34px minmax(0, 1fr) auto !important; gap: 7px !important; }
  #scr-upgrades .upg-item .ic { width: 34px !important; height: 34px !important; }
  #scr-upgrades .upg-item .ic img { width: 22px; height: 22px; }
  #scr-upgrades .upg-row b { font-size: 13px !important; }
  #scr-upgrades .upg-lv { font-size: 10px !important; }
  #scr-upgrades .upg-unit { font-size: 10.5px !important; line-height: 1.3; }
  #scr-upgrades .upg-btns .btn { min-width: 0; padding: 4px 8px; font-size: 12px; }
  #scr-upgrades .pips { margin-top: 3px; }
  /* (20-10-2026) Tighter rows: most of the 13 upgrades on one screen on the AYN Thor and most phones. */
  #scr-upgrades .upg-item { padding: 4px 8px !important; }
  #scr-upgrades .upg-btns .btn { min-height: 36px; }
  #scr-upgrades .pips i { height: 5px; }
  #scr-upgrades .upg-title { position: relative; z-index: 2; }
  #scr-upgrades .ban-modal { padding: 8px; }
  #scr-upgrades .ban-picker .chip { padding: 4px 8px; font-size: 12px; }

  /* ---- Gacha: tabs in one row, banner + pulls on the left, odds on the right (they scroll) ---- */
  #scr-gacha .gen-tabs { flex-wrap: nowrap; }
  #scr-gacha .gen-tab { padding: 2px 7px; flex: 1 1 0; min-width: 0; }
  #scr-gacha .gen-tab b { font-size: 12.5px; }
  #scr-gacha .gen-tab .gt-gen { display: none; }
  #scr-gacha #gacha-rates .note { font-size: 11px; line-height: 1.35; }
  #scr-gacha #banner h3 { flex: none; }
  #scr-gacha #gacha-owned { flex: none; }
  #scr-gacha .split { flex: 1 1 auto !important; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(190px, 30%) !important; }
  #scr-gacha .split > div:first-child { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  #scr-gacha #banner { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  #scr-gacha #banner { min-height: 0 !important; padding: 8px 12px !important; }
  /* (23-10-2026) Centred and symmetric: the text on top, the figures in the remaining height below it (they used
     to sit absolutely on the right, over the text). */
  #scr-gacha .banner .feat { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; height: auto !important; margin: 0 !important; padding: 0; align-items: flex-end; justify-content: center; gap: 12px; }
  #scr-gacha .banner h3, #scr-gacha #gacha-owned { position: relative; z-index: 2; max-width: none; text-align: center; }
  #scr-gacha .banner .bn-mon { height: 100%; min-height: 0; }
  #scr-gacha .banner .bn-mon canvas { width: auto !important; height: auto !important; max-height: 100%; max-width: 160px; }
  #scr-gacha .banner .bn-mon:not(.main) canvas { max-height: 80%; }
  #scr-gacha .banner .bn-mon:not(.main) { margin: 0 0 3px !important; }
  #scr-gacha .banner .bn-ghost { display: none; }
  #scr-gacha .split .row { margin-top: 6px !important; flex: none; }
  #scr-gacha .split .row .btn { padding: 6px 8px; font-size: 13px; }
  #scr-gacha .tickets-line, #scr-gacha #gacha-pity { margin: 3px 0 0 !important; font-size: 11.5px; flex: none; }
  #scr-gacha #gacha-rates { max-height: none !important; min-height: 0; overflow-y: auto; }

  /* ---- Missions, achievements, profile ---- */
  #goals-body .mission { padding: 6px 10px; }
  #goals-body .goals-h { margin: 4px 0 4px !important; }
  #goals-body .ach-grid { gap: 6px; }
  #goals-body .ach { padding: 6px 8px; }
  #goals-body .fav-slot canvas { width: 96px; height: 80px; }

  /* ---- Settings ---- */
  #scr-settings .tabs { margin: 0 0 6px !important; }
  #set-body .set-row { padding: 5px 0; }
  #set-body .set-h { margin: 6px 0 2px; }

  /* ---- Choose your partner: the grid scrolls ---- */
  #scr-starters h2 { margin: 0; }
  #scr-starters .box > .sub { margin: 0 0 4px; }
  #starter-grid { flex: 1 1 auto !important; min-height: 0; max-height: none !important; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)) !important; grid-auto-rows: 92px; gap: 6px; align-content: start; }
  #starter-grid .cell canvas { width: 72px; height: 62px; }
  #starter-grid .cell b { font-size: 12px; }
  #scr-starters .box > .row.between:last-child { margin-top: 6px !important; flex: none; }

  /* ---- Friends, room, leaderboard, moderation ---- */
  #fr-add { flex: none; margin: 4px 0; }
  #fr-msg:empty { display: none; }
  #scr-rank #rk-mode, #scr-rank #rk-period { margin: 0 0 4px; }
  #scr-rank .rk-tools { flex: none; margin: 0 0 4px; flex-wrap: nowrap; }
  #scr-rank #rk-me { flex: none; }

  /* ---- Legal, support, news ---- */
  #legal-body h3 { margin: 8px 0 2px; font-size: 15px; }
  #legal-body p { font-size: 12.5px; line-height: 1.45; margin: 0 0 6px; }
  #sup-body p { font-size: 13px; margin: 0 0 6px; }
  #news-body .news-day h3 { margin: 6px 0 4px; }
  #news-body li { font-size: 12.5px; line-height: 1.4; }
}

/* Button editor: the bar starts at the top edge, so its label goes underneath (it was cut off at the top). */
.lay-bar .lay-tag { top: calc(100% + 3px); }

@media (max-height: 520px) {
  /* Short windows: their content in the middle of the screen. */
  #scr-test > .box, #scr-result > .box, #scr-nick > .box, #scr-recover > .box, #scr-levelup > .box, #scr-item > .box,
  #scr-bond > .box, #scr-forget > .box { justify-content: center; }
  #scr-levelup .box > h2, #scr-item .box > h2, #scr-bond .box > h2, #scr-forget .box > h2 { margin: 0; }
  #cards, #bond-cards, #forget-cards, #item-cards { flex: 0 1 auto !important; min-height: 0; overflow-y: auto; }

  /* ---- Pause: buttons and sound on the left, your build on the right (it scrolls) ---- */
  #scr-pause > .box { display: grid !important; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr); grid-auto-rows: min-content;
    grid-template-rows: repeat(5, min-content) minmax(0, 1fr) auto; column-gap: 18px; align-content: stretch; text-align: left; }
  #scr-pause > .box > * { grid-column: 1; margin-left: 0; margin-right: 0; }
  #scr-pause > .box > h2 { margin: 0 0 4px; text-align: left; }
  #scr-pause > .box > .row { flex-direction: column; align-items: stretch; gap: 6px; width: 100%; }
  #scr-pause > .box > .row .btn { width: 100%; }
  #scr-pause #pause-build { grid-column: 2; grid-row: 1 / 7; min-height: 0; overflow-y: auto; margin: 0; }
  #scr-pause #pause-sound { grid-row: 6; align-self: end; margin: 6px 0 0; }
  #pause-build .b-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; gap: 6px; }
  #pause-build .b-cell { min-height: 0; padding: 5px 8px; }
  #pause-build .b-stats { gap: 4px 10px; font-size: 12px; }
  #pause-build .note { margin: 4px 0 0; font-size: 11.5px; }

  /* ---- End of the run: the results in a compact grid, the button always visible ---- */
  #scr-over > .box { text-align: center; }
  #scr-over > .box > h2 { margin: 0 0 4px; }
  #scr-over #over-stats { flex: 1 1 auto !important; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-rows: min-content; gap: 6px !important; margin: 0 0 6px !important; align-content: start; }
  #scr-over #over-stats > div { padding: 4px 8px !important; }
  #scr-over #over-stats > div[style] { grid-column: span 2 !important; }
  #scr-over #over-stats b { font-size: 16px !important; }
  #scr-over #over-stats span { font-size: 10.5px; }
  #scr-over #over-stats .st-sub { font-size: 11px; }
  #scr-over #over-stats .caught-row canvas { width: 60px !important; height: 48px !important; }
  #scr-over #btn-again { flex: none; align-self: center; min-width: 240px; }

  /* ---- Friends: compact rows in two columns ---- */
  #fr-list, #lobby-invite { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: min-content; gap: 6px !important; align-content: start; padding-right: 0 !important; }
  #fr-list > .sub, #lobby-invite > .sub { grid-column: 1 / -1; }
  .fr-row { padding: 4px 8px 4px 10px !important; gap: 8px !important; min-height: 40px; }
  .fr-row b { font-size: 14px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .fr-row .st { font-size: 11.5px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .fr-row .btn.small { padding: 4px 8px; font-size: 12px; }
  #fr-add .field { height: 34px; padding: 4px 12px; font-size: 14px; }
  #fr-add .btn { padding: 6px 12px; }
  #scr-friends #fr-me { margin: 0 0 4px; font-size: 12.5px; }


  /* ---- Leaderboard: the filters in one row, compact rows ---- */
  #scr-rank > .box { display: grid !important; grid-template-columns: auto auto minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto auto; column-gap: 8px; }
  #scr-rank > .box > * { grid-column: 1 / -1; }
  #scr-rank #rk-mode { grid-column: 1; grid-row: 2; margin: 0 0 6px !important; flex-wrap: nowrap; }
  #scr-rank #rk-period { grid-column: 2; grid-row: 2; margin: 0 0 6px !important; flex-wrap: nowrap; }
  #scr-rank .rk-tools { grid-column: 3; grid-row: 2; margin: 0 0 6px !important; min-width: 0; }
  #scr-rank .rk-tools .field { min-width: 0; flex: 1 1 auto; height: 30px; padding: 2px 8px; font-size: 12.5px; }
  #scr-rank #rk-mode .gen-tab, #scr-rank .chip { padding: 3px 9px; font-size: 12px; min-height: 0; }
  #scr-rank #rk-list { grid-row: 3; padding-top: 6px !important; }
  #scr-rank #rk-me { grid-row: 5; margin-top: 4px; padding: 4px 10px; font-size: 12.5px; }
  .rk-row { padding: 3px 10px !important; min-height: 0; gap: 8px; }
  .rk-row .pos { font-size: 14px !important; }
  .rk-row .pos img { width: 16px; height: 16px; }
  .rk-row .mons canvas { width: 33px !important; height: 30px !important; }
  .rk-row .who b { font-size: 13px !important; }
  .rk-row .who small { font-size: 11px; }
  .rk-row .time { font-size: 16px !important; }

  /* ---- Gacha results: the 10 cards and Continue on one screen ---- */
  #pull-fx { overflow: hidden !important; gap: 8px !important; padding-top: max(8px, env(safe-area-inset-top)) !important; padding-bottom: max(8px, env(safe-area-inset-bottom)) !important; }
  #pull-fx .pull-results { gap: 6px !important; max-width: 100%; flex: 0 1 auto; min-height: 0; }
  #pull-fx .pcard { width: min(140px, calc((100vw - 64px - env(safe-area-inset-left) - env(safe-area-inset-right)) / 5)) !important; padding: 4px 3px !important; border-radius: 10px; }
  #pull-fx .pcard canvas { width: min(64px, 70%) !important; height: auto !important; }
  #pull-fx .pcard b { font-size: 11.5px !important; }
  #pull-fx .pcard .tag, #pull-fx .pcard .new { font-size: 9.5px !important; }
  #pull-fx .pcard img { max-width: 20px; max-height: 20px; }
  #pull-close { position: static !important; flex: none; margin-top: 2px; padding: 7px 18px; }
}
@media (max-height: 380px) {
  #pull-fx .pcard canvas { width: min(54px, 64%) !important; }
}
@media (max-height: 380px) {
  /* The main menu on very short screens (iPhone SE, browser bars): smaller partner and buttons so it fits. */
  #scr-menu .hub { padding-top: max(44px, calc(env(safe-area-inset-top) + 40px)) !important; padding-bottom: 4px !important; row-gap: 0; }
  #scr-menu #menu-partner { height: min(30vh, 108px) !important; }
  #scr-menu .plaza-btn { margin: 0 0 2px !important; }
  #scr-menu .partner-card .nm { font-size: 17px !important; }
  #scr-menu .menu-item.play { margin-top: 3px !important; padding: 4px 14px !important; font-size: 18px !important; }
  #scr-menu .menu-item.play small { display: none !important; }
  #scr-menu .hub-btn { min-height: 40px !important; }
  #scr-menu .hub-btn .mi-ico { width: 32px !important; height: 32px !important; }
  #scr-menu .hub-side { gap: 6px !important; }
  #scr-gacha .banner .feat canvas { max-height: 100%; width: auto !important; }
  #scr-gacha .banner h3 { font-size: 16px !important; }
  #scr-gacha #gacha-owned { font-size: 11px; }
}
.fr-row b { line-height: 1.4; padding-bottom: 3px; }
@media (max-height: 520px) and (max-width: 720px) {
  #fr-list { grid-template-columns: 1fr; }
}

/* Game controller (js/core/pad.js, 19-10-2026): the button the D-pad / stick is on. */
.pad-focus { outline: 3px solid #ffd23f !important; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(255,210,63,.25), 0 0 22px rgba(255,210,63,.55) !important; position: relative; z-index: 1; }
.card.pad-focus { transform: translateY(-4px) scale(1.02); }

/* ============ region choice (20-10-2026) ============ */
.region-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; margin-top: 10px; }
@media (min-width: 900px) { .region-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.region-card { --rc: #ffd24a; --rc2: #3a2a08; appearance: none; cursor: pointer; position: relative; overflow: hidden; isolation: isolate;
  text-align: left; color: var(--ink); display: flex; flex-direction: column; padding: 0; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent);
  background: linear-gradient(170deg, color-mix(in srgb, var(--rc2) 85%, #000) 0%, #07070c 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 22px rgba(0,0,0,.55);
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .14s ease-out, translate .18s cubic-bezier(.2,.9,.3,1.3), scale .18s cubic-bezier(.2,.9,.3,1.3), box-shadow .18s, border-color .18s;
  animation: rg-in .45s cubic-bezier(.2,.9,.3,1.2) var(--d, 0s) both; }
@keyframes rg-in { from { opacity: 0; translate: 0 14px; scale: .96; } }
.rg-art { position: relative; height: 112px; display: grid; place-items: center; overflow: hidden; isolation: isolate; }     /* (isolate: the layers below 0 stay inside the picture) */
.rg-aura { position: absolute; inset: 8% 14% -10%; border-radius: 50%; z-index: 0; mix-blend-mode: screen;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 70%, transparent), transparent 75%);
  filter: blur(2px); opacity: .55; animation: rg-pulse 3.2s ease-in-out infinite; }
@keyframes rg-pulse { 50% { opacity: .85; transform: scale(1.08); } }
/* The region's scene (a piece of its world) with a sky of its colour and drifting particles. */
.rg-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; z-index: -3;
  opacity: 0; transition: opacity .5s; transform: scale(1.08); animation: rg-pan 18s ease-in-out infinite alternate; }
.rg-scene.ready { opacity: 1; }
@keyframes rg-pan { to { transform: scale(1.16) translate(-3%, -2%); } }
.rg-sky { position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc2) 75%, transparent) 0%, transparent 45%, rgba(0,0,0,.15) 70%, rgba(0,0,0,.55) 100%),
              radial-gradient(ellipse 70% 55% at 50% 60%, transparent, rgba(0,0,0,.45)); }
.rg-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .85; }
.rg-fx.fx-snow { background-image: radial-gradient(circle, #fff 1.3px, transparent 1.9px), radial-gradient(circle, rgba(220,235,255,.8) 1px, transparent 1.5px);
  background-size: 30px 30px, 19px 19px; animation: fx-fall 7s linear infinite; }
.rg-fx.fx-embers { background-image: radial-gradient(circle, #ffb04a 1.3px, transparent 2px), radial-gradient(circle, #ff5a3c 1px, transparent 1.6px);
  background-size: 34px 34px, 23px 23px; animation: fx-rise 5s linear infinite; }
.rg-fx.fx-bubbles { background-image: radial-gradient(circle, transparent 1.6px, rgba(200,240,255,.85) 2px, transparent 2.6px), radial-gradient(circle, rgba(200,240,255,.6) 1px, transparent 1.6px);
  background-size: 36px 36px, 21px 21px; animation: fx-rise 8s linear infinite; }
.rg-fx.fx-petals { background-image: radial-gradient(ellipse 2.4px 1.4px, #ffb3d9 90%, transparent), radial-gradient(ellipse 2px 1.2px, #fff0f6 90%, transparent);
  background-size: 40px 34px, 27px 25px; animation: fx-drift 9s linear infinite; }
.rg-fx.fx-leaves { background-image: radial-gradient(ellipse 2.6px 1.5px, #8fd16a 90%, transparent), radial-gradient(ellipse 2px 1.2px, #d6f0a0 90%, transparent);
  background-size: 44px 36px, 29px 27px; animation: fx-drift 10s linear infinite; }
.rg-fx.fx-sparks { background-image: radial-gradient(circle, #fff7b0 1.1px, transparent 1.7px), radial-gradient(circle, #9fe0ff 1px, transparent 1.5px);
  background-size: 26px 26px, 17px 17px; animation: fx-flicker 1.6s steps(2) infinite, fx-rise 6s linear infinite; }
.rg-fx.fx-stars { background-image: radial-gradient(circle, #fff 1.2px, transparent 1.8px), radial-gradient(circle, #ffe08a 1px, transparent 1.6px);
  background-size: 31px 29px, 20px 22px; animation: fx-flicker 2.4s steps(3) infinite, fx-drift 16s linear infinite; }
@keyframes fx-fall { to { background-position: 14px 60px, -8px 38px; } }
@keyframes fx-rise { to { background-position: -6px -68px, 8px -46px; } }
@keyframes fx-drift { to { background-position: 80px 34px, 54px 50px; } }
@keyframes fx-flicker { 50% { opacity: .35; } }
/* Depth: the foreground grass, a glowing base under the legendary, the generation badge, the glare. */
.rg-front { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; z-index: 2;
  pointer-events: none; opacity: 0; transition: opacity .5s; }
.rg-front.ready { opacity: 1; }
.rg-base { position: absolute; left: 50%; bottom: 6%; width: 52%; height: 20%; translate: -50% 0; z-index: 0; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--rc) 85%, #fff) 0%, color-mix(in srgb, var(--rc) 45%, transparent) 45%, transparent 100%);
  mix-blend-mode: screen; animation: rg-base 2.6s ease-in-out infinite; }
@keyframes rg-base { 50% { scale: 1.12 1.05; opacity: .7; } }
.rg-gen { position: absolute; left: 7px; top: 7px; z-index: 3; padding: 1px 7px; border-radius: 999px;
  font: 800 10.5px var(--font); letter-spacing: .5px; color: #fff; text-shadow: 0 1px 0 #000;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 85%, #fff), color-mix(in srgb, var(--rc) 70%, #000));
  border: 1px solid rgba(0,0,0,.5); box-shadow: 0 2px 6px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.4); }
.region-card.locked .rg-gen { filter: grayscale(1); }
.rg-glare { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.28), transparent 45%); mix-blend-mode: overlay; }
.region-card:hover:not([disabled]) .rg-glare { opacity: 1; }
/* Each region's atmosphere. */
.rg-x { position: absolute; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: screen; }
.rg-x.x-rays { background: repeating-conic-gradient(from 200deg at 18% -12%, color-mix(in srgb, var(--rc) 35%, #fff) 0deg 3deg, transparent 3deg 11deg);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 75%); mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 75%);
  animation: x-rays 7s ease-in-out infinite; opacity: .5; }
@keyframes x-rays { 50% { opacity: .22; transform: rotate(3deg); } }
.rg-x.x-shimmer { background: repeating-linear-gradient(170deg, transparent 0 9px, rgba(220,245,255,.22) 9px 11px, transparent 11px 22px);
  background-size: 100% 200%; animation: x-shimmer 4s linear infinite;
  -webkit-mask-image: linear-gradient(180deg, transparent 35%, #000); mask-image: linear-gradient(180deg, transparent 35%, #000); }
@keyframes x-shimmer { to { background-position: 0 -88px; } }
.rg-x.x-aurora { background: linear-gradient(100deg, transparent 10%, rgba(120,255,200,.45) 30%, rgba(150,140,255,.5) 55%, rgba(255,140,220,.35) 75%, transparent 92%);
  background-size: 200% 100%; filter: blur(5px); animation: x-aurora 9s ease-in-out infinite alternate;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 55%); mask-image: linear-gradient(180deg, #000 0%, transparent 55%); }
@keyframes x-aurora { to { background-position: 100% 0; } }
.rg-x.x-haze { background: radial-gradient(ellipse 80% 40% at 50% 100%, rgba(255,140,60,.45), transparent 70%);
  animation: x-haze 3s ease-in-out infinite; }
@keyframes x-haze { 50% { opacity: .55; transform: scaleY(1.15); transform-origin: bottom; } }
.rg-x.x-halo { background: repeating-conic-gradient(from 0deg at 50% 52%, rgba(255,224,138,.55) 0deg 4deg, transparent 4deg 15deg);
  -webkit-mask-image: radial-gradient(circle at 50% 52%, transparent 24%, #000 26%, #000 34%, transparent 36%, transparent 44%, rgba(0,0,0,.6) 46%, transparent 49%);
  mask-image: radial-gradient(circle at 50% 52%, transparent 24%, #000 26%, #000 34%, transparent 36%, transparent 44%, rgba(0,0,0,.6) 46%, transparent 49%);
  animation: rg-spin 16s linear infinite; }
.region-card.locked .rg-x, .region-card.locked .rg-base { animation: none; opacity: .15; }
.rg-mon { position: absolute; inset: 0; z-index: 1; filter: drop-shadow(0 3px 0 rgba(0,0,0,.45)); width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; display: block; }
.rg-trio { position: absolute; left: 6px; bottom: 7px; display: flex; gap: 0; z-index: 3; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)); }
.rg-trio canvas { width: 40px; height: 35px; object-fit: contain; image-rendering: pixelated; margin-right: -6px; }
.rg-padlock { position: absolute; right: 10px; top: 10px; line-height: 0; z-index: 2; filter: drop-shadow(0 2px 3px #000); }
.rg-info { display: flex; flex-direction: column; gap: 2px; padding: 9px 13px 12px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 30%); border-top: 1px solid color-mix(in srgb, var(--rc) 25%, transparent); }
.rg-info b { font-size: 19px; color: #fff; text-shadow: 0 2px 0 #000, 0 0 14px color-mix(in srgb, var(--rc) 60%, transparent); }
.rg-info span { font: 700 12px var(--font-body); color: color-mix(in srgb, var(--rc) 70%, #ddd); }
.rg-info small { font: 600 12px var(--font-body); color: #b8b8c4; }
.rg-info small b { font-size: 12px; color: var(--gold); text-shadow: none; }
.rg-shine { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.16) 48%, transparent 58%);
  background-size: 260% 100%; background-position: 130% 0; animation: rg-shine 5.5s ease-in-out infinite; animation-delay: calc(var(--d, 0s) * 6); }
@keyframes rg-shine { 0%, 62% { background-position: 130% 0; } 100% { background-position: -40% 0; } }
.region-card:hover:not([disabled]), .region-card.pad-focus { translate: 0 -4px; scale: 1.02; border-color: var(--rc);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 12px 28px rgba(0,0,0,.6), 0 0 24px color-mix(in srgb, var(--rc) 45%, transparent); }
.region-card.on { border-color: var(--rc); box-shadow: inset 0 0 0 1px var(--rc), 0 0 22px color-mix(in srgb, var(--rc) 40%, transparent); }
.region-card.locked { cursor: default; filter: saturate(.25) brightness(.7); }
.region-card.locked .rg-aura, .region-card.locked .rg-shine, .region-card.locked .rg-fx, .region-card.locked .rg-scene { animation: none; }
.region-card.locked .rg-aura, .region-card.locked .rg-fx { opacity: .15; }
.region-card .rg-lock { color: #ff9aa6; }
.region-card.endless::before { content: ''; position: absolute; inset: -60%; z-index: -5;
  background: conic-gradient(from 0deg, #ffd24a, #ff8ad8, #8ad8ff, #b98bff, #ffd24a); animation: rg-spin 6s linear infinite; opacity: .55; }
.region-card.endless::after { content: ''; position: absolute; inset: 2px; z-index: -4; border-radius: 14px;
  background: linear-gradient(170deg, #2a1f08 0%, #07070c 72%); }
@keyframes rg-spin { to { transform: rotate(360deg); } }
@media (max-height: 520px) {
  .region-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
  .region-card { border-radius: 11px; }
  .rg-art { height: clamp(62px, 20vh, 120px); }
  .rg-trio { display: none; }
  .rg-padlock { right: 5px; top: 5px; }
  .rg-gen { font-size: 8.5px; padding: 0 5px; left: 4px; top: 4px; }
  .rg-info { padding: 4px 7px 6px; gap: 0; }
  .rg-info b { font-size: 13.5px; }
  .rg-info span, .rg-info small { font-size: 10px; }
  #scr-region .sub { font-size: 11.5px; margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .region-card, .rg-aura, .rg-fx, .rg-x, .rg-base, .rg-scene, .rg-shine, .region-card.endless::before { animation: none !important; } }

/* ============ IVs in the Pokémon card (20-10-2026) ============ */
.iv-box { margin: 6px 0 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(185,139,255,.35);
  background: linear-gradient(160deg, rgba(185,139,255,.12), rgba(120,220,255,.05)); }
.iv-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.iv-h b { font-size: 14px; color: #d9c4ff; display: inline-flex; align-items: center; gap: 4px; }
.iv-h span { font: 700 12px var(--font-body); color: var(--gold); }
.iv-hint { font: 600 11.5px var(--font-body); color: #b8b8c4; margin: 0 0 6px !important; }
.iv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; }
.iv-row { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 0 5px; font-size: 12px; }
.iv-row b { font-size: 12px; color: var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-row span { font: 800 12px var(--font); color: #fff; }
.iv-row small { grid-column: 2 / -1; font: 600 10.5px var(--font-body); color: #b8b8c4; margin-top: -2px; }
.iv-row.zero { opacity: .55; }
@media (max-height: 520px) {
  .iv-box { padding: 5px 7px; margin: 4px 0; }
  .iv-row small { display: none; }
  .iv-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* ============ PC box and IV screens (20-10-2026) ============ */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; margin-top: 8px; }
.pc-card, .ivc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 10px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.25)); box-shadow: inset 0 1px 0 var(--hi); text-align: center; }
.pc-card.can { border-color: rgba(255,214,120,.6); box-shadow: inset 0 1px 0 var(--hi), 0 0 16px rgba(255,190,60,.18); }
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; width: 100%; }
.pc-top b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-rank { display: inline-flex; align-items: center; gap: 2px; font: 800 14px var(--font); color: var(--gold); }
.pc-copies { font: 800 15px var(--font); display: inline-flex; align-items: center; gap: 4px; }
.pc-bonus { font: 600 11.5px var(--font-body); color: #d9e6ff; min-height: 14px; }
.pc-next { font: 600 11px var(--font-body); color: var(--muted); }
.pc-card .btn { margin-top: 4px; width: 100%; }
.pc-line { font-size: 13px; margin: 2px 0 6px; color: #d9e6ff; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ivc-tot { font: 800 14px var(--font); color: #d9c4ff; }
.ivc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px 8px; width: 100%; }
.ivc-grid span { display: inline-flex; align-items: center; gap: 3px; justify-content: center; }
.ivc-grid b { font: 800 13px var(--font); color: var(--c); }
.ivc.zero { opacity: .55; }
@media (max-height: 520px) {
  .pc-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 4px; }
  .pc-card, .ivc { padding: 5px 7px 7px; gap: 1px; }
  .pc-card canvas, .ivc canvas { height: 52px; width: auto; }
  .pc-next { display: none; }
  #scr-pc .sub:not(#pc-total), #scr-ivs .sub:not(#iv-total) { display: none; }
}

/* ============ PC Box: the Pokémon Storage System (20-10-2026) ============ */
.pcb { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 14px; margin-top: 6px; min-height: 0; }
.pcb-left { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pcb-head { display: flex; align-items: center; gap: 8px; }
.pcb-name { flex: 1; text-align: center; font: 800 20px var(--font); letter-spacing: 2px; color: #fff; text-shadow: 0 2px 0 #000;
  padding: 6px 12px; border-radius: 12px; border: 2px solid #000;
  background: linear-gradient(180deg, #5f8bd6, #2f4f96); box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.25), 0 4px 0 #000; }
.pcb-arrow { appearance: none; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; border: 2px solid #000; font: 800 22px var(--font); color: #fff;
  background: linear-gradient(180deg, #ffd24a, #e08a12); box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 3px 0 #000; }
.pcb-arrow:active { translate: 0 2px; box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 1px 0 #000; }
.pcb-wall { position: relative; border-radius: 14px; border: 3px solid #000; padding: 10px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 6px 0 #000;
  --w1: #4f9a5a; --w2: #3b7c46; background-color: var(--w1); }
.pcb-wall.wp-forest { --w1: #5aa55f; --w2: #3f8547; background-image: radial-gradient(circle at 25% 30%, var(--w2) 0 9px, transparent 10px), radial-gradient(circle at 75% 75%, var(--w2) 0 11px, transparent 12px); background-size: 64px 64px; }
.pcb-wall.wp-city { --w1: #7d8aa6; --w2: #66728c; background-image: linear-gradient(var(--w2) 2px, transparent 2px), linear-gradient(90deg, var(--w2) 2px, transparent 2px); background-size: 28px 28px; }
.pcb-wall.wp-desert { --w1: #e6c27a; --w2: #d4a95c; background-image: repeating-linear-gradient(170deg, var(--w2) 0 6px, transparent 6px 26px); }
.pcb-wall.wp-savanna { --w1: #f0a65a; --w2: #e08b3a; background-image: radial-gradient(ellipse 40px 14px at 50% 100%, var(--w2) 98%, transparent), radial-gradient(circle at 80% 20%, #ffe08a 0 12px, transparent 13px); background-size: 80px 40px, 160px 120px; }
.pcb-wall.wp-cave { --w1: #8a6a4e; --w2: #6f5340; background-image: radial-gradient(circle at 30% 40%, var(--w2) 0 6px, transparent 7px), radial-gradient(circle at 70% 80%, var(--w2) 0 4px, transparent 5px); background-size: 46px 46px; }
.pcb-wall.wp-sea { --w1: #4a8fd6; --w2: #3a78bf; background-image: repeating-radial-gradient(circle at 50% 120%, var(--w2) 0 6px, transparent 6px 18px); background-size: 60px 30px; }
.pcb-wall.wp-snow { --w1: #bcd8f0; --w2: #ffffff; background-image: radial-gradient(circle, var(--w2) 0 2px, transparent 3px), radial-gradient(circle, rgba(255,255,255,.7) 0 1.5px, transparent 2.5px); background-size: 34px 34px, 21px 21px; background-position: 0 0, 11px 7px; }
.pcb-wall.wp-checks { --w1: #f4b9cf; --w2: #ffe6ef; background-image: conic-gradient(var(--w2) 25%, transparent 0 50%, var(--w2) 0 75%, transparent 0); background-size: 40px 40px; }
.pcb-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pcb-slot { appearance: none; cursor: pointer; position: relative; aspect-ratio: 1 / 0.92; display: grid; place-items: center; padding: 0;
  border-radius: 10px; border: 2px solid rgba(0,0,0,.35); background: rgba(255,255,255,.22); box-shadow: inset 0 2px 0 rgba(255,255,255,.3);
  transition: transform .12s, background .12s; }
.pcb-slot canvas { position: absolute; inset: 4%; width: 92%; height: 92%; object-fit: contain; image-rendering: pixelated; }
.pcb-slot:hover:not(.empty) { transform: translateY(-2px); background: rgba(255,255,255,.38); }
.pcb-slot.empty { cursor: default; background: rgba(0,0,0,.12); border-color: rgba(0,0,0,.18); box-shadow: none; }
.pcb-slot.can { box-shadow: inset 0 2px 0 rgba(255,255,255,.3), 0 0 0 2px #ffd24a, 0 0 12px rgba(255,210,74,.7); }
.pcb-slot.on { background: rgba(255,255,255,.6); border-color: #000; }
.pcb-slot.on::after { content: ''; position: absolute; top: -16px; left: 50%; translate: -50% 0; width: 0; height: 0;
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 12px solid #ff4d4d; filter: drop-shadow(0 2px 0 #000);
  animation: pcb-hand .7s ease-in-out infinite alternate; }
@keyframes pcb-hand { to { translate: -50% 5px; } }
.pcb-r { position: absolute; left: 3px; top: 2px; display: inline-flex; align-items: center; gap: 1px; font: 800 10px var(--font); color: #fff; text-shadow: 0 1px 0 #000, 1px 0 0 #000; }
.pcb-c { position: absolute; right: 3px; bottom: 2px; font: 800 11px var(--font); color: #fff; padding: 0 4px; border-radius: 6px; background: rgba(0,0,0,.65); }
.pcb-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pcb-help { font: 600 12px var(--font-body); color: var(--muted); }
/* the summary on the right */
.pcb-side { --tc: #ffd24a; display: flex; flex-direction: column; gap: 7px; padding: 0 0 12px; border-radius: 16px; overflow: hidden; border: 3px solid #000;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 30%, #0b0b12) 0%, #0b0b12 45%); box-shadow: 0 6px 0 #000; }
.pcs-head { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 85%, #000), color-mix(in srgb, var(--tc) 45%, #000)); border-bottom: 2px solid #000; }
.pcs-head span { font: 800 12px var(--font); color: rgba(255,255,255,.8); }
.pcs-head b { font-size: 19px; color: #fff; text-shadow: 0 2px 0 #000; }
.pcs-stage { position: relative; height: 130px; background: radial-gradient(ellipse 40% 14% at 50% 86%, color-mix(in srgb, var(--tc) 60%, transparent), transparent 75%); }
.pcs-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.pcs-types { text-align: center; }
.pcs-rank, .pcs-row { display: flex; justify-content: space-between; align-items: center; padding: 0 14px; font-size: 13px; }
.pcs-rank > span, .pcs-row > span { color: var(--muted); font: 700 12px var(--font-body); }
.pcs-stars { display: inline-flex; gap: 2px; align-items: center; color: var(--gold); font: 800 15px var(--font); }
.pcs-stars i { line-height: 0; filter: grayscale(1) brightness(.45); }
.pcs-stars i.on { filter: none; }
.pcs-stars.pop { animation: upg-pop .5s cubic-bezier(.2,1.5,.4,1); }
.pcs-row b { display: inline-flex; align-items: center; gap: 4px; font: 800 15px var(--font); }
.pcs-bonus { margin: 0 12px; padding: 6px 9px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.pcs-bonus small { display: block; font: 700 11px var(--font-body); color: var(--muted); }
.pcs-bonus b { font: 700 12.5px var(--font-body); color: #e6f0ff; }
.pcs-bonus.next b { color: var(--gold); }
.pcb-side .btn { margin: 4px 12px 0; }
@media (max-width: 900px) and (min-height: 521px) { .pcb { grid-template-columns: 1fr; } }
@media (max-height: 520px) {
  .pcb { grid-template-columns: minmax(0, 1fr) 230px; gap: 8px; margin-top: 2px; }
  .pcb-head { gap: 6px; } .pcb-name { font-size: 15px; padding: 3px 8px; } .pcb-arrow { width: 30px; height: 30px; font-size: 17px; }
  .pcb-wall { padding: 5px; border-width: 2px; }
  .pcb-grid { gap: 3px; }
  .pcb-slot { aspect-ratio: auto; height: calc((100dvh - 196px) / 5); min-height: 28px; border-radius: 7px; }
  .pcb-foot .chip { padding: 2px 8px; font-size: 11px; }
  .pcb-help { display: none; }
  .pcb-side { gap: 3px; padding-bottom: 6px; }
  .pcs-head { padding: 4px 9px; } .pcs-head b { font-size: 15px; }
  .pcs-stage { height: 72px; }
  .pcs-bonus { padding: 3px 7px; } .pcs-bonus b { font-size: 11px; }
  .pcs-types { display: none; }
}

/* ============ PC Box and IVs, more spectacular (20-10-2026) ============ */
.pcb-name small { font-size: 12px; letter-spacing: 1px; opacity: .85; }
.pcb-name .pcb-pages { float: right; font-size: 11px; opacity: .7; margin-top: 4px; }
.pcb-wall { overflow: hidden; animation: pcb-drift 22s linear infinite; }
@keyframes pcb-drift { to { background-position: 128px 64px, -64px 128px; } }
.pcb-wall::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 30%, transparent 75%, rgba(0,0,0,.18)); }
.pcb-grid.slide-l { animation: pcb-slide-l .32s cubic-bezier(.2,.9,.3,1); }
.pcb-grid.slide-r { animation: pcb-slide-r .32s cubic-bezier(.2,.9,.3,1); }
@keyframes pcb-slide-l { from { translate: 40% 0; opacity: 0; } }
@keyframes pcb-slide-r { from { translate: -40% 0; opacity: 0; } }
.pcb-slot.on canvas { animation: pcb-bob .5s ease-in-out infinite alternate; }
@keyframes pcb-bob { to { translate: 0 -4px; } }
.pcb-slot.can { animation: pcb-can 1.6s ease-in-out infinite; }
@keyframes pcb-can { 50% { box-shadow: inset 0 2px 0 rgba(255,255,255,.3), 0 0 0 2px #ffd24a, 0 0 20px rgba(255,210,74,1); } }
.pcb-sh { position: absolute; right: 3px; top: 2px; line-height: 0; animation: x-flick 1.4s steps(2) infinite; }
@keyframes x-flick { 50% { opacity: .35; } }
.pcs-stage { overflow: hidden; }
.pcs-rays { position: absolute; inset: -40%; pointer-events: none; opacity: .45; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--tc) 70%, #fff) 0deg 6deg, transparent 6deg 20deg);
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 55%); mask-image: radial-gradient(circle, #000 18%, transparent 55%);
  animation: rg-spin 14s linear infinite; }
.pcs-prog { position: relative; margin: 0 12px; height: 16px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); overflow: hidden; }
.pcs-prog i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #6ad0ff, #b98bff); border-radius: 999px; transition: width .4s; }
.pcs-prog.full i { background: linear-gradient(90deg, #ffe58a, #f4a21f); animation: pcs-shine 1.4s ease-in-out infinite; }
@keyframes pcs-shine { 50% { filter: brightness(1.35); } }
.pcs-prog span { position: relative; display: block; text-align: center; font: 800 10.5px/16px var(--font); color: #fff; text-shadow: 0 1px 0 #000; }
.pcs-burst { position: absolute; left: 50%; top: 55%; line-height: 0; pointer-events: none; z-index: 3;
  animation: pcs-burst .9s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes pcs-burst { from { transform: translate(-50%, -50%) rotate(var(--a)) translateY(0) scale(1.4); opacity: 1; }
  to { transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(.4); opacity: 0; } }
.pcb-side.celebrate { animation: pcs-flash .6s ease-out; }
@keyframes pcs-flash { 0% { box-shadow: 0 6px 0 #000, 0 0 0 4px #fff, 0 0 60px #ffd24a; } 100% { box-shadow: 0 6px 0 #000; } }
.pcs-stars.pop i.on { animation: pcs-star .5s cubic-bezier(.2,1.6,.4,1) both; }
.pcs-stars.pop i.on:nth-child(2) { animation-delay: .08s; } .pcs-stars.pop i.on:nth-child(3) { animation-delay: .16s; }
.pcs-stars.pop i.on:nth-child(4) { animation-delay: .24s; } .pcs-stars.pop i.on:nth-child(5) { animation-delay: .32s; }
@keyframes pcs-star { from { scale: 0; rotate: -90deg; } }
/* IV screen */
.ivx { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; margin-top: 6px; min-height: 0; }
.ivx-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; align-content: start; }
.ivc { appearance: none; cursor: pointer; display: grid; grid-template-columns: 52px minmax(0, 1fr) 46px; align-items: center; gap: 6px; padding: 6px 8px;
  border-radius: 12px; border: 1px solid rgba(185,139,255,.3); background: linear-gradient(160deg, rgba(185,139,255,.12), rgba(0,0,0,.25)); color: var(--ink); text-align: left;
  transition: transform .12s, border-color .12s, box-shadow .12s; }
.ivc canvas { width: 52px; height: 46px; object-fit: contain; image-rendering: pixelated; }
.ivc:hover { transform: translateY(-2px); border-color: rgba(185,139,255,.7); }
.ivc.on { border-color: #c8a6ff; box-shadow: 0 0 0 1px #c8a6ff, 0 0 18px rgba(185,139,255,.45); }
.ivc-n { display: flex; flex-direction: column; min-width: 0; }
.ivc-n b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ivc-n small { font: 700 11px var(--font-body); color: #d9c4ff; }
/* (23-10-2026) The IV web: sectors in each stat's colour, glowing outline, turning energy disc (big one). */
.ivhex-ring { fill: none; stroke: rgba(255,255,255,.1); stroke-width: 1; }
.ivhex-ring.outer { stroke: rgba(230,220,255,.35); stroke-width: 1.5; }
.ivhex-axis { stroke-width: 1; opacity: .35; }
.ivhex.big .ivhex-axis { stroke-width: 1.5; opacity: .45; }
.ivhex.big { overflow: visible; }
.ivhex-sec { opacity: .85; }
.ivhex-out { fill: rgba(255,255,255,.08); stroke: #f3ecff; stroke-width: 1.6; stroke-linejoin: round; opacity: .95; }
.ivhex-val { animation: ivhex-in .7s cubic-bezier(.2,1.3,.4,1); }
.ivhex.big .ivhex-out { stroke-width: 2.2; animation: ivhex-breathe 2.6s ease-in-out infinite; }
@keyframes ivhex-in { from { transform: scale(0); opacity: 0; } }
@keyframes ivhex-breathe { 50% { opacity: .55; } }
.ivhex-dot { filter: drop-shadow(0 0 3px currentColor); }
.ivhex-halo { opacity: 0; transform-box: fill-box; transform-origin: center; animation: ivhex-halo 2.4s ease-out infinite; }
@keyframes ivhex-halo { 0% { transform: scale(.4); opacity: .75; } 100% { transform: scale(2.4); opacity: 0; } }
.ivhex-ray { stroke: rgba(185,139,255,.16); stroke-width: 1; }
.ivhex-orbit { fill: none; stroke: rgba(154,230,255,.28); stroke-width: 1; stroke-dasharray: 2 6; transform-box: fill-box; transform-origin: center; }
.ivhex-orbit2 { fill: none; stroke: rgba(255,214,120,.22); stroke-width: 1; stroke-dasharray: 10 14; transform-box: fill-box; transform-origin: center; }
.ivhex-spin { animation: ivhex-spin 60s linear infinite; }
.ivhex-spin-r { animation: ivhex-spin 40s linear infinite reverse; }
@keyframes ivhex-spin { to { transform: rotate(360deg); } }
.ivhex-core { fill: #fff; filter: drop-shadow(0 0 6px #9ae6ff); animation: ivhex-breathe 1.8s ease-in-out infinite; }
.ivhex-g { animation: ivhex-pop .5s cubic-bezier(.2,1.4,.4,1) both; transform-box: fill-box; transform-origin: center; }
.ivhex-g.zero { opacity: .45; }
@keyframes ivhex-pop { from { transform: scale(0); opacity: 0; } }
.ivhex-ico { image-rendering: pixelated; filter: drop-shadow(0 0 3px rgba(0,0,0,.9)); }
.ivhex-lab { font: 800 13px var(--font); text-anchor: middle; paint-order: stroke; stroke: #000; stroke-width: 3px; }
@media (prefers-reduced-motion: reduce) { .ivhex-spin, .ivhex-spin-r, .ivhex-halo, .ivhex-core, .ivhex.big .ivhex-out, .ivhex-g { animation: none; } .ivhex-halo { display: none; } }
.ivx-side { --tc: #b98bff; display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; border-radius: 16px; overflow: hidden; border: 3px solid #000;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 28%, #0b0b12) 0%, #0b0b12 50%); box-shadow: 0 6px 0 #000; }
.ivx-gem { margin-left: auto; line-height: 0; animation: ivx-gem 3s linear infinite; }
@keyframes ivx-gem { 50% { transform: rotateY(180deg) scale(1.1); filter: hue-rotate(120deg); } }
.ivx-top { display: grid; grid-template-columns: 1fr 190px; align-items: center; }
.ivx-top .pcs-stage { height: 120px; }
.ivx-total { text-align: center; font: 700 13px var(--font-body); color: #d9c4ff; }
.ivx-total b { font: 800 22px var(--font); color: #fff; text-shadow: 0 0 12px rgba(185,139,255,.8); }
.ivx-rows { display: flex; flex-direction: column; gap: 3px; padding: 0 12px; }
.ivx-row { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 0 6px; padding: 3px 7px; border-radius: 8px; background: rgba(255,255,255,.04); }
.ivx-row b { color: var(--c); font-size: 13px; }
.ivx-row span { font: 800 14px var(--font); }
.ivx-row small { grid-column: 2 / -1; font: 600 11px var(--font-body); color: #b8b8c4; margin-top: -2px; }
.ivx-row.zero { opacity: .5; }
.ivx-side .iv-hint { margin: 0 12px !important; }
/* IV transfer (22-10-2026) */
.ivx-move { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 10px 12px 4px; }
.ivx-move small { font: 600 11px var(--font-body); color: var(--muted); text-align: center; }
/* IV pyramid (28-10-2026): the main on top, 2 + 4 slots below, lines between them; the picker and the steps in the same panel */
.ivx-side.ivp-on { padding-bottom: 8px; }
.ivp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 2px; }
.ivp-head > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ivp-head b { font: 800 15px var(--font); color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.ivp-head small { font: 600 11px var(--font-body); color: #b8b8c4; }
.ivp-coins { flex: none; font: 800 13px var(--font-body); color: var(--gold); display: inline-flex; align-items: center; gap: 4px; }
.ivp-tree { position: relative; display: flex; flex-direction: column; gap: 22px; padding: 8px 8px 4px; }
.ivp-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ivp-lines path { fill: none; stroke-width: 3; stroke-linecap: round; }
.ivp-lines path.off { stroke: rgba(255,255,255,.14); stroke-dasharray: 4 6; }
.ivp-lines path.on { stroke: url(#ivp-grad); stroke-dasharray: 10 8; filter: drop-shadow(0 0 4px rgba(255,95,208,.6)); animation: ivp-flow 1.2s linear infinite; }
@keyframes ivp-flow { to { stroke-dashoffset: -18; } }
.ivp-tier { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 12px; }
.ivp-tier.t2 { gap: 6px; }
.ivp-node { appearance: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 6px 7px; border-radius: 14px; border: 2px solid rgba(255,255,255,.14); background: rgba(10,10,18,.8); color: #fff; width: 104px; min-width: 0; font-family: var(--font); transition: transform .15s, border-color .15s, box-shadow .15s; }
.ivp-node b { font-size: 12px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ivp-node small { font: 700 10.5px var(--font-body); color: #d9c4ff; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; max-width: 100%; overflow: hidden; }
.ivp-node:hover:not([disabled]) { transform: translateY(-2px); border-color: rgba(185,139,255,.7); }
.ivp-node.main { width: 140px; padding-top: 4px; border-color: color-mix(in srgb, var(--c, #b98bff) 70%, #fff); box-shadow: 0 0 0 1px var(--c, #b98bff), 0 0 24px color-mix(in srgb, var(--c, #b98bff) 55%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c, #b98bff) 22%, #0b0b12), rgba(10,10,18,.9)); }
.ivp-node.main b { font-size: 14px; }
.ivp-node.main small { color: var(--g, #d9c4ff); }
.ivp-node.filled { border-color: color-mix(in srgb, var(--c, #b98bff) 60%, #000); box-shadow: 0 0 14px color-mix(in srgb, var(--c, #b98bff) 35%, transparent); }
.ivp-node.empty { border-style: dashed; border-color: rgba(185,139,255,.5); background: rgba(185,139,255,.06); }
.ivp-node.next { border-style: dashed; border-color: rgba(255,210,63,.55); background: rgba(255,210,63,.05); } .ivp-node.next small { color: var(--gold); }
.ivp-node.locked { opacity: .45; cursor: default; }
.ivp-tier.t2 .ivp-node { width: 72px; padding: 5px 3px 6px; border-radius: 12px; } .ivp-tier.t2 .ivp-node b { font-size: 11px; } .ivp-tier.t2 .ivp-node small { font-size: 10px; }
.ivp-spr { display: block; line-height: 0; } .ivp-spr canvas { width: 64px; height: 56px; object-fit: contain; image-rendering: pixelated; }
.ivp-spr.big canvas { width: 96px; height: 80px; } .ivp-tier.t2 .ivp-spr canvas { width: 48px; height: 42px; } .ivp-spr.sm canvas { width: 56px; height: 48px; }
.ivp-plus { font: 800 26px var(--font); color: #d9c4ff; line-height: 1; margin: 12px 0 8px; } .ivp-tier.t2 .ivp-plus { font-size: 20px; margin: 8px 0 5px; }
.ivp-lock { line-height: 0; margin: 14px 0 10px; opacity: .9; } .ivp-tier.t2 .ivp-lock { margin: 9px 0 6px; }
.ivp-crown { display: inline-flex; align-items: center; gap: 4px; font: 800 10px var(--font); color: var(--gold); letter-spacing: .5px; }
.ivp-step { margin: 4px 12px 2px; padding: 8px 10px; border-radius: 12px; border: 2px solid rgba(185,139,255,.45); background: rgba(185,139,255,.08); display: flex; flex-direction: column; gap: 6px; animation: ivp-pop .18s ease-out; }
@keyframes ivp-pop { from { opacity: 0; transform: translateY(4px); } }
.ivp-step.confirm { border-color: rgba(255,210,63,.55); background: rgba(255,210,63,.06); }
.ivp-step b { font: 800 12.5px var(--font-body); color: #fff; display: inline-flex; align-items: center; gap: 5px; }
.ivp-step small { font: 600 11px var(--font-body); color: #b8b8c4; } .ivp-step small.no { color: #ff7a85; }
.ivp-btns { display: flex; flex-wrap: wrap; gap: 6px; } .ivp-btns .btn { display: inline-flex; align-items: center; gap: 4px; }
.ivp-hint { font: 600 11px var(--font-body); color: #9a9aaa; margin: 4px 12px 0 !important; }
.ivp-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 12px; }
.ivp-bar .btn { display: inline-flex; align-items: center; gap: 4px; }
.ivp-role { font: 700 11.5px var(--font-body); color: #d9c4ff; display: inline-flex; align-items: center; gap: 4px; } .ivp-role.main { color: var(--gold); }
.ivc-role { display: inline-flex; margin-left: 4px; vertical-align: -1px; line-height: 0; color: var(--gold); }
.ivp-q { margin: 2px 12px; width: calc(100% - 24px); }
.ivp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; padding: 0 12px 4px; max-height: 52vh; overflow: auto; }
.ivp-cand { appearance: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 4px 6px; border-radius: 12px; border: 2px solid rgba(255,255,255,.12); background: rgba(10,10,18,.7); color: #fff; font-family: var(--font); min-width: 0; transition: transform .15s, border-color .15s; }
.ivp-cand b { font-size: 11px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ivp-cand small { font: 700 10px var(--font-body); color: #d9c4ff; display: inline-flex; align-items: center; gap: 3px; }
.ivp-grid > .iv-hint { grid-column: 1 / -1; margin: 6px 0 !important; text-align: center; }
.ivp-cand.zero small { color: #8a8a99; } .ivp-cand:hover { border-color: color-mix(in srgb, var(--c, #b98bff) 70%, #fff); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .ivp-lines path.on { animation: none; } .ivp-step { animation: none; } }
@media (max-height: 520px) {
  .ivp-head { padding: 5px 8px 0; } .ivp-head small { display: none; } .ivp-head b { font-size: 13px; }
  .ivp-tree { gap: 14px; padding: 4px 4px 2px; }
  .ivp-node { width: 80px; padding: 4px 4px 5px; gap: 1px; } .ivp-node.main { width: 110px; } .ivp-node b { font-size: 11px; } .ivp-node.main b { font-size: 12px; }
  .ivp-spr canvas { width: 48px; height: 42px; } .ivp-spr.big canvas { width: 64px; height: 56px; }
  .ivp-tier.t2 .ivp-node { width: 58px; padding: 4px 2px 5px; } .ivp-tier.t2 .ivp-spr canvas { width: 36px; height: 32px; } .ivp-tier.t2 .ivp-node b { display: none; } .ivp-tier.t2 .ivp-node small { font-size: 9.5px; }
  .ivp-plus { font-size: 20px; margin: 8px 0 5px; } .ivp-lock { margin: 8px 0 6px; }
  .ivp-hint { display: none; } .ivp-step { margin: 2px 8px 0; padding: 5px 8px; gap: 4px; } .ivp-step small { display: none; }
  .ivp-grid { max-height: 40vh; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 4px; padding: 0 8px 2px; } .ivp-q { margin: 2px 8px; width: calc(100% - 16px); }
}
.box.ivm-box { width: min(620px, 100%); }
.ivm-coins { font: 800 13px var(--font-body); color: var(--gold); display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.ivm-src { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ivm-rows { display: flex; flex-direction: column; gap: 4px; }
.ivm-row { display: grid; grid-template-columns: 18px 90px minmax(0, 1fr) auto; align-items: center; gap: 0 8px; padding: 4px 8px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.ivm-row b { font-size: 13px; color: var(--c); white-space: nowrap; }
.ivm-row small { font: 600 11px var(--font-body); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ivm-row.zero { opacity: .5; }
.ivm-step { display: inline-flex; align-items: center; gap: 4px; }
.ivm-step i { font: 800 14px var(--font); color: #fff; min-width: 26px; text-align: center; font-style: normal; }
.ivm-step .btn { padding: 3px 9px; min-width: 32px; }
.ivm-foot { margin-top: 10px; }
.ivm-sum { font: 800 13px var(--font-body); color: var(--gold); }
.ivm-sum.no { color: #ff7a85; }
@media (max-height: 520px) {
  .box.ivm-box { padding: 8px 12px; }
  .ivm-box h2 { font-size: 16px; }
  .ivm-box .sub { display: none; }
  .ivm-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
  .ivm-row { padding: 2px 6px; grid-template-columns: 16px 66px minmax(0, 1fr) auto; gap: 0 5px; }
  .ivm-row b { font-size: 11.5px; }
  .ivm-row small { font-size: 10px; }
  .ivm-src { margin: 2px 0 6px; }
  .ivm-src .chip { padding: 3px 9px; font-size: 12px; }
  .ivm-step .btn { padding: 2px 7px; min-width: 28px; }
  .ivm-foot { margin-top: 6px; }
}
@media (max-width: 900px) and (min-height: 521px) { .ivx { grid-template-columns: 1fr; } }
@media (max-height: 520px) {
  .ivx { grid-template-columns: minmax(0, 1fr) 270px; gap: 8px; margin-top: 2px; }
  .ivx-list { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 5px; }
  .ivc { grid-template-columns: 40px minmax(0, 1fr) 36px; padding: 3px 6px; }
  .ivc canvas { width: 40px; height: 36px; } .ivc .ivhex { width: 36px; height: 36px; }
  .ivx-side { gap: 2px; padding-bottom: 5px; }
  .ivx-top { grid-template-columns: 1fr 120px; } .ivx-top .ivhex { width: 120px; height: 120px; } .ivx-top .pcs-stage { height: 80px; }
  .ivx-total b { font-size: 16px; }
  .ivx-row { padding: 1px 6px; } .ivx-row small { display: none; }
  .ivx-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 4px; padding: 0 8px; }
}

/* IV hero banner (20-10-2026) */
.ivx-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ivx-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 16px; border: 2px solid rgba(185,139,255,.5);
  background: radial-gradient(ellipse 60% 120% at 12% 50%, rgba(185,139,255,.35), transparent 70%), linear-gradient(120deg, #1a1030, #0b0b18); box-shadow: 0 6px 0 #000; }
.ivx-rays { position: absolute; left: -60px; top: 50%; width: 260px; height: 260px; translate: 0 -50%; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg, rgba(200,170,255,.55) 0deg 5deg, transparent 5deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 15%, transparent 60%); mask-image: radial-gradient(circle, #000 15%, transparent 60%); animation: rg-spin 18s linear infinite; }
.ivx-biggem { position: relative; flex: none; width: 76px; height: 76px; display: grid; place-items: center; }
.ivx-biggem i { line-height: 0; filter: drop-shadow(0 0 10px rgba(185,139,255,.9)) drop-shadow(0 4px 0 #000); animation: ivx-spin 4s ease-in-out infinite; }
@keyframes ivx-spin { 0%, 100% { transform: translateY(0) rotateY(0); filter: drop-shadow(0 0 10px rgba(185,139,255,.9)) drop-shadow(0 4px 0 #000) hue-rotate(0deg); }
  50% { transform: translateY(-6px) rotateY(180deg); filter: drop-shadow(0 0 18px rgba(150,230,255,1)) drop-shadow(0 4px 0 #000) hue-rotate(90deg); } }
.ivx-hero > div { position: relative; display: flex; flex-direction: column; gap: 1px; }
.ivx-hero b { font: 800 30px var(--font); color: #fff; text-shadow: 0 0 14px rgba(185,139,255,.9), 0 2px 0 #000; line-height: 1; }
.ivx-hero span { font: 800 13px var(--font); color: #d9c4ff; letter-spacing: .5px; }
.ivx-hero small { font: 600 11.5px var(--font-body); color: #b8b8c4; max-width: 520px; }
@media (max-height: 520px) {
  .ivx-hero { padding: 5px 10px; gap: 10px; } .ivx-biggem { width: 44px; height: 44px; } .ivx-biggem img { width: 40px !important; height: 40px !important; }
  .ivx-hero b { font-size: 20px; } .ivx-hero small { display: none; }
}

/* ====== Admin powers inside a run (20-10-2026, admin-run-ui.js) ====== */
#adm-fab { position: fixed; z-index: 60; right: calc(env(safe-area-inset-right, 0px) + 62px); top: calc(env(safe-area-inset-top, 0px) + 12px); display: flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 8px; border-radius: 99px; border: 2px solid #000; cursor: pointer; font: 800 12px var(--font); letter-spacing: 1.5px; color: #fff;
  background: linear-gradient(135deg, #ff3d6b, #b46bff 55%, #3d8bff); box-shadow: 0 3px 0 #000, 0 0 16px rgba(255,61,107,.55); text-shadow: 0 1px 0 #000; opacity: .82; }
#adm-fab i { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; animation: adm-blink 1.2s ease-in-out infinite; }
#adm-fab:hover, #adm-fab.on { opacity: 1; }
#adm-fab.on { box-shadow: 0 3px 0 #000, 0 0 26px rgba(255,210,63,.9); }
@keyframes adm-blink { 50% { opacity: .25; } }
#adm-run { position: fixed; z-index: 59; right: calc(env(safe-area-inset-right, 0px) + 8px); top: 44px; bottom: 8px; width: min(430px, 46vw); display: flex; flex-direction: column; gap: 8px;
  padding: 10px; border-radius: 18px; border: 2px solid rgba(255,255,255,.14); background: linear-gradient(180deg, rgba(24,14,40,.93), rgba(8,8,16,.93));
  box-shadow: 0 10px 40px rgba(0,0,0,.6), inset 0 0 0 1px rgba(180,107,255,.25); backdrop-filter: blur(6px); animation: adm-in .22s ease-out; }
@keyframes adm-in { from { transform: translateX(30px); opacity: 0; } }
#adm-run .adm-h { display: flex; align-items: center; gap: 10px; }
#adm-run .adm-h b { font: 800 16px var(--font); letter-spacing: 2px; background: linear-gradient(90deg, #ffd23f, #ff5f9e, #b46bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
#adm-run-stats { flex: 1; font: 700 11px var(--font-body); color: #b8b8c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#adm-run-x { width: 30px; height: 30px; padding: 0; }
#adm-run-cats { display: flex; flex-wrap: wrap; gap: 5px; }
#adm-run-cats .chip { position: relative; }
#adm-run-cats .chip i { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; border-radius: 99px; background: #ff3d6b; border: 1.5px solid #000; font: 800 10px/13px var(--font); font-style: normal; color: #fff; text-align: center; }
#adm-run-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 7px; align-content: start; padding: 2px; }
.adm-t { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 76px; padding: 8px 6px; border-radius: 14px; cursor: pointer;
  border: 2px solid #000; background: linear-gradient(180deg, #2c2442, #1a1528); color: #fff; box-shadow: 0 4px 0 #000, inset 0 1px 0 rgba(255,255,255,.08); transition: transform .08s; }
.adm-t:hover:not(:disabled) { background: linear-gradient(180deg, #3a2f5a, #221b36); }
.adm-t:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
.adm-t b { font: 800 11.5px var(--font); text-align: center; line-height: 1.15; }
.adm-t small { font: 800 9.5px var(--font); color: #ffd23f; letter-spacing: 1px; }
.adm-t:disabled { opacity: .38; cursor: default; } .adm-t:disabled small { color: #ff8a8a; }
.adm-ic { font-size: 26px; line-height: 1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)); }
.adm-t.on { background: linear-gradient(180deg, #6b4a12, #3a2508); border-color: #ffd23f; box-shadow: 0 4px 0 #000, 0 0 16px rgba(255,210,63,.55); }
.adm-t.on .adm-ic { animation: adm-bob 1s ease-in-out infinite; }
@keyframes adm-bob { 50% { transform: translateY(-3px) scale(1.08); } }
.adm-t.pop::after { content: ''; position: absolute; inset: -4px; border-radius: 16px; border: 3px solid #fff; animation: adm-pop .45s ease-out forwards; pointer-events: none; }
@keyframes adm-pop { from { opacity: 1; transform: scale(.9); } to { opacity: 0; transform: scale(1.18); } }
#adm-run-say { display: flex; gap: 6px; } #adm-run-say.hidden { display: none; }
#adm-run-say input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 2px solid #000; background: #0d0b16; color: #fff; font: 600 13px var(--font-body); }
#adm-run-say .btn { padding: 6px 12px; font-size: 16px; }
.adm-foot { font: 600 10px var(--font-body); color: #77738a; text-align: center; }
@media (max-height: 520px) {
  #adm-run { top: 36px; bottom: 4px; width: min(380px, 52vw); padding: 7px; gap: 5px; }
  #adm-run-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 5px; }
  .adm-t { min-height: 58px; padding: 5px 4px; } .adm-ic { font-size: 20px; } .adm-t b { font-size: 10.5px; }
  #adm-run-cats .chip { padding: 3px 8px; font-size: 11px; } .adm-foot { display: none; }
  #adm-fab { top: 8px; right: calc(env(safe-area-inset-right, 0px) + 54px); padding: 3px 10px 3px 6px; font-size: 11px; }
}
/* What the powers do to the picture */
#game.adm-flip { transform: rotate(180deg); }
#game.adm-mirror { transform: scaleX(-1); }
#game.adm-flip.adm-mirror { transform: rotate(180deg) scaleX(-1); }
#game.adm-rainbow { animation: adm-hue 2.4s linear infinite; }
@keyframes adm-hue { to { filter: hue-rotate(360deg) saturate(1.5); } from { filter: hue-rotate(0deg) saturate(1.5); } }
#game.adm-drunk { animation: adm-drunk 3.2s ease-in-out infinite; }
@keyframes adm-drunk { 0%, 100% { transform: rotate(0) scale(1.04); } 25% { transform: rotate(4deg) scale(1.08) skewX(3deg); } 75% { transform: rotate(-4deg) scale(1.06) skewX(-3deg); } }
#game.adm-disco { animation: adm-disco .5s steps(1) infinite; }
@keyframes adm-disco { 0% { filter: hue-rotate(0) brightness(1.15) contrast(1.2); } 25% { filter: hue-rotate(90deg) brightness(1.3) contrast(1.3); } 50% { filter: hue-rotate(180deg) brightness(1.1) contrast(1.2); } 75% { filter: hue-rotate(270deg) brightness(1.35) contrast(1.3); } }

/* Admin drawer, round 2 (20-10-2026): search, recent, category icons, text box target */
#adm-run-off { width: 30px; height: 30px; padding: 0; font-size: 14px; }
.adm-q { width: 100%; padding: 7px 10px; border-radius: 10px; border: 2px solid #000; background: #0d0b16; color: #fff; font: 600 13px var(--font-body); }
#adm-run-recent { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
#adm-run-recent.hidden { display: none; }
.adm-r { flex: none; width: 38px; height: 38px; border-radius: 11px; border: 2px solid #000; background: #241c38; font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 3px 0 #000; }
.adm-r.on { background: #5a3e10; border-color: #ffd23f; }
.adm-r:disabled { opacity: .35; }
#adm-run-cats .chip span { font-size: 13px; }
.adm-t.arg { border-color: #7fe0ff; box-shadow: 0 4px 0 #000, 0 0 14px rgba(127,224,255,.55); }
.adm-none { grid-column: 1 / -1; text-align: center; color: #8a86a0; font: 600 13px var(--font-body); }
#game.adm-spin { animation: adm-spin 4s linear infinite; }
@keyframes adm-spin { to { transform: rotate(360deg); } }
@media (max-height: 520px) {
  .adm-q { padding: 4px 8px; font-size: 12px; }
  .adm-r { width: 30px; height: 30px; font-size: 16px; }
  #adm-run-cats .chip span { font-size: 11px; }
}
@media (max-height: 520px) {
  /* Short screens: the categories show only their icon (the open one keeps its name). */
  #adm-run-cats { gap: 4px; }
  #adm-run-cats .chip:not(.on) { font-size: 0; padding: 3px 7px; }
  #adm-run-cats .chip span { font-size: 14px; }
  #adm-run-recent { gap: 4px; }
}
@media (max-height: 520px) {
  #adm-run-cats .chip { min-height: 0; min-width: 0; height: 28px; line-height: 1; display: inline-flex; align-items: center; gap: 4px; }
  #adm-run .adm-q { display: none; }      /* (phones: the categories are enough) */
}

/* Run summary: the IV gems found (20-10-2026) */
.st-ivg { border: 1px solid rgba(185,139,255,.55); border-radius: 12px; padding: 6px 10px; background: linear-gradient(120deg, rgba(185,139,255,.22), rgba(90,200,255,.08)); }
.st-ivg .ivg-n { color: #e8dcff; text-shadow: 0 0 10px rgba(185,139,255,.9); }
.ivg-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ivg-list span { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; background: rgba(0,0,0,.35); color: var(--c); font: 800 12px var(--font); }

/* (20-10-2026) Region cards on touch screens and in the Android app (AYN Thor): the whole picture came
   out black there. No 3D perspective on the card (the tilt is mouse-only anyway), no blend modes and
   no blurs on its layers: the same look with plain opacity, which every GPU draws. */
@media (hover: none), (pointer: coarse) {
  .region-card { transform: none; }
  .rg-aura, .rg-base, .rg-x, .rg-glare { mix-blend-mode: normal; }
  .rg-aura { filter: none; opacity: .4; }
  .rg-x, .rg-x * { filter: none !important; }
  .rg-base { opacity: .6; }
}
html.pl-app .region-card { transform: none; }
html.pl-app .rg-aura, html.pl-app .rg-base, html.pl-app .rg-x, html.pl-app .rg-glare { mix-blend-mode: normal; }
html.pl-app .rg-aura { filter: none; opacity: .4; }
html.pl-app .rg-x, html.pl-app .rg-x * { filter: none !important; }
html.pl-app .rg-base { opacity: .6; }
/* Admin page "Epic" screen moods (20-10-2026) */
#game.adm-aurora { animation: adm-aurora 4s ease-in-out infinite alternate; }
@keyframes adm-aurora { from { filter: hue-rotate(-20deg) saturate(1.3) brightness(1.05); } to { filter: hue-rotate(40deg) saturate(1.6) brightness(1.1); } }
#game.adm-gray { filter: grayscale(1) contrast(1.15); }
#game.adm-dark { filter: brightness(.45) saturate(.6) hue-rotate(220deg); }
#game.adm-psy { animation: adm-psy .25s steps(2) infinite; }
@keyframes adm-psy { 0% { filter: hue-rotate(0) saturate(2); transform: scale(1.01); } 100% { filter: hue-rotate(300deg) saturate(2); transform: scale(.99); } }
#game.adm-icy { filter: saturate(.6) brightness(1.1) hue-rotate(160deg) contrast(1.05); }
/* Admin page "Troll": 40 screen filters (20-10-2026, admin-pages/troll.js; also sent to teammates) */
#game.adm-f-gray { filter: grayscale(1); }
#game.adm-f-sepia { filter: sepia(1) contrast(1.05); }
#game.adm-f-neg { filter: invert(1) hue-rotate(180deg); }
#game.adm-f-night { filter: grayscale(1) brightness(1.3) sepia(1) hue-rotate(70deg) saturate(4) contrast(1.2); }
#game.adm-f-thermal { filter: invert(1) hue-rotate(160deg) saturate(3.5) contrast(1.4); }
#game.adm-f-gb { filter: grayscale(1) sepia(1) hue-rotate(40deg) saturate(1.6) contrast(1.3) brightness(.9); }
#game.adm-f-comic { filter: contrast(1.7) saturate(2.2); }
#game.adm-f-blur { filter: blur(2px); }
#game.adm-f-wobble { animation: adm-f-wobble 1.6s ease-in-out infinite; }
@keyframes adm-f-wobble { 0%, 100% { transform: skewX(0); } 25% { transform: skewX(4deg) scaleY(1.03); } 75% { transform: skewX(-4deg) scaleY(.97); } }
#game.adm-f-jitter { animation: adm-f-jitter .12s steps(2) infinite; }
@keyframes adm-f-jitter { 0% { transform: translate(-3px, 2px); } 100% { transform: translate(3px, -2px); } }
#game.adm-f-pulse { animation: adm-f-pulse 1s ease-in-out infinite; }
@keyframes adm-f-pulse { 50% { transform: scale(1.08); } }
#game.adm-f-tilt { transform: rotate(15deg) scale(1.2); }
#game.adm-f-side { transform: rotate(90deg) scale(.6); }
#game.adm-f-squish { transform: scaleY(.6); }
#game.adm-f-stretch { transform: scaleX(.6); }
#game.adm-f-tinyscr { transform: scale(.5); }
#game.adm-f-heart { animation: adm-f-heart .9s ease-in-out infinite; }
@keyframes adm-f-heart { 0%, 40%, 100% { transform: scale(1); filter: none; } 15% { transform: scale(1.06); filter: sepia(.4) saturate(2) hue-rotate(-30deg); } 30% { transform: scale(1.03); } }
#game.adm-f-glitch { animation: adm-f-glitch .4s steps(4) infinite; }
@keyframes adm-f-glitch { 0% { transform: translate(0); filter: none; } 25% { transform: translate(-6px, 0); filter: hue-rotate(90deg) saturate(3); } 50% { transform: translate(5px, -2px); filter: invert(.2); } 75% { transform: translate(-2px, 3px); filter: hue-rotate(-90deg); } }
#game.adm-f-vhs { animation: adm-f-vhs .2s steps(2) infinite; }
@keyframes adm-f-vhs { 0% { filter: saturate(1.6) contrast(1.1) blur(.6px) hue-rotate(-8deg); } 100% { filter: saturate(1.4) contrast(1.2) blur(1px) hue-rotate(8deg) brightness(1.05); } }
#game.adm-f-contrast { filter: contrast(2); }
#game.adm-f-washed { filter: contrast(.5) brightness(1.3) saturate(.6); }
#game.adm-f-fried { filter: saturate(4) contrast(2.2) brightness(1.1); }
#game.adm-f-midnight { filter: brightness(.35) saturate(.7); }
#game.adm-f-bright { filter: brightness(1.8) contrast(.8); }
#game.adm-f-hue90 { filter: hue-rotate(90deg); }
#game.adm-f-hue180 { filter: hue-rotate(180deg); }
#game.adm-f-hue270 { filter: hue-rotate(270deg); }
#game.adm-f-red { filter: sepia(1) saturate(5) hue-rotate(-50deg); }
#game.adm-f-blue { filter: sepia(1) saturate(4) hue-rotate(180deg); }
#game.adm-f-purple { filter: sepia(1) saturate(3) hue-rotate(230deg) brightness(.9); }
#game.adm-f-seasick { animation: adm-f-seasick 3s ease-in-out infinite; }
@keyframes adm-f-seasick { 0%, 100% { transform: rotate(-3deg) translateY(-6px); filter: blur(.5px) hue-rotate(10deg); } 50% { transform: rotate(3deg) translateY(6px); filter: blur(1px) hue-rotate(-10deg); } }
#game.adm-f-quake { animation: adm-f-quake .08s linear infinite; }
@keyframes adm-f-quake { 0% { transform: translate(-6px, 4px) rotate(-.6deg); } 50% { transform: translate(6px, -4px) rotate(.6deg); } 100% { transform: translate(-4px, -5px); } }
#game.adm-f-spin180 { animation: adm-f-spin180 6s ease-in-out infinite alternate; }
@keyframes adm-f-spin180 { to { transform: rotate(180deg); } }
#game.adm-f-flipflop { animation: adm-f-flipflop 2s steps(1) infinite; }
@keyframes adm-f-flipflop { 50% { transform: scaleX(-1); } }
#game.adm-f-pendulum { transform-origin: 50% 0; animation: adm-f-pendulum 2.4s ease-in-out infinite alternate; }
@keyframes adm-f-pendulum { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
#game.adm-f-breathe { animation: adm-f-breathe 4s ease-in-out infinite; }
@keyframes adm-f-breathe { 50% { transform: scale(1.05); filter: brightness(1.08); } }
#game.adm-f-drunkzoom { animation: adm-f-drunkzoom 5s ease-in-out infinite; }
@keyframes adm-f-drunkzoom { 0%, 100% { transform: scale(1.05) rotate(0); } 33% { transform: scale(1.2) rotate(5deg); filter: blur(1px); } 66% { transform: scale(1.1) rotate(-6deg); } }
#game.adm-f-film { animation: adm-f-film .15s steps(2) infinite; }
@keyframes adm-f-film { 0% { filter: sepia(.9) contrast(1.2) brightness(.95); } 100% { filter: sepia(.9) contrast(1.25) brightness(1.08); } }
#game.adm-f-matrix { filter: grayscale(1) sepia(1) hue-rotate(80deg) saturate(6) contrast(1.4) brightness(.8); }
#game.adm-f-dream { filter: blur(1.2px) brightness(1.15) saturate(1.4) contrast(.9); }
/* Admin page "Camera" (20-10-2026, admin-pages/view.js): photographic looks, overlays, stats */
#game.adm-l-warm { filter: sepia(.3) saturate(1.3) hue-rotate(-10deg) brightness(1.05); }
#game.adm-l-cool { filter: saturate(.9) hue-rotate(15deg) brightness(1.02) contrast(1.05); }
#game.adm-l-vintage { filter: sepia(.55) contrast(.9) brightness(1.05) saturate(.8); }
#game.adm-l-noir { filter: grayscale(1) contrast(1.6) brightness(.85); }
#game.adm-l-glow { filter: brightness(1.2) saturate(1.3) blur(.5px) contrast(.95); }
#game.adm-l-pastel { filter: saturate(.6) brightness(1.25) contrast(.85); }
#game.adm-l-neon { filter: saturate(2.6) contrast(1.3) brightness(1.1) hue-rotate(10deg); }
#game.adm-l-sunset { filter: sepia(.6) saturate(2) hue-rotate(-25deg) brightness(1.02); }
#game.adm-l-moon { filter: grayscale(.4) brightness(.7) hue-rotate(190deg) saturate(1.4); }
#game.adm-l-under { filter: sepia(.4) hue-rotate(160deg) saturate(1.8) brightness(.9); }
#game.adm-l-hell { filter: sepia(1) saturate(6) hue-rotate(-40deg) contrast(1.3) brightness(.8); }
#game.adm-l-iceblue { filter: grayscale(.5) sepia(.3) hue-rotate(170deg) saturate(2) brightness(1.1); }
#game.adm-l-golden { filter: sepia(.5) saturate(1.6) brightness(1.1) hue-rotate(-5deg); }
#game.adm-l-cyber { filter: saturate(2) hue-rotate(250deg) contrast(1.4); }
#game.adm-l-faded { filter: contrast(.75) brightness(1.15) saturate(.7); }
#game.adm-l-bleach { filter: saturate(.35) contrast(1.6); }
#game.adm-l-cross { filter: saturate(1.6) contrast(1.3) hue-rotate(-15deg) sepia(.2); }
#game.adm-l-infra { filter: invert(.15) hue-rotate(300deg) saturate(2.5) brightness(1.1); }
#game.adm-l-polaroid { filter: sepia(.35) contrast(1.1) brightness(1.1) saturate(1.3); }
#game.adm-l-koda { filter: saturate(1.8) contrast(1.2) sepia(.15); }
#game.adm-l-techni { filter: saturate(2.4) contrast(1.15) brightness(1.05); }
#game.adm-l-lomo { filter: saturate(1.5) contrast(1.5) brightness(.95); }
#game.adm-l-silver { filter: grayscale(1) brightness(1.15) contrast(1.15); }
#game.adm-l-emerald { filter: sepia(.6) hue-rotate(80deg) saturate(2.2); }
#game.adm-l-ruby { filter: sepia(.6) hue-rotate(-50deg) saturate(2.5); }
#game.adm-l-sapphire { filter: sepia(.6) hue-rotate(185deg) saturate(2.4); }
#game.adm-l-amethyst { filter: sepia(.6) hue-rotate(230deg) saturate(2.2); }
#game.adm-l-autumn { filter: sepia(.5) saturate(1.7) hue-rotate(-20deg) contrast(1.05); }
#game.adm-l-spring { filter: saturate(1.4) brightness(1.12) hue-rotate(-8deg); }
#game.adm-l-toxic { filter: sepia(1) saturate(4) hue-rotate(50deg) contrast(1.2); }
#game.adm-dutch { transform: rotate(-8deg) scale(1.12); }
#adm-ov { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#adm-ov.ov-bars { box-shadow: inset 0 11vh 0 #000, inset 0 -11vh 0 #000; }
#adm-ov.ov-vig { background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 55%, rgba(0,0,0,.75)); }
#adm-ov.ov-grain { background-image: repeating-radial-gradient(circle at 17% 32%, rgba(255,255,255,.06) 0 1px, transparent 1px 3px), repeating-radial-gradient(circle at 71% 64%, rgba(0,0,0,.08) 0 1px, transparent 1px 4px); animation: adm-grain .18s steps(3) infinite; }
@keyframes adm-grain { 0% { background-position: 0 0, 0 0; } 33% { background-position: 7px -5px, -6px 4px; } 66% { background-position: -4px 6px, 5px -7px; } }
#adm-ov.ov-scan { background: repeating-linear-gradient(180deg, rgba(0,0,0,.28) 0 2px, transparent 2px 4px); }
#adm-ov.ov-crt { background: repeating-linear-gradient(180deg, rgba(0,0,0,.22) 0 2px, transparent 2px 4px), radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.85)); border-radius: 40px; box-shadow: inset 0 0 0 14px #000; }
#adm-ov.ov-rainlens { background-image: radial-gradient(ellipse 3px 5px, rgba(200,230,255,.55), transparent 80%), radial-gradient(ellipse 2px 4px, rgba(200,230,255,.45), transparent 80%); background-size: 120px 140px, 70px 90px; animation: adm-rainlens 1.2s linear infinite; }
@keyframes adm-rainlens { to { background-position: 0 140px, 0 90px; } }
#adm-ov.ov-snowlens { background-image: radial-gradient(circle, #fff 1.5px, transparent 2.2px), radial-gradient(circle, rgba(255,255,255,.8) 1px, transparent 1.6px); background-size: 90px 90px, 55px 55px; animation: adm-snowlens 6s linear infinite; }
@keyframes adm-snowlens { to { background-position: 30px 90px, -20px 55px; } }
#adm-ov.ov-hearts { background-image: radial-gradient(circle at 40% 40%, #ff6bd6 4px, transparent 5px), radial-gradient(circle at 60% 40%, #ff6bd6 4px, transparent 5px); background-size: 160px 160px, 160px 160px; opacity: .5; animation: adm-hearts 5s linear infinite; }
@keyframes adm-hearts { to { background-position: 0 -160px, 0 -160px; } }
#adm-ov.ov-speed { background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255,255,255,.22) 0 1deg, transparent 1deg 7deg); -webkit-mask-image: radial-gradient(circle, transparent 35%, #000 70%); mask-image: radial-gradient(circle, transparent 35%, #000 70%); animation: adm-speed .25s steps(2) infinite; }
@keyframes adm-speed { to { transform: rotate(3deg); } }
#adm-ov.ov-frame { box-shadow: inset 0 0 0 18px #f4f1e8, inset 0 -60px 0 18px #f4f1e8; }
#adm-ov.ov-night { background: radial-gradient(circle at 50% 52%, transparent 90px, rgba(0,0,20,.9) 260px); }
#adm-ov.ov-spot { background: radial-gradient(circle at 50% 52%, transparent 140px, rgba(0,0,0,.92) 180px); }
#adm-ov.ov-tunnel { background: radial-gradient(ellipse 22% 30% at 50% 52%, transparent 70%, #000 100%); }
#adm-ov.ov-blink { animation: adm-blinkeye 4s ease-in-out infinite; }
@keyframes adm-blinkeye { 0%, 86%, 100% { box-shadow: inset 0 0 0 0 #000; } 92% { box-shadow: inset 0 50vh 0 0 #000; } }
#adm-ov.ov-fade { animation: adm-fadeblack 3s ease-in-out; }
@keyframes adm-fadeblack { 0%, 100% { background: transparent; } 40%, 60% { background: #000; } }
#adm-stats { position: fixed; left: 50%; bottom: 46px; translate: -50% 0; z-index: 6; pointer-events: none; padding: 4px 12px; border-radius: 10px;
  background: rgba(0,0,0,.6); color: #e8ffe8; font: 700 13px ui-monospace, Consolas, monospace; white-space: nowrap; }
#adm-stats.m-clock { top: 70px; bottom: auto; font: 800 44px var(--font); background: transparent; color: #fff; text-shadow: 0 3px 0 #000, 0 0 12px rgba(0,0,0,.8); }
/* (20-10-2026) Pull on touch screens and in the Android app (AYN Thor): its background came out see-through
   there. A plain opaque background and no big blurred / masked / animated layers. */
/* (20-10-2026) Rift intro on phones and in the app (AYN Thor): the giant silhouette had animated
   drop-shadows (re-drawn every frame on a canvas as tall as the screen) and the rays a blend mode:
   the Thor froze while entering a rift. Here: the same moves without those filters. */
body.touch #ri-mon, html.pl-app #ri-mon { filter: brightness(0); }
body.touch #rift-intro.go #ri-mon, html.pl-app #rift-intro.go #ri-mon { animation: riRise 1.2s 1s cubic-bezier(.2,.7,.3,1) forwards, riStrobeLite .28s 1.3s, riStrobeLite .28s 1.8s; }
body.touch #rift-intro.roar #ri-mon, html.pl-app #rift-intro.roar #ri-mon { filter: none; animation: riRevealLite .7s ease-out forwards; }
@keyframes riStrobeLite { 30% { opacity: .35; } }
@keyframes riRevealLite { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1.14); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
body.touch #rift-intro .ri-rays, html.pl-app #rift-intro .ri-rays { mix-blend-mode: normal; opacity: .3; }
body.touch #rift-intro .ri-burst2, html.pl-app #rift-intro .ri-burst2 { filter: none; }
body.touch #rift-intro.go .ri-face, html.pl-app #rift-intro.go .ri-face { animation: none; }
body.touch #pull-fx, html.pl-app #pull-fx { background: radial-gradient(ellipse 70% 55% at 50% 42%, rgba(120,90,255,.22), transparent 70%), #000 !important; }
body.touch #pull-fx > .pull-aurora, html.pl-app #pull-fx > .pull-aurora { filter: none; animation: none; opacity: .35; inset: 0; }
body.touch #pull-fx > .pull-bokeh, body.touch #pull-fx > .pull-bokeh::after, html.pl-app #pull-fx > .pull-bokeh, html.pl-app #pull-fx > .pull-bokeh::after { -webkit-mask: none; mask: none; filter: none; animation: none; opacity: .3; }
body.touch #pull-fx .pull-results::after, html.pl-app #pull-fx .pull-results::after { filter: none; }

/* ============ Room (co-op lobby), rebuilt 20-10-2026 ============
 * Areas: players · region · friends to invite · chat (its own column) · start at the bottom.
 *   wide screens   players in a row of 4, region and invites under them, chat on the right
 *   short screens  (phones in landscape, AYN Thor) players 2×2 on the left; region, invites
 *                  and chat on the right; everything fits without scrolling
 *   narrow screens one column */
#scr-lobby .lob-box { display: flex; flex-direction: column; gap: 10px; }
#scr-lobby .lob-head { margin: 0; }
#scr-lobby .lob-head h2 { margin: 0; }
#scr-lobby #lobby-sub { margin: -4px 0 0; }
#scr-lobby .lob-main { display: grid; gap: 12px 16px; min-height: 0; align-items: start; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) clamp(240px, 28%, 300px); grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "members members chat" "region inv chat"; }
#scr-lobby .lob-main:not(:has(.lchat:not(.hidden))) { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "members members" "region inv"; }
#scr-lobby #lobby-members { grid-area: members; margin: 0; }
#scr-lobby .lob-region { grid-area: region; min-width: 0; }
#scr-lobby .lob-region .chips { gap: 6px; }
#scr-lobby .lob-inv { grid-area: inv; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
#scr-lobby .lob-inv:has(#lobby-invite.hidden) { display: none; }
#scr-lobby .lob-inv h3 { margin: 0 0 6px; font-size: 15px; }
#scr-lobby .lob-side { grid-area: chat; align-self: stretch; min-height: 0; display: flex; flex-direction: column; }
#scr-lobby .lob-side .lchat { margin: 0; flex: 1 1 auto; min-height: 200px; }
#scr-lobby .lob-side .lchat-log { flex: 1 1 auto; max-height: none; min-height: 0; display: flex; }
#scr-lobby .lob-side .lchat-log:empty { display: none; }
#scr-lobby .lob-side .lchat-log:empty + .lchat-empty { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; text-align: center;
  border-radius: 8px; border: 2px dashed rgba(244,248,255,.12); padding: 8px; }
#scr-lobby .lob-foot { margin: 0; }
#scr-lobby #lobby-note { margin: -4px 0 0; text-align: center; }
#scr-lobby #lobby-note:empty { display: none; }
#scr-lobby .lob-card { min-height: 150px; }

@media (max-width: 760px) and (min-height: 521px) {
  #scr-lobby .lob-main, #scr-lobby .lob-main:not(:has(.lchat:not(.hidden))) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "members" "region" "inv" "chat"; }
  #scr-lobby .lobby-members { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #scr-lobby .lob-side .lchat { min-height: 160px; }
}

@media (max-height: 520px) {
  #scr-lobby .lob-box { gap: 6px; }
  #scr-lobby .lob-box > * { flex: none; }
  #scr-lobby #lobby-sub { margin: -2px 0 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #scr-lobby .lob-main, #scr-lobby .lob-main:not(:has(.lchat:not(.hidden))) { flex: 1 1 auto !important; gap: 6px 12px; align-items: stretch;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas: "members region" "members inv" "members chat"; }
  #scr-lobby #lobby-members { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 6px; min-height: 0; }
  #scr-lobby .lob-card { min-height: 0; padding: 4px 6px; gap: 0; overflow: hidden; }
  #scr-lobby .lob-card.empty canvas { display: none; }
  #scr-lobby .lob-card b { font-size: 13px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #scr-lobby .lob-card small, #scr-lobby .lob-card .conn { font-size: 11px; }
  #scr-lobby .lob-card .ndg { font-size: 9px; }
  /* Region: one row that scrolls sideways. */
  #scr-lobby .lob-region .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  #scr-lobby .lob-region .chips::-webkit-scrollbar { display: none; }
  #scr-lobby .lob-region .chip { flex: none; padding: 3px 9px; font-size: 12px; }
  #scr-lobby .lob-region > .sub { font-size: 12px; margin: 0 0 3px !important; }
  #scr-lobby .lob-inv h3 { font-size: 13px; margin: 0 0 3px; }
  #scr-lobby #lobby-invite { grid-template-columns: 1fr !important; }
  #scr-lobby .lob-side .lchat { min-height: 0; gap: 4px; }
  #scr-lobby .lob-side .lchat-log { font-size: 13px; padding: 4px 8px; }
  #scr-lobby .lob-side .lchat-form .field { height: 32px; font-size: 14px; }
  #scr-lobby .lob-foot .btn { padding-top: 8px; padding-bottom: 8px; }
  #scr-lobby #lobby-note { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- Room cards (20-10-2026, js/ui/social-ui.js card / emptyCard) ----------
 * A trainer card per player: its Pokémon on a glowing stand over its types' colours, spinning
 * rays, base stats, rank / IV / upgrades and records; the free places wait with a Poké Ball. */
#scr-lobby .lob-card.filled { position: relative; overflow: hidden; isolation: isolate; justify-content: flex-start; gap: 3px;
  padding: 7px 10px 9px; border-radius: 14px; border: 2px solid var(--pc); background: #07080d;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 18px color-mix(in srgb, var(--pc) 32%, transparent), inset 0 0 34px color-mix(in srgb, var(--t1) 18%, transparent); }
#scr-lobby .lc-bg { position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(ellipse 85% 50% at 50% 30%, color-mix(in srgb, var(--t1) 42%, transparent), transparent 70%),
              linear-gradient(165deg, color-mix(in srgb, var(--t1) 26%, #07080d) 0%, #07080d 52%, color-mix(in srgb, var(--t2) 24%, #07080d) 100%); }
#scr-lobby .lc-rays { position: absolute; left: 50%; top: 27%; width: 230%; aspect-ratio: 1; translate: -50% -50%; z-index: -1; opacity: .75;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--t1) 24%, transparent) 0deg 6deg, transparent 6deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 6%, transparent 38%); mask: radial-gradient(circle, #000 6%, transparent 38%);
  animation: lcSpin 26s linear infinite; }
@keyframes lcSpin { to { rotate: 360deg; } }
#scr-lobby .lc-top { display: flex; align-items: center; gap: 6px; width: 100%; font-size: 11px; min-height: 18px; }
#scr-lobby .lc-slot { font-family: Pixelify, 'Segoe UI', sans-serif; font-weight: 800; font-size: 11px; color: #05060a; background: var(--pc); padding: 1px 6px; border-radius: 6px; line-height: 1.35; }
#scr-lobby .lc-role { display: inline-flex; align-items: center; gap: 3px; color: #ffd23f; font-weight: 800; text-shadow: 0 1px 0 #000; }
#scr-lobby .lc-role.you { color: var(--pc); }
/* Connection: three bars, like a phone's signal. */
#scr-lobby .lc-net { margin-left: auto; display: flex; align-items: flex-end; gap: 2px; height: 12px; }
#scr-lobby .lc-net i { width: 3px; border-radius: 1px; background: rgba(255,255,255,.18); }
#scr-lobby .lc-net i:nth-child(1) { height: 5px; } #scr-lobby .lc-net i:nth-child(2) { height: 8px; } #scr-lobby .lc-net i:nth-child(3) { height: 12px; }
#scr-lobby .lc-net.ok i, #scr-lobby .lc-net.host i { background: #5fe08a; box-shadow: 0 0 4px #5fe08a; }
#scr-lobby .lc-net.wait i { background: #ffd23f; animation: lcPing 1.2s ease-in-out infinite; }
#scr-lobby .lc-net.wait i:nth-child(2) { animation-delay: .2s; } #scr-lobby .lc-net.wait i:nth-child(3) { animation-delay: .4s; }
#scr-lobby .lc-net.bad i:nth-child(1) { background: #ff5f6d; box-shadow: 0 0 4px #ff5f6d; }
@keyframes lcPing { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
/* The stand. */
#scr-lobby .lc-stage { position: relative; width: 100%; height: 96px; display: flex; align-items: flex-end; justify-content: center; flex: none; }
#scr-lobby .lc-stage canvas { position: relative; z-index: 1; width: 150px; height: 120px; margin-bottom: -4px; image-rendering: pixelated; animation: lcFloat 3.2s ease-in-out infinite; }
@keyframes lcFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
#scr-lobby .lc-ring { position: absolute; bottom: 6px; left: 50%; width: 112px; height: 24px; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--t1) 55%, transparent) 0, transparent 70%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--t1) 65%, transparent), 0 0 18px color-mix(in srgb, var(--t1) 70%, transparent);
  animation: lcPulse 2.6s ease-in-out infinite; }
@keyframes lcPulse { 0%, 100% { opacity: .65; scale: 1; } 50% { opacity: 1; scale: 1.06; } }
#scr-lobby .lc-name { font-family: Pixelify, 'Segoe UI', sans-serif; font-size: 18px; line-height: 1.1; color: var(--pc); text-shadow: 0 2px 0 #000, 0 0 12px color-mix(in srgb, var(--pc) 45%, transparent);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#scr-lobby .lc-mon { font-size: 12px; color: #e6ecff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#scr-lobby .lc-no { color: var(--muted); font-size: 11px; }
#scr-lobby .lc-sh { color: #ff5f6d; }
#scr-lobby .lc-tags, #scr-lobby .lc-chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
#scr-lobby .lc-tags .type { font-size: 10px; padding: 1px 7px; }
#scr-lobby .lc-chip { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; line-height: 1.5;
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.14); color: #e6ecff; }
#scr-lobby .lc-chip.rar { color: var(--rc); border-color: color-mix(in srgb, var(--rc) 55%, transparent); }
#scr-lobby .lc-chip.rk { color: #ffd23f; border-color: rgba(255,210,63,.45); }
#scr-lobby .lc-chip.iv { color: #d9c4ff; } #scr-lobby .lc-chip.up { color: #ffb0a4; }
#scr-lobby .lc-bars { width: 100%; display: grid; gap: 2px; margin-top: 2px; }
#scr-lobby .lc-bar { display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px; align-items: center; gap: 5px; font-size: 10px; }
#scr-lobby .lc-bar span { color: var(--muted); font-weight: 800; text-align: left; }
#scr-lobby .lc-bar i { height: 5px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
#scr-lobby .lc-bar b { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--t1), var(--t2)); box-shadow: 0 0 6px color-mix(in srgb, var(--t1) 60%, transparent); }
#scr-lobby .lc-bar em { font-style: normal; text-align: right; color: #fff; font-weight: 700; }
#scr-lobby .lc-rec { display: flex; flex-wrap: wrap; gap: 4px 9px; justify-content: center; width: 100%; font-size: 11px; color: #c9d3f0;
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 4px; margin-top: 1px; }
#scr-lobby .lc-rec span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
#scr-lobby .lob-card .conn { font-size: 11px; font-weight: 700; }
#scr-lobby .lob-card .conn.ok, #scr-lobby .lob-card .conn.host { color: #5fe08a; }
#scr-lobby .lob-card .conn.wait { color: #ffd23f; } #scr-lobby .lob-card .conn.bad { color: #ff7a85; }
/* Shiny: twinkles over the card. You: your card breathes. Someone arrives: a flash. */
#scr-lobby .lob-card.shiny::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(circle at 20% 25%, #fff 0 1.5px, transparent 2.5px), radial-gradient(circle at 78% 18%, #fff 0 1px, transparent 2px),
              radial-gradient(circle at 70% 52%, #bdf3ff 0 1.5px, transparent 2.5px), radial-gradient(circle at 30% 58%, #fff6c0 0 1px, transparent 2px);
  animation: lcTwinkle 1.8s ease-in-out infinite; }
@keyframes lcTwinkle { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
#scr-lobby .lob-card.me { animation: lcMe 2.8s ease-in-out infinite; }
@keyframes lcMe { 0%, 100% { box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 14px color-mix(in srgb, var(--pc) 28%, transparent); }
                  50% { box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 26px color-mix(in srgb, var(--pc) 60%, transparent); } }
#scr-lobby .lob-card.joined { animation: lcJoin .75s cubic-bezier(.2,1.4,.4,1); }
@keyframes lcJoin { 0% { scale: .7; opacity: 0; filter: brightness(3); } 60% { scale: 1.04; opacity: 1; filter: brightness(1.6); } 100% { scale: 1; filter: none; } }
/* Free place. */
#scr-lobby .lob-card.empty { position: relative; gap: 6px; border: 2px dashed color-mix(in srgb, var(--pc) 40%, transparent); border-radius: 14px;
  background: radial-gradient(ellipse 60% 45% at 50% 45%, color-mix(in srgb, var(--pc) 10%, transparent), transparent 70%); color: var(--muted); }
#scr-lobby .lob-card.empty .lc-slot { position: absolute; top: 7px; left: 10px; background: color-mix(in srgb, var(--pc) 45%, #222); }
#scr-lobby .lob-card.empty b { font-family: Pixelify, 'Segoe UI', sans-serif; font-size: 15px; color: #aab3cc; }
#scr-lobby .lob-card.empty small { font-size: 11px; }
#scr-lobby .lob-card.empty[onclick], #scr-lobby .lob-card.empty:hover { border-color: color-mix(in srgb, var(--pc) 70%, transparent); }
#scr-lobby .lc-ball { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 3px solid #0d0f16; opacity: .75;
  background: linear-gradient(#ff4d4d 0 45%, #0d0f16 45% 55%, #eef1f8 55%); animation: lcWobble 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
#scr-lobby .lc-ball::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; translate: -50% -50%; border-radius: 50%; background: #eef1f8; border: 3px solid #0d0f16; }
@keyframes lcWobble { 0%, 60%, 100% { rotate: 0deg; } 68% { rotate: -14deg; } 76% { rotate: 12deg; } 84% { rotate: -6deg; } 92% { rotate: 3deg; } }

/* Short screens (phones in landscape, AYN Thor): the 2×2 cards keep the essentials. */
@media (max-height: 520px) {
  #scr-lobby .lob-card.filled { padding: 4px 7px 5px; gap: 1px; }
  #scr-lobby .lob-card.filled > * { flex: none; }
  #scr-lobby .lob-card.filled > .lc-stage { height: auto; flex: 1 1 auto; min-height: 30px; }
  #scr-lobby .lc-stage canvas { width: auto; height: min(100%, 84px); min-height: 40px; }
  #scr-lobby .lc-ring { width: 70px; height: 14px; bottom: 2px; }
  #scr-lobby .lc-name { font-size: 13px; }
  #scr-lobby .lc-mon { font-size: 10.5px; }
  #scr-lobby .lc-bars, #scr-lobby .lc-rec, #scr-lobby .lc-tags .type { display: none; }
  #scr-lobby .lc-stage canvas { min-height: 30px; }
  #scr-lobby .lc-chip { font-size: 9.5px; padding: 0 5px; }
  #scr-lobby .lc-top { min-height: 14px; font-size: 10px; }
  #scr-lobby .lc-slot { font-size: 9.5px; }
  #scr-lobby .lc-ball { width: 32px; height: 32px; border-width: 2px; }
  #scr-lobby .lc-ball::after { width: 8px; height: 8px; border-width: 2px; }
  #scr-lobby .lob-card.empty b { font-size: 12px; }
  #scr-lobby .lob-card.empty small { font-size: 10px; }
  /* (26-10-2026) The sprite gives way first, so the rows under it are never cut in half; "Host" and "Connected"
     are already shown by the crown and the green bars (connecting or failing still shows its text). */
  #scr-lobby .lob-card.filled > .lc-stage, #scr-lobby .lc-stage canvas { min-height: 0; }
  #scr-lobby .lob-card .conn.ok, #scr-lobby .lob-card .conn.host { display: none; }
}
/* Phones and the app (AYN Thor): no spinning masked rays. */
body.touch #scr-lobby .lc-rays, html.pl-app #scr-lobby .lc-rays { animation: none; }
@media (prefers-reduced-motion: reduce) { #scr-lobby .lc-rays, #scr-lobby .lc-stage canvas, #scr-lobby .lc-ring, #scr-lobby .lc-ball, #scr-lobby .lob-card.me { animation: none; } }

/* ---------- Room ambience (20-10-2026, js/ui/region-ui.js lobby) ----------
 * The chosen region's scene behind everything (dimmed) with embers rising, a banner with the
 * region and the team, and the window's edge glowing gold. */
#scr-lobby.scr.dim { background: radial-gradient(ellipse at 50% 30%, rgba(3,5,14,.55), rgba(3,5,14,.92) 75%), var(--lob-bg, none) center / cover no-repeat, #03050e; image-rendering: pixelated; }
#scr-lobby::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background: radial-gradient(circle at 12% 80%, #ffd23f 0 1.5px, transparent 2.5px), radial-gradient(circle at 34% 60%, #ffb35c 0 1px, transparent 2px),
              radial-gradient(circle at 58% 90%, #fff3c0 0 1.5px, transparent 2.5px), radial-gradient(circle at 81% 70%, #ffd23f 0 1px, transparent 2px),
              radial-gradient(circle at 93% 40%, #ffb35c 0 1.5px, transparent 2.5px), radial-gradient(circle at 5% 30%, #fff3c0 0 1px, transparent 2px);
  background-size: 100% 100%; animation: lobEmbers 9s linear infinite; }
@keyframes lobEmbers { from { translate: 0 8%; opacity: 0; } 15% { opacity: .6; } 85% { opacity: .6; } to { translate: 0 -10%; opacity: 0; } }
#scr-lobby > .box { position: relative; z-index: 1; }
#scr-lobby .lob-box { border-color: rgba(255,210,63,.32); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 20px 60px rgba(0,0,0,.6), 0 0 40px rgba(255,190,60,.12); }
#scr-lobby .lob-head h2 { text-shadow: 0 0 18px rgba(255,210,63,.35); }

#scr-lobby .lr-banner { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 12px; min-height: 66px;
  padding: 8px 14px; border-radius: 12px; border: 2px solid rgba(255,210,63,.4); box-shadow: inset 0 0 0 1px rgba(0,0,0,.5), 0 0 16px rgba(255,190,60,.12); }
#scr-lobby .lr-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; z-index: -2; opacity: 0; transition: opacity .35s; }
#scr-lobby .lr-scene.ready { opacity: 1; }
#scr-lobby .lr-banner::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3,5,14,.9) 0%, rgba(3,5,14,.35) 50%, rgba(3,5,14,.85) 100%); }
#scr-lobby .lr-banner::after { content: ''; position: absolute; top: -20%; bottom: -20%; width: 16%; left: -30%; z-index: -1; transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255,240,200,.18), transparent); animation: lrShine 5.5s ease-in-out infinite; }
@keyframes lrShine { 0%, 60% { left: -30%; } 100% { left: 130%; } }
#scr-lobby .lr-txt, #scr-lobby .lr-team { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#scr-lobby .lr-txt small, #scr-lobby .lr-team small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #ffd23f; font-weight: 800; }
#scr-lobby .lr-txt b { font-family: Pixelify, 'Segoe UI', sans-serif; font-size: 23px; line-height: 1.05; color: #fff; text-shadow: 0 2px 0 #000, 0 0 14px rgba(255,210,63,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#scr-lobby .lr-txt span { font-size: 12px; color: #e3e9ff; text-shadow: 0 1px 0 #000; white-space: nowrap; }
#scr-lobby .lr-txt em { font-style: normal; color: #ffd23f; font-weight: 800; }
#scr-lobby .lr-team { margin-left: auto; align-items: flex-end; font-size: 12px; color: #e3e9ff; text-shadow: 0 1px 0 #000; }
#scr-lobby .lr-team span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
#scr-lobby .lob-region .chips { margin-top: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
#scr-lobby .lob-region .chips::-webkit-scrollbar { display: none; }
#scr-lobby .lob-region .chip { flex: none; }

@media (max-height: 520px) {
  #scr-lobby .lr-banner { min-height: 0; padding: 4px 10px; gap: 8px; border-radius: 9px; }
  #scr-lobby .lr-txt b { font-size: 15px; }
  #scr-lobby .lr-txt span, #scr-lobby .lr-team { font-size: 10.5px; }
  #scr-lobby .lr-txt small, #scr-lobby .lr-team small { font-size: 8.5px; }
  #scr-lobby .lr-team { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 0 8px; max-width: 45%; }
  #scr-lobby .lr-team small { width: 100%; text-align: right; }
  #scr-lobby .lob-region .chips { margin-top: 4px; }
}
body.touch #scr-lobby::before, html.pl-app #scr-lobby::before { animation-duration: 14s; }
@media (prefers-reduced-motion: reduce) { #scr-lobby::before, #scr-lobby .lr-banner::after { animation: none; } }
@media (min-height: 521px) and (max-height: 820px) {
  #scr-lobby .lob-box { gap: 8px; }
  #scr-lobby .lob-card.filled { gap: 2px; padding-bottom: 7px; }
  #scr-lobby .lc-stage { height: 84px; }
  #scr-lobby .lc-stage canvas { width: 130px; height: 104px; }
}

/* ---------- Room: start button and co-op run intro (20-10-2026) ---------- */
#scr-lobby #lobby-start { position: relative; overflow: hidden; }
#scr-lobby #lobby-start:not(:disabled) { animation: lobReady 1.8s ease-in-out infinite; }
#scr-lobby #lobby-start:not(:disabled)::after { content: ''; position: absolute; top: -30%; bottom: -30%; width: 14%; left: -20%; transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); animation: lobShine 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes lobReady { 0%, 100% { box-shadow: 0 4px 0 #b07a10, 0 0 0 rgba(255,210,63,0); } 50% { box-shadow: 0 4px 0 #b07a10, 0 0 26px rgba(255,210,63,.6); } }
@keyframes lobShine { 0%, 55% { left: -20%; } 100% { left: 120%; } }
#scr-lobby #lobby-start:disabled { filter: saturate(.35) brightness(.75); }

/* The team over the game at the start of a co-op run (social-ui.js intro). */
#coop-intro { position: fixed; inset: 0; z-index: 55; pointer-events: none; display: flex; align-items: center; justify-content: center; animation: ciOut .45s 2.25s ease-in forwards; }
#coop-intro .ci-band { position: relative; width: 100%; padding: 14px 0 18px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: linear-gradient(90deg, rgba(3,5,14,.55), rgba(3,5,14,.96) 18%, rgba(3,5,14,.96) 82%, rgba(3,5,14,.55));
  border-top: 2px solid rgba(255,210,63,.55); border-bottom: 2px solid rgba(255,210,63,.55); transform: scaleY(0); animation: ciBand .3s ease-out forwards; }
#coop-intro .ci-team { display: flex; gap: clamp(10px, 4vw, 44px); justify-content: center; }
#coop-intro .ci-mon { display: flex; flex-direction: column; align-items: center; opacity: 0; transform: translateY(26px) scale(.8); animation: ciMon .45s cubic-bezier(.2,1.4,.4,1) forwards; }
#coop-intro .ci-mon canvas { width: clamp(96px, 14vw, 180px); height: auto; image-rendering: pixelated; }
#coop-intro .ci-mon b { font-family: Pixelify, 'Segoe UI', sans-serif; font-size: clamp(13px, 1.8vw, 20px); color: var(--pc); text-shadow: 0 2px 0 #000; }
#coop-intro .ci-mon small { font-size: clamp(10px, 1.2vw, 13px); color: #dfe6ff; }
#coop-intro .ci-go { font-family: Pixelify, 'Segoe UI', sans-serif; font-size: clamp(34px, 7vw, 84px); line-height: 1; color: #ffd23f; letter-spacing: .06em;
  text-shadow: 0 4px 0 #8a5a00, 0 0 24px rgba(255,210,63,.6); opacity: 0; transform: scale(2.4) rotate(-8deg); animation: ciGo .4s 1.1s cubic-bezier(.2,1.5,.4,1) forwards; }
@keyframes ciBand { to { transform: scaleY(1); } }
@keyframes ciMon { to { opacity: 1; transform: none; } }
@keyframes ciGo { to { opacity: 1; transform: scale(1) rotate(-4deg); } }
@keyframes ciOut { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #scr-lobby #lobby-start, #scr-lobby #lobby-start::after { animation: none; } }
@media (max-height: 420px) {
  #scr-lobby .lc-tags { display: none; }
}

/* PC Box: rank up and max rank (21-10-2026). On short screens side by side, and only the next bonus. */
.pcb-side .pcs-btns { display: flex; flex-direction: column; gap: 6px; margin: 4px 12px 0; }
.pcb-side .pcs-btns .btn { margin: 0; }
@media (max-height: 520px) {
  .pcb-side .pcs-btns { flex-direction: row; }
  .pcb-side .pcs-btns .btn { flex: 1 1 0; min-width: 0; padding: 6px 6px; font-size: 11.5px; line-height: 1.2; }
  .pcb-side .pcs-bonus:not(.next), .pcb-side .pcs-row:has(+ .pcs-row) { display: none; }
}

/* (21-10-2026) Touch: tap targets at least 40 px (upgrade buttons, Pokédex type chips,
   close and report buttons), and the report icon always visible (it only showed on hover). */
@media (pointer: coarse) {
  #scr-upgrades .upg-btns .btn, #scr-dex .chip.type-f { min-height: 40px; }
  .support-ask .x { min-width: 40px; min-height: 40px; font-size: 22px; }
  .rk-rep { opacity: .7; padding: 8px; }
  .hub-x-mini { width: 40px; height: 40px; }
}
/* Phones and the app: no blend mode spinning behind the PC Box Pokémon (slow on the AYN Thor). */
body.touch .pcs-rays, html.pl-app .pcs-rays { mix-blend-mode: normal; opacity: .22; animation: none; }

/* (23-10-2026) Landscape phones: the banner target as a slim bar, and the banner keeps a readable height. */
@media (max-height: 520px) {
  #scr-gacha #gacha-want { min-height: 0; padding: 1px 4px 1px 8px !important; margin: 4px 0 0 !important; }
  #scr-gacha #gacha-want .btn { min-height: 22px !important; padding: 2px 8px !important; font-size: 11px !important; line-height: 1.1 !important; }
  #scr-gacha #banner { min-height: 104px !important; }
}

/* ---------- Mega Evolutions screen (23-10-2026, ui/mega-ui.js) ---------- */
#mega-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#scr-mega .box { position: relative; z-index: 1; display: flex; flex-direction: column; max-height: calc(100vh / var(--uiz, 1) - 24px); max-height: calc(100dvh / var(--uiz, 1) - 24px);
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 120px), rgba(0,0,0,.66); backdrop-filter: blur(2px); }
#scr-mega .box > .row.between h2 { font-size: 30px; }
#mega-sub::before { content: '· '; }     /* (26-10-2026) the separator from CSS: on phones the count goes under the title, without it */
#scr-mega .box > .row.between { flex: 0 0 auto; }
/* the top bar (coins, tickets, settings) floats over the screen: leave it room on big screens */
@media (min-width: 821px) and (min-height: 621px) {
  #scr-mega .box { margin-top: 52px; max-height: calc(100vh / var(--uiz, 1) - 76px); max-height: calc(100dvh / var(--uiz, 1) - 76px); }
}
.mg-grid { min-height: 176px; }
/* the hero (23-10-2026: centred and symmetric): both forms side by side on top, everything else centred under them */
.mg-hero { --t1: #ff5fd0; --t2: #a040c0; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-top: 8px; padding: 8px 14px 10px; border-radius: var(--rad);
  border: 1px solid color-mix(in srgb, var(--t1) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--t1) 16%, #000) 0%, rgba(0,0,0,.5) 55%, color-mix(in srgb, var(--t2) 14%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 40px color-mix(in srgb, var(--t1) 22%, transparent); animation: mg-hero-in .5s cubic-bezier(.2,.9,.2,1) both; }
@keyframes mg-hero-in { from { opacity: 0; transform: translateY(8px); } }
.mg-stage { position: relative; height: 104px; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 26px; }
.mg-stage .mg-main canvas { width: 114px; height: 103px; }
/* name, types and stones on one line */
.mg-head { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; }
.mg-stage .mg-main { position: relative; z-index: 2; animation: mg-float 3.2s ease-in-out infinite; }
.mg-stage .mg-main.shiny { animation-delay: -1.6s; }
.mg-stage .mg-main canvas { image-rendering: pixelated; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--t1) 70%, transparent)) drop-shadow(0 12px 10px rgba(0,0,0,.6)); }
.mg-stage .mg-main.shiny canvas { filter: drop-shadow(0 0 14px rgba(154,230,255,.7)) drop-shadow(0 12px 10px rgba(0,0,0,.6)); }
.mg-stage .mg-main canvas.pop { animation: mg-pop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes mg-pop { 40% { transform: scale(1.12); } }
@keyframes mg-float { 50% { transform: translateY(-7px); } }
.mg-aura { position: absolute; left: 50%; top: 58%; width: 330px; height: 160px; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--t1) 50%, transparent) 0%, color-mix(in srgb, var(--t2) 26%, transparent) 40%, transparent 70%); animation: mg-aura 2.6s ease-in-out infinite; }
@keyframes mg-aura { 50% { transform: scale(1.08); opacity: .75; } }
.mg-ring { position: absolute; left: 50%; bottom: -150px; width: 300px; height: 300px; translate: -50% 0; border-radius: 50%; pointer-events: none; opacity: .8;
  background: conic-gradient(from 0deg, transparent 0 40%, color-mix(in srgb, var(--t1) 80%, #fff) 50%, transparent 60%, transparent 85%, color-mix(in srgb, var(--t2) 80%, #fff) 95%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%, #000 66%, transparent 68%); mask: radial-gradient(circle, transparent 60%, #000 62%, #000 66%, transparent 68%);
  transform: scaleY(.3) rotate(0deg); animation: mg-spin 7s linear infinite; }
@keyframes mg-spin { to { transform: scaleY(.3) rotate(360deg); } }
.mg-info { min-width: 0; width: min(860px, 100%); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mg-info h3 { margin: 0; font-size: 20px; color: #fff; text-shadow: 0 0 18px color-mix(in srgb, var(--t1) 70%, transparent), 0 2px 0 #000; }
.mg-info h3 .mg-base { font: 600 13px var(--font-body); color: var(--muted); text-shadow: none; }
.mg-types { margin: 0; }
.mg-state { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; }
.mg-pill { font: 700 12px var(--font-body); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: rgba(0,0,0,.4); display: inline-flex; align-items: center; gap: 4px; text-shadow: none; -webkit-font-smoothing: antialiased; }
.mg-pill.ok { color: #ff8ae6; border-color: rgba(255,95,208,.6); box-shadow: 0 0 10px rgba(255,95,208,.3); }
.mg-pill.ok.sh { color: #9ae6ff; border-color: rgba(154,230,255,.6); box-shadow: 0 0 10px rgba(154,230,255,.3); }
.mg-pill.feat { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.mg-lv { width: 100%; margin: 0; padding: 5px 10px; border-radius: 10px; background: rgba(0,0,0,.35); border: 1px solid var(--line); }
.mg-lv-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mg-lv-h b { color: var(--gold); font-size: 14px; }
.mg-lv-h span { font: 600 12px var(--font-body); color: var(--muted); }
.mg-lv small, .mg-pv, .mg-mv, .mg-card small, .mg-cta .sub { text-shadow: none; }
.mg-bar { position: relative; height: 8px; margin: 4px 0 3px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.mg-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--t2), var(--t1), #fff); box-shadow: 0 0 10px var(--t1); transition: width .6s cubic-bezier(.2,.9,.2,1); }
.mg-bar u { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(0,0,0,.55); }
.mg-lv small { display: block; font: 500 11px/1.3 var(--font-body); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* passive, signature move and shiny move side by side, compact */
.mg-abil { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 2px 0; }
.mg-pv, .mg-mv { margin: 0; padding: 5px 8px; border-radius: 8px; background: rgba(0,0,0,.3); border: 1px solid var(--line); font: 500 11px/1.3 var(--font-body); color: var(--muted); }
.mg-pv b, .mg-mv b { display: block; color: #fff; font-family: var(--font); font-size: 11px; margin-bottom: 2px; }
.mg-pv span, .mg-mv span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mg-mv.sh b { color: #9ae6ff; }
.mg-mv.muted { opacity: .6; }
.mg-cta { gap: 10px; align-items: center; justify-content: center; margin-top: 2px; }
.mg-cta .btn { padding-top: 6px; padding-bottom: 6px; }
.mg-cta .sub { font-size: 12px; }
/* the gallery */
.mg-grid { flex: 1 1 auto; min-height: 150px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 8px; margin-top: 10px; padding: 2px 4px 6px 2px; }
.mg-card { --t1: #ff5fd0; --t2: #a040c0; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 6px 8px; border-radius: 12px; cursor: pointer; color: #fff; font-family: var(--font);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--t1) 28%, #000) 0%, rgba(0,0,0,.55) 70%); border: 1px solid color-mix(in srgb, var(--t1) 40%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 4px 12px rgba(0,0,0,.5); transition: transform .18s, box-shadow .18s, border-color .18s; animation: mg-card-in .45s cubic-bezier(.2,.9,.2,1) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes mg-card-in { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.mg-card:hover, .mg-card:focus-visible { transform: translateY(-3px) scale(1.03); border-color: var(--t1); box-shadow: 0 0 0 1px #000, 0 0 22px color-mix(in srgb, var(--t1) 45%, transparent), 0 12px 24px rgba(0,0,0,.7); z-index: 2; }
.mg-card.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 24px rgba(255,210,74,.35); }
.mg-card .mg-sprite { width: 100px; height: 87px; image-rendering: pixelated; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--t1) 60%, transparent)); transition: filter .3s; }
.mg-card b { font-size: 11px; text-align: center; line-height: 1.15; }
.mg-card small { font: 600 11px var(--font-body); color: var(--muted); }
.mg-card.owned small { color: var(--gold); }
.mg-card.owned .mg-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.18) 45%, rgba(255,255,255,.05) 50%, transparent 65%); background-size: 250% 100%; animation: mg-shine 4.5s ease-in-out infinite; }
@keyframes mg-shine { 0% { background-position: 120% 0; } 60%, 100% { background-position: -120% 0; } }
.mg-card.locked .mg-sprite { filter: saturate(.25) brightness(.55); }
.mg-card.locked b { color: var(--muted); }
.mg-card.soon { border-style: dashed; border-color: rgba(255,255,255,.18); background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.05), rgba(0,0,0,.6) 70%); }
.mg-card.soon .mg-sprite { filter: blur(5px) brightness(.18) contrast(1.4); opacity: .85; animation: mg-breathe 3.4s ease-in-out infinite; }
@keyframes mg-breathe { 50% { filter: blur(7px) brightness(.26) contrast(1.4); } }
.mg-card.soon b { letter-spacing: 2px; color: var(--muted); }
.mg-card.shake { animation: mg-shake .35s; }
@keyframes mg-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.mg-card.feat { border-color: rgba(255,210,74,.7); animation: mg-card-in .45s cubic-bezier(.2,.9,.2,1) both, mg-feat 1.6s ease-in-out infinite alternate; }
@keyframes mg-feat { to { box-shadow: 0 0 0 1px rgba(255,210,74,.5), 0 0 26px rgba(255,210,74,.35); } }
.mg-badge { position: absolute; top: 6px; left: 6px; font: 700 9px var(--font); font-style: normal; letter-spacing: .5px; padding: 2px 6px; border-radius: 999px; color: var(--gold-ink); background: var(--gold); box-shadow: 0 0 8px rgba(255,210,74,.5); text-shadow: none; }
.mg-badge.soon { color: #fff; background: rgba(255,255,255,.14); box-shadow: none; }
.mg-stone { position: absolute; top: 5px; right: 6px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,95,208,.25); border: 1px solid rgba(255,95,208,.6); box-shadow: 0 0 8px rgba(255,95,208,.5); }
.mg-card.shiny .mg-stone { background: rgba(154,230,255,.25); border-color: rgba(154,230,255,.7); box-shadow: 0 0 8px rgba(154,230,255,.6); }
/* phones and short screens: the hero in a row, smaller stage, the grid tighter */
@media (max-width: 900px), (max-height: 620px) {
  .mg-hero { gap: 3px; padding: 5px 10px 6px; }
  .mg-stage { height: 92px; gap: 22px; }
  .mg-stage .mg-main canvas { width: 102px; height: 92px; }
  .mg-abil { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mg-aura { width: 360px; height: 180px; } .mg-ring { width: 220px; height: 220px; bottom: -110px; }
  .mg-info h3 { font-size: 19px; }
  .mg-pv, .mg-mv, .mg-lv small { font-size: 11px; }
  .mg-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
  .mg-card .mg-sprite { width: 92px; height: 80px; }
  #scr-mega .box > .row.between h2 { font-size: 22px; }
}
@media (max-height: 520px) {
  #scr-mega #mega-sub { display: block; font-size: 11.5px !important; line-height: 1.25; margin-top: 1px; }
  #scr-mega #mega-sub::before { content: none; }
  .mg-pv span, .mg-mv span { display: block; overflow: visible; }     /* the whole text: the window scrolls on phones (2 lines and "..." on PC) */
  #scr-mega .box > .row.between:first-child > .row { flex-wrap: nowrap; }
}
@media (max-height: 460px) {
  .mg-stage { height: 80px; gap: 18px; } .mg-stage .mg-main canvas { width: 88px; height: 80px; }
  .mg-aura { width: 280px; height: 140px; } .mg-ring { width: 170px; height: 170px; bottom: -86px; }
  .mg-abil { display: none; }
  .mg-lv small { display: none; }
}
@media (max-width: 520px) {
  .mg-stage { height: 110px; gap: 16px; } .mg-stage .mg-main canvas { width: 120px; height: 108px; }
}

/* ---------- the one-of-a-kind demonic forms (23-10-2026) ---------- */
.seg button.demon.on { color: #ff6a6a; }
.badge-r.demon { background: rgba(140,0,20,.7); border-color: #ff3b3b; box-shadow: 0 0 8px rgba(255,40,40,.6); }
.stage.uniq { box-shadow: inset 0 0 60px rgba(255,30,30,.35); }
.pv-box.uniq-box { border-color: rgba(255,59,59,.55); background: linear-gradient(180deg, rgba(90,0,10,.35), rgba(0,0,0,.2)); }
.pv-box.uniq-box b { color: #ff6a6a; }
.pv-box.uniq-box.locked { opacity: .78; }
.pv-box.uniq-box .demon-own { color: var(--gold); }
.pcard.uniq { --rc: #ff2020; border-color: #ff2a2a; background: radial-gradient(circle at 50% 30%, #4a0008 0%, #0a0003 70%); overflow: hidden;
  animation: card-in .38s cubic-bezier(.2,1.3,.4,1) both, uniq-pulse 1s ease-in-out infinite alternate; }
.pcard.uniq::after { background: linear-gradient(100deg, transparent, rgba(255,80,80,.35), transparent); }
/* the sigil behind the Pokémon (turning) and dark motes rising */
.pcard.uniq .dm-sigil { position: absolute; left: 50%; top: 46%; width: 150px; height: 150px; margin: -75px 0 0 -75px; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='46' fill='none' stroke='%23ff2a2a' stroke-width='2'/><circle cx='50' cy='50' r='38' fill='none' stroke='%23ff2a2a' stroke-width='1' opacity='.6'/><polygon points='50,12 72.3,80.7 13.9,38.3 86.1,38.3 27.7,80.7' fill='none' stroke='%23ff2a2a' stroke-width='2'/></svg>") center/contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(255,30,30,.8)); animation: dm-spin 14s linear infinite; }
@keyframes dm-spin { to { transform: rotate(360deg); } }
.pcard.uniq .dm-motes { position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image: radial-gradient(circle, rgba(255,60,60,.9) 0 1.5px, transparent 2.5px), radial-gradient(circle, rgba(20,0,6,.95) 0 3px, transparent 4px), radial-gradient(circle, rgba(255,160,160,.8) 0 1px, transparent 1.6px);
  background-size: 46px 60px, 70px 90px, 34px 44px; background-position: 6px 0, 30px 20px, 18px 10px; animation: dm-rise 7s linear infinite; }
@keyframes dm-rise { to { background-position: 6px -120px, 30px -160px, 18px -88px; } }
.pcard.uniq canvas, .pcard.uniq b, .pcard.uniq .tag { position: relative; z-index: 1; }
.pcard.uniq b { color: #ff6a6a; text-shadow: 0 0 10px rgba(255,40,40,.8); }
.pcard.uniq .tag .new { color: #fff; background: #b00020; box-shadow: 0 0 12px rgba(255,40,40,.8); }
@keyframes uniq-pulse { from { box-shadow: 0 0 10px rgba(255,30,30,.4); } to { box-shadow: 0 0 34px rgba(255,30,30,.9), 0 0 60px rgba(255,80,0,.4); } }
.hub-trade-slot.uq, .hub-trade-item.uq { border-color: rgba(255,59,59,.6); background: radial-gradient(circle at 50% 30%, rgba(255,40,40,.16), transparent 70%), #0a0a10; }
.hub-trade-item.uq small { color: #ff6a6a; }

/* ---------- Pokédex detail card (23-10-2026): header + tabs, nothing to scroll ---------- */
#dex-detail .dx-head { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
#dex-detail .dx-head .stage { width: 124px !important; height: 108px !important; margin: 0 !important; }
#dex-detail .dx-id { min-width: 0; text-align: left; }
#dex-detail .dx-no { color: var(--muted); font-size: 12px; }
#dex-detail .dx-id h3 { margin: 0; font-size: 20px; line-height: 1.15; display: flex; align-items: center; gap: 6px; }
#dex-detail .dx-rar { font-size: 13px; margin: 2px 0; }
#dex-detail .dx-types { margin: 3px 0; }
#dex-detail .dx-id .seg { margin: 4px 0 0; width: max-content; max-width: 100%; }
#dex-detail .dx-id .seg button { padding: 3px 8px; font-size: 12px; }
/* three forms don't fit beside the sprite: the selector goes under the header, full width */
#dex-detail .dx-head .seg { grid-column: 1 / -1; justify-self: center; margin: 2px 0 0; }
#dex-detail .dx-pick { width: 100%; margin: 8px 0 6px; padding: 8px; font-size: 15px; }
#dex-detail .dx-miss { color: var(--muted); font-size: 13px; text-align: center; margin: 8px 0; }
#dex-detail .dx-tabs { display: flex; gap: 4px; margin: 0 0 6px; flex-wrap: nowrap; }
#dex-detail .dx-tabs .chip { flex: 1 1 0; min-width: 0; justify-content: center; padding: 4px 6px; font-size: 12px; white-space: nowrap; }
#dex-detail .dx-page { display: none; }
#dex-detail .dx-page.on { display: block; animation: fade .18s ease-out; }
#dex-detail .dx-start { font-size: 13px; margin: 2px 0 6px; }
#dex-detail .dx-h { font-size: 12px; color: var(--muted); margin: 6px 0 2px; }
#dex-detail .dx-moves { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; }
#dex-detail .dx-moves span { font-size: 12.5px; }
#dex-detail .dx-page .pv-box { margin: 4px 0 6px; }
#dex-detail .dx-page .stat { margin: 3px 0; }
/* phones (the detail is a pager page): the header is a child, so the old stage/seg grid rules don't apply */
@media (max-height: 520px) {
  #dex-detail { display: flex !important; flex-direction: column; overflow: hidden !important; }
  #dex-detail .dx-head, #dex-detail .dx-pick, #dex-detail .dx-tabs { flex: 0 0 auto; }
  #dex-detail .dx-page.on { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 2px; }
  #dex-detail .dx-head .stage { grid-row: 1 / span 1; }
  #dex-detail .dx-head { grid-template-columns: 84px minmax(0, 1fr); gap: 4px 8px; }
  #dex-detail .dx-head .stage { width: 84px !important; height: 74px !important; }
  #dex-detail .dx-id h3 { font-size: 15px; }
  #dex-detail .dx-no { font-size: 10.5px; }
  #dex-detail .dx-rar { font-size: 11px; margin: 0; }
  #dex-detail .dx-types { margin: 2px 0; }
  #dex-detail .dx-id .seg { margin: 2px 0 0; } #dex-detail .dx-id .seg button { padding: 2px 6px; font-size: 11px; }
  #dex-detail .dx-pick { margin: 4px 0 !important; padding: 5px !important; font-size: 13px !important; }
  #dex-detail .dx-tabs { margin: 0 0 4px; } #dex-detail .dx-tabs .chip { font-size: 11px; padding: 2px 4px; min-height: 26px; }
}

/* (24-10-2026) The ×100 pull: compact cards, ten to a row on a wide screen. */
.pull-results.many { max-width: 1060px; gap: 6px; }
.pull-results.many .pcard { width: 96px; padding: 5px 3px; border-radius: 10px; }
.pull-results.many .pcard canvas { width: 80px; height: auto; }
.pull-results.many .pcard b { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pull-results.many .pcard .tag { font-size: 9px; }
.pull-results.many .pcard .stars { font-size: 10px; padding: 0 5px; }
.pull-results.many .pcard .stars img { width: 14px; height: 14px; }
@media (max-width: 520px) { .pull-results.many .pcard { width: 76px; } .pull-results.many .pcard canvas { width: 64px; } }
/* On short screens (phones in landscape) the ×10 fits without scrolling; the ×100 must scroll, eight to a row,
   with Continue stuck to the bottom. */
@media (max-height: 520px) {
  #pull-fx.many { overflow-y: auto !important; }
  #pull-fx.many .pull-results { flex: none !important; }
  #pull-fx.many .pcard { width: min(96px, calc((100vw - 64px - 42px - env(safe-area-inset-left) - env(safe-area-inset-right)) / 8)) !important; }
  #pull-fx.many .pcard canvas { width: min(56px, 80%) !important; }
  #pull-fx.many .pcard b { font-size: 10px !important; }
  #pull-fx.many #pull-close { position: sticky !important; bottom: 6px; }
}

/* =====================================================================
 * Trainer card, second overhaul (24-10-2026: goals-ui.js G.ProfileUI.card, effects in G.HoloFX).
 * --c1/--c2 = the first favourite's types · --rk = the trainer rank's colour · --t1/--t2 = each favourite's types
 * --pc = a panel's colour · --d = entrance delay
 * ===================================================================== */
@property --pfa { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.profile-box { width: min(820px, 100%); }
.pf { display: flex; flex-direction: column; gap: 12px; }
.pf-note { margin: 0 0 2px; }
.pf > * { animation: pf-up .55s cubic-bezier(.2,.9,.3,1) both; }
.pf > :nth-child(2) { animation-delay: .06s; } .pf > :nth-child(3) { animation-delay: .1s; } .pf > :nth-child(4) { animation-delay: .16s; }
.pf > :nth-child(5) { animation-delay: .22s; } .pf > :nth-child(6) { animation-delay: .28s; } .pf > :nth-child(n+7) { animation-delay: .34s; }
@keyframes pf-up { from { opacity: 0; transform: translateY(14px) scale(.985); } }

/* ---- hero */
.pf-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 14px; min-height: 188px;
  padding: 14px 16px 10px; border-radius: 20px; overflow: hidden; background: #05050a;
  border: 1px solid color-mix(in srgb, var(--c1) 55%, #2a2a33);
  box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 18px 40px rgba(0,0,0,.55), 0 0 34px color-mix(in srgb, var(--c1) 24%, transparent), inset 0 1px 0 rgba(255,255,255,.14); }
.pf-aurora { position: absolute; inset: -40%; z-index: -3; pointer-events: none; filter: blur(38px); opacity: .95;
  background:
    radial-gradient(closest-side at 72% 62%, color-mix(in srgb, var(--c1) 70%, transparent), transparent),
    radial-gradient(closest-side at 92% 18%, color-mix(in srgb, var(--c2) 62%, transparent), transparent),
    radial-gradient(closest-side at 18% 88%, rgba(255,210,74,.28), transparent),
    radial-gradient(closest-side at 40% 10%, rgba(120,90,255,.35), transparent);
  animation: pf-aurora 14s ease-in-out infinite alternate; }
@keyframes pf-aurora { 0% { transform: translate(0, 0) rotate(0deg) scale(1); } 50% { transform: translate(-4%, 3%) rotate(8deg) scale(1.08); } 100% { transform: translate(3%, -2%) rotate(-6deg) scale(1.02); } }
.pf-hero::before { content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: repeating-linear-gradient(115deg, transparent 0 7px, rgba(255,255,255,.03) 7px 8px), linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.55)); }
.pf-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
/* (26-10-2026) The banner: a region's scene (with its tall grass in front), or one of their Pokémon big, behind the card. */
.pf-bn { position: absolute; inset: 0; z-index: -3; pointer-events: none; }
.pf-bn.reg { background-size: cover; background-position: center 35%; image-rendering: pixelated; opacity: .9; }
.pf-bn-front { position: absolute; left: 0; right: 0; bottom: 0; height: 62%; background-size: cover; background-position: center bottom; image-rendering: pixelated; opacity: .85; }
.pf-bn.mon { overflow: hidden; background: radial-gradient(ellipse 40% 75% at 58% 70%, color-mix(in srgb, var(--bc) 42%, transparent), transparent 72%); }
.pf-bn.mon canvas { position: absolute; inset: 4% 0 0; width: 100%; height: 96%; object-fit: contain; object-position: 58% 100%; image-rendering: pixelated;
  opacity: .58; filter: saturate(1.15) drop-shadow(0 0 18px color-mix(in srgb, var(--bc) 60%, transparent)); }
.pf-hero.has-bn .pf-aurora { opacity: .45; }
.pf-bnregs { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-bnreg { width: 96px; height: 52px; display: flex; align-items: flex-end; justify-content: center; padding: 3px; border-radius: 10px; border: 1px solid var(--line);
  background: #0b0b12 center 35% / cover no-repeat; image-rendering: pixelated; cursor: pointer; }
.pf-bnreg b { font-size: 11px; color: #fff; text-shadow: 0 1px 0 #000, 0 0 6px #000; }
.pf-bnreg.none { align-items: center; background: repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 6px, transparent 6px 12px), #0b0b12; }
.pf-bnreg.on, .pf-bnmon.on { border-color: #ffd23f; box-shadow: 0 0 0 1px #ffd23f, 0 0 12px rgba(255,210,63,.4); }
.pf-bnq { margin: 8px 0 6px; }
.pf-bnmons { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-bnmon { width: 56px; height: 50px; display: flex; align-items: flex-end; justify-content: center; padding: 0; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); cursor: pointer; }
.pf-bnmon.f-s { border-color: rgba(255,210,63,.45); } .pf-bnmon.f-u { border-color: rgba(255,59,59,.55); } .pf-bnmon.f-m { border-color: rgba(255,95,208,.55); }
.pf-bnmon canvas { width: 48px; height: 44px; image-rendering: pixelated; }
.pf-sheen { position: absolute; inset: -10% -30%; pointer-events: none; z-index: 2; mix-blend-mode: screen;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.16) 46%, rgba(255,255,255,.04) 52%, transparent 58%);
  transform: translateX(-70%); animation: pf-sheen 7s ease-in-out 1.2s infinite; }
@keyframes pf-sheen { 0%, 55% { transform: translateX(-70%); } 85%, 100% { transform: translateX(70%); } }
.pf-me { position: relative; align-self: end; }
.pf-plat { position: absolute; left: 50%; bottom: 4px; width: 96px; height: 22px; translate: -50% 0; border-radius: 50%; z-index: 0;
  background: radial-gradient(closest-side, rgba(255,210,74,.55), color-mix(in srgb, var(--c1) 40%, transparent) 60%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--rk) 70%, transparent), 0 0 18px color-mix(in srgb, var(--rk) 60%, transparent);
  animation: pf-plat 2.6s ease-in-out infinite; }
@keyframes pf-plat { 50% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--rk) 90%, transparent), 0 0 30px color-mix(in srgb, var(--rk) 80%, transparent); } }
.pf-trainer { position: relative; z-index: 1; display: block; width: 120px; height: 132px; image-rendering: pixelated; filter: drop-shadow(0 6px 8px rgba(0,0,0,.7)); }
.pf-id { position: relative; align-self: center; min-width: 0; padding-bottom: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pf-rank { display: inline-flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(0,0,0,.6);
  border: 1px solid color-mix(in srgb, var(--rk) 55%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--rk) 28%, transparent); }
.pf-emb { width: 30px; height: 30px; display: grid; place-items: center; font: 800 13px var(--font); font-style: normal; color: #000;
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: conic-gradient(from var(--pfa), var(--rk), #fff, var(--rk), color-mix(in srgb, var(--rk) 50%, #000), var(--rk)); animation: pf-spin 6s linear infinite; }
@keyframes pf-spin { to { --pfa: 360deg; } }
/* (24-10-2026, profile+) Each rank has its own material: a metal or gem face with a slow light running over it. */
.pf-emb[data-t] { position: relative; overflow: hidden; color: #1a1206; text-shadow: 0 1px 0 rgba(255,255,255,.55); animation: none;
  background: linear-gradient(135deg, var(--m1), var(--m2) 45%, var(--m3) 55%, var(--m4)); }
.pf-emb[data-t]::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.75) 50%, transparent 60%);
  transform: translateX(-60%); animation: pf-glint 3.8s ease-in-out infinite; }
@keyframes pf-glint { 0%, 60% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.pf-emb[data-t="0"] { --m1: #f0c8a0; --m2: #b06b35; --m3: #8a4f22; --m4: #d79a62; }   /* bronze */
.pf-emb[data-t="1"] { --m1: #ffffff; --m2: #b9c4d2; --m3: #8a96a6; --m4: #e9eef5; }   /* silver */
.pf-emb[data-t="2"] { --m1: #fff4c2; --m2: #f2c230; --m3: #b8860b; --m4: #ffe27a; }   /* gold */
.pf-emb[data-t="3"] { --m1: #ffffff; --m2: #b8f3ff; --m3: #7fb5c9; --m4: #e4fbff; }   /* platinum */
.pf-emb[data-t="4"] { --m1: #f2d9ff; --m2: #a35cff; --m3: #6a2bc8; --m4: #d7a8ff; }   /* amethyst */
.pf-emb[data-t="5"] { --m1: #ffd9e0; --m2: #ff3b5c; --m3: #a3001c; --m4: #ff8fa3; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.5); }   /* ruby */
.pf-emb[data-t="6"] { --m1: #ffffff; --m2: #9ff3ff; --m3: #ff9cf5; --m4: #fff6a8; }   /* diamond */
/* Hall of Fame trophies */
.pf-hofbox, .pf-cmpbox, .pf-showbox, .pf-regbox { display: flex; flex-direction: column; gap: 10px; }
.pf-showbox.hidden, .pf-regbox.hidden { display: none; }
/* ---- (24-10-2026, profile+) card backgrounds: each one restyles the hero's aurora and its pattern */
.pf[data-skin="stars"] .pf-aurora { background: radial-gradient(closest-side at 70% 40%, rgba(90,120,255,.55), transparent), radial-gradient(closest-side at 20% 80%, rgba(160,90,255,.4), transparent), #050816; }
.pf[data-skin="stars"] .pf-hero::before { background: radial-gradient(1.5px 1.5px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 34% 64%, #cfe0ff, transparent), radial-gradient(1.5px 1.5px at 58% 18%, #fff, transparent), radial-gradient(1px 1px at 78% 72%, #dfe6ff, transparent), radial-gradient(1.2px 1.2px at 90% 34%, #fff, transparent), radial-gradient(1px 1px at 46% 86%, #fff, transparent), linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.55)); background-size: 220px 140px, 180px 120px, 260px 160px, 200px 150px, 240px 130px, 170px 110px, 100% 100%; }
.pf[data-skin="ocean"] .pf-aurora { background: radial-gradient(closest-side at 60% 70%, rgba(0,170,255,.6), transparent), radial-gradient(closest-side at 15% 20%, rgba(0,255,210,.35), transparent), radial-gradient(closest-side at 90% 10%, rgba(20,60,200,.6), transparent); }
.pf[data-skin="ocean"] .pf-hero::before { background: repeating-radial-gradient(ellipse at 50% 120%, rgba(150,230,255,.07) 0 2px, transparent 2px 22px), linear-gradient(180deg, rgba(0,20,40,0) 30%, rgba(0,10,30,.7)); }
.pf[data-skin="ember"] .pf-aurora { background: radial-gradient(closest-side at 70% 80%, rgba(255,90,20,.7), transparent), radial-gradient(closest-side at 20% 90%, rgba(255,180,40,.45), transparent), radial-gradient(closest-side at 50% 0%, rgba(120,10,0,.6), transparent); }
.pf[data-skin="ember"] .pf-hero::before { background: radial-gradient(2px 2px at 20% 70%, #ffb347, transparent), radial-gradient(1.5px 1.5px at 60% 50%, #ff7a2f, transparent), radial-gradient(2px 2px at 85% 80%, #ffd27a, transparent), linear-gradient(0deg, rgba(80,10,0,.55), rgba(0,0,0,0) 60%); background-size: 160px 90px, 200px 120px, 140px 100px, 100% 100%; animation: pf-embers 6s linear infinite; }
@keyframes pf-embers { to { background-position: 0 -90px, 0 -120px, 0 -100px, 0 0; } }
.pf[data-skin="sakura"] .pf-aurora { background: radial-gradient(closest-side at 65% 40%, rgba(255,150,200,.6), transparent), radial-gradient(closest-side at 20% 75%, rgba(255,210,230,.4), transparent), radial-gradient(closest-side at 95% 85%, rgba(200,90,180,.45), transparent); }
.pf[data-skin="sakura"] .pf-hero::before { background: radial-gradient(3px 2px at 15% 20%, rgba(255,200,225,.9), transparent), radial-gradient(3px 2px at 45% 60%, rgba(255,180,215,.8), transparent), radial-gradient(3px 2px at 75% 30%, rgba(255,220,235,.85), transparent), linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(40,0,20,.5)); background-size: 190px 130px, 230px 150px, 170px 120px, 100% 100%; animation: pf-petals 9s linear infinite; }
@keyframes pf-petals { to { background-position: 190px 130px, 230px 150px, 170px 120px, 0 0; } }
.pf[data-skin="storm"] .pf-aurora { background: radial-gradient(closest-side at 50% 30%, rgba(120,140,255,.5), transparent), radial-gradient(closest-side at 85% 70%, rgba(255,240,120,.35), transparent), #0a0c18; animation: pf-aurora 14s ease-in-out infinite alternate, pf-flash 7s steps(1) infinite; }
@keyframes pf-flash { 0%, 100% { filter: blur(38px) brightness(1); } 61% { filter: blur(38px) brightness(1.9); } 62% { filter: blur(38px) brightness(1); } 64% { filter: blur(38px) brightness(1.6); } 65% { filter: blur(38px) brightness(1); } }
.pf[data-skin="storm"] .pf-hero::before { background: repeating-linear-gradient(100deg, transparent 0 14px, rgba(180,200,255,.06) 14px 15px), linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.6)); }
.pf[data-skin="gold"] .pf-hero { border-color: #ffd24a; box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 18px 40px rgba(0,0,0,.55), 0 0 40px rgba(255,210,74,.35), inset 0 1px 0 rgba(255,255,255,.3); }
.pf[data-skin="gold"] .pf-aurora { background: radial-gradient(closest-side at 60% 50%, rgba(255,210,74,.7), transparent), radial-gradient(closest-side at 15% 20%, rgba(255,240,180,.4), transparent), radial-gradient(closest-side at 90% 90%, rgba(180,110,0,.6), transparent); }
.pf[data-skin="gold"] .pf-hero::before { background: repeating-linear-gradient(115deg, transparent 0 9px, rgba(255,230,150,.08) 9px 10px), linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(40,25,0,.55)); }
.pf[data-skin="abyss"] .pf-hero { border-color: rgba(255,42,42,.6); }
.pf[data-skin="abyss"] .pf-aurora { background: radial-gradient(closest-side at 60% 90%, rgba(200,0,20,.7), transparent), radial-gradient(closest-side at 20% 10%, rgba(90,0,30,.6), transparent), #070003; }
.pf[data-skin="abyss"] .pf-hero::before { background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='46' fill='none' stroke='%23ff2a2a' stroke-width='1.2' opacity='.35'/><polygon points='50,12 72.3,80.7 13.9,38.3 86.1,38.3 27.7,80.7' fill='none' stroke='%23ff2a2a' stroke-width='1.2' opacity='.35'/></svg>") 78% 50% / 230px no-repeat, linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(30,0,4,.65)); }
/* the background picker (edit mode): a swatch of each one */
.pf-skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.pf-skin { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 6px; border-radius: 12px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.14); color: #fff; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, translate .2s; }
.pf-skin:hover:not(:disabled) { translate: 0 -2px; border-color: rgba(255,255,255,.4); }
.pf-skin.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 14px rgba(255,210,74,.3); }
.pf-skin.locked { opacity: .55; cursor: default; }
.pf-skin b { font: 700 12px var(--font-body); }
.pf-skin small { font: 600 10px var(--font-body); color: var(--muted); display: flex; gap: 3px; align-items: center; }
.pf-skin-sw { display: block; width: 100%; height: 36px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  background: radial-gradient(closest-side at 70% 60%, #7a5cff, transparent), radial-gradient(closest-side at 20% 30%, #ff5fd0, transparent), #07060c; }
.pf-skin[data-skin="stars"] .pf-skin-sw { background: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 60%, #fff, transparent), radial-gradient(1px 1px at 45% 75%, #fff, transparent), radial-gradient(closest-side at 70% 40%, rgba(90,120,255,.6), transparent), #050816; }
.pf-skin[data-skin="ocean"] .pf-skin-sw { background: radial-gradient(closest-side at 60% 70%, #00aaff, transparent), radial-gradient(closest-side at 15% 20%, #00ffd2, transparent), #021022; }
.pf-skin[data-skin="ember"] .pf-skin-sw { background: radial-gradient(closest-side at 70% 80%, #ff5a14, transparent), radial-gradient(closest-side at 20% 90%, #ffb428, transparent), #1a0400; }
.pf-skin[data-skin="sakura"] .pf-skin-sw { background: radial-gradient(closest-side at 65% 40%, #ff96c8, transparent), radial-gradient(closest-side at 20% 75%, #ffd2e6, transparent), #1a0812; }
.pf-skin[data-skin="storm"] .pf-skin-sw { background: repeating-linear-gradient(100deg, transparent 0 6px, rgba(180,200,255,.15) 6px 7px), radial-gradient(closest-side at 50% 30%, #788cff, transparent), #0a0c18; }
.pf-skin[data-skin="gold"] .pf-skin-sw { background: repeating-linear-gradient(115deg, transparent 0 5px, rgba(255,240,180,.2) 5px 6px), radial-gradient(closest-side at 60% 50%, #ffd24a, transparent), #2a1a00; }
.pf-skin[data-skin="abyss"] .pf-skin-sw { background: radial-gradient(closest-side at 60% 90%, #c80014, transparent), radial-gradient(closest-side at 20% 10%, #5a001e, transparent), #070003; }
/* ---- showcase */
.pf-show { display: flex; flex-direction: column; gap: 10px; }
.pf-sg { padding: 8px 10px 10px; border-radius: 14px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12); }
.pf-sg h4 { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #e9e4ff; }
.pf-sg h4 small { color: var(--muted); letter-spacing: 0; }
.pf-sg.uq { border-color: rgba(255,42,42,.45); background: radial-gradient(120% 140% at 0% 0%, rgba(120,0,16,.4), rgba(0,0,0,.55) 60%); }
.pf-sg.uq h4 { color: #ff7070; }
.pf-sg.sh { border-color: rgba(154,230,255,.45); } .pf-sg.sh h4 { color: #9ae6ff; }
.pf-sg.mg { border-color: rgba(255,95,208,.45); } .pf-sg.mg h4 { color: #ff8ae6; }
.pf-sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.pf-st { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 2px 6px; border-radius: 10px; background: rgba(255,255,255,.03); }
.pf-st canvas { width: 84px; height: 72px; image-rendering: pixelated; }
.pf-st small { font: 600 11px var(--font-body); color: #dfe3f0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pf-st-sh { position: absolute; top: 4px; right: 6px; font-style: normal; }
/* ---- regions */
.pf-regs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.pf-reg { display: grid; grid-template-columns: 26px minmax(0, 1fr) 90px 52px; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 16%, rgba(0,0,0,.6)), rgba(0,0,0,.55) 60%); border: 1px solid color-mix(in srgb, var(--rc) 40%, transparent);
  animation: pf-up .45s cubic-bezier(.2,.9,.3,1) var(--d, 0s) both; }
.pf-reg.locked { opacity: .5; filter: saturate(.3); }
.pf-plate { width: 22px; height: 26px; border-radius: 4px; background: linear-gradient(160deg, #fff 0%, var(--rc) 40%, color-mix(in srgb, var(--rc) 50%, #000)); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 10px color-mix(in srgb, var(--rc) 50%, transparent); }
.pf-reg.judged .pf-plate { box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 16px var(--rc); }
.pf-rn { display: flex; flex-direction: column; min-width: 0; }
.pf-rn b { font: 700 13px var(--font-body); color: #fff; }
.pf-rn small { font: 600 10.5px var(--font-body); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 3px; align-items: center; }
.pf-reg.judged .pf-rn small { color: var(--rc); }
.pf-reg .pf-bar { display: block; height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.pf-reg .pf-bar i { background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 60%, #fff), var(--rc)); }
.pf-rp { font: 700 11px var(--font-body); color: #cfd3e3; text-align: right; font-variant-numeric: tabular-nums; }
.pf-hofbox.hidden, .pf-cmpbox.hidden { display: none; }
.pf-hof { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.pf-tro { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 14px; background: linear-gradient(120deg, rgba(255,210,74,.16), rgba(0,0,0,.55) 55%);
  border: 1px solid rgba(255,210,74,.45); box-shadow: 0 0 18px rgba(255,210,74,.12); animation: pf-up .5s cubic-bezier(.2,.9,.3,1) var(--d, 0s) both; }
.pf-tro-cup { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; font-style: normal;
  background: radial-gradient(circle at 50% 35%, rgba(255,230,140,.5), rgba(120,80,0,.4)); box-shadow: inset 0 0 0 1px rgba(255,210,74,.6), 0 0 14px rgba(255,210,74,.35); }
.pf-tro span { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.pf-tro b { font: 700 13px/1.25 var(--font-body); color: #fff2c2; }
.pf-tro small { font: 600 11px var(--font-body); color: var(--muted); }
/* You vs them */
.pf-cmp { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 14px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.12); }
.pf-cr { display: grid; grid-template-columns: 18px minmax(90px, 1fr) 76px minmax(80px, 2fr) 76px; align-items: center; gap: 8px; font-size: 13px; }
.pf-cr.head { font-size: 12px; color: var(--muted); }
.pf-cl { color: #d6d9e8; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-ca { text-align: right; font-variant-numeric: tabular-nums; } .pf-cb { text-align: left; font-variant-numeric: tabular-nums; }
.pf-cr.a .pf-ca { color: #7fe0ff; text-shadow: 0 0 10px rgba(127,224,255,.6); } .pf-cr.b .pf-cb { color: #ff8ae6; text-shadow: 0 0 10px rgba(255,138,230,.6); }
.pf-cbar { position: relative; height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; display: flex; }
.pf-cbar i { position: absolute; top: 0; bottom: 0; width: calc(var(--w) / 2); animation: pf-grow 1s cubic-bezier(.2,.9,.3,1) both; }
.pf-cbar i.l { right: 50%; background: linear-gradient(270deg, #7fe0ff, rgba(127,224,255,.3)); border-radius: 99px 0 0 99px; }
.pf-cbar i.r { left: 50%; background: linear-gradient(90deg, #ff8ae6, rgba(255,138,230,.3)); border-radius: 0 99px 99px 0; }
.pf-cbar::after { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: rgba(255,255,255,.4); }
@media (max-width: 560px) { .pf-cr { grid-template-columns: 16px 1fr 58px 1fr 58px; font-size: 12px; gap: 6px; } }
.pf-me, .pf-id, .pf-ace { transition: translate .25s ease-out; }
.pf-rank span { display: flex; flex-direction: column; line-height: 1.1; }
.pf-rank b { font: 800 12px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--rk); }
.pf-rank small { font: 600 10px var(--font-body); color: var(--muted); }
.pf-rkbar { display: block; width: 120px; height: 4px; margin-top: 3px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.pf-rkbar i, .pf-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; animation: pf-grow 1.1s cubic-bezier(.2,.9,.3,1) .35s both; }
.pf-rkbar i { background: linear-gradient(90deg, var(--rk), #fff); box-shadow: 0 0 8px var(--rk); }
@keyframes pf-grow { from { width: 0; } }
.pf-name { margin: 0; max-width: 100%; font-size: clamp(26px, 3.8vw, 42px); line-height: 1.02; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(100deg, #fff 0%, #fff 35%, color-mix(in srgb, var(--c1) 55%, #fff) 50%, #fff 65%, #fff 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 14px color-mix(in srgb, var(--c1) 45%, transparent));
  animation: pf-shimmer 5s linear infinite; }
@keyframes pf-shimmer { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.pf-title { display: inline-flex; gap: 6px; align-items: center; color: var(--gold); border: 1px solid rgba(255,210,74,.8); background: linear-gradient(180deg, rgba(255,210,74,.18), rgba(255,210,74,.06));
  border-radius: 999px; padding: 3px 12px; font-size: 13px; max-width: 100%; box-shadow: 0 0 14px rgba(255,210,74,.18); }
.pf-title.pick { cursor: pointer; }
.pf-title.pick:hover { background: rgba(255,210,74,.22); }
.pf-sel { background: transparent; color: var(--gold); border: 0; font: inherit; cursor: pointer; max-width: 220px; padding: 0; }
.pf-sel option { background: #111; color: #fff; }
.pf-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-chips span { display: inline-flex; gap: 4px; align-items: center; padding: 2px 9px; border-radius: 999px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.14); font-size: 12px; }
.pf-chips .dm { color: #ff5f6d; border-color: rgba(255,60,60,.5); box-shadow: 0 0 10px rgba(255,40,40,.25); }
.pf-ace { position: relative; align-self: end; margin: -16px -8px -14px 0; }
.pf-ace canvas { position: relative; z-index: 1; display: block; width: 190px; height: 170px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.75)); animation: pf-float 3.4s ease-in-out infinite; }
@keyframes pf-float { 50% { transform: translateY(-6px); } }
.pf-ace.none { display: none; }
.pf-ring { --rs: 150px; position: absolute; left: 50%; top: calc(var(--fy, .88) * 100%); width: var(--rs); height: var(--rs); margin: calc(var(--rs) / -2) 0 0 calc(var(--rs) / -2); border-radius: 50%; z-index: 0; pointer-events: none;
  border: 2px dashed color-mix(in srgb, var(--c1) 80%, #fff); box-shadow: 0 0 22px color-mix(in srgb, var(--c1) 50%, transparent), inset 0 0 22px color-mix(in srgb, var(--c1) 40%, transparent);
  transform: scaleY(.28); animation: pf-ring 9s linear infinite; }
@keyframes pf-ring { to { transform: scaleY(.28) rotate(360deg); } }

/* ---- section headings */
.pf h3.pf-h { margin: 2px 0 -4px; display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: #e9e4ff; }
.pf-h::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--c1) 60%, transparent), transparent); }
.pf-h small { color: var(--muted); font-size: 12px; letter-spacing: 0; }

/* ---- favourites: holo cards */
.pf-favs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; perspective: 900px; }
.pf-fav { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 6px 10px; border-radius: 16px; text-align: center;
  color: inherit; font: inherit; min-width: 0; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .18s ease-out, box-shadow .18s;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--t1, #8a93a8) 55%, transparent), transparent 52%),
    radial-gradient(circle at 88% 96%, color-mix(in srgb, var(--t2, #8a93a8) 50%, transparent), transparent 52%),
    repeating-linear-gradient(115deg, transparent 0 6px, rgba(255,255,255,.035) 6px 7px),
    linear-gradient(180deg, #16161e, #040406);
  border: 2px solid color-mix(in srgb, var(--t1, #8a93a8) 70%, #333);
  box-shadow: 0 10px 22px rgba(0,0,0,.5), 0 0 16px color-mix(in srgb, var(--t1, #8a93a8) 22%, transparent), inset 0 1px 0 rgba(255,255,255,.14);
  animation: pf-up .55s cubic-bezier(.2,.9,.3,1) var(--d, 0s) both; }
button.pf-fav { cursor: pointer; }
.pf-fav.tilt { transition: transform .05s linear; box-shadow: 0 18px 30px rgba(0,0,0,.55), 0 0 26px color-mix(in srgb, var(--t1, #ffd24a) 40%, transparent); }
.pf-foil { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; mix-blend-mode: color-dodge;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 30%), rgba(255,255,255,.55), transparent 42%),
    conic-gradient(from 200deg at var(--mx, 50%) var(--my, 50%), rgba(255,0,170,.25), rgba(0,210,255,.25), rgba(255,235,0,.25), rgba(120,255,120,.2), rgba(255,0,170,.25)); }
.pf-fav.tilt .pf-foil { opacity: .85; }
.pf-fav.shiny .pf-foil, .pf-fav.uniq .pf-foil { opacity: .35; animation: pf-foil 4s ease-in-out infinite; }
@keyframes pf-foil { 50% { opacity: .6; } }
.pf-fav.shiny { border-color: #9ae6ff; box-shadow: 0 10px 22px rgba(0,0,0,.5), 0 0 20px rgba(154,230,255,.45); }
.pf-fav.uniq { border-color: #ff3b3b; box-shadow: 0 10px 22px rgba(0,0,0,.5), 0 0 22px rgba(255,40,40,.5); }
.pf-fav canvas { position: relative; width: 120px; height: 100px; max-width: 100%; transform: translateZ(30px); filter: drop-shadow(0 6px 6px rgba(0,0,0,.6)); }
.pf-fav b { position: relative; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: translateZ(18px); }
.pf-no { position: absolute; top: 6px; left: 9px; font: 700 10px var(--font-body); color: rgba(255,255,255,.55); letter-spacing: .04em; }
.pf-types { position: relative; display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; transform: translateZ(12px); }
.pf-chg { position: absolute; top: 6px; right: 9px; font-size: 10px; color: var(--gold); opacity: .9; }
.pf-fav.empty { border-style: dashed; border-color: rgba(255,210,74,.5); background: rgba(255,255,255,.025); min-height: 168px; justify-content: center; color: var(--gold); box-shadow: none; }
.pf-plus { font-style: normal; font-size: 36px; line-height: 1; }

/* ---- panels */
.pf-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pf-panel { position: relative; overflow: hidden; padding: 10px 12px 8px; border-radius: 16px; min-width: 0;
  background: linear-gradient(160deg, color-mix(in srgb, var(--pc) 14%, #0b0b10), #040406 70%);
  border: 1px solid color-mix(in srgb, var(--pc) 34%, #1e1e26); box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  animation: pf-up .55s cubic-bezier(.2,.9,.3,1) var(--d, 0s) both; }
.pf-panel::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--pc), transparent); opacity: .8; }
.pf-panel h4 { margin: 0 0 4px; font: 800 11px var(--font); letter-spacing: .2em; text-transform: uppercase; color: var(--pc); }
.pf-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.pf-row:last-child { border-bottom: 0; }
.pf-row span { color: #c9c6d6; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-row b { font-size: 16px; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pf-row .pf-bar { grid-column: 1 / -1; display: block; height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.pf-bar i { background: linear-gradient(90deg, var(--pc), #fff); box-shadow: 0 0 10px var(--pc); }
.pf-row small { grid-column: 1 / -1; text-align: right; font-size: 10.5px; color: var(--muted); margin-top: -1px; }

/* ---- medals */
.pf-medals { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.pf-md { --mc: #c0794a; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 8px 4px 7px;
  border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--mc) 16%, #0b0b10), #040406);
  border: 1px solid color-mix(in srgb, var(--mc) 50%, #222); transition: transform .15s, box-shadow .15s;
  animation: pf-up .5s cubic-bezier(.2,.9,.3,1) var(--d, 0s) both; }
.pf-md.t2 { --mc: #cfd8e8; } .pf-md.t3 { --mc: #ffd24a; } .pf-md.t4 { --mc: #ff5fd0; }
.pf-md:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.5), 0 0 16px color-mix(in srgb, var(--mc) 40%, transparent); }
.pf-mdglow { position: absolute; top: -10px; left: 50%; width: 70px; height: 70px; margin-left: -35px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--mc) 45%, transparent), transparent); animation: pf-pulse 3s ease-in-out infinite; }
@keyframes pf-pulse { 50% { opacity: .45; transform: scale(.9); } }
.pf-md img, .pf-md canvas { position: relative; }
.pf-md small { position: relative; font-size: 10px; color: #d6d2e2; line-height: 1.2; }

/* ---- recent runs */
.pf-runs { display: flex; flex-direction: column; gap: 4px; }
.pf-run { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-radius: 12px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); border: 1px solid rgba(255,255,255,.05); }
.pf-run.void { opacity: .55; }
.pf-run .pr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pf-run .pr-txt b, .pf-run .pr-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-run small { color: var(--muted); font-size: 12px; }
.pf-run .pr-num { text-align: right; display: flex; flex-direction: column; flex: none; }
.pf-run .pr-num b { font-size: 15px; font-variant-numeric: tabular-nums; }

/* ---- actions */
.pf-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.pf-acts:empty { display: none; }
.pf-friend { color: #5fe08a; display: inline-flex; gap: 5px; align-items: center; }
.pf-friend .on { font-style: normal; color: var(--muted); }

@media (max-width: 760px) {
  .pf-panels { grid-template-columns: 1fr 1fr; }
  .pf-ace canvas { width: 140px; height: 125px; } .pf-ring { --rs: 110px; }
  .pf-trainer { width: 90px; height: 99px; }
}
@media (max-width: 560px) and (min-height: 521px) { .pf-panels { grid-template-columns: 1fr; } }
/* Phones in landscape: a notch smaller so the hero and the favourites share a page. */
@media (max-height: 520px) {
  .pf { gap: 7px; }
  .pf-hero { min-height: 108px; padding: 6px 10px 4px; gap: 8px; border-radius: 16px; }
  .pf-trainer { width: 72px; height: 79px; } .pf-plat { width: 64px; height: 16px; }
  .pf-ace { margin: -8px -4px -8px 0; } .pf-ace canvas { width: 116px; height: 104px; } .pf-ring { --rs: 92px; }
  .pf-name { font-size: 22px; } .pf-id { gap: 3px; padding-bottom: 4px; }
  .pf-rank { padding: 2px 9px 2px 2px; } .pf-emb { width: 22px; height: 22px; font-size: 10px; } .pf-rank small, .pf-rkbar { display: none; }
  .pf-chips span { font-size: 11px; padding: 1px 6px; }
  .pf-favs { gap: 8px; }
  .pf-fav { padding: 12px 4px 6px; border-radius: 12px; } .pf-fav canvas { width: 84px; height: 70px; } .pf-fav .pf-types { display: none; } .pf-fav b { font-size: 12px; }
  .pf-fav.empty { min-height: 100px; }
  .pf-panels { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pf-panel { padding: 6px 9px 4px; } .pf-row { padding: 2px 0; } .pf-row b { font-size: 13px; } .pf-row span { font-size: 11px; }
  .pf-row small { display: none; }
  .pf-md { padding: 5px 3px; } .pf-medals { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
}

/* =====================================================================
 * IV Lab (24-10-2026, IV overhaul: pc-ui.js openIV / ivSide). --tc/--tc2 = the chosen Pokémon's types,
 * --gc = its gem grade, --c = a stat's colour.
 * ===================================================================== */
@property --iva { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
#scr-ivs .ivx-hero { isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; padding: 14px 18px; border-radius: 20px;
  border: 1px solid rgba(255,95,208,.45); box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 14px 34px rgba(0,0,0,.5), 0 0 30px rgba(185,139,255,.22), inset 0 1px 0 rgba(255,255,255,.14);
  background: radial-gradient(ellipse 50% 140% at 8% 50%, rgba(255,95,208,.32), transparent 70%), radial-gradient(ellipse 60% 120% at 100% 0%, rgba(127,224,255,.18), transparent 70%), linear-gradient(120deg, #170c2c, #06060d); }
#scr-ivs .ivx-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: repeating-linear-gradient(115deg, transparent 0 7px, rgba(255,255,255,.028) 7px 8px); }
.ivl-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.ivl-gem { position: relative; width: 104px; height: 104px; display: grid; place-items: center; perspective: 420px; }
.ivl-svg { width: 92px; height: 92px; overflow: visible; filter: drop-shadow(0 0 14px rgba(255,95,208,.8)) drop-shadow(0 8px 6px rgba(0,0,0,.7)); animation: ivl-sway 6s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes ivl-sway { 0%, 100% { transform: rotateY(-26deg) translateY(0); } 50% { transform: rotateY(26deg) translateY(-5px); filter: drop-shadow(0 0 22px rgba(127,224,255,.9)) drop-shadow(0 12px 8px rgba(0,0,0,.6)); } }
.ivl-svg .f { animation: ivl-facet 3.2s ease-in-out infinite; }
.ivl-svg .f2 { animation-delay: .4s; } .ivl-svg .f3 { animation-delay: .8s; } .ivl-svg .f4 { animation-delay: 1.2s; } .ivl-svg .f5 { animation-delay: 1.6s; } .ivl-svg .f6 { animation-delay: 2s; }
@keyframes ivl-facet { 50% { filter: brightness(1.55) saturate(1.2); } }
.ivl-shine { position: absolute; inset: 6px; z-index: 2; pointer-events: none; mix-blend-mode: screen;
  clip-path: polygon(8% 40%, 28% 22%, 72% 22%, 92% 40%, 50% 92%);
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.85) 48%, transparent 60%); background-size: 260% 100%; animation: ivl-shine 3.6s ease-in-out infinite; }
@keyframes ivl-shine { 0%, 40% { background-position: 130% 0; } 75%, 100% { background-position: -40% 0; } }
.ivl-orbit { position: absolute; inset: 4px; border-radius: 50%; pointer-events: none; border: 1.5px dashed rgba(255,180,240,.55);
  box-shadow: 0 0 18px rgba(255,95,208,.35); transform: rotateX(72deg); animation: ivl-orbit 7s linear infinite; }
@keyframes ivl-orbit { to { transform: rotateX(72deg) rotateZ(360deg); } }
.ivl-hc { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ivl-num { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
#scr-ivs .ivl-num b { font: 800 46px var(--font); line-height: 1; background: linear-gradient(180deg, #fff, #ffb3ec 60%, #ff5fd0); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 16px rgba(255,95,208,.55)); font-variant-numeric: tabular-nums; text-shadow: none; }
#scr-ivs .ivl-num span { font: 800 13px var(--font); letter-spacing: .18em; text-transform: uppercase; color: #ffc9f0; }
.ivl-spread { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.06); max-width: 560px; }
.ivl-spread i { min-width: 3px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c)); box-shadow: 0 0 10px var(--c); transform-origin: left; animation: ivl-grow .9s cubic-bezier(.2,.9,.3,1) .2s both; }
.ivl-spread i.none { flex: 1; background: transparent; box-shadow: none; }
@keyframes ivl-grow { from { transform: scaleX(0); } }
.ivl-spread-l { display: flex; flex-wrap: wrap; gap: 4px 12px; }
#scr-ivs .ivl-spread-l span { display: inline-flex; align-items: center; gap: 4px; font: 700 12px var(--font-body); color: var(--c); letter-spacing: 0; text-transform: none; }
.ivl-spread-l b { color: #fff; font-size: 12px; }
#scr-ivs .ivl-hc small { font: 600 11.5px var(--font-body); color: #b8b4c8; max-width: 560px; }

/* list */
#scr-ivs .ivx-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 9px; }
#scr-ivs .ivc { position: relative; overflow: hidden; grid-template-columns: 18px 56px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 8px; padding: 7px 10px 8px;
  border-radius: 14px; border: 1px solid color-mix(in srgb, var(--tc) 40%, #26222e);
  background: radial-gradient(circle at 22% 40%, color-mix(in srgb, var(--tc) 30%, transparent), transparent 55%), linear-gradient(135deg, #100d18, #050507);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07); animation: pf-up .45s cubic-bezier(.2,.9,.3,1) var(--d, 0s) both; }
#scr-ivs .ivc:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tc) 75%, #fff); box-shadow: 0 8px 18px rgba(0,0,0,.45), 0 0 16px color-mix(in srgb, var(--tc) 35%, transparent); }
#scr-ivs .ivc.on { border: 2px solid transparent; padding: 6px 9px 7px;
  background: radial-gradient(circle at 22% 40%, color-mix(in srgb, var(--tc) 36%, transparent), transparent 55%) padding-box, linear-gradient(135deg, #15101f, #07060b) padding-box,
    conic-gradient(from var(--iva), #ff5fd0, #7fe0ff, #ffd24a, #b98bff, #ff5fd0) border-box;
  box-shadow: 0 0 22px rgba(255,95,208,.35); animation: ivc-spin 4s linear infinite; }
@keyframes ivc-spin { to { --iva: 360deg; } }
.ivc-rk { grid-row: 1 / 3; align-self: center; font: 800 12px var(--font); color: rgba(255,255,255,.35); text-align: center; }
#scr-ivs .ivc:nth-child(1) .ivc-rk { color: #ffd24a; text-shadow: 0 0 8px rgba(255,210,74,.7); }
#scr-ivs .ivc:nth-child(2) .ivc-rk { color: #dfe7f5; } #scr-ivs .ivc:nth-child(3) .ivc-rk { color: #e0955e; }
#scr-ivs .ivc canvas { grid-row: 1 / 3; width: 56px; height: 50px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--tc) 55%, transparent)) drop-shadow(0 3px 3px rgba(0,0,0,.6)); }
#scr-ivs .ivc-n { align-self: end; }
#scr-ivs .ivc-n small { color: #ffc9f0; }
.ivc-g { align-self: end; line-height: 0; filter: drop-shadow(0 0 6px var(--g)); }
.ivc-bar { grid-column: 3 / -1; display: flex; gap: 1px; height: 6px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.06); }
.ivc-bar i { min-width: 2px; background: var(--c); box-shadow: 0 0 6px var(--c); transform-origin: left; animation: ivl-grow .8s cubic-bezier(.2,.9,.3,1) calc(var(--d, 0s) + .15s) both; }
.ivc-bar i.none { flex: 1; background: transparent; box-shadow: none; }

/* detail */
#scr-ivs .ivx-side { position: relative; isolation: isolate; gap: 8px; padding-bottom: 12px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--tc) 55%, #2a2a33);
  background: radial-gradient(ellipse 90% 55% at 50% 22%, color-mix(in srgb, var(--tc) 32%, transparent), transparent 70%), radial-gradient(ellipse 60% 40% at 100% 0%, color-mix(in srgb, var(--tc2) 25%, transparent), transparent 70%), linear-gradient(180deg, #0d0b15, #040406);
  box-shadow: 0 0 0 1px rgba(0,0,0,.8), 0 16px 36px rgba(0,0,0,.5), 0 0 28px color-mix(in srgb, var(--tc) 22%, transparent), inset 0 1px 0 rgba(255,255,255,.12); animation: pf-up .45s cubic-bezier(.2,.9,.3,1) both; }
.ivd-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 40%, rgba(0,0,0,.4)), transparent); border-bottom: 1px solid rgba(255,255,255,.07); }
.ivd-no { font: 700 11px var(--font-body); color: rgba(255,255,255,.6); }
.ivd-head > b { font-size: 18px; }
.ivd-types { display: inline-flex; gap: 4px; transform: scale(.9); transform-origin: left; }
.ivd-grade { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font: 800 11px var(--font); letter-spacing: .14em; text-transform: uppercase;
  color: var(--gc); border: 1px solid color-mix(in srgb, var(--gc) 60%, transparent); background: rgba(0,0,0,.55); box-shadow: 0 0 14px color-mix(in srgb, var(--gc) 35%, transparent); animation: pf-plat 2.8s ease-in-out infinite; }
.ivd-top { display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: center; gap: 4px; padding: 0 8px; }
.ivd-stage { position: relative; height: 200px; display: flex; align-items: flex-end; justify-content: center; }
.ivd-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ivd-mon { position: relative; z-index: 1; margin-bottom: 30px; line-height: 0; }
.ivd-ring { --rs: 116px; position: absolute; left: 50%; top: calc(var(--fy, .88) * 100%); width: var(--rs); height: var(--rs); margin: calc(var(--rs) / -2) 0 0 calc(var(--rs) / -2); border-radius: 50%; pointer-events: none; }
.ivd-ring.r1 { border: 2px solid color-mix(in srgb, var(--tc) 85%, #fff); box-shadow: 0 0 24px color-mix(in srgb, var(--tc) 60%, transparent), inset 0 0 20px color-mix(in srgb, var(--tc) 45%, transparent); transform: scaleY(.28); }
.ivd-ring.r2 { --rs: 150px; border: 1.5px dashed color-mix(in srgb, var(--gc) 70%, transparent); transform: scaleY(.28); animation: ivd-ring 10s linear infinite; }
@keyframes ivd-ring { to { transform: scaleY(.28) rotate(360deg); } }
.ivd-stage canvas#ivs-mon { position: relative; z-index: 1; width: 150px; height: 120px; filter: drop-shadow(0 10px 10px rgba(0,0,0,.7)); animation: pf-float 3.2s ease-in-out infinite; }
.ivd-total { position: absolute; top: 6px; left: 8px; z-index: 2; display: flex; flex-direction: column; line-height: 1; }
.ivd-total b { font: 800 34px var(--font); color: #fff; text-shadow: 0 2px 0 #000, 0 0 14px color-mix(in srgb, var(--gc) 75%, transparent), 0 0 28px color-mix(in srgb, var(--gc) 40%, transparent); font-variant-numeric: tabular-nums; }
.ivd-total span { font: 800 10px var(--font); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.ivd-radar { display: grid; place-items: center; }
.ivd-radar .ivhex { filter: drop-shadow(0 0 16px color-mix(in srgb, var(--tc) 45%, transparent)); animation: ivd-radar .8s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes ivd-radar { from { transform: scale(.4) rotate(-40deg); opacity: 0; } }
.ivd-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 12px; }
.ivd-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 3px 7px; padding: 6px 9px 7px; border-radius: 11px; min-width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 12%, rgba(255,255,255,.02)), rgba(255,255,255,.015)); border: 1px solid rgba(255,255,255,.05); border-left: 3px solid var(--c);
  animation: pf-up .45s cubic-bezier(.2,.9,.3,1) var(--d, 0s) both; }
.ivd-row.zero { opacity: .45; }
.ivd-row b { color: var(--c); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ivd-pts { font: 800 16px var(--font); font-variant-numeric: tabular-nums; }
.ivd-bar { grid-column: 1 / -1; display: block; height: 5px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.ivd-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--c), #fff 160%); box-shadow: 0 0 8px var(--c); animation: pf-grow 1s cubic-bezier(.2,.9,.3,1) calc(var(--d, 0s) + .2s) both; }
.ivd-row small { grid-column: 1 / -1; font: 600 10.5px var(--font-body); color: #bdb9cb; }
.ivd-row small u { text-decoration: none; opacity: .6; }
@media (max-width: 900px) and (min-height: 521px) { .ivd-rows { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) and (min-height: 521px) { .ivd-rows { grid-template-columns: 1fr 1fr; } }
/* Phones in landscape: the list and a compact detail side by side. */
@media (max-height: 520px) {
  #scr-ivs .ivx-hero { padding: 5px 10px; gap: 10px; border-radius: 14px; }
  .ivl-gem { width: 48px; height: 48px; } .ivl-svg { width: 42px; height: 42px; }
  #scr-ivs .ivl-num b { font-size: 24px; } #scr-ivs .ivl-num span { font-size: 10px; }
  #scr-ivs .ivl-hc small, .ivl-spread-l { display: none; }
  .ivl-spread { height: 6px; }
  #scr-ivs .ivx-list { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 5px; }
  #scr-ivs .ivc { grid-template-columns: 14px 40px minmax(0, 1fr) auto; padding: 4px 7px 5px; gap: 1px 6px; }
  #scr-ivs .ivc.on { padding: 3px 6px 4px; }
  #scr-ivs .ivc canvas { width: 40px; height: 36px; }
  .ivd-head { padding: 5px 9px; gap: 5px; } .ivd-head > b { font-size: 14px; } .ivd-types { display: none; } .ivd-grade { font-size: 9px; padding: 1px 7px; }
  .ivd-top { grid-template-columns: minmax(0, 1fr) 118px; padding: 0 4px; }
  .ivd-top .ivhex { width: 118px; height: 118px; }
  .ivd-stage { height: 104px; }
  .ivd-stage canvas#ivs-mon { width: 90px; height: 72px; } .ivd-mon { margin-bottom: 14px; }
  .ivd-ring.r1 { --rs: 76px; } .ivd-ring.r2 { --rs: 100px; }
  .ivd-total b { font-size: 20px; } .ivd-total span { font-size: 8px; }
  .ivd-rows { gap: 3px; padding: 0 6px; }
  .ivd-row { padding: 2px 6px 3px; gap: 1px 5px; } .ivd-row small { display: none; } .ivd-pts { font-size: 13px; } .ivd-row b { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .pf > *, .pf-fav, .pf-panel, .pf-md, .pf-aurora, .pf-sheen, .pf-plat, .pf-emb, .pf-name, .pf-ace canvas, .pf-ring, .pf-mdglow, .pf-foil,
  .ivl-svg, .ivl-svg .f, .ivl-shine, .ivl-orbit, .ivl-spread i, #scr-ivs .ivc, #scr-ivs .ivc.on, .ivc-bar i, #scr-ivs .ivx-side, .ivd-grade, .ivd-ring.r2, .ivd-stage canvas#ivs-mon, .ivd-radar .ivhex, .ivd-row, .ivd-bar i,
  .pf-rkbar i, .pf-bar i { animation: none !important; }
  .pf-sheen { display: none; }
}

/* ================= (24-10-2026) Demonic forms: the home pill and the screen (ui/demon-ui.js) ================= */
/* Play on top; Mega and Demonic side by side under it. */
#scr-menu .hub-cta { display: grid; grid-template-columns: auto auto; justify-content: center; column-gap: 8px; }
#scr-menu .hub-cta .menu-item.play { grid-column: 1 / -1; justify-self: center; }
#scr-menu .hub-cta .hub-btn.mega-hub, #scr-menu .hub-cta .hub-btn.demon-hub { width: clamp(176px, 13vw, 214px); padding-right: 14px; }
#scr-menu .hub-cta .hub-btn small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#scr-menu .hub-btn.demon-hub { --ax: 0px; --in: 0px; margin-top: 8px; min-height: 56px; padding: 4px 14px 4px 4px; text-align: left; grid-template-columns: 48px 1fr;
  position: relative; border-color: rgba(255,42,42,.5); color: #ffd6d6; overflow: hidden; isolation: isolate; contain: paint;
  background-color: #050003;
  background-image: radial-gradient(circle, rgba(255,60,40,.5) 0 1px, transparent 1.8px), radial-gradient(circle, rgba(255,140,90,.35) 0 .8px, transparent 1.4px), radial-gradient(120% 160% at 0% 50%, rgba(160,0,20,.45), transparent 62%);
  background-size: 38px 30px, 26px 22px, 100% 100%; background-position: 4px 0, 16px 8px, 0 0;
  animation: hub-in-m .55s cubic-bezier(.2,.9,.2,1) .34s both, dmh-pulse 2.6s ease-in-out infinite, dmh-rise 5s linear infinite; }
#scr-menu .hub-btn.demon-hub small { font-size: 12px; color: #ff8a8a; }
#scr-menu .hub-btn.demon-hub .mi-ico { width: 48px; height: 48px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 60%, #5a0010, #0a0003 70%);
  box-shadow: inset 0 0 0 1px rgba(255,60,60,.55), inset 0 -6px 12px rgba(0,0,0,.8), 0 0 0 4px #000, 0 0 14px rgba(255,30,30,.35); }
#scr-menu .hub-btn.demon-hub .mi-ico::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; pointer-events: none; opacity: .75;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='46' fill='none' stroke='%23ff2a2a' stroke-width='3'/><polygon points='50,12 72.3,80.7 13.9,38.3 86.1,38.3 27.7,80.7' fill='none' stroke='%23ff2a2a' stroke-width='3'/></svg>") center/contain no-repeat;
  animation: dm-spin 9s linear infinite; }
#scr-menu .hub-btn.demon-hub .mi-ico img { position: relative; z-index: 1; filter: drop-shadow(0 0 4px rgba(255,40,40,.9)); }
#scr-menu .hub-btn.demon-hub:hover, #scr-menu .hub-btn.demon-hub:focus-visible { translate: 0 -2px; border-color: #ff4a4a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px #000, 0 0 30px rgba(255,30,30,.4), 0 14px 34px rgba(0,0,0,.85); }
@keyframes dmh-pulse { 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px #000, 0 0 22px rgba(255,20,20,.32), 0 14px 34px rgba(0,0,0,.85); } }
@keyframes dmh-rise { to { background-position: 4px -60px, 16px -44px, 0 0; } }
@media (max-width: 820px) and (min-height: 521px) {
  #scr-menu .hub-cta .hub-btn.mega-hub, #scr-menu .hub-cta .hub-btn.demon-hub { width: min(176px, 44vw); margin-top: 8px; }
}
@media (max-height: 520px) {
  #scr-menu .hub-cta { grid-template-columns: auto auto auto; align-items: center; }
  #scr-menu .hub-cta .menu-item.play { grid-column: auto; }
  #scr-menu .hub-cta .hub-btn.mega-hub, #scr-menu .hub-cta .hub-btn.demon-hub { width: 48px; padding: 0; }
  #scr-menu .hub-btn.demon-hub { margin-top: 0; min-height: 48px; grid-template-columns: 1fr; font-size: 0; }
  #scr-menu .hub-btn.demon-hub small { display: none; }
  #scr-menu .hub-btn.demon-hub .mi-ico { width: 46px; height: 46px; grid-row: auto; box-shadow: inset 0 0 0 1px rgba(255,60,60,.55), inset 0 -6px 12px rgba(0,0,0,.8); }
  #scr-menu .hub-btn.demon-hub .mi-ico img { width: 26px; height: 26px; }
}

/* ---------------- the screen ---------------- */
#demon-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; background: #0a0105; }
#scr-demon { --dc: #ff1e1e; --blood: #8a0010; --bone: #efe3cf; }
#scr-demon .box.dmx { position: relative; z-index: 1; display: flex; flex-direction: column; overflow: hidden;
  max-height: calc(100vh / var(--uiz, 1) - 24px); max-height: calc(100dvh / var(--uiz, 1) - 24px);
  background: linear-gradient(180deg, rgba(120,0,16,.22), transparent 160px), rgba(4,0,2,.72); backdrop-filter: blur(2px);
  border-color: rgba(255,42,42,.4); box-shadow: 0 0 0 1px #000, 0 0 60px rgba(255,20,20,.18), 0 30px 80px rgba(0,0,0,.9); }
@media (min-width: 821px) and (min-height: 621px) {
  #scr-demon .box.dmx { margin-top: 52px; max-height: calc(100vh / var(--uiz, 1) - 76px); max-height: calc(100dvh / var(--uiz, 1) - 76px); }
}
.dmx-top { flex: 0 0 auto; }
.dmx-top h2 { font-size: 30px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.dmx-title { color: #ff5a4a; letter-spacing: 1px; text-shadow: 0 0 12px rgba(255,30,30,.9), 0 0 30px rgba(255,0,0,.45), 0 2px 0 #000;
  animation: dmx-flicker 5s steps(1) infinite; }
#scr-demon .box > .row.between > h2::before { background: #ff2a2a; box-shadow: 0 0 10px #ff1e1e; }
@keyframes dmx-flicker { 0%, 100% { opacity: 1; } 42% { opacity: .82; } 43% { opacity: 1; } 71% { opacity: .9; } 72% { opacity: 1; } }
#demon-sub { font-size: 15px; color: #ff9a9a; }
#demon-sub b { color: #fff; font-size: 18px; text-shadow: 0 0 10px rgba(255,40,40,.9); }
.dmx-lead { flex: 0 0 auto; margin: 2px 0 8px; font: 600 13px/1.4 var(--font-body); color: #c9a8a8; max-width: 760px; }
.dmx-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 4px 10px; margin: 0 -4px;
  scrollbar-width: thin; scrollbar-color: #6a0a14 transparent; }

/* the altar: the chosen one */
.dmx-hero { position: relative; display: grid; grid-template-columns: minmax(240px, 0.9fr) 1.4fr; gap: 18px; align-items: stretch;
  padding: 16px; border-radius: 18px; overflow: hidden; isolation: isolate;
  background: radial-gradient(70% 90% at 22% 60%, rgba(150,0,20,.42), transparent 70%), linear-gradient(160deg, rgba(40,0,8,.92), rgba(6,0,3,.95));
  border: 1px solid rgba(255,42,42,.45); box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), inset 0 0 60px rgba(120,0,16,.35), 0 0 34px rgba(255,20,20,.16); }
.dmx-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255,40,40,.05) 22px 23px); }
.dmx-hero::after { content: ''; position: absolute; left: -40%; top: 0; width: 40%; height: 100%; pointer-events: none; z-index: 2;
  background: linear-gradient(100deg, transparent, rgba(255,120,120,.10), transparent); animation: dmx-sheen 6s ease-in-out infinite; }
@keyframes dmx-sheen { 0%, 60% { left: -40%; } 100% { left: 140%; } }
.dmx-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 12px; text-align: center; color: #e8c8c8; font: 600 14px/1.45 var(--font-body); }
.dmx-empty img { filter: drop-shadow(0 0 10px rgba(255,30,30,.9)); }
.dmx-spin { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,40,40,.2); border-top-color: #ff2a2a; animation: dm-spin .9s linear infinite; }

.dmx-altar { position: relative; min-height: 270px; display: grid; place-items: center; }
.dmx-halo { position: absolute; left: 50%; top: calc(var(--fy, .88) * 100% - 40px); width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,40,30,.38), rgba(140,0,20,.18) 45%, transparent 70%); animation: dmx-breathe 3.2s ease-in-out infinite; }
@keyframes dmx-breathe { 50% { transform: scale(1.08); opacity: .8; } }
.dmx-big-sig { position: absolute; left: 50%; top: calc(var(--fy, .88) * 100%); width: 250px; height: 250px; margin: -125px 0 0 -125px; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='47' fill='none' stroke='%23ff2a2a' stroke-width='1.6'/><circle cx='50' cy='50' r='40' fill='none' stroke='%23ff2a2a' stroke-width='.8' opacity='.7'/><polygon points='50,10 73.5,82.4 11.9,37.6 88.1,37.6 26.5,82.4' fill='none' stroke='%23ff2a2a' stroke-width='1.6'/><g stroke='%23ff2a2a' stroke-width='.8' opacity='.8'><path d='M50 1v5M50 94v5M1 50h5M94 50h5M15 15l3.5 3.5M85 85l-3.5-3.5M85 15l-3.5 3.5M15 85l3.5-3.5'/></g></svg>") center/contain no-repeat;
  transform: scaleY(.3) rotate(0deg); filter: drop-shadow(0 0 6px rgba(255,30,30,.9)); animation: dmx-sig 16s linear infinite; }
.dmx-big-sig.s2 { width: 170px; height: 170px; margin: -85px 0 0 -85px; opacity: .55; animation-duration: 10s; animation-direction: reverse; }
@keyframes dmx-sig { to { transform: scaleY(.3) rotate(360deg); } }
.dmx-mon { position: relative; z-index: 1; animation: dmx-float 3.4s ease-in-out infinite; }
.dmx-mon > i { z-index: -1; }
.dmx-mon canvas { display: block; width: 260px; height: 230px; image-rendering: pixelated; filter: drop-shadow(0 0 16px rgba(255,20,20,.45)); }
@keyframes dmx-float { 50% { translate: 0 -6px; } }
.dmx-drip { position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: .9;
  background-image: radial-gradient(circle, rgba(255,60,40,.9) 0 1.4px, transparent 2.2px), radial-gradient(circle, rgba(30,0,6,.95) 0 2.6px, transparent 3.6px), radial-gradient(circle, rgba(255,150,110,.7) 0 1px, transparent 1.6px);
  background-size: 52px 70px, 80px 96px, 36px 48px; background-position: 8px 0, 30px 24px, 20px 12px; animation: dmx-motes 8s linear infinite; }
@keyframes dmx-motes { to { background-position: 8px -140px, 30px -168px, 20px -96px; } }

.dmx-info { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dmx-head { display: flex; flex-direction: column; gap: 4px; }
.dmx-no { font: 800 11px/1 var(--font-body); letter-spacing: 2px; color: #ff6a6a; opacity: .85; }
.dmx-head h3 { margin: 0; font-size: 34px; line-height: 1.05; color: #fff; display: flex; align-items: center; gap: 8px;
  text-shadow: 0 0 18px rgba(255,30,30,.85), 0 3px 0 #000; }
.dmx-horn { width: 14px; height: 22px; display: inline-block; flex: none;
  background: linear-gradient(180deg, #ff4a4a, #6a0010); clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 0 4px rgba(255,30,30,.9)); }
.dmx-horn.l { transform: rotate(-18deg); } .dmx-horn.r { transform: rotate(18deg); }
.dmx-types { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dmx-one { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font: 800 11px/1.2 var(--font-body); letter-spacing: 1px; text-transform: uppercase;
  color: #fff; background: linear-gradient(180deg, #c0001c, #5a000c); box-shadow: 0 0 12px rgba(255,30,30,.6); }

.dmx-move { display: grid; grid-template-columns: 1fr minmax(180px, 46%); grid-template-rows: auto 1fr; gap: 6px 12px; padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(90,0,14,.5), rgba(10,0,4,.6)); border: 1px solid rgba(255,60,60,.32); }
.dmx-move-h { display: flex; align-items: center; gap: 7px; }
.dmx-move-h b { color: #ff7070; font-size: 17px; text-shadow: 0 0 10px rgba(255,30,30,.6); }
.dmx-move p { grid-column: 1; margin: 0; font: 600 13px/1.45 var(--font-body); color: #ecd6d6; }
.dmx-arena { grid-column: 2; grid-row: 1 / 3; width: 100%; aspect-ratio: 400 / 224; border-radius: 10px; image-rendering: pixelated;
  border: 1px solid rgba(255,60,60,.5); box-shadow: 0 0 18px rgba(255,20,20,.3), inset 0 0 0 1px #000; background: #12020a; }

.dmx-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dmx-fact { display: flex; flex-direction: column; gap: 2px; padding: 8px 11px; border-radius: 10px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,60,60,.18); min-width: 0; }
.dmx-fact span { font: 800 10.5px/1 var(--font-body); letter-spacing: 1.6px; text-transform: uppercase; color: #ff6a6a; }
.dmx-fact b { font-size: 16px; color: #fff; }
.dmx-fact small { font: 600 12px/1.3 var(--font-body); color: #b99; }

.dmx-owner { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 6px 14px 6px 8px; border-radius: 14px; text-align: left; cursor: pointer;
  color: inherit; font: inherit; background: linear-gradient(90deg, rgba(160,0,24,.45), rgba(20,0,6,.7)); border: 1px solid rgba(255,60,60,.5);
  box-shadow: 0 0 20px rgba(255,20,20,.2); transition: translate .2s, box-shadow .2s, border-color .2s; }
.dmx-owner:hover, .dmx-owner:focus-visible { translate: 0 -2px; border-color: #ff5a5a; box-shadow: 0 0 30px rgba(255,30,30,.45); }
.dmx-owner canvas { width: 64px; height: 72px; image-rendering: pixelated; filter: drop-shadow(0 0 6px rgba(255,40,40,.6)); }
.dmx-owner span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.dmx-owner small { font: 800 10.5px/1 var(--font-body); letter-spacing: 1.6px; text-transform: uppercase; color: #ff8a8a; }
.dmx-owner b { font-size: 22px; color: #fff; text-shadow: 0 0 12px rgba(255,40,40,.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dmx-owner em { font: 600 12px/1.2 var(--font-body); font-style: normal; color: #d9b0b0; }
.dmx-chev { font-size: 28px; line-height: 1; color: #ff6a6a; font-style: normal; }
.dmx-owner.mine { border-color: var(--gold); background: linear-gradient(90deg, rgba(160,110,0,.35), rgba(20,0,6,.7)); }
.dmx-owner.mine em { color: var(--gold); }

/* the grimoire */
.dmx-gh { margin: 18px 2px 10px; font-size: 20px; color: #ff6060; letter-spacing: 2px; text-transform: uppercase; display: flex; align-items: center; gap: 10px;
  text-shadow: 0 0 12px rgba(255,30,30,.6); }
.dmx-gh::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255,60,60,.6), transparent); }
.dmx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.dmx-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px 12px; border-radius: 14px; overflow: hidden; isolation: isolate;
  color: inherit; font: inherit; cursor: pointer; text-align: center;
  background: radial-gradient(circle at 50% 40%, #3e0008 0%, #0a0003 72%); border: 1px solid rgba(255,42,42,.4);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 10px 26px rgba(0,0,0,.7);
  transition: translate .22s cubic-bezier(.2,.9,.25,1.2), box-shadow .22s, border-color .22s; }
/* (25-10-2026, the iPhone crashes) Only the first cards (the ones with --i, on screen) come in animated: all 980 at
   once each got a layer of their own on iPhone (over 1 GB) and Safari closed the page. */
.dmx-card[style] { animation: dmx-in .5s cubic-bezier(.2,1.2,.4,1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes dmx-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
/* (24-10-2026, speed) Cards out of view are neither painted nor animated (980 of them); they look the same
   when they scroll in. Not on phones in landscape: the pager measures every card's real height. */
/* (25-10-2026) out of view: no animation at all (a paused one still kept its layer, with its glow, on iPhone) */
.dmx-card.dmx-off .dmx-sig, .dmx-card.dmx-off .dmx-motes { animation: none; }
@media (min-height: 521px) {
  .dmx-card { content-visibility: auto; contain-intrinsic-size: auto 214px; }
}
/* the turning sigils in view on their own layer: the glow is drawn once and only rotated */
.dmx-card:not(.dmx-off) .dmx-sig, .dmx-big-sig { will-change: transform; }
.dmx-card:hover, .dmx-card:focus-visible { translate: 0 -4px; border-color: #ff4a4a; box-shadow: 0 0 26px rgba(255,30,30,.45), 0 14px 30px rgba(0,0,0,.8); }
.dmx-card.on { border-color: #ff2a2a; box-shadow: 0 0 0 2px rgba(255,42,42,.6), 0 0 34px rgba(255,30,30,.55), 0 14px 30px rgba(0,0,0,.8); }
.dmx-card .dmx-sig { position: absolute; left: 50%; top: 42%; width: 140px; height: 140px; margin: -70px 0 0 -70px; z-index: -1; pointer-events: none; opacity: .45;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='46' fill='none' stroke='%23ff2a2a' stroke-width='2'/><circle cx='50' cy='50' r='38' fill='none' stroke='%23ff2a2a' stroke-width='1' opacity='.6'/><polygon points='50,12 72.3,80.7 13.9,38.3 86.1,38.3 27.7,80.7' fill='none' stroke='%23ff2a2a' stroke-width='2'/></svg>") center/contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(255,30,30,.8)); animation: dm-spin 14s linear infinite; }
.dmx-card .dmx-motes { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .8;
  background-image: radial-gradient(circle, rgba(255,60,60,.9) 0 1.5px, transparent 2.5px), radial-gradient(circle, rgba(20,0,6,.95) 0 3px, transparent 4px);
  background-size: 46px 60px, 70px 90px; background-position: 6px 0, 30px 20px; animation: dm-rise 7s linear infinite; }
.dmx-card .dmx-sprite { width: 150px; height: 120px; image-rendering: pixelated; }
.dmx-card .dmx-no { margin-top: -2px; }
.dmx-card b { font-size: 17px; color: #fff; text-shadow: 0 0 10px rgba(255,40,40,.8); }
.dmx-card small { font: 600 12px/1.3 var(--font-body); color: #c9a0a0; display: flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dmx-card .dmx-own { color: #ffd0d0; font-weight: 800; }
.dmx-badge { position: absolute; top: 8px; right: 8px; padding: 2px 7px; border-radius: 999px; font: 800 10px/1.3 var(--font-body); font-style: normal; letter-spacing: 1px;
  color: #1a0f00; background: var(--gold); box-shadow: 0 0 10px rgba(255,200,60,.6); }
.dmx-badge.new { color: #fff; background: #b00020; box-shadow: 0 0 10px rgba(255,40,40,.8); }
.dmx-card.mine { border-color: rgba(255,210,63,.6); }
/* the sealed ones: the demonic form asleep, dimmed, until someone awakens it */
.dmx-card.sealed { border-style: dashed; border-color: rgba(255,42,42,.26); background: radial-gradient(circle at 50% 42%, #1c0005 0%, #050002 72%); }
.dmx-card.sealed .dmx-sprite { filter: brightness(.7) saturate(.65) contrast(1.05); transition: filter .25s; }
.dmx-card.sealed:hover .dmx-sprite, .dmx-card.sealed.on .dmx-sprite { filter: none; }
.dmx-card.sealed .dmx-sig { opacity: .16; animation-duration: 40s; }
.dmx-card.sealed b { color: #e8c0c0; text-shadow: none; }
.dmx-card.sealed .dmx-seal { color: #9a7070; }
.dmx-card.sealed.on { border-style: solid; }
.dmx-card[hidden] { display: none !important; }
/* search and filters */
.dmx-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.dmx-search { position: relative; flex: 1 1 260px; max-width: 460px; display: block; }
.dmx-search-ico { position: absolute; left: 13px; top: 50%; width: 13px; height: 13px; margin-top: -8px; border: 2px solid #ff6a6a; border-radius: 50%; pointer-events: none; }
.dmx-search-ico::after { content: ''; position: absolute; right: -6px; bottom: -5px; width: 7px; height: 2px; background: #ff6a6a; transform: rotate(45deg); }
.dmx-search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 999px; font: 600 14px var(--font-body); color: #fff;
  background: rgba(0,0,0,.6); border: 1px solid rgba(255,60,60,.4); box-shadow: inset 0 2px 8px rgba(0,0,0,.6); outline: none; transition: border-color .2s, box-shadow .2s; }
.dmx-search input::placeholder { color: #9a7676; }
.dmx-search input:focus { border-color: #ff3a3a; box-shadow: inset 0 2px 8px rgba(0,0,0,.6), 0 0 0 3px rgba(255,30,30,.2), 0 0 18px rgba(255,30,30,.3); }
.dmx-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.dmx-f { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: 800 13px var(--font-body); color: #e8c8c8; background: rgba(0,0,0,.55); border: 1px solid rgba(255,60,60,.25); transition: border-color .2s, background .2s; }
.dmx-f small { font: 800 11px var(--font-body); color: #a07878; }
.dmx-f:hover { border-color: rgba(255,60,60,.6); }
.dmx-f.on { color: #fff; background: linear-gradient(180deg, #b0001c, #4a000a); border-color: #ff4a4a; box-shadow: 0 0 14px rgba(255,30,30,.45); }
.dmx-f.on small { color: #ffc0c0; }
.dmx-note, .dmx-none { margin: 0 2px 10px; font: 600 13px/1.4 var(--font-body); color: #d8b0b0; }
.dmx-none { text-align: center; padding: 26px 0; }
/* the altar of a sealed one */
.dmx-hero.sealed .dmx-mon canvas { filter: brightness(.62) saturate(.7) drop-shadow(0 0 12px rgba(255,20,20,.3)); }
.dmx-hero.sealed .dmx-big-sig { opacity: .45; }
.dmx-hero.sealed .dmx-one { background: linear-gradient(180deg, #3a2a2e, #140a0c); box-shadow: none; color: #d8b8b8; }
.dmx-fact .dmx-ultra { text-transform: uppercase; letter-spacing: 1.5px; color: #ff5a4a; text-shadow: 0 0 10px rgba(255,30,30,.8); }
.dmx-pull-ico { width: 64px; height: 56px; display: grid; place-items: center; }
.dmx-pull { background: linear-gradient(90deg, rgba(90,0,14,.5), rgba(20,0,6,.7)); border-style: dashed; }

/* narrower: the altar above the details */
@media (max-width: 980px) {
  .dmx-hero { grid-template-columns: 1fr; gap: 10px; }
  .dmx-altar { min-height: 230px; }
}
@media (max-width: 560px) {
  .dmx-top h2 { font-size: 23px; }
  .dmx-head h3 { font-size: 27px; }
  .dmx-move { grid-template-columns: 1fr; }
  .dmx-arena { grid-column: 1; grid-row: auto; }
  .dmx-facts { grid-template-columns: 1fr; }
  .dmx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dmx-card .dmx-sprite { width: 120px; height: 96px; }
  .dmx-hero { padding: 10px; }
}
/* phones in landscape: one page each (ui/phone.js): the altar beside its details, compact */
@media (max-height: 520px) {
  .dmx-lead { display: none; }
  .dmx-top h2 { font-size: 22px; }
  .dmx-hero { grid-template-columns: 34% 1fr; gap: 10px; padding: 8px 10px; }
  .dmx-altar { min-height: 0; }
  .dmx-mon canvas { width: 190px; height: 168px; }
  .dmx-halo { width: 200px; height: 200px; margin: -100px 0 0 -100px; }
  .dmx-big-sig { width: 180px; height: 180px; margin: -90px 0 0 -90px; }
  .dmx-big-sig.s2 { width: 120px; height: 120px; margin: -60px 0 0 -60px; }
  .dmx-info { gap: 6px; }
  .dmx-head h3 { font-size: 22px; }
  .dmx-move { padding: 6px 8px; grid-template-columns: 1fr 44%; }
  .dmx-move p { font-size: 11.5px; line-height: 1.35; }
  .dmx-move-h b { font-size: 14px; }
  .dmx-fact { padding: 5px 8px; } .dmx-fact b { font-size: 13px; } .dmx-fact small { font-size: 11px; }
  .dmx-owner { grid-template-columns: 40px 1fr auto; padding: 3px 10px 3px 4px; }
  .dmx-owner canvas { width: 40px; height: 45px; }
  .dmx-owner b { font-size: 16px; }
  .dmx-gh { margin: 4px 2px 6px; font-size: 16px; }
  .dmx-tools { margin-bottom: 6px; gap: 6px; }
  .dmx-search input { height: 34px; font-size: 13px; }
  .dmx-f { height: 30px; padding: 0 10px; font-size: 12px; }
  .dmx-pull-ico { width: 40px; height: 40px; }
  .dmx-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .dmx-card .dmx-sprite { width: 120px; height: 92px; }
  #scr-demon .box > .dmx-body { flex: 1 1 auto !important; min-height: 0; margin: 0; padding: 2px 0 0; }
  .dmx-head .dmx-no { display: none; }
  .dmx-head { gap: 2px; }
  .dmx-move { gap: 3px 8px; }
  .dmx-info { display: grid; grid-template-columns: 1fr 1fr 1.25fr; align-content: start; gap: 6px; }
  .dmx-head, .dmx-move { grid-column: 1 / -1; }
  .dmx-move { grid-template-columns: 1fr 36%; }
  .dmx-facts { display: contents; }
  .dmx-fact { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 6px; padding: 4px 8px; }
  .dmx-fact span { flex-basis: 100%; font-size: 9.5px; }
  .dmx-owner small { font-size: 9.5px; }
  .dmx-owner em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dmx-title, .dmx-hero::after, .dmx-halo, .dmx-big-sig, .dmx-mon, .dmx-drip, .dmx-card .dmx-sig, .dmx-card .dmx-motes, #scr-menu .hub-btn.demon-hub, #scr-menu .hub-btn.demon-hub .mi-ico::after { animation: none; }
}
/* ---- (24-10-2026, profile+) best all-time placements */
.pf-lbbox { display: flex; flex-direction: column; gap: 10px; }
.pf-lbbox.hidden { display: none; }
.pf-lbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }
.pf-lb { display: grid; grid-template-columns: minmax(70px, 1fr) 1fr 1fr; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 14%, rgba(0,0,0,.6)), rgba(0,0,0,.55)); border: 1px solid color-mix(in srgb, var(--rc) 35%, transparent);
  animation: pf-up .45s cubic-bezier(.2,.9,.3,1) var(--d, 0s) both; }
.pf-lbr { font: 700 13px var(--font-body); color: #fff; }
.pf-pl { display: flex; flex-direction: column; line-height: 1.15; }
.pf-pl b { font: 800 16px var(--font); color: #fff; font-variant-numeric: tabular-nums; }
.pf-pl small { font: 600 10.5px var(--font-body); color: var(--muted); }
.pf-pl.gold b { color: #ffd24a; text-shadow: 0 0 10px rgba(255,210,74,.7); }
.pf-pl.silver b { color: #e3ecf7; text-shadow: 0 0 10px rgba(220,235,255,.6); }
.pf-pl.bronze b { color: #e79a5c; text-shadow: 0 0 10px rgba(231,154,92,.6); }
/* (24-10-2026) empty-state lines take the whole row of their grid (they wrapped into one narrow column) */
.pf-medals > p.sub, .pf-favs > p.sub, .pf-runs > p.sub { grid-column: 1 / -1; }

/* ============ PC Box overhaul (24-10-2026): a holographic storage terminal ============
   Palette: night glass #070b16, phosphor cyan #63f1ff (the terminal's light), amber #ffcc4d (copies, ranks),
   each slot rimmed in its rarity's colour; the box wallpapers stay, dimmed under the glass. */
#scr-pc { --ph: #63f1ff; --amb: #ffcc4d; --glass: #070b16; }
#scr-pc .box.pcx { display: flex; flex-direction: column; gap: 8px; max-height: calc(100dvh / var(--uiz, 1) - 24px); overflow: hidden;
  background: linear-gradient(180deg, rgba(99,241,255,.06), transparent 140px), rgba(4,7,14,.92);
  border-color: rgba(99,241,255,.35); box-shadow: 0 0 0 1px #000, 0 0 50px rgba(99,241,255,.10), 0 30px 80px rgba(0,0,0,.85); }
@media (min-width: 821px) and (min-height: 621px) { #scr-pc .box.pcx { margin-top: 52px; max-height: calc(100dvh / var(--uiz, 1) - 76px); } }
#scr-pc .pcx-title { color: #dffcff; text-shadow: 0 0 12px rgba(99,241,255,.8), 0 2px 0 #000; letter-spacing: 1px; }
#scr-pc .box > .row.between > h2::before { background: var(--ph); box-shadow: 0 0 10px var(--ph); }
/* top: the counters and "rank up all" */
.pcx-bar1 { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.pcx-stats { display: flex; gap: 8px; flex: 1 1 auto; flex-wrap: wrap; }
.pcx-st { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 12px; min-width: 120px;
  background: rgba(10,18,34,.85); border: 1px solid rgba(99,241,255,.22); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.pcx-st span { display: flex; flex-direction: column; line-height: 1.1; }
.pcx-st b { font: 800 18px var(--font); color: #fff; font-variant-numeric: tabular-nums; }
.pcx-st small { font: 600 10.5px var(--font-body); color: #8fb2c8; }
.pcx-st.hot { border-color: var(--amb); box-shadow: 0 0 16px rgba(255,204,77,.35); animation: pcx-hot 1.8s ease-in-out infinite; }
.pcx-st.hot b { color: var(--amb); }
@keyframes pcx-hot { 50% { box-shadow: 0 0 26px rgba(255,204,77,.6); } }
.pcx-allbtn { align-self: center; white-space: nowrap; }
/* tools: search, filters, sort */
.pcx-tools { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; }
.pcx-search { position: relative; flex: 0 1 280px; }
.pcx-sico { position: absolute; left: 12px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border: 2px solid var(--ph); border-radius: 50%; pointer-events: none; }
.pcx-sico::after { content: ''; position: absolute; right: -6px; bottom: -5px; width: 7px; height: 2px; background: var(--ph); transform: rotate(45deg); }
.pcx-search input { width: 100%; height: 36px; padding: 0 12px 0 34px; border-radius: 999px; font: 600 13px var(--font-body); color: #fff; outline: none;
  background: rgba(6,12,24,.9); border: 1px solid rgba(99,241,255,.3); transition: border-color .2s, box-shadow .2s; }
.pcx-search input:focus { border-color: var(--ph); box-shadow: 0 0 0 3px rgba(99,241,255,.18); }
#scr-pc #pcb-filter { display: flex; gap: 6px; flex-wrap: wrap; }
#scr-pc #pcb-filter .chip.on { background: linear-gradient(180deg, #1f6f86, #0f3a4a); border-color: var(--ph); color: #fff; box-shadow: 0 0 10px rgba(99,241,255,.35); }
.pcx-sortl { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--font-body); color: #8fb2c8; }
.pcx-sort { height: 32px; border-radius: 10px; padding: 0 8px; font: 600 12.5px var(--font-body); color: #fff; background: #0a1322; border: 1px solid rgba(99,241,255,.3); }
/* the box: header, tabs, the glass over the wallpaper */
#scr-pc .pcb { flex: 1 1 auto; min-height: 0; grid-template-columns: minmax(0, 1fr) 320px; }
#scr-pc .pcb-left { min-height: 0; }
#scr-pc .pcb-name { background: linear-gradient(180deg, #123a52, #0a1f30); border: 1px solid rgba(99,241,255,.5); color: #dffcff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 18px rgba(99,241,255,.2); text-shadow: 0 0 10px rgba(99,241,255,.7); }
#scr-pc .pcb-arrow { background: linear-gradient(180deg, #1f6f86, #0b3242); border: 1px solid var(--ph); color: #dffcff; box-shadow: 0 0 12px rgba(99,241,255,.3); }
.pcx-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.pcx-tab { position: relative; min-width: 30px; height: 24px; padding: 0 7px; border-radius: 7px; font: 800 11px var(--font); color: #cfe9f3; cursor: pointer;
  border: 1px solid rgba(99,241,255,.2); background-color: #0a1322; background-blend-mode: multiply; transition: border-color .15s, translate .15s; }
.pcx-tab:hover { border-color: rgba(99,241,255,.6); translate: 0 -1px; }
.pcx-tab.on { border-color: var(--ph); color: #fff; box-shadow: 0 0 10px rgba(99,241,255,.45); }
.pcx-tab i { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--amb); box-shadow: 0 0 8px var(--amb); }
#scr-pc .pcb-wall { position: relative; border: 1px solid rgba(99,241,255,.4); box-shadow: 0 0 0 1px #000, 0 0 28px rgba(99,241,255,.15), inset 0 0 40px rgba(0,0,0,.6); }
#scr-pc .pcb-wall::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, rgba(4,10,22,.58), rgba(4,10,22,.78)); }
#scr-pc .pcb-wall::after { z-index: 2; background: linear-gradient(180deg, rgba(99,241,255,.08), transparent 30%, transparent 80%, rgba(0,0,0,.3)); }
.pcx-scan { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; opacity: .35;
  background: repeating-linear-gradient(180deg, rgba(99,241,255,.07) 0 1px, transparent 1px 3px); }
.pcx-scan::after { content: ''; position: absolute; left: 0; right: 0; height: 60px; top: -60px; background: linear-gradient(180deg, transparent, rgba(99,241,255,.12), transparent);
  animation: pcx-sweep 5s linear infinite; }
@keyframes pcx-sweep { to { top: 100%; } }
#scr-pc .pcb-grid { position: relative; z-index: 1; }
.pcx-none { position: relative; z-index: 3; margin: 0; padding: 40px 0; text-align: center; color: #9fc3d6; font: 600 14px var(--font-body); }
/* the slots: glass cells rimmed in the rarity's colour */
#scr-pc .pcb-slot { background: linear-gradient(180deg, rgba(20,34,58,.85), rgba(8,14,28,.9)); border: 1px solid color-mix(in srgb, var(--rc, #8a93a8) 45%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 -10px 18px color-mix(in srgb, var(--rc, #8a93a8) 14%, transparent);
  animation: pcx-in .35s cubic-bezier(.2,.9,.3,1) both; animation-delay: calc(var(--i, 0) * 12ms); }
@keyframes pcx-in { from { opacity: 0; transform: scale(.85); } }
#scr-pc .pcb-slot:hover:not(.empty) { background: linear-gradient(180deg, rgba(30,52,84,.95), rgba(10,20,36,.95)); border-color: color-mix(in srgb, var(--rc) 85%, #fff); }
#scr-pc .pcb-slot.empty { background: rgba(6,12,24,.45); border: 1px dashed rgba(99,241,255,.12); box-shadow: none; animation: none; }
#scr-pc .pcb-slot.on { background: linear-gradient(180deg, rgba(40,90,120,.95), rgba(12,30,48,.95)); border-color: var(--ph); box-shadow: 0 0 0 1px var(--ph), 0 0 18px rgba(99,241,255,.5); }
#scr-pc .pcb-slot.on::after { border-top-color: var(--ph); filter: drop-shadow(0 0 6px var(--ph)); }
#scr-pc .pcb-slot.can { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px var(--amb), 0 0 12px rgba(255,204,77,.55); animation: pcx-in .35s both, pcx-can 1.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 12ms), 0s; }
@keyframes pcx-can { 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px var(--amb), 0 0 22px rgba(255,204,77,.9); } }
#scr-pc .pcb-r { color: var(--amb); }
#scr-pc .pcb-c { background: rgba(0,0,0,.75); border: 1px solid rgba(255,204,77,.4); color: #ffe7a8; }
/* (31-10-2026) narrow phones: the copies badge in the corner, small, so it no longer hides the Pokémon */
@media (max-width: 520px) { #scr-pc .pcb-c { right: 1px; bottom: 1px; padding: 0 2px; font-size: 9px; line-height: 1.15; border-radius: 4px; } }
/* the detail: type-coloured stage on a holographic base */
#scr-pc .pcb-side { --tc: #63f1ff; gap: 8px; border: 1px solid color-mix(in srgb, var(--tc) 55%, rgba(99,241,255,.3)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 26%, #070b16) 0%, #070b16 42%); box-shadow: 0 0 0 1px #000, 0 0 28px color-mix(in srgb, var(--tc) 20%, transparent); }
#scr-pc .pcs-head { position: sticky; top: 0; z-index: 2; background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 70%, #000), color-mix(in srgb, var(--tc2) 40%, #05070d)); }
.pcx-shi { margin-left: auto; line-height: 0; font-style: normal; }
#scr-pc .pcs-stage { height: 150px; flex: none; }
.pcx-holo { position: absolute; left: 50%; bottom: 8px; width: 150px; height: 30px; translate: -50% 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tc) 70%, #fff), transparent); opacity: .55;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tc) 60%, transparent), 0 0 30px color-mix(in srgb, var(--tc) 50%, transparent);
  animation: pcx-holo 2.6s ease-in-out infinite; }
@keyframes pcx-holo { 50% { opacity: .85; } }
#scr-pc .pcs-types { display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; padding: 0 10px; }
.pcx-rar { font: 700 11px var(--font-body); color: var(--rc); padding: 2px 8px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--rc) 60%, transparent); background: rgba(0,0,0,.4); }
.pcx-em { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pcx-em small { font: 700 11px var(--font-body); color: #9fb6c9; }
.pcx-em.pop .pcx-stars i.on, .pcx-em.pop .pcx-crown { animation: pcs-star .5s cubic-bezier(.2,1.6,.4,1) both; }
.pcx-stars { display: inline-flex; gap: 2px; line-height: 0; }
.pcx-stars i { filter: grayscale(1) brightness(.4); }
.pcx-stars i.on { filter: drop-shadow(0 0 4px rgba(255,204,77,.8)); }
.pcx-stars.big i:nth-child(n) { animation-delay: calc(var(--k, 0) * 60ms); }
.pcx-crown { display: inline-flex; align-items: center; gap: 3px; font: 800 11px var(--font); color: var(--amb); line-height: 1; }
.pcx-crown.big { gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; font-size: 18px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,204,77,.55); box-shadow: 0 0 16px rgba(255,204,77,.35); }
.pcx-crown.t2.big { border-color: #ffd24a; box-shadow: 0 0 22px rgba(255,210,74,.6); }
.pcx-crown.t3.big { color: #fff; border-color: #ff8ae6; background: linear-gradient(90deg, rgba(255,95,208,.35), rgba(127,224,255,.35)); box-shadow: 0 0 26px rgba(255,138,230,.6); }
#scr-pc .pcs-prog { flex: none; }
.pcx-bars { display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
.pcx-bar { display: grid; grid-template-columns: 16px 74px minmax(0, 1fr) 56px; align-items: center; gap: 6px; font: 600 11.5px var(--font-body); color: #cbd8e6; }
.pcx-bar em { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.pcx-bar em i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 50%, transparent), var(--c)); box-shadow: 0 0 8px var(--c); animation: pf-grow .9s cubic-bezier(.2,.9,.3,1) both; }
.pcx-bar b { text-align: right; color: #fff; font-variant-numeric: tabular-nums; }
.pcx-lad { padding: 0 12px; }
.pcx-lad small { display: block; margin-bottom: 4px; font: 700 10.5px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: #8fb2c8; }
.pcx-lad ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.pcx-lad li { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 9px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); font: 600 11px var(--font-body); color: #9fb0c2; }
.pcx-lad li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcx-lad li em { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-weight: 800; color: #cfe; }
.pcx-lad li.ok { border-color: rgba(255,204,77,.5); background: rgba(255,204,77,.08); color: #fff1c8; }
.pcx-lad li.ok em { color: var(--amb); }
.pcx-lad li.milestone span { color: #9ff3ff; }
#scr-pc .pcb-side .pcs-btns { margin-bottom: 4px; }
.pcx-more { display: flex; gap: 6px; }
.pcx-more .btn { flex: 1 1 0; min-width: 0; }
.pcx-empty { padding: 20px 14px; }
.pcx-ring { position: absolute; left: 50%; top: 60%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 3px solid var(--amb); pointer-events: none; z-index: 3;
  animation: pcx-ring .8s ease-out forwards; }
.pcx-ring.r2 { border-color: var(--tc); animation-delay: .12s; }
@keyframes pcx-ring { to { transform: scale(5); opacity: 0; } }
@media (max-width: 900px) and (min-height: 521px) { #scr-pc .pcb { grid-template-columns: 1fr; } #scr-pc .box.pcx { overflow-y: auto; } }
@media (max-height: 520px) {
  #scr-pc .pcx-bar1 { display: none; }
  #scr-pc .pcx-tools { gap: 5px; } .pcx-search { flex: 0 1 170px; } .pcx-search input { height: 28px; font-size: 12px; }
  #scr-pc #pcb-filter .chip { padding: 2px 7px; font-size: 10.5px; }
  .pcx-sortl { font-size: 0; gap: 0; } .pcx-sort { height: 26px; font-size: 11px; }
  .pcx-tabs { display: none; }
  #scr-pc .pcb { grid-template-columns: minmax(0, 1fr) 240px; }
  #scr-pc .pcb-slot { height: calc((100dvh - 214px) / 5); }
  #scr-pc .pcs-stage { height: 70px; }
  .pcx-bars, .pcx-lad, .pcx-em small { display: none; }
  .pcx-more .btn { padding: 4px 6px; font-size: 11px; }
  #scr-pc .pcb-side .pcs-btns { flex-direction: row; flex-wrap: wrap; }
  #scr-pc .pcb-side .pcs-btns > .btn { flex: 1 1 40%; }
  #scr-pc .pcb-side .pcs-btns > .pcx-more { flex: 1 1 100%; }
  #scr-pc .pcb-slot canvas { inset: 0; width: 100%; height: 100%; }
}
@media (prefers-reduced-motion: reduce) { .pcx-scan::after, .pcx-st.hot, #scr-pc .pcb-slot, .pcx-holo { animation: none; } }
@media (min-height: 521px) {
  #scr-pc .box.pcx { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  #scr-pc .pcb { flex: none; }
}
@media (min-height: 521px) and (max-height: 860px) { #scr-pc .pcb-slot { aspect-ratio: 1 / .78; } }

/* ============ Pokédex (24-10-2026): the device ============
   A red-lacquer Pokédex: deep red bezel, the big blue lens as the title's light, the detail as its glass
   screen (scanlines, a sweep of light), cards that glow in their type's colours. Palette: lacquer #d8273a,
   bezel #1a0508, lens #49c6ff, screen #081018; rarity and type colours come from the game.
   Layout. PC and tablets: the title row with the collection summary, the regions across the whole width (all of
   them, never cut), then the list on the left and the detail on the right; the detail has two columns, the card
   and the tab pages. Narrow lists swap the chip rows for drop-downs (container query). Phones: the list with its
   drop-downs on the left, the detail on the right. Every move is a card with its live preview. */
#scr-dex { --lq: #d8273a; --lens: #49c6ff; }
#scr-dex .box.dxx { border-color: rgba(216,39,58,.6);
  background: linear-gradient(180deg, rgba(216,39,58,.16), transparent 120px), radial-gradient(120% 60% at 0% 0%, rgba(216,39,58,.12), transparent 60%), rgba(8,4,8,.93);
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,150,160,.15), 0 0 50px rgba(216,39,58,.14), 0 30px 80px rgba(0,0,0,.85); }
#scr-dex .box > .row.between > h2::before { width: 14px; height: 14px; transform: none; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--lens) 30%, #0a4f7a 100%); box-shadow: 0 0 0 2px #000, 0 0 0 4px #e9e9ee, 0 0 14px var(--lens); }
#scr-dex .dxx-title { color: #fff; text-shadow: 0 0 12px rgba(216,39,58,.7), 0 2px 0 #000; }

/* the title row: title, the collection summary, Back */
#scr-dex .dxx-headrow { gap: 12px; align-items: center; flex-wrap: nowrap; }
#scr-dex .dxx-headrow > h2 { flex: none; margin: 0; white-space: nowrap; }
#scr-dex .dxx-headrow > .btn { flex: none; }
.dxx-sum { display: flex; gap: 7px; align-items: center; justify-content: flex-end; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.dxx-ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--lq) calc(var(--p) * 1%), rgba(255,255,255,.1) 0); box-shadow: 0 0 16px rgba(216,39,58,.35); position: relative; }
.dxx-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #0c0609; }
.dxx-ring b { position: relative; font: 800 12px var(--font); color: #fff; }
.dxx-chip { display: flex; align-items: center; gap: 7px; padding: 4px 11px 4px 8px; border-radius: 12px; background: rgba(20,8,12,.85); border: 1px solid rgba(216,39,58,.3); white-space: nowrap; }
.dxx-chip span { display: flex; flex-direction: column; line-height: 1.1; }
.dxx-chip b { font: 800 15px var(--font); color: #fff; }
.dxx-chip small { font: 600 10.5px var(--font-body); color: #c9a3aa; }
.dxx-chip.dm { border-color: rgba(255,42,42,.6); box-shadow: 0 0 12px rgba(255,30,30,.25); }

/* the regions: every tab whole, with its progress */
#scr-dex .gen-tabs { flex-wrap: wrap; justify-content: center; overflow: visible; row-gap: 6px; }
#scr-dex .gen-tab { flex: none; position: relative; overflow: hidden; white-space: nowrap; background: rgba(18,8,12,.9); border-color: rgba(216,39,58,.25); }
#scr-dex .gen-tab.on { background: linear-gradient(180deg, #4a0c16, #22060b); border-color: var(--lq); box-shadow: 0 0 12px rgba(216,39,58,.45); }
#scr-dex .gen-tab.on b { color: #fff; }
.dxx-gbar { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p); background: linear-gradient(90deg, #ff6b7a, var(--lq)); box-shadow: 0 0 6px var(--lq); }
#scr-dex .gen-tab.done .dxx-gbar { background: linear-gradient(90deg, #ffe58a, #f4a21f); box-shadow: 0 0 8px #ffd24a; }

/* toolbar */
#scr-dex .dex-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#scr-dex .dex-search { flex: 1 1 90px; min-width: 0; margin: 0 !important; }
.dxx-sortl { display: inline-flex; align-items: center; gap: 6px; font: 700 12px var(--font-body); color: #c9a3aa; flex: none; }
.dxx-sortl select { height: 36px; min-width: 104px; padding: 0 8px; font: 600 13px var(--font-body); }
.dxx-view { min-width: 40px; font-size: 18px; flex: none; }
.dxx-view.on { border-color: var(--lq); color: #fff; box-shadow: 0 0 10px rgba(216,39,58,.5); }
/* (31-10-2026, suggestion #0103) the ✨ switch: show your shinies */
.sh-skins { min-width: 40px; flex: none; filter: grayscale(1); opacity: .75; }
.sh-skins.on { filter: none; opacity: 1; border-color: #9ae6ff; box-shadow: 0 0 10px rgba(154,230,255,.55); }
#scr-dex .chip.on { border-color: var(--lq); box-shadow: 0 0 10px rgba(216,39,58,.35); }
#scr-dex .dex-ctl select { min-width: 0; text-overflow: ellipsis; }

/* the cards: dark glass glowing in the type's colours, rarity line at the bottom */
#scr-dex #dex-grid .cell { position: relative; overflow: hidden; isolation: isolate; border: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(90% 70% at 50% 100%, color-mix(in srgb, var(--t1, #555) 32%, transparent), transparent 70%), linear-gradient(180deg, #120a0e, #0a0609);
  transition: translate .16s cubic-bezier(.2,.9,.3,1.2), border-color .16s, box-shadow .16s; }
#scr-dex #dex-grid .cell::before { content: ''; position: absolute; inset: auto 0 0 0; height: 3px; z-index: -1; background: linear-gradient(90deg, var(--t1, #555), var(--t2, #555)); opacity: .85; }
#scr-dex #dex-grid .cell:hover { translate: 0 -3px; border-color: color-mix(in srgb, var(--t1) 70%, #fff); box-shadow: 0 8px 20px rgba(0,0,0,.5), 0 0 16px color-mix(in srgb, var(--t1) 35%, transparent); }
#scr-dex #dex-grid .cell.on { border-color: var(--lq); box-shadow: 0 0 0 1px var(--lq), 0 0 22px rgba(216,39,58,.55); }
#scr-dex #dex-grid .cell.locked { background: linear-gradient(180deg, #0d0b0d, #070607); }
#scr-dex #dex-grid .cell.locked::before { opacity: .15; }
#scr-dex #dex-grid .cell b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dxx-marks { display: flex; gap: 4px; justify-content: center; margin-top: 2px; }
.dxx-marks i { display: inline-flex; align-items: center; gap: 1px; font: 800 9.5px var(--font); font-style: normal; padding: 0 4px; border-radius: 6px; background: rgba(0,0,0,.6); }
.dxx-marks .rk { color: #ffcc4d; } .dxx-marks .iv { color: #ff8ae6; } .dxx-marks .mg { line-height: 0; padding: 1px 3px; }
/* (29-10-2026) Pokédex: search by name or by move — the Name / Move toggle by the field, the move found on each card, lit in the Moves tab */
.dex-search { display: flex; align-items: center; gap: 6px; }
.dex-search .field { flex: 1 1 auto; min-width: 0; }
.dex-qmode { display: inline-flex; flex: none; border: 2px solid rgba(255,255,255,.16); border-radius: 999px; overflow: hidden; background: rgba(10,10,18,.6); }
.dex-qmode button { appearance: none; border: 0; background: none; color: #b8b8c4; font: 800 12px var(--font); padding: 5px 11px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; line-height: 1; }
.dex-qmode button.on { background: var(--gold); color: #1a1205; }
.dex-qmode button:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.cell .dxx-hit { display: flex; align-items: center; justify-content: center; gap: 3px; max-width: 100%; margin-top: 2px; padding: 0 3px; font: 700 10px var(--font-body); color: #ffd23f; white-space: nowrap; overflow: hidden; }
.cell .dxx-hit em { font-style: normal; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cell .dxx-hit i { font-style: normal; color: #b8b8c4; flex: none; }
.cell .dxx-hit .tm-sm { color: #ff8a9a; }
#scr-dex .dxx-mv.hit { outline: 2px solid #ffd23f; outline-offset: 1px; box-shadow: 0 0 14px rgba(255,210,63,.45); }
@media (max-height: 520px) { .dex-qmode button span { display: none; } .dex-qmode button { padding: 4px 8px; } .cell .dxx-hit { font-size: 9px; margin-top: 0; }
  #scr-dex .cell.hit .rarity-ball { display: none; } }
/* compact view: many more at once */
#scr-dex #dex-grid.compact { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 5px; }
#scr-dex #dex-grid.compact .cell { padding: 3px 2px 5px; }
#scr-dex #dex-grid.compact .cell canvas { width: 64px; height: 56px; }
#scr-dex #dex-grid.compact .cell b { font-size: 10.5px; }
#scr-dex #dex-grid.compact .cell .stars, #scr-dex #dex-grid.compact .dxx-marks { display: none; }

/* ---- the detail: the Pokédex screen, the card on the left and the tab pages on the right ---- */
#scr-dex #dex-detail { position: relative; display: grid !important; grid-template-columns: minmax(170px, 31%) minmax(0, 1fr); gap: 0 14px; align-items: stretch;
  min-height: 0; overflow: hidden !important; padding: 10px 12px !important; border: 2px solid #2a0a10; border-radius: 18px;
  background: radial-gradient(70% 45% at 15% 0%, color-mix(in srgb, var(--t1, #49c6ff) 14%, transparent), transparent 70%), linear-gradient(180deg, #0b1620, #070c12 55%);
  box-shadow: 0 0 0 1px #000, 0 0 0 5px rgba(216,39,58,.55), 0 0 30px rgba(216,39,58,.25), inset 0 0 40px rgba(73,198,255,.06); }
#scr-dex #dex-detail.solo { grid-template-columns: minmax(0, 1fr); }
#scr-dex #dex-detail.solo .dxx-side { width: min(320px, 100%); justify-self: center; }
#scr-dex #dex-detail > .dxx-side { grid-column: 1; grid-row: 1; }
#scr-dex #dex-detail > .dxx-main { grid-column: 2; grid-row: 1; }
.dxx-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; align-self: start; }
.dxx-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
/* the card: the Pokémon on its lit stage, number, region, name, rarity, types, forms */
#scr-dex #dex-detail .dx-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 4px; text-align: center; }
#scr-dex #dex-detail .dx-head .stage { width: 150px !important; height: 130px !important; margin: 0 !important; border-radius: 16px;
  background: radial-gradient(ellipse 58% 20% at 50% 86%, color-mix(in srgb, var(--stage-c, #49c6ff) 55%, transparent), transparent 72%),
              radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--stage-c, #49c6ff) 26%, transparent), transparent 64%), #0a0f16;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--stage-c, #49c6ff) 55%, #000), 0 0 22px color-mix(in srgb, var(--stage-c, #49c6ff) 30%, transparent), inset 0 0 18px rgba(0,0,0,.7); }
#scr-dex #dex-detail .dx-id { min-width: 0; max-width: 100%; text-align: center; }
#scr-dex #dex-detail .dx-no { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; color: #9fb6c9; font-size: 12px; }
.dxx-no { font: 800 11px var(--font); color: #fff; padding: 1px 7px; border-radius: 999px; background: rgba(73,198,255,.14); border: 1px solid rgba(73,198,255,.35); }
.dxx-pt { display: inline-flex; align-items: center; gap: 3px; font: 800 10px var(--font); color: #ffd24a; padding: 1px 7px; border-radius: 999px; background: rgba(255,210,74,.12); border: 1px solid rgba(255,210,74,.4); }
#scr-dex #dex-detail .dx-id h3 { justify-content: center; margin: 2px 0 0; font-size: 20px; line-height: 1.15; overflow-wrap: anywhere; }
#scr-dex #dex-detail .dx-rar { margin: 1px 0; }
#scr-dex #dex-detail .dx-types { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 3px 0; }
#scr-dex #dex-detail .dx-head .seg { max-width: 100%; margin: 2px 0 0; }
.dxx-scan { position: absolute; inset: -10px; pointer-events: none; z-index: 2; opacity: .5;
  background: repeating-linear-gradient(180deg, rgba(73,198,255,.06) 0 1px, transparent 1px 3px); }
.dxx-scan::after { content: ''; position: absolute; left: 0; right: 0; height: 50px; top: -50px; background: linear-gradient(180deg, transparent, rgba(73,198,255,.14), transparent); animation: pcx-sweep 4.5s linear infinite; }
.dxx-nav { position: absolute; top: 65px; z-index: 3; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; cursor: pointer; font: 800 18px/1 var(--font); color: #fff;
  background: rgba(0,0,0,.65); border: 1px solid rgba(73,198,255,.5); box-shadow: 0 0 10px rgba(73,198,255,.3); }
.dxx-nav.prev { left: 0; } .dxx-nav.next { right: 0; }
.dxx-nav:hover { border-color: var(--lens); background: rgba(10,40,60,.9); }
.dxx-got { display: block; margin: 5px 0 0 !important; font: 600 11.5px/1.35 var(--font-body) !important; color: #9fb6c9; text-align: center; }
.dxx-got img { vertical-align: -2px; margin-right: 3px; }
.dxx-got.sh { color: #9ae6ff; margin-top: 1px !important; }
#scr-dex .dxx-side .dx-pick { width: 100%; margin: 8px 0 0; padding: 8px; font-size: 15px; }
#scr-dex #dex-detail .dx-miss { text-align: center; }
.dxx-acts { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.dxx-acts .btn { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.dxx-acts .btn b { font: 800 11px var(--font); color: #ffcc4d; }
/* the tabs and their pages */
#scr-dex #dex-detail .dx-tabs { flex: none; display: flex; gap: 5px; margin: 0 0 8px; }
#scr-dex #dex-detail .dx-tabs .chip { flex: 1 1 auto; min-width: 0; justify-content: center; gap: 5px; padding: 4px 8px; font-size: 12.5px; white-space: nowrap; }
#scr-dex #dex-detail .dx-tabs .chip span { overflow: hidden; text-overflow: ellipsis; }
#scr-dex #dex-detail .dxx-main .dx-page { display: none; }
#scr-dex #dex-detail .dxx-main .dx-page.on { display: block; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 7px; scrollbar-width: thin; animation: fade .18s ease-out; }
/* stats: coloured bars, percentile, the difference with your partner */
.dxx-vs { margin: 0 0 4px !important; font: 600 11.5px var(--font-body) !important; color: #9fb6c9; }
.dxx-vs b { color: #fff; }
#scr-dex .dx-page .stat { --sc: var(--gold); display: grid; grid-template-columns: 62px minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; margin: 4px 0; }
#scr-dex .dx-page .stat .bar i { background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 55%, transparent), var(--sc)); box-shadow: 0 0 8px color-mix(in srgb, var(--sc) 60%, transparent); }
.dxx-pct { font: 700 10px var(--font-body); color: #9fb6c9; min-width: 50px; text-align: right; }
.dxx-dl { font: 800 10.5px var(--font); font-style: normal; min-width: 40px; text-align: right; }
.dxx-dl.up { color: #5fe08a; } .dxx-dl.dn { color: #ff7a7a; } .dxx-dl.eq { color: #9fb6c9; }
.dxx-bst { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 8px; margin: 6px 0 2px; padding: 6px 10px; border-radius: 10px; background: rgba(73,198,255,.06); border: 1px solid rgba(73,198,255,.18); }
.dxx-bst span { font: 700 12px var(--font-body); color: #9fc3d6; }
.dxx-bst b { font: 800 18px var(--font); color: #fff; }
.dxx-bst small { text-align: right; font: 600 11px var(--font-body); color: #9fb6c9; }
/* type matchups */
.dxx-mups { margin: 6px 0 2px; padding: 6px 10px 8px; border-radius: 10px; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.08); }
.dxx-mups > .dx-h { margin: 0 0 4px !important; }
.dxx-mrow { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 8px; align-items: start; padding: 3px 0; }
.dxx-mrow + .dxx-mrow { border-top: 1px solid rgba(255,255,255,.06); }
.dxx-ml { font: 700 11.5px var(--font-body); padding-top: 3px; }
.dxx-mrow.bad .dxx-ml { color: #ff8a8a; } .dxx-mrow.good .dxx-ml { color: #7fe0a6; } .dxx-mrow.atk .dxx-ml { color: #ffd27a; }
.dxx-mrow > div { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.dxx-mrow em { color: var(--muted); font-style: normal; }
.dxx-mu { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 4px; border-radius: 999px; font: 700 11px var(--font-body); color: #fff; white-space: nowrap;
  background: color-mix(in srgb, var(--tc) 22%, rgba(0,0,0,.5)); border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); }
.dxx-mu i { font: 800 10px var(--font); font-style: normal; color: color-mix(in srgb, var(--tc) 45%, #fff); }
/* moves: each one a card with its live preview */
#scr-dex .dx-start { margin: 0 0 4px !important; }
#scr-dex .dx-h { margin: 6px 0 4px !important; }
#scr-dex .dxx-mvh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
#scr-dex .dxx-mvh b { font-size: 12px; }
#scr-dex .dxx-moves { container: dxmv / inline-size; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 4px; margin: 0 0 4px; }
#scr-dex .dxx-mv { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 9px; row-gap: 2px; align-items: start; padding: 4px; border-radius: 11px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--mc) 16%, rgba(0,0,0,.5)), rgba(0,0,0,.45)); border: 1px solid color-mix(in srgb, var(--mc) 35%, transparent); }
#scr-dex .dxx-mv .dxx-prev { grid-row: 1 / span 3; width: 112px; height: 63px; border-radius: 8px; image-rendering: pixelated; background: #0d1a12;
  box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 0 0 2px color-mix(in srgb, var(--mc) 40%, transparent); }
#scr-dex .dxx-mvt { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
#scr-dex .dxx-mvt b { display: inline-flex; align-items: center; gap: 4px; font: 700 13px var(--font-body); color: #fff !important; }
.dxx-ty { font: 800 9px var(--font-body); font-style: normal; letter-spacing: .4px; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; color: #fff;
  background: color-mix(in srgb, var(--tc) 30%, rgba(0,0,0,.5)); border: 1px solid color-mix(in srgb, var(--tc) 60%, transparent); }
#scr-dex .dxx-mv small { font: 500 11.5px/1.32 var(--font-body); color: #c8d0dc; }
.dxx-lock { grid-column: 2; display: inline-flex; align-items: center; gap: 4px; font: 700 10.5px var(--font-body); font-style: normal; color: #ffb0b0; }
#scr-dex .dxx-mv.sh { border-color: rgba(154,230,255,.55); background: linear-gradient(90deg, rgba(154,230,255,.14), rgba(0,0,0,.45)); }
#scr-dex .dxx-mv.sh::after { content: '✦'; position: absolute; top: 4px; right: 8px; font-size: 11px; color: #9ae6ff; text-shadow: 0 0 6px #9ae6ff; }
#scr-dex .dxx-mv.uq { border-color: rgba(255,59,59,.55); background: linear-gradient(90deg, rgba(120,0,12,.35), rgba(0,0,0,.45)); }
#scr-dex .dxx-mv.uq .dxx-prev { background: #1c030b; }
#scr-dex .dxx-moves.shiny-moves.locked { opacity: .82; filter: none; }
#scr-dex .pv-box .dxx-moves { margin: 4px 0 0; }
@container dxmv (max-width: 299px) {
  #scr-dex .dxx-mv { grid-template-columns: 96px minmax(0, 1fr); }
  #scr-dex .dxx-mv .dxx-prev { width: 96px; height: 54px; }
}
/* the forms toggle: with three forms in a narrow card, icons only */
.dxx-side { container: dxside / inline-size; }
#scr-dex #dex-detail .dx-head .seg button { display: inline-flex; align-items: center; gap: 4px; }
@container dxside (max-width: 200px) {
  #scr-dex .dxx-acts { flex-direction: row !important; gap: 4px; }
  #scr-dex .dxx-acts .btn { flex: 1 1 0; padding-left: 4px; padding-right: 4px; }
  #scr-dex .dxx-acts .btn span { display: none; }
}
@container dxside (max-width: 170px) {
  #scr-dex #dex-detail .dx-head .seg:not(.seg3) button > :not(span) { display: none; }     /* (26-10-2026) "Normal" was cut */
  #scr-dex #dex-detail .dx-head .seg:not(.seg3) button { padding-left: 7px; padding-right: 7px; }
}
@container dxside (max-width: 250px) {
  #scr-dex #dex-detail .dx-head .seg.seg3 button span { display: none; }
  #scr-dex #dex-detail .dx-head .seg.seg3 button { padding: 3px 10px; }
}

@media (prefers-reduced-motion: reduce) { .dxx-scan::after { animation: none; } }

/* ---- PC and tablets ---- */
@media (min-height: 521px) {
  #scr-dex .box.dxx { width: min(1560px, 100%); height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 58%); grid-template-rows: auto auto minmax(0, 1fr);
    column-gap: 14px; overflow: hidden; }
  #scr-dex .box.dxx > .row.between { grid-column: 1 / -1; margin-bottom: 2px; }
  #scr-dex .box.dxx > .gen-tabs { grid-column: 1 / -1; margin: 4px 0 2px; padding-bottom: 6px; }
  #scr-dex .box.dxx > .split { display: contents; }
  #scr-dex .box.dxx .dex-main { grid-column: 1; grid-row: 3; container: dexmain / inline-size; display: flex; flex-direction: column; min-height: 0; min-width: 0; margin-top: 4px; }
  #scr-dex .box.dxx #dex-detail { grid-column: 2; grid-row: 3; margin-top: 4px; }
  #scr-dex .dex-main > :not(#dex-grid) { flex-shrink: 0; }
  #scr-dex .dex-top { margin-bottom: 6px; }
  #scr-dex #dex-grid { flex: 1 1 auto; max-height: none; min-height: 0; grid-auto-rows: max-content; align-content: start; }
  /* a narrow list: the type and filter rows become two drop-downs (the region tabs stay above) */
  @container dexmain (max-width: 700px) {
    #scr-dex #dex-types, #scr-dex #dex-filters { display: none !important; }
    #scr-dex .dex-ctl { display: flex !important; flex: 1 1 100%; gap: 6px; min-width: 0; }
    #scr-dex .dex-ctl #dex-gen-sel { display: none; }
    #scr-dex .dex-ctl select { flex: 1 1 0; height: 34px; padding: 0 8px; font-size: 13px; }
  }
}
@media (min-height: 521px) and (max-width: 1300px) {
  #scr-dex #dex-detail { grid-template-columns: minmax(150px, 30%) minmax(0, 1fr); }
  #scr-dex #dex-detail .dx-head .stage { width: 130px !important; height: 112px !important; }
  #scr-dex .dxx-nav { top: 56px; }
}
@media (min-height: 521px) and (max-width: 1100px) {
  #scr-dex .box.dxx { grid-template-columns: minmax(0, 1fr) minmax(0, 62%); }
  #scr-dex #dex-detail { grid-template-columns: minmax(140px, 28%) minmax(0, 1fr); }
  #scr-dex .dxx-moves { grid-template-columns: minmax(0, 1fr); }
  .dxx-mrow { grid-template-columns: 1fr; gap: 3px; }
}
@media (min-height: 521px) and (max-height: 820px) {
  #scr-dex #dex-detail .dx-head .stage { width: 110px !important; height: 92px !important; }
  #scr-dex .dxx-nav { top: 46px; }
  #scr-dex #dex-detail .dx-id h3 { font-size: 17px; }
  #scr-dex .dxx-side .dx-pick { padding: 6px; font-size: 13.5px; }
  #scr-dex .dxx-acts { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  #scr-dex .dxx-acts .btn { padding: 4px 6px; font-size: 12px; min-height: 30px; flex: 1 1 100px; }
  #scr-dex .dxx-mv { padding: 5px; }
  #scr-dex .dxx-mv small { font-size: 11px; line-height: 1.3; }
  .dxx-chip { padding: 3px 9px 3px 7px; } .dxx-chip b { font-size: 14px; }
}
@media (min-height: 521px) and (max-height: 620px) {
  #scr-dex .dxx-sum { display: none; }
  /* short windows: the regions, types and filters as drop-downs over the list, the detail gets the height */
  #scr-dex .box.dxx > .gen-tabs, #scr-dex #dex-types, #scr-dex #dex-filters { display: none !important; }
  #scr-dex .dex-ctl { display: flex !important; flex: 1 1 100%; gap: 6px; min-width: 0; }
  #scr-dex .dex-ctl select { flex: 1 1 0; height: 32px; padding: 0 8px; font-size: 12.5px; }
  #scr-dex .dex-ctl #dex-gen-sel { display: block !important; flex-grow: 1.3; }
  #scr-dex #dex-detail .dx-head .stage { width: 86px !important; height: 72px !important; }
  #scr-dex .dxx-nav { top: 36px; width: 26px; height: 26px; margin-top: -13px; font-size: 15px; }
  #scr-dex #dex-detail .seg button { padding: 2px 6px; font-size: 11px; }
  .dxx-got { display: none; }
}

/* ---- phones: the list with drop-downs on the left (two rows of controls), the detail on the right ---- */
@media (max-height: 520px) {
  #scr-dex .dxx-sum { display: none; }
  #scr-dex .box.dxx > .split { grid-template-columns: minmax(0, 1fr) minmax(0, 56%); gap: 8px; }
  #scr-dex .dex-top { flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
  #scr-dex .dex-search { flex: 1 1 0; min-width: 0; }
  #scr-dex .dxx-sortl { font-size: 0; gap: 0; }
  #scr-dex .dxx-sortl select { width: 84px; min-width: 0; height: 30px; padding: 0 4px; font-size: 11.5px; }
  #scr-dex .dxx-view { min-width: 32px; height: 30px; padding: 0 6px; font-size: 15px; }
  #scr-dex .dex-ctl { display: flex; flex: 1 1 100%; gap: 4px; min-width: 0; }
  #scr-dex .dex-ctl select { flex: 1 1 0; min-width: 0; width: auto; height: 30px; padding: 0 4px; font-size: 11.5px; }
  #scr-dex .dex-ctl #dex-gen-sel { flex-grow: 1.35; }
  #scr-dex #dex-detail { grid-template-columns: minmax(124px, 32%) minmax(0, 1fr); gap: 0 10px; padding: 6px 8px !important; }
  #scr-dex #dex-detail { overflow-x: hidden !important; overflow-y: auto !important; }     /* (26-10-2026) the card scrolls: its last buttons were cut on an iPhone SE */
  #scr-dex #dex-detail .dx-head { gap: 2px; }
  #scr-dex #dex-detail .dx-head .stage { width: 96px !important; height: 82px !important; }
  #scr-dex .dxx-nav { top: 41px; width: 26px; height: 26px; margin-top: -13px; font-size: 15px; }
  #scr-dex #dex-detail .dx-id h3 { font-size: 15px; }
  #scr-dex #dex-detail .dx-no { font-size: 10.5px; gap: 4px; }
  #scr-dex #dex-detail .dx-head .seg button { padding: 2px 7px; font-size: 11px; min-height: 26px; }
  .dxx-got { display: none; }
  #scr-dex .dxx-side .dx-pick { margin: 4px 0 0 !important; padding: 4px !important; font-size: 12px !important; line-height: 1.15; }
  #scr-dex .dxx-acts { gap: 4px; margin-top: 4px; }
  #scr-dex .dxx-acts .btn { padding: 3px 6px; font-size: 11.5px; min-height: 28px; }
  #scr-dex #dex-detail .dx-tabs { gap: 3px; margin-bottom: 4px; }
  #scr-dex #dex-detail .dx-tabs .chip { font-size: 11px; padding: 2px 4px; min-height: 26px; }
  #scr-dex #dex-detail .dx-tabs .chip .icon, #scr-dex #dex-detail .dx-tabs .chip img, #scr-dex #dex-detail .dx-tabs .chip svg { display: none; }
  .dxx-pct, .dxx-bst small, .dxx-vs { display: none; }
  #scr-dex .dx-page .stat { gap: 6px; }
  .dxx-mrow { grid-template-columns: 1fr; gap: 2px; }
  .dxx-mups { padding: 4px 6px 6px; }
  #scr-dex .dxx-moves { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #scr-dex .dxx-mv { padding: 4px; column-gap: 6px; }
  #scr-dex .dxx-mv small { font-size: 11px; line-height: 1.3; }
}
@media (max-height: 400px) {
  #scr-dex #dex-detail .dx-head .stage { width: 76px !important; height: 64px !important; }
  #scr-dex .dxx-nav { top: 32px; }
  #scr-dex #dex-detail .dx-id h3 { font-size: 14px; }
  #scr-dex #dex-detail .dx-no .dxx-no ~ * { display: none; }
}

/* ============ Gacha (25-10-2026): the banner hall ============
   The banners as illustrated cards (featured Pokémon, your progress, a pulsing dot on the Mega of the week), the
   poster of the chosen one (its colours and accent, the featured Pokémon on a lit stage, a light sweep), the pull
   buttons with their cost, and a glass panel with four tabs (Status, Odds, Pokémon, History). Palette from each
   banner: --c1..--c3 and --acc; gold #ffd24a for the pulls, pink #ff5fd0 for the Mega banners.
   Layout: PC/tablet = title, banner cards (one row, two on narrow windows), poster + pulls on the left, the panel on
   the right; phones = small cards in one row, a compact poster, pulls in a 2×2 grid, the panel on the right. */
#scr-gacha .box.wide.gxx { --acc: #ffd24a; container: gxbox / inline-size; display: grid; grid-template-rows: auto auto minmax(0, 1fr); width: min(1480px, 100%); height: 100%; max-height: 100%; overflow: hidden; padding: 14px 18px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 140px), rgba(3,3,9,.64); border-color: rgba(255,210,74,.28);
  box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.8); }
#scr-gacha .gxx > .gx-head { margin: 0 0 4px; align-items: center; }
#scr-gacha .gxx > .gx-head h2 { margin: 0; }

/* ---- the banner cards ---- */
#scr-gacha .gxx .gx-bans { display: grid; grid-template-columns: repeat(12, minmax(0, 124px)); justify-content: center; gap: 6px; overflow: visible; padding: 2px 0 10px; margin: 0; }
/* a narrow window: two even rows of six */
@container gxbox (max-width: 1150px) { #scr-gacha .gxx .gx-bans { grid-template-columns: repeat(6, minmax(0, 170px)); } }
#scr-gacha .gxx .gx-ban { position: relative; overflow: hidden; isolation: isolate; container: gxban / inline-size; min-width: 0;
  gap: 0; padding: 3px 6px 7px; border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(0,0,0,.35)); border: 1px solid rgba(255,255,255,.12);
  transition: translate .15s cubic-bezier(.2,.9,.3,1.2), border-color .15s, box-shadow .15s; }
#scr-gacha .gxx .gx-ban:hover { translate: 0 -2px; }
#scr-gacha .gxx .gx-ban .gx-bi { display: block; width: 56px; height: 42px; margin: 0 auto; overflow: hidden; }
#scr-gacha .gxx .gx-ban .gx-bi canvas { display: block; width: 56px; height: 48px; margin-top: -4px; image-rendering: pixelated; }
#scr-gacha .gxx .gx-ban b { font-size: 13px; white-space: nowrap; }
#scr-gacha .gxx .gx-ban small { font-size: 10.5px; white-space: nowrap; }
#scr-gacha .gxx .gx-ban.on { border-color: var(--gold); background: linear-gradient(180deg, rgba(255,210,74,.24), rgba(60,40,0,.35)); box-shadow: 0 0 0 1px rgba(255,210,74,.5), 0 0 16px rgba(255,210,74,.3); }
#scr-gacha .gxx .gx-ban.mega-tab { border-color: rgba(255,95,208,.45); background: linear-gradient(180deg, rgba(255,95,208,.2), rgba(50,0,60,.4)); }
#scr-gacha .gxx .gx-ban.mega-tab.on { border-color: #ff5fd0; background: linear-gradient(180deg, rgba(255,95,208,.36), rgba(60,0,70,.45)); box-shadow: 0 0 0 1px rgba(255,95,208,.6), 0 0 18px rgba(255,95,208,.4); }
#scr-gacha .gxx .gx-ban.mega-tab.feat::after { content: ''; position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: #ff5fd0; box-shadow: 0 0 8px #ff5fd0; animation: gx-pulse 1.6s ease-in-out infinite; }
#scr-gacha .gxx .gx-ban.mega-tab.done::before { content: '✓'; position: absolute; top: 3px; left: 7px; font: 800 11px var(--font); color: #7fffb0; text-shadow: 0 0 6px #2fd27a; }
@keyframes gx-pulse { 50% { opacity: .35; transform: scale(.7); } }
#scr-gacha .gxx .gx-bbar { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: linear-gradient(90deg, #ffe58a, var(--gold)); box-shadow: 0 0 6px var(--gold); }
#scr-gacha .gxx .gx-ban.done .gx-bbar { background: linear-gradient(90deg, #7fffb0, #2fd27a); box-shadow: 0 0 8px #2fd27a; }
@container gxban (max-width: 104px) { #scr-gacha .gxx .gx-ban .gt-gen { display: none; } }

/* ---- poster + pulls ---- */
#scr-gacha .gxx .gx-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 36%); gap: 14px; min-height: 0; margin: 0 !important; align-items: stretch; }
#scr-gacha .gxx .gx-left { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; }
#scr-gacha .gx-poster { --acc: #ffd24a; --c1: #3a1d6e; --c2: #1b2f78; --c3: #0f4d6e; position: relative; isolation: isolate; overflow: hidden; flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-radius: 18px; border: 1.5px solid color-mix(in srgb, var(--acc) 60%, transparent);
  background:
    radial-gradient(ellipse 55% 60% at 50% 78%, color-mix(in srgb, var(--acc) 30%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 90% at 50% 100%, color-mix(in srgb, var(--c2) 85%, transparent), transparent 75%),
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--c3) 70%, transparent), transparent 45%),
    radial-gradient(circle at 6% 6%, color-mix(in srgb, var(--c1) 70%, transparent), transparent 45%), #000;
  box-shadow: inset 0 0 0 1px #000, inset 0 0 80px color-mix(in srgb, var(--acc) 14%, transparent), 0 0 34px color-mix(in srgb, var(--acc) 20%, transparent), 0 18px 44px rgba(0,0,0,.85); }
#scr-gacha .gx-poster.mega { --c1: #3a0a4a; --c2: #5a1a7a; --c3: #1a0a3a; }
/* the region's name as a watermark, rising sparks, a glint sweeping across */
#scr-gacha .gx-poster::before { content: attr(data-mark); position: absolute; left: 0; right: 0; top: 18%; z-index: -1; text-align: center; white-space: nowrap; overflow: hidden; pointer-events: none;
  font: 700 clamp(70px, 9vw, 150px)/1 var(--font); letter-spacing: 10px; color: color-mix(in srgb, var(--acc) 12%, transparent);
  -webkit-mask: linear-gradient(180deg, #000 30%, transparent 95%); mask: linear-gradient(180deg, #000 30%, transparent 95%); }
#scr-gacha .gx-poster::after { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--acc) 90%, #fff) 0 1.4px, transparent 2px), radial-gradient(circle, rgba(255,255,255,.85) 0 1px, transparent 1.6px), radial-gradient(circle, color-mix(in srgb, var(--acc) 70%, transparent) 0 1px, transparent 1.8px);
  background-size: 120px 140px, 90px 110px, 160px 170px; background-position: 10px 0, 50px 30px, 80px 60px;
  -webkit-mask: linear-gradient(0deg, #000 40%, transparent 95%); mask: linear-gradient(0deg, #000 40%, transparent 95%); animation: bn-sparks 9s linear infinite; }
#scr-gacha .gx-top { grid-row: 1; position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 12px 0; }
.gx-kind, .gx-odds { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font: 700 11.5px var(--font-body); color: #fff; white-space: nowrap;
  background: rgba(0,0,0,.6); border: 1px solid color-mix(in srgb, var(--acc) 50%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--acc) 18%, transparent); }
.gx-odds { color: color-mix(in srgb, var(--acc) 40%, #fff); }
/* the stage: the main one big in the centre on a spinning ring, the others a step back, a soft aura behind */
#scr-gacha .gx-art { grid-row: 2; position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; gap: 22px; min-height: 0; padding: 0 12px 4px; }
#scr-gacha .gx-art::after { content: ''; position: absolute; top: -10%; bottom: -10%; left: -40%; width: 16%; z-index: 3; pointer-events: none; transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent); animation: bn-sweep 7s ease-in-out 1s infinite; }
#scr-gacha .gx-art .bn-ghost { position: absolute; left: 50%; bottom: -12%; translate: -50% 0; height: 125%; width: auto; z-index: 0; pointer-events: none;
  filter: blur(16px) saturate(1.8) brightness(1.5); mix-blend-mode: screen; opacity: .42; animation: bn-breathe 5s ease-in-out infinite; }
#scr-gacha .gx-art .bn-mon { position: relative; z-index: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-width: 0; }
#scr-gacha .gx-art .bn-mon canvas { width: auto; height: auto; max-height: 100%; max-width: 100%; image-rendering: pixelated; }
#scr-gacha .gx-art .bn-mon:not(.main) { height: 78%; filter: brightness(.82) saturate(.9); }
#scr-gacha .gx-art .bn-mon::before { content: ''; position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: 70%; height: 40%; z-index: -1; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--acc) 45%, transparent), transparent 70%); filter: blur(6px); }
#scr-gacha .gx-art .bn-mon.main { z-index: 2; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--acc) 55%, transparent)); }
#scr-gacha .gx-art .bn-mon.main::after { content: ''; position: absolute; left: 50%; bottom: -60px; margin-left: -85px; width: 170px; height: 170px; z-index: -1; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 20%, color-mix(in srgb, var(--acc) 90%, #fff) 30%, transparent 42%, transparent 60%, color-mix(in srgb, var(--acc) 75%, #fff) 72%, transparent 84%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 64%, #000 72%, transparent 76%); mask: radial-gradient(circle, transparent 60%, #000 64%, #000 72%, transparent 76%);
  transform: scaleY(.26); animation: bn-ring 6s linear infinite; opacity: .9; filter: drop-shadow(0 0 4px var(--acc)); }
#scr-gacha .gx-art .bn-mon.main.shiny { filter: drop-shadow(0 0 14px rgba(154,230,255,.6)); }
#scr-gacha .gx-art .bn-mon.main.shiny::after { background: conic-gradient(from 0deg, transparent 0 20%, #cfefff 30%, transparent 42%, transparent 60%, #9ae6ff 72%, transparent 84%); filter: drop-shadow(0 0 4px #9ae6ff); }
/* the title plate */
#scr-gacha .gx-info { grid-row: 3; position: relative; z-index: 3; text-align: center; padding: 22px 16px 12px; background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,.55) 65%, transparent); }
#scr-gacha .gx-info h3 { margin: 0; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: 1px; color: var(--gold); text-shadow: 0 3px 0 #141414, 0 0 18px rgba(255,210,74,.35); }
#scr-gacha .gx-poster.mega .gx-info h3 { color: #ff8ae6; text-shadow: 0 3px 0 #141414, 0 0 18px rgba(255,95,208,.45); }
#scr-gacha .gx-info #banner-desc { margin: 3px auto 0; max-width: 760px; color: #fff; font-size: 13.5px; line-height: 1.35; text-shadow: 0 2px 6px #000; }
#scr-gacha .gx-own { margin: 4px 0 0; font: 700 12.5px var(--font-body); color: color-mix(in srgb, var(--acc) 55%, #fff); text-shadow: 0 2px 6px #000; }
#scr-gacha .gx-prog { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 5px; font: 700 12px var(--font-body); color: #ffd7f5; }
#scr-gacha .gx-prog:empty { display: none; }
#scr-gacha .gx-prog .gx-bar { width: min(360px, 70%); margin: 0; }
/* bars (progress, pity, target, odds) */
#scr-gacha .gx-bar { display: block; position: relative; height: 8px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; margin: 6px 0 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); }
#scr-gacha .gx-bar > b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--bc, #ffd24a) 55%, #fff), var(--bc, #ffd24a)); box-shadow: 0 0 10px var(--bc, #ffd24a); }
#scr-gacha .gx-bar.big { height: 12px; }
#scr-gacha .gx-bar.full { --bc: #2fd27a; }
/* the pull buttons */
#scr-gacha .gxx .gx-pulls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex: none; }
#scr-gacha .gxx .gx-pulls.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#scr-gacha .gxx .gx-pulls.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }     /* (28-10-2026) both ×100 pulls */
#scr-gacha .gxx #pull-1, #scr-gacha .gxx #pull-10, #scr-gacha .gxx #pull-10b, #scr-gacha .gxx #pull-100, #scr-gacha .gxx #pull-100b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 60px; padding: 6px 8px; border-radius: 16px; white-space: nowrap; line-height: 1.15; min-width: 0; }
#scr-gacha .gxx .gx-pull b { font: 800 16px var(--font); }
#scr-gacha .gxx .gx-pull .gx-cost { display: inline-flex; align-items: center; gap: 4px; font: 800 13px var(--font); }
#scr-gacha .gxx .gx-pull small { font: 700 10.5px var(--font-body); opacity: .9; text-shadow: none; }
#scr-gacha .gxx .gx-pull.hidden { display: none !important; }
/* (01-11-2026, suggestion #0118) the «Skip animation» chip under the pull buttons */
#scr-gacha .gxx .gx-opts { display: flex; justify-content: flex-end; margin-top: 6px; flex: none; }
#scr-gacha .gxx .gx-opts .chip { padding: 3px 10px; font: 700 11.5px var(--font-body); opacity: .85; }
#scr-gacha .gxx .gx-opts .chip.on { opacity: 1; }
#scr-gacha .gxx .gx-opts .gx-sk { font-size: 12px; }

/* ---- the panel ---- */
#scr-gacha .gxx .gx-right { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 10px; border-radius: 16px; background: rgba(0,0,0,.66); border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 16px 40px rgba(0,0,0,.6); }
#scr-gacha .gx-tabs { display: flex; gap: 5px; flex: none; margin: 0 0 8px; }
#scr-gacha .gx-tabs .chip { flex: 1 1 auto; min-width: 0; justify-content: center; text-align: center; padding: 5px 8px; font-size: 12.5px; white-space: nowrap; }
#scr-gacha .gx-tabs .chip.on { border-color: var(--gold); color: var(--gold); background: rgba(255,210,74,.12); box-shadow: 0 0 10px rgba(255,210,74,.2); }
#scr-gacha .gx-page { display: none; min-height: 0; }
#scr-gacha .gx-page.on { display: block; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; padding-right: 6px; scrollbar-width: thin; animation: fade .18s ease-out; }
/* status: pity, target, tickets for coins */
#scr-gacha .gx-gauge { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
#scr-gacha .gx-gh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
#scr-gacha .gx-gh b { display: inline-flex; align-items: center; gap: 5px; font: 800 14px var(--font); color: #fff; }
#scr-gacha .gx-gh span { font: 700 12.5px var(--font-body); color: #ffe08a; }
#scr-gacha .gxx #gacha-pity { margin: 4px 0 0 !important; font-size: 12px; line-height: 1.35; color: var(--muted); }
#scr-gacha .gxx #gacha-want { display: flex; align-items: center; gap: 10px; width: auto; max-width: none; margin: 10px 0 0 !important; padding: 8px 10px !important; min-height: 0; border-radius: 12px;
  background: rgba(154,230,255,.06); border: 1px solid rgba(154,230,255,.28); }
#scr-gacha .gxx #gacha-want.hidden { display: none; }
#scr-gacha .gxx #gacha-want canvas { display: block; flex: none; }
#scr-gacha .gxx #gacha-want .gw-t { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; gap: 1px; }
#scr-gacha .gxx #gacha-want .gw-t b { font-size: 13.5px; }
#scr-gacha .gxx #gacha-want .gw-t small { font-size: 11.5px; white-space: normal; max-width: none; color: var(--muted); }
#scr-gacha .gxx #gacha-want .gx-bar { margin: 4px 0 1px; }
#scr-gacha .gxx #gacha-want .btn { flex: none; }
#scr-gacha .gx-shop { margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); }
#scr-gacha .gxx .gx-shop .tickets-line { margin: 0 0 6px !important; font-size: 12.5px; }
#scr-gacha .gxx .gx-shop #gacha-xch { margin: 0 !important; gap: 6px; }
#scr-gacha .gxx .gx-shop #xch-info { flex: 1 1 160px; margin: 0; font-size: 12px; }
/* odds */
#scr-gacha .gx-page[data-p=odds].on { display: flex; flex-direction: column; overflow: hidden; }
#scr-gacha .gxx #gacha-rates { flex: 1 1 auto; min-height: 0; background: none; border: 0; box-shadow: none; padding: 0 4px 0 0; max-height: none !important; overflow-y: auto !important; overflow-x: hidden !important; scrollbar-width: thin; }
#scr-gacha .gxx #gacha-rates h3 { display: none; }
#scr-gacha .gxx #gacha-rates .gx-or { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center; padding: 6px 2px !important; border-bottom: 1px solid rgba(255,255,255,.07); }
#scr-gacha .gxx #gacha-rates .gx-or > span { display: inline-flex; align-items: center; gap: 4px; }
#scr-gacha .gxx #gacha-rates .gx-or > .gx-bar { grid-column: 1 / -1; height: 4px; margin: 4px 0 0; }
#scr-gacha .gxx #gacha-rates .note { margin-top: 8px; font-size: 11.5px; line-height: 1.4; }
/* Pokémon of the banner */
#scr-gacha .gx-lhint { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
#scr-gacha .gx-lpick { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 8px; border-radius: 12px;
  background: rgba(255,210,74,.07); border: 1px solid rgba(255,210,74,.35); }
#scr-gacha .gx-lpick > span:not(.gx-lact) { display: flex; flex-direction: column; min-width: 0; }
#scr-gacha .gx-lpick b { font: 800 14px var(--font); color: #fff; }
#scr-gacha .gx-lpick small { font-size: 11.5px; color: var(--muted); }
#scr-gacha .gx-lpick .gx-sp { width: 64px; height: 56px; }
#scr-gacha .gx-lact { display: flex; flex-direction: column; gap: 4px; }
#scr-gacha .gx-lact .btn { white-space: nowrap; }
#scr-gacha .gx-lh { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; font: 800 12.5px var(--font); }
#scr-gacha .gx-lh span { margin-left: auto; font: 700 11.5px var(--font-body); color: var(--muted); }
#scr-gacha .gx-lg { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 4px; }
#scr-gacha .gx-lc { position: relative; display: flex; flex-direction: column; align-items: center; padding: 2px 2px 5px; border-radius: 10px; color: #fff; font: inherit; cursor: pointer; appearance: none;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); transition: border-color .12s, background .12s; }
#scr-gacha .gx-lc:hover { background: rgba(255,255,255,.08); }
#scr-gacha .gx-lc:not(.own), #scr-gacha .gx-lc.miss { opacity: .5; filter: grayscale(.6); }
#scr-gacha .gx-lc .gx-sp { display: block; width: 48px; height: 42px; }
#scr-gacha .gx-lc b { font: 700 10px/1.15 var(--font-body); text-align: center; }
#scr-gacha .gx-lc.on { border-color: var(--gold); box-shadow: 0 0 10px rgba(255,210,74,.35); opacity: 1; filter: none; }
#scr-gacha .gx-lc.want { border-color: #9ae6ff; box-shadow: 0 0 8px rgba(154,230,255,.35); }
#scr-gacha .gx-lc.mg { cursor: default; border-color: rgba(255,95,208,.4); }
#scr-gacha .gx-lc em { position: absolute; top: 2px; font-style: normal; font: 800 8.5px var(--font); }
#scr-gacha .gx-lc em.sh { right: 4px; color: #9ae6ff; text-shadow: 0 0 6px #9ae6ff; }
#scr-gacha .gx-lc em.tg { left: 3px; color: #071018; background: #9ae6ff; padding: 0 4px; border-radius: 6px; }
.gx-sp { display: inline-block; }
.gx-sp canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
/* history */
#scr-gacha .gx-hs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0 0 6px; }
#scr-gacha .gx-hs span { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5px 2px; border-radius: 10px; text-align: center; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
#scr-gacha .gx-hs b { font: 800 15px var(--font); color: #fff; }
#scr-gacha .gx-hs small { font: 700 9.5px/1.15 var(--font-body); color: var(--muted); }
#scr-gacha .gx-hs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#scr-gacha .gx-luck { margin-top: 10px; }
#scr-gacha .gx-luck:empty { display: none; }
#scr-gacha .gx-luck .gx-hs b { font-size: 14px; white-space: nowrap; }
#scr-gacha .gxx #gacha-want .gw-t small .nw { white-space: nowrap; }
#scr-gacha .gx-hf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 6px; }
#scr-gacha .gx-hf > i { flex: 1 1 6px; }
#scr-gacha .gx-hf .chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; font-size: 11.5px; min-height: 26px; white-space: nowrap; }
#scr-gacha .gx-hr { --rc: #9fb1c9; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; margin: 0 0 3px; padding: 2px 8px 2px 4px;
  border-radius: 10px; border-left: 3px solid var(--rc); background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 12%, transparent), rgba(255,255,255,.02)); }
#scr-gacha .gx-hr.r2 { --rc: #5fe08a; } #scr-gacha .gx-hr.r3 { --rc: #4fb4ff; } #scr-gacha .gx-hr.r4 { --rc: #c47bff; } #scr-gacha .gx-hr.r5 { --rc: #ffcb3d; } #scr-gacha .gx-hr.shiny { --rc: #9ae6ff; }
#scr-gacha .gx-hr .gx-sp { grid-row: 1 / span 2; width: 40px; height: 34px; }
#scr-gacha .gx-hn { display: flex; align-items: center; gap: 6px; min-width: 0; }
#scr-gacha .gx-hn b { font: 700 12.5px var(--font-body); color: #fff; }
#scr-gacha .gx-hr em { grid-column: 3; grid-row: 1; font-style: normal; font: 800 9px var(--font); padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
#scr-gacha .gx-hr em.nw { color: var(--gold-ink, #1a1200); background: var(--gold); }
#scr-gacha .gx-hr em.tg { color: #071018; background: #9ae6ff; }
#scr-gacha .gx-hr em.mg { color: #fff; background: #c23aa5; }
#scr-gacha .gx-hr em.dm { color: #fff; background: #b3121e; }
#scr-gacha .gx-hr small { grid-column: 2 / span 2; font-size: 11px; color: var(--muted); }

/* ---- narrower windows ---- */
@media (min-height: 521px) and (max-width: 1100px) {
  #scr-gacha .gxx .gx-split { grid-template-columns: minmax(0, 1fr) minmax(280px, 40%); }
  #scr-gacha .gx-info #banner-desc { font-size: 12.5px; }
}
@media (min-height: 521px) and (max-height: 820px) {
  #scr-gacha .box.wide.gxx { padding: 10px 14px 12px; }
  #scr-gacha .gxx .gx-ban .gx-bi { width: 48px; height: 34px; }
  #scr-gacha .gxx .gx-ban .gx-bi canvas { width: 48px; height: 41px; margin-top: -5px; }
  #scr-gacha .gxx .gx-ban b { font-size: 12px; }
  #scr-gacha .gx-info { padding: 14px 14px 10px; }
  #scr-gacha .gxx #pull-1, #scr-gacha .gxx #pull-10, #scr-gacha .gxx #pull-10b, #scr-gacha .gxx #pull-100, #scr-gacha .gxx #pull-100b { min-height: 52px; }
}
@media (min-height: 521px) and (max-height: 640px) {
  #scr-gacha .gx-info #banner-desc { display: none; }
  #scr-gacha .gxx .gx-ban small { display: none; }
  /* short windows: low cards, the sprite beside the name */
  #scr-gacha .gxx .gx-bans { padding-bottom: 6px; gap: 4px; }
  #scr-gacha .gxx .gx-ban { flex-direction: row; justify-content: center; gap: 4px; padding: 2px 6px; }
  #scr-gacha .gxx .gx-ban .gx-bi { width: 34px; height: 28px; margin: 0; flex: none; }
  #scr-gacha .gxx .gx-ban .gx-bi canvas { width: 34px; height: 29px; margin-top: -1px; }
  #scr-gacha .gxx .gx-ban b { font-size: 11px; }
}

/* ---- phones ---- */
@media (max-height: 520px) {
  #scr-gacha .box.wide.gxx { padding: 6px 10px 8px; }
  #scr-gacha .gxx > .gx-head h2 { font-size: 18px; }
  #scr-gacha .gxx .gx-bans { grid-template-columns: repeat(12, minmax(0, 92px)) !important; gap: 4px; padding: 0 0 5px; }
  #scr-gacha .gxx .gx-ban { padding: 1px 2px 4px; border-radius: 9px; }
  #scr-gacha .gxx .gx-ban .gx-bi { width: 36px; height: 26px; }
  #scr-gacha .gxx .gx-ban .gx-bi canvas { width: 36px; height: 31px; margin-top: -4px; }
  #scr-gacha .gxx .gx-ban b { font-size: 9.5px; }
  #scr-gacha .gxx .gx-ban small { display: none; }
  #scr-gacha .gxx .gx-ban.mega-tab.done::before { font-size: 9px; top: 1px; left: 4px; }
  #scr-gacha .gxx .gx-ban.mega-tab.feat::after { top: 3px; right: 4px; width: 6px; height: 6px; }
  #scr-gacha .gxx .gx-split { grid-template-columns: minmax(0, 1fr) minmax(0, 45%); gap: 8px; }
  #scr-gacha .gxx .gx-left { gap: 6px; }
  #scr-gacha .gx-poster { border-radius: 14px; }
  #scr-gacha .gx-top { padding: 5px 6px 0; gap: 4px; }
  .gx-kind, .gx-odds { padding: 1px 7px; font-size: 10px; }
  #scr-gacha .gx-odds { display: none; }
  #scr-gacha .gx-art { gap: 10px; }
  #scr-gacha .gx-art .bn-ghost { display: none; }
  #scr-gacha .gx-art .bn-mon.main::after { width: 90px; height: 90px; margin-left: -45px; bottom: -34px; }
  #scr-gacha .gx-info { padding: 6px 8px 6px; }
  #scr-gacha .gx-info h3 { font-size: 15px; letter-spacing: 0; }
  #scr-gacha .gx-info #banner-desc { display: none; }
  #scr-gacha .gx-own { font-size: 10.5px; margin-top: 1px; }
  #scr-gacha .gx-prog { margin-top: 3px; }
  #scr-gacha .gx-prog .gx-bar { height: 5px; }
  #scr-gacha .gxx .gx-pulls, #scr-gacha .gxx .gx-pulls.four, #scr-gacha .gxx .gx-pulls.five { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  #scr-gacha .gxx #pull-1, #scr-gacha .gxx #pull-10, #scr-gacha .gxx #pull-10b, #scr-gacha .gxx #pull-100, #scr-gacha .gxx #pull-100b { min-height: 36px; padding: 2px 6px; border-radius: 12px; flex-direction: row; gap: 6px; flex-wrap: wrap; }
  #scr-gacha .gxx .gx-pull b { font-size: 12.5px; }
  #scr-gacha .gxx .gx-pull .gx-cost { font-size: 11px; }
  #scr-gacha .gxx .gx-pull .gx-cost img { width: 13px; height: auto; }
  #scr-gacha .gxx .gx-pull small { display: none; }
  #scr-gacha .gxx .gx-right { padding: 6px; border-radius: 12px; }
  #scr-gacha .gx-tabs { gap: 3px; margin-bottom: 5px; }
  #scr-gacha .gx-tabs .chip { padding: 2px 5px; font-size: 11px; min-height: 26px; }
  #scr-gacha .gx-gauge { padding: 6px 8px; }
  #scr-gacha .gx-gh b { font-size: 12px; } #scr-gacha .gx-gh span { font-size: 11px; }
  #scr-gacha .gxx #gacha-pity { font-size: 10.5px; }
  #scr-gacha .gxx #gacha-want { gap: 6px; padding: 5px 7px !important; margin-top: 6px !important; }
  #scr-gacha .gxx #gacha-want canvas, #scr-gacha .gxx #gacha-want .gw-l { display: none; }
  #scr-gacha .gxx .gx-shop .tickets-line { display: none; }
  #scr-gacha .gx-luck { display: none; }
  #scr-gacha .gxx #gacha-want .gw-t { flex-direction: column; }
  #scr-gacha .gxx #gacha-want .gw-t b { font-size: 11.5px; } #scr-gacha .gxx #gacha-want .gw-t small { font-size: 10px; }
  #scr-gacha .gxx #gacha-want .btn { padding: 2px 8px !important; font-size: 11px !important; min-height: 26px !important; }
  #scr-gacha .gx-shop { margin-top: 6px; padding: 5px 7px; }
  #scr-gacha .gxx .gx-shop .tickets-line { font-size: 11px; margin-bottom: 4px !important; }
  #scr-gacha .gxx .gx-shop #xch-info { font-size: 10.5px; flex-basis: 100%; }
  #scr-gacha .gxx .gx-shop #gacha-xch .btn { padding: 2px 10px; font-size: 11px; min-height: 26px; }
  #scr-gacha .gxx #gacha-rates .gx-or { padding: 3px 2px !important; font-size: 11.5px; }
  #scr-gacha .gx-hs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #scr-gacha .gx-hs b { font-size: 13px; }
  #scr-gacha .gx-lg { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 3px; }
  #scr-gacha .gx-lc { padding: 1px 1px 3px; border-radius: 8px; }
  #scr-gacha .gx-lc .gx-sp { width: 34px; height: 30px; }
  #scr-gacha .gx-lc b { font-size: 8.5px; }
  #scr-gacha .gx-lh { margin: 4px 0 3px; font-size: 11px; }
  #scr-gacha .gx-lhint { font-size: 10.5px; margin-bottom: 4px; }
  #scr-gacha .gx-lpick { grid-template-columns: auto minmax(0, 1fr); }
  #scr-gacha .gx-lpick .gx-sp { width: 44px; height: 38px; }
  #scr-gacha .gx-lact { grid-column: 1 / -1; flex-direction: row; }
  #scr-gacha .gx-lact .btn { flex: 1 1 0; padding: 2px 6px; font-size: 11px; min-height: 26px; }
}
@container gxban (max-width: 46px) { #scr-gacha .gxx .gx-ban b { display: none; } }
@media (prefers-reduced-motion: reduce) {
  #scr-gacha .gx-poster::after, #scr-gacha .gx-art::after, #scr-gacha .gx-art .bn-ghost, #scr-gacha .gx-art .bn-mon.main::after, #scr-gacha .gxx .gx-ban.mega-tab.feat::after { animation: none !important; }
}

/* ============ Plaza trade (25-10-2026): the trade table ============
   Two holo panels facing each other (yours gold, theirs blue) with the trainers and partners, a summary and
   the status of each side; the steps Choose → Lock → Confirm on top; cards with their rarity line, shiny /
   demonic glow and a NEW mark; arrows between the sides that run when both offers are locked. */
#hub-ui .hub-box.tx-box { width: min(900px, 100%); display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; text-align: left;
  background: radial-gradient(90% 60% at 20% 0%, rgba(255,210,74,.1), transparent 60%), radial-gradient(90% 60% at 80% 0%, rgba(79,180,255,.1), transparent 60%), #050507; }
#hub-ui .tx-head { display: flex; align-items: center; gap: 10px; padding-right: 44px; min-width: 0; flex-wrap: wrap; }
#hub-ui .tx-head h3 { margin: 0; flex: 1 1 160px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hub-ui .tx-ico { width: 30px; height: 30px; flex: none; border-radius: 9px; background: center / 22px no-repeat var(--tx-ico), #000; border: 1px solid rgba(255,210,74,.45); box-shadow: 0 0 12px rgba(255,210,74,.25); image-rendering: pixelated; }
#hub-ui .tx-steps { display: flex; align-items: center; gap: 4px; flex: none; }
#hub-ui .tx-steps > i { width: 14px; height: 2px; background: rgba(255,255,255,.18); }
#hub-ui .tx-step { display: inline-flex; align-items: center; gap: 5px; font: 700 12px var(--font-body); color: var(--muted); white-space: nowrap; }
#hub-ui .tx-step b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 800 11px var(--font); color: #fff; background: #15151d; border: 1px solid rgba(255,255,255,.2); }
#hub-ui .tx-step.on { color: #fff; }
#hub-ui .tx-step.on b { background: var(--gold); color: #3a2300; border-color: #fff3c4; box-shadow: 0 0 10px rgba(255,210,74,.5); }
#hub-ui .tx-step.done { color: #7dffa0; }
#hub-ui .tx-step.done b { background: #0d2a18; border-color: rgba(125,255,160,.6); }
#hub-ui .tx-cols { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr); gap: 6px; align-items: stretch; }
#hub-ui .tx-side { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 16px; border: 1px solid rgba(79,180,255,.35);
  background: linear-gradient(180deg, rgba(79,180,255,.09), rgba(0,0,0,.2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
#hub-ui .tx-side.mine { border-color: rgba(255,210,74,.45); background: linear-gradient(180deg, rgba(255,210,74,.09), rgba(0,0,0,.2)); }
#hub-ui .tx-who { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0; }
#hub-ui .tx-av { width: 64px; height: 48px; border-radius: 10px; image-rendering: pixelated; background: radial-gradient(circle at 50% 80%, rgba(255,255,255,.12), transparent 65%), #000; border: 1px solid rgba(255,255,255,.1); }
#hub-ui .tx-wn { display: flex; flex-direction: column; min-width: 0; }
#hub-ui .tx-wn b { font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hub-ui .tx-wn small { display: inline-flex; align-items: center; gap: 3px; font: 700 11.5px var(--font-body); color: var(--muted); white-space: nowrap; }
#hub-ui .tx-who .hub-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; white-space: nowrap; }
/* the arrows between the sides */
#hub-ui .tx-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
#hub-ui .tx-mid i { width: 22px; height: 22px; opacity: .35; background: center / contain no-repeat var(--tx-arr); image-rendering: pixelated; transform: rotate(90deg); }
#hub-ui .tx-mid i + i { transform: rotate(-90deg); }
#hub-ui .tx-mid.go i { opacity: 1; animation: tx-run 1s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255,210,74,.8)); }
#hub-ui .tx-mid.go i + i { animation-name: tx-run2; }
@keyframes tx-run { 50% { translate: 4px 0; } }
@keyframes tx-run2 { 50% { translate: -4px 0; } }
/* the cards */
#hub-ui .tx-box .hub-trade-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
#hub-ui .tx-box .hub-trade-slot, #hub-ui .tx-done .hub-trade-slot { --rc: #9fb1c9; position: relative; overflow: hidden; isolation: isolate; min-height: 86px; padding: 4px 3px 6px; gap: 1px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: radial-gradient(90% 70% at 50% 100%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%), #0a0a10; }
#hub-ui .hub-trade-slot::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rc); opacity: .8; }
#hub-ui .hub-trade-slot.empty::after { display: none; }
#hub-ui .hub-trade-slot.r2, #hub-ui .hub-trade-item.r2 { --rc: #5fe08a; }
#hub-ui .hub-trade-slot.r3, #hub-ui .hub-trade-item.r3 { --rc: #4fb4ff; }
#hub-ui .hub-trade-slot.r4, #hub-ui .hub-trade-item.r4 { --rc: #c47bff; }
#hub-ui .hub-trade-slot.r5, #hub-ui .hub-trade-item.r5 { --rc: #ffcb3d; }
#hub-ui .hub-trade-slot.sh, #hub-ui .hub-trade-item.sh { border-color: rgba(154,230,255,.6); background: radial-gradient(90% 70% at 50% 30%, rgba(154,230,255,.18), transparent 70%), #0a0a10; box-shadow: 0 0 12px rgba(154,230,255,.18); }
#hub-ui .hub-trade-slot.uq, #hub-ui .hub-trade-item.uq { border-color: rgba(255,59,59,.65); background: radial-gradient(90% 70% at 50% 30%, rgba(255,40,40,.2), transparent 70%), #0a0a10; box-shadow: 0 0 12px rgba(255,40,40,.2); }
#hub-ui .hub-trade-slot i, #hub-ui .hub-trade-item i { display: block; width: 56px; height: 48px; }
#hub-ui .hub-trade-slot i canvas, #hub-ui .hub-trade-item i canvas { width: 56px; height: 48px; image-rendering: pixelated; }
#hub-ui .hub-trade-slot span { display: inline-flex; align-items: center; gap: 3px; font: 700 11.5px var(--font-body); color: #fff; max-width: 100%; white-space: nowrap; overflow: hidden; }
#hub-ui .tx-st { font-style: normal; line-height: 1; }
#hub-ui .tx-new { position: absolute; top: 3px; left: 3px; padding: 1px 6px; border-radius: 999px; font: 800 8.5px var(--font); color: #3a2300; background: var(--gold); box-shadow: 0 0 8px rgba(255,210,74,.6); }
#hub-ui .hub-trade-slot.sh .tx-new { color: #071018; background: #9ae6ff; box-shadow: 0 0 8px rgba(154,230,255,.6); }
#hub-ui .tx-rm { position: absolute; top: 3px; right: 4px; font: 800 11px var(--font-body); color: #ff8a8a; opacity: 0; transition: opacity .12s; }
#hub-ui button.hub-trade-slot:hover .tx-rm { opacity: 1; }
#hub-ui .hub-trade-slot.empty { border-style: dashed; border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.015); }
#hub-ui .hub-trade-slot.empty.add { border-color: rgba(255,210,74,.45); color: var(--gold); cursor: pointer; }
#hub-ui .hub-trade-slot.empty.add:hover { background: rgba(255,210,74,.08); }
#hub-ui .tx-plus { font: 800 24px var(--font); color: var(--gold) !important; }
#hub-ui .hub-trade-slots.locked .hub-trade-slot:not(.empty) { box-shadow: inset 0 0 0 1px rgba(255,210,74,.35); }
#hub-ui .tx-box .hub-trade-msg { margin: 2px 0 0; font-size: 13.5px; color: #e8ecff; }
#hub-ui .tx-say { justify-content: center; gap: 5px; }
#hub-ui .tx-say .hub-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; font-size: 12px; }
#hub-ui .tx-box .hub-trade-btns .btn { display: inline-flex; align-items: center; gap: 6px; }
/* the picker */
#hub-ui .tx-box .hub-trade-pick { gap: 6px; }
#hub-ui .tx-box .hub-trade-pick-head { flex-wrap: nowrap; }
#hub-ui .tx-box .hub-trade-pick-head b { flex: none; }
#hub-ui .tx-q { flex: 1 1 120px; min-width: 0; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hub-line); background: #0a0a10; color: #fff; font: 600 13px var(--font-body); outline: none; }
#hub-ui .tx-q:focus { border-color: rgba(255,224,138,.7); }
#hub-ui .tx-pf { gap: 5px; }
#hub-ui .tx-pf .hub-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; font-size: 12px; }
#hub-ui .tx-pf .hub-chip small { font-size: 10.5px; opacity: .75; }
#hub-ui .tx-box .hub-trade-item { --rc: #9fb1c9; position: relative; overflow: hidden; min-height: 92px; padding: 4px 3px 7px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1);
  background: radial-gradient(90% 70% at 50% 100%, color-mix(in srgb, var(--rc) 20%, transparent), transparent 70%), #0a0a10; }
#hub-ui .tx-box .hub-trade-item::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rc); opacity: .8; }
#hub-ui .tx-box .hub-trade-item b { font-size: 11.5px; white-space: nowrap; }
#hub-ui .tx-box .hub-trade-item small { display: inline-flex; align-items: center; gap: 3px; }
/* the screen after a trade */
#hub-ui .hub-box.tx-done { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 18px 18px; overflow: hidden;
  background: radial-gradient(80% 60% at 50% 0%, rgba(125,255,160,.14), transparent 65%), #050507; border-color: rgba(125,255,160,.4); }
#hub-ui .tx-done h3 { margin: 0; color: #7dffa0; text-shadow: 0 0 14px rgba(125,255,160,.45); }
#hub-ui .tx-done .sub { margin: 0; }
#hub-ui .tx-got { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
#hub-ui .tx-got .hub-trade-slot { width: 104px; min-height: 96px; animation: tx-in .5s cubic-bezier(.2,.9,.25,1.3) both; }
#hub-ui .tx-got .hub-trade-slot:nth-child(2) { animation-delay: .08s; }
#hub-ui .tx-got .hub-trade-slot:nth-child(3) { animation-delay: .16s; }
#hub-ui .tx-got .hub-trade-slot:nth-child(4) { animation-delay: .24s; }
#hub-ui .tx-got .hub-trade-slot:nth-child(5) { animation-delay: .32s; }
#hub-ui .tx-got .hub-trade-slot:nth-child(6) { animation-delay: .4s; }
@keyframes tx-in { from { opacity: 0; transform: translateY(18px) scale(.8); } }
#hub-ui .tx-gave { font-size: 12px; text-align: center; }
#hub-ui .tx-burst { position: absolute; left: 50%; top: -60px; width: 320px; height: 320px; margin-left: -160px; z-index: -1; pointer-events: none; opacity: .5;
  background: repeating-conic-gradient(from 0deg, rgba(125,255,160,.22) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%); mask: radial-gradient(circle, #000 20%, transparent 70%); animation: tx-spin 12s linear infinite; }
@keyframes tx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #hub-ui .tx-mid.go i, #hub-ui .tx-burst, #hub-ui .tx-got .hub-trade-slot { animation: none !important; } }
/* trade on narrower screens and phones */
@media (max-width: 760px), (max-height: 520px) {
  #hub-ui .tx-steps .tx-step { font-size: 0; gap: 0; }
  #hub-ui .tx-steps > i { width: 8px; }
}
@media (max-height: 520px) {
  #hub-ui .hub-box.tx-box { gap: 4px; }
  #hub-ui .tx-head { padding-right: 40px; gap: 8px; }
  #hub-ui .tx-ico { width: 24px; height: 24px; background-size: 18px; }
  #hub-ui .tx-cols { grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); gap: 4px; }
  #hub-ui .tx-side { padding: 5px; gap: 4px; border-radius: 12px; }
  #hub-ui .tx-who { gap: 5px; }
  #hub-ui .tx-av { width: 40px; height: 30px; border-radius: 7px; }
  #hub-ui .tx-wn b { font-size: 12px; }
  #hub-ui .tx-wn small { font-size: 10px; }
  #hub-ui .tx-who .hub-tag { font-size: 10px; padding: 1px 6px; }
  #hub-ui .tx-mid i { width: 14px; height: 14px; }
  #hub-ui .tx-box .hub-trade-slots { gap: 4px; }
  #hub-ui .tx-box .hub-trade-slot { min-height: 0; padding: 2px 2px 4px; border-radius: 9px; }
  #hub-ui .hub-trade-slot i, #hub-ui .hub-trade-slot i canvas { width: 40px; height: 34px; }
  #hub-ui .hub-trade-slot span { font-size: 9.5px; }
  #hub-ui .tx-st img { width: 7px; height: auto; }
  #hub-ui .tx-new { font-size: 7px; padding: 0 4px; top: 2px; left: 2px; }
  #hub-ui .tx-box .hub-trade-msg { font-size: 11.5px; margin: 0; }
  #hub-ui .tx-say { gap: 3px; flex-wrap: nowrap; overflow: hidden; }
  #hub-ui .tx-say .hub-chip { padding: 2px 7px; font-size: 10.5px; }
  #hub-ui .tx-say .hub-chip:nth-child(n+3) { display: none; }
  #hub-ui .tx-box .hub-trade-btns { gap: 5px; }
  #hub-ui .tx-box .hub-trade-btns .btn { padding: 4px 9px; font-size: 12px; }
  #hub-ui .tx-box .hub-trade-item { min-height: 0; padding: 2px 2px 5px; }
  #hub-ui .tx-box .hub-trade-item i, #hub-ui .tx-box .hub-trade-item i canvas { width: 40px; height: 34px; }
  #hub-ui .tx-box .hub-trade-item b { font-size: 10px; }
  #hub-ui .tx-box .hub-trade-item small { font-size: 9.5px; }
  #hub-ui .tx-q { height: 30px; font-size: 12px; }
  #hub-ui .tx-pf .hub-chip { padding: 2px 8px; font-size: 11px; }
  #hub-ui .hub-box.tx-done { justify-content: center; }
  #hub-ui .tx-got .hub-trade-slot { width: 84px; min-height: 0; }
}

/* ============ Plaza menus (25-10-2026): pixel icons, people with faces and "walk to", the card ============ */
#hub-ui .hp-i { display: inline-flex; align-items: center; justify-content: center; line-height: 0; flex: none; }
#hub-ui .hp-i img { image-rendering: pixelated; }
#hub-ui .hub-pill .hp-i img { width: 18px; height: 18px; }
#hub-ui .hub-box h3 .hp-i { vertical-align: -2px; margin-right: 2px; }
#hub-ui .hub-box h3 .hp-i img { width: 20px; height: 20px; }
/* panels: a thin gold line on top and a softer glass */
#hub-ui .hub-box { border-color: rgba(255,210,74,.22); box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(255,224,138,.22), 0 24px 60px rgba(0,0,0,.9); }
/* people */
#hub-ui .hub-people-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#hub-ui .hub-people-bar .hub-tabs { flex: 1 1 380px; min-width: 0; }
#hub-ui .hub-people-bar .hub-tabs small { font-weight: 700; opacity: .75; }
#hub-ui .hub-q { flex: 1 1 160px; min-width: 0; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hub-line); background: #0a0a10; color: #fff; font: 600 13px var(--font-body); outline: none; }
#hub-ui .hub-q:focus { border-color: rgba(255,224,138,.7); }
#hub-ui .hub-people-list { grid-auto-rows: 52px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
#hub-ui .hub-person { grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 8px; padding: 4px 6px 4px 6px; }
#hub-ui .hub-person:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
#hub-ui .hp-av { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, rgba(255,255,255,.1), transparent 70%), #000; border: 1px solid rgba(255,255,255,.08); }
#hub-ui .hp-av canvas { width: 100%; height: 100%; image-rendering: pixelated; }
#hub-ui .hub-person .hp-name small { display: inline-flex; align-items: center; gap: 3px; }
#hub-ui .hub-person .hp-name small i { font-style: normal; }
#hub-ui .hub-person .hp-far { color: var(--muted); }
#hub-ui .hub-person .hp-far.near { color: #5fe08a; }
#hub-ui .hp-go { appearance: none; cursor: pointer; width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--hub-line); background: #000; display: grid; place-items: center; padding: 0; }
#hub-ui .hp-go:hover { border-color: rgba(255,210,74,.6); background: #16140a; }
/* the card: the trade as the main button, the rest as tiles whose labels always fit */
#hub-ui .hub-card-trade { margin: 0 0 7px; }
#hub-ui .hub-card-trade:empty { display: none; }
#hub-ui .hub-card-trade .btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; font-size: 15px; }
#hub-ui .hub-card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
#hub-ui .hub-card-grid .btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: normal; line-height: 1.15; min-height: 38px; overflow: visible; text-overflow: clip; }
/* the actions panel */
#hub-ui .hub-emotes { border-color: rgba(255,210,74,.25); }
/* trade on phones: empty slots keep the height of a full one */
@media (max-height: 520px) {
  #hub-ui .tx-box .hub-trade-slots { grid-auto-rows: 1fr; }
  #hub-ui .tx-box .hub-trade-slot.empty { min-height: 56px; }
  #hub-ui .hub-pill .hp-i img { width: 16px; height: 16px; }
  #hub-ui .hub-people-bar { gap: 6px; flex-wrap: nowrap; }
  #hub-ui .hub-people-bar .hub-tabs { flex: 1 1 auto; }
  #hub-ui .hub-q { flex: 0 1 140px; height: 32px; font-size: 12px; }
  #hub-ui .hub-people-list { grid-auto-rows: 44px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  #hub-ui .hub-person .hp-far:not(.near) { display: none; }
  #hub-ui .hp-av { width: 34px; height: 34px; }
  #hub-ui .hub-person { grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 6px; }
  #hub-ui .hp-go { width: 28px; height: 28px; }
  #hub-ui .hub-card-trade .btn { padding: 6px 10px; font-size: 13.5px; }
  #hub-ui .hub-card-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  #hub-ui .hub-card-grid .btn { min-height: 32px; }
}

/* ============ Plaza wardrobe (25-10-2026): the dressing room ============
 * Left: the stage (trainer and partner on a lit platform, turn arrows, the pose's name, "Unsaved changes"),
 * the seven poses, undo · redo · before · reset and the six saved outfits. Right: the tabs with a live
 * picture of each part, the rows (heading, current choice, a die) and Random · Cancel · Save. */
#hub-ui .hub-box.wd { width: min(1120px, 100%); height: min(660px, 100%); display: grid; grid-template-columns: minmax(0, clamp(240px, 38%, 400px)) minmax(0, 1fr);
  gap: 18px; text-align: left; padding: 16px; }
#hub-ui .wd-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; container: wdside / inline-size; }
#hub-ui .wd-stage { position: relative; flex: 1 1 auto; min-height: 120px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,210,74,.2);
  background: radial-gradient(60% 55% at 50% 30%, rgba(255,224,138,.17), transparent 70%), radial-gradient(90% 40% at 50% 100%, rgba(255,210,74,.08), transparent 70%),
              linear-gradient(180deg, #110e07, #050507 70%); }
#hub-ui .wd-stage::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 24px), repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 14px);
  -webkit-mask: linear-gradient(180deg, transparent, #000 70%); mask: linear-gradient(180deg, transparent, #000 70%); }
#hub-ui #hub-ward-cv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; cursor: grab; touch-action: none; }
#hub-ui .wd-dirty { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(255,210,74,.14); border: 1px solid rgba(255,210,74,.5);
  color: var(--gold); font: 800 11px var(--font-body); letter-spacing: .3px; white-space: nowrap; pointer-events: none; }
#hub-ui .wd-cap { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 3px 12px; border-radius: 999px; background: rgba(0,0,0,.62);
  border: 1px solid rgba(255,255,255,.12); color: #fff; font: 700 12px var(--font-body); white-space: nowrap; pointer-events: none; }
#hub-ui .wd-stage.cmp .wd-cap { background: rgba(79,180,255,.2); border-color: rgba(79,180,255,.65); color: #d4ecff; }
#hub-ui .wd-turn { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 52px; padding: 0; border-radius: 12px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.45); display: grid; place-items: center; }
#hub-ui .wd-turn.l { left: 8px; }
#hub-ui .wd-turn.r { right: 8px; }
#hub-ui .wd-turn:hover { border-color: rgba(255,210,74,.6); background: rgba(0,0,0,.72); }
#hub-ui .wd-turn img { width: 24px; height: 24px; }
/* poses: your trainer in each one */
#hub-ui .wd-poses { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; flex: none; }
#hub-ui .wd-poses button { appearance: none; cursor: pointer; height: 50px; min-width: 0; padding: 3px 0 0; border-radius: 10px; border: 1px solid var(--hub-line);
  background: #0a0a10; display: grid; place-items: end center; overflow: hidden; }
#hub-ui .wd-poses canvas { height: 44px; width: auto; aspect-ratio: 22 / 30; image-rendering: pixelated; }
#hub-ui .wd-poses button:hover { border-color: rgba(255,210,74,.5); }
#hub-ui .wd-poses button.on { border-color: var(--gold); background: linear-gradient(180deg, #2a2108, #120e04); box-shadow: inset 0 1px 0 rgba(255,224,138,.3); }
/* undo · redo · before · reset */
#hub-ui .wd-tools { display: flex; gap: 6px; flex: none; }
#hub-ui .wd-tool { flex: 1 1 auto; appearance: none; cursor: pointer; height: 36px; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 8px; border-radius: 10px; border: 1px solid var(--hub-line); background: #0a0a10; color: #fff; font: 700 12.5px var(--font-body); white-space: nowrap; }
#hub-ui .wd-tool img { width: 16px; height: 16px; }
#hub-ui .wd-tool:hover:not(:disabled) { border-color: rgba(255,210,74,.55); }
#hub-ui .wd-tool:disabled { opacity: .38; cursor: default; }
#hub-ui .wd-tool.on { border-color: #4fb4ff; background: #0b1a2a; }
@container wdside (max-width: 380px) { #hub-ui .wd-tool span { display: none; } }
/* saved outfits */
#hub-ui .wd-sec { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex: none; font: 800 11.5px var(--font-body); color: var(--muted);
  text-transform: uppercase; letter-spacing: .8px; }
#hub-ui .wd-sec small { font-weight: 700; letter-spacing: 0; }
#hub-ui .wd-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; flex: none; }
#hub-ui .wd-slot { position: relative; cursor: pointer; aspect-ratio: 4 / 5; min-width: 0; border-radius: 11px; border: 1px dashed rgba(255,255,255,.22); background: #08080d;
  display: grid; place-items: center; overflow: hidden; }
#hub-ui .wd-slot:not(.empty) { border-style: solid; border-color: rgba(255,210,74,.35); background: radial-gradient(circle at 50% 42%, rgba(255,210,74,.12), transparent 70%), #0b0a07; }
#hub-ui .wd-slot.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,210,74,.3); }
#hub-ui .wd-slot:hover, #hub-ui .wd-slot:focus-visible { border-color: var(--gold); outline: none; }
#hub-ui .wd-slot canvas { width: 76%; height: auto; image-rendering: pixelated; margin-bottom: 18%; }
#hub-ui .wd-sn { position: absolute; top: 3px; left: 6px; font: 800 10px var(--font-body); font-style: normal; color: var(--muted); }
#hub-ui .wd-sa { position: absolute; left: 0; right: 0; bottom: 0; display: flex; }
#hub-ui .wd-sa button { flex: 1; appearance: none; cursor: pointer; height: 20px; padding: 0; border: 0; border-top: 1px solid rgba(255,255,255,.1); background: rgba(0,0,0,.66);
  display: grid; place-items: center; }
#hub-ui .wd-sa button + button { border-left: 1px solid rgba(255,255,255,.1); }
#hub-ui .wd-sa button:hover { background: #1a1608; }
#hub-ui .wd-sa button.arm { background: #4a0d14; box-shadow: inset 0 0 0 1px #ff5f6d; }
#hub-ui .wd-sa img { width: 12px; height: 12px; }
#hub-ui .wd-plus { opacity: .45; display: grid; place-items: center; }
#hub-ui .wd-plus img { width: 16px; height: 16px; }
#hub-ui .wd-slot.empty:hover .wd-plus { opacity: 1; }
/* the editor */
#hub-ui .wd-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; }
#hub-ui .wd-head { display: flex; align-items: center; gap: 10px; min-height: 36px; padding-right: 44px; }
#hub-ui .wd-head h3 { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
#hub-ui .wd-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; flex: none; }
#hub-ui .wd-tabs button { appearance: none; cursor: pointer; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px 5px;
  border-radius: 12px; border: 1px solid var(--hub-line); background: #0a0a10; color: var(--muted); font: 800 12.5px var(--font-body); line-height: 1.1; }
#hub-ui .wd-tabs .wd-ti { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: radial-gradient(circle at 50% 60%, rgba(255,255,255,.08), transparent 70%); }
#hub-ui .wd-tabs .wd-ti canvas { width: 100%; height: 100%; image-rendering: pixelated; }
#hub-ui .wd-tabs button:hover { border-color: rgba(255,210,74,.45); color: #fff; }
#hub-ui .wd-tabs button.on { border-color: var(--gold); background: linear-gradient(180deg, #2a2108, #120e04); color: var(--gold); box-shadow: inset 0 1px 0 rgba(255,224,138,.3); }
#hub-ui .wd-list { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; }
#hub-ui .wd-row { display: flex; flex-direction: column; gap: 7px; }
#hub-ui .wd-rh { display: flex; align-items: center; gap: 8px; min-width: 0; }
#hub-ui .wd-rh b { font: 800 12px var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .8px; white-space: nowrap; }
#hub-ui .wd-rh em { font: 700 13px var(--font-body); font-style: normal; color: var(--gold); white-space: nowrap; }
#hub-ui .wd-rh em.try { color: #9fd8ff; }
#hub-ui .wd-rh::after { content: ''; order: 2; flex: 1; min-width: 12px; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.14), transparent); }
#hub-ui .wd-die { order: 3; appearance: none; cursor: pointer; flex: none; width: 30px; height: 26px; padding: 0; border-radius: 8px; border: 1px solid var(--hub-line); background: #000;
  display: grid; place-items: center; }
#hub-ui .wd-die img { width: 16px; height: 16px; }
#hub-ui .wd-die:hover { border-color: rgba(255,210,74,.6); background: #16140a; }
#hub-ui .wd-opts { display: flex; flex-wrap: wrap; gap: 7px; }
#hub-ui .wd-opts .sw { appearance: none; cursor: pointer; position: relative; width: 32px; height: 32px; padding: 0; border-radius: 10px; background: var(--c); border: 2px solid #000;
  box-shadow: 0 0 0 1px rgba(255,255,255,.22), inset 0 -6px 0 rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.25); transition: transform .1s; }
#hub-ui .wd-opts .sw:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,224,138,.8), inset 0 -6px 0 rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.25); }
#hub-ui .wd-opts .sw.on { box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--gold), inset 0 -6px 0 rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.25); }
#hub-ui .wd-opts .sw.on::after { content: ''; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 2px #000; }
/* a row of colours always fits on one line: the swatches get narrower instead of wrapping */
#hub-ui .wd-opts.sws { flex-wrap: nowrap; }
#hub-ui .wd-opts.sws .sw { flex: 0 1 32px; width: auto; height: auto; min-width: 0; aspect-ratio: 1; }
#hub-ui .wd-opts .tile { appearance: none; cursor: pointer; position: relative; width: 56px; height: 56px; padding: 0; border-radius: 12px; border: 1px solid var(--hub-line);
  background: radial-gradient(circle at 50% 60%, rgba(255,255,255,.07), transparent 70%), #0b0b11; display: grid; place-items: center; transition: border-color .1s, transform .1s; }
#hub-ui .wd-opts .tile canvas { width: 44px; height: 44px; image-rendering: pixelated; }
#hub-ui .wd-opts .tile:hover { border-color: rgba(255,210,74,.6); transform: translateY(-1px); }
#hub-ui .wd-opts .tile.on { border-color: var(--gold); background: radial-gradient(circle at 50% 60%, rgba(255,210,74,.22), transparent 70%), #1a1405; box-shadow: 0 0 0 2px rgba(255,210,74,.3); }
#hub-ui .wd-opts .tile.on::after { content: ''; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px #000; }
#hub-ui .wd-foot { display: flex; align-items: center; gap: 8px; flex: none; }
#hub-ui .wd-foot .btn { display: inline-flex; align-items: center; gap: 6px; }
#hub-ui .wd-foot .btn img { width: 16px; height: 16px; }
#hub-ui #hub-ward-ok:disabled { opacity: .45; filter: saturate(.4); cursor: default; }
/* phones: every part smaller, the tools as icons */
@media (max-height: 520px) {
  #hub-ui .hub-box.wd { grid-template-columns: minmax(0, 36%) minmax(0, 1fr); gap: 12px; }
  #hub-ui .wd-side { gap: 6px; }
  #hub-ui .wd-stage { border-radius: 12px; min-height: 80px; }
  #hub-ui .wd-turn { width: 28px; height: 40px; border-radius: 9px; }
  #hub-ui .wd-turn.l { left: 5px; }
  #hub-ui .wd-turn.r { right: 5px; }
  #hub-ui .wd-turn img { width: 16px; height: 16px; }
  #hub-ui .wd-dirty { top: 6px; left: 6px; padding: 2px 7px; font-size: 9.5px; }
  #hub-ui .wd-cap { bottom: 6px; padding: 2px 9px; font-size: 10.5px; }
  #hub-ui .wd-poses { gap: 3px; }
  #hub-ui .wd-poses button { height: 34px; border-radius: 8px; padding-top: 2px; }
  #hub-ui .wd-poses canvas { height: 30px; }
  #hub-ui .wd-tool { height: 30px; padding: 0 4px; }
  #hub-ui .wd-tool span { display: none; }
  #hub-ui .wd-sec { font-size: 9.5px; }
  #hub-ui .wd-slots { gap: 4px; }
  #hub-ui .wd-slot { aspect-ratio: 1; border-radius: 8px; }
  #hub-ui .wd-slot canvas { width: 60%; margin-bottom: 24%; }
  #hub-ui .wd-sn { top: 1px; left: 3px; font-size: 8.5px; }
  #hub-ui .wd-sa button { height: 15px; }
  #hub-ui .wd-sa img { width: 10px; height: 10px; }
  #hub-ui .wd-plus img { width: 12px; height: 12px; }
  #hub-ui .wd-main { gap: 6px; }
  #hub-ui .wd-head { min-height: 30px; padding-right: 40px; }
  #hub-ui .wd-head h3 .hp-i img { width: 16px; height: 16px; }
  #hub-ui .wd-tabs { gap: 4px; }
  #hub-ui .wd-tabs button { gap: 1px; padding: 3px 2px; border-radius: 9px; font-size: 10.5px; }
  #hub-ui .wd-tabs .wd-ti { width: 22px; height: 22px; }
  #hub-ui .wd-list { gap: 7px; padding: 2px; }
  #hub-ui .wd-row { gap: 3px; }
  #hub-ui .wd-rh b { font-size: 10px; }
  #hub-ui .wd-rh em { font-size: 11px; }
  #hub-ui .wd-die { width: 26px; height: 20px; border-radius: 6px; }
  #hub-ui .wd-die img { width: 12px; height: 12px; }
  #hub-ui .wd-opts { gap: 4px; }
  #hub-ui .wd-opts.sws .sw { flex-basis: 26px; border-radius: 8px; }
  #hub-ui .wd-opts .sw.on { box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--gold), inset 0 -5px 0 rgba(0,0,0,.18), inset 0 2px 0 rgba(255,255,255,.25); }
  #hub-ui .wd-opts .sw.on::after { width: 8px; height: 8px; }
  #hub-ui .wd-opts .tile { width: 42px; height: 42px; border-radius: 10px; }
  #hub-ui .wd-opts .tile canvas { width: 34px; height: 34px; }
  #hub-ui .wd-foot .btn { padding: 6px 12px; }
}
@media (max-height: 380px) {
  #hub-ui .wd-opts.sws .sw { flex-basis: 24px; }
  #hub-ui .wd-opts .tile { width: 38px; height: 38px; }
  #hub-ui .wd-opts .tile canvas { width: 30px; height: 30px; }
  #hub-ui .wd-tabs .wd-ti { width: 18px; height: 18px; }
}
/* narrow windows that are not short (portrait tablets): the stage on top */
@media (max-width: 640px) and (min-height: 521px) {
  #hub-ui .hub-box.wd { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
  #hub-ui .wd-stage { flex: none; height: 200px; }
}

/* ============ Wardrobe shop (25-10-2026): locked looks, prices, coins and the summary before paying ============ */
#hub-ui .wd-tabs { grid-template-columns: repeat(7, minmax(0, 1fr)); }
#hub-ui .wd-head { justify-content: space-between; }
#hub-ui .wd-coins { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; border: 1px solid rgba(255,210,74,.4);
  background: rgba(255,210,74,.08); color: var(--gold); font: 800 13px var(--font-body); white-space: nowrap; }
#hub-ui .wd-coins img { width: 16px; height: 16px; }
/* rarity colours of what is for sale */
#hub-ui .t-c { --tier: #b9c3d6; } #hub-ui .t-u { --tier: #5fe08a; } #hub-ui .t-r { --tier: #4fb4ff; } #hub-ui .t-e { --tier: #c98cff; } #hub-ui .t-l { --tier: #ffc21a; } #hub-ui .t-p { --tier: #ffb347; }
#hub-ui .wd-opts .tile.lock canvas { opacity: .62; }
#hub-ui .wd-opts .tile.lock { border-color: color-mix(in srgb, var(--tier) 45%, transparent); }
#hub-ui .wd-opts .tile.lock::before { content: ''; position: absolute; left: 3px; bottom: 3px; width: 14px; height: 14px; border-radius: 5px;
  background: var(--wd-lock) center / 10px no-repeat, #000; box-shadow: 0 0 0 1px var(--tier); image-rendering: pixelated; }
#hub-ui .wd-opts .tile.lock:hover canvas, #hub-ui .wd-opts .tile.lock.on canvas { opacity: 1; }
#hub-ui .wd-opts .sw.lock::before { content: ''; position: absolute; right: 1px; top: 1px; width: 10px; height: 10px; border-radius: 3px;
  background: var(--wd-lock) center / 8px no-repeat, #000; box-shadow: 0 0 0 1px var(--tier); image-rendering: pixelated; }
#hub-ui .wd-opts .sw.lock.on::before { display: none; }
/* one row at a time (phones, tabs with many options) */
#hub-ui .wd-rows { display: flex; gap: 4px; flex: none; }
#hub-ui .wd-rows button { flex: 1 1 0; min-width: 0; appearance: none; cursor: pointer; padding: 4px 6px; border-radius: 999px; border: 1px solid var(--hub-line);
  background: #0a0a10; color: var(--muted); font: 800 11px var(--font-body); line-height: 1.15; }
#hub-ui .wd-rows button.on { border-color: var(--gold); color: var(--gold); background: #1a1405; }
#hub-ui .wd-list.one .wd-opts.sws { flex-wrap: wrap; }
#hub-ui .wd-list.one .wd-opts.sws .sw { flex: 0 0 26px; height: 26px; }
#hub-ui .wd-pr { display: inline-flex; align-items: center; gap: 3px; color: var(--gold); font: 800 12px var(--font-body); white-space: nowrap; }
#hub-ui .wd-pr:empty { display: none; }
#hub-ui .wd-pr img { width: 12px; height: 12px; }
/* many colours: two lines instead of tiny swatches */
#hub-ui .wd-opts.sws.many { flex-wrap: wrap; }
#hub-ui .wd-opts.sws.many .sw { flex: 0 0 32px; height: 32px; }
/* Save becomes "Buy · price" while the look has something locked */
#hub-ui #hub-ward-ok { display: inline-flex; align-items: center; gap: 6px; }
#hub-ui #hub-ward-ok img { width: 14px; height: 14px; }
#hub-ui .wd-slot.lock::after { content: ''; position: absolute; right: 4px; top: 4px; width: 12px; height: 12px; border-radius: 4px;
  background: var(--wd-lock) center / 8px no-repeat, #000; box-shadow: 0 0 0 1px rgba(255,210,74,.6); image-rendering: pixelated; }
/* the summary before paying */
#hub-ui .wd-buy { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.66); animation: fade .15s ease-out; }
#hub-ui .wd-buy.hidden { display: none; }
#hub-ui .wd-buy-box { width: min(420px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; text-align: left;
  background: radial-gradient(120% 80% at 50% 0%, rgba(255,210,74,.1), transparent 60%), #08080b; border: 1px solid rgba(255,210,74,.35);
  box-shadow: 0 0 0 1px #000, 0 24px 60px rgba(0,0,0,.9); animation: hub-pop .2s cubic-bezier(.2,.9,.25,1.3) both; min-height: 0; }
#hub-ui .wd-buy-box h4 { margin: 0; font: 800 18px var(--font-title, var(--font-body)); color: #fff; }
#hub-ui .wd-buy-list { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
#hub-ui .wd-bi { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 10px 5px 5px; border-radius: 12px;
  background: #0d0d12; border: 1px solid color-mix(in srgb, var(--tier) 40%, transparent); }
#hub-ui .wd-bi > i { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: #000; overflow: hidden; }
#hub-ui .wd-bi > i canvas { width: 36px; height: 36px; image-rendering: pixelated; }
#hub-ui .wd-bi > i.sw { background: var(--c); border: 2px solid #000; box-shadow: 0 0 0 1px rgba(255,255,255,.25); width: 30px; height: 30px; margin: 5px; border-radius: 9px; }
#hub-ui .wd-bi span { display: flex; flex-direction: column; min-width: 0; }
#hub-ui .wd-bi b { font: 800 14px var(--font-body); color: #fff; }
#hub-ui .wd-bi small { font: 800 11px var(--font-body); color: var(--tier); text-transform: uppercase; letter-spacing: .6px; }
#hub-ui .wd-bi em, #hub-ui .wd-buy-sum b { display: inline-flex; align-items: center; gap: 4px; font: 800 14px var(--font-body); font-style: normal; color: var(--gold); white-space: nowrap; }
#hub-ui .wd-bi em img, #hub-ui .wd-buy-sum b img { width: 14px; height: 14px; }
#hub-ui .wd-buy-sum { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 4px; font: 700 13px var(--font-body); color: var(--muted); }
#hub-ui .wd-buy-sum:not(.have) { padding-top: 8px; border-top: 1px solid rgba(255,255,255,.1); color: #fff; }
#hub-ui .wd-buy-sum.have b { color: #fff; }
#hub-ui .wd-buy-need { margin: 0; padding: 6px 10px; border-radius: 10px; background: rgba(255,95,109,.12); border: 1px solid rgba(255,95,109,.45); color: #ffb3ba; font: 700 12.5px var(--font-body); }
#hub-ui .wd-buy-btns { display: flex; justify-content: flex-end; gap: 8px; }
#hub-ui #wd-buy-ok { display: inline-flex; align-items: center; gap: 6px; }
#hub-ui #wd-buy-ok img { width: 14px; height: 14px; }
#hub-ui #wd-buy-ok:disabled { opacity: .45; filter: saturate(.4); cursor: default; }
@media (max-height: 520px) {
  #hub-ui .wd-coins { padding: 2px 8px; font-size: 11.5px; }
  #hub-ui .wd-coins img { width: 12px; height: 12px; }
  #hub-ui .wd-opts .tile.lock::before { width: 12px; height: 12px; left: 2px; bottom: 2px; background-size: 8px; }
  #hub-ui .wd-opts.sws.many .sw { flex-basis: 26px; height: 26px; }
  #hub-ui .wd-pr { font-size: 10.5px; }
  #hub-ui .wd-buy { padding: 8px; }
  #hub-ui .wd-buy-box { padding: 10px 12px; gap: 6px; }
  #hub-ui .wd-buy-box h4 { font-size: 15px; }
  #hub-ui .wd-bi { grid-template-columns: 32px minmax(0, 1fr) auto; padding: 3px 8px 3px 3px; }
  #hub-ui .wd-bi > i { width: 32px; height: 32px; }
  #hub-ui .wd-bi > i canvas { width: 30px; height: 30px; }
  #hub-ui .wd-bi > i.sw { width: 24px; height: 24px; margin: 4px; }
  #hub-ui .wd-bi b { font-size: 12.5px; }
}
@media (max-height: 380px) {
  #hub-ui .wd-opts.sws.many .sw { flex-basis: 23px; height: 23px; }
}
/* (25-10-2026) Short phones (an iPhone in landscape with the browser bars): a tighter altar, a smaller preview and the
   owner's name wraps instead of "...". (26-10-2026) The move text is whole: the window scrolls. */
@media (max-height: 400px) {
  .dmx-move { grid-template-columns: 1fr 27%; padding: 5px 8px; }
  .dmx-move p { align-self: start; }
  .dmx-mon canvas { width: 170px; height: 150px; }
  .dmx-head h3 { font-size: 20px; padding: 2px 4px; }
  .dmx-head { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 8px; }      /* the name and its types on one line when they fit */
  .dmx-fact { padding: 3px 7px; }
  .dmx-fact b { font-size: 12.5px; }
  .dmx-fact small { font-size: 10.5px; line-height: 1.2; }
  .dmx-owner { padding: 2px 8px 2px 4px; gap: 6px; }
  .dmx-owner canvas { width: 34px; height: 38px; }
  .dmx-owner small { letter-spacing: .5px; }
  .dmx-owner b { font-size: 13px; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; line-height: 1.15; }
}
@media (max-height: 400px) and (max-width: 700px) {
  .dmx-hero { grid-template-columns: 27% 1fr; }
  .dmx-mon canvas { width: 150px; height: 132px; }
}
/* ============ Forget a move (25-10-2026, Discord suggestion): "Keep all" on top, two taps to forget, no scrolling ============ */
#scr-forget .fg-box { width: min(980px, 100%); }
#scr-forget .fg-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; }
#scr-forget .fg-head h2 { margin: 0 0 2px; }
#scr-forget .fg-head .sub { margin: 0; }
#scr-forget #forget-skip { flex: none; padding: 10px 18px; font-size: 15px; }
#scr-forget .fg-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; margin: 12px 0 8px; }
#scr-forget .card.forget { position: relative; }
#scr-forget .card.forget .fg-arm { display: none; margin-top: 4px; font: 800 12px var(--font-body); color: #ff9a9a; letter-spacing: .3px; }
#scr-forget .card.forget.arm { border-color: #ff5f6d; background: linear-gradient(90deg, rgba(255,95,109,.22), rgba(255,95,109,.05) 70%);
  box-shadow: 0 0 0 2px rgba(255,95,109,.45), 0 0 22px rgba(255,95,109,.25); }
#scr-forget .card.forget.arm .fg-arm { display: block; }
#scr-forget .card.forget.arm .key { background: #ff5f6d; color: #fff; }
#scr-forget .fg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; flex-wrap: wrap; }
#scr-forget .fg-foot .kbd-hint { color: var(--muted); font-size: 12.5px; }
body.touch #scr-forget .fg-foot .kbd-hint { display: none; }
@media (max-height: 520px) {
  #scr-forget .fg-head { gap: 10px; }
  #scr-forget .fg-head .sub { font-size: 12px; }
  #scr-forget #forget-skip { padding: 7px 12px; font-size: 13px; }
  #scr-forget .fg-cards { gap: 6px; margin: 6px 0 4px; }
}
/* ============ Auto level (25-10-2026, Discord suggestion): Upgrades → the priority list of the level-up cards ============ */
#scr-upgrades .upg-top { gap: 8px; flex-wrap: nowrap; margin: 0; }
#upg-auto, #upg-auto-item { display: inline-flex; align-items: center; gap: 6px; }
#upg-auto.on, #upg-auto-item.on { border-color: rgba(255,210,63,.65); color: #ffe9a8; }
#upg-auto .upg-auto-n, #upg-auto-item .upg-auto-n { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--gold); color: #1a1204; font: 800 11px/18px var(--font); text-align: center; }
.alv-modal .alv-box { width: min(1000px, 100%); max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px; background: #0b0b12 !important; border: 1px solid rgba(255,210,63,.4); box-shadow: 0 12px 40px rgba(0,0,0,.8); }
.alv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.alv-ttl { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.alv-ttl h3 { margin: 0; }
.alv-mon { color: var(--muted); font: 700 14px var(--font-body); }
.alv-btns { display: flex; gap: 8px; flex: none; }
.alv-help { margin: 0; }
/* (02-11-2026, suggestion #0147) the order strip: numbered chips with earlier / later / out */
.alv-order { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 30px; }
/* (03-11-2026, uxzyri on iPhone: "tante cose che si sovrappongono") The box is a flex column at its max height: its parts were SQUEEZED
   (the order strip to its 30 px minimum, its chips spilling over the grid) instead of the box scrolling. No part shrinks. */
.alv-modal .alv-box > * { flex: none; }
.alv-ol { font: 800 11px var(--font); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.alv-oc { display: inline-flex; align-items: center; gap: 5px; padding: 3px 4px 3px 8px; border: 1px solid var(--line2); border-radius: 9px; background: rgba(255,255,255,.04); font-size: 12.5px; }
.alv-oc > b { min-width: 18px; height: 18px; border-radius: 999px; background: var(--gold); color: #2a1d00; font: 800 11px var(--font); display: inline-flex; align-items: center; justify-content: center; }
.alv-oc button { min-width: 26px; height: 26px; padding: 0; border-radius: 7px; border: 1px solid var(--line2); background: rgba(255,255,255,.06); color: var(--ink); font: 800 15px var(--font-body); line-height: 1; cursor: pointer; }
.alv-oc button:hover:not(:disabled) { background: rgba(255,255,255,.14); }
.alv-oc button:disabled { opacity: .3; cursor: default; }
.alv-fixed { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; font-size: 13px;
  background: rgba(255,210,63,.07); border: 1px dashed rgba(255,210,63,.45); }
.alv-fixed b { color: var(--gold); }
.alv-fixed span { color: var(--muted); }
.alv-grid { display: grid; grid-template-columns: 1.3fr .75fr 1.3fr; gap: 14px; align-items: start; }
/* (02-11-2026) Auto item: one list of the held items (ui/menu.js openAutoItem), same tiles */
.ali-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.alv-g h4 { margin: 0 0 6px; font: 800 11px var(--font); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.alv-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.alv-boost .alv-tiles { grid-template-columns: minmax(0, 1fr); }
.alv-t { position: relative; display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 5px 8px 5px 34px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.035); color: #e9e9f2; text-align: left;
  font: 700 13px/1.2 var(--font-body); cursor: pointer; overflow: hidden; }
.alv-t::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tc); }
.alv-t::after { content: ''; position: absolute; inset: 0; background: var(--tc); opacity: 0; pointer-events: none; transition: opacity .15s; }
.alv-t:hover { border-color: rgba(255,255,255,.3); }
.alv-t.on { border-color: var(--tc); }
.alv-t.on::after { opacity: .13; }
.alv-t .alv-n { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px dashed rgba(255,255,255,.2); font: 800 11px/17px var(--font); text-align: center; color: #1a1204; }
.alv-t.on .alv-n { border: 0; background: var(--gold); line-height: 20px; box-shadow: 0 0 8px rgba(255,200,60,.5); }
.alv-t .alv-ic { flex: none; display: grid; place-items: center; width: 24px; height: 24px; }
.alv-t .alv-nm { min-width: 0; }
.alv-t .alv-nm.tight { font-size: .88em; letter-spacing: -.1px; }
.alv-t .alv-nm.tighter { font-size: .8em; letter-spacing: -.2px; }
.alv-t.shiny .alv-nm::after { content: ' \2726'; color: #ff8a9a; }
.alv-how { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; display: grid; gap: 2px; }
@media (max-width: 760px) {
  .alv-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .alv-tiles, .alv-boost .alv-tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}
@media (max-height: 520px) {
  .alv-modal { padding: 8px; }
  .alv-modal .alv-box { padding: 10px 12px; gap: 6px; }
  .alv-ttl h3 { font-size: 17px; }
  .alv-help, .alv-fixed { font-size: 12px; }
  .alv-fixed { padding: 3px 8px; }
  .alv-t { min-height: 32px; padding: 3px 6px 3px 30px; font-size: 12px; }
  .alv-t .alv-n { left: 5px; width: 18px; height: 18px; font-size: 10px; line-height: 15px; }
  .alv-t.on .alv-n { line-height: 18px; }
  .alv-t .alv-ic { width: 20px; height: 20px; }
  .alv-how { font-size: 11px; gap: 0; }
}
/* Short phones in landscape: the three groups become one grid (the tiles say what they are), smaller type. */
@media (max-height: 420px) {
  .alv-modal { padding: 6px; }
  .alv-modal .alv-box { padding: 8px 10px; gap: 5px; }
  .alv-ttl h3 { font-size: 15px; }
  .alv-mon { font-size: 12px; }
  .alv-btns .btn { min-height: 28px; padding: 4px 12px; font-size: 12px; }
  .alv-help { font-size: 11px; line-height: 1.25; }
  .alv-fixed { font-size: 11px; padding: 2px 8px; }
  .alv-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .alv-g, .alv-tiles, .alv-boost .alv-tiles { display: contents; }
  .alv-g h4 { display: none; }
  .alv-t { min-height: 28px; padding: 2px 3px 2px 22px; gap: 3px; font-size: 11px; line-height: 1.15; border-radius: 8px; }
  .alv-t::before { top: 5px; bottom: 5px; }
  .alv-t .alv-n { left: 3px; width: 16px; height: 16px; font-size: 9.5px; line-height: 13px; }
  .alv-t.on .alv-n { line-height: 16px; }
  .alv-t .alv-ic { width: 24px; height: 24px; }
  .alv-how { font-size: 10.5px; line-height: 1.25; padding-left: 14px; }
}
@media (max-height: 420px) and (min-width: 800px) { .alv-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* ============ TMs (25-10-2026, Discord suggestion): Upgrades → TM, a move of a type it doesn't have ============ */
#scr-upgrades .tm-item .tm-unit { white-space: normal; overflow: visible; text-overflow: clip; }
.tag-chip.tm-chip { background: #2a5d9a !important; color: #e6f4ff; display: inline-flex; align-items: center; gap: 3px; }
.alv-t.tm .alv-nm::after { content: ' \00b7  ' attr(data-tm); color: #7fd0ff; font-size: .85em; }
.tm-modal .tm-box { width: min(1040px, 100%); height: min(640px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px; overflow: hidden; background: #0b0b12 !important; border: 1px solid rgba(127,184,255,.45); box-shadow: 0 12px 40px rgba(0,0,0,.8); }
.tm-head { display: flex; align-items: center; gap: 12px; }
.tm-ttl { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.tm-ttl h3 { margin: 0; }
.tm-mon { color: var(--muted); font: 700 14px var(--font-body); }
/* (26-10-2026, #0040) the TM slots in the picker's head: what each one teaches, or the PC rank it opens at */
.tm-slots { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }
.tm-slot { appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--muted); font: 700 12px var(--font-body); }
.tm-slot b { font: 800 11px var(--font); color: var(--gold); }
.tm-slot span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.tm-slot.got span { color: #e6f4ff; }
.tm-slot.on { border-color: var(--gold); background: rgba(255,210,74,.12); box-shadow: inset 0 0 0 1px rgba(255,210,74,.35); }
.tm-slot.locked { opacity: .5; cursor: default; }
.tm-next { font-style: normal; color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) { .tm-head { flex-wrap: wrap; row-gap: 4px; } .tm-slots { order: 3; flex: 1 1 100%; justify-content: flex-start; margin-left: 0; } }
.tm-help { margin: 0; }
.tm-types { display: flex; flex-wrap: wrap; gap: 5px; }
.tm-types .chip { padding: 3px 9px; font-size: 12px; }
.tm-tools { display: flex; align-items: center; gap: 10px; }
.tm-type-sel { display: none; width: auto; min-width: 0; height: 32px; padding: 2px 8px; }
.tm-seg { display: flex; gap: 6px; }
.tm-seg .chip { display: inline-flex; align-items: center; gap: 4px; }
.tm-seg .chip.tm-sh.on { background: #ff8a9a; color: #2a0a10; border-color: #fff; }
.tm-q { margin-left: auto; width: min(260px, 40%); height: 32px; padding: 2px 10px; }
.tm-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 14px; }
.tm-listw { display: flex; flex-direction: column; min-height: 0; gap: 6px; }
.tm-list { flex: 1 1 auto; min-height: 0; display: grid; gap: 6px; align-content: start; overflow: hidden; }
.tm-mv { position: relative; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 10px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.035); color: #e9e9f2; text-align: left; font: 700 13px/1.2 var(--font-body); cursor: pointer; }
.tm-mv::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tc); }
.tm-mv img { flex: none; }
.tm-mv .tm-nm { min-width: 0; white-space: nowrap; overflow: hidden; }
.tm-mv .tm-nm.tight { font-size: .88em; letter-spacing: -.1px; }
.tm-sm { font-style: normal; color: #ff8a9a; }
.tm-mv .tm-nm.tighter { font-size: .8em; letter-spacing: -.2px; }
.tm-mv:hover { border-color: rgba(255,255,255,.3); }
.tm-mv.on { border-color: #7fb8ff; background: rgba(127,184,255,.14); box-shadow: 0 0 0 1px rgba(127,184,255,.5); }
.tm-mv.cur .tm-nm::after { content: ' \00b7  ' attr(data-tm); color: #7fd0ff; font-size: .85em; }
.tm-none { margin: 8px 0; }
.tm-pg { display: flex; align-items: center; justify-content: center; gap: 10px; font: 800 12px var(--font); color: var(--muted); }
.tm-pg .btn { min-width: 38px; padding: 4px 10px; }
.tm-detail { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); }
.tm-prev { flex: none; align-self: center; border-radius: 10px; background: #05060b; image-rendering: pixelated; }
.tm-dn { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tm-dn b { font-size: 16px; color: #fff; }
.tm-desc { margin: 0; font-size: 13px; color: #c9c9d6; line-height: 1.35; }
.tm-note { margin: 0; font-size: 12px; color: #ff9fb0; }
/* (28-10-2026) changing a TM: the warning and its confirmation */
.tm-note.tm-warn { color: #ffc46b; font-weight: 600; }
.mv1-item .upg-unit .mv1-auto { font-style: normal; font-size: .85em; color: var(--muted); margin-left: 4px; }
.tm-note.tm-x { color: #ffd23f; font-weight: 600; }
.tm-xp { font-style: normal; font-size: .82em; color: #ffd23f; margin-left: 2px; white-space: nowrap; } .tm-xp .coin { width: 11px; height: 11px; vertical-align: -1px; margin-right: 1px; }
.tm-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.tm-confirm b { flex: 1 1 100%; font-size: 13px; color: #fff; }
.tm-detail .btn { margin-top: auto; }
.tm-detail .btn.tm-arm { background: #ff5f6d; color: #fff; border-color: #fff; }
/* Not tall enough for two rows of type chips: the drop-down. */
@media (max-height: 699px) {
  .tm-types { display: none; }
  .tm-type-sel { display: block; }
}
@media (max-height: 520px) {
  .tm-head, .alv-head { padding-right: var(--tb-w, 0px); }     /* (26-10-2026) the coins covered Close, Clear and Done */
  .tm-modal { padding: 6px; }
  .tm-modal .tm-box { padding: 8px 10px; gap: 5px; }
  .tm-ttl h3 { font-size: 15px; }
  .tm-mon { font-size: 12px; }
  .tm-slot { padding: 2px 8px; font-size: 11px; } .tm-slot b { font-size: 10px; }
  .tm-head .btn { min-height: 28px; padding: 3px 10px; font-size: 12px; }
  .tm-help { font-size: 11px; line-height: 1.25; }
  .tm-types { display: none; }
  .tm-type-sel { display: block; height: 28px; font-size: 12px; }
  .tm-seg .chip { padding: 2px 8px; font-size: 11px; }
  .tm-q { height: 28px; font-size: 12px; }
  .tm-main { gap: 8px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  .tm-list, .tm-listw { gap: 4px; }
  .tm-mv { min-height: 28px; padding: 2px 8px; font-size: 11.5px; gap: 6px; }
  .tm-pg .btn { min-height: 26px; padding: 2px 8px; }
  .tm-detail { padding: 6px; gap: 4px; }
  .tm-dn b { font-size: 13px; }
  .tm-desc { font-size: 11px; line-height: 1.25; }
  .tm-note { font-size: 10.5px; }
  .tm-detail .btn { min-height: 30px; padding: 3px 8px; font-size: 12px; }
}
/* ============ Damage report (25-10-2026): the game-over row and the report (ui/dmg-report.js) ============ */
#over-stats .st-dmg { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; row-gap: 2px; }
#over-stats .st-dmg > span { grid-column: 1; }
#over-stats .st-dmg > b { grid-column: 1; font-size: 20px; }
#over-stats .st-dmg > b small { color: var(--muted); font-size: 12px; font-weight: 800; }
#over-stats .st-dmg .st-sub { grid-column: 1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 5px; }
#over-stats .st-dmg .st-sub em { font-style: normal; }
#over-stats .st-dmg .st-sub .st-v { font-style: normal; color: #ffe07a; font-weight: 800; }
#over-stats .st-dmg .st-dot { opacity: .6; }
#over-stats .st-dmg .st-dmg-btn { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#over-stats .st-dmg .st-dmg-rec { grid-column: 1 / -1; color: #ffd23f; font: 800 12px var(--font-body); letter-spacing: .04em; text-shadow: 0 0 12px rgba(255,210,63,.45); }
#over-stats .st-dmg.rec { border-color: rgba(255,210,63,.7) !important; box-shadow: 0 0 22px rgba(255,210,63,.18) inset; }
.dmg-modal { z-index: 40; }
.dmg-modal .dmg-box { width: min(1080px, 100%); height: min(660px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; overflow: hidden;
  background: radial-gradient(120% 80% at 0% 0%, rgba(255,210,63,.07), transparent 55%), #0b0b12 !important; border: 1px solid rgba(255,210,63,.42); box-shadow: 0 14px 44px rgba(0,0,0,.85); }
.dmg-head { display: flex; align-items: center; gap: 12px; }
.dmg-ttl { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.dmg-ttl h3 { margin: 0; white-space: nowrap; }
.dmg-meta { color: var(--muted); font: 700 14px var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dmg-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.dmg-tabs:empty { display: none; }
.dmg-tab { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04);
  color: #e8eeff; font: 800 13px var(--font-body); cursor: pointer; }
.dmg-tab i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.dmg-tab small { color: var(--muted); font-weight: 800; }
.dmg-tab.on { border-color: #ffd23f; background: rgba(255,210,63,.13); }
.dmg-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.45fr); gap: 14px; }
.dmg-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; }
.dmg-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dmg-card { position: relative; padding: 10px 12px; border-radius: 12px; overflow: hidden; min-width: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.1); }
.dmg-card > span { display: block; font: 800 10.5px var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.dmg-card > b { display: block; font-family: var(--font-title, inherit); font-size: 26px; line-height: 1.15; color: #fff; font-variant-numeric: tabular-nums; }
.dmg-card > small { display: block; color: var(--muted); font: 700 11.5px var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmg-card.rec { border-color: rgba(255,210,63,.85); box-shadow: 0 0 20px rgba(255,210,63,.22) inset, 0 0 14px rgba(255,210,63,.18); }
.dmg-card.rec > b { color: #ffe07a; text-shadow: 0 0 14px rgba(255,210,63,.45); }
.dmg-new { display: inline-block; white-space: nowrap; padding: 1px 7px; border-radius: 999px; background: linear-gradient(90deg, #ffe38a, #ffc21f); color: #2a1a00;
  font: 900 9.5px var(--font-body); letter-spacing: .06em; font-style: normal; vertical-align: 1px; box-shadow: 0 0 10px rgba(255,200,40,.45); }
.dmg-card > small.dmg-recl { display: flex; align-items: center; gap: 6px; overflow: visible; white-space: normal; flex-wrap: wrap; }
.dmg-card > small.dmg-recl s { opacity: .7; }
.dmg-chart { position: relative; flex: 1; min-height: 120px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); overflow: hidden; }
.dmg-chart canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.dmg-chart small { position: absolute; left: 10px; top: 6px; font: 800 10.5px var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.dmg-chart small.dmg-none { inset: 0; display: grid; place-items: center; text-transform: none; letter-spacing: 0; font-size: 13px; }
.dmg-tablew { display: flex; flex-direction: column; min-height: 0; min-width: 0; container-type: inline-size; }
.dmg-thead, .dmg-row { display: grid; grid-template-columns: minmax(96px, 1fr) 70px 46px 64px 48px 64px; align-items: center; column-gap: 6px; }
.dmg-thead { padding: 0 10px 6px; font: 800 10.5px var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.dmg-thead span:not(:first-child), .dmg-row > span:not(:first-child) { text-align: right; }
.dmg-rows { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 4px; }
.dmg-row { position: relative; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.05);
  font: 800 13px var(--font-body); color: #eef3ff; font-variant-numeric: tabular-nums; isolation: isolate; }
.dmg-row::before { content: ''; position: absolute; inset: 0; right: auto; width: var(--w); z-index: -1; border-radius: inherit;
  background: linear-gradient(90deg, var(--cb), transparent 140%); border-right: 2px solid var(--c); }
.dmg-row:first-child { border-color: rgba(255,210,63,.3); }
.dmg-nm { display: flex; align-items: center; gap: 7px; min-width: 0; }
.dmg-nm b { min-width: 0; line-height: 1.15; overflow-wrap: break-word; }
.dmg-row > span:nth-child(3) { color: var(--muted); }
.dmg-pg { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 6px; font: 800 12px var(--font-body); color: var(--muted); }
.dmg-pg.hidden, .dmg-chart.hidden { display: none; }
.dmg-none { margin: auto; color: var(--muted); }
@media (max-width: 860px) {
  .dmg-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .dmg-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dmg-chart { display: none; }
}
@media (max-width: 620px) { .dmg-cards { grid-template-columns: 1fr 1fr; } }
/* a narrow table drops its hits and biggest-hit columns (it's the table's own width that counts) */
@container (max-width: 500px) {
  .dmg-thead, .dmg-row { grid-template-columns: minmax(90px, 1fr) 62px 40px 56px; }
  .dmg-c5, .dmg-c6 { display: none; }
}
@media (max-height: 520px) and (max-width: 720px) {
  .dmg-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .dmg-card > span { font-size: 9.5px; letter-spacing: .04em; }
  .dmg-card > b { font-size: 17px; }
  .dmg-new { font-size: 8.5px; padding: 1px 6px; }
}
@media (max-height: 520px) {
  .dmg-modal { padding: 6px; }
  .dmg-modal .dmg-box { padding: 8px 12px; gap: 6px; }
  .dmg-body { grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); grid-template-rows: minmax(0, 1fr); }
  .dmg-cards { grid-template-columns: 1fr 1fr; gap: 6px; }
  .dmg-card { padding: 6px 9px; }
  .dmg-card > b { font-size: 19px; }
  .dmg-chart { display: none; }
  .dmg-row { padding: 5px 9px; font-size: 12px; }
  .dmg-ttl h3 { font-size: 18px; }
  .dmg-tab { padding: 3px 10px; font-size: 12px; }
}
/* (25-10-2026) The Mega Stone and demonic form reveals (ui/pull-epic.js): a full-screen scene over the cards. */
#pull-fx > .pull-epic { position: fixed; inset: 0; z-index: 7; cursor: pointer; touch-action: none; }
#pull-fx > .pull-epic > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ============ PokéLit Live: the global chat (26-10-2026, ui/world-chat-ui.js) ============ */
.chat-btn { position: relative; display: inline-flex; align-items: center; gap: 5px; padding-left: 10px; padding-right: 10px; }
.chat-btn .chat-n { font-weight: 800; font-size: 13px; color: #8ff0b0; font-variant-numeric: tabular-nums; }
.chat-btn .chat-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff5f6d; color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #000, 0 0 10px rgba(255,95,109,.6); }
/* (26-10-2026, redesign) The chat: the channels in a rail on the left (who is online at its foot), the channel on the
   right: its banner (the name big, what it is for, the partners of the last trainers who wrote standing on a gold line),
   the stream and the composer. A phone (below): the whole screen, the channels in a strip on top. */
/* (27-10-2026, Salva) In the middle of the screen, not on the right. */
.wchat { position: fixed; z-index: 40; top: calc(64px + env(safe-area-inset-top)); left: 0; right: 0; margin-inline: auto; bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(calc(100vw / var(--uiz, 1) - 24px), clamp(660px, calc(56vw / var(--uiz, 1)), 940px));
  display: grid; grid-template-columns: 206px minmax(0, 1fr); overflow: hidden;
  background: #08080d; border: 1px solid rgba(255,210,74,.3); border-radius: 18px;
  box-shadow: 0 26px 70px rgba(0,0,0,.82), inset 0 1px 0 rgba(255,255,255,.05); }
.wchat-rail { display: flex; flex-direction: column; gap: 16px; min-height: 0; padding: 18px 12px 14px; background: linear-gradient(180deg, #11111a, #0a0a10); border-right: 1px solid rgba(255,255,255,.06); }
.wchat-brand { display: flex; flex-direction: column; gap: 5px; padding: 0 8px; min-width: 0; }
.wchat-title { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font); font-size: 23px; line-height: 1; color: #fff; }
.wchat-title svg { color: var(--gold); flex: none; }
.wchat-on { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wchat-on.on { color: #8ff0b0; }
.wchat-on.on::before { content: ''; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(95,224,138,.2); animation: wch-live 2.4s ease-in-out infinite; }
@keyframes wch-live { 50% { box-shadow: 0 0 0 6px rgba(95,224,138,0); } }
.wchat-tabs { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wchat-tab { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 12px; background: none;
  color: var(--muted); font-family: var(--font); font-size: 16px; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.wchat-tab svg { flex: none; opacity: .75; }
.wchat-tab:hover { background: rgba(255,255,255,.05); color: #fff; }
.wchat-tab.on { color: #fff; background: linear-gradient(90deg, rgba(255,210,74,.17), rgba(255,210,74,.03)); box-shadow: inset 3px 0 0 var(--gold); }
.wchat-tab.on svg { color: var(--gold); opacity: 1; }
.wchat-tab:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.wchat-tl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wchat-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(95,224,138,.7); }
.wchat-stats { margin-top: auto; display: flex; flex-direction: column; gap: 7px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.06); }
.wchat-stat { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.wchat-stat svg { flex: none; opacity: .7; }
.wchat-main { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; padding: 0 18px 16px; }
.wchat-banner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 12px; margin: 0 -18px; padding: 20px 18px 14px;
  background: radial-gradient(130% 160% at 0% 0%, rgba(255,210,74,.13), transparent 58%), linear-gradient(180deg, #13131c, #0b0b11); border-bottom: 2px solid rgba(255,210,74,.28); }
.wchat-banner.crowd { padding-bottom: 0; }
.wchat-ch { margin: 0; font-family: var(--font); font-size: 32px; line-height: 1.05; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wchat-about { margin: 6px 0 0; font-size: 14px; line-height: 1.35; color: var(--muted); }
.wchat-x { align-self: start; }
/* (26-10-2026) everyone, however many: the columns shrink below the sprites' width and they crowd together, overlapping */
.wchat-parade { grid-column: 1 / -1; display: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 50px); justify-content: start; align-items: end;
  height: 46px; margin-top: 8px; padding: 0 22px; overflow: hidden; }
.wchat-banner.crowd .wchat-parade { display: grid; }
.wpar { justify-self: center; width: 48px; height: 44px; display: flex; align-items: flex-end; justify-content: center; filter: drop-shadow(0 2px 0 rgba(0,0,0,.5)); }
.wpar canvas { width: 48px; height: 44px; image-rendering: pixelated; }
.wchat-adm { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border-radius: 10px; background: rgba(255,158,95,.08); border: 1px dashed rgba(255,158,95,.35); }
.wchat-adm .sub { margin-right: 4px; font-size: 12px; }
.wchat-adm .chip { padding: 3px 9px; font-size: 12px; }
.wchat-stream { position: relative; flex: 1; min-height: 0; display: flex; }
.wchat-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 4px 4px 6px 0; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.wchat-jump { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 7px 16px; border: 0; border-radius: 999px; background: var(--gold); color: var(--gold-ink);
  font-family: var(--font); font-size: 14px; white-space: nowrap; box-shadow: 0 8px 20px rgba(0,0,0,.6); cursor: pointer; }
.wchat-empty { margin: auto; text-align: center; }
.wmsg { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px 3px; border-radius: 12px; }
.wmsg.cont { padding-top: 1px; }
.wmsg:hover { background: rgba(255,255,255,.035); }
.wmsg-av { flex: 0 0 48px; width: 48px; height: 44px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; border-radius: 12px;
  background: radial-gradient(circle at 50% 85%, rgba(255,255,255,.09), rgba(255,255,255,.02) 72%); }
.wmsg-av canvas { width: 48px; height: 44px; image-rendering: pixelated; }
.wmsg-at { flex: 0 0 48px; padding-top: 3px; font-size: 11px; color: transparent; text-align: center; font-variant-numeric: tabular-nums; }
.wmsg.cont:hover .wmsg-at { color: var(--faint); }
.wmsg-body { flex: 1; min-width: 0; }
.wmsg-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; margin-bottom: 1px; }
.wmsg-n { font-family: var(--font); font-size: 16px; color: #cfe0ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.wmsg.me .wmsg-n { color: var(--gold); }
.wmsg.adm .wmsg-n { color: #ff9e5f; }
.wmsg-tag { font-size: 10px; font-weight: 800; padding: 0 5px; border-radius: 6px; background: rgba(255,158,95,.18); color: #ffc49e; }
.wmsg-tag.disc { background: rgba(88,101,242,.25); color: #c9cfff; }
.wmsg-top time { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wmsg-more { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; cursor: pointer; opacity: 0; transition: opacity .12s; }
.wmsg:hover .wmsg-more, .wmsg-more:focus-visible { opacity: 1; }
.wmsg-more:hover { color: #fff; }
.wmsg.cont .wmsg-more { position: absolute; top: 2px; right: 8px; }
@media (hover: none) { .wmsg-more { opacity: .7; } }
.wmsg-t { font-size: 15px; line-height: 1.45; color: #eef3ff; overflow-wrap: anywhere; white-space: pre-wrap; }
.wmsg.sys { justify-content: center; margin: 6px 0; padding: 7px 12px; background: linear-gradient(90deg, transparent, rgba(255,210,63,.11), transparent); }
.wmsg.sys .wmsg-t { color: #ffe08a; font-size: 14px; text-align: center; font-weight: 700; }
.wchat-note { margin: 0; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.05); font-size: 13px; }
.wchat-form { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 16px; background: #13131b; border: 1px solid rgba(255,255,255,.09); transition: border-color .15s, box-shadow .15s; }
.wchat-form:focus-within { border-color: rgba(255,210,74,.55); box-shadow: 0 0 0 3px rgba(255,210,74,.12); }
.wchat-form .field { flex: 1; min-width: 0; height: 42px; padding: 0 8px; border: 0; background: transparent; box-shadow: none; font-size: 16px; }
.wchat-form .field:focus { outline: none; border: 0; box-shadow: none; }
.wchat-form .wchat-send { min-height: 42px; padding: 0 20px; }
.wchat-main .wchat-pop { left: 18px; right: 18px; bottom: 78px; }
/* players' words in the reading font (names, titles and numbers stay pixel) */
.wmsg-t, .wdm-t { font-family: var(--font-body); font-weight: 600; -webkit-font-smoothing: antialiased; text-shadow: none; }
.wchat-menu { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 4px; padding: 6px; min-width: 170px; }
.wchat-menu .btn { justify-content: flex-start; text-align: left; }
/* (stage 2) Messages: friends, conversations, private bubbles; mentions; the "new in the channels" dot */
.chat-btn.chat-new::after { content: ''; position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: #8ff0b0; box-shadow: 0 0 0 2px #000; }
.wchat-cnt { display: inline-block; margin-left: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff5f6d; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.wmsg.hit { background: rgba(255,210,63,.08); box-shadow: inset 3px 0 0 #ffd23f; }
.wconv { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; margin-bottom: 6px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.wconv:hover { background: rgba(255,255,255,.06); }
.wconv .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wconv .grow b { font-size: 14px; }
.wconv .grow small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wconv-where { font-size: 11px; color: var(--muted); white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: ellipsis; }
.wconv.on .wconv-where { color: #8ff0b0; }
.wconv.unread { border-color: rgba(255,95,109,.5); }
.wconv-n { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ff5f6d; color: #fff; font-size: 11px; line-height: 20px; text-align: center; }
.wchat-thread { display: flex; align-items: center; gap: 8px; padding: 2px 4px 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.wchat-thread .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wchat-thread .wchat-where { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wchat-av { flex: 0 0 34px; width: 34px; height: 30px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.wchat-av canvas { width: 40px; height: 36px; image-rendering: pixelated; }
.wdm { max-width: 80%; align-self: flex-start; margin: 2px 0; padding: 7px 10px; border-radius: 14px 14px 14px 4px; background: rgba(255,255,255,.07); }
.wdm.me { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: rgba(255,210,63,.16); }
.wdm-t { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.wdm time { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); text-align: right; }
/* (stage 3) the trainer card: where they are now, Respect; a chat name opens the card */
.pf-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.05); font-size: 12.5px; color: var(--muted); }
.pf-live.on { color: #8ff0b0; }
.pf-live.on::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #5fe08a; box-shadow: 0 0 8px rgba(95,224,138,.8); }
.pf-resp.done { opacity: .75; }
.wmsg-n.link { cursor: pointer; }
.wmsg-n.link:hover { text-decoration: underline; }
/* (stage 4) Find a group: public rooms, Quick match; the lobby: public room, ready */
.wrooms { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px; background: rgba(143,240,176,.05); border: 1px solid rgba(143,240,176,.22); }
.wrooms-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wroom { display: flex; align-items: center; gap: 8px; }
.wroom .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* In the start row (it wraps under the controls when the screen is narrow): the public switch, ready, how many are. */
.lob-live { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.lob-live .lob-rdy-n { white-space: nowrap; margin: 0; }
#scr-lobby #lobby-start { min-width: min(100%, 200px); }
/* Ready: a green line inside the player's colour (never clipped by the list) and a tick next to the role. */
#scr-lobby .lob-card.ready { outline: 2px solid #5fe08a; outline-offset: -5px; }
#scr-lobby .lob-card.ready .lc-top::after { content: '✓'; order: 1; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  background: #5fe08a; color: #05060a; font-size: 11px; font-weight: 900; line-height: 1; box-shadow: 0 0 8px rgba(95,224,138,.6); }
#scr-lobby .lob-card.ready .lc-net { order: 2; }
@media (max-width: 700px), (max-height: 520px) {
  /* (26-10-2026) the whole screen; the channels in a strip on top, who is online at its start */
  .wchat { inset: 0; width: auto; border: 0; border-radius: 0; background: #07070c; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .wchat-rail { flex-direction: row; align-items: center; gap: 10px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.07); }
  .wchat-brand { flex: none; padding: 0; }
  .wchat-title { display: none; }
  .wchat-on { font-size: 12px; }
  .wchat-on:not(.on) { display: none; }
  .wchat-tabs { flex: 1; flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .wchat-tabs::-webkit-scrollbar { display: none; }
  .wchat-tab { flex: none; width: auto; min-height: 40px; padding: 6px 12px; gap: 8px; font-size: 15px; }
  .wchat-tab.on { box-shadow: inset 0 -3px 0 var(--gold); background: rgba(255,210,74,.1); }
  .wchat-stats { display: none; }
  .wchat-main { padding: 0 12px 10px; gap: 8px; }
  .wchat-banner { margin: 0 -12px; padding: 12px 12px 10px; }
  .wchat-ch { font-size: 24px; }
  .wchat-about { margin-top: 3px; font-size: 13px; }

  .wchat-main .wchat-pop { left: 12px; right: 12px; bottom: 70px; }
  /* a phone on its side: the stream gets the room (no crowd, no line under the name) */
  @media (max-height: 520px) {
    .wchat-rail { padding: 5px 12px; }
    .wchat-tab { min-height: 36px; padding: 4px 10px; }
    .wchat-banner, .wchat-banner.crowd { padding: 7px 12px 7px; }
    .wchat-about { display: none; }
    /* (26-10-2026) the crowd stays (everyone online), smaller */
    .wchat-banner.crowd .wchat-parade { height: 34px; margin-top: 4px; padding: 0 16px; grid-auto-columns: minmax(0, 38px); }
    .wchat-banner.crowd .wpar, .wchat-banner.crowd .wpar canvas { width: 36px; height: 33px; }
    .wchat-ch { font-size: 20px; }
    .wchat-x { min-height: 32px; padding-top: 2px; padding-bottom: 2px; }
  }
  .chat-btn { padding-left: 8px; padding-right: 8px; }
}

/* ---------- Clubs (26-10-2026, PokéLit Live stage 5: js/ui/club-ui.js, the chat's Club tab, trainer cards) ---------- */
#scr-club .club-box { display: flex; flex-direction: column; gap: 6px; width: min(860px, 100%); }
#scr-club .club-box > * { flex: none; }
#scr-club .club-tabs { margin-top: 0; }
#scr-club .club-body { flex: 0 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 10px; padding: 2px 2px 4px; scrollbar-width: thin; }
.club-tag { display: inline-flex; align-items: center; flex: none; padding: 1px 6px; border-radius: 6px; font: 800 11px/1.4 Pixelify, 'Segoe UI', sans-serif; letter-spacing: .04em;
  color: #05060a; background: var(--cc, #ffd23f); text-shadow: none; }
.club-tag.link { cursor: pointer; }
.club-hero { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--cc) 55%, transparent);
  background: radial-gradient(ellipse 70% 120% at 0% 50%, color-mix(in srgb, var(--cc) 22%, transparent), transparent 70%), linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.2));
  box-shadow: 0 0 18px color-mix(in srgb, var(--cc) 18%, transparent), inset 0 1px 0 rgba(255,255,255,.06); }
.club-hero .club-emb { position: relative; flex: 0 0 auto; width: 132px; height: 116px; display: flex; align-items: flex-end; justify-content: center; }
.club-hero .club-emb::before { content: ''; position: absolute; left: 50%; bottom: 4px; width: 92%; height: 34%; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, color-mix(in srgb, var(--cc) 55%, transparent), transparent 70%); filter: blur(2px); }
.club-hero .club-emb canvas { position: relative; width: 132px; height: 116px; image-rendering: pixelated; }
.club-id { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.club-line { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.club-line .sub { margin: 0; font-size: 12.5px; }
.club-name { margin: 0; font-size: 22px; color: #fff; overflow-wrap: anywhere; }
.club-about { margin: 0; font-size: 13.5px; color: #d6dcef; overflow-wrap: anywhere; }
.club-acts { gap: 8px; }
.club-h { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.club-list { display: flex; flex-direction: column; gap: 6px; }
.club-av { flex: 0 0 40px; width: 40px; height: 36px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.club-av canvas { width: 40px; height: 36px; image-rendering: pixelated; }
.club-mem, .club-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 6px 10px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(0,0,0,.14)); border: 1px solid var(--line); }
.club-row { cursor: pointer; border-left: 3px solid var(--cc); }
.club-row:hover { border-color: color-mix(in srgb, var(--cc) 60%, transparent); }
.club-who { min-width: 0; display: flex; flex-direction: column; }
.club-who b, .club-rname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.club-who .sub { margin: 0; font-size: 12px; }
.club-mem.on .club-who .sub { color: #8ff0b0; }
.club-mem.me { border-color: rgba(255,210,63,.35); }
.club-crown { color: #ffd23f; display: inline-flex; }
.club-more { padding-left: 10px; padding-right: 10px; }
.club-macts { display: none; flex-basis: 100%; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.club-mem.open .club-macts { display: flex; }
.btn.armed { animation: clubArm .6s ease-in-out infinite alternate; }
@keyframes clubArm { to { filter: brightness(1.35); } }
.club-you { font-size: 12px; font-weight: 800; color: #8ff0b0; }
.club-none { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 10px; }
.club-none h3 { margin: 4px 0 0; }
.club-none .sub, .club-none .note { max-width: 460px; margin: 0; }
.club-none-ico { color: #ffd23f; opacity: .85; }
.club-search { gap: 8px; flex-wrap: nowrap; }
.club-fhead .sub { margin: 0; }
.club-back { align-self: flex-start; }
.club-wait { text-align: center; padding: 20px 0; }
.club-fh { margin: 0; }
.club-form { display: flex; flex-direction: column; gap: 10px; }
.club-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.club-fl { font-weight: 800; font-size: 13px; color: #e6ecff; }
.club-field .sub { margin: 0; font-size: 12px; }
.club-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 170px); gap: 10px; align-items: start; }
.club-tagin { text-transform: uppercase; letter-spacing: .1em; font-family: Pixelify, 'Segoe UI', sans-serif; }
.club-embs { display: flex; flex-wrap: wrap; gap: 6px; }
.club-embo { width: 56px; height: 50px; display: flex; align-items: flex-end; justify-content: center; padding: 0; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); cursor: pointer; }
.club-embo.on { border-color: #ffd23f; box-shadow: 0 0 10px rgba(255,210,63,.4); background: rgba(255,210,63,.1); }
.club-embo canvas { width: 48px; height: 44px; image-rendering: pixelated; }
.club-cols { display: flex; flex-wrap: wrap; gap: 8px; }
.club-col { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid rgba(0,0,0,.6); background: var(--cc); cursor: pointer; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.club-col.on { box-shadow: 0 0 0 3px #fff, 0 0 12px var(--cc); }
.club-mode { margin: 0; }
.club-aboutin { resize: vertical; min-height: 54px; font: inherit; }
.club-preview .club-hero { pointer-events: none; }
/* ---------- Stickers and cards in the chat (26-10-2026, PokéLit Live: world-chat-ui.js, run-ui.js) ---------- */
.wchat-plus { flex: none; padding-left: 8px; padding-right: 8px; }
.wchat-pop { position: absolute; z-index: 3; left: 10px; right: 10px; bottom: 62px; max-height: min(330px, 62%); overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  padding: 10px; border-radius: 14px; border: 1px solid rgba(255,255,255,.16); background: #0b0b12; box-shadow: 0 10px 30px rgba(0,0,0,.6); overscroll-behavior: contain; }
.wpop-h { font-size: 13px; color: var(--muted); }
.wpop-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.wpop-st { width: 56px; height: 50px; display: flex; align-items: flex-end; justify-content: center; padding: 0; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); cursor: pointer; }
.wpop-st:hover { border-color: #ffd23f; background: rgba(255,210,63,.1); }
.wpop-st canvas { width: 48px; height: 44px; image-rendering: pixelated; }
.wpop-row { display: flex; flex-wrap: wrap; gap: 6px; }
.wmsg-st { width: 96px; height: 88px; display: flex; align-items: flex-end; justify-content: center; }
.wmsg-st canvas { width: 96px; height: 88px; image-rendering: pixelated; }
.wcard { --wc: #ffd23f; display: flex; align-items: center; gap: 10px; margin-top: 3px; padding: 6px 12px 6px 6px; max-width: 360px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--wc) 55%, transparent); background: radial-gradient(ellipse 80% 140% at 0% 50%, color-mix(in srgb, var(--wc) 20%, transparent), transparent 70%), #0b0b12;
  box-shadow: 0 0 14px color-mix(in srgb, var(--wc) 18%, transparent); }
.wcard.run { --wc: #4fc3ff; } .wcard.catch { --wc: #5fe08a; } .wcard.shiny { --wc: #ffd23f; } .wcard.uniq { --wc: #ff3b3b; } .wcard.mega { --wc: #ff5fd0; }
.wcard-art { flex: none; width: 72px; height: 64px; display: flex; align-items: flex-end; justify-content: center; }
.wcard-art canvas { width: 72px; height: 64px; image-rendering: pixelated; }
.wcard-tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wcard-tx b { font-size: 14px; color: #fff; overflow-wrap: anywhere; }
.wcard-tx small { font-size: 12px; color: #c9d3f0; overflow-wrap: anywhere; }
#scr-over .over-acts { flex: none; justify-content: center; gap: 8px; }
#scr-over .over-acts #btn-again { min-width: min(200px, 100%); }
/* ---------- Watching a friend's run (26-10-2026, PokéLit Live: js/ui/spectate-ui.js) ---------- */
#scr-watch { padding: 0; display: block; background: #05060a; z-index: 30; }
.watch-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.watch-top { position: absolute; z-index: 2; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,0)); }
.watch-who { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.watch-top .btn { background: rgba(8,9,14,.82); border-color: rgba(255,255,255,.22); }
.watch-who b { font-size: 16px; color: #fff; }
.watch-who .sub { display: block; margin: 0; font-size: 12px; }
.watch-av { width: 40px; height: 36px; display: flex; align-items: flex-end; justify-content: center; }
.watch-av canvas { width: 40px; height: 36px; image-rendering: pixelated; }
.watch-live { padding: 2px 8px; border-radius: 999px; background: #ff3b47; color: #fff; font: 800 11px/1.5 Pixelify, 'Segoe UI', sans-serif; letter-spacing: .08em;
  box-shadow: 0 0 12px rgba(255,59,71,.6); animation: watchLive 1.6s ease-in-out infinite; }
@keyframes watchLive { 50% { opacity: .55; } }
.watch-hud { position: absolute; z-index: 2; left: calc(12px + env(safe-area-inset-left)); bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center;
  gap: 12px; flex-wrap: wrap; padding: 6px 12px; border-radius: 12px; background: rgba(0,0,0,.62); border: 1px solid rgba(255,255,255,.12); color: #e6ecff; font-size: 14px; }
.watch-hud > b { font: 800 18px Pixelify, 'Segoe UI', sans-serif; color: #fff; }
.watch-hpb { width: 120px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.watch-hpb i { display: block; height: 100%; background: linear-gradient(90deg, #5fe08a, #b7f57a); }
.watch-boss { position: absolute; z-index: 2; left: 50%; translate: -50% 0; top: calc(64px + env(safe-area-inset-top)); width: min(420px, 80vw); text-align: center; }
.watch-boss b { font: 800 14px Pixelify, 'Segoe UI', sans-serif; color: #ffd23f; text-shadow: 0 1px 0 #000; }
.watch-bhpb { height: 9px; margin-top: 3px; border-radius: 5px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.2); overflow: hidden; }
.watch-bhpb i { display: block; height: 100%; background: linear-gradient(90deg, #ff3b47, #ff8a5f); }
.watch-wait { position: absolute; z-index: 2; left: 0; right: 0; top: 50%; translate: 0 -50%; margin: 0; text-align: center; color: #c9d3f0; }
.watch-over { position: absolute; z-index: 3; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(0,0,0,.66); }
.watch-over b { font: 800 26px Pixelify, 'Segoe UI', sans-serif; color: #fff; }
.watch-over small { color: #c9d3f0; font-size: 14px; }
@media (max-width: 560px), (max-height: 520px) {
  .watch-hpb { width: 80px; }
  .watch-boss { top: calc(52px + env(safe-area-inset-top)); }
}
/* ---------- The notification bell (26-10-2026, PokéLit Live: js/ui/bell-ui.js) ---------- */
.bell-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; padding-left: 9px; padding-right: 9px; }
.bell-btn.on { border-color: var(--gold); }
.bell-btn.ring img { animation: bellRing 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes bellRing { 0%, 70%, 100% { rotate: 0deg; } 74% { rotate: 14deg; } 80% { rotate: -12deg; } 86% { rotate: 8deg; } 92% { rotate: -4deg; } }
.bell-btn .bell-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff5f6d; color: #fff;
  font: 800 11px/18px var(--font-body); text-align: center; box-shadow: 0 0 0 2px #000; text-shadow: none; }
.bell { position: fixed; z-index: 41; top: calc(64px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); width: min(380px, calc(100vw - 24px));
  max-height: calc(100dvh / var(--uiz, 1) - 90px); display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bell-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; }
.bell-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 0; padding-right: 2px; overscroll-behavior: contain; }
.bell-h { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.bell-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.14)); cursor: pointer; }
.bell-row.req { cursor: default; border-color: rgba(255,210,63,.35); }
.bell-row.new { border-color: rgba(143,240,176,.5); background: linear-gradient(180deg, rgba(143,240,176,.1), rgba(0,0,0,.14)); }
.bell-row:hover:not(.req) { border-color: rgba(190,215,255,.45); }
.bell-ico { flex: none; display: inline-flex; }
.bell-txt { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; color: #e6ecff; overflow-wrap: anywhere; }
.bell-txt b { color: #fff; }
.bell-txt .sub { margin: 0; font-size: 11.5px; }
.bell-row .btn { padding-top: 4px; padding-bottom: 4px; }
.bell-empty { margin: 8px 0; text-align: center; }
@media (max-width: 700px), (max-height: 520px) {
  .bell { inset: 0; width: auto; max-height: none; border-radius: 0; background: #07070c;
    padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left)); }
  .bell-btn { padding-left: 7px; padding-right: 7px; }
}
/* the week: the club's points, its three goals (a bar with the three tiers marked) and their rewards */
.club-week { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.2)); }
.club-wk-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.club-wk-head b { font-size: 16px; }
.club-wk-head .sub { margin: 0; font-size: 12.5px; }
.club-wk-how { margin: 0; font-size: 12px; }
.club-goal { display: flex; flex-direction: column; gap: 6px; }
.club-goal-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.club-goal-n { font-weight: 800; font-size: 13.5px; color: #e6ecff; }
.club-goal-v { font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.club-bar { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); margin: 0 6px 0 0; }
.club-bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, #ffb13d, #ffd23f); box-shadow: 0 0 10px rgba(255,210,63,.45); }
.club-bar > em { position: absolute; top: -3px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: rgba(255,255,255,.35); }
.club-bar > em.on { background: #fff; box-shadow: 0 0 6px #fff; }
.club-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.club-tier { --tc: #d08a4e; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 6px 8px; border-radius: 10px; min-width: 0;
  border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); background: color-mix(in srgb, var(--tc) 7%, transparent); opacity: .72; }
.club-tier.t1 { --tc: #c9d3e6; } .club-tier.t2 { --tc: #ffd23f; }
.club-tier.done { opacity: 1; border-color: color-mix(in srgb, var(--tc) 70%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--tc) 25%, transparent); }
.club-tier-h { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.club-tier-h b { color: var(--tc); font-size: 13px; }
.club-tier-h .sub { margin: 0; font-size: 11.5px; }
.club-tier-r { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: #e6ecff; }
.club-tier-r img { vertical-align: middle; }
.club-tier-s { font-size: 11.5px; color: var(--muted); }
.club-tier-s.ok { color: #8ff0b0; font-weight: 800; }
.club-tier .btn { padding: 3px 10px; }
/* the weekly ranking */
.club-row.ranked { gap: 6px 10px; }
.club-row.mine { border-color: rgba(255,210,63,.55); box-shadow: 0 0 12px rgba(255,210,63,.18); }
.club-pos { flex: 0 0 34px; text-align: center; font: 800 15px Pixelify, 'Segoe UI', sans-serif; color: var(--muted); }
.club-pos.p1 { color: #ffd23f; text-shadow: 0 0 10px rgba(255,210,63,.6); } .club-pos.p2 { color: #dfe6f5; } .club-pos.p3 { color: #e09a5f; }
.club-pts { font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; }
.wmsg.sys.club.goal { background: linear-gradient(90deg, transparent, rgba(255,210,63,.14), transparent); }
.wmsg.sys.club.goal .wmsg-t { color: #ffe08a; }
@media (max-width: 560px) {
  .club-tiers { grid-template-columns: minmax(0, 1fr); }
  .club-tier { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
}
/* the chat: the Club tab's header, the invitation, a club line, the tag next to a name */
.wclub { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--cc, #ffd23f) 45%, transparent);
  background: radial-gradient(ellipse 80% 140% at 0% 50%, color-mix(in srgb, var(--cc, #ffd23f) 16%, transparent), transparent 70%); }
.wclub .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wclub-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wclub-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wclub .sub { margin: 0; font-size: 12px; }
.wclub-none { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 18px 8px; }
.wclub-none .sub { margin: 0; }
.wmsg.sys.club { background: linear-gradient(90deg, transparent, rgba(143,240,176,.1), transparent); }
.wmsg.sys.club .wmsg-t { color: #b9f5cd; }
.wmsg.sys.club .wmsg-t b { color: #fff; }
.wmsg-top .club-tag { font-size: 10px; padding: 0 5px; }
/* a trainer card: their club */
.pf-club { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--cc) 55%, transparent);
  background: color-mix(in srgb, var(--cc) 12%, transparent); color: #fff; font-size: 12.5px; cursor: pointer; max-width: 100%; }
.pf-club b { padding: 1px 6px; border-radius: 999px; background: var(--cc); color: #05060a; font: 800 11px/1.4 Pixelify, 'Segoe UI', sans-serif; text-shadow: none; }
.pf-club span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
  .club-hero { gap: 10px; padding: 10px; }
  .club-hero .club-emb, .club-hero .club-emb canvas { width: 92px; height: 81px; }
  .club-name { font-size: 18px; }
  .club-two { grid-template-columns: minmax(0, 1fr) minmax(0, 120px); }
}
@media (max-height: 520px) {
  #scr-club .club-box { padding: 10px 14px; }
  .club-hero { padding: 8px 10px; }
  .club-hero .club-emb, .club-hero .club-emb canvas { width: 88px; height: 77px; }
  .club-name { font-size: 17px; }
}

/* ====== (26-10-2026) Multiplayer (ui/multi-ui.js): the public rooms on the left, live, with Quick match as the big gold
   button; the Plaza and the rest on the right. One column on a narrow screen; on a phone the window scrolls. ====== */
#scr-multi .mp-box { width: min(1080px, 100%); max-height: calc(100dvh / var(--uiz, 1) - 24px); display: flex; flex-direction: column; gap: 14px; }
.mp-head { align-items: flex-start; gap: 12px; }
.mp-ht { min-width: 0; }
.mp-ht h2 { margin: 0; font-size: 30px; }
.mp-ht .sub { margin: 4px 0 0; }
.mp-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr); gap: 16px; }
.mp-rooms { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.mp-rh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mp-rh h3 { margin: 0; font-size: 20px; }
.mp-cnt { font-family: var(--font); font-size: 13px; color: #8ff0b0; white-space: nowrap; }
.mp-list { flex: 1; min-height: 132px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 2px; overscroll-behavior: contain; }
.mp-empty { margin: auto; max-width: 36ch; text-align: center; }
.mp-room { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.mp-av { width: 48px; height: 44px; display: flex; align-items: flex-end; justify-content: center; }
.mp-av canvas { width: 48px; height: 44px; image-rendering: pixelated; }
.mp-rt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mp-rt b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-seats { display: inline-flex; gap: 4px; }
.mp-seats i { width: 11px; height: 11px; border-radius: 3px; border: 1.5px solid rgba(255,255,255,.3); }
.mp-seats i.on { background: var(--green); border-color: var(--green); box-shadow: 0 0 6px rgba(95,224,138,.6); }
.mp-mine { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,210,74,.08); border: 1px solid rgba(255,210,74,.4); }
.mp-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.mp-cta .mp-quick { min-height: 54px; font-size: 20px; }
.mp-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; }
.mp-plaza, .mp-tile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px;
  color: inherit; font: inherit; text-align: left; cursor: pointer; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); transition: border-color .15s, background .15s; }
.mp-plaza { padding: 16px; border-color: rgba(95,216,255,.4); background: radial-gradient(120% 140% at 0% 0%, rgba(95,216,255,.18), transparent 60%), linear-gradient(180deg, #111a26, #0b0f16); }
.mp-plaza:hover, .mp-plaza:focus-visible { border-color: var(--cyan); }
.mp-tile:hover, .mp-tile:focus-visible { border-color: rgba(255,210,74,.55); background: rgba(255,210,74,.06); }
.mp-pi svg { display: block; width: 52px; height: 52px; }
.mp-ti { display: flex; color: var(--gold); }
.mp-tt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mp-tt b { font-family: var(--font); font-size: 17px; color: #fff; }
.mp-plaza .mp-tt b { font-size: 22px; }
.mp-tt small { font-family: var(--font-body); font-weight: 600; font-size: 13px; color: var(--muted); }
.mp-tt small .club-tag { margin-right: 2px; }
.mp-go { font-size: 24px; line-height: 1; color: var(--muted); }
.mp-watch { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); }
.mp-wh { font-size: 15px; }
.mp-watch .mp-empty { margin: 0; text-align: left; }
.mp-wrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 760px) { .mp-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px), (max-height: 620px) {
  #scr-multi .mp-box { max-height: none; }
  .mp-grid { flex: none; }
  .mp-list { flex: none; min-height: 0; overflow: visible; }
  .mp-side { overflow: visible; }
  .mp-ht h2 { font-size: 24px; }
  .mp-cta .mp-quick { min-height: 48px; font-size: 18px; }
}

/* (26-10-2026) Down in a group run: the teammate you watch, under the "You're down" notice, with arrows to switch
   (ui/coop-watch-ui.js sets left and top) */
.cw-bar { position: fixed; z-index: 16; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 999px;
  background: rgba(5,8,18,.84); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 8px 24px rgba(0,0,0,.55); }
.cw-t { display: flex; flex-direction: column; align-items: center; min-width: 120px; padding: 0 6px; line-height: 1.15; }
.cw-t small { font-family: var(--font-body); font-weight: 700; font-size: 11px; color: var(--muted); }
.cw-n { font-family: var(--font); font-size: 17px; white-space: nowrap; text-shadow: 0 2px 0 rgba(0,0,0,.6); }
.cw-arr { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.3); background: rgba(255,255,255,.06); color: #fff;
  font-family: var(--font); font-size: 22px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.cw-arr:hover, .cw-arr:focus-visible { border-color: var(--gold); color: var(--gold); }
.cw-bar.one .cw-arr { visibility: hidden; }
/* (26-10-2026) The chat window in a group run: the room's quick phrases above the composer */
.wchat-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.wchat-quick .chip { min-height: 34px; padding: 4px 12px; font-size: 14px; }

/* ============ (26-10-2026) PC favourites, leaderboard prizes ============ */
/* PC Box: a heart on favourites' slots (bottom left: rank is top left, shiny top right, copies bottom right), the heart by the name */
.pcb-fav { position: absolute; left: 3px; bottom: 3px; line-height: 0; filter: drop-shadow(0 1px 0 rgba(0,0,0,.85)); pointer-events: none; }
.pcs-head .pcx-fav { margin-left: auto; align-self: center; padding: 3px 4px; }
.pcs-head .pcx-shi + .pcx-fav { margin-left: 4px; }
/* Leaderboard: the prizes of the board on screen (ranking-ui.js prizeStrip) */
.rk-prize { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 8px; padding: 7px 12px; border-radius: 12px;
  border: 1px solid rgba(255,210,63,.55); background: linear-gradient(90deg, rgba(255,210,63,.16), rgba(167,123,255,.1)); box-shadow: 0 0 18px rgba(255,210,63,.16); }
.rk-prize.hidden { display: none; }
.rk-pt { display: inline-flex; align-items: center; gap: 6px; color: #ffd23f; font: 800 13px var(--font); white-space: nowrap; }
.rk-pl { display: flex; flex-wrap: wrap; gap: 3px 12px; font: 700 12.5px var(--font-body); color: #fff1c8; }
.rk-pl > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rk-prize small { margin-left: auto; color: #b9c3d6; font-size: 11.5px; white-space: nowrap; }
@media (max-height: 520px) { .rk-prize { margin: 3px 0 5px; padding: 4px 10px; gap: 2px 10px; } .rk-pt { font-size: 12px; } .rk-pl { font-size: 11.5px; } }
/* The prize notice: the golden version of #note-wall (live.js prizeWall) */
#note-wall.prize .box { border-color: #ffd23f; box-shadow: 0 0 48px rgba(255,210,63,.45), inset 0 0 40px rgba(255,210,63,.08); }
#note-wall.prize h2 { color: #ffd23f; text-shadow: 0 2px 0 #000, 0 0 16px rgba(255,200,60,.5); }
#note-wall.prize #nw-body { text-align: center; }
/* Landscape phones: the leaderboard is a grid (above, max-height 520px); the prizes go between the filters and the list */
@media (max-height: 520px) {
  #scr-rank > .box { grid-template-rows: auto auto auto minmax(0, 1fr) auto auto; }
  #scr-rank #rk-prize { grid-row: 3; margin: 0 0 4px; }
  #scr-rank #rk-list { grid-row: 4; }
  #scr-rank #rk-region { grid-row: 5; }
  #scr-rank #rk-me { grid-row: 6; }
}

/* ============ (27-10-2026) Your real stats: "base → yours" (systems/monstats.js) in the Pokédex and the PC Box ============ */
#scr-dex .dx-page .stat .bar { display: flex; }
#scr-dex .dx-page .stat .bar i { flex: none; }
#scr-dex .dx-page .stat .bar i:first-child:not(:last-child) { border-radius: 6px 0 0 6px; }
#scr-dex .dx-page .stat .bar i.you, .pcx-bar em i.you { border-radius: 0 6px 6px 0; background: repeating-linear-gradient(135deg, #ffd23f 0 4px, #e9a90e 4px 8px); box-shadow: 0 0 8px rgba(255,210,63,.6); }
.dxx-b { color: #8f9bb0; font-weight: 600; }
.dxx-ar { margin: 0 3px; color: #ffd23f; font-weight: 800; }
.dxx-you { color: #ffd23f; text-shadow: 0 0 8px rgba(255,210,63,.35); }
.dxx-extra { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: 6px 0 2px; font: 700 12px var(--font-body); color: #cbd8e6; }
.dxx-extra span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.dxx-extra b { color: #ffd23f; }
.dxx-gold { margin: 3px 0 6px; font: 600 11px var(--font-body); color: #c9a94a; }
.dxx-marks.dxx-ys .hp { color: #7ff0a4; } .dxx-marks.dxx-ys .at { color: #ffa48a; }
.pcx-bar { grid-template-columns: 16px 64px minmax(0, 1fr) auto; }
.pcx-bar em { display: flex; }
.pcx-bar em i { flex: none; }
.pcx-bar b { white-space: nowrap; }
.pcx-bar b s { color: #7d8aa0; font-weight: 600; text-decoration: none; margin-right: 2px; }
.pcx-bar b s::after { content: ' →'; color: #ffd23f; }
@media (max-height: 520px) { .dxx-gold { display: none; } .dxx-extra { margin: 3px 0 0; font-size: 11px; } }

/* ============ (27-10-2026) The pause's stats: where each one comes from (run-ui.js breakdown, in the .b-tip tooltip) ============ */
.b-stats [data-tip] { cursor: help; border-bottom: 1px dotted rgba(255,255,255,.18); }
.b-up { margin-left: 4px; font-style: normal; font-weight: 800; color: #7dff9a; }
.b-bd { display: flex; justify-content: space-between; gap: 14px; font-size: 12.5px; }
.b-bd span { color: #b9c3d6; }
.b-bd b { color: #eef3ff; font-variant-numeric: tabular-nums; }
.b-bd.buff span, .b-bd.buff b { color: #7dff9a; }
.b-bd.now { margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.16); }
.b-bd.now b { color: #ffd23f; }

/* ============ (27-10-2026) Chat: the type of the Pokémon they play, badges, today's podium (world-chat-ui.js) ============ */
.wmsg[style*="--tc"] { background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 15%, transparent), transparent 62%); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--tc) 85%, transparent); }
.wmsg[style*="--tc"]:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 22%, transparent), rgba(255,255,255,.03) 72%); }
/* yours: on the right, frosted glass */
.wmsg.me { flex-direction: row-reverse; text-align: right; background: linear-gradient(270deg, rgba(255,255,255,.085), rgba(255,255,255,.02) 66%);
  box-shadow: inset -3px 0 0 var(--tc, var(--gold)), inset 0 1px 0 rgba(255,255,255,.07); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.wmsg.me[style*="--tc"] { background: linear-gradient(270deg, color-mix(in srgb, var(--tc) 16%, rgba(255,255,255,.06)), rgba(255,255,255,.02) 66%); }
.wmsg.me .wmsg-top { flex-direction: row-reverse; }
.wmsg.me .wmsg-st { margin-left: auto; }
.wmsg.me .wmsg-body > :not(.wmsg-top):not(.wmsg-t):not(.wmsg-st) { margin-left: auto; }
.wmsg-bd { flex: none; display: inline-flex; align-items: center; line-height: 0; }
.wmsg-bd.cr { filter: drop-shadow(0 0 6px rgba(255,210,63,.75)); }
.wmsg-bd.dm { filter: drop-shadow(0 0 6px rgba(255,42,58,.75)); }
.wmsg-bd.sh { filter: drop-shadow(0 0 6px rgba(154,230,255,.75)); }
.wmsg-title { flex: none; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 7px; border-radius: 7px;
  font: 800 10.5px var(--font-body); color: #ffe8a3; background: rgba(255,210,63,.12); border: 1px solid rgba(255,210,63,.32); }
/* Global's banner: today's top 3, live */
.wchat-lb { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 12px; width: 100%; margin-top: 8px; padding: 6px 10px; border-radius: 10px; cursor: pointer; text-align: left;
  background: linear-gradient(90deg, rgba(255,210,63,.17), rgba(255,210,63,.04)); border: 1px solid rgba(255,210,63,.36); color: #fff1c8; font: 700 12.5px var(--font-body); }
.wchat-lb:hover { background: linear-gradient(90deg, rgba(255,210,63,.26), rgba(255,210,63,.08)); }
.wchat-lb-r { white-space: nowrap; }
.wchat-lb-r b { color: #fff; }
.wchat-lb small { margin-left: auto; color: #c9a94a; font-size: 11px; white-space: nowrap; }
@media (max-height: 520px) {
  .wchat-lb { margin-top: 4px; padding: 3px 8px; gap: 2px 10px; font-size: 11px; }
  .wchat-lb small, .wmsg-title { display: none; }
}

/* ============ (27-10-2026) Chat: reactions and replies (world-chat-ui.js) ============ */
.wmsg-rx { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 2px; }
.wmsg.me .wmsg-rx { justify-content: flex-end; }
.wrx { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 26px; padding: 1px 9px; border-radius: 13px; cursor: pointer;
  font: 700 13px var(--font-body); color: #dfe8ff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13); transition: transform .1s, background .12s, border-color .12s; }
.wrx:hover { background: rgba(255,255,255,.14); }
.wrx:active { transform: scale(.92); }
.wrx.on { background: rgba(255,210,63,.18); border-color: rgba(255,210,63,.6); color: #fff1c8; }
.wrx.gg { font-family: var(--font); letter-spacing: .5px; color: #8ff0b0; }
.wrx.gg.on { color: #c4ffd8; background: rgba(143,240,176,.16); border-color: rgba(143,240,176,.6); }
.wrx:disabled { cursor: default; transform: none; }
.wchat-menu-rx { display: flex; gap: 4px; justify-content: space-between; padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid rgba(255,255,255,.09); }
.wchat-menu-rx .wrx { flex: 1; min-width: 34px; min-height: 36px; padding: 0 4px; font-size: 18px; }
.wchat-menu-rx .wrx.gg { font-size: 14px; }
/* a reply: the message it answers, quoted on top */
.wmsg-q { width: fit-content; max-width: 100%; margin: 1px 0 3px; padding: 2px 9px; border-left: 3px solid rgba(207,224,255,.45); border-radius: 4px 9px 9px 4px; cursor: pointer;
  background: rgba(255,255,255,.05); color: #b9c6e4; font: 600 12.5px var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wmsg-q b { color: #cfe0ff; font-weight: 800; }
.wmsg-q:hover { background: rgba(255,255,255,.09); }
.wmsg.me .wmsg-q { border-left: 0; border-right: 3px solid rgba(255,210,63,.55); border-radius: 9px 4px 4px 9px; }
.wmsg.me.cont .wmsg-more { right: auto; left: 8px; }
.wmsg.flash { animation: wmsg-flash 1.4s ease-out; }
@keyframes wmsg-flash { 0%, 35% { outline: 2px solid rgba(255,210,63,.85); outline-offset: -2px; } 100% { outline: 2px solid rgba(255,210,63,0); outline-offset: -2px; } }
/* over the box: who you are answering */
.wchat-reply { display: flex; align-items: center; gap: 8px; margin-bottom: -4px; padding: 3px 4px 3px 12px; border-radius: 12px;
  background: rgba(255,210,63,.08); border: 1px solid rgba(255,210,63,.32); color: #ffe8a3; font: 700 13px var(--font-body); }
.wchat-reply span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wchat-reply .btn { flex: none; min-height: 28px; padding: 0 10px; }

/* ============ (27-10-2026) Chat: the big moments, a card in Global with a GG button that rains GG (world-chat-ui.js epicRow) ============ */
.wmsg.epic { justify-content: center; padding: 6px 0; background: none; box-shadow: none; }
.wmsg.epic:hover { background: none; }
.wep { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; width: min(100%, 580px); padding: 10px 12px 10px 10px; border-radius: 16px;
  background: linear-gradient(120deg, var(--ep1), var(--ep2)); border: 1px solid var(--epb); box-shadow: 0 0 22px var(--epg), inset 0 1px 0 rgba(255,255,255,.12); }
.wep::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.16) 50%, transparent 65%);
  transform: translateX(-110%); animation: wep-shine 1.6s ease-out .2s 1 both; }
@keyframes wep-shine { to { transform: translateX(110%); } }
.ep-leg { --ep1: rgba(255,196,0,.22); --ep2: rgba(120,60,0,.2); --epb: rgba(255,210,63,.62); --epg: rgba(255,200,40,.2); --eph: #ffd84a; }
.ep-shiny { --ep1: rgba(120,230,255,.2); --ep2: rgba(160,90,255,.17); --epb: rgba(154,230,255,.62); --epg: rgba(120,220,255,.2); --eph: #9ae6ff; }
.ep-mega { --ep1: rgba(255,90,200,.21); --ep2: rgba(90,60,255,.2); --epb: rgba(255,130,220,.58); --epg: rgba(255,100,220,.18); --eph: #ff9be8; }
.ep-uniq { --ep1: rgba(255,30,50,.28); --ep2: rgba(40,0,6,.5); --epb: rgba(255,42,58,.68); --epg: rgba(255,30,50,.24); --eph: #ff4a5a; }
.ep-hof { --ep1: rgba(255,210,63,.18); --ep2: rgba(255,255,255,.04); --epb: rgba(255,210,63,.52); --epg: rgba(255,210,63,.15); --eph: #ffe08a; }
.ep-judg { --ep1: rgba(255,255,255,.17); --ep2: rgba(255,210,63,.12); --epb: rgba(255,245,200,.58); --epg: rgba(255,240,180,.17); --eph: #fff6d0; }
.ep-top { --ep1: rgba(255,210,63,.25); --ep2: rgba(255,120,0,.15); --epb: rgba(255,210,63,.68); --epg: rgba(255,190,40,.22); --eph: #ffd23f; }
.wep-art { flex: none; width: 96px; height: 88px; margin: -6px 0 -6px -4px; display: flex; align-items: flex-end; justify-content: center; filter: drop-shadow(0 0 10px var(--epg)); }
.wep-art canvas { width: 96px; height: 88px; image-rendering: pixelated; }
.wep-art svg { align-self: center; }
.wep-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wep-h { font: 400 20px var(--font); letter-spacing: 1px; color: var(--eph); text-shadow: 0 0 12px var(--epg), 0 2px 0 rgba(0,0,0,.55); }
.wep-l { font: 600 14px var(--font-body); line-height: 1.35; color: #e6edff; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
.wep-l b { color: #fff; font-weight: 800; }
.wep-l b.link { cursor: pointer; text-decoration: underline dotted rgba(255,255,255,.45); text-underline-offset: 3px; }
.wep-l b.link:hover { color: var(--eph); }
.wep-at { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wep-gg { position: relative; z-index: 2; flex: none; min-width: 66px; min-height: 42px; padding: 0 12px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  font: 400 16px var(--font); color: #8ff0b0; background: rgba(143,240,176,.1); border: 1px solid rgba(143,240,176,.5); transition: transform .1s, background .12s, box-shadow .12s; }
.wep-gg:hover { background: rgba(143,240,176,.2); }
.wep-gg:active { transform: scale(.93); }
.wep-gg.on { background: rgba(143,240,176,.24); color: #c4ffd8; box-shadow: 0 0 14px rgba(143,240,176,.35); }
.wep-gg.pop { animation: wep-pop .35s ease-out; }
@keyframes wep-pop { 40% { transform: scale(1.16); } }
.wep-drop { position: absolute; top: -20px; z-index: 1; pointer-events: none; font-family: var(--font); color: #8ff0b0; text-shadow: 0 0 8px rgba(143,240,176,.75), 0 1px 0 #000;
  animation: wep-rain 1.25s ease-in both; }
.wep-drop:nth-child(3n) { color: #ffd84a; text-shadow: 0 0 8px rgba(255,210,63,.75), 0 1px 0 #000; }
@keyframes wep-rain { 0% { transform: translateY(0) rotate(var(--r, 0deg)); opacity: 0; } 12% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(var(--fall, 120px)) rotate(var(--r, 0deg)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wep::after, .wep-gg.pop { animation: none; } }
@media (max-height: 520px), (max-width: 560px) {
  .wep { gap: 9px; padding: 7px 9px 7px 7px; border-radius: 13px; }
  .wep-art, .wep-art canvas { width: 72px; height: 66px; }
  .wep-art { margin: -4px 0 -4px -2px; }
  .wep-h { font-size: 16px; }
  .wep-l { font-size: 13px; }
  .wep-gg { min-width: 56px; min-height: 36px; padding: 0 9px; font-size: 14px; }
}

/* ============ (27-10-2026) Chat: the Moments tab, counts on every tab, the epic ADMIN tag, the run's unread notice ============ */
.wchat-tab .wchat-cnt { flex: none; margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font: 800 11.5px/20px var(--font-body);
  background: #ff4d61; color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 0 10px rgba(255,77,97,.45); }
.wchat-tab[data-ch="feed"] .wchat-cnt { background: #ffb21e; color: #2a1600; box-shadow: 0 0 0 2px rgba(0,0,0,.35), 0 0 10px rgba(255,178,30,.45); }
.wchat-tab.has-new:not(.on) { color: #fff; }
.wchat-tab.has-new:not(.on) :is(svg, img) { opacity: 1; }
/* ADMIN: a crown and the word in flowing gold and crimson, a glow that breathes and a shine that sweeps */
.wmsg-tag.adm { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 1px 7px 1px 5px; border-radius: 7px;
  font: 400 10.5px/1.5 var(--font); letter-spacing: 1px; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.65);
  background: linear-gradient(100deg, #b3001b, #ff3d3d 22%, #ffb21e 42%, #ffe680 50%, #ff8a1e 58%, #d4002a 78%, #b3001b) 0 0 / 250% 100%;
  box-shadow: 0 0 0 1px rgba(255,214,90,.75), 0 0 10px rgba(255,80,40,.55); animation: adm-flow 3.2s linear infinite, adm-glow 1.8s ease-in-out infinite; }
.wmsg-tag.adm img { flex: none; filter: drop-shadow(0 0 3px rgba(255,230,120,.95)); animation: adm-crown 1.8s ease-in-out infinite; }
.wmsg-tag.adm span { position: relative; z-index: 1; }
.wmsg-tag.adm::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.8) 50%, transparent 70%);
  transform: translateX(-120%); animation: adm-shine 2.6s ease-in-out infinite; }
@keyframes adm-flow { to { background-position: -250% 0; } }
@keyframes adm-glow { 50% { box-shadow: 0 0 0 1px rgba(255,236,140,1), 0 0 18px rgba(255,120,40,.9); } }
@keyframes adm-shine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes adm-crown { 50% { transform: translateY(-1px) rotate(-8deg); } }
/* and the admin's name: moving gold and crimson */
.wmsg.adm .wmsg-n { background: linear-gradient(90deg, #ffd23f, #ff6a3d, #ff2e5f, #ffd23f) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: adm-flow 4s linear infinite; filter: drop-shadow(0 0 6px rgba(255,90,60,.4)); }
@media (prefers-reduced-motion: reduce) { .wmsg-tag.adm, .wmsg-tag.adm img, .wmsg-tag.adm::after, .wmsg.adm .wmsg-n { animation: none; } }
/* In a run: how many unread (until the chat opens), a bubble that pops when one more comes; the touch button gets the count */
.chat-unread { pointer-events: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 2px; padding: 3px 10px 3px 7px;
  border-radius: 999px; border: 1.5px solid rgba(255,210,63,.8); background: linear-gradient(90deg, rgba(44,28,0,.9), rgba(10,14,30,.88)); cursor: pointer;
  color: #fff1c8; font: 700 calc(12.5px * var(--cs, 1))/1.25 var(--font-body); text-shadow: none; box-shadow: 0 0 14px rgba(255,190,40,.35); touch-action: manipulation; }
.chat-unread i { display: inline-flex; color: var(--gold); }
.chat-unread i svg { width: 16px; height: 16px; }
.chat-unread b { color: #fff; font-family: var(--font); font-weight: 400; font-size: 1.1em; }
.chat-unread kbd { padding: 0 5px; border-radius: 4px; border: 1px solid rgba(255,255,255,.4); background: rgba(255,255,255,.12); color: #fff; font: 700 .85em var(--font-body); }
.chat-unread.bump { animation: chat-bump .5s ease-out; }
@keyframes chat-bump { 30% { transform: scale(1.12); box-shadow: 0 0 24px rgba(255,200,60,.85); } }
.chat-btn.has-new { border-color: var(--gold); color: var(--gold); }
.chat-btn.has-new::after { content: attr(data-n); position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: #ff4d61; color: #fff; font: 800 11px/18px var(--font-body); text-align: center; box-shadow: 0 0 0 2px #000; }
/* the run's lines: which channel (Global keeps its globe) */
.chat-line.g i.chat-tag { margin-right: 6px; padding: 0 5px; border-radius: 5px; font: 700 .82em/1.45 var(--font-body); font-style: normal; color: #0b1020; background: #9fd0ff; text-shadow: none; opacity: 1; }
.chat-line.g.t-club i.chat-tag { background: #8ff0b0; }
.chat-line.g.t-dm i.chat-tag { background: #ff9ed8; }
.chat-line.g.t-lfg i.chat-tag { background: #ffd27a; }
.chat-line.g.t-trade i.chat-tag { background: #c8b4ff; }

/* ============ (27-10-2026) Chat refinements 1: where you stopped reading, a new message's flash, emoji rain, who wrote in a run ============ */
.wchat-new { display: flex; align-items: center; gap: 10px; margin: 10px 4px 6px; color: #ff8a96; font: 800 12px var(--font-body); }
.wchat-new::before, .wchat-new::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,77,97,.75)); }
.wchat-new::after { background: linear-gradient(270deg, transparent, rgba(255,77,97,.75)); }
.wchat-new span { flex: none; padding: 2px 10px; border-radius: 999px; background: rgba(255,77,97,.14); border: 1px solid rgba(255,77,97,.55); }
/* a message that just came in: it slides in and its type's colour flashes along it */
.wmsg.fresh { animation: wmsg-slide .32s cubic-bezier(.2,.8,.3,1); }
.wmsg.me.fresh { animation-name: wmsg-slide-r; }
.wmsg.fresh::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc, #ffd23f) 55%, transparent), transparent 75%); animation: wmsg-flash-in 1s ease-out forwards; }
.wmsg.me.fresh::after { background: linear-gradient(270deg, color-mix(in srgb, var(--tc, #ffd23f) 55%, transparent), transparent 75%); }
@keyframes wmsg-slide { from { transform: translateX(-10px); opacity: .3; } }
@keyframes wmsg-slide-r { from { transform: translateX(10px); opacity: .3; } }
@keyframes wmsg-flash-in { from { opacity: 1; } to { opacity: 0; } }
/* 🔥 / ❤️ raining over a message that has 5 or more */
.wmsg-rain { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: 1; }
.wmsg-rain span { position: absolute; top: -26px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); animation: wmsg-emo 1.35s ease-in both; }
@keyframes wmsg-emo { 0% { transform: translateY(0) rotate(var(--r, 0deg)); opacity: 0; } 12% { opacity: 1; } 78% { opacity: 1; } 100% { transform: translateY(var(--fall, 90px)) rotate(var(--r, 0deg)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wmsg.fresh, .wmsg.fresh::after { animation: none; } .wmsg.fresh::after { display: none; } }
/* in a run: who wrote, as their Pokémon */
.chat-line .chat-av { width: calc(22px * var(--cs, 1)); height: calc(20px * var(--cs, 1)); margin: -5px 4px -3px -2px; vertical-align: middle; image-rendering: pixelated; }

/* ============ (27-10-2026) Chat refinements 2: who is typing, @ names, who joined, a trainer's card in small ============ */
.wchat-typing { position: absolute; left: 10px; bottom: 8px; z-index: 2; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 20px);
  padding: 4px 12px 4px 10px; border-radius: 999px; background: rgba(14,16,28,.94); border: 1px solid rgba(255,255,255,.1); color: #c9d4ee;
  font: 600 12.5px var(--font-body); box-shadow: 0 4px 14px rgba(0,0,0,.35); pointer-events: none; }
.wchat-typing span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wchat-stream.typing .wchat-list { padding-bottom: 38px; }
.wchat-dots { display: inline-flex; gap: 3px; font-style: normal; }
.wchat-dots b { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: wdots 1.1s ease-in-out infinite; }
.wchat-dots b:nth-child(2) { animation-delay: .15s; } .wchat-dots b:nth-child(3) { animation-delay: .3s; }
@keyframes wdots { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
/* @ names, over the box */
.wchat-ac { position: absolute; left: 18px; bottom: 78px; z-index: 6; display: flex; flex-direction: column; gap: 2px; min-width: 220px; max-width: min(360px, calc(100% - 36px));
  padding: 5px; border-radius: 12px; background: #14141d; border: 1px solid rgba(255,210,63,.35); box-shadow: 0 12px 30px rgba(0,0,0,.55); }
.wchat-ac-i { display: flex; align-items: baseline; gap: 4px; width: 100%; min-height: 34px; padding: 6px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left;
  color: #e6edff; font: 700 14px var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wchat-ac-i i { font-style: normal; color: var(--gold); }
.wchat-ac-i.on, .wchat-ac-i:hover { background: rgba(255,210,63,.14); color: #fff; }
/* who joined: a moment in Global's banner */
.wchat-joins { position: absolute; right: 16px; bottom: 10px; z-index: 2; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 32px); padding: 2px 12px 2px 6px; border-radius: 999px;
  background: rgba(20,40,28,.92); border: 1px solid rgba(95,224,138,.5); color: #c9ffd9; font: 700 12.5px var(--font-body); opacity: 0; pointer-events: none; }
.wchat-joins canvas { width: 30px; height: 28px; margin: -4px -6px -2px 0; image-rendering: pixelated; }
.wchat-joins span { margin-left: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wchat-joins.in { animation: wjoin-in .35s cubic-bezier(.2,.8,.3,1) forwards; }
.wchat-joins.out { animation: wjoin-out .45s ease-in forwards; }
@keyframes wjoin-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes wjoin-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-4px); } }
/* a trainer's card in small */
.wchat-pv { position: absolute; z-index: 30; }
.pvw { display: flex; align-items: center; gap: 10px; width: 280px; max-width: calc(100vw - 32px); padding: 10px 14px 10px 8px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 34%, #0c0e1a), color-mix(in srgb, var(--c2) 24%, #0c0e1a) 80%);
  border: 1px solid color-mix(in srgb, var(--rk) 65%, transparent); box-shadow: 0 14px 34px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.08);
  animation: pvw-in .16s ease-out; }
@keyframes pvw-in { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.pvw-ace { flex: none; width: 72px; height: 66px; border-radius: 12px; background: radial-gradient(circle at 50% 80%, rgba(255,255,255,.14), transparent 70%); }
.pvw-ace canvas { width: 72px; height: 66px; image-rendering: pixelated; }
.pvw-ace.none { display: none; }
.pvw-id { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pvw-n { max-width: 100%; font: 400 17px var(--font); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.pvw-rank { display: inline-flex; align-items: center; gap: 6px; font: 800 12px var(--font-body); color: var(--rk); }
.pvw-rank .pf-emb { width: 20px; height: 20px; font-size: 10px; }
.pvw-title { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 1px 8px; border-radius: 7px; font: 800 11px var(--font-body); color: #ffe8a3;
  background: rgba(255,210,63,.12); border: 1px solid rgba(255,210,63,.32); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pvw-chips { display: flex; flex-wrap: wrap; gap: 4px 10px; font: 700 12px var(--font-body); color: #dfe8ff; }
.pvw-chips > span { display: inline-flex; align-items: center; gap: 4px; }
.pvw-chips .dm { color: #ff8a96; }
@media (max-width: 760px) { .wchat-ac { left: 12px; bottom: 70px; } }
@media (prefers-reduced-motion: reduce) { .wchat-dots b, .pvw, .wchat-joins.in, .wchat-joins.out { animation: none; } .wchat-joins.in { opacity: 1; } .wchat-joins.out { opacity: 0; } }

/* ============ (27-10-2026) Chat refinements 3: polls, the ☺ panel's tabs, a trainer's pulls together in the Moments ============ */
/* the panel: stickers · share · poll */
.wpop-tabs { display: flex; gap: 2px; margin: -4px -4px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
.wpop-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent;
  background: none; cursor: pointer; color: var(--muted); font: 800 13.5px var(--font-body); white-space: nowrap; transition: color .12s, border-color .12s; }
.wpop-tab img { opacity: .6; transition: opacity .12s; }
.wpop-tab:hover { color: #fff; }
.wpop-tab.on { color: #fff; border-bottom-color: var(--gold); }
.wpop-tab.on img, .wpop-tab:hover img { opacity: 1; }
.wpop-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; border-radius: 8px; }
.wpop-sec { display: flex; flex-direction: column; gap: 6px; }
/* a new poll: the question, 2 to 4 answers */
.wpoll-new { display: flex; flex-direction: column; gap: 6px; }
.wpoll-new .field { padding: 8px 12px; font-size: 15px; }
.wpoll-new > .field { border-color: rgba(255,210,74,.32); }
.wpoll-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wpoll-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-top: 2px; }
/* a poll: each answer a bar that fills with its votes (yours in gold, with a check); the time left, live; at the end the winner glows */
.wpoll { --pc: #5fd8ff; display: flex; flex-direction: column; gap: 6px; width: min(100%, 420px); margin-top: 4px; padding: 10px 10px 8px; border-radius: 14px; text-align: left;
  background: radial-gradient(120% 90% at 0% 0%, rgba(255,210,74,.1), transparent 60%), #0d0e18; border: 1px solid rgba(255,210,74,.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.28); }
.wpoll-q { display: flex; align-items: flex-start; gap: 8px; margin: 0 2px 2px; font: 400 16px/1.3 var(--font); letter-spacing: .3px; color: #fff; }
.wpoll-q img { flex: none; margin-top: 1px; }
.wpoll-q span { min-width: 0; overflow-wrap: anywhere; }
.wpoll-o { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 8px 12px;
  border-radius: 10px; border: 1px solid rgba(150,180,255,.2); background: rgba(255,255,255,.035); color: #e8eeff; font: 700 14px/1.3 var(--font-body); text-align: left;
  cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .2s, opacity .2s, transform .1s; }
.wpoll-o::before { content: ''; position: absolute; inset: 0 auto 0 0; z-index: -1; width: var(--p, 0%);
  background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 14%, transparent), color-mix(in srgb, var(--pc) 34%, transparent));
  box-shadow: inset -2px 0 0 color-mix(in srgb, var(--pc) 70%, transparent); transition: width .55s cubic-bezier(.2,.8,.3,1); }
.wpoll-o[style*="--p: 0%"]::before { box-shadow: none; }
.wpoll-o:hover:not(:disabled) { border-color: rgba(255,210,74,.6); background-color: rgba(255,210,74,.06); }
.wpoll-o:active:not(:disabled) { transform: scale(.985); }
.wpoll-o:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wpoll-o:disabled { cursor: default; }
.wpoll-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wpoll-n { flex: none; display: inline-flex; align-items: center; gap: 5px; font: 800 13px var(--font-body); font-variant-numeric: tabular-nums; color: #bcd0f5; }
.wpoll-o.mine { --pc: var(--gold); border-color: rgba(255,210,74,.8); color: #fff; }
.wpoll-o.mine .wpoll-t::before { content: '✓'; margin-right: 7px; color: var(--gold); font-weight: 900; }
.wpoll-o.mine .wpoll-n { color: #ffe27a; }
.wpoll.ended .wpoll-o { opacity: .58; }
.wpoll.ended .wpoll-o.win { --pc: #ffd24a; opacity: 1; border-color: rgba(255,210,74,.95); color: #fff; box-shadow: 0 0 16px rgba(255,210,74,.3), inset 0 1px 0 rgba(255,255,255,.12); }
.wpoll-o.win .wpoll-n { color: #fff3b0; }
.wpoll-f { display: flex; align-items: center; gap: 7px; margin: 1px 2px 0; font: 700 11.5px var(--font-body); color: var(--faint); font-variant-numeric: tabular-nums; }
.wpoll:not(.ended) .wpoll-f::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: #5fe08a; box-shadow: 0 0 8px rgba(95,224,138,.8);
  animation: wpoll-live 1.8s ease-in-out infinite; }
@keyframes wpoll-live { 50% { opacity: .35; } }
.wpoll.ended .wpoll-f { color: var(--muted); }
/* the Moments: the same trainer's other pulls, in small under the card */
.wep-more { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.wep-mini { flex: none; display: inline-flex; align-items: flex-end; justify-content: center; width: 30px; height: 28px; border-radius: 8px;
  background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.wep-mini canvas { width: 30px; height: 28px; image-rendering: pixelated; }
.wep-mini.e-leg { box-shadow: inset 0 0 0 1px rgba(255,210,63,.6); }
.wep-mini.e-shiny { box-shadow: inset 0 0 0 1px rgba(154,230,255,.65), 0 0 8px rgba(154,230,255,.3); }
.wep-mini.e-mega { box-shadow: inset 0 0 0 1px rgba(255,130,220,.62), 0 0 8px rgba(255,100,220,.28); }
.wep-more small { margin-left: 4px; font: 700 12px var(--font-body); color: #dfe6ff; }
@media (max-height: 520px), (max-width: 560px) {
  .wpoll { padding: 8px 8px 6px; gap: 5px; }
  .wpoll-q { font-size: 14px; }
  .wpoll-o { min-height: 36px; padding: 6px 10px; font-size: 13px; }
  .wpop-tab { min-height: 34px; padding: 0 9px; font-size: 12.5px; }
  .wep-mini, .wep-mini canvas { width: 26px; height: 24px; }
}
@media (max-width: 560px) { .wpoll-opts { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .wpoll-o::before { transition: none; } .wpoll:not(.ended) .wpoll-f::before { animation: none; } }

/* ============ (27-10-2026) The trainer's level (ui/level.js): a pixel gem with its number; a rank every 10 levels ============ */
/* the gem: an outline hexagon, its face lit from the top; the colours are the rank's, the glow and the motion come with the higher ones */
.lvb { --h: 18px; --c1: #f3b47c; --c2: #a35a27; --ce: #3d1b06; --tx: #fff3e6; --gl: transparent;
  position: relative; isolation: isolate; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 1px;
  height: var(--h); min-width: calc(var(--h) * 1.55); padding: 0 calc(var(--h) * .4); vertical-align: middle; box-sizing: border-box;
  font: 400 calc(var(--h) * .64)/1 var(--font); letter-spacing: .02em; color: var(--tx); text-shadow: 0 1px 0 rgba(0,0,0,.45);
  filter: drop-shadow(0 0 calc(var(--h) * .22) var(--gl)); }
.lvb b { font: inherit; position: relative; top: .04em; }
.lvb::before, .lvb::after { content: ''; position: absolute; z-index: -1;
  clip-path: polygon(calc(var(--h) * .3) 0, calc(100% - var(--h) * .3) 0, 100% 50%, calc(100% - var(--h) * .3) 100%, calc(var(--h) * .3) 100%, 0 50%); }
.lvb::before { inset: 0; background: var(--ce); }
.lvb::after { inset: max(1.5px, calc(var(--h) * .08));
  background: linear-gradient(180deg, rgba(255,255,255,.34) 0 20%, transparent 20%), linear-gradient(180deg, var(--c1), var(--c2)); }
.lvb.lv-m { --h: 24px; }
.lvb.lv-l { --h: 40px; }
.lvb.lv-xl { --h: 88px; }
/* Bronze · Silver · Gold · Emerald · Sapphire · Ruby · Amethyst · Diamond · Master · Legend */
.lvb.g1 { --c1: #ffffff; --c2: #a9b7cc; --ce: #283244; --tx: #1c2433; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.lvb.g2 { --c1: #fff0a8; --c2: #e6a51e; --ce: #4a2f00; --tx: #3b2500; text-shadow: 0 1px 0 rgba(255,255,255,.55); --gl: rgba(255,200,40,.35); }
.lvb.g3 { --c1: #8ff7bd; --c2: #11a457; --ce: #04361d; --tx: #f0fff6; --gl: rgba(60,230,140,.45); }
.lvb.g4 { --c1: #9fd2ff; --c2: #2563d6; --ce: #0a1d4a; --tx: #f2f8ff; --gl: rgba(80,160,255,.5); }
.lvb.g5 { --c1: #ff9cae; --c2: #cc1840; --ce: #48061a; --tx: #fff2f5; --gl: rgba(255,60,100,.5); }
.lvb.g6 { --c1: #ddb8ff; --c2: #7a3be0; --ce: #290c54; --tx: #fcf7ff; --gl: rgba(170,110,255,.55); }
.lvb.g7 { --c1: #ffffff; --c2: #8fe3ff; --ce: #0f4458; --tx: #0b2f3d; text-shadow: 0 1px 0 rgba(255,255,255,.7); --gl: rgba(150,235,255,.6); }
.lvb.g8 { --c1: #ffa6ec; --c2: #8a24cf; --ce: #300848; --tx: #ffffff; --gl: rgba(230,90,255,.6); }
.lvb.g9 { --c1: #fff6b0; --c2: #ff7d3a; --ce: #ff5d5d; --tx: #3a1300; text-shadow: 0 1px 0 rgba(255,255,255,.5); --gl: rgba(255,170,60,.65); }
/* Diamond and up: a light sweeps the face now and then; Legend: its outline flows through the colours */
.lvb.g7::after, .lvb.g8::after, .lvb.g9::after {
  background: linear-gradient(100deg, transparent 42%, rgba(255,255,255,.85) 50%, transparent 58%) 100% 0 / 300% 100% no-repeat,
    linear-gradient(180deg, rgba(255,255,255,.34) 0 20%, transparent 20%), linear-gradient(180deg, var(--c1), var(--c2));
  animation: lvb-shine 5s ease-in-out infinite; }
@keyframes lvb-shine { 0%, 62% { background-position: 100% 0, 0 0, 0 0; } 88%, 100% { background-position: 0% 0, 0 0, 0 0; } }
.lvb.g9::before { background: linear-gradient(90deg, #ff5d5d, #ffd24a, #5fe08a, #5fd8ff, #b77bff, #ff5d5d) 0 0 / 200% 100%; animation: lvb-flow 3s linear infinite; }
@keyframes lvb-flow { to { background-position: 200% 0; } }
/* from level 100: the ranks again in a mythic frame (obsidian, gold edge, the rank's colour in the number), a star a hundred */
.lvb.my { --tx: var(--c1); --gl: rgba(255,210,74,.55); text-shadow: 0 0 calc(var(--h) * .3) var(--c2), 0 1px 0 #000; }
.lvb.my::before { background: linear-gradient(180deg, #fff3b0, #d8981a 60%, #8a5a00); animation: none; }
.lvb.my::after { background: linear-gradient(180deg, rgba(255,255,255,.1) 0 20%, transparent 20%), radial-gradient(120% 140% at 50% 0%, #3a2f63, #120d24 70%); animation: none; }
.lvb-st { font: 400 calc(var(--h) * .42)/1 var(--font); color: #ffd24a; text-shadow: 0 0 4px rgba(255,210,74,.9); letter-spacing: -.05em; }
.lvb.my.lv-l, .lvb.my.lv-xl { animation: lvb-aura 3.2s ease-in-out infinite; }
@keyframes lvb-aura { 50% { filter: drop-shadow(0 0 calc(var(--h) * .42) rgba(255,210,74,.8)); } }
/* where it sits: by names in the chat and on the small card; on the trainer card with its bar; your pill in the top bar */
.wmsg-top .lvb { align-self: center; }
.pvw-nl { display: flex; align-items: center; gap: 7px; max-width: 100%; min-width: 0; }
.pvw-nl .pvw-n { min-width: 0; }
.pf-lv { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.pf-lv[hidden] { display: none; }
.pf-lv-t { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.pf-lv-t b { font: 400 16px var(--font); color: #fff; letter-spacing: .02em; }
.pf-lv-t small { font: 700 12px var(--font-body); color: var(--muted); }
.pf-lv-bar { display: block; width: min(220px, 46vw); height: 6px; margin-top: 3px; border-radius: 3px; overflow: hidden; background: rgba(255,255,255,.12); box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.pf-lv-bar i { display: block; width: var(--w); height: 100%; background: linear-gradient(90deg, #ffb21e, #ffe27a); box-shadow: 0 0 8px rgba(255,210,74,.5); }
.pf-lv-xp { font-variant-numeric: tabular-nums; }
#user-pill.lvp { position: relative; }
#user-pill.lvp::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, var(--gold) 0 var(--xp, 0%), rgba(255,255,255,.14) var(--xp, 0%)); }
.lvgain { position: fixed; z-index: 60; transform: translateX(-50%); pointer-events: none; white-space: nowrap; font: 400 13px var(--font); color: #8ff0b0;
  text-shadow: 0 0 6px rgba(143,240,176,.7), 0 1px 0 #000; animation: lvgain 1.3s ease-out forwards; }
@keyframes lvgain { from { opacity: 0; transform: translate(-50%, -6px); } 18% { opacity: 1; } to { opacity: 0; transform: translate(-50%, 12px); } }
/* a level up: the gem pops, a ring and sparks in its colour, the rank when it is a new one */
.lvup { --lc: #e9a46a; --top: 14vh; --bh: 88px; --bc: calc(var(--top) + var(--bh) / 2); position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: var(--top) 16px 0; cursor: pointer;
  background: radial-gradient(circle at 50% var(--bc), color-mix(in srgb, var(--lc) 24%, transparent), transparent 220px),
    radial-gradient(ellipse 75% 60% at 50% 30%, rgba(8,6,20,.9), rgba(8,6,20,.64) 60%, rgba(8,6,20,.42));
  animation: lvup-in .35s ease-out both; }
.lvup.g1 { --lc: #dfe7f3; } .lvup.g2 { --lc: #ffd24a; } .lvup.g3 { --lc: #4fe08f; } .lvup.g4 { --lc: #5aa8ff; } .lvup.g5 { --lc: #ff5d7a; }
.lvup.g6 { --lc: #b77bff; } .lvup.g7 { --lc: #bff4ff; } .lvup.g8 { --lc: #ff6ad5; } .lvup.g9 { --lc: #ffb347; } .lvup.my { --lc: #ffd24a; }
.lvup.out { animation: lvup-out .5s ease-in forwards; }
.lvup .lvb { animation: lvup-pop .7s cubic-bezier(.2,.9,.25,1.35) .05s both; }
.lvup.my .lvb { animation: lvup-pop .7s cubic-bezier(.2,.9,.25,1.35) .05s both, lvb-aura 3.2s ease-in-out .8s infinite; }
.lvup-t { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; animation: lvup-up .5s ease-out .25s both; }
.lvup-t b { font: 400 34px var(--font); color: #fff; letter-spacing: .04em; text-shadow: 0 0 18px color-mix(in srgb, var(--lc) 60%, transparent), 0 3px 0 rgba(0,0,0,.6); }
.lvup-t small { font: 800 15px var(--font-body); color: var(--lc); }
.lvup.rank .lvup-t small { font-size: 17px; text-shadow: 0 0 12px color-mix(in srgb, var(--lc) 70%, transparent); }
.lvup-ring { position: absolute; left: 50%; top: var(--bc); width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; border: 3px solid var(--lc); pointer-events: none;
  animation: lvup-ring 1s ease-out .1s both; }
.lvup.rank .lvup-ring { box-shadow: 0 0 22px var(--lc), inset 0 0 22px var(--lc); }
.lvup-sparks { position: absolute; left: 50%; top: var(--bc); width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; pointer-events: none; color: var(--lc);
  box-shadow: 0 -74px currentColor, 52px -52px currentColor, 74px 0 currentColor, 52px 52px currentColor, 0 74px currentColor, -52px 52px currentColor, -74px 0 currentColor, -52px -52px currentColor,
    28px -68px #fff, 68px -28px #fff, 68px 28px #fff, 28px 68px #fff, -28px 68px #fff, -68px 28px #fff, -68px -28px #fff, -28px -68px #fff;
  animation: lvup-sparks .9s ease-out .15s both; }
@keyframes lvup-in { from { opacity: 0; } }
@keyframes lvup-out { to { opacity: 0; } }
@keyframes lvup-pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes lvup-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes lvup-ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
@keyframes lvup-sparks { from { transform: scale(.25); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
/* the Moments: every 10 levels a card, the gem as its picture */
.ep-lvl { --ep1: rgba(255,210,74,.2); --ep2: rgba(120,80,255,.16); --epb: rgba(255,226,140,.6); --epg: rgba(255,210,74,.2); --eph: #ffe27a; }
.ep-lvl .wep-art { align-items: center; }
@media (max-height: 520px), (max-width: 560px) {
  .lvup { --top: 8vh; --bh: 64px; gap: 10px; }
  .lvup .lvb.lv-xl { --h: 64px; }
  .lvup-t b { font-size: 26px; }
  .lvup-ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
  .ep-lvl .wep-art .lvb { --h: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .lvb, .lvb::before, .lvb::after, .lvup, .lvup .lvb, .lvup-t, .lvgain { animation: none !important; }
  .lvup-ring, .lvup-sparks { display: none; }
}

/* ============ (29-10-2026) Season pass screen (js/ui/pass-ui.js, data js/data/battlepass.js) ============
   One game screen: a world canvas (sky, giant eclipse, altar, the partner) behind the reward's name, its collectible card
   and the level panel; at the bottom a draggable strip of 30 tiers (Supporter card above, Free card below). The screen
   is not zoomed by --uiz: .bp-app zooms itself by --bpz (pass-ui.js fit()) and its vh-based sizes divide by it. */
@property --bpang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
html body > #scr-pass#scr-pass { zoom: 1; }
#scr-pass { --bpz: 1; --vh: calc(1vh / var(--bpz)); --vw: calc(1vw / var(--bpz)); padding: 0; background: #000; overflow: hidden auto; z-index: 21;
  --bp-ink: #f6f3ff; --bp-muted: #b9b3d6; --bp-faint: #7d77a0; --bp-gold: #ffd24a; --bp-gold2: #f4a21f; --bp-corona: #ffb347; --bp-violet: #8b5cff;
  --bp-green: #5fe08a; --bp-red: #ff5f6d; --bp-cyan: #5fd8ff; --r1: #a7b4c8; --r2: #5fe08a; --r3: #4fb4ff; --r4: #c47bff; --r5: #ffcb3d;
  --bp-display: 'Pixelify', 'Segoe UI', system-ui, sans-serif; --bp-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --cw: clamp(112px, calc(9 * var(--vw)), 160px); --ph: clamp(120px, calc(19 * var(--vh)), 214px); --fh: clamp(92px, calc(13 * var(--vh)), 156px);
  color: var(--bp-ink); font-family: var(--bp-body); font-variant-ligatures: none; -webkit-tap-highlight-color: transparent; }
#scr-pass * { box-sizing: border-box; font-variant-ligatures: none; }
#scr-pass button { font: inherit; color: inherit; cursor: pointer; }
#scr-pass button:focus-visible, #scr-pass summary:focus-visible, #scr-pass input:focus-visible { outline: 2px solid var(--bp-gold); outline-offset: 3px; }
#scr-pass:not(.hidden) { display: block; }          /* not the centring flex box of .scr: the screen lays itself out */
#bp-world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
#bp-fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; }
#bp-flash { position: fixed; inset: 0; z-index: 79; pointer-events: none; background: #fff6e0; opacity: 0; }
#scr-pass .bp-app { position: relative; z-index: 1; zoom: var(--bpz); display: grid; gap: 8px; min-height: calc(100dvh / var(--bpz));
  padding: max(10px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
@media (min-width: 980px) and (min-height: 600px) {
  #scr-pass { overflow: hidden; }
  #scr-pass .bp-app { height: calc(100dvh / var(--bpz)); grid-template-rows: auto minmax(0, 1fr) auto auto; }
}

/* top bar */
#scr-pass .bp-top { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
#scr-pass .bp-back { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(14,9,24,.8); font-size: 22px; font-family: var(--bp-display); display: grid; place-items: center; flex: none; }
#scr-pass .bp-logo { display: flex; align-items: center; gap: 14px; min-width: 0; }
#scr-pass .bp-ecl { width: 50px; height: 50px; border-radius: 50%; flex: none; position: relative; background: #030206;
  box-shadow: 0 0 0 2px #ffe9b8, 0 0 14px 4px rgba(255,190,90,.9), 0 0 40px 10px rgba(255,120,50,.45), 0 0 80px 20px rgba(139,92,255,.3); }
#scr-pass .bp-ecl::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; z-index: -1;
  background: repeating-conic-gradient(from var(--bpang), rgba(255,210,140,.75) 0 2deg, transparent 2deg 9deg);
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 56%, transparent 72%); mask: radial-gradient(circle, transparent 52%, #000 56%, transparent 72%); animation: bp-spin 24s linear infinite; }
#scr-pass .bp-ecl::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; right: 3px; top: 5px; background: #fff; box-shadow: 0 0 10px 4px #fff, 0 0 24px 8px rgba(255,220,160,.8); animation: bp-twinkle 2.2s ease-in-out infinite; }
@keyframes bp-spin { to { --bpang: 360deg; } }
@keyframes bp-twinkle { 50% { transform: scale(.55); opacity: .7; } }
#scr-pass .bp-ltxt { display: grid; line-height: 1; gap: 4px; }
#scr-pass .bp-ltxt small { font-family: var(--bp-display); font-size: 12px; letter-spacing: .42em; color: var(--bp-corona); text-transform: uppercase; }
#scr-pass .bp-ltxt h1 { margin: 0; font-family: var(--bp-display); font-weight: 700; font-size: clamp(30px, calc(3.4 * var(--vw)), 50px); letter-spacing: .08em; line-height: .9; }
#scr-pass .bp-metal, #bp-scene .bp-metal, #bp-lvup .bp-metal, #bp-modal .bp-metal { background: linear-gradient(180deg, #fffaf0 0%, #ffe9a8 30%, #ffd24a 48%, #f4a21f 62%, #b5571c 80%, #ffd27a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #4a1d05) drop-shadow(0 0 16px rgba(255,170,70,.45)); }
#scr-pass .bp-clock { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(10,6,18,.7); border: 1px solid rgba(255,255,255,.1);
  font-variant-numeric: tabular-nums; font-size: 13px; color: var(--bp-muted); }
#scr-pass .bp-clock b { color: var(--bp-ink); font-family: var(--bp-display); font-size: 15px; letter-spacing: .04em; font-weight: 400; }
#scr-pass .bp-clock i { width: 8px; height: 8px; border-radius: 50%; background: var(--bp-red); box-shadow: 0 0 10px var(--bp-red); animation: bp-blink 1.4s infinite; }
@keyframes bp-blink { 50% { opacity: .25; } }
#scr-pass .bp-tr { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
#scr-pass .bp-who { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(10,6,18,.7); border: 1px solid rgba(255,255,255,.1); }
#scr-pass .bp-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 40% 30%, #3a2a5c, #0c0716); border: 2px solid rgba(255,255,255,.2); }
#scr-pass .bp-av canvas { width: 34px; height: 34px; }
#scr-pass .bp-av.on { border-color: var(--bp-gold); box-shadow: 0 0 0 2px rgba(255,210,74,.3), 0 0 16px rgba(255,179,71,.7); }
#scr-pass .bp-who b { font-size: 14px; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#scr-pass .bp-ttl { font-family: var(--bp-display); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; color: #2a1600;
  background: linear-gradient(90deg, #ffd24a, #fff3c4, #ffb347, #ffd24a); background-size: 300% 100%; animation: bp-flow 3s linear infinite; box-shadow: 0 0 12px rgba(255,179,71,.6); }
@keyframes bp-flow { to { background-position: -300% 0; } }
#scr-pass .bp-chip { display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(10,6,18,.7); border: 1px solid rgba(255,255,255,.1);
  font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14px; }
#scr-pass .bp-chip img { width: 26px; height: 26px; }
#scr-pass .bp-chip.bump { animation: bp-bump .4s ease-out; }
@keyframes bp-bump { 40% { transform: scale(1.2); border-color: #ffd24a; box-shadow: 0 0 20px rgba(255,210,74,.6); } }

/* stage */
#scr-pass .bp-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr) minmax(280px, .85fr); gap: 18px; min-height: 0; }
#scr-pass .bp-info { display: flex; flex-direction: column; justify-content: center; gap: 9px; min-width: 0; padding: 6px 0; }
#scr-pass .bp-rline { display: flex; align-items: center; gap: 10px; font-family: var(--bp-display); font-size: 13px; letter-spacing: .38em; text-transform: uppercase; color: var(--rc, #ffd24a); }
#scr-pass .bp-rline::before, #scr-pass .bp-rline::after { content: ""; height: 2px; width: 34px; background: linear-gradient(90deg, transparent, currentColor); box-shadow: 0 0 8px currentColor; }
#scr-pass .bp-rline::after { transform: scaleX(-1); }
#scr-pass .bp-hname { margin: 0; font-family: var(--bp-display); font-weight: 700; font-size: clamp(28px, min(calc(4.2 * var(--vw)), calc(7 * var(--vh))), 66px); line-height: .95; letter-spacing: .02em; text-wrap: balance;
  background: linear-gradient(100deg, #fff 0%, #fff 30%, var(--rc, #fff) 45%, #fff 50%, var(--rc, #fff) 55%, #fff 70%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: bp-sheen 5s ease-in-out infinite;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.8)) drop-shadow(0 0 22px color-mix(in srgb, var(--rc, #fff) 55%, transparent)); }
@keyframes bp-sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
#scr-pass .bp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
#scr-pass .bp-tag { font-family: var(--bp-display); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(255,255,255,.18); color: var(--bp-muted); background: rgba(10,6,18,.55); }
#scr-pass .bp-tag.p { color: var(--bp-gold); border-color: rgba(255,210,74,.5); background: rgba(255,210,74,.08); }
#scr-pass .bp-tag.ms { color: var(--bp-corona); border-color: rgba(255,179,71,.5); }
#scr-pass .bp-loot { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
#scr-pass .bp-loot li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 12px; background: rgba(10,6,18,.6); border: 1px solid rgba(255,255,255,.1); font-size: 14px; color: var(--bp-muted); }
#scr-pass .bp-loot li b { color: var(--bp-ink); }
#scr-pass .bp-loot img { width: 30px; height: 30px; }
#scr-pass .bp-desc { margin: 0; font-size: 13px; color: var(--bp-muted); max-width: 46ch; }
#scr-pass .bp-cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.bp-btn { position: relative; overflow: hidden; border-radius: 12px; padding: 13px 22px; font-family: 'Pixelify', 'Segoe UI', system-ui, sans-serif; font-weight: 700; font-size: 17px; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.2); background: rgba(20,14,32,.9); color: #f6f3ff; transition: transform .12s, filter .12s; }
.bp-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.12); }
.bp-btn:active:not(:disabled) { transform: translateY(1px); }
.bp-btn:disabled { opacity: .55; cursor: default; }
.bp-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); transform: translateX(-120%); }
.bp-btn.shine::after { animation: bp-btnshine 2.8s ease-in-out infinite; }
@keyframes bp-btnshine { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.bp-btn.is-gold { color: #2b1500; border: 0; background: linear-gradient(180deg, #fff2b3 0%, #ffd24a 35%, #f4a21f 70%, #c96a12 100%);
  box-shadow: inset 0 1px 0 #fff8d8, inset 0 -3px 0 rgba(120,50,0,.5), 0 5px 0 #6b3307, 0 0 34px rgba(255,170,60,.55); text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.bp-btn.is-go { color: #032312; border: 0; background: linear-gradient(180deg, #d8ffe5 0%, #7ff0a6 35%, #5fe08a 70%, #239a52 100%);
  box-shadow: inset 0 1px 0 #f0fff5, inset 0 -3px 0 rgba(0,80,30,.45), 0 5px 0 #145c31, 0 0 30px rgba(95,224,138,.5); }
.bp-btn.is-go.pulse { animation: bp-gopulse 1.3s ease-in-out infinite; }
@keyframes bp-gopulse { 50% { box-shadow: inset 0 1px 0 #f0fff5, inset 0 -3px 0 rgba(0,80,30,.45), 0 5px 0 #145c31, 0 0 56px rgba(95,224,138,.9); } }
.bp-btn.is-big { font-size: 19px; padding: 15px 26px; }

#scr-pass .bp-mid { position: relative; min-height: 280px; display: grid; place-items: center end; padding-right: 4%; }
#scr-pass .bp-mid .bp-tc.hero { --cw: clamp(156px, min(calc(13 * var(--vw)), calc(26 * var(--vh))), 236px); --ph: clamp(210px, calc(35 * var(--vh)), 330px); }
#scr-pass .bp-side { display: flex; flex-direction: column; justify-content: center; gap: 12px; min-width: 0; }
#scr-pass .bp-glass { border-radius: 18px; background: linear-gradient(180deg, rgba(22,14,38,.78), rgba(8,5,14,.86)); border: 1px solid rgba(255,255,255,.1); padding: 12px 14px; position: relative; display: grid; gap: 10px; }
#scr-pass .bp-lvl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
#scr-pass .bp-emb { position: relative; width: 80px; height: 80px; display: grid; place-items: center; }
#scr-pass .bp-emb svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
#scr-pass .bp-emb svg circle { transition: stroke-dashoffset .8s cubic-bezier(.3,.8,.3,1); }
#scr-pass .bp-hex { width: 58px; height: 64px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; background: linear-gradient(160deg, #fff1b8, #ffd24a 30%, #f4a21f 60%, #7a3a0a); }
#scr-pass .bp-hex span { width: 51px; height: 57px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; align-content: center; gap: 2px; background: radial-gradient(circle at 50% 30%, #2b1a48, #08040f 75%); }
#scr-pass .bp-emb small { font-family: var(--bp-display); font-size: 9px; letter-spacing: .25em; color: var(--bp-corona); line-height: 1; }
#scr-pass .bp-emb b { font-family: var(--bp-display); font-size: 26px; line-height: 1; }
#scr-pass .bp-emb.pop { animation: bp-embpop .7s cubic-bezier(.2,1.6,.4,1); }
@keyframes bp-embpop { 30% { transform: scale(1.3) rotate(-6deg); filter: brightness(1.8); } }
#scr-pass .bp-lvt { display: grid; gap: 6px; min-width: 0; }
#scr-pass .bp-lvt strong { font-family: var(--bp-display); font-size: 21px; letter-spacing: .04em; line-height: 1.1; }
#scr-pass .bp-lvt span { font-size: 12px; color: var(--bp-muted); font-variant-numeric: tabular-nums; }
#scr-pass .bp-bar { position: relative; height: 16px; border-radius: 999px; background: #07040d; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 2px 6px rgba(0,0,0,.8); }
#scr-pass .bp-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; width: 0; transition: width .8s cubic-bezier(.3,.8,.3,1);
  background: linear-gradient(90deg, #5a22c8, #8b5cff 35%, #ffb347 80%, #fff3cf); box-shadow: 0 0 16px rgba(255,170,70,.7); }
#scr-pass .bp-bar i::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(115deg, rgba(255,255,255,.22) 0 7px, transparent 7px 16px) 0 0 / 34.8px 100%; animation: bp-stripes .9s linear infinite; }
@keyframes bp-stripes { to { background-position: 34.8px 0; } }
#scr-pass .bp-bar i::after { content: ""; position: absolute; right: -9px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle, #fff 0 25%, rgba(255,220,160,.7) 40%, transparent 70%); }
#scr-pass .bp-lvrow2 { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
#scr-pass .bp-lvrow2 .bp-btn { flex: 1 1 180px; }
#scr-pass .bp-ways { font-size: 12px; color: var(--bp-muted); }
#scr-pass .bp-ways summary { cursor: pointer; list-style: none; font-family: var(--bp-display); letter-spacing: .1em; font-size: 12px; color: var(--bp-corona); text-transform: uppercase; }
#scr-pass .bp-ways summary::-webkit-details-marker { display: none; }
#scr-pass .bp-ways summary::before { content: "+ "; }
#scr-pass .bp-ways[open] summary::before { content: "− "; }
#scr-pass .bp-ways ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
#scr-pass .bp-ways li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed rgba(255,255,255,.08); padding-bottom: 3px; }
#scr-pass .bp-ways li b { color: var(--bp-gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
#scr-pass .bp-promo { padding: 12px 14px; border-radius: 18px; position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,179,71,.28), transparent 60%), linear-gradient(180deg, #2a1708, #0d0704); }
#scr-pass .bp-promo::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; z-index: 2; pointer-events: none;
  background: conic-gradient(from var(--bpang), #ffd24a, #fff4c8, #f4a21f, #7a3a0a, #ffd24a, #fff4c8, #f4a21f, #7a3a0a, #ffd24a);
  -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: bp-spin 6s linear infinite; }
#scr-pass .bp-promo h3 { margin: 0 0 8px; font-family: var(--bp-display); font-size: 19px; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; }
#scr-pass .bp-promo h3 img { width: 30px; height: 30px; }
#scr-pass .bp-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 0 0 10px; padding: 0; list-style: none; }
#scr-pass .bp-perks li { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: #ffe9c2; }
#scr-pass .bp-perks img { width: 22px; height: 22px; flex: none; }
#scr-pass .bp-promo .bp-btn { width: 100%; padding: 11px 16px; font-size: 16px; }
#scr-pass .bp-promo.on { background: radial-gradient(120% 90% at 100% 0%, rgba(95,224,138,.22), transparent 60%), linear-gradient(180deg, #0f2416, #050c07); }
#scr-pass .bp-promo.on h3 { color: var(--bp-green); margin: 0; }
#scr-pass .bp-promo p { margin: 0 0 10px; font-size: 12px; color: #ffe9c2; }

/* track */
#scr-pass .bp-track { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
#scr-pass .bp-lanes { display: grid; grid-template-rows: 40px var(--ph) var(--fh); gap: 8px; padding-top: 6px; }
#scr-pass .bp-lanes div { display: grid; place-items: center; writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--bp-display); font-size: 13px; letter-spacing: .3em; text-transform: uppercase; border-radius: 10px; }
#scr-pass .bp-lanes .p { color: var(--bp-gold); background: linear-gradient(0deg, rgba(255,210,74,.02), rgba(255,210,74,.14)); border: 1px solid rgba(255,210,74,.35); text-shadow: 0 0 10px rgba(255,179,71,.7); }
#scr-pass .bp-lanes .f { color: var(--bp-muted); background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); }
#scr-pass .bp-strip { position: relative; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; cursor: grab; padding: 6px 30px 10px 6px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 2%, #000 96%, transparent); mask: linear-gradient(90deg, transparent, #000 2%, #000 96%, transparent); }
#scr-pass .bp-strip::-webkit-scrollbar { display: none; }
#scr-pass .bp-strip.drag { cursor: grabbing; }
#scr-pass .bp-tiers { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: var(--cw); gap: 12px; width: max-content; }
#scr-pass .bp-tier { display: grid; grid-template-rows: 40px var(--ph) var(--fh); gap: 8px; justify-items: center; }
#scr-pass .bp-energy { position: absolute; top: 17px; height: 6px; left: calc(var(--cw) / 2); border-radius: 999px; background: rgba(255,255,255,.07); pointer-events: none; }
#scr-pass .bp-energy i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #8b5cff, #ffb347, #fff2c8); box-shadow: 0 0 14px rgba(255,170,70,.9), 0 0 30px rgba(139,92,255,.6); transition: width .9s cubic-bezier(.3,.8,.3,1); }
#scr-pass .bp-energy i::after { content: ""; position: absolute; right: -12px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: radial-gradient(circle, #fff 0 22%, rgba(255,210,140,.8) 40%, transparent 70%); animation: bp-twinkle 1.2s ease-in-out infinite; }
#scr-pass .bp-badge { position: relative; z-index: 1; width: 40px; height: 44px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; background: #2a2440; align-self: center; }
#scr-pass .bp-badge b { width: 34px; height: 38px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; background: #0b0814; font-family: var(--bp-display); font-size: 15px; color: var(--bp-faint); }
#scr-pass .bp-badge.on { background: linear-gradient(160deg, #fff1b8, #ffd24a 35%, #f4a21f 70%, #7a3a0a); }
#scr-pass .bp-badge.on b { color: var(--bp-gold); background: radial-gradient(circle at 50% 30%, #3b2410, #0d0603); }
#scr-pass .bp-badge.cur { background: #fff; }
#scr-pass .bp-badge.cur b { color: #fff; background: radial-gradient(circle at 50% 30%, #3b2a5c, #0b0814); }
#scr-pass .bp-badge.ms { width: 46px; height: 50px; } #scr-pass .bp-badge.ms b { width: 40px; height: 44px; font-size: 17px; }
#scr-pass .bp-scrub { position: relative; height: 6px; margin: 2px 30px 0 48px; border-radius: 999px; background: rgba(255,255,255,.07); cursor: pointer; }
#scr-pass .bp-scrub i { position: absolute; top: 0; bottom: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(255,255,255,.45), rgba(255,210,140,.6)); }
#scr-pass .bp-scrub b { position: absolute; top: -3px; width: 2px; height: 12px; background: rgba(255,179,71,.7); }
#scr-pass .bp-nav { position: absolute; top: calc(6px + 40px + 8px + var(--ph) - 22px); z-index: 5; width: 42px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(14,9,24,.88); font-size: 22px; font-family: var(--bp-display); box-shadow: 0 6px 18px rgba(0,0,0,.6); }
#scr-pass .bp-nav.l { left: 36px; } #scr-pass .bp-nav.r { right: 0; }
#scr-pass .bp-after { margin: 4px 0 0 48px; font-size: 12px; color: var(--bp-faint); }

/* reward card */
.bp-tc { --rc: var(--r1, #a7b4c8); position: relative; width: var(--cw); height: var(--ph); border-radius: 16px; overflow: hidden; isolation: isolate; padding: 0; border: 0; display: block; color: #f6f3ff;
  background: radial-gradient(130% 75% at 50% 18%, color-mix(in srgb, var(--rc) 42%, #120a20) 0%, #0d0817 62%, #07050c 100%);
  transform: perspective(800px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)) translateY(var(--lift, 0px)); transition: transform .25s ease-out, filter .25s, box-shadow .25s; user-select: none; -webkit-user-select: none; }
.bp-tc.f { height: var(--fh); }
.bp-tc.r2 { --rc: #5fe08a; } .bp-tc.r3 { --rc: #4fb4ff; } .bp-tc.r4 { --rc: #c47bff; } .bp-tc.r5 { --rc: #ffcb3d; } .bp-tc.r6 { --rc: #ff9de6; }
.bp-tc.r6 { background: radial-gradient(130% 75% at 50% 18%, rgba(255,157,230,.45), #120a20 62%, #07050c); }
.bp-tc::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; z-index: 6; pointer-events: none;
  background: linear-gradient(160deg, var(--rc), color-mix(in srgb, var(--rc) 20%, transparent) 35%, color-mix(in srgb, var(--rc) 20%, transparent) 65%, var(--rc));
  -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); }
.bp-tc.r4::before, .bp-tc.r5::before { padding: 2.5px; background: conic-gradient(from var(--bpang), var(--rc), #fff, var(--rc), color-mix(in srgb, var(--rc) 30%, #000), var(--rc), #fff, var(--rc), color-mix(in srgb, var(--rc) 30%, #000), var(--rc)); animation: bp-spin 5s linear infinite; }
.bp-tc.r6::before { padding: 3px; background: conic-gradient(from var(--bpang), #ff5f6d, #ffd24a, #5fe08a, #5fd8ff, #c47bff, #ff5f6d); animation: bp-spin 3s linear infinite; }
.bp-tc-rays { position: absolute; left: 50%; top: 38%; width: 260%; aspect-ratio: 1; translate: -50% -50%; z-index: 0; opacity: .5;
  background: repeating-conic-gradient(from var(--bpang), color-mix(in srgb, var(--rc) 30%, transparent) 0 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 8%, transparent 42%); mask: radial-gradient(circle, #000 8%, transparent 42%); animation: bp-spin 40s linear infinite; }
.bp-tc.r1 .bp-tc-rays, .bp-tc.r2 .bp-tc-rays { opacity: .22; }
.bp-tc.r5 .bp-tc-rays, .bp-tc.r6 .bp-tc-rays { opacity: .8; animation-duration: 18s; }
.bp-tc-art { position: absolute; left: 50%; top: 6%; width: 86%; aspect-ratio: 1; translate: -50% 0; z-index: 1; object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,.7)) drop-shadow(0 0 14px color-mix(in srgb, var(--rc) 55%, transparent)); animation: bp-float 3.2s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -.37s); }
.bp-tc.f .bp-tc-art { width: 66%; top: 4%; }
@keyframes bp-float { to { transform: translateY(-6px) scale(1.03); } }
.bp-tc-amt { position: absolute; left: 4px; right: 4px; bottom: 34px; z-index: 2; text-align: center; font-family: 'Pixelify', system-ui, sans-serif; font-weight: 700; font-size: clamp(15px, 1.35vw, 22px); line-height: 1.05;
  text-shadow: 0 2px 0 #000, 0 0 12px color-mix(in srgb, var(--rc) 70%, transparent); overflow-wrap: normal; word-break: keep-all; }
.bp-tc-kd { position: absolute; left: 4px; right: 4px; bottom: 21px; z-index: 2; text-align: center; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--rc) 55%, #fff); line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-tc.f .bp-tc-amt { bottom: 32px; font-size: clamp(14px, 1.2vw, 19px); }
.bp-tc-rar { position: absolute; left: 0; right: 0; bottom: 0; height: 17px; z-index: 3; display: grid; place-items: center; font-family: 'Pixelify', system-ui, sans-serif; font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: #120a00; background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 70%, #000), var(--rc), color-mix(in srgb, var(--rc) 70%, #000)); }
.bp-tc.r6 .bp-tc-rar { background: linear-gradient(90deg, #ff5f6d, #ffd24a, #5fe08a, #5fd8ff, #c47bff, #ff5f6d); background-size: 300% 100%; animation: bp-flow 4s linear infinite; }
.bp-tc-holo { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .3s; mix-blend-mode: color-dodge;
  background: linear-gradient(115deg, transparent 25%, rgba(255,60,180,.35) 38%, rgba(60,255,255,.35) 47%, rgba(255,255,80,.35) 56%, transparent 70%) var(--hx, 50%) var(--hy, 50%) / 260% 260%; }
.bp-tc.r5 .bp-tc-holo, .bp-tc.r6 .bp-tc-holo { opacity: .35; }
.bp-tc:hover .bp-tc-holo, .bp-tc.hero .bp-tc-holo { opacity: .75; }
.bp-tc-x { position: absolute; top: 7px; left: 7px; z-index: 5; display: flex; align-items: center; gap: 3px; padding: 2px 7px 2px 3px; border-radius: 999px; background: rgba(0,0,0,.72); border: 1px solid rgba(95,216,255,.5); font-size: 11px; font-weight: 900; color: #5fd8ff; }
.bp-tc-x.g { border-color: rgba(255,210,74,.6); color: #ffd24a; }
.bp-tc-x img { width: 16px; height: 16px; }
.bp-tc-ms { position: absolute; top: 5px; right: 8px; z-index: 5; font-size: 15px; color: var(--rc); text-shadow: 0 0 8px var(--rc); }
.bp-tc-lock { display: none; position: absolute; inset: 0; z-index: 5; place-items: center; background: linear-gradient(180deg, rgba(5,3,10,.1), rgba(5,3,10,.55)); overflow: hidden; }
.bp-tc-lock img { width: 34%; max-width: 46px; filter: drop-shadow(0 0 10px rgba(255,170,60,.9)); }
.bp-tc-lock::after { content: ""; position: absolute; inset: -30%; background: linear-gradient(110deg, transparent 44%, rgba(255,226,150,.35) 50%, transparent 56%); animation: bp-lockshine 3.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .14s); }
@keyframes bp-lockshine { 0% { transform: translateX(-70%); } 55%, 100% { transform: translateX(70%); } }
.bp-tc.plock .bp-tc-lock { display: grid; }
.bp-tc.plock .bp-tc-art { filter: grayscale(.45) brightness(.72) drop-shadow(0 6px 8px rgba(0,0,0,.7)); }
.bp-tc.locked .bp-tc-art, .bp-tc.locked .bp-tc-amt { filter: grayscale(.6) brightness(.6); }
.bp-tc.locked { filter: saturate(.75); }
.bp-tc-done { display: none; position: absolute; inset: 0; z-index: 5; place-items: center; background: rgba(4,3,8,.62); }
.bp-tc-done span { font-family: 'Pixelify', system-ui, sans-serif; font-size: 12px; letter-spacing: .14em; color: #5fe08a; border: 2px solid #5fe08a; border-radius: 8px; padding: 4px 8px; transform: rotate(-12deg);
  text-shadow: 0 0 10px rgba(95,224,138,.8); box-shadow: 0 0 14px rgba(95,224,138,.45), inset 0 0 10px rgba(95,224,138,.3); background: rgba(0,0,0,.5); }
.bp-tc.done .bp-tc-done { display: grid; }
.bp-tc.done:not(.hero)::before { opacity: .35; animation: none; }
.bp-tc.done .bp-tc-art { filter: grayscale(.8) brightness(.5); animation: none; }
.bp-tc.ready { box-shadow: 0 0 0 2px #5fe08a, 0 0 26px rgba(95,224,138,.55); animation: bp-readyglow 1.5s ease-in-out infinite; }
.bp-tc.ready .bp-tc-rar { color: #032312; background: linear-gradient(90deg, #239a52, #5fe08a, #239a52); font-size: 0; }
.bp-tc.ready .bp-tc-rar::after { content: attr(data-go); font-size: 10px; animation: bp-blink 1s infinite; }
@keyframes bp-readyglow { 50% { box-shadow: 0 0 0 2px #5fe08a, 0 0 42px rgba(95,224,138,.9); } }
.bp-tc:hover { --lift: -6px; }
.bp-tc.sel { --lift: -8px; box-shadow: 0 0 0 3px #fff, 0 0 30px color-mix(in srgb, var(--rc) 80%, transparent), 0 18px 30px rgba(0,0,0,.6); }
.bp-tc.ready.sel { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #5fe08a, 0 0 40px rgba(95,224,138,.8); }
.bp-tc.hero, .bp-tc.hero.ready { cursor: default; box-shadow: 0 30px 60px rgba(0,0,0,.7), 0 0 70px color-mix(in srgb, var(--rc) 45%, transparent); animation: bp-herofloat 4s ease-in-out infinite alternate; }
.bp-tc.hero.f { height: var(--ph); }
.bp-tc.hero .bp-tc-amt { font-size: clamp(20px, 1.9vw, 30px); bottom: 42px; } .bp-tc.hero .bp-tc-kd { font-size: 11px; bottom: 27px; } .bp-tc.hero .bp-tc-rar { height: 22px; font-size: 12px; }
.bp-tc.hero.ready .bp-tc-rar::after { font-size: 12px; }
.bp-tc.hero .bp-tc-art { width: 92%; top: 7%; }
.bp-tc.hero.plock .bp-tc-lock, .bp-tc.hero.done .bp-tc-done { background: none; place-items: start end; padding: 12px; }
.bp-tc.hero.plock .bp-tc-lock img { width: 42px; }
.bp-tc.hero.plock .bp-tc-art, .bp-tc.hero.done .bp-tc-art, .bp-tc.hero.locked .bp-tc-art { filter: drop-shadow(0 6px 8px rgba(0,0,0,.7)) drop-shadow(0 0 14px color-mix(in srgb, var(--rc) 55%, transparent)); animation: bp-float 3.2s ease-in-out infinite alternate; }
.bp-tc.hero.locked .bp-tc-amt { filter: none; }
@keyframes bp-herofloat { to { translate: 0 -10px; } }
.bp-tc.boom { animation: bp-boom .55s cubic-bezier(.2,1.4,.4,1); z-index: 9; }
@keyframes bp-boom { 0% { filter: brightness(1); } 25% { transform: perspective(800px) scale(1.22); filter: brightness(2.6) saturate(1.4); } 100% { transform: none; filter: none; } }

/* overlays (inside #scr-pass, not zoomed: their content zooms by --bpz) */
#scr-pass .bp-ov { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
#scr-pass .bp-ov[hidden] { display: none; }
#scr-pass .bp-dim { position: absolute; inset: 0; background: rgba(2,1,6,.84); backdrop-filter: blur(4px); }
#bp-scene { cursor: pointer; overflow: hidden; }
#bp-scene-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
#bp-scene .bp-lb { position: absolute; left: 0; right: 0; height: 8vh; background: #000; z-index: 1; }
#bp-scene .bp-lb.t { top: 0; } #bp-scene .bp-lb.b { bottom: 0; }
#bp-scene .bp-sc { position: relative; z-index: 2; zoom: var(--bpz); display: grid; justify-items: center; gap: 14px; text-align: center; width: min(1000px, calc(100 * var(--vw) - 32px)); }
#bp-scene .bp-eb { font-family: var(--bp-display); letter-spacing: .5em; color: var(--bp-corona); font-size: 14px; text-shadow: 0 0 14px rgba(255,170,70,.8); }
#bp-scene h3 { margin: 0; font-family: var(--bp-display); font-weight: 700; font-size: clamp(44px, calc(10 * var(--vw)), 112px); line-height: .9; letter-spacing: .04em; overflow-wrap: anywhere; }
#bp-scene .bp-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
#bp-scene .bp-tc { --cw: clamp(116px, calc(14 * var(--vw)), 186px); --ph: clamp(160px, calc(30 * var(--vh)), 252px); cursor: inherit; }
#bp-scene .bp-tc .bp-tc-amt { font-size: clamp(17px, 1.7vw, 26px); }
#bp-scene .bp-tap { font-size: 13px; color: var(--bp-muted); letter-spacing: .2em; text-transform: uppercase; animation: bp-blink 1.4s infinite; }
#bp-lvup { position: fixed; left: 0; right: 0; top: 30%; z-index: 75; pointer-events: none; display: grid; justify-items: center; text-align: center; gap: 4px; zoom: var(--bpz); }
#bp-lvup[hidden] { display: none; }
#bp-lvup .s { font-family: var(--bp-display); color: var(--bp-corona); letter-spacing: .5em; font-size: 15px; text-shadow: 0 0 14px rgba(255,170,70,.9); }
#bp-lvup .t { font-family: var(--bp-display); font-weight: 700; font-size: clamp(50px, calc(11 * var(--vw)), 130px); line-height: .9; letter-spacing: .04em; }
#bp-modal .bp-box { position: relative; z-index: 1; zoom: var(--bpz); width: min(760px, calc(100 * var(--vw) - 32px)); max-height: calc(100 * var(--vh) - 32px); overflow: auto; border-radius: 20px; padding: 22px; display: grid; gap: 14px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(139,92,255,.22), transparent 60%), linear-gradient(180deg, #140c22, #07040c); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 80px rgba(0,0,0,.8); }
#bp-modal h4 { margin: 0; font-family: var(--bp-display); font-size: 30px; line-height: 1.05; }
#bp-modal p { margin: 0; color: var(--bp-muted); font-size: 14px; }
#bp-modal .bp-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
#bp-modal .bp-search { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: #07040d; color: var(--bp-ink); font: inherit; }
#bp-modal .bp-gens { display: flex; gap: 6px; flex-wrap: wrap; }
#bp-modal .bp-gens button { border: 1px solid rgba(255,255,255,.14); background: #120c1e; border-radius: 9px; padding: 5px 10px; font-size: 12px; font-weight: 800; color: var(--bp-muted); }
#bp-modal .bp-gens button[aria-pressed="true"] { color: #2b1500; background: linear-gradient(180deg, #ffd24a, #f4a21f); border-color: transparent; }
#bp-modal .bp-mons { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; min-height: 120px; }
#bp-modal .bp-mon { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 8px 4px 10px; display: grid; justify-items: center; gap: 2px; background: radial-gradient(100% 70% at 50% 20%, rgba(139,92,255,.22), #0a0612 70%); transition: transform .15s; }
#bp-modal .bp-mon:hover { transform: translateY(-3px); }
#bp-modal .bp-mon canvas { width: 80px; height: 80px; }
#bp-modal .bp-mon span { font-size: 13px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #bp-modal .bp-mon small { font-size: 10px; color: var(--bp-faint); }
#bp-modal .bp-mon.leg { background: radial-gradient(100% 70% at 50% 20%, rgba(255,203,61,.28), #0a0612 70%); }
#bp-modal .bp-mon[aria-pressed="true"], #bp-modal .bp-mega[aria-pressed="true"] { border-color: var(--bp-gold); box-shadow: 0 0 0 2px rgba(255,210,74,.4), 0 0 24px rgba(255,179,71,.5); }
#bp-modal .bp-megas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#bp-modal .bp-mega { border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 14px 8px; display: grid; justify-items: center; gap: 4px; position: relative; overflow: hidden; background: radial-gradient(100% 80% at 50% 15%, rgba(196,123,255,.4), #0a0612 70%); transition: transform .15s; }
#bp-modal .bp-mega:hover:not(:disabled) { transform: translateY(-4px); }
#bp-modal .bp-mega:disabled { opacity: .45; cursor: default; }
#bp-modal .bp-mega canvas { width: 120px; height: 120px; filter: drop-shadow(0 0 16px rgba(196,123,255,.8)); }
#bp-modal .bp-mega b { font-family: var(--bp-display); font-size: 18px; } #bp-modal .bp-mega small { font-size: 11px; color: var(--bp-muted); }
#bp-modal .bp-codebox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#bp-modal .bp-code { justify-self: start; font-family: var(--bp-display); font-size: 32px; letter-spacing: .14em; padding: 10px 18px; border-radius: 12px; border: 2px dashed var(--bp-gold); color: var(--bp-gold); text-shadow: 0 0 14px rgba(255,170,70,.7); user-select: all; }
#bp-modal .bp-note { font-size: 12px; color: var(--bp-faint); }

/* phones and short screens: one scrolling column */
@media (max-width: 979px), (max-height: 599px) {
  #scr-pass { --cw: 128px; --ph: 172px; --fh: 128px; }
  #scr-pass .bp-stage { grid-template-columns: 1fr; gap: 12px; }
  #scr-pass .bp-mid { order: -1; min-height: 320px; place-items: center; padding: 0; }
  #scr-pass .bp-mid .bp-tc.hero { --cw: 170px; --ph: 228px; margin-left: 44%; }
  #scr-pass .bp-hname { font-size: clamp(30px, 9vw, 48px); }
  #scr-pass .bp-tr { margin-left: 0; justify-content: flex-start; }
}
@media (max-width: 560px) {
  #scr-pass .bp-ltxt h1 { font-size: 32px; }
  #scr-pass .bp-ecl { width: 42px; height: 42px; }
  #scr-pass .bp-mid { min-height: 290px; }
  #scr-pass .bp-mid .bp-tc.hero { --cw: 146px; --ph: 198px; margin-left: 46%; }
  #bp-modal .bp-megas { grid-template-columns: 1fr; }
  #bp-modal .bp-mega { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 12px; align-items: center; }
  #bp-modal .bp-mega canvas { width: 88px; height: 88px; grid-row: span 2; }
  #scr-pass .bp-perks { grid-template-columns: 1fr; }
  #scr-pass .bp-nav { display: none; }
}
@media (min-width: 980px) and (max-height: 800px) {
  #scr-pass .bp-desc { display: none; }
  #scr-pass .bp-perks li:nth-child(n+3) { display: none; }
}
/* one screen on PC: the middle column takes only the room left; low laptops drop the extras */
@media (min-width: 980px) and (min-height: 600px) { #scr-pass .bp-mid { min-height: 0; } #scr-pass .bp-stage > * { min-height: 0; } }
@media (min-width: 980px) and (max-height: 760px) {
  #scr-pass .bp-loot, #scr-pass .bp-perks { display: none; }
  #scr-pass .bp-info { gap: 7px; }
  #scr-pass .bp-hname { font-size: clamp(24px, calc(5.4 * var(--vh)), 46px); }
  #scr-pass .bp-promo h3 { font-size: 16px; margin-bottom: 6px; }
  #scr-pass .bp-glass { gap: 8px; padding: 10px 12px; }
}
@media (min-width: 980px) and (max-height: 650px) {
  #scr-pass .bp-promo h3, #scr-pass .bp-ways { display: none; }
  #scr-pass .bp-emb { width: 64px; height: 64px; } #scr-pass .bp-hex { width: 48px; height: 53px; } #scr-pass .bp-hex span { width: 42px; height: 47px; } #scr-pass .bp-emb b { font-size: 21px; }
  #scr-pass .bp-btn.is-big { font-size: 16px; padding: 11px 18px; }
  #scr-pass .bp-tags { display: none; }
  #scr-pass .bp-glass { padding: 8px 12px; gap: 6px; }
  #scr-pass .bp-promo { padding: 8px 10px; } #scr-pass .bp-promo .bp-btn { padding: 9px 14px; font-size: 14px; }
  #scr-pass .bp-side { gap: 8px; }
}
/* phones on their side: a smaller stage, the track sooner */
@media (max-width: 979px) and (max-height: 520px) {
  #scr-pass .bp-mid { min-height: 230px; }
  #scr-pass .bp-mid .bp-tc.hero { --cw: 136px; --ph: 184px; margin-left: 46%; }
}
@media (prefers-reduced-motion: reduce) {
  #scr-pass *, #scr-pass *::before, #scr-pass *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* main menu: the pass medallion in the top-left corner (outside the ring) */
#scr-menu .pass-fab { position: absolute; z-index: 3; left: max(14px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 62px); display: flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 6px; border-radius: 999px; border: 1px solid rgba(255,210,74,.6); color: #fff3d0; text-align: left; overflow: hidden; isolation: isolate; cursor: pointer;
  background: radial-gradient(120% 160% at 0% 50%, rgba(255,150,40,.35), transparent 62%), #0a0603; box-shadow: 0 0 0 1px #000, 0 0 24px rgba(255,170,60,.3), 0 10px 26px rgba(0,0,0,.7);
  font-family: 'Pixelify', 'Segoe UI', system-ui, sans-serif; font-size: 16px; font-weight: 700; letter-spacing: .04em; animation: hub-in-m .55s cubic-bezier(.2,.9,.2,1) .4s both; max-width: calc(50vw - 24px); }
#scr-menu .pass-fab .pf-t { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; min-width: 0; }
#scr-menu .pass-fab small { display: block; max-width: 100%; font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0; color: #ffcf7a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#scr-menu .pass-fab .pf-ecl { width: 40px; height: 40px; flex: none; border-radius: 50%; background: #050208; box-shadow: 0 0 0 2px #ffe9b8, 0 0 10px 3px rgba(255,190,90,.9), 0 0 24px 6px rgba(255,120,50,.45); position: relative; }
#scr-menu .pass-fab .pf-ecl::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; right: 2px; top: 4px; background: #fff; box-shadow: 0 0 8px 3px #fff; animation: bp-twinkle 2.2s ease-in-out infinite; }
#scr-menu .pass-fab::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,240,200,.25) 50%, transparent 60%); transform: translateX(-120%); animation: bp-btnshine 3.6s ease-in-out infinite; pointer-events: none; }
#scr-menu .pass-fab .pass-dot { position: absolute; top: 2px; left: 34px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #5fe08a; color: #032312; font: 900 11px/18px 'Nunito', system-ui, sans-serif; text-align: center; box-shadow: 0 0 10px rgba(95,224,138,.8); }
#scr-menu .pass-fab:hover, #scr-menu .pass-fab:focus-visible { translate: 0 -2px; border-color: #ffd24a; box-shadow: 0 0 0 1px #000, 0 0 34px rgba(255,170,60,.5), 0 14px 34px rgba(0,0,0,.85); }
@media (max-height: 520px), (max-width: 700px) { #scr-menu .pass-fab { top: calc(env(safe-area-inset-top, 0px) + 52px); padding: 4px 12px 4px 4px; font-size: 13px; } #scr-menu .pass-fab .pf-ecl { width: 30px; height: 30px; } #scr-menu .pass-fab small { font-size: 10px; } #scr-menu .pass-fab .pass-dot { left: 24px; } }
/* (29-10-2026) The season pass in the chat: the Solar Corona frame round the avatar, the Corona name colour */
.wmsg-av.fr { position: relative; overflow: visible; }
.wmsg-av.fr::before { content: ''; position: absolute; inset: -3px; padding: 3px; border-radius: 14px; pointer-events: none; -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); }
.wmsg-av.fr-4 { filter: drop-shadow(0 0 6px rgba(255,179,71,.6)); }
.wmsg-av.fr-4::before { background: conic-gradient(from var(--bpang), #ffd24a, #fff1c2, #ffb347, #8b5cff, #ffd24a, #fff1c2, #ffb347, #8b5cff, #ffd24a); animation: bp-spin 4s linear infinite; }
.wmsg-av.fr-4::after { content: ''; position: absolute; top: -5px; right: -5px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px 2px #fff, 0 0 12px 4px rgba(255,210,140,.8); animation: bp-twinkle 2s ease-in-out infinite; }
.wmsg-n.nc { -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.wmsg-n.nc-3 { background-image: linear-gradient(90deg, #fff1c2, #ffd24a, #ff8a3d, #c47bff, #ffd24a, #fff1c2); background-size: 250% 100%; animation: bp-flow 5s linear infinite; filter: drop-shadow(0 0 4px rgba(255,170,70,.45)); }
@media (prefers-reduced-motion: reduce) { .wmsg-av.fr-4::before, .wmsg-av.fr-4::after, .wmsg-n.nc-3 { animation: none; } }
/* (29-10-2026, suggestion #0084) taking stars off in the PC */
#pcb-side .pcx-split { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#pcb-side .pcx-split .btn { flex: 1 1 auto; min-width: 0; white-space: normal; }
/* (30-10-2026, bug #0076) a run kept off the leaderboard (almost no knockouts) */
#over-stats .st-norank { color: #ffb36b; font-size: 13px; text-align: center; padding: 6px 10px; border: 1px dashed rgba(255,179,107,.45); border-radius: 10px; }
/* (30-10-2026) the Supporters' beta of the new moves (settings-ui, core/beta.js) */
.beta-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; font-size: 10px; letter-spacing: .08em; color: #1a1030; background: linear-gradient(90deg, #ffd36b, #ffb347); vertical-align: middle; }
/* (30-10-2026) PokéLit on Discord: the home medallion and its panel (js/ui/discord.js) */
#scr-menu .dc-fab { position: absolute; z-index: 3; left: max(14px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 124px); display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px; border: 1px solid rgba(88,101,242,.55); background: linear-gradient(90deg, rgba(88,101,242,.28), rgba(10,10,18,.85)); color: #fff; font: inherit; font-size: 14px; cursor: pointer; text-align: left; box-shadow: 0 0 18px rgba(88,101,242,.25); }
#scr-menu .dc-fab:hover { border-color: #8b95ff; box-shadow: 0 0 24px rgba(88,101,242,.45); }
#scr-menu .dc-fab .dc-ico { width: 38px; height: 38px; border-radius: 50%; background: #5865f2; display: grid; place-items: center; flex: none; }
#scr-menu .dc-fab .dc-ico svg { width: 22px; height: 22px; color: #fff; }
#scr-menu .dc-fab .dc-t { display: flex; flex-direction: column; line-height: 1.15; font-weight: 700; }
#scr-menu .dc-fab small { font-weight: 400; font-size: 11px; opacity: .8; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#scr-menu .dc-fab.on small { color: #9ff0b8; opacity: 1; }
#scr-menu .dc-fab .dc-dot { position: absolute; left: 32px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #ff4a4a; box-shadow: 0 0 0 2px #0a0a12; }
/* phones: only the round icon, under the pass medallion and clear of the menu buttons */
@media (max-height: 520px), (max-width: 700px) { #scr-menu .dc-fab { top: calc(env(safe-area-inset-top, 0px) + 96px); left: max(10px, env(safe-area-inset-left, 0px)); padding: 0; border: 0; background: none; box-shadow: none; } #scr-menu .dc-fab .dc-t { display: none; } #scr-menu .dc-fab .dc-ico { width: 32px; height: 32px; box-shadow: 0 0 12px rgba(88,101,242,.5); } #scr-menu .dc-fab .dc-ico svg { width: 19px; height: 19px; } #scr-menu .dc-fab .dc-dot { left: 24px; top: -2px; } }
.dc-panel { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 16px; }
.dc-panel .dc-card { width: min(440px, 100%); max-height: 100%; overflow-y: auto; background: #07070c; border: 1px solid rgba(88,101,242,.55); border-radius: 16px; padding: 18px; box-shadow: 0 0 40px rgba(88,101,242,.3); }
.dc-panel .dc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.dc-panel .dc-head h3 { margin: 0 0 2px; font-size: 18px; } .dc-panel .dc-head p { margin: 0; font-size: 13px; opacity: .8; }
.dc-panel .dc-logo { width: 48px; height: 48px; flex: none; border-radius: 14px; background: #5865f2; display: grid; place-items: center; } .dc-panel .dc-logo svg { width: 30px; height: 30px; color: #fff; }
.dc-panel .dc-join { display: block; text-align: center; text-decoration: none; }
.dc-panel .dc-sep { height: 1px; background: rgba(255,255,255,.1); margin: 14px 0; }
.dc-panel h4 { margin: 0 0 6px; font-size: 14px; } .dc-panel .dc-ok { margin: 0 0 6px; color: #9ff0b8; }
.dc-panel .dc-link { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #5865f2; border-color: #5865f2; color: #fff; } .dc-panel .dc-link svg { width: 20px; height: 20px; }
/* ============ (31-10-2026) The Halloween event: home medallion, #scr-event, its chat frame (fr-5) and name colour (nc-4) ============ */
#scr-menu .ev-fab { position: absolute; z-index: 3; left: max(14px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 124px); display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px; border: 1px solid rgba(255,138,31,.65); background: linear-gradient(90deg, rgba(120,40,160,.55), rgba(10,6,18,.88)); color: #fff; font: inherit; font-size: 14px; cursor: pointer; text-align: left; box-shadow: 0 0 18px rgba(255,138,31,.3); }
#scr-menu .ev-fab[hidden] { display: none; }
#scr-menu .ev-fab:hover, #scr-menu .ev-fab:focus-visible { translate: 0 -2px; border-color: #ffb347; box-shadow: 0 0 26px rgba(255,138,31,.5); }
#scr-menu .ev-fab canvas { width: 40px; height: 38px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 0 6px rgba(255,170,40,.8)); animation: ev-bob 2.4s ease-in-out infinite; }
#scr-menu .ev-fab .ev-t { display: flex; flex-direction: column; line-height: 1.15; font-weight: 700; color: #ffcf8a; }
#scr-menu .ev-fab small { font-weight: 400; font-size: 11px; color: #f1dcff; opacity: .9; white-space: nowrap; }
#scr-menu .ev-fab .ev-dot { position: absolute; left: 32px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: #5fe08a; box-shadow: 0 0 0 2px #0a0612; }
#scr-menu .dc-fab { top: calc(env(safe-area-inset-top, 0px) + 186px); }
@media (max-height: 520px), (max-width: 700px) {
  #scr-menu .ev-fab { top: calc(env(safe-area-inset-top, 0px) + 96px); left: max(10px, env(safe-area-inset-left, 0px)); padding: 0; border: 0; background: none; box-shadow: none; }
  #scr-menu .ev-fab .ev-t { display: none; }
  #scr-menu .ev-fab canvas { width: 32px; height: 30px; }
  #scr-menu .ev-fab .ev-dot { left: 24px; top: -2px; }
  #scr-menu .dc-fab { top: calc(env(safe-area-inset-top, 0px) + 136px); }
}
@keyframes ev-bob { 50% { transform: translateY(-2px) rotate(-3deg); } }

#scr-event:not(.hidden) { display: block; overflow: hidden auto; padding: 0; background: #050208; color: #f6efff; }
#scr-event * { box-sizing: border-box; }
#scr-event button:focus-visible { outline: 2px solid #ffcf5a; outline-offset: 3px; }
#scr-event .ev-world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#scr-event .ev-app { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left)); }
#scr-event .ev-top { display: flex; align-items: center; gap: 12px; }
#scr-event .ev-back { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255,179,71,.4); background: rgba(10,4,18,.72); color: #ffcf8a; cursor: pointer; backdrop-filter: blur(6px); }
#scr-event .ev-back svg { width: 22px; height: 22px; }
#scr-event .ev-back:hover { border-color: #ffcf5a; color: #fff; }
#scr-event .ev-kick { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(10,4,18,.72); border: 1px solid rgba(255,106,31,.45); font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: #ffb36b; font-family: var(--font-body); }
#scr-event .ev-kick i { width: 8px; height: 8px; border-radius: 50%; background: #ff5b2e; box-shadow: 0 0 10px #ff5b2e; animation: ev-live 1.6s ease-in-out infinite; }
#scr-event .ev-candy { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 10px; border-radius: 999px; background: linear-gradient(180deg, rgba(60,20,8,.9), rgba(20,6,4,.9)); border: 1px solid rgba(255,154,46,.7); box-shadow: 0 0 22px rgba(255,120,30,.35), inset 0 1px 0 rgba(255,220,160,.2); }
#scr-event .ev-candy .ev-cdy { width: 28px; height: 28px; }
#scr-event .ev-candy b { font-family: var(--font); font-size: 22px; color: #ffe0b0; font-variant-numeric: tabular-nums; }
#scr-event .ev-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: end; gap: 8px; min-height: clamp(260px, 44vh, 440px); }
#scr-event .ev-hero-l { padding: 18px 0 14px; min-width: 0; }
#scr-event .ev-dates { margin: 0; font-family: var(--font-body); font-size: 13px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; color: #ffb36b; text-shadow: 0 2px 8px #000; }
#scr-event .ev-title { margin: 4px 0 2px; font-family: var(--font); font-size: clamp(50px, 8.6vw, 108px); line-height: .92; letter-spacing: .02em; background: linear-gradient(180deg, #fff3c4 0%, #ffb347 36%, #ff6a1f 62%, #a8320b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #2a0800) drop-shadow(0 0 28px rgba(255,120,30,.55)); overflow-wrap: anywhere; }
#scr-event .ev-sub { margin: 0 0 18px; font-family: var(--font); font-size: clamp(18px, 2.3vw, 26px); letter-spacing: .1em; color: #dcc8ff; text-shadow: 0 0 14px rgba(165,107,255,.7), 0 2px 6px #000; }
#scr-event .ev-count { display: flex; gap: 8px; flex-wrap: wrap; }
#scr-event .ev-cu { min-width: 66px; padding: 9px 10px 7px; border-radius: 12px; text-align: center; background: linear-gradient(180deg, rgba(36,12,52,.85), rgba(10,4,18,.88)); border: 1px solid rgba(255,179,71,.38); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 10px 26px rgba(0,0,0,.45); }
#scr-event .ev-cu b { display: block; font-family: var(--font); font-size: 30px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
#scr-event .ev-cu small { display: block; margin-top: 3px; font-family: var(--font-body); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #c9b8e8; }
#scr-event .ev-over { font-family: var(--font); font-size: 22px; color: #ffb36b; }
#scr-event .ev-stage { display: block; width: 100%; height: clamp(220px, 40vh, 400px); }
#scr-event .ev-steps { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#scr-event .ev-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(12,5,22,.72); border: 1px solid rgba(201,166,255,.16); font-family: var(--font-body); font-size: 13.5px; font-weight: 700; color: #eadcff; backdrop-filter: blur(6px); }
#scr-event .ev-steps span { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #ffd27a, #ff6a1f); color: #2a0a00; font-family: var(--font); font-size: 15px; }
#scr-event .ev-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255,106,31,.14); border: 1px solid rgba(255,106,31,.4); color: #ffcf9a; font-size: 14px; }
#scr-event .ev-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
#scr-event .ev-stat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-width: 0; border-radius: 16px; background: linear-gradient(180deg, rgba(42,14,62,.8), rgba(12,5,22,.86)); border: 1px solid rgba(255,179,71,.22); backdrop-filter: blur(6px); }
#scr-event .ev-stat > img { width: 34px; height: 32px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 0 8px rgba(255,150,40,.6)); }
#scr-event .ev-stat > .ev-cdy { width: 32px; height: 32px; flex: none; filter: drop-shadow(0 0 8px rgba(255,120,30,.6)); }
#scr-event .ev-stat div { min-width: 0; }
#scr-event .ev-stat b { display: block; font-family: var(--font); font-size: 22px; line-height: 1.1; color: #fff; font-variant-numeric: tabular-nums; }
#scr-event .ev-stat small { display: block; font-family: var(--font-body); font-size: 12px; font-weight: 700; color: #c9b8e8; }
#scr-event .ev-ring { width: 34px; height: 34px; flex: none; border-radius: 50%; background: conic-gradient(#ffb347 calc(var(--k) * 360deg), rgba(255,255,255,.12) 0); -webkit-mask: radial-gradient(circle, transparent 10px, #000 11px); mask: radial-gradient(circle, transparent 10px, #000 11px); filter: drop-shadow(0 0 6px rgba(255,150,40,.6)); }
#scr-event .ev-panel { padding: 10px; border-radius: 20px; background: rgba(10,4,18,.8); border: 1px solid rgba(201,166,255,.18); box-shadow: 0 24px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05); backdrop-filter: blur(10px); }
#scr-event .ev-tabs { display: flex; gap: 6px; padding: 4px; margin-bottom: 10px; border-radius: 14px; background: rgba(255,255,255,.04); }
#scr-event .ev-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 12px; border: 0; border-radius: 11px; background: transparent; color: #bfaee0; font: inherit; font-family: var(--font); font-size: 17px; cursor: pointer; }
#scr-event .ev-tab:hover { color: #fff; }
#scr-event .ev-tab.on { color: #fff; background: linear-gradient(180deg, rgba(255,138,31,.3), rgba(165,107,255,.18)); box-shadow: inset 0 0 0 1px rgba(255,179,71,.6), 0 0 20px rgba(255,138,31,.2); }
#scr-event .ev-tc { font-family: var(--font-body); font-size: 12px; font-weight: 800; opacity: .75; }
#scr-event .ev-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #5fe08a; color: #032312; font-style: normal; font-family: var(--font-body); font-size: 12px; font-weight: 900; line-height: 20px; box-shadow: 0 0 10px rgba(95,224,138,.6); }
#scr-event .ev-mhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px 10px; font-family: var(--font-body); font-weight: 800; color: #9ff0b8; }
#scr-event .ev-mis-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#scr-event .ev-mis { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(201,166,255,.12); }
#scr-event .ev-mi { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; color: #ffcf8a; background: radial-gradient(circle at 50% 35%, rgba(255,138,31,.32), rgba(40,14,60,.92)); border: 1px solid rgba(255,179,71,.3); }
#scr-event .ev-mi svg { width: 24px; height: 24px; }
#scr-event .ev-mi img { width: 32px; height: 30px; image-rendering: pixelated; }
#scr-event .ev-mi.gold { background: radial-gradient(circle at 50% 35%, rgba(255,225,77,.42), rgba(60,40,10,.92)); border-color: rgba(255,225,77,.5); }
#scr-event .ev-mis-t { flex: 1; min-width: 0; }
#scr-event .ev-mis-t b { display: block; margin-bottom: 7px; font-family: var(--font-body); font-size: 14.5px; font-weight: 800; color: #fff; }
#scr-event .ev-prog { display: flex; align-items: center; gap: 8px; }
#scr-event .ev-bar { flex: 1; height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
#scr-event .ev-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff6a1f, #ffcf5a); box-shadow: 0 0 10px rgba(255,138,31,.6); }
#scr-event .ev-prog small { font-family: var(--font-body); font-size: 12px; font-weight: 700; color: #c9b8e8; white-space: nowrap; font-variant-numeric: tabular-nums; }
#scr-event .ev-mis-r { flex: none; }
#scr-event .ev-rew { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font); font-size: 16px; color: #ffcf8a; white-space: nowrap; }
#scr-event .ev-cdy { width: 1.15em; height: 1.15em; flex: none; }
#scr-event .ev-mis.done { border-color: rgba(95,224,138,.7); background: linear-gradient(90deg, rgba(95,224,138,.14), rgba(255,255,255,.03)); animation: ev-ready 2.2s ease-in-out infinite; }
#scr-event .ev-mis.got { opacity: .55; }
#scr-event .ev-mis.got .ev-bar i { background: #5fe08a; box-shadow: none; }
#scr-event .ev-ok { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-body); font-size: 13px; font-weight: 800; color: #9ff0b8; white-space: nowrap; }
#scr-event .ev-ok svg { width: 16px; height: 16px; }
#scr-event .ev-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 11px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #fff; font: inherit; font-family: var(--font); font-size: 15px; white-space: nowrap; cursor: pointer; transition: transform .12s, filter .12s; }
#scr-event .ev-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.12); }
#scr-event .ev-btn:active:not(:disabled) { transform: translateY(1px); }
#scr-event .ev-btn:disabled { opacity: .5; cursor: default; }
#scr-event .ev-btn.gold { background: linear-gradient(180deg, #ffdf6a, #ff9a1f); border-color: #ffe9a0; color: #2a0e00; box-shadow: 0 3px 0 #9a4a00, 0 0 18px rgba(255,170,40,.35); }
#scr-event .ev-btn.gold .ev-rew { color: #2a0e00; font-size: 14px; }
#scr-event .ev-btn.dim { color: #c9b8e8; }
#scr-event .ev-btn.on { background: linear-gradient(180deg, rgba(95,224,138,.32), rgba(95,224,138,.12)); border-color: rgba(95,224,138,.7); color: #cfffdf; }
#scr-event .ev-btn.armed { background: linear-gradient(180deg, #ff7a6a, #e0303a); border-color: #ffb0a0; color: #fff; box-shadow: 0 3px 0 #7a1010; }
#scr-event .ev-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
#scr-event .ev-item { --rc: rgba(79,180,255,.55); --rg: rgba(79,180,255,.28); --rt: #8fd0ff; position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 10px; border-radius: 16px; background: linear-gradient(180deg, rgba(40,14,60,.62), rgba(10,4,18,.92)); border: 1px solid var(--rc); transition: transform .15s, box-shadow .15s; }
#scr-event .ev-item.r4 { --rc: rgba(196,123,255,.65); --rg: rgba(196,123,255,.3); --rt: #dcb2ff; }
#scr-event .ev-item.r5 { --rc: rgba(255,203,61,.75); --rg: rgba(255,170,40,.32); --rt: #ffd24a; }
#scr-event .ev-item:hover { transform: translateY(-3px); box-shadow: 0 12px 32px var(--rg); }
#scr-event .ev-item.have { --rc: rgba(95,224,138,.6); }
#scr-event .ev-prev { position: relative; height: 124px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: radial-gradient(circle at 50% 45%, var(--rg), rgba(8,3,14,.95) 72%); background-size: cover; background-position: center; }
#scr-event .ev-prev-cover { background-color: #170822; }
#scr-event .ev-look { width: 100%; height: 100%; display: block; }
#scr-event .ev-group { margin: 14px 4px 10px; font-family: var(--font); font-size: 18px; font-weight: 400; color: #ffcf8a; letter-spacing: .04em; }
#scr-event .ev-group:first-child { margin-top: 2px; }
#scr-event .ev-rar { position: absolute; top: 16px; left: 16px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.65); border: 1px solid var(--rc); color: var(--rt); font-family: var(--font-body); font-size: 10.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
#scr-event .ev-own { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #5fe08a; color: #05300f; box-shadow: 0 0 12px rgba(95,224,138,.6); }
#scr-event .ev-own svg { width: 16px; height: 16px; }
#scr-event .ev-item-t b { display: block; font-family: var(--font); font-size: 17px; color: #fff; }
#scr-event .ev-item-t small { font-family: var(--font-body); font-size: 12px; font-weight: 700; color: #c9b8e8; }
#scr-event .ev-item-b { display: flex; align-items: center; gap: 8px; margin-top: auto; }
#scr-event .ev-item-b .ev-btn { flex: 1; }
#scr-event .ev-av { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 14px; background: #1a0b2e; }
#scr-event .ev-av img { width: 40px; height: 38px; image-rendering: pixelated; }
#scr-event .ev-nm { max-width: 100%; padding: 0 8px; font-size: 24px; overflow-wrap: anywhere; text-align: center; }
#scr-event .ev-ttl { max-width: calc(100% - 16px); padding: 5px 14px; border-radius: 14px; text-align: center; line-height: 1.15; background: linear-gradient(90deg, #ff8a1f, #c47bff); color: #1a0606; font-family: var(--font); font-size: 16px; box-shadow: 0 0 18px rgba(255,138,31,.4); }
#scr-event .ev-fly { position: absolute; z-index: 5; width: 26px; height: 26px; pointer-events: none; }
#scr-event .ev-fly svg { width: 100%; height: 100%; }
/* (31-10-2026) more epic: the entrance, the title's letters, ornaments, the turning border, the grand prize */
@property --evang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
#scr-event .ev-title { display: flex; flex-wrap: wrap; background: none; -webkit-background-clip: border-box; background-clip: border-box; animation: ev-flicker 5s steps(1) infinite; }
#scr-event .ev-title span { display: inline-block; background: linear-gradient(180deg, #fff3c4 0%, #ffb347 36%, #ff6a1f 62%, #a8320b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
#scr-event.ev-enter .ev-title span { animation: ev-drop .7s cubic-bezier(.2, 1.4, .4, 1) backwards; animation-delay: calc(.35s + var(--i) * .06s); }
#scr-event.ev-enter .ev-sub, #scr-event.ev-enter .ev-dates, #scr-event.ev-enter .ev-count { animation: ev-rise .6s ease-out backwards .9s; }
#scr-event.ev-enter .ev-steps, #scr-event.ev-enter .ev-stats, #scr-event.ev-enter .ev-panel, #scr-event.ev-enter .ev-div { animation: ev-rise .6s ease-out backwards 1.05s; }
#scr-event .ev-flash { position: fixed; inset: 0; z-index: 6; pointer-events: none; background: #000; animation: ev-flash 1.4s ease-out forwards; }
@keyframes ev-flash { 0% { background: #000; opacity: 1; } 14% { background: #000; opacity: 1; } 18% { background: #e9e0ff; opacity: .9; } 24% { background: #000; opacity: .7; } 30% { background: #d8ccff; opacity: .55; } 100% { background: #000; opacity: 0; } }
@keyframes ev-drop { from { transform: translateY(-120px) rotate(-12deg) scale(1.4); opacity: 0; } 70% { opacity: 1; } }
@keyframes ev-rise { from { transform: translateY(18px); opacity: 0; } }
@keyframes ev-flicker { 0%, 100% { filter: drop-shadow(0 4px 0 #2a0800) drop-shadow(0 0 28px rgba(255,120,30,.55)); } 47% { filter: drop-shadow(0 4px 0 #2a0800) drop-shadow(0 0 40px rgba(255,140,40,.8)); } 49% { filter: drop-shadow(0 4px 0 #2a0800) drop-shadow(0 0 18px rgba(255,100,20,.4)); } 52% { filter: drop-shadow(0 4px 0 #2a0800) drop-shadow(0 0 34px rgba(255,130,30,.7)); } }
#scr-event .ev-div { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; color: #ff8a1f; }
#scr-event .ev-div i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,138,31,.7), transparent); }
#scr-event .ev-div svg { width: 64px; height: 24px; filter: drop-shadow(0 0 8px rgba(255,120,30,.7)); }
#scr-event .ev-panel { position: relative; }
#scr-event .ev-panel::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--evang), rgba(255,106,31,.9), rgba(122,44,191,.5), rgba(255,179,71,.9), rgba(122,44,191,.5), rgba(255,106,31,.9));
  -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: ev-spin 10s linear infinite; }
#scr-event .ev-panel::after { content: ""; position: absolute; left: 50%; top: -1px; width: 46%; height: 2px; translate: -50% 0; pointer-events: none; background: linear-gradient(90deg, transparent, #ffd27a, transparent); filter: blur(1px); }
@keyframes ev-spin { to { --evang: 360deg; } }
#scr-event .ev-hero-l { position: relative; }
#scr-event .ev-item.r6 { --rc: rgba(255,95,109,.85); --rg: rgba(255,120,60,.38); --rt: #ffb0a0; border-width: 0; background: linear-gradient(180deg, rgba(70,16,30,.75), rgba(14,4,12,.95)); }
#scr-event .ev-item.r6::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--evang), #ff5f6d, #ffd24a, #ff8a1f, #c47bff, #ff5f6d); -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: ev-spin 4s linear infinite; }
#scr-event .ev-item.r6 .ev-prev { background: radial-gradient(circle at 50% 50%, rgba(255,180,60,.45), rgba(80,10,20,.6) 45%, rgba(8,3,14,.95) 75%); }
#scr-event .ev-item.r6 .ev-ttl { font-size: 22px; padding: 8px 20px; background: linear-gradient(90deg, #ffd24a, #ff8a1f, #ff5f6d); box-shadow: 0 0 30px rgba(255,150,40,.7); }
#scr-event .ev-item.r6 .ev-ttl::before { content: "👑 "; }
#scr-event .ev-item.r6, #scr-event .ev-item.r6.wide { grid-column: 1 / -1; }
#scr-event .ev-item.r6 .ev-prev { height: 150px; }
#scr-event .ev-perk { display: block; margin-top: 4px; font-style: normal; font-family: var(--font-body); font-size: 13px; font-weight: 900; color: #ffd27a; }
#scr-menu .ev-fab { animation: ev-fabglow 2.6s ease-in-out infinite; }
@keyframes ev-fabglow { 50% { box-shadow: 0 0 30px rgba(255,138,31,.6), 0 0 0 1px rgba(255,179,71,.6); } }
@media (prefers-reduced-motion: reduce) { #scr-event .ev-title, #scr-event .ev-panel::before, #scr-event .ev-item.r6::before, #scr-menu .ev-fab { animation: none; } }
@keyframes ev-live { 50% { opacity: .3; } }
@keyframes ev-ready { 50% { box-shadow: 0 0 24px rgba(95,224,138,.32); } }
@media (min-width: 760px) { #scr-event .ev-item.wide { grid-column: span 2; } }
@media (max-width: 900px) {
  #scr-event .ev-mis-list, #scr-event .ev-steps { grid-template-columns: minmax(0, 1fr); }
  #scr-event .ev-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #scr-event .ev-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  #scr-event .ev-hero-l { padding-bottom: 0; }
  #scr-event .ev-stage { height: 160px; margin-top: -10px; }
  #scr-event .ev-count { flex-wrap: nowrap; }
  #scr-event .ev-cu { flex: 1; min-width: 0; padding: 8px 4px 6px; }
  #scr-event .ev-cu b { font-size: 24px; }
  #scr-event .ev-cu small { font-size: 9px; letter-spacing: .08em; }
  #scr-event .ev-shop { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #scr-event .ev-item.wide { grid-column: span 2; }
  #scr-event .ev-prev { height: 92px; }
  #scr-event .ev-ttl { font-size: 13px; padding: 4px 10px; }
  #scr-event .ev-rar { top: 14px; left: 14px; font-size: 9px; padding: 2px 6px; }
  #scr-event .ev-mis { gap: 10px; padding: 10px; }
  #scr-event .ev-mi { width: 40px; height: 40px; }
  #scr-event .ev-stat { padding: 10px; gap: 8px; }
  #scr-event .ev-stat b { font-size: 19px; }
  #scr-event .ev-candy b { font-size: 18px; }
}
@media (max-height: 520px) and (min-width: 641px) {
  #scr-event .ev-hero { min-height: 0; }
  #scr-event .ev-title { font-size: 52px; }
  #scr-event .ev-stage { height: 200px; }
}
/* the chat: Lantern Glow frame and Witchfire name */
.wmsg-av.fr-5 { filter: drop-shadow(0 0 7px rgba(255,120,30,.7)); }
.wmsg-av.fr-5::before { background: conic-gradient(from var(--bpang), #ff6a1f, #ffb347, #7a2cbf, #ff6a1f, #ffe066, #7a2cbf, #ff6a1f); animation: bp-spin 3s linear infinite; }
.wmsg-n.nc-4 { background-image: linear-gradient(90deg, #ffb347, #ff6a1f, #c47bff, #7a2cbf, #ff6a1f, #ffb347); background-size: 250% 100%; animation: bp-flow 4s linear infinite; filter: drop-shadow(0 0 4px rgba(255,110,30,.5)); }
@media (prefers-reduced-motion: reduce) { .wmsg-av.fr-5::before, .wmsg-n.nc-4, #scr-event .ev-kick i, #scr-event .ev-mis.done, #scr-menu .ev-fab canvas { animation: none; } }

/* ============ (31-10-2026, suggestion #0109) population data and masteries: the Pokédex's Builds tab, the PC Box's mastery line ============ */
.dxx-pips { display: inline-flex; gap: 3px; }
.dxx-pips i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
.dxx-pips i.on { background: #ffd23f; border-color: #ffe9a0; box-shadow: 0 0 6px rgba(255,210,63,.7); }
#dex-detail .dxx-mast { padding: 8px 10px; margin: 4px 0 8px; border-radius: 10px; background: rgba(255,210,63,.07); border: 1px solid rgba(255,210,63,.25); }
#dex-detail .dxx-mast .dx-h { margin: 0 0 4px; }
#dex-detail .dxx-mast > small { display: block; margin: 6px 0; color: var(--muted); font-size: 12px; }
#dex-detail .dxx-mts { display: flex; flex-wrap: wrap; gap: 6px; }
#dex-detail .dxx-mt { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.05); color: var(--muted); border: 1px solid rgba(255,255,255,.1); }
#dex-detail .dxx-mt.on { color: #ffe9a0; background: rgba(255,210,63,.15); border-color: rgba(255,210,63,.5); }
#dex-detail .dxx-mt small { opacity: .8; }
#dex-detail .dxx-pregs { margin: 4px 0 8px; }
#dex-detail .dxx-pregs .chip { font-size: 11px; padding: 3px 8px; }
#dex-detail .dxx-pruns { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
#dex-detail .dxx-ptop { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
#dex-detail .dxx-ptop li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.04); font-size: 12px; }
#dex-detail .dxx-ptop li.me { background: rgba(255,210,63,.14); box-shadow: inset 0 0 0 1px rgba(255,210,63,.5); }
#dex-detail .dxx-ptop li b { color: #ffd23f; }
#dex-detail .dxx-pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dex-detail .dxx-pt { color: var(--muted); white-space: nowrap; }
#dex-detail .dxx-pmvs { display: inline-flex; gap: 2px; }
#dex-detail .dxx-pmv { display: inline-flex; }
#dex-detail .dxx-pbars { display: flex; flex-direction: column; gap: 4px; }
#dex-detail .dxx-pbar { display: grid; grid-template-columns: minmax(0, 1fr) 90px 38px; align-items: center; gap: 8px; font-size: 12px; }
#dex-detail .dxx-pbar span { display: inline-flex; align-items: center; gap: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#dex-detail .dxx-pbar i { display: block; height: 7px; border-radius: 999px; background: rgba(255,255,255,.08); position: relative; overflow: hidden; }
#dex-detail .dxx-pbar i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: linear-gradient(90deg, #4fb4ff, #9ae6ff); border-radius: inherit; }
#dex-detail .dxx-pbar b { text-align: right; color: #9ae6ff; }
#dex-detail .dxx-psets { display: flex; flex-direction: column; gap: 4px; }
#dex-detail .dxx-pset { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.04); font-size: 12px; }
#dex-detail .dxx-pset b { color: #ffd23f; }
#dex-detail .dxx-pset span { display: flex; flex-wrap: wrap; gap: 4px; }
#dex-detail .dxx-pset em { font-style: normal; display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.06); }
#dex-detail .dxx-pset small { color: #9ae6ff; font-weight: 800; }
.pcx-mast { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px 12px 4px; font: 700 11px var(--font-body); color: #ffe9a0; }
@media (max-width: 560px) {
  #dex-detail .dxx-pbar { grid-template-columns: minmax(0, 1fr) 60px 34px; }
  #dex-detail .dxx-ptop li { grid-template-columns: 18px minmax(0, 1fr) auto; }
  #dex-detail .dxx-ptop .dxx-pmvs { grid-column: 2 / -1; }
}

/* =====================================================================
 * Level-up cards, epic look (02-11-2026, Salva: "più belli ed epici"). Obsidian glass with a diagonal hatch, the move's
 * colour as an energy edge and corner brackets (.fr, run-ui.js), a medallion icon with a slowly turning dashed ring,
 * the title in the display font with a coloured accent bar, a chunky keycap. Evolution: gold foil. Overrides the
 * level-up rules above; the landscape-phone column layout keeps the same pieces.
 * ===================================================================== */
#scr-levelup .card {
  --cc2: color-mix(in srgb, var(--cc) 55%, #fff);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--cc) 30%, transparent) 0%, transparent 42%),
    repeating-linear-gradient(-55deg, rgba(255,255,255,.035) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #12151f, #07080d);
  border: 1.5px solid color-mix(in srgb, var(--cc) 62%, transparent);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 0 1px rgba(0,0,0,.6), 0 0 0 1px #000, 0 0 22px color-mix(in srgb, var(--cc) 22%, transparent), 0 12px 28px rgba(0,0,0,.8);
  padding: 14px 18px 14px 16px; gap: 18px;
}
#scr-levelup .card .fr { position: absolute; inset: 5px; pointer-events: none; border-radius: 10px; opacity: .85;
  background:
    linear-gradient(var(--cc2), var(--cc2)) top left / 16px 2px no-repeat, linear-gradient(var(--cc2), var(--cc2)) top left / 2px 16px no-repeat,
    linear-gradient(var(--cc2), var(--cc2)) top right / 16px 2px no-repeat, linear-gradient(var(--cc2), var(--cc2)) top right / 2px 16px no-repeat,
    linear-gradient(var(--cc2), var(--cc2)) bottom left / 16px 2px no-repeat, linear-gradient(var(--cc2), var(--cc2)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--cc2), var(--cc2)) bottom right / 16px 2px no-repeat, linear-gradient(var(--cc2), var(--cc2)) bottom right / 2px 16px no-repeat;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--cc) 80%, transparent)); }
#scr-levelup .card .ico { position: relative; flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; overflow: visible; margin-left: 6px;
  background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--cc) 42%, #111), #050508 74%) !important;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--cc) 85%, transparent), inset 0 -8px 14px rgba(0,0,0,.85), 0 0 0 4px #06070b, 0 0 0 5px color-mix(in srgb, var(--cc) 35%, transparent), 0 0 22px color-mix(in srgb, var(--cc) 45%, transparent); }
#scr-levelup .card .ico::before { content: ''; position: absolute; inset: -11px; border-radius: 50%; border: 1.5px dashed color-mix(in srgb, var(--cc) 70%, transparent); animation: lv-ring 14s linear infinite; }
#scr-levelup .card .ico::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--cc) 30%, transparent); }
@keyframes lv-ring { to { transform: rotate(360deg); } }
#scr-levelup .card .ico > * { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--cc) 80%, transparent)); }
#scr-levelup .card .txt { padding-left: 12px; border-left: 2px solid color-mix(in srgb, var(--cc) 55%, transparent); }
#scr-levelup .card .nm { font: 400 21px var(--font); letter-spacing: .5px; color: #fff; text-shadow: 0 2px 0 #000, 0 0 12px color-mix(in srgb, var(--cc) 55%, transparent); }
#scr-levelup .card .nm .tag-chip { font: 700 11px var(--font-body); text-shadow: none; letter-spacing: 0; }
#scr-levelup .card .ds { color: #d7d9e4; font-size: 14px; }
#scr-levelup .card .key { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border-radius: 8px; font: 800 14px var(--font-body); color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 35%, #111), #05060a); border: 1px solid color-mix(in srgb, var(--cc) 70%, transparent); border-bottom-width: 3px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--cc) 30%, transparent); }
#scr-levelup .card:hover, #scr-levelup .card:focus-visible { transform: translateY(-4px) scale(1.025); border-color: var(--cc2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 0 1px #000, 0 0 46px color-mix(in srgb, var(--cc) 55%, transparent), 0 16px 34px rgba(0,0,0,.9); }
#scr-levelup .card:hover .ico::before, #scr-levelup .card:focus-visible .ico::before { animation-duration: 3s; }
#scr-levelup .card:hover .fr { opacity: 1; }
#scr-levelup .card.t-evo { --cc: #ffd24a; --cc2: #fff1b0;
  background: linear-gradient(100deg, rgba(255,210,74,.38), transparent 45%), repeating-linear-gradient(-55deg, rgba(255,255,255,.05) 0 2px, transparent 2px 9px), linear-gradient(180deg, #1a150a, #090704); }
#scr-levelup .card.t-new::after { background: linear-gradient(90deg, #5fe3ff, #c6f8ff 50%, #5fe3ff); font: 800 10px var(--font-body); letter-spacing: 1.5px; color: #052033;
  box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 12px rgba(95,227,255,.5); }
#scr-levelup .card .mv-prev { border-radius: 10px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 60%, transparent), 0 0 0 1px #000, 0 0 18px color-mix(in srgb, var(--cc) 30%, transparent); }
@media (max-height: 520px) and (orientation: landscape) {
  #scr-levelup #cards .card { padding: 16px 10px 12px; gap: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 1px #000, 0 0 18px color-mix(in srgb, var(--cc) 22%, transparent), 0 10px 24px rgba(0,0,0,.8); }
  #scr-levelup #cards .card .ico { flex-basis: 54px; width: 54px; height: 54px; margin: 6px 0 4px; }
  #scr-levelup #cards .card .txt { border-left: 0; padding-left: 0; border-top: 2px solid color-mix(in srgb, var(--cc) 55%, transparent); padding-top: 6px; }
  #scr-levelup #cards .card .nm { font-size: 18px; justify-content: center; }
  #scr-levelup #cards .card .key { display: none; }
}
body.touch #scr-levelup .card .ico::before, body.touch #scr-levelup .card::before { animation: none; }     /* mobile: no permanent animations */
@media (prefers-reduced-motion: reduce) { #scr-levelup .card .ico::before { animation: none; } }

/* ---- level-up cards, second pass (02-11-2026): the preview never stretched, gloss, ornaments, foil ---- */
#scr-levelup .card .mv-prev { flex: 0 0 auto; width: min(220px, 36%); height: auto !important; aspect-ratio: 400 / 224; min-height: 0;
  border-radius: 10px; outline: 1px solid rgba(255,255,255,.06); outline-offset: -1px; }
#scr-levelup .card::after { pointer-events: none; }
#scr-levelup .card > .gl { content: ''; }
#scr-levelup .card { background-image:
    linear-gradient(180deg, rgba(255,255,255,.07), transparent 38%),
    linear-gradient(100deg, color-mix(in srgb, var(--cc) 30%, transparent) 0%, transparent 42%),
    repeating-linear-gradient(-55deg, rgba(255,255,255,.035) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #12151f, #07080d); }
#scr-levelup .card.t-evo { background-image:
    linear-gradient(180deg, rgba(255,255,255,.08), transparent 38%),
    linear-gradient(100deg, rgba(255,210,74,.38), transparent 45%),
    repeating-linear-gradient(-55deg, rgba(255,255,255,.05) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #1a150a, #090704); }
/* the accent bar: a gradient of the move's colour; a new move's breathes */
#scr-levelup .card .txt { border-left: 0; padding-left: 14px; position: relative; }
#scr-levelup .card .txt::before { content: ''; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, var(--cc2), var(--cc) 50%, color-mix(in srgb, var(--cc) 30%, transparent)); box-shadow: 0 0 8px color-mix(in srgb, var(--cc) 60%, transparent); }
#scr-levelup .card.t-new .txt::before { animation: lv-bar 2.2s ease-in-out infinite; }
@keyframes lv-bar { 50% { box-shadow: 0 0 14px var(--cc); filter: brightness(1.35); } }
/* the subtitle: ornament lines on both sides */
#scr-levelup .sub { display: flex; align-items: center; justify-content: center; gap: 12px; }
#scr-levelup .sub::before, #scr-levelup .sub::after { content: ''; width: 64px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,214,120,.55)); }
#scr-levelup .sub::after { background: linear-gradient(90deg, rgba(255,214,120,.55), transparent); }
/* evolution: foil corners that shimmer */
#scr-levelup .card.t-evo .fr { opacity: 1; animation: lv-foil 2.4s ease-in-out infinite; }
@keyframes lv-foil { 50% { filter: drop-shadow(0 0 9px rgba(255,220,120,.9)) brightness(1.4); } }
/* the medallion's icon pulses softly on a new move */
#scr-levelup .card.t-new .ico > * { animation: lv-icon 2.6s ease-in-out infinite; }
@keyframes lv-icon { 50% { transform: scale(1.08); filter: drop-shadow(0 0 10px var(--cc)); } }
/* the keycap: a lit top edge */
#scr-levelup .card .key { box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 0 10px color-mix(in srgb, var(--cc) 30%, transparent); }
#scr-levelup .card:hover .key { background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 60%, #111), #05060a); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 16px color-mix(in srgb, var(--cc) 55%, transparent); }
@media (max-height: 520px) and (orientation: landscape) {
  #scr-levelup #cards .card .txt { padding-left: 0; }
  #scr-levelup #cards .card .txt::before { left: 10%; right: 10%; top: 0; bottom: auto; width: auto; height: 2px; }
  /* in the column: it shrinks with the room left, keeping its proportions (never stretched, never cut) */
  #scr-levelup #cards .card .mv-prev { width: auto; height: auto !important; max-width: 100%; max-height: 112px; flex: 0 1 auto; min-height: 0; object-fit: contain; }
  #scr-levelup #cards .card { gap: 6px; padding: 12px 8px 10px; }
  #scr-levelup #cards .card .ico { flex-basis: 48px; width: 48px; height: 48px; margin: 4px 0 2px; }
  #scr-levelup #cards .card .nm { font-size: 16px; }
  #scr-levelup #cards .card .ds { font-size: 12px; line-height: 1.25; }
  #scr-levelup .sub::before, #scr-levelup .sub::after { width: 36px; }
}
body.touch #scr-levelup .card.t-new .txt::before, body.touch #scr-levelup .card.t-evo .fr, body.touch #scr-levelup .card.t-new .ico > * { animation: none; }
@media (prefers-reduced-motion: reduce) { #scr-levelup .card.t-new .txt::before, #scr-levelup .card.t-evo .fr, #scr-levelup .card.t-new .ico > * { animation: none; } }

/* ---- level-up cards, third pass (02-11-2026): depth and light. A big faded watermark of the icon behind the text (.wm),
 * motes of the move's colour drifting up (.mt), a light sweeping round the medallion, an aurora drifting behind the cards and
 * a burst when the screen opens, a slight tilt on hover. Phones keep the still version. ---- */
#scr-levelup .box { position: relative; overflow: hidden; }
#scr-levelup .box > * { position: relative; z-index: 1; }
#scr-levelup .box::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 55% 40% at 50% 28%, rgba(255,214,120,.45), transparent 70%);
  animation: lv-burst 1.1s ease-out both; }
@keyframes lv-burst { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(1.6); } }
#scr-levelup .box::after { content: ''; position: absolute; inset: -12%; z-index: 0; pointer-events: none; opacity: .9;
  background:
    radial-gradient(ellipse 34% 28% at 22% 24%, rgba(255,190,60,.14), transparent 70%),
    radial-gradient(ellipse 30% 26% at 78% 70%, rgba(110,150,255,.12), transparent 70%),
    radial-gradient(ellipse 40% 24% at 55% 95%, rgba(255,120,200,.08), transparent 70%);
  filter: blur(26px); animation: aurora 16s ease-in-out infinite alternate; }
#scr-levelup .card .wm { position: absolute; right: 54px; top: 50%; transform: translateY(-50%) rotate(-12deg); opacity: .07; pointer-events: none; z-index: 0;
  filter: drop-shadow(0 0 10px var(--cc)); transition: opacity .25s, transform .4s; }
#scr-levelup .card .wm > * { width: 120px; height: 120px; }
#scr-levelup .card:hover .wm { opacity: .14; transform: translateY(-50%) rotate(-6deg) scale(1.08); }
#scr-levelup .card .mt { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .55;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--cc) 90%, #fff) 0 1.2px, transparent 2px) 12% 80% / 140px 140px repeat,
    radial-gradient(circle, color-mix(in srgb, var(--cc) 70%, #fff) 0 1px, transparent 1.8px) 60% 30% / 190px 190px repeat,
    radial-gradient(circle, var(--cc) 0 .8px, transparent 1.6px) 85% 60% / 110px 110px repeat;
  animation: lv-motes 9s linear infinite; }
@keyframes lv-motes { to { background-position: 12% -60px, 60% -160px, 85% -50px; } }
#scr-levelup .card:hover .mt { opacity: .9; animation-duration: 4s; }
#scr-levelup .card .fr, #scr-levelup .card .ico, #scr-levelup .card .txt, #scr-levelup .card .key, #scr-levelup .card .mv-prev { position: relative; z-index: 1; }
#scr-levelup .card .fr { position: absolute; }
#scr-levelup .card .ico::after { inset: -6px; border: 0;
  background: conic-gradient(from 0deg, transparent 0 62%, color-mix(in srgb, var(--cc) 90%, #fff) 80%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 calc(50% - 3px), #000 calc(50% - 2px)); mask: radial-gradient(circle, transparent 0 calc(50% - 3px), #000 calc(50% - 2px));
  animation: lv-ring 4s linear infinite; opacity: .9; }
#scr-levelup .card:hover .ico::after { animation-duration: 1.4s; }
#scr-levelup .card:hover, #scr-levelup .card:focus-visible { transform: translateY(-4px) scale(1.025) perspective(900px) rotateY(-1.5deg); }
#scr-levelup .card.t-evo .mt { opacity: .8; }
#scr-levelup .card.t-evo .wm { opacity: .12; }
body.touch #scr-levelup .box::after, body.touch #scr-levelup .card .mt, body.touch #scr-levelup .card .ico::after { animation: none; }
body.touch #scr-levelup .card .mt { opacity: .35; }
@media (prefers-reduced-motion: reduce) { #scr-levelup .box::before, #scr-levelup .box::after, #scr-levelup .card .mt, #scr-levelup .card .ico::after { animation: none; } }
@media (max-height: 520px) and (orientation: landscape) {
  #scr-levelup .card .wm { right: auto; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-12deg); }
  #scr-levelup .card:hover .wm { transform: translate(-50%, -50%) rotate(-6deg) scale(1.08); }
}

/* (03-11-2026, Salva) Free picks in the gacha's Status tab: one row per rarity, the bar to the next pick. */
.gfree { margin: 10px 0 0; }
.gfree .gx-lh { margin: 0 0 4px; }
.gf-row { padding: 6px 8px 7px; border: 1px solid var(--line); border-radius: 12px; margin: 6px 0 0; background: rgba(0,0,0,.18); }
.gf-row.ready { border-color: var(--bc); box-shadow: inset 0 0 18px color-mix(in srgb, var(--bc) 18%, transparent); }
.gf-row .gx-gh { margin: 0; }
.gf-line { display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; }
.gf-line .gx-bar { flex: 1 1 auto; }
.gf-line .btn { flex: none; }
.gf-row .note { display: block; margin: 2px 0 0; font-size: 11px; }
.gf-confirm { position: sticky; bottom: -1px; z-index: 2; flex: none; justify-content: space-between; align-items: center; margin: 8px -4px -4px; padding: 8px 4px 4px; gap: 8px; background: linear-gradient(180deg, transparent, var(--s1) 35%); }     /* (sticky: in view while the grid scrolls, phones too) */
.gf-confirm .note { min-width: 0; }
.gw-cell > span { font-size: 10px; color: var(--muted); }
/* (03-11-2026) The Luck IV's roll in the run summary. */
.stats > .st-luck { display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; border-style: dashed; }
.stats > .st-luck span { color: var(--muted); font-size: 13px; }
.stats > .st-luck.hit { border: 1px solid rgba(124,242,154,.75); border-style: solid; background: linear-gradient(180deg, rgba(124,242,154,.16), rgba(0,0,0,.2));
  box-shadow: 0 0 18px rgba(124,242,154,.25), inset 0 0 22px rgba(124,242,154,.12); animation: luckPop .7s cubic-bezier(.2,1.4,.4,1) both; }
.stats > .st-luck.hit b { font-size: 24px; color: #9cffb8; text-shadow: 0 2px 0 #0c3d1e, 0 0 16px rgba(124,242,154,.55); letter-spacing: 1px; }
.stats > .st-luck.hit span { color: #d8ffe4; }
.stats > .st-luck.hit em { font-style: normal; font-size: 20px; color: var(--gold, #ffd24a); text-shadow: 0 2px 0 #6a3a00, 0 0 14px rgba(255,210,74,.35); }
@keyframes luckPop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .stats > .st-luck.hit { animation: none; } }

/* (03-11-2026) IV milestones in the IV panel: the main of the pyramid only. */
.ivm-tier { margin: 6px 12px 0; padding: 7px 9px 8px; border: 1px dashed var(--line); border-radius: 12px; opacity: .8; }
.ivm-tier.on { border-style: solid; border-color: rgba(255,210,74,.55); opacity: 1; background: linear-gradient(180deg, rgba(255,210,74,.08), rgba(0,0,0,.18)); }
.ivm-th { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; margin-bottom: 4px; }
.ivm-th b { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); }
.ivm-th span { color: var(--muted); font-weight: 700; }
.ivm-tier.on .ivm-th span { color: #ffe58a; }
.ivm-tier small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.3; }

/* ============ Trade chat (03-11-2026): the Plaza chat with the other trader, inside the trade window ============
   Inline under the two sides; on short screens it opens over the panel from the "Chat" button, field on top
   (above the phone keyboard). */
#hub-ui .tx-chat { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--hub-line, rgba(255,255,255,.12)); background: rgba(255,255,255,.025); min-width: 0; }
#hub-ui .tx-chat-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
#hub-ui .tx-chat-head b { flex: none; font: 700 13px var(--font-body); color: #fff; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hub-ui .tx-chat-head small { flex: 1 1 auto; min-width: 0; font: 600 11px var(--font-body); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#hub-ui .tx-chat-head .hub-x-mini { display: none; margin-left: auto; }
#hub-ui .tx-chat-log { height: 92px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; font: 500 12.5px/1.35 var(--font-body); }
#hub-ui .tx-line { display: flex; gap: 6px; align-items: baseline; min-width: 0; color: #e8ecff; }
#hub-ui .tx-line b { flex: none; color: #8fd0ff; font-weight: 700; }
#hub-ui .tx-line.me b { color: var(--gold); }
#hub-ui .tx-lt { flex: none; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
#hub-ui .tx-lm { min-width: 0; overflow-wrap: anywhere; }
#hub-ui .tx-chat-note { margin: auto 0; text-align: center; font: 600 12px var(--font-body); color: var(--muted); }
#hub-ui .tx-chat .tx-say { justify-content: flex-start; flex-wrap: wrap; }
#hub-ui .tx-chat-form { display: flex; gap: 6px; min-width: 0; }
#hub-ui .tx-chat-in { flex: 1 1 auto; min-width: 0; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--hub-line, rgba(255,255,255,.12)); background: #0a0a10; color: #fff; font: 600 13px var(--font-body); outline: none; }
#hub-ui .tx-chat-in:focus-visible, #hub-ui .tx-chat-in:focus { border-color: rgba(255,224,138,.7); }
#hub-ui .tx-chat-form .btn { flex: none; }
#hub-ui .tx-chat-btn { display: none !important; position: relative; }
#hub-ui .tx-chat-n { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; font: 800 10px/16px var(--font-body); text-align: center; color: #3a2300; background: var(--gold); }
#hub-ui .tx-chat-n.hidden { display: none; }
@media (max-height: 520px) {
  #hub-ui .tx-chat-btn { display: inline-flex !important; }
  #hub-ui .tx-chat { display: none; position: absolute; inset: 0; z-index: 4; padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border: 0; border-radius: inherit; background: #050507; }
  #hub-ui .tx-chat.open { display: flex; }
  #hub-ui .tx-chat-head { order: 0; }
  #hub-ui .tx-chat-head .hub-x-mini { display: inline-grid; }
  #hub-ui .tx-chat-form { order: 1; }
  #hub-ui .tx-chat .tx-say { order: 2; flex-wrap: nowrap; overflow-x: auto; }
  #hub-ui .tx-chat .tx-say .hub-chip:nth-child(n+3) { display: inline-flex; }
  #hub-ui .tx-chat-log { order: 3; flex: 1 1 auto; height: auto; min-height: 0; }
}

/* ============ (05-11-2026, Salva) the limited gacha event: Abyssal Kyogre (ui/evgacha-ui.js, ui/announce-ui.js) ============
 * The event theme of the home with its card at the top right, the official announcements popup, the event banner in the
 * gacha, the Primordial reveal and the new rarity. Every class is evx-* / ex-*: the game's own .box, .chip, .note, .row…
 * never reach these. Colours from Salva's banner art.
 */
:root {
  --evx-abyss: #04020d; --evx-violet: #7c3aed; --evx-neon: #a855f7; --evx-cyan: #22d3ee; --evx-ice: #c4f1ff; --evx-gold: #ffd24a;
  --evx-ink: #f4ecff; --evx-muted: #b9a8dc; --evx-line: rgba(168,85,247,.32);
  --evx-prim: linear-gradient(90deg, #c4b5fd, #67e8f9, #f5d0fe, #c084fc, #c4b5fd);
  --evx-disp: 'Pixelify', 'Nunito', system-ui, sans-serif; --evx-body: 'Nunito', system-ui, sans-serif;
}
@keyframes evx-flow { to { background-position: 300% 0; } }
@keyframes evx-spin { to { transform: rotate(1turn); } }
@keyframes evx-breathe { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes evx-drift { from { transform: scale(1.04); } to { transform: translate3d(-2%, -1.5%, 0) scale(1.1); } }
@keyframes evx-caustic { from { background-position: 0 0, 0 0; } to { background-position: 420px 260px, -380px 300px; } }
@keyframes evx-wave { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes evx-in { from { opacity: 0; transform: translateY(16px) scale(.965); } to { opacity: 1; transform: none; } }
@keyframes evx-sweep { from { transform: translateX(-140%) skewX(-18deg); } to { transform: translateX(300%) skewX(-18deg); } }
@keyframes evx-pulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(168,85,247,.5), 0 0 26px rgba(124,58,237,.42), 0 16px 36px rgba(0,0,0,.7); }
                       50% { box-shadow: 0 0 0 1px rgba(34,211,238,.75), 0 0 42px rgba(34,211,238,.4), 0 16px 36px rgba(0,0,0,.7); } }
.ex-title { color: #fff; font-family: var(--evx-disp); font-weight: 700; text-shadow: 0 0 18px rgba(168,85,247,.85), 0 0 2px rgba(196,241,255,.9), 0 3px 0 #2e1065; letter-spacing: .01em; }

/* ---------- the new rarity: Primordial (beyond Legendary) ---------- */
.evx-prim { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 10px; border-radius: 999px; position: relative; isolation: isolate;
  background: rgba(14,6,34,.85); box-shadow: 0 0 16px rgba(168,85,247,.55); font: 900 12.5px/1 var(--evx-body); letter-spacing: .18em; text-transform: uppercase; }
.evx-prim::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--evx-prim); background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: evx-flow 3.4s linear infinite; z-index: -1; }
.evx-prim .ex-pt { filter: brightness(1.25) saturate(1.2); background: var(--evx-prim) !important; background-size: 300% 100% !important; -webkit-background-clip: text !important; background-clip: text !important;
  color: transparent !important; -webkit-text-fill-color: transparent !important; -webkit-text-stroke: 0 !important; text-shadow: none !important; font: inherit !important; animation: evx-flow 3.4s linear infinite; }
.evx-prim .ex-pd { width: 10px; height: 10px; transform: rotate(45deg); background: var(--evx-prim); background-size: 300% 100%; animation: evx-flow 3.4s linear infinite; box-shadow: 0 0 10px #c084fc; }

/* ---------- the home in the event's colors (v2, 05-11-2026: «fai meglio la home»): the abyss ----------
 * Pitch-deep water instead of the night scene: light shafts from the surface, Kyogre lurking far down (only its glowing
 * markings and its red eye, art-glow on a screen blend), plankton and bubbles, a seabed of rocks with bioluminescence.
 */
@keyframes evx-sway { 0%, 100% { transform: rotate(var(--r0)) translateX(0); opacity: var(--o0); } 50% { transform: rotate(var(--r1)) translateX(3vw); opacity: var(--o1); } }
@keyframes evx-lurk { 0% { transform: translate3d(-3vw, 0, 0) scale(1); } 50% { transform: translate3d(2vw, -1.2vh, 0) scale(1.03); } 100% { transform: translate3d(-3vw, 0, 0) scale(1); } }
@keyframes evx-glow { 0%, 100% { opacity: .26; } 45% { opacity: .52; } 55% { opacity: .48; } }
@keyframes evx-eye { 0%, 82%, 100% { opacity: .35; transform: scale(.8); } 86% { opacity: 1; transform: scale(1.25); } 90% { opacity: .6; transform: scale(1); } 94% { opacity: 1; transform: scale(1.15); } }
@keyframes evx-bio { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
body.evx-theme:has(#scr-menu:not(.hidden)) #game { opacity: 0; }
#scr-menu .evx-abyss { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: radial-gradient(ellipse 90% 60% at 50% -8%, #2a1561 0%, #140a36 34%, #07041a 64%, #020108 100%); }
#scr-menu .evx-abyss .ex-rays { position: absolute; inset: -10% -10% 30%; mix-blend-mode: screen; }
#scr-menu .evx-abyss .ex-rays i { position: absolute; top: -20%; width: 9vw; height: 120%; transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(150, 220, 255, .22), rgba(130, 120, 255, .08) 55%, transparent); filter: blur(14px); animation: evx-sway 13s ease-in-out infinite; }
#scr-menu .evx-abyss .ex-lurk { position: absolute; left: -7vw; width: 110vw; top: 3vh; aspect-ratio: 1846 / 280; animation: evx-lurk 26s ease-in-out infinite; filter: blur(.7px) saturate(.9); }
#scr-menu .evx-abyss .ex-lurk .ex-lines { position: absolute; inset: 0; background: center / 100% 100% no-repeat; mix-blend-mode: screen; animation: evx-glow 6s ease-in-out infinite;
  -webkit-mask: linear-gradient(180deg, #000 55%, transparent 98%), linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-composite: source-in;
  mask: linear-gradient(180deg, #000 55%, transparent 98%) intersect, linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
#scr-menu .evx-abyss .ex-lurk .ex-eye { position: absolute; left: 64.4%; top: 47%; width: 5.2%; aspect-ratio: 2 / 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 90, 110, .95), rgba(255, 40, 90, .45) 40%, transparent 70%); mix-blend-mode: screen; animation: evx-eye 7s ease-in-out infinite; }
#scr-menu .evx-abyss canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#scr-menu .evx-abyss .ex-bed { position: absolute; left: 0; right: 0; bottom: 0; height: 22vh; }
#scr-menu .evx-abyss .ex-bed::before { content: ""; position: absolute; left: 0; right: 0; bottom: 30%; height: 70%; background: linear-gradient(180deg, transparent, rgba(124, 58, 237, .14) 60%, transparent); filter: blur(10px); }
#scr-menu .evx-abyss .ex-bed svg { position: absolute; inset: auto 0 0; width: 100%; height: 100%; }
#scr-menu .evx-abyss .ex-bed .ex-bio { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #67e8f9; box-shadow: 0 0 10px 3px rgba(103, 232, 249, .8); animation: evx-bio 3.2s ease-in-out infinite; }
#scr-menu .evx-abyss .ex-bed .ex-bio.ex-m { background: #f0abfc; box-shadow: 0 0 10px 3px rgba(240, 171, 252, .8); }
#scr-menu .evx-abyss .ex-shade { position: absolute; inset: 0; background: radial-gradient(ellipse 34% 40% at 50% 56%, rgba(2, 1, 8, .72), transparent 72%),
  linear-gradient(180deg, transparent 62%, rgba(2, 1, 8, .55)); }
body.evx-theme #scr-menu::before { background: none; }
body.evx-theme #scr-menu .hub { position: relative; z-index: 2; }
body.evx-theme #scr-menu .hub-btn { border-color: rgba(168, 85, 247, .34); background: linear-gradient(180deg, rgba(30, 14, 70, .72), rgba(6, 3, 18, .86));
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(196, 181, 253, .12), 0 10px 26px rgba(0, 0, 0, .5); }
body.evx-theme #scr-menu .hub-btn:hover, body.evx-theme #scr-menu .hub-btn:focus-visible { border-color: rgba(34, 211, 238, .8); box-shadow: 0 0 26px rgba(34, 211, 238, .3), inset 0 1px 0 rgba(196, 241, 255, .2); }
body.evx-theme #scr-menu .hub-btn small { color: #c9b8ee; }
body.evx-theme #scr-menu .hub-btn .mi-ico { box-shadow: 0 0 0 1px rgba(168, 85, 247, .45), 0 0 16px rgba(124, 58, 237, .35); }
body.evx-theme #scr-menu .hub-logo .t1 { filter: drop-shadow(0 0 22px rgba(168, 85, 247, .7)) drop-shadow(0 0 4px rgba(34, 211, 238, .45)); }
body.evx-theme #scr-menu .hub-ring i { border-color: rgba(103, 232, 249, .35) !important; }
body.evx-theme #scr-menu .mp-btn { border-color: rgba(168, 85, 247, .5); background: linear-gradient(180deg, rgba(30, 14, 70, .8), rgba(6, 3, 18, .9)); }
@media (max-height: 600px) { #scr-menu .evx-abyss .ex-lurk { top: 9vh; left: -16vw; width: 128vw; } #scr-menu .evx-abyss .ex-bed { height: 20vh; } }

/* ---------- the event's card, top right of the home ---------- */
#scr-menu .evx-fab { position: absolute; z-index: 4; right: max(16px, env(safe-area-inset-right, 0px)); top: calc(env(safe-area-inset-top, 0px) + 74px);
  width: 372px; height: 172px; border-radius: 18px; padding: 0; border: 0; cursor: pointer; overflow: hidden; color: var(--evx-ink); text-align: left;
  background: #07031a; animation: evx-pulse 3.2s ease-in-out infinite; isolation: isolate; font-family: var(--evx-body); }
#scr-menu .evx-fab::before { content: ""; position: absolute; inset: -60%; background: conic-gradient(from 0deg, transparent 0 58%, rgba(34,211,238,.95), rgba(168,85,247,.95), rgba(245,208,254,.9), transparent 90%);
  animation: evx-spin 4.5s linear infinite; z-index: -2; }
#scr-menu .evx-fab::after { content: ""; position: absolute; inset: 2px; border-radius: 16px; background: #07031a; z-index: -1; }
#scr-menu .evx-fab .ex-fart { position: absolute; inset: 2px; border-radius: 16px; background: 66% 46% / 300% auto no-repeat; }
#scr-menu .evx-fab .ex-fshade { position: absolute; inset: 2px; border-radius: 16px; background: linear-gradient(90deg, rgba(5,2,16,.97) 0%, rgba(5,2,16,.86) 40%, rgba(5,2,16,.1) 76%), linear-gradient(0deg, rgba(5,2,16,.6), transparent 40%); }
#scr-menu .evx-fab .ex-glint { position: absolute; top: 0; bottom: 0; width: 34%; background: linear-gradient(90deg, transparent, rgba(196,241,255,.22), transparent); animation: evx-sweep 4.2s ease-in-out infinite 1s; }
#scr-menu .evx-fab .ex-fin { position: absolute; inset: 15px 16px; display: flex; flex-direction: column; justify-content: space-between; max-width: 64%; }
#scr-menu .evx-fab .ex-kick { display: inline-flex; align-items: center; gap: 7px; font: 900 10.5px/1 var(--evx-body); letter-spacing: .16em; text-transform: uppercase; color: var(--evx-ice); }
#scr-menu .evx-fab .ex-kick i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d8d; box-shadow: 0 0 10px #ff4d8d; animation: evx-breathe 1.3s ease-in-out infinite; }
#scr-menu .evx-fab .ex-fname { font-size: 26px; line-height: 1; }
#scr-menu .evx-fab .ex-fsub { font-size: 12.5px; color: #dacff7; line-height: 1.3; }
#scr-menu .evx-fab .ex-fsub b { color: #fff; }
#scr-menu .evx-fab .ex-ftime { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font: 800 12px/1 var(--evx-body);
  color: #2b1500; background: linear-gradient(180deg, #fff2b3, #ffd24a 45%, #f4a21f); box-shadow: 0 0 14px rgba(255,190,70,.5); }
#scr-menu .evx-fab .ex-fgo { position: absolute; right: 14px; bottom: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, #c084fc, #7c3aed); box-shadow: 0 0 16px rgba(168,85,247,.85); font: 900 18px/1 var(--evx-body); color: #fff; }
#scr-menu .evx-fab:hover { translate: 0 -2px; }
@media (max-width: 1100px), (max-height: 820px) { #scr-menu .evx-fab { width: 316px; height: 138px; top: calc(env(safe-area-inset-top, 0px) + 66px); } #scr-menu .evx-fab .ex-fname { font-size: 21px; } #scr-menu .evx-fab .ex-fsub { font-size: 11.5px; } }
@media (max-height: 520px), (max-width: 700px) {
  #scr-menu .evx-fab { top: calc(env(safe-area-inset-top, 0px) + 50px); right: max(10px, env(safe-area-inset-right, 0px)); width: 188px; height: 62px; border-radius: 14px; }
  #scr-menu .evx-fab::after, #scr-menu .evx-fab .ex-fart, #scr-menu .evx-fab .ex-fshade { border-radius: 12px; }
  #scr-menu .evx-fab .ex-fart { background-size: 360% auto; background-position: 66% 46%; }
  #scr-menu .evx-fab .ex-fin { inset: 7px 9px; max-width: 74%; }
  #scr-menu .evx-fab .ex-kick, #scr-menu .evx-fab .ex-fsub, #scr-menu .evx-fab .ex-fgo { display: none; }
  #scr-menu .evx-fab .ex-fname { font-size: 15px; }
  #scr-menu .evx-fab .ex-ftime { padding: 3px 8px; font-size: 10.5px; }
}

/* ---------- the official announcements, at the center when the game opens ---------- */
.evx-ann { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; font-family: var(--evx-body); color: var(--evx-ink);
  background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(46,16,101,.55), rgba(2,1,8,.9)); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.evx-ann .ex-abox { position: relative; width: min(1120px, 94vw); max-height: calc(100vh - 32px); overflow: auto; border-radius: 24px; scrollbar-width: thin;
  background: linear-gradient(180deg, #0d0624, #05020f 60%); box-shadow: 0 0 0 1px rgba(168,85,247,.55), 0 0 80px rgba(124,58,237,.45), 0 40px 120px rgba(0,0,0,.9);
  animation: evx-in .55s cubic-bezier(.2,.9,.25,1.2) both; }
.evx-ann .ex-ahead { display: flex; align-items: center; gap: 12px; padding: 13px 16px 12px 20px; border-bottom: 1px solid rgba(168,85,247,.22); }
.evx-ann .ex-attl { font: 700 19px/1 var(--evx-disp); display: flex; align-items: center; gap: 10px; color: #fff; }
.evx-ann .ex-attl i { width: 10px; height: 10px; transform: rotate(45deg); background: var(--evx-gold); box-shadow: 0 0 10px rgba(255,210,74,.8); }
.evx-ann .ex-acnt { margin-left: auto; font-size: 13px; color: var(--evx-muted); font-weight: 800; }
.evx-ann .ex-ax { width: 36px; height: 36px; border-radius: 11px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #fff; font: 700 18px/1 system-ui; cursor: pointer; display: grid; place-items: center; }
.evx-ann .ex-hero { position: relative; aspect-ratio: 1846 / 528; overflow: hidden; background: #05020f; }
.evx-ann .ex-hart { position: absolute; inset: 0; background: center / cover no-repeat; animation: evx-drift 24s ease-in-out infinite alternate; }
.evx-ann .ex-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.evx-ann .ex-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,2,15,.3), transparent 28%, transparent 70%, #05020f); pointer-events: none; }
.ex-glint { position: absolute; top: 0; bottom: 0; width: 26%; z-index: 2; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(196,241,255,.18), transparent); animation: evx-sweep 5s ease-in-out infinite 1.2s; }
.ex-chip { position: absolute; z-index: 3; top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font: 800 13.5px/1 var(--evx-body); color: #fff;
  background: rgba(8,3,22,.8); border: 1px solid rgba(168,85,247,.7); box-shadow: 0 0 18px rgba(124,58,237,.45); }
.ex-chip.ex-l { left: 16px; } .ex-chip.ex-r { right: 16px; border-color: rgba(255,210,74,.75); box-shadow: 0 0 18px rgba(255,190,70,.35); }
.ex-chip.ex-r svg { color: var(--evx-gold); }
.ex-chip .ex-ball { width: 18px; height: 18px; flex: none; border-radius: 50%; background: linear-gradient(180deg, #a855f7 0 45%, #160a33 45% 55%, #f4ecff 55%);
  box-shadow: 0 0 0 2px #160a33 inset, 0 0 10px rgba(168,85,247,.8); position: relative; }
.ex-chip .ex-ball::after { content: ""; position: absolute; left: 6px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #f4ecff; box-shadow: 0 0 0 2px #160a33; }
.ex-chip .ex-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d8d; box-shadow: 0 0 10px #ff4d8d; animation: evx-breathe 1.3s ease-in-out infinite; }
.evx-ann .ex-nav { position: absolute; z-index: 5; top: calc(50% - 22px); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(8,3,22,.72); color: #fff; font: 900 22px/1 system-ui; cursor: pointer; display: grid; place-items: center; }
.evx-ann .ex-nav.ex-p { left: 12px; } .evx-ann .ex-nav.ex-n { right: 12px; }
.evx-ann .ex-abody { padding: 4px 26px 20px; display: grid; gap: 15px; }
.evx-ann .ex-ttl2 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.evx-ann .ex-h2 { margin: 0; font-size: clamp(28px, 3.2vw, 42px); line-height: 1; }
.evx-ann .ex-lead { margin: 0; color: #dacff7; font-size: 15.5px; line-height: 1.5; max-width: 80ch; }
.evx-ann .ex-lead b { color: #fff; }
.evx-ann .ex-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.evx-ann .ex-fact { padding: 12px 14px; border-radius: 14px; background: linear-gradient(180deg, rgba(124,58,237,.18), rgba(124,58,237,.04)); border: 1px solid rgba(168,85,247,.3); }
.evx-ann .ex-fact b { display: block; font: 700 22px/1.05 var(--evx-disp); color: #fff; }
.evx-ann .ex-fact b.ex-gold { color: var(--evx-gold); text-shadow: 0 0 14px rgba(255,190,70,.5); }
.evx-ann .ex-fact b.ex-cyan { color: #8ff0ff; text-shadow: 0 0 14px rgba(34,211,238,.5); }
.evx-ann .ex-fact b.ex-vio { color: #e9d5ff; text-shadow: 0 0 14px rgba(168,85,247,.6); }
.evx-ann .ex-fact small { display: block; margin-top: 5px; font-size: 12.5px; color: var(--evx-muted); line-height: 1.3; }
.evx-ann .ex-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ex-go { position: relative; overflow: hidden; border: 0; border-radius: 14px; padding: 15px 30px; cursor: pointer; font: 700 19px/1 var(--evx-disp); color: #fff;
  background: linear-gradient(180deg, #c084fc, #7c3aed 55%, #4c1d95); box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset, 0 0 30px rgba(124,58,237,.7), 0 10px 26px rgba(0,0,0,.6); }
.ex-go::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: evx-sweep 2.8s ease-in-out infinite; }
.ex-later { border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 14px 22px; background: rgba(255,255,255,.04); color: #e9e2ff; font: 700 15px/1 var(--evx-body); cursor: pointer; }
.evx-ann .ex-chk { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--evx-muted); font-size: 13px; font-weight: 700; }
.evx-ann .ex-chk input { accent-color: #a855f7; width: 16px; height: 16px; margin: 0; }
.evx-ann .ex-dots { display: flex; gap: 8px; justify-content: center; padding: 0 0 16px; }
.evx-ann .ex-dots i { width: 9px; height: 9px; border-radius: 999px; background: rgba(255,255,255,.22); cursor: pointer; }
.evx-ann .ex-dots i.ex-on { width: 26px; background: linear-gradient(90deg, #a855f7, #22d3ee); box-shadow: 0 0 10px rgba(168,85,247,.8); }
.evx-ann .ex-slide[hidden] { display: none; }
.evx-ann .ex-note { display: grid; gap: 14px; padding: 26px 28px 22px; min-height: 260px; align-content: start;
  background: radial-gradient(ellipse 60% 80% at 100% 0%, rgba(34,211,238,.12), transparent 60%); }
.evx-ann .ex-ntag { justify-self: start; padding: 5px 11px; border-radius: 999px; font: 900 11px/1 var(--evx-body); letter-spacing: .12em; text-transform: uppercase; color: #032312; background: #5fe08a; }
.evx-ann .ex-nh2 { margin: 0; font-size: 32px; line-height: 1.05; }
.evx-ann .ex-np { margin: 0; color: #dacff7; font-size: 16px; line-height: 1.55; max-width: 80ch; }
@media (max-width: 900px), (max-height: 600px) {
  .evx-ann { padding: 6px; }
  .evx-ann .ex-abox { width: 98vw; max-height: calc(100vh - 12px); border-radius: 16px; }
  .evx-ann .ex-ahead { padding: 7px 10px 7px 14px; } .evx-ann .ex-attl { font-size: 14px; } .evx-ann .ex-ax { width: 30px; height: 30px; }
  .evx-ann .ex-hero { aspect-ratio: auto; height: min(36vh, 31vw); }
  .evx-ann .ex-hart { background-position: center 62%; }
  .ex-chip { top: 7px; padding: 4px 9px; font-size: 11px; gap: 6px; } .ex-chip.ex-l { left: 8px; } .ex-chip.ex-r { right: 8px; } .ex-chip .ex-ball { width: 13px; height: 13px; }
  .ex-chip .ex-ball::after { left: 4px; top: 4px; width: 5px; height: 5px; }
  .evx-ann .ex-abody { padding: 2px 14px 10px; gap: 9px; }
  .evx-ann .ex-h2 { font-size: 24px; } .evx-prim { font-size: 10.5px; padding: 4px 10px 4px 8px; }
  .evx-ann .ex-lead { font-size: 12.5px; line-height: 1.4; }
  .evx-ann .ex-facts { gap: 6px; } .evx-ann .ex-fact { padding: 7px 9px; border-radius: 10px; } .evx-ann .ex-fact b { font-size: 16px; } .evx-ann .ex-fact small { font-size: 10.5px; margin-top: 3px; }
  .ex-go { padding: 10px 18px; font-size: 15px; border-radius: 11px; } .ex-later { padding: 9px 14px; font-size: 13px; border-radius: 11px; }
  .evx-ann .ex-nav { display: none; } .evx-ann .ex-dots { padding-bottom: 8px; }
  .evx-ann .ex-note { min-height: 0; padding: 16px; } .evx-ann .ex-nh2 { font-size: 22px; } .evx-ann .ex-np { font-size: 13.5px; }
}
@media (max-width: 560px) { .evx-ann .ex-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .evx-ann .ex-chk { margin-left: 0; } }

/* ---------- the event in the gacha: its card at the top right, the poster, the status and the summons ---------- */
#scr-gacha .gx-head .evx-gtab { margin-left: auto; margin-right: 12px; position: relative; display: flex; align-items: center; gap: 12px; height: 58px; min-width: 300px; padding: 0 16px 0 0;
  border: 0; border-radius: 14px; cursor: pointer; overflow: hidden; isolation: isolate; color: #fff; text-align: left; font-family: var(--evx-body); background: #08041c; }
#scr-gacha .gx-head .evx-gtab::before { content: ""; position: absolute; inset: -150%; background: conic-gradient(from 0deg, transparent 0 55%, #22d3ee, #a855f7, #f0abfc, transparent 90%);
  animation: evx-spin 3.8s linear infinite; z-index: -2; }
#scr-gacha .gx-head .evx-gtab::after { content: ""; position: absolute; inset: 2px; border-radius: 12px; background: linear-gradient(90deg, #1c0c40, #08041c 70%); z-index: -1; }
#scr-gacha .gx-head .evx-gtab .ex-gart { width: 120px; align-self: stretch; margin: 2px 0 2px 2px; border-radius: 12px 0 0 12px; background: 64% 44% / 330% auto no-repeat;
  -webkit-mask: linear-gradient(90deg, #000 60%, transparent); mask: linear-gradient(90deg, #000 60%, transparent); }
#scr-gacha .gx-head .evx-gtab .ex-gtxt { display: grid; gap: 4px; }
#scr-gacha .gx-head .evx-gtab .ex-gname { font-size: 18px; line-height: 1; }
#scr-gacha .gx-head .evx-gtab .ex-gmeta { display: flex; align-items: center; gap: 8px; font: 800 12px/1 var(--evx-body); color: var(--evx-gold); }
#scr-gacha .gx-head .evx-gtab .ex-gtag { padding: 3px 7px; border-radius: 6px; font: 900 9.5px/1 var(--evx-body); letter-spacing: .12em; color: #2b1500; background: var(--evx-gold); }
#scr-gacha .gx-head .evx-gtab.ex-on { box-shadow: 0 0 0 2px rgba(255,210,74,.85), 0 0 26px rgba(168,85,247,.6); }
#scr-gacha .gx-head .evx-gtab:not(.ex-on) { opacity: .92; }
#gx-poster.evx-poster { background: #05020f !important; overflow: hidden; border-color: rgba(168,85,247,.6) !important; box-shadow: 0 0 0 1px rgba(168,85,247,.35), 0 0 60px rgba(124,58,237,.35) !important; }
#gx-poster.evx-poster > :not(.evx-stage) { visibility: hidden; }
#gx-poster .evx-stage { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; z-index: 2; }
#gx-poster .evx-stage .ex-sart { position: relative; min-height: 0; overflow: hidden; }
#gx-poster .evx-stage .ex-sa { position: absolute; inset: 0; background: center 44% / cover no-repeat; animation: evx-drift 30s ease-in-out infinite alternate; }
#gx-poster .evx-stage .ex-sart canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#gx-poster .evx-stage .ex-sart::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,2,15,.3), transparent 28%, transparent 66%, #05020f); pointer-events: none; }
#gx-poster .evx-stage .ex-chip { top: 12px; font-size: 13px; padding: 6px 12px; } #gx-poster .evx-stage .ex-chip.ex-l { left: 12px; } #gx-poster .evx-stage .ex-chip.ex-r { right: 12px; }
#gx-poster .evx-stage .ex-sinfo { position: relative; padding: 2px 22px 18px; display: grid; align-content: start; gap: 11px; color: var(--evx-ink); font-family: var(--evx-body); }
#gx-poster .evx-stage .ex-sr1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#gx-poster .evx-stage .ex-sr1 span.ex-beyond { color: var(--evx-muted); font-size: 13px; font-weight: 800; }
#gx-poster .evx-stage .ex-sp { margin: 0; color: #dacff7; font-size: 14.5px; line-height: 1.5; }
#gx-poster .evx-stage .ex-sp b { color: #fff; }
#gx-poster .evx-stage .ex-meter { display: grid; gap: 7px; }
#gx-poster .evx-stage .ex-mtop { display: flex; justify-content: space-between; align-items: baseline; font-weight: 800; font-size: 13px; color: var(--evx-muted); }
#gx-poster .evx-stage .ex-mtop b { font: 700 23px/1 var(--evx-disp); color: #fff; } #gx-poster .evx-stage .ex-mtop b span { color: var(--evx-muted); font-size: 15px; }
.evx-bar { position: relative; height: 16px; border-radius: 999px; overflow: hidden; background: #0b0520; box-shadow: 0 0 0 1px rgba(168,85,247,.45) inset; }
.evx-bar .ex-bfill { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); min-width: 14px; border-radius: inherit; background: linear-gradient(90deg, #4c1d95, #7c3aed 40%, #22d3ee); box-shadow: 0 0 14px rgba(34,211,238,.6); }
.evx-bar .ex-bfill::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.2) 0 6px, transparent 6px 14px); background-size: 300% 100%; animation: evx-flow 2.4s linear infinite; }
.evx-bar .ex-btick { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.16); }
#gx-pity.evx-gauge { display: grid; gap: 11px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(180deg, rgba(124,58,237,.2), rgba(10,4,26,.6)); border: 1px solid rgba(168,85,247,.45); color: var(--evx-ink); font-family: var(--evx-body); }
#gx-pity.evx-gauge .ex-gr1 { display: flex; align-items: center; gap: 12px; }
#gx-pity.evx-gauge .ex-gspr { width: 54px; height: 54px; flex: none; border-radius: 12px; background: 64% 44% / 900% auto no-repeat; box-shadow: 0 0 0 1px rgba(168,85,247,.6), 0 0 16px rgba(168,85,247,.5); }
#gx-pity.evx-gauge .ex-gnm { display: grid; gap: 3px; } #gx-pity.evx-gauge .ex-gnm b { font-size: 18px; line-height: 1; }
#gx-pity.evx-gauge .ex-gnm small { color: var(--evx-muted); font-size: 12px; font-weight: 700; }
#gx-pity.evx-gauge .ex-gleft { margin-left: auto; text-align: right; font: 800 12px/1.25 var(--evx-body); color: var(--evx-muted); }
#gx-pity.evx-gauge .ex-gleft b { display: block; font: 700 20px/1 var(--evx-disp); color: var(--evx-gold); }
#gx-pity.evx-gauge .ex-glist { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font: 600 13px/1.35 var(--evx-body); color: #d8cbf5; }
#gx-pity.evx-gauge .ex-glist li { display: flex; gap: 9px; } #gx-pity.evx-gauge .ex-glist li::before { content: ""; flex: none; margin-top: 5px; width: 7px; height: 7px; transform: rotate(45deg); background: #a855f7; box-shadow: 0 0 6px #a855f7; }
.gx-pulls.evx-pulls .gx-pull { position: relative; overflow: hidden; border: 0 !important; color: #fff !important; }
.gx-pulls.evx-pulls #pull-1 { background: linear-gradient(180deg, #c084fc, #7c3aed 55%, #4c1d95) !important; box-shadow: 0 0 22px rgba(124,58,237,.55) !important; }
.gx-pulls.evx-pulls #pull-10 { background: linear-gradient(180deg, #fff2b3, #ffd24a 40%, #f4a21f 75%, #c96a12) !important; color: #2b1500 !important; box-shadow: 0 0 22px rgba(255,190,70,.45) !important; }
.gx-pulls.evx-pulls #pull-100 { background: linear-gradient(120deg, #0e7490, #22d3ee 30%, #a855f7 70%, #f0abfc) !important; background-size: 200% 100% !important; box-shadow: 0 0 26px rgba(34,211,238,.55) !important; animation: evx-flow 5s linear infinite; }
.gx-pulls.evx-pulls .gx-pull::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: evx-sweep 3.2s ease-in-out infinite; }
#scr-gacha.evx-gacha #gacha-bg { filter: saturate(1.15) brightness(.6); }
@media (max-height: 600px) {
  #scr-gacha .gx-head .evx-gtab { min-width: 0; height: 44px; gap: 8px; padding-right: 10px; }
  #scr-gacha .gx-head .evx-gtab .ex-gart { width: 64px; } #scr-gacha .gx-head .evx-gtab .ex-gname { font-size: 14px; } #scr-gacha .gx-head .evx-gtab .ex-gmeta { font-size: 10.5px; gap: 6px; }
  #gx-poster .evx-stage { grid-template-rows: 1fr; } #gx-poster .evx-stage .ex-sart { height: 100%; } #gx-poster .evx-stage .ex-sa { background-position: center 58%; }
  #gx-poster .evx-stage .ex-sinfo { display: none; }
  #gx-poster .evx-stage .ex-chip { top: 7px; font-size: 10.5px; padding: 4px 8px; }
  #gx-pity.evx-gauge { padding: 10px 12px; gap: 8px; } #gx-pity.evx-gauge .ex-gspr { width: 40px; height: 40px; } #gx-pity.evx-gauge .ex-gnm b { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .evx-abyss *, .evx-fab, .evx-fab *, .evx-ann *, .evx-gtab, .evx-gtab *, .evx-stage *, .evx-bar *, .evx-prim, .evx-prim *, .evx-pulls * { animation: none !important; } }

/* ---------- the Primordial reveal (epic.js) ---------- */
.evx-epic { position: fixed; inset: 0; z-index: 600; background: #000; cursor: pointer; }
.evx-epic canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- home v3 (05-11-2026, «nella home ci deve stare pure pokelit, falla meglio») ---------- */
@keyframes evx-hglow { 0%, 100% { opacity: .18; } 45% { opacity: .62; } 55% { opacity: .55; } }
#scr-menu .evx-abyss .ex-hero { position: absolute; left: 0; right: 0; top: 0; height: 66vh; overflow: hidden; /* (placeHero sets it in the home's own pixels) */
  -webkit-mask: linear-gradient(180deg, rgba(0,0,0,.6) 0, #000 10%, #000 50%, transparent 100%); mask: linear-gradient(180deg, rgba(0,0,0,.6) 0, #000 10%, #000 50%, transparent 100%); }
#scr-menu .evx-abyss .ex-hero img { position: absolute; max-width: none; animation: evx-drift 36s ease-in-out infinite alternate; transform-origin: 60% 30%; }
#scr-menu .evx-abyss .ex-hero .ex-himg { opacity: .9; filter: saturate(1.15) brightness(.92); }
#scr-menu .evx-abyss .ex-hero .ex-hglow { mix-blend-mode: screen; animation: evx-drift 36s ease-in-out infinite alternate, evx-hglow 6s ease-in-out infinite; }
#scr-menu .evx-abyss .ex-hero .ex-heye { position: absolute; translate: -50% -50%; border-radius: 50%; mix-blend-mode: screen;
  background: radial-gradient(ellipse at center, rgba(255, 110, 130, .95), rgba(255, 40, 90, .45) 40%, transparent 70%); animation: evx-eye 7s ease-in-out infinite; }
#scr-menu .evx-abyss .ex-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4, 2, 13, .75), transparent 22%, transparent 78%, rgba(4, 2, 13, .7)); }
/* the logo: bigger, on a dark plate so the gold stands out on the art, glowing in the event's colors */
body.evx-theme #scr-menu .hub-logo { position: relative; transform: scale(1.32); transform-origin: 50% 100%; margin-bottom: 10px; }
body.evx-theme #scr-menu .hub-logo::before { content: ""; position: absolute; left: -38%; right: -38%; top: -55%; bottom: -40%; z-index: -1; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(4, 2, 13, .9) 0%, rgba(4, 2, 13, .62) 45%, transparent 72%); }
body.evx-theme #scr-menu .hub-logo .t1 { filter: drop-shadow(0 0 18px rgba(168, 85, 247, .75)) drop-shadow(0 0 3px rgba(34, 211, 238, .55)) drop-shadow(0 4px 0 #2e1065); }
body.evx-theme #scr-menu .hub-logo .t2 { text-shadow: 0 0 12px rgba(255, 90, 60, .8), 0 2px 0 #000; }
#scr-menu .evx-mlogo { display: none; }
@media (max-height: 520px) {
  #scr-menu .evx-mlogo { display: grid; position: absolute; z-index: 5; left: max(14px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 6px); justify-items: center; line-height: 1; pointer-events: none; }
  #scr-menu .evx-mlogo b { font: 700 26px/1 'Pixelify', sans-serif; letter-spacing: 1px; background: linear-gradient(180deg, #fff7d1 0%, #ffe07a 38%, #ffc12e 62%, #f08f12 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 10px rgba(168, 85, 247, .7)) drop-shadow(0 2px 0 #2e1065); }
  #scr-menu .evx-mlogo small { margin-top: 2px; font: 700 8px/1 'Pixelify', sans-serif; letter-spacing: .5em; text-indent: .5em; color: #ff6a3d; text-shadow: 0 0 8px rgba(255, 90, 60, .7); }
}

/* ---------- (game) the official announcements: the checkbox and arrows at the box level, notes with a picture ---------- */
.evx-ann .ex-abox > .ex-chk { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0; padding: 0 16px 14px; color: var(--evx-muted); font-size: 13px; font-weight: 700; }
.evx-ann .ex-dots { align-items: center; gap: 10px; }
.evx-ann .ex-dots .ex-nav { position: static; display: grid; width: 34px; height: 34px; font-size: 18px; margin: 0 6px; }
.evx-ann .ex-hero.ex-pic { aspect-ratio: 1846 / 528; }
.evx-ann .ex-note.ex-wpic { min-height: 0; padding-top: 6px; }
.evx-ann .ex-dots i:focus-visible, .evx-ann button:focus-visible, .evx-fab:focus-visible, .evx-gtab:focus-visible { outline: 2px solid #67e8f9; outline-offset: 2px; }
@media (max-width: 900px), (max-height: 600px) { .evx-ann .ex-abox > .ex-chk { padding-bottom: 8px; font-size: 11.5px; } .evx-ann .ex-dots .ex-nav { width: 28px; height: 28px; font-size: 15px; margin: 0 4px; } }

/* ---------- (game) the Primordial rarity on the cards, the Pokédex, the lists and the history ---------- */
@keyframes evx-cardglow { from { box-shadow: 0 0 12px rgba(168,85,247,.5), 0 0 0 1px rgba(196,181,253,.5); } to { box-shadow: 0 0 34px rgba(168,85,247,.95), 0 0 64px rgba(34,211,238,.4), 0 0 0 1px rgba(196,241,255,.8); } }
.pcard.prim { --rc: #c084fc; border-color: #c084fc; overflow: hidden; background: radial-gradient(circle at 50% 34%, #3b1475 0%, #12052e 52%, #04020d 100%);
  animation: card-in .38s cubic-bezier(.2,1.3,.4,1) both, evx-cardglow 1.1s ease-in-out infinite alternate; }
.pcard.prim::after { background: linear-gradient(100deg, transparent, rgba(196,241,255,.35), transparent); }
.pcard.prim canvas, .pcard.prim b, .pcard.prim .tag, .pcard.prim .prim-st { position: relative; z-index: 1; }
.pcard.prim b { color: #f5d0fe; text-shadow: 0 0 10px rgba(168,85,247,.9); }
.pcard.prim .tag .new { color: #fff; background: linear-gradient(90deg, #7c3aed, #0891b2); box-shadow: 0 0 12px rgba(168,85,247,.8); }
.prim-st { display: flex; gap: 5px; justify-content: center; align-items: center; min-height: 24px; }
.prim-st i, .evx-gem { display: inline-block; width: 9px; height: 9px; transform: rotate(45deg); background: linear-gradient(135deg, #c4b5fd, #67e8f9 50%, #f0abfc); box-shadow: 0 0 6px #c084fc; }
.evx-gem { width: 8px; height: 8px; margin: 0 3px; vertical-align: 1px; }
#dex-grid .cell.prim { box-shadow: 0 0 0 2px #c084fc, 0 0 18px rgba(168,85,247,.6); background: radial-gradient(circle at 50% 35%, rgba(124,58,237,.4), transparent 70%), var(--panel, #0b0b14); }
#gx-list .gx-lc.pr { border-color: #c084fc; box-shadow: 0 0 14px rgba(168,85,247,.55); }
#gx-hist em.pr { color: #fff; background: linear-gradient(90deg, #7c3aed, #0891b2); }
#gacha-rates .gx-or.pr span:first-child { font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .pcard.prim { animation: none; } }
@media (max-height: 500px) { .evx-ann .ex-lead { display: none; } }          /* (a phone on its side: the numbers and the button stay in view) */

/* ============ (08-11-2026) The Anonymous Pack (js/ui/pack-ui.js): home medallion, chat frame (fr-6), name colour (nc-5), terminal text (tc-1) ============ */
#scr-menu .pack-fab { position: absolute; z-index: 3; left: max(14px, env(safe-area-inset-left, 0px)); top: calc(env(safe-area-inset-top, 0px) + 124px); display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border-radius: 999px; border: 1px solid rgba(57,255,20,.55); background: linear-gradient(90deg, rgba(57,255,20,.16), rgba(4,8,4,.9)); color: #fff; font: inherit; font-size: 14px; cursor: pointer; text-align: left; box-shadow: 0 0 18px rgba(57,255,20,.22); animation: hub-in-m .55s cubic-bezier(.2,.9,.2,1) .5s both; }
#scr-menu .pack-fab[hidden] { display: none; }
#scr-menu .pack-fab:hover, #scr-menu .pack-fab:focus-visible { translate: 0 -2px; border-color: #39ff14; box-shadow: 0 0 26px rgba(57,255,20,.45); }
#scr-menu .pack-fab canvas { width: 38px; height: 38px; flex: none; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px rgba(57,255,20,.7), 0 0 10px rgba(57,255,20,.5); image-rendering: pixelated; }
#scr-menu .pack-fab .pk-t { display: flex; flex-direction: column; line-height: 1.15; font-weight: 700; color: #eafbe6; }
#scr-menu .pack-fab small { font-weight: 400; font-size: 11px; color: #9dff8a; white-space: nowrap; }
#scr-menu .ev-fab:not([hidden]) ~ .pack-fab { top: calc(env(safe-area-inset-top, 0px) + 186px); }
#scr-menu .ev-fab:not([hidden]) ~ .pack-fab:not([hidden]) ~ .dc-fab { top: calc(env(safe-area-inset-top, 0px) + 248px); }
@media (max-height: 520px), (max-width: 700px) {
  #scr-menu .pack-fab { top: calc(env(safe-area-inset-top, 0px) + 96px); left: max(10px, env(safe-area-inset-left, 0px)); padding: 0; border: 0; background: none; box-shadow: none; }
  #scr-menu .pack-fab .pk-t { display: none; }
  #scr-menu .pack-fab canvas { width: 32px; height: 32px; }
  #scr-menu .ev-fab:not([hidden]) ~ .pack-fab { top: calc(env(safe-area-inset-top, 0px) + 136px); }
  #scr-menu .ev-fab:not([hidden]) ~ .pack-fab:not([hidden]) ~ .dc-fab { top: calc(env(safe-area-inset-top, 0px) + 176px); }
}
.wmsg-av.fr-6 { filter: drop-shadow(0 0 7px rgba(57,255,20,.6)); }
.wmsg-av.fr-6::before { background: conic-gradient(from var(--bpang), #39ff14, #eafbe6, #0f7a1a, #39ff14, #eafbe6, #0f7a1a, #39ff14); animation: bp-spin 3s linear infinite; }
.wmsg-n.nc-5 { background-image: linear-gradient(90deg, #39ff14, #eafbe6, #39ff14, #0f7a1a, #39ff14); background-size: 250% 100%; animation: bp-flow 2.6s linear infinite, pk-glitch 3.4s steps(1) infinite; filter: drop-shadow(0 0 4px rgba(57,255,20,.5)); }
.wmsg-t.tx-1 { font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Courier New', monospace; font-weight: 500; color: #39ff14; text-shadow: 0 0 6px rgba(57,255,20,.45); }
.wmsg-t.tx-1::after { content: '_'; margin-left: 1px; animation: pk-blink 1s steps(1) infinite; }
@keyframes pk-glitch { 0%, 91% { transform: none; } 92% { transform: translate(-1px, 0) skewX(10deg); } 94% { transform: translate(1px, 0) skewX(-10deg); } 96% { transform: none; } }
@keyframes pk-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wmsg-av.fr-6::before, .wmsg-n.nc-5, .wmsg-t.tx-1::after { animation: none; } }
#scr-pack .pk-prev-tix { gap: 6px; }
#scr-pack .pk-prev-tix img { width: 44px; height: 44px; image-rendering: pixelated; filter: drop-shadow(0 0 8px rgba(255,210,63,.6)); }
#scr-pack .pk-prev-tix b { font-family: var(--font); font-size: 26px; color: #ffd23f; text-shadow: 0 0 10px rgba(255,210,63,.5); }

/* ============ (08-11-2026) The Anonymous Pack's screen (js/ui/pack-ui.js): hero, countdown, steps, the items, the code modal ============ */
@property --pkang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
#scr-pack:not(.hidden) { display: block; overflow: hidden auto; padding: 0; background: #020502; color: #eafbe6; }
#scr-pack * { box-sizing: border-box; }
#scr-pack button:focus-visible, #scr-pack a:focus-visible { outline: 2px solid #39ff14; outline-offset: 3px; }
#scr-pack .pk-world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
#scr-pack .pk-app { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left)); }
#scr-pack .pk-top { display: flex; align-items: center; gap: 12px; }
#scr-pack .pk-back { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(57,255,20,.4); background: rgba(4,10,4,.72); color: #cfffc4; cursor: pointer; }
#scr-pack .pk-back svg { width: 22px; height: 22px; }
#scr-pack .pk-back:hover { border-color: #39ff14; color: #fff; }
#scr-pack .pk-kick { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(4,10,4,.72); border: 1px solid rgba(57,255,20,.45); font-family: var(--font-body); font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: #cfffc4; }
#scr-pack .pk-kick i { width: 8px; height: 8px; border-radius: 50%; background: #39ff14; box-shadow: 0 0 10px #39ff14; animation: ev-live 1.6s ease-in-out infinite; }
#scr-pack .pk-sold { margin-left: auto; padding: 6px 14px; border-radius: 999px; background: rgba(4,10,4,.72); border: 1px solid rgba(234,251,230,.25); font-family: var(--font-body); font-size: 13px; font-weight: 800; color: #eafbe6; }
#scr-pack .pk-sold:empty { display: none; }
#scr-pack .pk-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: end; gap: 8px; min-height: clamp(260px, 44vh, 440px); }
#scr-pack .pk-hero-l { padding: 18px 0 14px; min-width: 0; }
#scr-pack .pk-dates { margin: 0; font-family: var(--font-body); font-size: 13px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; color: #39ff14; text-shadow: 0 2px 8px #000; }
#scr-pack .pk-title { margin: 4px 0 2px; font-family: var(--font); font-size: clamp(44px, 7.6vw, 96px); line-height: .92; letter-spacing: .02em; color: #f4f4f8; text-shadow: 0 4px 0 #0a1a0a, 0 0 28px rgba(57,255,20,.45); text-wrap: balance; }
#scr-pack .pk-sub { margin: 0 0 18px; font-family: var(--font); font-size: clamp(16px, 2.2vw, 24px); letter-spacing: .06em; color: #9dff8a; text-shadow: 0 0 14px rgba(57,255,20,.5), 0 2px 6px #000; }
#scr-pack .pk-count { display: flex; gap: 8px; flex-wrap: wrap; }
#scr-pack .pk-cu { min-width: 66px; padding: 9px 10px 7px; border-radius: 12px; text-align: center; background: linear-gradient(180deg, rgba(10,30,10,.85), rgba(2,8,2,.9)); border: 1px solid rgba(57,255,20,.35); }
#scr-pack .pk-cu b { display: block; font-family: var(--font); font-size: 30px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
#scr-pack .pk-cu small { display: block; margin-top: 3px; font-family: var(--font-body); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #9db59a; }
#scr-pack .pk-over { font-family: var(--font); font-size: 22px; color: #9dff8a; }
#scr-pack .pk-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
#scr-pack .pk-price-note { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: #9db59a; max-width: 240px; }
#scr-pack .pk-stage { display: block; width: 100%; height: clamp(220px, 40vh, 400px); }
#scr-pack .pk-steps { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#scr-pack .pk-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(4,10,4,.72); border: 1px solid rgba(57,255,20,.18); font-family: var(--font-body); font-size: 14px; font-weight: 700; color: #eafbe6; }
#scr-pack .pk-steps span { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, #9dff8a, #22b31a); color: #031003; font-family: var(--font); font-size: 15px; }
#scr-pack .pk-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(57,255,20,.1); border: 1px solid rgba(57,255,20,.4); color: #cfffc4; font-size: 14px; }
#scr-pack .pk-panel { position: relative; padding: 12px; border-radius: 20px; background: rgba(4,10,4,.8); border: 1px solid rgba(57,255,20,.2); box-shadow: 0 24px 70px rgba(0,0,0,.55); }
#scr-pack .pk-panel::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none; background: conic-gradient(from var(--pkang), rgba(57,255,20,.9), rgba(234,251,230,.3), rgba(34,179,26,.7), rgba(234,251,230,.3), rgba(57,255,20,.9)); -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: pk-spin 10s linear infinite; }
@keyframes pk-spin { to { --pkang: 360deg; } }
#scr-pack .pk-group { margin: 2px 4px 12px; font-family: var(--font); font-size: 20px; font-weight: 400; color: #9dff8a; letter-spacing: .04em; }
#scr-pack .pk-tc { font-family: var(--font-body); font-size: 13px; font-weight: 800; color: #9db59a; margin-left: 6px; }
#scr-pack .pk-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
#scr-pack .pk-item { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 10px; border-radius: 16px; background: linear-gradient(180deg, rgba(8,20,8,.85), rgba(2,6,2,.95)); border: 1px solid rgba(57,255,20,.35); transition: transform .2s, box-shadow .2s; }
#scr-pack .pk-item:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(57,255,20,.2); }
#scr-pack .pk-item.have { border-color: rgba(157,255,138,.7); }
#scr-pack .pk-prev { position: relative; height: 124px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: radial-gradient(circle at 50% 45%, rgba(57,255,20,.2), rgba(2,6,2,.96) 72%); }
#scr-pack .pk-look { width: 100%; height: 100%; display: block; }
#scr-pack .pk-own { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #9dff8a; color: #031003; box-shadow: 0 0 12px rgba(57,255,20,.6); }
#scr-pack .pk-own svg { width: 16px; height: 16px; }
#scr-pack .pk-item-t b { display: block; font-family: var(--font); font-size: 17px; color: #fff; }
#scr-pack .pk-item-t small { font-family: var(--font-body); font-size: 12px; font-weight: 700; color: #9db59a; }
#scr-pack .pk-item-b { display: flex; gap: 8px; margin-top: auto; }
#scr-pack .pk-item-b .pk-btn { flex: 1; }
#scr-pack .pk-av { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 14px; background: #061006; }
#scr-pack .pk-av canvas { width: 52px; height: 52px; image-rendering: pixelated; }
#scr-pack .pk-nm { max-width: 100%; padding: 0 8px; font-size: 26px; overflow-wrap: anywhere; text-align: center; }
#scr-pack .pk-tx { font-size: 18px; }
#scr-pack .pk-foot { margin: 14px 4px 0; font-family: var(--font-body); font-size: 13px; font-weight: 700; color: #9db59a; text-align: center; }
#scr-pack .pk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: 11px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #eafbe6; font-family: var(--font); font-size: 15px; letter-spacing: .03em; cursor: pointer; text-decoration: none; transition: transform .12s, filter .12s; }
#scr-pack .pk-btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.12); }
#scr-pack .pk-btn:disabled { opacity: .5; cursor: default; }
#scr-pack .pk-btn.gold { background: linear-gradient(180deg, #b6ffa6, #39ff14 45%, #1f9e12); border-color: #d8ffd0; color: #031003; box-shadow: 0 3px 0 #0b4a08, 0 0 18px rgba(57,255,20,.4); }
#scr-pack .pk-btn.big { min-height: 54px; padding: 10px 26px; font-size: 20px; }
#scr-pack .pk-btn.on { background: linear-gradient(180deg, rgba(57,255,20,.32), rgba(57,255,20,.12)); border-color: rgba(57,255,20,.7); color: #cfffc4; }
#scr-pack .pk-btn.ghost { color: #9db59a; }
#scr-pack .pk-btn.shine { position: relative; overflow: hidden; }
#scr-pack .pk-btn.shine::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.35) 50%, transparent 60%); transform: translateX(-120%); animation: bp-btnshine 3s ease-in-out infinite; pointer-events: none; }
#scr-pack .pk-modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.72); }
#scr-pack .pk-modal[hidden] { display: none; }
#scr-pack .pk-modal-box { width: min(520px, 100%); max-height: 100%; overflow-y: auto; padding: 20px; border-radius: 18px; background: #050a05; border: 1px solid rgba(57,255,20,.5); box-shadow: 0 0 50px rgba(57,255,20,.2); color: #eafbe6; }
#scr-pack .pk-mt { margin: 0 0 10px; font-family: var(--font); font-size: 24px; color: #f4f4f8; }
#scr-pack .pk-modal-box p { margin: 0 0 12px; font-family: var(--font-body); font-size: 14px; line-height: 1.5; color: #cfe6c8; }
#scr-pack .pk-codebox { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px; border-radius: 12px; background: rgba(57,255,20,.08); border: 1px dashed rgba(57,255,20,.5); }
#scr-pack .pk-code { flex: 1; font-family: 'Consolas', 'Menlo', 'Courier New', monospace; font-size: 26px; letter-spacing: .12em; color: #39ff14; text-shadow: 0 0 8px rgba(57,255,20,.5); user-select: all; }
#scr-pack .pk-small { font-size: 13px !important; color: #9db59a !important; }
#scr-pack .pk-small a { color: #9dff8a; }
#scr-pack .pk-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  #scr-pack .pk-hero { grid-template-columns: 1fr; min-height: 0; }
  #scr-pack .pk-stage { height: clamp(180px, 36vh, 300px); order: -1; }
  #scr-pack .pk-steps { grid-template-columns: 1fr; }
  #scr-pack .pk-shop { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  #scr-pack .pk-prev { height: 100px; }
}
@media (max-height: 520px) { #scr-pack .pk-hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); min-height: 0; } #scr-pack .pk-stage { height: 220px; } #scr-pack .pk-title { font-size: 44px; } }
@media (prefers-reduced-motion: reduce) { #scr-pack .pk-panel::before, #scr-pack .pk-kick i, #scr-pack .pk-btn.shine::after { animation: none; } }
