/**
 * Combat v2 UI — production styles (ported from dev/combat-ui-mockup.css).
 * Scoped to body.combat-mode and combat chrome; no dev toolbar.
 */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ── Combat mode: dim exploration chrome ── */
body.combat-mode .stage-move {
  pointer-events: none;
  opacity: 0.35;
  transition: opacity 0.2s ease;
}

body.combat-mode .stage-quick {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  transition: opacity 0.2s ease, max-height 0.25s ease;
}

body.combat-mode .view-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.45);
  z-index: 2;
}

/* Stage owns command + conversation; keep room blurb readable in fights
   (do not clamp to a single line — that glued/squished the footer). */
body.combat-mode .play-main {
  grid-template-rows: auto minmax(0, 1fr);
}

body.combat-mode .stage-wrap {
  flex: 0 0 auto;
}

body.combat-mode .if-spine {
  min-height: 4.5rem;
  overflow: auto;
}

body.combat-mode .room-text-wrap {
  max-height: none;
  overflow: visible;
  opacity: 0.92;
}

body.combat-mode .room-text {
  max-height: 7.5rem;
  overflow: auto;
  opacity: 1;
}

body.combat-mode .room-text-wrap.expanded .room-text {
  max-height: min(40vh, 16rem);
}

body.combat-mode .stage-command {
  padding-bottom: 0.4rem;
}

/* Keep the fixed play dock usable — never let combat chrome steal its hit target. */
body.combat-mode .play-dock {
  z-index: 40;
  min-height: var(--dock-h);
}

body.combat-mode .play-dock button {
  min-height: 2.4rem;
  padding: 0.55rem 0.3rem;
}

/* ── Topbar ENGAGED badge ── */
.topbar-engaged {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e85d4c;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(232, 93, 76, 0.45);
  border-radius: 999px;
  background: rgba(232, 93, 76, 0.1);
  white-space: nowrap;
}

.topbar-engaged.hidden {
  display: none !important;
}

/* ── Combat chrome collapse / expand (LE-CBT-094) ──
 * Flex items default to min-height:auto (content min). That ignored max-height:0
 * and left an empty battle console eating the log. Collapse must use display:none
 * (or min-height:0 + hidden) when closed.
 * Docked mode (.combat-dock / .stage-frame > .combat-chrome): pins bottom-left on stage. */
.combat-chrome {
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  flex: 0 0 auto;
  width: 100%;
  transition: max-height 0.3s ease, opacity 0.25s ease;
}

.combat-chrome.is-open {
  max-height: 22rem;
  opacity: 1;
}

.combat-chrome:not(.is-open),
.combat-chrome[hidden] {
  display: none !important;
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

/* Stage-docked combat panel: HP above cascade, pinned bottom-left, expands right */
.combat-dock {
  position: absolute;
  left: 0.55rem;
  bottom: 0.55rem;
  z-index: 14;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: max-content;
  max-width: min(calc(100% - 1.1rem), 42rem);
  pointer-events: none;
}

.combat-dock.is-open,
.combat-dock:not([hidden]) {
  display: flex;
}

.combat-dock[hidden] {
  display: none !important;
}

.combat-dock .battle-player-hud,
.combat-dock #combat-player-hud {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 1;
  width: 100%;
  max-width: none;
  min-width: 11rem;
  pointer-events: none;
  box-sizing: border-box;
}

.combat-dock .combat-chrome,
.combat-dock .combat-chrome.is-open {
  position: relative;
  display: block !important;
  width: auto;
  max-width: 100%;
  max-height: min(42vh, 16rem);
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  opacity: 1;
  flex: 0 0 auto;
  pointer-events: auto;
  background: transparent;
  border: none;
}

.combat-dock .battle-console {
  max-width: 100%;
}

.combat-dock .combat-chrome[hidden],
.combat-dock .combat-chrome:not(.is-open) {
  display: none !important;
}

.combat-dock .combat-order {
  display: none; /* initiative uses stage-top strip when docked */
}

.combat-order.combat-order--stage {
  position: absolute;
  top: 0.45rem;
  left: 0.5rem;
  right: auto;
  transform: none;
  z-index: 16;
  width: max-content;
  max-width: min(38%, 15.5rem);
  border: 1px solid #3d2a22;
  border-radius: 999px;
  background: rgba(10, 8, 6, 0.9);
  backdrop-filter: blur(4px);
  padding: 0.28rem 0.55rem;
  pointer-events: auto;
}

.combat-order.combat-order--stage[hidden] {
  display: none !important;
}

.combat-dock .battle-console {
  min-height: 0;
  max-height: min(38vh, 13.5rem);
  width: max-content;
  max-width: min(calc(100vw - 2rem), 42rem);
  border: 2px solid #3d2a22;
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(6px);
  background: linear-gradient(180deg, rgba(26, 20, 16, 0.96) 0%, rgba(12, 8, 6, 0.94) 100%);
}

/* Subnav columns expand outward as they unhide */
.combat-dock .cascade-col:not([hidden]) {
  animation: combat-cascade-in 0.16s ease-out;
}

@keyframes combat-cascade-in {
  from {
    opacity: 0;
    transform: translateX(-0.4rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.combat-dock .cascade-preview {
  max-width: 11rem;
}

body.combat-mode .stage-frame > .command-bar.stage-command {
  bottom: auto;
  top: 0.45rem;
  left: auto;
  right: 0.45rem;
  max-width: 15rem;
  z-index: 12;
  opacity: 0.92;
}

body.combat-mode .stage-move {
  opacity: 0.35;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .combat-chrome,
  body.combat-mode .stage-move,
  body.combat-mode .stage-quick {
    transition: none;
  }
}

/* ── Initiative strip ── */
.combat-order {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem;
  background: #100c0a;
  border-top: 2px solid #3d2a22;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.62rem;
}

.order-chip {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #3a2e24;
  color: #8a7a6a;
  background: #0a0806;
}

.order-chip--active {
  border-color: rgba(232, 93, 76, 0.7);
  background: rgba(232, 93, 76, 0.18);
  color: #f0a090;
  font-weight: 700;
  transform: scale(1.08);
  box-shadow: 0 0 0 1px rgba(232, 93, 76, 0.25);
}

.order-chip--player {
  border-style: dashed;
}

body[data-turn="player"] .order-chip--active.order-chip--player {
  border-style: solid;
}

body[data-turn="foe"] .order-chip--active {
  border-color: rgba(212, 165, 116, 0.75);
  background: rgba(212, 165, 116, 0.16);
  color: #e8c49a;
  box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.3);
}

.order-arrow {
  color: #5a4a3a;
  font-size: 0.7rem;
}

/* ── Cascade battle console ── */
.battle-console {
  display: flex;
  align-items: stretch;
  min-height: 10.5rem;
  max-height: 12.5rem;
  background: linear-gradient(180deg, #1a1410 0%, #100c0a 100%);
  border-top: 3px solid #3d2a22;
  overflow: hidden;
}

.battle-console.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.cascade-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 2px solid #3d2a22;
  background: rgba(0, 0, 0, 0.15);
}

.cascade-col[hidden] {
  display: none !important;
}

.cascade-col--main {
  flex: 0 0 5.5rem;
  background: linear-gradient(180deg, #221814 0%, #181210 100%);
}

.cascade-col--choice {
  flex: 1 1 9rem;
  min-width: 7rem;
}

.cascade-col--modifier {
  flex: 0 0 7.5rem;
}

.cascade-col--target {
  flex: 0 0 8.5rem;
}

.cascade-head {
  flex-shrink: 0;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d4a574;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}

.cascade-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.25rem;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: #5c4034 #0a0604;
}

.cascade-list--main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.35rem 0.3rem;
  overflow: hidden;
}

.cascade-list::-webkit-scrollbar {
  width: 6px;
}

.cascade-list::-webkit-scrollbar-thumb {
  background: #5c4034;
  border-radius: 3px;
}

.cascade-btn {
  display: block;
  width: 100%;
  padding: 0.45rem 0.35rem;
  background: linear-gradient(180deg, #2a201c 0%, #1a1410 100%);
  border: 2px solid #3d2a22;
  border-radius: 4px;
  color: #f2e8dc;
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.1s, background 0.1s, color 0.1s;
}

.cascade-btn:hover:not(:disabled) {
  border-color: rgba(212, 165, 116, 0.45);
  color: #d4a574;
}

.cascade-btn.is-active {
  border-color: rgba(232, 93, 76, 0.55);
  background: linear-gradient(180deg, rgba(232, 93, 76, 0.2) 0%, #2a1814 100%);
  color: #e85d4c;
  box-shadow: inset 0 0 0 1px rgba(232, 93, 76, 0.2);
}

.cascade-btn--flee.is-active {
  border-color: rgba(212, 165, 116, 0.5);
  color: #d4a574;
}

.cascade-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.cascade-tabs {
  display: flex;
  gap: 0.15rem;
  padding: 0.25rem 0.35rem 0;
  flex-shrink: 0;
}

.cascade-tabs[hidden] {
  display: none !important;
}

.cascade-tab {
  flex: 1;
  padding: 0.2rem 0.25rem;
  background: #0e0a08;
  border: 1px solid #3a2e24;
  border-radius: 3px 3px 0 0;
  color: #7a6a5a;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.52rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.cascade-tab.is-active {
  border-color: rgba(212, 165, 116, 0.45);
  background: rgba(212, 165, 116, 0.1);
  color: #d4a574;
}

.cascade-filter {
  flex-shrink: 0;
  padding: 0.25rem 0.35rem;
}

.cascade-filter input {
  width: 100%;
  padding: 0.22rem 0.4rem;
  background: #0a0604;
  border: 1px solid #3a2e24;
  border-radius: 3px;
  color: #f2e8dc;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.58rem;
}

.cascade-filter input:focus {
  outline: none;
  border-color: rgba(212, 165, 116, 0.4);
}

.cascade-opt {
  display: block;
  width: 100%;
  padding: 0.38rem 0.4rem;
  margin-bottom: 0.15rem;
  background: linear-gradient(180deg, #221814 0%, #181210 100%);
  border: 2px solid transparent;
  border-radius: 4px;
  color: #f2e8dc;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.1s, background 0.1s;
}

.cascade-opt:hover,
.cascade-opt.is-active {
  border-color: rgba(212, 165, 116, 0.4);
  background: linear-gradient(180deg, #2a2018 0%, #1e1612 100%);
}

.cascade-opt.is-active {
  border-color: rgba(232, 93, 76, 0.45);
}

.cascade-opt--target {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.opt-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.opt-body {
  min-width: 0;
  flex: 1;
}

.opt-name {
  display: block;
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opt-meta {
  display: block;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.5rem;
  color: #7a6a5a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cascade-empty {
  padding: 0.75rem 0.4rem;
  font-size: 0.68rem;
  color: #6a5a4a;
  font-style: italic;
  text-align: center;
}

.cascade-preview {
  flex: 0 0 11rem;
  display: flex;
  flex-direction: column;
  padding: 0.45rem 0.55rem;
  background: rgba(0, 0, 0, 0.3);
  border-right: none;
  min-width: 0;
}

.preview-kicker {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6a5a4a;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.preview-name {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.78rem;
  color: #d4a574;
  margin-bottom: 0.25rem;
}

.preview-desc {
  font-size: 0.62rem;
  line-height: 1.4;
  color: #b8a090;
  flex: 1;
  overflow-y: auto;
}

.preview-meta {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.52rem;
  color: #7a6a5a;
  margin: 0.3rem 0;
}

.preview-economy {
  margin: 0 0 0.35rem;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c4a882;
}

.preview-economy[data-cost="free"] {
  color: #8fbf9a;
}

.preview-economy[data-cost="turn"] {
  color: #e8a070;
}

.preview-confirm {
  margin-top: auto;
  padding: 0.35rem;
  background: linear-gradient(180deg, rgba(232, 93, 76, 0.28) 0%, rgba(232, 93, 76, 0.12) 100%);
  border: 2px solid rgba(232, 93, 76, 0.5);
  border-radius: 4px;
  color: #e85d4c;
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.68rem;
  cursor: pointer;
}

.preview-confirm kbd,
.cascade-btn kbd,
.battle-skip-foe kbd {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.28rem;
  border: 1px solid rgba(240, 228, 212, 0.28);
  border-radius: 2px;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.58em;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.75;
  vertical-align: middle;
}

.cascade-keys-hint {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.48rem;
  line-height: 1.35;
  letter-spacing: 0.03em;
  color: #6a5a4a;
}

.cascade-opt.is-kb-focus {
  outline: 1px solid rgba(232, 193, 122, 0.65);
  outline-offset: -1px;
  background: rgba(232, 193, 122, 0.08);
}

.preview-confirm:hover:not(:disabled) {
  filter: brightness(1.12);
}

.preview-confirm:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Stage combat overlays (inside .stage-frame) ── */
#combat-announce,
.combat-announce,
.battle-announce {
  position: absolute;
  top: 0.45rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 10rem;
  max-width: min(46%, 14rem);
  padding: 0.4rem 1.1rem 0.4rem 0.85rem;
  background: linear-gradient(180deg, #2a1814 0%, #1a100e 100%);
  border: 2px solid #5c4034;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  pointer-events: none;
}

.battle-announce-copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.15;
}

#combat-announce-text,
.battle-announce-copy > #combat-announce-text {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: #e85d4c;
  text-transform: uppercase;
  font-weight: 700;
}

.battle-announce-sub {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: #a89080;
  text-transform: none;
  font-weight: 500;
}

#combat-announce[hidden],
.combat-announce[hidden] {
  display: none !important;
}

.battle-announce-dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e85d4c;
  animation: combat-pulse 1.2s ease infinite;
}

@keyframes combat-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

@keyframes combat-announce-flash {
  0% { transform: translateX(-50%) scale(1.08); filter: brightness(1.25); }
  100% { transform: translateX(-50%) scale(1); filter: brightness(1); }
}

#combat-announce.is-flash,
.battle-announce.is-flash {
  animation: combat-announce-flash 0.45s ease-out;
}

#combat-announce.is-present-gate,
.combat-announce.is-present-gate,
.battle-announce.is-present-gate {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(232, 184, 92, 0.35);
}

#combat-announce.is-present-gate .battle-announce-copy::after,
.battle-announce.is-present-gate .battle-announce-copy::after {
  content: "Space / Enter / click";
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-ui, "Segoe UI", system-ui, sans-serif);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c4a574;
  opacity: 0.9;
}

#combat-announce[data-turn="foe"],
.combat-announce[data-turn="foe"] {
  border-color: rgba(212, 165, 116, 0.65);
  background: linear-gradient(180deg, #2a2014 0%, #1a140c 100%);
}

#combat-announce[data-turn="foe"] #combat-announce-text,
.combat-announce[data-turn="foe"] #combat-announce-text {
  color: #e8c49a;
}

#combat-announce[data-turn="foe"] .battle-announce-dot {
  background: #d4a574;
}

#combat-announce[data-turn="foe"] .battle-announce-sub {
  color: #b8a078;
}

#combat-announce[data-turn="victory"] #combat-announce-text {
  color: #7dcea0;
}

#combat-announce[data-turn="victory"] .battle-announce-dot {
  background: #7dcea0;
  animation: none;
}

/* Active-actor emphasis: brass plate on your turn; ink-stamp ring on foe (no neon glow) */
.battle-player-hud.is-active-turn {
  border-color: rgba(212, 165, 116, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 200, 0.12),
    0 0 0 1px rgba(90, 58, 28, 0.55),
    0 4px 14px rgba(0, 0, 0, 0.5);
}

.battle-target.is-active-turn {
  outline: 2px solid rgba(160, 48, 36, 0.95);
  outline-offset: 4px;
  filter: brightness(1.04) saturate(1.05);
  box-shadow: none;
}

.battle-sprite--enemy.is-active-turn {
  outline: none;
  box-shadow: none;
  filter: none;
}

.battle-target.is-active-turn .battle-sprite--enemy {
  outline: none;
  box-shadow: none;
}

#combat-stage-hud.is-foe-turn .battle-hud--enemy,
.combat-stage-hud.is-foe-turn .battle-hud--enemy {
  border-color: rgba(160, 72, 52, 0.75);
  box-shadow: 0 0 0 1px rgba(80, 28, 18, 0.4), 0 4px 12px rgba(0, 0, 0, 0.45);
}

/* Hide legacy announce while JRPG present sequence owns the stage */
#combat-announce.is-present-suppressed,
.battle-announce.is-present-suppressed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body[data-turn="foe"] .battle-console {
  opacity: 0.55;
  pointer-events: none;
}

body[data-turn="player"] .battle-console {
  opacity: 1;
}

#combat-intent,
.combat-intent,
.battle-intent {
  position: absolute;
  top: 3.15rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 23;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  max-width: min(72%, 22rem);
  background: rgba(20, 10, 6, 0.92);
  border: 2px solid rgba(232, 192, 64, 0.45);
  border-radius: 4px;
  font-size: 0.72rem;
  color: #e8c040;
  white-space: nowrap;
  pointer-events: none;
}

#combat-intent[hidden],
.combat-intent[hidden],
.battle-intent[hidden] {
  display: none !important;
}

.battle-intent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  background: rgba(232, 192, 64, 0.2);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
}

.battle-skip-foe {
  pointer-events: auto;
  margin-left: 0.35rem;
  appearance: none;
  border: 1px solid rgba(232, 192, 64, 0.55);
  background: rgba(30, 18, 8, 0.9);
  color: #f0e0c0;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  cursor: pointer;
}

.battle-skip-foe:hover,
.battle-skip-foe:focus-visible {
  border-color: #e8c040;
  outline: none;
}

/* ── Presentation chrome — modern JRPG hierarchy + analogue (ink / paper / stamp) ── */
.combat-turn-banner {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: min(72%, 22rem);
  padding: 0.55rem 1.25rem;
  /* Letterpress phase plate */
  background:
    linear-gradient(180deg, rgba(255, 240, 210, 0.06), transparent 40%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.04) 2px,
      rgba(0, 0, 0, 0.04) 3px
    ),
    linear-gradient(180deg, #2c2216 0%, #16100a 100%);
  border: 1px solid #a07a48;
  box-shadow:
    0 0 0 2px #1a120c,
    inset 0 0 0 1px rgba(212, 165, 116, 0.35),
    0 8px 22px rgba(0, 0, 0, 0.55);
  border-radius: 1px;
  pointer-events: none;
  animation: combat-turn-banner-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.combat-turn-banner-rule {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 165, 116, 0.55), transparent);
  min-width: 1.5rem;
}

.combat-turn-banner[hidden] {
  display: none !important;
}

.combat-turn-banner-text {
  display: block;
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: clamp(0.95rem, 2.8vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink, #f0e4d4);
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
}

.combat-turn-banner[data-side="foe"] {
  border-color: #8a4034;
  background:
    linear-gradient(180deg, rgba(255, 180, 160, 0.05), transparent 40%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.05) 2px,
      rgba(0, 0, 0, 0.05) 3px
    ),
    linear-gradient(180deg, #2a1410 0%, #140a08 100%);
  box-shadow:
    0 0 0 2px #120808,
    inset 0 0 0 1px rgba(180, 80, 60, 0.35),
    0 8px 22px rgba(0, 0, 0, 0.55);
}

.combat-turn-banner[data-side="foe"] .combat-turn-banner-text {
  color: #f0c4b4;
}

.combat-turn-banner[data-side="foe"] .combat-turn-banner-rule {
  background: linear-gradient(90deg, transparent, rgba(180, 90, 70, 0.55), transparent);
}

@keyframes combat-turn-banner-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-0.55rem) scaleX(0.92); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scaleX(1); }
}

/* Rubber-stamp verdict — reads as inked mark, not another menu window */
.combat-result-banner {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-3deg);
  z-index: 27;
  padding: 0.55rem 1.4rem 0.45rem;
  background: transparent;
  border: 3px double rgba(110, 150, 80, 0.85);
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(80, 110, 50, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: combat-result-banner-in 0.35s cubic-bezier(0.15, 0.9, 0.25, 1);
}

.combat-result-banner[hidden] {
  display: none !important;
}

.combat-result-banner-text {
  display: block;
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: clamp(1.55rem, 5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(168, 210, 120, 0.92);
  text-align: center;
  text-shadow: 0 0 1px rgba(40, 60, 20, 0.4);
}

.combat-result-banner.is-fail {
  border-color: rgba(160, 70, 55, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(120, 40, 30, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%) rotate(3deg);
}

.combat-result-banner.is-fail .combat-result-banner-text {
  color: rgba(220, 130, 110, 0.95);
}

@keyframes combat-result-banner-in {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-3deg) scale(1.12); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(-3deg) scale(1); }
}

.combat-result-banner.is-fail {
  animation-name: combat-result-banner-in-fail;
}

@keyframes combat-result-banner-in-fail {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(3deg) scale(1.12); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(3deg) scale(1); }
}

/* FF/DQ-style dialogue window — paper field, bottom-weighted */
.combat-typewriter {
  position: absolute;
  left: 50%;
  bottom: 18%;
  top: auto;
  transform: translateX(-50%);
  z-index: 25;
  width: min(90%, 30rem);
  padding: 0.55rem 0.9rem 0.7rem;
  background:
    linear-gradient(180deg, rgba(48, 36, 24, 0.97) 0%, rgba(22, 16, 12, 0.96) 100%);
  border: 1px solid #8a6a44;
  box-shadow:
    0 0 0 2px #120e0a,
    inset 0 0 0 1px rgba(212, 165, 116, 0.28),
    0 10px 26px rgba(0, 0, 0, 0.55);
  border-radius: 1px;
  pointer-events: none;
}

.combat-typewriter[hidden] {
  display: none !important;
}

.combat-typewriter-plate {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass, #d4a574);
  margin-bottom: 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(138, 106, 60, 0.45);
}

.combat-typewriter-text {
  font-family: var(--font-story, "Literata", Georgia, serif);
  font-size: clamp(0.92rem, 2.4vw, 1.05rem);
  line-height: 1.5;
  color: var(--ink, #f0e4d4);
  min-height: 1.5em;
  white-space: pre-wrap;
}

.combat-typewriter-text::after {
  content: "▌";
  display: inline-block;
  margin-left: 0.1em;
  color: var(--brass, #d4a574);
  animation: combat-type-caret 0.9s steps(1) infinite;
  font-size: 0.85em;
  vertical-align: baseline;
}

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

/* Field notebook / battle record — stacked under Skip in present rail */
.combat-present-rail {
  position: absolute;
  right: 0.55rem;
  bottom: 0.45rem;
  z-index: 28;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  max-width: calc(100% - 1.2rem);
  pointer-events: none;
}

.combat-event-log {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 22;
  width: 232px;
  max-width: 100%;
  max-height: 26vh;
  display: flex;
  flex-direction: column;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(28, 20, 14, 0.94),
      rgba(28, 20, 14, 0.94) 1.15rem,
      rgba(22, 16, 12, 0.94) 1.15rem,
      rgba(22, 16, 12, 0.94) 1.2rem
    );
  border: 1px solid rgba(110, 78, 52, 0.85);
  box-shadow:
    0 0 0 1px rgba(20, 12, 8, 0.8),
    inset 0 0 0 1px rgba(212, 165, 116, 0.12),
    0 6px 16px rgba(0, 0, 0, 0.5);
  border-radius: 1px;
  pointer-events: auto;
}

.combat-event-log[hidden] {
  display: none !important;
}

.combat-event-log-head {
  flex: 0 0 auto;
  padding: 0.28rem 0.5rem;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass, #d4a574);
  border-bottom: 1px solid rgba(110, 78, 52, 0.7);
  background: rgba(18, 12, 8, 0.65);
}

.combat-event-log-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem 0.5rem 0.45rem;
  max-height: 22vh;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: #5c4034 transparent;
}

.combat-event-log-line {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.6rem;
  line-height: 1.35;
  color: #a89884;
  word-break: break-word;
  opacity: 0.78;
}

.combat-event-log-line:last-child {
  color: var(--ink, #f0e4d4);
  opacity: 1;
}

/* Skip sits above the record — system plaque, Esc affordance */
.combat-present-skip {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 28;
  appearance: none;
  border: 1px solid rgba(168, 130, 80, 0.85);
  background: linear-gradient(180deg, #322618 0%, #1a140e 100%);
  color: var(--ink, #f0e4d4);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.32rem 0.55rem;
  cursor: pointer;
  border-radius: 1px;
  pointer-events: auto;
  box-shadow:
    0 0 0 1px #100c08,
    inset 0 1px 0 rgba(255, 220, 170, 0.08),
    0 3px 10px rgba(0, 0, 0, 0.4);
}

.combat-present-skip kbd {
  font-family: inherit;
  font-size: 0.85em;
  opacity: 0.7;
  margin-left: 0.25rem;
  border: none;
  background: none;
  padding: 0;
  color: var(--brass, #d4a574);
}

.combat-present-skip[hidden] {
  display: none !important;
}

.combat-present-skip:hover,
.combat-present-skip:focus-visible {
  border-color: var(--brass-hot, #f0b878);
  color: #fff6e8;
  outline: none;
}

/* Damage float near HP bar (presentation helper) */
.damage-number--at-bar {
  top: auto;
  bottom: 108%;
  left: 50%;
  transform: translateX(-50%);
}

/* GIF/WebP combat FX overlays (adventure/assets/fx/overlays.json) */
.combat-fx-overlay {
  position: absolute;
  z-index: 24;
  width: clamp(4.5rem, 22%, 9rem);
  height: clamp(4.5rem, 22%, 9rem);
  transform: translate(-50%, -50%) scale(var(--fx-scale, 1));
  pointer-events: none;
  animation: combat-fx-pop 0.2s ease-out;
}

.combat-fx-overlay img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.combat-fx-overlay--stage {
  width: clamp(7rem, 36%, 14rem);
  height: clamp(7rem, 36%, 14rem);
}

.combat-fx-overlay--player {
  width: clamp(3.5rem, 16%, 7rem);
  height: clamp(3.5rem, 16%, 7rem);
}

@keyframes combat-fx-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(calc(var(--fx-scale, 1) * 0.85)); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(var(--fx-scale, 1)); }
}

@media (prefers-reduced-motion: reduce) {
  .combat-fx-overlay {
    display: none !important;
  }
}

/* ── Stage HUD layer ── */
#combat-stage-hud,
.combat-stage-hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#combat-stage-hud .battle-target {
  pointer-events: auto;
}

.battle-enemy-wrap {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 26%;
  max-width: 11.5rem;
  transition: opacity 0.4s, transform 0.4s, filter 0.25s, box-shadow 0.25s;
}

.battle-enemy-wrap[data-slot="center"] {
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.battle-enemy-wrap[data-slot="flank-left"] {
  top: 20%;
  left: 10%;
  z-index: 4;
}

.battle-enemy-wrap[data-slot="flank-right"] {
  top: 20%;
  right: 8%;
  z-index: 4;
}

.battle-enemy-wrap[data-slot="rear"] {
  top: 26%;
  left: 50%;
  transform: translateX(-50%) scale(0.88);
  opacity: 0.82;
  z-index: 3;
  filter: brightness(0.9);
}

.battle-enemy-wrap[data-elevation="flying"] {
  top: 4%;
}

.battle-enemy-wrap[data-elevation="flying"][data-slot="center"] {
  transform: translateX(-50%) translateY(-4%);
}

.battle-enemy-wrap[data-elevation="flying"][data-slot="flank-left"],
.battle-enemy-wrap[data-elevation="flying"][data-slot="flank-right"] {
  transform: translateY(-6%);
}

.battle-enemy-wrap[data-elevation="elevated"] {
  top: 10%;
}

.battle-enemy-wrap[data-elevation="elevated"][data-slot="center"] {
  transform: translateX(-50%) translateY(-2%);
}

.battle-enemy-wrap[data-elevation="elevated"][data-slot="flank-left"],
.battle-enemy-wrap[data-elevation="elevated"][data-slot="flank-right"] {
  transform: translateY(-3%);
}

.battle-enemy-wrap[data-stature="large"] {
  width: 34%;
  max-width: 15rem;
}

.battle-enemy-wrap[data-stature="large"][data-slot="center"] {
  top: 8%;
}

button.battle-target {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: inherit;
  outline: none;
  border-radius: 8px;
}

button.battle-target:hover:not(:disabled) .battle-sprite--enemy {
  transform: scale(1.03);
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.75)) brightness(1.08);
}

button.battle-target:focus-visible {
  box-shadow: 0 0 0 2px rgba(232, 192, 64, 0.55);
}

button.battle-target.is-targeted,
button.battle-target.is-menu-open {
  box-shadow: 0 0 0 2px rgba(232, 192, 64, 0.45);
}

button.battle-target.is-menu-open {
  box-shadow:
    0 0 0 2px rgba(232, 192, 64, 0.75),
    0 0 24px rgba(232, 192, 64, 0.15);
}

button.battle-target:disabled {
  cursor: default;
  opacity: 0.55;
}

body.combat-mode[data-turn="foe"] button.battle-target,
body.combat-mode:not(.combat-mode) button.battle-target:disabled {
  pointer-events: none;
}

.battle-enemy-wrap.is-hit .battle-sprite--enemy {
  animation: combat-enemy-hit 0.45s ease;
}

@keyframes combat-enemy-hit {
  0%, 100% { transform: translateX(0); filter: none; }
  20% { transform: translateX(8px); filter: brightness(1.35) sepia(0.4) saturate(2.2) hue-rotate(-25deg); }
  45% { transform: translateX(-5px); filter: brightness(1.15) sepia(0.25) saturate(1.7) hue-rotate(-18deg); }
  70% { transform: translateX(3px); }
}

/* Target context menu */
.target-menu {
  position: absolute;
  z-index: 25;
  min-width: 11rem;
  max-width: 14rem;
  padding: 0.35rem 0;
  background: linear-gradient(180deg, rgba(24, 18, 14, 0.98) 0%, rgba(12, 9, 7, 0.98) 100%);
  border: 2px solid rgba(232, 192, 64, 0.45);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.target-menu[hidden] {
  display: none !important;
}

.target-menu-title {
  margin: 0;
  padding: 0.35rem 0.75rem 0.45rem;
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.72rem;
  font-weight: 600;
  color: #d4a574;
  border-bottom: 1px solid rgba(232, 192, 64, 0.2);
}

.target-menu-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}

.target-menu-item {
  display: block;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: none;
  background: transparent;
  color: #f2e8dc;
  font-family: var(--font-body, "Literata", Georgia, serif);
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.target-menu-item:hover,
.target-menu-item:focus-visible {
  background: rgba(232, 192, 64, 0.12);
  color: #d4a574;
  outline: none;
}

.target-menu-item--details {
  color: rgba(168, 208, 255, 0.95);
}

.target-menu-item--details:hover,
.target-menu-item--details:focus-visible {
  background: rgba(88, 160, 232, 0.12);
  color: #b8dcff;
}

.target-menu-divider {
  height: 1px;
  margin: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.08);
}

.target-menu-hint {
  margin: 0;
  padding: 0.35rem 0.75rem 0.45rem;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Sprites + HUD panels */
.battle-sprite {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.75));
  line-height: 1;
  user-select: none;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.battle-sprite--enemy {
  margin-top: 0.35rem;
}

.battle-sprite.has-img {
  font-size: 0;
  width: 100%;
  max-width: 11rem;
  aspect-ratio: 8 / 9;
}

.battle-sprite-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.7));
}

.battle-enemy-wrap[data-stature="large"] .battle-sprite--enemy {
  font-size: clamp(3.5rem, 11vw, 6rem);
}

.battle-enemy-wrap[data-stature="large"] .battle-sprite.has-img {
  max-width: 14rem;
  font-size: 0;
}

.battle-hud {
  background: linear-gradient(180deg, #2a201c 0%, #1a1410 50%, #12100e 100%);
  border: 3px solid #3d2a22;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -2px 4px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.45);
  padding: 0.55rem 0.75rem;
  min-width: 10.5rem;
  max-width: 11.5rem;
  width: 100%;
}

.battle-hud--enemy {
  border-color: rgba(232, 93, 76, 0.35);
}

.battle-hud-name {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.72rem;
  font-weight: 600;
  color: #f2e8dc;
  margin-bottom: 0.35rem;
}

.battle-hud-name > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-hud-lv,
.battle-hud-ac {
  font-size: 0.58rem;
  color: #b8a090;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  white-space: nowrap;
}

.battle-hud-lv,
.battle-hud-name > span:first-child + .battle-hud-ac {
  margin-left: auto;
}

.battle-hud-ac {
  color: #a89080;
}

.battle-hp-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
}

.battle-hp-label {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #58d068;
}

.battle-hud--enemy .battle-hp-label {
  color: #f0a030;
}

.battle-hp-track {
  position: relative;
  height: 10px;
  background: #0a0604;
  border: 2px solid #0a0604;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.battle-hp-fill {
  height: 100%;
  border-radius: 1px;
  background: linear-gradient(180deg, #f0a030 0%, #b06010 100%);
  transition: width 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
  position: relative;
}

.battle-hp-fill.is-draining {
  filter: brightness(1.15) saturate(1.2);
}

.battle-hp-fill--player {
  background: linear-gradient(180deg, #58d068 0%, #2a8a38 100%);
}

.battle-hp-fill.is-low {
  background: linear-gradient(180deg, #e84848 0%, #a02020 100%);
}

.battle-hp-shine {
  position: absolute;
  top: 1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, transparent 100%);
  pointer-events: none;
}

.battle-hp-num {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.58rem;
  color: #b8a090;
  min-width: 3.2rem;
  text-align: right;
}

.battle-status-row {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  font-size: 0.85rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Player HUD — bottom-left */
#combat-player-hud,
.combat-player-hud,
.battle-player-hud {
  position: absolute;
  bottom: 0.65rem;
  left: 0.65rem;
  z-index: 12;
  min-width: 10.5rem;
  max-width: 14rem;
  padding: 0.5rem 0.65rem;
  background: linear-gradient(180deg, rgba(20, 14, 12, 0.94) 0%, rgba(10, 8, 6, 0.92) 100%);
  border: 2px solid rgba(88, 208, 104, 0.35);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

#combat-player-hud[hidden],
.combat-player-hud[hidden] {
  display: none !important;
}

.battle-player-hud-name {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.72rem;
  font-weight: 600;
  color: #f2e8dc;
  margin-bottom: 0.3rem;
}

.battle-player-hud .battle-hp-label {
  color: #58d068;
}

/* Victory overlay */
#combat-victory,
.combat-victory,
.battle-victory {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  background: rgba(5, 3, 2, 0.82);
  backdrop-filter: blur(4px);
}

.battle-victory.is-open {
  display: grid;
}

#combat-victory[hidden],
.combat-victory[hidden] {
  display: none !important;
}

.battle-victory-panel {
  text-align: center;
  padding: 2rem 2.5rem;
  background: linear-gradient(180deg, #2a2018 0%, #1a1410 100%);
  border: 3px solid rgba(88, 208, 104, 0.4);
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.battle-victory-tag {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #58d068;
  margin-bottom: 0.35rem;
}

.battle-victory-panel h2 {
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 1.4rem;
  color: #f2e8dc;
  margin-bottom: 0.75rem;
}

.battle-loot {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.loot-chip {
  padding: 0.3rem 0.75rem;
  background: rgba(212, 165, 116, 0.12);
  border: 2px solid rgba(212, 165, 116, 0.35);
  border-radius: 999px;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.72rem;
  color: #d4a574;
}

.battle-victory-btn {
  padding: 0.55rem 1.5rem;
  background: linear-gradient(180deg, #58d068 0%, #2a8a38 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #0a0604;
  font-family: var(--font-display, "Cinzel", Georgia, serif);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.battle-victory-btn:hover {
  filter: brightness(1.1);
}

/* Mobile cascade wrap */
@media (max-width: 600px) {
  .combat-chrome.is-open {
    max-height: 28rem;
  }

  .battle-console {
    flex-wrap: wrap;
    max-height: none;
    min-height: auto;
  }

  .cascade-col--main {
    flex: 0 0 100%;
    flex-direction: row;
    border-right: none;
    border-bottom: 2px solid #3d2a22;
  }

  .cascade-list--main {
    flex-direction: row;
    overflow-x: auto;
  }

  .cascade-btn {
    min-width: 4.5rem;
  }

  .cascade-col--choice,
  .cascade-col--modifier,
  .cascade-col--target {
    flex: 1 1 45%;
    max-height: 6rem;
  }

  .cascade-preview {
    flex: 1 1 100%;
    max-height: 5rem;
    border-top: 2px solid #3d2a22;
  }

  #combat-player-hud,
  .battle-player-hud {
    max-width: 11rem;
    bottom: 0.4rem;
    left: 0.4rem;
  }

  .battle-enemy-wrap {
    width: 30%;
    max-width: none;
  }
}
