.is-home .site-header { position: absolute; inset: 0 0 auto; text-shadow: 0 1px 7px #050d24; }
.atlas-hero { position: relative; isolation: isolate; display: grid; justify-items: center; align-content: end; overflow: hidden; min-height: clamp(620px,49vw,740px); padding: 78px 14px clamp(42px,4.4vw,70px); text-align: center; border-bottom: 1px solid var(--edge); background: #121d44; }
.hero-map { position: absolute; inset: 0; z-index: -2; background: url('./assets/atlas/world-map.webp') center 47% / cover no-repeat; }
.hero-map::after { position: absolute; inset: 0; content: ''; background: linear-gradient(180deg,#060e28aa 0,transparent 17%,transparent 44%,#0b13343b 61%,#0a102cbd 83%,#0b1028 100%), radial-gradient(ellipse 32% 57% at 50% 61%,#1b183f74,transparent); }
.hero-art { position: relative; width: min(100%,730px); height: clamp(302px,26vw,389px); }
.oracle { position: absolute; left: 50%; bottom: -8%; transform: translateX(-50%); width: auto; height: 94%; object-fit: contain; filter: drop-shadow(0 0 18px #f9bf6b6b); pointer-events: none; mask-image: linear-gradient(to bottom,#000 79%,transparent 100%); }
.orbit-ring { position: absolute; inset: 11% 20% 3%; border: 1px solid #f4cd8559; border-radius: 50%; transform: rotate(-5deg); box-shadow: 0 0 22px #f5c26e14; }
.orbit-ring::after { content: ''; position: absolute; inset: 7% -7%; border: 1px dashed #e6ba783e; border-radius: 50%; transform: rotate(11deg); }
.orbit-node { --seal: #f5c47b; --light: #926327; z-index: 1; position: absolute; display: grid; justify-items: center; align-content: start; gap: 3px; transform: translate(-50%,-50%); text-decoration: none; }
.orbit-node > img, .drawn-seal { width: clamp(52px,4.8vw,72px); height: clamp(52px,4.8vw,72px); }
.orbit-node > img { object-fit: contain; filter: drop-shadow(0 0 7px var(--light)); }
.drawn-seal { display: grid; place-items: center; color: #ffebc4; background: radial-gradient(ellipse at 38% 30%,var(--light),#172241 80%); border: 1px solid var(--seal); border-radius: 50%; box-shadow: inset 0 0 0 3px #101a3566,inset 0 0 0 4px var(--seal),0 0 9px var(--light); font: 2.2rem/1 Georgia,serif; }
.orbit-node > span:last-child { padding: 2px 9px; border-radius: 50%; color: #fff7de; background: radial-gradient(ellipse,#101631b5 30%,#10163100 75%); text-shadow: 0 1px 4px #07102a,0 0 3px #07102a; font: 500 .81rem/1.25 var(--display); white-space: nowrap; }
.orbit-node:hover > span:last-child { color: white; text-decoration: underline; }
.orbit-node:hover > :first-child { filter: brightness(1.15) drop-shadow(0 0 7px var(--light)); }
.node-0 { left: 27%; top: 20%; }
.node-1 { left: 16%; top: 49%; --light: #397e73; }
.node-2 { left: 24%; top: 80%; --seal: #f3cf84; --light: #9a6838; }
.node-3 { left: 73%; top: 20%; --seal: #dac3f5; --light: #746297; }
.node-4 { left: 84%; top: 49%; --seal: #a0daef; --light: #49768d; }
.node-5 { left: 76%; top: 80%; --light: #68538c; }
.hero-copy { position: relative; max-width: 650px; text-shadow: 0 2px 14px #081027; }
.hero-copy h1 { margin: 0; color: #ffebbb; font: 500 clamp(3.65rem,6.7vw,6.55rem)/1.03 var(--display); letter-spacing: -.045em; }
.hero-copy h1 span, .hero-copy h1 small { display: block; }
.hero-copy h1 small { margin: .08em 0 .2em; font: 500 clamp(1.32rem,2vw,1.75rem)/1.15 var(--serif); letter-spacing: 0; }
.hero-copy p { max-width: 36ch; margin: .22em auto .76em; color: #fff1d9; font: 400 clamp(1.16rem,1.7vw,1.55rem)/1.22 var(--serif); text-wrap: balance; }
.hero-copy .gold-button { min-width: 214px; text-shadow: none; }
.home-sections { display: grid; gap: clamp(48px,5vw,78px); padding-top: clamp(35px,4.65vw,69px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 15px; }
.section-head > a, .inline-links, .family-links, .end-links, .result-tools > a:not(.gold-button), .result-tools .plain-button { font: 500 .88rem/1.5 var(--sans); }
.section-head > a { flex: 0 0 auto; text-decoration: none; }
.section-head > a:hover { text-decoration: underline; }
.text-tiles { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(245px,100%),1fr)); border-top: 1px solid var(--edge); }
.text-tiles > a { position: relative; color: var(--body); text-decoration: none; padding: 22px 34px 22px 2px; min-width: 0; border-bottom: 1px solid var(--rule); }
.text-tiles > a + a { padding-left: 19px; border-left: 1px solid var(--rule); }
.text-tiles h3 { color: var(--pale-gold); margin-bottom: .3em; }
.text-tiles a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; }
.text-tiles p { color: var(--muted); font-size: 1.06rem; line-height: 1.35; }
.tile-arrow { position: absolute; right: 13px; top: 24px; color: var(--gold); font: 1.05rem var(--sans); }
.family-links, .inline-links, .result-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .6em 1.3em; }
.family-links a { padding: .38em 1em; border: 1px solid var(--edge); border-radius: 30px; text-decoration: none; }
.family-links a:hover, .family-links a[aria-current] { background: #273151; border-color: var(--gold); }
.card-shelf, .catalog { display: grid; gap: 22px clamp(11px,2vw,30px); }
.card-shelf { grid-template-columns: repeat(6,minmax(0,1fr)); margin-top: 20px; }
.card-shelf a, .entry { color: var(--ink); text-decoration: none; min-width: 0; }
.card-shelf a:hover strong, .entry:hover .entry-name { text-decoration: underline; }
.card-shelf img, .catalog img { height: auto; width: 100%; aspect-ratio: 350/600; object-fit: contain; padding: 8%; background: radial-gradient(ellipse at 50% 40%,#384368,#18213f 80%); border: 1px solid #bca16b48; border-radius: 4px; }
.card-shelf strong, .entry-name { display: block; margin-top: .36em; color: var(--ink); font: 500 clamp(1.1rem,1.65vw,1.45rem)/1.2 var(--serif); }

.is-inner { background: radial-gradient(ellipse 75vw 570px at 77% 3%,#26315865,transparent),var(--night); }
.is-inner .site-header { border-bottom: 1px solid var(--edge); }
.inner-page { min-height: 54vh; }
.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: .55em; margin: 23px 0 0; font: .76rem/1.45 var(--sans); color: var(--muted); }
.crumb a { color: var(--pale-gold); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.crumb i { color: #9497aa; font-style: normal; }
.page-intro, .result-heading { padding: clamp(29px,4vw,52px) 0 clamp(25px,3.4vw,44px); }
.page-intro p { margin-top: .55em; max-width: 62ch; color: var(--muted); font-size: clamp(1.18rem,1.7vw,1.5rem); line-height: 1.34; }
.prose-section { max-width: 800px; border-top: 1px solid var(--rule); margin-top: clamp(30px,3.2vw,48px); padding-top: clamp(20px,2.6vw,34px); }
.prose-section h2, .text-stack h2, .scene-feature h2 { margin-bottom: .35em; }
.card-notes h3 { margin: 1em 0 .25em; font-size: 1.4rem; }
.byline { margin: 0 0 15px; color: var(--muted); font: .8rem/1.45 var(--sans); }
.prose-section p + p, .text-stack p + p { margin-top: .55em; }
.prose-section .gold-button, .prose-section .inline-links { margin-top: .8em; }
.essay { max-width: 820px; margin-inline: auto; }
.essay .page-intro { padding-bottom: 18px; }
.contents { border-left: 2px solid var(--gold); padding: 12px 20px; margin-top: 8px; background: #19244390; }
.contents strong, .contents a { display: block; }
.contents a { margin-top: .35em; font: .93rem/1.5 var(--sans); }
.prose-section[id] { scroll-margin-top: 20px; }
summary { cursor: pointer; color: var(--pale-gold); font-weight: 500; }
.faq details, .reminder { border-bottom: 1px solid var(--rule); }
.faq details { padding: 12px 0; }
.faq details p { margin: .45em 0 0 1em; }
.notice { margin-top: 1.1em; color: var(--pale-gold); }

.ritual-panel {
  position: relative; overflow: hidden; isolation: isolate; min-height: 316px; display: grid; justify-items: center; align-content: center;
  padding: 60px clamp(16px,4vw,52px) 34px; border: 1px solid var(--edge); border-radius: 9px;
  text-align: center; background: #162551 url('./assets/atlas/world-map.webp') center 51% / cover;
}
.ritual-panel::before { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(120deg,#13193642,#15183b36 70%,#13193669); }
.ritual-panel::after { content: ''; position: absolute; inset: 6px; z-index: -1; pointer-events: none; border: 1px solid #f2cc8370; border-radius: 6px; }
.ritual-card { position: relative; width: min(100%,440px); padding: 47px clamp(17px,3vw,36px) 25px; display: grid; justify-items: center; border: 1px solid #e9c788; border-radius: 23px 8px; background: linear-gradient(145deg,#25305af7,#111c3bf5); box-shadow: inset 0 0 0 3px #192443,inset 0 0 0 4px #b99c644f,0 6px 24px #080c2b99; }
.panel-crown { position: absolute; left: 50%; top: 0; transform: translate(-50%,-51%); width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 0 8px #e2b76f80); }
.ritual-card > p { margin: .25rem 0 1rem; color: var(--body); }
.ritual-panel form { width: min(380px,100%); }
.ritual-panel fieldset { display: grid; gap: 13px; }
.ritual-panel label, .field, .search-field { display: grid; gap: 5px; text-align: left; font: 500 .8rem/1.4 var(--sans); }
.ritual-panel label { color: #fff6db; }
.ritual-panel input { width: 100%; background-color: #101b36f5; }
.ritual-panel fieldset .gold-button { margin: 1px auto 0; }
#calc-result:empty { display: none; }
.calc-output { display: grid; grid-template-columns: minmax(54px,100px) minmax(0,1fr); align-items: center; gap: 18px; max-width: 610px; background: #101933f2; border: 1px solid var(--edge); border-radius: 5px; padding: 15px; margin-top: 20px; text-align: left; }
.calc-output img { width: 100%; height: auto; }
.calc-output .inline-links { margin-top: .5rem; }

.table-layout { display: grid; grid-template-columns: .82fr 1.18fr; border: 1px solid var(--edge); border-radius: 8px; overflow: hidden; background: linear-gradient(145deg,#26335c,#131c39); }
.intro { padding: clamp(25px,4vw,57px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.intro h2 { font-size: clamp(2.5rem,4.2vw,4.2rem); line-height: .98; }
.intro h2 em { color: var(--pale-gold); font-weight: 400; }
.intro-body { max-width: 35ch; margin-top: .8em; color: var(--body); }
.topic-select { margin: 20px 0; }
.topic-select legend, .reading-meta, .catalog-count, figcaption, .inline-status, .table-caption { font: 400 .78rem/1.45 var(--sans); }
.topic-select legend { margin-bottom: 7px; color: var(--muted); }
.topic-options { display: flex; flex-wrap: wrap; gap: 5px; }
.topic-options label { position: relative; cursor: pointer; }
.topic-options input { position: absolute; width: 1px; height: 1px; min-height: 0; clip-path: inset(50%); overflow: hidden; }
.topic-options span { display: block; padding: .42em .83em; font: .77rem/1.3 var(--sans); border: 1px solid #c8b3847a; border-radius: 20px; }
.topic-options input:checked + span { color: #302615; background: #f3dbac; border-color: #f3dbac; }
.topic-options input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.reading-table { min-height: clamp(375px,34vw,475px); position: relative; overflow: hidden; isolation: isolate; background: #6d4c39 url('./assets/scenes/table.webp') center / cover; }
.fan { position: absolute; inset: 11% 11% 14%; display: flex; align-items: center; justify-content: center; }
.tarot-back { position: absolute; left: 50%; top: 49%; height: 78%; aspect-ratio: .58; transform: translate(-50%,-50%) rotate(var(--turn)); transform-origin: 50% 84%; border: clamp(3px,.36vw,6px) solid #e5d6ab; border-radius: 7px; color: var(--gold); box-shadow: 3px 7px 1px #51402c77,3px 11px 18px #23180f80; background-color: #202e57; background-image: repeating-linear-gradient(44deg,transparent 0 8px,#daba7530 8px 9px,transparent 9px 13px),repeating-linear-gradient(-44deg,transparent 0 8px,#daba7530 8px 9px,transparent 9px 13px); transition: transform .2s; }
.tarot-back:nth-child(1) { --turn: -20deg; left: 32%; }
.tarot-back:nth-child(2) { --turn: -1deg; top: 45%; }
.tarot-back:nth-child(3) { --turn: 19deg; left: 68%; }
.tarot-back::before, .tarot-back::after { content: ''; position: absolute; inset: 4%; border: 1px solid #e5c581; border-radius: 3px; }
.tarot-back::after { inset: 7%; opacity: .7; }
.tarot-back span { position: absolute; inset: 20% 13%; display: grid; place-items: center; border: 1px solid #dfbd79; border-radius: 50%; background: #192542; font: clamp(40px,4.5vw,76px)/1 Georgia,serif; }
.tarot-back:hover, .tarot-back:focus-visible { transform: translate(-50%,-55%) rotate(var(--turn)); z-index: 2; }
.tarot-back.turning { z-index: 4; animation: turn-card .5s ease-in-out both; }
.turned-face { position: absolute; inset: 0; height: 100%; width: 100%; border-radius: 3px; z-index: 2; animation: show-face .5s steps(1,end) both; }
.reverse { transform: rotate(180deg); }
@keyframes turn-card { 0% { transform: translate(-50%,-50%) rotate(var(--turn)); } 45% { transform: translate(-50%,-55%) rotate(var(--turn)) perspective(700px) rotateY(86deg); } 100% { transform: translate(-50%,-55%); } }
@keyframes show-face { 0% { opacity: 0; } 45%,100% { opacity: 1; } }
.table-caption { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 5px 13px; color: #fff3db; border-radius: 22px; background: #211c27db; white-space: nowrap; }

.catalog-controls { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 5px 0 16px; border-bottom: 1px solid var(--edge); }
.search-field { max-width: 100%; }
.catalog-count { margin: 13px 0; color: var(--muted); }
.catalog { grid-template-columns: repeat(auto-fill,minmax(128px,1fr)); }
.end-links { border-top: 1px solid var(--rule); padding-top: 24px; margin-top: 36px; }
.card-detail-grid { display: grid; grid-template-columns: minmax(190px,.66fr) minmax(0,1.34fr); align-items: start; gap: clamp(25px,5vw,75px); }
.card-plinth { display: flex; align-items: center; justify-content: center; padding: clamp(10px,2vw,28px); border: 1px solid var(--edge); border-radius: 5px; background: radial-gradient(ellipse at 40% 30%,#39476b,#202a4c 60%,#141d36); }
.card-detail-grid .card-plinth { height: clamp(330px,32vw,470px); }
.face-image { height: 100%; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(2px 5px 6px #080a17a6); }
.text-stack { display: grid; gap: 18px; max-width: 64ch; }
.text-stack h2 { font-size: clamp(1.5rem,2vw,2.1rem); }
.takeaway { color: var(--pale-gold); font-style: italic; }
.scene-feature { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(22px,4vw,64px); margin-top: clamp(38px,5vw,74px); }
.scene-feature > img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 5px; }
.scene-feature .inline-links { margin-top: 1em; }
.reading-meta, figcaption, .inline-status { color: var(--muted); }
.result-heading { padding-bottom: 25px; }
.result-heading .reading-meta { margin-top: .85em; text-transform: uppercase; letter-spacing: .08em; }
.exhibit { display: grid; grid-template-columns: minmax(0,.73fr) minmax(0,1.4fr); gap: clamp(10px,2vw,26px); }
.exhibit .card-plinth, .scene-frame { height: clamp(260px,32vw,445px); }
.scene-frame { width: 100%; object-fit: cover; object-position: center; border-radius: 5px; border: 1px solid var(--rule); }
.exhibit figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 .3em; margin: 8px 0; }
.exhibit figcaption span:last-child { color: #c7ac78; }
.reading-body { display: grid; grid-template-columns: 1.28fr 1fr; align-items: start; gap: clamp(24px,6vw,86px); padding-top: clamp(18px,3vw,40px); }
.reflection { color: var(--ink); font-size: clamp(1.55rem,2.5vw,2.4rem); line-height: 1.18; }
.scene-story { margin-top: 12px; color: var(--muted); }
.reading-focus { margin-top: clamp(18px,3vw,32px); scroll-margin-top: 14px; }
.reading-focus > span { display:block; margin-bottom: 7px; color:var(--muted); font: 500 .83rem/1.4 var(--sans); }
.reading-focus > div { display:flex; flex-wrap:wrap; gap: 5px 7px; }
.reading-focus a { display:inline-flex; align-items:center; min-height:42px; padding:5px 13px; border:1px solid var(--rule); border-radius: 4px; text-decoration:none; font:500 .86rem/1.35 var(--sans); }
.reading-focus a:hover, .reading-focus a:focus-visible { border-color: var(--pale-gold); }
.reading-focus a[aria-current] { color:var(--pale-gold); background:#26314b; border-color:var(--gold); }
.scene-tools button, .inline-status { margin-top: 9px; }
.inline-status:empty { display: none; }
.action-box, .preview-note { padding: 18px 22px; background: #1e2a49; border-left: 2px solid var(--gold); }
.action-box h2 { margin-bottom: .22em; font-size: clamp(1.5rem,2.4vw,2.05rem); }
.result-tools { padding: 24px 0; }
.reminder { padding: 16px 0; }
.reminder-body { padding-top: 10px; max-width: 760px; }
.preview-note { margin-top: 12px; }
.preview-note p { margin: .4em 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-top: 15px; }
.text-link { margin-inline: 1rem; }
@media (max-width: 950px) {
  .text-tiles { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .text-tiles > a:nth-child(odd) { padding-left: 2px; border-left: 0; }
  .atlas-hero { min-height: 610px; }
}
@media (max-width: 700px) {
  .atlas-hero { min-height: 560px; padding-top: 88px; padding-bottom: 34px; }
  .hero-map, .ritual-panel { background-image: url('./assets/atlas/world-map-small.webp'); }
  .hero-map { background-position: center; }
  .hero-art { max-width: 550px; height: 270px; }
  .oracle { height: 87%; bottom: 0; }
  .orbit-node > img, .drawn-seal { width: 49px; height: 49px; }
  .orbit-node > span:last-child { font-size: .68rem; }
  .drawn-seal { font-size: 1.65rem; }
  .node-0, .node-2 { left: 23%; } .node-1 { left: 13%; }
  .node-3, .node-5 { left: 77%; } .node-4 { left: 87%; }
  .hero-copy h1 { font-size: clamp(2.75rem,9.4vw,4.3rem); }
  .hero-copy p { max-width: 31ch; }
  .card-shelf { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .catalog { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .card-detail-grid { gap: 20px; grid-template-columns: .75fr 1.25fr; }
  .card-detail-grid .card-plinth { height: 285px; }
  .family-links, .inline-links { font-size: .82rem; gap: .55em 1em; }
  .table-layout { grid-template-columns: 1fr; }
  .reading-table { min-height: clamp(270px,65vw,365px); }
  .intro { padding: 25px; }
  .intro h2 br { display: none; }
  .intro h2 em::before { content: ' '; }
  .intro .intro-body { max-width: 46ch; }
  .topic-select { margin: 14px 0; }
  .fan { inset: 12% 16% 17%; }
  .exhibit { grid-template-columns: minmax(0,.7fr) minmax(0,1.25fr); }
  .exhibit .card-plinth, .scene-frame { height: clamp(165px,44vw,285px); }
  .exhibit figcaption { font-size: .7rem; line-height: 1.35; }
  .reading-body { grid-template-columns: 1fr; gap: 16px; }
  .scene-feature { grid-template-columns: 1fr; }
  .scene-feature > img { max-width: 520px; }
}
@media (max-width: 480px) {
  .atlas-hero { min-height: 542px; padding-inline: 3px; }
  .hero-art { height: 259px; }
  .hero-copy p { padding-inline: 7px; }
  .orbit-node > span:last-child { font-size: .61rem; }
  .hero-copy .gold-button { min-width: 186px; }
  .section-head { align-items: start; flex-direction: column; gap: 5px; }
  .text-tiles { grid-template-columns: 1fr; }
  .text-tiles > a + a { padding-left: 2px; border-left: 0; }
  .text-tiles > a { padding-block: 17px; }
  .catalog-controls .search-field, .catalog-controls input { width: 100%; }
  .card-detail-grid { grid-template-columns: 1fr; }
  .card-detail-grid .card-plinth { height: 290px; }
  .text-stack { gap: 14px; }
  .entry-name { font-size: 1.02rem; }
  .result-tools { gap: 12px; }
}
@media print {
  :root { color-scheme: light; --body: #222; --ink: #0b0b0b; --muted: #424242; --pale-gold: #333; --gold: #555; }
  body, .is-inner { background: #fff; color: #121212; }
  .site-header, .site-footer, .crumb, .result-tools, .reminder, .reading-focus, .scene-tools, .skip { display: none !important; }
  .page-wrap { width: 100%; }
  .exhibit { grid-template-columns: .73fr 1.4fr; }
  .exhibit .card-plinth, .scene-frame { height: 240px; print-color-adjust: exact; }
  .reading-body { display: block; }
  .action-box { margin-top: 16px; background: #efeee9; border-color: #75643b; }
  .exhibit figcaption span:last-child { color: #414141; }
}
