/* V1.28Beta-duel-layout-balance1
   Final desktop 1v1 battle geometry pass. Keep this file loaded last. */
@media (min-width: 900px) {
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) {
    --duel-fighters-lift-final: clamp(34px, 5.2dvh, 68px) !important;
    --duel-action-bottom-final: calc(max(6px, env(safe-area-inset-bottom)) + clamp(6px, 1.25dvh, 16px)) !important;
    --duel-action-text-y-final: 45.5% !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .fighters.fighters {
    --fighter-card-w: clamp(226px, 18.4vw, 320px) !important;
    --fighter-panel-w: clamp(198px, 16.5vw, 286px) !important;
    --fighter-inner-gap: clamp(9px, 0.78vw, 13px) !important;
    --fighter-gap: clamp(16px, 2vw, 38px) !important;
    --versus-size: clamp(48px, 4.1vw, 66px) !important;
    --fighter-card-h: clamp(438px, calc(100dvh - 245px), 596px) !important;
    --combatant-w: calc(var(--fighter-card-w) + var(--fighter-panel-w) + var(--fighter-inner-gap)) !important;
    align-content: center !important;
    align-items: start !important;
    gap: var(--fighter-gap) !important;
    grid-template-columns: var(--combatant-w) var(--versus-size) var(--combatant-w) !important;
    transform: translateY(calc(var(--duel-fighters-lift-final) * -1)) !important;
    width: min(100%, calc(var(--combatant-w) * 2 + var(--versus-size) + var(--fighter-gap) * 2)) !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .combatant.combatant {
    height: var(--fighter-card-h) !important;
    min-height: var(--fighter-card-h) !important;
    max-height: var(--fighter-card-h) !important;
    width: var(--combatant-w) !important;
    min-width: var(--combatant-w) !important;
    max-width: var(--combatant-w) !important;
    gap: var(--fighter-inner-gap) !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .fighter.fighter {
    height: var(--fighter-card-h) !important;
    min-height: var(--fighter-card-h) !important;
    max-height: var(--fighter-card-h) !important;
    width: var(--fighter-card-w) !important;
    min-width: var(--fighter-card-w) !important;
    max-width: var(--fighter-card-w) !important;
    padding: clamp(2px, 0.34dvh, 4px) !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .fighter.fighter::before {
    inset: -3px !important;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .28)) !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .character-face.character-face {
    border-radius: 5px !important;
    background:
      radial-gradient(circle at 50% 0, color-mix(in srgb, var(--fighter-accent) 7%, transparent), transparent 31%),
      rgba(3, 6, 11, .32) !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, .045),
      inset 0 -18px 34px rgba(0, 0, 0, .18) !important;
    overflow: hidden !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .avatar.avatar {
    background-size: var(--duel-portrait-size, auto 108%), cover, cover !important;
    background-position: var(--duel-portrait-position, var(--art-position, center 36%)), center center, center center !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .avatar.avatar.avatar.avatar[data-character="Letmetalk"] {
    --art-size: auto 104% !important;
    --duel-portrait-size: auto 104% !important;
    --art-position: center 18% !important;
    --duel-portrait-position: center 18% !important;
    background-size: var(--duel-portrait-size, var(--art-size)), cover, cover !important;
    background-position: var(--duel-portrait-position, var(--art-position)), center center, center center !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .fighter-panel.fighter-panel {
    height: var(--fighter-card-h) !important;
    min-height: var(--fighter-card-h) !important;
    max-height: var(--fighter-card-h) !important;
    width: var(--fighter-panel-w) !important;
    min-width: var(--fighter-panel-w) !important;
    max-width: var(--fighter-panel-w) !important;
    overflow: visible !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .fighter-panel.fighter-panel .equipment-slots.equipment-slots {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 1fr !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    gap: clamp(6px, .62vw, 9px) !important;
    min-height: clamp(66px, 8.6dvh, 88px) !important;
    padding: clamp(6px, .66vw, 9px) !important;
    overflow: visible !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .fighter-panel.fighter-panel .equipment-slot.equipment-slot {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    min-height: clamp(50px, 6.1dvh, 64px) !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 1 auto !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards {
    left: calc(var(--duel-stage-left-safe, 16px) + (100vw - var(--duel-stage-left-safe, 16px) - var(--duel-stage-right-safe, calc(var(--battle-log-width-final, 236px) + 32px))) / 2) !important;
    right: auto !important;
    bottom: var(--duel-action-bottom-final) !important;
    transform: translateX(-50%) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html body:not(.maintenance-mode).battle-controls-active.battle-log-collapsed:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards {
    left: 50% !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards::before,
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards::after,
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards > .action-card.action-card::before,
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards > .action-card.action-card::after {
    content: none !important;
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards > .action-card.action-card {
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards > .action-card.action-card > span {
    top: var(--duel-action-text-y-final) !important;
    transform: translateY(-50%) !important;
    line-height: 1 !important;
  }
}

/* V1.28Beta-battle-card-topgap1:
   Desktop duel card: the name strip floats above the portrait instead of
   reserving a blank translucent row inside the framed art area. */
@media (min-width: 900px) {
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .fighter.fighter.fighter {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .fighter-head.fighter-head.fighter-head {
    position: absolute !important;
    left: clamp(8px, 1vw, 12px) !important;
    right: clamp(8px, 1vw, 12px) !important;
    top: calc((clamp(30px, 4.1dvh, 38px) + clamp(7px, 1dvh, 10px)) * -1) !important;
    z-index: 26 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .character-face.character-face.character-face {
    grid-row: 1 !important;
    align-self: stretch !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
  }
}

/* V1.28Beta-battle-axis-swap-actions5-final:
   Final desktop order: outside status panels, inside character cards facing VS. */
@media (min-width: 900px) {
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .you-combatant.you-combatant.you-combatant.you-combatant {
    display: grid !important;
    grid-template-columns: var(--fighter-panel-w) var(--fighter-card-w) !important;
    gap: var(--fighter-inner-gap) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    justify-self: end !important;
    width: var(--combatant-w) !important;
    min-width: var(--combatant-w) !important;
    max-width: var(--combatant-w) !important;
    transform: none !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .you-combatant.you-combatant.you-combatant.you-combatant > .fighter-panel.fighter-panel {
    order: 1 !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .you-combatant.you-combatant.you-combatant.you-combatant > .fighter.fighter {
    order: 2 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .opponent-combatant.opponent-combatant.opponent-combatant.opponent-combatant {
    display: grid !important;
    grid-template-columns: var(--fighter-card-w) var(--fighter-panel-w) !important;
    gap: var(--fighter-inner-gap) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    justify-self: start !important;
    width: var(--combatant-w) !important;
    min-width: var(--combatant-w) !important;
    max-width: var(--combatant-w) !important;
    transform: none !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .opponent-combatant.opponent-combatant.opponent-combatant.opponent-combatant > .fighter.fighter {
    order: 1 !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .opponent-combatant.opponent-combatant.opponent-combatant.opponent-combatant > .fighter-panel.fighter-panel {
    order: 2 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
}

/* V1.28Beta-battle-axis-swap-actions5:
   Desktop duel swap: status panels sit outside, character cards face the VS gap. */
@media (min-width: 900px) {
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .you-combatant.you-combatant.you-combatant {
    display: grid !important;
    grid-template-columns: var(--fighter-panel-w) var(--fighter-card-w) !important;
    gap: var(--fighter-inner-gap) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    justify-self: end !important;
    width: var(--combatant-w) !important;
    min-width: var(--combatant-w) !important;
    max-width: var(--combatant-w) !important;
    transform: none !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .you-combatant.you-combatant.you-combatant > .fighter-panel.fighter-panel {
    order: 1 !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .you-combatant.you-combatant.you-combatant > .fighter.fighter {
    order: 2 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .opponent-combatant.opponent-combatant.opponent-combatant {
    display: grid !important;
    grid-template-columns: var(--fighter-card-w) var(--fighter-panel-w) !important;
    gap: var(--fighter-inner-gap) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    justify-self: start !important;
    width: var(--combatant-w) !important;
    min-width: var(--combatant-w) !important;
    max-width: var(--combatant-w) !important;
    transform: none !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .opponent-combatant.opponent-combatant.opponent-combatant > .fighter.fighter {
    order: 1 !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .opponent-combatant.opponent-combatant.opponent-combatant > .fighter-panel.fighter-panel {
    order: 2 !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
}

@media (min-width: 900px) and (max-width: 1100px) {
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .fighters.fighters {
    --fighter-card-w: clamp(190px, 20.5vw, 220px) !important;
    --fighter-panel-w: clamp(158px, 16.5vw, 178px) !important;
    --fighter-gap: clamp(10px, 1.3vw, 18px) !important;
    --versus-size: clamp(40px, 4vw, 48px) !important;
  }
}

@media (min-width: 1101px) and (max-width: 1279px) {
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .fighters.fighters {
    --fighter-card-w: clamp(210px, 19vw, 242px) !important;
    --fighter-panel-w: clamp(178px, 16vw, 214px) !important;
    --fighter-gap: clamp(12px, 1.6vw, 24px) !important;
  }
}

/* V1.28Beta-duel-symmetry-action3:
   1v1 rule: the left player block keeps the same visual breathing room to VS as the
   right block; action buttons align to the VS center and their text sits on the
   lower-right gem band of the painted button art. */
@media (min-width: 900px) {
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) {
    --duel-action-bottom-final: calc(max(6px, env(safe-area-inset-bottom)) + clamp(34px, 4.4dvh, 64px)) !important;
    --duel-action-text-x-left-final: 43% !important;
    --duel-action-text-x-right-final: 8% !important;
    --duel-action-text-y-final: 58% !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .fighters.fighters {
    --fighter-gap: clamp(28px, 3.1vw, 58px) !important;
    --fighter-card-w: clamp(246px, 19.8vw, 348px) !important;
    --fighter-panel-w: clamp(214px, 17.2vw, 304px) !important;
    justify-content: center !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .you-combatant.you-combatant {
    transform: translateX(clamp(-22px, -1.15vw, -10px)) !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) .versus.versus {
    align-self: center !important;
    justify-self: center !important;
    z-index: 80 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards {
    left: 50% !important;
    bottom: var(--duel-action-bottom-final) !important;
    width: min(820px, 58vw) !important;
    max-width: calc(100vw - 48px) !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(16px, 1.6vw, 26px) !important;
    transform: translateX(-50%) !important;
    z-index: 1700 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards > .action-card.action-card {
    aspect-ratio: 1983 / 793 !important;
    min-height: clamp(74px, 5.8vw, 104px) !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]) #cards#cards#cards.cards.cards > .action-card.action-card > span {
    left: var(--duel-action-text-x-left-final) !important;
    right: var(--duel-action-text-x-right-final) !important;
    top: var(--duel-action-text-y-final) !important;
    width: auto !important;
    height: auto !important;
    display: grid !important;
    place-items: center !important;
    transform: translateY(-50%) !important;
    font-size: clamp(20px, 1.95vw, 30px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 899px) {
  html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards.cards {
    left: 3px !important;
    width: calc(100vw - 6px) !important;
    inline-size: calc(100vw - 6px) !important;
    bottom: calc(var(--mobile-battle-action-bottom, 118px) + clamp(8px, 2.4vw, 14px)) !important;
    gap: clamp(3px, 1.1vw, 7px) !important;
  }

  html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards.cards > .action-card.action-card {
    transform: scale(1.04) !important;
    transform-origin: center center !important;
  }

  html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards.cards > .action-card.action-card > span {
    left: 42% !important;
    right: 8% !important;
    top: 57% !important;
    width: auto !important;
    height: auto !important;
    display: grid !important;
    place-items: center !important;
    transform: translateY(-50%) !important;
    font-size: clamp(15px, 4.5vw, 20px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
}

/* V1.28Beta-action-button-state1: preserve action art ratio and make resource-blocked buttons readable. */
html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card > span {
  position: absolute !important;
  left: 38% !important;
  right: 15% !important;
  top: 44% !important;
  bottom: auto !important;
  z-index: 4 !important;
  display: grid !important;
  place-items: center !important;
  max-width: none !important;
  min-width: 0 !important;
  transform: translateY(-50%) !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card.action-blocked-rule:disabled {
  --action-block-color: #ffbe6a;
  opacity: 1 !important;
  cursor: not-allowed !important;
  filter:
    saturate(.76)
    brightness(.78)
    drop-shadow(0 0 10px color-mix(in srgb, var(--action-block-color) 44%, transparent)) !important;
}

html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card.action-blocked-fatigue:disabled {
  --action-block-color: #ff6f5f;
}

html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card.action-blocked-defend:disabled {
  --action-block-color: #8fc8ff;
}

html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card.action-blocked-laziness:disabled {
  --action-block-color: #f2c16f;
}

html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card.action-blocked-rule:disabled::after {
  content: attr(data-block-label) !important;
  position: absolute !important;
  left: 40% !important;
  right: 17% !important;
  top: 61% !important;
  bottom: auto !important;
  z-index: 5 !important;
  display: grid !important;
  place-items: center !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 2px 6px 3px !important;
  border: 1px solid color-mix(in srgb, var(--action-block-color) 70%, rgba(255, 255, 255, .28)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, #08090d 72%, var(--action-block-color) 28%) !important;
  color: #fff7e6 !important;
  -webkit-text-fill-color: #fff7e6 !important;
  box-shadow:
    0 0 10px color-mix(in srgb, var(--action-block-color) 42%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .2) !important;
  font-size: clamp(9px, 2.35vw, 12px) !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85) !important;
  white-space: nowrap !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-50%) !important;
  pointer-events: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
}

@media (max-width: 899px) {
  html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card {
    background-position: center center !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
  }

  html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card > span {
    left: 37% !important;
    right: 16% !important;
    top: 43% !important;
    font-size: clamp(13px, 4.1vw, 17px) !important;
  }

  html body:not(.maintenance-mode).battle-controls-active #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card.action-blocked-rule:disabled::after {
    left: 39% !important;
    right: 18% !important;
    top: 62% !important;
    padding: 2px 5px 3px !important;
  }
}

@media (min-width: 900px) {
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards {
    width: clamp(430px, 34vw, 560px) !important;
    min-width: 0 !important;
    max-width: min(560px, calc(100vw - var(--battle-log-width-final, 236px) - 28px)) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-items: center !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
    background-position: center center !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle) #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card > span {
    left: 38% !important;
    right: 15% !important;
    top: 44% !important;
    font-size: clamp(14px, 1.35vw, 20px) !important;
  }
}

/* V1.28Beta-battle-axis-swap-actions4:
   Swap role/status columns, recenter the VS axis, and make the action cluster
   1.5x larger with labels locked to the button gem field. */
@media (min-width: 900px) {
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)) {
    --duel-action-label-left-final: 48% !important;
    --duel-action-label-right-final: 6% !important;
    --duel-action-label-top-final: 58% !important;
    --duel-action-width-final: min(840px, calc(100vw - var(--battle-log-width-final, 236px) - 44px)) !important;
    --duel-action-gap-final: clamp(24px, 2.4vw, 39px) !important;
    --duel-action-font-final: clamp(21px, 2.025vw, 30px) !important;
    --duel-visual-axis-offset-final: 0px !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .fighters.fighters {
    display: grid !important;
    grid-template-columns:
      minmax(0, var(--combatant-w))
      var(--versus-size)
      minmax(0, var(--combatant-w)) !important;
    justify-content: center !important;
    justify-items: stretch !important;
    align-items: stretch !important;
    gap: var(--fighter-gap) !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .you-combatant.you-combatant,
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .opponent-combatant.opponent-combatant {
    display: grid !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    transform: none !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .you-combatant.you-combatant {
    display: grid !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    grid-template-columns: var(--fighter-card-w) var(--fighter-panel-w) !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .you-combatant.you-combatant > .fighter.fighter {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .you-combatant.you-combatant > .fighter-panel.fighter-panel {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .opponent-combatant.opponent-combatant {
    grid-template-columns: var(--fighter-panel-w) var(--fighter-card-w) !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .opponent-combatant.opponent-combatant > .fighter-panel.fighter-panel {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .opponent-combatant.opponent-combatant > .fighter.fighter {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .versus.versus {
    grid-column: 2 !important;
    grid-row: 1 !important;
    place-self: center !important;
    transform: translateX(var(--battle-vs-offset-x, 0px)) !important;
    margin: 0 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    #cards#cards#cards#cards.cards.cards {
    display: grid !important;
    position: absolute !important;
    left: var(--battle-vs-center-viewport-x, calc(50% + clamp(12px, 1vw, 16px))) !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(max(6px, env(safe-area-inset-bottom)) + clamp(8px, 1.2dvh, 14px)) !important;
    width: var(--duel-action-width-final) !important;
    min-width: min(645px, calc(100vw - var(--battle-log-width-final, 236px) - 44px)) !important;
    max-width: calc(100vw - var(--battle-log-width-final, 236px) - 44px) !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: var(--duel-action-gap-final) !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    transform: translateX(-50%) !important;
    transform-origin: center bottom !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card {
    display: block !important;
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    justify-self: stretch !important;
    aspect-ratio: 16 / 9 !important;
    min-height: clamp(111px, 8.7vw, 156px) !important;
    background-position: center center !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    #cards#cards#cards#cards.cards.cards > .action-card.action-card.action-card > span {
    position: absolute !important;
    left: var(--duel-action-label-left-final) !important;
    right: var(--duel-action-label-right-final) !important;
    top: var(--duel-action-label-top-final) !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    display: grid !important;
    place-items: center !important;
    transform: translateY(-50%) !important;
    font-size: var(--duel-action-font-final) !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
}

/* V1.28Beta-battle-card-topgap2-tail:
   Remove the extra translucent row above duel portraits by letting the art fill
   the full fighter frame while the name strip floats above it. */
@media (min-width: 900px) {
  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .fighter.fighter.fighter {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 0 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .fighter-head.fighter-head.fighter-head {
    position: absolute !important;
    left: clamp(8px, 1vw, 12px) !important;
    right: clamp(8px, 1vw, 12px) !important;
    top: calc((clamp(30px, 4.1dvh, 38px) + clamp(7px, 1dvh, 10px)) * -1) !important;
    z-index: 26 !important;
  }

  html body:not(.maintenance-mode).battle-controls-active:has(#appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app) #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle))
    #appRoot#appRoot#appRoot.app.battle-app.duel-battle-app:not(.team-battle-app):not(.identity-battle-app)
    #battle#battle#battle.battle:not([hidden]):not(.team-mode):not(.identity-battle)
    .character-face.character-face.character-face {
    grid-row: 1 !important;
    align-self: stretch !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
  }
}
