/* ===== SPIRES OF AETHERIA (Expansive 1800x1600 Multi-Wing Chamber) ===== */

/* World Map Markers: tall painted spires standing on the map */
.ent-icon.ent-tower.tall, .ent-icon.ent-building.tall-spire {
  width: auto !important;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  cursor: pointer;
  overflow: visible;
}
.ent-icon.ent-tower.tall { height: 190px !important; min-width: 70px; }
.ent-icon.ent-building.tall-spire { height: 150px !important; min-width: 56px; }
.ent-icon.ent-tower.tall img.tower-tall, .ent-icon.ent-building.tall-spire img {
  height: 100%;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.85)) drop-shadow(0 0 12px var(--tower-glow, rgba(255,215,0,.5)));
  z-index: 2;
  transform-origin: 50% 100%;
  transition: transform .25s ease, filter .25s ease;
  animation: spireSway 6s ease-in-out infinite;
}
.ent-icon.ent-tower.tall:hover img.tower-tall { transform: scale(1.06); }
@keyframes spireSway { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.tower-aura {
  position: absolute; left: 50%; top: 4%;
  width: 120px; height: 120px; margin-left: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tower-glow, #ffd700) 0%, transparent 68%);
  opacity: .32; mix-blend-mode: screen;
  animation: towerAura 3.2s ease-in-out infinite; pointer-events: none; z-index: 1;
}
@keyframes towerAura { 0%,100% { opacity: .22; transform: scale(.92); } 50% { opacity: .42; transform: scale(1.08); } }
.tower-base-shadow {
  position: absolute; left: 50%; bottom: -6px; width: 120px; height: 24px; margin-left: -60px;
  border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.75) 0%, transparent 72%); z-index: 1; pointer-events: none;
}
.tower-sigil-badge {
  position: absolute; top: 4px; right: -4px;
  background: rgba(10, 8, 20, 0.94); border: 1px solid var(--tower-glow, #ffd700);
  border-radius: 12px; padding: 2px 6px; font-size: 13px; line-height: 1;
  box-shadow: 0 0 10px var(--tower-glow, #ffd700); z-index: 3;
}
.tower-name-tag {
  position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-family: 'Cinzel', serif; font-size: 10px; font-weight: 700; letter-spacing: .6px;
  color: var(--tower-glow, #ffd700); background: rgba(8,6,14,.82); border: 1px solid var(--tower-glow, #ffd700);
  border-radius: 9px; padding: 1px 8px; z-index: 3; text-shadow: 0 0 6px #000;
}

/* =========================================================
   WALKABLE TOWER SCREEN (#tower-screen)
========================================================= */
#tower-screen {
  position: fixed;
  inset: 0;
  z-index: 920;
  background: #040307;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  font-family: 'Fira Sans', sans-serif;
  color: #e6e2f0;
  display: flex;
  flex-direction: column;
}

/* Ambient glow & cosmic atmosphere */
#tower-screen .spire-bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, var(--tower-glow-dim, rgba(40, 25, 10, 0.5)) 0%, #030205 85%);
  pointer-events: none;
  z-index: 1;
}

/* Header HUD */
#tower-screen .tower-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: linear-gradient(180deg, rgba(12, 9, 20, 0.98) 0%, rgba(12, 9, 20, 0.88) 85%, transparent 100%);
  border-bottom: 1px solid var(--tower-glow, #ffd700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 30;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.9);
}

.tower-hud-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tower-hud-title .sigil {
  font-size: 26px;
  filter: drop-shadow(0 0 8px var(--tower-glow, #ffd700));
}

.tower-hud-title .names {
  display: flex;
  flex-direction: column;
}

.tower-hud-title .sname {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--tower-glow, #ffd700);
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.tower-hud-title .fbadge {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.tower-hud-shards {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.45);
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.15);
}

.tower-hud-shards .val {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.tower-hud-shards .risk {
  font-size: 9px;
  color: #ff5252;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.8px;
  animation: towerPulseRisk 1.6s ease-in-out infinite;
}

@keyframes towerPulseRisk {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; filter: drop-shadow(0 0 4px #ff5252); }
}

.tower-hud-btn {
  background: rgba(255, 75, 75, 0.18);
  border: 1px solid rgba(255, 75, 75, 0.6);
  color: #ff9999;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.tower-hud-btn:hover {
  background: rgba(255, 75, 75, 0.35);
  color: #fff;
  border-color: #ff5555;
}

/* =========================================================
   2D TOP-DOWN VIEWPORT & EXPANSIVE 1800x1600 MASTER BOARD
========================================================= */
#tower-screen .vp {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 5;
  cursor: crosshair;
}

#tower-screen .board {
  position: absolute;
  left: 0;
  top: 0;
  width: 1800px;
  height: 1600px;
  background-image: url('../assets/tower/spire_grand_chamber.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.98);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
  will-change: transform;
}

/* Transparent click navigation zones over the painted canvas */
#tower-screen .tile {
  position: absolute;
  box-sizing: border-box;
  background: transparent;
}

/* Floating Badges on Staircases & Doors */
.stairs-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  background: rgba(14, 10, 24, 0.92);
  border: 1px solid #ffd700;
  border-radius: 14px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 700;
  color: #ffd700;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  z-index: 15;
}

.stairs-badge.down {
  border-color: #00d4ff;
  color: #00d4ff;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.6);
}

.stairs-badge.up.locked {
  border-color: #ff5252;
  color: #ff8888;
}

.stairs-badge.up.unlocked {
  border-color: #ffd700;
  color: #ffd700;
  animation: badgeGlow 1.8s ease-in-out infinite;
}

@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.6); }
  50% { box-shadow: 0 0 22px rgba(255, 215, 0, 0.95); }
}

.puzzle-door-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  background: rgba(18, 12, 30, 0.94);
  border: 1px solid #00ffaa;
  border-radius: 12px;
  padding: 3px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  color: #00ffaa;
  box-shadow: 0 0 14px rgba(0, 255, 170, 0.5);
  pointer-events: none;
  z-index: 15;
  animation: doorBadgePulse 2s ease-in-out infinite;
}

@keyframes doorBadgePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); filter: brightness(1.3); }
}

/* Altar / Shrine Pulse Indicator */
.shrine-interact-zone {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed rgba(63, 224, 138, 0.4);
  animation: shrinePulse 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shrinePulse {
  0%, 100% { transform: scale(0.9); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* Relic Chest Glow Indicator */
.chest-interact-zone {
  position: absolute;
  inset: -8px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 215, 0, 0.4);
  animation: chestPulse 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes chestPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.4; }
  50% { transform: scale(1.08); opacity: 0.9; }
}

/* =========================================================
   ENTITIES: HERO, GUARDIAN, MONSTERS
========================================================= */
#tower-screen .ent {
  position: absolute;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.17s linear;
  z-index: 10;
}

#tower-screen .ent img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.85));
}

.ent-shadow, .hero-shadow {
  position: absolute;
  bottom: 0%;
  left: 15%;
  width: 70%;
  height: 20%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.85) 0%, transparent 75%);
  z-index: 1;
}

/* Hero */
#tower-screen .ent.hero {
  z-index: 14;
  pointer-events: none;
}

#tower-screen .ent.hero.walk img {
  animation: heroStepBob 0.17s ease-in-out infinite;
}

@keyframes heroStepBob {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-4px) scale(0.96, 1.04); }
}

/* Guardian Crown Badge */
.guard-crown, .titan-crown {
  position: absolute;
  top: -20px;
  background: rgba(15, 10, 25, 0.95);
  border: 1px solid #ffd700;
  border-radius: 10px;
  padding: 2px 8px;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  color: #ffd700;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
  z-index: 15;
}

.titan-crown {
  border-color: #ff3366;
  color: #ff3366;
  font-size: 12px;
  box-shadow: 0 0 16px rgba(255, 51, 102, 0.85);
}

.roaming-tag {
  position: absolute;
  top: -16px;
  background: rgba(10, 8, 18, 0.88);
  border: 1px solid #00d4ff;
  border-radius: 8px;
  padding: 1px 6px;
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  color: #00d4ff;
  white-space: nowrap;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
  z-index: 15;
}

/* Tap Target Ripple Marker */
.tap-ripple {
  position: absolute;
  width: 52px;
  height: 52px;
  margin-left: -26px;
  margin-top: -26px;
  border-radius: 50%;
  border: 2px solid #ffd700;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.45) 0%, transparent 70%);
  pointer-events: none;
  z-index: 25;
  animation: tapPulse 0.55s ease-out forwards;
}

@keyframes tapPulse {
  0% { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Floating Say/Notification */
#tower-screen .tower-msg {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(14, 10, 24, 0.95);
  border: 1px solid var(--tower-glow, #ffd700);
  border-radius: 20px;
  padding: 8px 20px;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 600;
  color: #ffd700;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 35;
}

#tower-screen .tower-msg.on {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* =========================================================
   ENCOUNTER PREVIEW MODAL (Przed walką wiadomo z kim walczysz!)
========================================================= */
.tower-preview-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px;
}

.preview-badge {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.preview-name {
  color: #fff;
  font-size: 20px;
}

.preview-sub {
  font-size: 13px;
  color: #9d94b0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-portrait-box {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 4px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-aura {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  pointer-events: none;
  animation: portraitGlow 2.5s ease-in-out infinite;
}

@keyframes portraitGlow {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

.preview-monster-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9));
}

.preview-reward-box {
  background: rgba(18, 14, 28, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.preview-reward-box .lbl {
  font-size: 11px;
  color: #a8a0b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-reward-box .val {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffd700;
  margin: 4px 0;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.preview-reward-box .desc {
  font-size: 12px;
  color: #c9c5d8;
  line-height: 1.35;
}

.preview-btn-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.tower-fight-btn {
  background: linear-gradient(135deg, rgba(255, 60, 60, 0.35) 0%, rgba(255, 140, 0, 0.45) 100%);
  border: 1px solid #ff5533;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(255, 60, 60, 0.35);
  transition: all 0.2s ease;
}

.tower-fight-btn:hover {
  background: linear-gradient(135deg, rgba(255, 60, 60, 0.55) 0%, rgba(255, 140, 0, 0.65) 100%);
  transform: translateY(-1px);
}

/* =========================================================
   RUNIC DOOR PUZZLE MODAL (Zagadka Runiczna)
========================================================= */
.tower-puzzle-wrap {
  text-align: center;
  padding: 4px;
}

.puzzle-runes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.rune-cipher-card {
  background: rgba(18, 14, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 12px 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.rune-cipher-card:hover {
  background: rgba(26, 20, 40, 0.95);
  border-color: rgba(255, 215, 0, 0.5);
}

.rune-cipher-card.aligned {
  border-color: #00ffaa;
  background: rgba(0, 255, 170, 0.12);
  box-shadow: 0 0 16px rgba(0, 255, 170, 0.35);
}

.rune-cipher-card .rune-sym {
  font-size: 32px;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
  margin-bottom: 4px;
}

.rune-cipher-card .rune-lbl {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  color: #e6e2f0;
}

.rune-cipher-card .rune-status {
  font-size: 10px;
  color: #8f88a4;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.rune-cipher-card.aligned .rune-status {
  color: #00ffaa;
  font-weight: 700;
}

.unlocked-glow {
  animation: solveGlow 1.4s ease-in-out infinite;
}

@keyframes solveGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(0, 255, 170, 0.6); }
  50% { box-shadow: 0 0 26px rgba(0, 255, 170, 0.95); }
}

/* Hub Modals */
.tower-hub {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tower-hub-header {
  text-align: center;
  border-bottom: 1px solid rgba(255, 215, 0, 0.25);
  padding-bottom: 12px;
}

.tower-hub-header .sigil {
  font-size: 40px;
  filter: drop-shadow(0 0 14px var(--tower-glow, #ffd700));
}

.tower-hub-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  color: var(--tower-glow, #ffd700);
  margin: 6px 0 2px 0;
}

.tower-hub-header .sub {
  font-size: 13px;
  color: #a8a0b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tower-hub-header .desc {
  font-size: 13px;
  color: #c9c5d8;
  margin: 8px auto 0 auto;
  max-width: 420px;
  line-height: 1.4;
}

.tower-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.tower-stat-card {
  background: rgba(20, 16, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}

.tower-stat-card .lbl {
  font-size: 11px;
  color: #8f88a4;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.tower-stat-card .val {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  color: #e6e2f0;
}

.tower-actions-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.tower-primary-btn {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25) 0%, rgba(255, 170, 0, 0.35) 100%);
  border: 1px solid #ffd700;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.25);
  transition: all 0.2s ease;
}

.tower-primary-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.4) 0%, rgba(255, 170, 0, 0.5) 100%);
  box-shadow: 0 4px 22px rgba(255, 215, 0, 0.45);
  transform: translateY(-1px);
}

.tower-exit-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tower-ascend-btn {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 140, 0, 0.4) 100%);
  border: 1px solid #ffd700;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  font-weight: 700;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tower-ascend-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.5) 0%, rgba(255, 140, 0, 0.6) 100%);
}

.tower-flee-btn {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.25) 0%, rgba(0, 150, 255, 0.35) 100%);
  border: 1px solid #00d4ff;
  color: #fff;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tower-flee-btn:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.45) 0%, rgba(0, 150, 255, 0.55) 100%);
}
/* =========================================================
   v3: PAINTED WIDE FLOORS - entities, HUD extras, puzzles, summary
========================================================= */
#tower-screen .board { background-image: none !important; background: #040307; width: auto; height: auto; transition: transform 0.16s linear; }
#tower-screen .board-canvas { display: block; image-rendering: auto; }
#tower-screen .ent.hero { transition: transform 0.15s linear; }
#tower-screen .tower-loading { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-family: 'Cinzel', serif; font-size: 16px; color: #e9dfc4; letter-spacing: 1px; }
#tower-screen .tower-loading .sigil { font-size: 54px; animation: towerAura 1.6s ease-in-out infinite; filter: drop-shadow(0 0 18px var(--tower-glow)); }

.tg-ent { position: absolute; z-index: 9; cursor: pointer; transform: translate(-50%, -100%); pointer-events: auto; }
.tg-ent img { display: block; }
.tg-chest img { width: 66px; height: 66px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.85)); }
.tg-chest[data-tier="wood"] img { filter: sepia(.8) saturate(1.3) brightness(.85) drop-shadow(0 6px 8px rgba(0,0,0,.85)); }
.tg-chest[data-tier="silver"] img { filter: grayscale(.9) brightness(1.25) drop-shadow(0 0 10px rgba(190,220,255,.6)) drop-shadow(0 6px 8px rgba(0,0,0,.85)); }
.tg-chest[data-tier="gold"] img { filter: saturate(1.4) brightness(1.1) drop-shadow(0 0 12px rgba(255,215,0,.85)) drop-shadow(0 6px 8px rgba(0,0,0,.85)); }
.tg-ent.looted { opacity: .45; filter: grayscale(.8); }
.tg-spring img, .tg-altar img { width: 96px; height: 96px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.85)); }
.tg-altar img { filter: hue-rotate(250deg) saturate(1.6) drop-shadow(0 0 14px rgba(200,140,255,.8)); }
.tg-spring img { filter: hue-rotate(130deg) saturate(1.4) drop-shadow(0 0 14px rgba(70,200,255,.8)); }
.tg-glow { position: absolute; left: 50%; bottom: 8px; width: 120px; height: 120px; margin-left: -60px; border-radius: 50%; background: radial-gradient(circle, rgba(120,220,255,.45), transparent 70%); animation: towerAura 2.4s ease-in-out infinite; pointer-events: none; }
.tg-altar .tg-glow { background: radial-gradient(circle, rgba(210,150,255,.5), transparent 70%); }
.tg-tag { position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translateX(-50%); white-space: nowrap; font-family: 'Cinzel', serif; font-size: 10px; font-weight: 700; color: #ffe9a8; background: rgba(10,7,16,.88); border: 1px solid rgba(255,215,0,.55); border-radius: 9px; padding: 1px 8px; text-shadow: 0 0 5px #000; pointer-events: none; }
.tg-tag:empty { display: none; }
.tg-tag.big { font-size: 12px; padding: 3px 12px; border-color: #ffd700; }
.tg-tag.door { bottom: auto; top: -22px; font-size: 10px; border-color: rgba(255,154,74,.8); }
.tg-door.puzzle .tg-tag.door { border-color: rgba(138,212,255,.9); color: #bfe8ff; }
.tg-door { transform: none; z-index: 8; }
.tg-door img { width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(0,0,0,.8)); }
.tg-door.ew .tg-tag.door { top: auto; bottom: 100%; left: 50%; }
.tg-door.open .tg-tag { display: none; }
.tg-stairs { transform: translate(-50%, 0); z-index: 12; text-align: center; }
.tg-stairs.up .tg-tag { position: static; transform: none; display: inline-block; }
.tg-stairs .tg-sub { font-size: 10px; color: #ffd0a0; background: rgba(10,7,16,.85); border-radius: 8px; padding: 1px 8px; margin-top: 2px; font-family: 'Fira Sans', sans-serif; display: inline-block; }
.tg-stairs.down .tg-tag { position: static; transform: none; }

.tg-group { width: 0; height: 0; z-index: 11; }
.tg-mon { position: absolute; left: 0; top: 0; display: flex; align-items: flex-end; justify-content: center; }
.tg-mon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,.9)); animation: monIdle 3.2s ease-in-out infinite; }
.tg-mon:nth-child(2) img { animation-delay: -1s; } .tg-mon:nth-child(3) img { animation-delay: -2s; }
@keyframes monIdle { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.02, .985); } }
.tg-mon .ent-shadow { left: 12%; width: 76%; height: 16%; }
.tg-group .tg-badge { position: absolute; left: 0; top: 0; white-space: nowrap; font-family: 'Fira Sans', sans-serif; font-size: 11px; font-weight: 700; color: #ffd9d0; background: rgba(34,8,10,.92); border: 1px solid rgba(255,80,60,.8); border-radius: 10px; padding: 2px 9px; box-shadow: 0 0 10px rgba(255,60,40,.5); pointer-events: none; z-index: 5; }
.tg-group.role-roam .tg-badge { border-color: rgba(0,212,255,.7); color: #cdefff; background: rgba(6,18,30,.9); box-shadow: 0 0 10px rgba(0,212,255,.4); }
.tg-group.role-stairs .tg-badge { border-color: #ffd700; color: #ffe9a0; background: rgba(32,24,6,.93); box-shadow: 0 0 12px rgba(255,215,0,.55); }
.tg-group.role-titan .tg-badge { border-color: #ff3366; color: #ffd0dc; font-size: 13px; box-shadow: 0 0 18px rgba(255,51,102,.7); }

.tower-chips-row { position: absolute; top: 56px; left: 0; right: 0; z-index: 29; padding: 3px 10px; pointer-events: none; }
.tower-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tower-chips .chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: rgba(12,9,20,.9); border: 1px solid var(--tower-glow, #ffd700); color: #fff; box-shadow: 0 0 6px var(--tower-glow-subtle); }
.tower-chips .chip.none { color: #9b95b0; border-color: rgba(255,255,255,.18); font-weight: 400; }
.tower-chips.inline { justify-content: center; margin: 8px 0; }
.tower-hpbar { position: absolute; top: 88px; left: 10px; width: 120px; z-index: 29; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.tower-hpbar .hp, .tower-hpbar .mp { height: 7px; background: rgba(0,0,0,.7); border: 1px solid rgba(255,255,255,.2); border-radius: 4px; overflow: hidden; }
.tower-hpbar .hp i { display: block; height: 100%; background: linear-gradient(90deg, #b3202a, #ff5a4a); transition: width .3s; }
.tower-hpbar .mp i { display: block; height: 100%; background: linear-gradient(90deg, #1f5cb3, #4ab0ff); transition: width .3s; }
.tower-roomname { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 29; font-family: 'Cinzel', serif; font-size: 13px; letter-spacing: 1px; color: #f0e4c4; text-shadow: 0 0 8px #000, 0 0 3px #000; pointer-events: none; opacity: .9; }
.tower-roomname.pop { animation: roomPop 2.4s ease-out; }
@keyframes roomPop { 0% { opacity: 0; transform: translateX(-50%) scale(1.4); } 15% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: .9; } }
.tower-minimap { position: absolute; top: 90px; right: 8px; z-index: 29; width: 128px; height: auto; border: 1px solid var(--tower-glow, #ffd700); border-radius: 6px; box-shadow: 0 0 14px rgba(0,0,0,.9); cursor: pointer; opacity: .92; transition: width .25s; }
.tower-minimap.big { width: min(92vw, 560px); right: 4vw; top: 120px; z-index: 35; }
.tower-msg { bottom: 40px !important; }

.tower-stat-table { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; margin: 6px 0 10px; }
.tower-stat-table .row { display: flex; align-items: center; gap: 6px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.08); padding: 2px 0; }
.tower-stat-table .l { flex: 1; color: #b9b3cc; } .tower-stat-table .v { font-weight: 700; color: #fff; } .tower-stat-table .d { color: #6dff9a; font-size: 11px; min-width: 38px; text-align: right; }
.floor-summary { text-align: center; min-width: 250px; }
.floor-summary .fs-sigil { font-size: 46px; filter: drop-shadow(0 0 16px var(--tower-glow)); }
.floor-summary h2 { margin: 2px 0; color: var(--tower-glow, #ffd700); letter-spacing: 3px; }
.floor-summary .fs-arch { font-size: 12px; color: #b9b3cc; margin-bottom: 8px; }
.floor-summary .fs-sec { font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 1.5px; color: #ffd36b; margin-top: 10px; border-top: 1px solid rgba(255,215,0,.25); padding-top: 8px; }
.floor-summary .fs-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #ddd; margin: 6px 0; }
.floor-summary .fs-tip { font-size: 12px; color: #9fd8ff; margin: 6px 0 12px; font-style: italic; }

.pv-members { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; }
.pv-m { width: 76px; text-align: center; font-size: 10px; }
.pv-m img { width: 66px; height: 66px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.8)); }
.pv-m.lead img { width: 86px; height: 86px; }
.pv-m.lead { width: 96px; }
.pv-m .n { font-weight: 700; color: #fff; line-height: 1.1; } .pv-m .l { color: #ffd36b; }
.pv-weak { text-align: center; font-size: 12px; color: #9fe6a2; margin: 4px 0 8px; }

.chest-lines { margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.chest-line { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 7px 10px; font-size: 14px; text-align: left; }
.chest-line.boon { border-color: #6dff9a; color: #c6ffd8; background: rgba(40,140,80,.18); } .chest-line.shard { border-color: #ffd700; color: #ffe9a0; }
.chest-line.item { border-color: #c77dff; color: #ecd2ff; } .chest-line.heal { border-color: #ff7a8a; } .chest-line.trap { border-color: #ff4a4a; color: #ffb0b0; }
.altar-card { display: flex; align-items: center; gap: 10px; width: 100%; margin: 6px 0; padding: 10px 12px; border-radius: 12px; border: 1px solid #d79bff; background: linear-gradient(90deg, rgba(120,60,180,.35), rgba(30,16,50,.9)); color: #fff; font-size: 14px; cursor: pointer; }
.altar-card .ic { font-size: 24px; } .altar-card .t { flex: 1; text-align: left; font-family: 'Cinzel', serif; } .altar-card .v { color: #6dff9a; font-weight: 700; }

.pz-desc { font-size: 13px; color: #c9c5d8; text-align: center; margin: 4px 0 12px; } .pz-leads { font-size: 12px; color: #9fd8ff; text-align: center; }
.pz-lights { display: grid; grid-template-columns: repeat(3, 72px); gap: 8px; justify-content: center; margin: 8px 0; }
.pz-star { height: 72px; border-radius: 12px; border: 1px solid #555; background: #14101c; color: #444; font-size: 34px; cursor: pointer; }
.pz-star.on { background: radial-gradient(circle, #5b3f9a, #211238); color: #ffe9a0; border-color: #ffd700; box-shadow: 0 0 14px rgba(255,215,0,.5); }
.pz-memory { display: grid; grid-template-columns: repeat(3, 76px); gap: 8px; justify-content: center; margin: 8px 0; }
.pz-glyph { height: 76px; font-size: 34px; border-radius: 14px; border: 1px solid #6a5a8a; background: #17121f; color: #cdbfff; cursor: pointer; transition: all .12s; }
.pz-glyph.lit { background: radial-gradient(circle, #ffe9a0, #b8801e); color: #20140a; box-shadow: 0 0 26px #ffd700; transform: scale(1.08); }
.pz-riddle { font-style: italic; font-size: 14px; color: #f0e4c4; text-align: center; margin: 6px 0 12px; line-height: 1.4; }
.pz-answer { display: block; width: 100%; margin: 6px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid #6a5a8a; background: #17121f; color: #e6e2f0; font-size: 13px; text-align: left; cursor: pointer; }
.pz-answer.good { background: rgba(40,160,90,.35); border-color: #6dff9a; } .pz-answer.bad { background: rgba(160,40,40,.3); border-color: #ff6a6a; opacity: .6; }
.pz-levers { display: flex; justify-content: center; gap: 12px; margin: 10px 0; }
.pz-lever { width: 60px; height: 96px; border-radius: 10px; border: 1px solid #8a6a3a; background: linear-gradient(180deg, #2a2016, #120d08); color: #ffd36b; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 8px 0; cursor: pointer; font-size: 22px; }
.pz-lever.pulled { opacity: .5; transform: translateY(8px); border-color: #6dff9a; }
.pz-hist { font-size: 12px; color: #b9b3cc; margin-top: 6px; max-height: 90px; overflow: auto; } .pz-hist .h { padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,.07); }

.tower-hub .hub-tower-img { height: 150px; width: auto; max-width: 100%; object-fit: contain; display: block; margin: 0 auto 4px; }
.tower-workshop .ws-item { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
.tower-workshop .ws-item .ic { font-size: 24px; width: 32px; text-align: center; } .tower-workshop .ws-item .tx { flex: 1; } .tower-workshop .ws-item .n { font-weight: 700; font-size: 13px; color: #ffe9a0; } .tower-workshop .ws-item .d { font-size: 11px; color: #aaa; }
.tower-workshop .buy-btn { padding: 6px 10px; border-radius: 8px; border: 1px solid #ffd700; background: rgba(60,45,10,.9); color: #ffd700; font-weight: 700; cursor: pointer; } .tower-workshop .buy-btn:disabled { opacity: .35; cursor: default; }

.preview-portrait-box { width: 100% !important; height: auto !important; min-height: 100px; display: block !important; }
.preview-portrait-box .pv-members { position: relative; z-index: 2; }

.tg-door img { object-fit: contain; object-position: bottom; }
.tg-door.open { pointer-events: none; }

.tower-workshop .ws-sec { font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: 1.5px; color: #ffd36b; margin: 12px 0 4px; border-top: 1px solid rgba(255,215,0,.25); padding-top: 8px; }
.tower-workshop { max-height: 76vh; overflow-y: auto; }
