/* ==========================================================================
   Screen layouts & game components (both themes; colors come from variables)
   ========================================================================== */
.screen-top, .screen-bottom { container-type: size; }
.scene { position: absolute; inset: 0; overflow: hidden; }
.scene > *:not(.scene-bg) { position: relative; z-index: 1; }
.top-pad { position: absolute !important; inset: 0; padding: 14px; display: flex; flex-direction: column; gap: 12px; }

/* Sprite platforms */
.platform {
  position: absolute; left: 50%; bottom: 4%; width: 78%; height: 16%; transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.28), rgba(0,0,0,.08) 70%, transparent);
}
:is([data-theme="3ds"], [data-theme="wii"]) .platform {
  background: radial-gradient(closest-side, rgba(255,255,255,.55), rgba(255,255,255,.25) 55%, rgba(0,0,0,.18) 80%, transparent 100%);
  box-shadow: 0 2px 0 rgba(0,0,0,.08);
}
[data-theme="gameboy"] .platform { background: radial-gradient(closest-side, var(--gb1) 0 60%, transparent 62%); opacity: .55; }

/* ------------------------------------------------------------ titles ------- */
.title-wrap { position: absolute !important; left: 0; right: 0; top: 10%; display: flex; justify-content: center; }
.title-parade { position: absolute !important; left: 0; right: 0; bottom: 3%; height: 54%; display: flex; justify-content: center; align-items: flex-end; gap: 4%; }
.parade-mon { position: relative; width: min(42cqh, 200px); height: min(50cqh, 230px); display: flex; align-items: flex-end; justify-content: center; animation: float 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * -1s); }
.parade-mon .mon-sprite { position: relative; width: 100%; height: 86%; }
.logo-small .logo-main { font-size: clamp(26px, 4.6vw, 44px) !important; }
.start-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.start-btn { appearance: none; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--text); }
.ico.start-ball { width: 128px; height: 128px; display: block; animation: float 2.6s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(20, 40, 90, .3)); }
[data-theme="gameboy"] .ico.start-ball { width: 96px; height: 96px; filter: none; }
.ico { width: 16px; height: 16px; }

/* ------------------------------------------------------------- menu -------- */
.menu-top { position: absolute !important; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 14px 16px; gap: 10px; }
.menu-info { width: min(560px, 96%); background: var(--card-bg); border: var(--card-border); border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 10px 14px; min-height: 60px; }
.menu-info-title { font-weight: 900; font-size: var(--fs-lg); }
.menu-info-text { font-weight: 700; color: var(--muted); }
.menu-info-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 12px; margin-top: 6px; }
.mip-name { font-weight: 800; font-size: var(--fs-sm); }
.mip-team { display: flex; gap: 2px; }
.mon-sprite.mini { width: 34px; height: 34px; }
.mon-sprite.micro { width: 22px; height: 22px; }
.bottom-header {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 44px; flex: 0 0 auto;
  background: var(--sheet-head-bg); color: var(--sheet-head-text); border-bottom: var(--sheet-head-border);
}
.bh-title { font-weight: 900; font-size: var(--fs-lg); }
.bh-sub { margin-left: auto; font-size: var(--fs-sm); font-weight: 700; opacity: .9; }
.bottom-footer { display: flex; gap: 8px; padding: 10px 12px; flex: 0 0 auto; border-top: var(--sheet-head-border); background: var(--panel-bg); }
.bottom-footer .btn { flex: 1 1 0; }
.menu-screen, .rules-screen, .setup-screen, .starters-screen, .game-bottom { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 14px; overflow-y: auto; align-content: start; }
.menu-grid .wide { grid-column: 1 / -1; }
.menu-tile {
  position: relative; appearance: none; text-align: left; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 10px 12px; min-height: 58px;
  background: var(--btn-bg); border: var(--btn-border); color: var(--btn-text); border-radius: var(--btn-radius); box-shadow: var(--btn-shadow);
  transition: transform .08s ease, filter .12s ease;
}
.menu-tile:hover:not([disabled]) { filter: var(--btn-hover); }
.menu-tile:active:not([disabled]) { transform: translateY(1px) scale(.99); }
.menu-tile:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.menu-tile[disabled] { opacity: .45; cursor: not-allowed; }
.menu-tile .tile-ico { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 12px; padding: 6px; background: var(--tile-ico-bg, rgba(47,134,232,.12)); box-shadow: var(--tile-ico-shadow, none); }
.menu-tile .tile-label { font-weight: 900; font-size: var(--fs); line-height: 1.1; }
.menu-tile .tile-sub { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.menu-tile.primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); border: var(--btn-primary-border); }
.menu-tile.primary .tile-sub { color: inherit; opacity: .85; }
.menu-tile.primary .tile-ico { background: rgba(255,255,255,.9); }
[data-theme="3ds"] .menu-tile { --tile-ico-shadow: inset 0 0 0 2px rgba(255,255,255,.7), 0 1px 2px rgba(20,40,90,.18); }
[data-theme="3ds"] .act-travel { --tile-ico-bg: linear-gradient(180deg, #e9fbe9, #bfeac4); }
[data-theme="3ds"] .act-specific { --tile-ico-bg: linear-gradient(180deg, #e8f3ff, #bcdafc); }
[data-theme="3ds"] .act-train { --tile-ico-bg: linear-gradient(180deg, #fff2e3, #ffd3a6); }
[data-theme="3ds"] .act-shop { --tile-ico-bg: linear-gradient(180deg, #ffeceb, #ffc4bd); }
[data-theme="gameboy"] .menu-tile { padding-left: 22px; }
[data-theme="gameboy"] .menu-tile .tile-ico { background: none; border-radius: 0; padding: 0; width: 32px; height: 32px; box-shadow: none; }
[data-theme="gameboy"] .menu-tile.primary .tile-ico { background: var(--gb3); width: 36px; height: 36px; padding: 2px; }

/* ------------------------------------------------------------ forms -------- */
.field-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--item-bg); border: var(--item-border); border-radius: var(--item-radius); }
.field-row.stack { flex-direction: column; align-items: stretch; gap: 6px; }
.field-label { flex: 1 1 auto; font-weight: 800; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-label small { display: block; font-weight: 600; }
.field-block { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; background: var(--item-bg); border: var(--item-border); border-radius: var(--item-radius); }
.range-value { font-weight: 900; color: var(--accent); }
.rules-fields { flex: 1 1 auto; min-height: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
/* Game Mods submenus */
.mod-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.mod-group { appearance: none; cursor: pointer; text-align: left; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  padding: 10px 12px; min-height: 56px; font: inherit; color: var(--btn-text); background: var(--btn-bg); border: var(--btn-border); border-radius: var(--btn-radius); box-shadow: var(--btn-shadow); }
.mod-group:hover { filter: var(--btn-hover); }
.mod-group:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.mg-title { font-weight: 900; }
.mg-sub { grid-column: 1; font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.mod-group.has-on .mg-sub { color: var(--accent); }
.mg-arrow { grid-row: 1 / 3; grid-column: 2; font-weight: 900; color: var(--muted); }
.mod-group-head { display: flex; align-items: center; gap: 10px; }
.mg-head-title { font-weight: 900; font-size: var(--fs-lg); }
[data-theme="gameboy"] .mod-group.has-on .mg-sub { color: var(--gb0); text-decoration: underline; }
.rule-tabs { padding: 8px 12px 0; flex: 0 0 auto; }
.pool-row { display: flex; flex-direction: column; gap: 4px; }
.pool-row .field-row { background: transparent; border: 0; padding: 2px 0; }
.check-grid.gens { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.check-grid.types { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.check-grid.biomes { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); max-height: 220px; overflow-y: auto; }
.help-card { background: var(--card-bg); border: var(--card-border); border-radius: var(--card-radius); box-shadow: var(--card-shadow); padding: 12px 14px; }
.help-title { font-weight: 900; font-size: var(--fs-xl); margin-bottom: 4px; }
.help-body { font-weight: 700; line-height: 1.4; min-height: 2.8em; }
.help-text { margin: 0; line-height: 1.45; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.chip.strong { background: var(--chip-on-bg); color: var(--chip-on-text); border-color: transparent; }
.seg { display: flex; gap: 6px; }
.seg-btn { flex: 1; appearance: none; border: var(--chip-border); background: var(--chip-bg); color: var(--text); border-radius: var(--btn-radius); padding: 9px 6px; font-weight: 900; cursor: pointer; }
.seg-btn.active { background: var(--chip-on-bg); color: var(--chip-on-text); border-color: transparent; }
.setup-body { flex: 1 1 auto; min-height: 0; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.player-input { display: flex; gap: 6px; align-items: center; padding: 6px; border-radius: var(--item-radius); background: var(--item-bg); border: var(--item-border); border-left: 6px solid var(--pc); }
.player-input .input { flex: 1 1 auto; min-width: 0; }
.player-input .input.mono { flex: 0 0 110px; }
.pi-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--pc); color: #fff; display: grid; place-items: center; font-weight: 900; flex: 0 0 auto; }
.player-inputs { display: flex; flex-direction: column; gap: 8px; }
.setup-top { justify-content: space-between; }
.trainer-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.trainer-card { background: var(--card-bg); border: var(--card-border); border-radius: var(--card-radius); padding: 10px 12px; border-top: 6px solid var(--pc); box-shadow: var(--card-shadow); }
.tc-num { font-weight: 900; color: var(--pc); font-size: var(--fs-sm); }
.tc-name { font-weight: 900; font-size: var(--fs-lg); }
.tc-sub { font-size: var(--fs-sm); color: var(--muted); font-weight: 700; }
[data-theme="gameboy"] .trainer-card, [data-theme="gameboy"] .player-input { border-top-color: var(--gb0); border-left-color: var(--gb0); }
[data-theme="gameboy"] .pi-dot { background: var(--gb0); color: var(--gb3); border-radius: 0; }

/* ----------------------------------------------------------- starters ------ */
.starter-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; }
.starter-balls { display: flex; gap: 8%; align-items: flex-end; height: 40%; }
.lab-ball { flex: 0 0 auto; width: min(26cqh, 24cqw, 90px); height: min(26cqh, 24cqw, 90px); border-radius: 50%; background: linear-gradient(180deg, #e94b3c 0 47%, #222 47% 53%, #fff 53%); border: 3px solid #222; box-shadow: 0 6px 12px rgba(0,0,0,.25); animation: float 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.6s); }
[data-theme="gameboy"] .lab-ball { background: linear-gradient(180deg, var(--gb1) 0 47%, var(--gb0) 47% 53%, var(--gb3) 53%); border-color: var(--gb0); box-shadow: none; }
.stage-caption { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-weight: 900; font-size: var(--fs-lg); }
.starter-reveal { display: flex; align-items: center; gap: 4%; width: 100%; height: 100%; padding: 0 4%; }
.reveal-mon { position: relative; width: min(62cqh, 46%); height: min(62cqh, 90%); display: flex; align-items: flex-end; justify-content: center; animation: pop-in .35s ease-out; }
.reveal-mon .mon-sprite { position: relative; width: 92%; height: 92%; }
.reveal-info { display: flex; flex-direction: column; gap: 6px; background: var(--card-bg); border: var(--card-border); border-radius: var(--card-radius); padding: 12px 14px; box-shadow: var(--card-shadow); max-width: 46%; }
.reveal-name { font-weight: 900; font-size: var(--fs-xl); }
.picker-list { display: flex; gap: 6px; padding: 8px 12px 0; flex-wrap: wrap; }
.picker { display: flex; align-items: center; gap: 4px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--chip-bg); border: var(--chip-border); border-left: 5px solid var(--pc); font-weight: 800; font-size: var(--fs-sm); min-height: 36px; }
.picker.active { background: var(--chip-on-bg); color: var(--chip-on-text); animation: glow 1.6s infinite; }
.picker.active .muted { color: inherit; opacity: .85; }
.starter-cards { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; padding: 10px 12px; overflow-y: auto; align-content: center; }
.starter-card { position: relative; appearance: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; min-height: 160px;
  background: var(--btn-bg); border: var(--btn-border); border-radius: var(--card-radius); box-shadow: var(--btn-shadow); color: var(--text); }
.starter-card .platform { bottom: auto; top: 42%; width: 70%; height: 14%; }
.starter-card .mon-sprite { position: relative; width: min(96px, 70%); height: 96px; }
.starter-card:hover:not([disabled]) { filter: var(--btn-hover); transform: translateY(-2px); }
.starter-card[disabled] { cursor: not-allowed; }
.starter-card.taken .mon-sprite { filter: grayscale(1); opacity: .5; }
.sc-name { font-weight: 900; }
.sc-owner { position: absolute; top: 6px; right: 6px; background: var(--pc); color: #fff; font-weight: 900; font-size: var(--fs-xs); padding: 2px 8px; border-radius: 999px; }
.center-row { justify-content: center; flex-wrap: wrap; }
.row.wrap { flex-wrap: wrap; gap: 5px; }
.ace-results { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; }
.starters-screen > .input { margin: 8px 12px 0; width: auto; }

/* --------------------------------------------------------- game top ------- */
.hud { position: absolute !important; top: 8px; left: 10px; right: 10px; display: flex; gap: 6px; align-items: center; z-index: 3 !important; flex-wrap: wrap; }
.hud-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-weight: 900; font-size: var(--fs-sm); background: var(--card-bg); border: var(--card-border); box-shadow: var(--card-shadow); white-space: nowrap; }
.hud-chip .ico { width: 16px; height: 16px; }
.hud-chip.week { background: var(--btn-primary-bg); color: var(--btn-primary-text); border: var(--btn-primary-border); }
.hud-chip.turn { border-left: 6px solid var(--pc, var(--accent)); }
.pips { display: inline-flex; gap: 3px; margin-left: 3px; }
.pips i { width: 9px; height: 9px; border-radius: 50%; background: var(--bar-bg); border: 1px solid rgba(0,0,0,.25); }
.pips i.on { background: var(--accent-2); border-color: transparent; box-shadow: 0 0 0 2px rgba(232,71,58,.2); }
.pips.big i { width: 13px; height: 13px; }
[data-theme="gameboy"] .pips i { border-radius: 0; border: 2px solid var(--gb0); background: var(--gb3); }
[data-theme="gameboy"] .pips i.on { background: var(--gb0); box-shadow: none; }
[data-theme="gameboy"] .hud-chip { border-radius: 0; border-width: 2px; }
[data-theme="gameboy"] .hud-chip.turn { border-left: 2px solid var(--gb0); }

.stage { position: absolute !important; left: 0; right: 0; top: 40px; bottom: 54px; }
.stage-owner { position: absolute !important; left: 12px; top: 2px; display: flex; gap: 6px; align-items: center; z-index: 2; }
.so-name { font-weight: 900; font-size: var(--fs-lg); padding: 2px 12px; border-radius: 999px; background: var(--pc); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.so-meta { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: var(--fs-sm); background: var(--card-bg); border-radius: 999px; padding: 1px 9px 1px 3px; border: var(--card-border); }
.so-meta .item-icon { width: 22px; height: 22px; }
[data-theme="gameboy"] .so-name { background: var(--gb0); color: var(--gb3); border-radius: 0; box-shadow: none; }
[data-theme="gameboy"] .so-meta { border-radius: 0; }
.party-row { position: absolute !important; left: 1%; right: 1%; top: 10%; bottom: 2px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: stretch; gap: 0.8%; }
.slot { position: relative; appearance: none; border: 0; background: none; padding: 0; height: 100%; min-height: 0; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; color: inherit; font: inherit; }
.slot-zone { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-end; justify-content: center; }
.slot-zone .platform { bottom: 2%; width: 92%; height: 20%; }
.slot .stage-mon { position: relative; width: 100%; height: 100%; max-height: 150px; object-fit: contain; object-position: center bottom; margin-bottom: 7%; z-index: 1; animation: idle 2.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.45s); transform-origin: bottom center; }
.slot:hover .stage-mon { filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); }
.slot.arc .stage-mon, .slot.out .stage-mon { opacity: .38; filter: grayscale(.7); animation: none; }
.slot.empty { cursor: default; }
.empty-ball { position: relative; width: 34%; max-width: 46px; aspect-ratio: 1; margin-bottom: 9%; border-radius: 50%; border: 2px dashed rgba(0,0,0,.18); }
.nameplate.ghost { visibility: hidden; }
.nameplate {
  position: relative; margin: 3px 2% 0; z-index: 2;
  background: var(--plate-bg, rgba(255,255,255,.92)); border: var(--plate-border, 1px solid rgba(70, 100, 150, .35)); border-radius: 10px;
  padding: 3px 6px 4px; box-shadow: 0 2px 6px rgba(0,0,0,.12); text-align: left;
}
.np-name { font-weight: 900; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.np-lv { font-weight: 900; font-size: var(--fs-xs); color: var(--muted); }
.np-item { width: 18px; height: 18px; }
.nameplate .bar { height: 5px; margin-top: 2px; }
.slot-tag { position: absolute; top: 30%; left: 50%; transform: translateX(-50%) rotate(-6deg); z-index: 3; background: var(--accent-2); color: #fff; font-weight: 900; font-size: var(--fs-xs); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.slot-tag.ace { background: #f2b705; color: #3a2a00; transform: translateX(-50%); top: 6%; }
[data-theme="gameboy"] .nameplate { --plate-bg: var(--gb3); --plate-border: 2px solid var(--gb0); border-radius: 0; box-shadow: none; }
[data-theme="gameboy"] .slot-tag { background: var(--gb0); color: var(--gb3); border-radius: 0; }

.scoreboard { position: absolute !important; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 6px; z-index: 3 !important; }
.score { flex: 1 1 0; min-width: 0; appearance: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 4px 8px; font: inherit; color: var(--text);
  background: var(--card-bg); border: var(--card-border); border-radius: 12px; border-left: 6px solid var(--pc); box-shadow: var(--card-shadow); }
.score.viewing { outline: 3px solid var(--pc); outline-offset: -1px; }
.score.active { animation: glow 1.6s infinite; --glow: color-mix(in srgb, var(--pc) 45%, transparent); }
.score-name { font-weight: 900; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30%; }
.score-wins, .score-money { display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: var(--fs-xs); white-space: nowrap; }
.score-wins .ico { width: 16px; height: 16px; }
.score-team { display: flex; margin-left: auto; overflow: hidden; }
[data-theme="gameboy"] .score { border-radius: 0; border: 2px solid var(--gb0); border-left-width: 2px; box-shadow: none; }
[data-theme="gameboy"] .score.viewing { outline: 2px solid var(--gb0); outline-offset: 2px; }
[data-theme="gameboy"] .score.active { background: var(--gb2); }
[data-theme="gameboy"] .score-wins .ico { color: var(--gb0); }

/* --------------------------------------------------------- game bottom ---- */
.game-head { padding: 6px 8px; }
.player-tabs { display: flex; gap: 5px; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.ptab { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 900; font-size: var(--fs-sm); background: rgba(255,255,255,.2); color: inherit; white-space: nowrap; }
.ptab.active { background: #fff; color: var(--text); }
.ptab-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.ptab.turn .ptab-dot { animation: blink 1s steps(2, start) infinite; }
.menu-btn, .undo-btn { flex: 0 0 auto; }
.icon-btn[disabled] { opacity: .4; cursor: not-allowed; filter: grayscale(.6); }
[data-theme="gameboy"] .ptab { border-radius: 0; background: var(--gb1); color: var(--gb3); }
[data-theme="gameboy"] .ptab.active { background: var(--gb3); color: var(--gb0); }
[data-theme="gameboy"] .ptab-dot { background: currentColor; border-radius: 0; box-shadow: none; }
.turn-bar { display: flex; align-items: center; gap: 8px; padding: 7px 12px; flex: 0 0 auto; background: var(--panel-bg); border-bottom: var(--item-border); border-left: 6px solid var(--pc, var(--accent)); }
.turn-bar .tb-text { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); }
.turn-bar.battle { background: linear-gradient(90deg, #fff1c4, #ffe08a); border-left-color: #f2b705; }
[data-theme="gameboy"] .turn-bar { border-left: 2px solid var(--gb0); border-bottom: 2px solid var(--gb0); }
[data-theme="gameboy"] .turn-bar.battle { background: var(--gb2); }
.action-scroll { flex: 1 1 auto; min-height: 0; padding: 10px; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 9px; }
.bottom-status { display: flex; align-items: center; gap: 12px; padding: 6px 12px; font-weight: 800; font-size: var(--fs-sm); background: var(--panel-bg); border-top: var(--item-border); flex: 0 0 auto; }
.bottom-status > span { display: inline-flex; align-items: center; gap: 4px; }
.bottom-status .item-icon { width: 22px; height: 22px; }
.bs-money { color: var(--good); font-weight: 900; }
.bs-wins { margin-left: auto; }
.bs-wins .ico { width: 16px; height: 16px; }
[data-theme="gameboy"] .bs-money { color: var(--gb0); }
[data-theme="gameboy"] .bottom-status { border-top: 2px solid var(--gb0); }

/* ----------------------------------------------------- party & summary ---- */
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.mon-card { appearance: none; position: relative; display: flex; gap: 8px; align-items: center; padding: 6px 10px 6px 4px; cursor: pointer; text-align: left; color: var(--text); font: inherit;
  background: var(--item-bg); border: var(--item-border); border-radius: var(--card-radius); box-shadow: var(--panel-shadow); min-height: 84px; }
[data-theme="3ds"] .mon-card { background: linear-gradient(180deg, #ffffff, #eef4fb); border-radius: 18px 6px 18px 6px; }
.mon-card:hover { filter: var(--btn-hover); }
.mon-card.empty { cursor: default; justify-content: center; opacity: .5; }
.mon-card.empty .empty-ball { width: 40px; margin: 0; }
.mon-card.arc { opacity: .7; }
.mc-sprite { width: 70px; height: 70px; flex: 0 0 auto; display: grid; place-items: center; }
.mc-sprite .mon-sprite { width: 100%; height: 100%; }
.mc-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mc-name { font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-sub { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-row { display: flex; align-items: center; gap: 6px; }
.mc-lv { font-weight: 900; font-size: var(--fs-sm); }
.mc-item { display: inline-flex; align-items: center; gap: 2px; font-size: var(--fs-xs); font-weight: 700; min-width: 0; }
.mc-item .item-icon { width: 18px; height: 18px; }
.mc-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag-ace { background: #f2b705 !important; color: #3a2a00 !important; border-color: transparent !important; }
.tag-arc, .tag-sick { background: var(--accent-2) !important; color: #fff !important; border-color: transparent !important; }
[data-theme="gameboy"] .tag-ace, [data-theme="gameboy"] .tag-arc, [data-theme="gameboy"] .tag-sick { background: var(--gb0) !important; color: var(--gb3) !important; }
.summary-info { display: flex; gap: 12px; align-items: center; }
.summary-left { position: relative; width: 38%; max-width: 230px; aspect-ratio: 1; flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: center; }
.summary-sprite { position: relative; width: 90%; height: 90%; animation: idle 3s ease-in-out infinite; }
.summary-right { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.summary-name { font-weight: 900; font-size: var(--fs-xl); }
.rare-star { color: #f2b705; margin-left: 4px; }
.shiny-mark { color: #e84aa8; margin-left: 4px; font-size: .9em; text-shadow: 0 0 6px rgba(255, 120, 200, .6); }
[data-theme="gameboy"] .shiny-mark { color: var(--gb0); text-shadow: none; }

/* Shiny encounter: stars burst around the Pokémon as it appears */
.shiny-sparkles { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.shiny-sparkles i {
  position: absolute; width: 22px; height: 22px; opacity: 0;
  left: calc(10% + var(--i) * 12%); top: calc(18% + (var(--i) * 37 % 60) * 1%);
  background: #fff6c8; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 6px #ffe36a);
  animation: shiny-star 1.1s ease-out 2; animation-delay: calc(.55s + var(--i) * .09s);
}
@keyframes shiny-star { 0% { opacity: 0; transform: scale(.2) rotate(0); } 35% { opacity: 1; transform: scale(1.2) rotate(45deg); } 100% { opacity: 0; transform: scale(.4) rotate(90deg); } }
[data-theme="gameboy"] .shiny-sparkles i { background: var(--gb3); filter: none; outline: 2px solid var(--gb0); }
[data-motion="reduced"] .shiny-sparkles i { animation: none; opacity: .9; }

/* Moves sheet and TM shop */
.move-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed var(--panel-border-color, rgba(0,0,0,.08)); }
.move-row:last-of-type { border-bottom: 0; }
.move-row .type-badge, .tm-item .type-badge { flex: 0 0 72px; text-align: center; }
.move-name { font-weight: 800; }
.tm-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.tm-item { gap: 8px; }
.tm-label { flex: 0 0 52px; font-weight: 900; font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.summary-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.summary-actions .btn { min-height: 52px; }
.summary-sheet .sheet-body { justify-content: center; }
.stat-row { display: grid; grid-template-columns: 90px 1fr 24px; gap: 6px; align-items: center; font-size: var(--fs-sm); }

/* Chaos Mode: live reading of a play description */
.prompt-preview:empty { display: none; }
.play-read { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 8px 10px; background: var(--panel-bg); border: var(--panel-border); border-radius: var(--panel-radius); }
.pr-row { display: grid; grid-template-columns: 64px 1fr 22px; gap: 8px; align-items: center; font-size: var(--fs-sm); font-weight: 800; }
.pr-row .bar { height: 8px; }
.pr-val { text-align: right; font-variant-numeric: tabular-nums; }
.pr-note { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.pr-note.bad { color: var(--accent-2); }
[data-theme="gameboy"] .pr-note.bad { color: var(--gb0); text-decoration: underline; }

/* --------------------------------------------------------- bag & shop ----- */
.bag-list { display: flex; flex-direction: column; gap: 6px; }
.bag-item .qty { font-weight: 900; color: var(--muted); }
.list-item.static { cursor: default; }
.list-item.static:hover { background: var(--item-bg); }
.list-item .btn { flex: 0 0 auto; }
.big-icon { width: 48px !important; height: 48px !important; }
.info-title { font-weight: 900; font-size: var(--fs-lg); }
.info-card .row { align-items: flex-start; }
.info-sprite { width: 80px; height: 80px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.shop-item { appearance: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 6px; text-align: center; font: inherit; color: var(--text);
  background: var(--btn-bg); border: var(--btn-border); border-radius: var(--card-radius); box-shadow: var(--btn-shadow); min-height: 118px; }
.shop-item .item-icon { width: 36px; height: 36px; }
.si-name { font-weight: 800; font-size: var(--fs-sm); line-height: 1.15; }
.si-price { font-weight: 900; color: var(--accent); }
.si-stock { font-size: var(--fs-xs); color: var(--muted); font-weight: 700; }
.shop-item.sold-out { opacity: .45; }
.shop-item:hover:not([disabled]) { filter: var(--btn-hover); transform: translateY(-1px); }
[data-theme="gameboy"] .si-price { color: var(--gb0); }

/* ----------------------------------------------------------- trade -------- */
.trade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trade-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.trade-name { font-weight: 900; padding: 4px 10px; border-radius: 10px; background: var(--item-bg); border-left: 6px solid var(--pc); }
.trade-items { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.trade-item { appearance: none; display: flex; gap: 6px; align-items: center; padding: 4px 8px; border-radius: 10px; border: var(--item-border); background: var(--item-bg); cursor: pointer; font: inherit; color: var(--text); text-align: left; font-size: var(--fs-sm); }
.trade-item.selected { background: var(--chip-on-bg); color: var(--chip-on-text); }
.trade-item .item-icon { width: 22px; height: 22px; }

/* ------------------------------------------------------- week & winner ---- */
.winner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.copy-teams { margin-bottom: 10px; }
.copy-team-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-team-buttons .btn { flex: 1 1 160px; border-left: 6px solid var(--pc); }
[data-theme="gameboy"] .copy-team-buttons .btn { border-left-width: 2px; }
.winner-card { appearance: none; cursor: pointer; display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 14px 10px; font: inherit; color: var(--text);
  background: var(--btn-bg); border: var(--btn-border); border-top: 8px solid var(--pc); border-radius: var(--card-radius); box-shadow: var(--btn-shadow); }
.winner-card:hover { filter: var(--btn-hover); transform: translateY(-2px); }
.wc-name { font-weight: 900; font-size: var(--fs-xl); }
.wc-team { display: flex; flex-wrap: wrap; justify-content: center; }
.recap .recap-line { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: var(--fs-sm); line-height: 1.35; }
.recap .recap-line + .recap-line { border-top: 1px dashed rgba(0,0,0,.08); }
.recap .ico { width: 32px; height: 32px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
[data-theme="gameboy"] .dot { border-radius: 0; background: var(--gb0) !important; }

/* ------------------------------------------------------------ save list --- */
.save-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--item-radius); background: var(--item-bg); border: var(--item-border); }
.save-main { flex: 1 1 auto; min-width: 0; }
.save-name { font-weight: 900; }
.save-team { display: flex; flex-wrap: wrap; }
.save-actions { display: flex; flex-direction: column; gap: 4px; }

/* ---------------------------------------------------------- visuals ------- */
.theme-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-card { appearance: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: var(--card-radius); border: var(--btn-border); background: var(--btn-bg); color: var(--text); font: inherit; }
.theme-card.active { outline: 3px solid var(--accent); }
.theme-name { font-weight: 900; }
.theme-thumb { width: 100%; max-width: 160px; aspect-ratio: 4/3; border-radius: 10px; display: flex; flex-direction: column; gap: 4px; padding: 8px; }
.theme-thumb i { flex: 1; border-radius: 4px; }
.thumb-3ds { background: linear-gradient(180deg, #4a4f60, #1d2029); }
.thumb-3ds i:first-child { background: linear-gradient(180deg, #9fd3ff, #dff1ff 52%, #9ed67a 52%); margin: 0 4px; }
.thumb-3ds i:last-child { background: repeating-linear-gradient(135deg, #f4f9ff 0 6px, #d7e7fa 6px 12px); margin: 0 18px; }
.thumb-gameboy { background: #c5c4c0; border-radius: 6px 6px 22px 6px; }
.thumb-gameboy i { background: #9bbc0f; border: 3px solid #5f6176; margin: 0 8px; }
.thumb-gameboy i:last-child { display: none; }
.thumb-wii { background: linear-gradient(180deg, #2c2e34, #131418); border-radius: 8px; padding: 6px; gap: 0; }
.thumb-wii i { border-radius: 0; }
.thumb-wii i:first-child { background: linear-gradient(180deg, #9fd3ff, #dff1ff 52%, #9ed67a 52%); border-radius: 3px 3px 0 0; }
.thumb-wii i:last-child { background: linear-gradient(180deg, rgba(0,0,0,0) 68%, #34beed 68% 71%, #dde1e5 71%), repeating-linear-gradient(0deg, #f8f9fa 0 2px, #e6e9ec 2px 4px); border-radius: 0 0 3px 3px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { appearance: none; width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; background: var(--sw); box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 2px 6px rgba(0,0,0,.2); cursor: pointer; }
.swatch.active { box-shadow: 0 0 0 3px var(--accent), 0 2px 6px rgba(0,0,0,.25); }
.swatch.gb { width: auto; height: 34px; border-radius: 0; display: flex; padding: 0; border: 2px solid #222; }
.swatch.gb i { width: 14px; height: 100%; display: block; }
.swatch.gb.active { box-shadow: 0 0 0 3px var(--accent); }
.visual-preview { position: relative; height: 150px; border-radius: 10px; overflow: hidden; }
.visual-preview .scene { position: absolute; inset: 0; }
.vp-mon { position: absolute !important; right: 12%; top: 6%; width: 120px; height: 110px; display: flex; align-items: flex-end; justify-content: center; }
.vp-mon .mon-sprite { position: relative; width: 100%; height: 100%; }
.vp-text { position: absolute; left: 8px !important; right: 8px !important; bottom: 8px !important; min-height: 0 !important; padding: 8px 12px 12px !important; opacity: 1 !important; transform: none !important; }

/* ------------------------------------------------------- battle scene ----- */
.battle-scene .scene-bg { position: absolute; inset: 0; }
.battle-flash { position: absolute; inset: 0; background: #fff; z-index: 5; pointer-events: none; animation: flash .7s ease-out forwards; }
[data-theme="gameboy"] .battle-flash { background: var(--gb0); }
.wild-wrap { position: absolute; right: 9%; top: 6%; width: min(46cqh, 40%); height: min(56cqh, 62%); display: flex; align-items: flex-end; justify-content: center; z-index: 2; }
.wild-wrap .platform { bottom: 0; width: 120%; height: 22%; }
.wild-mon { position: relative; width: 100%; height: 92%; margin-bottom: 8%; animation: slide-in-right .55s cubic-bezier(.2,.8,.3,1) both; transform-origin: bottom center; }
.battle-scene.ready .wild-mon { animation: idle 2.6s ease-in-out infinite; }
.wild-plate { position: absolute; left: 4%; top: 8%; z-index: 3; min-width: 38%; padding: 6px 12px 8px; background: var(--plate-bg, rgba(255,255,255,.94)); border: var(--plate-border, 2px solid #4f86cf); border-radius: 14px 4px 14px 4px; box-shadow: var(--card-shadow); animation: pop-in .4s .3s ease-out both; }
.wp-name { font-weight: 900; font-size: var(--fs-lg); }
.wp-row { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.wp-lv { font-weight: 900; color: var(--muted); }
[data-theme="gameboy"] .wild-plate { --plate-bg: var(--gb3); --plate-border: 2px solid var(--gb0); border-radius: 0; box-shadow: none; border-width: 0 0 4px 4px; border-style: solid; }
.dex-note { position: absolute; left: 4%; top: 30%; z-index: 3; width: 44%; max-height: 34%; overflow: hidden; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.86); border: 1px solid rgba(70,100,150,.3); font-size: var(--fs-xs); line-height: 1.35; animation: pop-in .4s .5s ease-out both; }
.dex-note-head { font-weight: 900; color: #c0392b; text-transform: uppercase; letter-spacing: .05em; }
[data-theme="gameboy"] .dex-note { background: var(--gb3); border: 2px solid var(--gb0); border-radius: 0; }
[data-theme="gameboy"] .dex-note-head { color: var(--gb0); }
.place-tag { position: absolute; right: 3%; top: 3%; z-index: 3; font-size: var(--fs-xs); font-weight: 800; background: rgba(0,0,0,.45); color: #fff; padding: 2px 9px; border-radius: 999px; max-width: 50%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="gameboy"] .place-tag { background: var(--gb0); color: var(--gb3); border-radius: 0; }
.thrown-ball { position: absolute; left: 8%; bottom: 12%; --throw-x: 59cqw; --throw-y: -38cqh; width: 44px; height: 44px; z-index: 4; display: grid; place-items: center; opacity: 0; }
.thrown-ball .item-icon { width: 40px; height: 40px; }
.battle-scene.throwing .thrown-ball { animation: throw .65s cubic-bezier(.3,.1,.4,1) forwards; }
.battle-scene.in-ball .wild-mon { animation: none; transform: scale(0); filter: brightness(3); transition: transform .3s ease-in, filter .2s; }
.battle-scene.broke-out .wild-mon { transform: none; filter: none; animation: pop-in .3s ease-out; }
.battle-scene.broke-out .thrown-ball { opacity: 0 !important; transition: opacity .2s; }
.thrown-ball.shake { animation: shake .38s ease-in-out !important; }
.battle-scene.caught .thrown-ball::after { content: '✦ ✦ ✦'; position: absolute; top: -18px; left: 50%; transform: translateX(-50%); color: #f2b705; font-size: 14px; white-space: nowrap; animation: pop-in .4s ease-out; }
@keyframes throw {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1.1); }
  50% { opacity: 1; transform: translate(calc(var(--throw-x) * .5), calc(var(--throw-y) - 14cqh)) rotate(360deg) scale(.95); }
  100% { opacity: 1; transform: translate(var(--throw-x), var(--throw-y)) rotate(720deg) scale(.85); }
}
.battle-scene.in-ball .thrown-ball, .battle-scene.caught .thrown-ball { animation: none; opacity: 1; left: calc(8% + var(--throw-x)); bottom: calc(12% - var(--throw-y)); transform: scale(.85); }
.top-scene { container-type: size; }

/* --------------------------------------------------------- evolution ------ */
.evo-scene .evo-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, #ffffff, #b9dcff 40%, #3a6fd8 100%); }
[data-theme="gameboy"] .evo-scene .evo-bg { background: var(--gb2); }
.evo-stage { position: absolute; left: 50%; top: 8%; width: min(70cqh, 60%); height: 70%; transform: translateX(-50%); }
.evo-stage .mon-sprite { position: absolute; inset: 0; width: 100%; height: 100%; }
.evo-b { opacity: 0; }
.evo-scene.evolving .evo-a { animation: evo-a 2.6s steps(1, end) forwards; }
.evo-scene.evolving .evo-b { animation: evo-b 2.6s steps(1, end) forwards; }
.evo-scene.evolving .evo-stage .mon-sprite { filter: brightness(0) invert(1) drop-shadow(0 0 12px #fff); }
[data-theme="gameboy"] .evo-scene.evolving .evo-stage .mon-sprite { filter: brightness(0); }
.evo-scene.evolved .evo-a { opacity: 0 !important; animation: none; }
.evo-scene.evolved .evo-b { opacity: 1 !important; animation: pop-in .4s ease-out; filter: none !important; }
.evo-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.evo-scene.evolved .evo-flash { animation: flash .6s ease-out; }
@keyframes evo-a { 0%, 20%, 40%, 55%, 68%, 78%, 86%, 92%, 96% { opacity: 1; } 10%, 30%, 48%, 62%, 73%, 82%, 89%, 94%, 98%, 100% { opacity: 0; } }
@keyframes evo-b { 0%, 20%, 40%, 55%, 68%, 78%, 86%, 92%, 96% { opacity: 0; } 10%, 30%, 48%, 62%, 73%, 82%, 89%, 94%, 98%, 100% { opacity: 1; } }

/* ------------------------------------------------- turn banner & win ------ */
.turn-banner { pointer-events: none; display: flex; align-items: center; }
.tb-strip { width: 100%; padding: 14px 0; text-align: center; color: #fff; background: linear-gradient(90deg, transparent, var(--pc) 15%, var(--pc) 85%, transparent); transform: skewY(-4deg); animation: slide-in-right .35s ease-out; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.tb-name { font-weight: 900; font-size: clamp(22px, 4vw, 38px); }
.tb-sub { font-weight: 800; font-size: var(--fs-sm); opacity: .9; }
[data-theme="gameboy"] .tb-strip { background: var(--gb0); color: var(--gb3); transform: none; text-shadow: none; }
.win-scene { background: radial-gradient(circle at 50% 40%, rgba(255,240,170,.95), rgba(255,200,80,.8) 45%, rgba(230,120,40,.85)); display: flex; align-items: flex-start; justify-content: center; }
[data-theme="gameboy"] .win-scene { background: var(--gb2); }
.win-card { margin-top: 3%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; animation: pop-in .5s ease-out; }
.win-trophy { width: 64px; height: 64px; }
.win-title { font-weight: 900; font-size: clamp(24px, 4.4vw, 42px); color: #fff; text-shadow: 0 3px 0 #b8650c; }
[data-theme="gameboy"] .win-title { color: var(--gb0); text-shadow: 2px 2px 0 var(--gb3); }
.win-team { display: flex; gap: 4px; }
.win-team .mon-sprite { width: min(14cqh, 80px); height: min(14cqh, 80px); animation: float 2s ease-in-out infinite; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -10px; left: calc(var(--i) * 4.2%); width: 8px; height: 14px; background: hsl(calc(var(--i) * 47), 85%, 60%); animation: fall 3s linear infinite; animation-delay: calc(var(--i) * -.13s); }
[data-theme="gameboy"] .confetti i { background: var(--gb0); }
@keyframes fall { to { transform: translateY(110cqh) rotate(540deg); } }
.top-scene.win-scene { container-type: size; }

/* ---------------------------------------------------------- phones ------- */
@media (max-width: 640px) {
  [data-theme="3ds"] .lid { border-radius: 0 0 10px 10px; padding: 6px 6px 4px; }
  [data-theme="3ds"] .speaker, [data-theme="3ds"] .lid-strip, [data-theme="3ds"] .base-strip { display: none; }
  [data-theme="3ds"] .lid-label { height: 12px; font-size: 9px; margin-top: 2px; }
  [data-theme="3ds"] .bezel-top { padding: 6px; border-radius: 10px; }
  [data-theme="3ds"] .hinge { height: 8px; }
  [data-theme="3ds"] .base { padding: 6px; border-radius: 10px 10px 0 0; }
  [data-theme="3ds"] .bezel-bottom { padding: 6px; }
  .score { padding: 3px 6px; gap: 4px; }
  .score-team { display: none; }
  .score-name { max-width: 40%; }
  .action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .menu-tile { padding: 8px; min-height: 52px; column-gap: 7px; }
  .menu-tile .tile-ico { width: 36px; height: 36px; padding: 2px; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; gap: 8px; }
  .stage-owner { display: none; }
  .hud-chip { padding: 3px 8px; }
  .dex-note { width: 52%; }
  .summary-info { flex-direction: column; }
  .summary-left { width: 40%; }
  .trade-grid { grid-template-columns: 1fr; }
}
[data-motion="reduced"] .confetti { display: none; }
.win-scene { background: radial-gradient(circle at 50% 40%, #fff6cf, #ffd36a 45%, #f19a3e) !important; }
[data-theme="gameboy"] .win-scene { background: var(--gb2) !important; }

.copy-area { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: var(--fs-sm); white-space: pre; resize: vertical; }
[data-theme="gameboy"] .copy-area { font-family: "Press Start 2P", monospace; font-size: 9px; line-height: 1.6; }
