/* =====================================================================================
   TCGmetr ARCADE theme (opt-in: <html data-theme="arcade">, set by arcade.js)
   Layers on top of style.css: tokens first, then the components that need a different shape
   (square pixel corners, hard 4px shadows, neon borders, pixel fonts, CRT scanlines).
   ===================================================================================== */

html[data-theme="arcade"] {
  --a-bg: #0b0a1d;
  --a-bg2: #13112e;
  --a-panel: #1a1740;
  --a-panel2: #231f52;
  --a-cyan: #2de2e6;
  --a-pink: #ff3ea5;
  --a-yellow: #ffd319;
  --a-green: #3cff8f;
  --a-red: #ff4b5c;
  --a-violet: #9d6bff;
  --a-text: #ecebff;
  --a-dim: #a7a3d6;
  --a-black: #05040d;
  --a-pixel: "Press Start 2P", ui-monospace, monospace;
  --a-term: "VT323", ui-monospace, monospace;

  /* remap the base tokens so every rule of style.css follows */
  --teal: var(--a-cyan);
  --teal-d: var(--a-cyan);
  --teal-dd: var(--a-cyan);
  --teal-l: #1f2a5c;
  --yellow: var(--a-yellow);
  --yellow-d: #e0a800;
  --yellow-l: #3a2f12;
  --cream: var(--a-bg);
  --paper: var(--a-panel);
  --ink: var(--a-text);
  --ink-soft: var(--a-dim);
  --lilac: var(--a-violet);
  --pink: var(--a-pink);
  --mint: var(--a-green);
  --good: var(--a-green);
  --bad: var(--a-red);
  --line: #3b3680;
  --r: 0px;
  --r-s: 0px;
  --font: var(--a-term);
  --shadow-1: 4px 4px 0 var(--a-black);
  --shadow-2: 6px 6px 0 var(--a-black), 0 0 18px rgba(45, 226, 230, .25);
  color-scheme: dark;
}

/* ---------- page, starfield, CRT ---------- */
html[data-theme="arcade"] body {
  font-size: 21px; line-height: 1.2; letter-spacing: .01em;
  background-color: var(--a-bg);
}

/* ---------- wallpaper: own pixel landscape (tools/art/draw_wallpaper.py -> wall.webp, 640 x 360), fixed behind the whole page; the veil keeps text readable ---------- */
html[data-theme="arcade"]::before {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background: var(--a-bg) url("wall.webp") 50% 100% / cover no-repeat; image-rendering: pixelated;
}

html[data-theme="arcade"] ::selection { background: var(--a-pink); color: #fff; }
html[data-theme="arcade"] a { color: var(--a-cyan); }
html[data-theme="arcade"] :focus-visible { outline: 3px solid var(--a-yellow) !important; outline-offset: 2px; }
html[data-theme="arcade"] h1, html[data-theme="arcade"] h2, html[data-theme="arcade"] h3,
html[data-theme="arcade"] .view-head h1, html[data-theme="arcade"] .view-head h2 {
  font-family: var(--a-pixel); font-weight: 400; letter-spacing: .02em; line-height: 1.5;
  text-shadow: 3px 3px 0 var(--a-black), 0 0 12px rgba(45, 226, 230, .45);
}
html[data-theme="arcade"] h1 { font-size: clamp(1rem, 2.2vw, 1.45rem); color: var(--a-yellow); }
html[data-theme="arcade"] h2 { font-size: clamp(.8rem, 1.6vw, 1.05rem); }
html[data-theme="arcade"] h3 { font-size: .8rem; }
html[data-theme="arcade"] img { image-rendering: auto; }

/* ---------- header ---------- */
html[data-theme="arcade"] .site-header {
  background: rgba(11, 10, 29, .9);
  border-bottom: 3px solid var(--a-pink);
  box-shadow: 0 3px 0 var(--a-black), 0 6px 24px rgba(255, 62, 165, .35);
}
html[data-theme="arcade"] .wm-text { font-family: var(--a-pixel); font-size: 1.8rem; font-weight: 400; letter-spacing: 0; }
html[data-theme="arcade"] .a-tape { width: 86px; height: auto; flex: none; overflow: visible; --pull: 18; --over: 2; --drop: 9; }   /* 50 x 26 cells (ticket 83): same 86px width as before, the box is a bit flatter */
html[data-theme="arcade"] .wm-tcg, html[data-theme="arcade"] .wm-metr { -webkit-text-stroke: 0; }
html[data-theme="arcade"] .wm-tcg { color: var(--a-green); text-shadow: 2px 2px 0 #14a457, 4px 4px 0 var(--a-black), 0 0 16px rgba(60, 255, 143, .6); }
html[data-theme="arcade"] .wm-metr { color: var(--a-yellow); text-shadow: 2px 2px 0 #ff8a2a, 4px 4px 0 var(--a-black), 0 0 16px rgba(255, 211, 25, .7); }
html[data-theme="arcade"] .tape { filter: drop-shadow(3px 3px 0 var(--a-black)) drop-shadow(0 0 8px rgba(60, 255, 143, .45)); }
html[data-theme="arcade"] .wordmark { position: relative; }

/* every header button, pill, menu: an arcade push button */
html[data-theme="arcade"] .hdr-btn, html[data-theme="arcade"] .pill, html[data-theme="arcade"] .btn,
html[data-theme="arcade"] .side-all, html[data-theme="arcade"] .lang-btn, html[data-theme="arcade"] .country-select, html[data-theme="arcade"] .cur-select,
html[data-theme="arcade"] .toggle-chip, html[data-theme="arcade"] .seg button {
  border-radius: 0 !important;
  border: 3px solid var(--a-cyan) !important;
  background: var(--a-panel) !important;
  color: var(--a-text) !important;
  font-family: var(--a-pixel) !important; font-weight: 400 !important; font-size: .62rem !important;
  letter-spacing: .02em;
  box-shadow: 4px 4px 0 var(--a-black) !important;
  transition: transform .08s steps(2), box-shadow .08s steps(2), background .1s;
}
html[data-theme="arcade"] .hdr-btn:hover, html[data-theme="arcade"] .pill:hover, html[data-theme="arcade"] .btn:hover,
html[data-theme="arcade"] .side-all:hover, html[data-theme="arcade"] .lang-btn:hover, html[data-theme="arcade"] .toggle-chip:hover {
  transform: translate(-2px, -2px); border-color: var(--a-yellow) !important;
  box-shadow: 6px 6px 0 var(--a-black), 0 0 14px rgba(255, 211, 25, .5) !important;
}
html[data-theme="arcade"] .hdr-btn:active, html[data-theme="arcade"] .pill:active, html[data-theme="arcade"] .btn:active,
html[data-theme="arcade"] .side-all:active {
  transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--a-black) !important;
}
html[data-theme="arcade"] .pill[aria-current="page"], html[data-theme="arcade"] .toggle-chip[aria-pressed="true"],
html[data-theme="arcade"] .seg button[aria-pressed="true"] {
  background: var(--a-yellow) !important; color: var(--a-black) !important; border-color: var(--a-black) !important;
  box-shadow: 4px 4px 0 var(--a-pink) !important;
}
html[data-theme="arcade"] .pill-new { border-color: var(--a-pink) !important; }
html[data-theme="arcade"] .game-cap { font-family: var(--a-pixel); font-size: .42rem; color: var(--a-pink); }
html[data-theme="arcade"] .hdr-btn svg, html[data-theme="arcade"] .pill svg { filter: drop-shadow(2px 2px 0 var(--a-black)); }

html[data-theme="arcade"] .menu, html[data-theme="arcade"] .popover, html[data-theme="arcade"] .lang-menu,
html[data-theme="arcade"] .modal, html[data-theme="arcade"] .picker {
  border-radius: 0 !important; border: 3px solid var(--a-pink) !important; background: var(--a-bg2) !important;
  box-shadow: 6px 6px 0 var(--a-black), 0 0 24px rgba(255, 62, 165, .35) !important; color: var(--a-text);
}
html[data-theme="arcade"] .menu a { border-radius: 0; font-size: 1.1rem; }
html[data-theme="arcade"] .menu a:hover, html[data-theme="arcade"] .menu a:focus-visible { background: var(--a-pink); color: #fff; }
html[data-theme="arcade"] .menu a:hover::before { content: "\25B6"; font-size: .7rem; margin-right: -4px; }
html[data-theme="arcade"] .menu .count { background: var(--a-black); color: var(--a-yellow); border-radius: 0; font-family: var(--a-pixel); font-size: .5rem; }

/* ---------- hero banner: the wallpaper shows through (docs/hero.md); the card collage stays in the DOM but invisible (the layer's tests and the failed-picture
   logic keep working). An own picture (.hero-file) still covers the scene. ---------- */
html[data-theme="arcade"] .hero { --hy: 0px; background: none; }
html[data-theme="arcade"] .hero-cards { visibility: hidden; }
/* text that stands directly on the wallpaper gets a dark plate (contrast), everything else already sits on a panel */
html[data-theme="arcade"] .view-head, html[data-theme="arcade"] .crumbs, html[data-theme="arcade"] .detail-title, html[data-theme="arcade"] .detail-left,
html[data-theme="arcade"] .credit-line, html[data-theme="arcade"] .bd-note, html[data-theme="arcade"] .similar > h2, html[data-theme="arcade"] main.doc,
html[data-theme="arcade"] .site-footer {
  background: rgba(11, 10, 29, .9);
}
html[data-theme="arcade"] .view-head, html[data-theme="arcade"] .detail-title, html[data-theme="arcade"] .similar > h2, html[data-theme="arcade"] .bd-note,
html[data-theme="arcade"] .credit-line, html[data-theme="arcade"] .crumbs { padding: 10px 14px; box-shadow: 4px 4px 0 var(--a-black); }
html[data-theme="arcade"] .detail-left { padding: 12px; box-shadow: 4px 4px 0 var(--a-black); }
html[data-theme="arcade"] .country-label { background: var(--a-black); padding: 3px 5px; }
/* a band with a free view: under the category bar of the home page and under the content of every page (the town and the Pokemon) */
html[data-theme="arcade"] .shell { margin-bottom: clamp(120px, 24vh, 260px); }
/* page scrollbar in the colours of the sidebar's */
html[data-theme="arcade"] { scrollbar-color: var(--a-pink) var(--a-black); }
html[data-theme="arcade"] .hero::after { background: none; }

/* ---------- sidebar = level select ---------- */
html[data-theme="arcade"] .sidebar {
  border-radius: 0; border: 3px solid var(--a-cyan); background: rgba(26, 23, 64, .92);
  box-shadow: 6px 6px 0 var(--a-black), inset 0 0 0 3px var(--a-black);
  scrollbar-color: var(--a-pink) var(--a-black);
}
html[data-theme="arcade"] .side-title { font-family: var(--a-pixel); font-size: .72rem; color: var(--a-yellow); }
html[data-theme="arcade"] .side-title::before { content: attr(data-pre) " "; color: var(--a-pink); }   /* ticket 95: "SELECT" comes from i18n side.select_pre (data-pre on the heading) */
html[data-theme="arcade"] .set-item { border-radius: 0; }
html[data-theme="arcade"] .set-item:hover { background: #2a2466; transform: translateX(4px); }
html[data-theme="arcade"] .set-item:hover::before { content: "\25B6"; color: var(--a-yellow); font-size: .7rem; margin-right: -6px; animation: a-blink .6s steps(2, start) infinite; }
html[data-theme="arcade"] .set-item[aria-current="page"] { background: #3a2f12; border-color: var(--a-yellow); }
html[data-theme="arcade"] .set-name { font-weight: 400; font-size: 1.15rem; }
html[data-theme="arcade"] .set-date, html[data-theme="arcade"] .pk-row .set-date { font-size: .95rem; color: var(--a-dim); }
html[data-theme="arcade"] .set-logo, html[data-theme="arcade"] .set-item .imgbox { filter: drop-shadow(2px 2px 0 var(--a-black)); }
html[data-theme="arcade"] .badge-new {
  border-radius: 0; font-family: var(--a-pixel); font-weight: 400; font-size: .42rem;
  background: var(--a-pink); color: #fff; border: 2px solid var(--a-black); animation: a-blink 1.4s steps(2, start) infinite;
}

/* ---------- search = terminal prompt ---------- */
html[data-theme="arcade"] #q {
  border-radius: 0; border: 3px solid var(--a-cyan); background: var(--a-black); color: var(--a-green);
  font-family: var(--a-term); font-size: 1.6rem; font-weight: 400; caret-color: var(--a-green);
  box-shadow: 5px 5px 0 var(--a-pink), inset 0 0 18px rgba(45, 226, 230, .18);
}
html[data-theme="arcade"] #q::placeholder { color: #7fd9b4; opacity: 1; }   /* ticket 95: 12:1 on the black field (was #4f8f7a, 5.4:1) */
html[data-theme="arcade"] #q:focus { box-shadow: 5px 5px 0 var(--a-yellow), 0 0 0 3px var(--a-black), 0 0 22px rgba(60, 255, 143, .45); }
html[data-theme="arcade"] .lens-ico { color: var(--a-green); }
html[data-theme="arcade"] .orbit i { color: var(--a-yellow); }
html[data-theme="arcade"] .country-label { font-family: var(--a-pixel); font-size: .45rem; color: var(--a-pink); letter-spacing: .06em; }

/* ---------- tiles = cartridges ---------- */
html[data-theme="arcade"] .tile {
  border-radius: 0; border: 3px solid var(--line); background: linear-gradient(180deg, var(--a-panel2), var(--a-panel));
  box-shadow: 5px 5px 0 var(--a-black);
}
html[data-theme="arcade"] .tile:hover, html[data-theme="arcade"] .tile:focus-visible {
  border-color: var(--a-pink);
  box-shadow: 8px 8px 0 var(--a-black), 0 0 22px rgba(255, 62, 165, .45);
}
html[data-theme="arcade"] .tile-img {
  border-radius: 0; background: radial-gradient(circle at 50% 35%, #34307a, #120f2e 75%);
  box-shadow: inset 0 0 0 3px var(--a-black);
}
html[data-theme="arcade"] .tile-img .imgbox { border-radius: 4px; }
html[data-theme="arcade"] .tile.product-tile .imgbox img { mix-blend-mode: normal; }
html[data-theme="arcade"] .tile-name { font-weight: 400; font-size: 1.2rem; line-height: 1.05; min-height: 2.1em; }
html[data-theme="arcade"] .tile-sub { font-size: .98rem; }
html[data-theme="arcade"] .price, html[data-theme="arcade"] .price-psa {
  font-family: var(--a-pixel); font-weight: 400; font-size: .82rem; color: var(--a-yellow);
  text-shadow: 2px 2px 0 var(--a-black), 0 0 10px rgba(255, 211, 25, .55);
}
html[data-theme="arcade"] .price-from { font-size: .95rem; text-transform: uppercase; }
html[data-theme="arcade"] .price-usd, html[data-theme="arcade"] .price-raw { font-size: .95rem; }
html[data-theme="arcade"] .chip, html[data-theme="arcade"] .psa-badge {
  border-radius: 0; font-family: var(--a-pixel); font-weight: 400; font-size: .42rem; padding: 4px 6px;
  background: var(--a-black); color: var(--a-cyan); border: 2px solid currentColor;
}
html[data-theme="arcade"] .chip-holo { color: var(--a-violet); background: var(--a-black); }
html[data-theme="arcade"] .chip-psa, html[data-theme="arcade"] .psa-badge { color: var(--a-black); background: var(--a-yellow); border-color: var(--a-black); }
html[data-theme="arcade"] .chip-out { color: var(--a-red); background: var(--a-black); }
html[data-theme="arcade"] .chip-soon { color: var(--a-yellow); background: var(--a-black); }
html[data-theme="arcade"] .imgbox .img-fb { background: linear-gradient(135deg, #241f5a, #3d1747); color: var(--a-cyan); font-family: var(--a-pixel); font-size: 1rem; }

/* ---------- detail pages, tables, panels ---------- */
html[data-theme="arcade"] .best-box, html[data-theme="arcade"] .offers, html[data-theme="arcade"] .offers-ct,
html[data-theme="arcade"] .offers-shops, html[data-theme="arcade"] .form-card, html[data-theme="arcade"] .doc,
html[data-theme="arcade"] .set-hero, html[data-theme="arcade"] .dex-tile, html[data-theme="arcade"] .bd-tile {
  border-radius: 0 !important; border-width: 3px !important; box-shadow: 5px 5px 0 var(--a-black) !important;
}
html[data-theme="arcade"] table th { font-family: var(--a-pixel); font-weight: 400; font-size: .5rem; color: var(--a-pink); letter-spacing: .05em; }
html[data-theme="arcade"] table td { border-color: var(--line) !important; }
html[data-theme="arcade"] .chart-svg { filter: drop-shadow(0 0 4px rgba(45, 226, 230, .5)); }
html[data-theme="arcade"] .toast { border-radius: 0; font-family: var(--a-pixel); font-size: .6rem; }
html[data-theme="arcade"] .field, html[data-theme="arcade"] input, html[data-theme="arcade"] select {
  border-radius: 0 !important; background-color: var(--a-black); color: var(--a-text);
}

/* ---------- light scrims / plates of style.css turned dark ---------- */
html[data-theme="arcade"] .set-bg::after { background: linear-gradient(90deg, rgba(19, 17, 46, .94) 0%, rgba(19, 17, 46, .84) 50%, rgba(19, 17, 46, .55) 100%); }
html[data-theme="arcade"] .set-item[aria-current="page"] .set-bg::after { background: linear-gradient(90deg, rgba(58, 47, 18, .96) 0%, rgba(58, 47, 18, .86) 50%, rgba(58, 47, 18, .55) 100%); }
html[data-theme="arcade"] .set-item.is-parent .set-bg::after { background: linear-gradient(90deg, rgba(31, 42, 92, .96) 0%, rgba(31, 42, 92, .86) 50%, rgba(31, 42, 92, .55) 100%); }
html[data-theme="arcade"] .pk-row .set-bg::after { background: linear-gradient(180deg, rgba(19, 17, 46, .78) 0%, rgba(19, 17, 46, .9) 100%); }
html[data-theme="arcade"] .has-hero .site-header { background: rgba(11, 10, 29, .45); }
html[data-theme="arcade"] .has-hero.hero-scrolled .site-header { background: rgba(11, 10, 29, .92); }
html[data-theme="arcade"] body[data-view="card"] .hero::after, html[data-theme="arcade"] body[data-view="doc"] .hero::after { background: none; }
html[data-theme="arcade"] .set-hero .hero-logo, html[data-theme="arcade"] .set-hero .hero-logo .imgbox { border-radius: 0 !important; }
html[data-theme="arcade"] .country-select, html[data-theme="arcade"] .cur-select { background-color: var(--a-panel) !important; background-image: none !important; }
html[data-theme="arcade"] .evo-card.is-cur, html[data-theme="arcade"] .evo-mega-card, html[data-theme="arcade"] .dex-leg,
html[data-theme="arcade"] .dex-leg-2, html[data-theme="arcade"] .dex-info { background: var(--a-panel2) !important; }
html[data-theme="arcade"] .mp-photo { background: var(--a-black); }

/* ---------- everything square (pixel corners), except true circles ---------- */
html[data-theme="arcade"] :is(div, a, button, span, section, article, aside, nav, li, label, input, select, textarea, table, thead, tbody, tr, td, th, img, dialog, details, summary, figure):not(.tm-pin, .tm-pin *, .orbit, .orbit *, .lens, .av, .dex-pic, .dex-art, .dots *, .chart-svg *) {
  border-radius: 0 !important;
}
html[data-theme="arcade"] .best-box {
  background: linear-gradient(135deg, #3a2f12, var(--a-panel) 70%) !important; border-color: var(--a-yellow) !important;
  box-shadow: 5px 5px 0 var(--a-black), 0 0 20px rgba(255, 211, 25, .25) !important;
}
html[data-theme="arcade"] .panel { border-width: 3px; box-shadow: 5px 5px 0 var(--a-black); }
html[data-theme="arcade"] .best-box .price, html[data-theme="arcade"] .best-box strong { font-family: var(--a-pixel); color: var(--a-yellow); }

/* ---------- footer ---------- */
html[data-theme="arcade"] .site-footer {
  border-top: 3px solid var(--a-pink); background: var(--a-black); color: var(--a-dim); position: relative;
}
html[data-theme="arcade"] .site-footer::before {
  content: "\00A9 TCGMETR  \2022  HI-SCORE 999 999  \2022  1UP"; display: block; text-align: center;
  font-family: var(--a-pixel); font-size: .5rem; color: var(--a-yellow); padding: 10px 0 2px; letter-spacing: .1em;
}

/* =====================================================================================
   Pokemon actors (arcade.js): fixed stage over the page, never catches clicks except the
   bonus Mew; GIF sprites scaled with nearest-neighbour so the pixels stay crisp.
   ===================================================================================== */
.arcade-stage { position: fixed; inset: 0; z-index: 58; pointer-events: none; overflow: hidden; }
.a-sprite { position: absolute; left: 0; top: 0; image-rendering: pixelated; will-change: transform; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .55)); }
.a-sprite img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.a-flip img { transform: scaleX(-1); }
.a-mew { pointer-events: auto; cursor: pointer; }
.a-pop {
  position: absolute; font: 400 .7rem/1 var(--a-pixel, monospace); color: var(--a-yellow, #ffd319); white-space: nowrap;
  text-shadow: 2px 2px 0 #000, 0 0 10px rgba(255, 211, 25, .8); pointer-events: none;
  animation: a-pop .9s steps(6) forwards;
}

/* top-down flyers (Charizard, Dragonite): pixel-art SVG, rotated along the flight path; the offset shadow sells the altitude */
.a-flyer { position: absolute; left: 0; top: 0; will-change: transform; filter: drop-shadow(14px 22px 0 rgba(0, 0, 0, .32)); }
.a-flyer svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
.a-alt { transform-origin: 50% 50%; animation: a-alt 3.2s ease-in-out infinite alternate; }
@keyframes a-alt { from { transform: scale(.95); } to { transform: scale(1.06); } }
/* Hitmonchan / Hitmonlee hang upside down from under the header: they swing like a pendulum, wind up (anticipation) and punch / kick twice */
.a-peek { position: fixed; z-index: 59; top: var(--hdr, 68px); transform: translateY(-112%); transition: transform .55s cubic-bezier(.3, 1.45, .5, 1); pointer-events: none; }
.a-peek.in { transform: translateY(-8%); }
.a-peek .a-body { transform-origin: 50% 0; animation: a-pend 1.3s ease-in-out infinite alternate; }
.a-peek img { display: block; width: 100%; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .55)); transform: rotate(180deg); }
.a-peek.wind .a-body { animation: a-wind .3s ease-out forwards; }
.a-peek.punch .a-body { animation: a-punch .34s ease-in-out 2; }
.a-kick.wind .a-body { animation-name: a-wind-k; }
.a-kick.punch .a-body { animation-name: a-kick; }
@keyframes a-pend { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@keyframes a-wind { to { transform: translateY(-12px) scale(.94, 1.07); } }
@keyframes a-wind-k { to { transform: translateY(-8px) rotate(-14deg) scale(.95, 1.05); } }
@keyframes a-punch { 0%, 100% { transform: translateY(-12px) scale(.94, 1.07); } 45% { transform: translateY(14px) scale(1.14, .94); } }
@keyframes a-kick { 0%, 100% { transform: translateY(-8px) rotate(-14deg); } 45% { transform: translateY(12px) rotate(18deg) scale(1.1, .96); } }
/* pixel miniatures of sealed products (menu, preview, tiles without a photo) */
.a-mini { display: inline-block; vertical-align: middle; shape-rendering: crispEdges; flex: none; }
html[data-theme="arcade"] .menu a .a-mini { width: 22px; height: 22px; margin-right: 8px; }
html[data-theme="arcade"] .menu a { justify-content: flex-start; }
html[data-theme="arcade"] .menu a .count { margin-left: auto; }
html[data-theme="arcade"] .mp-ico .a-mini { width: 112px; height: 112px; filter: drop-shadow(4px 4px 0 #000); }
html[data-theme="arcade"] .img-fb .a-mini { width: 58%; height: auto; max-width: 140px; filter: drop-shadow(4px 4px 0 #000); }
html[data-theme="arcade"] .img-fb.has-mini { font-size: 0; }
html[data-theme="arcade"] .img-fb.has-mini small { font-size: .85rem; font-family: var(--a-pixel); color: var(--a-cyan); margin-top: 8px; line-height: 1.5; }
html[data-theme="arcade"] .mp-img, html[data-theme="arcade"] .menu-preview .mp-img { background: radial-gradient(circle at 50% 40%, #34307a, #120f2e 75%) !important; }

/* readable value changes (binder, price chart) */
html[data-theme="arcade"] .delta, html[data-theme="arcade"] .gain {
  background: var(--a-black) !important; border: 2px solid currentColor; font-family: var(--a-term); font-weight: 400; font-size: 1.25rem; padding: 2px 10px;
}
html[data-theme="arcade"] .delta.up, html[data-theme="arcade"] .gain.up { color: var(--a-green); }
html[data-theme="arcade"] .delta.down, html[data-theme="arcade"] .gain.down { color: var(--a-red); }
html[data-theme="arcade"] .delta.flat, html[data-theme="arcade"] .gain.flat { color: var(--a-dim); }
/* offers: the link buttons keep their text inside */
html[data-theme="arcade"] .btn-small { font-family: var(--a-term) !important; font-size: 1.15rem !important; line-height: 1 !important; white-space: normal !important; text-align: center; padding: 6px 10px !important; }
html[data-theme="arcade"] .offers-ct .btn-small { min-width: 124px; }
html[data-theme="arcade"] .offers-ct tr { border-radius: 0 !important; }

/* ---- actor parts: sprite (.a-sprite, moved by JS) > .a-fx (one-shot effects) > .a-body (looping body motion) > img ---- */
.a-fx, .a-body { display: block; transform-origin: 50% 100%; }
.a-in { position: relative; }
.a-shadow { position: absolute; left: 0; top: 0; opacity: .38; will-change: transform; background: radial-gradient(ellipse at center, rgba(0, 0, 0, .75) 0, rgba(0, 0, 0, .35) 45%, transparent 70%); }
.a-pt { position: absolute; display: block; margin: -2px 0 0 -2px; will-change: transform, opacity; animation: a-pt .7s ease-out forwards; }
.a-drop { animation-name: a-drop; animation-timing-function: linear; }
.a-rain { animation-timing-function: linear; }
@keyframes a-pt { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(var(--sc)); opacity: 0; } }
@keyframes a-drop {
  0% { transform: translate(0, 0); opacity: 1; animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  45% { transform: translate(calc(var(--dx) * .55), var(--dy)); opacity: 1; animation-timing-function: cubic-bezier(.6, 0, .9, .5); }
  100% { transform: translate(var(--dx), calc(var(--dy) * -.15 + 26px)); opacity: 0; }
}
/* body motion: transform only, per kind */
.b-bob { animation: b-bob 1.6s ease-in-out infinite alternate; }
.b-glide { animation: b-glide 2.6s ease-in-out infinite alternate; }
.b-flap { animation: b-flap .5s ease-in-out infinite alternate; }
.b-flutter { animation: b-flutter .18s ease-in-out infinite alternate; }
.b-jitter { animation: b-jitter .12s steps(2) infinite alternate; }
.b-coil { animation: b-coil 1.8s ease-in-out infinite alternate; }
.b-float { animation: b-float 1.9s ease-in-out infinite alternate; }
.b-run { animation: b-run .3s ease-in-out infinite alternate; }
.b-walk { animation: b-walk .42s ease-in-out infinite alternate; }
.b-waddle { animation: b-waddle .55s ease-in-out infinite alternate; }
.b-waddle.slow { animation-duration: 1.1s; }
.b-wobble { animation: b-wobble .32s ease-in-out infinite alternate; }
.b-breathe { animation: b-breathe 2.2s ease-in-out infinite alternate; }
@keyframes b-bob { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-5px) rotate(1deg); } }
@keyframes b-glide { from { transform: translateY(0) rotate(-2deg) scale(1, 1); } to { transform: translateY(-7px) rotate(2deg) scale(1.01, 1.03); } }
@keyframes b-flap { from { transform: translateY(0) scale(1.03, .97); } to { transform: translateY(-6px) scale(.97, 1.04); } }
@keyframes b-flutter { from { transform: translateY(0) scale(1.06, .94) rotate(-4deg); } to { transform: translateY(-4px) scale(.94, 1.06) rotate(4deg); } }
@keyframes b-jitter { from { transform: translate(-2px, 1px) rotate(-3deg); } to { transform: translate(2px, -1px) rotate(3deg); } }
@keyframes b-coil { from { transform: rotate(-4deg) scale(1.03, .97); } to { transform: rotate(4deg) scale(.97, 1.03); } }
@keyframes b-float { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-9px) rotate(3deg); } }
@keyframes b-run { from { transform: translateY(0) scale(1.06, .94); } to { transform: translateY(-5px) scale(.95, 1.06) rotate(-2deg); } }
@keyframes b-walk { from { transform: translateY(0) rotate(-3deg) scale(1.03, .97); } to { transform: translateY(-3px) rotate(3deg) scale(.98, 1.03); } }
@keyframes b-waddle { from { transform: rotate(-6deg) translateY(0) scale(1.03, .97); } to { transform: rotate(6deg) translateY(-3px) scale(.98, 1.03); } }
@keyframes b-wobble { from { transform: rotate(-9deg) scale(1.02, .98); } to { transform: rotate(9deg) scale(.98, 1.02); } }
@keyframes b-breathe { from { transform: scale(1.01, .98); } to { transform: scale(.99, 1.04); } }
/* one-shot effects on .a-fx */
.fx-flop { animation: fx-flop .55s ease-out; }
.fx-start { animation: fx-start .5s ease-out; }
.fx-laugh { animation: fx-laugh .7s ease-in-out; }
.fx-appear { animation: fx-appear .45s ease-out forwards; }
.fx-vanish { animation: fx-vanish .4s ease-in forwards; }
@keyframes fx-flop { 0% { transform: translateY(-10px) scale(.94, 1.08); } 45% { transform: scale(1.14, .84); } 100% { transform: scale(1, 1); } }
@keyframes fx-start { 0% { transform: scale(1, 1); } 30% { transform: translateY(-4px) scale(.92, 1.12); } 100% { transform: scale(1, 1); } }
@keyframes fx-laugh { 0%, 100% { transform: rotate(0) scale(1, 1); } 15% { transform: rotate(-7deg) scale(1.1, .92); } 35% { transform: rotate(7deg) scale(.94, 1.1); } 55% { transform: rotate(-5deg) scale(1.08, .94); } 75% { transform: rotate(5deg) scale(1, 1.04); } }
@keyframes fx-appear { 0% { transform: scale(.15, 1.8); opacity: 0; } 55% { transform: scale(1.12, .9); opacity: 1; } 100% { transform: scale(1, 1); opacity: 1; } }
@keyframes fx-vanish { 0% { transform: scale(1, 1); opacity: 1; } 45% { transform: scale(1.1, .92); opacity: 1; } 100% { transform: scale(.15, 1.8); opacity: 0; } }
.a-ghost .a-fx { animation: a-ghost 1.2s ease-in-out infinite alternate; }
.a-ghost .a-fx.fx-laugh { animation: fx-laugh .7s ease-in-out; }
@keyframes a-ghost { from { opacity: .72; } to { opacity: 1; } }
/* Cranidos charges: speed lines behind it (the sprite's own ::after) */
.a-charge::after {
  content: ""; position: absolute; top: 30%; width: 70%; height: 40%; right: -60%;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .8) 0 2px, transparent 2px 7px);
}
.a-charge.a-flip::after { right: auto; left: -60%; }

/* local water: a pixel pond that grows in, ripples that spread and fade, a foam ring round the body that surfaces */
.a-scene { position: absolute; width: 0; height: 0; }
.a-scene.shake { animation: a-shake .4s linear; }
.a-pool, .a-ring, .a-bring, .a-mound { position: absolute; }
.a-pool svg, .a-ring svg, .a-bring svg, .a-mound svg { display: block; width: 100%; height: 100%; }
.a-pool { opacity: .94; animation: a-pool-in .5s cubic-bezier(.2, .9, .3, 1.15) both; }
.a-pool.out { animation: a-pool-out .55s ease-in forwards; }
.a-ring { opacity: 0; animation: a-ring .9s ease-out forwards; }
.a-bring { transition: opacity .12s; }
.a-mover, .a-cut, .a-rise { position: absolute; }
.a-mover { left: 0; top: 0; width: 0; height: 0; }
.a-rise { transform-origin: 50% 100%; will-change: transform; }
.a-mound { transform-origin: 50% 100%; animation: a-mound-in .7s ease-out both; }
.a-mound.out { animation: a-mound-out .5s ease-in forwards; }
@keyframes a-pool-in { from { transform: scale(.15, .15); opacity: 0; } to { transform: scale(1, 1); opacity: .94; } }
@keyframes a-pool-out { from { transform: scale(1, 1); opacity: .94; } to { transform: scale(.15, .15); opacity: 0; } }
@keyframes a-ring { from { transform: scale(.35); opacity: var(--op, .95); } to { transform: scale(1.8); opacity: 0; } }
@keyframes a-shake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3px, 2px); } 40% { transform: translate(3px, -2px); } 60% { transform: translate(-2px, 1px); } 80% { transform: translate(2px, -1px); } }
@keyframes a-mound-in { 0% { transform: scale(.2, .1); } 20% { transform: translateX(-3px) scale(.4, .3); } 35% { transform: translateX(3px) scale(.6, .45); } 50% { transform: translateX(-2px) scale(.8, .7); } 100% { transform: scale(1, 1); } }
@keyframes a-mound-out { to { transform: scale(.4, .1); opacity: 0; } }

@keyframes a-blink { to { visibility: hidden; } }
@keyframes a-pop { 0% { transform: translate(-50%, 0) scale(.6); opacity: 1; } 100% { transform: translate(-50%, -46px) scale(1.25); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html[data-theme="arcade"] .wordmark::after, html[data-theme="arcade"] .badge-new { animation: none; }
  .arcade-stage, .a-peek { display: none; }
}
@media (max-width: 700px) {
  html[data-theme="arcade"] body { font-size: 19px; }
  html[data-theme="arcade"] .wm-text { font-size: 1.15rem; }
  html[data-theme="arcade"] .a-tape { width: 46px; }
}
@media (max-width: 420px) {   /* logo + five header buttons must fit a phone */
  html[data-theme="arcade"] .wordmark .wm-text { font-size: .9rem; }
  html[data-theme="arcade"] .wordmark .tape { width: 34px; height: auto; }
}
html[data-theme="arcade"] .chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; box-sizing: border-box; height: auto; }   /* long type names wrap inside the tile */
html[data-theme="arcade"] .set-word { color: #ffd319; text-shadow: 2px 2px 0 #05040d; }

/* =====================================================================================
   ticket 85: readability. The pixel font (Press Start 2P) is too wide and fuzzy below ~12 px, so the SMALL informational text (labels, chips, meta lines, captions)
   uses the terminal font (VT323, the body font) a notch bigger, and the pixel font stays for headings and buttons at a size that can be read.
   Rule: nothing informational under about 12 px effective (VT323 is a tall, narrow face: 1 rem of it reads like 11 px of an ordinary font, so labels start at 1.1 rem).
   ===================================================================================== */
/* the "all editions" era column: body font, clearly bigger */
html[data-theme="arcade"] .pk-era { font-family: var(--a-term); font-weight: 400; font-size: 1.35rem; line-height: 1.1; color: var(--a-text); letter-spacing: .01em; }
html[data-theme="arcade"] .pk-era.is-on { color: var(--a-black); }
html[data-theme="arcade"] .pk-era .count { font-family: var(--a-term); font-size: 1.2rem; line-height: 1; padding: 1px 7px; color: var(--a-yellow); background: var(--a-black); border: 2px solid var(--line); }
html[data-theme="arcade"] .pk-era.is-on .count { color: var(--a-black); background: #fff; border-color: var(--a-black); }
html[data-theme="arcade"] .pk-group h3 { font-size: .8rem; }
html[data-theme="arcade"] .pk-group h3 .count { font-family: var(--a-term); font-size: 1.15rem; padding: 1px 8px; }
/* meta lines: series · year, variants note, "no cards" */
html[data-theme="arcade"] .pk-row .set-name { font-size: 1.3rem; }
html[data-theme="arcade"] .set-date, html[data-theme="arcade"] .pk-row .set-date { font-size: 1.15rem; }
html[data-theme="arcade"] .pk-variants, html[data-theme="arcade"] .set-var { font-family: var(--a-term); font-size: 1.1rem; font-weight: 400; color: var(--a-cyan); }
html[data-theme="arcade"] .pk-nocards { font-size: 1.05rem; color: var(--a-dim); }
html[data-theme="arcade"] .set-name { font-size: 1.3rem; }
/* chips and badges */
html[data-theme="arcade"] .chip, html[data-theme="arcade"] .psa-badge { font-family: var(--a-term); font-size: 1.05rem; line-height: 1; padding: 3px 7px; letter-spacing: .02em; }
html[data-theme="arcade"] .badge-new { font-family: var(--a-term); font-size: 1.05rem; line-height: 1; padding: 2px 6px; }
html[data-theme="arcade"] .badge-promo {
  border-radius: 0; font-family: var(--a-term); font-weight: 400; font-size: 1.1rem; line-height: 1; padding: 2px 7px; letter-spacing: .08em;
  background: var(--a-yellow); color: var(--a-black); border: 2px solid var(--a-black); box-shadow: 2px 2px 0 var(--a-pink);
}
html[data-theme="arcade"] .game-cap { font-family: var(--a-term); font-size: 1rem; }
html[data-theme="arcade"] .menu .count { font-family: var(--a-term); font-size: 1.1rem; }
/* tabs and chips (the bigger pixel size also keeps the header buttons as they were: only these are raised) */
html[data-theme="arcade"] .toggle-chip, html[data-theme="arcade"] .set-tab, html[data-theme="arcade"] .catbar .pill { font-size: .78rem !important; }
html[data-theme="arcade"] .set-chips .toggle-chip small { font-family: var(--a-term); font-size: 1.1rem; opacity: 1; color: inherit; }
/* the set stats bar */
html[data-theme="arcade"] .ss-lab { font-family: var(--a-term); font-size: 1.15rem; font-weight: 400; letter-spacing: .1em; color: var(--a-pink); }
html[data-theme="arcade"] .ss-val { font-size: 1.5rem; font-weight: 400; }
html[data-theme="arcade"] .ss-code { font-size: 1.5rem; font-weight: 400; }
html[data-theme="arcade"] .ss-coll { font-size: 1.7rem; }
html[data-theme="arcade"] .ss-usd { font-size: 1.1rem; }
html[data-theme="arcade"] .ss-ring b { font-family: var(--a-term); font-size: 1.15rem; font-weight: 400; }
/* toolbar labels ("Řadit", "Odkud nakupovat", "Jazyk karet") */
html[data-theme="arcade"] .country-label, html[data-theme="arcade"] .filters .country-label { font-family: var(--a-term); font-size: 1.1rem; line-height: 1; letter-spacing: .08em; padding: 3px 6px; }
html[data-theme="arcade"] .tb-count { font-size: 1.15rem; }
/* captions */
html[data-theme="arcade"] .tile-sub { font-size: 1.1rem; }
html[data-theme="arcade"] .price-usd, html[data-theme="arcade"] .price-raw { font-size: 1.05rem; }
html[data-theme="arcade"] table th { font-family: var(--a-term); font-size: 1.1rem; letter-spacing: .08em; }
html[data-theme="arcade"] .toast { font-size: .72rem; }
html[data-theme="arcade"] .site-footer::before { font-size: .62rem; }
html[data-theme="arcade"] .side-title { font-size: .8rem; }
html[data-theme="arcade"] .side-all, html[data-theme="arcade"] .side-pick { font-size: .78rem !important; }
/* the sidebar: series · year may wrap instead of losing the year behind an ellipsis */
html[data-theme="arcade"] .set-item .set-date { font-size: 1.05rem; white-space: normal; overflow: visible; text-overflow: clip; }
/* explanations and captions that stood at 0.8 - 0.9 rem of the terminal font */
html[data-theme="arcade"] :is(.note-box, .picker-count, .view-note, .stat .k, .stat .u, .cap, .meta-k, .bd-caption, .bd-hint, .chart-note, .chart-foot, .offers-note, .offers-foot, .offers-sub,
  .credit-line, .watch-note, .map-hint, .price-none, .side-empty, .tag, .flip-hint, .dex-hint, .foot-langs, .login-or, .pf-hint) { font-size: 1.1rem; line-height: 1.15; }
/* promo editions: a ribbon in the top-left corner of the picker card, a tag in the sidebar */
html[data-theme="arcade"] .pk-row .badge-promo.is-ribbon { top: 0; left: 0; padding: 3px 9px; font-size: 1.15rem; box-shadow: 3px 3px 0 var(--a-pink); }

/* Showcase preview + shop product page */
html[data-theme="arcade"] .sc-stats dt, html[data-theme="arcade"] .sc-row dt { font-family: var(--a-term); font-size: 1.15rem; font-weight: 400; color: var(--a-pink); letter-spacing: .08em; }
html[data-theme="arcade"] .sc-stats dd, html[data-theme="arcade"] .sc-row dd { font-family: var(--a-pixel); font-size: .8rem; font-weight: 400; color: var(--a-yellow); line-height: 1.5; }
html[data-theme="arcade"] .sc-row.is-lead dd { color: var(--a-green); }
html[data-theme="arcade"] .sc-nick { font-family: var(--a-pixel); font-size: .75rem; font-weight: 400; color: var(--a-text); }
html[data-theme="arcade"] .sc-title { font-size: 1.25rem; color: var(--a-dim); }
html[data-theme="arcade"] .sc-h { font-size: .7rem; }
html[data-theme="arcade"] .sc-cn { font-size: 1.1rem; font-weight: 400; }
html[data-theme="arcade"] .sc-cv { font-size: 1.1rem; color: var(--a-yellow); }
html[data-theme="arcade"] .sc-img { background: var(--a-black); border: 2px solid var(--line); }
html[data-theme="arcade"] .sc-card.is-mine { border-color: var(--a-yellow); }
html[data-theme="arcade"] .sc-av { border-color: var(--a-cyan); background: var(--a-panel2); }
html[data-theme="arcade"] .sc-common h2 .count { font-family: var(--a-term); font-size: 1.2rem; background: var(--a-black); color: var(--a-yellow); }
html[data-theme="arcade"] .pd-price { font-family: var(--a-pixel); font-size: 1.4rem; font-weight: 400; color: var(--a-yellow); text-shadow: 3px 3px 0 var(--a-black), 0 0 12px rgba(255, 211, 25, .5); }
html[data-theme="arcade"] .pd-photo { background: var(--a-black); border: 3px solid var(--line); }
html[data-theme="arcade"] .pd-h2 { font-size: .8rem; }
html[data-theme="arcade"] .pd-sub, html[data-theme="arcade"] .pd-market, html[data-theme="arcade"] .pd-hint { font-size: 1.2rem; }
html[data-theme="arcade"] .pd-diff.is-up { color: var(--a-red); }
html[data-theme="arcade"] .pd-diff.is-down { color: var(--a-green); }
html[data-theme="arcade"] .pd-buy { font-size: .8rem !important; }
