:root {
  --yellow: #f5d000;
  --yellow-deep: #c9a400;
  --cheek: #e02020;
  --cheek-hot: #ff4a4a;
  --cream: #f4e7c4;
  --mint: #7ed9c4;
  --mint-deep: #3e8f7c;
  --forest: #0c1a12;
  --forest-2: #13241a;
  --forest-3: #1b3326;
  --plastic: #173326;
  --plastic-hi: #2a4d3a;
  --ink: #e7f0d4;
  --muted: #8aa090;
  --screen: #08110c;
  --stroke: #07140e;
  --chrome: "Silkscreen", "Courier New", monospace;
  --dex: "VT323", "Lucida Console", monospace;
  --mono: "Share Tech Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--forest);
  color: var(--ink);
  font-family: var(--dex);
  font-size: 22px;
  line-height: 1.35;
  min-height: 100%;
  overflow-x: hidden;
}
body.boot-locked { overflow: hidden; height: 100svh; }

img { max-width: 100%; display: block; }
button, a { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--chrome); font-weight: 400; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* overlays */
.scanlines, .grain, .vignette {
  pointer-events: none;
  position: fixed;
  inset: 0;
}
.scanlines {
  z-index: 90;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.14) 2px 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.55;
}
.grain {
  z-index: 91;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}
.vignette {
  z-index: 89;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.45) 100%);
}

/* A-button confirm */
.a-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: var(--yellow);
  color: #1a1400;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 18px 14px 12px;
  border-radius: 999px;
  box-shadow:
    0 4px 0 #7a6200,
    0 8px 18px rgba(0,0,0,.4);
  text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease, filter .08s ease;
}
.a-btn:hover { filter: brightness(1.05); }
.a-btn:active, .a-btn.is-press {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #7a6200, 0 2px 8px rgba(0,0,0,.35);
}
.a-key {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #fff6c2;
  border: 2px solid #7a6200;
  display: grid; place-items: center;
  font-size: 13px;
  font-family: var(--mono);
}
.a-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* sticky cheek */
.sticky-cheek {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 80;
  width: 52px; height: 52px;
  padding: 0;
  border: 2px solid #3a0a0a;
  border-radius: 50%;
  overflow: visible;
  background: #2a0000;
  box-shadow: 0 0 0 3px rgba(224,32,32,.25), 0 8px 20px rgba(0,0,0,.5);
}
.sticky-cheek img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.sticky-cheek:active { transform: scale(0.94); }
.cheek-pulse {
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--cheek-hot);
  animation: pulse 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes pulse {
  0% { transform: scale(.85); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.dex-menu {
  position: fixed;
  top: 78px;
  right: max(14px, env(safe-area-inset-right));
  z-index: 81;
  width: min(230px, calc(100vw - 28px));
  background: #14261c;
  border: 3px solid #0a140f;
  border-radius: 18px;
  padding: 10px 10px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,200,.08),
    0 10px 0 #07110c,
    0 18px 40px rgba(0,0,0,.5);
}
.dex-menu a {
  display: block;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  padding: 10px 10px;
  border-radius: 10px;
}
.dex-menu a:hover, .dex-menu a:focus-visible {
  background: #1e3a2c;
  color: var(--yellow);
}
.dex-menu__rom, .dex-menu__hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding: 4px 10px 8px;
}
.dex-menu__hint { padding-top: 8px; }

/* plastic bezel */
.bezel {
  position: relative;
  background:
    linear-gradient(180deg, #214533 0%, #173326 40%, #10241c 100%);
  border: 3px solid #0a140f;
  border-radius: 32px;
  padding: 18px 18px 22px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,210,.14),
    inset 0 -10px 24px rgba(0,0,0,.35),
    0 14px 0 #07110c,
    0 22px 50px rgba(0,0,0,.45);
}
.bezel--boot { height: 100%; display: flex; flex-direction: column; padding: 16px 16px 14px; }
.bezel__screws {
  position: absolute; inset: 10px;
  pointer-events: none;
}
.bezel__screws i {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9aa58c, #3a4638 60%, #1a2218);
  box-shadow: inset 0 0 0 1px #0a0e09;
}
.bezel__screws i:nth-child(1) { top: 0; left: 0; }
.bezel__screws i:nth-child(2) { top: 0; right: 0; }
.bezel__screws i:nth-child(3) { bottom: 0; left: 0; }
.bezel__screws i:nth-child(4) { bottom: 0; right: 0; }

.crt {
  position: relative;
  background: var(--screen);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 2px #1e3a2c,
    inset 0 30px 50px rgba(0,0,0,.35);
}

/* BOOT */
.boot {
  min-height: 100svh;
  padding: 18px;
  display: grid;
}
.boot-lid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 18px 12px;
  font-family: var(--chrome);
  color: var(--yellow);
}
.boot-lid__brand { font-size: 16px; letter-spacing: .18em; }
.boot-lid__model { font-family: var(--mono); font-size: 11px; color: var(--mint); letter-spacing: .12em; }
.crt--boot {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.boot-glow {
  position: absolute;
  inset: 4% 8% 28% 8%;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.boot-sil {
  width: min(340px, 62%);
  height: auto;
  transform: translateY(8px) scale(.96);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 1.1s ease, transform 1.1s ease;
  filter: saturate(1.2) brightness(1.08);
  mask-image: radial-gradient(circle at 50% 54%, #000 56%, transparent 74%);
  -webkit-mask-image: radial-gradient(circle at 50% 54%, #000 56%, transparent 74%);
}
body.powered .boot-sil { opacity: .95; transform: none; }
.crt__static {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px);
  opacity: 0;
  animation: snow 2.2s steps(3) 1;
}
@keyframes snow {
  0%, 40% { opacity: .5; }
  100% { opacity: 0; }
}
.boot-stack {
  position: relative;
  z-index: 2;
  width: min(560px, 92%);
  text-align: center;
  margin-top: auto;
  padding: 8vh 0 6vh;
  background: linear-gradient(180deg, transparent, rgba(8,17,12,.72) 28%);
}
.boot-kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0;
}
body.powered .boot-kicker { opacity: 1; }
.curve {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 6%;
  width: 92%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 8px rgba(245,208,0,.55));
}
.curve__under {
  fill: none;
  stroke: #1a3324;
  stroke-width: 12;
  stroke-linecap: round;
  opacity: .9;
}
.curve__line {
  fill: none;
  stroke: #f5d000;
  stroke-width: 7;
  stroke-linecap: round;
}
body.thrown .curve {
  filter: drop-shadow(0 0 14px rgba(224,32,32,.5)) drop-shadow(0 0 8px rgba(245,208,0,.7));
}
.curve-caption {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.boot-line {
  min-height: 1.4em;
  margin: 18px 0 16px;
  font-size: clamp(26px, 4vw, 40px);
  color: var(--cream);
  text-shadow: 0 2px 0 #000, 0 0 18px rgba(245,208,0,.35);
}
.a-btn--throw {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.a-btn--throw.is-in {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity .35s ease, transform .35s ease, box-shadow .08s ease, filter .08s ease;
}
.bezel__chin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px 0;
}
.speaker {
  width: 88px; height: 10px;
  background: repeating-linear-gradient(90deg, #0a140f 0 6px, transparent 6px 12px);
  border-radius: 4px;
  opacity: .7;
}
.power-led {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #3a0;
  box-shadow: 0 0 8px #6f0;
  animation: led 1.4s ease infinite;
}
@keyframes led { 50% { opacity: .45; } }

/* ROM */
.rom { background: var(--forest); }
.hinge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mint);
}
.screw {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #b7c0a8, #3a4638);
  box-shadow: inset 0 0 0 1px #0a0e09;
}

.screen { padding: 0 18px 8px; }
.screen .bezel { max-width: 1120px; margin: 0 auto; }

/* DEX */
.dex-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 10px 14px;
  flex-wrap: wrap;
}
.dex-head__mark {
  color: var(--yellow);
  font-size: 18px;
  letter-spacing: .2em;
}
.dex-head__meta {
  display: flex; gap: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mint);
  letter-spacing: .12em;
}
.dex-grid {
  display: grid;
  grid-template-columns: minmax(260px, 42%) 1fr;
  gap: 16px;
}
.sprite-pane, .file-pane {
  background: #0b1610;
  border-radius: 20px;
  box-shadow: inset 0 0 0 2px #1e3a2c;
}
.sprite-pane { padding: 16px 16px 12px; }
.sprite-window {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 70%, #1b3326, #08110c 70%);
  perspective: 700px;
}
.sprite-reel {
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .35s ease;
}
.sprite-reel img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .28s ease;
}
.sprite-reel img.is-on { opacity: 1; }
.sprite-shadow {
  position: absolute;
  left: 18%; right: 18%; bottom: 8%;
  height: 16px;
  background: radial-gradient(ellipse, rgba(0,0,0,.45), transparent 70%);
  pointer-events: none;
}
.sprite-bar {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 8px;
  margin-top: 10px;
}
.mini-btn {
  background: #1e3a2c;
  color: var(--cream);
  border: 2px solid #0a140f;
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .12em;
  padding: 8px 0;
  box-shadow: 0 3px 0 #07110c;
}
.mini-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #07110c; }
.mini-btn--cry { background: var(--yellow); color: #1a1400; }
.cry-out {
  text-align: center;
  margin-top: 8px;
  font-size: 20px;
  color: var(--muted);
  min-height: 1.2em;
}
.cry-out.is-cry { color: var(--yellow); }

.file-pane { padding: 18px 18px 16px; }
.file-pane__species {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--yellow);
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.file-pane__species span {
  display: block;
  margin-top: 6px;
  font-family: var(--dex);
  font-size: 22px;
  color: var(--cream);
  letter-spacing: 0;
}
.file {
  margin: 0 0 14px;
  display: grid;
  gap: 6px;
}
.file > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #1e3a2c;
  padding: 6px 0;
}
.file dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mint);
}
.file dd { margin: 0; color: var(--cream); }
.type {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  margin-right: 6px;
}
.type--elc { background: var(--yellow); color: #1a1400; }
.type--pad { background: var(--mint-deep); color: var(--cream); }
.blurb {
  color: var(--cream);
  font-size: 22px;
  margin: 8px 0 16px;
}
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stats li {
  display: grid;
  grid-template-columns: 1fr 1fr 36px;
  gap: 8px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
}
.stats span em {
  font-style: normal;
  color: var(--muted);
  margin-left: 8px;
}
.stats b {
  display: block;
  height: 10px;
  background: #1e3a2c;
  border-radius: 99px;
  position: relative;
  overflow: hidden;
}
.stats b::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--v);
  background: linear-gradient(90deg, var(--yellow), var(--cheek));
  border-radius: inherit;
}
.stats i { font-style: normal; text-align: right; color: var(--yellow); }

/* FIGHT */
.screen--fight .bezel { padding-bottom: 16px; }
.fight-top {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
  align-items: end;
  background: linear-gradient(180deg, #163022, #0b1610);
  border-radius: 18px;
  padding: 16px 16px 8px;
  min-height: 170px;
}
.foe-name {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cream);
}
.hp { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.hp span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cheek-hot);
}
.hp__track {
  flex: 1;
  height: 10px;
  background: #1e3a2c;
  border: 1px solid #0a140f;
  border-radius: 99px;
  overflow: hidden;
}
.hp__track i {
  display: block;
  width: 78%;
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), #c9a400);
}
.foe-note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.fight-sil {
  width: 140px;
  height: 140px;
  object-fit: cover;
  justify-self: end;
  border-radius: 50%;
  border: 3px solid #1e3a2c;
  box-shadow: 0 8px 16px rgba(0,0,0,.45);
  animation: bob 2.8s ease-in-out infinite;
}
@keyframes bob {
  50% { transform: translateY(-6px); }
}
.fight-log {
  margin: 12px 0;
  min-height: 52px;
  background: var(--cream);
  color: #1a1400;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 24px;
  box-shadow: inset 0 0 0 2px #c9b58a;
}
.fight-panel {
  background: #14261c;
  border-radius: 16px;
  padding: 10px;
  box-shadow: inset 0 0 0 2px #0a140f;
}
.fight-panel__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--mint);
  padding: 4px 8px 8px;
}
.fight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.move {
  text-align: left;
  background: #0b1610;
  color: var(--cream);
  border: 2px solid #1e3a2c;
  border-radius: 12px;
  padding: 12px 12px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name pp" "type pp";
  gap: 2px 10px;
  box-shadow: 0 3px 0 #07110c;
}
.move:active { transform: translateY(2px); box-shadow: 0 1px 0 #07110c; }
.move.is-on, .move:hover, .move:focus-visible {
  border-color: var(--yellow);
  background: #16281c;
}
.move.is-on { box-shadow: 0 0 0 1px var(--yellow), 0 3px 0 #07110c; }
.move.is-on::before {
  content: "▶";
  color: var(--yellow);
  margin-right: 6px;
  grid-area: name;
  float: left;
}
.move__name {
  grid-area: name;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.move__type {
  grid-area: type;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mint);
}
.move__pp {
  grid-area: pp;
  align-self: center;
  font-family: var(--dex);
  font-size: 22px;
  color: var(--yellow);
}

/* EVO corridor */
.screen--evo { padding: 0 0 8px; }
.evo-head {
  max-width: 1120px;
  margin: 0 auto 10px;
  padding: 0 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
}
.evo-head h2 {
  font-size: 14px;
  letter-spacing: .16em;
  color: var(--yellow);
}
.evo-head p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
}
.evo-track {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-color: var(--yellow) #0a140f;
  scrollbar-width: thin;
  mask-image: linear-gradient(90deg, #000 0%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 88%, transparent 100%);
}
.evo-track:active { cursor: grabbing; }
.evo-scene {
  position: relative;
  width: max(1680px, 155vw);
  height: min(72vh, 560px);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 260px;
  align-items: end;
  padding: 40px 48px 70px;
  gap: 24px;
  background:
    linear-gradient(180deg, rgba(12,26,18,.12), rgba(12,26,18,.42)),
    url("../images/gym.jpg") center / 100% 100% no-repeat;
}
.candles {
  position: absolute;
  left: 40px; right: 40px; bottom: 18px;
  height: 54px;
  background: repeating-linear-gradient(
    90deg,
    var(--mint) 0 7px,
    transparent 7px 16px,
    var(--cheek) 16px 22px,
    transparent 22px 34px,
    var(--yellow) 34px 42px,
    transparent 42px 52px
  );
  opacity: .72;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  pointer-events: none;
}
.station {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--cream);
}
.station figure {
  position: relative;
  margin: 0 auto 10px;
  width: min(280px, 100%);
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background: #08110c;
  box-shadow: 0 0 0 3px #0a140f, 0 16px 30px rgba(0,0,0,.45);
  transition: box-shadow .35s ease;
}
.station:not(.station--now) figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8,17,12,.78);
  box-shadow: inset 0 0 40px rgba(245,208,0,.12);
  transition: opacity .35s ease;
}
.station:not(.station--now):hover figure::after,
.station:not(.station--now):focus-within figure::after {
  opacity: 0;
}
.station--now figure {
  box-shadow: 0 0 0 3px var(--yellow), 0 16px 30px rgba(0,0,0,.45);
}
.station img { width: 100%; height: 100%; object-fit: cover; }
.station h3 {
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--yellow);
}
.station p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mint);
  margin: 4px 0;
}
.station small {
  font-family: var(--dex);
  font-size: 18px;
  color: var(--cream);
}
.evo-door {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-bottom: 40px;
}
.evo-door__plate {
  display: block;
  background: #1a1400;
  color: var(--yellow);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 2px solid var(--yellow-deep);
  border-radius: 4px;
  box-shadow: 0 6px 0 #0a140f;
  text-align: center;
}
.evo-door p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mint);
}

/* TRAINER CARD */
.screen--trainer {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 18px 28px;
  text-align: center;
}
.trainer-hint {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.card {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: none;
  perspective: 1200px;
  display: block;
}
.card__flip {
  position: relative;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
  min-height: 400px;
}
.card.is-flip .card__flip { transform: rotateY(180deg); }
.card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 18px;
  padding: 16px 18px 16px;
  overflow: hidden;
  text-align: left;
  background:
    linear-gradient(180deg, #efe0b4 0%, #e4d09a 100%);
  color: #1a1400;
  border: 3px solid #6b5a2a;
  box-shadow:
    inset 0 1px 0 #fff6c2,
    0 12px 0 #2a220c,
    0 20px 40px rgba(0,0,0,.4);
}
.card__face--back { transform: rotateY(180deg); }
.card__face header {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5a3a10;
  margin-bottom: 12px;
}
.card__body {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  align-items: center;
}
.card__body img {
  width: 128px; height: 128px;
  object-fit: cover;
  border-radius: 8px;
  border: 3px solid #2a220c;
  box-shadow: inset 0 0 0 2px #c9b58a;
}
.card__ticker {
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: .06em;
}
.card__origin, .card__note {
  font-family: var(--dex);
  font-size: 20px;
  margin-top: 6px;
}
.card__stars { color: var(--cheek); margin: 8px 0; letter-spacing: .2em; }
.card__face footer {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5a3a10;
  border-top: 2px dashed #c9b58a;
  padding-top: 10px;
}
.card__dl { margin: 0; display: grid; gap: 6px; }
.card__dl > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  border-bottom: 1px solid #c9b58a;
  padding: 5px 0;
  font-size: 20px;
}
.card__dl dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: #5a3a10;
}
.card__dl dd { margin: 0; font-family: var(--dex); }
.card__stamp {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--mint-deep);
  text-align: center;
  border: 2px solid var(--mint-deep);
  padding: 8px;
}

.slots {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}
.slot {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  background: #14261c;
  color: var(--cream);
  border: 2px solid #0a140f;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 #07110c;
}
.slot--go { color: var(--yellow); }
.slot:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: .7;
}

/* TALL GRASS */
.grass {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: end center;
  overflow: hidden;
}
.grass__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 60%;
}
.grass__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,17,12,.15) 0%, rgba(8,17,12,.82) 70%);
}
.grass__copy {
  position: relative;
  z-index: 2;
  width: min(560px, calc(100% - 36px));
  text-align: center;
  padding: 0 0 max(48px, env(safe-area-inset-bottom));
}
.grass__line {
  font-size: clamp(26px, 5vw, 42px);
  color: var(--cream);
  text-shadow: 0 8px 24px #000;
  margin-bottom: 22px;
}
.a-btn--enter { margin-bottom: 22px; }
.plate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, #8d9490, #4a514c);
  color: #111;
  border-radius: 4px;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 #c5ccc8,
    0 6px 0 #1a1e1c;
}
.plate strong { font-weight: 400; }

/* mobile */
@media (max-width: 820px) {
  .dex-grid { grid-template-columns: 1fr; }
  .fight-grid { grid-template-columns: 1fr; }
  .fight-top { grid-template-columns: 1fr 110px; min-height: 140px; }
  .fight-sil { width: 110px; height: 110px; }
  .card__body { grid-template-columns: 96px 1fr; }
  .card__body img { width: 96px; height: 96px; }
  .boot-lid { padding: 2px 8px 10px; }
  .boot-lid__model { display: none; }
  .file > div { grid-template-columns: 78px 1fr; }
  .stats li { grid-template-columns: 1fr; }
  .evo-scene { width: 1600px; height: 68vh; padding: 24px 28px 64px; }
  .station figure { width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .boot-sil, .a-btn, .card__flip, .sprite-reel, .fight-sil, .move {
    animation: none !important;
    transition: none !important;
  }
  .scanlines, .cheek-pulse { display: none; }
  body.powered .curve__line { stroke-dashoffset: 0; animation: none; }
}
