:root {
  --ink: #1d1a16;
  --paper: #f1eadc;
  --paper-deep: #dfd2bb;
  --night: #17140f;
  --night-soft: #242019;
  --gold: #c79b55;
  --gold-light: #e5c78f;
  --violet: #8572ad;
  --rust: #8c4938;
  --muted: #766e63;
  --line: rgba(66, 54, 39, .2);
  --shadow: 0 24px 70px rgba(15, 11, 7, .2);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.65; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .2; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E"); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
.skip-link { position: fixed; top: -80px; left: 1rem; z-index: 100; padding: .8rem 1rem; background: white; color: black; }
.skip-link:focus { top: 1rem; }

.site-header { position: fixed; z-index: 40; top: 0; left: 0; right: 0; min-height: 76px; display: flex; align-items: center; gap: 1.5rem; padding: .8rem clamp(1rem, 4vw, 4rem); color: #f7f0e4; background: rgba(20, 17, 13, .9); border-bottom: 1px solid rgba(229, 199, 143, .18); backdrop-filter: blur(18px); }
.brand { display: flex; gap: .75rem; align-items: center; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border: 1px solid var(--gold); transform: rotate(45deg); color: var(--gold-light); font-family: var(--serif); font-size: 1.5rem; }
.brand-mark::first-letter { transform: rotate(-45deg); }
.brand > span:last-child { display: grid; line-height: 1.1; }
.brand small { color: #b9ad9a; font-size: .65rem; letter-spacing: .16em; text-transform: uppercase; }
.brand strong { font-family: var(--serif); font-size: 1rem; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: clamp(.6rem, 1.5vw, 1.4rem); flex: 1; }
.main-nav a { position: relative; color: #d9d0c3; font-size: .78rem; letter-spacing: .04em; text-decoration: none; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -.5rem; height: 1px; background: var(--gold); transition: right .25s; }
.main-nav a:hover::after, .main-nav a:focus-visible::after { right: 0; }
.spoiler-switch { display: inline-flex; align-items: center; gap: .55rem; padding: .52rem .7rem; color: #eee5d8; background: transparent; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; cursor: pointer; font-size: .73rem; white-space: nowrap; }
.switch-dot { width: 11px; height: 11px; border-radius: 50%; background: #8e8b83; box-shadow: 0 0 0 3px rgba(255,255,255,.07); }
.spoiler-switch[aria-pressed="true"] { border-color: var(--gold); }
.spoiler-switch[aria-pressed="true"] .switch-dot { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.menu-button { display: none; margin-left: auto; background: transparent; border: 1px solid rgba(255,255,255,.25); border-radius: 3px; padding: .45rem .7rem; cursor: pointer; }

.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; color: white; background: var(--night); }
.hero-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.72) contrast(1.08); transform: scale(1.02); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,12,10,.92) 0%, rgba(18,14,10,.66) 42%, rgba(18,14,10,.14) 75%), linear-gradient(0deg, rgba(15,12,9,.9), transparent 55%); }
.sound-toggle { position: absolute; z-index: 3; left: clamp(1.5rem, 8vw, 8rem); bottom: 1.8rem; display: inline-flex; align-items: center; gap: .6rem; padding: .65rem .85rem; color: #f6efe3; background: rgba(15,12,9,.62); border: 1px solid rgba(229,199,143,.55); border-radius: 999px; backdrop-filter: blur(10px); cursor: pointer; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.sound-toggle:hover, .sound-toggle:focus-visible { color: #1a1510; background: var(--gold-light); }
.sound-icon { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px solid currentColor; border-radius: 50%; font-size: .9rem; }
.hero-content { position: relative; z-index: 2; width: min(760px, 90vw); margin: 0 0 clamp(6rem, 14vh, 10rem) clamp(1.5rem, 8vw, 8rem); }
.eyebrow { margin: 0 0 .8rem; color: var(--gold); font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; font-family: var(--serif); font-weight: 500; line-height: 1.08; }
h1 { max-width: 700px; margin-bottom: 1.4rem; font-size: clamp(3rem, 7vw, 6.4rem); letter-spacing: -.045em; }
h2 { margin-bottom: 1rem; font-size: clamp(2.35rem, 5vw, 4.6rem); letter-spacing: -.035em; }
h3 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
.hero-lead { max-width: 650px; margin: 0 0 2rem; color: #ded5c7; font-family: var(--serif); font-size: clamp(1.1rem, 2vw, 1.45rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .8rem 1.2rem; border: 1px solid var(--gold); text-decoration: none; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 800; transition: transform .2s, background .2s, color .2s; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: #1a1510; background: var(--gold-light); }
.button.ghost { color: #f6efe3; background: rgba(0,0,0,.18); }
.scroll-cue { position: absolute; z-index: 2; right: 2rem; bottom: 1.8rem; color: #b8ad9d; font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; writing-mode: vertical-rl; }

.section, .section-narrow { padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 7vw, 7rem); }
.section-narrow { max-width: 980px; margin: auto; text-align: center; }
.section-narrow .lead { margin: 0 auto 2rem; font-family: var(--serif); font-size: clamp(1.25rem, 2.6vw, 1.8rem); line-height: 1.5; }
.section-heading { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(260px, 500px); align-items: end; gap: 3rem; margin: 0 auto 3.2rem; max-width: 1380px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { margin: 0; color: var(--muted); }
.notice { display: flex; align-items: flex-start; gap: 1rem; max-width: 800px; margin: 2.2rem auto 0; padding: 1.15rem 1.3rem; text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.25); }
.notice span { color: var(--gold); }
.notice p { margin: 0; }
.dark-section { color: #eee6da; background: var(--night); }
.dark-section .section-heading > p { color: #aaa092; }

.character-tools { max-width: 1380px; margin: 0 auto 2rem; }
.search-box { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; max-width: 520px; padding: .8rem 1rem; border-bottom: 1px solid #8d806d; }
.search-box span { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.filter-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.4rem; }
.filter-button { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: #5d554b; background: transparent; cursor: pointer; font-size: .73rem; }
.filter-button.active { color: #fff; background: var(--ink); }
.character-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; max-width: 1380px; margin: auto; }
.character-card { position: relative; min-height: 440px; padding: 0; overflow: hidden; text-align: left; background: #29231c; border: 0; cursor: pointer; box-shadow: 0 10px 35px rgba(40,30,20,.08); }
.character-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.78); transition: transform .5s, filter .5s; }
.character-card::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(12,10,8,.96)); }
.character-card:hover img, .character-card:focus-visible img { transform: scale(1.035); filter: saturate(1); }
.character-card-copy { position: absolute; z-index: 2; left: 1.25rem; right: 1.25rem; bottom: 1.15rem; color: white; }
.character-card-copy small { color: var(--gold-light); font-size: .65rem; letter-spacing: .13em; text-transform: uppercase; }
.character-card-copy h3 { margin: .25rem 0 .25rem; font-size: 1.6rem; }
.character-card-copy p { margin: 0; color: #d7cdc0; font-size: .82rem; line-height: 1.45; }
.empty-state { text-align: center; color: var(--muted); }

.relationship-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; max-width: 1380px; margin: auto; background: rgba(255,255,255,.12); }
.relationship-card { min-height: 280px; padding: 2rem; background: var(--night); }
.relationship-card .relation-names { color: var(--gold-light); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; }
.relationship-card h3 { margin: 1.1rem 0 .8rem; }
.relationship-card p { color: #bcb1a3; }
.relation-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.4rem; }
.relation-tags span { padding: .35rem .5rem; color: #cfc2b0; border: 1px solid rgba(255,255,255,.13); font-size: .67rem; }

.moments-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; max-width: 1380px; margin: auto; }
.moment-card { position: relative; min-height: 520px; display: flex; align-items: end; overflow: hidden; color: white; background: #211d18; }
.moment-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.moment-card:hover img { transform: scale(1.025); }
.moment-card::after { content: ""; position: absolute; inset: 30% 0 0; background: linear-gradient(transparent, rgba(15,12,9,.95)); }
.moment-copy { position: relative; z-index: 2; padding: 2rem; }
.moment-copy span { color: var(--gold-light); font-size: .66rem; letter-spacing: .15em; text-transform: uppercase; }
.moment-copy h3 { margin: .6rem 0; }
.moment-copy p { max-width: 620px; margin-bottom: 0; color: #d6cbbc; }

.worlds { background: #ded3c0; }
.world-pair { display: grid; grid-template-columns: 1fr 150px 1fr; align-items: center; max-width: 1200px; margin: auto; }
.world-card { position: relative; min-height: 430px; padding: clamp(2rem, 4vw, 4rem); border: 1px solid rgba(40,30,20,.15); }
.world-card.earth { color: #e9e2d7; background: #2b2e2c; }
.world-card.elandria { color: #e9e2d7; background: #2b222d; }
.world-card p, .world-card li { color: #c1b8ac; }
.world-card ul { margin-top: 2rem; padding-left: 1.2rem; columns: 2; }
.world-index { color: var(--gold); font-family: var(--serif); font-size: 3rem; opacity: .5; }
.echo-symbol { display: flex; align-items: center; justify-content: center; gap: .4rem; color: #5f5141; font-family: var(--serif); font-style: italic; }
.echo-symbol span { width: 32px; height: 1px; background: #8c7b65; }
.spoiler-panel { max-width: 880px; margin: 3rem auto 0; padding: 2rem; border: 1px solid rgba(76,55,87,.25); background: rgba(255,255,255,.28); }
.fernan-explains { display: grid; grid-template-columns: 1.25fr .75fr; max-width: 1200px; margin: 3rem auto 0; overflow: hidden; color: #eee6da; background: #211d18; box-shadow: var(--shadow); }
.fernan-image { min-height: 400px; padding: 0; overflow: hidden; border: 0; background: #2a251e; cursor: zoom-in; }
.fernan-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.fernan-image:hover img { transform: scale(1.02); }
.fernan-explains > div { align-self: center; padding: clamp(2rem, 4vw, 4rem); }
.fernan-explains h3 { margin-bottom: 1.2rem; }
.fernan-explains p { color: #c7bdaf; }
.fernan-explains .fernan-note { margin-top: 1.5rem; padding-top: 1.5rem; color: var(--gold-light); border-top: 1px solid rgba(255,255,255,.12); font-family: var(--serif); font-style: italic; }
body:not(.spoilers-on) [data-spoiler] { position: relative; user-select: none; }
body:not(.spoilers-on) [data-spoiler] > * { filter: blur(7px); opacity: .45; }
body:not(.spoilers-on) [data-spoiler]::after { content: "Contenido del final · Activa ‘Con spoilers’"; position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; padding: 1rem; filter: none; color: #4d4034; background: rgba(236,226,210,.72); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-align: center; text-transform: uppercase; }

.atlas-section { background: #ebe2d2; }
.atlas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; max-width: 1380px; margin: auto; }
.place-card { min-height: 300px; padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); background: rgba(255,255,255,.27); }
.place-card:nth-child(2n) { background: rgba(199,155,85,.1); }
.place-card .place-type { color: var(--rust); font-size: .67rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.place-card p { color: var(--muted); }
.place-people { margin-top: 1.2rem; color: #514a41; font-size: .73rem; }

.archive-section { background: var(--paper); }
.archive-layout { max-width: 1380px; margin: auto; }
.archive-feature { display: grid; grid-template-columns: 1.25fr .75fr; min-height: 480px; background: #26211b; color: white; }
.archive-feature img { width: 100%; height: 100%; object-fit: cover; }
.archive-feature div { align-self: center; padding: clamp(2rem, 5vw, 4rem); }
.archive-feature div > p:not(.eyebrow) { color: #c2b8aa; }
.archive-feature .lucernas-info-button { appearance: none; display: inline-flex; align-items: center; gap: .75rem; min-height: 46px; margin-top: 1.35rem; padding: .45rem 1.15rem .45rem .5rem; color: #f1d49e; background: rgba(199,155,85,.08); border: 1px solid rgba(229,199,143,.58); border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); cursor: pointer; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; transition: color .2s, background .2s, border-color .2s, transform .2s, box-shadow .2s; }
.lucernas-info-plus { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #241c13; background: var(--gold-light); font-family: var(--serif); font-size: 1.45rem; font-weight: 400; line-height: 1; transition: transform .25s; }
.archive-feature .lucernas-info-button:hover { color: #fff4df; background: rgba(199,155,85,.17); border-color: var(--gold-light); box-shadow: 0 8px 24px rgba(0,0,0,.18); transform: translateY(-2px); }
.archive-feature .lucernas-info-button:hover .lucernas-info-plus { transform: rotate(90deg); }
.archive-feature .lucernas-info-button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }
.documents-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.document-card { padding: 0; overflow: hidden; text-align: left; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.document-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; filter: sepia(.15); transition: transform .4s; }
.document-card:hover img { transform: scale(1.025); }
.document-card div { padding: 1.2rem; }
.document-card h3 { margin-bottom: .5rem; font-size: 1.3rem; }
.document-card p { margin: 0; color: var(--muted); font-size: .82rem; }
.archive-note { max-width: 900px; margin: 2.5rem auto 0; padding: 1rem 0; text-align: center; color: #605548; border-block: 1px solid var(--line); font-family: var(--serif); font-style: italic; }

.bestiary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; max-width: 1200px; margin: auto; }
.creature-card { display: grid; grid-template-columns: 210px 1fr; min-height: 310px; overflow: hidden; background: var(--night-soft); border: 1px solid rgba(255,255,255,.1); }
.creature-card img { width: 100%; height: 100%; object-fit: cover; }
.creature-card div { padding: 1.6rem; }
.threat { color: var(--gold); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; }
.creature-card h3 { margin: .5rem 0; }
.creature-card p { color: #b9aea0; font-size: .86rem; }
.creature-card dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .7rem; color: #d2c7b9; font-size: .74rem; }
.creature-card dt { color: #857b6d; }
.life-button { margin-top: 1rem; padding: .65rem 1rem; color: var(--gold-light); background: transparent; border: 1px solid var(--gold); cursor: pointer; font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; transition: color .2s, background .2s, transform .2s; }
.life-button:hover, .life-button:focus-visible { color: #1a1510; background: var(--gold-light); transform: translateY(-2px); }
.creature-card dd { margin: 0; }

.timeline { position: relative; max-width: 900px; margin: auto; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 19px; width: 1px; background: #ab9576; }
.timeline li { position: relative; padding: 0 0 2.5rem 4.5rem; }
.timeline li::before { content: ""; position: absolute; left: 12px; top: .35rem; width: 13px; height: 13px; border: 2px solid var(--paper); border-radius: 50%; background: var(--rust); box-shadow: 0 0 0 1px var(--rust); }
.timeline small { color: var(--rust); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.timeline h3 { margin: .3rem 0 .5rem; font-size: 1.5rem; }
.timeline p { margin: 0; color: var(--muted); }

.gallery-section { background: #ded3c0; }
.gallery-grid { columns: 4 250px; column-gap: .8rem; max-width: 1380px; margin: auto; }
.gallery-item { width: 100%; margin: 0 0 .8rem; padding: 0; break-inside: avoid; overflow: hidden; border: 0; background: #231f1a; cursor: zoom-in; }
.gallery-item img { width: 100%; filter: saturate(.72); transition: transform .4s, filter .4s; }
.gallery-item:hover img { transform: scale(1.02); filter: saturate(1); }

.immersive-section { position: relative; overflow: hidden; color: #eee6da; background: radial-gradient(circle at 90% 10%, rgba(133,114,173,.18), transparent 32%), radial-gradient(circle at 8% 85%, rgba(199,155,85,.12), transparent 30%), #17140f; }
.immersive-section::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; background: repeating-linear-gradient(90deg, transparent 0 11%, rgba(255,255,255,.025) 11% calc(11% + 1px)); }
.immersive-section > * { position: relative; z-index: 1; }
.immersive-heading > p { color: #b8ad9f; }
.immersive-guide { display: flex; align-items: center; gap: 1.1rem; max-width: 980px; margin: -1rem auto 2.5rem; padding: 1rem 1.25rem; color: #c9beaf; border-block: 1px solid rgba(229,199,143,.2); }
.immersive-guide > span { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; color: #211a12; background: var(--gold-light); border-radius: 50%; font-size: 1.15rem; }
.immersive-guide p { margin: 0; font-size: .86rem; }
.immersive-guide strong { color: #f0dfc2; }
.immersive-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; max-width: 1200px; margin: auto; background: rgba(229,199,143,.18); border: 1px solid rgba(229,199,143,.18); box-shadow: 0 28px 80px rgba(0,0,0,.24); }
.immersive-track { min-width: 0; display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; align-items: center; gap: 1.25rem; min-height: 150px; padding: 1.35rem; background: rgba(28,24,19,.96); transition: background .25s; }
.immersive-track:has(.immersive-play.is-playing) { background: rgba(49,39,27,.98); }
.chapter-number { display: grid; align-content: center; justify-items: center; width: 82px; height: 96px; color: var(--gold-light); border: 1px solid rgba(229,199,143,.32); background: rgba(199,155,85,.06); }
.chapter-number small { color: #938777; font-size: .55rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.chapter-number strong { font-family: var(--serif); font-size: 2.25rem; font-weight: 400; line-height: 1; }
.chapter-number-double strong { font-size: 1.55rem; }
.immersive-track-copy { min-width: 0; }
.immersive-track-copy h3 { margin: 0 0 .3rem; color: #f3eadc; font-size: 1.45rem; }
.immersive-track-copy p { margin: 0; color: #8f8578; font-size: .78rem; }
.immersive-play { appearance: none; display: grid; justify-items: center; gap: .45rem; min-width: 76px; padding: .35rem; color: #a99d8e; background: transparent; border: 0; cursor: pointer; font-size: .56rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.immersive-play-icon { display: grid; place-items: center; width: 48px; height: 48px; padding-left: 3px; color: #211a12; background: var(--gold-light); border: 1px solid var(--gold-light); border-radius: 50%; box-shadow: 0 0 0 5px rgba(229,199,143,.08); font-size: .95rem; transition: color .2s, background .2s, box-shadow .2s, transform .2s; }
.immersive-play:hover .immersive-play-icon { transform: scale(1.06); box-shadow: 0 0 0 7px rgba(229,199,143,.12), 0 8px 24px rgba(0,0,0,.3); }
.immersive-play:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 5px; border-radius: 3px; }
.immersive-play.is-playing { color: var(--gold-light); }
.immersive-play.is-playing .immersive-play-icon { padding-left: 0; color: var(--gold-light); background: transparent; box-shadow: 0 0 0 5px rgba(229,199,143,.1), 0 0 24px rgba(229,199,143,.16); }

.novel-section { position: relative; overflow: hidden; color: #eee6da; background: radial-gradient(circle at 15% 40%, rgba(102,130,158,.18), transparent 35%), #15171a; }
.novel-section::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2; background: linear-gradient(115deg, transparent 55%, rgba(133,114,173,.22)); }
.novel-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(300px, 430px) minmax(320px, 660px); align-items: center; justify-content: center; gap: clamp(3rem, 8vw, 8rem); max-width: 1200px; margin: auto; }
.book-cover { position: relative; width: 100%; aspect-ratio: .86; padding: 0; overflow: hidden; border: 0; background: #0d1117; box-shadow: 18px 24px 55px rgba(0,0,0,.45); cursor: zoom-in; }
.book-cover img { position: absolute; top: 0; right: 0; width: auto; max-width: none; height: 100%; }
.book-cover span { position: absolute; right: 1rem; bottom: 1rem; padding: .55rem .7rem; color: white; background: rgba(8,10,13,.78); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.novel-copy h2 { margin-bottom: 1.2rem; }
.novel-lead { color: #eee3d5; font-family: var(--serif); font-size: clamp(1.25rem, 2.1vw, 1.65rem); line-height: 1.45; }
.novel-copy > p:not(.eyebrow):not(.novel-lead) { color: #aaaeb2; }
.novel-meta { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2rem 0; border-block: 1px solid rgba(255,255,255,.13); }
.novel-meta div { padding: 1rem .8rem 1rem 0; }
.novel-meta dt { color: #787e84; font-size: .63rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.novel-meta dd { margin: .35rem 0 0; color: #ddd4c8; font-family: var(--serif); font-size: .9rem; }
.dark-button { color: var(--gold-light); background: rgba(0,0,0,.15); }

.closing { display: flex; align-items: end; justify-content: space-between; gap: 3rem; padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 8vw, 8rem); color: #eee6da; background: linear-gradient(120deg, #1b1712, #2d2330); }
.closing h2 { max-width: 850px; }
.closing p:not(.eyebrow) { color: #b8ad9f; }
.site-footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1.25rem, 6vw, 6rem); color: #9e9487; background: #110f0c; font-size: .75rem; }
.site-footer div { display: grid; }
.site-footer strong { color: #e1d7ca; font-family: var(--serif); font-size: 1.05rem; }
.site-footer p { max-width: 540px; margin: 0; text-align: right; }

dialog { padding: 0; border: 0; color: inherit; background: transparent; }
dialog::backdrop { background: rgba(10,8,6,.82); backdrop-filter: blur(8px); }
.profile-dialog { width: min(1060px, calc(100vw - 2rem)); max-height: calc(100svh - 2rem); overflow: auto; background: var(--paper); box-shadow: var(--shadow); }
.dialog-close { position: fixed; z-index: 3; top: max(1.5rem, calc((100vh - min(760px, 100vh - 2rem))/2 + 1rem)); right: max(1.5rem, calc((100vw - min(1060px, 100vw - 2rem))/2 + 1rem)); width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; color: white; background: rgba(12,10,8,.65); cursor: pointer; font-size: 1.6rem; line-height: 1; }
.profile-layout { display: grid; grid-template-columns: minmax(290px, 42%) 1fr; min-height: 680px; }
.profile-image { position: sticky; top: 0; height: min(760px, calc(100svh - 2rem)); background: #28231d; }
.profile-image img { width: 100%; height: 100%; object-fit: cover; }
.profile-copy { padding: clamp(2rem, 5vw, 4.5rem); }
.profile-copy .role { color: var(--rust); font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.profile-copy h2 { margin: .6rem 0 .8rem; }
.profile-copy .summary { font-family: var(--serif); font-size: 1.2rem; }
.profile-copy h3 { margin: 2rem 0 .5rem; font-size: 1.15rem; }
.profile-copy p { color: #5f574e; }
.profile-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin: 1.5rem 0; }
.profile-facts span { padding: .7rem; border: 1px solid var(--line); color: #5f574e; font-size: .76rem; }
.profile-spoiler { margin-top: 2rem; padding: 1.25rem; border-left: 3px solid var(--violet); background: rgba(133,114,173,.1); }
.lightbox { width: min(1200px, calc(100vw - 2rem)); max-height: calc(100svh - 2rem); }
.lightbox figure { margin: 0; display: grid; justify-items: center; }
.lightbox img { max-height: calc(100svh - 5rem); object-fit: contain; box-shadow: var(--shadow); }
.lightbox figcaption { padding: .7rem 1rem; color: white; background: rgba(10,8,6,.8); }
.video-dialog { width: min(1100px, calc(100vw - 2rem)); max-height: calc(100svh - 2rem); overflow: visible; }
.video-dialog figure { margin: 0; display: grid; background: #080706; box-shadow: var(--shadow); }
.video-dialog video { display: block; width: 100%; max-height: calc(100svh - 6rem); background: #000; }
.video-dialog figcaption { padding: .8rem 1rem; color: var(--gold-light); background: #17130f; font-family: var(--serif); font-size: 1rem; text-align: center; }

@media (max-width: 1100px) {
  .main-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; padding: 1.2rem; flex-wrap: wrap; background: rgba(20,17,13,.97); border-bottom: 1px solid rgba(255,255,255,.1); }
  .main-nav.open { display: flex; }
  .menu-button { display: block; }
  .spoiler-switch { margin-left: 0; }
  .character-grid { grid-template-columns: repeat(3, 1fr); }
  .relationship-grid, .atlas-grid { grid-template-columns: repeat(2, 1fr); }
  .documents-grid { grid-template-columns: repeat(2, 1fr); }
  .bestiary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .site-header { gap: .6rem; min-height: 68px; }
  .brand small { display: none; }
  .brand strong { font-size: .9rem; }
  .brand-mark { width: 34px; }
  .menu-button { font-size: .72rem; }
  .spoiler-switch { padding: .46rem; }
  #spoilerLabel { display: none; }
  .main-nav { top: 68px; align-items: stretch; flex-direction: column; }
  .hero-content { margin-left: 1.25rem; margin-bottom: 6rem; }
  .hero-shade { background: linear-gradient(0deg, rgba(13,11,9,.97), rgba(17,13,10,.25)); }
  .sound-toggle { left: 1.25rem; bottom: 1.25rem; }
  .scroll-cue { display: none; }
  .section, .section-narrow { padding-block: 4.5rem; }
  .section-heading { grid-template-columns: 1fr; gap: 1rem; }
  .character-grid { grid-template-columns: repeat(2, 1fr); }
  .character-card { min-height: 350px; }
  .relationship-grid, .moments-grid, .atlas-grid, .documents-grid { grid-template-columns: 1fr; }
  .moment-card { min-height: 430px; }
  .world-pair { grid-template-columns: 1fr; }
  .echo-symbol { min-height: 90px; transform: rotate(90deg); }
  .fernan-explains { grid-template-columns: 1fr; }
  .fernan-image { min-height: 300px; }
  .archive-feature { grid-template-columns: 1fr; }
  .archive-feature img { height: 330px; }
  .immersive-grid { grid-template-columns: 1fr; }
  .creature-card { grid-template-columns: 140px 1fr; }
  .novel-layout { grid-template-columns: 1fr; }
  .book-cover { width: min(430px, 100%); margin: auto; }
  .novel-meta { grid-template-columns: 1fr; }
  .novel-meta div + div { border-top: 1px solid rgba(255,255,255,.1); }
  .closing, .site-footer { align-items: flex-start; flex-direction: column; }
  .site-footer p { text-align: left; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-image { position: relative; height: 55svh; }
  .dialog-close { position: fixed; top: 1.5rem; right: 1.5rem; }
}

@media (max-width: 470px) {
  h1 { font-size: 2.8rem; }
  .hero-actions .button { width: 100%; }
  .character-grid { grid-template-columns: 1fr; }
  .character-card { min-height: 480px; }
  .creature-card { grid-template-columns: 1fr; }
  .creature-card img { height: 340px; }
  .immersive-track { grid-template-columns: 68px minmax(0, 1fr) auto; gap: .8rem; padding: 1rem; }
  .chapter-number { width: 64px; height: 78px; }
  .chapter-number strong { font-size: 1.8rem; }
  .chapter-number-double strong { font-size: 1.2rem; }
  .immersive-play { min-width: 58px; }
  .immersive-play-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .profile-facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
