/* A legible low-health warning; purely visual, never a gameplay modifier. */
#life-warning {
  width: max-content;
  max-width: 100%;
  margin: 9px auto 0;
  padding: 5px 12px;
  border: 1px solid #f49c80a8;
  border-radius: 2px;
  background: #441d1bc4;
  color: #fff1dc;
  font-size: clamp(10px, .85vw, 13px);
  font-weight: 700;
  letter-spacing: .07em;
  text-shadow: 0 1px 2px #1d0708;
}
#game-shell.critical-health #vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 105px 22px #b3262666;
  animation: low-health-pulse 1.45s ease-in-out infinite alternate;
}
#game-shell.critical-health #heart-icons,
#game-shell.critical-health #hp-number { color: #ffaf97; }
@keyframes low-health-pulse {
  from { opacity: .48; }
  to { opacity: .92; }
}
@media (prefers-reduced-motion: reduce) {
  #game-shell.critical-health #vignette::after { animation: none; opacity: .72; }
}
#game-shell.reduce-motion.critical-health #vignette::after { animation: none; opacity: .72; }
#boss-phase {
  margin-top: 7px;
  color: #c9cdc2;
  font-size: 11px;
  letter-spacing: .08em;
  text-shadow: 0 2px 5px #000;
}
#boss-warning {
  width: fit-content;
  max-width: 100%;
  margin: 9px auto 0;
  padding: 7px 16px;
  border: 1px solid #f0a17b;
  background: #5d211fe6;
  color: #fff4df;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 0 18px #cb5b4765;
  animation: boss-warning-pulse .55s ease-in-out infinite alternate;
}
.boss-charging .boss-bar { border-color: #ffba92; box-shadow: 0 0 16px #b34d4380; }
@keyframes boss-warning-pulse { from { opacity: .78; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #boss-warning { animation: none; } }
#game-shell.reduce-motion #boss-warning { animation: none; }
.death-cause {
  margin: 12px 0;
  padding: 10px 14px;
  border: 1px solid #c86c5c94;
  border-left: 3px solid #e99f76;
  color: #fff0e1;
  background: #3a2329c9;
  font-size: 13px;
  line-height: 1.6;
}
.death-advice {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid #7ba99e6b;
  background: #203635ba;
  color: #c6e8e0;
  font-size: 12px;
  line-height: 1.8;
}
.run-report { margin-top: 14px; border-top: 1px solid #b5b8aa38; padding-top: 14px; }
.run-report summary {
  display: block;
  cursor: pointer;
  padding: 12px 14px;
  color: #f2ecde;
  border: 1px solid #9ea9985c;
  background: #283d3ed1;
  font-size: 13px;
  font-weight: 700;
}
.run-report summary:hover,
.run-report summary:focus-visible { outline: 2px solid #94d3cf; outline-offset: 1px; }
.run-report summary::before { content: "◇ "; color: #a4e6df; }
.run-report[open] summary { border-bottom: 0; }
.report-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #9ea9985c;
  border-bottom: 0;
  background: #1d3032;
  color: #b4c6bd;
  font-size: 11px;
}
.report-actions .text-button { min-height: 36px; color: #cbf2e8; }
.run-report textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 190px;
  max-height: 36vh;
  resize: vertical;
  padding: 12px;
  border: 1px solid #9ea9985c;
  background: #111d23ef;
  color: #e1f6ec;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre;
}
@media (max-width: 760px) {
  #life-warning { padding: 4px 6px; font-size: 10px; letter-spacing: 0; }
  #boss-phase { font-size: 10px; }
  #boss-warning { padding: 6px 9px; font-size: 11px; }
  .run-report textarea { max-height: 28vh; font-size: 11px; }
  .report-actions .text-button { width: 100%; }
}
