:root {
  color-scheme: dark;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #f0f4ff;
  background: #0a1020;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(ellipse at 50% 0%, #192843 0, transparent 65%);
}
.app {
  max-width: 1040px;
  padding: 18px 24px 12px;
  margin: auto;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #77e5d4;
  margin: 0 0 4px;
  font-weight: 700;
}
h1 {
  font-size: 32px;
  letter-spacing: -0.045em;
  margin: 0;
}
.session-label {
  text-align: right;
  font-size: 11px;
  margin: 0;
  color: #edf1ff;
  line-height: 1.6;
}
.session-label span {
  color: #8b9cba;
}
.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border: 1px solid #293955;
  border-radius: 11px;
  background: #111d32;
  padding: 10px 16px;
  margin-bottom: 12px;
}
.hud > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hud > div:nth-child(3) {
  align-items: center;
}
.hud > div:last-child {
  align-items: flex-end;
}
.hud > div:nth-child(2) {
  align-items: center;
}
.hud span {
  font-size: 8px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #90a5c8;
}
.hud strong {
  font-size: 18px;
  line-height: 1.15;
}
#score {
  color: #ffe68c;
}
.arena {
  width: min(100%, calc((100svh - 320px) * 1.9));
  margin: auto;
  position: relative;
  border: 1px solid #31415f;
  border-radius: 13px;
  overflow: hidden;
  background: #0c1424;
  box-shadow: 0 12px 30px #02061280;
}
#board {
  display: block;
  width: 100%;
  aspect-ratio: 19/10;
  touch-action: none;
  cursor: crosshair;
  outline: none;
}
#board:focus-visible {
  box-shadow: inset 0 0 0 3px #77e5d4;
}
#notice {
  position: absolute;
  left: 50%;
  top: 63%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 92%;
  padding: 10px 18px;
  border: 1px solid #30465e;
  border-radius: 10px;
  background: #102137ef;
  pointer-events: none;
  text-align: center;
}
#notice[hidden] {
  display: none;
}
#notice strong {
  font-size: 18px;
}
#notice span {
  font-size: 10px;
  color: #9bb1cf;
}
#combo {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translateX(-50%);
  color: #ffda7e;
  font-size: 22px;
  font-weight: 800;
  text-shadow: 0 2px 9px #000;
  pointer-events: none;
}
.controls {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin: 12px 0 8px;
}
button {
  font: inherit;
  font-size: 12px;
  border: 1px solid #314360;
  border-radius: 8px;
  color: #c6d5ef;
  background: #142239;
  padding: 10px 18px;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #77e5d4;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
#launch {
  background: #77e5d4;
  color: #122737;
  border-color: transparent;
  font-weight: 750;
  min-width: 142px;
}
#power-status {
  font-size: 10px;
  line-height: 1.4;
  margin: 0;
  text-align: center;
  color: #a9c2e4;
  min-height: 14px;
}
.instructions {
  font-size: 10px;
  line-height: 1.5;
  color: #8c9fbc;
  text-align: center;
  margin: 6px 0 5px;
}
details {
  font-size: 10px;
  line-height: 1.6;
  color: #a8b9d2;
  text-align: center;
}
summary {
  cursor: pointer;
  color: #bfcfe7;
  width: max-content;
  max-width: 100%;
  margin: auto;
}
details p {
  max-width: 760px;
  margin: 7px auto;
}
footer {
  font-size: 8px;
  text-align: center;
  color: #7287a7;
  margin-top: 9px;
}
footer a {
  color: #9fb7d9;
}
@media (max-width: 600px) {
  .app {
    padding: 15px 12px;
  }
  .eyebrow {
    font-size: 7px;
  }
  h1 {
    font-size: 28px;
  }
  header {
    margin-bottom: 12px;
  }
  .session-label {
    font-size: 9px;
  }
  .hud {
    padding: 10px;
    gap: 4px;
    margin-bottom: 12px;
  }
  .hud span {
    font-size: 7px;
    letter-spacing: 0.05em;
  }
  .hud strong {
    font-size: 16px;
  }
  .arena {
    width: 100%;
    border-radius: 9px;
  }
  .controls {
    gap: 7px;
    margin: 12px 0 9px;
  }
  button {
    padding: 10px 12px;
    font-size: 11px;
  }
  #launch {
    min-width: 126px;
  }
  #notice {
    padding: 7px 13px;
    gap: 4px;
  }
  #notice strong {
    font-size: 13px;
  }
  #notice span {
    font-size: 8px;
  }
  #combo {
    font-size: 15px;
  }
  .instructions {
    font-size: 9px;
    max-width: 340px;
    margin: 8px auto;
    line-height: 1.6;
  }
  details {
    font-size: 10px;
    line-height: 1.7;
  }
  footer {
    font-size: 8px;
    line-height: 1.6;
  }
  .app:has(details[open]) {
    padding-bottom: 16px;
  }
}
@media (min-width: 601px) and (max-height: 470px) {
  .app {
    padding: 8px 14px;
  }
  header {
    margin-bottom: 6px;
  }
  h1 {
    font-size: 24px;
  }
  .eyebrow {
    font-size: 7px;
  }
  .session-label {
    font-size: 9px;
  }
  .hud {
    padding: 6px 12px;
    margin-bottom: 7px;
  }
  .hud strong {
    font-size: 14px;
  }
  .hud span {
    font-size: 6px;
  }
  .arena {
    width: min(100%, calc((100svh - 230px) * 1.9));
    border-radius: 9px;
  }
  .controls {
    margin: 7px 0 5px;
  }
  button {
    padding: 7px 14px;
    font-size: 10px;
  }
  #notice strong {
    font-size: 13px;
  }
  #notice span {
    font-size: 8px;
  }
  #combo {
    font-size: 16px;
  }
  #power-status,
  .instructions,
  details {
    font-size: 8px;
    line-height: 1.3;
  }
  .instructions {
    margin: 4px 0;
  }
  footer {
    margin-top: 5px;
    font-size: 7px;
  }
}
