:root {
  --cabinet: #07070b;
  --bezel: #16141c;
  --sand: #d6a84a;
  --sand-deep: #8a5a18;
  --cave: #123a44;
  --water: #071920;
  --teal: #2f9aa3;
  --carpet: #c11d32;
  --carpet-dark: #7a1020;
  --gold: #f0d024;
  --hp: #e42b2b;
  --gi: #f3eee3;
  --ink: #f6edd4;
  --muted: #cbb98a;
  --pixel: 4px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #000; color: var(--ink); }
html { scroll-behavior: smooth; }

body {
  font-family: "VT323", "Courier New", monospace;
  font-size: 22px;
  line-height: 1.25;
  min-height: 100dvh;
}

img { max-width: 100%; display: block; }
a { color: var(--gold); }
h1, h2, h3, .hud, .btn, .coin, .winner figcaption,
.special__tag, .continue__timer, .select__foot {
  font-family: "Press Start 2P", "VT323", monospace;
  font-weight: 400;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--gold);
  color: #111;
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { left: 8px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.cabinet {
  max-width: 1120px;
  margin: 0 auto;
  background: var(--cabinet);
  border-left: 18px solid #1a171f;
  border-right: 18px solid #1a171f;
  box-shadow:
    inset 12px 0 0 #0c0b10,
    inset -12px 0 0 #0c0b10,
    0 0 0 8px #2a2418,
    0 0 0 12px #c9a227;
  position: relative;
}

.hud {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px 12px;
  background: linear-gradient(#0b0b10, #07070b);
  font-size: 10px;
  letter-spacing: 1px;
  border-bottom: var(--pixel) solid #c9a227;
}

.hud__p span { color: var(--gold); }
.hud__hp {
  height: 14px;
  background: #2a1010;
  border: 2px solid #fff;
  display: flex;
  overflow: hidden;
}
.hud__hp i {
  flex: 1;
  background: var(--hp);
  box-shadow: inset 0 -2px 0 #8e1212;
}
.hud__hp i:nth-child(n+7) { background: #f0d024; box-shadow: inset 0 -2px 0 #8a6a00; }
.hud__ko {
  background: #fff;
  color: #c11d32;
  padding: 4px 6px;
  font-size: 9px;
}
.hud__title { color: var(--gold); }
.hud__city { color: #8ee0e4; }
.hud__bgm {
  font: inherit;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 1px;
  color: #8ee0e4;
  background: transparent;
  border: 2px solid #8ee0e4;
  padding: 5px 6px;
  cursor: pointer;
}
.hud__bgm.is-on {
  color: #16110a;
  background: var(--gold);
  border-color: #fff;
}

.attract {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(200px, 280px);
  grid-template-rows: 1fr auto;
  gap: 12px 16px;
  min-height: calc(100dvh - 48px);
  padding: 28px 24px 32px;
  overflow: hidden;
  isolation: isolate;
  align-items: end;
}

.arena {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  z-index: 0;
}
.arena,
.arena__sky,
.arena__mist,
.arena__rocks,
.arena__carpet {
  position: absolute;
  inset: 0;
}

.arena__sky {
  background:
    linear-gradient(#1b7480 0%, #0e4450 38%, #0a2a34 62%, #07141a 100%);
}

.arena__mist {
  background:
    radial-gradient(ellipse at 50% 70%, rgba(47, 154, 163, .28), transparent 55%),
    radial-gradient(ellipse at 80% 40%, rgba(214, 168, 74, .18), transparent 40%);
}

.arena__tiger {
  position: absolute;
  width: min(58%, 520px);
  height: auto;
  left: 50%;
  top: 14%;
  transform: translateX(-50%);
  opacity: .35;
  image-rendering: pixelated;
}

.arena__rocks {
  background:
    linear-gradient(var(--sand-deep), var(--sand-deep)) 0 72% / 22% 28% no-repeat,
    linear-gradient(#6e4414, #6e4414) 10% 68% / 18% 18% no-repeat,
    linear-gradient(#b88938, #b88938) 78% 70% / 26% 32% no-repeat,
    linear-gradient(#5a3810, #5a3810) 88% 64% / 16% 22% no-repeat,
    linear-gradient(#2a6d74, #2a6d74) -8% 40% / 28% 44% no-repeat,
    linear-gradient(#164850, #164850) 92% 30% / 24% 50% no-repeat;
}

.arena__carpet {
  top: auto;
  height: 28%;
  background:
    repeating-linear-gradient(90deg, var(--carpet) 0 28px, var(--carpet-dark) 28px 32px);
  border-top: 6px solid #e8c36a;
  box-shadow: inset 0 12px 0 rgba(0,0,0,.18);
}
.arena__carpet span {
  position: absolute;
  top: 28%;
  width: 72px;
  height: 10px;
  background: #e8c36a;
}
.arena__carpet span:nth-child(1) { left: 12%; }
.arena__carpet span:nth-child(2) { left: 46%; }
.arena__carpet span:nth-child(3) { left: 78%; }

.fighter-stage {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  align-self: end;
  background: transparent;
  z-index: 2;
}

.fighter {
  display: block;
  width: min(220px, 100%);
  height: auto;
  background: transparent;
  image-rendering: auto;
  filter: drop-shadow(4px 6px 0 #000);
  transform-origin: 50% 100%;
  animation: idle-stance 0.5s steps(1) infinite;
}

@keyframes idle-stance {
  0%, 49% { transform: translate(0, 0); }
  50%, 100% { transform: translate(8px, 0); }
}

.winner {
  position: relative;
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  width: 100%;
  margin: 0;
  z-index: 2;
  background: #0b0b10;
  border: 4px solid #f3eee3;
  box-shadow: 8px 8px 0 #000, 0 0 0 8px #c9a227;
}
.winner__frame {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111;
}
.winner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  image-rendering: auto;
}
.winner figcaption {
  margin: 0;
  padding: 8px 6px;
  text-align: center;
  font-size: 9px;
  color: var(--gold);
  background: #111;
}

.attract__copy {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: end;
  width: min(100%, 560px);
  margin-bottom: 8%;
  padding: 16px 14px 18px;
  text-align: center;
  z-index: 3;
  background: rgba(7, 7, 11, .88);
  border: 4px solid #c9a227;
  box-shadow: 6px 6px 0 #000;
}

.coin {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 11px;
  animation: blink 1.1s steps(1) infinite;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(16px, 3vw, 28px);
  line-height: 1.35;
  color: #fff;
}

.slogan {
  margin: 0 0 10px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(10px, 1.7vw, 13px);
  line-height: 1.55;
  color: var(--gold);
}

.lead {
  margin: 0 auto 18px;
  max-width: 34em;
  font-size: 24px;
  color: var(--gi);
}

.btn {
  display: inline-block;
  position: relative;
  z-index: 4;
  background: var(--gold);
  color: #16110a;
  text-decoration: none;
  padding: 14px 16px;
  font-size: 11px;
  line-height: 1.4;
  border: 4px solid #fff;
  box-shadow: 0 0 0 4px #16110a, 6px 6px 0 #000;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible {
  outline: 4px solid #8ee0e4;
  outline-offset: 4px;
}

.data, .select, .special, .continue, .foot {
  position: relative;
  z-index: 1;
}

.data {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px 28px;
  padding: 36px 28px 28px;
  background:
    repeating-linear-gradient(0deg, #0c0c12 0 8px, #101018 8px 16px);
  border-top: 4px solid #c9a227;
}

.portrait {
  margin: 0;
  align-self: start;
}
.portrait img {
  width: 100%;
  display: block;
}

.sheet { margin: 0; }
.sheet div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 2px dotted #5a4a28;
  font-size: 24px;
}
.sheet dt { color: var(--muted); }
.sheet dd { margin: 0; color: #fff; }
.data__note {
  grid-column: 2;
  margin: 0;
  color: var(--gi);
  max-width: 42em;
}

.offer {
  padding: 36px 24px 8px;
  background: #0a1214;
  text-align: center;
}
.offer h2 {
  margin: 0 0 16px;
  font-size: clamp(14px, 2.4vw, 22px);
  color: var(--gold);
  line-height: 1.45;
}
.offer p {
  margin: 0 auto;
  max-width: 40em;
  font-size: 26px;
  color: var(--gi);
}

.select {
  padding: 32px 24px 36px;
  background: #0a1214;
  text-align: center;
}
.select h2 {
  margin: 0 0 22px;
  font-size: clamp(12px, 2vw, 16px);
  color: var(--gold);
  line-height: 1.5;
  scroll-margin-top: 72px;
}

.slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.slots > li { margin: 0; }
.slot {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  height: 100%;
  background: #071016;
  border: 4px solid #3a2f1c;
  padding: 12px 10px 16px;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.slot:hover,
.slot:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px #16110a;
}
.slot.is-on {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px #16110a, inset 0 0 0 3px var(--gold);
  background: #142018;
}
.slot__sprite {
  margin: 0 auto 10px;
  image-rendering: auto;
  display: block;
  width: auto;
  object-fit: contain;
  object-position: center bottom;
}
.slot__sprite--kid { height: 140px; }
.slot__sprite--teen { height: 180px; }
.slot__sprite--adult { height: 230px; }
.slot h3 {
  margin: 0 0 8px;
  font-size: 12px;
  color: #fff;
  line-height: 1.4;
}
.slot p {
  margin: 0;
  color: var(--gi);
  font-size: 22px;
}
.select__foot {
  margin: 22px 0 0;
  font-size: 10px;
  color: #8ee0e4;
  line-height: 1.5;
}

.special {
  padding: 40px 24px;
  background:
    linear-gradient(180deg, #4a140f, #1a0708 40%, #0b0506);
  text-align: center;
}
.special__tag {
  margin: 0 0 10px;
  font-size: 10px;
  color: #ffb4b4;
}
.special h2 {
  margin: 0 0 22px;
  font-size: clamp(14px, 2.6vw, 26px);
  color: var(--gold);
  text-shadow: 4px 4px 0 #000;
  line-height: 1.45;
}
.special__art {
  display: flex;
  justify-content: center;
  align-items: end;
  gap: 12px;
  margin: 0 auto 22px;
  max-width: 720px;
  background: transparent;
}
.special__art img {
  width: 260px;
  height: 260px;
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  image-rendering: auto;
  filter: drop-shadow(4px 4px 0 #000);
}
.inputs {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 720px;
  text-align: left;
}
.inputs li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 2px solid rgba(240, 208, 36, .2);
  font-size: 24px;
}
.inputs kbd {
  font-family: "Press Start 2P", monospace;
  font-size: 9px;
  color: var(--gold);
  background: #000;
  border: 2px solid var(--gold);
  padding: 8px 6px;
  text-align: center;
}

.continue {
  min-height: 52dvh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 12px;
  padding: 48px 20px;
  background: #000;
}
.continue__timer {
  margin: 0;
  font-size: 64px;
  color: var(--hp);
}
.continue__face {
  width: min(280px, 70vw);
  height: auto;
  margin: 0 auto;
  image-rendering: auto;
  border: 4px solid var(--gold);
}
.continue h2 {
  margin: 0;
  font-size: clamp(22px, 5vw, 42px);
  color: #fff;
  scroll-margin-top: 72px;
}
.continue p { margin: 0 0 8px; font-size: 26px; }

.lead {
  width: min(460px, 100%);
  margin: 4px auto 0;
  text-align: left;
  display: grid;
  gap: 12px;
}
.lead__field {
  display: grid;
  gap: 4px;
}
.lead__field span,
.lead__who legend {
  color: var(--gold);
  font-size: 20px;
}
.lead input[type="text"],
.lead input[type="tel"] {
  font: inherit;
  font-size: 26px;
  color: var(--ink);
  background: #111;
  border: 4px solid var(--gold);
  padding: 8px 10px;
  width: 100%;
}
.lead__who {
  margin: 0;
  padding: 8px 12px 12px;
  border: 4px solid #3a2f1c;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.lead__who label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.lead .btn {
  justify-self: center;
  font-family: "Press Start 2P", "VT323", monospace;
  font-size: 16px;
}
.lead__note {
  margin: 0;
  text-align: center;
  color: #8ee0e4;
}
.lead__or {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 22px;
}
.contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 10px 0 0;
}
.contacts a {
  color: var(--gold);
  text-decoration: none;
}
.contacts a:hover,
.contacts a:focus-visible {
  text-decoration: underline;
}

.foot {
  padding: 18px 16px 28px;
  text-align: center;
  font-size: 20px;
  color: var(--muted);
  background: #07070b;
  border-top: 4px solid #2a2418;
}
.foot p { margin: 6px 0; }
.foot .btn {
  margin: 0 0 16px;
  font-size: 14px;
}
.foot a { text-decoration: none; }

.scan {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,.14) 0 1px,
    transparent 1px 3px
  );
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.stub {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 16px;
  padding: 32px 16px;
  background: #07070b;
}
.stub h1 {
  margin: 0;
  font-size: clamp(16px, 3vw, 28px);
  color: var(--gold);
}
.stub p {
  margin: 0;
  font-size: 28px;
}
.stub .btn { justify-self: center; font-size: 14px; }

@media (max-width: 860px) {
  .cabinet { border-left-width: 8px; border-right-width: 8px; }
  .hud {
    grid-template-columns: auto 1fr auto;
    font-size: 8px;
  }
  .hud__hp, .hud__ko, .hud__title { display: none; }
  .attract {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: auto;
    padding: 16px 12px 24px;
    justify-items: center;
  }
  .fighter-stage {
    grid-column: 1;
    grid-row: auto;
    margin-top: 8px;
    order: 1;
  }
  .fighter {
    width: min(200px, 70vw);
  }
  .winner { display: none; }
  .attract__copy {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    margin: 8px 0 0;
    order: 3;
  }
  .data { grid-template-columns: 1fr; padding: 24px 16px; }
  .portrait { grid-row: auto; width: min(100%, 280px); margin: 0 auto; }
  .sheet div { grid-template-columns: 1fr; gap: 2px; }
  .data__note { grid-column: 1; }
  .slots { grid-template-columns: 1fr; }
  .inputs li { grid-template-columns: 1fr; }
  .special__art {
    flex-direction: column;
    align-items: center;
  }
  .special__art img {
    width: min(260px, 100%);
    height: auto;
    aspect-ratio: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .coin, .fighter { animation: none !important; }
  html { scroll-behavior: auto; }
}
