:root {
  --bg: #0e0a1f; --panel: #1a1433; --line: #2f2752; --text: #f3ecff; --dim: #a99cc9;
  --accent: #ffd84a; --pink: #ff5fb4; --teal: #3fd0c9;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: radial-gradient(1200px 600px at 70% -10%, #3a2266 0%, var(--bg) 60%) fixed; color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif; }
header { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; }
h1 { margin: 0; font-size: 22px; letter-spacing: .02em; }
h1 small { color: var(--dim); font-weight: 500; font-size: 13px; margin-left: 8px; }
.logo { color: var(--pink); }
.hdr-btns { display: flex; gap: 8px; }
button, .gh { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px;
  font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; }
button:hover, .gh:hover { border-color: var(--accent); }
main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; padding: 0 22px 22px; max-width: 1640px; margin: 0 auto; }
.stage { position: relative; }
canvas { width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 12px; image-rendering: pixelated;
  box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px var(--line); background: #000; }
.help { color: var(--dim); font-size: 13px; margin: 10px 2px; }
aside { display: flex; flex-direction: column; gap: 12px; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
h2 { margin: 0 0 8px; font-size: 13px; color: var(--accent); letter-spacing: .06em; }
.feat { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.feat input, .opts input { accent-color: var(--teal); width: 16px; height: 16px; }
kbd { font: 11px ui-monospace, Menlo, monospace; background: #0e0a1f; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--dim); min-width: 18px; text-align: center; }
.row { display: flex; gap: 8px; margin-top: 8px; }
.row button { flex: 1; }
.opts { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.opts label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; }
.grid div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 2px 0; }
.grid span { color: var(--dim); }
.grid b { color: var(--text); font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.mono i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.touchpad { display: none; }
body.touch .touchpad { display: block; }
.touchpad button { position: absolute; bottom: 14px; width: 74px; height: 74px; border-radius: 50%; font-size: 22px;
  background: rgba(20,14,40,.45); border: 2px solid rgba(255,255,255,.35); touch-action: none; user-select: none; -webkit-user-select: none; }
.touchpad button.on { background: rgba(255,216,74,.4); }
.touchpad [data-touch="l"] { left: 14px; }
.touchpad [data-touch="r"] { left: 100px; }
.touchpad .jump { right: 14px; width: 96px; height: 96px; font-size: 16px; font-weight: 700; }
@media (max-width: 980px) {
  main { grid-template-columns: 1fr; padding: 0 10px 20px; }
  header { padding: 10px 12px; }
  aside { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) { aside { grid-template-columns: 1fr; } h1 small { display: none; } }
