.free-canvas-map-component { position: relative; display: block; }
.free-canvas-map-preview { display: block; width: 100%; height: auto; border: 0; border-radius: 0; background: #121821; image-rendering: pixelated; }
.free-canvas-map-selection-meta { position: absolute; top: calc(100% + 9px); left: 50%; display: none; min-width: max-content; transform: translateX(-50%); color: var(--text); text-align: center; pointer-events: none; text-shadow: 0 1px 2px var(--surface), 0 0 5px var(--surface); }
.free-canvas-map-selection-meta strong,
.free-canvas-map-selection-meta span { display: block; }
.free-canvas-map-selection-meta strong { margin-bottom: 4px; font-size: 11px; }
.free-canvas-map-selection-meta span { font-size: 12px; font-weight: 700; }
.free-canvas-map-summary { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-dim); font-size: 11px; }
.free-canvas-map-summary span { padding: 3px 7px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface2); }
.free-canvas-map-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
.free-canvas-node[data-map-component="true"] { min-width: 0; min-height: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; cursor: move; }
.free-canvas-node[data-map-component="true"].selected { border: 0; box-shadow: none; }
.free-canvas-node[data-map-component="true"] .free-canvas-node-head,
.free-canvas-node[data-map-component="true"] .free-canvas-map-summary,
.free-canvas-node[data-map-component="true"] .free-canvas-map-actions,
.free-canvas-node[data-map-component="true"] .free-canvas-port,
.free-canvas-node[data-map-component="true"] .free-canvas-resize-handle { display: none !important; }
.free-canvas-node[data-map-component="true"] .free-canvas-node-body { padding: 0; overflow: visible; border-radius: 0; }
.free-canvas-node[data-map-component="true"].selected .free-canvas-map-preview { outline: 2px solid color-mix(in srgb, var(--accent) 88%, white 12%); outline-offset: 4px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent); }
.free-canvas-node[data-map-component="true"].selected .free-canvas-map-selection-meta { display: block; }
body.map-editor-open { overflow: hidden; }
.map-editor-overlay {
  --map-bg: var(--bg);
  --map-panel: var(--surface);
  --map-panel-2: var(--surface2);
  --map-line: var(--border);
  --map-text: var(--text);
  --map-muted: var(--text-muted);
  --map-accent: var(--accent);
  --map-palette-height: 178px;
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  grid-template-rows: 58px minmax(0, 1fr) var(--map-palette-height);
  background: var(--map-bg);
  color: var(--map-text);
  font-family: Inter, "Microsoft YaHei UI", "PingFang SC", sans-serif;
}
.map-editor-overlay.open { display: grid; }
.map-editor-overlay button,
.map-editor-overlay input,
.map-editor-overlay select { font: inherit; }
.map-editor-header {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--map-line);
  background: color-mix(in srgb, var(--map-panel) 94%, var(--map-bg) 6%);
  box-shadow: var(--shadow-sm, 0 8px 24px rgba(0,0,0,.2));
}
.map-editor-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.map-editor-heading > button,
.map-editor-header-actions button,
.map-editor-tools button,
.map-editor-palette-head button,
.map-editor-section-head button {
  border: 1px solid var(--map-line);
  border-radius: 7px;
  background: var(--map-panel-2);
  color: var(--map-text);
  cursor: pointer;
}
.map-editor-heading > button { width: 36px; height: 36px; font-size: 20px; }
.map-editor-heading div { display: grid; min-width: 0; }
.map-editor-heading strong { overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.map-editor-heading small { color: var(--map-muted); font-size: 10px; }
.map-editor-name { width: 100%; height: 34px; padding: 0 11px; border: 1px solid var(--map-line); border-radius: 7px; outline: none; background: var(--map-bg); color: var(--map-text); }
.map-editor-name:focus { border-color: var(--map-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--map-accent) 16%, transparent); }
.map-editor-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.map-editor-header-actions button { min-width: 34px; height: 34px; padding: 0 10px; font-size: 11px; white-space: nowrap; }
.map-editor-header-actions button.primary { border-color: var(--map-accent); background: var(--map-accent); color: #fff; font-weight: 700; }
.map-editor-overlay button:hover:not(:disabled) { border-color: color-mix(in srgb, var(--map-accent) 70%, var(--map-line)); background: color-mix(in srgb, var(--map-panel-2) 78%, var(--map-accent) 22%); }
.map-editor-overlay button:disabled { opacity: .35; cursor: default; }
.map-editor-body { min-height: 0; display: grid; grid-template-columns: 66px minmax(0, 1fr) 224px; }
.map-editor-tools {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 10px 8px;
  border-right: 1px solid var(--map-line);
  background: var(--map-panel);
}
.map-editor-tools button { min-height: 44px; display: grid; place-items: center; padding: 4px; }
.map-editor-tools button span { font-size: 17px; line-height: 1; }
.map-editor-tool-icon { display: grid; place-items: center; }
.map-editor-tool-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map-editor-tools button.map-editor-tool-icon svg { width: 18px; height: 18px; }
.map-editor-tools button small { color: var(--map-muted); font-size: 9px; }
.map-editor-tools button.active { border-color: var(--map-accent); background: color-mix(in srgb, var(--map-accent) 18%, var(--map-panel-2)); color: var(--map-accent); box-shadow: inset 3px 0 0 var(--map-accent); }
.map-editor-tools i { flex: 1; min-height: 8px; }
.map-editor-tools output { color: var(--map-muted); font-size: 10px; text-align: center; }
.map-editor-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--map-accent) 9%, transparent), transparent 46%), var(--map-bg);
  touch-action: none;
}
.map-editor-stage canvas { display: block; width: 100%; height: 100%; cursor: crosshair; image-rendering: pixelated; }
.map-editor-stage-status { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; justify-content: space-between; gap: 12px; pointer-events: none; color: var(--map-muted); font-size: 10px; text-shadow: 0 1px 3px color-mix(in srgb, var(--map-bg) 75%, transparent); }
.map-editor-inspector { min-height: 0; overflow-y: auto; border-left: 1px solid var(--map-line); background: var(--map-panel); }
.map-editor-inspector section { padding: 13px; border-bottom: 1px solid var(--map-line); }
.map-editor-inspector h3 { margin: 0 0 10px; color: var(--map-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.map-editor-setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.map-editor-setting-grid label { display: grid; gap: 4px; color: var(--map-muted); font-size: 10px; }
.map-editor-setting-grid input,
.map-editor-setting-grid select { width: 100%; height: 30px; padding: 0 7px; border: 1px solid var(--map-line); border-radius: 6px; outline: none; background: var(--map-bg); color: var(--map-text); }
.map-editor-setting-grid input[type="color"] { padding: 3px; }
.map-editor-check { display: flex; align-items: center; gap: 7px; margin-top: 10px; color: var(--map-muted); font-size: 11px; }
.map-editor-pixel-size { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; padding: 8px 9px; border: 1px solid color-mix(in srgb, var(--map-accent) 34%, var(--map-line)); border-radius: 7px; background: color-mix(in srgb, var(--map-accent) 8%, var(--map-bg)); }
.map-editor-pixel-size span { color: var(--map-muted); font-size: 9px; }
.map-editor-pixel-size strong { color: var(--map-text); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.map-editor-section-head { display: flex; align-items: center; justify-content: space-between; }
.map-editor-section-head h3 { margin: 0; }
.map-editor-section-head button { width: 26px; height: 26px; }
.map-editor-layers { display: grid; gap: 5px; margin-top: 9px; }
.map-editor-layer { display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px; align-items: center; min-height: 34px; border: 1px solid transparent; border-radius: 7px; background: var(--map-bg); }
.map-editor-layer.active { border-color: color-mix(in srgb, var(--map-accent) 65%, var(--map-line)); background: color-mix(in srgb, var(--map-accent) 12%, var(--map-panel)); }
.map-editor-layer button { height: 32px; border: 0; background: transparent; color: var(--map-muted); cursor: pointer; }
.map-editor-layer button:nth-child(2) { overflow: hidden; color: var(--map-text); text-align: left; white-space: nowrap; text-overflow: ellipsis; }
.map-editor-help p { margin: 0; color: var(--map-muted); font-size: 10px; line-height: 1.7; }
.map-editor-palette-shell { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 7px; padding: 10px 14px 12px; border-top: 1px solid var(--map-line); background: var(--map-panel); }
.map-editor-palette-resize { position: absolute; z-index: 5; top: -7px; left: 0; right: 0; width: 100%; height: 14px; padding: 0; border: 0; background: transparent; cursor: ns-resize; touch-action: none; }
.map-editor-overlay .map-editor-palette-resize:hover:not(:disabled) { border: 0; background: transparent; }
.map-editor-palette-resize span { display: block; width: 42px; height: 4px; margin: auto; border-radius: 999px; background: color-mix(in srgb, var(--map-muted) 54%, transparent); opacity: .55; transition: width 120ms ease, opacity 120ms ease, background 120ms ease; }
.map-editor-palette-resize:hover span,
.map-editor-overlay.resizing-palette .map-editor-palette-resize span { width: 72px; background: var(--map-accent); opacity: 1; }
.map-editor-overlay.resizing-palette { cursor: ns-resize; user-select: none; }
.map-editor-palette-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.map-editor-palette-head > div:first-child { display: grid; }
.map-editor-palette-head strong { font-size: 12px; }
.map-editor-palette-head span { color: var(--map-muted); font-size: 9px; }
.map-editor-palette-head > div:last-child { display: flex; gap: 6px; }
.map-editor-palette-head button { height: 28px; padding: 0 9px; font-size: 10px; }
.map-editor-palette-groups { min-width: 0; display: flex; align-items: center; gap: 5px; overflow-x: auto; padding-bottom: 1px; scrollbar-width: thin; }
.map-editor-palette-groups button { flex: 0 0 auto; min-width: 74px; height: 27px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 8px; border: 1px solid var(--map-line); border-radius: 7px; background: var(--map-bg); color: var(--map-muted); cursor: pointer; }
.map-editor-palette-groups button span { max-width: 130px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.map-editor-palette-groups button small { min-width: 18px; padding: 2px 4px; border-radius: 999px; background: var(--map-panel-2); color: var(--map-muted); font-size: 8px; text-align: center; }
.map-editor-palette-groups button.active { border-color: var(--map-accent); background: color-mix(in srgb, var(--map-accent) 14%, var(--map-panel)); color: var(--map-accent); }
.map-editor-palette-groups button.active small { background: color-mix(in srgb, var(--map-accent) 20%, var(--map-panel-2)); color: var(--map-accent); }
.map-editor-palette { min-height: 0; display: flex; align-items: flex-start; gap: 10px; overflow: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.map-editor-palette-items { display: flex; flex: 0 0 auto; gap: 8px; }
.map-editor-palette-items > button { flex: 0 0 78px; width: 78px; height: 96px; padding: 6px; border: 1px solid var(--map-line); border-radius: 8px; background: var(--map-bg); color: var(--map-text); cursor: pointer; }
.map-editor-palette-items > button.active { border-color: var(--map-accent); background: color-mix(in srgb, var(--map-accent) 13%, var(--map-panel)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--map-accent) 16%, transparent); }
.map-editor-palette-items > button > span { width: 62px; height: 62px; display: grid; place-items: center; overflow: hidden; border-radius: 5px; background: linear-gradient(135deg, var(--tile-accent), var(--tile-color) 48%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--map-text) 12%, transparent); image-rendering: pixelated; }
.map-editor-palette-items > button img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.map-editor-palette-items > button small { display: block; margin-top: 5px; overflow: hidden; color: var(--map-muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.map-editor-atlas-card { flex: 0 0 auto; display: grid; align-content: start; gap: 5px; padding: 6px; border: 1px solid var(--map-line); border-radius: 9px; background: var(--map-bg); }
.map-editor-atlas-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 22px; }
.map-editor-atlas-head strong { max-width: 150px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.map-editor-atlas-head > span { display: flex; align-items: center; gap: 6px; }
.map-editor-atlas-head small { color: var(--map-muted); font-size: 9px; white-space: nowrap; }
.map-editor-terrain-button { height: 22px; padding: 0 7px; border: 1px solid var(--map-line); border-radius: 6px; background: var(--map-panel-2); color: var(--map-muted); font-size: 9px; cursor: pointer; }
.map-editor-terrain-button.active { border-color: var(--map-accent); background: color-mix(in srgb, var(--map-accent) 18%, var(--map-panel)); color: var(--map-accent); box-shadow: inset 0 0 0 1px var(--map-accent); }
.map-editor-mask-debug-button { height: 22px; padding: 0 7px; border: 1px solid var(--map-line); border-radius: 6px; background: var(--map-panel-2); color: var(--map-muted); font-size: 9px; cursor: pointer; }
.map-editor-mask-debug-button.active { border-color: var(--map-accent); color: var(--map-accent); }
.map-editor-transition-label { margin: 0; color: var(--map-accent); font-size: 9px; }
.map-editor-atlas-grid { position: relative; display: grid; overflow: hidden; min-height: 78px; border: 1px solid var(--map-line); border-radius: 6px; background: var(--map-panel-2); isolation: isolate; image-rendering: pixelated; }
.map-editor-atlas-grid > img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: fill; image-rendering: pixelated; }
.map-editor-atlas-grid > button { position: absolute; min-width: 4px; min-height: 4px; padding: 0; border: 1px solid color-mix(in srgb, var(--map-line) 68%, transparent); border-radius: 0; background: transparent; cursor: pointer; }
.map-editor-atlas-grid > button:hover { border-color: var(--map-accent); background: color-mix(in srgb, var(--map-accent) 10%, transparent); }
.map-editor-atlas-grid > button.active { z-index: 1; border-color: var(--map-accent); background: color-mix(in srgb, var(--map-accent) 14%, transparent); box-shadow: inset 0 0 0 2px var(--map-accent); }
.map-editor-mask-debug { width: 304px; display: grid; gap: 5px; padding-top: 4px; border-top: 1px solid var(--map-line); }
.map-editor-mask-debug > header { display: flex; justify-content: space-between; color: var(--map-text); font-size: 9px; }
.map-editor-mask-debug > header small { color: var(--map-muted); }
.map-editor-mask-debug > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.map-editor-mask-cell { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 4px; align-items: center; padding: 3px; border: 1px solid var(--map-line); border-radius: 5px; background: var(--map-panel-2); }
.map-editor-mask-cell i { grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 3px; background-repeat: no-repeat; image-rendering: pixelated; }
.map-editor-mask-cell span,
.map-editor-mask-cell small { overflow: hidden; font-size: 7px; line-height: 1.25; white-space: nowrap; text-overflow: ellipsis; }
.map-editor-mask-cell small { color: var(--map-muted); }
.map-editor-mask-cell.missing { grid-template-columns: 1fr; opacity: .6; }
.map-editor-atlas-import {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--map-bg) 72%, transparent);
  backdrop-filter: blur(8px);
}
.map-editor-atlas-import[hidden] { display: none; }
.map-editor-atlas-import-panel {
  width: min(920px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid var(--map-line);
  border-radius: 14px;
  background: var(--map-panel);
  box-shadow: 0 24px 80px color-mix(in srgb, var(--map-bg) 60%, transparent);
}
.map-editor-atlas-import-panel > header,
.map-editor-atlas-import-panel > footer { display: flex; align-items: center; gap: 8px; padding: 12px 16px; }
.map-editor-atlas-import-panel > header { justify-content: space-between; border-bottom: 1px solid var(--map-line); }
.map-editor-atlas-import-panel > header > div { display: grid; gap: 3px; }
.map-editor-atlas-import-panel > header strong { font-size: 14px; }
.map-editor-atlas-import-panel > header small { color: var(--map-muted); font-size: 10px; }
.map-editor-atlas-import-panel > header button { width: 32px; height: 32px; padding: 0; border: 1px solid var(--map-line); border-radius: 7px; background: var(--map-panel-2); color: var(--map-text); cursor: pointer; }
.map-editor-atlas-import-body { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, .75fr); gap: 18px; padding: 18px; overflow: auto; }
.map-editor-atlas-preview { min-width: 0; display: grid; align-content: start; gap: 9px; }
.map-editor-atlas-preview-image { position: relative; min-height: 320px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--map-line); border-radius: 10px; background-color: var(--map-bg); background-image: linear-gradient(45deg, var(--map-panel-2) 25%, transparent 25%), linear-gradient(-45deg, var(--map-panel-2) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--map-panel-2) 75%), linear-gradient(-45deg, transparent 75%, var(--map-panel-2) 75%); background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-size: 16px 16px; }
.map-editor-atlas-preview-image > img,
.map-editor-atlas-preview-image > svg { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; image-rendering: pixelated; }
.map-editor-atlas-preview-image > svg { overflow: visible; pointer-events: none; }
.map-editor-atlas-preview-image rect { fill: color-mix(in srgb, var(--map-accent) 7%, transparent); stroke: var(--map-accent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.map-editor-atlas-preview p { margin: 0; color: var(--map-muted); font-size: 10px; line-height: 1.6; }
.map-editor-atlas-controls { display: grid; align-content: start; gap: 14px; }
.map-editor-atlas-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.map-editor-atlas-fields label { display: grid; gap: 5px; color: var(--map-muted); font-size: 10px; }
.map-editor-atlas-fields input { width: 100%; height: 34px; padding: 0 9px; border: 1px solid var(--map-line); border-radius: 7px; outline: none; background: var(--map-bg); color: var(--map-text); }
.map-editor-atlas-fields input:focus { border-color: var(--map-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--map-accent) 14%, transparent); }
.map-editor-atlas-result { display: grid; gap: 4px; padding: 11px; border: 1px solid var(--map-line); border-radius: 8px; background: var(--map-bg); }
.map-editor-atlas-result strong { font-size: 12px; }
.map-editor-atlas-result span { color: var(--map-muted); font-size: 10px; }
.map-editor-atlas-auto { display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid color-mix(in srgb, var(--map-accent) 45%, var(--map-line)); border-radius: 8px; background: color-mix(in srgb, var(--map-accent) 8%, var(--map-panel)); cursor: pointer; }
.map-editor-atlas-auto > span { display: grid; gap: 4px; }
.map-editor-atlas-auto strong { font-size: 11px; }
.map-editor-atlas-auto small { color: var(--map-muted); font-size: 9px; line-height: 1.5; }
.map-editor-atlas-pair-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 7px; padding: 11px; border: 1px solid var(--map-line); border-radius: 8px; background: var(--map-bg); }
.map-editor-atlas-pair-fields[hidden] { display: none; }
.map-editor-atlas-pair-fields label { display: grid; gap: 5px; color: var(--map-muted); font-size: 10px; }
.map-editor-atlas-pair-fields > span { padding-bottom: 10px; color: var(--map-accent); font-weight: 700; }
.map-editor-atlas-pair-fields select { min-width: 0; width: 100%; height: 34px; padding: 0 8px; border: 1px solid var(--map-line); border-radius: 7px; outline: 0; background: var(--map-panel-2); color: var(--map-text); }
.map-editor-atlas-import-panel > footer { border-top: 1px solid var(--map-line); }
.map-editor-atlas-import-panel > footer i { flex: 1; }
.map-editor-atlas-import-panel > footer button { height: 34px; padding: 0 12px; border: 1px solid var(--map-line); border-radius: 7px; background: var(--map-panel-2); color: var(--map-text); cursor: pointer; }
.map-editor-atlas-import-panel > footer button.primary { border-color: var(--map-accent); background: var(--map-accent); color: #fff; font-weight: 700; }
@media (max-width: 980px) {
  .map-editor-overlay { grid-template-rows: auto minmax(0, 1fr) var(--map-palette-height); }
  .map-editor-header { grid-template-columns: 1fr auto; }
  .map-editor-name { grid-column: 1 / -1; grid-row: 2; }
  .map-editor-header-actions button:not(.primary):nth-of-type(n+3) { display: none; }
  .map-editor-body { grid-template-columns: 58px minmax(0, 1fr); }
  .map-editor-inspector { position: absolute; top: 0; right: 0; bottom: 0; width: min(224px, 42vw); z-index: 3; background: color-mix(in srgb, var(--map-panel) 96%, transparent); backdrop-filter: blur(16px); }
  .map-editor-stage { grid-column: 2; }
  .map-editor-palette-items > button { flex-basis: 68px; width: 68px; height: 76px; }
  .map-editor-palette-items > button > span { width: 52px; height: 45px; }
}
@media (max-width: 680px) {
  .map-editor-header { padding: 6px 8px; gap: 7px; }
  .map-editor-heading small, .map-editor-name { display: none; }
  .map-editor-header-actions button { padding: 0 7px; }
  .map-editor-header-actions button:not(.primary) { display: none; }
  .map-editor-body { grid-template-columns: 52px minmax(0, 1fr); }
  .map-editor-inspector { display: none; }
  .map-editor-tools { padding: 7px 5px; }
  .map-editor-tools button { min-height: 40px; }
  .map-editor-tools button small { display: none; }
  .map-editor-palette-head span, .map-editor-palette-head button:last-child { display: none; }
  .map-editor-atlas-import { padding: 8px; }
  .map-editor-atlas-import-panel { max-height: calc(100vh - 16px); }
  .map-editor-atlas-import-body { grid-template-columns: 1fr; padding: 12px; }
  .map-editor-atlas-preview-image { min-height: 220px; }
}
@media (prefers-reduced-motion: reduce) { .map-editor-overlay * { scroll-behavior: auto !important; transition: none !important; } }
