/* Leveled — shared editor palette styles (identical UX in every game). */
.palette {
  --lv-cyan: #5fe0ff;
  --lv-red: #ff4136;
  --lv-panel: rgba(10, 14, 22, 0.92);
  --lv-line: rgba(95, 224, 255, 0.18);
  position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 20;
  background: var(--lv-panel); border-right: 1px solid var(--lv-line);
  padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
  backdrop-filter: blur(6px); color: #cfe9f5;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}
.palette *, .palette *::before, .palette *::after { box-sizing: border-box; }
.palette.hidden { display: none; }
.palette h1 { font-size: 19px; letter-spacing: 4px; color: #fff; margin: 0; }
.palette h2 { font-size: 11px; letter-spacing: 3px; color: var(--lv-cyan); margin: 0 0 12px; }

.room-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.room-row.hidden { display: none; }
.room-row label { font-size: 10px; letter-spacing: 2px; opacity: 0.6; }
.room-select {
  flex: 1; padding: 6px 8px; border-radius: 7px; font-size: 12px;
  background: rgba(255, 255, 255, 0.06); color: #cfe9f5;
  border: 1px solid var(--lv-line); cursor: pointer;
}
.room-select option { background: #0c1018; color: #cfe9f5; }

/* only the tool list shrinks + scrolls; every other row keeps its size */
.palette > h1, .palette > h2, .palette > .room-row,
.palette > .hint, .palette > .actions, .palette > .toast { flex: 0 0 auto; }
.tools {
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto; min-height: 60px; flex: 0 1 auto;
  scrollbar-width: thin; scrollbar-color: rgba(95, 224, 255, 0.3) transparent;
}
.tool { flex: 0 0 auto; }
.tool {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  border: 1px solid transparent; background: rgba(255, 255, 255, 0.04);
  color: inherit; cursor: grab; text-align: left; font-size: 13px;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.tool:hover { background: rgba(95, 224, 255, 0.08); }
.tool.selected { border-color: var(--lv-cyan); background: rgba(95, 224, 255, 0.12); }
.tool .tlabel { flex: 1; display: flex; flex-direction: column; }
.tool small { font-size: 10px; opacity: 0.55; }
.tool em { font-style: normal; font-size: 11px; opacity: 0.6; }

.swatch { width: 22px; height: 22px; border-radius: 5px; flex: none; border: 1px solid rgba(255, 255, 255, 0.18); }
.swatch.round { border-radius: 50%; }

.palette .hint { font-size: 11px; line-height: 1.6; opacity: 0.55; margin: 8px 0; }

.actions { display: flex; flex-direction: column; gap: 7px; margin-top: auto; }
.actrow { display: flex; gap: 7px; }
.actrow .act { flex: 1; }
.act {
  padding: 8px; border-radius: 8px; font-size: 13px; letter-spacing: 1px;
  border: 1px solid var(--lv-line); background: rgba(255, 255, 255, 0.05);
  color: #cfe9f5; cursor: pointer; font-family: inherit;
  transition: background 0.12s, border-color 0.12s;
}
.act:hover { background: rgba(95, 224, 255, 0.12); border-color: var(--lv-cyan); }
.act.primary { border-color: rgba(95, 224, 255, 0.6); color: #fff; background: rgba(95, 224, 255, 0.14); }
.act.danger:hover { border-color: var(--lv-red); background: rgba(255, 65, 54, 0.12); }

.palette .toast {
  min-height: 14px; margin-top: 6px; font-size: 11px; color: #58ff9d;
  opacity: 0; transition: opacity 0.25s;
}
.palette .toast.show { opacity: 1; }
.palette .toast.error { color: var(--lv-red); }
