:root {
  --bg: #121418;
  --panel: #1b1f27;
  --ink: #e8eaee;
  --muted: #9aa3b2;
  --line: #2c3340;
  --accent: #3a9b8c;
  --accent-ink: #071311;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.45 "Segoe UI", "PingFang HK", "Noto Sans CJK HK", sans-serif; }
#app { display: flex; height: 100%; }
#panel {
  width: 340px; flex: 0 0 340px; background: var(--panel);
  border-right: 1px solid var(--line); overflow: auto; padding: 20px 18px 28px;
}
#viewport { flex: 1; position: relative; min-width: 0; }
#viewport canvas { display: block; width: 100%; height: 100%; }
#status {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  background: rgba(18,20,24,0.82); color: var(--ink);
  padding: 8px 12px; border-radius: 6px; font-size: 13px;
  pointer-events: none;
}
h1 { font-size: 20px; margin: 0 0 2px; font-weight: 650; }
.sub { margin: 0 0 18px; color: var(--muted); }
h2 { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
section { border-top: 1px solid var(--line); padding: 14px 0; }
label { display: block; margin: 8px 0; color: var(--ink); }
label input[type="range"] { width: 100%; margin-top: 4px; }
label output { float: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.file span { display: block; margin-bottom: 4px; }
.file input { width: 100%; }
.check { display: flex; align-items: center; gap: 8px; }
.row { display: flex; gap: 8px; margin: 10px 0; }
button {
  appearance: none; border: 0; background: var(--accent); color: var(--accent-ink);
  padding: 8px 10px; border-radius: 6px; cursor: pointer; font-weight: 600; flex: 1;
}
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button:hover { filter: brightness(1.08); }
.hint, #attr p { color: var(--muted); font-size: 12px; line-height: 1.5; }
#attr { margin-top: 8px; }
#attr a { color: #8fd4c8; }
.meta { margin-top: 8px !important; }
@media (max-width: 800px) {
  #app { flex-direction: column; }
  #panel { width: 100%; flex: none; max-height: 46%; }
  #viewport { min-height: 54%; }
}
.viewpoints { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; }
.viewpoints button {
  text-align: left; background: transparent; color: var(--ink);
  border: 1px solid var(--line); font-weight: 550; font-size: 13px;
}
.viewpoints button.active {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
#panel { width: 360px; flex: 0 0 360px; }
