:root {
  --ink: #dff6ff;
  --teal: #7df6ff;
  --amber: #ffc46b;
  --deep: #050a12;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--deep);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

#stage {
  position: fixed;
  inset: 0;
  display: block;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 45%, rgba(6, 22, 38, 0.72), rgba(2, 6, 12, 0.92));
  backdrop-filter: blur(3px);
}

.overlay.hidden { display: none; }

.panel {
  width: min(560px, 100%);
  padding: 30px 30px 24px;
  border: 1px solid rgba(125, 246, 255, 0.35);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(9, 30, 46, 0.94), rgba(4, 12, 22, 0.96));
  box-shadow: 0 0 0 1px rgba(125, 246, 255, 0.08), 0 24px 70px rgba(0, 0, 0, 0.65), inset 0 0 60px rgba(125, 246, 255, 0.06);
  text-align: center;
}

.panel.compact { width: min(360px, 100%); }

.kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(125, 246, 255, 0.75);
}

h1, h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #eafaff;
  text-shadow: 0 0 22px rgba(125, 246, 255, 0.35);
}

h1 { font-size: clamp(26px, 5.2vw, 40px); }
h2 { font-size: clamp(24px, 4.4vw, 34px); }

h1 .colon { color: var(--amber); }

.tag {
  margin: 16px 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(223, 246, 255, 0.82);
}

.tag em { color: var(--teal); font-style: normal; }

.keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 18px;
  margin: 0 0 18px;
  text-align: left;
  font-size: 13px;
  color: rgba(223, 246, 255, 0.72);
}

.keys div { display: flex; flex-direction: column; gap: 4px; }

kbd {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid rgba(125, 246, 255, 0.35);
  border-radius: 3px;
  background: rgba(125, 246, 255, 0.08);
  font-family: inherit;
  font-size: 12px;
  color: var(--teal);
}

.keys span { font-size: 12px; opacity: 0.8; }

.brief {
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 196, 107, 0.85);
}

.cta {
  appearance: none;
  border: 1px solid var(--teal);
  border-radius: 3px;
  padding: 13px 34px;
  background: linear-gradient(180deg, rgba(125, 246, 255, 0.22), rgba(125, 246, 255, 0.06));
  color: #eafaff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.cta:hover, .cta:focus-visible {
  background: linear-gradient(180deg, rgba(125, 246, 255, 0.38), rgba(125, 246, 255, 0.12));
  box-shadow: 0 0 26px rgba(125, 246, 255, 0.3);
  outline: none;
}

.foot {
  margin: 18px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(223, 246, 255, 0.45);
}

.result {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin: 22px 0 24px;
}

.result div { display: flex; flex-direction: column; gap: 4px; }

.result dt {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(125, 246, 255, 0.7);
}

.result dd {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  color: var(--amber);
}

.mute {
  position: absolute;
  right: 16px;
  bottom: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(125, 246, 255, 0.3);
  border-radius: 3px;
  background: rgba(5, 14, 22, 0.75);
  color: rgba(223, 246, 255, 0.8);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.mute:hover, .mute:focus-visible { color: var(--teal); outline: none; }

@media (max-width: 520px) {
  .panel { padding: 22px 18px 18px; }
  .keys { grid-template-columns: 1fr 1fr; }
  .result { gap: 22px; }
  .result dd { font-size: 24px; }
}
