/* ============================================================================
 * Floating Combat Text Layer
 * ========================================================================== */
.floating-text-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 16;
}

.ft-item {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--ink-main);
  text-shadow:
    0 2px 0 rgba(8, 10, 15, 0.96),
    0 0 3px rgba(8, 10, 15, 0.92);
  animation: ft-rise 720ms var(--ease-ui) forwards;
}

.ft-dmg {
  font-size: 14px;
  color: var(--ink-main);
}

.ft-crit {
  font-size: 16px;
  color: var(--brass-bright);
  letter-spacing: 0.05em;
  animation: ft-pop-rise 860ms var(--ease-ui) forwards;
}

.ft-finisher {
  font-size: 16.5px;
  color: #ffd066;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 0 #1a1004, 0 0 6px rgba(214, 166, 70, 0.42);
  animation: ft-pop-rise 960ms var(--ease-ui) forwards;
}

.ft-parry {
  font-size: 17px;
  color: var(--soul-cyan);
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 #071319, 0 0 9px rgba(59, 216, 236, 0.5);
  animation: ft-pop-rise 980ms var(--ease-ui) forwards;
}

.ft-playerDmg {
  font-size: 15px;
  color: #f06c68;
  animation: ft-rise 780ms var(--ease-ui) forwards;
}

.ft-heal {
  font-size: 16px;
  color: #62d88d;
  animation: ft-rise 860ms var(--ease-ui) forwards;
}

.ft-trap {
  font-size: 17px;
  color: #f4954c;
  letter-spacing: 0.03em;
  animation: ft-pop-rise 900ms var(--ease-ui) forwards;
}

.ft-chest {
  font-size: 17px;
  color: var(--brass-bright);
  letter-spacing: 0.03em;
  animation: ft-pop-rise 1040ms var(--ease-ui) forwards;
}

.ft-synergy {
  font-size: 15px;
  color: #8eeef9;
  letter-spacing: 0.03em;
  animation: ft-pop-rise 1060ms var(--ease-ui) forwards;
}

.ft-info {
  font-size: 14px;
  color: var(--ink-main);
  animation: ft-rise 820ms var(--ease-ui) forwards;
}

.ft-alert {
  font-size: 24px;
  font-weight: 900;
  color: #ffd85e;
  text-shadow: 0 2px 0 #3a120a, 1px 1px 0 #9b261d;
  animation: ft-alert-hop 660ms var(--ease-ui) forwards;
}

.ft-stagger {
  font-size: 16px;
  font-weight: 900;
  color: var(--brass-bright);
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 #261404, 0 0 8px rgba(214, 166, 70, 0.45);
  animation: ft-pop-rise 960ms var(--ease-ui) forwards;
}

.ft-counter {
  font-size: 17px;
  font-weight: 900;
  color: #fff0bd;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 #2a0d0a, 0 0 9px rgba(214, 166, 70, 0.52);
  animation: ft-pop-rise 1000ms var(--ease-ui) forwards;
}

.ft-riposte {
  font-size: 18.5px;
  font-weight: 900;
  color: #fff4c6;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 #2a0a0c, 0 0 11px rgba(214, 166, 70, 0.62);
  animation: ft-riposte-pop 1100ms var(--ease-ui) forwards;
}

.ft-guardBreak {
  font-size: 16.5px;
  font-weight: 900;
  color: #f7b44f;
  letter-spacing: 0.05em;
  animation: ft-pop-rise 980ms var(--ease-ui) forwards;
}

.ft-blocked {
  font-size: 13px;
  font-weight: 800;
  color: #c2ccd9;
  letter-spacing: 0.05em;
  opacity: 0.88;
  animation: ft-blocked-clang 660ms var(--ease-ui) forwards;
}

.ft-rollAtk {
  font-size: 14.5px;
  font-weight: 800;
  color: #a6f2fc;
  letter-spacing: 0.04em;
  animation: ft-pop-rise 840ms var(--ease-ui) forwards;
}

.ft-poison {
  font-size: 15px;
  font-weight: 800;
  color: #8ee05e;
  animation: ft-rise 760ms var(--ease-ui) forwards;
}

.ft-burn {
  font-size: 16px;
  font-weight: 800;
  color: #f47f42;
  animation: ft-rise 780ms var(--ease-ui) forwards;
}

.ft-frost {
  font-size: 17px;
  font-weight: 800;
  color: #84ebfc;
  letter-spacing: 0.04em;
  animation: ft-pop-rise 860ms var(--ease-ui) forwards;
}

.ft-shock {
  font-size: 17px;
  font-weight: 800;
  color: #f5de56;
  letter-spacing: 0.04em;
  animation: ft-pop-rise 840ms var(--ease-ui) forwards;
}

.ft-xp {
  font-size: 13px;
  font-weight: 700;
  color: #bfa9ef;
  letter-spacing: 0.03em;
  animation: ft-rise 880ms var(--ease-ui) forwards;
}

.ft-stamina {
  font-size: 17px;
  font-weight: 800;
  color: #5ce8ff;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 0 #08151d, 0 0 10px rgba(92, 232, 255, 0.48);
  animation: ft-pop-rise 920ms var(--ease-ui) forwards;
}

.ft-exp {
  font-size: 15px;
  font-weight: 800;
  color: #f6cf66;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 #1e1506, 0 0 8px rgba(214, 166, 70, 0.45);
  animation: ft-rise 900ms var(--ease-ui) forwards;
}

.ft-elixir {
  font-size: 20px;
  font-weight: 900;
  color: #f6f2ff;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 0 #1b160c, 0 0 12px rgba(214, 166, 70, 0.72), 0 0 6px rgba(92, 232, 255, 0.45);
  animation: ft-pop-rise 1140ms var(--ease-ui) forwards;
}

.ft-levelup {
  font-size: 23px;
  font-weight: 900;
  color: #fff3c0;
  letter-spacing: 0.05em;
  text-shadow: 0 3px 0 #241906, 0 0 18px rgba(214, 166, 70, 0.8);
  animation: ft-levelup-rise 1320ms var(--ease-ui) forwards;
}

@keyframes ft-rise {
  0% { opacity: 0; transform: translate(-50%, -35%) scale(0.92); }
  16% { opacity: 1; transform: translate(-50%, -58%) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -98%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -126%) scale(0.96); }
}

@keyframes ft-pop-rise {
  0% { opacity: 0; transform: translate(-50%, -25%) scale(0.84); }
  18% { opacity: 1; transform: translate(-50%, -60%) scale(1.06); }
  34% { opacity: 1; transform: translate(-50%, -72%) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -104%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -130%) scale(0.96); }
}

@keyframes ft-alert-hop {
  0% { opacity: 0; transform: translate(-50%, -18%) scale(0.62); }
  20% { opacity: 1; transform: translate(-50%, -74%) scale(1.22); }
  38% { opacity: 1; transform: translate(-50%, -62%) scale(1); }
  76% { opacity: 1; transform: translate(-50%, -68%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -86%) scale(0.94); }
}

@keyframes ft-riposte-pop {
  0% { opacity: 0; transform: translate(-50%, -22%) scale(0.68); }
  16% { opacity: 1; transform: translate(-50%, -66%) scale(1.22); }
  32% { opacity: 1; transform: translate(-50%, -76%) scale(1.04); }
  78% { opacity: 1; transform: translate(-50%, -112%) scale(1.02); }
  100% { opacity: 0; transform: translate(-50%, -144%) scale(0.96); }
}

@keyframes ft-blocked-clang {
  0% { opacity: 0; transform: translate(-50%, -35%) scale(0.9); }
  18% { opacity: 1; transform: translate(calc(-50% - 6px), -55%) scale(1.04); }
  34% { opacity: 1; transform: translate(calc(-50% + 5px), -64%) scale(1); }
  72% { opacity: 1; transform: translate(-50%, -84%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -104%) scale(0.95); }
}

@keyframes ft-levelup-rise {
  0% { opacity: 0; transform: translate(-50%, -18%) scale(0.68); }
  16% { opacity: 1; transform: translate(-50%, -68%) scale(1.2); }
  34% { opacity: 1; transform: translate(-50%, -78%) scale(1.04); }
  80% { opacity: 1; transform: translate(-50%, -120%) scale(1.02); }
  100% { opacity: 0; transform: translate(-50%, -152%) scale(0.96); }
}

@keyframes ft-reduced-fade {
  0% { opacity: 0; transform: translate(-50%, -50%); }
  18% { opacity: 1; transform: translate(-50%, -50%); }
  78% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -50%); }
}

/* ============================================================================
 * Carved Stone Plaque Base (Zero Blur, Tactile Bevel + Hard Drop Ledge)
 * ========================================================================== */
.hud-top {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  z-index: 10;
}

.hud-card {
  background: var(--stone-base);
  border: 1px solid var(--stone-edge);
  border-top-color: var(--stone-bevel-top);
  border-bottom: 2px solid var(--stone-ledge);
  border-radius: var(--radius-outer);
  padding: 10px 12px;
  box-shadow: 0 4px 0 var(--stone-ledge);
  pointer-events: auto;
}

/* ============================================================================
 * Top-Left Vital Plaque (.status-cluster) + Forged Gauge Troughs
 * ========================================================================== */
.hud-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.status-cluster {
  position: relative;
  min-width: 274px;
}

/* Forged brass top-left architectural corner tick */
.status-cluster::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--brass);
  border-left: 2px solid var(--brass);
  pointer-events: none;
}

.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.status-head-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.status-toggle-btn {
  display: none;
  -webkit-appearance: none;
  appearance: none;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 7px;
  border-radius: var(--radius-inner);
  background: var(--stone-raised);
  border: 1px solid var(--brass-dim);
  border-bottom: 2px solid var(--stone-ledge);
  color: var(--brass-bright);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms var(--ease-ui), background-color 140ms var(--ease-ui), border-color 140ms var(--ease-ui);
}

.status-toggle-btn:not(:disabled):active {
  transform: scale(0.96);
}

@media (hover: hover) {
  .status-toggle-btn:hover {
    background: var(--stone-raised);
    border-color: var(--brass);
  }
}

.status-details {
  display: block;
}

.status-details-inner {
  min-height: 0;
}

.status-title-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--radius-inner);
  font-size: 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--brass);
  background: var(--stone-deep);
  border: 1px solid var(--brass-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.level-badge.level-up-pulse {
  animation: level-badge-pop 520ms var(--ease-ui);
}

@keyframes level-badge-pop {
  0% { transform: scale(1); }
  35% {
    transform: scale(1.18);
    background: var(--brass);
    border-color: var(--brass-bright);
    color: #161108;
  }
  100% { transform: scale(1); }
}

.chimera-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-main);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-main);
  font-variant-numeric: tabular-nums;
  transition: color 180ms var(--ease-ui);
}

.hp-num.mid { color: var(--vital-amber); }
.hp-num.low { color: #ef6a66; }

/* Recessed Iron Gauge Troughs with Engraved 25% / 50% / 75% Tick Notches */
.hp-track,
.stamina-track,
.xp-track {
  position: relative;
  border-radius: var(--radius-inner);
  background: var(--stone-deep);
  border: 1px solid #262b38;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.hp-track {
  height: 10px;
  margin-bottom: 5px;
}

.stamina-track {
  height: 6px;
  margin-bottom: 4px;
}

.xp-track {
  height: 4px;
  border-color: #202430;
  margin-bottom: 8px;
}

.hp-track::after,
.stamina-track::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent calc(25% - 0.5px), rgba(8, 10, 15, 0.55) 25%, transparent calc(25% + 0.5px),
    transparent calc(50% - 0.5px), rgba(8, 10, 15, 0.72) 50%, transparent calc(50% + 0.5px),
    transparent calc(75% - 0.5px), rgba(8, 10, 15, 0.55) 75%, transparent calc(75% + 0.5px)
  );
}

.hp-fill {
  height: 100%;
  background: linear-gradient(180deg, #52c97d 0%, var(--vital-green) 100%);
  transition: width 150ms var(--ease-ui), background 200ms var(--ease-ui);
}

.hp-fill.mid {
  background: linear-gradient(180deg, #df9c44 0%, var(--vital-amber) 100%);
}

.hp-fill.low {
  background: linear-gradient(180deg, #de5450 0%, var(--crimson) 100%);
}

.stamina-fill {
  height: 100%;
  background: linear-gradient(180deg, var(--brass-bright) 0%, var(--brass) 100%);
  transition: width 70ms linear, background 150ms var(--ease-ui);
}

.stamina-fill.low {
  background: var(--vital-amber);
}

.stamina-fill.exhausted {
  background: var(--crimson);
  animation: stamina-exhaust-pulse 420ms ease-in-out infinite alternate;
}

.stamina-track.exhausted {
  border-color: var(--crimson);
}

@keyframes stamina-exhaust-pulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

.xp-fill {
  height: 100%;
  background: var(--xp-slate);
  transition: width 220ms var(--ease-ui);
}

/* Conditional Sculpted MP Gauge (Shown ONLY when equipped Top slot has Active Magic) */
.mp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.mp-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #7ccbf2;
  flex-shrink: 0;
}

.mp-track {
  position: relative;
  flex: 1 1 auto;
  height: 6px;
  border-radius: var(--radius-inner);
  background: var(--stone-deep);
  border: 1px solid #28384c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.mp-fill {
  height: 100%;
  background: linear-gradient(180deg, #56b2eb 0%, #3282bf 100%);
  transition: width 110ms linear, background 160ms var(--ease-ui);
}

.mp-fill.is-ready {
  background: linear-gradient(180deg, #62e8f8 0%, #30b5d6 100%);
}

.mp-fill.is-low {
  background: #3a4f6b;
}

.mp-text {
  font-size: 10px;
  font-weight: 700;
  color: #a9d9f5;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.mp-text.is-ready { color: var(--soul-cyan); }
.mp-text.is-low   { color: var(--ink-muted); }

/* One-Shot Restrained HUD Stat Pickup Pulses */
.hp-track.pulse-hp {
  animation: hud-pulse-hp 360ms var(--ease-ui);
}

.stamina-track.pulse-stamina {
  animation: hud-pulse-stamina 360ms var(--ease-ui);
}

.xp-track.pulse-xp {
  animation: hud-pulse-xp 380ms var(--ease-ui);
}

.level-badge.pulse-xp {
  animation: hud-pulse-lv 380ms var(--ease-ui);
}

.status-cluster.pulse-elixir {
  animation: hud-pulse-elixir 420ms var(--ease-ui);
}

@keyframes hud-pulse-hp {
  0% { border-color: #262b38; }
  35% {
    border-color: #62d88d;
    box-shadow: 0 0 10px rgba(69, 184, 112, 0.55), inset 0 1px 2px rgba(0, 0, 0, 0.6);
  }
  100% { border-color: #262b38; }
}

@keyframes hud-pulse-stamina {
  0% { border-color: #262b38; }
  35% {
    border-color: #5ce8ff;
    box-shadow: 0 0 10px rgba(92, 232, 255, 0.58), inset 0 1px 2px rgba(0, 0, 0, 0.6);
  }
  100% { border-color: #262b38; }
}

@keyframes hud-pulse-xp {
  0% { border-color: #202430; }
  35% {
    border-color: var(--brass-bright);
    box-shadow: 0 0 10px rgba(214, 166, 70, 0.58), inset 0 1px 2px rgba(0, 0, 0, 0.6);
  }
  100% { border-color: #202430; }
}

@keyframes hud-pulse-lv {
  0% { transform: scale(1); }
  35% {
    transform: scale(1.1);
    border-color: var(--brass-bright);
    color: #fff3c6;
  }
  100% { transform: scale(1); }
}

@keyframes hud-pulse-elixir {
  0% { border-color: var(--stone-edge); }
  35% {
    border-color: var(--brass-bright);
    border-top-color: #b8f2ff;
    box-shadow: 0 4px 0 var(--stone-ledge), 0 0 16px rgba(92, 232, 255, 0.42), 0 0 8px rgba(214, 166, 70, 0.48);
  }
  100% { border-color: var(--stone-edge); }
}

.phys-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #242936;
  font-size: 11px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.phys-stats strong {
  color: var(--ink-main);
  font-weight: 600;
}

/* Quiet Active Build Trait / Variant Strip inside Vital Plaque */
.build-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid #202430;
}

.build-traits:empty {
  display: none;
}

.trait-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--radius-inner);
  background: var(--stone-deep);
  border: 1px solid #2a3040;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}

.trait-chip.trait-synergy {
  color: var(--brass-bright);
  border-color: var(--brass-dim);
  border-left: 2px solid var(--brass);
}

.trait-chip.trait-pure {
  color: #f6e7c1;
  border-color: #6b5b34;
  border-left: 2px solid var(--brass-bright);
  background: #1b1812;
}

.trait-chip.trait-phys {
  color: #e6d3b3;
  border-color: #544530;
  border-left: 2px solid #c9974c;
}

.trait-chip.trait-heavy {
  color: #d6dde9;
  border-color: #465066;
  border-left: 2px solid #8a9ab8;
}

.trait-chip.trait-hover {
  color: #a6edf7;
  border-color: #295663;
  border-left: 2px solid var(--soul-cyan);
}

.trait-chip.trait-gold    { color: #f6d574; border-color: #6b5322; border-left: 2px solid #f2c852; }
.trait-chip.trait-crimson { color: #f59c94; border-color: #612924; border-left: 2px solid #e05246; }
.trait-chip.trait-frost   { color: #9ceeff; border-color: #265666; border-left: 2px solid #56d6f5; }
.trait-chip.trait-venom   { color: #b4f294; border-color: #325725; border-left: 2px solid #7ce052; }

/* Active Status Ailment / Buff Tags (Matte Carved Stone, Zero Glow Dots) */
.hud-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 280px;
  pointer-events: none;
}

.hud-status-bar:empty {
  display: none;
}

.status-pill {
  --st-color: var(--brass);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 5px;
  border-radius: var(--radius-inner);
  background: var(--stone-base);
  border: 1px solid var(--stone-edge);
  border-left: 2px solid var(--st-color);
  box-shadow: 0 2px 0 var(--stone-ledge);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-main);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.status-pill-dot {
  display: none;
}

.status-pill-time {
  font-size: 10px;
  color: var(--ink-muted);
}

.status-pill-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--stone-deep);
}

.status-pill-bar i {
  display: block;
  height: 100%;
  width: var(--st-pct, 100%);
  background: var(--st-color);
  transition: width 120ms linear;
}

.status-pill.status-poison { --st-color: #7cc952; color: #dcf5cc; }
.status-pill.status-burn   { --st-color: #e66e35; color: #f8dfd2; }
.status-pill.status-frost  { --st-color: #62d8ec; color: #daf7fc; }
.status-pill.status-shock  { --st-color: #e5cb47; color: #f8f1c9; }
.status-pill.status-regen  { --st-color: #45b870; color: #d6f4e0; }
.status-pill.status-haste  { --st-color: #5ce8ff; color: #dffaff; }

/* Acquired Run Blessings Strip (Below Status Pills) */
.blessing-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 280px;
  pointer-events: none;
}

.blessing-strip:empty {
  display: none;
}

.blessing-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-inner);
  background: var(--stone-base);
  border: 1px solid var(--brass-dim);
  border-left: 2px solid var(--brass);
  box-shadow: 0 2px 0 var(--stone-ledge);
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--brass-bright);
  white-space: nowrap;
  pointer-events: auto;
  cursor: help;
}

.blessing-chip-stack {
  color: var(--ink-main);
  font-size: 9.5px;
}
