: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; }
html, body { height: 100%; margin: 0; font-family: system-ui, sans-serif; background: var(--bg); color: var(--fg); overflow: hidden; }

.app {
  height: calc(100% - var(--footerH));
  display: flex;
  position: relative;
}

.sidebar {
  width: 174px;
  background: linear-gradient(180deg, var(--panel), var(--panel2));
  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: 10px;
  top: 35px; /* Сдвиг вниз от линейки */
  width: 160px;
  background: rgba(15, 26, 38, 0.95);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

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

/* Узкий футер */
.footer {
  height: var(--footerH);
  background: var(--panel2);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 10px;
  color: var(--muted);
}

.btn { 
  background: rgba(255,255,255,0.08); 
  border: 1px solid var(--line); 
  color: #fff; 
  border-radius: 8px; 
  cursor: pointer; 
  display: grid; 
  place-items: center; 
}
.btn:hover { background: rgba(255,255,255,0.15); }
.btn--icon { width: 34px; height: 34px; }
.btn--tool { width: 44px; height: 44px; }
.toolrow, .zoomrow { display: flex; gap: 6px; justify-content: center; }
.minimap { background: #fff; border-radius: 4px; width: 100%; height: auto; display: block; }
.minimap__title { font-size: 10px; color: var(--muted); text-align: center; }