:root {
  --bg: #000;
  --ink: #f5f5f0;
  --yellow: #ffd400;
  --yellow-dim: #8a7300;
  --line: #262200;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

button { font: inherit; cursor: pointer; }

/* ---------- HUD ---------- */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--yellow);
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  object-fit: cover;
  background: var(--yellow);
}
.name { font-weight: 800; letter-spacing: .14em; color: var(--yellow); }
.stats { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.stat { color: var(--yellow-dim); letter-spacing: .1em; }
.stat b { color: var(--yellow); font-size: 16px; margin-left: 4px; }
.icon-btn {
  background: none;
  color: var(--yellow-dim);
  border: 1px solid var(--yellow-dim);
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: .1em;
}
.icon-btn[aria-pressed="true"] { color: var(--bg); background: var(--yellow); border-color: var(--yellow); }

/* ---------- Stage ---------- */
.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}
.flavor {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .3em;
  color: var(--yellow-dim);
  pointer-events: none;
  white-space: nowrap;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .72);
  padding: 16px;
}
.overlay.hidden { display: none; }
.panel { text-align: center; max-width: 420px; }
.kicker { font-size: 12px; letter-spacing: .3em; color: var(--yellow-dim); margin-bottom: 12px; }
h1 {
  font-size: clamp(28px, 7vw, 52px);
  letter-spacing: .06em;
  color: var(--yellow);
  line-height: 1.05;
  margin-bottom: 12px;
}
.sub { font-size: 13px; color: var(--ink); opacity: .75; margin-bottom: 24px; line-height: 1.5; }
.play {
  background: var(--yellow);
  color: var(--bg);
  border: 0;
  padding: 14px 44px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .2em;
  box-shadow: 4px 4px 0 var(--yellow-dim);
}
.play:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--yellow-dim); }
.play:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--yellow-dim); }

/* ---------- Project info ---------- */
.info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--yellow-dim);
  min-width: 0;
}
.info-name { letter-spacing: .14em; }
.ca-label { color: var(--yellow); }
.ca {
  color: var(--ink);
  opacity: .8;
  overflow-wrap: anywhere;
  word-break: break-all;
  min-width: 0;
  user-select: all;
}
.ca.placeholder { font-style: italic; opacity: .5; }
.copy {
  background: none;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  padding: 3px 10px;
  font-size: 11px;
  letter-spacing: .1em;
  flex-shrink: 0;
}
.copy:disabled { opacity: .35; cursor: not-allowed; }
.copy.ok { background: var(--yellow); color: var(--bg); }

button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

@media (max-width: 520px) {
  .hud { padding: 8px 12px; }
  .name { font-size: 13px; }
  .logo { width: 30px; height: 30px; }
  .stats { gap: 10px; }
  .info-name { display: none; }
}
