/* =========================================================================
   Howl of Eternity – Hlavní styly
   Dark fantasy theme: zlaté akcenty, tmavé pozadí, pergamenový text
   ========================================================================= */

/* ---- Proměnné ---- */
:root {
  --bg-deep:    #08080f;
  --bg-dark:    #0d0d1a;
  --bg-card:    #12121e;
  --bg-card2:   #1a1a2e;
  --border:     #c9a227;
  --border-dim: #6b5400;
  --gold:       #c9a227;
  --gold-light: #e8c44a;
  --text:       #e8d5b7;
  --text-muted: #b4996d;
  --text-dim:   #9a8870;
  --text-dark:  #1a1a2e;
  --red:        #8b1a1a;
  --red-bright: #c0392b;
  --green:      #1a4a1a;
  --green-bright:#27ae60;
  --blue:       #2980b9;
  --purple:     #8e44ad;
  --radius:     6px;
  --radius-lg:  12px;
  --shadow:     0 4px 24px rgba(0,0,0,0.7);
  --transition: 0.2s ease;
  --gold-dim:   rgba(201,162,39,0.12);
}

/* ---- Tematické scrollbary ---- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-dim) var(--bg-deep);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-dim);
  border-radius: 4px;
  border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

::-webkit-scrollbar-corner {
  background: var(--bg-deep);
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,h2,h3,h4,h5 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--gold-light);
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }

/* ---- Utility ---- */
.hidden { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

/* NAVBAR → moved to nav.css */

/* =========================================================================
   TLAČÍTKA
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius);
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}
.btn--gold {
  background: var(--gold);
  color: #0d0d1a;
  border-color: var(--gold);
}
.btn--gold:hover { background: var(--gold-light); border-color: var(--gold-light); color: #0d0d1a; }
.btn--gold:disabled { opacity: 0.45; cursor: not-allowed; }

.btn--outline {
  background: transparent;
  color: var(--gold);
  border-color: var(--border-dim);
}
.btn--outline:hover { border-color: var(--gold); background: rgba(201,162,39,0.08); }
.btn--outline:disabled { opacity: 0.4; cursor: not-allowed; }

/* Ghost — diskrétní sekundární akce (Reset, Export, Smazat...) */
.btn--ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: rgba(255, 255, 255, 0.08);
}
.btn--ghost:hover {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.06);
  color: var(--gold);
}
.btn--ghost:disabled { opacity: 0.4; cursor: not-allowed; }

/* Danger — destruktivní akce (Konec souboje, vymazat data...) */
.btn--danger {
  background: transparent;
  color: #e07a3c;
  border-color: rgba(192, 57, 43, 0.45);
}
.btn--danger:hover {
  background: rgba(192, 57, 43, 0.14);
  border-color: #c0392b;
  color: #f08074;
}
.btn--danger:disabled { opacity: 0.4; cursor: not-allowed; }

/* Velikostní modifikátory */
.btn--sm  { padding: 0.3rem 0.8rem;  font-size: 0.8rem; }
.btn--lg  { padding: 0.75rem 1.8rem; font-size: 1rem; }
.btn--xl  { padding: 0.9rem 2.5rem;  font-size: 1.1rem; }

/* =========================================================================
   HLAVNÍ OBSAH
   ========================================================================= */
.main-content { flex: 1; }

/* =========================================================================
   PATIČKA
   ========================================================================= */
.footer {
  border-top: 1px solid var(--border-dim);
  background: var(--bg-dark);
  padding: 1.5rem;
  text-align: center;
}
.footer__title { font-family: 'Cinzel', serif; font-size: 0.95rem; color: var(--gold); margin-bottom: 0.25rem; }
.footer__sub { font-size: 0.8rem; color: var(--text-dim); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201,162,39,0.12) 0%, transparent 60%),
    linear-gradient(180deg, #0a0a14 0%, #14091c 100%);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center bottom, #14091c88 0%, transparent 70%);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding: 4rem 1.5rem;
  max-width: 700px;
}
.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 40px rgba(201,162,39,0.4);
  margin-bottom: 1rem;
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--text-dim);
  margin-bottom: 2rem;
}
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* =========================================================================
   SEKCE
   ========================================================================= */
.section { padding: 4rem 1.5rem; }
.section--dark { background: var(--bg-dark); }
.section--cta {
  background: radial-gradient(ellipse at center, rgba(201,162,39,0.08) 0%, transparent 70%);
  text-align: center;
}
.section__title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  text-align: center;
  margin-bottom: 1rem;
}
.section__lead {
  text-align: center;
  color: var(--text-dim);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}
.section__cta { text-align: center; margin-top: 2rem; }

/* =========================================================================
   GRID LAYOUTS
   ========================================================================= */
.cards-grid { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; }
.cards-grid--4 > * { flex: 0 1 280px; min-width: 220px; }
.cards-grid--5 > * { flex: 0 1 220px; min-width: 180px; }

/* =========================================================================
   INFO KARTY (domovská stránka)
   ========================================================================= */
.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.info-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.info-card__icon { font-size: 2rem; margin-bottom: 0.75rem; }
.info-card__title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.info-card__text { font-size: 0.95rem; color: var(--text-dim); }

/* =========================================================================
   STAT PREVIEW KARTY
   ========================================================================= */
.stat-preview-card {
  background: var(--bg-card);
  border: 1px solid var(--stat-color, var(--border-dim));
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-preview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--stat-color) 25%, transparent);
}
.stat-preview-card__icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.stat-preview-card__name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1rem; color: var(--stat-color); margin-bottom: 0.4rem; }
.stat-preview-card__effect { font-size: 0.8rem; color: var(--text-dim); }

/* =========================================================================
   STRÁNKA PRAVIDEL
   ========================================================================= */
.rules-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.rules-sidebar {
  align-self: start;
  position: sticky;
  top: 70px;
}
/* Rules sidebar nav list → moved to nav.css */

.rules-content { min-width: 0; }

.rules-section { margin-bottom: 4rem; scroll-margin-top: 80px; }
.rules-section__title {
  font-size: 1.8rem;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.rules-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-top: 2px solid rgba(201,162,39,0.25);
  border-radius: var(--radius-lg);
  scroll-margin-top: 80px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.rules-card__header { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; text-align: center; }
.rules-race-img { width: 100px; height: 100px; flex-shrink: 0; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold); box-shadow: 0 0 18px rgba(201,162,39,0.25); }
.rules-race-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; background: #fff; }
.rules-subrace-img { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; border: 2px solid var(--border); margin: 0 auto 0.5rem; box-shadow: 0 0 8px rgba(201,162,39,0.15); }
.rules-subrace-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; background: #fff; }
.rules-race-lore-link { display: inline-block; margin-top: 1rem; padding: 0.4rem 1rem; border: 1px solid rgba(201,162,39,0.3); border-radius: 6px; color: var(--gold); font-size: 0.85rem; font-family: 'Crimson Text', serif; text-decoration: none; transition: background 0.2s, border-color 0.2s; width: 100%; text-align: center; box-sizing: border-box; }
.rules-race-lore-link:hover { background: rgba(201,162,39,0.08); border-color: var(--gold); }
.rules-card__title { font-size: 1.3rem; }
.rules-card__tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.rules-card__desc { color: var(--text-dim); margin-bottom: 1rem; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.rules-card__section { margin-bottom: 0.75rem; font-size: 0.95rem; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.rules-card__section--playstyle { border-top: 1px solid var(--border-dim); padding-top: 0.75rem; color: var(--text-dim); }
.rules-card__subtitle { font-size: 1rem; margin: 1rem 0 0.75rem; text-align: center; }

/* ---- Rules class card (redesigned) ---- */
.rules-class-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  scroll-margin-top: 80px;
  margin-bottom: 1.25rem;
}

.rules-class-card__top {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.rules-class-card__image {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 0 15px rgba(201,162,39,0.2);
}

.rules-class-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.rules-class-card__intro {
  flex: 1;
  min-width: 0;
}

.rules-class-card__name {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.rules-class-card__tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.rc-stat-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  border: 1px solid;
}

.rc-stat-tag--spell {
  background: rgba(142,68,173,0.15) !important;
  border-color: rgba(142,68,173,0.4) !important;
  color: #bb6bd9 !important;
}

.rules-class-card__playstyle {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-style: italic;
  margin: 0;
}

.rules-class-card__desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.rules-class-card__sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.rules-class-card__section {
  padding: 0.5rem 0.7rem;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius);
  border-left: 3px solid var(--border-dim);
  font-size: 0.88rem;
}

.rules-class-card__section p {
  margin: 0;
  color: var(--text-dim);
}

.rules-class-card__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 0.2rem;
}

.rules-class-card__levels {
  padding: 0.6rem 0.8rem;
  background: rgba(201,162,39,0.04);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
}

.rc-level {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 0.4rem;
}

.rc-level__badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--bg-dark);
  background: var(--gold);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  min-width: 2.5rem;
  text-align: center;
}

.rc-level__content {
  flex: 1;
  font-size: 0.88rem;
  color: #ddd;
}

.rc-level__abilities {
  /* inline */
}

.rc-spell-slot {
  display: inline-block;
  font-size: 0.72rem;
  background: rgba(142,68,173,0.15);
  color: #bb6bd9;
  border: 1px solid rgba(142,68,173,0.3);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  margin-left: 0.3rem;
}

@media (max-width: 480px) {
  .rules-class-card__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .rules-class-card__tags {
    justify-content: center;
  }
  .rules-class-card__sections {
    grid-template-columns: 1fr;
  }
}

.subraces-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.subraces-grid > * { flex: 0 1 280px; min-width: 200px; }
.subrace-card {
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 1rem;
}
.subrace-card__name { font-size: 0.95rem; color: var(--gold); margin-bottom: 0.4rem; text-align: center; }
.subrace-card__desc { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.5rem; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.subrace-card__bonuses { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 0.5rem; justify-content: center; }
.subrace-card__ability { font-size: 0.85rem; }

/* Badge */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Cinzel', serif;
}
.badge--pos { background: rgba(39,174,96,0.15); border: 1px solid #27ae6066; color: #6fd99e; }
.badge--neg { background: rgba(192,57,43,0.15); border: 1px solid #c0392b66; color: #f08080; }

/* Tag */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.78rem;
}
.tag--stat { background: rgba(201,162,39,0.1); border: 1px solid var(--border-dim); color: var(--gold); }
.tag--spell { background: rgba(142,68,173,0.15); border: 1px solid #8e44ad66; color: #c39bd3; }

/* Level abilities */
.level-ability-list { list-style: none; padding: 0; }
.level-ability-list li { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.3rem; flex-wrap: wrap; }
.level-badge {
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
  font-family: 'Cinzel', serif;
  color: var(--gold);
  white-space: nowrap;
}
.spell-slot-badge {
  background: rgba(142,68,173,0.15);
  border: 1px solid #8e44ad44;
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  font-size: 0.72rem;
  color: #c39bd3;
}

/* Stat detail cards */
.stats-detail-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.stats-detail-grid > * { flex: 0 1 300px; min-width: 200px; }
.stat-detail-card {
  background: var(--bg-card);
  border: 1px solid;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-detail-card__header { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; }
.stat-detail-card__icon { font-size: 1.3rem; }
.stat-detail-card__name { font-size: 1rem; }
.stat-detail-card__desc { padding: 0.75rem 1rem; font-size: 0.88rem; color: var(--text-dim); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.stat-detail-card__effects { list-style: none; padding: 0 1rem 1rem; font-size: 0.85rem; }
.stat-detail-card__effects li::before { content: '• '; color: var(--gold); }

/* Rules info box */
.rules-info-box {
  background: rgba(201,162,39,0.06);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.rules-info-box ul { list-style: none; }
.rules-info-box li::before { content: '▸ '; color: var(--gold); }
.rules-info-box li { margin-bottom: 0.3rem; }

/* Rules tables */
.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.rules-table th {
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: var(--gold);
}
.rules-table td { border: 1px solid #2a2a3a; padding: 0.45rem 0.75rem; }
.rules-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.rules-table--compact td, .rules-table--compact th { padding: 0.3rem 0.5rem; font-size: 0.82rem; }

/* Skills grid */
.skills-stat-header { font-size: 1.1rem; margin: 1.5rem 0 0.75rem; border-bottom: 2px solid var(--stat-color, var(--border-dim)); padding-bottom: 0.3rem; color: var(--stat-color, var(--text)); scroll-margin-top: 80px; }
.skills-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.skills-grid > * { flex: 0 1 420px; min-width: 280px; }
.skill-rules-card { background: var(--bg-card); border: 1px solid var(--border-dim); border-left: 3px solid var(--stat-color, var(--border-dim)); border-radius: var(--radius); padding: 1rem; }
.skill-rules-card__name { font-size: 0.95rem; color: var(--gold-light); margin-bottom: 0.4rem; }
.skill-rules-card__desc { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.skill-rules-card__tiers { list-style: none; font-size: 0.82rem; }
.skill-rules-card__tiers li { display: flex; gap: 0.4rem; margin-bottom: 0.2rem; }
.tier-num {
  display: inline-block;
  min-width: 1.2rem;
  height: 1.2rem;
  line-height: 1.2rem;
  text-align: center;
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  font-size: 0.72rem;
  font-family: 'Cinzel', serif;
  color: var(--gold);
}

/* Abilities grid */
.abilities-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.abilities-grid > * { flex: 0 1 420px; min-width: 280px; }
.ability-rules-card { background: var(--bg-card); border: 1px solid var(--border-dim); border-radius: var(--radius); padding: 1rem; scroll-margin-top: 80px; }
.ability-rules-card--innate { border-color: rgba(93,187,122,0.3); background: rgba(93,187,122,0.04); }
.ability-rules-card__source-badge { display: inline-block; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #5dbb7a; background: rgba(93,187,122,0.12); border: 1px solid rgba(93,187,122,0.3); border-radius: 3px; padding: 0.1rem 0.4rem; margin-bottom: 0.5rem; }
.ability-rules-card__name { font-size: 0.95rem; color: var(--gold-light); margin-bottom: 0.4rem; }
.ability-rules-card__desc { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.5rem; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.ability-rules-card__prereqs { font-size: 0.8rem; margin-bottom: 0.4rem; }
.prereq-tag { display: inline-block; background: var(--bg-card2); border: 1px solid var(--border-dim); border-radius: 3px; padding: 0.15rem 0.45rem; font-size: 0.75rem; margin: 0.15rem; text-decoration: none; color: var(--text-dim); transition: border-color var(--transition), background var(--transition); }
a.prereq-tag:hover { border-color: var(--gold); background: rgba(201,162,39,0.08); color: var(--text); }
.prereq-tag--stat { border-left: 2px solid var(--blue); color: #85c1e9; }
.prereq-tag--skill { border-left: 2px solid var(--green-bright); color: #6fd99e; }
.prereq-tag--magic { border-left: 2px solid var(--purple); color: #c39bd3; }
.prereq-tag--class { border-left: 2px solid var(--gold); color: var(--gold); }
.ability-rules-card__effect { font-size: 0.85rem; margin-bottom: 0.25rem; }
.effect-label { border-radius: 3px; padding: 0.1rem 0.35rem; font-size: 0.72rem; font-weight: 600; }
.effect-label--passive { background: rgba(39,174,96,0.15); color: #6fd99e; }
.effect-label--active  { background: rgba(201,162,39,0.15); color: var(--gold); }
.cooldown-badge { display: inline-block; background: rgba(142,68,173,0.12); border: 1px solid #8e44ad44; border-radius: 3px; padding: 0.1rem 0.35rem; font-size: 0.72rem; color: #c39bd3; margin-left: 0.3rem; }

/* Spells grid */
.arch-label { font-size: 1rem; color: var(--text-dim); margin: 1rem 0 0.5rem; }
.spells-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.spells-grid > * { flex: 0 1 400px; min-width: 250px; }
.spell-rules-card { background: var(--bg-card); border: 1px solid var(--border-dim); border-radius: var(--radius); padding: 0.9rem; }
.spell-rules-card__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; flex-wrap: wrap; gap: 0.3rem; }
.spell-rules-card__name { font-size: 0.9rem; color: var(--gold-light); font-weight: 600; }
.spell-rules-card__desc { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 0.4rem; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.spell-rules-card__meta { display: flex; gap: 0.4rem; flex-wrap: wrap; font-size: 0.75rem; color: var(--text-dim); }
.spell-rules-card__meta span { background: var(--bg-card2); border-radius: 3px; padding: 0.1rem 0.35rem; }

/* Element badges */
.element-badge { border-radius: 3px; padding: 0.1rem 0.4rem; font-size: 0.72rem; font-weight: 600; border: 1px solid; }
.element-badge--psychické  { background: rgba(142,68,173,0.12); border-color: #8e44ad55; color: #c39bd3; }
.element-badge--fyzické    { background: rgba(201,162,39,0.12); border-color: #c9a22755; color: var(--gold); }
.element-badge--oheň       { background: rgba(192,57,43,0.12);  border-color: #c0392b55; color: #f08080; }
.element-badge--voda       { background: rgba(41,128,185,0.12); border-color: #2980b955; color: #85c1e9; }
.element-badge--blesk      { background: rgba(243,156,18,0.12); border-color: #f39c1255; color: #f9ca24; }
.element-badge--temnota    { background: rgba(30,20,50,0.5);    border-color: #4a306055; color: #b39ddb; }

/* Deities */
.deities-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.deities-grid > * { flex: 0 1 440px; min-width: 280px; }
.deity-card { background: var(--bg-card); border: 1px solid var(--border-dim); border-radius: var(--radius-lg); padding: 1.25rem; }
.deity-card__name { font-size: 1rem; margin-bottom: 0.5rem; }
.deity-card__desc { font-size: 0.87rem; color: var(--text-dim); margin-bottom: 0.75rem; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.deity-card__bonuses { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.deity-card__ability { font-size: 0.87rem; border-top: 1px solid var(--border-dim); padding-top: 0.5rem; margin-top: 0.5rem; }
.deity-card__sub-list { display: flex; flex-direction: column; gap: 0.8rem; margin-top: 0.8rem; border-top: 1px solid var(--border-dim); padding-top: 0.8rem; }
.deity-card__sub { display: flex; gap: 0.8rem; align-items: start; }
.deity-card__sub-img { width: 70px; height: 70px; flex-shrink: 0; border-radius: 6px; overflow: hidden; }
.deity-card__sub-img img { width: 100%; height: 100%; object-fit: cover; background: #fff; }

/* Weapon modifiers */
.weapon-modifiers { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; justify-content: center; }
.modifier-badge { background: var(--bg-card2); border: 1px solid var(--border-dim); border-radius: 4px; padding: 0.2rem 0.6rem; font-size: 0.8rem; color: var(--text-dim); transition: background 0.2s; }
.modifier-badge--pos { background: rgba(39,174,96,0.1); border-color: rgba(39,174,96,0.3); color: #27ae60; }
.modifier-badge--neg { background: rgba(192,57,43,0.1); border-color: rgba(192,57,43,0.3); color: #c0392b; }
.modifier-badge--shield { background: rgba(52,152,219,0.1); border-color: rgba(52,152,219,0.3); color: #3498db; }

/* =========================================================================
   STRÁNKA STATISTIKY
   ========================================================================= */
.page-title { font-size: clamp(1.8rem,4vw,2.5rem); margin-bottom: 0.5rem; }
.page-lead { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 2rem; }

.stat-total-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  max-width: 300px;
  margin: 0 auto 3rem;
}
.stat-total-card__number { font-family: 'Cinzel', serif; font-size: 3rem; font-weight: 900; color: var(--gold); }
.stat-total-card__label { color: var(--text-dim); font-size: 0.9rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; margin-bottom: 2rem; }

.chart-card { background: var(--bg-card); border: 1px solid var(--border-dim); border-radius: var(--radius-lg); padding: 1.5rem; }
.chart-card__title { font-size: 1.1rem; margin-bottom: 1.25rem; }

.bar-chart { list-style: none; }
.bar-chart__row { display: grid; grid-template-columns: 140px 1fr 50px; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.bar-chart__label { font-size: 0.85rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-chart__bar-wrap { background: var(--bg-card2); border-radius: 3px; height: 10px; overflow: hidden; }
.bar-chart__bar { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: 3px; transition: width 0.5s ease; min-width: 4px; }
.bar-chart__count { font-family: 'Cinzel', serif; font-size: 0.85rem; color: var(--gold); text-align: right; }

.empty-msg { color: var(--text-dim); font-style: italic; }
.privacy-note { text-align: center; font-size: 0.82rem; color: var(--text-dim); margin-top: 2rem; }

/* =========================================================================
   TOOLTIP OVERLAY
   ========================================================================= */
.tooltip-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.tooltip-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 540px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.tooltip-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
}
.tooltip-close:hover { color: var(--gold); }

/* =========================================================================
   RULES HUB CARDS
   ========================================================================= */

.rules-lead {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.rules-hub-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
.rules-hub-grid > * { flex: 0 1 380px; min-width: 300px; }

.rules-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.rules-hub-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(201,162,39,0.15);
}
.rules-hub-card__icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.rules-hub-card__title { font-size: 1.3rem; margin-bottom: 0.5rem; }
.rules-hub-card__desc { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 1rem; line-height: 1.5; }
.rules-hub-card__list { list-style: none; font-size: 0.85rem; color: var(--text-muted); }
.rules-hub-card__list li { margin-bottom: 0.2rem; }
.rules-hub-card__list li::before { content: '▸ '; color: var(--gold); }

/* Submenu toggle, rules sublists, nav icon slot → moved to nav.css */

/* =========================================================================
   SECTION INTRO (shared across rules pages)
   ========================================================================= */
.section-intro {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* =========================================================================
   COMPANION CARDS (Vyvolávání)
   ========================================================================= */
.companion-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.companion-grid > * { flex: 0 1 380px; min-width: 280px; }
.companion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  transition: border-color var(--transition);
}
.companion-card:hover { border-color: var(--gold); }
.companion-card__name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
}
.companion-card__stats {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.cs-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid;
}
.cs-badge--atk { background: rgba(192,57,43,0.12); border-color: #c0392b55; color: #f08080; }
.cs-badge--dmg { background: rgba(243,156,18,0.12); border-color: #f39c1255; color: #f9ca24; }
.cs-badge--ac  { background: rgba(41,128,185,0.12); border-color: #2980b955; color: #85c1e9; }
.cs-badge--hp  { background: rgba(39,174,96,0.12);  border-color: #27ae6055; color: #6fd99e; }
.companion-card__ability {
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-dim);
  padding-top: 0.5rem;
  margin-top: 0.3rem;
}

/* =========================================================================
   ENCHANTMENT CARDS (Očarování)
   ========================================================================= */
.enchant-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.75rem;
}
.enchant-grid > * { flex: 0 1 400px; min-width: 300px; }
.enchant-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--purple);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}
.enchant-card__name {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
}
.enchant-card__effect {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}
.enchant-card__qualities {
  margin-bottom: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.enchant-quality {
  flex: 1 1 30%;
  min-width: 140px;
  max-width: 45%;
}
.enchant-quality__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.enchant-quality__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.enchant-quality__list li {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.1rem 0;
  padding-left: 0.8rem;
  position: relative;
}
.enchant-quality__list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--purple);
}
.enchant-card__meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.5rem;
}
.enchant-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  border: 1px solid;
}
.enchant-tag--item {
  background: rgba(201,162,39,0.08);
  border-color: var(--border-dim);
  color: var(--text-muted);
}
.enchant-tag--recipe {
  background: rgba(142,68,173,0.1);
  border-color: #8e44ad44;
  color: #c39bd3;
}

/* =========================================================================
   POTION CARDS (Lektvary)
   ========================================================================= */
.potion-tier { margin-bottom: 2rem; }
.potion-tier__title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-dim);
}
.potion-tier__roll {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.potion-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.potion-grid > * { flex: 0 1 380px; min-width: 280px; }
.potion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 1rem;
}
.potion-card__name {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}
.potion-card__variants {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.3rem;
}
.potion-card__effect {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}
.potion-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.potion-card__meta span {
  background: var(--bg-card2);
  border-radius: 3px;
  padding: 0.15rem 0.4rem;
}

/* =========================================================================
   RESOURCE CARDS (Drahokamy, Rostliny)
   ========================================================================= */
.resource-location { margin-bottom: 1.5rem; }
.resource-location__title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-dim);
}
.resource-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.resource-grid > * { flex: 0 1 300px; min-width: 220px; }
.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 0.8rem;
}
.resource-card__name {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  color: var(--gold-light);
  margin-bottom: 0.3rem;
}
.resource-card__desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.common-materials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.material-tag {
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: 3px;
  color: var(--text-muted);
}

/* =========================================================================
   GUILD CARDS (Cechy)
   ========================================================================= */
.guild-category-title {
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border-dim);
}
.guild-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.guild-grid > * { flex: 0 1 420px; min-width: 300px; }
.guild-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-top: 2px solid rgba(201,162,39,0.25);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.guild-card__name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}
.guild-card__desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.guild-card__meta {
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
}
.guild-card__motto {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
  border-left: 2px solid var(--border-dim);
  padding-left: 0.75rem;
  margin: 0.5rem 0;
}
.guild-card__rewards {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* =========================================================================
   LORE BLOCK VISUAL UPGRADE (shared content blocks)
   ========================================================================= */
.lore-block {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
}
.lore-block__heading {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(201,162,39,0.15);
}
.lore-block__text {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.65;
  white-space: pre-line;
}

/* Breadcrumb, cross-nav → moved to nav.css */

/* =========================================================================
   MECHANIC BLOCK (dice rolls, bonuses, formulas)
   ========================================================================= */
.mech-block {
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--text);
}
.mech-block__title {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

/* =========================================================================
   INGREDIENT TOOLTIPS (recipe highlighting)
   ========================================================================= */
.ingredient {
  position: relative;
  cursor: pointer;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.88em;
  white-space: nowrap;
  text-decoration: none;
  transition: filter var(--transition), transform var(--transition);
}
.ingredient:hover {
  filter: brightness(1.3);
  transform: translateY(-1px);
}
.ingredient--gem {
  background: rgba(142,68,173,0.12);
  border: 1px solid rgba(142,68,173,0.3);
  color: #c39bd3;
}
.ingredient--plant {
  background: rgba(39,174,96,0.12);
  border: 1px solid rgba(39,174,96,0.3);
  color: #6fd99e;
}
.ingredient--common {
  background: rgba(201,162,39,0.08);
  border: 1px solid rgba(201,162,39,0.25);
  color: var(--text-muted);
}
.ingredient--container {
  background: rgba(41,128,185,0.1);
  border: 1px solid rgba(41,128,185,0.3);
  color: #85c1e9;
}

/* =========================================================================
   ICON TOOLTIP (shared mini-icon tooltip wrapper)
   ========================================================================= */
.icon-tip {
  position: relative;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  background: rgba(201,162,39,0.10);
  border: 1px solid rgba(201,162,39,0.25);
  font-size: 0.82em;
  vertical-align: middle;
  transition: background var(--transition), border-color var(--transition);
}
.icon-tip:hover {
  background: rgba(201,162,39,0.22);
  border-color: var(--gold);
}
/* Standalone info hint (ℹ symbol style) */
.hint-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--gold);
  background: rgba(201,162,39,0.08);
  border: 1px solid rgba(201,162,39,0.2);
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  cursor: help;
  position: relative;
  vertical-align: middle;
  margin-left: 0.3rem;
}

/* =========================================================================
   COMPANION CARD – attack/defense split
   ========================================================================= */
.companion-card__combat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.5rem;
  align-items: center;
  margin-bottom: 0.6rem;
}
.combat-row {
  display: contents;
}
.combat-row__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-align: right;
  white-space: nowrap;
}
.combat-row__value {
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid;
  font-size: 0.78rem;
  font-weight: 600;
  width: fit-content;
}
.combat-row__value--atk { background: rgba(192,57,43,0.12); border-color: #c0392b55; color: #f08080; }
.combat-row__value--def { background: rgba(41,128,185,0.12); border-color: #2980b955; color: #85c1e9; }
.combat-row__value--dmg { background: rgba(243,156,18,0.12); border-color: #f39c1255; color: #f9ca24; }
.combat-row__value--ac  { background: rgba(142,68,173,0.12); border-color: #8e44ad55; color: #c39bd3; }
.combat-row__value--hp  { background: rgba(39,174,96,0.12);  border-color: #27ae6055; color: #6fd99e; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

/* ---- Tablet (≤ 900px) ---- */
@media (max-width: 900px) {
  .rules-layout {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem 3rem;
  }
  /* .rules-sidebar hide → nav.css */

  .section { padding: 2.5rem 1rem; }

  .stats-grid { grid-template-columns: 1fr; }

  /* Cards grid is display:flex with flex-basis (line 251–253) — wrap happens
     naturally at this width, no grid override needed. */
}

/* ---- Mobil (≤ 640px) ---- */
@media (max-width: 640px) {
  /* Navbar → moved to nav.css */

  /* Hero */
  .hero { min-height: 50vh; }
  .hero__content { padding: 2.5rem 1rem; }
  .hero__actions { flex-direction: column; align-items: center; }

  /* Section */
  .section { padding: 2rem 1rem; }
  .section__title { font-size: 1.4rem; }

  /* Stats grid (statistiky) */
  .stats-grid { grid-template-columns: 1fr; gap: 1.25rem; }

  /* Bar chart */
  .bar-chart__row { grid-template-columns: 90px 1fr 36px; gap: 0.5rem; }
  .bar-chart__label { font-size: 0.8rem; }

  /* Rules */
  .rules-section__title { font-size: 1.4rem; }
  .subraces-grid { grid-template-columns: 1fr; }
  .abilities-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .spells-grid { grid-template-columns: 1fr; }

  /* Stat preview */
  .stats-detail-grid > * { flex: 1 1 200px; min-width: 160px; }

  /* Buttons */
  .btn--xl { padding: 0.75rem 1.8rem; font-size: 1rem; }

  /* Page titles */
  .page-title { font-size: 1.6rem; }
  .page-lead { font-size: 0.95rem; }
}

/* ---- Malý mobil (≤ 440px) ---- */
@media (max-width: 440px) {
  /* .navbar__brand → moved to nav.css */

  .hero__title { font-size: 2rem; }

  .btn { padding: 0.5rem 1rem; font-size: 0.85rem; }
}

/* Search box → moved to nav.css */

/* =========================================================================
   YEAR TOOLTIP
   ========================================================================= */

[data-tooltip] {
  cursor: help;
}

/* =========================================================================
   CUSTOM TOOLTIP (JS-powered .hoe-tooltip)
   ========================================================================= */

.hoe-tooltip {
  position: absolute;
  z-index: 9999;
  max-width: 320px;
  padding: 0.4rem 0.75rem;
  font-family: 'Crimson Text', serif;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #f0e6d2;
  background: linear-gradient(135deg, #1a1510 0%, #241e16 100%);
  border: 1px solid var(--gold);
  border-radius: 4px;
  box-shadow:
    0 0 12px rgba(201,162,39,0.15),
    0 4px 16px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(201,162,39,0.08);
  pointer-events: none;
  white-space: normal;
  word-wrap: break-word;
}

/* Decorative corner accents */
.hoe-tooltip::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 4px;
  border: 1px solid rgba(201,162,39,0.12);
  pointer-events: none;
}

/* Arrow above (tooltip is above the element) */
.hoe-tooltip--above::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: #241e16;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

/* Arrow below (tooltip is below the element) */
.hoe-tooltip--below::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px;
  background: #1a1510;
  border-left: 1px solid var(--gold);
  border-top: 1px solid var(--gold);
}

/* Ensure tooltip containers don't clip */
.lore-ruler-meta,
.lore-ruler-meta__item,
.lore-detail-meta,
.lore-entity-card__meta {
  overflow: visible;
}

/* =========================================================================
   ENTITY AUTO-LINKS (subtle inline links in text)
   ========================================================================= */

.entity-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(201, 162, 39, 0.4);
  transition: border-color 0.2s, color 0.2s;
}

.entity-link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
  border-bottom-style: solid;
}

/* =========================================================================
   LORE ICONS (birth, death, reign)
   ========================================================================= */

/* Icon wrapper: holds the masked icon + tooltip pseudo-element */
.lore-icon {
  display: inline-block;
  position: relative;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.15em;
  flex-shrink: 0;
  cursor: help;
}

/* The actual masked icon lives in ::before so ::after is free for tooltip */
.lore-icon::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: currentColor;
}

.lore-icon--birth::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='currentColor' stroke-width='2'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6' fill='none' stroke='currentColor' stroke-width='2'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/svg%3E") center/contain no-repeat;
}

.lore-icon--death::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v14M3 5l10 6M13 5L3 11' stroke='currentColor' stroke-width='2' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v14M3 5l10 6M13 5L3 11' stroke='currentColor' stroke-width='2' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
}

.lore-icon--reign::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 12l2-7 4 4 4-4 2 7z' fill='currentColor'/%3E%3Crect x='1' y='12' width='14' height='2' rx='1'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 12l2-7 4 4 4-4 2 7z' fill='currentColor'/%3E%3Crect x='1' y='12' width='14' height='2' rx='1'/%3E%3C/svg%3E") center/contain no-repeat;
}

.lore-icon--approx::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8c2-3 4 3 6 0s4 3 6 0' stroke='currentColor' stroke-width='2' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8c2-3 4 3 6 0s4 3 6 0' stroke='currentColor' stroke-width='2' fill='none'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Lore icon tooltip is now handled by the global JS tooltip system */

/* =========================================================================
   SCROLLABLE SIDEBAR NAVIGATION (Rules + Lore)
   ========================================================================= */
.rules-sidebar {
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.rules-nav {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

/* =========================================================================
   COMBAT STATS UNIFORM SIZING (Vyvolání)
   ========================================================================= */
.combat-stats-uniform .combat-row__value {
  min-width: 5.5rem;
  text-align: center;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* =========================================================================
   COMMON MATERIALS GRID (enriched display)
   ========================================================================= */
.common-materials-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}
.common-materials-grid > * { flex: 1 1 260px; min-width: 220px; }
.common-material-card {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  transition: border-color var(--transition);
}
.common-material-card:hover { border-color: var(--gold); }
.common-material-card__body { min-width: 0; }
.common-material-card__name { display: block; font-family: 'Cinzel', serif; font-size: 0.88rem; color: var(--gold-light); margin-bottom: 0.15rem; }
.common-material-card__desc { font-size: 0.78rem; color: var(--text-dim); line-height: 1.4; }

/* =========================================================================
   ELEMENT BADGE AS LINK (spells → lore)
   ========================================================================= */
a.element-badge {
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}
a.element-badge:hover {
  filter: brightness(1.3);
  transform: translateY(-1px);
}

/* =========================================================================
   DEITY DETAIL PAGE
   ========================================================================= */
.deity-detail-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 0 25px rgba(201,162,39,0.3);
  margin: 0 auto 1.5rem;
}
.deity-detail-img img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.deity-detail-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.deity-detail-sub-img {
  width: 80px; height: 80px; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--gold); float: left; margin: 0 1rem 0.5rem 0;
}
.deity-detail-sub-img img { width: 100%; height: 100%; object-fit: cover; background: #fff; }

/* =========================================================================
   UPGRADE INFO CELL (weapon/armor tables)
   ========================================================================= */
.upgrade-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 200px;
}

/* =========================================================================
   Intro blocks (index page)
   ========================================================================= */
.intro-block { margin-bottom: 1.5rem; }
.intro-block__heading {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.intro-block__text {
  color: var(--text-dim);
  line-height: 1.7;
}

/* =========================================================================
   DICE / HODY SECTION
   ========================================================================= */

/* Overview card */
.dice-overview {
  background: linear-gradient(135deg, rgba(201,162,39,0.08) 0%, rgba(201,162,39,0.02) 100%);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.dice-overview__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.dice-overview__icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(201,162,39,0.3));
}
.dice-overview__title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-bottom: 0.25rem;
}
.dice-overview__desc {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}
.dice-overview__explanation {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-style: italic;
  margin-top: 0.5rem;
}
.dice-overview__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.dice-note {
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  color: var(--gold);
}

/* Dice block (individual mechanic section) */
.dice-block {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
}
.dice-block__heading {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(201,162,39,0.15);
}
.dice-block__text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}
.dice-block__explanation {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-style: italic;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(201,162,39,0.2);
}

/* Dice badge (3k6 etc.) */
.dice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold) 0%, #a88520 100%);
  color: var(--bg-deep);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(201,162,39,0.3);
  letter-spacing: 0.02em;
}
.dice-badge--sm {
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
}

/* Formula row */
.dice-formula-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.75rem 0;
  flex-wrap: wrap;
}
.dice-formula {
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 0.4rem 0.8rem;
}
.dice-formula code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.9rem;
  color: var(--gold-light);
  letter-spacing: 0.03em;
}

/* Dice levels (skill roll tiers) */
.dice-levels {
  display: flex;
  gap: 0.75rem;
  margin: 0.75rem 0;
  flex-wrap: wrap;
}
.dice-level {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  flex: 1;
  min-width: 140px;
}
.dice-level__label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Rules list */
.dice-rules-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.dice-rule {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: var(--bg-card2);
  border: 1px solid rgba(42,42,58,0.8);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
}
.dice-rule__icon {
  flex-shrink: 0;
  font-size: 0.8rem;
  margin-top: 0.15rem;
  opacity: 0.7;
}
.dice-rule__text {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
}
.dice-rule__explanation {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.15rem;
}
.dice-rules-list--note .dice-rule {
  border-left: 2px solid var(--gold);
}

/* Bonuses */
.dice-bonuses {
  margin: 0.75rem 0;
}
.dice-bonuses__title {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.dice-bonus {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(42,42,58,0.5);
}
.dice-bonus:last-child { border-bottom: none; }
.dice-bonus__icon {
  flex-shrink: 0;
  color: var(--green-bright);
  font-weight: 700;
  font-size: 0.9rem;
}
.dice-bonus__text {
  font-size: 0.85rem;
  color: var(--text);
}
.dice-bonus__explanation {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Combat type tags */
.dice-combat-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}
.dice-combat-tag {
  background: rgba(139,26,26,0.15);
  border: 1px solid rgba(192,57,43,0.3);
  color: #e74c3c;
  border-radius: 20px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
}

/* Examples */
.dice-examples {
  margin: 0.75rem 0;
}
.dice-examples__title {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.dice-example {
  background: rgba(201,162,39,0.04);
  border: 1px dashed var(--border-dim);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}
.dice-example__desc {
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.dice-example__calc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.dice-example__calc code {
  font-family: 'Fira Code', 'Consolas', monospace;
  background: var(--bg-card2);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  color: var(--gold-light);
  font-size: 0.82rem;
}
.dice-example__result {
  font-size: 0.88rem;
  color: var(--gold);
  font-weight: 600;
}
.dice-example__outcome {
  font-weight: 600;
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
}
.dice-example__outcome--success {
  color: var(--green-bright);
  background: rgba(39,174,96,0.1);
}
.dice-example__outcome--fail {
  color: var(--red-bright);
  background: rgba(192,57,43,0.1);
}
.dice-example__effect {
  font-size: 0.83rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.3rem;
}

/* Notes block */
.dice-notes-block {
  margin-top: 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(201,162,39,0.15);
}
.dice-notes-block__item {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.15rem;
}
.dice-notes-block__item::before {
  content: '• ';
  color: var(--gold);
}

/* Centering helper */
.dice-center { justify-content: center; }

/* =========================================================================
   ARCANA CARDS (Velká Arkána – tarot cards)
   ========================================================================= */
.arcana-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}
.arcana-grid > * { flex: 0 1 260px; min-width: 220px; }
.arcana-card {
  background: linear-gradient(160deg, rgba(20,16,30,0.95) 0%, rgba(30,25,45,0.9) 100%);
  border: 1px solid rgba(201,162,39,0.25);
  border-top: 3px solid rgba(201,162,39,0.5);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1rem 1rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.arcana-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}
.arcana-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(201,162,39,0.15);
}
.arcana-card__number {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  color: rgba(201,162,39,0.35);
  font-weight: 700;
}
.arcana-card__name {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 0.15rem;
  line-height: 1.3;
}
.arcana-card__meaning {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.7rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(201,162,39,0.12);
}
.arcana-card__effect {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.arcana-card__effect-icon {
  flex-shrink: 0;
  font-size: 0.75rem;
  margin-top: 0.1rem;
}
.arcana-card__quest {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
  padding-left: 0.6rem;
  border-left: 2px solid rgba(142,68,173,0.3);
}

/* =========================================================================
   RULES CROSS-LINKS (auto-linked game terms)
   ========================================================================= */
.rules-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.rules-link:hover {
  color: var(--gold-light);
  border-bottom-style: solid;
}
.rules-link--skill {
  border-color: var(--green-bright);
}
.rules-link--skill:hover {
  color: var(--green-bright);
}
.rules-link--stat {
  border-color: var(--red-bright);
}
.rules-link--stat:hover {
  color: var(--red-bright);
}
.rules-link--class {
  border-color: #8e44ad;
}
.rules-link--class:hover {
  color: #bb8fce;
}
.rules-link--section {
  border-color: var(--gold);
}
.rules-link--section:hover {
  color: var(--gold-light);
}

/* Inline dice notation with tooltip */
.dice-inline {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  color: var(--gold-light);
  background: rgba(201,162,39,0.1);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  border-bottom: 1px dotted var(--gold);
  cursor: help;
}

/* Combat tag links */
.dice-combat-tag--link {
  cursor: pointer;
  text-decoration: none;
  color: #e74c3c;
  transition: all var(--transition);
}
.dice-combat-tag--link:hover {
  background: rgba(139,26,26,0.3);
  border-color: rgba(192,57,43,0.6);
  color: #ff6b6b;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(192,57,43,0.2);
}

/* =========================================================================
   ARCHETYPES (magic archetype cards)
   ========================================================================= */
.dice-archetypes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.dice-archetype {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  transition: border-color var(--transition);
}
.dice-archetype:hover {
  border-color: var(--gold);
}
.dice-archetype__icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.dice-archetype__text {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}

/* =========================================================================
   ELEMENTS (magic element tags)
   ========================================================================= */
.dice-elements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.dice-element {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid;
  transition: transform var(--transition), box-shadow var(--transition);
}
a.dice-element {
  text-decoration: none;
}
.dice-element:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.dice-element--1 { /* Psychické */
  background: rgba(142,68,173,0.15);
  border-color: rgba(142,68,173,0.4);
  color: #bb8fce;
}
.dice-element--2 { /* Fyzické */
  background: rgba(180,153,109,0.15);
  border-color: rgba(180,153,109,0.4);
  color: #d4b896;
}
.dice-element--3 { /* Oheň */
  background: rgba(211,84,0,0.15);
  border-color: rgba(211,84,0,0.4);
  color: #e67e22;
}
.dice-element--4 { /* Voda */
  background: rgba(41,128,185,0.15);
  border-color: rgba(41,128,185,0.4);
  color: #5dade2;
}
.dice-element--5 { /* Blesk */
  background: rgba(241,196,15,0.15);
  border-color: rgba(241,196,15,0.4);
  color: #f4d03f;
}
.dice-element--6 { /* Temnota */
  background: rgba(100,70,120,0.15);
  border-color: rgba(100,70,120,0.4);
  color: #9b8ab5;
}

/* =========================================================================
   SPELL TIERS (tier progression cards)
   ========================================================================= */
.dice-tiers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.dice-tier {
  background: var(--bg-card2);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.dice-tier:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 12px rgba(201,162,39,0.1);
}
.dice-tier__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.dice-tier__name {
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
  color: var(--gold-light);
  font-weight: 700;
}
.dice-tier__badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dice-tier__desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* =========================================================================
   FORMAT DESCRIPTION (equipment notation format)
   ========================================================================= */
.dice-format {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: rgba(201,162,39,0.05);
  border: 1px dashed rgba(201,162,39,0.25);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}
.dice-format__icon {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 0.1rem;
}
.dice-format__text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

/* =========================================================================
   EQUIPMENT EXAMPLE (weapon/shield/armor notation)
   ========================================================================= */
.dice-equip-example {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dice-equip-example__name {
  font-family: 'Cinzel', serif;
  font-size: 0.92rem;
  color: var(--gold-light);
  font-weight: 700;
}
.dice-equip-example__notation {
  margin: 0.2rem 0;
}
.dice-equip-example__notation code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  color: var(--gold-light);
  background: var(--bg-card2);
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
  border: 1px solid var(--border-dim);
  display: inline-block;
}
.dice-equip-example__enchant {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.83rem;
  color: #bb8fce;
  margin-top: 0.25rem;
  padding: 0.4rem 0.6rem;
  background: rgba(142,68,173,0.08);
  border-left: 2px solid rgba(142,68,173,0.3);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.dice-equip-example__enchant-icon {
  flex-shrink: 0;
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

/* =========================================================================
   SPELLCASTING EXAMPLE (timeline rows)
   ========================================================================= */
.dice-cast-example {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dice-cast-example__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  background: var(--bg-card2);
  border-left: 2px solid rgba(201,162,39,0.2);
}
.dice-cast-example__row:nth-child(odd) {
  background: rgba(26,26,46,0.7);
}
.dice-cast-example__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 160px;
  flex-shrink: 0;
}
.dice-cast-example__value {
  font-size: 0.85rem;
  color: var(--gold-light);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
  .dice-overview__header { flex-direction: column; gap: 0.5rem; }
  .dice-levels { flex-direction: column; }
  .dice-formula-row { flex-direction: column; align-items: flex-start; }
  .dice-tier__header { flex-direction: column; align-items: flex-start; }
  .dice-cast-example__label { min-width: 120px; }
  .dice-elements { gap: 0.35rem; }
}
