/*
 * Standard Martian-sand battle board and HUD presentation.
 * ?boardPresentation=legacy retains the previous renderer as a rollback path.
 */

.is-battle-presentation-mars-sand.is-battle-screen {
  --rail-w: var(--battle-hud-card-width);
  --stage-gap: 12px;
  --battle-top-y: 24px;
  --battle-rail-card-height: var(--battle-hud-card-height);
  --battle-rail-card-gap: 14px;
  --battle-stage-pad-left: 22px;
  --battle-stage-pad-right: 22px;
  --battle-board-frame-right: 200px;
  --battle-board-frame-max: 1300px;
  --battle-board-frame-gutter: 166px;
}

/* Battle layout variables are redeclared on #app by the legacy stylesheet, so
 * the reversible presentation must override them at the same inheritance
 * boundary rather than relying on values inherited from the root element. */
.is-battle-presentation-mars-sand.is-battle-screen #app {
  --battle-board-frame-right: 200px;
  --battle-board-frame-max: 1300px;
  --battle-board-frame-gutter: 166px;
  --battle-board-bottom-shift: 0px;
}

.is-battle-presentation-mars-sand.is-battle-screen::before {
  background:
    radial-gradient(ellipse at 58% 46%, rgba(183, 79, 39, 0.16), transparent 48%),
    linear-gradient(180deg, rgba(2, 6, 7, 0.48), rgba(26, 10, 5, 0.12) 38%, rgba(8, 4, 3, 0.42));
}

.is-battle-presentation-mars-sand.is-battle-screen .stage {
  grid-template-columns: var(--rail-w) var(--rail-w) minmax(0, 1fr);
  column-gap: var(--stage-gap);
}

.is-battle-presentation-mars-sand.is-battle-screen .rail--right {
  translate: -5px 0;
}

.is-battle-presentation-mars-sand.is-battle-screen .hud__cluster--left {
  top: 0;
}

.is-battle-presentation-mars-sand.is-battle-screen .rail {
  padding-top: var(--battle-top-y);
  padding-bottom: 24px;
}

.is-battle-presentation-mars-sand.is-battle-screen .rail__label {
  min-height: 40px;
  border-color: rgba(224, 211, 168, 0.48);
  border-left-color: var(--rail-plaque-accent);
  background:
    linear-gradient(105deg, var(--rail-plaque-wash), transparent 44%),
    repeating-linear-gradient(0deg, rgba(248, 231, 184, 0.035) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, rgba(37, 42, 38, 0.94), rgba(5, 8, 7, 0.97));
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.3),
    inset 0 1px rgba(255, 244, 208, 0.09),
    0 4px 10px rgba(0, 0, 0, 0.26);
}

.is-battle-presentation-mars-sand.is-battle-screen .stage > .rail .rail__cards .card:is(.card--unit, .card--support) {
  box-shadow:
    0 5px 13px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(141, 255, 242, 0.08);
}

.is-battle-presentation-mars-sand.is-battle-screen .board-wrap {
  --command-rail-width: 150px;
  --command-rail-inset: 0px;
  display: block;
  overflow: visible;
}

.is-battle-presentation-mars-sand.is-battle-screen .board-wrap::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 24px;
  right: var(--command-rail-inset);
  bottom: auto;
  height: min(680px, calc(100% - 48px));
  width: var(--command-rail-width);
  border: 1px solid rgba(117, 213, 205, 0.32);
  border-radius: 13px;
  background:
    linear-gradient(90deg, rgba(117, 213, 205, 0.055), transparent 20%, transparent 80%, rgba(117, 213, 205, 0.045)),
    rgba(2, 10, 11, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(232, 196, 116, 0.05),
    0 12px 32px rgba(0, 0, 0, 0.24);
  pointer-events: none;
}

.is-battle-presentation-mars-sand.is-battle-screen .board-frame {
  top: auto;
  right: var(--battle-board-frame-right);
  bottom: calc(24px - var(--battle-board-bottom-shift));
  width: min(var(--battle-board-frame-max), calc(100% - 106px));
  max-height: calc(100% - 54px);
  aspect-ratio: 600 / 540;
  transform: none;
}

.is-battle-presentation-mars-sand.is-battle-screen #board {
  overflow: visible;
}

.is-battle-presentation-mars-sand.is-battle-screen .board-frame::before {
  left: 7%;
  right: 4%;
  bottom: 5%;
  height: 11%;
  background: rgba(16, 5, 2, 0.5);
  filter: blur(18px);
}

.is-battle-presentation-mars-sand.is-battle-screen .board-skin {
  display: none;
}

.board-presentation-surface {
  pointer-events: none;
}

.is-battle-presentation-mars-sand .board-presentation-surface__art {
  filter:
    drop-shadow(0 3px 2px rgba(20, 5, 2, 0.52))
    drop-shadow(0 15px 13px rgba(10, 3, 1, 0.46));
}

.is-battle-presentation-mars-sand .board-presentation-surface__floor-texture {
  opacity: 0;
}

.is-battle-presentation-mars-sand .board-presentation-surface__floor-base {
  fill: transparent;
}

.is-battle-presentation-mars-sand .board-presentation-surface__floor-grade {
  opacity: 0;
}

.is-battle-presentation-mars-sand .board-presentation-surface__shadow {
  fill: rgba(12, 4, 2, 0.5);
  filter: url(#board-presentation-shadow);
}

.is-battle-presentation-mars-sand .board-presentation-surface__sand {
  fill: url(#board-presentation-sand);
  stroke: rgba(226, 121, 68, 0.24);
  stroke-width: 1.4;
}

.is-battle-presentation-mars-sand .board-presentation-surface__sand-light {
  fill: url(#board-presentation-sand-gradient);
  opacity: 0.48;
}

.is-battle-presentation-mars-sand .board-presentation-surface__sand-noise {
  fill: #b85a31;
  opacity: 0.34;
  filter: url(#board-presentation-sand-noise);
  mix-blend-mode: soft-light;
}

.is-battle-presentation-mars-sand .board-presentation-surface__cell {
  fill: rgba(215, 101, 52, 0.012);
  stroke: none;
}

.is-battle-presentation-mars-sand .board-presentation-surface__cell:nth-child(3n) {
  fill: rgba(28, 10, 5, 0.018);
}

.is-battle-presentation-mars-sand .board-presentation-surface__grid-line {
  fill: none;
  stroke: rgba(56, 25, 14, 0.46);
  stroke-width: 0.78;
  stroke-dasharray: none;
  stroke-linecap: round;
  filter: none;
  mix-blend-mode: multiply;
  vector-effect: non-scaling-stroke;
}

/* Reversible fallback: preserve the new projection and composition while
 * replacing the regolith with restrained physical board panels. */
.is-battle-presentation-mars-sand.is-battle-surface-tactical-tiles .board-presentation-surface__floor-texture,
.is-battle-presentation-mars-sand.is-battle-surface-tactical-tiles .board-presentation-surface__floor-grade,
.is-battle-presentation-mars-sand.is-battle-surface-tactical-tiles .board-presentation-surface__sand,
.is-battle-presentation-mars-sand.is-battle-surface-tactical-tiles .board-presentation-surface__sand-light,
.is-battle-presentation-mars-sand.is-battle-surface-tactical-tiles .board-presentation-surface__sand-noise {
  opacity: 0;
}

.is-battle-presentation-mars-sand.is-battle-surface-tactical-tiles .board-presentation-surface__floor-base {
  fill: #746b5d;
}

.is-battle-presentation-mars-sand.is-battle-surface-tactical-tiles .board-presentation-surface__cell {
  fill: rgba(190, 181, 163, 0.94);
  stroke: rgba(54, 50, 43, 0.7);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.is-battle-presentation-mars-sand.is-battle-surface-tactical-tiles .board-presentation-surface__cell:nth-child(odd) {
  fill: rgba(181, 172, 154, 0.94);
}

.is-battle-presentation-mars-sand.is-battle-surface-tactical-tiles .board-presentation-surface__cell:nth-child(3n) {
  fill: rgba(198, 189, 171, 0.94);
}

.is-battle-presentation-mars-sand.is-battle-surface-tactical-tiles .board-presentation-surface__grid-line {
  stroke: rgba(45, 42, 36, 0.72);
  stroke-width: 0.9;
  stroke-dasharray: none;
  filter: none;
  mix-blend-mode: normal;
}

.is-battle-presentation-mars-sand .board-presentation-surface__wall-shadow,
.is-battle-presentation-mars-sand .board-presentation-surface__wall,
.is-battle-presentation-mars-sand .board-presentation-surface__wall-light {
  fill: none;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.is-battle-presentation-mars-sand .board-presentation-surface__wall-shadow {
  stroke: rgba(9, 3, 2, 0.72);
  stroke-width: 17;
  transform: translateY(5px);
}

.is-battle-presentation-mars-sand .board-presentation-surface__wall {
  stroke: rgba(42, 39, 33, 0.96);
  stroke-width: 13;
}

.is-battle-presentation-mars-sand .board-presentation-surface__wall-light {
  stroke: rgba(232, 196, 116, 0.34);
  stroke-dasharray: 24 7 4 7;
  stroke-width: 2.2;
}

.is-battle-presentation-mars-sand .board-presentation-surface__corner {
  fill: rgba(24, 25, 22, 0.98);
  stroke: rgba(232, 196, 116, 0.58);
  stroke-width: 1.3;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.52));
}

.is-battle-presentation-mars-sand .board-presentation-surface__corner-core {
  fill: #e2692d;
  stroke: rgba(255, 218, 137, 0.8);
  stroke-width: 0.8;
  filter: url(#soft-glow);
}

.is-battle-presentation-mars-sand .skin-base-cover {
  fill: transparent;
  stroke: none;
}

.is-battle-presentation-mars-sand .skin-base-cover__seam {
  opacity: 0;
}

.is-battle-presentation-mars-sand .skin-base-cover__node {
  opacity: 0;
}

.is-battle-presentation-mars-sand .skin-energy-fence {
  display: block;
  pointer-events: none;
}

.is-battle-presentation-mars-sand .skin-base-shield__edge {
  stroke: rgba(101, 245, 230, 0.94);
  stroke-width: 2.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter:
    drop-shadow(0 0 1px rgba(103, 247, 232, 0.96))
    drop-shadow(0 0 4px rgba(36, 213, 213, 0.7));
}

.is-battle-presentation-mars-sand .skin-base-shield__boundary {
  fill: none;
  stroke: none;
  pointer-events: none;
}

.is-battle-presentation-mars-sand .skin-base-shield__side {
  pointer-events: none;
}

.is-battle-presentation-mars-sand .skin-base-shield__render {
  opacity: 0.9;
  image-rendering: auto;
  mix-blend-mode: normal;
  filter:
    saturate(1.03)
    drop-shadow(0 0 2px rgba(139, 247, 255, 0.72))
    drop-shadow(0 0 5px rgba(31, 183, 232, 0.38));
  pointer-events: none;
}

.is-battle-presentation-mars-sand .skin-base-shield__tower-render {
  opacity: 1;
  mix-blend-mode: normal;
  filter:
    saturate(1.04)
    drop-shadow(0 2px 2px rgba(6, 8, 9, 0.72))
    drop-shadow(0 0 2px rgba(84, 239, 228, 0.5));
  pointer-events: none;
}

.is-battle-presentation-mars-sand .skin-base-shield__post {
  fill: #f2c96f;
  stroke: rgba(103, 247, 232, 0.92);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  filter: url(#soft-glow);
}

.is-battle-presentation-mars-sand .skin-cannon-sprite {
  filter:
    drop-shadow(0 1px 0 rgba(255, 221, 155, 0.12))
    drop-shadow(0 7px 8px rgba(8, 3, 2, 0.62));
}

.is-battle-presentation-mars-sand .token__health-card {
  opacity: 0;
}

.is-battle-presentation-mars-sand .token--previewable:hover .token__health-card,
.is-battle-presentation-mars-sand .token--previewable:focus .token__health-card,
.is-battle-presentation-mars-sand .token--previewable:focus-visible .token__health-card,
.is-battle-presentation-mars-sand .token--keyboard-preview .token__health-card,
.is-battle-presentation-mars-sand .token--inspected .token__health-card,
.is-battle-presentation-mars-sand .token--pending-target .token__health-card,
.is-battle-presentation-mars-sand .token--area-risk .token__health-card {
  opacity: 1;
}

.is-battle-presentation-mars-sand .enemy-strength-hud {
  top: 45px;
  right: 0;
  z-index: 6;
  gap: 13px;
  width: 150px;
  filter: none;
}

.is-battle-presentation-mars-sand .enemy-strength-hud__dial {
  width: 91px;
  box-shadow:
    inset 0 0 0 2px rgba(232, 196, 116, 0.38),
    inset 0 0 0 9px rgba(4, 12, 13, 0.8),
    0 0 0 1px rgba(38, 220, 204, 0.34),
    0 0 21px rgba(38, 220, 204, 0.2);
}

.is-battle-presentation-mars-sand .end-turn.enemy-turn-hud {
  top: 195px;
  right: 10px;
  width: 130px;
  min-height: 38px;
}

.is-battle-presentation-mars-sand .battle-action-panel {
  position: absolute;
  z-index: 6;
  top: 250px;
  right: 10px;
  bottom: 34px;
  width: 130px;
  margin: 0;
  align-self: stretch;
}

.is-battle-presentation-mars-sand .battle-command-box {
  display: grid;
  grid-template-rows: repeat(5, minmax(52px, 1fr));
  height: 100%;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.is-battle-presentation-mars-sand .battle-command-box__topline,
.is-battle-presentation-mars-sand .battle-command-box__status {
  display: contents;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section {
  min-height: 0;
  border: 0;
  border-top: 1px solid rgba(117, 213, 205, 0.2);
  background: transparent;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section--score { order: 1; }
.is-battle-presentation-mars-sand .battle-command-box .hud__section--base { order: 2; }
.is-battle-presentation-mars-sand .battle-command-box .hud__section--turn { order: 3; }
.is-battle-presentation-mars-sand .battle-command-box .hud__section--cannon { order: 4; }
.is-battle-presentation-mars-sand .battle-command-box .hud__section--doctrine { order: 5; }

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine {
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  justify-items: start;
  align-content: center;
  column-gap: 8px;
  min-height: 0;
  padding: 8px 5px;
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine .doctrine-badge__mark {
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine .hud__label,
.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine .hud__val {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  text-align: left;
  white-space: normal;
}

.is-battle-presentation-mars-sand .recon-panel {
  /* The lower card track overlaps the decorative command chassis. */
  z-index: 13;
  top: var(--recon-panel-anchor-top, calc(var(--battle-top-y) + 42px));
  left: calc((var(--rail-w) + var(--stage-gap) - 66px) * -1);
  width: 190px;
  height: 308px;
  min-width: 0;
  max-height: calc(100% - 48px);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  overflow: visible;
  border-color: rgba(117, 213, 205, 0.44);
  border-radius: 2px;
  clip-path: none;
  background:
    linear-gradient(90deg, rgba(117, 213, 205, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(4, 17, 18, 0.97), rgba(1, 7, 8, 0.98));
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(117, 213, 205, 0.06);
}

.is-battle-presentation-mars-sand .recon-panel--source-support {
  left: calc(((var(--rail-w) * 2) + (var(--stage-gap) * 2) - 66px) * -1);
}

.is-battle-presentation-mars-sand .recon-panel--track-top {
  top: var(--recon-panel-anchor-top, calc(var(--battle-top-y) + 42px));
  bottom: auto;
  transform: none;
}

.is-battle-presentation-mars-sand .recon-panel--track-middle {
  top: var(--recon-panel-anchor-top, calc(50% + 21px));
  bottom: auto;
  transform: none;
}

.is-battle-presentation-mars-sand .recon-panel--track-bottom,
.is-battle-presentation-mars-sand .recon-panel--low-card {
  top: var(--recon-panel-anchor-top, calc(50% + 21px));
  bottom: auto;
  transform: none;
}

.is-battle-presentation-mars-sand .recon-panel::after {
  content: "TARGET";
  top: 72px;
  right: -25px;
  width: 25px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 213, 205, 0.32);
  border-left: 0;
  color: rgba(245, 229, 183, 0.76);
  background: rgba(2, 10, 11, 0.94);
  box-shadow: none;
  font-family: var(--font-label);
  font-size: 8px;
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
}

.is-battle-presentation-mars-sand .recon-panel__kicker {
  font-size: 8px;
}

.is-battle-presentation-mars-sand .recon-panel__title {
  font-size: 17px;
  line-height: 1;
}

.is-battle-presentation-mars-sand .recon-panel__body {
  grid-template-rows: min-content;
  gap: 7px;
  min-height: 0;
}

.is-battle-presentation-mars-sand .recon-panel__enemy {
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 6px;
}

.is-battle-presentation-mars-sand .recon-panel__enemy-image {
  width: 46px;
  height: 58px;
}

.is-battle-presentation-mars-sand .recon-panel__enemy-summary {
  gap: 6px;
}

.is-battle-presentation-mars-sand .recon-panel__stat {
  padding: 5px 5px 4px;
}

.is-battle-presentation-mars-sand .recon-panel__copy {
  font-size: 9.5px;
  line-height: 1.22;
}

.is-battle-presentation-mars-sand .recon-panel__actions {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-self: end;
  margin-top: auto;
}

.is-battle-presentation-mars-sand .recon-panel__button {
  min-height: 32px;
  padding: 7px 9px 6px;
  font-size: 9px;
}

.is-battle-presentation-mars-sand .recon-panel--engage .recon-panel__actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "play play"
    "swap info";
}

.is-battle-presentation-mars-sand .recon-panel--engage [data-recon-action="swap"] {
  grid-area: swap;
}

.is-battle-presentation-mars-sand .recon-panel--engage [data-recon-action="info"] {
  grid-area: info;
}

.is-battle-presentation-mars-sand .recon-panel--engage [data-recon-action="swap"],
.is-battle-presentation-mars-sand .recon-panel--engage [data-recon-action="info"] {
  min-height: 26px;
  padding: 5px 4px 4px;
  font-size: 7px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine .hud__val {
  font-size: 10px;
  line-height: 1.05;
}

/* Command tower: compact instrument cards rather than five empty black bays. */
.is-battle-presentation-mars-sand.is-battle-screen .board-wrap::after {
  border-color: rgba(110, 225, 214, 0.46);
  border-radius: 2px;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  background:
    linear-gradient(90deg, rgba(65, 217, 203, 0.07), transparent 24%, transparent 76%, rgba(65, 217, 203, 0.06)),
    linear-gradient(180deg, rgba(7, 20, 21, 0.96), rgba(2, 8, 9, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(239, 202, 117, 0.08),
    inset 0 18px 28px rgba(86, 216, 202, 0.025),
    0 14px 34px rgba(0, 0, 0, 0.34);
}

.is-battle-presentation-mars-sand .enemy-strength-hud {
  top: 41px;
  gap: 10px;
}

.is-battle-presentation-mars-sand .enemy-strength-hud__label {
  color: rgba(249, 231, 183, 0.88);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.is-battle-presentation-mars-sand .enemy-strength-hud__dial {
  width: 84px;
  border-color: rgba(99, 235, 221, 0.5);
  background-color: rgba(2, 12, 13, 0.8);
}

.is-battle-presentation-mars-sand .end-turn.enemy-turn-hud {
  top: 188px;
  right: 8px;
  width: 134px;
  min-height: 42px;
  border-color: rgba(86, 231, 217, 0.68);
  background:
    linear-gradient(180deg, rgba(44, 130, 124, 0.19), rgba(3, 15, 16, 0.92));
  box-shadow:
    inset 0 0 0 2px rgba(240, 202, 116, 0.07),
    0 0 16px rgba(43, 210, 196, 0.1);
}

.is-battle-presentation-mars-sand .battle-action-panel {
  top: 241px;
  right: 7px;
  bottom: 29px;
  width: 136px;
}

.is-battle-presentation-mars-sand .battle-command-box {
  grid-template-rows: repeat(4, minmax(66px, 1fr)) minmax(88px, 1.12fr);
  gap: 6px;
  padding: 6px;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  justify-items: start;
  align-content: center;
  column-gap: 8px;
  min-height: 0;
  padding: 9px 8px;
  border: 1px solid rgba(111, 218, 207, 0.16);
  background:
    linear-gradient(90deg, rgba(103, 229, 216, 0.055), transparent 34%),
    rgba(3, 12, 13, 0.58);
  box-shadow: inset 0 1px rgba(247, 219, 154, 0.035);
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section::before {
  position: static;
  grid-column: 1;
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  align-self: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(110, 226, 214, 0.28);
  border-radius: 50%;
  color: rgba(111, 231, 219, 0.78);
  background: radial-gradient(circle, rgba(81, 223, 209, 0.12), transparent 66%);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1;
  opacity: 1;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section--score::before { content: "◎"; }
.is-battle-presentation-mars-sand .battle-command-box .hud__section--base::before { content: "◇"; }
.is-battle-presentation-mars-sand .battle-command-box .hud__section--turn::before { content: "↻"; }
.is-battle-presentation-mars-sand .battle-command-box .hud__section--cannon::before { content: "▰"; }
.is-battle-presentation-mars-sand .battle-command-box .hud__section--doctrine::before { display: none; }

.is-battle-presentation-mars-sand .battle-command-box .hud__label {
  grid-column: 2;
  align-self: end;
  color: rgba(244, 220, 164, 0.62);
  font-size: 7px;
  text-align: left;
  letter-spacing: 0.08em;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__val {
  grid-column: 2;
  align-self: start;
  font-size: 18px;
  text-align: left;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section--score .hud__score-meta {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section--score .hud__score-meta .hud__label {
  display: inline;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section--score .hud__val {
  grid-column: 2;
  justify-self: start;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section--cannon {
  padding: 9px 8px;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section--cannon .hud__cannon-btn {
  display: contents;
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine {
  grid-template-columns: 36px minmax(0, 1fr);
  padding: 9px 7px;
  border-color: rgba(226, 183, 87, 0.22);
  background:
    linear-gradient(90deg, rgba(224, 183, 88, 0.07), transparent 42%),
    rgba(4, 13, 14, 0.68);
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine .doctrine-badge__mark {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 31px;
  height: 31px;
}

.is-battle-presentation-mars-sand.is-battle-screen .hud__menu.hud-identity-card {
  top: 24px;
  width: clamp(350px, 30vw, 477.5px);
  height: 77.5px;
  min-height: 77.5px;
}

.is-battle-presentation-mars-sand .hud-identity-card__copy {
  padding: 0 110px 0 15px;
}

.is-battle-presentation-mars-sand .hud-identity-card__copy span {
  --hud-calling-card-title-min-size: 12.5px;
  font-size: 21.25px;
}

.is-battle-presentation-mars-sand .hud-identity-card__emblems {
  right: 8.75px;
}

.is-battle-presentation-mars-sand .hud-identity-card__emblem {
  width: 53.75px;
  height: 53.75px;
}

.is-battle-presentation-mars-sand.is-battle-screen .hud__cluster--left {
  left: var(--battle-board-centre-x, var(--battle-ribbon-center-x));
}

/* Command rail: one continuous instrument, with quiet ruled readouts. */
.is-battle-presentation-mars-sand.is-battle-screen .board-wrap::after {
  height: min(542px, calc(100% - 48px));
  border-color: rgba(193, 154, 78, 0.44);
  background:
    linear-gradient(90deg, rgba(197, 157, 77, 0.07), transparent 15%, transparent 85%, rgba(68, 198, 186, 0.035)),
    repeating-linear-gradient(0deg, rgba(84, 218, 205, 0.018) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, rgba(13, 14, 11, 0.985), rgba(2, 7, 8, 0.98));
  box-shadow:
    inset 3px 0 rgba(208, 169, 88, 0.07),
    inset -1px 0 rgba(238, 198, 108, 0.12),
    inset 0 0 34px rgba(0, 0, 0, 0.42),
    0 18px 38px rgba(0, 0, 0, 0.34);
}

.is-battle-presentation-mars-sand .enemy-strength-hud {
  top: 39px;
  gap: 20px;
}

.is-battle-presentation-mars-sand .enemy-strength-hud__label {
  font-size: 7.5px;
  letter-spacing: 0.14em;
}

.is-battle-presentation-mars-sand .enemy-strength-hud__dial {
  width: 78px;
  border-color: transparent;
  box-shadow:
    inset 0 0 0 2px rgba(230, 195, 112, 0.5),
    inset 0 0 0 8px rgba(2, 12, 13, 0.9),
    0 0 0 1px rgba(66, 224, 211, 0.16),
    0 0 16px rgba(42, 211, 199, 0.12);
}

.is-battle-presentation-mars-sand .end-turn.enemy-turn-hud {
  top: 164px;
  right: 10px;
  box-sizing: border-box;
  width: 130px;
  min-width: 0;
  min-height: 39px;
  border-color: rgba(226, 184, 91, 0.64);
  color: #f4dfaa;
  background:
    linear-gradient(90deg, rgba(190, 138, 48, 0.18), transparent 30% 70%, rgba(190, 138, 48, 0.12)),
    linear-gradient(180deg, rgba(28, 24, 16, 0.94), rgba(7, 9, 8, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(239, 201, 113, 0.1),
    inset 0 -5px 12px rgba(0, 0, 0, 0.22),
    0 6px 14px rgba(0, 0, 0, 0.28);
}

.is-battle-presentation-mars-sand .battle-action-panel {
  top: 207px;
  right: 10px;
  bottom: auto;
  width: 130px;
  height: min(360px, calc(100% - 243px));
}

.is-battle-presentation-mars-sand .battle-command-box {
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0 9px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section,
.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: center;
  column-gap: 0;
  row-gap: 4px;
  min-height: 0;
  padding: 11px 3px;
  border: 0;
  border-bottom: 1px solid rgba(193, 154, 78, 0.24);
  background: transparent;
  box-shadow: none;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section::before {
  display: none;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section::after {
  display: none;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__label,
.is-battle-presentation-mars-sand .battle-command-box .hud__val,
.is-battle-presentation-mars-sand .battle-command-box .hud__section--score .hud__score-meta,
.is-battle-presentation-mars-sand .battle-command-box .hud__section--score .hud__val {
  grid-column: 1;
  justify-self: center;
  text-align: center;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section--score .hud__score-meta {
  justify-content: center;
  width: auto;
  gap: 8px;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__label {
  color: rgba(241, 219, 166, 0.68);
  font-size: 8.5px;
  letter-spacing: 0.13em;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__val {
  color: #f4dfaa;
  font-size: 19px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.82);
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  justify-items: center;
  row-gap: 4px;
  padding: 11px 3px;
  border-bottom: 0;
  background: radial-gradient(circle at 50% 46%, rgba(224, 183, 88, 0.07), transparent 54%);
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section--cannon {
  row-gap: 4px;
}

.is-battle-presentation-mars-sand .battle-command-box .hud__section--cannon .hud__val {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0;
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine::before,
.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine::after {
  display: none;
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine .doctrine-badge__mark {
  grid-column: 1;
  grid-row: 2;
  justify-self: center;
  width: 29px;
  height: 29px;
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine .hud__label,
.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine .hud__val {
  grid-column: 1;
  justify-self: center;
  text-align: center;
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine .hud__label {
  grid-row: 1;
}

.is-battle-presentation-mars-sand .battle-command-box__topline .hud__section--doctrine .hud__val {
  display: none;
}

@media (max-width: 1360px), (max-height: 760px) {
  :root {
    --battle-hud-card-width: 156px;
    --battle-hud-card-height: calc((900px - 104px) / 3);
    --battle-hud-card-aspect: 156 / 265.333333;
  }

  .is-battle-presentation-mars-sand.is-battle-screen {
    --rail-w: var(--battle-hud-card-width);
    --battle-rail-card-height: var(--battle-hud-card-height);
    --battle-rail-card-gap: 10px;
  }

  .is-battle-presentation-mars-sand.is-battle-screen .board-wrap {
    --command-rail-width: 138px;
  }

  .is-battle-presentation-mars-sand.is-battle-screen .board-wrap::after {
    bottom: auto;
    height: min(472px, calc(100% - 36px));
  }

  .is-battle-presentation-mars-sand.is-battle-screen #app {
    --battle-board-frame-right: 225px;
  }

  .is-battle-presentation-mars-sand.is-battle-screen .board-frame {
    right: var(--battle-board-frame-right);
    width: min(1120px, calc(100% - 130px));
  }

  .is-battle-presentation-mars-sand .enemy-strength-hud {
    width: 138px;
  }

  .is-battle-presentation-mars-sand .battle-action-panel,
  .is-battle-presentation-mars-sand .end-turn.enemy-turn-hud {
    right: 8px;
    width: 122px;
  }

  .is-battle-presentation-mars-sand .battle-action-panel {
    height: min(290px, calc(100% - 243px));
  }
}

/* Integrated board command rail.
 * The three equal structural regions keep END TURN on the exact board
 * centreline while the calling card and status instruments flex around it. */
.is-battle-presentation-mars-sand.is-battle-screen:not(.is-dev-art-board) {
  --stage-gap: 22px;
}

.is-battle-presentation-mars-sand.is-battle-screen:not(.is-dev-art-board) .stage {
  padding-right: 12px;
}

.is-battle-presentation-mars-sand.is-battle-screen:not(.is-dev-art-board) .board-wrap {
  --battle-shell-width: min(1040px, calc(100% - 88px));
  --battle-command-height: 96px;
  overflow: visible;
  pointer-events: none;
}

.is-battle-presentation-mars-sand.is-battle-screen:not(.is-dev-art-board) .board-wrap::after {
  display: none;
}

.is-battle-presentation-mars-sand.is-battle-screen:not(.is-dev-art-board) .recon-panel,
.is-battle-presentation-mars-sand.is-battle-screen:not(.is-dev-art-board) .dock {
  pointer-events: auto;
}

.is-battle-presentation-mars-sand.is-battle-screen:not(.is-dev-art-board) .board-frame {
  top: calc(var(--battle-top-y) - clamp(78px, 9.7vh, 91px));
  right: auto;
  bottom: auto;
  left: 50%;
  width: var(--battle-shell-width);
  max-height: none;
  pointer-events: auto;
  transform: translateX(-50%);
}

.is-battle-presentation-mars-sand.is-battle-screen:not(.is-dev-art-board) .battle-command-rail {
  position: absolute;
  z-index: 12;
  right: auto;
  bottom: 50px;
  left: 50%;
  display: block;
  width: var(--battle-shell-width);
  height: var(--battle-command-height);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  pointer-events: auto;
  transform: translateX(-50%);
}

.is-battle-presentation-mars-sand .battle-command-rail__controls {
  position: absolute;
  z-index: 1;
  top: 28px;
  right: 36px;
  bottom: 4px;
  left: 2px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
}

.is-battle-presentation-mars-sand .battle-command-rail .hud-layout-lab-item {
  z-index: var(--hud-lab-layer, 1);
  transform:
    translate(var(--hud-lab-x, 0), var(--hud-lab-y, 0))
    rotate(var(--hud-lab-rotation, 0deg))
    scale(var(--hud-lab-width, 1), var(--hud-lab-height, 1));
  transform-origin: center;
}

.is-battle-presentation-mars-sand .battle-command-rail .hud__cluster--left.hud-layout-lab-item {
  transform:
    translate(var(--hud-lab-x, 0), var(--hud-lab-y, 0))
    rotate(var(--hud-lab-rotation, 0deg));
}

.is-battle-presentation-mars-sand .battle-command-rail .hud__cluster--left.hud-layout-lab-item > .hud-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--hud-lab-width-percent, 100%);
  height: var(--hud-lab-height-percent, 100%);
  transform: translate(-50%, -50%);
}

.is-hud-layout-calibrating .battle-command-rail .hud-layout-lab-item {
  outline: 1px dashed rgba(110, 244, 231, 0.72);
  outline-offset: 3px;
  cursor: move;
}

.is-hud-layout-calibrating .battle-command-rail .hud-layout-lab-item.is-selected {
  outline: 2px solid #fff0a6;
  outline-offset: 4px;
  filter: drop-shadow(0 0 7px rgba(255, 226, 116, 0.58));
}

.is-hud-layout-calibrating .battle-command-rail::before,
.is-hud-layout-calibrating .battle-command-rail::after {
  position: absolute;
  z-index: 30;
  content: "";
  pointer-events: none;
}

.is-hud-layout-calibrating .battle-command-rail::before {
  inset: 15px 19px 9px -15px;
  border: 1px solid rgba(110, 244, 231, 0.58);
}

.is-hud-layout-calibrating .battle-command-rail::after {
  top: -120px;
  bottom: -24px;
  left: calc(50% - 17px);
  border-left: 1px dashed rgba(255, 231, 137, 0.88);
}

.is-battle-presentation-mars-sand .battle-command-rail__chassis {
  position: absolute;
  z-index: 0;
  top: -13px;
  right: auto;
  bottom: auto;
  left: -33px;
  display: block;
  width: calc(100% + 38px);
  height: calc(100% + 27px);
  object-fit: fill;
  clip-path: polygon(0 0, 4.2% 0, 4.2% 24%, 95.8% 24%, 95.8% 0, 100% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 13px 16px rgba(0, 0, 0, 0.42));
  pointer-events: none;
}

.is-battle-presentation-mars-sand .battle-command-rail__left,
.is-battle-presentation-mars-sand .battle-command-rail__right {
  display: contents;
}

.is-battle-presentation-mars-sand .battle-command-rail__left {
  margin: 0;
  padding: 0;
}

.is-battle-presentation-mars-sand .battle-command-rail__right {
  margin: 0;
  padding: 0;
}

.is-battle-presentation-mars-sand .battle-command-rail__controls .hud__cluster--left {
  flex: 0 0 27.5%;
}

.is-battle-presentation-mars-sand .battle-command-rail__doctrine {
  flex: 0 0 6%;
}

.is-battle-presentation-mars-sand .battle-command-rail__controls > .end-turn.enemy-turn-hud {
  flex: 0 0 15%;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud {
  flex: 0 0 10.5%;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-action-panel {
  flex: 0 0 23%;
}

.is-battle-presentation-mars-sand.is-battle-screen .battle-command-rail .hud__cluster--left {
  position: relative;
  inset: auto;
  display: block;
  min-width: 0;
}

.is-battle-presentation-mars-sand .battle-command-rail .hud-menu {
  position: relative;
  width: 100%;
  height: 100%;
}

.is-battle-presentation-mars-sand .battle-command-rail .game-menu-dropdown {
  top: auto;
  bottom: calc(100% + 10px);
}

.is-battle-presentation-mars-sand.is-battle-screen .battle-command-rail .score-toast {
  top: auto;
  bottom: calc(100% + 10px);
}

.is-battle-presentation-mars-sand.is-battle-screen .battle-command-rail .hud__menu.hud-identity-card {
  top: auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-color: rgba(211, 169, 82, 0.46);
  border-radius: 8px 3px 8px 3px;
}

.is-battle-presentation-mars-sand .battle-command-rail .hud-identity-card__copy {
  padding: 0 20% 0 14%;
  justify-items: start;
  text-align: left;
}

.is-battle-presentation-mars-sand .battle-command-rail .hud-identity-card__copy span {
  --hud-calling-card-title-min-size: 9px;
  font-size: var(--hud-identity-title-size);
  text-align: left;
}

.hud-identity-card__menu-icon {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 6%;
  display: grid;
  gap: clamp(2px, 3.5cqh, 6px);
  width: clamp(10px, 20cqh, 34px);
  padding:
    clamp(3px, 6cqh, 10px)
    clamp(2px, 4.7cqh, 8px);
  border-right: 1px solid rgba(231, 192, 101, 0.2);
  transform: translate(-50%, -50%);
}

.hud-identity-card__menu-icon i {
  display: block;
  width: clamp(6px, 10.5cqh, 18px);
  height: clamp(1px, 1.2cqh, 2px);
  background: rgba(247, 218, 148, 0.88);
  box-shadow: 0 0 4px rgba(231, 192, 101, 0.28);
}

.is-battle-presentation-mars-sand .battle-command-rail .hud-identity-card__menu-icon {
  gap: 4px;
  width: 24px;
  padding: 5px;
}

.is-battle-presentation-mars-sand .battle-command-rail .hud-identity-card__menu-icon i {
  width: 14px;
  height: 1px;
}

.is-battle-presentation-mars-sand .battle-command-rail .hud-identity-card__emblem {
  width: auto;
  height: var(--hud-identity-emblem-size);
  aspect-ratio: 1;
}

.is-battle-presentation-mars-sand .battle-command-rail .hud-identity-card__emblems {
  top: 0;
  right: var(--hud-identity-emblem-right);
  height: 100%;
  transform: none;
}

.is-battle-presentation-mars-sand .battle-command-rail__doctrine {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.is-battle-presentation-mars-sand .battle-command-rail__doctrine .hud__section--doctrine {
  display: grid;
  grid-template-rows: auto 31px;
  justify-items: center;
  gap: 3px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 3px;
  border: 0;
  background: transparent;
}

.is-battle-presentation-mars-sand .battle-command-rail__doctrine .hud__label {
  color: rgba(242, 220, 169, 0.66);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.is-battle-presentation-mars-sand .battle-command-rail__doctrine .doctrine-badge__mark {
  grid-row: 2;
  width: 30px;
  height: 30px;
}

.is-battle-presentation-mars-sand .battle-command-rail__doctrine .hud__val {
  display: none;
}

.is-battle-presentation-mars-sand .battle-command-rail__controls > .end-turn.enemy-turn-hud {
  position: relative;
  inset: auto;
  align-self: stretch;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 8px 18px;
  border-color: rgba(238, 192, 91, 0.82);
  border-radius: 8px 3px 8px 3px;
  color: #ffe4a0;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(235, 165, 57, 0.2), transparent 64%),
    linear-gradient(180deg, rgba(37, 29, 16, 0.98), rgba(7, 9, 8, 0.98));
  box-shadow:
    inset 0 0 0 2px rgba(255, 215, 123, 0.11),
    inset 0 -9px 18px rgba(0, 0, 0, 0.28),
    0 0 16px rgba(232, 164, 53, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.34);
  font-size: 13px;
  animation: enemy-turn-ready-pulse 2.8s ease-in-out infinite;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud {
  --enemy-strength-readout-width: 94px;
  position: relative;
  inset: auto;
  display: grid;
  grid-template-rows: auto 16px;
  align-content: center;
  justify-items: center;
  gap: 7px;
  box-sizing: border-box;
  width: auto;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: none;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud__label {
  justify-items: center;
  width: var(--enemy-strength-readout-width);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-align: center;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud__dial {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: var(--enemy-strength-readout-width);
  height: 16px;
  aspect-ratio: auto;
  overflow: hidden;
  border: 1px solid rgba(232, 196, 116, 0.36);
  border-radius: 1px;
  background: rgba(6, 15, 15, 0.94);
  box-shadow:
    inset 0 0 0 2px rgba(2, 7, 8, 0.72),
    0 0 0 1px rgba(63, 213, 201, 0.08);
}

.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud__dial::before {
  inset: 0;
  z-index: 2;
  border-radius: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(20% - 1px), rgba(3, 10, 11, 0.86) calc(20% - 1px) 20%);
  box-shadow: none;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud__dial::after {
  display: none;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud__core {
  position: absolute;
  inset: 2px auto 2px 2px;
  z-index: 1;
  width: calc(var(--enemy-strength-progress) - 4px);
  height: auto;
  aspect-ratio: auto;
  border-radius: 0;
  background: linear-gradient(180deg, #df7133, #a83f20);
  box-shadow: 0 0 8px rgba(224, 106, 48, 0.34);
  transition: width 0.35s ease;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud.is-low .enemy-strength-hud__dial,
.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud.is-critical .enemy-strength-hud__dial {
  background: rgba(6, 15, 15, 0.94);
}

.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud.is-low .enemy-strength-hud__core {
  background: linear-gradient(180deg, #d6a13e, #9d681d);
}

.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud.is-critical .enemy-strength-hud__core {
  background: linear-gradient(180deg, #f05d49, #9f261f);
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-action-panel {
  position: relative;
  inset: auto;
  width: auto;
  height: auto;
  min-width: 0;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box {
  display: grid;
  grid-template-columns: minmax(70px, 1.15fr) repeat(3, minmax(44px, 0.72fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box__topline,
.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box__status {
  display: contents;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  place-content: center;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  padding: 7px 4px;
  border: 0;
  border-right: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__section::before {
  display: none;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__section::after {
  position: absolute;
  top: 50%;
  right: 0;
  display: block;
  width: 1px;
  height: 36px;
  background: rgba(222, 181, 92, 0.46);
  box-shadow: 0 0 6px rgba(222, 181, 92, 0.12);
  content: "";
  transform: translateY(-50%);
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__section--cannon::after {
  display: none;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__label {
  grid-column: 1;
  color: rgba(242, 220, 169, 0.64);
  font-size: 7px;
  letter-spacing: 0.07em;
  text-align: center;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__val {
  grid-column: 1;
  justify-self: center;
  color: #f4dfaa;
  font-size: 17px;
  text-align: center;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__section--score .hud__score-meta {
  grid-column: 1;
  justify-content: center;
  width: auto;
  gap: 5px;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__section--score .score-multiplier {
  align-self: baseline;
  color: #e8b955;
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__section--score .hud__val {
  grid-column: 1;
  justify-self: center;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__section--cannon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 4px;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__section--cannon .hud__cannon-btn {
  display: grid;
  grid-template-rows: auto auto;
  place-content: center;
  justify-items: center;
  gap: 6px;
  width: 100%;
  min-height: 0;
  padding: 0;
}

.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__section--cannon .hud__val {
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

/* All five live bays share one mechanical datum. The painted chassis supplies
 * the organic outer silhouette; the controls inside it stay deliberately true. */
.is-battle-presentation-mars-sand.is-battle-screen .battle-command-rail .hud__menu.hud-identity-card,
.is-battle-presentation-mars-sand .battle-command-rail__doctrine,
.is-battle-presentation-mars-sand .battle-command-rail__controls > .end-turn.enemy-turn-hud,
.is-battle-presentation-mars-sand .battle-command-rail__right .enemy-strength-hud,
.is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box {
  box-sizing: border-box;
  height: 100%;
  margin-top: 0;
  margin-bottom: 0;
  border-radius: 4px;
}

@media (max-width: 1360px), (max-height: 760px) {
  .is-battle-presentation-mars-sand.is-battle-screen:not(.is-dev-art-board) {
    --stage-gap: 18px;
  }

  .is-battle-presentation-mars-sand.is-battle-screen:not(.is-dev-art-board) .board-wrap {
    --battle-shell-width: min(1000px, calc(100% - 50px));
    --battle-command-height: 88px;
  }

  .is-battle-presentation-mars-sand .battle-command-rail__left {
    margin: 0;
    padding: 0;
  }

  .is-battle-presentation-mars-sand .battle-command-rail__right {
    margin: 0;
    padding: 0;
  }

  .is-battle-presentation-mars-sand .battle-command-rail .hud-identity-card__copy span {
    --hud-calling-card-title-min-size: 9px;
    font-size: var(--hud-identity-title-size);
  }

  .is-battle-presentation-mars-sand .battle-command-rail__right .battle-command-box .hud__val {
    font-size: 15px;
  }
}

/* The workbench keeps the standard renderer inside the central inspection bay. */
.is-battle-presentation-mars-sand.is-battle-screen.is-dev-art-board .stage {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "board";
  column-gap: 0;
  padding: calc(var(--dev-art-header-h) + 12px) calc(var(--dev-art-right-w) + 14px) 18px calc(var(--dev-art-left-w) + 14px);
}

.is-battle-presentation-mars-sand.is-battle-screen.is-dev-art-board .board-wrap::after {
  display: none;
}

.is-battle-presentation-mars-sand.is-battle-screen.is-dev-art-board .battle-command-rail {
  display: none;
}

.is-battle-presentation-mars-sand.is-battle-screen.is-dev-art-board .board-frame {
  left: 50%;
  right: auto;
  top: 50%;
  bottom: auto;
  width: min(1120px, calc(100% - 18px));
  max-height: calc(100% - 8px);
  transform: translate(-50%, -50%);
}

.is-battle-presentation-mars-sand.is-battle-screen.is-dev-art-board #board {
  overflow: hidden;
}

.is-battle-presentation-mars-sand.is-battle-screen.is-dev-art-board #end-turn-hud {
  display: none;
}
