/* OOM! RF4 CSS layer: combat.css */
/* ============================================================
   COMBAT LAYOUT
   ============================================================ */
#screen-combat { padding: 0; }
.combat-layout { display: flex; flex-direction: column; height: 100vh; max-width: 1500px; margin: 0 auto; padding: 10px 14px; }
.combat-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 8px; height: 126px; min-height: 126px; overflow: hidden; }
.combat-title { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--gold); white-space: nowrap; padding-top: 6px; min-width: 150px; }
.combat-top-btns { display: flex; gap: 8px; margin-left: auto; }

#enemy-frames {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-content: flex-start;
  flex: 1; max-height: 126px; overflow-y: auto; padding: 0 2px 4px;
}
.eframe {
  width: 190px; min-height: 58px; background: linear-gradient(180deg, #241626, #170e1c);
  border: 1px solid #5c3040; border-radius: 8px; padding: 6px 9px;
  transition: opacity 0.4s;
}
.eframe.boss { width: 320px; border-color: var(--danger); box-shadow: 0 0 18px rgba(255, 91, 74, 0.2); }
.eframe.dead { opacity: 0.3; }
.eframe.enraged { border-color: #ff2a1a; box-shadow: 0 0 20px rgba(255, 42, 26, 0.5); animation: enragePulse 0.8s ease-in-out infinite alternate; }
@keyframes enragePulse { to { box-shadow: 0 0 32px rgba(255, 42, 26, 0.8); } }
.eframe.targetable { cursor: crosshair; border-color: var(--heal); box-shadow: 0 0 12px rgba(86, 232, 140, 0.5); }
/* support archetypes: gold = "kill THAT one first" (Support_Enemy_Archetypes.md §2) */
.eframe.support { border-color: #ffd24a; box-shadow: 0 0 12px rgba(255, 210, 74, 0.35); }
.eframe.support .ef-name { color: #ffd97a; }
.eframe.elite-mod { border-color: #bf8cff; box-shadow: 0 0 14px rgba(191, 140, 255, 0.32); }
.eframe.elite-mod .ef-name { color: #d8c0ff; }
.ef-name { font-size: 13px; font-weight: 800; color: #ffb0a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ef-hp-wrap { position: relative; height: 14px; background: #0a0710; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.ef-hp { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #e86a52, #a83224); transition: width 0.15s; }
.eframe:not(.dead) .ef-hp { min-width: 4px; } /* a living enemy's bar can never render invisibly thin */
.ef-hp-text { position: absolute; inset: 0; font-size: 10px; display: flex; align-items: center; justify-content: center; color: #fff; text-shadow: 0 1px 2px #000; font-weight: 700; }
.ef-cast { position: relative; height: 13px; background: #0a0710; border-radius: 4px; overflow: hidden; margin-top: 4px; border: 1px solid var(--warn); }
.ef-cast.inactive { visibility: hidden; }
.ef-cast-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #ffd27a, #c8862a); }
.ef-cast-label { position: absolute; inset: 0; font-size: 9.5px; display: flex; align-items: center; justify-content: center; color: #1d1206; font-weight: 800; }
.ef-buffs { display: flex; gap: 4px; min-height: 16px; margin-top: 4px; justify-content: center; }
.eframe.boss .ef-hp-wrap { height: 20px; }
.eframe.boss .ef-hp-text { font-size: 12px; }
.eframe.boss .ef-cast { height: 16px; }
.eframe.boss .ef-cast-label { font-size: 11px; }

.combat-mid { display: flex; gap: 12px; flex: 1; min-height: 0; }

/* party frames — the real playfield */
#party-frames { display: flex; flex-direction: column; gap: 8px; width: 250px; justify-content: center; z-index: 5; }
.pframe {
  display: flex; gap: 8px; padding: 7px 10px;
  background: linear-gradient(180deg, #1d1830, #131020);
  border: 2px solid #3a3350; border-radius: 9px;
  cursor: pointer; transition: border-color 0.15s, transform 0.1s, box-shadow 0.2s;
  position: relative;
}
.pframe:hover { border-color: var(--gold); transform: translateX(3px); }
.pframe.targetable { border-color: var(--heal); box-shadow: 0 0 14px rgba(86, 232, 140, 0.45); animation: targetPulse 0.7s ease-in-out infinite alternate; }
@keyframes targetPulse { to { box-shadow: 0 0 24px rgba(86, 232, 140, 0.7); } }
/* target pair: gold = selected friendly, red = selected hostile; the primary
   side (most recently selected) pulses stronger */
.pframe.sel-friendly { border-color: var(--gold); box-shadow: 0 0 12px rgba(217, 171, 79, 0.5); }
.eframe.sel-hostile { border-color: #ff6b57; box-shadow: 0 0 12px rgba(255, 107, 87, 0.5); }
.pframe.sel-primary { animation: primaryPulseGold 0.9s ease-in-out infinite alternate; }
.eframe.sel-primary { animation: primaryPulseRed 0.9s ease-in-out infinite alternate; }
@keyframes primaryPulseGold {
  from { box-shadow: 0 0 10px rgba(217, 171, 79, 0.45); }
  to   { box-shadow: 0 0 22px rgba(245, 217, 138, 0.85), 0 0 4px rgba(245, 217, 138, 0.9); }
}
@keyframes primaryPulseRed {
  from { box-shadow: 0 0 10px rgba(255, 107, 87, 0.45); }
  to   { box-shadow: 0 0 22px rgba(255, 130, 110, 0.85), 0 0 4px rgba(255, 130, 110, 0.9); }
}
/* in classic mode, hover (tentative, blue) must read differently from selected (committed) */
body.classic-targeting .pframe:hover { border-color: #8fb8ff; }
body.classic-targeting .eframe:hover { border-color: #8fb8ff; cursor: pointer; }
body.classic-targeting .pframe.sel-friendly,
body.classic-targeting .pframe.sel-friendly:hover { border-color: var(--gold); }
body.classic-targeting .eframe.sel-hostile,
body.classic-targeting .eframe.sel-hostile:hover { border-color: #ff6b57; }
.pframe.role-tank { border-left: 4px solid #4f8fe8; }
.pframe.role-dps { border-left: 4px solid #e85b4f; }
.pframe.role-healer { border-left: 4px solid var(--heal); }
.pframe.dead { opacity: 0.55; filter: saturate(0.3); }
.pframe.low { animation: lowPulse 0.55s ease-in-out infinite alternate; }
@keyframes lowPulse { from { box-shadow: 0 0 0 rgba(255, 60, 40, 0); } to { box-shadow: 0 0 18px rgba(255, 60, 40, 0.55); } }
.pframe.hit { border-color: #ff8a7a; }
.pframe.aggro { border-color: var(--danger) !important; box-shadow: 0 0 16px rgba(255, 60, 40, 0.6); }
.pf-left { display: flex; align-items: center; font-size: 16px; }
.pf-main { flex: 1; min-width: 0; }
.pf-name { font-size: 13.5px; font-weight: 800; color: var(--parchment); white-space: nowrap; overflow: hidden; }
.pf-cls { font-size: 11px; font-weight: 400; }
.pf-hp-wrap { position: relative; height: 17px; background: #0a0812; border-radius: 5px; overflow: hidden; margin-top: 3px; }
.pf-hp-chip { position: absolute; inset: 0 auto 0 0; background: rgba(255, 235, 220, 0.35); }
.pf-hp { position: absolute; inset: 0 auto 0 0; transition: width 0.12s; }
.pf-hp.hp-good { background: linear-gradient(180deg, #74e89a, #2b9c54); }
.pf-hp.hp-warn { background: linear-gradient(180deg, #ffd97a, #c89b2a); }
.pf-hp.hp-crit { background: linear-gradient(180deg, #ff8a72, #c23a28); }
.pf-shield { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, rgba(126, 200, 255, 0.85) 0 5px, rgba(126, 200, 255, 0.55) 5px 10px); }
.pf-incoming { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(255, 90, 60, 0.5) 0 4px, transparent 4px 8px); display: none; }
.pf-incoming.show { display: block; animation: blink 0.5s steps(2) infinite; }
.pf-hp-text { position: absolute; inset: 0; font-size: 10.5px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; text-shadow: 0 1px 2px #000; }
.pf-buffs { display: flex; gap: 3px; margin-top: 3px; min-height: 16px; flex-wrap: wrap; }
.buff { font-size: 11px; line-height: 1; cursor: help; }
.buff.db { filter: drop-shadow(0 0 3px rgba(255, 60, 200, 0.8)); }
.buff.clause-buff { filter: drop-shadow(0 0 4px rgba(245, 217, 138, 0.75)); }
.buff.tether-buff { filter: drop-shadow(0 0 4px rgba(255, 154, 223, 0.8)); }
.pf-wounded { cursor: help; }

/* battlefield */
.battlefield-wrap {
  position: relative; flex: 1; min-width: 0; border-radius: 12px; overflow: hidden;
  border: 1px solid #2c2440; box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  background: #100c1c; /* letterbox bands when wrap ratio ≠ canvas ratio */
}
/* canvas is a replaced element with an intrinsic 960:430 ratio — height:auto +
   max-height keep it undistorted at any window size (letterboxed, never stretched) */
#bf { width: 100%; height: auto; max-height: 100%; display: block; }
#bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.chat-bubble {
  position: absolute; transform: translateX(-50%); max-width: 230px;
  background: rgba(250, 244, 228, 0.96); color: #241a10;
  font-size: 12.5px; font-weight: 600; line-height: 1.3;
  padding: 7px 11px; border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  animation: bubbleIn 0.25s cubic-bezier(0.2, 1.6, 0.4, 1);
  z-index: 6;
}
.chat-bubble::after {
  content: ''; position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: rgba(250, 244, 228, 0.96); border-bottom: none;
}
@keyframes bubbleIn { from { opacity: 0; transform: translateX(-50%) scale(0.6) translateY(8px); } to { opacity: 1; transform: translateX(-50%) scale(1); } }

/* bursts: CLUTCH! / OOM! / ULT */
#bursts { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; z-index: 7; }
.burst {
  font-family: var(--font-display); font-weight: 900; text-align: center;
  animation: burstPop 1.4s cubic-bezier(0.2, 1.5, 0.3, 1) forwards;
}
@keyframes burstPop {
  0% { opacity: 0; transform: scale(0.3) rotate(-6deg); }
  12% { opacity: 1; transform: scale(1.15) rotate(2deg); }
  22% { transform: scale(1) rotate(0); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.05) translateY(-16px); }
}
.burst-clutch { font-size: 44px; color: #ffe082; -webkit-text-stroke: 2px #7a4a10; text-shadow: 0 4px 0 rgba(0,0,0,0.45), 0 0 30px rgba(255, 200, 80, 0.6); }
.burst-star { color: #fff; }
.burst-sub {
  font-size: 14px; font-weight: 700; color: #fff2cf; -webkit-text-stroke: 0;
  text-shadow: 0 2px 3px rgba(0,0,0,0.7); margin-top: 2px; letter-spacing: 0.3px;
}
.burst-ult { font-size: 52px; color: #b8ffd0; -webkit-text-stroke: 2px #1a5c34; text-shadow: 0 4px 0 rgba(0,0,0,0.45), 0 0 40px rgba(86, 232, 140, 0.7); }
.burst-oom {
  font-size: 96px; color: #ff5b4a; -webkit-text-stroke: 3px #4a0e08;
  text-shadow: 0 6px 0 rgba(0,0,0,0.5), 0 0 60px rgba(255, 91, 74, 0.7);
  animation: oomPop 2s cubic-bezier(0.2, 1.5, 0.3, 1) forwards;
}
@keyframes oomPop {
  0% { opacity: 0; transform: scale(0.2) rotate(-10deg); }
  10% { opacity: 1; transform: scale(1.3) rotate(3deg); }
  20% { transform: scale(1) rotate(-1deg); }
  30% { transform: scale(1.06) rotate(1deg); }
  40% { transform: scale(1) rotate(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.1); }
}
.wipe-banner {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(120, 10, 5, 0.92); border: 2px solid var(--danger); border-radius: 10px;
  color: #ffd0c8; font-weight: 800; font-size: 16px; padding: 8px 18px; white-space: nowrap;
  animation: blink 0.6s steps(2) infinite; z-index: 8;
}

/* combat log side */
#combat-side {
  width: 260px; display: flex; flex-direction: column;
  background: rgba(12, 9, 19, 0.85); border: 1px solid #2c2440; border-radius: 10px; overflow: hidden;
  transition: width 0.2s, opacity 0.2s;
}
#combat-side.collapsed { width: 0; opacity: 0; border: none; }
.side-head { padding: 8px 12px; font-weight: 800; font-size: 13px; color: var(--gold); border-bottom: 1px solid #2c2440; }
#combat-log { flex: 1; overflow-y: auto; padding: 8px 10px; font-family: var(--font-mono); font-size: 11px; line-height: 1.5; }
.log-line { margin-bottom: 3px; color: #a8a0b4; }
.log-line.warn { color: var(--warn); }
.log-line.death { color: #ff8a7a; }
.log-line.clutch { color: #ffe082; }
.log-line.ghost { color: #a0c4ff; }
.log-line.boss { color: #ff9a8a; font-style: italic; }
.log-line.sys { color: var(--dim); font-style: italic; }

/* bottom bar */
.combat-bottom { padding-top: 8px; }
.cast-bar-wrap { height: 26px; display: flex; justify-content: center; }
.cast-bar {
  position: relative; width: min(420px, 80%); height: 20px;
  background: #0a0812; border: 1px solid var(--gold-dim); border-radius: 10px; overflow: hidden;
}
.cast-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #ffe49a, #c8962a); }
.cast-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #241a08; }
.mana-wrap { display: flex; flex-direction: column; align-items: center; margin: 4px 0 8px; }
.mana-bar {
  position: relative; width: min(560px, 92%); height: 24px;
  background: #0a0812; border: 1px solid #2c3a60; border-radius: 12px; overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.7);
}
.mana-fill {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(180deg, #7cc4ff 0%, #2668c8 55%, #1a4a9c 100%);
  transition: width 0.15s;
}
.mana-fill.blood-fill { background: linear-gradient(180deg, #ff7a86, #9d1428); }
.mana-fill.alchemy-fill { background: linear-gradient(90deg, #c94b55 0 36%, #3aa85d 36% 64%, #417ed9 64% 100%); }
.mana-fill::after { content: ''; position: absolute; inset: 0 0 55% 0; background: rgba(255, 255, 255, 0.22); border-radius: 12px 12px 0 0; }
.mana-fill.mana-low { background: linear-gradient(180deg, #ff9a7c, #c83a26); animation: blink 0.9s steps(2) infinite; }
.mana-fill.blood-fill.mana-low { background: linear-gradient(180deg, #ff3f5e, #6f0e1d); }
.mana-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #fff; text-shadow: 0 1px 3px #000; }
.alchemy-bar {
  width: min(560px, 92%); display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 5px;
}
.alchemy-meter {
  position: relative; height: 14px; border-radius: 7px; overflow: hidden;
  background: #0a0812; border: 1px solid #3a3350; box-shadow: inset 0 2px 5px rgba(0,0,0,0.7);
}
.alchemy-meter i { position: absolute; inset: 0 auto 0 0; width: 0; transition: width 0.15s; }
.alchemy-meter span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; }
.alchemy-meter.red i { background: linear-gradient(180deg, #ff8a8a, #b42c3c); }
.alchemy-meter.green i { background: linear-gradient(180deg, #8af0a0, #2d944d); }
.alchemy-meter.blue i { background: linear-gradient(180deg, #89c1ff, #2d63bb); }

.hotbar { display: flex; gap: 7px; justify-content: center; align-items: center; flex-wrap: wrap; }
.hb-slot {
  position: relative; width: 58px; height: 58px; cursor: pointer;
  background: linear-gradient(180deg, #241d3a, #151021);
  border: 2px solid #4a4064; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s, border-color 0.12s, filter 0.12s; overflow: hidden;
}
.hb-slot:hover { transform: translateY(-3px); border-color: var(--gold); }
.hb-slot.selected { border-color: var(--heal); box-shadow: 0 0 14px rgba(86, 232, 140, 0.6); }
.hb-slot.unaffordable .hb-icon { filter: grayscale(1) brightness(0.5); }
.hb-slot.unaffordable { border-color: #2a2438; }
.hb-slot.steam-locked { box-shadow: inset 0 0 0 2px rgba(255, 91, 74, 0.4); }
.hb-slot.moon-day { border-color: #b9903e; box-shadow: inset 0 0 0 1px rgba(255, 220, 138, 0.22); }
.hb-slot.moon-night { border-color: #5d65ad; box-shadow: inset 0 0 0 1px rgba(158, 199, 255, 0.25); }
.hb-slot.stacked-deck { border-color: #f0d06a; box-shadow: inset 0 0 0 1px rgba(240, 208, 106, 0.36), 0 0 14px rgba(240, 208, 106, 0.42); }
.hb-slot.encore-ready { border-color: #d6ff6f; box-shadow: inset 0 0 0 1px rgba(214, 255, 111, 0.28), 0 0 10px rgba(214, 255, 111, 0.32); }
.hb-slot.encore-active { border-color: #fff8cf; animation: queuedPulse 0.55s ease-in-out infinite alternate; }
.hotbar.beat-pulse .hb-slot[data-idx] { border-color: #d6ff6f; box-shadow: inset 0 0 0 1px rgba(214, 255, 111, 0.28), 0 0 12px rgba(214, 255, 111, 0.35); }
.hb-slot.gcd .hb-icon { filter: brightness(0.75); }
.hb-gcd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(8, 6, 14, 0.62); z-index: 1; pointer-events: none; }
.hb-slot.ready-flash { animation: gcdReady 0.28s ease-out; }
@keyframes gcdReady {
  0% { border-color: #bfe2ff; box-shadow: 0 0 14px rgba(124, 196, 255, 0.85); }
  100% { }
}
.hb-slot.queued { border-color: var(--gold-hi); animation: queuedPulse 0.5s ease-in-out infinite alternate; }
.hb-slot.channeling { border-color: #c99af0; animation: channelPulse 0.8s ease-in-out infinite alternate; }
@keyframes channelPulse {
  from { box-shadow: 0 0 6px rgba(201, 154, 240, 0.4); }
  to   { box-shadow: 0 0 16px rgba(201, 154, 240, 0.8); }
}
#player-cast.channeling .cast-fill { background: linear-gradient(180deg, #d9b3ff, #8a4fd0); }
.cast-bar-wrap.beat-pulse .cast-bar,
.cast-bar-wrap.beat-pulse::after {
  box-shadow: 0 0 14px rgba(214, 255, 111, 0.42);
}
.cast-bar-wrap { position: relative; }
.cast-bar-wrap::after {
  content: ''; position: absolute; left: 50%; top: -4px; width: 18px; height: 18px;
  transform: translateX(-50%) scale(0.65); border-radius: 50%;
  border: 1px solid rgba(214, 255, 111, 0); pointer-events: none;
}
.cast-bar-wrap.beat-pulse::after {
  border-color: rgba(214, 255, 111, 0.88);
  animation: beatRing 0.18s ease-out;
}
@keyframes beatRing {
  0% { transform: translateX(-50%) scale(0.35); opacity: 1; }
  100% { transform: translateX(-50%) scale(1.45); opacity: 0; }
}
/* bard: melody notes + active-song chips */
.melody-bar { display: flex; gap: 10px; justify-content: center; margin-bottom: 4px; }
.melody-bar .note { font-size: 17px; color: #4a4064; text-shadow: none; transition: all 0.25s; }
.melody-bar .note.on { color: #f2a0e0; text-shadow: 0 0 10px rgba(242, 160, 224, 0.8); transform: scale(1.25); }
.melody-bar.chord-flash .note { color: #fff; text-shadow: 0 0 18px #f2a0e0, 0 0 8px #fff; animation: chordPop 0.9s ease-out; }
@keyframes chordPop { 0% { transform: scale(2.1); } 100% { transform: scale(1.25); } }
#song-chips { display: flex; gap: 6px; justify-content: center; margin-top: 3px; min-height: 18px; }
.song-chip {
  font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 9px;
  background: rgba(44, 36, 64, 0.9); border: 1px solid #6a5a8a; color: #e8d8ff;
}
.song-chip.fading { animation: blink 0.4s steps(2) infinite; border-color: #ff8a7a; }
.moon-chip.day { border-color: #d9a94a; color: #fff0b8; background: rgba(68, 45, 18, 0.92); }
.moon-chip.night { border-color: #7d8cff; color: #dfe7ff; background: rgba(25, 26, 64, 0.92); }
.punch-chip { border-color: #7ee0d4; color: #d8fffb; }
.worklife-chip { border-color: #f0d06a; color: #fff6d8; animation: queuedPulse 0.7s ease-in-out infinite alternate; }
.beat-chip { border-color: #9fc957; color: #f3ffd0; background: rgba(31, 49, 20, 0.92); }
.beat-chip.on { animation: queuedPulse 0.35s ease-in-out infinite alternate; color: #ffffff; }
.charge-chip { border-color: #d6ff6f; color: #f4ffd8; background: rgba(32, 48, 18, 0.92); }
.charge-chip.full { color: #fff8cf; animation: queuedPulse 0.7s ease-in-out infinite alternate; }
.encore-chip { border-color: #fff8cf; color: #fffbe8; background: rgba(62, 54, 22, 0.94); animation: queuedPulse 0.65s ease-in-out infinite alternate; }
.sync-chip { border-color: #7ee0d4; color: #d8fffb; }
.fermata-chip { border-color: #d8d2c4; color: #ffffff; }
.keychange-chip { border-color: #f0d06a; color: #fff6d8; animation: queuedPulse 0.7s ease-in-out infinite alternate; }
.luck-chip { border-color: #d9a94a; color: #fff0b8; background: rgba(60, 43, 16, 0.92); }
.luck-chip.ready { animation: queuedPulse 0.6s ease-in-out infinite alternate; }
.stack-chip { border-color: #f0d06a; color: #fff6d8; background: rgba(74, 52, 18, 0.94); animation: queuedPulse 0.7s ease-in-out infinite alternate; }
.double-chip { border-color: #7ee0d4; color: #d8fffb; }
.loaded-chip { border-color: #d8d2c4; color: #ffffff; }
/* Guild Hall training board */
.train-tier { margin-bottom: 14px; }
.train-tier-head { font-family: var(--font-display); font-weight: 700; color: var(--gold); font-size: 18px; margin: 6px 0; }
.train-tier.t-locked .shop-grid { opacity: 0.45; filter: saturate(0.4); }
.train-item .rank-pips { display: flex; gap: 4px; justify-content: center; margin: 6px 0 2px; }
.train-item .rank-pips .pip.on { background: var(--gold); border-color: var(--gold-hi); }
@keyframes queuedPulse {
  from { box-shadow: 0 0 4px rgba(245, 217, 138, 0.35); }
  to   { box-shadow: 0 0 14px rgba(245, 217, 138, 0.75); }
}
.hb-slot.bandage { border-style: dashed; }
.hb-slot.empty { opacity: 0.4; }
.hb-icon { font-size: 25px; transition: filter 0.1s; }
.hb-key {
  position: absolute; top: 2px; left: 5px; font-size: 10px; font-weight: 800; color: var(--gold-hi);
  text-shadow: 0 1px 2px #000; z-index: 2;
}
.hb-cost { position: absolute; bottom: 2px; right: 5px; font-size: 10px; font-weight: 800; color: #7cc4ff; text-shadow: 0 1px 2px #000; z-index: 2; }
.fcost { color: #ffa04a; }
.hcost { color: #ff7a86; }
.pcost { color: #ffd06a; }
.gcost { color: var(--gold-hi); }
.dcost { color: #7ee0d4; }
.hb-cost.dcost {
  font-size: 9px; letter-spacing: 0; padding: 0 2px; border-radius: 4px;
  background: rgba(10, 8, 18, 0.72);
}
.alch-chip { border-color: #7ee0d4; color: #d8fffb; background: rgba(18, 47, 46, 0.92); }
.gold-bar {
  border-color: var(--gold-dim);
  background: linear-gradient(180deg, #21170b, #0d0905);
}
.gold-fill {
  background: linear-gradient(180deg, #fff6d8 0%, #d9ab4f 54%, #7a4b18 100%);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.18), 0 0 12px rgba(217,171,79,0.18);
}
.patron-chip { border-color: var(--gold); color: var(--gold-hi); background: rgba(64, 43, 12, 0.92); }
.patron-chip.broke { border-color: #ff7a86; color: #ffd3d8; animation: blink 0.5s steps(2) infinite; }
.time-chip { border-color: #9adfff; color: #d9ecff; background: rgba(18, 34, 64, 0.92); }
.comped-chip { border-color: #7ee0d4; color: #d8fffb; }
.whale-chip { border-color: var(--gold-hi); color: #fff6d8; animation: queuedPulse 0.7s ease-in-out infinite alternate; }
.loan-chip { border-color: #ff8a7a; color: #ffd3d8; background: rgba(72, 24, 22, 0.92); }
.clause-chip { border-color: #d8d2c4; color: #fff6d8; background: rgba(54, 48, 36, 0.94); }
.strike-chip { border-color: #ff8a7a; color: #fff6d8; background: rgba(72, 24, 22, 0.92); animation: queuedPulse 0.7s ease-in-out infinite alternate; }
.tether-chip { border-color: #ff9adf; color: #fff0fb; background: rgba(64, 28, 60, 0.92); }
.group-chip { border-color: #9adfff; color: #ecfbff; background: rgba(24, 50, 68, 0.92); }
.breakthrough-chip { border-color: #fff0b8; color: #fff8d6; background: rgba(72, 52, 26, 0.92); animation: queuedPulse 0.7s ease-in-out infinite alternate; }
.intern-chip { border-color: #d8d2c4; color: #fff6d8; background: rgba(42, 40, 50, 0.94); }
.intern-chip.empty { border-color: #8a7f75; color: #cfc7bd; background: rgba(34, 30, 36, 0.94); }
.delegate-chip { border-color: #9adfff; color: #ecfbff; background: rgba(24, 50, 68, 0.92); }
.seance-chip { border-color: #bd85ff; color: #efe0ff; background: rgba(42, 28, 62, 0.92); }
.spectral-chip, .promote-chip { border-color: #fff0b8; color: #fff8d6; background: rgba(72, 52, 26, 0.92); animation: queuedPulse 0.7s ease-in-out infinite alternate; }
.fervor-bar {
  position: relative; width: min(560px, 92%); height: 14px; margin-bottom: 4px;
  border-radius: 7px; overflow: hidden;
  background: #1a1226; border: 1px solid #4a3520;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.7);
}
.fervor-fill { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #ffb35c, #cc6a1a); transition: width 0.15s; }
.fervor-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 10px; color: #fff; text-shadow: 0 1px 2px #000;
}
.pressure-bar {
  height: 18px; border-color: #80603a;
  background: linear-gradient(180deg, #17101a, #0b0910);
  box-shadow: inset 0 2px 7px rgba(0,0,0,0.78), 0 0 0 1px rgba(255, 208, 106, 0.08);
}
.pressure-fill {
  background: linear-gradient(180deg, #f8f1d8 0%, #d89854 52%, #8b4c24 100%);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.2);
}
.pressure-redzone {
  position: absolute; top: 0; right: 0; bottom: 0; width: 20%;
  background: repeating-linear-gradient(135deg, rgba(255,91,74,0.35) 0 6px, rgba(255,210,74,0.18) 6px 12px);
  border-left: 1px solid rgba(255, 91, 74, 0.7); z-index: 1; pointer-events: none;
}
.pressure-needle {
  position: absolute; top: -3px; bottom: -3px; left: var(--pressure-pct, 0%);
  width: 2px; transform: translateX(-1px); background: #fff7d8; z-index: 2;
  box-shadow: 0 0 8px rgba(255, 247, 216, 0.85);
}
.pressure-bar.redline { border-color: #ffd24a; }
.pressure-bar.danger .pressure-needle { animation: pressureNeedle 0.08s linear infinite alternate; }
.pressure-bar.gasket {
  border-color: #ff5b4a; animation: gasketFlash 0.28s steps(2, end) infinite;
}
.pressure-bar.gasket .pressure-fill { background: linear-gradient(180deg, #ff5b4a, #6d1620); }
.pressure-bar.frozen .pressure-fill { filter: saturate(0.7) hue-rotate(165deg) brightness(1.08); }
.groove-bar {
  height: 18px; border-color: #668235;
  background: linear-gradient(180deg, #131912, #080c08);
  box-shadow: inset 0 2px 7px rgba(0,0,0,0.78), 0 0 0 1px rgba(214, 255, 111, 0.08);
}
.groove-fill {
  background: linear-gradient(180deg, #d6ff6f 0%, #80c957 55%, #315f2c 100%);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.2);
}
.groove-beats {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), rgba(255,255,255,0.24) calc(12.5% - 1px) 12.5%);
}
.charge-pips {
  position: absolute; inset: 3px 8px auto auto; z-index: 3; display: flex; gap: 4px; pointer-events: none;
}
.charge-pips span {
  width: 9px; height: 9px; border-radius: 2px; border: 1px solid rgba(214,255,111,0.38);
  background: rgba(8, 12, 8, 0.86); box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
}
.charge-pips span.on {
  background: linear-gradient(180deg, #fff8cf, #d6ff6f 60%, #80c957);
  border-color: #fff8cf; box-shadow: 0 0 7px rgba(214,255,111,0.8);
}
.groove-pocket {
  position: absolute; top: -3px; bottom: -3px; left: var(--beat-pct, 0%);
  width: 2px; transform: translateX(-1px); background: #fff8cf; z-index: 2;
  box-shadow: 0 0 8px rgba(214, 255, 111, 0.8);
}
.groove-bar.beat-now { border-color: #d6ff6f; box-shadow: inset 0 2px 7px rgba(0,0,0,0.78), 0 0 14px rgba(214, 255, 111, 0.45); }
.groove-bar.pocket .groove-fill { background: linear-gradient(180deg, #fff8cf 0%, #d6ff6f 48%, #80c957 100%); }
.groove-bar.pocket { animation: queuedPulse 0.8s ease-in-out infinite alternate; }
.luck-bar {
  height: 18px; border-color: #9a7132; cursor: pointer;
  background: linear-gradient(180deg, #211611, #0e0908);
  box-shadow: inset 0 2px 7px rgba(0,0,0,0.78), 0 0 0 1px rgba(240, 208, 106, 0.08);
}
.luck-fill {
  background: linear-gradient(180deg, #fff0b8 0%, #d9a94a 52%, #8a5a24 100%);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.2);
}
.luck-pips {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(255,255,255,0.18) calc(10% - 1px) 10%);
}
.luck-die {
  position: absolute; top: -6px; left: var(--luck-pct, 0%);
  transform: translateX(-50%); z-index: 2; color: #fff6d8; font-size: 18px;
  text-shadow: 0 0 8px rgba(240, 208, 106, 0.9), 0 1px 3px #000;
}
.luck-bar.ready { border-color: #f0d06a; box-shadow: inset 0 2px 7px rgba(0,0,0,0.78), 0 0 12px rgba(240, 208, 106, 0.35); }
.luck-bar.armed { animation: queuedPulse 0.65s ease-in-out infinite alternate; }
.luck-bar.armed .luck-fill { background: linear-gradient(180deg, #fff8cf 0%, #f0d06a 48%, #c88442 100%); }
.luck-bar.loaded .luck-die { animation: pressureNeedle 0.16s linear infinite alternate; }
.prep-chip { border-color: #d89854; color: #fff0b8; background: rgba(55, 35, 18, 0.92); }
.prep-chip.empty { border-color: #ff7a86; color: #ffd3d8; }
.fed-chip { border-color: #8bd684; color: #e6ffd9; background: rgba(20, 54, 28, 0.92); }
.prep-bar {
  height: 18px; border-color: #8d6238;
  background: linear-gradient(180deg, #21150e, #0d0805);
  box-shadow: inset 0 2px 7px rgba(0,0,0,0.78), 0 0 0 1px rgba(255, 208, 106, 0.08);
}
.prep-fill {
  background: linear-gradient(180deg, #ffe2a0 0%, #d89854 55%, #7b4424 100%);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.2);
}
.prep-slots {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc((100% / var(--prep-count, 5)) - 1px), rgba(255,255,255,0.18) calc((100% / var(--prep-count, 5)) - 1px) calc(100% / var(--prep-count, 5)));
}
.prep-spoon {
  position: absolute; top: -6px; right: 6px; z-index: 2; font-size: 17px;
  text-shadow: 0 0 8px rgba(255, 208, 106, 0.9), 0 1px 3px #000;
}
.prep-bar.empty { border-color: #ff7a86; }
.prep-bar.full { box-shadow: inset 0 2px 7px rgba(0,0,0,0.78), 0 0 12px rgba(255, 208, 106, 0.32); }
@keyframes pressureNeedle {
  from { transform: translateX(-2px) rotate(-2deg); }
  to   { transform: translateX(1px) rotate(2deg); }
}
@keyframes gasketFlash {
  0% { box-shadow: inset 0 2px 7px rgba(0,0,0,0.78), 0 0 10px rgba(255,91,74,0.25); }
  100% { box-shadow: inset 0 2px 7px rgba(0,0,0,0.78), 0 0 22px rgba(255,91,74,0.75); }
}
.hb-cd {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  background: rgba(10, 8, 18, 0.8); color: #fff; font-size: 17px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.hb-consumables { display: flex; gap: 5px; margin-left: 14px; }
.hb-consum { width: 44px; height: 44px; }
.hb-consum .hb-icon { font-size: 19px; }
.hb-ult {
  position: relative; width: 68px; height: 68px; margin-left: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(closest-side, #241d3a, #151021);
  border-radius: 50%; border: 2px solid #4a4064;
  transition: transform 0.12s;
}
.hb-ult:hover { transform: scale(1.06); }
.hb-ult .hb-icon { font-size: 27px; filter: grayscale(0.8) brightness(0.6); }
.hb-ult.ready { border-color: var(--gold-hi); animation: ultGlow 1s ease-in-out infinite alternate; }
.hb-ult.ready .hb-icon { filter: none; }
@keyframes ultGlow { from { box-shadow: 0 0 10px rgba(245, 217, 138, 0.4); } to { box-shadow: 0 0 26px rgba(245, 217, 138, 0.85); } }
.ult-ring { position: absolute; inset: -2px; transform: rotate(-90deg); }
.ult-track { fill: none; stroke: #2a2438; stroke-width: 7; }
.ult-prog { fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.3s; }
.clutch-pips { display: flex; flex-direction: column-reverse; gap: 4px; margin-left: 10px; }
.pip { width: 12px; height: 12px; border-radius: 50%; background: #241d3a; border: 1px solid #4a4064; transition: all 0.2s; }
.pip.pop { animation: pipPop 0.55s cubic-bezier(0.2, 1.5, 0.3, 1); }
@keyframes pipPop {
  0% { transform: scale(1); }
  40% { transform: scale(2); box-shadow: 0 0 14px var(--gold-hi); }
  100% { transform: scale(1); }
}
.pip.on { background: radial-gradient(circle at 35% 35%, #fff2c8, var(--gold)); border-color: var(--gold-hi); box-shadow: 0 0 8px rgba(245, 217, 138, 0.8); }

