/* Reuse approved painted raster UI; never resize the fixed window/stage. */
.battle-game .party-sprite { width: calc(176px * var(--aot-sprite-canvas-ratio, 1) * var(--aot-layout-size, 1)); }
.battle-game .enemy-sprite { width: calc(min(223px, var(--enemy-sprite-width, 180px)) * var(--aot-sprite-canvas-ratio, 1) * var(--aot-layout-size, 1)); }
.battle-game .enemy-sprite-fallback { width: calc(108px * var(--aot-layout-size, 1)); }
.battle-game .stage-layout-panel {
  position: absolute; inset: auto 0 0; height: 152px; z-index: 80; padding: 9px 14px;
  border: 0 solid transparent; border-image: var(--ui-panel) 100 fill / 9px / 0 stretch;
  background: none; color: var(--cream); display: grid; gap: 6px;
  grid-template-rows: 30px 36px 27px 15px; font-size: 11px;
}
.battle-game .stage-layout-panel[hidden] { display: none; }
.stage-layout-panel button { min-height: 26px; }
.stage-layout-heading, .stage-layout-fields, .stage-layout-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stage-layout-heading strong { white-space: nowrap; }
.stage-layout-actors { display: flex; flex: 1; gap: 3px; min-width: 0; overflow-x: auto; }
.stage-layout-actors .top-button { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; padding: 6px 12px; }
.stage-layout-actors [aria-pressed="true"] { border-image-source: var(--ui-selected); }
.stage-layout-fields label { flex: 1; display: flex; align-items: center; gap: 8px; }
.stage-layout-fields label > span { width: 45px; }
.stage-layout-fields input[type="number"] { width: 70px; padding: 6px 10px; font: inherit; color: var(--cream); background: none; border: 0 solid transparent; border-image: var(--ui-normal) 42 130 fill / 7px 13px / 0 stretch; }
.stage-layout-fields input[type="range"] { flex: 1; min-width: 30px; appearance: none; height: 10px; background: url('../art/ui/painted-menus-v1/gauge-empty.png') center / 100% 100% no-repeat; }
.stage-layout-fields input[type="range"]::-webkit-slider-thumb { appearance: none; width: 20px; height: 22px; background: url('../art/ui/painted-menus-v1/icon-arrow-96.png') center / contain no-repeat; }
.stage-layout-fields input[type="range"]::-moz-range-thumb { border: 0; width: 20px; height: 22px; background: url('../art/ui/painted-menus-v1/icon-arrow-96.png') center / contain no-repeat; }
.stage-layout-actions button { font-size: 11px; padding: 6px 15px; }
.stage-layout-actions small { margin-left: auto; font-size: 10px; }
.stage-layout-panel p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.battle-game.aot-layout-editing .combatant { pointer-events: auto !important; cursor: grab; touch-action: none; }
.battle-game.aot-layout-editing .combatant:active { cursor: grabbing; }
.battle-game.aot-layout-editing .combatant.targetable:hover { transform: translate(-50%, -100%); }
.battle-game.aot-layout-editing .combatant[data-layout-selected="true"]::after {
  content: ''; position: absolute; top: -20px; left: calc(50% - 10px); width: 20px; height: 20px;
  background: url('../art/ui/painted-menus-v1/icon-arrow-96.png') center / contain no-repeat; pointer-events: none;
}
.battle-game.aot-layout-editing .result-overlay { visibility: hidden; }
