/* v71 story-mode: keep the default game surface focused on one next action. */
.ops-game-shell .ops-system-menu {
  position: relative !important;
  justify-self: end !important;
}

.ops-game-shell .ops-system-menu > summary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(255, 217, 117, 0.28) !important;
  border-radius: 999px !important;
  background: rgba(255, 217, 117, 0.08) !important;
  color: #ffe6a3 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  list-style: none !important;
}

.ops-game-shell .ops-system-menu > summary::-webkit-details-marker {
  display: none !important;
}

.ops-game-shell .ops-system-menu .ops-system-buttons {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  z-index: 90 !important;
  display: grid !important;
  width: min(360px, calc(100vw - 24px)) !important;
  padding: 12px !important;
  border: 1px solid rgba(255, 217, 117, 0.22) !important;
  border-radius: 18px !important;
  background: rgba(4, 10, 16, 0.96) !important;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.46) !important;
}

.ops-game-shell .ops-system-menu:not([open]) .ops-system-buttons {
  display: none !important;
}

.ops-game-shell .ops-layout {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
}

.ops-game-shell .ops-left-dock,
.ops-game-shell .ops-right-dock {
  display: none !important;
}

.ops-game-shell .ops-map-stage {
  grid-template-rows: auto auto minmax(520px, 1fr) auto !important;
  gap: 10px !important;
  min-height: calc(100vh - 162px) !important;
}

.ops-game-shell .story-step-card {
  display: grid !important;
  grid-template-columns: 86px minmax(0, 1fr) minmax(220px, 0.34fr) !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 16px !important;
  border: 1px solid rgba(255, 217, 117, 0.28) !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 217, 117, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(17, 35, 45, 0.95), rgba(5, 12, 18, 0.91)) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

.ops-game-shell .story-step-index {
  display: grid !important;
  place-items: center !important;
  min-height: 78px !important;
  border-radius: 18px !important;
  background: rgba(255, 217, 117, 0.11) !important;
  color: #ffe5a1 !important;
}

.ops-game-shell .story-step-index span,
.ops-game-shell .story-step-copy span,
.ops-game-shell .story-step-action small {
  color: rgba(255, 236, 183, 0.78) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0.06em !important;
}

.ops-game-shell .story-step-index strong {
  color: #fff5ce !important;
  font-size: 34px !important;
  line-height: 1 !important;
}

.ops-game-shell .story-step-copy {
  min-width: 0 !important;
}

.ops-game-shell .story-step-copy h2,
.ops-game-shell .story-step-copy p {
  margin: 0 !important;
}

.ops-game-shell .story-step-copy h2 {
  margin-top: 4px !important;
  color: #fff7d8 !important;
  font-size: clamp(22px, 2.4vw, 34px) !important;
  line-height: 1.08 !important;
}

.ops-game-shell .story-step-copy p {
  max-width: 76ch !important;
  margin-top: 7px !important;
  color: rgba(232, 242, 238, 0.88) !important;
  font-size: 15px !important;
  line-height: 1.52 !important;
}

.ops-game-shell .story-step-action {
  display: grid !important;
  align-content: center !important;
  gap: 6px !important;
  min-height: 78px !important;
  padding: 14px !important;
  border-radius: 18px !important;
  background: rgba(88, 198, 170, 0.06) !important;
  box-shadow: inset 0 0 0 1px rgba(88, 198, 170, 0.12) !important;
}

.ops-game-shell .story-step-action strong {
  color: #d8fff1 !important;
  font-size: 18px !important;
  line-height: 1.22 !important;
}

.ops-game-shell .story-primary-action {
  min-height: 52px !important;
  padding: 0 18px !important;
  border: 1px solid rgba(125, 255, 214, 0.46) !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(88, 198, 170, 0.32), rgba(255, 217, 117, 0.18)) !important;
  color: #effff9 !important;
  font-size: 17px !important;
  font-weight: 950 !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.ops-game-shell .story-primary-action.guide-target {
  box-shadow:
    0 0 0 4px rgba(255, 217, 117, 0.18),
    0 0 34px rgba(255, 217, 117, 0.46),
    0 16px 34px rgba(0, 0, 0, 0.32) !important;
}

.ops-game-shell .story-primary-action:hover {
  border-color: rgba(255, 247, 202, 0.72) !important;
  transform: translateY(-1px) !important;
}

.ops-game-shell .ops-map-toolbar {
  grid-template-columns: minmax(0, 1fr) auto !important;
  min-height: 42px !important;
  opacity: 0.9 !important;
}

.ops-game-shell .ops-layer-tabs {
  display: none !important;
}

.ops-game-shell .ops-map-toolbar .ops-pulse {
  max-width: 520px !important;
}

.ops-game-shell .ops-wargame-map {
  min-height: 520px !important;
}

.ops-game-shell.flow-object .hex-grid,
.ops-game-shell.flow-field .hex-grid,
.ops-game-shell.flow-repair .hex-grid {
  opacity: 0.14 !important;
}

.ops-game-shell.flow-object .map-axis,
.ops-game-shell.flow-object .map-compass,
.ops-game-shell.flow-object .map-scale,
.ops-game-shell.flow-field .map-axis,
.ops-game-shell.flow-field .map-compass,
.ops-game-shell.flow-field .map-scale,
.ops-game-shell.flow-repair .map-axis,
.ops-game-shell.flow-repair .map-compass,
.ops-game-shell.flow-repair .map-scale {
  opacity: 0.24 !important;
}

.ops-game-shell.flow-object .ops-map-lines,
.ops-game-shell.flow-field .ops-map-lines,
.ops-game-shell.flow-repair .ops-map-lines {
  opacity: 0.34 !important;
}

.ops-game-shell.flow-object .ops-wargame-map .sandbox-line,
.ops-game-shell.flow-field .ops-wargame-map .sandbox-line,
.ops-game-shell.flow-repair .ops-wargame-map .sandbox-line {
  opacity: 0.22 !important;
  filter: saturate(0.72) brightness(0.82) !important;
}

.ops-game-shell.flow-object .map-chip,
.ops-game-shell.flow-object .risk-zone,
.ops-game-shell.flow-object .ops-risk-field,
.ops-game-shell.flow-object .war-counter,
.ops-game-shell.flow-object .battle-verdict,
.ops-game-shell.flow-field .map-chip,
.ops-game-shell.flow-field .risk-zone,
.ops-game-shell.flow-field .ops-risk-field,
.ops-game-shell.flow-field .war-counter,
.ops-game-shell.flow-field .battle-verdict,
.ops-game-shell.flow-repair .map-chip,
.ops-game-shell.flow-repair .risk-zone,
.ops-game-shell.flow-repair .ops-risk-field,
.ops-game-shell.flow-repair .war-counter,
.ops-game-shell.flow-repair .battle-verdict {
  opacity: 0.26 !important;
  filter: saturate(0.65) brightness(0.78) !important;
}

.ops-game-shell.flow-object .intel-contact,
.ops-game-shell.flow-relation .intel-contact,
.ops-game-shell.flow-complete .intel-contact {
  display: none !important;
}

.ops-game-shell.flow-field .object-node:not(.active),
.ops-game-shell.flow-repair .object-node:not(.active) {
  opacity: 0.12 !important;
  transform: translate(-50%, -50%) scale(0.86) !important;
  pointer-events: none !important;
}

.ops-game-shell.flow-object .object-node:not(.guide-target):not(.object-pick-mode) {
  opacity: 0.22 !important;
  transform: translate(-50%, -50%) scale(0.9) !important;
}

.ops-game-shell .guide-dimmed {
  opacity: 0.24 !important;
  filter: saturate(0.55) brightness(0.72) !important;
  cursor: default !important;
  pointer-events: none !important;
}

.ops-game-shell .guide-target {
  transform: translate(-50%, -50%) scale(1.08) !important;
}

.ops-game-shell .object-node.guide-target,
.ops-game-shell .intel-contact.guide-target,
.ops-game-shell [data-testid="sandbox-assign-suggested"].guide-target,
.ops-game-shell [data-testid="sandbox-complete"].guide-target {
  isolation: isolate !important;
  border-width: 2px !important;
  box-shadow:
    0 0 0 5px rgba(255, 217, 117, 0.2),
    0 0 38px rgba(255, 217, 117, 0.58),
    0 20px 46px rgba(0, 0, 0, 0.5) !important;
}

.ops-game-shell .ops-map-legend,
.ops-game-shell .map-status-board,
.ops-game-shell .tactical-readout {
  display: none !important;
}

.ops-game-shell .ops-map-toolbar {
  opacity: 0.72 !important;
}

.ops-game-shell .ops-pulse {
  grid-template-columns: minmax(0, 1fr) repeat(4, minmax(58px, 82px)) !important;
}

.ops-game-shell .ops-pulse strong,
.ops-game-shell .ops-pulse small {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.ops-game-shell.flow-object .map-status-board,
.ops-game-shell.flow-field .map-status-board,
.ops-game-shell.flow-repair .map-status-board,
.ops-game-shell.flow-object .tactical-readout,
.ops-game-shell.flow-field .tactical-readout,
.ops-game-shell.flow-repair .tactical-readout {
  display: none !important;
}

.ops-game-shell .ops-command-deck {
  display: none !important;
}

.ops-game-shell.flow-relation .ops-command-deck,
.ops-game-shell.flow-complete .ops-command-deck {
  display: grid !important;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) !important;
  padding: 12px !important;
  border: 1px solid rgba(255, 217, 117, 0.18) !important;
  border-radius: 18px !important;
  background: rgba(5, 13, 20, 0.72) !important;
}

.ops-game-shell.flow-relation .ops-command-cards,
.ops-game-shell.flow-complete .ops-command-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.ops-game-shell .assign-row {
  grid-template-columns: minmax(0, 1fr) !important;
}

.ops-game-shell .assign-row > span {
  width: fit-content !important;
}

.ops-game-shell .assign-more {
  display: grid !important;
  gap: 8px !important;
}

.ops-game-shell .assign-more > summary {
  width: fit-content !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(159, 188, 218, 0.2) !important;
  border-radius: 999px !important;
  color: rgba(214, 229, 228, 0.78) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

.ops-game-shell .assign-more:not([open]) > button {
  display: none !important;
}

.ops-game-shell .ops-footer {
  grid-template-columns: minmax(0, 1fr) max-content !important;
}

.ops-game-shell .ops-radio-feed {
  grid-template-columns: minmax(0, 1fr) !important;
}

.ops-game-shell .ops-radio-feed span:not(.active),
.ops-game-shell .ops-history-line,
.ops-game-shell .footer-actions .audio-key,
.ops-game-shell .footer-actions .drill-key {
  display: none !important;
}

.ops-game-shell .footer-actions {
  justify-content: end !important;
}

.ops-game-shell .footer-actions .action-gate {
  min-width: 168px !important;
}

.ops-game-shell .ops-footer {
  display: none !important;
}

@media (max-width: 920px) {
  .ops-game-shell .ops-topbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .ops-game-shell .ops-turn-strip {
    display: none !important;
  }

  .ops-game-shell .story-step-card {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 13px !important;
  }

  .ops-game-shell .story-step-index {
    display: none !important;
  }

  .ops-game-shell .story-step-action {
    min-height: 0 !important;
  }

  .ops-game-shell .story-step-copy h2 {
    font-size: 22px !important;
  }

  .ops-game-shell .story-step-copy p {
    font-size: 13px !important;
    line-height: 1.42 !important;
  }

  .ops-game-shell .ops-map-toolbar {
    display: none !important;
  }

  .ops-game-shell .ops-map-stage {
    min-height: 0 !important;
    grid-template-rows: auto minmax(500px, 1fr) auto !important;
  }

  .ops-game-shell .ops-wargame-map {
    min-height: 500px !important;
  }

  .ops-game-shell.flow-relation .ops-command-deck,
  .ops-game-shell.flow-complete .ops-command-deck {
    grid-template-columns: 1fr !important;
  }

  .ops-game-shell.flow-relation .ops-command-cards,
  .ops-game-shell.flow-complete .ops-command-cards {
    grid-template-columns: 1fr !important;
  }

  .ops-game-shell .ops-footer {
    grid-template-columns: 1fr !important;
  }

  .ops-game-shell .footer-actions {
    width: 100% !important;
  }

  .ops-game-shell .footer-actions .action-gate {
    width: 100% !important;
  }
}

@media (max-width: 760px) {
  .ops-game-shell {
    padding: 10px !important;
  }

  .ops-game-shell:has(.mobile-field-action) {
    padding-bottom: 10px !important;
  }

  .ops-game-shell .mobile-field-action {
    display: none !important;
  }

  .ops-game-shell .story-step-copy p {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  .ops-game-shell .ops-map-stage {
    gap: 8px !important;
  }

  .ops-game-shell .ops-wargame-map {
    min-height: 474px !important;
  }

  .ops-game-shell.flow-field .intel-contact:not(.guide-target),
  .ops-game-shell.flow-repair .intel-contact:not(.guide-target) {
    display: none !important;
  }

  .ops-game-shell .object-node {
    width: 96px !important;
    min-height: 86px !important;
  }

  .ops-game-shell .intel-contact {
    width: 100px !important;
    min-height: 58px !important;
  }

  .ops-game-shell .ops-map-legend {
    display: none !important;
  }
}

/* v72.1 final focus pass: keep the highlighted action inside the story card and soften the map further. */
.ops-game-shell .story-step-card .guide-target,
.ops-game-shell .story-step-card [data-testid="sandbox-assign-suggested"].guide-target,
.ops-game-shell .story-step-card [data-testid="sandbox-complete"].guide-target {
  transform: none !important;
}

.ops-game-shell .story-primary-action.guide-target {
  position: relative !important;
  z-index: 2 !important;
  transform: none !important;
}

.ops-game-shell .ops-wargame-map::after {
  background:
    linear-gradient(180deg, rgba(5, 14, 17, 0.4), rgba(5, 14, 17, 0.54)),
    radial-gradient(circle at var(--spotlight-x, 24%) var(--spotlight-y, 26%), transparent 0 78px, rgba(6, 16, 18, 0.28) 124px, rgba(6, 16, 18, 0.66) 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), inset 0 -96px 120px rgba(0, 0, 0, 0.5) !important;
}

.ops-game-shell .hex-grid,
.ops-game-shell .terrain-scan,
.ops-game-shell .ops-map-lines,
.ops-game-shell .map-axis,
.ops-game-shell .map-compass,
.ops-game-shell .map-scale,
.ops-game-shell .sector-label,
.ops-game-shell .ops-risk-field,
.ops-game-shell .map-chip,
.ops-game-shell .war-counter {
  opacity: 0.07 !important;
  filter: saturate(0.32) brightness(0.6) !important;
}

.ops-game-shell .ops-route,
.ops-game-shell .sandbox-line {
  opacity: 0.1 !important;
}

/* v72.2 mobile QA fix: separate the selected field card from the object card. */
@media (max-width: 760px) {
  .ops-game-shell.flow-field .intel-contact.guide-target,
  .ops-game-shell.flow-repair .intel-contact.guide-target {
    width: 124px !important;
    min-height: 58px !important;
    left: 58% !important;
    top: 18% !important;
    transform: translate(-50%, -50%) scale(1.02) !important;
  }

  .ops-game-shell.active-object-obj-mission.flow-field .intel-contact.guide-target,
  .ops-game-shell.active-object-obj-mission.flow-repair .intel-contact.guide-target {
    left: 31% !important;
    top: 18% !important;
  }

  .ops-game-shell .object-node {
    width: 102px !important;
    min-height: 96px !important;
    padding: 10px 8px 14px !important;
    gap: 4px !important;
  }

  .ops-game-shell .object-node span {
    width: 34px !important;
    height: 34px !important;
  }

  .ops-game-shell .object-node strong,
  .ops-game-shell .object-node small {
    margin: 0 !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }

  .ops-game-shell .object-node small {
    padding-bottom: 2px !important;
  }
}

/* Keep the replay payoff focused after the player finishes the story path. */
.app-shell:has(.stage-card.replay) {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.app-shell:has(.stage-card.replay) .sidebar,
.app-shell:has(.stage-card.replay) .stage-nav,
.app-shell:has(.stage-card.replay) .topbar,
.app-shell:has(.stage-card.replay) .topbar-metrics {
  display: none !important;
}

.app-shell:has(.stage-card.replay) .main-panel {
  display: grid !important;
  grid-template-rows: minmax(0, auto) !important;
  width: min(1040px, calc(100vw - 28px)) !important;
  margin: 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.app-shell:has(.stage-card.replay) .stage-card.replay {
  display: block !important;
  grid-template-rows: none !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 16px !important;
  padding-bottom: 18px !important;
}

.app-shell:has(.stage-card.replay) .stage-card.replay .battle-layout {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

.app-shell:has(.stage-card.replay) .stage-card.replay .battle-board,
.app-shell:has(.stage-card.replay) .stage-card.replay .battle-aar {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

.app-shell:has(.stage-card.replay) .topbar {
  grid-template-columns: minmax(0, 1fr) !important;
  min-height: 0 !important;
  padding: 10px 18px !important;
}

.stage-card.replay .battle-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

.stage-card.replay .battle-board {
  grid-template-rows: auto minmax(180px, 24vh) !important;
  gap: 8px !important;
  order: 2 !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

.stage-card.replay .battle-header {
  display: block !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(255, 217, 117, 0.2) !important;
  border-radius: 18px !important;
  background: rgba(8, 16, 24, 0.72) !important;
}

.stage-card.replay .battle-header .battle-kicker,
.stage-card.replay .battle-header h3,
.stage-card.replay .battle-metrics {
  display: none !important;
}

.stage-card.replay .battle-header p {
  display: block !important;
  max-width: 78ch !important;
  margin: 0 !important;
  color: rgba(232, 242, 238, 0.9) !important;
  font-size: 14px !important;
  line-height: 1.48 !important;
  white-space: normal !important;
}

.stage-card.replay .battle-sandbox {
  min-height: 180px !important;
  height: min(24vh, 240px) !important;
  max-height: 240px !important;
  opacity: 0.68 !important;
  border-radius: 18px !important;
}

.stage-card.replay .battle-aar {
  display: grid !important;
  grid-template-rows: auto auto auto !important;
  gap: 10px !important;
  order: 1 !important;
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0 !important;
}

.stage-card.replay .battle-result-card {
  display: grid !important;
  gap: 6px !important;
  min-height: 104px !important;
  margin: 0 !important;
  padding: 20px !important;
  border: 1px solid rgba(255, 217, 117, 0.24) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 217, 117, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(21, 42, 38, 0.96), rgba(6, 13, 20, 0.88)) !important;
}

.stage-card.replay .battle-result-card span {
  color: rgba(255, 236, 183, 0.78) !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  letter-spacing: 0.08em !important;
}

.stage-card.replay .battle-result-card strong {
  color: #fff7d8 !important;
  font-size: clamp(34px, 4.6vw, 58px) !important;
  line-height: 1.04 !important;
  white-space: normal !important;
}

.stage-card.replay .battle-result-card p {
  margin-top: 8px !important;
  color: rgba(232, 242, 238, 0.86) !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  white-space: normal !important;
}

.stage-card.replay .phase-track {
  max-height: none !important;
  margin: 0 !important;
  padding: 13px 15px !important;
  border-radius: 18px !important;
  overflow: visible !important;
}

.stage-card.replay .phase-track h3 {
  margin: 0 0 6px !important;
  font-size: 13px !important;
}

.stage-card.replay .battle-event {
  display: none !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  padding: 0 !important;
}

.stage-card.replay .battle-event:last-child {
  display: grid !important;
}

.stage-card.replay .battle-event strong,
.stage-card.replay .battle-event p {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.stage-card.replay .battle-event p {
  display: block !important;
  margin-top: 2px !important;
  line-height: 1.38 !important;
  -webkit-line-clamp: unset !important;
}

.stage-card.replay .causality-card {
  margin: 0 !important;
  padding: 13px 15px !important;
  border-radius: 18px !important;
  overflow: visible !important;
}

.stage-card.replay .causality-card h3,
.stage-card.replay .replay-focus-card,
.stage-card.replay .ontology-causal-chain,
.stage-card.replay .causality-card .small-note {
  display: none !important;
}

.stage-card.replay .causality-card > p {
  margin: 0 0 8px !important;
  color: rgba(232, 242, 238, 0.9) !important;
}

.stage-card.replay .causality-card .check-list {
  gap: 6px !important;
  margin: 0 !important;
}

.stage-card.replay .causality-card .check-list li {
  line-height: 1.38 !important;
}

.stage-card.replay .replay-actions [data-testid="back-intel"],
.stage-card.replay .replay-actions [data-testid="back-level-1"] {
  display: none !important;
}

.stage-card.replay .map-chip,
.stage-card.replay .risk-zone,
.stage-card.replay .unit-counter {
  pointer-events: none !important;
}

.stage-card.replay .battle-command-bar .replay-key:not([data-testid="play-replay"]),
.stage-card.replay .replay-actions [data-testid="back-intel"] {
  display: none !important;
}

.stage-card.replay .battle-command-bar {
  display: none !important;
}

.stage-card.replay .replay-actions {
  display: flex !important;
  justify-content: flex-end !important;
  margin: 0 !important;
}

.stage-card.replay .replay-actions button {
  width: auto !important;
  min-width: 150px !important;
  min-height: 40px !important;
  padding: 8px 14px !important;
  border-radius: 999px !important;
}

.stage-card.replay .battle-score-details {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.stage-card.replay .battle-score-details:not([open]) > :not(summary) {
  display: none !important;
}

.stage-card.replay .battle-score-details summary {
  width: fit-content !important;
  padding: 7px 11px !important;
  border-radius: 999px !important;
  opacity: 0.52 !important;
}

.stage-card.replay .battle-score-details[open] {
  padding: 12px !important;
  border: 1px solid rgba(159, 188, 218, 0.18) !important;
  border-radius: 16px !important;
  background: rgba(8, 13, 22, 0.46) !important;
  overflow: visible !important;
}

@media (max-width: 760px) {
  .app-shell:has(.stage-card.replay) {
    padding: 10px !important;
  }

  .app-shell:has(.stage-card.replay) .main-panel {
    width: 100% !important;
  }

  .app-shell:has(.stage-card.replay) .topbar {
    padding: 12px !important;
  }

  .stage-card.replay .battle-command-bar {
    display: none !important;
  }

  .stage-card.replay .replay-actions {
    justify-content: stretch !important;
  }

  .stage-card.replay .battle-layout {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .stage-card.replay .battle-board {
    grid-template-rows: auto minmax(160px, 24vh) !important;
  }

  .stage-card.replay .battle-sandbox {
    min-height: 160px !important;
    height: 24vh !important;
    max-height: 210px !important;
  }

  .stage-card.replay .battle-result-card {
    min-height: 0 !important;
    padding: 16px !important;
  }

  .stage-card.replay .battle-result-card strong {
    font-size: clamp(30px, 11vw, 44px) !important;
  }

  .stage-card.replay .battle-header p,
  .stage-card.replay .battle-result-card p,
  .stage-card.replay .battle-event p,
  .stage-card.replay .causality-card .check-list li {
    font-size: 13px !important;
  }

  .stage-card.replay .replay-actions button {
    width: 100% !important;
  }
}

/* v72 calm story path: reduce tactical noise so the player follows one story action. */
.ops-game-shell .ops-turn-strip,
.ops-game-shell .ops-map-toolbar {
  display: none !important;
}

.ops-game-shell .ops-topbar {
  grid-template-columns: minmax(0, 1fr) max-content !important;
  gap: 14px !important;
  padding-bottom: 10px !important;
}

.ops-game-shell .ops-brand h1 {
  max-width: 34ch !important;
  color: #fff3c4 !important;
  font-size: clamp(18px, 2.1vw, 25px) !important;
  line-height: 1.12 !important;
  white-space: normal !important;
}

.ops-game-shell .ops-map-stage {
  grid-template-rows: auto minmax(440px, 1fr) auto !important;
  gap: 12px !important;
  min-height: calc(100vh - 126px) !important;
}

.ops-game-shell .story-step-card {
  grid-template-columns: 74px minmax(0, 1fr) minmax(260px, 0.3fr) !important;
  max-width: 1180px !important;
  width: min(100%, 1180px) !important;
  margin: 0 auto !important;
  padding: 18px !important;
  border-color: rgba(255, 217, 117, 0.34) !important;
  background:
    radial-gradient(circle at 10% 6%, rgba(255, 217, 117, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(14, 31, 37, 0.98), rgba(4, 12, 16, 0.96)) !important;
}

.ops-game-shell .story-step-copy p {
  max-width: 68ch !important;
  color: rgba(242, 249, 239, 0.92) !important;
  font-size: 16px !important;
  line-height: 1.58 !important;
}

.ops-game-shell .story-step-action {
  background: rgba(43, 116, 105, 0.1) !important;
}

.ops-game-shell .story-primary-action {
  min-height: 58px !important;
  border-radius: 18px !important;
  font-size: 18px !important;
}

.ops-game-shell .ops-wargame-map {
  max-width: 1180px !important;
  width: min(100%, 1180px) !important;
  min-height: 440px !important;
  margin: 0 auto !important;
  border-color: rgba(255, 217, 117, 0.16) !important;
  background-color: #071115 !important;
}

.ops-game-shell .ops-wargame-map::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background:
    radial-gradient(circle at var(--spotlight-x, 24%) var(--spotlight-y, 26%), transparent 0 95px, rgba(3, 10, 13, 0.2) 145px, rgba(3, 10, 13, 0.58) 100%),
    linear-gradient(180deg, rgba(5, 15, 18, 0.1), rgba(5, 15, 18, 0.34)) !important;
}

.ops-game-shell .hex-grid,
.ops-game-shell .terrain-scan,
.ops-game-shell .ops-map-lines,
.ops-game-shell .map-axis,
.ops-game-shell .map-compass,
.ops-game-shell .map-scale,
.ops-game-shell .sector-label,
.ops-game-shell .ops-risk-field,
.ops-game-shell .map-chip,
.ops-game-shell .war-counter {
  opacity: 0.12 !important;
  filter: saturate(0.42) brightness(0.72) !important;
  pointer-events: none !important;
}

.ops-game-shell .ops-route,
.ops-game-shell .sandbox-line {
  opacity: 0.18 !important;
  stroke-width: 0.42 !important;
}

.ops-game-shell.flow-object .object-node:not(.guide-target):not(.object-pick-mode),
.ops-game-shell.flow-field .object-node:not(.active),
.ops-game-shell.flow-repair .object-node:not(.active),
.ops-game-shell.flow-field .intel-contact:not(.guide-target),
.ops-game-shell.flow-repair .intel-contact:not(.guide-target) {
  opacity: 0.08 !important;
  filter: saturate(0.38) brightness(0.58) !important;
}

.ops-game-shell .object-node,
.ops-game-shell .intel-contact {
  z-index: 8 !important;
}

.ops-game-shell .object-node.guide-target,
.ops-game-shell .intel-contact.guide-target,
.ops-game-shell .object-node.active {
  z-index: 18 !important;
  opacity: 1 !important;
  filter: none !important;
}

.ops-game-shell.flow-relation .ops-command-deck,
.ops-game-shell.flow-complete .ops-command-deck {
  max-width: 1180px !important;
  width: min(100%, 1180px) !important;
  margin: 0 auto !important;
}

@media (max-width: 920px) {
  .ops-game-shell .ops-map-stage {
    grid-template-rows: auto minmax(420px, 1fr) auto !important;
  }

  .ops-game-shell .story-step-card {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .ops-game-shell .story-step-action {
    padding: 12px !important;
  }
}

@media (max-width: 760px) {
  .ops-game-shell {
    padding: 10px !important;
  }

  .ops-game-shell .ops-brand {
    gap: 8px !important;
  }

  .ops-game-shell .brand-mark {
    width: 34px !important;
    height: 34px !important;
  }

  .ops-game-shell .ops-brand h1 {
    font-size: 18px !important;
  }

  .ops-game-shell .ops-system-menu > summary {
    min-height: 34px !important;
    padding: 0 12px !important;
  }

  .ops-game-shell .story-step-card {
    padding: 14px !important;
    border-radius: 20px !important;
  }

  .ops-game-shell .story-step-copy h2 {
    font-size: 24px !important;
    line-height: 1.12 !important;
  }

  .ops-game-shell .story-step-copy p {
    display: block !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .ops-game-shell .story-primary-action {
    width: 100% !important;
    min-height: 54px !important;
  }

  .ops-game-shell .ops-map-stage {
    grid-template-rows: auto minmax(390px, 1fr) auto !important;
  }

  .ops-game-shell .ops-wargame-map {
    min-height: 390px !important;
  }

  .ops-game-shell .object-node {
    width: 92px !important;
    min-height: 78px !important;
  }

  .ops-game-shell .intel-contact {
    width: 108px !important;
    min-height: 56px !important;
  }
}
