:root {
  --red: #ff3b2f;
  --ember: #ff8a2a;
  --bone: #efe6d8;
  --ink: #0b0606;
  --dim: rgba(239, 230, 216, 0.62);
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", "Franklin Gothic Bold", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--bone); overflow: hidden; }
body { font: 14px/1.35 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
canvas#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

#menu { position: fixed; inset: 0; display: none; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(11, 6, 6, 0.35) 0%, rgba(11, 6, 6, 0.86) 70%); }
#menu.show { display: grid; }
.panel { text-align: center; width: min(360px, 100%); }
.logo { margin: 0; font: 400 clamp(52px, 17vw, 96px)/0.9 var(--display); letter-spacing: 0.02em;
  color: var(--bone); text-shadow: 0 3px 0 #5a0c06, 0 6px 18px rgba(255, 59, 47, 0.45); }
.logo span { color: var(--red); }
.tag { margin: 6px 0 0; font: 400 clamp(13px, 3.6vw, 16px)/1 var(--display); letter-spacing: 0.32em; color: var(--ember); }
.live { margin: 18px 0 14px; font-size: 13px; color: var(--dim); display: flex; gap: 8px; justify-content: center; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #39d353; box-shadow: 0 0 8px #39d353; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
#join { display: flex; gap: 8px; }
#name { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 6px; border: 1px solid rgba(239, 230, 216, 0.25);
  background: rgba(0, 0, 0, 0.55); color: var(--bone); font: 600 16px ui-sans-serif, system-ui, sans-serif; outline: none; }
#name:focus { border-color: var(--ember); }
#play { height: 46px; padding: 0 22px; border: 0; border-radius: 6px; cursor: pointer;
  background: linear-gradient(#ff5a3a, #c81e12); color: #fff; font: 400 22px/1 var(--display); letter-spacing: 0.08em;
  box-shadow: 0 3px 0 #5a0c06, 0 0 24px rgba(255, 59, 47, 0.35); }
#play:active { transform: translateY(2px); box-shadow: 0 1px 0 #5a0c06; }
#play.wait { filter: grayscale(0.6); }
.keys { margin: 14px 0 0; font-size: 12px; color: var(--dim); }
.keys b { color: var(--bone); font-weight: 600; }

#corner { position: fixed; top: 8px; right: 8px; display: flex; gap: 6px; z-index: 3; }
#corner button { height: 28px; padding: 0 10px; border-radius: 5px; border: 1px solid rgba(239, 230, 216, 0.25);
  background: rgba(0, 0, 0, 0.55); color: var(--bone); font: 600 12px ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
#corner button[aria-pressed="true"] { color: var(--dim); text-decoration: line-through; }

body.card #join, body.card .keys, body.card .live { display: none; }
body.card #menu { place-items: start center; padding-top: 9%;
  background: linear-gradient(to bottom, rgba(11, 6, 6, 0.82) 0%, rgba(11, 6, 6, 0.35) 55%, rgba(11, 6, 6, 0) 75%); }
body.card .panel::after { content: "▶  PLAY IT IN THE POST"; display: inline-block; margin-top: 22px; padding: 12px 22px;
  border-radius: 6px; background: linear-gradient(#ff5a3a, #c81e12); color: #fff; font: 400 20px/1 var(--display);
  letter-spacing: 0.08em; box-shadow: 0 3px 0 #5a0c06, 0 0 24px rgba(255, 59, 47, 0.35); }

#touch { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#stick { position: absolute; width: 110px; height: 110px; margin: -55px 0 0 -55px; border-radius: 50%;
  border: 2px solid rgba(239, 230, 216, 0.28); background: rgba(0, 0, 0, 0.18); display: none; }
#knob { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(239, 230, 216, 0.35); }
#fire { position: absolute; right: 18px; bottom: 26%; width: 78px; height: 78px; border-radius: 50%; pointer-events: auto;
  border: 2px solid rgba(255, 90, 58, 0.8); background: rgba(200, 30, 18, 0.45); color: #fff;
  font: 400 18px/1 var(--display); letter-spacing: 0.06em; touch-action: none; }
#fire.on { background: rgba(255, 90, 58, 0.75); }
