/* R25R8: compact, semantic mobile fight controls. Input geometry stays owned by r25-mobile-ui-controller.js. */
body.touch-ui-enabled.sk-scene-fight #mobileEsc,
body.touch-ui-enabled.sk-scene-pause #mobileEsc,
body.touch-ui-enabled.sk-scene-fight #touchFullscreen,
body.touch-ui-enabled.sk-scene-pause #touchFullscreen,
#b53UnifiedMobileUi .b53-tools {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#b53UnifiedMobileUi {
  --b53-btn: clamp(52px, 14.6vh, 66px) !important;
  --b53-gap: clamp(6px, 1.8vh, 9px) !important;
  --b53-dpad: clamp(120px, 33vh, 148px) !important;
}

#b53UnifiedMobileUi .b53-left-zone {
  left: calc(12px + env(safe-area-inset-left)) !important;
  bottom: calc(10px + env(safe-area-inset-bottom)) !important;
}

#b53UnifiedMobileUi .b53-action-grid {
  right: calc(12px + env(safe-area-inset-right)) !important;
  bottom: calc(10px + env(safe-area-inset-bottom)) !important;
}

#b53UnifiedMobileUi .touch-btn {
  border-width: 1.4px !important;
  border-radius: clamp(15px, 4vh, 21px) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.10), transparent 34%),
    linear-gradient(180deg, rgba(9,35,63,.94), rgba(2,11,27,.97)) !important;
  box-shadow:
    0 9px 22px rgba(0,0,0,.52),
    0 0 0 1px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 -9px 18px rgba(0,0,0,.24) !important;
  display: grid !important;
  grid-template-rows: 1fr auto !important;
  place-items: center !important;
  padding: 5px 4px 4px !important;
  isolation: isolate;
}

#b53UnifiedMobileUi .attack-light,
#b53UnifiedMobileUi .kick-light {
  border-color: rgba(79,214,255,.88) !important;
}

#b53UnifiedMobileUi .attack-heavy,
#b53UnifiedMobileUi .kick-heavy {
  border-color: rgba(255,207,73,.94) !important;
  background:
    linear-gradient(145deg, rgba(255,244,184,.13), transparent 34%),
    linear-gradient(180deg, rgba(104,61,10,.96), rgba(37,18,3,.98)) !important;
}

#b53UnifiedMobileUi .kick-light,
#b53UnifiedMobileUi .kick-heavy {
  clip-path: polygon(10% 0, 100% 0, 100% 88%, 88% 100%, 0 100%, 0 12%);
}

#b53UnifiedMobileUi .block-btn {
  border-color: rgba(112,190,255,.96) !important;
  background:
    linear-gradient(145deg, rgba(207,235,255,.14), transparent 36%),
    linear-gradient(180deg, rgba(22,91,172,.97), rgba(3,28,72,.99)) !important;
}

#b53UnifiedMobileUi .special-btn {
  border-color: rgba(255,105,154,.98) !important;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,185,219,.22), transparent 45%),
    linear-gradient(180deg, rgba(205,30,78,.98), rgba(72,5,28,.99)) !important;
  box-shadow:
    0 9px 22px rgba(0,0,0,.52),
    0 0 18px rgba(255,51,119,.28),
    inset 0 1px 0 rgba(255,255,255,.15),
    inset 0 -9px 18px rgba(0,0,0,.24) !important;
}

#b53UnifiedMobileUi .special-btn.special-ready:not(.special-max-ready) {
  border-color: rgba(255,145,208,.98) !important;
  box-shadow:
    0 9px 22px rgba(0,0,0,.52),
    0 0 18px rgba(255,79,164,.52),
    inset 0 1px 0 rgba(255,255,255,.18) !important;
}

#b53UnifiedMobileUi .special-btn.special-max-ready {
  border-color: #fff0a2 !important;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,247,177,.42), transparent 42%),
    linear-gradient(180deg, rgba(220,75,40,.99), rgba(86,7,45,.99)) !important;
  box-shadow:
    0 9px 22px rgba(0,0,0,.52),
    0 0 18px rgba(255,230,91,.78),
    0 0 34px rgba(255,74,162,.48),
    inset 0 1px 0 rgba(255,255,255,.28) !important;
}

#b53UnifiedMobileUi .r25-action-icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: clamp(27px, 7.4vh, 35px);
  height: clamp(27px, 7.4vh, 35px);
  margin-top: 1px;
  color: #f8fdff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.82));
  pointer-events: none;
}

#b53UnifiedMobileUi .r25-action-icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

#b53UnifiedMobileUi .r25-icon-main {
  fill: rgba(245,252,255,.20);
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#b53UnifiedMobileUi .r25-icon-detail,
#b53UnifiedMobileUi .r25-icon-burst {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#b53UnifiedMobileUi .attack-heavy .r25-action-icon,
#b53UnifiedMobileUi .kick-heavy .r25-action-icon {
  color: #fff0a2;
}

#b53UnifiedMobileUi .block-btn .r25-action-icon {
  color: #d7f0ff;
}

#b53UnifiedMobileUi .special-btn .r25-action-icon {
  color: #fff4b0;
  filter: drop-shadow(0 0 7px rgba(255,232,109,.62)) drop-shadow(0 2px 4px rgba(0,0,0,.82));
}

#b53UnifiedMobileUi .r25-action-label {
  display: block !important;
  max-width: 100%;
  margin: 0 !important;
  overflow: hidden;
  color: rgba(245,251,255,.94);
  font: 900 clamp(6.5px, 1.9vh, 8px)/1 Arial, sans-serif !important;
  letter-spacing: .025em !important;
  text-overflow: clip;
  text-shadow: 0 2px 3px rgba(0,0,0,.92);
  white-space: nowrap;
  pointer-events: none;
}

#b53UnifiedMobileUi .r25-action-key {
  position: absolute;
  left: 5px;
  top: 4px;
  min-width: 13px;
  height: 13px;
  padding: 0 2px;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 5px;
  background: rgba(0,4,14,.66);
  color: rgba(236,246,255,.78);
  font: 800 7px/12px Arial, sans-serif;
  text-align: center;
  pointer-events: none;
}

#b53UnifiedMobileUi .touch-btn.active,
#b53UnifiedMobileUi .touch-btn:active,
#b53UnifiedMobileUi .touch-btn.r25-touch-active {
  transform: translateY(2px) scale(.94) !important;
  filter: brightness(1.32) saturate(1.14) !important;
  border-color: #fff !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.52), 0 0 22px rgba(79,214,255,.45), inset 0 0 17px rgba(255,255,255,.20) !important;
}

#b53UnifiedMobileUi #r25MoveDpad {
  border-radius: 50% !important;
  border-color: rgba(93,214,255,.88) !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(2,8,20,.98) 0 21%, transparent 22%),
    radial-gradient(circle at 42% 34%, rgba(46,124,178,.40), transparent 48%),
    linear-gradient(180deg, rgba(12,49,82,.94), rgba(2,12,29,.98)) !important;
  box-shadow: inset 0 0 24px rgba(0,0,0,.72), 0 9px 21px rgba(0,0,0,.55), 0 0 20px rgba(56,189,248,.20) !important;
}

#b53UnifiedMobileUi #r25MoveDpad .r25-dpad-arm {
  border-color: rgba(187,232,255,.62) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(37,96,144,.94), rgba(4,25,52,.97)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13), inset 0 -7px 13px rgba(0,0,0,.26), 0 3px 9px rgba(0,0,0,.34) !important;
}

#b53UnifiedMobileUi #r25MoveDpad .r25-dpad-center {
  border: 1px solid rgba(117,219,255,.30);
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(19,59,91,.98), rgba(1,8,20,.99)) !important;
  box-shadow: inset 0 0 10px rgba(0,0,0,.72), 0 0 8px rgba(65,211,255,.16);
}

@media (orientation: landscape) and (max-height: 390px) {
  #b53UnifiedMobileUi { --b53-btn: 50px !important; --b53-gap: 6px !important; --b53-dpad: 118px !important; }
  #b53UnifiedMobileUi .b53-left-zone { left: calc(7px + env(safe-area-inset-left)) !important; bottom: calc(6px + env(safe-area-inset-bottom)) !important; }
  #b53UnifiedMobileUi .b53-action-grid { right: calc(7px + env(safe-area-inset-right)) !important; bottom: calc(6px + env(safe-area-inset-bottom)) !important; }
}

/* One deliberate fight escape affordance replaces the retired ESC/tools cluster.
 * The existing input owner exposes it on touch devices in either orientation,
 * or when the player explicitly enables the on-screen pad. */
#r25MobileFightExit,
#r25MobileFightExitOverlay {
  display: none;
}

#r25MobileFightExit[hidden],
#r25MobileFightExitOverlay[hidden] {
  display: none !important;
  pointer-events: none !important;
}

@media (min-width: 0px) {
  body.touch-ui-enabled.sk-scene-fight #r25MobileFightExit,
  body.touch-ui-enabled.sk-scene-pause #r25MobileFightExit {
    position: fixed;
    left: calc(8px + env(safe-area-inset-left));
    top: calc(8px + env(safe-area-inset-top));
    z-index: 2147482400;
    display: flex;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 3px;
    border: 1.5px solid rgba(102, 221, 255, .78);
    border-radius: 13px;
    background:
      linear-gradient(145deg, rgba(255,255,255,.10), transparent 36%),
      linear-gradient(180deg, rgba(8,35,62,.92), rgba(2,10,25,.96));
    color: #eefcff;
    box-shadow: 0 8px 22px rgba(0,0,0,.56), inset 0 1px 0 rgba(255,255,255,.11), 0 0 14px rgba(62,207,255,.16);
    opacity: .88;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  #r25MobileFightExit svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
  }

  #r25MobileFightExit span {
    color: rgba(235,250,255,.86);
    font: 900 6.5px/1 Arial, sans-serif;
    letter-spacing: .055em;
    pointer-events: none;
  }

  #r25MobileFightExit:active,
  #r25MobileFightExit[aria-expanded="true"] {
    transform: translateY(1px) scale(.95);
    border-color: #fff;
    background: linear-gradient(180deg, rgba(26,83,119,.98), rgba(3,18,40,.99));
    box-shadow: 0 4px 12px rgba(0,0,0,.56), inset 0 0 14px rgba(255,255,255,.12), 0 0 20px rgba(76,218,255,.32);
    opacity: 1;
  }

  #r25MobileFightExit:focus-visible,
  #r25MobileFightExitOverlay button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
  }

  #r25MobileFightExitOverlay {
    position: fixed;
    inset: 0;
    z-index: 2147482500;
    display: grid;
    place-items: center;
    padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
    background: radial-gradient(circle at 50% 44%, rgba(21,87,130,.20), transparent 42%), rgba(0,3,12,.76);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    pointer-events: auto;
    touch-action: manipulation;
  }

  #r25MobileFightExitOverlay .r25-fight-exit-card {
    width: min(520px, calc(100vw - 30px));
    padding: 14px 16px 15px;
    border: 1.5px solid rgba(92,220,255,.68);
    border-radius: 20px;
    background:
      linear-gradient(135deg, rgba(66,196,255,.09), transparent 38%),
      linear-gradient(180deg, rgba(7,27,50,.98), rgba(2,8,21,.99));
    box-shadow: 0 22px 65px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.10), 0 0 28px rgba(61,204,255,.11);
    color: #f4fbff;
    font-family: Arial, sans-serif;
    text-align: center;
  }

  #r25MobileFightExitOverlay .r25-fight-exit-kicker {
    display: block;
    margin-bottom: 3px;
    color: #76e5ff;
    font: 900 8px/1 Arial, sans-serif;
    letter-spacing: .30em;
  }

  #r25MobileFightExitOverlay strong {
    display: block;
    color: #fff;
    font: 950 clamp(19px, 5.6vh, 25px)/1.08 Arial, sans-serif;
    letter-spacing: .045em;
    text-shadow: 0 0 17px rgba(91,220,255,.30), 0 3px 6px rgba(0,0,0,.74);
  }

  #r25MobileFightExitOverlay .r25-fight-exit-copy {
    display: block;
    margin: 5px 0 11px;
    color: rgba(222,239,249,.82);
    font: 700 10px/1.2 Arial, sans-serif;
  }

  #r25MobileFightExitOverlay .r25-fight-exit-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(96px, 1fr));
    gap: 9px;
  }

  #r25MobileFightExitOverlay button {
    min-width: 96px;
    min-height: 48px;
    padding: 0 13px;
    border: 1.5px solid rgba(110,218,255,.48);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(19,60,91,.98), rgba(4,18,38,.99));
    color: #f6fcff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 7px 18px rgba(0,0,0,.42);
    font: 900 12px/1 Arial, sans-serif;
    letter-spacing: .07em;
    text-shadow: 0 2px 4px rgba(0,0,0,.8);
    touch-action: manipulation;
  }

  #r25MobileFightExitOverlay button.primary {
    border-color: rgba(255,207,78,.78);
    background: linear-gradient(180deg, rgba(105,73,16,.98), rgba(34,20,4,.99));
    color: #fff3bf;
  }

  #r25MobileFightExitOverlay button.cancel {
    border-color: rgba(148,163,184,.38);
    color: rgba(232,241,248,.86);
  }

  #r25MobileFightExitOverlay button:active {
    transform: translateY(1px) scale(.98);
    filter: brightness(1.22);
    border-color: #fff;
  }

  body.r25-mobile-fight-exit-open #b53UnifiedMobileUi .b53-left-zone,
  body.r25-mobile-fight-exit-open #b53UnifiedMobileUi .b53-action-grid {
    opacity: .28 !important;
    pointer-events: none !important;
  }
}

@media (orientation: landscape) and (max-height: 390px) {
  #r25MobileFightExitOverlay .r25-fight-exit-card { padding: 9px 12px 10px; }
  #r25MobileFightExitOverlay .r25-fight-exit-copy { margin: 3px 0 7px; }
  #r25MobileFightExitOverlay button { min-height: 46px; }
}

/* R46: capability-based visibility wins over historical important scene rules. */
body.touch-ui-enabled #mobileControls.r46-touch-pad-hidden,
#mobileControls.r46-touch-pad-hidden #b53UnifiedMobileUi {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.r46-touch-setting label { display: block; margin-bottom: 8px; }
.r46-touch-setting select { min-height: 48px; width: min(100%, 360px); padding: 8px 12px; font: 500 18px/1.4 'Atkinson Hyperlegible Next', Arial, sans-serif; color: #f4f0df; background: #091728; border: 1px solid #a9bccb; border-radius: 8px; }
.r46-touch-setting select:focus-visible { outline: 3px solid #f1c76b; outline-offset: 3px; }
@media (min-width: 800px) and (min-height: 600px) {
  #b53UnifiedMobileUi { --b53-btn: 72px !important; --b53-gap: 10px !important; --b53-dpad: 170px !important; }
  #b53UnifiedMobileUi .r25-action-label { font-size: 11px !important; line-height: 1.2 !important; }
  #b53UnifiedMobileUi .b53-left-zone { left: calc(20px + env(safe-area-inset-left)) !important; bottom: calc(20px + env(safe-area-inset-bottom)) !important; }
  #b53UnifiedMobileUi .b53-action-grid { right: calc(20px + env(safe-area-inset-right)) !important; bottom: calc(20px + env(safe-area-inset-bottom)) !important; }
}

/* R46 arcade pad: the input rectangles and four-column layout remain unchanged.
 * Circular faces sit inside the full button targets; no clipped hit areas. */
#mobileControls #b53UnifiedMobileUi .touch-btn {
  --r46-pad-rim: #71dff2;
  --r46-pad-top: #15465b;
  --r46-pad-bottom: #061622;
  border: 0 !important;
  border-radius: 8px !important;
  clip-path: none !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 4px 3px 5px !important;
  grid-template-rows: minmax(0, 1fr) auto !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  color: #f4fcff !important;
}

#mobileControls #b53UnifiedMobileUi .touch-btn::before {
  content: '' !important;
  display: block !important;
  position: absolute;
  inset: 1px !important;
  z-index: -1;
  border: 2px solid var(--r46-pad-rim) !important;
  border-radius: 50% !important;
  background: linear-gradient(165deg, var(--r46-pad-top), var(--r46-pad-bottom) 76%) !important;
  box-shadow: inset 0 2px 0 #ffffff38, inset 0 -4px 0 #00000066, 0 3px 0 #02080f, 0 5px 10px #00000080 !important;
  opacity: 1 !important;
  pointer-events: none !important;
  transform: none !important;
}

#mobileControls #b53UnifiedMobileUi .attack-heavy,
#mobileControls #b53UnifiedMobileUi .kick-heavy {
  --r46-pad-rim: #f1c76b;
  --r46-pad-top: #5a451f;
  --r46-pad-bottom: #211b0e;
}

#mobileControls #b53UnifiedMobileUi .kick-light::before,
#mobileControls #b53UnifiedMobileUi .kick-heavy::before,
#mobileControls #b53UnifiedMobileUi .block-btn::before {
  border-radius: 28% !important;
}

#mobileControls #b53UnifiedMobileUi .special-btn {
  --r46-pad-rim: #f1c76b;
  --r46-pad-top: #535038;
  --r46-pad-bottom: #142735;
}

#mobileControls #b53UnifiedMobileUi .special-btn.special-ready::before {
  border-width: 3px !important;
  box-shadow: inset 0 0 0 2px #f1c76b44, inset 0 2px 0 #fff5c780, 0 3px 0 #02080f, 0 0 13px #f1c76b70 !important;
}

#mobileControls #b53UnifiedMobileUi .special-btn.special-max-ready {
  --r46-pad-rim: #fff5c7;
  --r46-pad-top: #9b782f;
  --r46-pad-bottom: #3a2b0a;
}

#mobileControls #b53UnifiedMobileUi .universal-btn {
  --r46-pad-rim: #f1c76b;
  --r46-pad-top: #234557;
  --r46-pad-bottom: #091620;
  grid-template-rows: 1fr auto 1fr !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

#mobileControls #b53UnifiedMobileUi .universal-btn::before {
  border-radius: 35px !important;
  box-shadow: inset 4px 0 0 #f1c76b25, inset 0 2px 0 #fff5c755, inset 0 -4px 0 #00000066, 0 3px 0 #02080f, 0 5px 10px #00000080 !important;
}

#mobileControls #b53UnifiedMobileUi .r25-action-key { display: none !important; }
#mobileControls #b53UnifiedMobileUi .r25-action-icon {
  width: clamp(27px, 7.6vh, 35px);
  height: clamp(27px, 7.6vh, 35px);
  margin: 0;
  filter: drop-shadow(0 1px 1px #000) !important;
}
#mobileControls #b53UnifiedMobileUi .r25-icon-main {
  fill: #f4fcff38;
  stroke-width: 2.3;
}
#mobileControls #b53UnifiedMobileUi .r25-action-label {
  overflow: visible;
  font: 800 10px/1.1 'Atkinson Hyperlegible Next', Arial, sans-serif !important;
  letter-spacing: 0 !important;
  color: #f4fcff;
  text-shadow: 0 1px 2px #000;
}
#mobileControls #b53UnifiedMobileUi .universal-btn .r25-action-icon { align-self: end; }
#mobileControls #b53UnifiedMobileUi .universal-btn .r25-action-label { margin-top: 7px !important; }

#mobileControls #b53UnifiedMobileUi .touch-btn.active::before,
#mobileControls #b53UnifiedMobileUi .touch-btn:active::before,
#mobileControls #b53UnifiedMobileUi .touch-btn.r25-touch-active::before {
  border-color: #fff !important;
  box-shadow: inset 0 2px 5px #000000aa, inset 0 0 0 2px #ffffff44, 0 1px 0 #02080f !important;
  transform: translateY(2px) !important;
  filter: brightness(1.35);
}
#mobileControls #b53UnifiedMobileUi .touch-btn:focus-visible {
  outline: 3px solid #fff5c7;
  outline-offset: 2px;
}

#mobileControls #b53UnifiedMobileUi #r25MoveDpad {
  border: 2px solid #527584 !important;
  background: radial-gradient(circle, #07131e 0 38%, #162c38 39% 64%, #07131e 65%) !important;
  box-shadow: inset 0 2px 0 #ffffff20, inset 0 -4px 0 #00000080, 0 4px 0 #02080f, 0 7px 14px #00000088 !important;
  opacity: 1 !important;
}
#mobileControls #b53UnifiedMobileUi #r25MoveDpad .r25-dpad-arm {
  border: 1px solid #6a9cac !important;
  border-radius: 7px !important;
  background: linear-gradient(#245267, #102b3b) !important;
  color: #e9fbff !important;
  text-shadow: 0 2px 0 #03111b;
  box-shadow: inset 0 2px 0 #c4f4ff33, inset 0 -3px 0 #02080f99 !important;
}
#mobileControls #b53UnifiedMobileUi #r25MoveDpad .r25-dpad-center {
  border-radius: 8px !important;
  border: 1px solid #375f71;
  background: radial-gradient(circle, #2e5062, #0d2533) !important;
  box-shadow: inset 0 2px 0 #ffffff22, inset 0 -3px 0 #00000055;
}
#mobileControls #b53UnifiedMobileUi #r25MoveDpad[data-direction*="ArrowUp"] .r25-dpad-up,
#mobileControls #b53UnifiedMobileUi #r25MoveDpad[data-direction*="ArrowDown"] .r25-dpad-down,
#mobileControls #b53UnifiedMobileUi #r25MoveDpad[data-direction*="ArrowLeft"] .r25-dpad-left,
#mobileControls #b53UnifiedMobileUi #r25MoveDpad[data-direction*="ArrowRight"] .r25-dpad-right {
  border-color: #fff5c7 !important;
  background: linear-gradient(#f1c76b, #b98d36) !important;
  color: #10202a !important;
  text-shadow: none;
  box-shadow: inset 0 2px 4px #00000055 !important;
}

@media (min-width: 800px) and (min-height: 600px) {
  #mobileControls #b53UnifiedMobileUi .r25-action-label { font-size: 12px !important; }
  #mobileControls #b53UnifiedMobileUi .r25-action-icon { width: 38px; height: 38px; }
}

/* R71: the same brass, ivory and dark wood materials as the actual game HUD.
   Hit regions retain their input owner; no hover state latches after a touch. */
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi {
  --b53-btn:var(--r71-btn,48px)!important;
  --b53-dpad:var(--r71-dpad,132px)!important;
  --b53-gap:6px!important;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .touch-btn {
  --r46-pad-rim:#a78a58;--r46-pad-top:#30291f;--r46-pad-bottom:#100e0b;
  width:var(--b53-btn)!important;min-width:44px!important;min-height:44px!important;
  color:#f4ecdc!important;grid-template-rows:minmax(0,1fr) 11px!important;
  border-radius:9px!important;padding:4px 3px!important;overflow:visible!important;
  transition:none!important;touch-action:none!important;-webkit-tap-highlight-color:transparent;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .touch-btn::before {
  border-width:1px!important;border-radius:10px!important;
  background:linear-gradient(155deg,var(--r46-pad-top),var(--r46-pad-bottom) 80%)!important;
  box-shadow:inset 0 1px 0 #f4ecdc40,inset 0 -2px 0 #0008,0 2px 7px #0008!important;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .attack-heavy,
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .kick-heavy {
  --r46-pad-rim:#d8b976;--r46-pad-top:#52422a;--r46-pad-bottom:#20190f;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .block-btn {--r46-pad-rim:#d2cfc5;}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .special-btn {--r46-pad-rim:#c9a86a;--r46-pad-top:#403122;--r46-pad-bottom:#17110d;}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .special-btn.special-max-ready {--r46-pad-rim:#f4ddb0;--r46-pad-top:#796039;--r46-pad-bottom:#2a1c0d;}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .universal-btn {
  --r46-pad-rim:#c9a86a;--r46-pad-top:#30291f;--r46-pad-bottom:#100e0b;
  grid-template-rows:1fr auto 1fr!important;padding:8px 3px!important;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .universal-btn::before {border-radius:12px!important;}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .r25-action-icon {width:26px!important;height:26px!important;color:#f4ecdc!important;filter:none!important;}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .r25-icon-main {fill:#f4ecdc16!important;stroke:currentColor!important;stroke-width:2.1;}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .r25-action-label {
  display:block!important;width:100%!important;max-width:100%!important;white-space:nowrap!important;
  color:#f4ecdc!important;font:700 9px/11px 'Atkinson Hyperlegible Next',Arial,sans-serif!important;
  letter-spacing:0!important;text-shadow:0 1px 1px #000!important;overflow:visible!important;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .touch-btn:hover::before {filter:none!important;}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .touch-btn.r25-touch-active::before,
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .touch-btn.active::before,
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi .touch-btn:active::before {
  background:linear-gradient(#78603c,#35271a)!important;border-color:#f4ddb0!important;
  box-shadow:inset 0 1px 4px #000b,0 1px 0 #efd49b55!important;transform:none!important;filter:none!important;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi #r25MoveDpad {
  border:1px solid #92784c!important;border-radius:18px!important;
  background:radial-gradient(circle,#292218 0 38%,#17130e 40% 70%,#100d09 72%)!important;
  box-shadow:inset 0 1px 0 #f4ecdc33,0 3px 9px #0009!important;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi #r25MoveDpad .r25-dpad-arm {
  border:1px solid #9b8052!important;border-radius:9px!important;background:linear-gradient(#382e21,#18120d)!important;
  color:#f4ecdc!important;text-shadow:none!important;box-shadow:inset 0 1px 0 #f4ecdc33,inset 0 -2px 0 #0009!important;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi #r25MoveDpad .r25-dpad-center {
  background:linear-gradient(#31271d,#17120d)!important;border-color:#705b3b!important;box-shadow:none!important;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi #r25MoveDpad[data-direction*="ArrowUp"] .r25-dpad-up,
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi #r25MoveDpad[data-direction*="ArrowDown"] .r25-dpad-down,
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi #r25MoveDpad[data-direction*="ArrowLeft"] .r25-dpad-left,
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi #r25MoveDpad[data-direction*="ArrowRight"] .r25-dpad-right {
  background:linear-gradient(#b99a61,#7d6038)!important;border-color:#f4ddb0!important;color:#fff5df!important;transform:none!important;
}
body.r71-touch-interface #mobileControls #b53UnifiedMobileUi[data-r71-stacked="true"] .b53-action-grid {
  bottom:calc(var(--b53-dpad) + 24px + env(safe-area-inset-bottom))!important;
}
body.r71-touch-interface #r25MobileFightExit {
  left:max(8px,env(safe-area-inset-left))!important;top:max(var(--r71-pause-top,90px),env(safe-area-inset-top))!important;
  width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
  padding:4px!important;border:1px solid #a88a55!important;border-radius:6px!important;
  background:linear-gradient(155deg,#32291eed,#110e0bf5)!important;color:#f4ecdc!important;
  box-shadow:inset 0 1px 0 #f4ecdc2b,0 2px 6px #0008!important;opacity:.96!important;transform:none!important;filter:none!important;
}
body.r71-touch-interface #r25MobileFightExit svg {width:23px!important;height:23px!important;stroke-width:3!important;}
body.r71-touch-interface #r25MobileFightExit span {color:#e5d0a6!important;font:700 8px/9px 'Atkinson Hyperlegible Next',Arial,sans-serif!important;letter-spacing:.01em!important;}
body.r71-touch-interface #r25MobileFightExit:active {background:#665030!important;border-color:#f4ddb0!important;}

body.r71-touch-interface #mobileControls #b53UnifiedMobileUi #r25MoveDpad .r25-dpad-arm svg{width:18px!important;height:18px!important;fill:currentColor!important;stroke:none!important;pointer-events:none!important;}
