/* design/SKILL.md §4.2 / §4.3 / §6.4 — physical offsets and expanded selectors
   keep legacy Android WebViews in the same fitted stage as modern hosts. */
/* J3Card official bitmap skin.
 * §2.3 Synergy & Theme — all screens share one supplied military-exercise art language.
 * §4.2 Fitts' Law — artwork is visual only; the existing generous button hit areas remain intact.
 * §4.3 Visual Guidance — supplied title, state, card, and numeric images replace temporary text styling.
 * §6.4 Error Handling — missing card art keeps the existing explicit fallback instead of guessing.
 */

/* design/SKILL.md §2.3 / §4.2 / §4.3 — the supplied composition is a
   1268×842 content canvas. fitDxViewport uniformly fits that canvas into
   the 1270×810 WebView so every control stays reachable. */
:root {
  --official-design-width: 1268;
  --official-design-height: 842;
  --official-content-width: 1268;
  --official-content-height: 842;
}

/* design/SKILL.md §4.2 / §4.3 — one uniform DX scale, with a canvas that
   fills the host at every aspect ratio. Extra logical space extends the
   background/layout instead of exposing the WebView's white backing.
   Artwork keeps its logical size; the cursor stays in viewport coordinates. */
html.dx-host-layout, html.dx-host-layout body { overflow: hidden; background: #060c14; }
.dx-host-layout #game-container {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(100% / var(--dx-stage-scale, 1));
  height: calc(100% / var(--dx-stage-scale, 1));
  transform-origin: 0 0;
  transform: scale(var(--dx-stage-scale, 1));
}

.official-ui-active #start-screen::before,
.official-ui-active #start-screen::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 128px;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.official-ui-active #start-screen::before {
  top: 0;
  background-image: url("../assets/ui/cover/mask_top.png");
}

.official-ui-active #start-screen::after {
  bottom: 0;
  background-image: url("../assets/ui/cover/mask_bottom.png");
}

.official-ui-active #start-screen .start-content {
  z-index: 1;
  width: 728px;
  height: 366px;
  background: url("../assets/ui/cover/bg_decoration.png") center / contain no-repeat;
}

.official-ui-active #start-screen .main-title {
  visibility: hidden;
}

.official-ui-active #start-screen #btn-start {
  position: absolute;
  left: 50%;
  bottom: 11%;
  width: min(506px, 39.91vw);
  height: min(110px, 11.73vh);
  transform: translateX(-50%);
}

.official-ui-active #start-screen .start-secondary-actions {
  position: absolute;
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
}

.official-image-control {
  position: relative;
  overflow: visible;
  border: 0 !important;
  background-color: transparent !important;
  background-image: var(--official-control-art) !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  color: transparent !important;
  text-shadow: none !important;
}

.official-image-control > * {
  visibility: hidden;
}

.official-image-control:hover,
.official-image-control:focus-visible {
  filter: brightness(1.12) drop-shadow(0 0 7px rgba(246, 206, 118, 0.6));
}

.official-image-control:hover:not(:disabled),
.official-image-control:focus-visible:not(:disabled) {
  background-image: var(--official-control-art-hover, var(--official-control-art)) !important;
}
.official-image-control:active:not(:disabled) {
  background-image: var(--official-control-art-pressed, var(--official-control-art-hover, var(--official-control-art))) !important;
}

.official-image-control:disabled {
  background-image: var(--official-control-art-disabled, var(--official-control-art)) !important;
  filter: grayscale(0.7) brightness(0.65);
  cursor: not-allowed;
}

.official-ui-active #enemy-select-screen .select-header {
  min-height: 86px;
  width: min(710px, 56vw);
  aspect-ratio: 710 / 84;
  background: url("../assets/ui/enemy_select/title.png") center top / contain no-repeat;
}

.official-ui-active #enemy-select-screen .select-header > * {
  visibility: hidden;
}

.official-select-opponent {
  display: block;
  width: 79px;
  height: 19px;
  object-fit: contain;
  flex: 0 0 auto;
}

.official-enemy-prepare-description {
  position: absolute;
  left: 50%;
  bottom: 68px;
  width: 268px;
  height: 18px;
  transform: translateX(-50%);
  object-fit: contain;
  pointer-events: none;
}

.official-ui-active #deck-prep-screen {
  background-image: url("../assets/ui/prep/background.png");
  background-position: center;
  background-repeat: repeat-x;
  background-size: auto 74.78%;
}

.official-ui-active #deck-prep-screen .deck-prep-content {
  position: relative;
  /* §2.3 Synergy & Theme / §4.3 Visual Guidance — clear the temporary panel
     texture so the supplied 1268×938 artwork is the only visible skin. */
  background-image: none !important;
}

.official-ui-active #deck-prep-screen .prep-status > * {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

.official-ui-active #deck-prep-screen .prep-status {
  min-height: 0;
}

.official-ui-active #deck-prep-screen .prep-pool-panel::before {
  content: "";
  display: block;
  width: min(825px, 100%);
  aspect-ratio: 825 / 32;
  flex: 0 0 auto;
  background: url("../assets/ui/prep/navigation/tab_normal.png") center / contain no-repeat;
  pointer-events: none;
}

.official-ui-active #deck-prep-screen .prep-pool-panel > .prep-panel-title,
.official-ui-active #deck-prep-screen .prep-deck-panel > .prep-panel-title {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

.official-ui-active #deck-prep-screen .prep-deck-panel {
  position: relative;
  width: min(355px, 29vw);
  padding-top: 104px;
}

.official-ui-active #deck-prep-screen .prep-deck-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(355px, 100%);
  aspect-ratio: 355 / 96;
  transform: translateX(-50%);
  background: url("../assets/ui/prep/deck_configuration.png") center / contain no-repeat;
  pointer-events: none;
}

.official-prep-structure-counts {
  position: absolute;
  top: 66px;
  left: 7%;
  right: 7%;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  justify-items: end;
  pointer-events: none;
}

.official-prep-structure-counts > span {
  display: grid;
  place-items: center;
  width: 100%;
}

.official-ui-active #deck-prep-screen .prep-deck-list { order: 2; }
.official-ui-active #deck-prep-screen .prep-deck-list-count {
  order: 3;
  flex: 0 0 auto;
}

.official-ui-active #deck-prep-screen .prep-deck-item {
  padding: 2px;
  border: 0;
  background: transparent;
}

.official-ui-active #deck-prep-screen .prep-deck-item:hover {
  border: 0;
  background: transparent;
  filter: brightness(1.08);
}

.official-ui-active #deck-prep-screen .deck-prep-content::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(284px, 22.4vw);
  aspect-ratio: 284 / 153;
  background: url("../assets/ui/prep/bg_decoration.png") center / contain no-repeat;
  pointer-events: none;
  z-index: 0;
}

.official-ui-active #deck-prep-screen .select-header {
  min-height: 82px;
  width: min(710px, 56vw);
  aspect-ratio: 710 / 85;
  background: url("../assets/ui/prep/title.png") center top / contain no-repeat;
}

.official-ui-active .enemy-selector-shell {
  --enemy-card-w: clamp(220px, 27.05vw, 343px);
}

.official-ui-active #enemy-selector-next {
  transform: scaleX(-1);
}

.official-ui-active .enemy-select-card {
  aspect-ratio: 343 / 527;
  background-size: contain;
}

.official-ui-active #deck-prep-screen .select-header > * {
  visibility: hidden;
}

.bitmap-text {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 0 !important;
  line-height: 1;
  white-space: nowrap;
}

.bitmap-glyph {
  display: block;
  width: auto;
  height: 1em;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
}

.bitmap-accessible-value,
.official-accessible-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.bitmap-text--battle-top { font-size: 38px !important; }
.bitmap-text--battle-red,
.bitmap-text--battle-gold,
.bitmap-text--battle-blue,
.bitmap-text--battle-green { font-size: 27px !important; }
.bitmap-text--prep-detail,
.bitmap-text--prep-quantity,
.bitmap-text--multiplier { font-size: 15px !important; }
.bitmap-text--enemy-select { font-size: 16px !important; }
.bitmap-text--percentage { font-size: 13px !important; }
.bitmap-percent-sign { margin-inline-start: 3px; }
.bitmap-text--result-victory,
.bitmap-text--result-defeat { font-size: 18px !important; }

.card.official-card-face {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}

.official-card-face-image {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  /* §4.3 Visual Guidance — preserve the supplied 162–165 × 242–243
     card proportions instead of stretching them into the legacy card box. */
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
}

.campaign-card-copy { display: none; }
/* design/SKILL.md §4.3：战役牌册把实际效果放在对应卡面下方，触屏也能直接阅读。 */
#deck-grid .campaign-book-card {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.campaign-book-card figcaption { color: #eee0c5; font-size: 14px; line-height: 1.45; }
#prep-grid .campaign-reading > .campaign-card-copy,
#hand-cards .selected > .campaign-card-copy {
  display: flex;
  align-items: center;
  position: absolute;
  z-index: 2;
  left: 5%; right: 5%; top: 18%; bottom: 17%;
  padding: 4px 7px;
  background: rgba(15, 23, 21, .94);
  color: #f0dfbc;
  font: 15px/1.4 "Microsoft YaHei", sans-serif;
  text-align: left;
  pointer-events: none;
}
#prep-grid .card[role="button"] { cursor: pointer; }
#prep-grid .campaign-reading.campaign-enlarged-copy,
#hand-cards .selected.campaign-enlarged-copy {
  z-index: 8;
  overflow: visible;
}
#prep-grid .campaign-reading.campaign-enlarged-copy > .campaign-card-copy,
#hand-cards .selected.campaign-enlarged-copy > .campaign-card-copy {
  box-sizing: border-box;
  top: 16%; bottom: auto; right: auto;
  left: var(--copy-left); width: var(--copy-width);
  padding: .35em .5em;
  border: 1px solid #9b845d;
  background: #15201d;
  font-size: var(--copy-font);
  line-height: 1.35;
}

.official-card-face .official-card-dynamic {
  position: absolute;
  left: 7%;
  top: 5%;
  z-index: 2;
  min-width: 24%;
  min-height: 15%;
}

.official-card-face .official-card-modifier {
  position: absolute;
  left: 25%;
  bottom: 15%;
  z-index: 2;
}

.official-ui-active #top-bar {
  background-image: url("../assets/ui/battle/top/hud_decoration.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: min(1152px, 100vw) auto;
}

.official-ui-active #top-bar::before { display: none !important; }
/* design/SKILL.md §2.3 / §4.3 — the supplied VS and transparent portraits
   share one lower edge; none of the obsolete circular HUD plate survives. */
.official-ui-active #top-bar::after {
  content: ''; display: block; position: absolute; left: 50%; top: auto; right: auto; bottom: 0;
  width: 130px; height: 70.973px; transform: translateX(-50%); z-index: 1;
  background: url("../assets/ui/battle/top/bonus_frame.png") center / contain no-repeat;
  pointer-events: none;
}

.official-hero-name,
.official-hero-title {
  color: transparent !important;
  text-shadow: none !important;
}

.official-hero-name-art,
.official-hero-title-art {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 24px;
  object-fit: contain;
}

.official-ui-active .battle-tool-dock {
  position: fixed;
  left: 12px;
  top: 184px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.official-ui-active .battle-tool-dock .btn-sm,
.official-ui-active .battle-utility-actions > button {
  width: 83px !important;
  height: 90px !important;
  min-width: 72px !important;
  min-height: 89px !important;
  padding: 0 !important;
}

.official-ui-active .battle-utility-actions {
  position: fixed;
  left: 12px;
  right: auto;
  top: 370px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.official-ui-active .hud-sfx-toggle {
  border: 0;
  border-radius: 0;
  background-color: transparent;
}

.official-ui-active .battle-deploy-rail {
  width: 74px;
  right: -88px !important;
  gap: 6px;
}

.official-ui-active .battle-deploy-rail .btn-deploy-done,
.official-ui-active .battle-deploy-rail .btn-sm {
  width: 74px !important;
  height: 76px !important;
  min-height: 76px !important;
  padding: 0 !important;
}

@media (min-width: 1200px) {
  .official-ui-active .bf-main {
    transform: translateX(30px);
  }
}

.official-ui-active #hand-panel .hand-bar {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

.official-ui-active #phase-label {
  min-width: 84px;
  min-height: 24px;
  background: url("../assets/ui/battle/top/phase_deploy.png") center / contain no-repeat;
  color: transparent !important;
}

.official-ui-active #round-display > span:first-child,
.official-ui-active #round-display > span:last-child {
  display: inline-block;
  min-width: 22px;
  min-height: 24px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  color: transparent !important;
  font-size: 0 !important;
}

.official-ui-active #player-hp-bar {
  background-image: url("../assets/ui/battle/top/hp_blue.png");
  background-size: 100% 100%;
}

.official-ui-active #enemy-hp-bar {
  background-image: url("../assets/ui/battle/top/hp_red.png");
  background-size: 100% 100%;
}

.official-ui-active .battle-column[data-terrain="plains"] .lane {
  background-image: url("../assets/ui/battle/terrain_plain.png") !important;
}

.official-ui-active .battle-column[data-terrain="mountains"] .lane {
  background-image: url("../assets/ui/battle/terrain_mountain.png") !important;
}

.official-ui-active .battle-column[data-terrain="water"] .lane {
  background-image: url("../assets/ui/battle/terrain_water.png") !important;
}

.official-ui-active .battle-column[data-terrain="city"] .lane {
  background-image: url("../assets/ui/battle/terrain_city.png") !important;
}

.official-ui-active .battle-column[data-terrain="scorched"] .lane {
  background-image: url("../assets/ui/battle/terrain_scorched.png") !important;
}

.official-ui-active .battle-column[data-terrain] .lane {
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
}

.official-lane-result {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(3, 8, 12, 0.58);
  pointer-events: none;
}

.official-lane-result-title {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.official-lane-result-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 27px;
}

.official-lane-result-detail > img {
  display: block;
  width: auto;
  height: 20px;
  object-fit: contain;
}

.official-lane-result-detail .bitmap-text {
  font-size: 20px !important;
}

.official-ui-active .terrain-octagon.terrain-assets-enabled .t-icon,
.official-ui-active .terrain-octagon.terrain-assets-enabled .t-name,
.official-ui-active .terrain-octagon.terrain-assets-enabled .t-hint {
  visibility: hidden !important;
}

.official-card-accessible {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.enemy-card-name-art,
.enemy-card-subtitle-art {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 28px;
  object-fit: contain;
  margin-inline: auto;
}

.official-ui-active .enemy-card-terrain-title {
  visibility: hidden;
  height: 16px;
}

.official-ui-active .enemy-card-name:has(.enemy-card-name-art) {
  min-height: 27px;
  margin-top: 0;
  transform: none;
}

.official-ui-active .enemy-card-title:has(.enemy-card-subtitle-art) {
  min-height: 21px;
  margin-top: 0;
}

.official-ui-active .enemy-select-card:not(.enemy-select-card--war) {
  background: url("../assets/ui/enemy_select/card_background.png") center / 100% 100% no-repeat;
}

.official-enemy-terrain {
  position: relative;
}

.official-enemy-terrain .official-enemy-terrain-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.official-enemy-terrain .official-enemy-terrain-slot {
  position: absolute;
  top: 11%;
  left: 50%;
  width: auto;
  height: 20%;
  transform: translateX(-50%);
  object-fit: contain;
}

.official-ui-active .enemy-selector-progress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 18px;
  font-size: 0;
}

.official-pagination-total {
  display: block;
  width: auto;
  height: 16px;
  object-fit: contain;
}

.official-enemy-difficulty {
  position: relative;
  min-height: 35px;
  background: transparent !important;
}

.official-enemy-difficulty > img {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.official-enemy-hp {
  position: absolute;
  left: 20%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.official-prep-deck-count {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 15px !important;
}

.official-prep-deck-count .prep-count-label {
  display: block;
  width: auto;
  height: 16px;
  object-fit: contain;
}

.official-prep-deck-count .prep-count-label--suffix {
  height: 16px;
}

.official-prep-row {
  position: relative;
  min-height: 0;
  aspect-ratio: 346 / 80;
  background-image: var(--official-prep-row) !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
}

.official-prep-row-attack {
  position: absolute;
  left: 14%;
  bottom: 14%;
}

.official-prep-empty {
  min-height: 92px;
  background: url("../assets/ui/prep/empty_description.png") center / contain no-repeat;
  color: transparent !important;
}

.official-ui-active .prep-deck-group:has(> img) {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
}

.official-ui-active .prep-deck-group > img {
  width: auto;
  max-width: 80%;
  height: 24px;
  object-fit: contain;
}

.official-ui-active #rules-modal .rules-box {
  width: 770px;
  height: 500px;
  min-height: 0;
  background: url("../assets/ui/rules/modal_background.png") center / 100% 100% no-repeat;
}

/* design/SKILL.md §4.3 / §6.4 — live rules must remain readable when the
   rules text changes. The separate baked reference is intentionally unused. */
.official-ui-active #rules-modal .modal-title,
.official-ui-active #terrain-legend-modal .modal-title { display: block; }

.official-ui-active #rules-modal #rules-content {
  min-height: 0;
  background: none;
  color: #f0f2ef;
  font-size: 14px;
  line-height: 1.48;
}

.official-ui-active #rules-modal #btn-close-rules,
.official-ui-active #terrain-legend-modal #btn-close-terrain-legend {
  background: url("../assets/ui/rules/button_close.png") center / contain no-repeat !important;
  border: 0 !important;
  color: transparent !important;
}

.official-ui-active #terrain-legend-modal .rules-box {
  width: 770px;
  height: 500px;
  background: url("../assets/ui/rules/modal_background.png") center / contain no-repeat;
}

.official-terrain-legend-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: start;
  justify-items: center;
  gap: 10px 8px;
  height: 390px;
  overflow-y: auto;
}
.official-terrain-legend-grid figure { grid-column: span 2; width: 220px; margin: 0; text-align: center; }
.official-terrain-legend-grid figure:nth-child(4) { grid-column: 2 / span 2; }
.official-terrain-legend-grid figure:nth-child(5) { grid-column: 4 / span 2; }
.official-terrain-legend-grid figcaption { display: flex; flex-direction: column; gap: 1px; min-height: 43px; font-size: 13px; color: #dfd7bf; }
.official-terrain-legend-grid figcaption strong { font-size: 15px; color: #f2e6c7; }

.official-terrain-legend-grid img {
  display: block;
  width: 220px;
  height: auto;
  aspect-ratio: 308 / 170;
  object-fit: contain;
}

.official-terrain-legend-content {
  display: block;
  width: min(766px, 100%);
  height: auto;
  object-fit: contain;
}

.official-ui-active #confirm-modal.official-quit-dialog .confirm-box {
  width: min(1236px, calc(100vw - 32px));
  aspect-ratio: 1504 / 220;
}

.official-ui-active #confirm-modal.official-clear-dialog .confirm-box {
  width: min(1236px, calc(100vw - 32px));
  aspect-ratio: 1504 / 220;
}

.official-ui-active #confirm-modal.official-quit-dialog .confirm-box,
.official-ui-active #confirm-modal.official-clear-dialog .confirm-box {
  min-height: 0;
  max-width: none;
  padding: 14px 52px 12px;
  justify-content: center;
  gap: 5px;
}

.official-ui-active #confirm-modal.official-quit-dialog .modal-title,
.official-ui-active #confirm-modal.official-clear-dialog .modal-title,
.official-ui-active #confirm-modal.official-quit-dialog .confirm-msg,
.official-ui-active #confirm-modal.official-clear-dialog .confirm-msg {
  color: transparent !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.official-ui-active #confirm-modal.official-quit-dialog .modal-title {
  background-image: url("../assets/ui/dialogs/quit/title.png");
}

.official-ui-active #confirm-modal.official-quit-dialog .confirm-msg {
  background-image: url("../assets/ui/dialogs/quit/message.png");
}



.official-ui-active #confirm-modal.official-quit-dialog .modal-title,
.official-ui-active #confirm-modal.official-clear-dialog .modal-title {
  flex: 0 0 28px;
  width: 126px;
  align-self: center;
}

.official-ui-active #confirm-modal.official-quit-dialog .confirm-msg,
.official-ui-active #confirm-modal.official-clear-dialog .confirm-msg {
  flex: 0 0 28px;
  width: min(470px, 72vw);
  margin: 0;
}

.official-ui-active #confirm-modal.official-quit-dialog .confirm-actions,
.official-ui-active #confirm-modal.official-clear-dialog .confirm-actions {
  height: 45px;
  margin-top: 2px;
}

.official-ui-active #confirm-modal.official-clear-dialog #btn-confirm-ok,
.official-ui-active #confirm-modal.official-clear-dialog #btn-confirm-cancel {
  width: 137px;
  min-width: 137px;
  min-height: 45px;
  padding: 0;
  border: 0 !important;
  color: transparent !important;
  background-color: transparent !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: contain !important;
}



.official-ui-active #result-box.official-result-panel {
  width: min(1128px, 89vw);
  min-height: 390px;
  aspect-ratio: auto;
  position: relative;
  overflow: visible;
  padding: 18px 48px 22px;
  gap: 8px;
  background-image: none !important;
}

.official-ui-active #result-box.official-result-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 174px;
  height: min(165px, 17.6vh);
  z-index: 0;
  background-image: var(--official-result-panel);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.official-ui-active #result-box.official-result-panel > * {
  position: relative;
  z-index: 1;
}

.official-ui-active #result-box.official-result-panel #result-title {
  width: min(454px, 48vw);
  min-height: 116px;
  background-image: var(--official-result-title);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  color: transparent !important;
  text-shadow: none !important;
}

.official-ui-active #result-box.official-result-panel #result-desc {
  min-height: 44px;
  max-width: 760px;
}

.official-result-stats {
  width: 88% !important;
  max-width: none !important;
  min-height: 68px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: 10px;
  margin-top: 4px;
}

.official-result-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 32px;
}

.official-result-stat > img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 27px;
  object-fit: contain;
}

.official-result-stat--hp { gap: 3px; }
.official-result-stat--hp > img { max-height: 20px; }

.official-ui-active #result-box.official-result-panel .result-actions .official-image-control {
  width: 137px;
  height: 43px;
  min-width: 137px;
  min-height: 43px;
  padding: 0;
}

/* §4.4 Golden Ratio / §7.3 Black-box — at the supplied 1268×938
   canvas, keep full-card art near its native 163:243 proportion and scale. */
@media (min-width: 1100px) and (min-height: 800px) {
  :root {
    --hand-card-w: 146px;
    --hand-card-h: 218px;
    --card-w: 90px;
    --card-h: 134px;
  }

  .official-ui-active #prep-grid .deck-preview-card.official-card-face {
    width: 146px !important;
    height: 218px !important;
  }
}

@media (max-height: 600px) {
  .official-ui-active .enemy-selector-shell {
    --enemy-card-w: min(220px, 22vw);
  }

  .official-ui-active #start-screen .start-content {
    width: min(760px, 76vw);
  }
}

/* §2.3 / §4.3 — DX repair: supplied art is measured in native image pixels.
   Wide fading panels are centered and clipped by the viewport, never squeezed.
   §4.2 — hover changes art; only a press changes the button scale. */
.official-ui-active { --hand-card-w: 156px; --hand-card-h: 236px; --card-w: 90px; --card-h: 136px;
  --lane-w: 308px; --lane-panel-h: 170px; --oct-size: 117px; --bf-col-gap: 0px;
  --official-battle-top-h: 126px; --official-battle-field-h: 480px; --official-battle-hand-h: 236px; }
.official-ui-active #game-container { overflow: hidden; }
.official-ui-active .bitmap-glyph { width: auto; height: auto; flex: none; }
.official-ui-active .bitmap-text { gap: 1px; letter-spacing: 0; }
.official-ui-active .official-image-control { background-size: auto !important; box-shadow: none !important;
  border-image: none !important; filter: none !important; opacity: 1; transition: transform .12s; }
.official-ui-active .official-image-control:hover { transform: none; }
.official-ui-active .official-image-control:disabled { filter: none !important; opacity: 1; }
.official-ui-active .official-image-control:active:not(:disabled) { transform: scale(.96); }
.official-ui-active .official-image-control:focus-visible { outline: 2px solid #e4d09b; outline-offset: 3px; }

/* Cover / rules: no abrupt 128px crop of a 420px or 565px alpha gradient. */
.official-ui-active #start-screen::before { top: -170px; height: 420px; background-size: auto; background-position: center top; }
/* Native bottom mask has an alpha discontinuity at row 505; place that row below the viewport. */
.official-ui-active #start-screen::after { bottom: -61px; height: 565px; background-size: auto; background-position: center bottom; }
.official-ui-active #start-screen .start-content { position: absolute; width: 728px; height: 366px;
  left: 50%; top: 130px; transform: translateX(-50%) !important; background-size: contain; }
.official-ui-active #start-screen #btn-start { width: 152px; height: 32px; bottom: -105px; transform: translateX(-50%); }
.official-ui-active #start-screen #btn-start:active { transform: translateX(-50%) scale(.96); }
.official-ui-active #start-screen .start-secondary-actions { bottom: -177px; gap: 14px; }
.official-ui-active #btn-rules-start { width: 98px; height: 32px; min-width: 98px; min-height: 32px; padding: 0;
  border: 1px solid #6daba8 !important; border-image: none !important; border-radius: 2px; background: #317a79 !important;
  color: #f4f4ed !important; font-size: 14px; box-shadow: none !important; }
.official-ui-active #rules-modal .rules-box, .official-ui-active #terrain-legend-modal .rules-box {
  position: relative; width: 770px; height: 500px; max-width: none; padding: 0; background-size: contain;
  background-image: url("../assets/ui/rules/baked_background.png"); box-shadow: none; display: block; border: 0; }
.official-ui-active #rules-modal .modal-title { display: none; }
.official-ui-active #terrain-legend-modal .modal-title { display: block; position: absolute; left: 50%; top: 1px; width: 160px; height: 30px;
  transform: translateX(-50%); background: #30515a; color: #f2f4f4; font: 16px/30px var(--font); letter-spacing: 1px; z-index: 2; }
.official-ui-active #rules-content { position: absolute; left: 20px; top: 42px; width: 730px; height: 390px; min-height: 0 !important;
  padding: 4px 2px; background: #34434d !important; color: #f1f3f1; }
.official-ui-active #rules-content .rules-section { background: none; padding: 5px 0; border-radius: 0; }
.official-ui-active #rules-content .rules-section-title { color: #fff; border-left: 1px solid #7ed4bf; padding-left: 8px; }
.official-ui-active #terrain-legend-content { position: absolute; left: 14px; top: 39px; width: 742px; height: 385px;
  margin: 0; padding: 0 7px; overflow-y: auto; background: #34434d; }
.official-ui-active #btn-close-rules, .official-ui-active #btn-close-terrain-legend { position: absolute; left: 50%; bottom: 18px;
  transform: translateX(-50%); width: 98px; height: 32px; min-width: 98px; min-height: 32px; padding: 0;
  background-image: var(--official-control-art) !important; background-size: 98px 32px !important;
  border: 0 !important; border-image: none !important; box-shadow: none !important; color: transparent !important; }
.official-ui-active #rules-modal #btn-close-rules,
.official-ui-active #terrain-legend-modal #btn-close-terrain-legend {
  background-image: var(--official-control-art) !important;
  background-size: 98px 32px !important;
}
.official-ui-active #btn-close-rules::before, .official-ui-active #btn-close-rules::after,
.official-ui-active #btn-close-terrain-legend::before, .official-ui-active #btn-close-terrain-legend::after { content: none; }
.official-ui-active #btn-close-rules-icon { position: absolute; top: 0; right: 0; width: 44px; height: 44px; padding: 0; z-index: 4; cursor: pointer;
  background: url("../assets/ui/rules/button_close_icon.png") center / 16px 16px no-repeat; border: 0; }
.official-ui-active .official-terrain-legend-content { width: 730px; max-width: none; height: 408px; margin: 46px 20px 0; }

/* design/SKILL.md §2.3 / §4.3 — all supplied and assembled opponents share a 306×494 card. */
.official-ui-active #enemy-select-screen .select-content-main { gap: 0; padding-top: 14px; transform: none !important; }
.official-ui-active #enemy-select-screen .select-header { width: 670px; height: 71px; min-height: 71px; flex: none; background-size: contain; }
.official-ui-active .official-select-opponent { margin-top: 42px; margin-bottom: 12px; }
.official-ui-active .enemy-selector-shell, .official-ui-active .enemy-selector-shell.is-single { --enemy-card-w: 306px; --enemy-card-gap: 55px; grid-template-columns: 48px auto 48px; gap: 8px; }
.official-ui-active .enemy-select-card, .official-ui-active .enemy-select-card--war { width: 343px; height: 527px; min-height: 527px;
  aspect-ratio: 343 / 527; overflow: visible; border-radius: 0; filter: none !important; transform: none !important;
  background: url("../assets/ui/enemy_select/card_background.png") center / auto no-repeat !important; }
/* design/SKILL.md §2.3 / §4.3 — the six regular opponents use complete
   portrait/title frames. Live difficulty and terrain are the only overlays. */
.official-ui-active .enemy-select-card.official-composite-enemy,
.official-ui-active .enemy-select-card.official-assembled-enemy {
  position: relative; width: 306px; height: 494px; min-height: 494px;
  aspect-ratio: 306 / 494; background: none !important; cursor: pointer;
}
.official-ui-active .enemy-select-card.official-composite-enemy .official-enemy-panel {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: contain;
  pointer-events: none; z-index: 0;
}
.official-ui-active .enemy-select-card.official-composite-enemy .enemy-card-ribbon,
.official-ui-active .enemy-select-card.official-composite-enemy .enemy-card-icon,
.official-ui-active .enemy-select-card.official-composite-enemy .enemy-card-name,
.official-ui-active .enemy-select-card.official-composite-enemy .enemy-card-title,
.official-ui-active .enemy-select-card.official-composite-enemy .enemy-card-footer { display: none; }
.official-ui-active .enemy-select-card.official-composite-enemy .enemy-card-meta,
.official-ui-active .enemy-select-card.official-assembled-enemy .enemy-card-meta {
  left: 7px; top: 160px; width: 292px; height: 102px;
}
.official-ui-active .enemy-select-card.official-composite-enemy .enemy-card-terrain,
.official-ui-active .enemy-select-card.official-assembled-enemy .enemy-card-terrain { top: 345px; left: 7px; width: 292px; }
.official-ui-active .enemy-select-card.official-composite-enemy .enemy-terrain-inline,
.official-ui-active .enemy-select-card.official-assembled-enemy .enemy-terrain-inline { gap: 8px; }
.official-ui-active .enemy-select-card.official-composite-enemy .enemy-terrain-lane.official-enemy-terrain,
.official-ui-active .enemy-select-card.official-assembled-enemy .enemy-terrain-lane.official-enemy-terrain,
.official-ui-active .enemy-select-card.official-composite-enemy .official-enemy-terrain .official-enemy-terrain-art,
.official-ui-active .enemy-select-card.official-assembled-enemy .official-enemy-terrain .official-enemy-terrain-art { width: 88px; height: 86px; flex-basis: 88px; }
.official-ui-active .enemy-select-card.official-composite-enemy:hover .official-enemy-panel,
.official-ui-active .enemy-select-card.official-composite-enemy.card-selected .official-enemy-panel {
  filter: brightness(1.12) drop-shadow(0 0 6px rgba(123, 229, 230, .42));
}
.official-ui-active .enemy-select-card .enemy-card-body { padding: 0; position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; }
.official-ui-active .enemy-select-card .enemy-card-icon { position: absolute; top: 6px; left: 118px; width: 107px; height: 107px; transform: none; }
.official-ui-active .enemy-card-icon::after { content: none; }
.official-ui-active .enemy-select-card .enemy-card-icon-img { width: 107px; height: 107px; max-width: none; border-radius: 0; clip-path: none; object-fit: contain; }
.official-ui-active .enemy-select-card .enemy-card-name { position: absolute; top: 120px; left: 0; width: 343px; margin: 0; transform: none; color: #d6b774; }
.official-ui-active .enemy-select-card .enemy-card-title { position: absolute; top: 160px; left: 0; width: 343px; margin: 0; text-align: center; color: #b5a27a; }
.official-ui-active .enemy-card-name-art, .official-ui-active .enemy-card-subtitle-art { width: auto; height: auto; max-width: none; max-height: none; }
.official-ui-active .enemy-select-card .enemy-card-meta { position: absolute; top: 132px; left: 24px; width: 294px; height: 112px; padding: 0; }
/* §4.3 — exact native heart/HP/separator slots are supplied by the difficulty model. */
.official-ui-active .official-enemy-difficulty > img { width: 100%; height: 100%; max-width: none; object-fit: contain; }
.official-ui-active .official-enemy-hp { left: var(--enemy-hp-left, 102px); top: 75px; width: 26px; height: 18px;
  display: flex; align-items: center; justify-content: center; transform: none; line-height: 0; }
.official-ui-active .official-enemy-hp .bitmap-text { display: flex; align-items: center; justify-content: center; gap: 0; }
.official-ui-active .official-enemy-hp .bitmap-glyph { width: auto; height: 18px; max-width: none; object-fit: contain; }
.official-ui-active .enemy-select-card .enemy-card-terrain { position: absolute; top: 333px; left: 23px; width: 297px; margin: 0; padding: 0; background: none; border: 0; }
.official-ui-active .enemy-card-terrain-title { display: none; }
.official-ui-active .enemy-terrain-inline { display: flex; justify-content: center; gap: 5px; }
.official-ui-active .enemy-terrain-lane.official-enemy-terrain { width: 94px; height: 91px; padding: 0; border: 0; background: none; flex: 0 0 94px; }
.official-ui-active .official-enemy-terrain .official-enemy-terrain-art { width: 94px; height: 91px; }
.official-ui-active .official-enemy-terrain .official-enemy-terrain-slot { width: auto; height: auto; top: 20px; }
.official-ui-active .enemy-select-card .enemy-card-footer { position: absolute; left: 12px; bottom: 16px; width: 318px; height: 45px; padding: 0; }
.official-ui-active .enemy-select-card .enemy-card-btn { width: 318px; height: 45px; min-height: 45px; padding: 0; }
.official-ui-active .enemy-select-card--war .enemy-card-tactic, .official-ui-active .enemy-select-card--war .enemy-card-terrain-summary { display: none; }
/* §2.3 / §6.4 — only the two extra campaign commanders need a composited
   shell; their own transparent portrait and runtime identity remain separate. */
.official-ui-active .enemy-select-card.official-assembled-enemy {
  background: linear-gradient(180deg, rgba(48,81,85,.83), rgba(20,39,41,.8)) !important;
  border: 1px solid #587e7d; box-shadow: inset 0 0 12px rgba(132,189,182,.24); isolation: isolate;
}
.official-ui-active .official-assembled-enemy::after { content: ''; position: absolute;
  left: 4px; right: 4px; top: 303px; bottom: 4px; border: 1px solid rgba(91,143,141,.55); z-index: -1; pointer-events: none; }
.official-ui-active .official-assembled-enemy .enemy-card-ribbon,
.official-ui-active .official-assembled-enemy .enemy-card-footer { display: none; }
.official-ui-active .official-assembled-enemy .enemy-card-icon { display: block; position: absolute; left: 23px; top: 0; width: 260px; height: 203px; margin: 0; background: none; border: 0; }
.official-ui-active .official-assembled-enemy .official-enemy-portrait { position: absolute; left: 0; top: 0;
  width: 260px; height: 203px; object-fit: contain; object-position: center bottom; border: 0; border-radius: 0; background: none; }
.official-ui-active .official-assembled-enemy .enemy-card-name { top: 185px; left: 0; width: 306px;
  height: 27px; line-height: 27px; font-size: 23px; text-align: center; }
.official-ui-active .official-assembled-enemy .enemy-card-title { top: 213px; left: 0; width: 306px;
  height: 18px; line-height: 18px; font-size: 17px; text-align: center; }
.official-ui-active .official-assembled-enemy .official-enemy-terrain-heading { display: block; position: absolute;
  left: 7px; top: 277px; width: 292px; height: 34px; margin: 0; border-block: 1px solid rgba(87,139,137,.45);
  background: rgba(45,78,79,.65); color: #d6c59f; font-size: 19px; line-height: 32px; text-align: center; }
.official-ui-active .official-assembled-enemy:hover,
.official-ui-active .official-assembled-enemy.card-selected { box-shadow: inset 0 0 16px rgba(128,212,205,.32), 0 0 7px rgba(116,209,204,.45); }
.official-ui-active .enemy-selector-arrow { width: 48px; height: 84px; padding: 0; box-shadow: none; border-radius: 0; }
.official-ui-active .enemy-selector-arrow:disabled { visibility: hidden; }
/* design/SKILL.md §4.3 Visual Guidance — mirror the right-pointing artwork for previous-page navigation in every button state. */
.official-ui-active #enemy-selector-prev, .official-ui-active #enemy-selector-prev:hover { transform: scaleX(-1); }
.official-ui-active #enemy-selector-prev:active { transform: scaleX(-1) scale(.96); }
.official-ui-active #enemy-selector-next, .official-ui-active #enemy-selector-next:hover { transform: none; }
.official-ui-active #enemy-selector-next:active { transform: scale(.96); }
/* design/SKILL.md §4.3 — page values and totals share the supplied 16px glyph height. */
.official-ui-active .enemy-selector-progress { margin-top: 12px; font-size: 16px; line-height: 16px; }
.official-ui-active .enemy-selector-progress .bitmap-glyph,
.official-ui-active .official-pagination-total { width: auto; height: 16px; max-width: none; }
.official-ui-active .enemy-selector-progress .bitmap-text { gap: 0; line-height: 0; }
.official-ui-active .official-pagination-divider { color: #d2ae64; padding: 0 2px; }
/* §4.1 / §4.2 — center the remaining actions after moving battle entry onto the cards. */
.official-ui-active #enemy-select-screen .select-actions-fixed { justify-content: center; gap: 16px; padding: 0 0 22px; margin-top: auto; }
.official-ui-active #btn-back-start, .official-ui-active #btn-deck-prep { width: 152px; height: 32px; min-width: 152px; min-height: 32px; padding: 0; }
.official-ui-active #btn-card-library-select { width: 96px; height: 30px; padding: 0; margin-left: 0; font-size: 12px; }
.official-ui-active .enemy-select-card:focus-visible { outline: 2px solid #d2ae64; outline-offset: 2px; }
.official-ui-active .official-enemy-prepare-description { bottom: 82px; }
/* §4.1 — campaign/tutorial hides both the legacy hint and its independently mounted artwork. */
.official-ui-active #enemy-select-screen:has(.enemy-select-card--war) .official-enemy-prepare-description { display: none; }

/* §4.1 / §4.2 — native prep cards, category targets and vertical scrolling. */
.official-ui-active #deck-prep-screen { padding: 0; background-position: center; background-size: cover; background-repeat: no-repeat; }
.official-ui-active #deck-prep-screen .deck-prep-content { width: 1268px; max-width: none; height: 842px; padding: 15px 21px 55px;
  grid-template-columns: minmax(0,1fr); grid-template-rows: 71px 0 auto minmax(0,1fr); gap: 10px; transform: none !important; }
.official-ui-active #deck-prep-screen .select-header { width: 670px; height: 71px; min-height: 71px; justify-self: center; background-size: contain; }
.official-ui-active #deck-prep-screen .prep-body { gap: 10px; }
.official-ui-active #deck-prep-screen .prep-pool-panel { position: relative; width: 835px; flex: none; padding: 0; gap: 12px; overflow: visible; }
.official-ui-active #deck-prep-screen .prep-pool-panel::before { content: none; }
.official-ui-active #prep-type-tabs { display: flex; position: relative; flex: 0 0 42px; width: 825px; height: 42px; background: none; }
.official-ui-active #prep-type-tabs::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; pointer-events: none;
  background: url("../assets/ui/prep/navigation/bar.png") left center / contain no-repeat; }
/* §4.2 / §4.3 — retain the native label strip above the cyan selected frame.
   Category badges stay above both layers, in the same clickable tab target. */
.official-ui-active .prep-type-tab { position: absolute; left: calc(var(--tab-center) - 43.5px); width: 87px; height: 42px;
  min-width: 0; border: 0; background: none; color: transparent; cursor: pointer; transform: none; }
.official-ui-active .prep-type-tab:hover, .official-ui-active .prep-type-tab:active { transform: none; }
.official-ui-active .prep-type-tab.is-active::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: url("../assets/ui/prep/dialog/frame_bottom.png") center / 100% 100% no-repeat; pointer-events: none; }
.official-ui-active .prep-type-count { position: absolute; top: -12px; right: 0; z-index: 4; display: flex;
  align-items: center; justify-content: center; width: 27px; height: 27px; gap: 0;
  background: url("../assets/ui/prep/navigation/count_prompt.png") center / contain no-repeat;
  color: #333426; font-size: 15px; line-height: 1; pointer-events: none; }
.official-ui-active .prep-type-count[hidden] { display: none; }
.official-ui-active .prep-type-count .bitmap-glyph { width: auto; height: 15px; object-fit: contain; }
.official-ui-active .prep-type-tab[data-prep-type="all"] { --tab-center: 69px; }
.official-ui-active .prep-type-tab[data-prep-type="infantry"] { --tab-center: 156px; }
.official-ui-active .prep-type-tab[data-prep-type="cavalry"] { --tab-center: 243px; }
.official-ui-active .prep-type-tab[data-prep-type="archer"] { --tab-center: 330px; }
.official-ui-active .prep-type-tab[data-prep-type="cannon"] { --tab-center: 417px; }
.official-ui-active .prep-type-tab[data-prep-type="navy"] { --tab-center: 504px; }
.official-ui-active .prep-type-tab[data-prep-type="siege"] { --tab-center: 591px; }
.official-ui-active .prep-type-tab[data-prep-type="dual"] { --tab-center: 678px; }
.official-ui-active .prep-type-tab[data-prep-type="tactic"] { --tab-center: 765px; }
.official-ui-active #prep-grid { height: auto !important; flex: 1 !important; max-height: none !important; width: 835px;
  grid-template-columns: repeat(4, 148px); justify-content: space-around; align-content: start; grid-auto-rows: 282px;
  gap: 8px 0; padding: 0 28px 8px 6px; overflow-x: hidden !important; overflow-y: auto; scrollbar-width: auto; scrollbar-color: auto; }
.official-ui-active #prep-grid .deck-preview-card,
.official-ui-active #prep-grid .deck-preview-card.official-card-face { width: 148px !important; height: 224px !important; }
.official-ui-active .prep-pool-scroll-controls { display: none; }
/* §4.2 — the two 47 x 47 supplied images are the add/remove controls. */
.official-ui-active #prep-grid .prep-card-controls { height: 47px; gap: 8px; }
.official-ui-active #prep-grid .prep-btn { width: 40px; height: 40px; flex: none; border: 0; border-radius: 0; color: transparent;
  background: url("../assets/ui/prep/button_plus.png") center / contain no-repeat; box-shadow: none; }
.official-ui-active #prep-grid .prep-btn-minus { background-image: url("../assets/ui/prep/button_minus.png"); }
.official-ui-active #prep-grid .prep-btn:active:not(:disabled), .official-ui-active .prep-deck-item-remove:active { transform: scale(.96); }
.official-ui-active #prep-grid .prep-count { font-size: 20px; font-weight: 400; }
.official-ui-active #deck-prep-screen .prep-deck-panel { width: 380px; min-width: 380px; padding: 108px 0 0; gap: 8px; }
.official-ui-active #deck-prep-screen .prep-deck-panel::before { width: 355px; height: 96px; background-size: auto; }
.official-ui-active .official-prep-structure-counts { top: 59px; left: 43px; right: auto; width: 337.6px; grid-template-columns: repeat(8,42.2px); justify-items: start; }
.official-ui-active .official-prep-structure-counts > span { justify-content: start; justify-items: start; }
.official-ui-active #prep-deck-list { width: 357px; padding: 0; gap: 5px; overflow-x: hidden; scrollbar-width: auto; scrollbar-color: auto; }
.official-ui-active #prep-grid::-webkit-scrollbar, .official-ui-active #prep-deck-list::-webkit-scrollbar { width: 11px; }
.official-ui-active #prep-grid::-webkit-scrollbar-track, .official-ui-active #prep-deck-list::-webkit-scrollbar-track { background: url("../assets/ui/prep/scrollbar_track.png") center / auto repeat-y; }
.official-ui-active #prep-grid::-webkit-scrollbar-thumb, .official-ui-active #prep-deck-list::-webkit-scrollbar-thumb { background: url("../assets/ui/prep/scrollbar_thumb.png") center / auto repeat-y; border: 0; border-radius: 0; }
.official-ui-active #deck-prep-screen .prep-deck-item { flex: 0 0 80px; width: 344px; padding: 10px; }
.official-ui-active #deck-prep-screen .official-prep-row { width: 346px; height: 80px; background-size: auto !important; padding: 0; }
/* §4.3 — inline text line-box ascent used to lift these 15px digit PNGs. */
.official-ui-active .official-prep-row-attack { left: 61px; bottom: 13px; display: flex; line-height: 0; }
.official-ui-active .official-prep-row .prep-deck-item-count { position: absolute; right: 62px; top: 27px; }
.official-ui-active .prep-deck-item-remove { width: 40px; height: 40px; min-width: 40px; border: 0; border-radius: 0; color: transparent;
  background: url("../assets/ui/prep/button_minus.png") center / contain no-repeat; box-shadow: none; }
.official-ui-active .official-prep-row .prep-deck-item-remove { position: absolute; right: 15px; top: 18px; }
.official-ui-active #deck-prep-screen .prep-deck-item:has(.official-prep-row) { position: relative; width: 346px; height: 80px; padding: 0; }
.official-ui-active #deck-prep-screen .prep-deck-item > .official-prep-row { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 346px; height: 80px; flex: none; pointer-events: none; }
.official-ui-active .prep-deck-item:has(.official-prep-row) > .prep-deck-item-count { position: absolute; right: 62px; top: 27px; }
.official-ui-active .prep-deck-item:has(.official-prep-row) > .prep-deck-item-remove { position: absolute; right: 15px; top: 18px; }
.official-ui-active #prep-grid, .official-ui-active #prep-deck-list { scrollbar-width: none; }
.official-ui-active #prep-grid::-webkit-scrollbar, .official-ui-active #prep-deck-list::-webkit-scrollbar { display: none; }
/* §4.3 — the imported file names are reversed: the outlined image is the rail, the solid image is the handle. */
.official-ui-active .official-scrollbar { position: absolute; right: 0; width: 11px; background: none; border: 0 solid transparent;
  border-image-source: url("../assets/ui/prep/scrollbar_thumb.png"); border-image-slice: 6 5 fill; border-image-width: 6px 5px; border-image-repeat: repeat;
  z-index: 5; cursor: pointer; touch-action: none; }
.official-ui-active .official-scrollbar[hidden] { display: none; }
.official-ui-active .official-scrollbar-thumb { position: absolute; width: 11px; height: 103px; background: url("../assets/ui/prep/scrollbar_track.png") center / auto no-repeat; }
.official-ui-active .official-scrollbar:focus-visible { outline: 1px solid #e4d09b; outline-offset: 2px; }
.official-ui-active .prep-deck-group { flex: none; padding: 5px 0; min-height: 28px; justify-content: center; }
.official-ui-active .prep-deck-group > img { max-width: none; width: 317px; height: auto; }
.official-ui-active .official-prep-deck-count { justify-content: center; min-height: 27px; gap: 3px; }
.official-ui-active .official-prep-deck-count { display: block; width: 350px; min-height: 48px; margin: 0 auto; text-align: center;
  font-size: 12px; letter-spacing: 0; line-height: 1.4; white-space: normal; color: #ead5ac; }
.official-ui-active #prep-deck-list-count.official-prep-deck-count { display: block !important; width: 350px; flex: 0 0 48px; }
.official-ui-active #prep-deck-list-count.official-prep-deck-count > span { display: block; }
.official-ui-active #prep-deck-list-count.official-prep-deck-count > br { display: none; }
.official-ui-active .official-prep-name-row { display: flex; flex-direction: column; justify-content: center; gap: 4px; width: 262px; min-width: 0; }
.official-ui-active .official-prep-name-line { display: flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; }
.official-ui-active .official-prep-name { display: block; max-width: 158px; max-height: 25px; width: auto; height: auto; object-fit: contain; }
.official-ui-active .official-prep-types { font-size: 12px; color: #c2d0c6; }
.official-ui-active .official-prep-name-row .prep-deck-item-meta { display: block; font-size: 13px; line-height: 1.25; color: #d1c8b0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.official-ui-active .official-prep-deck-count .prep-count-label { height: auto; width: auto; }
.official-ui-active .official-prep-deck-count .bitmap-text--battle-top { margin-inline: -5px; }
.official-ui-active .official-prep-deck-count .bitmap-text--battle-top .bitmap-glyph { margin-inline: -6px; }
.official-ui-active .official-prep-empty { background-size: auto; }
.official-ui-active #deck-prep-screen .prep-actions { height: 49px; min-height: 49px; padding: 0; margin: 0; gap: 16px;
  transform: translateY(-14px) !important; }
.official-ui-active #deck-prep-screen .prep-deck-panel::before { background: url("../assets/ui/prep/right/list_header.png") center 4px / 189px 21px no-repeat, url("../assets/ui/prep/right/quantity_header.png") center 52px / 351px 29px no-repeat; }
.official-ui-active #deck-prep-screen .prep-deck-item { width: 344px; min-height: 72px; background: rgba(19, 42, 46, .72); border: 1px solid rgba(90, 150, 150, .48); border-radius: 3px; padding: 8px 10px; }
.official-ui-active #deck-prep-screen .prep-deck-item:hover { background: rgba(28, 64, 68, .86); border-color: #76b3ae; }
.official-ui-active #deck-prep-screen .prep-deck-item .prep-deck-item-count { margin-left: auto; font-size: 19px; }
.official-ui-active #btn-prep-clear, .official-ui-active #btn-prep-back { width: 137px; min-width: 137px; height: 45px; min-height: 45px; padding: 0; }

/* design/SKILL.md §4.2 / §6.4 — recommendations and recovery actions
   remain inside the fitted stage, including the longest explanation. */
.official-ui-active #prep-auto-preview { width: 760px; min-width: 760px; max-width: none; height: 220px; max-height: none;
  justify-self: center; padding: 18px 32px; border: 0; border-image: none; border-radius: 0; box-shadow: none; filter: none;
  grid-template-columns: 1fr; grid-template-areas: "heading" "deltas" "explain" "actions"; gap: 8px; }
.official-ui-active #prep-auto-preview .prep-auto-preview-heading { flex-direction: row; align-items: center; justify-content: center; gap: 18px; }
.official-ui-active #prep-auto-preview .prep-auto-preview-heading strong { font-size: 22px; }
.official-ui-active #prep-auto-preview-status { font-size: 16px; }
.official-ui-active #prep-auto-preview .prep-auto-deltas { font-size: 16px; }
.official-ui-active #prep-auto-preview .prep-auto-explanation { font-size: 16px; line-height: 1.4; }
.official-ui-active #prep-auto-preview .prep-auto-preview-actions { display: flex; gap: 24px; }
/* Exact apply/save and reselect button PNGs are absent; retain readable text controls. */
.official-ui-active #prep-auto-preview .prep-auto-inline-btn { width: 180px; min-width: 180px; height: 45px; min-height: 45px;
  padding: 0 8px; border: 1px solid #a48b5c; border-image: none; background: #514631; border-radius: 2px;
  font: 18px/1.2 var(--font); filter: none; box-shadow: none; text-shadow: none; }
.official-ui-active #prep-auto-preview .prep-auto-inline-btn:hover { transform: none; background-color: #67583d; }
.official-ui-active #prep-auto-preview #btn-prep-auto-cancel { width: 137px; min-width: 137px; }

/* §2.3 / §4.3 — native 1310×97 decoration owns the HP slots; transparent
   portraits and the supplied 185×101 VS finish on the same 126px lower edge. */
.official-ui-active #top-bar { height: 126px; min-height: 126px; flex: 0 0 126px; padding: 0; background-color: transparent;
  background-size: 1310px 97px; background-position: center bottom; display: block; }
.official-ui-active #top-bar .tb-left, .official-ui-active #top-bar .tb-right { position: static; }
.official-ui-active #top-bar .hero-panel { position: absolute !important; top: 0; right: 0; bottom: 0; left: 0; width: 1152px; height: 126px; margin: auto; background: none; filter: none; z-index: auto; }
.official-ui-active #top-bar .hero-avatar { width: 118px; height: 122px; top: auto; bottom: 0; transform: none;
  border: 0; border-radius: 0; background: none; box-shadow: none; filter: none; overflow: visible; }
.official-ui-active #top-bar .hero-avatar::before, .official-ui-active #top-bar .hero-avatar::after { content: none; }
.official-ui-active #top-bar .player-panel .hero-avatar { left: 422px; right: auto; }
.official-ui-active #top-bar .enemy-panel .hero-avatar { left: 590px; right: auto; }
.official-ui-active #top-bar .hero-art-img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom;
  border: 0; border-radius: 0; clip-path: none; background: none; box-shadow: none; filter: none; }
/* design/SKILL.md §2.3 / §4.3 — the supplied transparent neutral emblem preserves
   ordinary player identity and its dark outline without the old black-removal filter. */
.official-ui-active #top-bar .hero-avatar.is-neutral-banner .hero-art-img {
  width: 83px; height: 92px; align-self: flex-end; filter: none;
}
.official-ui-active #top-bar .hero-detail { top: 34px; bottom: auto; height: 74px; width: 214px; gap: 0; justify-content: start; z-index: 2; }
.official-ui-active #top-bar .player-panel .hero-detail { left: 167px; right: auto; }
.official-ui-active #top-bar .enemy-panel .hero-detail { left: 750px; right: auto; }
.official-ui-active #top-bar .hero-name { height: 27px; max-height: none; font-size: 20px; color: #d6b774; line-height: 27px; }
.official-ui-active #top-bar .hero-name.official-composite-name { height: 44px; max-height: 44px; line-height: 44px; overflow: visible; }
.official-ui-active #top-bar .hero-name.official-composite-name .official-hero-name-art { max-height: 44px; width: auto; height: auto; object-fit: contain; }
.official-ui-active #top-bar .hero-title { height: 24px; font-size: 17px; line-height: 24px; }
.official-ui-active .official-hero-name-art, .official-ui-active .official-hero-title-art { width: auto; height: auto; max-width: none; max-height: none; }
.official-ui-active #top-bar .hp-wrap { position: absolute; top: 54px; width: 214px; height: 22px; }
.official-ui-active #top-bar .hp-track { width: 214px; height: 22px; flex: none; padding: 3px 4px; border-radius: 0; background: none; overflow: hidden; }
.official-ui-active #top-bar .hp-fill { border-radius: 0; height: 16px; background-size: 206px 16px; background-repeat: no-repeat; }
.official-ui-active #top-bar #enemy-hp-bar { background-position: right center; }
.official-ui-active #top-bar .hp-num { position: absolute; top: -3px; }
.official-ui-active #top-bar .player-panel .hp-num { left: 213px; }
.official-ui-active #top-bar .enemy-panel .hp-num { right: 213px; }
.official-ui-active #top-bar .tb-center { position: absolute; left: 50%; top: 4px; width: 130px; height: 49px; transform: translateX(-50%); z-index: 3; }
.official-ui-active #round-display { order: 0; padding: 0; height: 29px; min-width: 0; background: none; display: flex; align-items: center; justify-content: center; gap: 5px; }
.official-ui-active #round-display > span:first-child,
.official-ui-active #round-display > span:last-child { display: none; }
.official-ui-active #round-num.official-round-label { display: grid; place-items: center; min-width: 118px; min-height: 29px; font-size: 22px; font-weight: 700; color: #d6b774; }
.official-ui-active #round-num.official-round-label > img { display: block; width: 118px; height: 29px; object-fit: contain; }
.official-ui-active #phase-label { order: 1; margin-top: 0; width: 80px; min-width: 80px; height: 20px; min-height: 20px; background-size: auto; }
.official-ui-active #resolution-info { display: none !important; }
.official-ui-active #top-bar #enemy-hero .enemy-deck-remain { right: 127px; top: 65px; bottom: auto; width: 55px; height: 60px;
  background: none; border: 0; box-shadow: none; justify-content: center; padding: 0 0 5px; }
.official-ui-active .enemy-deck-icon { display: none; }
.official-ui-active #enemy-hand-num { transform: none; position: relative; left: -4px; }
.official-ui-active #top-bar .player-deck-remain { position: absolute; left: 114px; top: 65px; width: 55px; height: 60px;
  background: none; border: 0; box-shadow: none; display: grid; place-items: center; padding-bottom: 5px; }
.official-ui-active #hand-count-num { transform: none; position: relative; left: -4px; }
/* §4.2 / §4.3 — hover, focus and press keep the current supplied icon;
   the earlier package's hover images are a different visual family. */
.official-ui-active .battle-tool-dock { left: 24.5px; top: 190px; gap: 8px; }
.official-ui-active .battle-utility-actions { left: 24.5px; top: 350px; gap: 8px; }
.official-ui-active .battle-tool-dock .btn-sm, .official-ui-active .battle-utility-actions > button {
  width: 80px !important; height: 72px !important; min-width: 80px !important; min-height: 72px !important; flex: none;
  background-size: contain !important; background-position: center !important; transform: none !important; transition: none;
}
.official-ui-active .battle-tool-dock .btn-sm:hover,
.official-ui-active .battle-tool-dock .btn-sm:active,
.official-ui-active .battle-utility-actions > button:hover,
.official-ui-active .battle-utility-actions > button:active {
  background-image: var(--official-control-art) !important;
  background-position: center !important; transform: none !important;
  filter: brightness(1.12) drop-shadow(0 0 5px rgba(146,210,206,.4));
}
.official-ui-active .battle-tool-dock .btn-sm:focus-visible,
.official-ui-active .battle-utility-actions > button:focus-visible {
  background-image: var(--official-control-art) !important;
  background-position: center !important; transform: none !important;
  filter: brightness(1.12) drop-shadow(0 0 5px rgba(146,210,206,.4));
}
/* design/SKILL.md §4.2 Fitts' Law / §4.3 Visual Guidance — enlarge the
   right-side targets, artwork and labels by 25% while keeping the stage inset. */
.official-ui-active .battle-deploy-rail {
  position: fixed; right: 24.5px !important; width: 82.5px;
  top: calc(var(--official-battle-top-h) + var(--official-battle-field-h) / 2);
  gap: 11.25px; z-index: 80;
}
.official-ui-active .battle-deploy-rail .official-image-control { width: 82.5px !important; height: 85px !important; min-width: 82.5px !important; min-height: 85px !important; padding: 0; aspect-ratio: auto; background-size: contain !important; }
.official-ui-active .battle-deploy-rail .official-image-control::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: var(--official-control-label-art) center / auto no-repeat; pointer-events: none; transform: scale(1.25); transform-origin: center; }
.official-ui-active .battle-deploy-rail .btn-sm { max-height: none; }
/* §4.3 / §6.4 — every state keeps the same enlarged 82.5×85 button. Text
   is only the label fallback for states without a matching supplied word image. */
.official-ui-active .battle-deploy-rail .official-image-control { border-image: none !important; clip-path: none; box-shadow: none; }
.official-ui-active .battle-deploy-rail .official-image-control::before { content: none; }
.official-ui-active .battle-deploy-rail .official-image-control.official-text-label::after {
  content: attr(data-control-text); display: grid; place-content: center; background: none;
  color: #f4f1df; font: 16px/20px var(--font); white-space: pre-line; text-align: center;
  letter-spacing: 0; text-shadow: 0 1px 2px #142b31; }
.official-ui-active .battle-deploy-rail .official-image-control:hover,
.official-ui-active .battle-deploy-rail .official-image-control:active { transform: none; }
.official-ui-active .battle-deploy-rail .official-image-control:focus-visible { transform: none; }
.official-ui-active #battlefield { padding: 0; height: 480px; min-height: 480px; max-height: 480px; flex: 0 0 480px; }
/* design/SKILL.md §4.2 / §4.3 — shake only the battle content so neither
   side's fixed controls acquire a moving containing block. */
.official-ui-active #battlefield.screen-shake { animation: none; }
.official-ui-active #battlefield.screen-shake .battle-anim-clip { animation: boardShake 0.5s ease-out; }
.official-ui-active .battlefield-shell { padding: 0; width: 100%; }
.official-ui-active .bf-main { transform: none; }
.official-ui-active #board { transform: none !important; }
.official-ui-active .battle-anim-clip { overflow: visible; }
/* design/SKILL.md §4.3 — add 10px between war zones while keeping their native widths. */
.official-ui-active .battle-lanes { gap: 10px; }
.official-ui-active .battle-column { width: 308px; }
.official-ui-active .battle-column .lane { width: 308px; height: 170px; min-height: 170px; max-height: 170px; background-size: contain !important; }
.official-ui-active .terrain-octagon.terrain-assets-enabled { width: 308px; height: 117px; margin: 0; clip-path: none; overflow: visible; background: none; box-shadow: none; padding: 0; }
.official-ui-active .terrain-octagon .terrain-oct-body { width: 240px; height: 50px; margin: auto; }
.official-ui-active .terrain-octagon.terrain-assets-enabled .t-name,
.official-ui-active .terrain-octagon.terrain-assets-enabled .t-hint { display: block !important; visibility: visible !important; opacity: 1 !important; }
.official-ui-active .terrain-octagon .t-name { font-size: 19px; line-height: 24px; color: #f0e5cc; }
.official-ui-active .terrain-octagon .t-hint { max-width: 240px; font-size: 12px; line-height: 17px; color: #d7c39e; }
.official-ui-active .terrain-base-layer { display: none; }
.official-ui-active .battle-column[data-terrain="plains"] .lane { background-image: url("../assets/ui/battle/terrain_plain_large.png") !important; }
.official-ui-active .battle-column[data-terrain="mountains"] .lane { background-image: url("../assets/ui/battle/terrain_mountain_large.png") !important; }
.official-ui-active .battle-column[data-terrain="water"] .lane { background-image: url("../assets/ui/battle/terrain_water_large.png") !important; }
.official-ui-active .battle-column[data-terrain="city"] .lane { background-image: url("../assets/ui/battle/terrain_city_large.png") !important; }
.official-ui-active .battle-column[data-terrain="scorched"] .lane { background-image: url("../assets/ui/battle/terrain_scorched_large.png") !important; }
.official-ui-active .terrain-oct-total { z-index: 8; }
/* design/SKILL.md §4.2 / §4.3 — reserve the 6px selection lift inside the
   horizontal scroller so both resting and raised card faces remain complete. */
.official-ui-active #hand-panel { height: 236px; min-height: 236px; max-height: 236px; flex: 0 0 236px; padding: 0 15px; background: rgba(63,51,29,.48); border: 0; }
.official-ui-active #hand-panel::before, .official-ui-active #hand-panel::after { content: none; }
.official-ui-active #hand-panel .hand-bar { position: absolute; left: 12px; right: 12px; bottom: 2px; z-index: 3; pointer-events: none; }
.official-ui-active #hand-cards { min-height: 236px; height: 236px; padding: 0; gap: 0; overflow-y: visible; align-items: flex-start; }
.official-ui-active .card.official-card-face { width: 156px; height: 236px; padding: 0; isolation: isolate; overflow: hidden; }
.official-ui-active .official-card-face-image { width: 100%; height: 100%; max-width: 100%; top: 0; right: 0; bottom: 0; left: 0; transform: none; object-fit: contain; }
.official-ui-active .lane-cards .card.official-card-face { width: 90px; height: 136px; }
.official-ui-active .lane-cards .official-card-face-image, .official-ui-active .card-preview-ghost .official-card-face-image,
.official-ui-active .battlefield-drag .official-card-face-image,
.official-ui-active .official-battle-stack .official-card-face-image { width: 90px; height: 136px; object-fit: contain; }
/* design/SKILL.md §4.3 — keep the complete face fitted after a tactic leaves its lane for animation. */
.official-ui-active .battle-anim-clip > .card.official-card-face .official-card-face-image {
  width: 100%; height: 100%; object-fit: contain;
}
.official-ui-active .card-atk { background: none; box-shadow: none; text-shadow: none; }
/* §4.3 — center native glyphs on the blank socket (33,32), including drag copies. */
.official-ui-active .official-card-face .official-card-dynamic { left: 9px; top: 9px; bottom: auto; right: auto; width: 24px; height: 27px;
  min-width: 0; min-height: 0; padding: 0; background: none; display: flex; align-items: center; justify-content: center; line-height: 0; }
.official-ui-active .lane-cards .official-card-face .official-card-dynamic, .official-ui-active .card-preview-ghost .official-card-dynamic,
.official-ui-active .battlefield-drag .official-card-dynamic,
.official-ui-active .official-battle-stack .official-card-dynamic { left: 4px; top: 6px; width: 32px; height: 27px; }
.official-ui-active .drag-clone { transform: translate3d(var(--drag-x, 0), var(--drag-y, 0), 0) rotate(3deg); }
.official-ui-active .official-card-face .official-card-modifier { left: 50%; right: auto; top: auto; bottom: 23px; transform: translateX(-50%);
  width: 84px; height: 21px; min-height: 21px; padding: 0; border: 0; border-radius: 0; display: flex; align-items: center; justify-content: center;
  background: url("../assets/ui/battle/percentage/background_player.png") center / auto no-repeat; }
.official-ui-active .official-card-face .official-card-modifier.atk-nerf { width: 86px; background-image: url("../assets/ui/battle/percentage/background_enemy.png"); }
.official-ui-active .is-battle-card:not(.official-card-face) .card-row-top { height: 100%; }
.official-ui-active .is-battle-card:not(.official-card-face) .card-mod { top: auto; right: auto; left: 50%; bottom: 23px; transform: translateX(-50%);
  width: 84px; height: 21px; padding: 0; display: flex; justify-content: center; align-items: center; border-radius: 0;
  background: url("../assets/ui/battle/percentage/background_player.png") center / auto no-repeat; }
.official-ui-active .is-battle-card:not(.official-card-face) .card-mod.atk-nerf { width: 86px; background-image: url("../assets/ui/battle/percentage/background_enemy.png"); }
.official-ui-active .card.official-card-face::before { content: none; }
/* §4.3 — sweep stays inside the same card bounds as its face, including portrait-ratio campaign cards. */
.official-ui-active .card.official-card-face::after { top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; border-radius: 0; transform: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,239,178,.18) 50%, transparent 60%) -150% 0 / 300% 100%;
  animation: officialCardSheen 6s linear infinite; pointer-events: none; }
@keyframes officialCardSheen { 0%,40% { background-position: -150% 0; } 80%,100% { background-position: 150% 0; } }
.official-ui-active #hand-cards .card:hover, .official-ui-active #hand-cards .card.selected { transform: translateY(-6px); filter: none; box-shadow: none; }
.official-ui-active #hand-cards .card:hover::after, .official-ui-active #hand-cards .card.selected::after,
.official-ui-active #prep-grid .card:hover::after { content: ''; display: block !important; position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform: none;
  background: url("../assets/ui/prep/selection_highlight.png") center / auto no-repeat; mix-blend-mode: screen; pointer-events: none; z-index: 10; opacity: .48; animation: none; }
.official-ui-active .lane-cards .battlefield-card:hover::after { content: ''; display: block; position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;
  background: url("../assets/ui/prep/selection_highlight.png") center / contain no-repeat; transform: none; pointer-events: none; z-index: 10; opacity: .48; animation: none; }
/* §4.3 — use supplied lane guidance artwork at its native size, including the best-bonus label. */
.official-ui-active .player-lane.can-drop, .official-ui-active .player-lane.drag-over { outline: 0; box-shadow: none; transform: none; }
.official-ui-active .player-lane.can-drop:not(.best-lane)::after, .official-ui-active .player-lane.drag-over:not(.best-lane)::after {
  content: ''; position: absolute; top: 50%; right: auto; bottom: auto; left: 50%; width: 334px; height: 195px; transform: translate(-50%,-50%);
  background: url("../assets/ui/battle/selection_highlight.png") center / auto no-repeat; pointer-events: none; z-index: 5; }
.official-ui-active .player-lane.best-lane { outline: 0; box-shadow: none; animation: none; }
.official-ui-active .player-lane.best-lane::before { top: 50%; right: auto; bottom: auto; left: 50%; width: 333px; height: 195px; transform: translate(-50%,-50%);
  background: url("../assets/ui/battle/best_bonus_highlight.png") center / auto no-repeat; border: 0; box-shadow: none; mix-blend-mode: normal; }
.official-ui-active .player-lane.best-lane::after { content: none; }
.official-ui-active .official-lane-result { background: none; justify-content: center; padding: 0; gap: 0; }
.official-ui-active .official-lane-result-title { position: absolute; left: 50%; top: 50%; width: 298px; height: 96px;
  transform: translate(-50%, -50%); object-fit: contain; }
.official-ui-active .official-lane-result-detail { position: absolute; left: 50%; top: calc(50% + 2px); width: 280px;
  height: 27px; min-height: 27px; margin: 0; transform: translateX(-50%); color: #f4eee2; }
.official-ui-active .official-lane-result-detail > img { width: auto; height: auto; }

/* design/SKILL.md §4.2 / §6.4 — compact critical confirmations sit at the
   center of the logical stage; the actions remain full 88×26 hit targets. */
.official-ui-active #confirm-modal.official-quit-dialog .confirm-box, .official-ui-active #confirm-modal.official-clear-dialog .confirm-box {
  width: 500px; height: 108px; min-width: 500px; max-width: none; flex: none; padding: 12px 20px; gap: 4px; background-size: 100% 100%; box-shadow: none; }
.official-ui-active #confirm-modal.official-quit-dialog .modal-title { width: 101px; height: 24px; flex: 0 0 24px; background-size: auto; }
.official-ui-active #confirm-modal.official-clear-dialog .modal-title { width: 101px; height: 26px; flex: 0 0 26px; background-size: auto; }
.official-ui-active #confirm-modal.official-quit-dialog .confirm-msg { width: 392px; height: 23px; flex: 0 0 23px; background-size: auto; }
.official-ui-active #confirm-modal.official-clear-dialog .confirm-msg { width: 250px; height: 23px; flex: 0 0 23px; background-size: auto; }
.official-ui-active #confirm-modal .confirm-box .confirm-actions { margin-top: 0; height: 30px; }
.official-ui-active #result-overlay { background: rgba(0,0,0,.52); overflow: hidden; }
.official-ui-active #result-box.official-result-panel { top: 0; width: 889px; min-width: 889px; height: 432px; min-height: 432px; padding: 0; gap: 0; flex: none; filter: none; animation: fadeIn .25s ease both; background-size: contain; }
.official-ui-active #result-box.official-result-panel.result-win { background-image: url("../assets/ui/results/victory/panel.png?v=tactics-font-hud-20260929") !important; }
.official-ui-active #result-box.official-result-panel.result-lose { background-image: url("../assets/ui/results/defeat/panel.png") !important; }
.official-ui-active #result-box.official-result-panel::before { content: none; }
.official-ui-active #result-box.official-result-panel #result-title,
.official-ui-active #result-box.official-result-panel #result-desc,
.official-ui-active #result-box.official-result-panel #result-flavor { display: none; }
.official-ui-active .official-result-stats { position: absolute !important; top: 199px; left: 142px; width: 605px !important; height: 62px; min-height: 0; margin: 0; gap: 4px; grid-template-columns: repeat(4,1fr); }
.official-ui-active .official-result-stat { height: 62px; gap: 2px; font-size: 18px; }
.official-ui-active .official-result-stat:not(.official-result-stat--opponent) > img { display: none; }
.official-ui-active .official-result-stat > img, .official-ui-active .official-result-stat--hp > img { max-height: none; height: auto; width: auto; max-width: none; }
.official-ui-active .official-result-stat--opponent .official-result-opponent-art { display: block; width: auto; height: 17px; max-width: 112px; object-fit: contain; }
.official-ui-active .official-result-stat--opponent { gap: 3px; flex-wrap: wrap; align-content: center; }
.official-ui-active #result-box.official-result-panel .result-actions { position: absolute; top: 305px; left: 50%; transform: translateX(-50%); width: 540px; margin: 0; max-width: none; gap: 16px; }
.official-ui-active #result-box.official-result-panel .result-actions .official-image-control { width: 98px; height: 32px; min-width: 98px; min-height: 32px; padding: 0; }

/* §4.3 — damage floats keep native glyph dimensions and remain next to the affected portrait. */
.official-ui-active .dmg-float.official-hp-damage {
  position: fixed; right: auto; bottom: auto; z-index: 160;
  width: max-content; height: auto; gap: 2px; text-shadow: none;
  transform: translateX(-50%); animation: officialDamageFloat 1.5s ease forwards;
}
@keyframes officialDamageFloat {
  0%, 20% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -32px); }
}

/* §4.3 — quick-deploy previews use their existing placement/actions without extra outline frames. */
.official-ui-active #hand-cards .card.one-click-recommended,
.official-ui-active .lane-cards .one-click-preview-slot {
  outline: none !important;
  box-shadow: none !important;
}
