:root {
    --bg: #0f1419;
    --panel: #1a2332;
    --text: #e8eef6;
    --muted: #9aa8b8;
    --line: #2a3a4e;
    --accent: #5b9fd4;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(900px 420px at 0% -10%, #1d3a55 0%, transparent 55%), var(--bg);
    font-family: "SF Pro Text", "PingFang SC", "Hiragino Sans GB", sans-serif;
    color-scheme: dark;
}
a { color: #7eb6e8; }
.wrap { max-width: 1220px; margin: 0 auto; padding: 28px 20px 48px; }
header h1 { margin: 8px 0 4px; font-size: 28px; }
.sub, .status, .hint { color: var(--muted); }
.sub { margin: 0; }
.layout { display: grid; grid-template-columns: minmax(280px, 1fr) 330px; gap: 20px; margin-top: 22px; align-items: start; }
.stage { width: 100%; max-width: 820px; }
canvas { width: 100%; aspect-ratio: 5 / 4; display: block; background: #8eb4c9; border-radius: 12px; border: 1px solid var(--line); touch-action: none; cursor: grab; }
.status { min-height: 2.6em; font-size: 13px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.panel h2 { margin: 12px 0 8px; font-size: 15px; }
.field { margin-bottom: 10px; }
.label-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
output { color: var(--accent); font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 4px 0; }
select, button { font: inherit; color: var(--text); background: #121a24; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
select { width: 100%; }
.hint { font-size: 12px; margin: 4px 0 0; }
.notes { color: var(--muted); font-size: 13px; }
.notes ul { margin: 0; padding-left: 18px; }
@media (max-width: 960px) {
    .layout { grid-template-columns: 1fr; }
    .panel { position: static; max-height: none; }
}
