* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--panel); color: var(--ink); font-family: var(--text); }
body { display: grid; grid-template-columns: 1fr 380px; height: 100vh; overflow: hidden; }
#stage { position: relative; background: var(--bg); overflow: hidden; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
#drop {
  position: absolute; inset: 24px; border: 2px dashed var(--line); border-radius: 10px;
  display: grid; place-items: center; text-align: center; color: var(--ink-dim); font-size: 15px; line-height: 1.8;
}
#drop[hidden] { display: none; }
#drop b { color: var(--ink); font-size: 15px; }
#toolbar {
  position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; flex-wrap: wrap;
  background: rgba(20,20,22,.9); padding: 6px; border-radius: 6px;
}
#hint {
  position: absolute; left: 12px; bottom: 12px; max-width: 70%; font-size: 13px; color: var(--ink);
  background: rgba(20,20,22,.9); padding: 8px 12px; border-radius: 6px; border-left: 3px solid var(--hazard);
}
#zoominfo { position: absolute; right: 12px; bottom: 12px; font-family: var(--num); font-size: 14px; color: var(--ink-dim); }
aside { border-left: 1px solid var(--line-soft); overflow-y: auto; padding: 16px 16px 40px; }
h1 { font-family: var(--num); font-weight: 700; font-size: 22px; margin: 0 0 2px; }
.sub { color: var(--ink-dim); font-size: 13px; margin: 0 0 14px; line-height: 1.6; }
section { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
h2 { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
h2 span { font-family: var(--num); color: var(--hazard); margin-right: 6px; font-size: 14px; }
select, button, input[type=number], input[type=text] {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 4px; padding: 6px 9px;
}
button { cursor: pointer; }
button.primary { background: var(--hazard); color: var(--on-hazard); border-color: var(--hazard); font-weight: 700; }
button[aria-pressed="true"] { background: var(--hazard); color: var(--on-hazard); border-color: var(--hazard); font-weight: 700; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 2px solid var(--hazard); outline-offset: 2px; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.field { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; font-size: 13px; margin: 6px 0; }
.field input[type=number] { width: 96px; }
.field input[type=text] { width: 160px; }
.note { font-size: 13px; color: var(--ink-dim); line-height: 1.6; margin: 6px 0 0; }
.warn { color: var(--hazard); }
.err { color: var(--miss); }
#sprays { list-style: none; padding: 0; margin: 6px 0; }
#sprays li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 6px; border-radius: 4px; cursor: pointer; }
#sprays li[aria-selected="true"] { background: var(--panel-2); outline: 1px solid var(--line); }
#sprays i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
#sprays b { font-family: var(--num); font-size: 15px; }
canvas.small { width: 100%; display: block; background: var(--panel-2); border-radius: 4px; margin-top: 8px; }
input[type=range] { width: 100%; accent-color: var(--hazard); }
@media (max-width: 860px) {
  body { grid-template-columns: 1fr; grid-template-rows: 60vh auto; overflow: auto; height: auto; }
  #stage { height: 60vh; }
}
