  /* Build palette (lives in the sidebar, replacing the participant list in build mode) */
  #editPanel {
    flex: 1; min-height: 0; overflow-y: auto; padding: 14px;
    display: flex; flex-direction: column; gap: 14px;
  }
  .ep-h { font-size: 14px; font-weight: 700; color: #cfe0ff; display: flex; align-items: center; }
  .ep-undo { margin-left: auto; display: flex; gap: 6px; }
  .mini-btn {
    width: 30px; height: 26px; padding: 0; cursor: pointer; border-radius: 6px;
    border: 1px solid #2a3a5e; background: #11203a; color: #dce7fb; font-size: 14px; line-height: 1;
  }
  .mini-btn:hover:not(:disabled) { background: #1a2c4d; border-color: #5aa6ff; }
  .mini-btn:disabled { opacity: .4; cursor: default; }
  .mini-btn.act { background: #5aa6ff; border-color: #5aa6ff; color: #08101f; }
  /* Shape-mode rail: brush / rect / outline / line / bucket — applies to floor &
     simple structure tiles (objects always place single). */
  .ep-shape { display: flex; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid #1d2b48; }
  .shape-tool {
    flex: 1; height: 34px; padding: 0; cursor: pointer; border-radius: 7px;
    border: 1px solid #2a3a5e; background: #11203a; color: #dce7fb;
    display: inline-flex; align-items: center; justify-content: center; font-size: 17px; line-height: 1;
  }
  .shape-tool:hover { background: #1a2c4d; border-color: #5aa6ff; }
  .shape-tool.sel { background: #5aa6ff; border-color: #5aa6ff; color: #08101f; }
  /* Recent-tiles quick-access row (last 10 selected tiles/tools) */
  .ep-recent { display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid #1d2b48; }
  .ep-recent-lbl { font-size: 11px; font-weight: 600; color: #8aa0c8; text-transform: uppercase; letter-spacing: .04em; }
  .recent-tile {
    width: 32px; height: 32px; flex: none; padding: 0; cursor: pointer; box-sizing: content-box;
    border-radius: 7px; border: 1px solid #2a3a5e; background: #11203a; color: #dce7fb;
    display: inline-flex; align-items: center; justify-content: center; font-size: 16px; line-height: 1;
    background-repeat: no-repeat; image-rendering: pixelated; position: relative;
  }
  .recent-tile:hover { border-color: #5aa6ff; }
  .ep-recent-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: #5f7196; font-size: 10px; }
  .fav-tile { box-shadow: inset 0 0 0 1px #f5c451; }
  .recent-tile.sel { box-shadow: 0 0 0 2px #5aa6ff; border-color: #fff; }
  /* Search box + category tabs (the redesigned palette) */
  .ep-search {
    width: 100%; box-sizing: border-box; padding: 8px 11px; border-radius: 8px;
    border: 1px solid #2a3a5e; background: #0e1a30; color: #dce7fb; font-size: 13px;
  }
  .ep-search::placeholder { color: #5f7196; }
  .ep-search:focus { outline: none; border-color: #5aa6ff; }
  .ep-tabs { display: flex; gap: 5px; padding-bottom: 10px; border-bottom: 1px solid #1d2b48; }
  .ep-tab {
    flex: 1; height: 36px; padding: 0; cursor: pointer; border-radius: 8px; font-size: 18px;
    border: 1px solid #2a3a5e; background: #11203a; color: #dce7fb; line-height: 1;
  }
  .ep-tab:hover { background: #1a2c4d; border-color: #5aa6ff; }
  .ep-tab.sel { background: #5aa6ff; border-color: #5aa6ff; }
  .ep-panels, .ep-tabpane { display: flex; flex-direction: column; gap: 12px; }
  .ep-tabpane[hidden] { display: none; }
  .ep-tabpane { animation: ep-fade .15s ease both; }
  @keyframes ep-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
  /* Search mode: hide the tab bar (panes are forced visible from JS) */
  #editPanel.searching .ep-tabs { display: none; }
  .ep-sec { display: flex; flex-direction: column; gap: 7px; }
  .ep-sec[hidden] { display: none; }
  .ep-head {
    width: 100%; padding: 0; background: none; border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #8aa0c8;
  }
  .ep-head:hover { color: #cfe0ff; }
  .ep-head .caret { transition: transform .15s; font-size: 10px; }
  .ep-sec.collapsed .ep-head .caret { transform: rotate(-90deg); }
  .ep-sec.collapsed .ep-body { display: none; }
  /* Office owners get a decorate-only palette: floors + objects + embeds, nothing
     structural (walls/doors/track/stadium/zone tools/templates are editor-only). */
  /* Office decorators get a trimmed palette: only Floors + Furniture + Interactive
     (decorate inside your office). Hide the structural / games / tools tabs. */
  #editPanel.officeDecor .ep-tab[data-tab="structure"],
  #editPanel.officeDecor .ep-tab[data-tab="games"],
  #editPanel.officeDecor .ep-tab[data-tab="tools"] { display: none; }
  /* Prefab library buttons (named stamps) */
  .prefab-tile { position: relative; }
  .prefab-tile .pf-del {
    position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; padding: 0;
    border-radius: 50%; border: none; background: #5e2a36; color: #ffb7c4; font-size: 11px;
    line-height: 16px; cursor: pointer; display: none;
  }
  .prefab-tile:hover .pf-del { display: block; }
  .ep-hint { font-size: 12px; color: #6b7aa0; }
  .ep-sel {
    font-size: 12px; font-weight: 600; color: #cfe0ff; background: #16233f;
    border: 1px solid #2a3a5e; border-radius: 8px; padding: 6px 10px;
  }
  .ep-sel:empty { display: none; }
  #tip {
    position: fixed; z-index: 60; pointer-events: none;
    background: #16233f; border: 1px solid #2f4673; color: #e8eefc;
    padding: 4px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
    white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.5);
  }
  .pal { display: flex; flex-wrap: wrap; gap: 6px; }
  .pal.list { flex-direction: column; flex-wrap: nowrap; }
  .tool.labeled {
    width: 100%; justify-content: flex-start; gap: 9px; padding: 0 10px; height: 34px;
    font-size: 17px;
  }
  .tool.labeled .lbl-txt { font-size: 12.5px; font-weight: 600; color: #dce7fb; }
  .tool {
    width: 40px; height: 40px; padding: 0; flex: none; font-size: 19px; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid #2a3a5e; cursor: pointer;
    background: #11203a; color: #dce7fb; transition: transform .1s ease, border-color .12s, background .12s;
  }
  .tool:hover { background: #1a2c4d; }
  .tool:hover:not(.wide), .recent-tile:hover, .sw-tool:hover { transform: scale(1.12); z-index: 1; }
  .tool.sel { background: #5aa6ff; border-color: #5aa6ff; }
  .tool.wide { width: auto; height: 38px; padding: 0 12px; gap: 6px; font-size: 14px; font-weight: 600; transition: background .12s, border-color .12s; }
  .tool.danger { background: #2a1420; border-color: #5e2a36; color: #ffb7c4; }
  .tool.danger:hover { background: #3a1622; }
  .recent-tile { transition: transform .1s ease, border-color .12s; }
  .sw-tool {
    width: 32px; height: 32px; flex: none; padding: 0; cursor: pointer;
    border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); transition: transform .1s ease, border-color .12s;
  }
  .sw-tool:hover { border-color: rgba(255,255,255,0.6); }
  .sw-tool.sel { box-shadow: 0 0 0 2px #5aa6ff; border-color: #fff; }
  .sw-tool.def { position: relative; }
  .sw-tool.def::after {
    content: "∅"; position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; color: #6b5a3a; font-size: 14px; font-weight: 700;
  }

