/* TECHMAN palette workbench. Load after tilemap-editor.css. */
body[data-hammer-palette="tilemap"] #editor-panel {
  --palette-border: #33669970;
  --palette-surface: #091a2be8;
  --palette-text: #d7e7f6;
  --palette-muted: #9bb7d0;
  min-width: 0;
  min-height: 0 !important;
  height: calc(100dvh - 100px);
  padding: 9px !important;
  gap: 5px;
  border: 1px solid #4775a1;
  border-radius: 7px;
  color: var(--palette-text);
  background: linear-gradient(145deg, #10263bea, #06111eed);
  box-shadow: inset 0 1px 0 #c8e4ff14, 0 10px 28px #0005;
  backdrop-filter: blur(14px);
  font: 12px/1.4 "Segoe UI", sans-serif;
}
body[data-hammer-palette="tilemap"] #editor-panel *,
body[data-hammer-palette="tilemap"] #editor-panel *::before,
body[data-hammer-palette="tilemap"] #editor-panel *::after { box-sizing: border-box; }
body[data-hammer-palette="tilemap"] #editor-panel :is(input, button, label, p, .row) { min-width: 0; }
body[data-hammer-palette="tilemap"] #editor-panel button { touch-action: manipulation; }
body[data-hammer-palette="tilemap"] #editor-panel button:focus-visible {
  outline: 2px solid #d4eaff;
  outline-offset: -3px;
}
body[data-hammer-palette="tilemap"] #editor-panel #editor-workbench-heading {
  flex: none;
  min-height: 29px;
  padding: 0 0 6px;
  margin: 0;
  border-color: var(--palette-border);
}
body[data-hammer-palette="tilemap"] #editor-panel #editor-workbench-heading h2 {
  font: 700 12px/1.4 Orbitron, sans-serif !important;
  color: #d6e9fc;
  letter-spacing: .06em;
}
body[data-hammer-palette="tilemap"] #editor-panel #editor-main-menu { min-height: 28px; font: 600 10px/1.3 "Segoe UI", sans-serif; }
body[data-hammer-palette="tilemap"] #editor-panel #hammer-common-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: none;
  gap: 4px 7px;
  margin: 0 !important;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-common-editor > label {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 7px;
  margin: 0 !important;
  min-height: 28px !important;
  font: 600 10px/1.3 "Segoe UI", sans-serif;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-common-editor > label input {
  width: 100%;
  height: 28px;
  min-height: 28px;
  margin: 0;
  font: 12px/1.3 "Segoe UI", sans-serif;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-common-editor > .row { margin: 0 !important; gap: 4px; }
body[data-hammer-palette="tilemap"] #editor-panel #hammer-common-editor > .row button {
  flex: 1 1 0;
  min-height: 27px !important;
  padding: 4px 7px !important;
  margin: 0 !important;
  font: 600 10px/1.3 "Segoe UI", sans-serif;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 4px 8px;
  padding: 6px;
  border: 1px solid var(--palette-border);
  border-radius: 5px;
  background: #061421a6;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls #selected-tool-inspector {
  grid-column: 1;
  grid-row: 1 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  gap: 4px;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0;
  background: transparent;
  overflow: visible;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls #selected-tool-preview.tilemap-composite {
  width: 52px !important;
  height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls #selected-tool-name {
  width: 100%;
  font: 600 10px/1.3 "Segoe UI", sans-serif;
  overflow-wrap: anywhere;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls > :is(label, .hammer-tile-direction) {
  grid-column: 2;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
  font: 600 9px/1.3 "Segoe UI", sans-serif !important;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls .hammer-tile-direction { display: flex; align-items: end; gap: 5px; }
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls .hammer-tile-direction > label { flex: 1; margin: 0; }
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls .tilemap-choices { gap: 3px; }
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls .tilemap-choices button,
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-rotate {
  min-height: 26px !important;
  padding: 4px 5px !important;
  font: 600 10px/1.25 "Segoe UI", sans-serif !important;
  border-radius: 3px;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-edge-controls .tilemap-choices { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-edge-controls .tilemap-choices button { min-height: 25px !important; font-size: 10px !important; }
body[data-hammer-palette="tilemap"] #editor-panel #editor-pane-tools {
  display: flex !important;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 4px;
  overflow: hidden;
}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-editor-controls { flex: none; margin: 0; padding: 1px 0; }
body[data-hammer-palette="tilemap"] #editor-panel #editor-search { min-height: 30px; margin: 0 0 5px !important; font: 12px/1.3 "Segoe UI", sans-serif !important; }
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-filter-bar { gap: 4px; }
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-filter-bar button { min-height: 28px; padding: 5px 7px; font: 600 11px/1.2 "Segoe UI", sans-serif; }
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-guide-legend { flex-wrap: wrap; gap: 4px 6px; margin: 4px 0; font: 10px/1.3 "Segoe UI", sans-serif; }
body[data-hammer-palette="tilemap"] #editor-panel #editor-autodraft-state {
  display: block !important;
  margin: 3px 0 !important;
  font: 10px/1.35 "Segoe UI", sans-serif;
  color: #b1c9df;
  overflow-wrap: anywhere;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools {
  flex: 1 1 0;
  min-height: 64px;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0 5px 8px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #4777a2 #071321;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools > * { min-width: 0; max-width: 100%; }
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-category, #editor-save-section, #hammer-level-advanced) {
  margin: 0 0 9px;
  padding: 7px;
  border: 1px solid #3366994d;
  border-radius: 5px;
  background: #0613218c;
  overflow: visible;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools .tilemap-section-label,
body[data-hammer-palette="tilemap"] #editor-panel #hammer-background-controls > h3 {
  margin: 2px 0 9px;
  font: 700 11px/1.5 Orbitron, sans-serif;
  letter-spacing: .055em;
  color: #c2dcf3;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid, .tilemap-rotation-sheet) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)) !important;
  gap: 6px !important;
  padding: 0;
  min-width: 0;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid .tool-card, .tilemap-rotation-card) {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 0;
  width: 100%;
  height: auto !important;
  min-height: 82px !important;
  margin: 0;
  padding: 6px 4px !important;
  border: 1px solid #375a7b;
  border-radius: 4px;
  background: linear-gradient(150deg, #142a3ed9, #081726e8);
  box-shadow: inset 0 1px 0 #d0e7ff0c;
  font: 600 10px/1.3 "Segoe UI", sans-serif !important;
  color: #ccdeee;
  white-space: normal;
  overflow: visible;
  text-align: center;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid .tool-card, .tilemap-rotation-card):hover:not(:disabled) { background: #1a3b59; border-color: #709bc3; }
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid .tool-card, .tilemap-rotation-card)[aria-pressed="true"] {
  outline: 2px solid #b4d6f5;
  outline-offset: -2px;
  border-color: #a5c8e8;
  background: #244c70 !important;
  box-shadow: inset 0 0 0 2px #33669955;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-card, .tilemap-rotation-card)[hidden] { display: none !important; }
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid .tool-card, .tilemap-rotation-card) :is(.scenery-preview, .tool-card-visual, .tilemap-composite, .tilemap-rotation-visual) {
  flex: none;
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  margin: 0 auto !important;
  pointer-events: none;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools .tilemap-rotation-card > :is(canvas, img) {
  display: block;
  flex: none;
  width: 44px !important;
  height: 44px !important;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid .tool-card, .tilemap-rotation-card) > :is(strong, .tilemap-rotation-title, .tilemap-card-title),
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid .tool-card, .tilemap-rotation-card) > span:not(.scenery-preview):not(.tool-card-visual):not(.tilemap-rotation-visual) {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  font: 600 10px/1.25 "Segoe UI", sans-serif !important;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
  overflow: visible;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid .tool-card, .tilemap-rotation-card) > small { font: 9px/1.3 "Segoe UI", sans-serif !important; color: #9ab9d5; }
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid .tool-card, .tilemap-rotation-card)[data-tile-role="breakable"] { border-bottom: 3px solid #42d983; }
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid .tool-card, .tilemap-rotation-card)[data-tile-role="solid"] { border-bottom: 3px solid #ed6773; }
body[data-hammer-palette="tilemap"] #editor-panel #hammer-structure-actions { margin: 0 0 6px; padding: 0; }
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-structure-actions .tool-card { min-height: 30px !important; }
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-background-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  width: 100%;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-background-controls > :is(label, div, p, h3) { min-width: 0; margin: 0; }
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-background-controls > label { display: grid; gap: 4px; font: 600 10px/1.4 "Segoe UI", sans-serif; }
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-background-controls label:has(> #hammer-world-bg),
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-world-bg + .tilemap-choices { display: none !important; }
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-background-controls #hammer-bg-gallery {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  width: 100%;
  min-width: 0;
  padding: 0;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-bg-gallery .hammer-bg-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 0;
  width: 100%;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  margin: 0;
  padding: 0 !important;
  border: 1px solid #3c6081;
  border-radius: 5px;
  background: #07121e;
  color: #d4e7f7;
  text-align: left;
  overflow: hidden;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-bg-gallery .hammer-bg-card[hidden] { display: none !important; }
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-bg-gallery .hammer-bg-card:hover { border-color: #83afd6; background: #102b43; }
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-bg-gallery .hammer-bg-card[aria-pressed="true"] {
  outline: 2px solid #a6ccec;
  outline-offset: -2px;
  border-color: #b8d9f6;
  background: #163b5a;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-bg-gallery .hammer-bg-card > :is(img, .hammer-bg-off) {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0;
  aspect-ratio: 16 / 5;
  object-fit: contain !important;
  background: #000;
  border-bottom: 1px solid #33669966;
}
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-bg-gallery .hammer-bg-card > .hammer-bg-off { display: grid; place-items: center; font: 700 13px/1.4 Orbitron, sans-serif; color: #8ca8c0; }
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-bg-gallery .hammer-bg-card > strong { padding: 8px 11px 2px; font: 600 12px/1.35 "Segoe UI", sans-serif; overflow-wrap: anywhere; }
body[data-hammer-palette="tilemap"] #editor-panel #tools #hammer-bg-gallery .hammer-bg-card > small { padding: 0 11px 9px; font: 10px/1.35 "Segoe UI", sans-serif; color: #a2bfd9; }
body[data-hammer-palette="tilemap"] #editor-panel #tools .tilemap-choices { gap: 4px; }
body[data-hammer-palette="tilemap"] #editor-panel #tools .tilemap-choices button { flex: 1 1 100px; min-height: 30px; padding: 5px 7px; font: 600 11px/1.3 "Segoe UI", sans-serif; }
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(input:not([type="range"]), textarea) { max-width: 100%; font: 12px/1.4 "Segoe UI", sans-serif; }
body[data-hammer-palette="tilemap"] #editor-panel #tools :is(#hammer-bg-hint, .muted) { font: 11px/1.45 "Segoe UI", sans-serif; overflow-wrap: anywhere; }
body[data-hammer-palette="tilemap"] #editor-panel #editor-pane-tools > .row:has(#undo),
body[data-hammer-palette="tilemap"] #editor-panel #editor-pane-tools > .editor-test-action {
  position: static;
  flex: none;
  width: 100%;
  min-height: 0;
  margin: 0 !important;
  padding: 4px 0 0;
  background: transparent;
}
body[data-hammer-palette="tilemap"] #editor-panel #editor-pane-tools > .row:has(#undo) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; border-top: 1px solid var(--palette-border); }
body[data-hammer-palette="tilemap"] #editor-panel #editor-pane-tools > .row:has(#undo) button { min-height: 29px; padding: 5px 8px; font: 600 11px/1.3 "Segoe UI", sans-serif; }
body[data-hammer-palette="tilemap"] #editor-panel #test-button { width: 100%; min-height: 33px !important; margin: 0; padding: 7px !important; font: 700 11px/1.3 Orbitron, sans-serif !important; }
@media (min-width: 1100px) {
  body[data-hammer-palette="tilemap"]:is([data-hammer-mode="editor"], [data-hammer-test="true"]) .workspace.editor-open {
    display: grid !important;
    grid-template-columns: clamp(500px, 38vw, 680px) minmax(0, 1fr) !important;
    gap: 12px;
    min-width: 0;
    align-items: stretch;
  }
  body[data-hammer-palette="tilemap"] .workspace.editor-open > .game-column { min-width: 0; }
}
@media (min-width: 761px) and (max-width: 1099px) {
  body[data-hammer-palette="tilemap"]:is([data-hammer-mode="editor"], [data-hammer-test="true"]) .workspace.editor-open {
    display: grid !important;
    grid-template-columns: clamp(320px, 41vw, 450px) minmax(0, 1fr) !important;
    gap: 8px;
  }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls { grid-template-columns: 55px minmax(0, 1fr); gap: 4px; padding: 5px; }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls #selected-tool-preview.tilemap-composite { width: 44px !important; height: 44px !important; }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-edge-controls .tilemap-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-hammer-palette="tilemap"] #editor-panel #tilemap-filter-bar button { flex: 1 1 28%; }
}
@media (max-width: 760px) {
  body[data-hammer-palette="tilemap"]:is([data-hammer-mode="editor"], [data-hammer-test="true"]) .workspace.editor-open { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 10px; }
  body[data-hammer-palette="tilemap"] .workspace.editor-open > :is(.editor-panel, .game-column) { grid-column: 1; grid-row: auto; width: 100%; min-width: 0; }
  body[data-hammer-palette="tilemap"] #editor-panel { height: min(740px, 84svh); max-height: none !important; min-height: 0 !important; padding: 7px !important; }
  body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-grid, .tilemap-rotation-sheet) { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)) !important; }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls { grid-template-columns: 58px minmax(0, 1fr); gap: 4px; }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls #selected-tool-preview.tilemap-composite { width: 44px !important; height: 44px !important; }
  body[data-hammer-palette="tilemap"] #editor-panel #tilemap-filter-bar button { flex: 1 1 28%; }
}
@media (max-width: 420px) {
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-common-editor > label { grid-template-columns: 58px minmax(0, 1fr); }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-edge-controls .tilemap-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls #selected-tool-inspector { align-self: start; }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls .hammer-tile-direction { flex-wrap: wrap; }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-rotate { flex: 1; }
}
@media (max-height: 680px) {
  body[data-hammer-palette="tilemap"] #editor-panel { gap: 3px; }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-common-editor { gap: 3px 5px; }
  body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls { padding: 4px; gap: 3px 6px; }
  body[data-hammer-palette="tilemap"] #editor-panel #tilemap-guide-legend { margin: 2px 0; }
  body[data-hammer-palette="tilemap"] #editor-panel #editor-workbench-heading { min-height: 25px; padding-bottom: 3px; }
}
@media (pointer: coarse) {
  body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tool-card, .tilemap-rotation-card) { min-height: 88px !important; }
  body[data-hammer-palette="tilemap"] #editor-panel #tools :is(.tilemap-choices button, #hammer-bg-fit, #hammer-bg-map-copy),
  body[data-hammer-palette="tilemap"] #editor-panel #editor-pane-tools > .row:has(#undo) button,
  body[data-hammer-palette="tilemap"] #editor-panel #test-button { min-height: 40px !important; }
}
@supports not (backdrop-filter: blur(1px)) {
  body[data-hammer-palette="tilemap"] #editor-panel { background: #0a1a2a; }
}
/* Explicit stamps replace the global orientation picker. */
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls .hammer-tile-direction {display:none!important}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls #selected-tool-inspector {grid-row:1/3!important}
body[data-hammer-palette="tilemap"] #editor-panel #hammer-tile-art-controls #tilemap-color-button {grid-column:1/-1;min-height:25px;padding:3px;font:600 10px/1.3 "Segoe UI",sans-serif;background:#193f62;border-color:#6189ac}
body[data-hammer-palette="tilemap"] #editor-panel #tool-group-terrain > :is([data-tool^="art:"],[data-tool^="decor:ref2d-"]) {display:none!important}
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet {grid-column:1/-1;min-width:0;width:100%}
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet h4 {font:700 10px/1.4 Orbitron,sans-serif;color:#9ab8d5;margin:9px 1px 5px;letter-spacing:.09em}
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet .tilemap-rotation-grid {display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px;min-width:0}
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet .tilemap-rotation-card {grid-column:auto!important;grid-row:auto!important;height:76px;min-width:0;margin:0;padding:4px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;overflow:hidden;border-radius:4px;border:1px solid #33669988;background:#081a2b}
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet .tilemap-rotation-card[aria-pressed="true"] {outline:2px solid #c2def6;outline-offset:-2px;background:#244c70}
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet .tilemap-rotation-card[data-tile-role="breakable"] {border-bottom:2px solid #42d983}
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet .tilemap-rotation-card[data-tile-role="solid"] {border-bottom:2px solid #ed6773}
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet .tilemap-rotation-card[hidden] {display:none!important}
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet .tilemap-rotation-title {font:600 9px/1.2 "Segoe UI",sans-serif!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%;color:#d4e3f1;white-space:normal}
body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet .tilemap-rotation-visual {width:44px!important;height:44px!important;max-width:44px!important;max-height:44px!important;margin:0!important;flex:none}
body[data-hammer-palette="tilemap"] #editor-panel .tilemap-enemy-icon {display:block!important;width:60px;height:64px;object-fit:contain;image-rendering:pixelated;margin:auto}
body[data-hammer-palette="tilemap"] #editor-panel #tools .tilemap-enemy-card {height:98px!important;min-height:98px!important}
body[data-hammer-palette="tilemap"] #editor-panel #selected-tool-preview:has(.tilemap-enemy-icon) {background:none!important;transform:none!important}
body[data-hammer-palette="tilemap"] #editor-panel #selected-tool-preview>.tilemap-enemy-icon {width:62px;height:62px}
#tilemap-color-dialog {width:min(350px,90vw);padding:16px;border:1px solid #618db5;border-radius:9px;background:#091c2df5;color:#d8e9f6;box-shadow:0 20px 70px #000b;font:12px/1.5 "Segoe UI",sans-serif}
#tilemap-color-dialog::backdrop {background:#01091499;backdrop-filter:blur(4px)}
#tilemap-color-dialog header,#tilemap-color-dialog footer {display:flex;align-items:center;justify-content:space-between;gap:8px}
#tilemap-color-dialog header strong {font:700 11px/1.4 Orbitron,sans-serif;letter-spacing:.07em}
#tilemap-color-dialog button {min-height:30px;border:1px solid #527da5;border-radius:4px;background:#163953;color:#e4f1ff;font:600 11px/1.4 "Segoe UI",sans-serif;padding:6px 10px}
#tilemap-color-dialog label {display:grid;gap:5px;margin:12px 0;font-size:10px;letter-spacing:.06em}
#tilemap-color-dialog input {width:100%;background:#041321;color:#e3f3ff;border:1px solid #527da5;padding:8px;font:14px/1.4 monospace;border-radius:4px}
#tilemap-color-swatches {display:grid;grid-template-columns:repeat(8,1fr);gap:5px}
#tilemap-color-swatches button {min-width:0;min-height:27px;padding:0;border-color:#bed5e6}
@media(max-width:1099px){body[data-hammer-palette="tilemap"] #editor-panel #tilemap-rotation-sheet .tilemap-rotation-grid {grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Rotation canvases remain native content inside legacy atlas wrapper spans.
 * The old .hammer-atlas-visual > * rule also assigns content:none!important. */
body[data-hammer-palette="tilemap"] #editor-panel .tilemap-composite > canvas.tilemap-composite-canvas {
  display:block!important;
  content:normal!important;
  visibility:visible!important;
  opacity:1!important;
  width:100%!important;
  height:100%!important;
  image-rendering:pixelated;
}
