/* Portrait shell. Thumbs live in the lower half. */
:root {
  --bg: #12100c;
  --ink: #f4ead8;
  --dim: #8a8170;
  --accent: #d4a017;
  --danger: #c45c32;
  --panel: #1c1914;
  --line: #3a3428;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "IBM Plex Sans", sans-serif;
  overflow: hidden;
}
.stage {
  width: min(100vw, 420px);
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
}
.hud {
  flex: 0 0 auto;
  padding: 10px 12px 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--dim);
}
.hud b { color: var(--ink); font-size: 16px; }
.board-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
canvas {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  background: #0e0c09;
  touch-action: none;
}
.thumb-zone {
  flex: 0 0 38%;
  padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.launch {
  flex: 1;
  min-height: 72px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: #1a1406;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .12em;
}
.launch:disabled { opacity: .4; }
.row {
  display: flex;
  gap: 8px;
}
.row button {
  flex: 1;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
}
.toast {
  position: absolute;
  left: 50%;
  bottom: 42%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
}
.toast.show { opacity: 1; }
