* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  background: #07061a;
  color: #f4e8ff;
  font-family: "Segoe UI", system-ui, sans-serif;
  touch-action: manipulation;
}
.shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.75rem 0.75rem 1.25rem;
}
header { text-align: center; position: relative; margin-bottom: 0.4rem; }
h1 {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: #ffe27a;
  text-shadow: 0 0 18px rgba(255, 180, 40, 0.35);
}
.tagline { color: #b89ad4; font-size: 0.8rem; margin-top: 0.2rem; }
.back {
  position: absolute;
  left: 0;
  top: 0.2rem;
  color: #9ad4ff;
  text-decoration: none;
  font-size: 0.85rem;
}
.hud {
  display: flex;
  justify-content: space-between;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  color: #d7c2ff;
  margin: 0.4rem 0;
}
.hud strong { color: #fff36a; }
.stage {
  position: relative;
  line-height: 0;
  border: 2px solid #6b3480;
  box-shadow: 0 0 40px rgba(140, 60, 180, 0.25);
  background: #000;
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(8, 4, 20, 0.62);
  text-align: center;
  padding: 1rem;
  line-height: 1.4;
}
.overlay.hidden { display: none; }
.overlay h2 {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  letter-spacing: 0.14em;
  color: #ffe27a;
  margin-bottom: 0.6rem;
}
.overlay p { color: #e0d0ff; max-width: 28rem; margin-bottom: 0.85rem; }
.keys {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 1.1rem;
  font-size: 0.82rem;
  color: #d7c2ff;
}
.keys li {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.keys em { font-style: normal; color: #ffe27a; margin-left: 0.15rem; }
.keys span { color: #8e7aa8; font-size: 0.75rem; }
kbd {
  display: inline-block;
  min-width: 1.5rem;
  padding: 0.12rem 0.38rem;
  border: 1px solid #9ad4ff;
  border-bottom-width: 3px;
  border-radius: 5px;
  background: rgba(20, 28, 60, 0.9);
  color: #e8f6ff;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.3;
  text-align: center;
}
.keys-bar {
  margin: 0.65rem 0 0.15rem;
  padding: 0.55rem 0.6rem;
  background: rgba(18, 10, 40, 0.85);
  border: 1px solid rgba(154, 212, 255, 0.28);
  border-radius: 8px;
}
.keys-overlay {
  max-width: 34rem;
  padding: 0.7rem 0.85rem;
  background: rgba(8, 4, 24, 0.55);
  border: 1px solid rgba(255, 226, 122, 0.28);
  border-radius: 8px;
}
.touch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.hint { font-size: 0.75rem; color: #9b8ab8; text-align: center; flex: 1; }
.touch-btn {
  min-width: 96px;
  min-height: 64px;
  border: 2px solid #ffe27a;
  background: rgba(255, 226, 122, 0.12);
  color: #ffe27a;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 10px;
}
.touch-btn.fire {
  border-color: #7cff9a;
  color: #7cff9a;
  background: rgba(124, 255, 154, 0.1);
}
@media (min-width: 800px) {
  .touch-btn { min-height: 52px; }
}

.donate {
  position: absolute;
  right: 0;
  top: 0.2rem;
  color: #ff9ad4;
  text-decoration: none;
  font-size: 0.85rem;
}
.donate:hover { color: #ffc3e2; text-shadow: 0 0 10px rgba(255, 120, 190, 0.5); }
.donate-overlay {
  position: static;
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: #d48ac0;
}
