:root {
  color-scheme: dark;
  font-family: "Segoe UI", "Yu Gothic UI", Meiryo, sans-serif;
  background: #05070c;
  color: #f5fbff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(37, 165, 194, 0.2), transparent 24rem),
    radial-gradient(circle at 84% 82%, rgba(217, 69, 139, 0.16), transparent 28rem),
    #04070d;
}

.shell {
  display: grid;
  grid-template-columns: minmax(280px, 540px) 200px;
  gap: 20px;
  width: min(94vw, 806px);
  align-items: start;
}

.game-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  width: 100%;
  border: 1px solid rgba(129, 224, 255, 0.35);
  border-radius: 8px;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 28px rgba(54, 209, 255, 0.18);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 34px;
  text-align: center;
  background: linear-gradient(180deg, rgba(4, 8, 18, 0.58), rgba(4, 8, 18, 0.86));
}

.overlay.hidden {
  display: none;
}

.overlay h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 4.7rem);
  line-height: 0.92;
  letter-spacing: 0;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(77, 218, 255, 0.75);
}

.overlay p {
  max-width: 25rem;
  margin: 0;
  color: #d8edf5;
  line-height: 1.7;
}

button {
  min-width: 128px;
  min-height: 44px;
  border: 1px solid rgba(157, 235, 255, 0.72);
  border-radius: 6px;
  background: #ecfbff;
  color: #061018;
  font-weight: 800;
  cursor: pointer;
}

.panel {
  display: grid;
  gap: 10px;
}

.panel > div {
  border: 1px solid rgba(151, 219, 255, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(8, 16, 30, 0.72);
}

.panel span,
.panel strong {
  display: block;
}

.panel span {
  color: #8bb5c7;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.panel strong {
  margin-top: 4px;
  font-size: 1.2rem;
}

.hp-bar {
  height: 10px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.hp-bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #75ffd0;
  transition: width 120ms linear, background-color 120ms linear;
}



@media (max-width: 720px) {
  body {
    align-items: start;
    padding: 10px 0;
  }

  .shell {
    grid-template-columns: 1fr;
    width: min(96vw, 480px);
  }

  .panel {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .panel > div {
    min-width: 0;
    padding: 8px;
  }

  .panel strong {
    font-size: 1rem;
  }
}

.credit {
  margin: 2px 0 0;
  color: #8bb5c7;
  font-size: 0.72rem;
}

.credit a {
  color: #bff4ff;
}
.dev-tools {
  position: fixed;
  left: 50%;
  bottom: 8px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: min(96vw, 720px);
  padding: 6px;
  border: 1px dashed rgba(255, 151, 235, 0.42);
  border-radius: 8px;
  background: rgba(18, 5, 24, 0.86);
  transform: translateX(-50%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dev-tools[hidden] {
  display: none;
}

.dev-tools span {
  color: #ffb2f1;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dev-tools button,
.dev-stage-select select {
  min-width: 0;
  min-height: 30px;
  border-color: rgba(255, 151, 235, 0.55);
  background: rgba(255, 242, 253, 0.92);
  font-size: 0.78rem;
}

.dev-stage-select {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
}

.dev-stage-select span {
  color: #ffb2f1;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dev-stage-select select {
  width: 84px;
  padding: 0 22px 0 8px;
  color: #020712;
  font-family: inherit;
  font-weight: 900;
  border-style: solid;
  border-width: 1px;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
}

.dev-stage-select select:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 151, 235, 0.5), 0 0 18px rgba(255, 151, 235, 0.35);
}
@media (max-width: 720px) {
  .dev-tools {
    overflow-x: auto;
    justify-content: flex-start;
  }
}
.casualty-panel {
  border: 1px solid rgba(255, 213, 112, 0.34);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(35, 22, 6, 0.72), rgba(8, 16, 30, 0.78));
  min-height: 188px;
  box-shadow: inset 0 0 20px rgba(255, 185, 72, 0.08);
}

.casualty-panel > span,
.casualty-panel > strong {
  display: block;
}

.casualty-panel > span {
  color: #ffd570;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.casualty-panel > strong {
  margin-top: 3px;
  color: #fff8d0;
  font-size: 1rem;
}

.casualty-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 213, 112, 0.24);
  background: rgba(0, 0, 0, 0.28);
}

.casualty-stats b {
  color: #fff3b4;
  font-size: 0.78rem;
  line-height: 1.25;
}

.casualty-feed {
  display: grid;
  gap: 6px;
  margin-top: 9px;
  max-height: 136px;
  overflow: hidden;
}

.casualty-feed.full {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.casualty-feed p {
  margin: 0;
  padding: 6px 7px;
  border-left: 3px solid rgba(255, 213, 112, 0.55);
  background: rgba(0, 0, 0, 0.24);
  color: #f6e6c8;
  font-size: 0.69rem;
  line-height: 1.35;
}

.casualty-feed p:first-child {
  border-left-color: #fffbad;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 214, 112, 0.5);
}

.casualty-feed p.shock {
  border-left-color: #9df8ff;
  color: #dffcff;
  background: rgba(34, 111, 128, 0.22);
}

.casualty-feed p.summary {
  border-left-color: #ffd570;
  color: #fff8d0;
  background: rgba(95, 70, 22, 0.24);
}

.casualty-feed p.capture {
  border-left-color: #ff8bd8;
  color: #ffe3fb;
  background: rgba(120, 33, 100, 0.25);
}

.casualty-feed p.empty {
  color: #9fb2bd;
  border-left-color: rgba(143, 246, 255, 0.32);
}



@media (max-width: 720px) {
  .casualty-panel,
  .credit {
    grid-column: 1 / -1;
  }
}











/* 尋問中は左のゲーム表示全体を撃墜速報パネル下端まで広げる */
@media (min-width: 721px) {
  body.interrogation-layout .game-wrap {
    aspect-ratio: 2 / 3.38;
  }
}
.demo-clear-actions {
  display: grid;
  width: min(100%, 18rem);
  gap: 10px;
}

.demo-clear-actions button {
  width: 100%;
}