/* KreepCore planetary defence layer (F3). Reuses the arcade console frame
   (.kc-arcade*) and only adds the surface-battery HUD. */
.kc-def-hud { gap: 10px; }
.kc-def-mag,
.kc-def-left,
.kc-def-kills {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 700;
}
.kc-def-left { color: var(--text-secondary, #9ab); font-weight: 400; }
.kc-def-kills { color: #a8f0cd; font-weight: 600; }
.kc-def-mag.empty { color: #ffb09a; animation: kc-def-reload 0.7s ease-in-out infinite alternate; }
@keyframes kc-def-reload { from { opacity: 0.55; } to { opacity: 1; } }

/* Opening brief: what is coming and what the colony can answer with. */
.kc-def-brief {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(120, 200, 240, 0.35);
  border-radius: 6px;
  background: rgba(5, 9, 18, 0.86);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-primary, #dfe9f2);
  pointer-events: none;
}
.kc-def-brief[hidden] { display: none; }
.kc-def-brief-row + .kc-def-brief-row { margin-top: 3px; }
.kc-def-brief-controls {
  margin-top: 6px !important;
  padding-top: 5px;
  border-top: 1px solid rgba(120, 200, 240, 0.18);
  color: var(--text-secondary, #9ab);
}
.kc-def-brief b {
  display: inline-block;
  min-width: 78px;
  color: var(--cyan, #7fd8ff);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Running tally of what the colony has already lost. Named, in order. */
.kc-def-losses {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: min(58%, 300px);
  padding: 6px 8px;
  border: 1px solid rgba(190, 215, 240, 0.32);
  border-left-width: 1px;
  border-radius: 5px;
  background: rgba(5, 9, 18, 0.88);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-primary, #dfe9f2);
  pointer-events: none;
}
.kc-def-losses[hidden] { display: none; }
.kc-def-loss-title {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary, #9ab);
  margin-bottom: 3px;
}
.kc-def-loss-row { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-def-loss-row::before { content: '\2715\00a0'; }
.kc-def-loss-more { color: var(--text-secondary, #9ab); }

/* End card: what was lost against what survived, side by side. */
.kc-arcade-msg-sub div + div { margin-top: 3px; }
.kc-def-end-split {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  text-align: left;
}
.kc-def-end-col {
  flex: 1 1 0;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
}
.kc-def-end-col b {
  display: block;
  margin-bottom: 3px;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cyan, #7fd8ff);
  font-weight: 400;
}
.kc-def-end-col span { display: block; }
.kc-def-end-col:first-child span::before { content: '\2715\00a0'; }
.kc-def-end-col:last-child span::before { content: '\2713\00a0'; }

@media (max-width: 390px) {
  .kc-def-hud { gap: 5px; }
  .kc-def-mag,
  .kc-def-left,
  .kc-def-kills { font-size: 11px; }
  .kc-def-brief { font-size: 13px; }
  .kc-def-end-split { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .kc-def-mag.empty { animation: none; }
}
