/**
 * Combat System Styling
 * FBI Witness Protection Noir Aesthetic
 */

/* === COMBAT MODAL === */
.combat-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #3A3238;
  z-index: 9999;
  padding: 1.5rem;
  font-family: 'Courier New', Courier, monospace;
  color: #5F5449;
  overflow-y: auto;
}

/* === THE LOT (Day-6 guided training) ===
   The combat modal is fullscreen + opaque, so the training-field
   atmosphere has to live ON it: soft tunnel vignette, gravel-dust
   ground warmth, chain-link mesh in both margins, a hot red edge.
   Base stays close to the stock #3A3238 so panel text keeps its
   contrast. */
.combat-modal.combat-on-lot {
  background:
    radial-gradient(ellipse 105% 80% at 50% 46%,
      transparent 0%,
      transparent 30%,
      rgba(16, 14, 11, 0.4) 64%,
      rgba(9, 8, 6, 0.65) 94%,
      rgba(6, 5, 4, 0.75) 100%),
    repeating-linear-gradient(45deg,
      rgba(190, 195, 200, 0.05) 0px,
      rgba(190, 195, 200, 0.05) 1px,
      transparent 1px,
      transparent 17px
    ) left center / 12% 100% no-repeat,
    repeating-linear-gradient(-45deg,
      rgba(190, 195, 200, 0.05) 0px,
      rgba(190, 195, 200, 0.05) 1px,
      transparent 1px,
      transparent 17px
    ) left center / 12% 100% no-repeat,
    repeating-linear-gradient(45deg,
      rgba(190, 195, 200, 0.05) 0px,
      rgba(190, 195, 200, 0.05) 1px,
      transparent 1px,
      transparent 17px
    ) right center / 12% 100% no-repeat,
    repeating-linear-gradient(-45deg,
      rgba(190, 195, 200, 0.05) 0px,
      rgba(190, 195, 200, 0.05) 1px,
      transparent 1px,
      transparent 17px
    ) right center / 12% 100% no-repeat,
    radial-gradient(ellipse 70% 30% at 50% 100%,
      rgba(165, 135, 95, 0.09) 0%, transparent 65%),
    linear-gradient(90deg,
      rgba(140, 45, 25, 0.06) 0%,
      transparent 10%,
      transparent 90%,
      rgba(140, 45, 25, 0.06) 100%),
    linear-gradient(180deg, #35302c 0%, #29241f 100%);
}

/* Session 2 (Day 8) — the frame OPENS: lighter vignette, no red
   pain edge, a touch more top light. He's not prey here anymore. */
.combat-modal.combat-on-lot.lot-s2 {
  background:
    radial-gradient(ellipse 115% 85% at 50% 46%,
      transparent 0%,
      transparent 38%,
      rgba(16, 14, 11, 0.3) 70%,
      rgba(9, 8, 6, 0.5) 96%,
      rgba(6, 5, 4, 0.6) 100%),
    repeating-linear-gradient(45deg,
      rgba(190, 195, 200, 0.05) 0px,
      rgba(190, 195, 200, 0.05) 1px,
      transparent 1px,
      transparent 17px
    ) left center / 12% 100% no-repeat,
    repeating-linear-gradient(-45deg,
      rgba(190, 195, 200, 0.05) 0px,
      rgba(190, 195, 200, 0.05) 1px,
      transparent 1px,
      transparent 17px
    ) left center / 12% 100% no-repeat,
    repeating-linear-gradient(45deg,
      rgba(190, 195, 200, 0.05) 0px,
      rgba(190, 195, 200, 0.05) 1px,
      transparent 1px,
      transparent 17px
    ) right center / 12% 100% no-repeat,
    repeating-linear-gradient(-45deg,
      rgba(190, 195, 200, 0.05) 0px,
      rgba(190, 195, 200, 0.05) 1px,
      transparent 1px,
      transparent 17px
    ) right center / 12% 100% no-repeat,
    radial-gradient(ellipse 80% 32% at 50% 0%,
      rgba(210, 200, 180, 0.07) 0%, transparent 62%),
    radial-gradient(ellipse 70% 30% at 50% 100%,
      rgba(165, 135, 95, 0.08) 0%, transparent 65%),
    linear-gradient(180deg, #363129 0%, #2a2520 100%);
}

/* Session 3 (Day 9, graduation) — the most open frame; the hot
   edge turns GOLD. Same wire, different man inside it. */
.combat-modal.combat-on-lot.lot-s3 {
  background:
    radial-gradient(ellipse 125% 90% at 50% 46%,
      transparent 0%,
      transparent 44%,
      rgba(16, 14, 11, 0.24) 74%,
      rgba(9, 8, 6, 0.4) 97%,
      rgba(6, 5, 4, 0.5) 100%),
    repeating-linear-gradient(45deg,
      rgba(190, 195, 200, 0.045) 0px,
      rgba(190, 195, 200, 0.045) 1px,
      transparent 1px,
      transparent 17px
    ) left center / 12% 100% no-repeat,
    repeating-linear-gradient(-45deg,
      rgba(190, 195, 200, 0.045) 0px,
      rgba(190, 195, 200, 0.045) 1px,
      transparent 1px,
      transparent 17px
    ) left center / 12% 100% no-repeat,
    repeating-linear-gradient(45deg,
      rgba(190, 195, 200, 0.045) 0px,
      rgba(190, 195, 200, 0.045) 1px,
      transparent 1px,
      transparent 17px
    ) right center / 12% 100% no-repeat,
    repeating-linear-gradient(-45deg,
      rgba(190, 195, 200, 0.045) 0px,
      rgba(190, 195, 200, 0.045) 1px,
      transparent 1px,
      transparent 17px
    ) right center / 12% 100% no-repeat,
    radial-gradient(ellipse 85% 34% at 50% 0%,
      rgba(225, 210, 185, 0.09) 0%, transparent 62%),
    linear-gradient(90deg,
      rgba(196, 168, 122, 0.06) 0%,
      transparent 10%,
      transparent 90%,
      rgba(196, 168, 122, 0.06) 100%),
    linear-gradient(180deg, #37322a 0%, #2b2721 100%);
}

/* === COMBAT WORKSPACE LAYOUT === */
.combat-workspace {
  display: grid;
  grid-template-columns: 260px 1fr 260px;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* === SIDE PANELS === */
.combat-side-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.combat-card {
  background: #EBE6D8;
  padding: 1.2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid #8E7F7F;
}

.combat-card-header {
  background: #3A3238;
  color: #EBE6D8;
  padding: 0.5rem 0.8rem;
  margin: -1.2rem -1.2rem 1rem -1.2rem;
  font-size: 0.75rem;
  letter-spacing: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.combat-badge {
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.combat-badge-green {
  background: #4a7c59;
  color: #EBE6D8;
}

.combat-badge-red {
  background: #8B0000;
  color: #EBE6D8;
}

/* === ID SECTION === */
.combat-id-section {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed #8E7F7F;
  margin-bottom: 1rem;
}

.combat-id-photo {
  width: 60px;
  height: 75px;
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.combat-silhouette-head {
  width: 24px;
  height: 24px;
  background: #8E7F7F;
  border-radius: 50%;
  margin-bottom: -6px;
}

.combat-silhouette-body {
  width: 36px;
  height: 28px;
  background: #8E7F7F;
  border-radius: 50% 50% 0 0;
}

.combat-id-info {
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.8;
  color: #3A3238;
}

.combat-id-name {
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: #3A3238;
}

/* === STATS === */
.combat-stat-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
}

.combat-stat-label {
  width: 65px;
  color: #8E7F7F;
  letter-spacing: 1px;
  font-size: 0.75rem;
}

.combat-health-bar {
  flex: 1;
  height: 20px;
  background: transparent;
  border: 1px solid #8E7F7F;
  position: relative;
  overflow: hidden;
}

.combat-health-fill {
  height: 100%;
  transition: width 0.3s ease;
  background: repeating-linear-gradient(
    45deg,
    #4a7c59,
    #4a7c59 10px,
    #5d7c64 10px,
    #5d7c64 20px
  );
}

.combat-health-fill.enemy {
  background: repeating-linear-gradient(
    45deg,
    #8B0000,
    #8B0000 10px,
    #a01010 10px,
    #a01010 20px
  );
}

.combat-health-fill.critical {
  animation: combat-pulse 0.5s infinite;
}

@keyframes combat-pulse {
  50% { opacity: 0.5; }
}

.combat-cover-tag {
  padding: 4px 10px;
  font-size: 0.7rem;
  letter-spacing: 1px;
  border: 1px solid;
  font-weight: bold;
}

.combat-cover-none {
  border-color: #8B0000;
  color: #8B0000;
}

.combat-cover-partial {
  border-color: #8B4513;
  color: #8B4513;
}

.combat-cover-full {
  border-color: #4a7c59;
  color: #4a7c59;
}

.combat-cover-desc {
  font-size: 0.7rem;
  color: #8E7F7F;
  margin-left: 0.6rem;
  font-style: italic;
}

/* === S.E.K.S. / B.A.N.G. ATTRIBUTES === */
.combat-attributes-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.combat-attr-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
}

.combat-attr-letter {
  width: 22px;
  height: 22px;
  background: #3A3238;
  color: #EBE6D8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.7rem;
}

.combat-attr-letter.threat {
  background: #8B0000;
}

.combat-attr-name {
  width: 80px;
  color: #8E7F7F;
  letter-spacing: 0.5px;
  font-size: 0.65rem;
}

.combat-attr-bar {
  flex: 1;
  height: 8px;
  background: rgba(142,127,127,0.3);
  border-radius: 4px;
  overflow: hidden;
}

.combat-attr-bar.threat-bar {
  background: rgba(139,0,0,0.2);
}

.combat-attr-fill {
  height: 100%;
  background: #4a7c59;
  transition: width 0.3s ease;
}

.combat-attr-fill.threat-fill {
  background: #8B0000;
}

.combat-attr-val {
  width: 18px;
  text-align: right;
  font-weight: bold;
  font-size: 0.8rem;
  color: #3A3238;
}

/* === INVENTORY === */
.combat-inventory-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.combat-inv-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px dotted #D4C8BE;
  font-size: 0.75rem;
}

.combat-inv-item:last-child {
  border-bottom: none;
}

.combat-inv-icon {
  font-size: 1rem;
  width: 24px;
  text-align: center;
}

.combat-inv-name {
  flex: 1;
  color: #3A3238;
}

.combat-inv-qty {
  color: #8E7F7F;
  font-size: 0.7rem;
  min-width: 28px;
  text-align: right;
}

.combat-inv-qty.threat-text {
  color: #8B0000;
  font-weight: bold;
}

/* === SUSPECT CARD === */
.combat-card.suspect {
  border-top: 3px solid #8B0000;
}

.combat-card.suspect .combat-card-header {
  background: #8B0000;
}

/* === CENTER - REPORT === */
.combat-report {
  background: #EBE6D8;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  border: 1px solid #8E7F7F;
}

.combat-report-header {
  padding: 1.5rem 1.8rem;
  border-bottom: 2px solid #3A3238;
  text-align: center;
  position: relative;
}

.combat-report-title {
  font-size: 1.5rem;
  letter-spacing: 5px;
  margin-bottom: 0.3rem;
  color: #3A3238;
  font-weight: bold;
}

.combat-report-sub {
  font-size: 0.8rem;
  color: #8E7F7F;
  letter-spacing: 2px;
}

.combat-report-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed #8E7F7F;
  font-size: 0.75rem;
  color: #8E7F7F;
}

/* === EVIDENCE TOGGLE === */
.combat-evidence-toggle {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.combat-toggle-label {
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: #8E7F7F;
}

.combat-toggle-btn {
  position: relative;
  width: 52px;
  height: 24px;
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 0.55rem;
  padding: 0;
  overflow: hidden;
}

.combat-toggle-btn .toggle-on,
.combat-toggle-btn .toggle-off {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.2s;
  font-weight: bold;
}

.combat-toggle-btn .toggle-on {
  left: 6px;
  color: #4a7c59;
  opacity: 1;
}

.combat-toggle-btn .toggle-off {
  right: 6px;
  color: #8E7F7F;
  opacity: 0.4;
}

.combat-toggle-btn .toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 16px;
  background: #4a7c59;
  transition: all 0.2s;
}

.combat-toggle-btn:not(.active) .toggle-slider {
  left: 26px;
  background: #8E7F7F;
}

.combat-toggle-btn:not(.active) .toggle-on { opacity: 0.4; }
.combat-toggle-btn:not(.active) .toggle-off { opacity: 1; }

/* === THREAT METER === */
.combat-threat-section {
  padding: 0.8rem 1.8rem;
  background: rgba(139, 0, 0, 0.05);
  border-bottom: 1px solid #D4C8BE;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* === TACTICAL MINIMAP === */
.combat-tactical-map {
  padding: 1rem 1.8rem;
  background: rgba(58, 50, 56, 0.08);
  border-bottom: 1px solid #D4C8BE;
}

.combat-map-header {
  font-size: 0.65rem;
  color: #5F5449;
  letter-spacing: 2px;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: center;
  border-bottom: 1px solid #8E7F7F;
  padding-bottom: 0.3rem;
}

.combat-map-grid {
  background: #EBE6D8;
  border: 2px solid #3A3238;
  padding: 0.6rem;
  height: 160px;   /* §E-1: 200 → 160 — two markers read fine */
  position: relative;
  box-shadow: inset 0 0 20px rgba(58, 50, 56, 0.1);
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(142, 127, 127, 0.15) 19px, rgba(142, 127, 127, 0.15) 20px),
    repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(142, 127, 127, 0.15) 19px, rgba(142, 127, 127, 0.15) 20px);
}

.combat-map-terrain {
  position: absolute;
  bottom: 0.6rem;
  left: 0.6rem;
  right: 0.6rem;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    #8E7F7F,
    #8E7F7F 10px,
    transparent 10px,
    transparent 15px
  );
}

.combat-map-distance-line {
  position: absolute;
  top: 50%;
  left: 0.6rem;
  right: 0.6rem;
  height: 2px;
  background: rgba(139, 0, 0, 0.3);
  transform: translateY(-50%);
}

.combat-map-distance-marker {
  position: absolute;
  top: 50%;
  font-size: 0.5rem;
  color: #8E7F7F;
  background: #EBE6D8;
  padding: 0 0.2rem;
  transform: translateY(-50%);
  letter-spacing: 0.5px;
}

.combat-map-entity {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  z-index: 10;
}

.combat-map-entity-marker {
  width: 28px;
  height: 28px;
  border: 2px solid;
  background: #EBE6D8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  position: relative;
}

.combat-map-entity-marker::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid;
  border-top-color: inherit;
}

.combat-map-entity.player .combat-map-entity-marker {
  border-color: #4a7c59;
  color: #4a7c59;
}

.combat-map-entity.player .combat-map-entity-marker::before {
  border-top-color: #4a7c59;
}

.combat-map-entity.enemy .combat-map-entity-marker {
  border-color: #8B0000;
  color: #8B0000;
}

.combat-map-entity.enemy .combat-map-entity-marker::before {
  border-top-color: #8B0000;
}

.combat-map-entity-label {
  font-size: 0.55rem;
  color: #3A3238;
  letter-spacing: 0.5px;
  background: rgba(235, 230, 216, 0.9);
  padding: 0.1rem 0.3rem;
  border: 1px solid #8E7F7F;
  white-space: nowrap;
  font-weight: bold;
}

.combat-map-cover {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  font-size: 1.2rem;
  z-index: 5;
}

.combat-map-cover-icon {
  color: #3A3238;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1;
  font-weight: bold;
}

.combat-map-cover-label {
  font-size: 0.5rem;
  color: #3A3238;
  letter-spacing: 0.3px;
  background: rgba(235, 230, 216, 0.95);
  padding: 0.15rem 0.4rem;
  border: 1px solid #3A3238;
  font-weight: bold;
}

/* §N-3 — the map tells the object's story. Damaged: red hp
   fraction under the label. Destroyed: struck-through label +
   debris glyph (kept on the map — the player sees what stood
   there). Hit: one-shot pulse on the chip's exact turn. */
.combat-map-cover-hp {
  font-size: 0.48rem;
  font-weight: bold;
  color: #8B0000;
  text-align: center;
  letter-spacing: 1px;
  margin-top: 0.05rem;
}

.combat-map-cover.damaged .combat-map-cover-label {
  border-style: dashed;
  color: #8B0000;
}

.combat-map-cover.destroyed .combat-map-cover-label {
  text-decoration: line-through;
  opacity: 0.55;
  border-style: dotted;
}

.combat-map-cover-hit {
  animation: combatCoverHit 0.9s ease-out 1;
}

@keyframes combatCoverHit {
  0%   { filter: none; }
  25%  { filter: drop-shadow(0 0 6px rgba(139, 0, 0, 0.9)); transform: translate(-50%, -50%) scale(1.15); }
  100% { filter: none; }
}

/* §N-6 — CORNERED status tag: the trap made visible, same
   place Exposed lives. */
.combat-cover-tag.combat-cover-cornered {
  background: #8B0000;
  color: #EBE6D8;
  border-color: #8B0000;
  animation: combat-pulse 1.4s ease-in-out infinite;
}

/* §O-1 — dropped weapon on the map: small glyph + dossier
   label below the cover markers. */
.combat-map-dropped {
  position: absolute;
  text-align: center;
  z-index: 2;
}

.combat-map-dropped-icon {
  font-size: 0.85rem;
  filter: grayscale(0.4);
}

.combat-map-dropped-label {
  font-size: 0.45rem;
  color: #8B0000;
  letter-spacing: 0.4px;
  background: rgba(235, 230, 216, 0.95);
  padding: 0.1rem 0.3rem;
  border: 1px dashed #8B0000;
  font-weight: bold;
  white-space: nowrap;
}

/* §W-3 — desperation framing: FAN THE HAMMER must not read as
   a normal attack. Muted body, red dashed spine, reckless name.
   Kept ALWAYS VISIBLE (hiding an option is the confusing move —
   §N-6 doctrine); the styling carries the warning instead. */
.combat-action-btn.combat-action-desperate {
  background: rgba(139, 0, 0, 0.05);
  border-left: 3px dashed #8B0000;
  opacity: 0.85;
}

.combat-action-btn.combat-action-desperate .combat-action-name {
  color: #8B0000;
  font-style: italic;
}

/* §N-8 — the bleeder bridge pulses NEGOTIATE once: quiet,
   single, gone (WINDOW-badge grammar). */
.combat-action-btn.combat-negotiate-flash {
  animation: combatNegotiateFlash 1.6s ease-out 1;
}

@keyframes combatNegotiateFlash {
  0%   { box-shadow: none; }
  30%  { box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.75), 0 0 10px rgba(139, 0, 0, 0.45); }
  100% { box-shadow: none; }
}

/* §N-4 — glossary terms: dotted underline in the log/chips;
   hover (desktop) / tap-focus (mobile) shows the one-line tip.
   A glossary, not a tutorial — no modals, no arrows. */
.combat-term {
  border-bottom: 1px dotted rgba(139, 0, 0, 0.65);
  cursor: help;
  position: relative;
  outline: none;
}

/* The tip itself is ONE fixed-position element placed by JS —
   a CSS ::after anchored inside the scrolling log clips at the
   container edge (#combatLogEntries is overflow-y: auto). */
#combatTermTip {
  position: fixed;
  width: max-content;
  max-width: 260px;
  background: #3A3238;
  color: #EBE6D8;
  border: 1px solid #8E7F7F;
  padding: 0.3rem 0.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.6rem;
  font-weight: normal;
  letter-spacing: 0.4px;
  line-height: 1.35;
  white-space: normal;
  z-index: 10050;
  pointer-events: none;
  box-shadow: 2px 2px 0 rgba(58, 50, 56, 0.35);
}

.combat-map-obstacle {
  position: absolute;
  font-size: 1rem;
  color: #8E7F7F;
  opacity: 0.25;
  z-index: 1;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.combat-map-legend {
  margin-top: 0.8rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.65rem;
  color: #8E7F7F;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-icon {
  font-weight: bold;
}

.legend-icon.player-icon {
  color: #4a7c59;
}

.legend-icon.enemy-icon {
  color: #8B0000;
}

.legend-icon.cover-icon {
  color: #5F5449;
}

.combat-threat-label {
  font-size: 0.75rem;
  color: #8B0000;
  letter-spacing: 1px;
  font-weight: bold;
}

.combat-threat-bar {
  display: flex;
  gap: 3px;
  flex: 1;
}

.combat-threat-pip {
  flex: 1;
  height: 14px;
  background: #D4C8BE;
  border: 1px solid #8E7F7F;
}

.combat-threat-pip.filled {
  background: #8B0000;
  border-color: #8B0000;
}

.combat-threat-pip.critical {
  animation: combat-glow 0.8s infinite;
}

@keyframes combat-glow {
  50% {
    box-shadow: 0 0 8px #8B0000;
  }
}

.combat-threat-value {
  font-size: 0.85rem;
  font-weight: bold;
  color: #8B0000;
  min-width: 40px;
}

/* === COMBAT LOG === */
.combat-log-area {
  flex: 1;
  padding: 1rem 1.5rem;
  overflow: hidden;
  min-height: 180px;   /* §E-1: 250 → 180 — the log scrolls internally anyway */
  max-height: 400px;
  position: relative;
}

#combatLogEntries {
  height: 100%;
  overflow-y: auto;
  position: relative;
}

.combat-log-page {
  min-height: 100%;
  background: #EBE6D8;
  position: relative;
  padding-bottom: 1.5rem;
}

.combat-log-entry {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  font-size: 0.9rem;
  opacity: 0;
  color: #3A3238;
}

.combat-log-entry.visible {
  opacity: 1;
  transition: opacity 0.2s;
}

.combat-log-entry .time {
  color: #8E7F7F;
  font-size: 0.8rem;
  margin-right: 0.6rem;
}

.combat-log-entry.success {
  color: #4a7c59;
}

.combat-log-entry.failure {
  color: #8B0000;
}

.combat-cursor {
  display: inline-block;
  width: 6px;
  height: 2px;
  background: #3A3238;
  animation: combat-blink 0.5s infinite;
}

@keyframes combat-blink {
  50% { opacity: 0; }
}

/* === EVIDENCE POLAROIDS === */
.combat-evidence-box {
  margin: 0.8rem 0;
  padding: 0.5rem 0.5rem 2rem 0.5rem;
  background: linear-gradient(180deg, #fefefe 0%, #f5f5f0 100%);
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.15);
  display: inline-block;
  transform: rotate(-1.5deg);
  opacity: 0;
  transition: all 0.3s;
  position: relative;
}

.combat-evidence-box:nth-child(even) {
  transform: rotate(2deg);
}

.combat-evidence-box.visible {
  opacity: 1;
}

/* Tape effect */
.combat-evidence-box::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(1deg);
  width: 50px;
  height: 14px;
  background: rgba(200, 180, 140, 0.6);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.combat-evidence-img {
  width: 140px;
  height: 100px;
  background: linear-gradient(160deg, #252525 0%, #1a1a1a 40%, #202020 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  position: relative;
  overflow: hidden;
  filter: sepia(0.1) contrast(1.05);
}

/* Photo shine/reflection */
.combat-evidence-img::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 25% 15%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
    linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.25) 100%);
  pointer-events: none;
}

.combat-evidence-caption {
  position: absolute;
  bottom: 0.6rem;
  left: 0.6rem;
  right: 2.8rem;
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  color: #222;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.combat-evidence-date {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  font-family: 'Courier New', monospace;
  font-size: 0.55rem;
  color: #555;
}

.combat-evidence-marker {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #8B0000;
  color: white;
  font-size: 0.55rem;
  padding: 3px 6px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* Collapsed evidence mode */
.combat-log-area.evidence-collapsed .combat-evidence-box {
  padding: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  margin: 0.3rem 0;
}

.combat-log-area.evidence-collapsed .combat-evidence-box .combat-evidence-img,
.combat-log-area.evidence-collapsed .combat-evidence-box .combat-evidence-marker,
.combat-log-area.evidence-collapsed .combat-evidence-box .combat-evidence-date,
.combat-log-area.evidence-collapsed .combat-evidence-box::before {
  display: none;
}

.combat-log-area.evidence-collapsed .combat-evidence-box .combat-evidence-caption {
  position: static;
  display: inline;
  font-size: 0.8rem;
  color: #8E7F7F;
  cursor: pointer;
  border-bottom: 1px dashed #8E7F7F;
}

.combat-log-area.evidence-collapsed .combat-evidence-box .combat-evidence-caption::before {
  content: '📎 ';
}

/* === ROLL BOX === */
.combat-roll-box {
  display: none;
  background: #D4C8BE;
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
  border: 2px solid #8E7F7F;
}

.combat-roll-box.active {
  display: block;
}

.combat-roll-label {
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: #8E7F7F;
  margin-bottom: 0.4rem;
}

.combat-roll-num {
  font-size: 2.5rem;
  font-weight: bold;
  color: #3A3238;
}

.combat-roll-num.success {
  color: #4a7c59;
}

.combat-roll-num.failure {
  color: #8B0000;
}

.combat-roll-verdict {
  font-size: 0.8rem;
  letter-spacing: 2px;
  margin-top: 0.3rem;
  font-weight: bold;
}

/* === ACTIONS SECTION === */
.combat-actions-section {
  border-top: 1px dashed #8E7F7F;
}

.combat-actions-header {
  background: #8E7F7F;
  color: #EBE6D8;
  padding: 0.5rem 1.2rem;
  font-size: 0.8rem;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

/* §I-2 — transient firing-window badge. Rides the actions
   header while analyzed && ttl > 0; red-stamp language so it
   reads as "act NOW", not decoration. */
.combat-window-badge {
  border: 2px solid #8B0000;
  color: #EBE6D8;
  background: #8B0000;
  padding: 0.15rem 0.55rem;
  font-size: 0.62rem;
  font-weight: bold;
  letter-spacing: 1.5px;
  white-space: nowrap;
  animation: combatWindowPulse 1.1s ease-in-out infinite;
}

@keyframes combatWindowPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* §I-2 — permanent nerve-read stamp on SUSPECT INFO. Dossier
   ink stamp: doubled border, slight tilt, never expires. */
.combat-read-stamp {
  border: 2px double #8B0000;
  color: #8B0000;
  padding: 0.05rem 0.45rem;
  font-size: 0.58rem;
  font-weight: bold;
  letter-spacing: 2px;
  transform: rotate(-6deg);
  background: rgba(235, 230, 216, 0.6);
}

/* §K — signature quirk line in THREAT PROFILE. Case-file
   annotation: thin rule above, red name, muted blurb. */
.combat-quirk-line {
  margin-top: 0.3rem;
  padding: 0.25rem 0.2rem 0.05rem;
  border-top: 1px dashed rgba(142, 127, 127, 0.55);
  font-size: 0.6rem;
  letter-spacing: 1px;
}

.combat-quirk-label {
  color: rgba(95, 84, 73, 0.75);
  font-weight: bold;
}

.combat-quirk-name {
  color: #8B0000;
  font-weight: bold;
  letter-spacing: 2px;
}

.combat-quirk-blurb {
  display: block;
  margin-top: 0.12rem;
  color: rgba(95, 84, 73, 0.85);
  font-style: italic;
  letter-spacing: 0.5px;
}

.combat-actions-list {
  padding: 0.4rem 0;
  /* §E-1 layout package — two-column grid: 9 actions → 5 rows,
     ~140px reclaimed. DOM order makes the pairs semantic:
     (Return Fire | Reload) (Hold | Melee) (Analyze | Negotiate)
     (Advance | Retreat) (Disarm). display:none buttons are not
     grid items, so gating can never leave holes — and Hold can
     never fall below row 2. */
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.combat-action-btn {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 0.6rem 1.2rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #3A3238;
  cursor: pointer;
  gap: 0.8rem;
  transition: background 0.1s;
}

.combat-action-btn:hover:not(:disabled) {
  background: rgba(142, 127, 127, 0.1);
}

.combat-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.combat-action-num {
  width: 26px;
  height: 26px;
  background: #8E7F7F;
  color: #EBE6D8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.combat-action-num.attr-s { background: #5F5449; }
.combat-action-num.attr-e { background: #6b8e3d; }
.combat-action-num.attr-k { background: #4a5a5a; }
.combat-action-num.attr-s2 { background: #8B4513; }
.combat-action-num.attr-item { background: #3A3238; }

.combat-action-name {
  flex: 1;
  text-align: left;
  letter-spacing: 1px;
}

.combat-action-stat {
  font-size: 0.65rem;
  color: #8E7F7F;
  margin-right: 0.6rem;
}

.combat-action-tag {
  padding: 3px 8px;
  font-size: 0.7rem;
  letter-spacing: 1px;
  border: 1px solid;
  font-weight: bold;
}

.combat-tag-green {
  color: #4a7c59;
  border-color: #4a7c59;
}

.combat-tag-gold {
  color: #8B4513;
  border-color: #8B4513;
}

.combat-tag-red {
  color: #8B0000;
  border-color: #8B0000;
}

.combat-tag-gray {
  color: #8E7F7F;
  border-color: #8E7F7F;
}

.combat-action-divider {
  height: 1px;
  background: #D4C8BE;
  margin: 0.4rem 1.2rem;
}

/* === ITEMS SUBMENU === */
.combat-items-submenu {
  display: none;
  background: #D4C8BE;
  margin: 0 0.6rem;
  padding: 0.4rem;
}

.combat-items-submenu.open {
  display: block;
}

.combat-item-option {
  display: flex;
  align-items: center;
  width: 100%;
  background: #EBE6D8;
  border: 1px solid transparent;
  padding: 0.5rem 0.8rem;
  margin-bottom: 0.3rem;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: #3A3238;
  cursor: pointer;
  gap: 0.6rem;
  transition: all 0.1s;
}

.combat-item-option:last-child {
  margin-bottom: 0;
}

.combat-item-option:hover {
  border-color: #8E7F7F;
}

.combat-item-icon {
  font-size: 1.1rem;
}

.combat-item-name {
  flex: 1;
  text-align: left;
}

.combat-item-ammo {
  font-size: 0.7rem;
  color: #8E7F7F;
}

.combat-item-btn.active .combat-action-num {
  background: #8B4513;
}

/* === FOOTER === */
.combat-report-footer {
  padding: 0.6rem 1.8rem;
  border-top: 1px solid #D4C8BE;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: #8E7F7F;
}

/* === STAMP === */
.combat-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  padding: 1.2rem 3.5rem;
  border: 4px double;
  font-size: 2rem;
  letter-spacing: 5px;
  font-weight: bold;
  opacity: 0;
  pointer-events: none;
  background: rgba(235, 230, 216, 0.95);
  z-index: 10;
}

.combat-stamp.win {
  border-color: #4a7c59;
  color: #4a7c59;
}

.combat-stamp.lose {
  border-color: #8B0000;
  color: #8B0000;
}

.combat-stamp.show {
  opacity: 1;
  animation: combat-stampIn 0.3s ease-out;
}

@keyframes combat-stampIn {
  from {
    transform: translate(-50%, -50%) rotate(-12deg) scale(2);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) rotate(-12deg) scale(1);
    opacity: 1;
  }
}

/* === RESET BUTTON === */
.combat-reset-btn {
  display: block;
  width: calc(100% - 2.4rem);
  margin: 0.6rem 1.2rem;
  background: #8E7F7F;
  color: #EBE6D8;
  border: 2px solid #3A3238;
  padding: 0.7rem;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  letter-spacing: 2px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.combat-reset-btn.show {
  opacity: 1;
}

.combat-reset-btn:hover {
  background: #5F5449;
}

/* === CLOSE BUTTON === */
.combat-close-btn {
  position: absolute;
  top: 1rem;
  left: 1.2rem;
  background: #8E7F7F;
  color: #EBE6D8;
  border: 2px solid #3A3238;
  padding: 0.5rem 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
}

.combat-close-btn:hover {
  background: #5F5449;
}

/* === RESPONSIVE === */
@media (max-width: 1000px) {
  .combat-workspace {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .combat-side-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }
}

@media (max-width: 600px) {
  .combat-modal {
    padding: 0.5rem;
  }

  .combat-side-panel {
    grid-template-columns: 1fr;
  }

  .combat-evidence-img {
    width: 110px;
    height: 80px;
    font-size: 2rem;
  }
}

/* ──────────────────────────────────────────────────────────
   COMBAT REWORK — Phase 1 visuals
   New blocks: HP pips, STAMINA bar, two-sided THREAT bar,
   NEXT MOVE telegraph card, action groups + stamina column.
   Palette unchanged — uses the noir/document tokens already
   defined above.
   ────────────────────────────────────────────────────────── */

/* ── HP pips — replace the horizontal bar with discrete pips
      so the player can read 4/5 → 3/5 at a glance instead of
      decoding a sliver of fill. */
.combat-pips {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 1.05rem;
  letter-spacing: 1px;
}
.combat-pip {
  display: inline-block;
  width: 1.05rem;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
  font-weight: bold;
  color: #4a7c59;
  transition: color 0.25s ease, transform 0.25s ease;
}
.combat-pip.empty {
  color: rgba(94, 84, 73, 0.35);
}
.combat-pip.critical {
  color: #8B0000;
  animation: combat-pulse 0.65s infinite;
}
.combat-pip.enemy {
  color: #8B0000;
}
.combat-pip.enemy.empty {
  color: rgba(139, 0, 0, 0.25);
}

/* ── STAMINA bar — the rework's clock. Lives directly under
      HEALTH on the WITNESS card. Fill drops left to right,
      tints amber when fatigued (<=30%), red when exhausted. */
.combat-stamina-bar {
  flex: 1;
  height: 14px;
  background: transparent;
  border: 1px solid #8E7F7F;
  position: relative;
  overflow: hidden;
}
.combat-stamina-fill {
  height: 100%;
  width: 100%;
  background: repeating-linear-gradient(
    45deg,
    #c4a87a,
    #c4a87a 8px,
    #b69968 8px,
    #b69968 16px);
  transition: width 0.35s cubic-bezier(0.32, 0.72, 0.32, 1),
              background 0.35s ease;
}
.combat-stamina-fill.fatigued {
  background: repeating-linear-gradient(
    45deg,
    #b48a3c,
    #b48a3c 8px,
    #8B6F00 8px,
    #8B6F00 16px);
  animation: combat-pulse 1.4s infinite;
}
.combat-stamina-fill.exhausted {
  background: repeating-linear-gradient(
    45deg,
    #8B0000,
    #8B0000 8px,
    #5e1818 8px,
    #5e1818 16px);
  animation: combat-pulse 0.55s infinite;
}
.combat-stamina-val {
  font-size: 0.6rem;
  letter-spacing: 0.05rem;
  color: #5F5449;
  min-width: 56px;
  text-align: right;
  font-weight: bold;
}

/* ── THREAT bar — two-sided. The bar is bounded at left by
      BREAK ≤ 2 (green, win-by-surrender) and at right by
      OVERWHELM 10 (red, fail-by-pressure). The needle marks
      the current value; the fill shows which pole you're
      moving toward. */
.combat-threat-twosided {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.combat-threat-mark {
  font-family: 'Courier New', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.12rem;
  font-weight: bold;
  white-space: nowrap;
  padding: 0.15rem 0.4rem;
  border: 1px dashed;
}
.combat-threat-mark-break {
  color: #4a7c59;
  border-color: #4a7c59;
}
.combat-threat-mark-overwhelm {
  color: #8B0000;
  border-color: #8B0000;
}
.combat-threat-bar-two {
  flex: 1;
  height: 16px;
  position: relative;
  background: rgba(58, 50, 56, 0.05);
  border: 1px solid #8E7F7F;
  overflow: hidden;
}
.combat-threat-bar-track {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(74, 124, 89, 0.10) 0%,
    rgba(74, 124, 89, 0.02) 30%,
    rgba(139, 0, 0, 0.02)   70%,
    rgba(139, 0, 0, 0.12)   100%);
}
.combat-threat-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg,
    rgba(139, 0, 0, 0.55) 0%,
    rgba(139, 0, 0, 0.30) 100%);
  transition: left 0.35s ease, width 0.35s ease, background 0.35s ease;
}
.combat-threat-bar-fill.toward-break {
  background: linear-gradient(90deg,
    rgba(74, 124, 89, 0.55) 0%,
    rgba(74, 124, 89, 0.30) 100%);
}
.combat-threat-bar-marker {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  background: transparent;
}
.combat-threat-marker-break {
  left: 20%; /* threshold 2 of 10 = 20% */
  background: #4a7c59;
}
.combat-threat-marker-overwhelm {
  left: 100%;
  background: #8B0000;
}
.combat-threat-bar-needle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 3px;
  background: #3A3238;
  box-shadow: 0 0 4px rgba(58, 50, 56, 0.6);
  transition: left 0.35s cubic-bezier(0.32, 0.72, 0.32, 1);
}

/* ── NEXT MOVE — the telegraph block. Sits right under
      SUSPECT INFO on the right column. Red because hostile. */
.combat-next-move {
  border-left: 3px solid #8B0000;
}
.combat-next-move-body {
  padding: 0.45rem 0.6rem 0.55rem;
}
.combat-next-move-label {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 0.95rem;
  letter-spacing: 0.18rem;
  color: #8B0000;
  font-weight: bold;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  animation: cgNextMovePulse 1.4s ease-in-out infinite;
}
.combat-next-move-desc {
  font-size: 0.7rem;
  color: #5F5449;
  line-height: 1.4;
  font-style: italic;
}
@keyframes cgNextMovePulse {
  0%, 100% { opacity: 0.78; }
  50%      { opacity: 1; text-shadow: 0 0 8px rgba(139, 0, 0, 0.45); }
}

/* ── ACTION buttons — group labels, stamina cost column,
      spike/disabled states. */
.combat-action-group-label {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.2rem;
  color: rgba(95, 84, 73, 0.6);
  text-transform: uppercase;
  padding: 0.25rem 0.2rem 0.15rem;
  border-bottom: 1px dashed rgba(142, 127, 127, 0.45);
  margin: 0.35rem 0 0.25rem;
}
.combat-action-group-label:first-child {
  margin-top: 0;
}

.combat-action-stamina {
  display: inline-block;
  min-width: 44px;
  text-align: center;
  font-family: 'Courier New', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06rem;
  color: #c4a87a;
  font-weight: bold;
  border: 1px solid rgba(196, 168, 122, 0.55);
  padding: 0.05rem 0.3rem;
  margin-left: 0.3rem;
  background: rgba(196, 168, 122, 0.06);
}
.combat-action-stamina-gain {
  color: #4a7c59;
  border-color: rgba(74, 124, 89, 0.55);
  background: rgba(74, 124, 89, 0.08);
}

/* Hold's threat price — same chip language, red ledger ink.
   Escalated (streak > 0) goes hot: the curve toward OVERWHELM
   must be visible BEFORE the fourth Hold. */
.combat-action-threat {
  min-width: 48px;
  color: #8B0000;
  border-color: rgba(139, 0, 0, 0.5);
  background: rgba(139, 0, 0, 0.06);
}

.combat-action-threat.combat-threat-escalated {
  color: #EBE6D8;
  background: #8B0000;
  border-color: #8B0000;
  animation: combat-pulse 1.4s ease-in-out infinite;
}

/* Spike tag — Return Fire auto-hits. */
.combat-action-tag.combat-tag-spike {
  background: #4a7c59;
  color: #EBE6D8;
  border-color: #4a7c59;
  position: relative;
  font-weight: bold;
}
.combat-action-tag.combat-tag-spike::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 12px 2px rgba(74, 124, 89, 0.7);
  opacity: 0;
  animation: cgSpikePulse 0.85s ease-in-out infinite;
}
@keyframes cgSpikePulse {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}

/* Disabled action (no stamina / not allowed in current state) */
.combat-action-btn.combat-action-disabled {
  opacity: 0.45;
  filter: grayscale(0.7);
  pointer-events: none;
  cursor: not-allowed;
}

/* ── ARMOR collapsed / APPEARANCE compact ─────────────── */
.combat-armor-collapsed {
  padding-bottom: 0;
}
.combat-armor-collapsed .combat-card-header {
  border-bottom: none;
}
.combat-appearance-compact .combat-appearance-line {
  padding: 0.5rem 0.6rem;
  font-size: 0.72rem;
  color: #5F5449;
  line-height: 1.45;
}

/* ── Part 3 — Forced-recovery state for Hold when stamina
   is depleted. Gold border pulse so the player's eye finds
   the only legal move at exhaustion. */
.combat-action-btn.combat-action-forced-recovery {
  border-color: #c4a87a;
  box-shadow: 0 0 0 1px #c4a87a, 0 0 14px rgba(196, 168, 122, 0.45);
  animation: combat-pulse 1.1s ease-in-out infinite;
}
.combat-action-btn.combat-action-forced-recovery .combat-action-name {
  color: #c4a87a;
}
.combat-action-btn.combat-action-suggested {
  box-shadow: 0 0 0 1px rgba(196, 168, 122, 0.5);
}

/* ── Part 3 §C — Side-effect chance chip on attack buttons.
   Sits below the % tag, smaller, distinct color so the eye
   reads it as "extra outcome" not "main success chance". */
.combat-sfx-chip {
  display: inline-block;
  font-family: 'Courier New', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.1rem;
  font-weight: bold;
  color: #c4a87a;
  background: rgba(196, 168, 122, 0.1);
  border: 1px solid rgba(196, 168, 122, 0.5);
  padding: 0.05rem 0.3rem;
  margin-left: 0.3rem;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Part 3 §B/§C — Archetype strip + win-axis hint ── */

/* Archetype strip at top of NEXT MOVE card — only visible at
   KNW reveal tier 2 (operator-level read). Shows label + tell
   + a FRACTURED chip if the suspect has phase-shifted. */
.combat-archetype-strip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  background: rgba(58, 50, 56, 0.06);
  border-bottom: 1px dashed rgba(142, 127, 127, 0.45);
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}
.combat-archetype-label {
  color: #8B0000;
  font-weight: bold;
}
.combat-archetype-tell {
  color: rgba(95, 84, 73, 0.85);
  flex: 1;
  font-style: italic;
  letter-spacing: 0.08rem;
}
.combat-archetype-phase {
  background: #8B0000;
  color: #EBE6D8;
  padding: 0.1rem 0.4rem;
  border-radius: 0;
  animation: combat-pulse 1.1s infinite;
}

/* Nerve → win-axis hint below the telegraph description. */
.combat-next-move-axis {
  margin-top: 0.35rem;
  font-family: 'Courier New', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08rem;
  font-weight: bold;
}
.combat-next-move-axis.axis-break { color: #4a7c59; }
.combat-next-move-axis.axis-soft  { color: #b48a3c; }
.combat-next-move-axis.axis-hard  { color: #8B0000; }

/* ── Part 2 §B/§D — Action reason chip + reveal-tier looks ── */

/* Disabled-with-reason chip. Underneath the action button row,
   a small italic note explaining why it's grey ("No line of
   sight", "Out of reach", etc.). */
.combat-action-btn.combat-action-with-reason {
  position: relative;
}
.combat-action-btn.combat-action-with-reason::after {
  content: attr(data-action-reason);
  position: absolute;
  left: 2.4rem;
  right: 0.6rem;
  bottom: -0.85rem;
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 0.55rem;
  letter-spacing: 0.14rem;
  color: rgba(139, 0, 0, 0.75);
  font-style: italic;
  text-transform: uppercase;
  pointer-events: none;
}

/* Hidden B.A.N.G. attribute rows — when reveal tier 0/1 masks
   them. The row is still in layout but visibly redacted. */
.combat-attr-row.combat-attr-hidden .combat-attr-name,
.combat-attr-row.combat-attr-hidden .combat-attr-val {
  color: rgba(95, 84, 73, 0.55);
  font-style: italic;
}
.combat-attr-row.combat-attr-hidden .combat-attr-bar {
  background: repeating-linear-gradient(
    45deg,
    rgba(58, 50, 56, 0.08),
    rgba(58, 50, 56, 0.08) 4px,
    rgba(58, 50, 56, 0.16) 4px,
    rgba(58, 50, 56, 0.16) 8px);
  border-color: rgba(142, 127, 127, 0.5);
}

/* Fuzzy enemy HP — at reveal tier 0, the pip row is blurred
   into a single band so the player can only read "alive /
   wounded / nearly out". (Superseded by the §J-1 bar; kept for
   any legacy pip usage.) */
.combat-pips.combat-pips-fuzzy .combat-pip {
  filter: blur(2.5px);
  letter-spacing: -1px;
}
.combat-pips.combat-pips-fuzzy .combat-pip.empty {
  opacity: 0.4;
}
.combat-pips.combat-pips-shaped .combat-pip {
  filter: blur(0.8px);
}

/* ── §J-1 HP bars — wind-bar language, fixed width so the
      suspect's pool size can never be counted off the widget.
      Tier fidelity: 0 soft band / 1 crisp / 2 ticks + number. */
.combat-hp-bar {
  position: relative;
  width: 120px;
  height: 14px;
  border: 1px solid #8E7F7F;
  background: rgba(58, 50, 56, 0.06);
  overflow: hidden;
  flex: none;
}
.combat-hp-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #4a7c59, rgba(74, 124, 89, 0.75));
  transition: width 0.35s ease;
}
.combat-hp-bar.enemy .combat-hp-bar-fill {
  background: linear-gradient(90deg, #8B0000, rgba(139, 0, 0, 0.72));
}
.combat-hp-bar-fill.critical {
  animation: combat-pulse 0.65s infinite;
}
.combat-hp-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(235, 230, 216, 0.9);
}
.combat-hp-num {
  font-size: 0.62rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: #5F5449;
  margin-left: 0.4rem;
  white-space: nowrap;
}
/* tier 0 — rough fullness only: dashed frame, blurred fill */
.combat-hp-bar.hp-tier-0 {
  border-style: dashed;
}
.combat-hp-bar.hp-tier-0 .combat-hp-bar-fill {
  filter: blur(3px);
  opacity: 0.75;
}

/* ── §J-2 — BREAK marker carries nerve. Presentation only:
      the marker's POSITION (breakAt) never moves; its WEIGHT
      tracks enemyNerve/nerveChipped via the §I-4 states. */
.combat-threat-twosided .combat-threat-marker-break,
.combat-threat-twosided .combat-threat-mark-break {
  transition: opacity 0.4s ease, background 0.4s ease,
              width 0.4s ease, border-color 0.4s ease;
}
.combat-threat-twosided.nerve-held .combat-threat-marker-break {
  width: 6px;
  background: #2f4f3a;
  box-shadow: 0 0 3px rgba(47, 79, 58, 0.8);
}
.combat-threat-twosided.nerve-held .combat-threat-mark-break {
  border-width: 2px;
  border-style: solid;
  font-weight: bold;
}
.combat-threat-twosided.nerve-waver .combat-threat-marker-break {
  width: 3px;
  background: #4a7c59;
}
.combat-threat-twosided.nerve-soft .combat-threat-marker-break {
  width: 1px;
  background: rgba(74, 124, 89, 0.55);
}
.combat-threat-twosided.nerve-soft .combat-threat-mark-break {
  opacity: 0.65;
}
/* landed chip — one-shot lighten pulse on the marker */
.combat-threat-marker-break.chip-anim {
  animation: combatNerveChip 0.9s ease-out;
}
@keyframes combatNerveChip {
  0%   { box-shadow: 0 0 0 0 rgba(74, 124, 89, 0.9); }
  40%  { box-shadow: 0 0 10px 4px rgba(74, 124, 89, 0.6); }
  100% { box-shadow: 0 0 0 0 rgba(74, 124, 89, 0); }
}

/* NEXT MOVE block — fuzz at low KNW. */
.combat-next-move.combat-next-move-tier-0 .combat-next-move-label {
  filter: blur(2.5px);
  letter-spacing: 0.5rem;
}
.combat-next-move.combat-next-move-tier-0 .combat-next-move-desc {
  font-style: italic;
  color: rgba(95, 84, 73, 0.75);
}
.combat-next-move.combat-next-move-tier-1 .combat-next-move-label {
  filter: blur(0.8px);
}

/* ── Training mode escape hatch ────────────────────────
   The guided combat training (in dialogue-system.js) mounts
   the same modal with class `combat-guided-mode`. Hide all
   the new rework chrome inside training so the lesson stays
   focused on the TACTICAL ANALYSIS / ADVANCE / RETREAT
   beats the training teaches. */
.combat-modal.combat-guided-mode .combat-stamina-bar,
.combat-modal.combat-guided-mode .combat-stamina-val,
.combat-modal.combat-guided-mode .combat-next-move,
.combat-modal.combat-guided-mode .combat-action-stamina,
.combat-modal.combat-guided-mode .combat-action-group-label,
.combat-modal.combat-guided-mode .combat-threat-mark,
.combat-modal.combat-guided-mode .combat-threat-bar-marker,
.combat-modal.combat-guided-mode .combat-threat-bar-needle,
.combat-modal.combat-guided-mode .combat-threat-bar-track,
.combat-modal.combat-guided-mode .combat-threat-bar-fill {
  display: none !important;
}

/* ── §E-1 layout package: compact mode + scroll affordance ── */

/* Short viewports (1366×768-class laptops under the global
   1.25 zoom → ~614px budget): compact the action buttons. */
/* NOTE: html{zoom:1.25} scales layout but NOT media queries —
   these thresholds are WINDOW px. 1080-class window → 864px of
   layout budget; 768-class → 614px. */
@media (max-height: 1100px) {
  .combat-action-btn {
    padding: 0.42rem 1rem;
    font-size: 0.82rem;
  }
  .combat-log-area { min-height: 120px; max-height: 240px; }
  .combat-map-grid { height: 140px; }
  .combat-report-header { padding: 0.9rem 1.8rem; }
  .combat-card { padding: 0.9rem; }
  .combat-card-header { margin: -0.9rem -0.9rem 0.8rem -0.9rem; }
  .combat-stat-row { margin-bottom: 0.55rem; }
}
@media (max-height: 800px) {
  .combat-action-btn {
    padding: 0.32rem 0.9rem;
    font-size: 0.78rem;
    gap: 0.6rem;
  }
  .combat-log-area { min-height: 80px; max-height: 120px; padding: 0.6rem 1.5rem; }
  .combat-map-grid { height: 90px; }
  .combat-map-legend { display: none; }
  .combat-id-photo { width: 44px; height: 56px; }
  /* §J-1 — narrow side panels: shrink the fixed bar so the
     "hp/max" number never clips the card edge. Width is still
     identical for every enemy — no scale leak. */
  .combat-hp-bar { width: 84px; }
  .combat-hp-num { font-size: 0.56rem; margin-left: 0.3rem; }
  /* Report header collapses to the title line — case meta is
     flavor, actions are function. */
  .combat-report-header { padding: 0.6rem 1.8rem; }
  .combat-report-title { font-size: 1.1rem; }
  .combat-report-sub, .combat-report-meta { display: none; }
  /* Narrower side columns buy back the horizontal clip at
     1366-wide windows. */
  .combat-workspace {
    grid-template-columns: 205px 1fr 205px;
    gap: 1rem;
  }
  .combat-modal { padding: 1rem; }
}

/* Live scroll affordance — visible ONLY while scrollable content
   remains below (combat-ui toggles .visible on scroll). A
   permanent gradient would be a lie. */
.combat-scroll-fade {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  z-index: 10000;              /* above the modal (9999) */
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(58, 50, 56, 0) 0%,
    rgba(58, 50, 56, 0.85) 78%,
    #3A3238 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  font-size: 12px;
  letter-spacing: 3px;
  color: #c4a87a;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.combat-scroll-fade.visible { opacity: 1; }
.combat-scroll-fade::after {
  content: '▼  MORE  ▼';
  animation: combatFadeNudge 1.6s ease-in-out infinite;
}
@keyframes combatFadeNudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

/* §E-1 — group labels span the full grid width so they never
   eat a cell and shift the semantic pairs. */
.combat-action-group-label {
  grid-column: 1 / -1;
}




/* ══ TACTICAL ANALYSIS — THE PENCIL ═══════════════════════
   Lifted out of the training-only styles: the read writes a
   line in the file whether Kitty is watching or not. Most
   valuable in a REAL fight, where the stats it reveals were
   sitting there as '?' a second ago. */
/* ── THE PENCIL, VISIBLE ────────────────────────────────
   The read's sound is a pencil in Doyle's form; this is
   the stroke it leaves. Graphite, not gold — the gold
   belongs to the scan on her marker, this is OUR paper. */
.cg-pencil-rule {
  position: absolute;
  left: 8px;
  bottom: 6px;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg,
    rgba(70, 62, 55, 0.0) 0%,
    rgba(70, 62, 55, 0.75) 12%,
    rgba(70, 62, 55, 0.55) 88%,
    rgba(70, 62, 55, 0.0) 100%);
  pointer-events: none;
  z-index: 12;
  animation: cgPencilDraw 0.62s cubic-bezier(0.33, 0.05, 0.2, 1) forwards;
}
.cg-pencil-rule.cg-pencil-stalled {
  animation: cgPencilStall 0.7s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}
@keyframes cgPencilDraw {
  0%   { width: 0;opacity: 0.9; }
  88%  { width: calc(100% - 16px);  opacity: 0.9; }
  100% { width: calc(100% - 16px);  opacity: 0.55; }
}
/* Denied: the hand starts, hesitates, lifts. */
@keyframes cgPencilStall {
  0%   { width: 0;   opacity: 0.9; }
  45%  { width: 32%; opacity: 0.9; }
  60%  { width: 34%; opacity: 0.85; }
  100% { width: 34%; opacity: 0; }
}
/* The nib rides the head of the stroke. */
.cg-pencil-nib {
  position: absolute;
  left: 8px;
  bottom: 4px;
  width: 3px;
  height: 5px;
  background: rgba(52, 46, 40, 0.9);
  transform-origin: 50% 100%;
  transform: rotate(18deg);
  pointer-events: none;
  z-index: 13;
  animation: cgNibRun 0.62s cubic-bezier(0.33, 0.05, 0.2, 1) forwards;
}
.cg-pencil-nib.cg-pencil-stalled {
  animation: cgNibStall 0.7s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}
@keyframes cgNibRun {
  0%   { transform: translateX(0) rotate(18deg);     opacity: 0.95; }
  88%  { transform: translateX(calc(100% - 16px)) rotate(18deg); opacity: 0.95; }
  100% { transform: translateX(calc(100% - 16px)) rotate(28deg); opacity: 0; }
}
@keyframes cgNibStall {
  0%   { transform: translateX(0) rotate(18deg);   opacity: 0.95; }
  45%  { transform: translateX(32%) rotate(18deg); opacity: 0.95; }
  70%  { transform: translateX(34%) rotate(34deg); opacity: 0.6; }
  100% { transform: translateX(34%) rotate(34deg); opacity: 0; }
}
/* Rows the read just bought — ink settling into paper. */
.cg-inking {
  animation: cgInkIn 0.9s ease-out;
}
@keyframes cgInkIn {
  0%   { background: rgba(196, 168, 122, 0.00); }
  18%  { background: rgba(196, 168, 122, 0.20); }
  100% { background: rgba(196, 168, 122, 0.00); }
}
@media (prefers-reduced-motion: reduce) {
  .cg-pencil-rule,
  .cg-pencil-nib,
  .cg-inking { animation-duration: 0.01ms; }
}


/* ══ IMPACT — the hit, weighted by what it was ════════════════
   The engine grades every landed hit weak/solid/perfect; these
   rules just obey it. Unscoped on purpose — a real alley and
   Kitty's lot speak the same language, so her sessions teach the
   feedback the player will actually fight with.
   The ink STAMP is not here by default: it's reserved for named
   events and passed explicitly. */

/* weak — a twitch. "Contact, not craft." */
.combat-impact-weak .combat-map-entity-marker {
  animation: combatImpactNudge 0.34s ease-out;
}
@keyframes combatImpactNudge {
  0%   { transform: translateX(0); }
  35%  { transform: translateX(2px); }
  70%  { transform: translateX(-1px); }
  100% { transform: translateX(0); }
}

/* solid — it registers: flash + shake. */
.combat-impact-solid .combat-map-entity-marker {
  animation: combatImpactShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97),
             combatImpactFlash 0.42s ease-out;
}
/* perfect — it lands: harder, longer, brighter. */
.combat-impact-perfect .combat-map-entity-marker {
  animation: combatImpactShakeHard 0.56s cubic-bezier(0.36, 0.07, 0.19, 0.97),
             combatImpactFlash 0.56s ease-out;
}
@keyframes combatImpactShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  45% { transform: translateX(3px); }
  70% { transform: translateX(-2px); }
}
@keyframes combatImpactShakeHard {
  0%, 100% { transform: translateX(0) scale(1); }
  15% { transform: translateX(-5px) scale(1.06); }
  35% { transform: translateX(5px)  scale(1.04); }
  55% { transform: translateX(-4px) scale(1.02); }
  78% { transform: translateX(2px)  scale(1); }
}
@keyframes combatImpactFlash {
  0%   { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.0); }
  18%  { box-shadow: 0 0 10px 3px rgba(139, 0, 0, 0.75); }
  100% { box-shadow: 0 0 0 0 rgba(139, 0, 0, 0.0); }
}
/* the wound tier — the tear reads colder than a clean hit */
.combat-impact-crit .combat-map-entity-marker {
  filter: brightness(1.25) saturate(1.3);
}

/* the ring the impact throws off (solid+) */
.combat-impact-ring {
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 1.5px solid rgba(139, 0, 0, 0.8);
  border-radius: 50%;
  pointer-events: none;
  z-index: 24;
  animation: combatImpactRing 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.combat-impact-ring-hard {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-width: 2px;
}
@keyframes combatImpactRing {
  0%   { transform: scale(0.4); opacity: 0; }
  20%  { opacity: 0.95; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* perfect also moves the page it's printed on */
.combat-impact-jolt {
  animation: combatImpactJolt 0.44s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes combatImpactJolt {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  60% { transform: translate(2px, -1px); }
}

/* NAMED EVENTS ONLY — combo, disarm, stagger, called shot,
   cover break, window. Never a routine punch. */
.combat-impact-stamp {
  position: absolute;
  top: 26%;
  transform: translateX(-50%) rotate(-8deg);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.72rem;
  font-weight: bold;
  letter-spacing: 0.14em;
  color: #8B0000;
  border: 2px solid #8B0000;
  padding: 2px 7px;
  background: rgba(235, 230, 216, 0.86);
  pointer-events: none;
  z-index: 26;
  animation: combatImpactStamp 1.25s ease-out forwards;
}
@keyframes combatImpactStamp {
  0%   { opacity: 0; transform: translateX(-50%) rotate(-8deg) scale(1.5); }
  14%  { opacity: 1; transform: translateX(-50%) rotate(-8deg) scale(1); }
  72%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) rotate(-8deg) translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .combat-impact-weak .combat-map-entity-marker,
  .combat-impact-solid .combat-map-entity-marker,
  .combat-impact-perfect .combat-map-entity-marker,
  .combat-impact-ring,
  .combat-impact-jolt,
  .combat-impact-stamp { animation-duration: 0.01ms; }
}

/* §J — the number the roll had to beat, carried in the box with
   it. Muted and small: the roll is the event, the target is the
   scale it's read against. Without it "01" is just a digit. */
.combat-roll-target {
  font-size: 0.9rem;
  font-weight: normal;
  opacity: 0.55;
  letter-spacing: 0.04em;
  margin-left: 0.12em;
  vertical-align: 0.55em;
}
.combat-roll-num.success .combat-roll-target,
.combat-roll-num.failure .combat-roll-target {
  opacity: 0.5;   /* never competes with the verdict colour */
}

/* ══ AFTER-ACTION REPORT ══════════════════════════════════════
   The fight doesn't stop, it gets FILED. A sheet is typed up,
   the verdict is stamped on it, and the folder closes over the
   whole thing on click. Same dossier fiction as the log, the
   pencil and the TC-7A frame. */

#combatAAR {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 18, 0.72);
  cursor: pointer;
  animation: aarFade 0.45s ease-out;
  perspective: 1400px;
}
@keyframes aarFade { from { opacity: 0; } to { opacity: 1; } }

.aar-folder {
  position: relative;
  width: min(560px, 92vw);
  max-height: 88vh;
  transform-style: preserve-3d;
  padding: 16px 14px 26px;      /* the folder is BIGGER than the page */
}

/* The folder itself — manila board behind the paper. Without
   this the report just appeared; there was nothing for it to be
   filed INTO. */
.aar-back {
  position: absolute;
  inset: 0;
  background: linear-gradient(168deg, #c9a86d 0%, #bb975f 60%, #a8874f 100%);
  border: 1px solid #7d6538;
  border-radius: 2px 8px 2px 2px;
  box-shadow: 0 22px 60px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.18);
  animation: aarFolderIn 0.34s ease-out both;
}
@keyframes aarFolderIn {
  from { transform: translateY(14px) scale(0.985); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* The tab, so it reads as a case folder at a glance. */
.aar-tab {
  position: absolute;
  top: -21px; left: 26px;
  background: linear-gradient(168deg, #c9a86d, #b3925a);
  border: 1px solid #7d6538;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 4px 16px 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: #4a3a1c;
  animation: aarFolderIn 0.34s ease-out both;
}

/* The front lip. The page tucks BEHIND it, which is the whole
   trick — that overlap is what makes it read as inserted rather
   than laid on top. */
.aar-lip {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34px;
  background: linear-gradient(0deg, #bb975f 0%, #c5a267 70%, #cdaa71 100%);
  border: 1px solid #7d6538;
  border-radius: 0 0 2px 2px;
  box-shadow: 0 -6px 14px rgba(0,0,0,.28);
  z-index: 3;
  animation: aarFolderIn 0.34s ease-out both;
}

/* The page slides up into the folder and settles — filed, not
   presented. */
.aar-sheet {
  position: relative;
  z-index: 2;                    /* under the lip, over the board */
  background: #EBE6D8;
  color: #4a4038;
  border: 1px solid #8E7F7F;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  padding: 26px 30px 22px;
  font-family: 'Courier New', Courier, monospace;
  max-height: 88vh;
  overflow-y: auto;
  animation: aarFile 0.78s cubic-bezier(0.2, 0.72, 0.3, 1) 0.22s both;
}
/* Dropped IN: the page comes from above the folder, slides down
   past the lip, overshoots a little and settles — a sheet being
   pushed into a file, not a card fading up. */
@keyframes aarFile {
  0%   { transform: translateY(-120px) rotate(-2.6deg) scale(1.03); opacity: 0; }
  22%  { opacity: 1; }
  74%  { transform: translateY(10px) rotate(0.5deg) scale(1); }
  88%  { transform: translateY(-3px) rotate(-0.2deg); }
  100% { transform: translateY(0) rotate(0deg); opacity: 1; }
}

.aar-head { border-bottom: 3px double #C9BFA8; padding-bottom: 12px; }
.aar-title {
  font-size: 1.05rem; font-weight: bold;
  letter-spacing: 0.16em; color: #8B0000;
}
.aar-sub {
  font-size: 0.62rem; letter-spacing: 0.2em;
  color: #5F5449; margin-top: 3px;
}
.aar-meta {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 0.6rem; letter-spacing: 0.08em;
  color: #5F5449; opacity: 0.85; margin-top: 9px;
}

/* The verdict, thumped on at an angle a beat after the page
   lands. */
.aar-stamp {
  position: absolute;
  /* Top-right, beside the title — the one genuinely empty
     corner of the form. Tried the header meta (covered the
     timestamp) and the sign-off (covered the assessment); a
     stamp has to land on paper, not on data. */
  top: 16px; right: 22px;
  font-size: 1.35rem; font-weight: bold; letter-spacing: 0.14em;
  padding: 5px 15px;
  border: 3px solid currentColor;
  transform: rotate(-11deg) scale(2.4);
  opacity: 0;
  pointer-events: none;
}
.aar-stamp.aar-win  { color: #4a7c59; }
.aar-stamp.aar-lose { color: #8B0000; }
.aar-stamp.aar-stamped {
  animation: aarStamp 0.34s cubic-bezier(0.3, 1.6, 0.5, 1) forwards;
}
@keyframes aarStamp {
  0%   { transform: rotate(-11deg) scale(2.4); opacity: 0; }
  60%  { transform: rotate(-11deg) scale(0.94); opacity: 0.95; }
  100% { transform: rotate(-11deg) scale(1);    opacity: 0.82; }
}

.aar-body { margin: 16px 0 4px; }
.aar-row {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 0.74rem; line-height: 1.5;
  padding: 4px 0; border-bottom: 1px dotted #C9BFA8;
}
.aar-row span { color: #5F5449; letter-spacing: 0.06em; }
.aar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.aar-row b.aar-bad  { color: #8B0000; }
.aar-row b.aar-mark { color: #8a6f42; }

.aar-assess {
  margin-top: 14px; padding: 10px 12px;
  background: rgba(196,168,122,0.14);
  border-left: 3px solid #8a6f42;
  font-size: 0.74rem; font-style: italic; line-height: 1.55;
}
.aar-sign {
  margin-top: 12px; font-size: 0.58rem;
  letter-spacing: 0.1em; color: #5F5449; opacity: 0.75;
  text-align: right;
}

/* The manila flap. Flat against the page until the player is
   done reading, then it comes over the top. */
.aar-flap {
  position: absolute;
  inset: 0;
  z-index: 4;                    /* over the lip and the page */
  background: linear-gradient(170deg, #c9a86d 0%, #b3925a 55%, #9c7f4c 100%);
  border: 1px solid #7d6538;
  transform-origin: top center;
  transform: rotateX(-92deg);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 -8px 26px rgba(0,0,0,.4) inset;
}
#combatAAR.aar-closing .aar-flap {
  animation: aarFlapShut 0.62s cubic-bezier(0.5, 0, 0.35, 1) forwards;
}
@keyframes aarFlapShut {
  0%   { transform: rotateX(-92deg); opacity: 1; }
  100% { transform: rotateX(0deg);   opacity: 1; }
}
#combatAAR.aar-closing .aar-sheet {
  animation: aarSink 0.72s ease-in forwards;
}
@keyframes aarSink {
  0%   { transform: scale(1)    translateY(0);   opacity: 1; }
  100% { transform: scale(0.94) translateY(18px); opacity: 0.6; }
}
#combatAAR.aar-closing { animation: aarFadeOut 0.74s ease-in forwards; }
@keyframes aarFadeOut { to { opacity: 0; } }

.aar-hint {
  position: absolute; bottom: 26px; left: 0; right: 0;
  text-align: center; font-family: 'Courier New', Courier, monospace;
  font-size: 0.62rem; letter-spacing: 0.22em;
  color: #EBE6D8; opacity: 0.4;
  animation: aarHint 2.4s ease-in-out infinite;
}
@keyframes aarHint { 0%,100% { opacity: 0.25; } 50% { opacity: 0.55; } }

@media (prefers-reduced-motion: reduce) {
  #combatAAR, .aar-sheet, .aar-stamp.aar-stamped,
  #combatAAR.aar-closing .aar-flap,
  #combatAAR.aar-closing .aar-sheet { animation-duration: 0.01ms; }
}

/* A man who is down stops being live ink on the map — the
   marker pales out and the label says what he became. */
.combat-map-entity.combat-map-entity-down {
  opacity: 0.38;
  filter: grayscale(0.85);
  transition: opacity 0.9s ease-out, filter 0.9s ease-out;
}
.combat-map-entity.combat-map-entity-down .combat-map-entity-marker {
  border-style: dashed;
  box-shadow: none;
}
.combat-map-entity.combat-map-entity-down .combat-map-entity-label {
  letter-spacing: 0.12em;
  text-decoration: line-through;
}


/* ── The faces on the ID cards — his file photo, her portrait once
   READ (combat-ui-system startCombat / updateCombatUI). Sits over
   the silhouette, same grade as the dossier cards. ── */
.combat-id-photo .combat-id-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Pinned to the TOP of the frame: a cut chin is a portrait, a cut
     forehead is a mistake (designer). */
  object-position: 50% 0%;
  filter: grayscale(0.35) sepia(0.28) contrast(1.05) brightness(0.98);
  z-index: 1;
}


/* ── ONE MUGSHOT SLOT, EVERY CARD, EVERY FIGHT. The photo used to
   go full-width across the top of the card while a nobody kept
   the 60×75 slot, so the two ID cards in one fight — and the same
   card from one session to the next — stood at different heights
   (the author, 2026-10-03: "портрети непевної висоти"). Now the
   slot is the frame: 72×96, photo or silhouette, his card and
   theirs, training and the hallway. The face lands IN the slot
   when it is READ; nothing moves. ── */
.combat-id-photo {
  width: 72px;
  height: 96px;
  flex: 0 0 72px;
}
.combat-silhouette-head { width: 28px; height: 28px; margin-bottom: -7px; }
.combat-silhouette-body { width: 44px; height: 34px; }
.combat-id-section.has-photo {
  flex-direction: row;
  gap: 0.8rem;
}
.combat-id-section.has-photo .combat-id-photo {
  width: 72px;
  height: 96px;
  border: 1px solid #8E7F7F;
  box-shadow: inset 0 0 0 2px #EBE6D8, inset 0 0 0 3px #8E7F7F;
}
.combat-id-section.has-photo .combat-id-photo .combat-id-img {
  object-position: 50% 0%;    /* top of the head at the top of the frame; the crop takes the chin */
}
.combat-id-section.has-photo .combat-id-info { line-height: 1.6; }

/* ── LOADOUT art — the inventory's own drawings instead of an
   emoji where the game has one. ── */
.combat-inv-icon.combat-inv-art {
  width: 44px;
  height: 30px;
  flex: 0 0 44px;
}
.combat-inv-icon.combat-inv-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: sepia(0.25) contrast(1.05);
  mix-blend-mode: multiply;
}
/* The suspect's icon sits inside a wrapper span (#combatEnemyWeaponIcon),
   so it was never a flex item and its 44×30 never applied — the art
   filled the whole row (a 146px pistol, then 146px hands; the author,
   2026-10-03: "лоадаут рук великий"). Boxes on both. */
#combatEnemyWeaponIcon { display: inline-flex; flex: 0 0 auto; }
#combatEnemyWeaponIcon .combat-inv-icon { display: inline-flex; align-items: center; justify-content: center; }
