/* ==========================================================================
   EINHAL CHRONICLES // ХРОНИКИ ЭЙНХАЛЯ
   Warm Parchment, Burnt Umber, Heraldic Wax Seals & Aged Gold Palette
   High Legibility (Large Crisp Typography, Forum & Cormorant SC)
   Custom Interactive Preloader (Rotating Astrolabe, Light Rays & Progress)
   ========================================================================== */

:root {
  /* Королевский Сапфир & Холодное Золото Base */
  --bg-pitch: #060913;
  --bg-deep: #0a1020;
  --bg-surface: #10192e;
  --bg-card: #15223c;
  --bg-card-hover: #1e3054;
  --bg-parchment-deep: #0e172a;

  /* Холодное Золото & Звездное Серебро */
  --accent-gold: #dfba73;
  --accent-gold-bright: #f7dc9f;
  --accent-gold-dark: #9f7b35;
  --gold-glow: rgba(223, 186, 115, 0.32);
  --border-gold: rgba(223, 186, 115, 0.38);
  --border-gold-bright: rgba(247, 220, 159, 0.75);
  --accent-sapphire-night: #1e3a8a;
  --sapphire-glow: rgba(59, 130, 246, 0.35);

  /* The 4 Wax Seal Pigments */
  --seal-crimson: #c81e28;
  --seal-crimson-glow: rgba(200, 30, 40, 0.4);

  --seal-sapphire: #2563eb;
  --seal-sapphire-glow: rgba(37, 99, 235, 0.5);

  --seal-emerald: #1fa36c;
  --seal-emerald-glow: rgba(31, 163, 108, 0.4);

  --seal-bronze: #e67e22;
  --seal-bronze-glow: rgba(230, 126, 34, 0.4);

  --seal-amethyst: #9b59b6;
  --seal-amethyst-glow: rgba(155, 89, 182, 0.4);

  /* Tarn Currency Colors */
  --tarn-gold: #fbc02d;
  --tarn-silver: #f1f5f9;
  --tarn-copper: #fb923c;
  --tarn-iron: #cbd5e1;

  /* Ether & Mana */
  --accent-ether: #38bdf8;
  --accent-ether-glow: rgba(56, 189, 248, 0.35);

  /* High Legibility Text Palette (Bright, Crisp, Readable) */
  --text-pure: #ffffff;
  --text-parchment: #fbf5eb;
  --text-main: #ede3d5;
  --text-muted: #c8bdae;
  --text-faint: #988c7d;

  /* Borders & Hairlines */
  --border-wire: rgba(212, 175, 106, 0.2);
  --border-wire-strong: rgba(212, 175, 106, 0.4);

  /* Refined Aristocratic Typography */
  --font-display: 'Forum', 'Cinzel Decorative', Georgia, serif;
  --font-serif-display: 'Cinzel Decorative', 'Cinzel', serif;
  --font-serif-editorial: 'Cormorant Garamond', Georgia, serif;
  --font-sc: 'Cormorant SC', 'Cinzel', serif;
  --font-book: 'Old Standard TT', 'Cormorant Garamond', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body.editorial-body {
  background-color: var(--bg-pitch);
  color: var(--text-main);
  font-family: var(--font-serif-editorial);
  font-size: 19.5px;
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   КАСТОМНЫЙ РИТУАЛ ПРЕДЗАГРУЗКИ ЭЙНХАЛЯ
   Орбиты 4 печатей, живые угли, астролябия и расплавленный сургучный бар
   ========================================================================== */
.game-preloader-curtain {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #120c0f 0%, #060405 70%, #020102 100%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.85s ease;
  overflow: hidden;
}

/* Кинематографическая панорама монолитов Эйнхаля */
.preloader-cinematic-backdrop {
  position: absolute;
  inset: -40px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  filter: contrast(1.15) brightness(0.65);
}

.backdrop-landscape-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: landscapePan 24s ease-in-out infinite alternate;
}

@keyframes landscapePan {
  0% { transform: scale(1.04) translate(0, 0); }
  50% { transform: scale(1.12) translate(-20px, -10px); }
  100% { transform: scale(1.06) translate(15px, -6px); }
}

.game-preloader-curtain.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-ambient-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(0, 0, 0, 0.94) 85%, #000 100%);
  pointer-events: none;
  z-index: 1;
}

/* Эффект парящих огненных искр / углей */
.preloader-embers-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.ember-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #f59e0b;
  border-radius: 50%;
  box-shadow: 0 0 8px #f59e0b, 0 0 16px #ef4444;
  opacity: 0;
  animation: emberRise linear infinite;
}

@keyframes emberRise {
  0% { transform: translateY(100vh) translateX(0) scale(0.6); opacity: 0; }
  20% { opacity: 0.9; }
  80% { opacity: 0.7; }
  100% { transform: translateY(-10vh) translateX(30px) scale(1.2); opacity: 0; }
}

/* Вращающиеся лучи света (тонкая дымка) */
.preloader-rays-emitter {
  position: absolute;
  width: 700px;
  height: 700px;
  background: conic-gradient(from 0deg at 50% 50%, 
    transparent 0deg, rgba(212, 175, 106, 0.04) 30deg, transparent 60deg, 
    rgba(200, 30, 40, 0.04) 120deg, transparent 150deg, 
    rgba(212, 175, 106, 0.04) 210deg, transparent 240deg,
    rgba(155, 89, 182, 0.04) 300deg, transparent 330deg);
  border-radius: 50%;
  pointer-events: none;
  animation: preloaderRaysSpin 24s linear infinite;
  filter: blur(20px);
  opacity: 0.6;
}

@keyframes preloaderRaysSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.preloader-content-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 700px;
  width: 94%;
}

/* ==========================================================================
   АЛТАРЬ ПЕЧАТЕЙ: ЦЕНТР + 4 ОРБИТАЛЬНЫХ КЛАССА
   ========================================================================== */
.preloader-altar-stage {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

/* Вращающееся графическое кольцо астролябии */
.preloader-astrolabe-ring-graphic {
  position: absolute;
  width: 370px;
  height: 370px;
  animation: astrolabeSpin 20s linear infinite;
  filter: drop-shadow(0 0 14px rgba(212, 175, 106, 0.45));
  pointer-events: none;
}

.astrolabe-spin-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes astrolabeSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 4 Луча магических каналов к центру (СТРОГО ПОД ПЕЧАТЯМИ) */
.preloader-energy-conduits {
  position: absolute;
  width: 380px;
  height: 380px;
  pointer-events: none;
  z-index: 1; /* Гарантированно под печатями */
}

.conduit-track {
  stroke: rgba(212, 175, 106, 0.2);
  stroke-width: 2px;
  stroke-linecap: round;
}

.conduit-node-diamond {
  fill: #d4af6a;
  opacity: 0.45;
}

.energy-beam-halo {
  stroke-width: 8px;
  stroke-linecap: round;
  opacity: 0.12;
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.energy-beam {
  stroke-width: 2.5px;
  stroke-linecap: round;
  opacity: 0.25;
  stroke-dasharray: 12 18;
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.energy-beam.active {
  stroke-width: 3.5px;
  opacity: 1;
  stroke-dasharray: 16 12;
  animation: energyConduitFlow 1s linear infinite;
}

.energy-beam-halo.active {
  opacity: 0.85;
  animation: energyConduitPulse 1.8s ease-in-out infinite alternate;
}

@keyframes energyConduitFlow {
  0% { stroke-dashoffset: 56; }
  100% { stroke-dashoffset: 0; }
}

@keyframes energyConduitPulse {
  0% { stroke-width: 6px; opacity: 0.5; }
  100% { stroke-width: 11px; opacity: 0.95; }
}

.energy-beam.beam-seeker.active,
.energy-beam-halo.beam-seeker.active {
  filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.9));
}

.energy-beam.beam-adventurer.active,
.energy-beam-halo.beam-adventurer.active {
  filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.9));
}

.energy-beam.beam-artisan.active,
.energy-beam-halo.beam-artisan.active {
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.9));
}

.energy-beam.beam-merchant.active,
.energy-beam-halo.beam-merchant.active {
  filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.9));
}

.preloader-rays-halo {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 106, 0.22) 0%, transparent 70%);
  animation: preloaderPulse 3s ease-in-out infinite alternate;
  z-index: 2;
}

@keyframes preloaderPulse {
  0% { transform: scale(0.95); opacity: 0.5; }
  100% { transform: scale(1.12); opacity: 0.9; }
}

/* Центральная великая печать */
.preloader-seal-core {
  position: relative;
  width: 165px;
  height: 165px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 25px rgba(200, 30, 40, 0.65));
  animation: sealFloat 4s ease-in-out infinite alternate;
  z-index: 10; /* Выше лучей */
}

/* Рваный пергамент под Великой Печатью в центре */
.seal-parchment-backing-preloader {
  position: absolute;
  width: 138px;
  height: 138px;
  background: url('torn-parchment.png') no-repeat center center / contain;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.95));
  transform: rotate(2deg);
  pointer-events: none;
  z-index: 1;
}

@keyframes sealFloat {
  0% { transform: scale(0.98) translateY(0); }
  100% { transform: scale(1.04) translateY(-4px); }
}

.preloader-seal-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
}

.preloader-seal-burn-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  pointer-events: none;
  animation: sealBurn 2s ease-in-out infinite alternate;
  z-index: 3;
}

@keyframes sealBurn {
  0% { opacity: 0.3; }
  100% { opacity: 0.8; }
}

/* 4 Орбитальные печати классов (ВЫШЕ лучей) */
.preloader-orbit-seals {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  z-index: 15; /* Выше лучей */
}

.orbit-seal-node {
  position: absolute;
  width: 86px;
  height: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.6;
  transform: scale(0.92);
  cursor: pointer;
  z-index: 15;
}

.orbit-seal-disc {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.95));
  transition: all 0.4s ease;
}

/* Рваный лоскут пергамента под орбитальной печатью */
.orbit-parchment-backing {
  position: absolute;
  width: 68px;
  height: 68px;
  background: url('torn-parchment.png') no-repeat center center / contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9));
  transform: rotate(-3deg);
  pointer-events: none;
  z-index: 0;
}

.orbit-seal-disc img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 0.4s ease, transform 0.25s ease;
  z-index: 1;
}

.orbit-seal-name {
  font-family: var(--font-sc);
  font-size: 0.72rem;
  letter-spacing: 1.8px;
  color: var(--accent-gold);
  text-shadow: 0 2px 4px #000, 0 0 8px rgba(0, 0, 0, 0.95);
  margin-top: 4px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

/* Позиционирование 4 печатей по окружности 380px алтаря */
.node-seeker { top: -8px; left: calc(50% - 43px); }
.node-adventurer { right: -8px; top: calc(50% - 43px); }
.node-artisan { bottom: -8px; left: calc(50% - 43px); }
.node-merchant { left: -8px; top: calc(50% - 43px); }

/* Активное пробужденное состояние печати */
.orbit-seal-node.active {
  opacity: 1;
  transform: scale(1.15);
  animation: sealAwakeGlow 1.8s ease-in-out infinite alternate;
}

.node-seeker.active .orbit-seal-disc img {
  filter: drop-shadow(0 0 20px rgba(31, 163, 108, 0.95)) drop-shadow(0 0 6px #1fa36c);
}

.node-adventurer.active .orbit-seal-disc img {
  filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.95)) drop-shadow(0 0 6px #dc2626);
}

.node-artisan.active .orbit-seal-disc img {
  filter: drop-shadow(0 0 20px rgba(230, 126, 34, 0.95)) drop-shadow(0 0 6px #e67e22);
}

.node-merchant.active .orbit-seal-disc img {
  filter: drop-shadow(0 0 20px rgba(155, 89, 182, 0.95)) drop-shadow(0 0 6px #9b59b6);
}

.orbit-seal-node.active .orbit-seal-name {
  opacity: 1;
  color: #fff;
  text-shadow: 0 0 10px var(--accent-gold-bright), 0 2px 4px #000;
}

@keyframes sealAwakeGlow {
  0% { transform: scale(1.12); }
  100% { transform: scale(1.22); }
}

.orbit-glow-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  bottom: -4px;
  background: var(--accent-gold-bright);
  box-shadow: 0 0 8px #fff;
  opacity: 0;
}

.orbit-seal-node.active .orbit-glow-dot {
  opacity: 1;
}

/* Заголовки предзагрузки */
.preloader-header-box {
  margin-bottom: 22px;
}

.preloader-kicker-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.preloader-kicker-strip .flourish {
  color: var(--accent-gold);
  font-size: 0.85rem;
}

.preloader-sub-tag {
  font-family: var(--font-sc);
  font-size: 0.95rem;
  letter-spacing: 2.5px;
  color: var(--accent-gold);
}

.preloader-main-title {
  font-family: var(--font-display);
  font-size: 3rem;
  letter-spacing: 4px;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 0 24px rgba(212, 175, 106, 0.45);
}

/* Кастомный прогресс-бар: расплавленный сургуч и золото */
.preloader-progress-chassis {
  width: 100%;
  max-width: 480px;
  background: rgba(22, 16, 18, 0.9);
  border: 1.5px solid var(--border-gold);
  padding: 14px 18px;
  border-radius: 2px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.85), 0 8px 30px rgba(0, 0, 0, 0.7);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-decor-cap {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

.progress-bar-wireframe {
  position: relative;
  flex-grow: 1;
  height: 12px;
  background: rgba(10, 8, 9, 0.9);
  border: 1px solid rgba(212, 175, 106, 0.4);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9);
}

.progress-bar-fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, #991b1b 0%, #c81e28 50%, #f0d288 100%);
  box-shadow: 0 0 16px rgba(240, 210, 136, 0.7);
  transition: width 0.25s ease-out;
}

.progress-bar-spark {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: #ffffff;
  box-shadow: 0 0 12px #fff, 0 0 24px var(--accent-gold-bright);
}

.progress-meta-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.progress-status-text {
  font-family: var(--font-sc);
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  color: var(--accent-gold-bright);
}

.progress-pct-val {
  font-family: var(--font-book);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.preloader-lore-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.12rem;
  font-style: italic;
  color: var(--text-parchment);
  line-height: 1.5;
  margin-bottom: 22px;
}

.lore-bullet {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

/* Кнопка быстрого пропуска */
.btn-skip-preloader {
  background: rgba(212, 175, 106, 0.1);
  border: 1px solid var(--border-wire);
  color: var(--accent-gold);
  font-family: var(--font-sc);
  font-size: 0.82rem;
  letter-spacing: 2px;
  padding: 8px 18px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-skip-preloader:hover {
  background: rgba(212, 175, 106, 0.22);
  border-color: var(--accent-gold-bright);
  color: #fff;
  transform: translateY(-1px);
}

/* ==========================================================================
   ATMOSPHERIC VIGNETTE & WARM CANDLELIGHT
   ========================================================================== */
.medieval-vignette-overlay {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 0%, rgba(180, 40, 45, 0.12) 0%, transparent 65%),
    radial-gradient(circle at 10% 90%, rgba(201, 164, 98, 0.1) 0%, transparent 55%),
    radial-gradient(circle at 90% 80%, rgba(155, 89, 182, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(10, 7, 8, 0.88) 100%);
  pointer-events: none;
  z-index: 1;
}

.candlelight-flicker {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 75% 25%, rgba(230, 126, 34, 0.05) 0%, transparent 45%);
  pointer-events: none;
  z-index: 2;
  animation: candleBreath 6s ease-in-out infinite alternate;
}

@keyframes candleBreath {
  0% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0.75; transform: scale(0.99); }
}

.parchment-grain-overlay {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(240, 230, 214, 0.025) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 3;
  opacity: 0.6;
}

/* ==========================================================================
   MASTHEAD (ВЕРХНЯЯ ШАПКА — УВЕЛИЧЕННЫЕ ШРИФТЫ)
   ========================================================================== */
.masthead {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 36px;
  border-bottom: 2px solid var(--border-wire-strong);
  background: linear-gradient(180deg, rgba(22, 17, 19, 0.96) 0%, rgba(13, 10, 11, 0.94) 100%);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(201, 164, 98, 0.2);
}

.masthead-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sigil-stamp-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 2px 10px rgba(200, 30, 40, 0.5));
}

.sigil-stamp-wrap:hover {
  transform: scale(1.08) rotate(-4deg);
  filter: drop-shadow(0 4px 16px rgba(200, 30, 40, 0.8));
}

.sigil-stamp-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.kicker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flourish-left, .flourish-right {
  color: var(--accent-gold);
  font-size: 1rem;
}

.masthead-kicker {
  font-family: var(--font-sc);
  font-size: 0.86rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
}

.masthead-name {
  font-family: var(--font-display);
  font-size: 2.35rem;
  letter-spacing: 3px;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 0 16px rgba(201, 164, 98, 0.4);
}

/* Осада Карн-Грота */
.siege-gothic-tracker {
  width: 290px;
  background: rgba(18, 14, 16, 0.7);
  padding: 8px 14px;
  border: 1px solid var(--border-wire);
  border-radius: 2px;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.7);
}

.tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.tracker-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.war-icon { font-size: 0.95rem; }

.tracker-title {
  font-family: var(--font-sc);
  font-size: 0.8rem;
  letter-spacing: 1.8px;
  color: var(--text-muted);
}

.siege-status-badge {
  font-family: var(--font-book);
  font-size: 0.82rem;
  color: #f87171;
  font-weight: 700;
  letter-spacing: 1px;
}

.siege-track-filigree { position: relative; }

.siege-track-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 164, 98, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.siege-track-fill {
  height: 100%;
  background: linear-gradient(90deg, #991b1b 0%, #dc2626 70%, #ef4444 100%);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
  transition: width 0.4s ease;
}

/* Кошель Тарнов (Крупный, Четкий) */
.tarns-wallet-hud {
  display: flex;
  flex-direction: column;
  background: rgba(26, 20, 22, 0.9);
  border: 1px solid var(--border-gold);
  padding: 6px 14px;
  border-radius: 2px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.wallet-label {
  font-family: var(--font-sc);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  margin-bottom: 3px;
}

.tarns-badges-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tarn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 10, 8, 0.65);
  border: 1px solid rgba(212, 175, 106, 0.25);
  border-radius: 14px;
  padding: 3px 10px;
  font-family: var(--font-book);
  font-size: 1.02rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.tarn-pill:hover {
  background: rgba(30, 20, 16, 0.85);
  border-color: var(--accent-gold);
  transform: translateY(-1px);
}

.tarn-mini-coin {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
  transition: transform 0.2s ease;
}

.tarn-pill:hover .tarn-mini-coin {
  transform: scale(1.2) rotate(12deg);
}

.tarn-pill.gold { color: var(--tarn-gold); border-color: rgba(255, 215, 0, 0.35); }
.tarn-pill.silver { color: var(--tarn-silver); border-color: rgba(203, 213, 225, 0.35); }
.tarn-pill.copper { color: var(--tarn-copper); border-color: rgba(249, 115, 22, 0.35); }
.tarn-pill.iron { color: var(--tarn-iron); border-color: rgba(148, 163, 184, 0.35); }
.tarn-coin { font-size: 1rem; font-style: normal; }
.tarn-pill small { font-family: var(--font-sc); font-size: 0.72rem; opacity: 0.9; margin-left: 1px; }

.masthead-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metric-cartouche {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(28, 22, 25, 0.8);
  border: 1px solid var(--border-wire);
  padding: 6px 12px;
  border-radius: 2px;
}

.metric-symbol { font-size: 1.1rem; }
.metric-body { display: flex; flex-direction: column; }
.metric-caption { font-family: var(--font-sc); font-size: 0.7rem; letter-spacing: 1.2px; color: var(--text-faint); line-height: 1; }
.metric-number { font-family: var(--font-book); font-size: 1.05rem; font-weight: 700; color: #fff; line-height: 1.2; }
.metric-number.ether { color: var(--accent-ether); }

.btn-audio-medieval {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(201, 164, 98, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold-bright);
  font-family: var(--font-sc);
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  padding: 8px 12px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-audio-medieval:hover {
  background: rgba(201, 164, 98, 0.25);
  border-color: var(--accent-gold-bright);
}

.btn-audio-medieval.active {
  background: rgba(180, 40, 45, 0.35);
  border-color: #ef4444;
  color: #fff;
}

/* ==========================================================================
   SIDEBAR NAVIGATION (КРУПНЫЕ ШРИФТЫ)
   ========================================================================== */
.editorial-layout {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 120px 1fr;
  min-height: calc(100vh - 84px);
}

.editorial-sidebar {
  position: sticky;
  top: 84px;
  height: calc(100vh - 84px);
  align-self: flex-start;
  border-right: 1px solid var(--border-wire);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 28px;
  align-items: center;
  padding: 24px 0;
  background: linear-gradient(180deg, rgba(20, 15, 17, 0.96) 0%, rgba(13, 10, 11, 0.98) 100%);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

.sidebar-top-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cross-sigil { color: var(--accent-gold); font-size: 0.95rem; }
.roman-index { font-family: var(--font-sc); font-size: 0.88rem; letter-spacing: 2px; color: var(--accent-gold-bright); font-weight: 700; }
.vertical-title { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-sc); font-size: 0.74rem; letter-spacing: 3px; color: var(--text-faint); margin-top: 6px; }

.chapter-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.chapter-link {
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  padding: 12px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.25s ease;
  color: var(--text-muted);
  position: relative;
}

.chapter-flourish { font-size: 1.35rem; transition: transform 0.2s ease; }
.chapter-link:hover .chapter-flourish { transform: scale(1.15); }
.chapter-label { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 1.5px; color: #fff; margin-top: 3px; line-height: 1; }
.nav-sub-tag { font-family: var(--font-sc); font-size: 0.76rem; letter-spacing: 1px; color: var(--text-faint); margin-top: 2px; }

.chapter-link:hover { background: rgba(201, 164, 98, 0.08); }
.chapter-link:hover .chapter-label { color: var(--accent-gold-bright); }
.chapter-link.active {
  border-left-color: var(--seal-crimson);
  background: linear-gradient(90deg, rgba(200, 30, 40, 0.22) 0%, transparent 100%);
}
.chapter-link.active .chapter-label { color: var(--accent-gold-bright); }
.chapter-count { font-family: var(--font-book); font-size: 0.72rem; background: var(--seal-crimson); color: #fff; padding: 2px 6px; border-radius: 2px; border: 1px solid var(--accent-gold-dark); margin-top: 3px; }

.sidebar-bottom-seal { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wire-cross { color: var(--accent-gold); font-size: 1.1rem; }
.sidebar-footnote { writing-mode: vertical-rl; font-family: var(--font-sc); font-size: 0.72rem; color: var(--text-faint); letter-spacing: 1px; }

/* ==========================================================================
   EDITORIAL STAGE & CARDS
   ========================================================================== */
.editorial-stage {
  padding: 36px 44px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.editorial-pane {
  display: none;
  width: 100%;
  max-width: 1420px;
  margin: 0 auto;
  animation: medievalFadeIn 0.35s ease-out;
}
.editorial-pane.active { display: block; }

@keyframes medievalFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.medieval-card {
  position: relative;
  background: linear-gradient(180deg, rgba(35, 27, 30, 0.9) 0%, rgba(20, 15, 17, 0.97) 100%);
  border: 1.5px solid var(--border-gold);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.card-filigree-corners {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.card-filigree-corners::before {
  content: "❖";
  position: absolute;
  top: 4px; left: 6px;
  font-size: 12px;
  color: var(--accent-gold);
  line-height: 1;
}

.card-filigree-corners::after {
  content: "❖";
  position: absolute;
  bottom: 4px; right: 6px;
  font-size: 12px;
  color: var(--accent-gold);
  line-height: 1;
}

/* ==========================================================================
   PROLOGUE (4 КЛАССА С КРУПНЫМИ ЧИТАЕМЫМИ ШРИФТАМИ)
   ========================================================================== */
.manuscript-folio-frame {
  position: relative;
  background: linear-gradient(180deg, rgba(30, 23, 26, 0.94) 0%, rgba(16, 12, 14, 0.98) 100%);
  border: 1.5px solid var(--border-gold);
  padding: 40px 48px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.85);
}

.folio-corner { position: absolute; width: 22px; height: 22px; pointer-events: none; }
.folio-corner.top-left { top: 8px; left: 8px; border-top: 2px solid var(--accent-gold); border-left: 2px solid var(--accent-gold); }
.folio-corner.top-right { top: 8px; right: 8px; border-top: 2px solid var(--accent-gold); border-right: 2px solid var(--accent-gold); }
.folio-corner.bottom-left { bottom: 8px; left: 8px; border-bottom: 2px solid var(--accent-gold); border-left: 2px solid var(--accent-gold); }
.folio-corner.bottom-right { bottom: 8px; right: 8px; border-bottom: 2px solid var(--accent-gold); border-right: 2px solid var(--accent-gold); }

.prologue-hero-grid {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 48px;
  align-items: start;
}

.chapter-ribbon-tag {
  display: inline-block;
  font-family: var(--font-sc);
  font-size: 0.88rem;
  letter-spacing: 2px;
  color: var(--accent-gold-bright);
  background: rgba(200, 30, 40, 0.25);
  border: 1px solid var(--seal-crimson);
  padding: 4px 14px;
  border-radius: 2px;
  margin-bottom: 14px;
}

.editorial-hero-title {
  font-family: var(--font-display);
  font-size: 3.1rem;
  font-weight: 400;
  line-height: 1.15;
  color: #fff;
  letter-spacing: 2.5px;
  margin-bottom: 14px;
  text-shadow: 0 0 16px rgba(201, 164, 98, 0.3);
}

.editorial-hero-title em { font-style: italic; color: var(--accent-gold-bright); }

.manuscript-ornament-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 20px 0;
  color: var(--accent-gold);
}

.manuscript-ornament-divider.mini { margin: 10px 0 14px 0; }
.divider-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border-wire-strong), transparent); }
.divider-cross { font-size: 0.9rem; letter-spacing: 4px; opacity: 0.9; }

.editorial-lead-body {
  font-size: 1.25rem;
  line-height: 1.75;
  color: var(--text-parchment);
  margin-bottom: 28px;
}

.editorial-lead-body strong {
  color: #fff;
  font-weight: 600;
  border-bottom: 1px solid var(--accent-gold);
}

.dropcap {
  float: left;
  font-family: var(--font-display);
  font-size: 3.8rem;
  line-height: 0.85;
  padding: 8px 14px 4px 6px;
  margin-right: 14px;
  color: var(--accent-gold-bright);
  background: linear-gradient(135deg, rgba(200, 30, 40, 0.4) 0%, rgba(30, 10, 10, 0.8) 100%);
  border: 1px solid var(--seal-crimson);
  box-shadow: 0 0 12px rgba(200, 30, 40, 0.4);
}

.identity-editorial-box { padding: 22px; }

.gothic-input-line label {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.84rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.label-flourish { margin-right: 4px; }

.medieval-scroll-input {
  width: 100%;
  background: rgba(15, 11, 13, 0.85);
  border: 1.5px solid var(--border-gold);
  padding: 12px 16px;
  font-family: var(--font-serif-editorial);
  font-size: 1.35rem;
  color: #fff;
  border-radius: 2px;
  outline: none;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7);
  transition: all 0.25s ease;
}

.medieval-scroll-input:focus {
  border-color: var(--accent-gold-bright);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 12px var(--gold-glow);
}

.heritage-minimal-list label {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.84rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.heritage-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.heritage-tile {
  background: rgba(22, 17, 19, 0.7);
  border: 1px solid var(--border-wire);
  padding: 10px 12px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.heritage-tile:hover {
  border-color: var(--accent-gold);
  background: rgba(201, 164, 98, 0.1);
}

.heritage-tile.selected {
  border-color: var(--accent-gold-bright);
  background: linear-gradient(135deg, rgba(200, 30, 40, 0.3) 0%, rgba(35, 18, 22, 0.85) 100%);
  box-shadow: 0 0 14px rgba(200, 30, 40, 0.35);
}

.heritage-title {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.heritage-perk-text {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 3px;
}

/* 4 КЛАССА В СУРГУЧНЫХ ПЕЧАТЯХ (УВЕЛИЧЕННЫЕ И ЧЕТКИЕ) */
.calling-header-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.calling-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  letter-spacing: 3px;
  color: var(--accent-gold-bright);
}

.callings-four-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  perspective: 1200px;
}

/* =============================================================
   СТИЛИЗИРОВАННЫЕ КАРТОЧКИ ПРИЗВАНИЯ (МОНОЛИТНЫЕ СКРИЖАЛИ)
   ============================================================= */
.monolith-calling-card {
  position: relative;
  background: 
    radial-gradient(ellipse at 50% 12%, rgba(45, 30, 22, 0.88) 0%, rgba(22, 14, 11, 0.95) 55%, #0a0706 100%);
  border: 1px solid rgba(212, 175, 106, 0.32);
  box-shadow: 
    0 14px 34px rgba(0, 0, 0, 0.95),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 0 35px rgba(0, 0, 0, 0.92);
  padding: 26px 22px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform-style: preserve-3d;
  overflow: visible;
}

/* Металлические резные уголки фэнтези-скрижали */
.card-corner-bracket {
  position: absolute;
  font-size: 0.85rem;
  color: rgba(212, 175, 106, 0.55);
  pointer-events: none;
  line-height: 1;
  transition: all 0.25s ease;
  user-select: none;
}

.card-corner-bracket.tl { top: 6px; left: 8px; }
.card-corner-bracket.tr { top: 6px; right: 8px; }
.card-corner-bracket.bl { bottom: 6px; left: 8px; }
.card-corner-bracket.br { bottom: 6px; right: 8px; }

.monolith-calling-card:hover .card-corner-bracket,
.monolith-calling-card.selected .card-corner-bracket {
  color: var(--accent-gold-bright);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.85);
}

.monolith-calling-card:hover {
  border-color: rgba(212, 175, 106, 0.7);
  box-shadow: 
    0 20px 48px rgba(0, 0, 0, 0.96),
    inset 0 0 0 1px rgba(212, 175, 106, 0.3),
    0 0 25px rgba(212, 175, 106, 0.25);
}

/* Текстура волокон древнего пергамента */
.parchment-fiber-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.2) 0px, rgba(0,0,0,0.2) 1px, transparent 1px, transparent 4px);
  z-index: 1;
}

/* Блик света/факела, следующий за курсором в 3D */
.parchment-specular-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
}

/* Контейнер содержимого карточки с 3D-глубиной */
.card-depth-layer {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateZ(25px);
  transform-style: preserve-3d;
  width: 100%;
}

.monolith-calling-card.selected {
  transform: translateZ(12px);
}

.monolith-calling-card[data-class="adventurer"].selected {
  border-color: #ef4444;
  box-shadow: 
    0 22px 50px rgba(0, 0, 0, 0.96),
    inset 0 0 35px rgba(185, 28, 28, 0.35),
    0 0 32px rgba(239, 68, 68, 0.75),
    inset 0 0 0 1px #f87171;
}

.monolith-calling-card[data-class="gatherer"].selected {
  border-color: #10b981;
  box-shadow: 
    0 22px 50px rgba(0, 0, 0, 0.96),
    inset 0 0 35px rgba(16, 185, 129, 0.35),
    0 0 32px rgba(16, 185, 129, 0.75),
    inset 0 0 0 1px #34d399;
}

.monolith-calling-card[data-class="artisan"].selected {
  border-color: #f59e0b;
  box-shadow: 
    0 22px 50px rgba(0, 0, 0, 0.96),
    inset 0 0 35px rgba(245, 158, 11, 0.35),
    0 0 32px rgba(245, 158, 11, 0.75),
    inset 0 0 0 1px #fbbf24;
}

.monolith-calling-card[data-class="merchant"].selected {
  border-color: #a855f7;
  box-shadow: 
    0 22px 50px rgba(0, 0, 0, 0.96),
    inset 0 0 35px rgba(168, 85, 247, 0.35),
    0 0 32px rgba(168, 85, 247, 0.75),
    inset 0 0 0 1px #c084fc;
}

/* Печать выпирает вперед в 3D пространстве на большом рваном пергаменте */
.class-seal-frame {
  position: relative;
  width: 220px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  background: transparent;
  transform-style: preserve-3d;
  transform: translateZ(40px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), filter 0.22s ease;
}

/* Широкая рваная грамота старого пергамента под сургучной печатью */
.seal-parchment-backing {
  position: absolute;
  width: 172px;
  height: 148px;
  background: transparent;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.98)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
  transform: rotate(-2.5deg);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.monolith-calling-card[data-class="gatherer"] .seal-parchment-backing { transform: rotate(-3.5deg); }
.monolith-calling-card[data-class="adventurer"] .seal-parchment-backing { transform: rotate(3deg); }
.monolith-calling-card[data-class="artisan"] .seal-parchment-backing { transform: rotate(-2deg); }
.monolith-calling-card[data-class="merchant"] .seal-parchment-backing { transform: rotate(3.5deg); }

.torn-parchment-sheet-img,
.authentic-parchment-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Сургучная печать: сияющая, яркая, оттиснутая строго поверх рваного пергамента */
.class-seal-img {
  position: relative;
  width: 122px;
  height: 122px;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* 3D Анимация удара сургучной печати */
@keyframes sealImpact {
  0% { transform: translateZ(40px) scale(1); }
  35% { transform: translateZ(10px) scale(0.92); }
  65% { transform: translateZ(65px) scale(1.15); }
  100% { transform: translateZ(40px) scale(1); }
}

.monolith-calling-card.seal-strike .class-seal-frame {
  animation: sealImpact 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Заголовок и геральдический бейдж */
.card-crest-header {
  margin-top: 4px;
  margin-bottom: 8px;
}

.monolith-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 2.2px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  margin-bottom: 5px;
}

.monolith-role-badge {
  display: inline-block;
  font-family: var(--font-sc);
  font-size: 0.74rem;
  letter-spacing: 2.2px;
  color: var(--accent-gold);
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(212, 175, 106, 0.32);
  border-radius: 14px;
  padding: 3px 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.monolith-narrative {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.93rem;
  line-height: 1.55;
  color: #cfc2ad;
  margin-bottom: 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Блок особенностей и перков призвания с кастомными иконками */
.monolith-traits-container {
  width: 100%;
  margin-bottom: 4px;
}

.traits-section-title {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
  margin-bottom: 8px;
  text-align: left;
  border-bottom: 1px solid rgba(212, 175, 106, 0.2);
  padding-bottom: 4px;
}

.monolith-traits-deck {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.trait-card-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 11px;
  background: rgba(14, 10, 8, 0.7);
  border: 1px solid rgba(212, 175, 106, 0.2);
  border-left: 3px solid var(--accent-gold);
  border-radius: 4px;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.monolith-calling-card:hover .trait-card-row,
.monolith-calling-card.selected .trait-card-row {
  background: rgba(26, 18, 14, 0.85);
  border-color: rgba(212, 175, 106, 0.35);
}

.monolith-calling-card[data-class="adventurer"].selected .trait-card-row {
  border-left-color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}
.monolith-calling-card[data-class="gatherer"].selected .trait-card-row {
  border-left-color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}
.monolith-calling-card[data-class="artisan"].selected .trait-card-row {
  border-left-color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}
.monolith-calling-card[data-class="merchant"].selected .trait-card-row {
  border-left-color: #a855f7;
  border-color: rgba(168, 85, 247, 0.3);
}

.trait-icon-pod {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(35, 24, 18, 0.95) 0%, #0d0908 100%);
  border: 1px solid rgba(212, 175, 106, 0.35);
  border-radius: 4px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.9);
  transition: all 0.2s ease;
}

.monolith-calling-card[data-class="adventurer"].selected .trait-icon-pod {
  border-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4), inset 0 0 6px rgba(0, 0, 0, 0.9);
}
.monolith-calling-card[data-class="gatherer"].selected .trait-icon-pod {
  border-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4), inset 0 0 6px rgba(0, 0, 0, 0.9);
}
.monolith-calling-card[data-class="artisan"].selected .trait-icon-pod {
  border-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4), inset 0 0 6px rgba(0, 0, 0, 0.9);
}
.monolith-calling-card[data-class="merchant"].selected .trait-icon-pod {
  border-color: #a855f7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4), inset 0 0 6px rgba(0, 0, 0, 0.9);
}

.trait-svg-ico {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.9));
}

.trait-info-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.trait-title {
  font-family: var(--font-sc);
  font-size: 0.88rem;
  letter-spacing: 0.7px;
  color: #f6efe2;
  line-height: 1.25;
}

.trait-desc {
  font-family: var(--font-body);
  font-size: 0.79rem;
  color: #b3a590;
  line-height: 1.35;
}

/* Взрыв восковых искр */
.wax-spark-particle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  z-index: 99999;
  animation: waxSparkFly 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes waxSparkFly {
  0% { transform: translate(0, 0) scale(1.4); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0.2); opacity: 0; }
}

/* Легкая тряска экрана при ударе сургуча */
.screen-rumble {
  animation: screenRumble 0.3s ease-out;
}

@keyframes screenRumble {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 3px); }
  50% { transform: translate(2px, -2px); }
  75% { transform: translate(-1px, 1px); }
  100% { transform: translate(0, 0); }
}

.monolith-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: #fff;
  letter-spacing: 1.5px;
  line-height: 1.2;
}

.monolith-role {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.monolith-narrative {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-parchment);
  margin-bottom: 14px;
  flex-grow: 1;
}

.monolith-traits-deck {
  list-style: none;
  font-family: var(--font-book);
  font-size: 0.92rem;
  color: var(--accent-gold-bright);
  border-top: 1px solid var(--border-wire);
  padding-top: 10px;
  width: 100%;
}

.monolith-traits-deck li { margin-bottom: 4px; }

/* Кнопка скрепления клятвы сургучом */
.editorial-action-bar {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-wire);
  display: flex;
  justify-content: center;
}

.btn-royal-wax-seal {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #2a2024 0%, #161113 100%);
  border: 1.5px solid var(--border-gold);
  padding: 14px 36px 14px 20px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7);
}

.btn-royal-wax-seal:hover {
  border-color: var(--accent-gold-bright);
  background: linear-gradient(135deg, #36292e 0%, #1f171a 100%);
  box-shadow: 0 8px 32px var(--gold-glow);
  transform: translateY(-2px);
}

.btn-royal-wax-seal:active { transform: translateY(1px) scale(0.98); }

.wax-seal-icon-wrap {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(200, 30, 40, 0.6));
}

.btn-wax-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wax-seal-text-block { text-align: left; }
.seal-sub { display: block; font-family: var(--font-sc); font-size: 0.75rem; letter-spacing: 2px; color: var(--accent-gold); }
.seal-main { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 2px; color: #fff; display: block; }
.seal-arrow { font-size: 1.4rem; color: var(--accent-gold-bright); transition: transform 0.2s ease; }
.btn-royal-wax-seal:hover .seal-arrow { transform: translateX(4px); }

/* ==========================================================================
   1. ОПЛОТ КАРН-ГРОТ
   ========================================================================== */
.citadel-cinematic-spread {
  display: grid;
  grid-template-columns: 560px 1fr;
  overflow: hidden;
  margin-bottom: 30px;
}

.citadel-art-window {
  position: relative;
  min-height: 400px;
  border-right: 1px solid var(--border-gold);
}

.citadel-panoramic-img { width: 100%; height: 100%; object-fit: cover; }

.art-gradient-vignette {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(90deg, transparent 60%, rgba(19, 15, 17, 0.95) 100%),
    linear-gradient(180deg, transparent 70%, rgba(13, 10, 11, 0.85) 100%);
  pointer-events: none;
}

.art-ornate-cartouche {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(18, 14, 16, 0.9);
  border: 1px solid var(--border-gold);
  padding: 6px 14px;
  font-family: var(--font-sc);
  font-size: 0.82rem;
  letter-spacing: 2px;
  color: var(--accent-gold-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cartouche-icon { color: var(--accent-gold); font-size: 0.9rem; }

.citadel-editorial-narrative {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.citadel-meta-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.meta-tag { font-family: var(--font-sc); font-size: 0.82rem; letter-spacing: 2px; color: var(--accent-gold); }
.meta-coords { font-family: var(--font-book); font-size: 0.8rem; color: var(--text-faint); }

.citadel-heading {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 2px;
  color: #fff;
  line-height: 1.2;
}

.citadel-prose {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-parchment);
  margin-bottom: 24px;
}

.citadel-command-row { display: flex; flex-direction: column; gap: 12px; }

.btn-medieval-action {
  background: rgba(28, 22, 25, 0.75);
  border: 1.5px solid var(--border-wire);
  color: var(--text-main);
  padding: 14px 20px;
  font-family: var(--font-sc);
  font-size: 0.92rem;
  letter-spacing: 1.5px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.btn-medieval-action:hover {
  border-color: var(--accent-gold);
  background: rgba(201, 164, 98, 0.14);
  color: #fff;
}

.btn-medieval-action.prime {
  background: linear-gradient(90deg, rgba(200, 30, 40, 0.35) 0%, rgba(36, 24, 28, 0.7) 100%);
  border-color: var(--seal-crimson);
  color: #fff;
}

.btn-medieval-action.prime:hover {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.5) 0%, rgba(48, 28, 34, 0.85) 100%);
  box-shadow: 0 0 16px var(--seal-crimson-glow);
}

.action-ico { font-size: 1.2rem; }
.action-txt { flex-grow: 1; }
.action-arrow { color: var(--accent-gold); font-size: 1.2rem; }

/* Кварталы Карн-Грота */
.districts-wire-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.district-guild-card {
  position: relative;
  background: linear-gradient(180deg, rgba(30, 24, 27, 0.88) 0%, rgba(18, 14, 16, 0.96) 100%);
  border: 1.5px solid var(--border-gold);
  padding: 24px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.district-guild-card:hover {
  border-color: var(--accent-gold-bright);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 12px var(--gold-glow);
}

.district-seal-thumb {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

.district-seal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tile-top-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sc);
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.district-guild-card h4 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.district-guild-card p {
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.district-gold-link {
  font-family: var(--font-sc);
  font-size: 0.86rem;
  letter-spacing: 1.5px;
  color: var(--accent-gold-bright);
  font-weight: 700;
}

/* ==========================================================================
   2. РУБЕЖ (ВЫЛАЗКИ)
   ========================================================================== */
.expedition-editorial-split {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
}

.sectors-sidebar-col { padding: 24px; }

.section-micro-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sc);
  font-size: 0.86rem;
  letter-spacing: 2px;
  color: var(--accent-gold);
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-wire);
  padding-bottom: 8px;
}

.header-glyph { font-size: 0.95rem; }

.sectors-minimal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sector-editorial-item {
  background: rgba(24, 18, 20, 0.75);
  border: 1.5px solid var(--border-wire);
  padding: 14px 16px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sector-editorial-item:hover {
  border-color: var(--accent-gold);
  background: rgba(201, 164, 98, 0.1);
}

.sector-editorial-item.selected {
  border-color: var(--seal-crimson);
  background: linear-gradient(135deg, rgba(200, 30, 40, 0.25) 0%, rgba(28, 20, 22, 0.85) 100%);
  box-shadow: 0 0 14px rgba(200, 30, 40, 0.35);
}

.sec-wire-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-sc);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.sec-risk-badge { font-family: var(--font-book); font-size: 0.78rem; color: var(--accent-gold-bright); }
.sec-yield-text { font-size: 0.92rem; color: var(--text-parchment); margin-top: 5px; }

.manifest-wire-card {
  margin-top: 18px;
  background: rgba(20, 15, 17, 0.7);
  border: 1px solid var(--border-wire);
  padding: 16px;
  border-radius: 2px;
}

.manifest-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sc);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.status-pill.solo { color: var(--accent-gold-bright); }

.manifest-hero-line {
  display: flex;
  align-items: center;
  gap: 16px;
}

.manifest-seal-mini {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

.manifest-seal-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-manifest-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: #fff;
  letter-spacing: 1px;
}

.manifest-role { font-family: var(--font-sc); font-size: 0.82rem; color: var(--accent-gold); }

.manifest-synergy-note {
  margin-top: 12px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #fca5a5;
  background: rgba(200, 30, 40, 0.2);
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 10px;
  border-radius: 2px;
}

.expedition-theatre-col {
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.theatre-art-frame {
  position: relative;
  height: 330px;
  overflow: hidden;
  border: 1.5px solid var(--border-gold);
  border-radius: 2px;
}

.theatre-biome-img { width: 100%; height: 100%; object-fit: cover; }
.theatre-frame-gradient { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(15, 11, 13, 0.95) 100%); pointer-events: none; }
.theatre-hud-overlay { position: absolute; bottom: 18px; left: 24px; right: 24px; display: flex; justify-content: space-between; align-items: flex-end; }
.coord-tag { font-family: var(--font-sc); font-size: 0.84rem; letter-spacing: 2px; color: var(--accent-gold); display: block; }

.sector-display-name {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: #fff;
  letter-spacing: 1.5px;
  line-height: 1.1;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.9);
}

.theatre-danger-pill {
  font-family: var(--font-sc);
  font-size: 0.84rem;
  letter-spacing: 1.5px;
  padding: 6px 12px;
  border: 1px solid var(--seal-crimson);
  background: rgba(200, 30, 40, 0.45);
  color: #fff;
}

.editorial-terminal {
  margin-top: 16px;
  background: rgba(16, 12, 14, 0.88);
  border: 1px solid var(--border-wire);
  padding: 14px 18px;
  height: 125px;
  overflow-y: auto;
  font-family: var(--font-book);
  font-size: 1.02rem;
  line-height: 1.65;
}

.term-line.sys { color: var(--text-muted); }
.term-line.gain { color: var(--accent-gold-bright); }
.term-line.danger { color: #f87171; }

.command-deck-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.btn-command {
  background: rgba(26, 20, 23, 0.85);
  border: 1.5px solid var(--border-gold);
  padding: 16px;
  text-align: left;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.btn-command:hover {
  border-color: var(--accent-gold-bright);
  background: rgba(201, 164, 98, 0.14);
  transform: translateY(-2px);
}

.btn-command.accent {
  border-color: var(--accent-gold);
  background: linear-gradient(180deg, rgba(201, 164, 98, 0.12) 0%, rgba(26, 20, 23, 0.85) 100%);
}

.btn-command.danger {
  border-color: var(--seal-crimson);
  background: linear-gradient(180deg, rgba(200, 30, 40, 0.22) 0%, rgba(26, 20, 23, 0.85) 100%);
}

.cmd-kicker { font-family: var(--font-sc); font-size: 0.74rem; letter-spacing: 1.5px; color: var(--accent-gold); margin-bottom: 4px; }
.btn-command strong { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: 1px; color: #fff; margin-bottom: 3px; }
.btn-command small { font-size: 0.86rem; color: var(--text-parchment); }

/* ==========================================================================
   3. КУЗНЯ (ЦЕХ МАСТЕРОВ)
   ========================================================================== */
.crafting-workbench-split {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

.crafting-recipes-panel { padding: 26px; }

.crafting-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.crafting-title-seal {
  display: flex;
  align-items: center;
  gap: 16px;
}

.crafting-seal-avatar {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px var(--seal-bronze-glow));
}

.crafting-recipes-panel h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: #fff;
  letter-spacing: 1px;
}

.master-perk-badge {
  font-family: var(--font-sc);
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 6px 12px;
  border-radius: 2px;
}

.crafting-recipes-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.craft-recipe-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(24, 18, 21, 0.8);
  border: 1.5px solid var(--border-wire);
  padding: 16px 18px;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.craft-recipe-card:hover { border-color: var(--accent-gold); }
.craft-item-header { font-family: var(--font-display); font-size: 1.4rem; color: #fff; letter-spacing: 1px; }
.craft-cost-tarns { font-family: var(--font-book); font-size: 0.95rem; color: var(--accent-gold-bright); }

.crafting-side-panel { padding: 26px; }
.crafting-side-panel h3 { font-family: var(--font-display); font-size: 1.8rem; color: #fff; letter-spacing: 1px; margin-bottom: 6px; }

.fortress-status-box {
  background: rgba(18, 14, 16, 0.75);
  border: 1px solid var(--border-wire);
  padding: 18px;
  margin-top: 18px;
  border-radius: 2px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sc);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

/* ==========================================================================
   4. БИРЖА
   ========================================================================== */
.market-wire-triplet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.market-wire-col { padding: 24px; display: flex; flex-direction: column; }
.col-micro-bar { display: flex; justify-content: space-between; font-family: var(--font-sc); font-size: 0.78rem; letter-spacing: 2px; color: var(--accent-gold); margin-bottom: 8px; }
.market-wire-col h3 { font-family: var(--font-display); font-size: 1.85rem; color: #fff; letter-spacing: 1px; margin-bottom: 6px; }
.col-desc { font-size: 1.02rem; color: var(--text-parchment); margin-bottom: 18px; line-height: 1.5; }
.editorial-trade-rows { display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }

.wire-trade-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(24, 18, 21, 0.75);
  border: 1px solid var(--border-wire);
  padding: 12px 14px;
  border-radius: 2px;
}

.wire-trade-row:hover { border-color: var(--accent-gold); }
.trade-row-left { display: flex; align-items: center; gap: 12px; }
.trade-row-left > span { font-size: 1.6rem; }
.trade-item-name { font-family: var(--font-display); font-size: 1.15rem; color: #fff; letter-spacing: 0.5px; }
.trade-item-sub { font-family: var(--font-book); font-size: 0.88rem; color: var(--accent-gold-bright); }

.btn-trade-action {
  background: rgba(201, 164, 98, 0.14);
  border: 1.5px solid var(--border-gold);
  color: var(--accent-gold-bright);
  font-family: var(--font-sc);
  font-size: 0.86rem;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-trade-action:hover {
  background: rgba(201, 164, 98, 0.28);
  border-color: var(--accent-gold-bright);
  color: #fff;
}

.exchange-actions-box {
  background: rgba(18, 14, 16, 0.65);
  border: 1px solid var(--border-wire);
  padding: 18px;
  border-radius: 2px;
}

.exchange-rate-legend {
  margin-top: 16px;
  border-top: 1px solid var(--border-wire);
  padding-top: 12px;
  font-family: var(--font-sc);
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--text-parchment);
}

/* ==========================================================================
   5. ПАКТЫ
   ========================================================================== */
.tavern-wire-split { display: grid; grid-template-columns: 1fr 400px; gap: 24px; }
.contracts-main-block { padding: 24px; }
.contracts-head-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.contracts-head-row h3 { font-family: var(--font-display); font-size: 2rem; color: #fff; letter-spacing: 1px; }

.btn-parchment-pill {
  background: rgba(200, 30, 40, 0.25);
  border: 1.5px solid var(--seal-crimson);
  color: #fca5a5;
  font-family: var(--font-sc);
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  padding: 8px 16px;
  border-radius: 2px;
  cursor: pointer;
}

.contracts-editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.contract-scroll-tile {
  position: relative;
  background: linear-gradient(135deg, rgba(35, 27, 30, 0.92) 0%, rgba(20, 16, 18, 0.97) 100%);
  border: 1.5px solid var(--border-gold);
  padding: 20px;
  border-radius: 2px;
}

.contract-seal-badge { position: absolute; top: 14px; right: 14px; font-size: 1.35rem; }
.contract-guild-tag { font-family: var(--font-sc); font-size: 0.76rem; letter-spacing: 2px; color: var(--accent-gold); display: block; margin-bottom: 4px; }
.contract-scroll-tile h4 { font-family: var(--font-display); font-size: 1.5rem; color: #fff; letter-spacing: 1px; margin-bottom: 8px; }
.contract-scroll-tile p { font-size: 0.96rem; line-height: 1.5; color: var(--text-parchment); margin-bottom: 14px; }
.contract-req-box { background: rgba(18, 14, 16, 0.7); border: 1px solid var(--border-wire); padding: 10px 14px; margin-bottom: 14px; font-family: var(--font-sc); font-size: 0.88rem; color: var(--accent-gold-bright); }
.contract-bot-row { display: flex; justify-content: space-between; align-items: center; }
.contract-reward-val { font-family: var(--font-book); font-size: 1.15rem; font-weight: 700; color: var(--accent-gold-bright); }

.mercs-side-block { padding: 24px; }
.mercs-side-block h3 { font-family: var(--font-display); font-size: 1.85rem; color: #fff; letter-spacing: 1px; margin-bottom: 6px; }
.mercs-wire-stack { display: flex; flex-direction: column; gap: 14px; }

.merc-recruit-card {
  background: rgba(24, 18, 21, 0.75);
  border: 1.5px solid var(--border-wire);
  padding: 14px 16px;
  border-radius: 2px;
}

.merc-recruit-card.hired {
  border-color: var(--seal-crimson);
  background: linear-gradient(135deg, rgba(200, 30, 40, 0.25) 0%, rgba(28, 20, 22, 0.88) 100%);
}

.merc-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.merc-card-head strong { font-family: var(--font-display); font-size: 1.3rem; color: #fff; }
.merc-cost-badge { font-family: var(--font-book); font-size: 0.98rem; color: var(--accent-gold-bright); font-weight: 700; }
.merc-desc-text { font-size: 0.92rem; color: var(--text-parchment); line-height: 1.4; margin-bottom: 10px; }

/* ==========================================================================
   6. СУМА
   ========================================================================== */
.inventory-wire-split { display: grid; grid-template-columns: 1fr 420px; gap: 24px; }
.inventory-grid-side { padding: 24px; }
.inv-top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.inv-slots-readout { font-family: var(--font-book); font-size: 0.88rem; letter-spacing: 1px; color: var(--accent-gold); }

.editorial-hex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 12px;
}

.editorial-slot-box {
  aspect-ratio: 1;
  background: rgba(24, 18, 21, 0.88);
  border: 1.5px solid var(--border-gold);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.editorial-slot-box:hover {
  border-color: var(--accent-gold-bright);
  background: rgba(201, 164, 98, 0.16);
  transform: translateY(-2px);
}

.slot-ico { font-size: 2rem; }

.slot-qty-pill {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-family: var(--font-book);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: rgba(200, 30, 40, 0.85);
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid var(--accent-gold-dark);
}

.inventory-inspect-side { padding: 24px; }
.inspect-wire-card { text-align: center; padding: 20px; }
.inspect-sigil-large { font-size: 2.2rem; color: var(--accent-gold); margin-bottom: 12px; }
.inspect-item-title { font-family: var(--font-display); font-size: 1.8rem; color: #fff; letter-spacing: 1px; margin-bottom: 8px; }
.inspect-item-lore { font-size: 1.05rem; line-height: 1.65; color: var(--text-parchment); margin-bottom: 20px; }
.inspect-metrics-strip { border-top: 1px solid var(--border-wire); border-bottom: 1px solid var(--border-wire); padding: 12px 0; margin-bottom: 20px; font-family: var(--font-sc); font-size: 0.95rem; display: flex; justify-content: space-around; }

.btn-wire-pill {
  background: rgba(201, 164, 98, 0.14);
  border: 1.5px solid var(--accent-gold);
  color: var(--accent-gold-bright);
  font-family: var(--font-sc);
  font-size: 0.92rem;
  letter-spacing: 1.5px;
  padding: 10px 22px;
  border-radius: 2px;
  cursor: pointer;
}

.btn-wire-pill:hover {
  background: rgba(201, 164, 98, 0.28);
  border-color: var(--accent-gold-bright);
  color: #fff;
}

/* ==========================================================================
   БОЕВОЙ МОДАЛ
   ========================================================================== */
.editorial-combat-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 7, 0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.editorial-combat-modal.active { display: flex; animation: medievalFadeIn 0.3s ease-out; }
.combat-editorial-frame { max-width: 860px; width: 100%; padding: 36px 40px; }
.combat-top-meta { text-align: center; margin-bottom: 24px; }
.combat-alert-pill { font-family: var(--font-sc); font-size: 0.88rem; letter-spacing: 2px; color: #f87171; display: block; margin-bottom: 6px; }
#combatEnemyName { font-family: var(--font-display); font-size: 2.6rem; color: #fff; letter-spacing: 1.5px; }

.combat-monolith-arena {
  display: grid;
  grid-template-columns: 1fr 100px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.combat-monolith {
  background: rgba(26, 20, 22, 0.88);
  border: 1.5px solid var(--border-gold);
  padding: 22px 18px;
  text-align: center;
  border-radius: 2px;
}

.monolith-seal-frame {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.combat-seal-img { width: 100%; height: 100%; object-fit: contain; }
.monolith-avatar { font-size: 3.4rem; margin-bottom: 8px; }
.combat-monolith strong { display: block; font-family: var(--font-display); font-size: 1.5rem; color: #fff; }
.combat-monolith .monolith-class { display: block; font-family: var(--font-sc); font-size: 0.84rem; color: var(--accent-gold); margin-bottom: 12px; }
.monolith-hp-track { height: 9px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(201, 164, 98, 0.3); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.monolith-hp-fill.hero { height: 100%; background: linear-gradient(90deg, #10b981 0%, #34d399 100%); transition: width 0.3s ease; }
.monolith-hp-fill.enemy { height: 100%; background: linear-gradient(90deg, #b91c1c 0%, #ef4444 100%); transition: width 0.3s ease; }
.monolith-hp-val { font-family: var(--font-book); font-size: 0.92rem; color: var(--text-parchment); }

.combat-cross-seal { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.clash-seal-frame { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 0 12px var(--seal-crimson-glow)); }
.clash-seal-stamp { width: 100%; height: 100%; object-fit: contain; }
.clash-wire-text { font-size: 1.6rem; }

.combat-wire-terminal {
  background: rgba(14, 10, 12, 0.92);
  border: 1px solid var(--border-wire);
  padding: 14px 18px;
  height: 115px;
  overflow-y: auto;
  font-family: var(--font-book);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.combat-command-row { display: flex; justify-content: center; gap: 14px; }

/* ==========================================================================
   УВЕДОМЛЕНИЯ
   ========================================================================== */
.editorial-toast-hub {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.editorial-toast-item {
  background: linear-gradient(135deg, rgba(35, 26, 29, 0.97) 0%, rgba(20, 15, 17, 0.98) 100%);
  border: 1.5px solid var(--border-gold);
  border-left: 4px solid var(--seal-crimson);
  padding: 12px 22px;
  font-family: var(--font-sc);
  font-size: 0.92rem;
  letter-spacing: 1.5px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   RESPONSIVENESS
   ========================================================================== */
@media (max-width: 1250px) {
  .prologue-hero-grid { grid-template-columns: 1fr; }
  .callings-four-grid { grid-template-columns: repeat(2, 1fr); }
  .citadel-cinematic-spread { grid-template-columns: 1fr; }
  .citadel-art-window { min-height: 260px; }
  .districts-wire-grid { grid-template-columns: 1fr; }
  .expedition-editorial-split { grid-template-columns: 1fr; }
  .crafting-workbench-split { grid-template-columns: 1fr; }
  .market-wire-triplet { grid-template-columns: 1fr; }
  .tavern-wire-split { grid-template-columns: 1fr; }
  .inventory-wire-split { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .masthead { flex-direction: column; gap: 12px; padding: 12px 18px; }
  .editorial-layout { grid-template-columns: 1fr; }
  .editorial-sidebar { display: none; }
  .editorial-stage { padding: 16px; }
  .callings-four-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   WIZARD СОЗДАНИЯ ПЕРСОНАЖА: 3 ШАГА (ИМЯ/НАРОД -> ПРИЗВАНИЕ -> ПАКТ)
   ========================================================================== */
.creation-wizard-frame {
  max-width: 1400px;
  margin: 0 auto;
}

/* Верхняя панель навигации по шагам */
.creation-wizard-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 14px 24px;
  background: rgba(14, 11, 10, 0.85);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 8px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.8), 0 8px 24px rgba(0, 0, 0, 0.6);
}

.wizard-step-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 1px solid transparent;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #8c8273;
}

.wizard-step-tab:hover {
  background: rgba(212, 175, 55, 0.06);
  border-color: rgba(212, 175, 55, 0.25);
  color: var(--gold-light);
}

.wizard-step-tab.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.16), rgba(30, 22, 16, 0.8));
  border-color: var(--gold-primary);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.25), inset 0 0 12px rgba(212, 175, 55, 0.1);
  color: #fff;
}

.step-numeral {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-gold-subtle);
  border-radius: 50%;
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.5);
  color: var(--gold-primary);
}

.wizard-step-tab.active .step-numeral {
  border-color: var(--gold-bright);
  background: var(--gold-primary);
  color: #120e0a;
  box-shadow: 0 0 10px var(--gold-primary);
}

.step-label-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.step-title {
  font-family: var(--font-sc);
  font-size: 0.96rem;
  letter-spacing: 2px;
  font-weight: 700;
  color: inherit;
}

.step-sub {
  font-size: 0.72rem;
  font-family: var(--font-body);
  letter-spacing: 0.8px;
  opacity: 0.75;
}

.wizard-step-divider {
  color: var(--gold-dark);
  font-size: 0.9rem;
  opacity: 0.6;
}

/* Контейнеры шагов */
.wizard-step-pane {
  display: none;
  animation: fadeInStep 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.wizard-step-pane.active {
  display: block;
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-header-banner {
  text-align: center;
  margin-bottom: 24px;
}

.editorial-lead-body.centered {
  max-width: 860px;
  margin: 0 auto 20px;
  text-align: center;
}

/* Строка ввода имени героя и кубик */
.hero-identity-input-bar {
  max-width: 720px;
  margin: 0 auto 28px;
  background: rgba(20, 15, 12, 0.75);
  border: 1px solid var(--border-gold-subtle);
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

.identity-name-field label {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.88rem;
  letter-spacing: 2px;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.name-input-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.medieval-scroll-input {
  flex: 1;
  background: rgba(10, 8, 7, 0.9);
  border: 1px solid var(--border-gold-subtle);
  color: #fff;
  font-family: var(--font-cinzel);
  font-size: 1.15rem;
  padding: 10px 16px;
  border-radius: 6px;
  letter-spacing: 1px;
  outline: none;
  transition: all 0.25s ease;
}

.medieval-scroll-input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.4), inset 0 0 8px rgba(212, 175, 55, 0.15);
}

.btn-dice-random {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(30, 22, 16, 0.9));
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-sc);
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  font-weight: 700;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-dice-random:hover {
  background: var(--gold-primary);
  color: #120e0a;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.45);
  transform: translateY(-1px);
}

.btn-dice-random:hover .dice-icon {
  transform: rotate(360deg);
}

.dice-icon {
  font-size: 1.15rem;
  transition: transform 0.5s ease;
  display: inline-block;
}

/* Сетка 8 Рас */
.races-selection-section {
  margin-bottom: 24px;
}

.section-sub-title {
  text-align: center;
  font-family: var(--font-sc);
  font-size: 0.95rem;
  letter-spacing: 3px;
  color: var(--gold-light);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.races-eight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.race-monolith-card {
  position: relative;
  background: linear-gradient(170deg, rgba(28, 21, 17, 0.92) 0%, rgba(14, 11, 9, 0.96) 100%);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 8px;
  padding: 18px 16px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.race-monolith-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
  opacity: 0.5;
}

.race-monolith-card:hover:not(.locked) {
  border-color: var(--gold-bright);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.85), 0 0 18px rgba(212, 175, 55, 0.25);
}

.race-monolith-card.selected {
  border-color: var(--gold-bright);
  background: linear-gradient(170deg, rgba(38, 28, 20, 0.96) 0%, rgba(20, 14, 11, 0.98) 100%);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.35), inset 0 0 20px rgba(212, 175, 55, 0.12);
  transform: translateY(-2px);
}

.race-monolith-card.locked {
  opacity: 0.55;
  filter: grayscale(0.5);
  cursor: not-allowed;
  border-style: dashed;
  border-color: rgba(140, 130, 115, 0.25);
}

.race-monolith-card.locked:hover {
  transform: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
}

.race-seal-pod {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
}

.race-seal-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
  transition: transform 0.25s ease;
}

.race-monolith-card:hover:not(.locked) .race-seal-svg {
  transform: scale(1.08);
}

.race-badge {
  font-size: 0.68rem;
  font-family: var(--font-sc);
  letter-spacing: 1.2px;
  color: var(--gold-light);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.race-monolith-card.locked .race-badge {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(40, 10, 10, 0.6);
}

.race-title {
  font-family: var(--font-cinzel);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.race-desc {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #a89f91;
  font-family: var(--font-body);
  flex: 1;
  margin-bottom: 12px;
}

.race-status-tag {
  font-family: var(--font-sc);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
}

.race-status-tag.locked {
  color: #ef4444;
}

/* Секция выбора начального региона */
.starting-region-section {
  max-width: 960px;
  margin: 0 auto 28px;
  background: rgba(20, 15, 12, 0.85);
  border: 1px solid var(--border-gold-subtle);
  border-radius: 8px;
  padding: 20px 24px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
}

.region-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  padding-bottom: 10px;
}

.region-label {
  font-family: var(--font-sc);
  font-size: 0.88rem;
  letter-spacing: 2px;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.region-badge-count {
  font-size: 0.72rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--gold-bright);
}

.region-pills-row {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.region-pill {
  flex: 1;
  min-width: 200px;
  background: rgba(10, 8, 7, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
  color: #c4b9a8;
}

.region-pill:hover {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.08);
  color: #fff;
}

.region-pill.selected {
  border-color: var(--gold-bright);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(28, 20, 14, 0.9));
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.25);
  color: #fff;
}

.region-pill-name {
  display: block;
  font-family: var(--font-cinzel);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.region-pill.selected .region-pill-name {
  color: var(--gold-bright);
}

.region-desc-plate {
  background: rgba(10, 8, 7, 0.6);
  border-left: 3px solid var(--gold-primary);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: #b8ac9a;
  line-height: 1.45;
  border-radius: 0 4px 4px 0;
}

.homeland-fixed-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(10, 8, 7, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-left: 4px solid var(--gold-primary);
  padding: 14px 18px;
  border-radius: 6px;
}

.homeland-icon {
  font-size: 1.6rem;
}

.homeland-title {
  display: block;
  font-family: var(--font-cinzel);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 4px;
}

.homeland-desc {
  font-size: 0.84rem;
  color: #b0a594;
  line-height: 1.4;
}

/* Панели действий Wizard (Кнопки Назад / Далее) */
.wizard-step-action-bar {
  display: flex;
  align-items: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.wizard-step-action-bar.right {
  justify-content: flex-end;
}

.wizard-step-action-bar.split {
  justify-content: space-between;
}

.btn-wizard-next, .btn-wizard-back {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 6px;
  font-family: var(--font-sc);
  font-size: 0.92rem;
  letter-spacing: 2px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-wizard-next {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(40, 28, 18, 0.95));
  border: 1.5px solid var(--gold-primary);
  color: var(--gold-bright);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
}

.btn-wizard-next:hover {
  background: var(--gold-primary);
  color: #120e0a;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.45);
  transform: translateX(2px);
}

.btn-wizard-back {
  background: rgba(18, 14, 11, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #a89f91;
}

.btn-wizard-back:hover {
  border-color: var(--gold-primary);
  color: #fff;
  transform: translateX(-2px);
}

.btn-arrow {
  font-size: 1.1rem;
  line-height: 1;
}

/* ==========================================================================
   ШАГ 3: СКРЕПЛЕНИЕ ПАКТА (СВИТОК ДОГОВОРА С СОВЕТОМ)
   ========================================================================== */
.covenant-scroll-display {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  background: #18120d;
  background: linear-gradient(180deg, #241a12 0%, #17110c 100%);
  border: 2px solid var(--gold-primary);
  border-radius: 10px;
  padding: 36px 40px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.95), inset 0 0 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.15);
}

.covenant-scroll-display::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  pointer-events: none;
}

.covenant-header {
  text-align: center;
  margin-bottom: 24px;
}

.covenant-crest-img {
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9));
}

.covenant-main-title {
  font-family: var(--font-cinzel);
  font-size: 1.55rem;
  letter-spacing: 2px;
  color: var(--gold-bright);
  margin-bottom: 6px;
}

.covenant-sub-title {
  font-family: var(--font-sc);
  font-size: 0.85rem;
  letter-spacing: 3px;
  color: #9c9180;
}

.covenant-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}

.covenant-summary-card {
  background: rgba(10, 8, 6, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
  position: relative;
}

.covenant-summary-card .summary-label {
  display: block;
  font-family: var(--font-sc);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.covenant-summary-card .summary-seal-pod {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.covenant-summary-card .summary-seal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.covenant-summary-card .summary-val-title {
  font-family: var(--font-cinzel);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.covenant-summary-card .summary-val-sub {
  font-size: 0.8rem;
  color: #a89e8f;
  font-family: var(--font-body);
}

.covenant-tarns-display {
  background: rgba(10, 8, 6, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tarns-hud-title {
  font-family: var(--font-sc);
  font-size: 0.82rem;
  letter-spacing: 2px;
  color: var(--gold-light);
}

.tarns-coins-summary {
  display: flex;
  gap: 14px;
}

.tarn-summary-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-cinzel);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.tarn-summary-chip img {
  width: 22px;
  height: 22px;
}

.covenant-oath-quote {
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding: 16px 20px;
  font-style: italic;
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: #c8bdac;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ==========================================================================
   АДАПТИВНОСТЬ ДЛЯ СЕТКИ 8 РАС
   ========================================================================== */
@media (max-width: 1200px) {
  .races-eight-grid { grid-template-columns: repeat(2, 1fr); }
  .covenant-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .races-eight-grid { grid-template-columns: 1fr; }
  .creation-wizard-nav { flex-direction: column; gap: 8px; }
  .name-input-group { flex-direction: column; }
  .btn-dice-random { width: 100%; justify-content: center; }
  .region-pills-row { flex-direction: column; }
  .wizard-step-action-bar.split { flex-direction: column; gap: 12px; }
}


/* ==========================================================================
   ПЕЧАТИ РАС НА РВАНОМ ПЕРГАМЕНТЕ И УВЕЛИЧЕННЫЕ ШРИФТЫ
   ========================================================================== */
.race-seal-frame {
  position: relative;
  width: 120px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.race-parchment-backing {
  position: absolute;
  width: 116px;
  height: 104px;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.92)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
  transform: rotate(2.5deg);
  transition: transform 0.25s ease;
}

.race-monolith-card:nth-child(2n) .race-parchment-backing { transform: rotate(-3deg); }
.race-monolith-card:nth-child(3n) .race-parchment-backing { transform: rotate(1.5deg); }

.race-parchment-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.race-seal-img {
  position: relative;
  width: 78px;
  height: 78px;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.race-monolith-card:hover:not(.locked) .race-seal-img {
  transform: scale(1.1) translateY(-2px);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.98)) drop-shadow(0 0 14px rgba(212, 175, 55, 0.35));
}

/* Увеличенные шрифты и высокая контрастность */
.race-title {
  font-family: var(--font-cinzel);
  font-size: 1.34rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  margin-bottom: 10px !important;
  letter-spacing: 1.5px !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.race-desc {
  font-size: 1.02rem !important;
  line-height: 1.62 !important;
  color: #e5ded2 !important;
  font-family: var(--font-body) !important;
  flex: 1;
  margin-bottom: 16px !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.race-status-tag {
  font-family: var(--font-sc);
  font-size: 0.9rem !important;
  letter-spacing: 2px !important;
  color: #10b981 !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.race-status-tag.locked {
  color: #f87171 !important;
}

/* Описание класса и особенности призваний */
.monolith-narrative {
  font-size: 1.08rem !important;
  line-height: 1.65 !important;
  color: #ede5d8 !important;
  margin-bottom: 22px !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.traits-section-title {
  font-size: 0.92rem !important;
  letter-spacing: 2px !important;
  color: var(--gold-light) !important;
  font-weight: 700;
}

.trait-title {
  font-size: 1.04rem !important;
  letter-spacing: 1.2px !important;
  color: #fff !important;
}

.trait-desc {
  font-size: 0.94rem !important;
  line-height: 1.55 !important;
  color: #d8cec0 !important;
}

/* Регионы */
.region-label {
  font-size: 1.02rem !important;
  letter-spacing: 2px !important;
}

.region-pill-name {
  font-size: 1.15rem !important;
}

.region-desc-plate, .homeland-desc {
  font-size: 1.06rem !important;
  line-height: 1.65 !important;
  color: #e2d9cc !important;
}

.homeland-title {
  font-size: 1.2rem !important;
}

/* Поле ввода имени */
.identity-name-field label {
  font-size: 1.0rem !important;
  letter-spacing: 2.2px !important;
}

.medieval-scroll-input {
  font-size: 1.3rem !important;
  padding: 12px 18px !important;
}

.btn-dice-random {
  font-size: 0.95rem !important;
  padding: 12px 20px !important;
}

.editorial-hero-title {
  font-size: 2.3rem !important;
}

.editorial-lead-body {
  font-size: 1.12rem !important;
  line-height: 1.75 !important;
  color: #ded6c8 !important;
}


/* ==========================================================================
   СРЕДНЕВЕКОВЫЙ МУЗЫКАЛЬНЫЙ ПЛЕЕР (ВЕРХНЯЯ ПАНЕЛЬ ОПЛОТА)
   ========================================================================== */
.medieval-music-player {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(28, 20, 16, 0.95) 0%, rgba(14, 10, 8, 0.98) 100%);
  border: 1.5px solid var(--border-gold);
  border-radius: 8px;
  padding: 6px 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.8), inset 0 0 14px rgba(0, 0, 0, 0.8);
  height: 52px;
}

/* Визуализатор */
.player-harp-box {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.25);
  transition: all 0.2s ease;
}

.player-harp-box:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-bright);
}

.player-harp-sigil {
  font-size: 1.25rem;
}

.player-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.pbar {
  width: 3px;
  height: 4px;
  background: var(--gold-primary);
  border-radius: 1px;
  transition: height 0.2s ease;
}

.player-bars.playing .pbar:nth-child(1) { animation: soundBar 0.6s infinite ease-in-out alternate; }
.player-bars.playing .pbar:nth-child(2) { animation: soundBar 0.8s infinite ease-in-out alternate 0.2s; }
.player-bars.playing .pbar:nth-child(3) { animation: soundBar 0.5s infinite ease-in-out alternate 0.4s; }
.player-bars.playing .pbar:nth-child(4) { animation: soundBar 0.7s infinite ease-in-out alternate 0.1s; }

@keyframes soundBar {
  0% { height: 3px; }
  100% { height: 16px; }
}

/* Метаданные трека */
.player-track-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 220px;
  max-width: 280px;
}

.player-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.player-cat-badge {
  font-family: var(--font-sc);
  font-size: 0.68rem;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 1px 5px;
  border-radius: 3px;
}

.player-track-title {
  font-family: var(--font-cinzel);
  font-size: 0.84rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}

.player-time-badge {
  font-size: 0.7rem;
  color: #a89f91;
  margin-left: auto;
  font-family: var(--font-body);
}

/* Таймлайн */
.player-timeline-chassis {
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.player-timeline-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-bright) 100%);
  position: relative;
  transition: width 0.15s linear;
}

.player-timeline-glow {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: #fff;
  box-shadow: 0 0 8px #fff, 0 0 12px var(--gold-bright);
}

/* Кнопки управления */
.player-controls-cluster {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-player-ctrl {
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #c4b9a8;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.btn-player-ctrl:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-bright);
  color: #fff;
}

.btn-player-ctrl.play-main {
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(40, 28, 18, 0.9));
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.btn-player-ctrl.play-main:hover {
  background: var(--gold-primary);
  color: #120e0a;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.5);
  transform: scale(1.05);
}

/* Громкость */
.player-volume-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-vol-mute {
  background: transparent;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.btn-vol-mute:hover { opacity: 1; }

.player-vol-range {
  width: 60px;
  height: 4px;
  accent-color: var(--gold-primary);
  cursor: pointer;
}

/* Кнопка списка треков */
.btn-player-playlist {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(20, 14, 11, 0.8);
  border: 1px solid var(--border-gold-subtle);
  color: var(--gold-light);
  padding: 5px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-sc);
  font-size: 0.72rem;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.btn-player-playlist:hover {
  background: var(--gold-primary);
  color: #120e0a;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

/* Выпадающий список треков */
.player-playlist-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  background: linear-gradient(180deg, #1e1612 0%, #120d0a 100%);
  border: 1.5px solid var(--gold-primary);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95), inset 0 0 20px rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: none;
  padding: 12px;
  animation: medievalFadeIn 0.25s ease-out;
}

.player-playlist-dropdown.active {
  display: block;
}

.playlist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 8px;
  margin-bottom: 8px;
  font-family: var(--font-sc);
  font-size: 0.76rem;
  letter-spacing: 1.5px;
  color: var(--gold-bright);
}

.btn-close-playlist {
  background: transparent;
  border: none;
  color: #a89f91;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-close-playlist:hover { color: #fff; }

.playlist-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
}

.playlist-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.playlist-item-row:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
}

.playlist-item-row.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(30, 20, 15, 0.8));
  border-color: var(--gold-primary);
}

.playlist-track-idx {
  font-family: var(--font-cinzel);
  font-size: 0.85rem;
  color: var(--gold-dark);
  font-weight: 700;
  width: 22px;
}

.playlist-item-row.active .playlist-track-idx {
  color: var(--gold-bright);
}

.playlist-track-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.playlist-track-name {
  font-family: var(--font-cinzel);
  font-size: 0.82rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-track-tag {
  font-family: var(--font-sc);
  font-size: 0.66rem;
  color: var(--gold-light);
  letter-spacing: 0.8px;
}

.playlist-play-icon {
  font-size: 0.85rem;
  color: var(--gold-light);
}


/* ==========================================================================
   КРУПНЫЕ ПЕЧАТИ РАС: ТАКОЙ ЖЕ РАЗМЕР И ДИЗАЙН, КАК НА КЛАССАХ (122px)
   ========================================================================== */
.races-eight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.race-monolith-card {
  position: relative;
  background: linear-gradient(170deg, rgba(28, 21, 17, 0.92) 0%, rgba(14, 11, 9, 0.96) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.22);
  border-radius: 8px;
  padding: 24px 18px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  min-height: 420px;
}

.race-seal-frame {
  position: relative;
  width: 160px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.race-parchment-backing {
  position: absolute;
  width: 172px;
  height: 148px;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.98)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
  transform: rotate(2.5deg);
  transition: transform 0.25s ease;
}

.race-monolith-card:nth-child(2n) .race-parchment-backing { transform: rotate(-3deg); }
.race-monolith-card:nth-child(3n) .race-parchment-backing { transform: rotate(1.5deg); }

.race-parchment-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.race-seal-img {
  position: relative;
  width: 122px;
  height: 122px;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.race-monolith-card:hover:not(.locked) .race-seal-img {
  transform: scale(1.08) translateY(-2px);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.98)) drop-shadow(0 0 16px rgba(212, 175, 55, 0.4));
}

/* Адаптированный 헤дер */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: linear-gradient(180deg, rgba(16, 12, 10, 0.98) 0%, rgba(10, 8, 6, 0.95) 100%);
  border-bottom: 1.5px solid var(--border-gold);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.85);
  position: relative;
  z-index: 50;
  min-height: 84px;
}

.masthead-right-cluster {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ==========================================================================
   КРУПНЫЕ ПЕЧАТИ РАС: СВЕРХ-ЯРКИЙ СУРГУЧ И РОСКОШНЫЙ СРЕДНЕВЕКОВЫЙ ДИЗАЙН КАРТОЧЕК
   ========================================================================== */
.races-eight-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

.race-monolith-card {
  position: relative;
  background: linear-gradient(165deg, rgba(32, 24, 19, 0.96) 0%, rgba(20, 15, 12, 0.98) 55%, rgba(13, 9, 7, 0.99) 100%) !important;
  border: 1.5px solid rgba(212, 175, 55, 0.35) !important;
  border-radius: 6px !important;
  padding: 24px 18px 20px !important;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), inset 0 0 24px rgba(0, 0, 0, 0.7) !important;
  overflow: hidden;
  min-height: 450px !important;
}

/* Внутренняя золоченая рамка-филигрань */
.card-inner-filigree-border {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 4px;
  pointer-events: none;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.85);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

/* Кованые угловые виньетки */
.race-monolith-card .card-corner-bracket {
  position: absolute;
  font-size: 11px;
  color: rgba(212, 175, 55, 0.65);
  text-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
  pointer-events: none;
  z-index: 5;
  line-height: 1;
  transition: all 0.3s ease;
}
.race-monolith-card .card-corner-bracket.tl { top: 9px; left: 9px; }
.race-monolith-card .card-corner-bracket.tr { top: 9px; right: 9px; }
.race-monolith-card .card-corner-bracket.bl { bottom: 9px; left: 9px; }
.race-monolith-card .card-corner-bracket.br { bottom: 9px; right: 9px; }

/* Сургучная печать и рваный пергамент */
.race-seal-frame {
  position: relative;
  width: 160px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  z-index: 2;
}

.race-parchment-backing {
  position: absolute;
  width: 172px;
  height: 148px;
  pointer-events: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.98)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
  transform: rotate(2.5deg);
  transition: transform 0.25s ease;
}

.race-monolith-card:nth-child(2n) .race-parchment-backing { transform: rotate(-3deg); }
.race-monolith-card:nth-child(3n) .race-parchment-backing { transform: rotate(1.5deg); }

.race-parchment-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.race-seal-img {
  position: relative;
  width: 122px !important;
  height: 122px !important;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) !important;
  transition: transform 0.25s ease, filter 0.25s ease;
}

/* Сбалансированные средневековые тени печатей с мягким теплым ореолом */
.race-human-glow .race-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(225, 29, 72, 0.35)) !important;
}
.race-darkelf-glow .race-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(147, 51, 234, 0.35)) !important;
}
.race-highelf-glow .race-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(6, 182, 212, 0.35)) !important;
}
.race-orc-glow .race-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(34, 197, 94, 0.38)) !important;
}
.race-aviary-glow .race-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 14px rgba(245, 158, 11, 0.45)) !important;
}
.race-dwarf-glow .race-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(217, 119, 6, 0.35)) !important;
}
.race-ashborn-glow .race-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(239, 68, 68, 0.32)) !important;
}
.race-talf-glow .race-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(168, 85, 247, 0.38)) !important;
}

.race-monolith-card:hover:not(.locked) .race-seal-img {
  transform: scale(1.08) translateY(-2px) !important;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.98)) drop-shadow(0 0 14px rgba(212, 175, 55, 0.45)) !important;
}

/* Заголовок расы и средневековый орнамент */
.race-header-cluster {
  margin-bottom: 8px;
  width: 100%;
  z-index: 2;
}

.race-title {
  font-family: var(--font-cinzel);
  font-size: 1.36rem !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  color: #fff !important;
  margin: 0 0 6px !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 14px rgba(212, 175, 55, 0.45) !important;
}

.race-flourish-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
  width: 80%;
  opacity: 0.85;
}

.race-flourish-divider .f-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.65), transparent);
}

.race-flourish-divider .f-gem {
  color: var(--gold-bright);
  font-size: 10px;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
}

/* Земли и исторические регионы расы */
.race-homeland-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  font-size: 0.73rem;
  color: #d4c5a3;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  font-family: var(--font-sc);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

.race-homeland-pill .h-sigil {
  color: var(--gold-bright);
  font-size: 10px;
}

/* Описание расы */
.race-desc {
  font-size: 0.94rem !important;
  line-height: 1.58 !important;
  color: #ded7ca !important;
  font-family: var(--font-body) !important;
  font-style: italic;
  margin-bottom: 18px !important;
  flex: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  padding: 0 4px;
  z-index: 2;
}

/* Средневековая латунная плашка статуса */
.race-status-tag {
  width: 100%;
  padding: 9px 12px !important;
  border-radius: 4px !important;
  font-family: var(--font-cinzel) !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75) !important;
  transition: all 0.25s ease;
  z-index: 2;
}

.race-status-tag.ready {
  background: linear-gradient(180deg, rgba(38, 28, 16, 0.95) 0%, rgba(22, 16, 8, 0.98) 100%) !important;
  border: 1.2px solid rgba(212, 175, 55, 0.45) !important;
  color: #f7d779 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(212, 175, 55, 0.4) !important;
}

.race-status-tag.locked {
  background: linear-gradient(180deg, rgba(24, 18, 18, 0.92) 0%, rgba(14, 10, 10, 0.96) 100%) !important;
  border: 1.2px solid rgba(130, 100, 95, 0.35) !important;
  color: #a8928c !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}

.race-status-tag .tag-gem {
  color: var(--gold-bright);
  font-size: 10px;
}

/* Ховер и выбор */
.race-monolith-card:hover:not(.locked) {
  border-color: rgba(245, 197, 66, 0.85) !important;
  transform: translateY(-6px) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.92), 0 0 28px rgba(212, 175, 55, 0.35) !important;
}

.race-monolith-card:hover:not(.locked) .card-corner-bracket {
  color: var(--gold-bright) !important;
  text-shadow: 0 0 10px var(--gold-bright) !important;
  transform: scale(1.25) !important;
}

.race-monolith-card:hover:not(.locked) .card-inner-filigree-border {
  border-color: rgba(212, 175, 55, 0.45) !important;
  box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.15) !important;
}

.race-monolith-card:hover:not(.locked) .race-status-tag.ready {
  background: linear-gradient(180deg, rgba(55, 40, 20, 0.98) 0%, rgba(32, 22, 10, 1) 100%) !important;
  border-color: var(--gold-bright) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.45) !important;
}

.race-monolith-card.selected {
  border-color: #ffd700 !important;
  background: linear-gradient(165deg, rgba(45, 32, 22, 0.98) 0%, rgba(26, 18, 12, 0.99) 60%, rgba(18, 12, 8, 1) 100%) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.95), 0 0 32px rgba(212, 175, 55, 0.5), inset 0 0 28px rgba(212, 175, 55, 0.16) !important;
  transform: translateY(-3px) !important;
}

.race-monolith-card.selected .card-inner-filigree-border {
  border-color: rgba(255, 215, 0, 0.65) !important;
  box-shadow: inset 0 0 22px rgba(212, 175, 55, 0.25) !important;
}

.race-monolith-card.selected .card-corner-bracket {
  color: #ffe066 !important;
  text-shadow: 0 0 12px #ffd700 !important;
}

.race-monolith-card.selected .race-status-tag.ready {
  background: linear-gradient(180deg, rgba(146, 100, 20, 0.95) 0%, rgba(92, 60, 10, 0.98) 100%) !important;
  border-color: #ffd700 !important;
  color: #fff !important;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.6) !important;
}

.race-monolith-card.locked {
  opacity: 0.65 !important;
  filter: grayscale(0.2) !important;
  cursor: not-allowed !important;
  border-style: dashed !important;
}

/* ==========================================================================
   ГЛОБАЛЬНЫЙ СРЕДНЕВЕКОВО-ФЭНТЕЗИЙНЫЙ РЕДИЗАЙН: КОРОЛЕВСКИЙ САПФИР & ХОЛОДНОЕ ЗОЛОТО
   Шрифты сохранены без изменений (Cinzel, Forum, Cormorant SC).
   ========================================================================== */

/* 1. АТМОСФЕРНЫЙ ЖИВОЙ ФОН: ГЛУБОКИЙ ИССИНЯ-НОЧНОЙ БАРХАТ И ЗВЕЗДНОЕ СИЯНИЕ */
body.editorial-body {
  background: 
    radial-gradient(ellipse at 50% 12%, rgba(26, 42, 75, 0.45) 0%, rgba(11, 17, 32, 0.94) 55%, #050811 100%),
    linear-gradient(180deg, #0d1527 0%, #080d19 50%, #04060c 100%) !important;
  background-attachment: fixed !important;
  color: var(--text-main);
  position: relative;
}

body.editorial-body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(circle at 18% 25%, rgba(96, 165, 250, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 82% 65%, rgba(223, 186, 115, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(30, 58, 138, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* 2. БОКОВОЕ МЕДИЕВАЛЬНОЕ МЕНЮ: НАВИГАЦИОННАЯ КОЛОННА ОПЛОТА */
.editorial-layout {
  position: relative;
  z-index: 5;
  display: grid !important;
  grid-template-columns: 132px 1fr !important;
  min-height: calc(100vh - 84px);
}

/* Привязка шапки и сайдбара без сползания при скролле */
.masthead {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  min-height: 84px;
  border-bottom: 2px solid rgba(223, 186, 115, 0.4) !important;
  background: linear-gradient(180deg, rgba(14, 21, 38, 0.98) 0%, rgba(8, 13, 24, 0.97) 100%) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.92), inset 0 -1px 0 rgba(223, 186, 115, 0.22) !important;
}

.editorial-sidebar {
  display: flex !important;
  position: sticky !important;
  top: 84px !important;
  height: calc(100vh - 84px) !important;
  align-self: flex-start;
  width: 132px !important;
  border-right: 2px solid rgba(223, 186, 115, 0.35) !important;
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.9), inset -1px 0 0 rgba(223, 186, 115, 0.15) !important;
  background: linear-gradient(180deg, rgba(12, 18, 33, 0.98) 0%, rgba(7, 11, 20, 0.99) 100%) !important;
  z-index: 90 !important;
  padding: 24px 0 20px !important;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.sidebar-top-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(223, 186, 115, 0.22);
  width: 80%;
}

.sidebar-top-index .cross-sigil {
  color: var(--accent-gold-bright);
  font-size: 1.1rem;
  text-shadow: 0 0 10px rgba(223, 186, 115, 0.6);
}

.sidebar-top-index .roman-index {
  font-family: var(--font-cinzel);
  font-size: 0.88rem;
  letter-spacing: 2.5px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.sidebar-top-index .vertical-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-sc);
  font-size: 0.72rem;
  letter-spacing: 3px;
  color: var(--accent-gold-dark);
  margin-top: 4px;
}

.chapter-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 0 8px;
}

.chapter-link {
  background: linear-gradient(180deg, rgba(18, 28, 50, 0.75) 0%, rgba(10, 16, 30, 0.9) 100%) !important;
  border: 1px solid rgba(223, 186, 115, 0.22) !important;
  border-radius: 6px !important;
  padding: 12px 6px !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  color: #c4d0e6 !important;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 0 8px rgba(0, 0, 0, 0.7) !important;
}

.chapter-link .chapter-flourish {
  font-size: 1.4rem !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
  transition: transform 0.25s ease;
}

.chapter-link .chapter-label {
  font-family: var(--font-cinzel) !important;
  font-size: 0.88rem !important;
  letter-spacing: 1.5px !important;
  font-weight: 700 !important;
  color: #e2e8f0 !important;
  margin-top: 4px !important;
  line-height: 1;
}

.chapter-link .nav-sub-tag {
  font-family: var(--font-sc) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.8px !important;
  color: #94a3b8 !important;
  margin-top: 2px !important;
}

.chapter-link:hover {
  background: linear-gradient(180deg, rgba(28, 44, 78, 0.95) 0%, rgba(15, 24, 44, 0.98) 100%) !important;
  border-color: var(--accent-gold-bright) !important;
  transform: translateX(3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.8), 0 0 16px rgba(59, 130, 246, 0.35) !important;
  color: #fff !important;
}

.chapter-link:hover .chapter-flourish {
  transform: scale(1.15);
}

.chapter-link:hover .chapter-label {
  color: var(--accent-gold-bright) !important;
}

.chapter-link.active {
  background: linear-gradient(170deg, rgba(35, 56, 100, 0.98) 0%, rgba(16, 26, 48, 1) 100%) !important;
  border-color: #ffd700 !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.45), inset 0 0 14px rgba(223, 186, 115, 0.25) !important;
  color: #fff !important;
}

.chapter-link.active::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: linear-gradient(180deg, #f7dc9f, #dfba73, #9f7b35);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(247, 220, 159, 0.85);
}

.chapter-link.active .chapter-label {
  color: #fff !important;
  text-shadow: 0 0 10px rgba(247, 220, 159, 0.6);
}

.sidebar-bottom-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(223, 186, 115, 0.22);
  width: 80%;
}

.sidebar-bottom-seal .wire-cross {
  color: var(--accent-gold-bright);
  font-size: 1.15rem;
  text-shadow: 0 0 8px rgba(223, 186, 115, 0.6);
  animation: pulseGoldCross 3s infinite ease-in-out;
}

@keyframes pulseGoldCross {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}

.sidebar-footnote {
  writing-mode: vertical-rl;
  font-family: var(--font-sc);
  font-size: 0.68rem;
  color: var(--accent-gold-dark);
  letter-spacing: 1.5px;
}

/* Основная сцена рядом с меню */
.editorial-stage {
  padding: 32px 36px 60px !important;
  max-width: 1540px !important;
  margin: 0 auto !important;
  width: 100% !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 3. ВЕРХНЯЯ ГЕРБОВАЯ ЛИНИЯ */
.sigil-stamp-wrap {
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 10px rgba(223, 186, 115, 0.35));
  transition: transform 0.3s ease;
}
.sigil-stamp-wrap:hover {
  transform: scale(1.05) rotate(2deg);
}

.masthead-name {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 16px rgba(223, 186, 115, 0.4) !important;
}

/* 4. СРЕДНЕВЕКОВЫЙ МУЗЫКАЛЬНЫЙ ПЛЕЕР (БАРДОВСКИЙ ЛАРЕЦ) */
.medieval-music-player {
  background: linear-gradient(170deg, rgba(16, 25, 46, 0.95) 0%, rgba(8, 13, 25, 0.98) 100%) !important;
  border: 1.5px solid rgba(223, 186, 115, 0.35) !important;
  border-radius: 6px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8), inset 0 0 12px rgba(0, 0, 0, 0.7) !important;
  padding: 8px 16px !important;
}

.player-harp-box {
  background: radial-gradient(circle, rgba(223, 186, 115, 0.2) 0%, rgba(13, 20, 36, 0.85) 100%) !important;
  border: 1px solid rgba(223, 186, 115, 0.35) !important;
  box-shadow: 0 0 10px rgba(223, 186, 115, 0.25) !important;
}

.player-timeline-chassis {
  background: rgba(6, 9, 18, 0.92) !important;
  border: 1px solid rgba(223, 186, 115, 0.22) !important;
  border-radius: 4px !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

.player-timeline-fill {
  background: linear-gradient(90deg, #1e3a8a, #dfba73, #f7dc9f) !important;
  box-shadow: 0 0 8px rgba(223, 186, 115, 0.6) !important;
}

.btn-player-ctrl {
  background: linear-gradient(180deg, rgba(22, 34, 60, 0.9) 0%, rgba(11, 18, 32, 0.95) 100%) !important;
  border: 1px solid rgba(223, 186, 115, 0.3) !important;
  color: var(--accent-gold-bright) !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
}
.btn-player-ctrl:hover {
  border-color: var(--accent-gold-bright) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(223, 186, 115, 0.4) !important;
  transform: translateY(-1px);
}
.btn-player-ctrl.play-main {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.95) 0%, rgba(20, 38, 90, 0.98) 100%) !important;
  border-color: var(--accent-gold-bright) !important;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.5), 0 0 8px rgba(223, 186, 115, 0.4) !important;
}

/* 5. НАВИГАЦИОННАЯ ПАНЕЛЬ ШАГОВ (WIZARD TABS) */
.creation-wizard-nav {
  background: linear-gradient(175deg, rgba(14, 22, 40, 0.96) 0%, rgba(8, 13, 24, 0.98) 100%) !important;
  border: 1.5px solid rgba(223, 186, 115, 0.35) !important;
  border-radius: 8px !important;
  padding: 16px 28px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), inset 0 0 20px rgba(0, 0, 0, 0.7) !important;
  position: relative;
}

.creation-wizard-nav::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  border: 1px solid rgba(223, 186, 115, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.wizard-step-tab {
  padding: 12px 24px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  transition: all 0.28s ease !important;
}

.wizard-step-tab:hover:not(.active) {
  background: rgba(59, 130, 246, 0.12) !important;
  border-color: rgba(223, 186, 115, 0.3) !important;
  color: #f1f5f9 !important;
}

.wizard-step-tab.active {
  background: linear-gradient(170deg, rgba(28, 45, 80, 0.95) 0%, rgba(14, 24, 44, 0.98) 100%) !important;
  border: 1.5px solid rgba(223, 186, 115, 0.75) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 20px rgba(59, 130, 246, 0.35), inset 0 0 16px rgba(223, 186, 115, 0.18) !important;
  color: #fff !important;
}

.wizard-step-tab.active .step-numeral {
  background: linear-gradient(135deg, #f7dc9f, #dfba73, #9f7b35) !important;
  color: #060913 !important;
  font-weight: 800 !important;
  border-color: #fff !important;
  box-shadow: 0 0 12px rgba(247, 220, 159, 0.7) !important;
}

.wizard-step-divider {
  color: var(--accent-gold-bright) !important;
  text-shadow: 0 0 8px rgba(223, 186, 115, 0.6) !important;
  font-size: 1.1rem !important;
}

/* 6. ПОЛЕ ВВОДА ИМЕНИ ГЕРОЯ */
.hero-identity-input-bar {
  background: linear-gradient(175deg, rgba(14, 22, 40, 0.96) 0%, rgba(8, 13, 24, 0.98) 100%) !important;
  border: 1.5px solid rgba(223, 186, 115, 0.35) !important;
  border-radius: 8px !important;
  padding: 20px 28px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 0, 0, 0.7) !important;
  position: relative;
}

.hero-identity-input-bar::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  border: 1px solid rgba(223, 186, 115, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.medieval-scroll-input {
  background: linear-gradient(180deg, rgba(8, 13, 25, 0.98) 0%, rgba(5, 8, 16, 0.98) 100%) !important;
  border: 1.5px solid rgba(223, 186, 115, 0.35) !important;
  border-radius: 4px !important;
  padding: 12px 18px !important;
  font-size: 1.25rem !important;
  letter-spacing: 1.5px !important;
  color: #fff !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.9) !important;
}
.medieval-scroll-input:focus {
  border-color: var(--accent-gold-bright) !important;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.45), 0 0 10px rgba(223, 186, 115, 0.35), inset 0 2px 6px rgba(0, 0, 0, 0.9) !important;
}

.btn-dice-random {
  background: linear-gradient(180deg, rgba(25, 40, 72, 0.95) 0%, rgba(14, 22, 40, 0.98) 100%) !important;
  border: 1.5px solid rgba(223, 186, 115, 0.5) !important;
  border-radius: 4px !important;
  padding: 12px 20px !important;
  color: var(--accent-gold-bright) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), inset 0 0 10px rgba(223, 186, 115, 0.15) !important;
  transition: all 0.25s ease !important;
}
.btn-dice-random:hover {
  background: linear-gradient(180deg, rgba(35, 56, 100, 0.98) 0%, rgba(20, 32, 58, 1) 100%) !important;
  border-color: var(--accent-gold-bright) !important;
  color: #fff !important;
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.5), 0 0 10px rgba(223, 186, 115, 0.4) !important;
  transform: translateY(-2px);
}
.btn-dice-random:active {
  transform: translateY(1px);
}

/* 7. КАРТОЧКА СТАРТОВОГО РЕГИОНА / РОДИНЫ */
.starting-region-section {
  background: linear-gradient(175deg, rgba(14, 22, 40, 0.96) 0%, rgba(8, 13, 24, 0.98) 100%) !important;
  border: 1.5px solid rgba(223, 186, 115, 0.35) !important;
  border-radius: 8px !important;
  padding: 24px 28px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), inset 0 0 24px rgba(0, 0, 0, 0.7) !important;
  position: relative;
}

.starting-region-section::before {
  content: '';
  position: absolute;
  top: 5px; left: 5px; right: 5px; bottom: 5px;
  border: 1px solid rgba(223, 186, 115, 0.16);
  border-radius: 6px;
  pointer-events: none;
}

.region-pill {
  background: linear-gradient(170deg, rgba(12, 18, 32, 0.95) 0%, rgba(7, 11, 20, 0.98) 100%) !important;
  border: 1.2px solid rgba(223, 186, 115, 0.28) !important;
  border-radius: 6px !important;
  padding: 14px 20px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6) !important;
  transition: all 0.25s ease !important;
}

.region-pill:hover {
  border-color: var(--accent-gold-bright) !important;
  background: linear-gradient(170deg, rgba(22, 34, 60, 0.98) 0%, rgba(12, 19, 34, 1) 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8), 0 0 14px rgba(59, 130, 246, 0.35) !important;
}

.region-pill.selected {
  border-color: #ffd700 !important;
  background: linear-gradient(170deg, rgba(30, 48, 86, 0.98) 0%, rgba(16, 26, 48, 1) 100%) !important;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.45), inset 0 0 14px rgba(223, 186, 115, 0.2) !important;
  color: #fff !important;
}

.region-desc-plate {
  background: linear-gradient(180deg, rgba(8, 13, 25, 0.98) 0%, rgba(5, 8, 16, 0.98) 100%) !important;
  border: 1px solid rgba(223, 186, 115, 0.25) !important;
  border-radius: 4px !important;
  padding: 14px 18px !important;
  color: #e2e8f0 !important;
  font-style: italic;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

.homeland-fixed-box {
  background: linear-gradient(170deg, rgba(14, 22, 40, 0.95) 0%, rgba(8, 13, 24, 0.98) 100%) !important;
  border: 1.2px solid rgba(223, 186, 115, 0.3) !important;
  border-radius: 6px !important;
  padding: 16px 20px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7) !important;
}

/* 8. КНОПКИ ДЕЙСТВИЯ (ВПЕРЕД / НАЗАД / ПАКТ) */
.btn-wizard-next {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.95) 0%, rgba(20, 38, 90, 0.98) 100%) !important;
  border: 1.5px solid var(--accent-gold-bright) !important;
  color: #fff !important;
  padding: 14px 32px !important;
  border-radius: 6px !important;
  font-family: var(--font-cinzel) !important;
  font-size: 0.95rem !important;
  letter-spacing: 2px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 18px rgba(59, 130, 246, 0.45) !important;
  cursor: pointer;
  transition: all 0.25s ease !important;
}
.btn-wizard-next:hover {
  background: linear-gradient(180deg, rgba(37, 72, 172, 1) 0%, rgba(25, 48, 114, 1) 100%) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.9), 0 0 24px rgba(59, 130, 246, 0.65), 0 0 14px rgba(223, 186, 115, 0.4) !important;
  transform: translateY(-2px);
}

.btn-wizard-back {
  background: linear-gradient(180deg, rgba(18, 28, 50, 0.9) 0%, rgba(10, 16, 30, 0.95) 100%) !important;
  border: 1px solid rgba(223, 186, 115, 0.35) !important;
  color: #c4d0e6 !important;
  padding: 14px 28px !important;
  border-radius: 6px !important;
  font-family: var(--font-cinzel) !important;
  font-size: 0.88rem !important;
  letter-spacing: 1.5px !important;
  cursor: pointer;
  transition: all 0.25s ease !important;
}
.btn-wizard-back:hover {
  border-color: var(--accent-gold-bright) !important;
  color: #fff !important;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.35) !important;
  transform: translateY(-1px);
}

/* ЦАРСКАЯ КНОПКА СКРЕПЛЕНИЯ ПАКТА */
.btn-royal-wax-seal {
  background: linear-gradient(175deg, rgba(136, 19, 19, 0.98) 0%, rgba(77, 10, 10, 1) 100%) !important;
  border: 2px solid var(--accent-gold-bright) !important;
  border-radius: 8px !important;
  padding: 16px 36px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9), 0 0 28px rgba(220, 38, 38, 0.5), inset 0 0 20px rgba(223, 186, 115, 0.3) !important;
  transition: all 0.28s ease !important;
}
.btn-royal-wax-seal:hover {
  background: linear-gradient(175deg, rgba(168, 24, 24, 1) 0%, rgba(98, 12, 12, 1) 100%) !important;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.95), 0 0 36px rgba(220, 38, 38, 0.7), inset 0 0 24px rgba(255, 215, 0, 0.4) !important;
  transform: translateY(-3px) scale(1.02);
}

/* 9. СВИТОК ДОГОВОРА (ШАГ 3: COVENANT SCROLL) */
.covenant-scroll-display {
  background: linear-gradient(175deg, rgba(16, 25, 46, 0.96) 0%, rgba(9, 14, 27, 0.98) 100%) !important;
  border: 1.5px solid rgba(223, 186, 115, 0.4) !important;
  border-radius: 8px !important;
  padding: 32px 36px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9), inset 0 0 30px rgba(0, 0, 0, 0.8) !important;
  position: relative;
}

/* 10. КАРТОЧКИ РАС (ШАГ 1) И ПРИЗВАНИЙ (ШАГ 2): САПФИРОВЫЙ БАРХАТ И ХОЛОДНОЕ ЗОЛОТО */
.race-monolith-card {
  background: radial-gradient(ellipse at 50% 12%, rgba(22, 35, 62, 0.94) 0%, rgba(12, 19, 34, 0.98) 55%, rgba(6, 9, 18, 0.99) 100%) !important;
  border: 1.5px solid rgba(223, 186, 115, 0.35) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.8), inset 0 0 24px rgba(0, 0, 0, 0.7) !important;
}

.race-monolith-card .card-inner-filigree-border {
  border-color: rgba(223, 186, 115, 0.2) !important;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.85) !important;
}

.race-monolith-card .card-corner-bracket {
  color: rgba(223, 186, 115, 0.65) !important;
  text-shadow: 0 0 6px rgba(223, 186, 115, 0.4) !important;
}

.race-monolith-card:hover:not(.locked) {
  border-color: rgba(247, 220, 159, 0.9) !important;
  transform: translateY(-6px) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.95), 0 0 28px rgba(59, 130, 246, 0.35), 0 0 16px rgba(223, 186, 115, 0.25) !important;
}

.race-monolith-card:hover:not(.locked) .card-corner-bracket {
  color: var(--accent-gold-bright) !important;
  text-shadow: 0 0 10px var(--accent-gold-bright) !important;
  transform: scale(1.25) !important;
}

.race-monolith-card:hover:not(.locked) .card-inner-filigree-border {
  border-color: rgba(247, 220, 159, 0.5) !important;
  box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.2) !important;
}

.race-monolith-card:hover:not(.locked) .race-status-tag.ready {
  background: linear-gradient(180deg, rgba(30, 48, 86, 0.98) 0%, rgba(16, 26, 48, 1) 100%) !important;
  border-color: var(--accent-gold-bright) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.45) !important;
}

.race-monolith-card.selected {
  border-color: #ffd700 !important;
  background: radial-gradient(ellipse at 50% 12%, rgba(32, 52, 92, 0.98) 0%, rgba(16, 26, 48, 0.99) 60%, rgba(9, 14, 26, 1) 100%) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.95), 0 0 32px rgba(223, 186, 115, 0.5), inset 0 0 28px rgba(59, 130, 246, 0.22) !important;
  transform: translateY(-3px) !important;
}

.race-monolith-card.selected .card-inner-filigree-border {
  border-color: rgba(255, 215, 0, 0.65) !important;
  box-shadow: inset 0 0 22px rgba(223, 186, 115, 0.25) !important;
}

.race-monolith-card.selected .card-corner-bracket {
  color: #ffe066 !important;
  text-shadow: 0 0 12px #ffd700 !important;
}

.race-monolith-card.selected .race-status-tag.ready {
  background: linear-gradient(180deg, rgba(180, 135, 45, 0.95) 0%, rgba(120, 85, 20, 0.98) 100%) !important;
  border-color: #ffd700 !important;
  color: #060913 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 20px rgba(223, 186, 115, 0.6) !important;
}

.race-status-tag.ready {
  background: linear-gradient(180deg, rgba(18, 28, 50, 0.95) 0%, rgba(10, 16, 30, 0.98) 100%) !important;
  border: 1.2px solid rgba(223, 186, 115, 0.45) !important;
  color: #f7dc9f !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(223, 186, 115, 0.4) !important;
}

/* Призвания (Calling cards) */
.monolith-calling-card {
  background: radial-gradient(ellipse at 50% 12%, rgba(22, 35, 62, 0.94) 0%, rgba(12, 19, 34, 0.98) 55%, rgba(6, 9, 18, 0.99) 100%) !important;
  border: 1.5px solid rgba(223, 186, 115, 0.35) !important;
}

.monolith-calling-card:hover {
  border-color: rgba(247, 220, 159, 0.9) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.96), 0 0 28px rgba(59, 130, 246, 0.3), inset 0 0 0 1px rgba(223, 186, 115, 0.3) !important;
}

.monolith-calling-card.selected {
  border-color: #ffd700 !important;
  background: radial-gradient(ellipse at 50% 12%, rgba(32, 52, 92, 0.98) 0%, rgba(16, 26, 48, 0.99) 60%, rgba(9, 14, 26, 1) 100%) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.95), 0 0 32px rgba(223, 186, 115, 0.5), inset 0 0 28px rgba(59, 130, 246, 0.22) !important;
}

/* 11. ВОЗВРАЩЕНИЕ РВАНОГО ПЕРГАМЕНТА ПОД СУРГУЧНЫМИ ПЕЧАТЯМИ */
.race-parchment-backing {
  display: flex !important;
  position: absolute;
  width: 172px;
  height: 148px;
  pointer-events: none;
  z-index: 1;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.98)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
  transform: rotate(2.5deg);
  transition: transform 0.25s ease;
}

.race-monolith-card:nth-child(2n) .race-parchment-backing { transform: rotate(-3deg); }
.race-monolith-card:nth-child(3n) .race-parchment-backing { transform: rotate(1.5deg); }

.race-parchment-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.race-seal-frame {
  position: relative;
  width: 160px;
  height: 150px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 14px;
  z-index: 2;
}

.race-seal-img {
  position: relative;
  width: 122px !important;
  height: 122px !important;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) !important;
  transition: transform 0.25s ease, filter 0.25s ease;
}




/* ==========================================================================
   КРУПНЫЕ И ЧЕТКИЕ ХАРАКТЕРИСТИКИ D&D С КАСТОМНЫМИ ИКОНКАМИ
   ========================================================================== */

/* Панель пула характеристик и статуса */
.attributes-dashboard-hud {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

@media (max-width: 960px) {
  .attributes-dashboard-hud {
    grid-template-columns: 1fr;
  }
}

.attr-hud-card {
  position: relative;
  background: linear-gradient(145deg, rgba(18, 30, 56, 0.94) 0%, rgba(10, 16, 32, 0.97) 100%);
  border: 1.5px solid rgba(223, 186, 115, 0.35);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.attr-hud-card.race-hud-brief {
  gap: 16px;
}

.attr-hud-seal-pod {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.85));
}

.attr-hud-seal {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.attr-hud-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hud-mini-label {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.hud-hero-name {
  font-family: var(--font-editorial, 'Forum', serif);
  font-size: 1.35rem;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.hud-bonus-tag {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.92rem;
  color: #fcd34d;
  letter-spacing: 0.06em;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* Центральная карточка пула очков */
.pool-hud-card {
  justify-content: center;
  text-align: center;
  background: linear-gradient(145deg, rgba(26, 44, 82, 0.96) 0%, rgba(12, 22, 44, 0.98) 100%);
  border-color: rgba(223, 186, 115, 0.65);
}

.pool-hud-card.completed {
  border-color: rgba(52, 211, 153, 0.8);
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.35), inset 0 0 20px rgba(16, 185, 129, 0.2);
}

.pool-counter-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pool-hud-label {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: #e2e8f0;
  text-transform: uppercase;
  font-weight: 800;
}

.pool-number-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}

.pool-current-val {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 2.8rem;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 0 20px rgba(253, 224, 71, 0.7);
  letter-spacing: -0.02em;
}

.pool-current-val.zero {
  color: #34d399;
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.8);
}

.pool-slash {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 1.6rem;
  color: #64748b;
  font-weight: 600;
}

.pool-max-val {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 1.5rem;
  color: #cbd5e1;
  font-weight: 700;
}

.pool-status-caption {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: #cbd5e1;
  font-weight: 700;
}

.status-check {
  color: #34d399;
  font-weight: 900;
  margin-right: 4px;
}

/* Действия пула */
.actions-hud-card {
  justify-content: center;
}

.attr-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-attr-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 6px;
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(223, 186, 115, 0.4);
  color: #f1f5f9;
}

.btn-attr-action.recommend {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.35), rgba(30, 50, 95, 0.9));
  border-color: rgba(253, 224, 71, 0.8);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.btn-attr-action.recommend:hover {
  background: linear-gradient(135deg, rgba(253, 224, 71, 0.5), rgba(45, 75, 140, 0.95));
  border-color: #fff;
  box-shadow: 0 0 20px rgba(253, 224, 71, 0.6);
  transform: translateY(-2px);
}

.btn-attr-action.reset:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(248, 113, 113, 0.7);
  color: #fca5a5;
  transform: translateY(-1px);
}

/* Сетка 6 характеристик */
.attributes-six-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

@media (max-width: 1200px) {
  .attributes-six-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .attributes-six-grid {
    grid-template-columns: 1fr;
  }
}

/* Карточка атрибута (Новый премиальный фолиант) */
.attribute-monolith-card {
  position: relative;
  background: linear-gradient(175deg, rgba(20, 32, 60, 0.96) 0%, rgba(10, 16, 32, 0.99) 100%);
  border: 1.5px solid rgba(223, 186, 115, 0.35);
  border-radius: 10px;
  padding: 24px 20px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75), inset 0 0 24px rgba(0, 0, 0, 0.6);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}

.attribute-monolith-card:hover {
  border-color: rgba(253, 224, 71, 0.7);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.85), 0 0 22px rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
}

.attribute-monolith-card.class-preferred {
  border-color: rgba(245, 158, 11, 0.85);
  background: linear-gradient(175deg, rgba(26, 38, 70, 0.97) 0%, rgba(14, 20, 38, 0.99) 100%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.8), 0 0 22px rgba(245, 158, 11, 0.3);
}

.attribute-monolith-card .card-corner-bracket {
  position: absolute;
  font-size: 11px;
  color: rgba(223, 186, 115, 0.65);
  text-shadow: 0 0 6px rgba(223, 186, 115, 0.4);
  pointer-events: none;
  z-index: 3;
}
.attribute-monolith-card .card-corner-bracket.tl { top: 7px; left: 7px; }
.attribute-monolith-card .card-corner-bracket.tr { top: 7px; right: 7px; }
.attribute-monolith-card .card-corner-bracket.bl { bottom: 7px; left: 7px; }
.attribute-monolith-card .card-corner-bracket.br { bottom: 7px; right: 7px; }

.attribute-monolith-card .card-inner-filigree-border {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 6px;
  pointer-events: none;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.85);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

.attribute-monolith-card:hover .card-inner-filigree-border {
  border-color: rgba(247, 220, 159, 0.5) !important;
  box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.2) !important;
}

.attr-card-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Верхняя шапка карточки */
.attr-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(223, 186, 115, 0.2);
}

.attr-icon-medallion {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.85));
  transition: transform 0.25s ease;
}

.attribute-monolith-card:hover .attr-icon-medallion {
  transform: scale(1.08) rotate(2deg);
}

.attr-custom-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.attr-header-middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.attr-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.attr-title-name {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.attr-sub-badge {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: #dfba73;
  font-weight: 700;
  text-transform: uppercase;
}

/* Бейджи приоритета */
.attr-calling-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 8px;
}

.attr-calling-badge.primary {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.2));
  border: 1px solid rgba(251, 191, 36, 0.7);
  color: #fef08a;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.attr-calling-badge.secondary {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.18));
  border: 1px solid rgba(96, 165, 250, 0.65);
  color: #bfdbfe;
}

.attr-calling-badge.neutral {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

.calling-star {
  font-size: 0.82rem;
}

/* Кнопка подсказки ? */
.attr-tooltip-wrapper {
  position: relative;
}

.attr-info-trigger {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(223, 186, 115, 0.55);
  color: #fde047;
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.attr-info-trigger:hover,
.attr-tooltip-wrapper:hover .attr-info-trigger,
.attr-tooltip-wrapper.active .attr-info-trigger,
.attr-corner-tooltip:hover .attr-info-trigger,
.attr-corner-tooltip.active .attr-info-trigger {
  background: #fde047 !important;
  color: #060913 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 16px rgba(253, 224, 71, 0.9) !important;
  transform: scale(1.12) !important;
}

.attr-popover-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 330px;
  max-width: 85vw;
  background: linear-gradient(145deg, rgba(14, 24, 46, 0.98), rgba(7, 12, 26, 0.99));
  border: 1.5px solid rgba(253, 224, 71, 0.7);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.96), 0 0 24px rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 500;
}

.attr-tooltip-wrapper:hover .attr-popover-tooltip,
.attr-tooltip-wrapper:focus-within .attr-popover-tooltip,
.attr-tooltip-wrapper.active .attr-popover-tooltip,
.attr-corner-tooltip:hover .attr-popover-tooltip,
.attr-corner-tooltip:focus-within .attr-popover-tooltip,
.attr-corner-tooltip.active .attr-popover-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

.tooltip-close-x {
  margin-left: auto;
  background: transparent;
  border: none;
  color: rgba(223, 186, 115, 0.7);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.tooltip-close-x:hover {
  color: #fde047;
  transform: scale(1.2);
}

.tooltip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(223, 186, 115, 0.25);
}

.tooltip-mini-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.tooltip-title {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.95rem;
  color: #ffd700;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.tooltip-desc {
  font-family: var(--font-editorial, 'Forum', serif);
  font-size: 0.92rem;
  line-height: 1.5;
  color: #e2e8f0;
  margin-bottom: 12px;
}

.tooltip-rule-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  border-left: 3px solid #dfba73;
}

.rule-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rule-label {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.72rem;
  color: #fde047;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.rule-val {
  font-family: var(--font-editorial, 'Forum', serif);
  font-size: 0.86rem;
  color: #f1f5f9;
  line-height: 1.4;
}

.tooltip-recommended-classes {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  gap: 6px;
  align-items: center;
}

.tooltip-recommended-classes strong {
  color: #fbbf24;
}

/* ЦЕНТРАЛЬНЫЙ БЛОК: КРУПНОЕ ЗНАЧЕНИЕ ХАРАКТЕРИСТИКИ */
.attr-focal-plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 14, 28, 0.7);
  border: 1px solid rgba(223, 186, 115, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.7);
}

.attr-score-main-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.attr-score-dial {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.attr-huge-num {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(223, 186, 115, 0.6), 0 4px 10px rgba(0, 0, 0, 0.9);
}

.attr-mod-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(223, 186, 115, 0.5);
  border-radius: 8px;
  padding: 6px 12px;
  min-width: 64px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.attr-mod-pill.positive {
  border-color: rgba(52, 211, 153, 0.8);
  background: rgba(6, 78, 59, 0.5);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.3);
}

.mod-pill-label {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: #94a3b8;
  font-weight: 800;
}

.mod-pill-val {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 1.35rem;
  font-weight: 900;
  color: #fde047;
  line-height: 1.1;
}

.attr-mod-pill.positive .mod-pill-val {
  color: #34d399;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.8);
}

/* Расклад формулы: БАЗА / РАСА / ВЛОЖЕНО (КРУПНЫЙ И ЧЕТКИЙ) */
.attr-formula-cluster {
  display: flex;
  gap: 8px;
}

.formula-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 5px 8px;
  min-width: 48px;
}

.formula-tag.base {
  border-color: rgba(148, 163, 184, 0.35);
}

.formula-tag.race.bonus {
  border-color: rgba(56, 189, 248, 0.7);
  background: rgba(12, 74, 110, 0.35);
}

.formula-tag.invested.active {
  border-color: rgba(251, 191, 36, 0.8);
  background: rgba(120, 53, 15, 0.35);
}

.f-tag-label {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 700;
}

.f-tag-num {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.formula-tag.race.bonus .f-tag-num {
  color: #38bdf8;
}

.formula-tag.invested.active .f-tag-num {
  color: #fbbf24;
}

/* ИНТЕРАКТИВНЫЙ БЛОК: СТЕППЕР + ПИПЫ */
.attr-controls-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-stepper {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(28, 45, 84, 0.98), rgba(14, 22, 44, 0.99));
  border: 2px solid rgba(223, 186, 115, 0.55);
  color: #fde047;
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 1.6rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

.btn-stepper:hover:not(:disabled) {
  background: linear-gradient(135deg, #fde047, #d97706);
  color: #060913;
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(253, 224, 71, 0.8);
  transform: translateY(-2px);
}

.btn-stepper:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-stepper:disabled {
  opacity: 0.22;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  color: #64748b;
  box-shadow: none;
}

.attr-stepper-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.attr-gem-pips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.stat-pip {
  width: 16px;
  height: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(223, 186, 115, 0.3);
  transition: all 0.22s ease;
}

.stat-pip.filled {
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(253, 224, 71, 0.85);
  transform: scale(1.08);
}

.stepper-status-text {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 700;
  text-align: center;
}

.stepper-status-text strong {
  color: #fde047;
}

/* ПОЛНЫЙ ПОНЯТНЫЙ ТЕКСТ ВЛИЯНИЯ В БОЮ И В МИРЕ */
.attr-mechanics-readout {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(223, 186, 115, 0.15);
  border-radius: 6px;
  padding: 10px 12px;
}

.mech-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.mech-icon {
  font-size: 0.95rem;
  line-height: 1.3;
}

.mech-text {
  font-family: var(--font-editorial, 'Forum', serif);
  font-size: 0.88rem;
  color: #cbd5e1;
}

.mech-text strong {
  color: #fde047;
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

/* Расовый бонус на карточках рас в Шаге 1 */
.race-stat-bonus-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(223, 186, 115, 0.12);
  border: 1px solid rgba(223, 186, 115, 0.35);
  border-radius: 4px;
  padding: 4px 10px;
  margin: 4px auto 8px;
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #fcd34d;
  font-weight: 700;
  text-align: center;
}

.stat-bonus-icon {
  font-size: 0.85rem;
}

/* Ключевые атрибуты на карточках призваний в Шаге 3 */
.monolith-primary-stat-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(20, 30, 50, 0.8));
  border: 1.5px solid rgba(223, 186, 115, 0.55);
  border-radius: 6px;
  padding: 6px 14px;
  margin: 8px auto 12px;
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #e2e8f0;
}

.primary-stat-star {
  color: #ffd700;
  font-size: 0.9rem;
}

.primary-stat-label {
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
}

.primary-stat-val {
  color: #fde047;
  font-weight: 800;
}

/* Таблица характеристик в Свитке Пакта (Шаг 4) */
.covenant-stats-table-block {
  margin: 22px 0 18px;
  padding: 16px 20px;
  background: rgba(10, 15, 28, 0.9);
  border: 1.5px solid rgba(223, 186, 115, 0.45);
  border-radius: 10px;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.75);
}

.covenant-stats-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #fde047;
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.covenant-stats-chips-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 680px) {
  .covenant-stats-chips-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.covenant-stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(20, 32, 58, 0.95);
  border: 1px solid rgba(223, 186, 115, 0.35);
  border-radius: 8px;
  padding: 8px 6px;
  transition: transform 0.2s ease;
}

.covenant-stat-chip:hover {
  transform: translateY(-2px);
  border-color: #fde047;
}

.chip-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.75rem;
  color: #cbd5e1;
  font-weight: 700;
}

.covenant-chip-svg-ico {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.chip-val {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.1;
  margin: 4px 0;
  text-shadow: 0 0 10px rgba(223, 186, 115, 0.5);
}

.chip-mod-badge {
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 0.78rem;
  font-weight: 800;
  color: #34d399;
}

.covenant-hp-breakdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(223, 186, 115, 0.2);
  font-family: var(--font-editorial, 'Forum', serif);
  font-size: 1.05rem;
  color: #f1f5f9;
}

.covenant-hp-breakdown strong {
  color: #f87171;
  font-family: var(--font-primary, 'Cinzel', serif);
  font-size: 1.25rem;
  font-weight: 800;
}


/* Аутентичная сургучная печать характеристики на рваном пергаменте ПО ЦЕНТРУ КАРТОЧКИ */
.stat-seal-frame {
  position: relative;
  width: 146px;
  height: 136px;
  margin: 0 auto 10px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.attribute-monolith-card:hover .stat-seal-frame {
  transform: scale(1.08) translateY(-2px);
}

.stat-parchment-backing {
  position: absolute;
  width: 156px;
  height: 136px;
  pointer-events: none;
  z-index: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.stat-parchment-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.88));
}

.stat-seal-img {
  position: relative;
  width: 120px !important;
  height: 120px !important;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) brightness(1.12) saturate(1.18) !important;
  transition: transform 0.25s ease;
}

/* Индивидуальные геральдические ореолы печатей характеристик */
.stat-str-glow .stat-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 16px rgba(239, 68, 68, 0.6)) brightness(1.12) saturate(1.18) !important;
}
.stat-dex-glow .stat-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 16px rgba(245, 158, 11, 0.6)) brightness(1.12) saturate(1.18) !important;
}
.stat-con-glow .stat-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 16px rgba(16, 185, 129, 0.65)) brightness(1.14) saturate(1.22) !important;
}
.stat-int-glow .stat-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 16px rgba(59, 130, 246, 0.65)) brightness(1.12) saturate(1.18) !important;
}
.stat-wis-glow .stat-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 16px rgba(168, 85, 247, 0.65)) brightness(1.12) saturate(1.18) !important;
}
.stat-cha-glow .stat-seal-img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 16px rgba(250, 204, 21, 0.65)) brightness(1.12) saturate(1.18) !important;
}

/* Геральдический заголовок характеристики по центру в едином стиле */
.stat-header-cluster {
  text-align: center;
  margin-bottom: 6px;
  width: 100%;
  z-index: 2;
}

.stat-title {
  font-family: var(--font-cinzel);
  font-size: 1.42rem !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  color: #fff !important;
  margin: 0 0 6px !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 14px rgba(212, 175, 55, 0.45) !important;
}

.stat-flourish-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 6px;
  width: 75%;
  opacity: 0.85;
}

.stat-flourish-divider .f-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.65), transparent);
}

.stat-flourish-divider .f-gem {
  color: var(--gold-bright);
  font-size: 10px;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
}

.stat-dnd-tag {
  font-family: var(--font-cormorant);
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  color: rgba(223, 186, 115, 0.85);
  text-transform: uppercase;
}

/* Кнопка подсказки в верхнем правом углу карточки */
.attr-corner-tooltip {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
}

.tooltip-mini-seal {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}

.covenant-chip-seal-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}


/* Authentic Wax Seal Navigation Icons */
.chapter-flourish {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin-bottom: 2px !important;
  line-height: 1 !important;
}

.chapter-nav-seal {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85));
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.28s ease;
  display: block;
}

.chapter-link:hover .chapter-nav-seal {
  transform: scale(1.15) rotate(2deg);
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.9));
}

.chapter-link.active .chapter-nav-seal {
  transform: scale(1.12);
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.7)) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.95));
}
