/* 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. */
/* design/SKILL.md §2.3 / §4.2 / §4.3 — formal blank surfaces keep the current action text.
   Supplement 4 supplies shared long/short gray states for disabled controls. */
.official-ui-active button.official-text-button {
  width: auto !important; min-width: 152px !important; height: 32px !important; min-height: 32px !important;
  padding: 0 16px !important; border: 0 !important; border-image: none !important; border-radius: 0;
  background-size: 100% 100% !important; color: #f5f2e6 !important;
  font: 14px/32px var(--font, serif); letter-spacing: 0; white-space: nowrap;
  text-shadow: 0 1px 2px #243333 !important; box-shadow: none !important;
  filter: none !important; transform: none !important;
}
.official-ui-active button.official-text-button[data-blank-family$="_small"] { min-width: 98px !important; }
.official-ui-active button.official-text-button > * { visibility: visible; color: inherit; }
.official-ui-active button.official-text-button > .btn-inner,
.official-ui-active button.official-text-button > .btn-back-inner {
  display: inline; min-width: 0; min-height: 0; padding: 0; border: 0; border-image: none; background: none;
  font: inherit; letter-spacing: inherit; filter: none; transform: none; text-shadow: inherit;
}
.official-ui-active button.official-text-button::before,
.official-ui-active button.official-text-button::after { content: none; }
.official-ui-active button.official-text-button:disabled {
  opacity: 1; filter: none !important; cursor: not-allowed; color: #c6c6c6 !important;
}
.official-ui-active #confirm-modal button.official-text-button { color: #f5f2e6 !important; }
.official-ui-active #result-box .result-actions [data-action="finish-war"].official-image-control {
  width: 152px; min-width: 152px; height: 32px; min-height: 32px;
}

/* design/SKILL.md §2.3 / §6.4 — every confirmation shares the approved blue frame. */
.official-ui-active #confirm-modal .confirm-box,
.official-ui-active #confirm-modal.official-deploy-dialog .confirm-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 480px; min-width: 480px; max-width: none; height: auto; min-height: 108px;
  padding: 14px 20px; gap: 12px; border: 0; box-shadow: none;
  background: url("../assets/ui/prep/dialog/frame_bottom.png") center / 100% 100% no-repeat;
}
.official-ui-active #confirm-modal .modal-title { display: none; }
.official-ui-active #confirm-modal .confirm-msg { margin: 0; }
.official-ui-active #confirm-modal.official-deploy-dialog .confirm-msg {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; height: 26px; min-height: 26px; margin: 0; padding: 0; background: none;
  font-size: 0; line-height: 1;
}
.official-deploy-dialog .deploy-warning-prefix { width: 52px; height: 26px; }
/* §4.3 — prefix text occupies y=7..22 inside its 26px warning image; align the other glyphs to it. */
.official-deploy-dialog .deploy-warning-suffix { width: 203px; height: 16px; transform: translateY(2px); }
.official-deploy-dialog .bitmap-text--deploy-confirm { display: inline-flex; gap: 0; align-items: center; transform: translateY(1.5px); }
.official-ui-active .official-deploy-dialog .bitmap-text--deploy-confirm .bitmap-glyph { width: auto; height: auto; }
.official-ui-active #confirm-modal.official-deploy-dialog .confirm-actions {
  height: 32px; margin: 0; gap: 32px; align-items: center;
}
.official-ui-active #confirm-modal.official-deploy-dialog #btn-confirm-ok.official-confirm-control,
.official-ui-active #confirm-modal.official-deploy-dialog #btn-confirm-cancel.official-confirm-control {
  width: 132px; min-width: 132px; height: 32px; min-height: 32px;
}

/* design/SKILL.md §4.2 / §4.3 / §6.3 — only public state drives these indicators.
   Both supplied icons open the formal explanations supplied in supplement 3. */
.lane-power-markers { position: absolute; z-index: 12; display: flex; align-items: center; height: 44px; gap: 0; }
.lane-power-markers .formation-marker {
  position: static; width: 44px; height: 44px; min-width: 44px; padding: 0; border: 0;
  background: url("../assets/ui/battle/buff_formation.png") center / 33px 33px no-repeat;
  box-shadow: none; text-shadow: none; color: transparent; flex: none;
}
.lane-power-markers .formation-marker::before { content: none; }
.lane-power-markers .formation-marker:focus-visible { outline: 2px solid #eed796; outline-offset: -4px; }
.lane-power-markers .formation-marker:hover,
.lane-power-markers .formation-marker[aria-expanded="true"] { filter: brightness(1.15); }
.hidden-tactic-marker { display: block; width: 30px; height: 44px; min-width: 30px; flex: none;
  padding: 0; border: 0; box-shadow: none; cursor: pointer; touch-action: manipulation;
  background: url("../assets/ui/battle/buff_power.png") center / 24px 30px no-repeat; }
.hidden-tactic-marker:focus-visible { outline: 2px solid #eed796; outline-offset: -2px; }
.hidden-tactic-marker:hover,
.hidden-tactic-marker[aria-expanded="true"] { filter: brightness(1.15); }
/* design/SKILL.md §4.3 — all result detail lines use the established draw spacing. */
.official-ui-active .official-lane-result-detail { top: calc(50% + 9px); }
.official-ui-active .official-lane-result--draw .official-lane-draw-score {
  height: 27px; font: 24px/27px var(--font, serif); color: #f4eee2;
  text-shadow: 0 1px 2px #000; letter-spacing: 0;
}

/* design/SKILL.md §4.3 / §6.4 — the formal blank ribbon carries live feedback.
   Slice the fixed icon and end cap separately so long save/error messages never stretch the icon.
   The separately supplied restoration-success ribbon retains its own exact artwork. */
.official-ui-active #toast:not(.official-restored-toast) {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  width: max-content; min-width: 323px; max-width: calc(100% - 48px); height: 66px;
  padding: 8px 7px 0; background: none; border-radius: 0;
  border-style: solid; border-color: transparent; border-width: 0 26px 0 72px;
  border-image-source: url('../assets/ui/dialogs/toast_frame.png');
  border-image-slice: 0 26 0 72 fill; border-image-width: 0 26px 0 72px; border-image-repeat: stretch;
  color: #ffff00; font: 16px/18px var(--font, serif); letter-spacing: 0;
  white-space: normal; overflow-wrap: anywhere; box-shadow: none; text-shadow: 0 1px 1px #20440e;
}
