/* PP Hammer / native editor finish. Load AFTER sprite-adapter.css.
 * The PP atlas and scenery keep their original crop coordinates. No game,
 * HUD-frame, map, camera, input or renderer behaviour is changed here. */
@font-face {
  font-family: Orbitron;
  src: url('/site/assets/rai-adventure-v7/fonts/orbitron.ttf') format('truetype');
  font-display: swap;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) {
  --pp-panel: rgba(5, 19, 36, .84);
  --pp-control: rgba(16, 43, 73, .62);
  --pp-line: rgba(84, 137, 190, .58);
  --pp-focus: #b7d8fa;
  --pp-text: #e4effc;
  --pp-muted: #b3cbe3;
  --pp-family: Orbitron, 'Segoe UI', sans-serif;
  height: 100dvh;
  padding: 8px 12px;
  overflow: hidden;
  background: #020914;
  color: var(--pp-text);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: none;
  min-height: 0;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header {
  flex: none;
  min-height: 48px;
  padding: 2px 0 9px;
  gap: 12px;
  border-bottom: 1px solid rgba(51, 102, 153, .45);
  margin-bottom: 8px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header .brand b {
  font: 800 15px/1.4 var(--pp-family);
  letter-spacing: .07em;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header .brand small {
  font: 12px/1.4 'Segoe UI', Arial, sans-serif;
  letter-spacing: .07em;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header nav button {
  min-height: 38px;
  font: 700 11px/1.4 var(--pp-family);
  background: var(--pp-control);
  border-color: var(--pp-line);
  border-radius: 4px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .workspace.editor-open {
  grid-template-columns: 304px minmax(0, 1fr);
  align-items: stretch;
  flex: 1;
  min-height: 0;
  gap: 10px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .game-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 5px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #viewport {
  flex: 1;
  min-height: 150px;
  height: auto !important;
  max-height: none;
  aspect-ratio: auto;
  border: 1px solid rgba(51, 102, 153, .8);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(51, 102, 153, .16);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .hud-top,
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .hud-bottom,
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .play-toolbar,
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .footer-hint {
  flex: none;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .play-toolbar {
  min-height: 35px;
  gap: 5px 10px;
  padding: 2px 0;
  color: var(--pp-muted);
  font: 13px/1.5 'Segoe UI', Arial, sans-serif;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .play-toolbar button {
  min-height: 30px;
  padding: 6px 9px;
  font: 700 10px/1.5 var(--pp-family);
  border-color: var(--pp-line);
  background: var(--pp-control);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .footer-hint {
  font: 13px/1.4 'Segoe UI', Arial, sans-serif;
  color: var(--pp-muted);
  margin: 0;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > footer {
  flex: none;
  padding: 5px 0 0;
  font: 11px/1.4 'Segoe UI', Arial, sans-serif;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel.editor-workbench {
  position: relative;
  top: 0;
  min-height: 0;
  height: 100%;
  max-height: 100% !important;
  padding: 12px !important;
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #336699 rgba(2, 9, 20, .45);
  color: var(--pp-text);
  font: 14px/1.55 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(145deg, rgba(17, 43, 73, .75), var(--pp-panel));
  border: 1px solid #336699;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(146, 188, 230, .06), inset 0 0 35px rgba(51, 102, 153, .12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-workbench-heading {
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--pp-line);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel h2,
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-workbench-heading h2 {
  font: 800 15px/1.4 var(--pp-family) !important;
  letter-spacing: .035em;
  color: #ecf5ff;
  text-shadow: 0 0 9px rgba(51, 102, 153, .65);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel h3 {
  font: 700 13px/1.5 var(--pp-family);
  color: #d5eaff;
  letter-spacing: .04em;
  margin: 18px 0 9px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel button,
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel select {
  font-family: var(--pp-family);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel button {
  min-height: 36px;
  padding: 8px;
  border: 1px solid var(--pp-line);
  border-radius: 4px;
  background: var(--pp-control);
  color: var(--pp-text);
  font-size: 11px;
  line-height: 1.5;
  box-shadow: inset 0 1px rgba(213, 234, 255, .035);
  transform: none !important;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel button:hover:not(:disabled) {
  border-color: #91bdea;
  background-color: rgba(51, 102, 153, .62);
  box-shadow: inset 0 0 12px rgba(51, 102, 153, .16), 0 0 10px rgba(51, 102, 153, .3);
  color: #fff;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel button:is([aria-pressed="true"], [aria-selected="true"]) {
  color: #fff;
  border-color: #abd1f9;
  background: rgba(51, 102, 153, .6);
  box-shadow: inset 0 0 0 1px rgba(164, 204, 244, .16), 0 0 12px rgba(51, 102, 153, .32);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel button:disabled {
  opacity: .42;
  box-shadow: none;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) :is(#editor-panel, .play-toolbar, .shell > header) :is(button, input, select, textarea, summary, a):focus-visible {
  outline: 2px solid var(--pp-focus);
  outline-offset: 3px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-main-menu {
  min-width: 61px;
  font-size: 10px;
  padding: 7px 9px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .editor-tabs {
  gap: 5px;
  margin-bottom: 12px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .editor-tabs button {
  min-height: 39px;
  font-size: 10px;
  letter-spacing: .025em;
  padding: 8px 3px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel label,
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .muted,
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel p,
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .editor-status {
  color: var(--pp-muted);
  font: 14px/1.55 'Segoe UI', Arial, sans-serif;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel label {
  margin: 10px 0;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel :is(input:not([type="range"]), select, textarea) {
  min-height: 38px;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--pp-line);
  background: rgba(2, 12, 25, .76);
  border-radius: 4px;
  color: var(--pp-text);
  font: 14px/1.4 'Segoe UI', Arial, sans-serif;
  padding: 8px 9px;
  margin-top: 5px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel input::placeholder {
  color: #9db7d1;
  opacity: 1;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel :is(input[type="range"], input[type="color"]) {
  accent-color: #6f9fce;
  min-height: 30px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #selected-tool-inspector {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  margin: 0 0 12px;
  background: rgba(5, 18, 34, .6);
  border: 1px solid var(--pp-line);
  border-radius: 4px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #selected-tool-name {
  color: #f0f7ff;
  font: 700 13px/1.5 var(--pp-family);
  overflow-wrap: anywhere;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #selected-tool-description {
  font: 14px/1.5 'Segoe UI', Arial, sans-serif;
  margin: 4px 0 6px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #selected-tool-inspector small,
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #selected-tool-cell {
  color: #a3c4e4;
  font: 11px/1.5 'Segoe UI', Arial, sans-serif;
  letter-spacing: .03em;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #selected-tool-preview {
  display: block;
  justify-self: center;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-editor-controls {
  margin: 0 0 12px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-autodraft-state {
  font: 11px/1.6 'Segoe UI', Arial, sans-serif;
  letter-spacing: .05em;
  color: #b9d6ee;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel :is(.theme-material-section, #editor-save-section, .tool-category) {
  border: 1px solid var(--pp-line);
  border-radius: 4px;
  background: rgba(3, 15, 30, .46);
  margin: 8px 0;
  padding: 8px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-category {
  padding: 0;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel :is(summary, .theme-material-header b) {
  font: 700 12px/1.55 var(--pp-family);
  color: #d1e6fa;
  letter-spacing: .025em;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-category > summary {
  padding: 11px 9px;
  margin: 0;
  cursor: pointer;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-category[open] > summary {
  border-bottom: 1px solid rgba(51, 102, 153, .35);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-grid,
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel.editor-workbench .tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 9px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel.editor-workbench #tools .tool-grid .tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 105px;
  padding: 10px 4px 8px;
  white-space: normal;
  overflow-wrap: anywhere;
  /* foundation.css has an !important system-ui shorthand; replace that one. */
  font: 700 11px/1.5 var(--pp-family) !important;
  letter-spacing: .015em;
  text-align: center;
  border-radius: 4px;
  background-color: rgba(8, 28, 50, .65);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-card::after {
  content: '';
  position: absolute;
  inset: 3px;
  pointer-events: none;
  opacity: .32;
  background:
    linear-gradient(#79a9d8, #79a9d8) left top / 11px 1px no-repeat,
    linear-gradient(#79a9d8, #79a9d8) left top / 1px 11px no-repeat,
    linear-gradient(#79a9d8, #79a9d8) right bottom / 11px 1px no-repeat,
    linear-gradient(#79a9d8, #79a9d8) right bottom / 1px 11px no-repeat;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-card[aria-pressed="true"]::after {
  opacity: 1;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-card small {
  color: #aac9e7;
  font: 11px/1.4 'Segoe UI', Arial, sans-serif;
}

/* Geometry fallback can be enlarged; actual atlas/scenery crops are left intact. */
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-card-visual:not(.hammer-atlas-visual):not([data-kind="scenery"]) {
  width: 45px;
  height: 45px;
  min-height: 45px;
  margin: 0 auto;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-card-visual:not(.hammer-atlas-visual)[data-kind="ladder"] {
  width: 30px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-card-visual:not(.hammer-atlas-visual)[data-kind="erase"] {
  width: 38px;
  height: 25px;
  min-height: 25px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .scenery-preview {
  display: block;
  flex: none;
  background-repeat: no-repeat;
  margin: 0 auto;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .variant-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .swatch-row {
  gap: 5px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .variant-swatch {
  min-height: 46px;
  padding: 5px 2px;
  font-size: 9px !important;
  line-height: 1.4;
  white-space: normal;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .theme-chip-row button {
  min-height: 37px;
  font-size: 10px;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .editor-test-action {
  bottom: -12px;
  padding: 12px 0;
  margin: 5px 0 0;
  background: linear-gradient(transparent, rgba(5, 19, 36, .96) 32%);
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #test-button {
  min-height: 42px;
  border-color: #a4c8ec;
  background: rgba(51, 102, 153, .74);
  font: 800 12px/1.5 var(--pp-family) !important;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-legacy-catalog :is(p, ul) {
  padding-right: 8px;
  color: var(--pp-muted);
  font: 14px/1.6 'Segoe UI', Arial, sans-serif;
}

:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-legacy-catalog a {
  font: 700 11px/1.6 var(--pp-family);
  white-space: normal;
  margin: 8px;
  border-radius: 4px;
}

@media (max-width: 1150px) {
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) { padding: 7px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .workspace.editor-open { grid-template-columns: 278px minmax(0, 1fr); gap: 8px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header { flex-wrap: wrap; min-height: 0; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header .brand small { display: none; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header nav { gap: 4px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header nav button { padding: 6px 8px; font-size: 10px; min-height: 32px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .play-toolbar { flex-wrap: wrap; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .play-toolbar > div { gap: 4px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .play-toolbar button { min-height: 28px; font-size: 9px; padding: 4px 6px; }
}

/* Small touch screens keep a usable arena and a finite, separately scrolling
 * workbench below it; labels are never reduced to the former 5–8px text. */
@media (max-width: 720px) {
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) { height: 100dvh; padding: 5px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .workspace.editor-open { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(220px, 1fr) minmax(180px, 42dvh); gap: 7px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .workspace.editor-open .game-column { grid-column: 1; grid-row: 1; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .workspace.editor-open #editor-panel { grid-column: 1; grid-row: 2; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header { margin-bottom: 5px; padding-bottom: 5px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header .brand { flex: 1; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header .brand b { font-size: 13px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header nav { width: 100%; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 4px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > header nav button { flex: none; min-height: 34px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #viewport { min-height: 130px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .play-toolbar > span,
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .footer-hint { display: none; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .play-toolbar { min-height: 28px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .shell > footer { display: none; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel.editor-workbench { padding: 10px !important; -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-grid,
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel.editor-workbench .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-card { min-height: 100px; }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #selected-tool-inspector { grid-template-columns: 62px minmax(0, 1fr); }
}

@media (max-width: 390px) {
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .tool-grid,
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel.editor-workbench .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel button { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel.editor-workbench {
    background: #091b30;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel button { background-color: #122d4b; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel.editor-workbench { background: rgba(7, 23, 42, .97); }
}

/* Owner sprite gallery106: one visual per card; exact source pixels. */
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #tools .tool-card:has(.scenery-preview) > .tool-card-visual {display:none!important}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #tools .tool-card {overflow:hidden;overflow-wrap:normal;word-break:normal;min-height:132px!important;gap:6px!important}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #tools .tool-card > span:not(.scenery-preview):not(.tool-card-visual) {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%;font:600 12px/1.35 'Segoe UI',Arial,sans-serif;word-break:normal;overflow-wrap:normal}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #tools .scenery-preview {background-repeat:no-repeat!important;flex:none}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-editor-controls {position:sticky;top:-12px;z-index:5;background:#081a2c;padding:10px 0 8px;border-bottom:1px solid #336699}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-editor-controls h3 {margin:0 0 8px;font:700 12px/1.4 Orbitron,sans-serif}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #selected-tool-inspector {display:grid;grid-template-columns:1fr;justify-items:center;gap:10px;text-align:center;padding:12px}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #selected-tool-preview {display:block!important;max-width:150px;max-height:132px;background-repeat:no-repeat!important}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #selected-tool-description {font:12px/1.4 'Segoe UI',Arial,sans-serif;max-width:255px}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-bg-gallery {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:10px 0}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-bg-gallery .hammer-bg-card {display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:5px;min-width:0;white-space:normal;overflow:hidden;background:#071322;border:1px solid #336699;font:12px/1.35 'Segoe UI',Arial,sans-serif}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-bg-gallery img,:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-bg-gallery .hammer-bg-off {width:100%;height:62px;object-fit:cover;display:block;background:#000}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-bg-gallery .hammer-bg-off {display:grid;place-items:center;color:#9ab9d9}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-bg-gallery strong {font:600 12px/1.4 'Segoe UI',Arial,sans-serif}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-bg-gallery small {font:10px/1.35 'Segoe UI',Arial,sans-serif;color:#a9c8e5}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-bg-gallery [aria-pressed="true"] {outline:2px solid #a5d4ff;outline-offset:0;background:#15385b}
@media(min-width:1000px){:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .workspace.editor-open {grid-template-columns:320px minmax(0,1fr)}}

/* Simple110: five user groups, one closed technical area. */
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel .editor-tabs[hidden] {display:none!important}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #tool-group-bg {display:block;padding:8px}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #tool-group-bg #hammer-background-controls {margin:0;padding:0;border:0;background:none}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #tool-group-bg #hammer-background-controls > h3 {display:none}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #tools > .tool-category > summary {font:700 13px/1.5 Orbitron,'Segoe UI',sans-serif;padding:13px 10px;color:#e0eeff;letter-spacing:0}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-level-advanced {border:1px solid #336699;border-radius:4px;background:#071829;padding:8px;margin-top:10px}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-level-advanced > summary {font:700 12px/1.5 Orbitron,sans-serif;color:#a7c1dc;cursor:pointer}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-level-advanced #theme-material-controls {border:0;background:none;margin:5px 0;padding:0}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-level-advanced #theme-material-controls > summary[hidden] {display:none!important}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-editor-controls > label {display:none}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-editor-controls #editor-autodraft-state {font-size:10px;margin:4px 0 0}

/*113 actual full-cell behavior, steel boundary is automatic. */
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-brick-behavior {display:flex;gap:5px;padding:8px 8px 0}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-brick-behavior button {flex:1;min-width:0;min-height:32px;font:700 10px/1.3 Orbitron,sans-serif;padding:5px;background:#0a2138;border:1px solid #336699}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-brick-behavior button[aria-pressed="true"] {background:#275783;outline:1px solid #b5d9fb}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-level-advanced > .tool-card {margin:7px 0;max-width:120px}

/* Latest Owner113: visual and collision are independent explicit choices. */
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-tile-art-controls {display:grid;gap:8px;padding:9px;background:#081d32;border-bottom:1px solid #336699}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-tile-art-controls label {display:grid;gap:4px;font:700 11px/1.4 Orbitron,sans-serif;color:#d5e8ff}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-tile-art-controls select {width:100%;min-width:0;font:13px/1.4 'Segoe UI',Arial,sans-serif;min-height:36px}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-all-tile-previews {margin:8px 0;border:0}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-all-tile-previews > summary {padding:8px;font:600 11px/1.4 'Segoe UI',Arial,sans-serif;color:#a6c7e6}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-structure-actions {display:flex;gap:6px;padding:7px}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-structure-actions .tool-card {min-height:36px!important;flex:1}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-structure-actions .tool-card-visual {display:none!important}

/* Keep legacy theme controls inside the one closed Advanced; dropdown23 owns visuals. */
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #theme-material-controls :is(.variant-grid,.swatch-group,.theme-chip-row) {display:none!important}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #selected-tool-inspector {grid-template-columns:96px minmax(0,1fr);justify-items:start;align-items:center;text-align:left;padding:8px;margin:0}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #selected-tool-preview {max-width:96px;max-height:84px}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #editor-panel #selected-tool-description {display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:4px 0;font-size:11px}

/*121 test retains the same workbench, while engine mode stays play/readonly. */
body[data-hammer-test="true"] .workspace.editor-open {display:grid!important;flex:1;min-height:0}
body[data-hammer-test="true"] #editor-panel.editor-workbench {display:block;min-width:0}
body[data-hammer-test="true"] #editor-workbench-heading {flex-wrap:wrap}
body[data-hammer-test="true"] #editor-mode-badge {display:inline-block;font:700 10px/1.3 Orbitron,sans-serif;color:#ffda74}
body[data-hammer-test="true"] #test-editor-return,body[data-hammer-test="true"] #test-editor-again {display:inline-block;font:700 10px/1.3 Orbitron,sans-serif;padding:9px 7px;min-height:34px;flex:1;border-color:#9fc5e9;background:#1a436c;color:#eff8ff}
body[data-hammer-test="true"] #editor-panel :is(input,select,textarea,button):disabled {opacity:.48;cursor:default}
body[data-hammer-test="true"] #test-button {display:none}

/*124 persisted quarter-turn and source-backed edge/corner controls. */
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) .hammer-tile-direction {display:grid;grid-template-columns:minmax(0,1fr) minmax(80px,.8fr);gap:7px;align-items:end}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-tile-rotate {min-height:36px;font:700 11px/1.3 Orbitron,sans-serif;padding:6px}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #hammer-tile-edge-controls[hidden] {display:none!important}
:is(body[data-hammer-mode="editor"],body[data-hammer-test="true"]) #selected-tool-preview {transform-origin:50% 50%}
