/* =========================
   Asteroth · single-page site
   Tema: dark grunge, paleta neutra com acento vermelho/dourado
   ========================= */

:root {
  --bg: #0a0a0d;
  --bg-elev: #14141a;
  --bg-card: #16161c;
  --surface-2: #1d1d24;
  --border: #2a2a33;
  --text: #e8e8ea;
  --text-soft: #b0b0b8;
  --text-mute: #777782;
  --accent: #c01a1f;
  --accent-soft: #d54a4f;
  --gold: #c9a96e;
  --gold-soft: #e0c187;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --radius: 6px;
  --max-w: 1100px;
  --serif: "Cinzel", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fantasy-title: "Uncial Antiqua", "Cinzel", Georgia, serif;
  --fantasy-text: "IM Fell English", "Cormorant Garamond", Georgia, serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(192, 26, 31, 0.55);
  color: #fff;
}

/* =========================
   SCROLL REVEAL
   ========================= */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
  .hero-scroll { animation: none; }
  .hero-status .pulse { animation: none; }
}

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

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

strong { color: var(--text); font-weight: 600; }

/* =========================
   HERO
   ========================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) contrast(1.05) saturate(1.08);
  z-index: 0;
  animation: hero-drift 38s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes hero-drift {
  from { transform: scale(1); }
  to { transform: scale(1.09) translateY(-1.5%); }
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(10,10,13,0.85) 100%),
    linear-gradient(180deg, rgba(10,10,13,0.4) 0%, rgba(10,10,13,0.2) 50%, rgba(10,10,13,1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem 6rem;
  max-width: 900px;
}

.wordmark {
  width: min(560px, 90%);
  margin: 0 auto 2rem;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.6));
}

.tagline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  color: var(--text);
  line-height: 1.5;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  letter-spacing: 0.01em;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(10, 10, 13, 0.55);
  border: 1px solid rgba(201, 169, 110, 0.35);
  padding: 0.45rem 1.1rem;
  margin-bottom: 2.5rem;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.hero-status .pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 0 0 rgba(213, 74, 79, 0.6);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(213, 74, 79, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(213, 74, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(213, 74, 79, 0); }
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  animation: scroll-bounce 2.4s ease-in-out infinite;
}

.hero-scroll::before {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--gold-soft);
  border-bottom: 2px solid var(--gold-soft);
  transform: rotate(45deg);
}

.hero-scroll:hover { opacity: 1; }

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

.cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transition: transform 0.15s, background 0.2s, color 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}

.cta-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(192,26,31,0.4);
}
.cta-primary:hover {
  background: var(--accent-soft);
  color: #fff;
  transform: translateY(-1px);
}

.cta-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--text-soft);
}
.cta-ghost:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

/* =========================
   TOC NAV
   ========================= */

.toc-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,13,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.toc-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.toc-brand {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.02rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-soft) !important;
  border-bottom: none !important;
  margin-right: 0.5rem;
}

.toc-nav a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

.toc-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* =========================
   SECTIONS
   ========================= */

.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.section-alt {
  background: var(--bg-elev);
  max-width: none;
}
.section-alt > .section-head,
.section-alt > h3,
.section-alt > h4,
.section-alt > p,
.section-alt > ul,
.section-alt > .boss-grid,
.section-alt > .boss-list,
.section-alt > .worlds-grid,
.section-alt > .contos-grid,
.section-alt > .identity-stack,
.section-alt > .class-tree,
.section-alt > .exclusive-grid,
.section-alt > .affinity-sel,
.section-alt > .section-footer-link {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  margin-bottom: 3rem;
  text-align: center;
}

h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

h2::after {
  content: "";
  display: block;
  width: 220px;
  height: 13px;
  margin: 1.1rem auto 0;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 13'%3E%3Cpath d='M0 6.5h88M132 6.5h88' stroke='%23c9a96e' stroke-opacity='.45' stroke-width='1'/%3E%3Cpath d='M110 .8 115.7 6.5 110 12.2 104.3 6.5Z' fill='%23c01a1f'/%3E%3Cpath d='M96 6.5l4-2.3v4.6zM124 6.5l-4-2.3v4.6z' fill='%23c9a96e'/%3E%3C/svg%3E");
}

.kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.section-kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-mute);
  line-height: 1.55;
  margin: -0.5rem 0 1.5rem;
}

h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  color: var(--text);
  margin: 3rem 0 1rem;
  letter-spacing: 0.01em;
}

h3:first-child { margin-top: 0; }

h4 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin: 2rem 0 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1.25rem;
  color: var(--text-soft);
}

p strong { color: var(--text); }

ul, ol {
  margin: 0 0 1.5rem 1.5rem;
  color: var(--text-soft);
}

ul li, ol li {
  margin-bottom: 0.5rem;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text-soft);
  background: rgba(192,26,31,0.04);
}

/* =========================
   LORE · capítulos em 2 blocos (arte | texto)
   borda com cantos cortados, ecoando os botões (.cta)
   ========================= */

.lore-blocks {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
  margin-top: 1rem;
}

.lore-block {
  --cut: 22px;
  position: relative;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(201, 169, 110, 0.6) 0%,
    rgba(201, 169, 110, 0.14) 30%,
    rgba(192, 26, 31, 0.35) 55%,
    rgba(201, 169, 110, 0.14) 78%,
    rgba(201, 169, 110, 0.55) 100%
  );
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut)
  );
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

.lore-block-inner {
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut)
  );
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--bg-card) 45%);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2.5rem;
  padding: 2.25rem;
}

.lore-block:nth-child(even) .lore-block-art { order: 2; }

.lore-block-art {
  align-self: start;
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.lore-block-art img {
  width: 100%;
  border: 1px solid rgba(201, 169, 110, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.lore-block-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--gold-soft);
  text-align: center;
  line-height: 1.5;
  padding: 0 0.5rem;
}

.lore-block-text h3 { margin-top: 0; }
.lore-block-text p:last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .lore-block-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem;
  }
  .lore-block:nth-child(even) .lore-block-art { order: 0; }
  .lore-block-art { position: static; }
}

/* =========================
   BOSSES
   ========================= */

.boss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.25rem;
  margin: 0 0 5rem;
}

/* o card É a folha antiga: paper_frame como background, com o retrato,
   nome e epíteto impressos nela — sem card escuro, sem borda */
.boss-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: none;
  padding: 11% 13% 14%;
  text-decoration: none;
  color: var(--text);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
  transition: transform 0.15s, filter 0.2s;
}

.boss-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("concepts/assets/paper_frame.png") center / 100% 100% no-repeat;
  pointer-events: none;
}

.boss-card:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.7)) brightness(1.05);
}

.boss-card img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: 0.5rem;
  mix-blend-mode: multiply; /* funde o fundo branco com a folha */
  filter: sepia(0.12) contrast(1.02);
  transition: transform 0.2s;
}

.boss-card:hover img {
  transform: scale(1.05);
}

.boss-name {
  position: relative;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1rem;
  color: #241b0f;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}

.boss-epithet {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.8rem;
  color: #7a5f30;
  margin-top: 0.2rem;
  line-height: 1.3;
  text-align: center;
}

.boss-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.boss-entry {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.boss-entry:first-child {
  border-top: none;
  padding-top: 0;
}

.boss-entry img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #0e0e12;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.boss-entry h3 {
  margin-top: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
}

.boss-entry .epitaph {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-soft);
  margin-bottom: 1rem;
  border: none;
  padding: 0;
}

.boss-entry p {
  margin-bottom: 1rem;
}

/* =========================
   WORLDS
   ========================= */

.worlds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 0 0 3rem;
}

.world-card {
  position: relative;
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.world-list { display: none; }
.story-list { display: none; }

.world-card:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 169, 110, 0.25);
}

.world-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.world-card:hover img {
  transform: scale(1.06);
}

.world-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10,10,13,0) 45%, rgba(10,10,13,0.35) 70%, rgba(10,10,13,0.92) 100%);
}

.world-card h4 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0.01em;
  padding: 0 1.25rem 1.1rem;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.9);
}

.world-card h4::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 0.55rem;
  transition: width 0.25s ease;
}

.world-card:hover h4::before { width: 52px; }

@media (min-width: 720px) {
  .worlds-grid > .world-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
  .worlds-grid > .world-card:first-child img {
    aspect-ratio: auto;
    height: 100%;
    position: absolute;
    inset: 0;
  }
  .worlds-grid > .world-card:first-child {
    min-height: 100%;
  }
  .worlds-grid > .world-card:first-child h4 {
    font-size: 1.5rem;
  }
}

.section-footer-link {
  text-align: center;
  color: var(--text-mute);
  font-size: 0.95rem;
  margin-top: 2rem;
}

/* =========================
   CONTOS
   ========================= */

.contos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  counter-reset: conto;
}

.conto-card {
  counter-increment: conto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1rem 1.1rem;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.25s;
}

.conto-card::before {
  content: counter(conto, decimal-leading-zero);
  position: absolute;
  top: 0.4rem;
  right: 0.7rem;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 1.6rem;
  color: rgba(201, 169, 110, 0.14);
  letter-spacing: 0.05em;
  pointer-events: none;
  transition: color 0.25s;
}

.conto-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(192, 26, 31, 0.14);
}

.conto-card:hover::before {
  color: rgba(201, 169, 110, 0.32);
}

.conto-medallion {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  border: 2px solid rgba(201, 169, 110, 0.4);
  box-shadow: 0 0 0 3px rgba(10, 10, 13, 0.9), 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: border-color 0.25s, transform 0.25s;
}

.conto-card:hover .conto-medallion {
  border-color: var(--gold);
  transform: scale(1.06);
}

.conto-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.conto-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.3;
}

.conto-card:hover .conto-title { color: var(--gold-soft); }

.conto-boss {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-mute);
  letter-spacing: 0.03em;
}

/* =========================
   ITENS · compêndio
   ========================= */

.itens-count {
  text-align: center;
  font-family: var(--serif);
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 2rem;
}

.itens-count span {
  color: var(--gold-soft);
  font-weight: 700;
}

.itens-count strong {
  color: var(--gold-soft);
  font-weight: 700;
}

.itens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.item-card {
  --cut: 12px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut)
  );
  padding: 0.85rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
}

.item-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  background: var(--surface-2);
}

.item-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #ffffff;
  border: 1px solid rgba(201, 169, 110, 0.25);
  margin-bottom: 0.65rem;
  transition: border-color 0.2s;
}

.item-card:hover img {
  border-color: rgba(201, 169, 110, 0.6);
}

.item-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.3;
}

.item-cat {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--gold-soft);
  opacity: 0.85;
  margin-top: 0.2rem;
  text-align: center;
}

.item-list { display: none; }

/* =========================
   GAMEPLAY · identidade em camadas
   ========================= */

.identity-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 0 0 3rem;
}

.identity-layer {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.25rem;
  transition: border-color 0.2s, transform 0.15s;
}

.identity-layer:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.identity-num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.identity-layer h4 {
  margin: 0.35rem 0 0.75rem;
  color: var(--text);
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--serif);
  font-weight: 500;
}

.identity-layer p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
}

/* =========================
   GAMEPLAY · hierarquia de classes
   ========================= */

.class-tree {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 0 0 3rem;
  align-items: start;
}

.class-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem 1rem;
  transition: border-color 0.2s, transform 0.15s;
}

.class-block:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.class-block-rare {
  grid-column: 1 / -1;
  border-color: rgba(192, 26, 31, 0.45);
  background: linear-gradient(180deg, rgba(192,26,31,0.06) 0%, var(--bg-card) 100%);
}

.class-block-rare:hover {
  border-color: var(--accent);
}

.class-block-rare .class-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem;
}

.class-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.class-tag {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.class-block-rare .class-tag {
  color: var(--accent-soft);
}

.class-count {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--text-mute);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  letter-spacing: 0.05em;
}

.class-items {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.class-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.7rem;
  background: rgba(255, 255, 255, 0.015);
  border-radius: 4px;
  border-left: 2px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}

.class-item:hover {
  border-left-color: var(--gold);
  background: rgba(255, 255, 255, 0.04);
}

.class-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.class-desc {
  font-size: 0.82rem;
  color: var(--text-mute);
  line-height: 1.45;
}

.class-item-rare {
  border-left-color: rgba(192, 26, 31, 0.55);
  background: rgba(192, 26, 31, 0.04);
}

.class-item-rare:hover {
  border-left-color: var(--accent);
  background: rgba(192, 26, 31, 0.08);
}

.class-item-rare .class-name {
  color: var(--accent-soft);
}

.class-item-parent {
  border-left-color: var(--gold);
}

.class-subs {
  margin-top: 0.65rem;
  padding: 0.65rem 0 0.15rem 0.7rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  border-top: 1px dashed var(--border);
}

.class-sub {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.class-sub::before {
  content: "›";
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
}

.sub-name {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

.sub-desc {
  color: var(--text-mute);
}

/* =========================
   GAMEPLAY · hierarquia linhas + pills
   ========================= */

.class-rows {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0 0 3rem;
}

.class-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.7rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.class-row:hover {
  border-color: rgba(212, 175, 55, 0.4);
}

.crow-label {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-soft);
  width: 6.5rem;
  flex-shrink: 0;
}

.crow-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
}

.crow-pill {
  font-family: var(--serif);
  font-size: 0.87rem;
  color: var(--text-soft);
  padding: 0.2rem 0.6rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  border-radius: 3px;
  letter-spacing: 0.01em;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.crow-pill:hover {
  border-color: var(--gold);
  color: var(--text);
  background: rgba(212, 175, 55, 0.06);
}

.crow-pill-sub {
  position: relative;
  border-color: rgba(212, 175, 55, 0.35);
  cursor: default;
}

.crow-pill-sub::after {
  content: " ›";
  color: var(--gold);
  font-weight: 700;
}

.crow-sub-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  white-space: nowrap;
  background: var(--surface-2);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  color: var(--text-soft);
  z-index: 20;
  pointer-events: none;
}

.crow-pill-sub:hover .crow-sub-tip,
.crow-pill-sub:focus .crow-sub-tip {
  display: block;
}

.crow-row-rare {
  border-color: rgba(192, 26, 31, 0.35);
  background: linear-gradient(90deg, rgba(192, 26, 31, 0.05) 0%, var(--bg-card) 30%);
}

.crow-row-rare:hover {
  border-color: rgba(192, 26, 31, 0.65);
}

.crow-row-rare .crow-label {
  color: var(--accent-soft);
}

.crow-pill-rare {
  border-color: rgba(192, 26, 31, 0.4);
  color: var(--accent-soft);
}

.crow-pill-rare:hover {
  border-color: var(--accent);
  color: #e06060;
  background: rgba(192, 26, 31, 0.08);
}

/* =========================
   GAMEPLAY · exclusivos por classe
   ========================= */

.exclusive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
  margin: 0 0 3rem;
}

.excl-cat-header {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
  padding: 0.6rem 0 0.25rem;
  border-bottom: 1px solid var(--border);
  margin-top: 0.75rem;
}

.excl-cat-header--rare {
  color: var(--accent-soft);
  border-bottom-color: rgba(192, 26, 31, 0.3);
}

.exclusive-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.exclusive-card:hover {
  border-color: var(--gold);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.exclusive-card--rare {
  border-color: rgba(192, 26, 31, 0.2);
}

.exclusive-card--rare:hover {
  border-color: var(--accent-soft);
}

.exclusive-card .ex-class {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.exclusive-card--rare .ex-class {
  color: rgba(192, 26, 31, 0.75);
}

.exclusive-card .ex-do {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.class-modal-role {
  color: var(--text-mute);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0.15rem 0 0.9rem;
  line-height: 1.5;
}

/* =========================
   GAMEPLAY · seletor de affinity interativo
   ========================= */

.affinity-sel {
  margin: 0 0 3rem;
}

.affinity-sel-filters {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.affinity-filter-group {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.affinity-filter-label {
  font-family: var(--serif);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-soft);
  width: 4.5rem;
  flex-shrink: 0;
  padding-top: 0.3rem;
}

.affinity-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.aff-pill {
  font-family: var(--serif);
  font-size: 0.82rem;
  color: var(--text-mute);
  padding: 0.2rem 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.aff-pill:hover {
  border-color: rgba(212, 175, 55, 0.5);
  color: var(--text);
}

.aff-pill.active {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-soft);
}

.affinity-results {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.aff-result-row {
  display: grid;
  grid-template-columns: 7.5rem 7rem 1fr 1.2fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: mechFadeIn 0.15s ease;
}

.aff-col { font-size: 0.88rem; line-height: 1.4; }
.aff-raca { color: var(--text); font-weight: 600; font-family: var(--serif); }
.aff-classe { color: var(--gold-soft); font-family: var(--serif); }
.aff-acao { color: var(--text-soft); }
.aff-result { color: var(--text-mute); font-size: 0.83rem; }

.aff-empty {
  color: var(--text-mute);
  font-size: 0.9rem;
  padding: 1.25rem 1rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* =========================
   GAMEPLAY · seletor de mecânicas
   ========================= */

.mech-selector {
  margin: 0 0 3rem;
}

.mech-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.mech-tab {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.65rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: 2px solid transparent;
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--text-mute);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.mech-tab:hover {
  border-color: rgba(212, 175, 55, 0.4);
  border-bottom-color: rgba(212, 175, 55, 0.4);
  color: var(--text);
  background: var(--surface-2);
}

.mech-tab.active {
  border-color: var(--border);
  border-bottom-color: var(--gold);
  background: var(--surface-2);
  color: var(--gold-soft);
  box-shadow: 0 2px 0 rgba(212, 175, 55, 0.15);
}

.mech-panel {
  display: none;
}

.mech-panel.active {
  display: block;
  animation: mechFadeIn 0.18s ease;
}

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

/* =========================
   CHANGELOG · página própria
   ========================= */

.toc-nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.changelog-hero {
  background:
    linear-gradient(180deg, rgba(192,26,31,0.08) 0%, rgba(10,10,13,0) 80%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 5rem 1.5rem 4rem;
}

.changelog-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}

.changelog-eyebrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.changelog-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.changelog-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 2px;
  background: var(--accent);
  margin: 1rem auto 0;
}

.changelog-sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.02rem;
  color: var(--text-soft);
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.changelog-sub code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  color: var(--gold-soft);
}

.version-badge-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.version-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.7rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  min-width: 200px;
}

.version-badge-phase {
  border-color: rgba(201, 169, 110, 0.4);
}

.version-label {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin-bottom: 0.25rem;
}

.version-value {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-soft);
  letter-spacing: 0.02em;
}

.version-badge-phase .version-value {
  color: var(--gold-soft);
}

.section-changelog {
  padding-top: 4rem;
}

.changelog-version {
  margin-bottom: 4rem;
}

.changelog-version-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.changelog-version-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--text);
  letter-spacing: 0.02em;
  margin: 0;
}

.changelog-version-name::after { content: none; }

.changelog-version-tag {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-soft);
  background: rgba(192, 26, 31, 0.1);
  border: 1px solid rgba(192, 26, 31, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}

.changelog-version-summary {
  font-family: var(--sans);
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 760px;
}

.changelog-area {
  margin-bottom: 2.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem 1.25rem;
}

.changelog-area-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
}

.changelog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.changelog-list li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.25rem;
  border-bottom: 1px solid rgba(42, 42, 51, 0.4);
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.changelog-list li:last-child {
  border-bottom: none;
}

.changelog-list li::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 0.45rem;
  color: var(--accent);
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  width: 1rem;
}

.changelog-list li strong {
  color: var(--text);
  font-weight: 600;
}

.changelog-history {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.changelog-history-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--text-mute);
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.changelog-history-title::after { content: none; }

.changelog-history-sub {
  color: var(--text-mute);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}

.changelog-history .changelog-list li {
  color: var(--text-mute);
}

.changelog-history .changelog-list li strong {
  color: var(--text-soft);
}

.changelog-history .changelog-list li::before {
  color: var(--text-mute);
  content: "·";
}

.changelog-footer-note {
  margin-top: 3rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}

.changelog-footer-note p {
  font-size: 0.92rem;
  color: var(--text-mute);
  margin-bottom: 0.5rem;
}

.changelog-footer-note p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .changelog-hero { padding: 3.5rem 1.25rem 3rem; }
  .changelog-area { padding: 1.25rem 1.25rem 1rem; }
  .version-badge { min-width: auto; }
}

/* =========================
   SPONSOR
   ========================= */

.section-sponsor {
  background:
    linear-gradient(180deg, rgba(192,26,31,0.05) 0%, rgba(10,10,13,0) 60%),
    var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.sponsor-card {
  display: block;
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-align: left;
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
}

.sponsor-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--surface-2);
  color: var(--text);
}

.sponsor-card h3 {
  margin: 0 0 0.5rem;
  color: var(--text);
  font-size: 1.4rem;
}

.sponsor-card p {
  margin-bottom: 1rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.sponsor-cta {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--accent-soft);
  letter-spacing: 0.04em;
}

.sponsor-footer {
  margin-top: 2rem;
  color: var(--text-mute);
  font-size: 0.9rem;
}

/* =========================
   FOOTER
   ========================= */

.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  background: #07070a;
  color: var(--text-mute);
  font-size: 0.88rem;
}

.footer p { color: var(--text-mute); margin-bottom: 0.5rem; }

.footer-links a {
  color: var(--text-soft);
  margin: 0 0.25rem;
}
.footer-links a:hover { color: var(--gold); }

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

@media (max-width: 768px) {
  body { font-size: 16px; }
  .section { padding: 4rem 1.25rem; }
  .toc-inner { gap: 1rem; padding: 0.75rem 1rem; }
  .toc-nav a { font-size: 0.82rem; }
  .hero-content { padding: 2rem 1rem 4rem; }

  .boss-entry {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .boss-entry img {
    max-width: 240px;
    margin: 0 auto;
  }
  .boss-entry h3 { text-align: center; }
  .boss-entry .epitaph { text-align: center; }

  .boss-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.85rem;
  }
  .boss-card { padding: 0.75rem; }
  .boss-name { font-size: 0.92rem; }
  .boss-epithet { font-size: 0.72rem; }

  .cta-row { flex-direction: column; align-items: stretch; }
  .cta { text-align: center; }

  .class-tree { grid-template-columns: 1fr 1fr; }
  .mech-tab { font-size: 0.75rem; padding: 0.45rem 0.9rem; }
}

@media (max-width: 480px) {
  h2 { font-size: 1.75rem; }
  .toc-inner { gap: 0.85rem; }
  .toc-nav a { font-size: 0.75rem; letter-spacing: 0.03em; }
  .contos-grid { grid-template-columns: 1fr; }
  .aff-result-row { grid-template-columns: 5rem 5.5rem 1fr; }
  .aff-col.aff-result { display: none; }

  .class-tree { grid-template-columns: 1fr; }
}

/* =========================
   BOSS LIST (hidden, used as data source for modal)
   ========================= */

.boss-list { display: none; }

/* =========================
   MODAL
   ========================= */

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  max-width: 1080px;
  width: 100%;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 0;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 5;
  background: rgba(10, 10, 13, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f2e9d8;
  font-size: 1.5rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.modal-close:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(90deg);
}

.modal-body { display: block; }

/* =========================
   MODAL · papiro único
   arte no topo do pergaminho, texto rolando abaixo, entre os rolos
   ========================= */

.scroll-solo h3 {
  font-family: var(--fantasy-title);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  color: #241b0f;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.scroll-solo .epitaph {
  font-family: var(--fantasy-text);
  font-style: italic;
  color: #7a5f30;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(122, 95, 48, 0.4);
}

.scroll-solo p {
  font-family: var(--fantasy-text);
  font-size: 1.06rem;
  color: #3b2d18;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.scroll-solo p strong,
.scroll-solo p em { color: #241b0f; }

/* capitular no primeiro parágrafo do corpo */
.scroll-solo .epitaph + p::first-letter,
.scroll-solo h3 + p:not(.epitaph)::first-letter {
  font-family: var(--fantasy-title);
  font-weight: 400;
  font-size: 3em;
  float: left;
  line-height: 0.82;
  padding: 0.08em 0.14em 0 0;
  color: var(--accent);
}

/* conto do despertar dentro do pergaminho */
.book-story {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(122, 95, 48, 0.4);
}

.book-story-label {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7a5f30;
  margin-bottom: 0.35rem;
}

.book-story h4 {
  font-family: var(--fantasy-title);
  font-weight: 400;
  font-size: 1.25rem;
  color: #241b0f;
  margin: 0 0 1rem;
  text-transform: none;
  letter-spacing: 0.01em;
}

/* =========================
   MODAL · o papiro
   o papiro inteiro é UMA imagem esticada na camada .scroll-solo-bg, irmã do
   scroller (background/fill em elemento que scrolla — ou ancestral de um —
   é composto deslocado em alguns Chromium). o padding reserva a área dos
   rolos/bordas pro conteúdo
   ========================= */

.scroll-solo {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
  height: min(860px, calc(100vh - 2rem));
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.7));
}

.scroll-solo-bg {
  position: absolute;
  inset: 0;
  background: url("concepts/assets/papyrus_frame.png") center / 100% 100% no-repeat;
}

/* conteúdo ancorado em percentuais: a imagem estica 100%/100%, então os
   rolos (18% do topo, 16% da base) e as bordas escalam junto — o texto
   nunca invade os rolos, em qualquer tamanho */
.scroll-solo-inner {
  position: absolute;
  top: 20%;
  bottom: 18%;
  left: 24%; /* folga além das colunas de ornamento da folha (~16–22%) */
  right: 24%;
  overflow-y: auto;
  padding: 0.25rem 0.25rem;
  scrollbar-color: rgba(107, 84, 48, 0.35) transparent;
}

.scroll-solo-inner::-webkit-scrollbar-thumb {
  background: rgba(107, 84, 48, 0.35);
}

.scroll-solo-art {
  width: min(300px, 74%);
  margin: 0.25rem auto 1.5rem;
  mix-blend-mode: multiply; /* funde o fundo branco da arte com o papiro */
  filter: sepia(0.15) contrast(1.03);
}

/* itens: ícone (fundo cinza do catálogo) reduzido dentro do miolo do slot
   dourado (item_border.png no wrapper .item-slot), com cantos arredondados
   e um anel do interior escuro em volta. padding % é do containing block e
   width=82% dele, por isso os valores vêm escalados por 0.82 (interior do
   PNG ~16%/lado + folga). filtro quente aproxima o cinza do tom do slot */
.item-slot {
  display: block;
  width: 82%;
  margin: 0.25rem auto 1.5rem;
  /* encaixa o ícone no interior delimitado pelo filete interno da moldura
     (hairline ~16%/lado no PNG, escalado ×0.82) */
  padding: 13.4% 14.4% 14.7% 13.9%;
  background: url("concepts/assets/item_border.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 14px rgba(40, 24, 8, 0.45));
}

.modal[data-kind="item"] .scroll-solo-art {
  mix-blend-mode: normal;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  /* mesmo shape octogonal do interior da moldura — o ícone respeita a borda */
  clip-path: polygon(
    9% 0, 91% 0, 100% 9%,
    100% 91%, 91% 100%, 9% 100%,
    0 91%, 0 9%
  );
  filter: sepia(0.25) contrast(1.03);
}

/* pinturas de mundo: banner de iluminura no topo do pergaminho — altura
   fixa com corte cover (retratos não engolem o papiro), multiply tinge
   como tinta e a máscara esfuma as bordas (sem retângulo) */
.modal[data-kind="world"] .scroll-solo-art {
  mix-blend-mode: multiply;
  filter: sepia(0.18) saturate(1.2) contrast(1.05);
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 82% 78% at center, #000 42%, rgba(0, 0, 0, 0.6) 66%, transparent 95%);
  mask-image: radial-gradient(ellipse 82% 78% at center, #000 42%, rgba(0, 0, 0, 0.6) 66%, transparent 95%);
}

/* seta de rolagem: pousa sobre o corpo do papiro, acima do rolo de baixo;
   clique dá uma "página" de scroll, some no fim do texto */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 15.8%; /* encostada no topo do rolo de baixo, escala com o papiro */
  z-index: 2;
  width: 40px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
  transform: translateX(-50%);
  transition: opacity 0.3s;
  animation: hint-bounce 2.2s ease-in-out infinite;
}

.scroll-hint::before {
  content: "";
  width: 13px;
  height: 13px;
  border-right: 3px solid #6b5430;
  border-bottom: 3px solid #6b5430;
  transform: rotate(45deg);
  filter: drop-shadow(0 1px 1px rgba(244, 226, 188, 0.8));
}

.scroll-hint:hover { opacity: 1; }

.scroll-hint.hidden {
  opacity: 0;
  pointer-events: none;
  animation: none;
}

@keyframes hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; transform: translateX(-50%); }
}

.scroll-solo h3 {
  text-align: center;
  margin-bottom: 0.35rem;
}

.scroll-solo .epitaph {
  text-align: center;
}

@media (max-width: 860px) {
  .modal { padding: 0.5rem; }
  .modal-content { max-height: calc(100vh - 1rem); }
  /* papiro inteiro na tela, texto scrolla dentro */
  .scroll-solo { height: calc(100vh - 1rem); }
  .scroll-solo-inner { padding: 0 0.25rem; }
  .scroll-solo p { font-size: 0.96rem; }
  .scroll-solo h3 { font-size: 1.2rem; }
  .scroll-solo-art { width: min(200px, 62%); }
  .modal[data-kind="world"] .scroll-solo-art { width: 100%; aspect-ratio: 4 / 3; }
}

/* =========================
   SCROLLBARS DISCRETOS
   ========================= */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

/* Chromium / Safari */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}
::-webkit-scrollbar-corner {
  background: transparent;
}
