* { box-sizing: border-box; }
:root { color-scheme: dark; background: #151329; color: #f4efff; font-family: system-ui, sans-serif; line-height: 1.6; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 15% 0, #36294e, transparent 60%); }
main { width: min(100% - 2rem, 63rem); margin: auto; padding: 1.25rem 0 2rem; }
header { margin-bottom: 1.2rem; }
.back { color: #d2c6f6; text-underline-offset: .25em; }
h1 { margin: .15rem 0; font-size: clamp(2rem, 6vw, 3.6rem); letter-spacing: -.06em; line-height: 1.2; }
p { color: #d5cfe4; margin: .35rem 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(1rem, 4vw, 3.5rem); align-items: start; }
.play { background: #201d37; border: 1px solid #52486f; border-radius: .95rem; padding: .85rem; }
dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin: 0 0 .65rem; }
dl div { padding: .3rem .1rem; text-align: center; background: #2e2747; border-radius: .4rem; }
dt { font-size: .8rem; color: #ded0f3; }
dd { margin: 0; font-size: 1.14rem; font-weight: 800; font-variant-numeric: tabular-nums; }
canvas { display: block; width: min(100%, 440px, max(15rem, 80svh - 8rem)); height: auto; margin: auto; border: 1px solid #9280be; border-radius: .6rem; touch-action: none; background: #09081b url("nebula.jpg") center / cover no-repeat; }
.controls { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .8rem; margin-top: .7rem; }
.controls p { font-size: .86rem; }
button { min-height: 44px; padding: .4rem 1rem; border: 0; border-radius: .45rem; background: #dfcaff; color: #2a1742; font: 750 1rem system-ui; cursor: pointer; }
button:hover { background: #f0dfff; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.guide { padding: 1rem 0; }
.guide h2, .guide h3 { margin: 0 0 .55rem; }
.guide h3 { font-size: 1rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid #564c6c; }
.guide p + p { margin-top: .8rem; }
.guide ul { list-style: none; margin: .75rem 0 0; padding: 0; }
.guide li { display: grid; grid-template-columns: 2rem 1fr auto; gap: .6rem; align-items: center; padding: .4rem 0; }
.guide li span:first-child { text-align: center; border-radius: .3rem; font-weight: 800; color: #211933; }
.guide li span:last-child { color: #d5cfe4; font-size: .9rem; }
.wide { background: #d7b6ff; }
.slow { background: #a2e5ff; }
.life { background: #a9f0c4; }
@media (max-width: 44rem) {
  main { max-width: 31rem; }
  .layout { grid-template-columns: 1fr; gap: .7rem; }
  .guide { padding: .8rem .25rem; }
}
#sound { float:right; min-width:7rem; margin:.25rem 0 .3rem .5rem; background:#302747; color:#f4eaff; border:1px solid #756590; font-size:.9rem; }
#sound:hover { background:#46385f; }
#sound[aria-pressed="false"] { color:#c7bed5; }
body { background: radial-gradient(ellipse at 20% 0, #233b5c, #101423 62%); }
.play {
  background: #101a2b;
  border-color: #5b799c;
  border-radius: .45rem;
  box-shadow: inset 0 2px #95add74d, 0 8px 0 #090d18;
}
dl div {
  background: #080f1b;
  border: 1px solid #354d65;
  border-radius: .2rem;
}
dd { color: #ffdc82; font-family: ui-monospace, Consolas, monospace; }
canvas {
  border: 3px ridge #7591b7;
  border-radius: .2rem;
  background:
    repeating-linear-gradient(0deg, #02061930 0 1px, transparent 1px 4px),
    linear-gradient(145deg, #0b1933ea, #060c20e8),
    url("nebula.jpg") center / cover;
}
#action { background: #ffd374; border-radius: .2rem; color: #221705; box-shadow: inset 0 -3px #ce924d; }
#action:hover { background: #ffe6a2; }
