:root {
  color-scheme: dark;
  --forest: #111f19;
  --deep: #0d1813;
  --panel: #1b2c23;
  --ivory: #f6ebd8;
  --muted: #d2c5ad;
  --gold: #e6bf78;
  --bright: #f4d594;
  --rose: #d7a7a0;
  --line: #b48e535b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--deep);
  color: var(--ivory);
  font: 100%/1.6 var(--sans);
}
*, *::before, *::after {box-sizing:border-box}
body {margin:0; min-height:100vh; display:flex; flex-direction:column}
main {flex:1; outline:none}
a {color:inherit}
a,button,input,textarea {-webkit-tap-highlight-color:transparent}
button,input,textarea {font:inherit}
button {cursor:pointer}
button:disabled {cursor:default; opacity:.5}
:focus-visible {outline:2px solid #ffdf9d; outline-offset:5px}
h1,h2,h3,p,dl,dd {margin:0}
h1,h2,h3 {font-family:var(--serif); font-weight:500; line-height:1.02}
.skip {position:fixed; top:.5rem; left:.5rem; transform:translateY(-150%); z-index:5; padding:.6rem; background:var(--deep)}
.skip:focus {transform:none}
.masthead {display:grid; grid-template-columns:1fr auto; align-items:center; gap:.2rem 1rem; padding:.8rem 1rem .35rem; background:#112019; border-bottom:1px solid var(--line)}
.brand {justify-self:start; display:inline-flex; align-items:center; gap:.7rem; color:var(--bright); text-decoration:none; font:1.15rem/1 var(--serif); letter-spacing:.12em}
.brand small {display:block; margin-top:.36rem; font:600 .62rem/1 var(--sans); letter-spacing:.24em;color:var(--muted)}
.brand-mark {display:grid; place-items:center; color:var(--gold); border:1px solid var(--line); border-radius:50%; width:2.3rem; height:2.3rem; font-size:1.5rem}
nav {grid-column:1/-1; grid-row:2; display:flex; gap:clamp(.8rem,4vw,1.5rem); color:var(--muted); align-items:center; justify-content:center}
nav a {text-decoration:none; font-size:.875rem; padding:.55rem 0; white-space:nowrap}
nav a[aria-current],nav a:hover {color:var(--bright); text-decoration:underline; text-underline-offset:.35em}
.ghost {background:none; border:1px solid var(--line); color:var(--bright); border-radius:50%; min-width:2.75rem; min-height:2.75rem}
.settings {grid-column:2; grid-row:1; font-size:1.15rem}
footer {margin:auto 0 0; display:flex; justify-content:space-between; flex-wrap:wrap; gap:.4rem 1.5rem; padding:1.2rem max(1rem,calc((100vw - 83rem)/2)); color:var(--muted); border-top:1px solid var(--line); font-size:.84rem}
.kicker {color:var(--gold); font-size:.875rem; font-weight:680; letter-spacing:.15em; text-transform:uppercase}
.lead {font-size:clamp(1.05rem,2vw,1.35rem); color:var(--muted); max-width:48rem}
.hero {position:relative; isolation:isolate; display:flex; flex-direction:column; align-items:stretch; min-height:39rem; background:var(--forest); overflow:hidden}
.hero-scene {height:19rem; position:relative; background:#274137 url("assets/templo.jpg") 61% 46%/cover no-repeat}
.hero-scene::after {content:""; position:absolute; inset:0; background:linear-gradient(0deg,var(--forest),transparent 44%)}
.hero-content {position:relative; padding:0 1.35rem 2.75rem; margin-top:-2rem; z-index:1}
.hero h1 {font-size:clamp(3.7rem,8.3vw,8rem); letter-spacing:-.06em; margin:.7rem 0 1.2rem; line-height:.87}
.hero h1 em {display:block; font-weight:400; color:var(--bright); font-size:.68em; letter-spacing:-.055em; margin-top:.12em}
.hero .lead {max-width:27rem; color:var(--ivory)}
.hero .lead strong {color:var(--bright); font-weight:600}
.hero-text {max-width:26rem; color:var(--muted)}
.detail-rule {display:flex; align-items:center; margin:1.2rem 0; width:7rem; gap:.4rem}
.detail-rule::before {content:"◆"; font-size:.55rem; color:var(--gold)}
.detail-rule::after {content:""; width:100%; height:1px; background:linear-gradient(90deg,var(--gold),transparent)}
.scene-caption {display:none}
.actions {display:flex; gap:.65rem 1rem; flex-wrap:wrap; align-items:center; margin-top:1.45rem}
.primary,.secondary,.text-link {display:inline-flex; align-items:center; justify-content:center; text-align:center; width:fit-content; min-height:2.85rem; padding:.62rem 1.1rem; border:1px solid transparent; text-decoration:none; font-size:.93rem; font-weight:650; line-height:1.3; border-radius:3px}
.primary {background:linear-gradient(125deg,#f0d298,#cd9e5b); border-color:#f5d69b; color:#211d13; box-shadow:0 2px 18px #b7833d24}
.primary:hover:not(:disabled) {background:#f6dca7}
.secondary {border-color:var(--line); background:#16261e9e; color:var(--ivory)}
.secondary:hover,.ghost:hover {background:#324437; border-color:var(--gold)}
.text-link {background:none; color:var(--bright); text-decoration:underline; text-underline-offset:.32em; padding-inline:.2rem}
.text-link:hover {color:#fff2c7}
.hall {padding:2.15rem 1.35rem 2.75rem; border-top:1px solid var(--line); display:grid; gap:1.2rem; background:radial-gradient(ellipse at 60% 0,#23362a,transparent 82%),var(--deep)}
.hall h2 {font-size:clamp(2rem,4vw,3.2rem); margin-top:.35rem}
.hall-domains {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(.55rem,2vw,1.15rem)}
.hall-domains strong {font:1.26rem var(--serif)}
.hall-domains small {font-size:.875rem; color:var(--muted)}
.page {width:min(100%,75rem); margin:0 auto; padding:clamp(2rem,5vw,4.5rem) 1rem 4rem}
.narrow {width:min(100%,52rem)}
.section-title {margin-bottom:1.6rem}
.section-title h1 {font-size:clamp(2.9rem,7vw,5.2rem); letter-spacing:-.045em; margin:.42rem 0 .75rem}
.panel,.mission,.inscription {background:linear-gradient(135deg,#22362a,#15241c); border:1px solid var(--line); padding:clamp(1rem,3vw,2rem); border-radius:5px}
.panel h2,.inscription h2 {font-size:clamp(1.8rem,4vw,2.65rem); margin-bottom:.7rem}
.panel p + p,.inscription p + p {margin-top:.6rem}
.muted,.optional {color:var(--muted)}
.optional {margin-top:.65rem;font-size:.875rem}
.quiz-progress,.steps {display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.5rem; padding:.7rem 0; color:var(--gold); font-size:.875rem}
progress {accent-color:var(--gold); width:clamp(5rem,23vw,11rem)}
.choices {border:0; margin:0; padding:0; min-width:0}
.choices legend {width:100%; font:clamp(1.65rem,4vw,2.55rem)/1.15 var(--serif); margin:0 0 1rem}
.choice {display:grid; grid-template-columns:auto 1fr; align-items:center; gap:.75rem; padding:.8rem 1rem; margin:.55rem 0; background:var(--panel); border:1px solid var(--line); border-radius:4px; cursor:pointer}
.choice input,.check input {accent-color:var(--gold); width:1.2rem; height:1.2rem; margin:0; flex:none}
.choice-letter {display:none}
.choice:hover,.choice:has(:checked) {background:#304234; border-color:var(--gold)}
.profiles {display:grid; gap:1rem}
.profile {overflow:hidden; background:var(--panel); border:1px solid var(--line); border-radius:7px}
.portrait {height:clamp(14rem,47vw,21rem); display:flex; align-items:end; padding:1rem; background-image:linear-gradient(0deg,#15241cb0,transparent 50%),var(--retrato); background-size:cover; background-position:center 26%; background-color:#344334}
.portrait-guardiana {--retrato:url("assets/guardiana.jpg")}
.portrait-sanadora {--retrato:url("assets/sanadora.jpg")}
.portrait-peregrina {--retrato:url("assets/peregrina.jpg")}
.portrait-alquimista {--retrato:url("assets/alquimista.jpg")}
.portrait span {display:grid; place-items:center; height:2.8rem; width:2.8rem; font-size:1.4rem; color:var(--bright); background:#14231c; border:1px solid var(--gold); border-radius:50%}
.profile-content {padding:clamp(1rem,3vw,2rem)}
.profile-content h2 {font-size:2.25rem}
.profile-content > p {margin:.6rem 0}
.profile-content .primary {margin-top:.9rem}
.profile-content .actions .primary {margin:0}
.profile-notes {display:grid; gap:.75rem; margin:1rem 0}
.profile-notes dt {font-weight:650; color:var(--bright)}
.profile-notes dd {color:var(--muted)}
.inscription {margin-top:1.3rem}
.reward,.status-note {color:var(--bright); padding:.5rem 0}
.map-banner {display:flex; gap:.8rem; align-items:center; flex-wrap:wrap; background:linear-gradient(100deg,#25382ce8,#1c2b22b5),url("assets/templo.jpg") center 50%/cover; border:1px solid var(--line); padding:.9rem 1rem; border-radius:5px; margin-bottom:1.1rem}
.map-banner > span:last-child {font-size:.9rem; color:var(--muted); margin-left:auto}
.map-seal {font-size:1.65rem; color:var(--bright)}
.wings {display:grid; gap:1rem}
.wing {background:linear-gradient(160deg,#273a2d,#16261e 60%); border:1px solid var(--line); border-radius:7px; padding:.85rem; scroll-margin:1rem}
.wing-head {display:flex; align-items:center; gap:.75rem; margin:.2rem 0 .9rem}
.wing-head > span {color:var(--bright); font-size:1.55rem}
.wing-head h2 {font-size:clamp(1.65rem,4vw,2.4rem)}
.doors {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.35rem}
.door {border:1px solid var(--line); border-radius:3rem 3rem 3px 3px; background:#0c1513b0; color:var(--muted); padding:.75rem .16rem .45rem; display:flex; align-items:center; flex-direction:column; gap:.3rem; line-height:1.25; min-height:8.8rem; overflow-wrap:anywhere}
.door.available {border-color:#d6ae67; background:radial-gradient(ellipse at 50% 26%,#665538,#26352b 68%); color:var(--ivory)}
.door:hover {border-color:var(--bright); filter:brightness(1.22)}
.door-number,.door small {font-size:.875rem}
.door small {margin-top:auto}
.door strong {font:clamp(.95rem,2vw,1.19rem)/1.05 var(--serif);color:var(--ivory)}
.door-icon {font-size:1.45rem;color:var(--gold)}
.crown {display:block; width:100%; margin-top:clamp(1.25rem,3vw,2rem); padding:0; overflow:hidden; text-align:center; color:var(--ivory); border:1px solid #ad8a50; border-radius:7px; background:#1b291f}
.crown:hover,.crown:focus-visible {border-color:var(--bright)}
.crown-heading {display:flex; align-items:center; justify-content:center; gap:clamp(.65rem,2.2vw,1.15rem); padding:clamp(.85rem,2.5vw,1.65rem) .65rem; border-bottom:1px solid var(--line); background:radial-gradient(ellipse at 50% 100%,#5b492a76,transparent 80%),#19291f}
.crown-mark {display:grid; place-items:center; flex:0 0 auto; width:clamp(2.6rem,5vw,3.7rem); aspect-ratio:1; border:1px solid var(--line); border-radius:50%; color:var(--gold); font-size:clamp(1.35rem,3vw,2.05rem); text-shadow:0 0 17px #f7c57290}
.crown strong {display:block; color:var(--bright); font:clamp(1.55rem,4vw,3.15rem)/1.05 var(--serif)}
.crown small {display:block; margin-top:.3rem; color:var(--muted); font-size:.875rem}
.crown-art {display:block; width:100%; height:auto; aspect-ratio:3/2; background:#233328}
.room-art {display:block; width:min(100%,35rem); height:auto; aspect-ratio:1; margin-inline:auto; background:#24392c; border:1px solid var(--line); border-radius:5px}
.practice-icon {display:block; color:var(--bright); font-size:1.8rem; margin-bottom:.5rem}
.note-label {display:block; font-weight:630; margin:1.25rem 0 .4rem}
textarea {width:100%; min-height:5.4rem; resize:vertical; background:#0f1d17; border:1px solid #8c785f; border-radius:4px; padding:.7rem; color:var(--ivory)}
textarea::placeholder {color:#b8aa96}
.suggestions {display:grid; gap:.45rem; margin-top:1rem}
.suggestion {text-align:left; padding:.65rem .8rem; min-height:2.75rem; border:1px solid var(--line); border-radius:4px; background:#182920; color:var(--bright)}
.suggestion:hover {border-color:var(--gold)}
.mission {margin-bottom:1rem}
.mission > p + p {margin-top:.5rem; white-space:pre-wrap; overflow-wrap:anywhere}
.check {display:flex; align-items:center; gap:.7rem; padding:.7rem 0; cursor:pointer}
.emblem {display:grid; place-items:center; width:7rem; aspect-ratio:1; border:1px solid var(--gold); border-radius:50%; background:radial-gradient(#715537,#2a3428); color:var(--bright); font-size:3rem; animation:reveal .55s ease-out both}
@keyframes reveal {from {opacity:.4; transform:scale(.9)}}
dialog {width:min(calc(100% - 2rem),31rem); max-height:calc(100dvh - 2rem); overflow:auto; position:fixed; color:var(--ivory); padding:1.5rem; border:1px solid var(--gold); border-radius:8px; background:#1f3227; box-shadow:0 16px 80px #0009}
dialog::backdrop {background:#050b08c9}
dialog h2 {font-size:2.45rem; margin:.4rem 0 .8rem}
dialog .close {float:right; font-size:1.5rem; line-height:1}
dialog .primary {margin-top:.5rem}
@media (min-width:43rem) {
  .masthead {display:flex; justify-content:space-between; padding:.9rem max(1.5rem,calc((100vw - 83rem)/2))}
  nav {gap:1.8rem}
  .wings,.profiles {grid-template-columns:repeat(2,minmax(0,1fr))}
  .hall-domains {grid-template-columns:repeat(4,minmax(0,1fr))}
  .page {padding-inline:1.5rem}
  .wing {padding:1.1rem}
  .doors {gap:.65rem}
  .door {min-height:10rem; padding-top:1rem}
  .choice {grid-template-columns:auto auto 1fr}
  .choice-letter {display:inline;color:var(--bright);font-weight:650}
  .single {grid-template-columns:1fr}
  .single-profile,.single .profile {display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.15fr)}
  .single-profile .portrait,.single .portrait {height:100%; min-height:26rem}
}
@media (min-width:56rem) {
  .hero {justify-content:center; min-height:clamp(37rem,45vw,47rem)}
  .hero-scene {position:absolute; height:auto; inset:0 0 0 26%; background-position:61% 50%}
  .hero-scene::after {background:linear-gradient(90deg,var(--forest) 0%,#111f19db 12%,#111f1938 42%,transparent 70%),linear-gradient(0deg,#101d17a8,transparent 24%)}
  .hero-content {margin:0; padding:3.6rem 0 4rem; width:calc(100% - 4rem); max-width:81rem; align-self:center}
  .scene-caption {display:flex; align-items:center; gap:.6rem; position:absolute; right:max(2rem,calc((100vw - 81rem)/2)); bottom:1.6rem; color:#fff0d5; font-size:.78rem; font-weight:650; letter-spacing:.17em; text-shadow:0 1px 4px #000}
  .scene-caption i {width:1.7rem; height:1px; background:var(--bright)}
  .hall {padding:2rem max(2rem,calc((100vw - 81rem)/2)) 2.4rem}
}
@media (prefers-reduced-motion:reduce) {*,*::before,*::after {animation:none!important; scroll-behavior:auto!important; transition:none!important}}
.quiet *, .quiet *::before,.quiet *::after {animation:none!important; scroll-behavior:auto!important; transition:none!important}

/* Temple navigation, illustrated wings and character scene. */
.sr-only {position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap}
.header-controls {grid-column:2; grid-row:1; display:flex; align-items:center; gap:.45rem}
.music {font-size:1.12rem; color:var(--muted)}
.music[aria-pressed="true"] {color:var(--bright); border-color:var(--gold); box-shadow:0 0 16px #e6bf7840; background:#493a25}
.volume-label {display:block; margin-top:.65rem}
#volumen {width:min(100%,17rem); accent-color:var(--gold)}
.music-credit {font-size:.875rem; color:var(--muted); margin:.3rem 0 1rem}
.music-credit a {text-underline-offset:.2em}
.hero-scene {animation:temple-arrival .7s ease-out both}
@keyframes temple-arrival {from {opacity:.65; transform:scale(1.02)}}
.dominio-presencia {--acento:#ebcf96}
.dominio-liberacion {--acento:#e2aeb4}
.dominio-creacion {--acento:#efba6e}
.dominio-soberania {--acento:#bed0dd}
.domain-art {display:block; width:100%; height:auto; aspect-ratio:3/2; background:#17291f}
.hall-domains a {display:flex; flex-direction:column; border:1px solid #9c7c4ca3; border-radius:6px; overflow:hidden; text-decoration:none; background:#16241b; transition:border-color .2s,transform .2s}
.hall-domains a:hover {border-color:var(--acento)}
@media (hover:hover) and (pointer:fine) {
  .hall-domains a:hover {transform:translateY(-3px)}
}
.hall-label {display:flex; align-items:center; gap:.5rem; padding:.55rem clamp(.4rem,1.6vw,1.05rem) .65rem; border-top:1px solid var(--line)}
.hall-label strong,.hall-label small {display:block}
.hall-label strong {font-size:clamp(1rem,2.2vw,1.56rem); line-height:1.1}
.hall-label small {color:var(--acento); margin-top:.19rem}
.hall-glyph {color:var(--acento); font-size:1.04rem}
.map-atlas {display:flex; justify-content:flex-start; flex-wrap:wrap; gap:.45rem; margin-bottom:1.25rem}
.map-atlas a {padding:.55rem .7rem; border:1px solid var(--line); border-radius:4px; background:#19291f; line-height:1.35; min-height:2.75rem; display:inline-flex; align-items:center; gap:.35rem}
.map-atlas a span {color:var(--acento)}
.map-atlas a:hover {border-color:var(--acento)}
.wing {background:linear-gradient(160deg,#22362a,#14231b 62%); border-color:#9c7c4ca3}
.wing .domain-art {border:1px solid var(--line); border-radius:4px; margin-bottom:.85rem}
.wing-head .kicker,.wing-head > span {color:var(--acento)}
.door {transition:border-color .2s,filter .2s,transform .2s; background:#0c1513e6}
.door:hover,.door:focus-visible {transform:translateY(-3px)}
.door.available {box-shadow:inset 0 0 26px #f0c87724}
.door.available .door-icon {animation:door-light 3.2s ease-in-out infinite}
@keyframes door-light {50% {text-shadow:0 0 13px #ffda8a; color:#ffe8b4}}
.ficha-page {width:min(100%,79rem); padding-top:clamp(1rem,4vw,3rem)}
.character-setup {display:grid; grid-template-columns:minmax(0,1fr); background:linear-gradient(155deg,#1a2e23,#0e1b15); border:1px solid var(--line); border-radius:9px; overflow:hidden}
.character-stage {position:relative; isolation:isolate; display:grid; place-items:center; min-height:24rem; height:clamp(24rem,119vw,37rem); overflow:hidden; background:#193429 url("assets/templo.jpg") 65% 53%/cover}
.character-stage::before {content:""; position:absolute; inset:0; background:radial-gradient(ellipse at 51% 32%,#65512d12 13%,#101c1769 59%,#101c17ec 100%),linear-gradient(0deg,#101c17,#111e181f 27%,transparent 72%,#101c17a8)}
.stage-haze {position:absolute; inset:0; opacity:.35; background:linear-gradient(110deg,transparent 21%,#ffdea33f 38%,transparent 48%,#ffe1ad28 54%,transparent 68%); mix-blend-mode:screen; animation:temple-haze 8s ease-in-out infinite}
.stage-ring {position:absolute; width:66%; max-width:22rem; height:10%; bottom:6%; border:1px solid #f5c775b3; box-shadow:0 0 35px #dca25155,inset 0 0 30px #dca25155; border-radius:50%; transform:translateX(calc(var(--mirada-x,0px) * -.35))}
.stage-seal {position:absolute; bottom:1rem; left:1rem; display:grid; place-items:center; width:2.5rem; height:2.5rem; border:1px solid #ebc784a3; border-radius:50%; background:#15231ae6; color:var(--gold)}
.character-depth {display:block; position:absolute; inset:0; transform:translateX(var(--mirada-x,0px)); transition:transform .27s ease-out}
.character-sprite {display:block; width:100%; height:100%; object-fit:contain; padding:1.1rem 1rem 1.8rem; filter:drop-shadow(0 12px 14px #070d0ad9)}
@keyframes temple-haze {50% {opacity:.7; transform:translateX(2%)}}
.character-info {padding:clamp(1rem,4vw,3rem)}
.character-info .section-title {margin-bottom:.85rem}
.character-info .section-title h1 {font-size:clamp(2.7rem,6vw,4.8rem)}
.character-info .lead {font-size:1.08rem}
.inventory {display:flex; align-items:center; gap:.8rem; width:100%; margin:1.15rem 0; padding:.65rem .75rem; border:1px solid var(--line); border-radius:4px; text-align:left; color:var(--ivory); background:#15261d}
.inventory:hover {border-color:var(--gold); background:#293a2a}
.inventory > span:first-child {display:grid; place-items:center; flex:0 0 2.4rem; height:2.4rem; border:1px solid var(--line); font-size:1.3rem; color:var(--gold)}
.inventory small {display:block; color:var(--gold); font-size:.83rem; letter-spacing:.1em}
.inventory strong {font:1.17rem var(--serif)}
.practice-source {margin-bottom:.35rem}
.ritual {padding:.85rem 1rem; margin-top:1rem; border:1px solid var(--line); border-radius:4px; background:#16271e}
.ritual summary {font-weight:660; cursor:pointer; color:var(--bright)}
.ritual summary + p {margin-top:.6rem}
@media (min-width:52rem) {
  .character-setup {grid-template-columns:minmax(0,1.03fr) minmax(0,1fr)}
  .character-stage {height:100%; min-height:41rem}
  .character-sprite {padding:1.9rem 1.45rem 2.4rem}
}
.quiet .character-depth {transform:none}
@media (prefers-reduced-motion:reduce) {.character-depth {transform:none}}

.practice-guide section {padding:.85rem 0; border-top:1px solid var(--line)}
.practice-guide h3 {font-size:1.45rem; margin:.3rem 0 .6rem}
.practice-guide p + p {margin-top:.5rem}

.diary-history {margin-top:2rem}
.diary-history h2 {font-size:clamp(1.65rem,4vw,2.4rem)}

.practice-duration {margin-bottom:.65rem; color:var(--gold); font-size:.9rem; font-weight:600}
.practice-sequence {margin:.8rem 0; padding-inline-start:1.6rem}
.practice-sequence li + li {margin-top:.48rem}
.practice-sequence li::marker {color:var(--gold); font-weight:650}
.weekly-select {width:100%; padding:.65rem .75rem; background:#0f1d17; color:var(--ivory); border:1px solid #8c785f; border-radius:4px; font:inherit}

.response-instructions {color:var(--muted); margin-top:1.15rem}

.diary + .diary {margin-top:1.25rem}
.diary-history h3 {font-size:1.55rem}

.mission .profile-notes dd {white-space:pre-wrap; overflow-wrap:anywhere}
