:root {
  --bg: #06101d;
  --panel: #111925;
  --panel-2: #1b1728;
  --stone: #343441;
  --line: #05070d;
  --gold: #ffc94b;
  --cyan: #65d9ff;
  --green: #87bc45;
  --purple: #8d66b6;
  --text: #fff0c8;
  --muted: #9fb2c0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 201, 75, .1), transparent 22rem),
    radial-gradient(circle at 85% 28%, rgba(101, 217, 255, .12), transparent 24rem),
    linear-gradient(180deg, #040912, var(--bg) 55%, #02050b);
  font-family: "MS Gothic", "Yu Gothic", ui-monospace, monospace;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: .35;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.035) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  opacity: .32;
}

.shell {
  width: min(1760px, calc(100vw - 28px));
  min-height: 92vh;
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
  gap: 16px;
}

.side-menu,
.main-panel,
.news-panel,
.content-band,
.controls,
.characters,
.screens,
.items,
footer {
  border: 6px solid var(--line);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.08), 0 12px 0 rgba(0,0,0,.45);
  image-rendering: pixelated;
}

.side-menu {
  align-self: start;
  position: sticky;
  top: 14px;
  padding: 16px;
  background: linear-gradient(180deg, #27303d, #111720);
}

.lamp {
  height: 118px;
  margin-bottom: 16px;
  border: 5px solid #07090f;
  display: grid;
  place-items: center;
  padding: 6px;
  background: linear-gradient(180deg, #31333f, #10141d);
  box-shadow: inset 0 0 24px rgba(255, 177, 58, .16);
  overflow: hidden;
}

.lamp img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 5px 0 #05070d) drop-shadow(0 0 8px rgba(255, 214, 89, .22));
}

.nav-item {
  width: 100%;
  min-height: 58px;
  margin: 0 0 10px;
  border: 4px solid #05070d;
  color: var(--text);
  background: #171d26;
  box-shadow: inset 0 -8px rgba(0,0,0,.28), inset 0 3px rgba(255,255,255,.08);
  font: 800 18px/1 "MS Gothic", ui-monospace, monospace;
  text-align: left;
  cursor: pointer;
}

.nav-item span {
  display: inline-grid;
  place-items: center;
  width: 40px;
  color: var(--gold);
}

.nav-item.active,
.nav-item:hover {
  background: #3b294b;
  color: #fff7d6;
}

.main-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 92vh;
  background: #080c14;
  overflow: hidden;
}

.hero-frame {
  position: relative;
  min-height: clamp(500px, calc(92vh - 132px), 700px);
  border-bottom: 6px solid #05070d;
  background: #050912;
  overflow: hidden;
}

.stage,
.stage-bg {
  position: absolute;
  inset: 0;
}

.stage-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-showdown {
  position: absolute;
  z-index: 4;
  left: 9%;
  right: 7%;
  bottom: 8%;
  height: 42%;
  pointer-events: none;
}

.hero-kazuma-fighting,
.hero-matchan-shadow {
  position: absolute;
  bottom: 0;
  object-fit: contain;
  image-rendering: auto;
}

.hero-kazuma-fighting {
  left: 0;
  width: clamp(150px, 18vw, 280px);
  filter: drop-shadow(8px 8px 0 rgba(0,0,0,.72)) drop-shadow(0 0 16px rgba(255, 211, 106, .28));
  animation: hero-ready 1.15s steps(2) infinite;
}

.hero-matchan-shadow {
  right: 0;
  width: clamp(150px, 19vw, 295px);
  padding: 10px;
  background: radial-gradient(circle at 50% 47%, rgba(225, 224, 210, .85) 0 44%, rgba(90, 97, 104, .42) 45% 70%, transparent 71%);
  filter: drop-shadow(-8px 8px 0 rgba(0,0,0,.72)) drop-shadow(0 0 22px rgba(141, 102, 182, .56));
  animation: boss-ready 1.5s steps(2) infinite;
}

.sprite {
  position: absolute;
  z-index: 4;
  object-fit: contain;
  filter: drop-shadow(0 8px 0 rgba(0,0,0,.7));
}

.speech {
  position: absolute;
  z-index: 5;
  left: 20px;
  bottom: 18px;
  padding: 10px 16px;
  color: #8feaff;
  background: rgba(3, 9, 16, .75);
  border: 4px solid #05070d;
  font-size: clamp(15px, 1.6vw, 24px);
  font-weight: 800;
}

.cta-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #101620, #080d14);
}

.big-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 88px;
  padding: 10px;
  border: 6px solid #05070d;
  color: white;
  text-decoration: none;
  font-size: clamp(18px, 2.2vw, 34px);
  font-weight: 900;
  text-shadow: 4px 4px #05070d;
  box-shadow: inset 0 -12px rgba(0,0,0,.25), inset 0 4px rgba(255,255,255,.18);
}

.play { background: #d99222; }
.levels { background: #527b2c; }
.diary { background: #5c3e71; }
.down { background: #247ca3; }

.big-button:hover {
  transform: translateY(-3px);
}

.news-panel {
  align-self: start;
  position: sticky;
  top: 14px;
  padding: 18px;
  background: linear-gradient(180deg, #202431, #111520);
}

.news-panel h2,
.characters h2,
.screens h2 {
  margin: 0 0 16px;
  color: #8feaff;
  font-size: 26px;
}

.news-panel article {
  padding: 14px 0;
  border-top: 3px dashed rgba(255,255,255,.22);
}

.news-panel strong {
  color: #ffdf5b;
  font-size: 18px;
}

.news-panel p {
  margin: 8px 0;
  color: #f4e8c9;
  line-height: 1.55;
}

time {
  color: #6ed3de;
  font-weight: 900;
}

.diary-button {
  width: 100%;
  min-height: 58px;
  margin-top: 14px;
  border: 5px solid #05070d;
  color: white;
  background: #2b7891;
  font: 900 18px/1 "MS Gothic", ui-monospace, monospace;
  cursor: pointer;
}

.content-band,
.controls,
.characters,
.screens,
.items,
footer {
  width: min(1480px, calc(100vw - 28px));
  margin: 26px auto;
  background: rgba(14, 20, 30, .96);
}

.content-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: center;
  padding: 32px;
}

.content-band h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.5vw, 64px);
  line-height: 1.05;
}

.content-band p,
.stage-notes p,
.stage-notes li,
.character-card p {
  color: #d7e2df;
  line-height: 1.75;
}

.content-band img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(141, 102, 182, .55));
}

.controls {
  padding: 30px;
  background: rgba(16, 22, 32, .96);
}

.controls h2,
.items h2 {
  margin: 0 0 16px;
  color: #8feaff;
  font-size: 28px;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.control-grid div {
  min-height: 86px;
  padding: 14px;
  border: 5px solid #05070d;
  background: #171d27;
  box-shadow: inset 0 -10px rgba(0,0,0,.28), inset 0 3px rgba(255,255,255,.08);
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 32px;
  margin: 0 6px 8px 0;
  padding: 4px 9px;
  color: #fff;
  background: #2a3140;
  border: 3px solid #05070d;
  box-shadow: inset 0 -5px rgba(0,0,0,.32);
  font: 900 16px/1 "MS Gothic", ui-monospace, monospace;
}

.control-grid span {
  display: block;
  color: #d7e2df;
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 8px;
  color: #73d7ff;
  font-weight: 900;
  text-transform: uppercase;
}

.characters {
  padding: 30px;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.character-card {
  min-height: 360px;
  padding: 18px;
  border: 5px solid #05070d;
  background: #171d27;
  box-shadow: inset 0 -12px rgba(0,0,0,.28), inset 0 4px rgba(255,255,255,.08);
}

.character-card img {
  width: 100%;
  height: 170px;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 8px 0 rgba(0,0,0,.55));
}

.character-card img.silhouette-character {
  filter: brightness(0) contrast(1.35) drop-shadow(0 0 18px rgba(141, 102, 182, .55)) drop-shadow(0 8px 0 rgba(0,0,0,.65));
  opacity: .9;
}

.character-card img.mystery-silhouette {
  width: min(170px, 72%);
  padding: 10px;
  background:
    radial-gradient(circle at 50% 44%, #e0dfd2 0 42%, #858b8d 43% 67%, #353b44 68% 100%);
  border: 4px solid #05070d;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.1);
  filter: drop-shadow(0 0 18px rgba(141, 102, 182, .55)) drop-shadow(0 8px 0 rgba(0,0,0,.65));
}

.character-card h3 {
  margin: 14px 0 8px;
  color: #ffdf5b;
  font-size: 24px;
}

.screens {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 24px;
  padding: 30px;
}

.items {
  padding: 30px;
  background: rgba(14, 20, 30, .96);
}

.item-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.item-row article {
  min-height: 250px;
  padding: 16px;
  border: 5px solid #05070d;
  background: #171d27;
  box-shadow: inset 0 -12px rgba(0,0,0,.28), inset 0 4px rgba(255,255,255,.08);
}

.item-row img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 8px 0 rgba(0,0,0,.52));
}

.item-row h3 {
  margin: 14px 0 8px;
  color: #ffdf5b;
  font-size: 20px;
}

.item-row p {
  color: #d7e2df;
  line-height: 1.65;
}

.screenshot {
  min-height: 360px;
  border: 5px solid #05070d;
  background: #070b12;
  overflow: hidden;
}

.screenshot img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.stage-notes ul {
  margin: 18px 0 0;
  padding-left: 1.2rem;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  color: #77d4e3;
  background: #070b12;
}

@keyframes hero-ready {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px) rotate(-2deg); }
}

@keyframes boss-ready {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .side-menu,
  .news-panel {
    position: static;
  }

  .side-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .lamp {
    grid-column: 1 / -1;
    height: 110px;
    margin-bottom: 0;
  }

  .nav-item {
    margin: 0;
    text-align: center;
  }

  .news-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .news-panel h2,
  .diary-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .shell,
  .content-band,
  .characters,
  .screens,
  footer {
    width: min(100vw - 16px, 760px);
  }

  .hero-frame {
    min-height: 560px;
  }

  .side-menu,
  .news-panel,
  .cta-row,
  .content-band,
  .control-grid,
  .character-grid,
  .screens,
  .item-row,
  footer {
    grid-template-columns: 1fr;
  }

  .character-card {
    min-height: auto;
  }

  .hero-showdown {
    left: 5%;
    right: 5%;
    bottom: 12%;
    height: 34%;
  }

  .hero-kazuma-fighting {
    width: clamp(122px, 32vw, 180px);
  }

  .hero-matchan-shadow {
    width: clamp(132px, 34vw, 190px);
  }

}
