html, body { overflow: hidden; height: 100%; }

#edApp {
  position: fixed; inset: 0; width: 100%; height: 100%; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
#edApp header {
  display: flex; align-items: center; gap: 16px; padding: 12px 18px; flex-shrink: 0;
  border-bottom: 1px solid #2c3a4a; background: #1d2733;
}
#edApp header h1 { font-size: 20px; margin: 0; }

.editor-layout { flex: 1; min-height: 0; display: flex; }
#edStage {
  position: relative;
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: radial-gradient(circle at 50% 0%, #16202c, #0c1117);
}
#edOverlay {
  position: absolute; top: 16px; right: 16px; display: none;
  padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600;
  background: rgba(10,15,22,0.85); color: #6fd3a6; border: 1px solid #2c3a4a;
}
#edOverlay.show { display: block; }
#edit {
  background: #46b35a; border-radius: 8px; cursor: crosshair; display: block;
  box-shadow: 0 14px 50px rgba(0,0,0,0.5);
  /* width/height set by fitEditor() */
}

#tools {
  width: 290px; flex-shrink: 0; height: 100%; overflow-y: auto;
  padding: 16px; display: flex; flex-direction: column; gap: 14px;
  border-left: 1px solid #2c3a4a; background: #141b24;
}
.tool-group {
  background: #1d2733; border: 1px solid #2c3a4a; border-radius: 8px; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.tool-title { font-size: 11px; text-transform: uppercase; color: #9fb3c8; letter-spacing: 0.5px; }
#tools label { font-size: 13px; display: flex; align-items: center; gap: 6px; }
#tools input[type="number"] { width: 64px; }
#tools input[type="range"] { flex: 1; }
#tools button { width: 100%; padding: 8px 10px; font-size: 13px; }
.tool-status { font-size: 13px; color: #6fd3a6; min-height: 18px; }
.hint { font-size: 11px; color: #7d93a8; line-height: 1.4; }

#palette { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; max-height: 280px; overflow-y: auto; }
.swatch-btn {
  display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 6px;
  background: #141b24; cursor: pointer; font-size: 12px; border: 2px solid transparent;
}
.swatch-btn:hover { background: #243240; }
.swatch-btn.sel { border-color: #6fd3a6; }
.swatch-btn .sw { width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.2); }

#holeNav { display: flex; align-items: center; gap: 8px; }
#holeNav button { padding: 5px 10px; }
#holeLabel { font-size: 14px; color: #9fb3c8; min-width: 90px; text-align: center; }
