:root {
  --bg: #0f1216; --panel: #121821; --panel2: #0e141c; --fg: #e8eef6;
  --muted: #9aa7b5; --line: rgba(255,255,255,.10); --accent: #00aaff;
  --footerH: 18px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui; background: var(--bg); color: var(--fg); height: 100vh; overflow: hidden; }
.app { height: calc(100% - var(--footerH)); display: flex; position: relative; }

.sidebar { width: 174px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 10px; gap: 10px; z-index: 10; }
.sidebar__spacer { flex: 1; }

.sidebar__section--minimap.stage-overlay {
  position: fixed; right: 0; top: 25px; width: 170px;
  background: rgba(18, 24, 33, 0.9); border: 1px solid var(--line);
  border-radius: 12px 0 0 12px; padding: 10px; z-index: 200; box-shadow: -4px 0 20px rgba(0,0,0,.3);
}

.footer { height: var(--footerH); background: var(--panel2); border-top: 1px solid var(--line); display: flex; align-items: center; padding: 0 15px; font-size: 10px; color: var(--muted); justify-content: flex-start; }

.btn { background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--fg); border-radius: 8px; cursor: pointer; transition: 0.2s; }
.btn:hover { background: rgba(255,255,255,0.1); }
.btn--active { border-color: var(--accent); background: rgba(0, 170, 255, 0.2); color: var(--accent); }

.btn--icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.btn--tool { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.ico, .tool-ico { width: 20px; height: 20px; }

.toolrow, .zoomrow { display: flex; gap: 8px; justify-content: center; }
.btncol { display: flex; flex-direction: column; gap: 6px; }
.btnrow { display: flex; gap: 6px; }

.minimap { background: #fff; border-radius: 4px; width: 100%; height: auto; }
.minimap__title { font-size: 10px; color: var(--muted); margin: 5px 0; text-align: center; }

.drop { border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,0.2); overflow: hidden; }
.drop__summary { cursor: pointer; padding: 6px 10px; font-size: 11px; display: flex; justify-content: space-between; }
.drop input[type="range"] { width: 90%; margin: 5px 5%; }

.stage { flex: 1; display: flex; overflow: hidden; background: #222; position: relative; }
.viewport { flex: 1; position: relative; }
#canvas { width: 100%; height: 100%; display: block; }