/* Story and resource PvE: five targets share one legacy NPC combat budget. */
/* Story and resource squads fight on the dry location already used by their route. */
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="2"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_02_bunker.webp') !important;}
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="3"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_03_outpost.webp') !important;}
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="4"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_04_mine.webp') !important;}
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="5"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_05_forest.webp') !important;}
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="6"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_06_lab.webp') !important;}
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="7"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_07_ore.webp') !important;}
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="8"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_08_quarry.webp') !important;}
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="9"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_09_sulfur.webp') !important;}
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="10"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_10_power.webp') !important;}
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="11"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_11_archive.webp') !important;}
html.survival-portrait body .game .frame_arena.survival-v2-mode > .survival-v2-ui.v2-pve-squad[data-combat-zone="13"] {background-image:linear-gradient(180deg,#0a141ee8 0,#0a141e85 18%,transparent 47%,#0b141beb 79%),url('../img/company/survival/world_13_citadel.webp') !important;}
html.survival-portrait .survival-v2-ui:not(.v2-pve-squad) .v2-enemy-team {display:none;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy {display:none;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-team {
  position:absolute;
  right:7px;
  top:2px;
  width:43%;
  height:calc(100% - 6px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:2px;
  z-index:2;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit {
  position:relative;
  flex:0 0 65px;
  width:100%;
  min-width:0;
  padding:0;
  border:1px solid #a16e63;
  border-radius:5px;
  background:linear-gradient(270deg,#382730ed,#1b2430e0);
  box-shadow:0 2px 8px #000a,inset 0 1px #ffffff1e;
  color:#f5e9dd;
  text-align:left;
  overflow:visible;
  touch-action:manipulation;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit.v2-target {
  border-color:#ffd28c;
  box-shadow:0 0 0 2px #ffd28c99,0 0 18px #ffbb6870;
  cursor:pointer;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-copy {
  position:absolute;
  left:6px;
  right:48px;
  top:10px;
  min-width:0;
  text-shadow:0 1px 2px #000;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-name {
  display:block;
  width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font:800 9px/11px Arial,sans-serif;
  text-transform:uppercase;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-value {
  display:block;
  margin-top:3px;
  font:800 9px/11px Arial,sans-serif;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-hp {
  display:block;
  width:100%;
  height:5px;
  margin-top:4px;
  border:1px solid #c6867b;
  border-radius:3px;
  background:#25131a;
  overflow:hidden;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-hp span {
  display:block;
  height:100%;
  background:linear-gradient(#e98e79,#a84d48);
  transition:width .2s linear;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-sprite {
  position:absolute;
  right:-8px;
  bottom:0;
  width:77px;
  height:77px;
  margin:0;
  background:var(--v2-sheet) 0 0/400% 200% no-repeat;
  transform:scaleX(var(--enemy-facing,-1));
  filter:sepia(.25) saturate(.75) drop-shadow(0 2px 3px #000d);
  pointer-events:none;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit.v2-defeated {opacity:.52;filter:grayscale(1);}

/* Scene layout. The existing ten buttons remain the hit targets for server actions. */
html.survival-portrait .survival-v2-ui:not(.v2-pve-squad) .v2-pve-teams {display:none;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-header {
  height:114px;padding:9px 12px;background:linear-gradient(#09131ef4,#132230dc 70%,transparent);
}


html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-sector {max-width: none;margin-top: 0;font-size: 12px;line-height: 19px;
  top: 5px;

  left: 8px;

  right: 100px;

  font: 900 12px/19px Arial,sans-serif;

  letter-spacing: .3px;

  text-align: left;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-turn {top: 4px;right: 6px;padding: 1px 3px;
  left: auto;

  width: 88px;

  height: 23px;

  font: 900 12px/19px Arial,sans-serif;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-teams {
  position:absolute;left:12px;right:12px;bottom:7px;display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;
  border-top:1px solid #86919a66;padding-top:5px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-team {
  min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:3px;
  color:#c9e6c4;text-shadow:0 1px 2px #000;font:800 9px/11px Arial,sans-serif;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-raiders {color:#f4c0b6;text-align:right;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-team strong {overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-team i {
  grid-column:1/-1;display:block;height:5px;margin-top:3px;overflow:hidden;
  border:1px solid #8eaa85;border-radius:3px;background:#07141b;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-raiders i {border-color:#b97870;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-team i b {
  display:block;height:100%;background:linear-gradient(#a6d29b,#4e8b5c);transition:width .2s linear;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-raiders i b {background:linear-gradient(#ed9a86,#af4848);}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-scene {
  top:113px;height:337px;
  background: #51402e url('../img/arena/fight/black_rain_battle_v2.webp') center 35% / cover no-repeat;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-scene::before {
  content:'';position:absolute;inset:0;pointer-events:none;z-index:1;
  background:radial-gradient(ellipse 50% 52% at 15% 13%,#d5ae7945,transparent 85%),
    radial-gradient(ellipse 50% 52% at 85% 13%,#b8796550,transparent 85%),
    linear-gradient(180deg,#0c182011 47%,#07131a66);
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-scene::after {
  content:'';position:absolute;top:0;bottom:0;left:50%;width:1px;
  background:linear-gradient(transparent,#d5c5a233 30%,#d5c5a233 70%,transparent);
  box-shadow:0 0 10px #09131a;pointer-events:none;z-index:1;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-formation,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-team {
  position:absolute;top:0;height:100%;width:50%;display:block;z-index:2;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-formation {left:0;right:auto;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-team {left:auto;right:0;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit) {
  position:absolute;display:block;min-width:0;width:55%;height:66px;flex:none;
  margin:0;padding:0;border:1px solid transparent;border-radius:6px;
  background:transparent;box-shadow:none;color:#fff7e9;overflow:visible;
  text-align:center;touch-action:manipulation;filter:drop-shadow(0 2px 3px #000e);
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(1) {left:4%;top:0;z-index:1;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(2) {left:24%;top:65px;z-index:2;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(3) {left:6%;top:130px;z-index:3;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(4) {left:23%;top:195px;z-index:4;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(5) {left:8%;top:260px;width:60%;height:75px;z-index:5;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(1) {left:auto;right:4%;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(2) {left:auto;right:24%;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(3) {left:auto;right:6%;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(4) {left:auto;right:23%;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(5) {left:auto;right:8%;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-fighter .v2-sprite,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-sprite {
  position:absolute;top:-13px;left:calc(50% - 55px);right:auto;bottom:auto;z-index:1;
  width:110px;height:110px;margin:0;border:0;
  background:var(--v2-sheet) 0 0/400% 200% no-repeat;
  filter:drop-shadow(0 2px 3px #000e);pointer-events:none;

}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-sprite {
  transform:scaleX(var(--enemy-facing,-1));filter:drop-shadow(0 2px 3px #000e) sepia(.12) saturate(1.3);
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-fighter.v2-defeated .v2-sprite {
  animation:none;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-fighter .v2-fighter-copy,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-copy {
  position:absolute;inset:0;z-index:2;display:block;pointer-events:none;
  text-align:center;text-shadow:0 1px 3px #000;
  background:linear-gradient(#0b1923bb,transparent 54%);
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter .v2-name,.v2-enemy-unit .v2-enemy-name) {
  position:absolute;top:0;left:-6px;right:-6px;display:block;width:auto;
  font:900 9px/11px Arial,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  text-transform:none;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-name {font-size:8px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter .v2-hp-track,.v2-enemy-unit .v2-enemy-hp) {
  position:absolute;top:14px;left:16%;width:68%;height:5px;display:block;margin:0;
  border:1px solid #98b891;border-radius:3px;background:#091818;overflow:hidden;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-hp {border-color:#d49990;background:#231116;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-hp-fill,.v2-enemy-hp span) {display:block;height:100%;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-hp span {background:linear-gradient(#ee9987,#a94746);transition:width .2s linear;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter .v2-hp-value,.v2-enemy-unit .v2-enemy-value) {
  position:absolute;top:22px;left:0;right:0;display:block;margin:0;
  font:800 8px/10px Arial,sans-serif;color:#fff5e6;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit).v2-target {
  border-color:#f5ce82;background:#e4aa4d3b;
  box-shadow:0 0 0 2px #f6ca8399,0 0 16px #ffca7788;cursor:pointer;
}
/* Distinct hostile silhouettes use existing eight-frame action atlases. */
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit[data-visual-id="6"] {--v2-sheet:url('../img/arena/fight/raider_actions.png');}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit[data-visual-id="7"] {--v2-sheet:url('../img/arena/fight/enemy_hazard_actions.png');}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit[data-visual-id="8"] {--v2-sheet:url('../img/arena/fight/enemy_13_guard_actions.png');}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit[data-visual-id="9"] {--v2-sheet:url('../img/arena/fight/enemy_13_sniper_actions.png');}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit[data-visual-id="10"] {--v2-sheet:url('../img/arena/fight/enemy_gunner_actions.png');}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit.v2-defeated .v2-enemy-sprite {animation:none;}

/* Chapter six keeps two manual altar spells alongside five squad skills. */
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar .v2-controls {height:195px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar .v2-scene {top:73px;height:332px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar :is(.v2-fighter,.v2-enemy-unit):nth-child(1) {top:25px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar :is(.v2-fighter,.v2-enemy-unit):nth-child(2) {top:77px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar :is(.v2-fighter,.v2-enemy-unit):nth-child(3) {top:129px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar :is(.v2-fighter,.v2-enemy-unit):nth-child(4) {top:181px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar :is(.v2-fighter,.v2-enemy-unit):nth-child(5) {top:233px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar .v2-actions .v2-skill[data-code^="altar_"] {
  border-color:#b2bfd3;background:linear-gradient(#405a77,#30435d 55%,#222d45);color:#eaf2ff;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-controls {height:195px;border-top:2px solid #918773;padding:0 5px 5px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar .v2-controls {height:195px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-status {min-height:32px;max-height:32px;font-size:10px;line-height:15px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions {gap:4px;margin-top:5px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions button {height:40px;min-height:40px;font-size: 11px;line-height: 13px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-auto {border-color:#edae65;background:linear-gradient(#b76937,#8b482f 55%,#4d302e);}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill {
  position:relative;padding-left:25px;font-size:9px;line-height:11px;
  border-color:#879ba8;background:linear-gradient(#38505e,#233747 55%,#172935);
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-code="aim"] {--v2-skill-icon:url('../img/ui/survival/kit/aim.webp');}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-code="medkit"] {--v2-skill-icon:url('../img/ui/survival/kit/medkit.webp');}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-code="cover"] {--v2-skill-icon:url('../img/ui/survival/kit/cover.webp');}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-code="mark"] {--v2-skill-icon:url('../img/ui/survival/kit/mark.webp');}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-code="split"] {--v2-skill-icon:url('../img/ui/survival/kit/split.webp');}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-code="aim"]::before,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-code="medkit"]::before,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-code="cover"]::before,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-code="mark"]::before,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-code="split"]::before {
  content:'';position:absolute;left:4px;top:12px;width:18px;height:18px;
  background:var(--v2-skill-icon) center / contain no-repeat;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill.is-unavailable {
  border-color:#566773;color:#b4bdc2;background:linear-gradient(#2b3740,#1a2832);
  box-shadow:none;opacity:.68;
}
@media (max-width:350px) {
  html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit) {width:58%;}
  html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(5) {width:62%;}
  html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter .v2-name,.v2-enemy-unit .v2-enemy-name) {font-size:8px;}
  html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-name {font-size:7px;}
}

/* Sidecar telemetry leaves faces and torsos clear, while the full lane stays touchable. */
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-header {height:73px;padding:5px 12px;}


html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-sector {line-height: 19px;
  top: 5px;

  left: 8px;

  right: 100px;

  max-width: none;

  font: 900 12px/19px Arial,sans-serif;

  font-size: 12px;

  letter-spacing: .3px;

  text-align: left;

  margin-top: 0;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-turn {top: 4px;
  left: auto;

  right: 6px;

  width: 88px;

  height: 23px;

  padding: 1px 3px;

  font: 900 12px/19px Arial,sans-serif;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-teams {bottom:2px;padding-top:2px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-scene {top:73px;height:332px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit),
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(5) {
  width:94%;height:64px;left:3%;right:auto;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(1),
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(2),
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(3),
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(4),
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(5) {
  left:auto;right:3%;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(1) {top:45px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(2) {top:95px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(3) {top:145px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(4) {top:195px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(5) {top:245px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter:nth-child(1),.v2-fighter:nth-child(2),.v2-fighter:nth-child(3),.v2-fighter:nth-child(4),.v2-fighter:nth-child(5)) {
  left:3%;right:auto;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-fighter .v2-sprite,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-sprite {
  width:90px;height:90px;top:-12px;left:-3px;right:auto;
  filter:drop-shadow(0 1px 1px #02070acc);
  image-rendering:auto;backface-visibility:hidden;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-sprite {
  left:auto;right:-3px;filter:drop-shadow(0 1px 1px #02070add) saturate(1.08);
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(1) :is(.v2-sprite,.v2-enemy-sprite) {
  top:0;width:86px;height:86px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-fighter .v2-fighter-copy {
  inset:auto 1px auto auto;top:19px;width:45%;height:28px;
  box-sizing:border-box;padding:0 3px;
  border-left:2px solid #98bb8e;border-radius:2px;
  background:linear-gradient(90deg,#10252fc9,#10252f6d);
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-copy {
  inset:auto auto auto 1px;top:19px;width:45%;height:28px;
  box-sizing:border-box;padding:0 3px;
  border-right:2px solid #d99182;border-radius:2px;
  background:linear-gradient(270deg,#38262bc9,#231e286d);
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter .v2-name,.v2-enemy-unit .v2-enemy-name) {
  top:0;left:2px;right:2px;font-size:8px;line-height:10px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter .v2-hp-track,.v2-enemy-unit .v2-enemy-hp) {
  top:11px;left:5%;width:90%;height:3px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter .v2-hp-value,.v2-enemy-unit .v2-enemy-value) {
  top:17px;font-size:8px;line-height:9px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit).v2-target {
  background:linear-gradient(90deg,#d89e3940,transparent 70%);
  border-color:#f5ce82;box-shadow:0 0 0 2px #f6ca8377,0 0 15px #ffca7777;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit.v2-target {
  background:linear-gradient(270deg,#d89e3940,transparent 70%);
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit).v2-target :is(.v2-fighter-copy,.v2-enemy-copy) {
  border-color:#ffe2a4;box-shadow:0 0 8px #eab7668c;
}

/* The squad command deck keeps every server action visible in the portrait mockup. */
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-sector {
  position:absolute;top: 5px;left: 8px;right: 100px;max-width: none;
  overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-align: left;
  font-size: 12px;line-height: 19px;

  font: 900 12px/19px Arial,sans-serif;

  letter-spacing: .3px;

  margin-top: 0;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-status {
  position:absolute;top:-19px;left:62px;right:62px;height:17px;
  min-height:17px;max-height:17px;margin:0;padding:1px 4px;
  border:1px solid #d8ae7199;border-radius:3px;background:#10202bdc;
  overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
  font-size:8px;line-height:13px;z-index:2;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions {
  position:absolute;left:5px;right:5px;top:1px;height:49px;
  display:flex;gap:2px;margin:0;overflow-x:hidden;overflow-y:hidden;
  scrollbar-width:none;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions::-webkit-scrollbar {display:none;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions button {
  position:relative;flex:1 0 100%;width:100%;
  max-width:none;height:49px;min-height:49px;padding:24px 1px 1px !important;
  border-radius:4px;overflow:hidden;text-align:center;justify-content:center;
  font-size: 11px;line-height: 13px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-action-portrait {display:none;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-action-copy b {
  display:block;font-size: 10px;line-height: 12px;text-align:left;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-action-copy small {
  color:#f4e5ca;font-size:12px;line-height:14px;white-space:nowrap;text-align:left;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-pet-id] {
  display:none;padding:3px 6px 3px 48px !important;justify-content:flex-start;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-pet-id].is-focused-skill {display:flex;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill::before,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill[data-pet-id]::before {
  position:absolute;top:9px;left:9px;right:auto;width:29px;height:29px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar .v2-actions button {flex-basis:33%;width:33%;
  font-size: 11px;

  line-height: 13px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar .v2-actions .v2-skill[data-code^="altar_"] {
  display:flex;align-items:center;justify-content:center;padding:3px !important;font-size:8px;line-height:10px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-target-lane {
  position:absolute;left:5px;right:5px;top:51px;height:38px;
  display:flex;gap:3px;overflow:hidden;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-target {
  position:relative;flex:1 1 0;min-width:0;height:38px;padding:0;
  border:1px solid #a47a76;border-radius:3px;overflow:hidden;
  background:linear-gradient(160deg,#55393b,#212b34);touch-action:manipulation;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-target[data-side="1"] {border-color:#8ab496;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-target.is-available {
  border-color:#ffd08a;box-shadow:inset 0 0 0 1px #ffd08a,0 0 8px #f7b257a8;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-target.is-unavailable {opacity:.45;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-target-portrait {
  display:block;width:30px;height:27px;margin:0 auto;
  background:var(--v2-sheet) -89px -20px/auto 400px no-repeat;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-target-value {
  position:absolute;left:1px;right:1px;bottom:6px;color:#fff0e3;
  font:800 7px/8px Arial,sans-serif;text-align:center;
  text-shadow:0 1px 2px #000,0 0 2px #000;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-target-hp {
  position:absolute;left:3px;right:3px;bottom:2px;height:4px;background:#29191c;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-target-hp i {display:block;height:100%;background:#d76561;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-target[data-side="1"] i {background:#70b96a;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-tempo {
  position:absolute;top:91px;left:5px;right:5px;height:20px;display:flex;gap:3px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-tempo button {
  min-width:40px;height: 30px;min-height: 30px;padding:0 5px;
  border:1px solid #a6b4b5;border-radius:3px;color:#ede6da;
  background:linear-gradient(#334550,#172630);
  font: 800 10px/26px var(--br-display);text-transform:uppercase;touch-action:manipulation;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-tempo .v2-auto {
  border-color:#b6926c;color:#f4e1c8;background:linear-gradient(#5b463a,#302e30);
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-squad-lane {
  position:absolute;left:5px;right:5px;bottom:3px;height:76px;
  display:flex;gap:3px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-squad-card {
  position:relative;flex:1 1 0;min-width:0;height:76px;padding:0;
  border:1px solid #9b9f9d;border-radius:4px;overflow:hidden;color:#f7eddc;
  background:linear-gradient(#51616a,#1b2b35 70%,#0d1a24);
  box-shadow:inset 0 1px #ffffff5e,0 2px 4px #000b;touch-action:manipulation;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-squad-card.is-focused {
  border-color:#ffd18a;box-shadow:inset 0 0 0 1px #ffd18a,0 0 8px #f7b45bba;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-squad-card.is-defeated {filter:grayscale(.9);opacity:.55;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-squad-portrait {
  position:absolute;top:2px;left:calc(50% - 25px);width:50px;height:52px;
  background:var(--v2-sheet) -100px -5px/auto 450px no-repeat;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-squad-name {
  position:absolute;top:2px;left:2px;right:2px;overflow:hidden;
  color:#f7e3bc;font:800 6px/8px Arial,sans-serif;
  white-space:nowrap;text-overflow:ellipsis;text-shadow:0 1px 2px #000;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-squad-hp {
  position:absolute;bottom:8px;left:2px;right:2px;
  color:#e8f4dc;font:800 7px/8px Arial,sans-serif;text-shadow:0 1px 2px #000;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-squad-hp-track {
  position:absolute;bottom:3px;left:3px;right:3px;height:3px;background:#0e1d23;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-pve-squad-hp-track i {
  display:block;height:100%;background:#70b96a;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar .v2-scene {top:73px;height:332px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar :is(.v2-fighter,.v2-enemy-unit):nth-child(1) {top:45px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar :is(.v2-fighter,.v2-enemy-unit):nth-child(2) {top:95px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar :is(.v2-fighter,.v2-enemy-unit):nth-child(3) {top:145px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar :is(.v2-fighter,.v2-enemy-unit):nth-child(4) {top:195px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad.v2-has-altar :is(.v2-fighter,.v2-enemy-unit):nth-child(5) {top:245px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-fighter .v2-sprite,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-sprite,
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter,.v2-enemy-unit):nth-child(1) :is(.v2-sprite,.v2-enemy-sprite) {
  width:82px;height:82px;top:-8px;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-fighter:nth-child(2n) .v2-sprite {left:25px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit:nth-child(2n) .v2-enemy-sprite {right:25px;}
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-fighter .v2-fighter-copy,
html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-enemy-unit .v2-enemy-copy {
  inset:0;top:0;width:100%;height:15px;padding:0;
  border:0;background:transparent;box-shadow:none;
}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter .v2-name,.v2-enemy-unit .v2-enemy-name,
  .v2-fighter .v2-hp-value,.v2-enemy-unit .v2-enemy-value) {display:none;}
html.survival-portrait .survival-v2-ui.v2-pve-squad :is(.v2-fighter .v2-hp-track,.v2-enemy-unit .v2-enemy-hp) {
  top:3px;left:calc(50% - 23px);width:46px;height:5px;
  border-width:1px;border-radius:4px;box-shadow:0 1px 4px #000c;
}
@media (max-width:350px) {
  html.survival-portrait .survival-v2-ui.v2-pve-squad .v2-actions .v2-skill {min-width:38px;}
}
