* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0e1116; color: #d8dee6;
  font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
#viewport { position: fixed; inset: 0; }
#viewport canvas { display: block; }

#panel { position: fixed; top: 12px; left: 12px; width: 290px; max-height: calc(100% - 24px); overflow-y: auto;
  background: rgba(20, 24, 31, 0.88); backdrop-filter: blur(6px); border: 1px solid #2a313c;
  border-radius: 10px; padding: 12px 14px; }
h1 { font-size: 16px; margin: 0 0 2px; }
h2 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #8a96a6; margin: 14px 0 6px; }
.sub { margin: 0; color: #8a96a6; font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.row input[type=range] { flex: 1; min-width: 0; }
.mono { font-family: ui-monospace, monospace; font-size: 11px; color: #8a96a6; white-space: nowrap; }
select { width: 100%; background: #1b2029; color: inherit; border: 1px solid #2f3744; border-radius: 6px; padding: 4px; }

.layer { display: grid; grid-template-columns: 14px 1fr 90px; align-items: center; gap: 8px; margin: 3px 0; }
.swatch { width: 12px; height: 12px; border-radius: 3px; }
.layer label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.layer input[type=range] { width: 90px; }

.buttons { display: flex; flex-wrap: wrap; gap: 6px; }
button { background: #1f2631; color: inherit; border: 1px solid #333c4a; border-radius: 6px; padding: 5px 10px; cursor: pointer; }
button:hover { background: #2a3341; }
button.hot { border-color: #d9534f; color: #ffb3b0; }

#labels { position: fixed; inset: 0; pointer-events: none; }
.lbl { position: absolute; transform: translate(-50%, -50%); font-size: 11px; font-weight: 600;
  color: #fff; background: rgba(0, 0, 0, 0.55); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
#tooltip { max-width: 280px; position: fixed; pointer-events: none; display: none; background: rgba(0, 0, 0, 0.8);
  border: 1px solid #444; padding: 4px 8px; border-radius: 5px; font-size: 12px; }
.findings { margin: 0; padding-left: 16px; }
.findings li { margin: 3px 0; }
.red { color: #ff6b61; } .orange { color: #ffae42; }
.fine { color: #7d8896; font-size: 11px; margin: 8px 0 0; }
.lbl.hern { background: rgba(170, 30, 20, 0.8); }
.lbl.nerve { background: rgba(150, 110, 0, 0.8); }
