body.host {
  min-height: 100vh;
  background: #070a09;
}

body.host .site-account-slot--floating,
body.host .account-chip {
  top: auto;
  bottom: 0.85rem;
  right: 0.85rem;
}

.host-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.host-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  background: linear-gradient(180deg, rgba(14, 18, 17, 0.96), rgba(8, 10, 9, 0.88));
  border-bottom: 1px solid var(--panel-border);
}

.host-top-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.host-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.host-bottom-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.host-main {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
  gap: 0.85rem;
  padding: 0.85rem;
  min-height: 0;
}

@media (max-width: 960px) {
  .host-main {
    grid-template-columns: 1fr;
  }
}

.stage {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--panel-border);
  overflow: hidden;
  background: #101614;
  box-shadow: var(--shadow);
}

.dragon-cinematic {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.turn-timer {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 0.55rem;
  z-index: 8;
  pointer-events: none;
}
.turn-timer[hidden] {
  display: none !important;
}
.turn-timer-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(8, 10, 9, 0.55);
  border: 1px solid rgba(242, 193, 78, 0.35);
  overflow: hidden;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
}
.turn-timer-fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #2a9d8f, #e9c46a);
  transition: width 0.4s linear, background 0.3s ease;
}
.turn-timer.is-low .turn-timer-fill {
  background: linear-gradient(90deg, #e76f51, #c0392b);
}
.dragon-cinematic[hidden] {
  display: none !important;
}
.dragon-cinematic video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trap-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at center, rgba(8, 10, 9, 0.28) 0%, rgba(4, 6, 5, 0.72) 70%);
  pointer-events: none;
  padding: clamp(0.75rem, 3vh, 2rem) clamp(1rem, 4%, 2.5rem) clamp(8.5rem, 34vh, 16rem);
  text-align: center;
}

.trap-overlay[hidden] {
  display: none !important;
}

.trap-overlay img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92%, 880px);
  max-height: min(52vh, 540px);
  object-fit: contain;
  object-position: center center;
  border-radius: 8px;
  border: 1px solid rgba(242, 193, 78, 0.28);
  background: rgba(0, 0, 0, 0.35);
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.7));
}

.trap-overlay p {
  margin: 0.55rem 0 0;
  max-width: min(92%, 880px);
  font-family: var(--font-display, inherit);
  font-size: clamp(1.05rem, 2.2vw, 1.7rem);
  color: #f4e6c4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.trap-overlay p:empty {
  display: none;
}

.stage-bg {
  z-index: 0;
}

.stage-inner,
.stage-decor,
.event-fx-layer,
.combat-fx-layer,
.damage-popups,
.turn-banner {
  position: relative;
  z-index: 2;
}

.stage-decor,
.event-fx-layer,
.combat-fx-layer,
.damage-popups,
.turn-banner {
  position: absolute;
}

.stage-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  z-index: 5;
}

.enemy-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  flex: 1;
  min-height: 0;
  overflow: visible;
  padding: 0.4rem 0.75rem 0;
}

.enemy-card {
  width: min(52vh, 46vw);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 0.2rem;
  background: transparent;
  border: 0;
  overflow: visible;
}

.enemy-card.boss {
  width: min(72vh, 78vw);
}

.enemy-card img,
.enemy-card .anim-sprite,
.enemy-card .anim-sprite.ai-poke {
  width: 100%;
  height: min(52vh, 46vw);
  max-height: min(52vh, 46vw, calc(100% - 3.4rem));
  object-fit: contain;
  background: transparent;
  flex-shrink: 1;
}

.enemy-card.boss img,
.enemy-card.boss .anim-sprite,
.enemy-card.boss .anim-sprite.ai-poke {
  height: min(68vh, 76vw);
  max-height: min(68vh, 76vw, calc(100% - 3.6rem));
  width: min(72vh, 78vw);
}

.enemy-card strong,
.enemy-card .hp-bar,
.enemy-card .hp-label,
.enemy-card .enemy-type,
.enemy-card .boss-phase-tag {
  flex-shrink: 0;
}

.enemy-card .hp-bar {
  width: 86%;
  margin: 0.2rem auto 0.1rem;
}

.lobby-dragon .anim-sprite,
.lobby-dragon .anim-sprite.ai-poke,
.lobby-dragon .sheet-sprite {
  width: min(72vh, 78vw);
  height: min(72vh, 78vw);
  opacity: 0.95;
  margin: 0 auto;
  display: block;
}

.chest-idle {
  width: 140px;
  height: 140px;
  margin: 2rem auto;
  display: block;
}

.setup-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    linear-gradient(180deg, rgba(8, 10, 9, 0.55), rgba(8, 10, 9, 0.82)),
    radial-gradient(circle at 50% 30%, rgba(255, 77, 46, 0.12), transparent 55%);
  backdrop-filter: blur(2px);
}

.setup-overlay[hidden] {
  display: none !important;
}

.setup-card {
  width: min(460px, 100%);
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--panel-border);
  background: rgba(14, 18, 17, 0.94);
  box-shadow: var(--shadow);
  animation: brandIn 0.55s var(--ease-out) both;
}

.setup-card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.35rem;
}

.setup-card .lede {
  margin: 0 0 1rem;
  font-family: var(--font-story);
  color: var(--bone-dim);
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 0;
}

.panel {
  padding: 0.95rem;
}

.panel h2,
.panel h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.05rem;
}

.join-beacon {
  text-align: center;
}

.code-huge {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: 0.18em;
  color: var(--cream);
  margin: 0.35rem 0;
}

#qrBox {
  margin: 0.65rem auto 0;
  width: fit-content;
}

#qrBox img {
  width: 200px;
  height: 200px;
  background: #fff;
  padding: 8px;
  border: 2px solid var(--teal);
  box-shadow: 0 0 0 4px rgba(42, 157, 143, 0.18);
}

.heroes-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.heroes-panel-head h3 {
  margin: 0;
}

.heroes-hint {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.4rem;
  max-height: min(42vh, 380px);
  overflow: auto;
  padding-right: 0.15rem;
}

.player-chip {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.35rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(242, 193, 78, 0.16);
  font-size: 0.82rem;
}

.player-chip strong {
  font-size: 0.85rem;
  line-height: 1.15;
}

.player-chip.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px rgba(42, 157, 143, 0.55);
  background: rgba(42, 157, 143, 0.14);
  animation: turnPulse 1.1s ease-in-out infinite;
}

.player-chip.offline {
  opacity: 0.42;
  filter: grayscale(0.75);
}

.tag-triple {
  border-color: rgba(255, 77, 46, 0.55);
  color: #ffd7c8;
  background: rgba(255, 77, 46, 0.16);
}

.turn-banner {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 7;
  min-width: min(86%, 640px);
  text-align: center;
  padding: 0.65rem 1.1rem 0.75rem;
  background: rgba(8, 10, 9, 0.88);
  border: 2px solid var(--teal);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  animation: brandIn 0.35s var(--ease-out);
}

.turn-banner.is-triple {
  border-color: var(--ember);
}

.turn-banner-mode {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}

.turn-banner.is-triple .turn-banner-mode {
  color: var(--ember);
}

.turn-banner-names {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  color: var(--cream);
  margin: 0.2rem 0;
  line-height: 1.15;
}

.turn-banner-hint {
  font-size: 0.8rem;
  color: var(--bone-dim);
}

.narrative-panel {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 1.1rem 0.95rem;
  background:
    linear-gradient(180deg, rgba(8, 12, 11, 0.35), rgba(0, 0, 0, 0.78)),
    rgba(10, 14, 13, 0.55);
  border-top: 2px solid rgba(42, 157, 143, 0.4);
  box-shadow: inset 0 1px 0 rgba(242, 193, 78, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.narrative-panel.is-speaking {
  border-top-color: rgba(242, 193, 78, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(242, 193, 78, 0.14),
    0 0 0 1px rgba(242, 193, 78, 0.12);
}

.narrative-panel.is-dragon {
  border-top-color: rgba(255, 77, 46, 0.65);
  background:
    linear-gradient(180deg, rgba(80, 18, 12, 0.45), rgba(0, 0, 0, 0.78)),
    rgba(18, 10, 9, 0.55);
  text-shadow: 0 0 12px rgba(255, 90, 46, 0.45), 0 0 28px rgba(120, 20, 8, 0.35);
}

.narrative-panel.is-dragon.is-speaking .texto-narrador {
  animation: dragonEcho 2.4s ease-in-out infinite;
}

@keyframes dragonEcho {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(255, 90, 46, 0.35);
    letter-spacing: 0;
  }
  50% {
    text-shadow: 0 0 18px rgba(255, 120, 60, 0.7), 0 0 36px rgba(80, 10, 0, 0.5);
    letter-spacing: 0.01em;
  }
}

.narrative-panel.is-dragon .narrative-kicker {
  color: #ff9a8a;
}

.voice-status[data-state='dragon'] {
  color: #ff9a8a;
  animation: voicePulse 1.2s ease-in-out infinite;
}

.narrative-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.narrative-kicker {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.voice-status {
  font-size: 0.75rem;
  color: var(--bone-dim);
  max-width: 55%;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-status[data-state='loading'] {
  color: #9fd6cf;
}

.voice-status[data-state='ready'] {
  color: #8fd4a8;
}

.voice-status[data-state='speaking'] {
  color: var(--gold);
  animation: voicePulse 1.2s ease-in-out infinite;
}

.voice-status[data-state='error'],
.voice-status[data-state='muted'] {
  color: #ff9a8a;
}

@keyframes voicePulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.narrative-box {
  font-family: var(--font-story);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.5;
  min-height: 4.5rem;
  padding: 0.15rem 0.1rem 0.25rem;
  background: transparent;
  border-top: 0;
  color: var(--cream);
}

.texto-narrador {
  max-height: 28vh;
  overflow: auto;
}

.narrative-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
}

.narrative-toolbar #leer-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
}

.narrative-toolbar-hint {
  font-size: 0.75rem;
}

.host-bottom {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem 1rem;
  background: linear-gradient(0deg, rgba(14, 18, 17, 0.96), rgba(8, 10, 9, 0.88));
  border-top: 1px solid var(--panel-border);
}

.loot-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.loot-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(242, 193, 78, 0.12);
  font-family: var(--font-story);
}

/* Offer modal */
.fs-offer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 8, 7, 0.72);
  backdrop-filter: blur(4px);
}

.fs-offer[hidden] {
  display: none !important;
}

.fs-offer-card {
  width: min(480px, 100%);
  padding: 1.35rem 1.4rem;
  animation: brandIn 0.4s var(--ease-out);
}

.fs-offer-card h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  color: var(--gold);
}

.fs-offer-card .lede {
  margin: 0 0 1rem;
  font-family: var(--font-story);
  color: var(--bone-dim);
  line-height: 1.45;
}

.fs-offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

/* Fullscreen cinema — immersive (no chrome) */
html:fullscreen .site-account-slot,
html:-webkit-full-screen .site-account-slot,
html:fullscreen .account-chip,
html:-webkit-full-screen .account-chip {
  display: none !important;
}

html:fullscreen body.host,
html:-webkit-full-screen body.host,
body.host.is-fs {
  background: #050706;
}

html:fullscreen .host-shell,
html:-webkit-full-screen .host-shell,
body.host.is-fs .host-shell {
  min-height: 100vh;
  height: 100vh;
  /* top/bottom están display:none → solo queda host-main;
     una sola fila evita meter el escenario en la fila 0px */
  grid-template-rows: 1fr;
}

html:fullscreen .host-top,
html:-webkit-full-screen .host-top,
body.host.is-fs .host-top,
html:fullscreen .host-bottom,
html:-webkit-full-screen .host-bottom,
body.host.is-fs .host-bottom,
html:fullscreen .side-panel,
html:-webkit-full-screen .side-panel,
body.host.is-fs .side-panel {
  display: none !important;
}

html:fullscreen .host-main,
html:-webkit-full-screen .host-main,
body.host.is-fs .host-main {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  min-height: 0;
  height: 100%;
}

html:fullscreen .stage,
html:-webkit-full-screen .stage,
body.host.is-fs .stage {
  min-height: 0;
  height: 100%;
  border: none;
  border-radius: 0;
}

html:fullscreen .narrative-panel,
html:-webkit-full-screen .narrative-panel,
body.host.is-fs .narrative-panel {
  padding: 1rem 1.35rem 1.1rem;
}

html:fullscreen .narrative-box,
html:-webkit-full-screen .narrative-box,
body.host.is-fs .narrative-box {
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  min-height: 5.5rem;
  padding: 0.2rem 0.1rem 0.35rem;
}

html:fullscreen .trap-overlay,
html:-webkit-full-screen .trap-overlay,
body.host.is-fs .trap-overlay {
  padding-bottom: clamp(9rem, 32vh, 18rem);
}

html:fullscreen .trap-overlay img,
html:-webkit-full-screen .trap-overlay img,
body.host.is-fs .trap-overlay img {
  max-width: min(78vw, 1100px);
  max-height: min(58vh, 680px);
}

html:fullscreen .turn-banner-names,
html:-webkit-full-screen .turn-banner-names,
body.host.is-fs .turn-banner-names {
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
}

html:fullscreen .event-fx-layer,
html:-webkit-full-screen .event-fx-layer,
body.host.is-fs .event-fx-layer {
  display: none !important;
}

.emote-layer {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  overflow: hidden;
}

.emote-fly {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  animation: emoteRise 3s ease-out forwards;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

.emote-fly-icon {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1;
}

.emote-fly-name {
  font-size: 0.85rem;
  color: #ffe8c8;
  background: rgba(8, 10, 9, 0.72);
  border: 1px solid rgba(242, 193, 78, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

@keyframes emoteRise {
  0% { opacity: 0; transform: translateY(24px) scale(0.7); }
  15% { opacity: 1; transform: translateY(0) scale(1.08); }
  70% { opacity: 1; transform: translateY(-48px) scale(1); }
  100% { opacity: 0; transform: translateY(-110px) scale(0.92); }
}

.fs-turn-bar {
  position: absolute;
  top: 0.65rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  min-width: min(520px, 70vw);
  max-width: 86vw;
  padding: 0.45rem 1rem;
  text-align: center;
  background: rgba(8, 10, 9, 0.78);
  border: 1px solid rgba(242, 193, 78, 0.4);
  border-radius: 4px;
  pointer-events: none;
}
.fs-turn-bar[hidden] { display: none !important; }
.fs-turn-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f2c14e;
}
.fs-turn-bar strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  color: #fff4e4;
}

.fs-party-rail {
  position: absolute;
  top: 4.2rem;
  right: 0.7rem;
  z-index: 11;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: calc(100% - 5.5rem);
  overflow: auto;
  width: min(220px, 32vw);
  pointer-events: none;
}
.fs-party-rail[hidden] { display: none !important; }
.fs-party-chip {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0.45rem;
  background: rgba(8, 10, 9, 0.78);
  border: 1px solid rgba(242, 193, 78, 0.28);
  border-radius: 4px;
}
.fs-party-chip.is-turn {
  border-color: rgba(42, 157, 143, 0.75);
  box-shadow: 0 0 0 1px rgba(42, 157, 143, 0.35);
}
.fs-party-chip.is-down {
  opacity: 0.45;
  filter: grayscale(0.7);
}
.fs-party-meta {
  min-width: 0;
  flex: 1;
}
.fs-party-meta strong {
  display: block;
  font-size: 0.82rem;
  color: #fff4e4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fs-party-meta .hp-bar {
  height: 0.35rem;
  margin: 0.2rem 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}
.fs-party-meta .hp-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c0392b, #f2c14e);
}
.fs-party-meta .muted {
  font-size: 0.72rem;
}

.fs-settings-fab {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  z-index: 12;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid rgba(242, 193, 78, 0.35);
  background: rgba(8, 10, 9, 0.72);
  color: var(--cream);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}
.fs-settings-fab:hover { opacity: 1; }

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 6, 5, 0.72);
}
.settings-overlay[hidden] { display: none !important; }

.settings-card {
  width: min(420px, 94vw);
  padding: 1.25rem 1.35rem 1.15rem;
}

.settings-grid {
  display: grid;
  gap: 0.55rem;
}
.volume-field {
  display: grid;
  gap: 0.35rem;
  color: var(--cream);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}
.volume-field input[type='range'] {
  width: 100%;
  accent-color: #2a9d8f;
}

html:fullscreen .enemy-card.boss .ai-art.enemy-art,
html:-webkit-full-screen .enemy-card.boss .ai-art.enemy-art,
body.host.is-fs .enemy-card.boss .ai-art.enemy-art,
html:fullscreen .lobby-dragon .ai-art.enemy-art,
html:-webkit-full-screen .lobby-dragon .ai-art.enemy-art,
body.host.is-fs .lobby-dragon .ai-art.enemy-art,
html:fullscreen .enemy-card.boss .anim-sprite.ai-poke,
html:-webkit-full-screen .enemy-card.boss .anim-sprite.ai-poke,
body.host.is-fs .enemy-card.boss .anim-sprite.ai-poke {
  width: min(78vh, 82vw);
  height: min(78vh, 82vw);
}

.combat-fx-layer {
  inset: 0;
  pointer-events: none;
  z-index: 4;
  display: grid;
  place-items: center;
}

.fx-kind {
  width: min(420px, 70vw);
  height: min(220px, 36vh);
  opacity: 0;
  animation: fxSlash 0.65s var(--ease-out) forwards;
}

.fx-slash { background: linear-gradient(120deg, transparent 40%, rgba(255,220,160,0.85) 50%, transparent 60%); transform: rotate(-18deg); }
.fx-bolt, .fx-fire { background: radial-gradient(circle, rgba(255,120,40,0.75), transparent 65%); }
.fx-smite { background: radial-gradient(circle, rgba(242,193,78,0.8), transparent 60%); }
.fx-arrow { background: linear-gradient(90deg, transparent, rgba(180,255,200,0.7), transparent); }
.fx-sneak { background: linear-gradient(150deg, transparent 45%, rgba(90,180,120,0.7) 52%, transparent 58%); }
.fx-impact { background: radial-gradient(circle, rgba(255,255,255,0.55), transparent 55%); }
.fx-song { background: radial-gradient(circle, rgba(212,160,23,0.55), transparent 60%); }
.fx-heal { background: radial-gradient(circle, rgba(42,157,143,0.65), transparent 60%); }
.fx-boss_phase {
  background: radial-gradient(circle, rgba(192,57,43,0.55), transparent 70%);
  animation: fxBossBanner 2s var(--ease-out) forwards;
}
.fx-devour, .fx-devour_resolve {
  background: radial-gradient(circle, rgba(80,10,10,0.7), rgba(192,57,43,0.35) 45%, transparent 70%);
  animation: fxBossBanner 2s var(--ease-out) forwards;
}
.fx-banner {
  display: grid;
  place-items: center;
  width: min(640px, 88vw);
  height: auto;
  min-height: 4.5rem;
  padding: 1rem 1.25rem;
  color: #ffe8c8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 2.6vw, 1.55rem);
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.85);
  border: 1px solid rgba(242,193,78,0.35);
  background: rgba(20,8,6,0.72);
  border-radius: 4px;
}

@keyframes fxBossBanner {
  0% { opacity: 0; transform: scale(0.92) translateY(12px); }
  20% { opacity: 1; transform: scale(1) translateY(0); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.02) translateY(-8px); }
}

.boss-phase-tag {
  position: absolute;
  top: 0.35rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #f2c14e;
  background: rgba(12,6,4,0.75);
  border: 1px solid rgba(242,193,78,0.4);
  white-space: nowrap;
}
.enemy-card.boss { position: relative; }
.enemy-card.boss .ai-art.boss-static,
.enemy-card.boss img.boss-static {
  width: min(360px, 58vw);
  height: min(360px, 58vw);
  object-fit: contain;
  animation: bossStaticPulse 2.8s ease-in-out infinite;
}
.boss-phase-2 { filter: saturate(0.85) brightness(0.92); }
.boss-phase-3 { filter: saturate(1.15) contrast(1.08) brightness(0.88); animation-duration: 1.6s !important; }

@keyframes bossStaticPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.turn-banner.is-devour {
  border-color: rgba(192, 57, 43, 0.65);
  background: rgba(80, 12, 8, 0.82);
}
.turn-banner.is-devour .turn-banner-mode {
  color: #ff8a4a;
}

@keyframes fxSlash {
  0% { opacity: 0; transform: scale(0.6) rotate(-24deg); }
  35% { opacity: 1; transform: scale(1.05) rotate(-12deg); }
  100% { opacity: 0; transform: scale(1.2) rotate(0deg); }
}

.damage-popups {
  inset: 12% 8% auto;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}

.dmg-popup {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  color: var(--cream);
  background: rgba(8,10,9,0.82);
  border: 1px solid rgba(242,193,78,0.35);
  padding: 0.45rem 0.85rem;
  animation: floatUp 2s ease forwards;
}

.dmg-popup.dmg-enemy { border-color: rgba(255,77,46,0.55); color: #ffb4a2; }
.dmg-popup.dmg-heal { border-color: rgba(42,157,143,0.55); color: #8fd9cf; }
.dmg-popup.dmg-miss { opacity: 0.85; }

.loot-title {
  color: var(--gold);
  font-family: var(--font-display);
  margin-top: 0.2rem;
}

.epilogue-block {
  list-style: none;
  margin-bottom: 0.85rem;
  color: var(--bone);
  font-family: var(--font-story);
  line-height: 1.5;
}
