:root {
  --paper: #f2efe6;
  --ink: #15140f;
  --void: #0a0a0a;
  --navy: #1e2444;
  --navy-light: #34406e;
  --ink-light: #2b2a24;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { min-width: 320px; background: var(--paper); color: var(--ink); font-family: Fraunces, Georgia, "Times New Roman", serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-weight: 600; line-height: 1.05; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.masthead { position: sticky; top: 0; z-index: 50; background: var(--navy); color: var(--paper); border-bottom: 1px solid rgb(242 239 230 / 15%); }
.masthead-inner { position: relative; display: flex; max-width: 1200px; margin: 0 auto; padding: 18px 6vw; align-items: center; justify-content: space-between; }
.wordmark { font-size: 1.05rem; font-variant-caps: small-caps; font-weight: 600; letter-spacing: .08em; }
.nav-links { position: absolute; top: 100%; right: 0; min-width: 210px; display: flex; flex-direction: column; gap: 0; max-height: 0; overflow: hidden; background: var(--navy); border: 1px solid rgb(242 239 230 / 15%); border-top: none; transition: max-height .25s ease; }
.nav-links.open { max-height: 420px; }
.nav-links a { padding: 14px 20px; border-bottom: 1px solid rgb(242 239 230 / 10%); transition: background .15s ease; }
.nav-links a:last-child { border-bottom: none; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a.active { background: rgb(242 239 230 / 8%); }
.nav-toggle { display: flex; align-items: center; gap: 6px; padding: 6px 0; background: none; border: 0; cursor: pointer; font-family: 'Fraunces', Georgia, serif; font-size: .95rem; font-variant-caps: small-caps; letter-spacing: .08em; color: var(--paper); }
.nav-toggle .caret { font-size: .7rem; transition: transform .2s ease; }
.nav-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }

.hero { display: grid; grid-template-columns: 180px 1fr; min-height: calc(100vh - 64px); border-bottom: 1px solid rgb(21 20 15 / 15%); }
.hero-spine { display: flex; padding: 48px 0; border-right: 2px solid var(--ink); flex-direction: column; align-items: center; justify-content: space-between; }
.hero-role { writing-mode: vertical-rl; text-orientation: mixed; font-size: .85rem; font-variant-caps: small-caps; letter-spacing: .15em; }
.hero-mark { font-size: 1.4rem; }
.hero-mark { transition: transform .5s ease, opacity .5s ease; }
.hero-mark:hover { opacity: .65; transform: scale(1.5); }
.hero-main { display: flex; padding: 8vw 6vw; flex-direction: column; justify-content: center; animation: rise .8s ease both; }
.hero-title { margin-bottom: 32px; font-size: clamp(3.2rem, 9vw, 8rem); font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1; letter-spacing: -.02em; }
.hero-hook { max-width: 520px; margin-bottom: 28px; font-size: 1.15rem; }
.hero-link { width: fit-content; padding-bottom: 4px; border-bottom: 1px solid var(--ink); font-size: .95rem; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.contents, .about { padding: 10vw 6vw; border-top: 1px solid rgb(21 20 15 / 15%); }
.contents h2, .about h2, .microfictions h1, .dev-log h1, .reading h1, .reviews h1, .aphorisms h1, .book-copy h1 { margin-bottom: 20px; font-size: clamp(2.2rem, 4vw, 3rem); }
.contents h2 { margin-bottom: 40px; }
.toc { list-style: none; }
.toc li { border-top: 1px solid rgb(21 20 15 / 15%); }
.toc li:last-child { border-bottom: 1px solid rgb(21 20 15 / 15%); }
.toc a { display: flex; padding: 22px 0; gap: 24px; align-items: baseline; justify-content: space-between; }
.toc a:hover .toc-title, .toc a:focus-visible .toc-title { border-bottom: 1px solid currentColor; }
.toc-title { white-space: nowrap; font-size: 1.3rem; font-weight: 600; }
.toc-desc { opacity: .65; font-size: .95rem; text-align: right; }
.about-body { max-width: 620px; font-size: 1.1rem; }
.about-body p + p { margin-top: 1.3em; }
.book, .microfictions, .dev-log, .reading, .reviews, .aphorisms { display: flex; min-height: calc(100vh - 65px); padding: 10vw 6vw; flex-direction: column; justify-content: center; }
.book { background: var(--void); color: var(--paper); }
.book-inner { display: grid; max-width: 1200px; margin: 0 auto; gap: 60px; grid-template-columns: 400px 1fr; align-items: center; }
.medallion { position: relative; width: 100%; max-width: 400px; margin: 0 auto; aspect-ratio: 1; }
.medallion-link { display: block; transition: transform .25s ease; }
.medallion-link:hover { transform: rotate(2deg) scale(1.025); }
.medallion-link:focus-visible { outline-color: var(--paper); }
.medallion-burst { display: block; width: 100%; height: 100%; }
.medallion-burst polygon { fill: var(--paper); }
.medallion-burst circle { fill: var(--void); }
.medallion-text { position: absolute; inset: 0; display: flex; padding: 20% 18%; color: var(--paper); flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.medallion-author { margin-bottom: 10px; font-size: .95rem; font-variant-caps: small-caps; letter-spacing: .1em; }
.medallion-title { margin-bottom: 10px; font-size: 1.5rem; font-weight: 600; line-height: 1.15; }
.medallion-status { opacity: .75; font-size: .8rem; font-style: italic; }
.book-copy p { max-width: 560px; margin-bottom: 18px; font-size: 1.05rem; }
.book-note a { border-bottom: 1px solid var(--paper); }

.section-intro { max-width: 620px; margin-bottom: 48px; font-size: 1.1rem; }
.fiction-grid { display: grid; gap: 1px; background: var(--ink); border: 1px solid var(--ink); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fiction-card { padding: 32px 28px; background: var(--paper); }
.card-number { margin-bottom: 14px; opacity: .55; font-size: .85rem; }
.fiction-card h2 { margin-bottom: 10px; font-size: 1.4rem; }
.dev-log { background: var(--navy); color: var(--paper); }
.log-list, .review-list { display: flex; flex-direction: column; }
.log-entry { display: grid; padding: 28px 0; gap: 24px; border-top: 1px solid rgb(242 239 230 / 20%); grid-template-columns: 120px 1fr; }
.log-entry:last-child { border-bottom: 1px solid rgb(242 239 230 / 20%); }
.entry-date { opacity: .7; font-size: .85rem; }
.log-entry h2 { margin-bottom: 8px; font-size: 1.3rem; }
.shelf { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.spine { display: flex; width: 64px; min-height: 320px; padding: 20px 0; color: var(--paper); flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: space-between; writing-mode: vertical-rl; text-orientation: mixed; }
.spine--a { background: var(--navy); } .spine--b { background: var(--ink); } .spine--c { background: var(--navy-light); } .spine--d { background: var(--ink-light); }
.spine-title { font-size: 1rem; font-weight: 600; letter-spacing: .02em; }
.spine-author { opacity: .85; font-size: .75rem; font-variant-caps: small-caps; letter-spacing: .08em; }
.review-entry { padding: 28px 0; border-top: 1px solid rgb(21 20 15 / 15%); }
.review-entry:last-child { border-bottom: 1px solid rgb(21 20 15 / 15%); }
.review-title { margin-bottom: 4px; font-size: 1.4rem; }
.review-author { margin-bottom: 14px; opacity: .6; font-size: .8rem; font-variant-caps: small-caps; letter-spacing: .08em; }
.review-entry p:last-child { max-width: 620px; font-size: 1.05rem; }

.poems { display: flex; min-height: calc(100vh - 65px); padding: clamp(2rem, 8vw, 6rem) 6vw; background: #f8f6ee; align-items: center; justify-content: center; }
.poem-sheet { position: relative; width: min(100%, 42rem); padding: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 6vw, 4rem); background: #fffdf6; box-shadow: 0 1px 1px rgb(21 20 15 / 4%), 0 2rem 5rem rgb(21 20 15 / 7%); }
.poem-sheet::before { content: ""; position: absolute; inset: 0; opacity: .5; mix-blend-mode: multiply; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E"); }
.poem-header { position: relative; display: flex; padding-bottom: 1.25rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid rgb(21 20 15 / 12%); opacity: .55; font-size: .75rem; font-variant-caps: small-caps; letter-spacing: .12em; justify-content: space-between; }
.poem-count { opacity: .7; }
.poem-reading { position: relative; }
.poem h1 { margin-bottom: clamp(2rem, 5vw, 3.5rem); color: var(--ink); font-size: clamp(2rem, 4.5vw, 3.4rem); font-style: italic; font-weight: 300; letter-spacing: -.01em; line-height: 1.08; }
.poem-text { position: relative; color: rgb(21 20 15 / 82%); font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 2; }
.poem-text p + p { margin-top: 2.2em; }
.poem-end { position: relative; margin-top: clamp(2.5rem, 6vw, 4rem); opacity: .4; font-size: .85rem; text-align: center; letter-spacing: .35em; }
.site-footer { display: grid; padding: clamp(2rem, 6vw, 5rem) 6vw 2rem; gap: 2rem; border-top: 1px solid rgb(21 20 15 / 15%); }
.epigraph { max-width: 720px; margin: 0; }
.epigraph-text { font-size: clamp(1rem, 2vw, 1.3rem); font-style: italic; line-height: 1.45; }
.epigraph-author { display: block; margin-top: .65rem; font-size: .8rem; font-style: normal; font-variant-caps: small-caps; letter-spacing: .08em; }
.copyright { opacity: .7; font-size: .85rem; }
.colophon { max-width: 38rem; margin-top: -1.25rem; opacity: .58; font-size: .75rem; font-style: italic; letter-spacing: .01em; }

.shrine-page { background: var(--void); color: var(--paper); }
.shrine-return { padding-bottom: 3px; border-bottom: 1px solid transparent; font-size: .85rem; }
.shrine-return:hover, .shrine-return:focus-visible { border-color: currentColor; }
.shrine { display: grid; min-height: calc(100vh - 65px); padding: 10vw 6vw; gap: 3rem 6vw; grid-template-areas: "heading portrait" "copy portrait"; grid-template-columns: minmax(0, 1.1fr) minmax(15rem, .55fr); align-content: center; }
.shrine-heading { grid-area: heading; }
.shrine-kicker { margin-bottom: 1.5rem; font-size: .8rem; font-variant-caps: small-caps; letter-spacing: .12em; }
.shrine h1 { font-size: clamp(4rem, 11vw, 10rem); font-weight: 400; letter-spacing: -.04em; }
.shrine h1 em { font-weight: 300; }
.shrine-portrait { grid-area: portrait; width: 100%; max-width: 25rem; margin: auto; }
.shrine-portrait img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: grayscale(1) contrast(1.08) sepia(.16); }
.shrine-portrait figcaption { margin-top: .7rem; font-size: .72rem; font-variant-caps: small-caps; letter-spacing: .1em; text-align: right; }
.shrine-copy { grid-area: copy; align-self: end; max-width: 29rem; }
.shrine-copy > p { margin-bottom: 2.5rem; font-size: 1.05rem; }
.shrine-copy blockquote { padding-top: 1.5rem; border-top: 1px solid rgb(242 239 230 / 25%); font-size: 1.1rem; font-style: italic; }
.shrine-copy cite { display: block; margin-top: .7rem; font-size: .8rem; font-style: normal; font-variant-caps: small-caps; letter-spacing: .08em; }
.shrine-page .site-footer { border-color: rgb(242 239 230 / 15%); }

.dream-page { position: relative; isolation: isolate; overflow-x: hidden; background: linear-gradient(180deg, #a9d5e8 0%, #d7edf0 44%, #dce7bd 73%, #9ebd72 100%); color: #284436; }
.dream-page::before, .dream-page::after { position: fixed; z-index: 0; display: block; content: ""; pointer-events: none; }
.dream-page::before { top: 5rem; left: -12vw; width: 68vw; height: 30vw; min-height: 15rem; opacity: .65; background: radial-gradient(ellipse at 20% 60%, rgb(255 255 249 / 88%) 0 18%, transparent 19%), radial-gradient(ellipse at 39% 42%, rgb(255 255 249 / 90%) 0 24%, transparent 25%), radial-gradient(ellipse at 63% 54%, rgb(255 255 249 / 80%) 0 27%, transparent 28%); filter: blur(10px); }
.dream-page::after { right: -14vw; bottom: 8vw; width: 65vw; height: 28vw; min-height: 14rem; opacity: .55; background: radial-gradient(ellipse at 25% 68%, rgb(255 255 250 / 90%) 0 22%, transparent 23%), radial-gradient(ellipse at 50% 44%, rgb(255 255 250 / 86%) 0 26%, transparent 27%), radial-gradient(ellipse at 76% 66%, rgb(255 255 250 / 74%) 0 21%, transparent 22%); filter: blur(12px); }
.dream-page .masthead { background: rgb(220 241 238 / 62%); color: #285440; border-color: rgb(51 101 71 / 18%); backdrop-filter: blur(14px); }
.dream-page .site-footer { background: rgb(234 242 213 / 48%); border-color: rgb(51 101 71 / 18%); }
.dream-page .masthead, .dream-page .dream-archive, .dream-page .site-footer { position: relative; z-index: 1; }
.dream-page .shrine-return { color: #397350; }
.dream-archive { position: relative; display: grid; min-height: calc(100vh - 65px); padding: 10vw 6vw; align-content: center; }
.dream-gate { width: min(100%, 46rem); margin: 0 auto; padding: clamp(2rem, 6vw, 5rem); background: rgb(255 255 248 / 62%); border: 1px solid rgb(51 101 71 / 16%); border-radius: 50% 50% 44% 44% / 28% 28% 14% 14%; box-shadow: 0 1.5rem 4rem rgb(49 104 77 / 13%); text-align: center; backdrop-filter: blur(12px); }
.dream-label { margin-bottom: 1.5rem; color: #477857; font-size: .76rem; font-variant-caps: small-caps; letter-spacing: .15em; }
.dream-gate h1 { color: #315342; font-size: clamp(2.5rem, 6vw, 5.3rem); font-weight: 300; line-height: 1.05; }
.dream-question { margin: 3rem 0 1.5rem; color: #477857; font-size: .9rem; font-variant-caps: small-caps; letter-spacing: .12em; }
.dream-actions { display: flex; gap: .6rem; justify-content: center; }
.dream-actions button { min-width: 7rem; padding: .8rem 1.25rem; background: rgb(255 255 248 / 50%); color: #315342; border: 1px solid rgb(51 101 71 / 34%); border-radius: 999px; font: inherit; font-size: .8rem; font-variant-caps: small-caps; letter-spacing: .1em; cursor: pointer; transition: background .25s ease, color .25s ease, transform .25s ease; }
.dream-actions button:hover, .dream-actions button:focus-visible { background: #4f8657; color: #fffdf2; transform: translateY(-2px); }
.dream-contents { width: min(100%, 68rem); margin: 0 auto; }
.dream-heading { margin-bottom: clamp(3rem, 7vw, 6rem); }
.dream-heading h1 { margin-bottom: 1rem; color: #315342; font-size: clamp(4rem, 11vw, 9rem); font-weight: 300; letter-spacing: -.04em; text-shadow: 0 .2rem 0 rgb(255 255 248 / 40%); }
.dream-heading > p:last-child { max-width: 25rem; color: #3f6951; font-size: 1.05rem; font-style: italic; }
.dream-list { border-top: 1px solid rgb(51 101 71 / 24%); }
.dream-entry { display: grid; padding: clamp(1.5rem, 4vw, 3rem); gap: 2rem; background: rgb(255 255 248 / 62%); border-bottom: 1px solid rgb(51 101 71 / 22%); box-shadow: 0 1rem 2rem rgb(49 104 77 / 7%); grid-template-columns: minmax(10rem, .6fr) minmax(0, 1.4fr); }
.dream-meta { color: #578061; font-size: .72rem; font-variant-caps: small-caps; letter-spacing: .08em; line-height: 1.75; }
.dream-body h2 { margin-bottom: 1rem; color: #315342; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 400; }
.dream-body p { max-width: 34rem; color: #365a47; font-size: 1.08rem; font-style: italic; }
.dream-symbols { max-width: 28rem; margin-top: clamp(4rem, 9vw, 7rem); padding: 2rem; background: rgb(234 242 213 / 58%); border: 1px solid rgb(51 101 71 / 14%); border-radius: 1.5rem; }
.dream-symbols h2 { margin-bottom: 1.25rem; color: #477857; font-size: .8rem; font-variant-caps: small-caps; letter-spacing: .13em; }
.dream-symbols div { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px dotted rgb(51 101 71 / 36%); color: #365a47; font-size: .85rem; }
.dream-symbols dt { text-transform: uppercase; letter-spacing: .08em; }
.dream-symbols dd { margin-left: 1rem; }
.wake-link { display: inline-block; margin-top: 4rem; padding-bottom: .25rem; color: #397350; border-bottom: 1px solid rgb(51 101 71 / 35%); font-size: .85rem; }

/* =========================
   APHORISMS
========================= */

.aphorisms { position: relative; overflow: hidden; background: linear-gradient(118deg, transparent 36%, rgb(255 255 255 / 35%) 37%, transparent 39%), linear-gradient(74deg, transparent 58%, rgb(120 116 106 / 22%) 59%, transparent 62%), linear-gradient(162deg, transparent 18%, rgb(120 116 106 / 16%) 19%, transparent 22%), linear-gradient(24deg, transparent 70%, rgb(255 255 255 / 28%) 71%, transparent 75%), #e9e6dd; color: #38362e; }
.aphorisms::before { content: ""; position: absolute; inset: 0; opacity: .4; mix-blend-mode: multiply; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.09' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)' opacity='0.5'/%3E%3C/svg%3E"); }
.aphorisms h1 { position: relative; text-transform: uppercase; letter-spacing: .05em; text-shadow: 1px 1px 0 rgb(255 255 255 / 55%), -1px -1px 1px rgb(56 54 46 / 25%); }
.aphorisms .section-intro { position: relative; opacity: .8; }
.aphorism-groups { position: relative; display: flex; width: 100%; max-width: 720px; margin: 0 auto; flex-direction: column; gap: clamp(2.5rem, 5vw, 4rem); }
.aphorism-group { position: relative; padding: clamp(1.5rem, 4vw, 2.25rem); background: rgb(255 255 255 / 20%); box-shadow: inset 0 1px 2px rgb(56 54 46 / 15%), inset 0 -1px 1px rgb(255 255 255 / 45%); }
.aphorism-group h2 { margin-bottom: 24px; padding-bottom: 10px; opacity: .7; font-size: .8rem; text-transform: uppercase; letter-spacing: .22em; border-bottom: 1px solid rgb(56 54 46 / 22%); text-shadow: 1px 1px 0 rgb(255 255 255 / 55%); }
.aphorism-list { list-style: none; }
.aphorism-list li { padding: 20px 0; border-top: 1px solid rgb(56 54 46 / 14%); }
.aphorism-list li:first-child { padding-top: 0; border-top: none; }
.aphorism-text { margin-bottom: 8px; font-size: 1.15rem; font-style: italic; line-height: 1.6; }
.aphorism-source { opacity: .65; font-size: .8rem; font-variant-caps: small-caps; letter-spacing: .08em; }
.aphorism-group h3 { margin: 2rem 0 6px; font-size: .85rem; font-style: italic; opacity: .7; }
.maxims-list { margin-top: 16px; columns: 2; column-gap: 2.5rem; list-style: none; font-size: .95rem; line-height: 1.9; }
.maxims-list li { break-inside: avoid; }
.maxims-close { margin-top: 28px; font-size: .95rem; font-style: italic; text-align: center; opacity: .55; letter-spacing: .08em; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 780px) {
  .hero { grid-template-columns: 1fr; }
  .hero-spine { padding: 20px 6vw; border-right: 0; border-bottom: 2px solid var(--ink); flex-direction: row; justify-content: space-between; }
  .hero-role { writing-mode: horizontal-tb; }
  .book-inner { grid-template-columns: 1fr; }
  .log-entry { gap: 6px; grid-template-columns: 1fr; }
  .shelf { gap: 1px; overflow-x: visible; background: var(--ink); border: 1px solid var(--ink); flex-direction: column; }
  .spine { width: 100%; min-height: auto; padding: 16px 20px; flex-direction: row; align-items: center; justify-content: space-between; writing-mode: horizontal-tb; }
  .toc a { gap: 4px; flex-direction: column; align-items: flex-start; }
  .toc-desc { text-align: left; }
  .shrine { gap: 2rem; grid-template-areas: "heading" "portrait" "copy"; grid-template-columns: 1fr; }
  .shrine-portrait { max-width: 19rem; margin: 0; }
  .dream-entry { gap: 1rem; grid-template-columns: 1fr; }
    .poem-sheet { padding: 2.5rem 1.5rem; }
  .maxims-list { columns: 1; }
}

/* =========================
   MOONLIT ARCHIVE PAGES
   (microfictions / dev log / reviews / dreams)
========================= */

.archive-section,
.dream-archive {
  display: block;
  min-height: calc(100vh - 65px);
  padding: clamp(1rem, 4vw, 3.5rem);
  background: #34385f;
}

.archive-shell {
  display: grid;
  min-height: calc(100vh - 65px - clamp(2rem, 8vw, 7rem));
  overflow: hidden;
  background: #b4b6d5;
  border: 1px solid rgb(249 247 232 / 72%);
  box-shadow: 0 1.5rem 4rem rgb(8 10 32 / 32%);
  grid-template-columns: minmax(18rem, .82fr) minmax(0, 1.18fr);
}

.archive-sky {
  position: relative;
  display: flex;
  min-height: 36rem;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 3rem);
  color: rgb(244 242 255 / 72%);
  background: radial-gradient(circle at 46% 24%, rgb(218 225 255 / 82%) 0 11%, transparent 11.5%), linear-gradient(155deg, #101533 0%, #252a59 47%, #747aaa 100%);
  align-items: flex-end;
}

.sky--log { background: radial-gradient(circle at 46% 24%, rgb(242 221 255 / 82%) 0 11%, transparent 11.5%), linear-gradient(155deg, #211139 0%, #4e3777 47%, #9186b8 100%); }
.sky--reviews { background: radial-gradient(circle at 46% 24%, rgb(226 238 209 / 82%) 0 11%, transparent 11.5%), linear-gradient(155deg, #12293a 0%, #355d65 47%, #8aa8a0 100%); }
.sky--dreams { background: radial-gradient(circle at 46% 24%, rgb(221 235 255 / 82%) 0 11%, transparent 11.5%), linear-gradient(155deg, #111b3a 0%, #384878 47%, #8fa1c5 100%); }

.archive-sky::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: .8;
  background-image: radial-gradient(circle, #fff 0 1px, transparent 1.8px), radial-gradient(circle, #c6d0ff 0 1px, transparent 1.6px);
  background-position: 1.5rem 2rem, 6rem 4rem;
  background-size: 7rem 7rem, 10rem 10rem;
}

.archive-sky::after {
  position: absolute;
  right: -12%;
  bottom: -16%;
  left: -12%;
  height: 48%;
  content: "";
  background: radial-gradient(ellipse at 30% 100%, #20284a 0 38%, transparent 39%), radial-gradient(ellipse at 72% 100%, #171d3b 0 45%, transparent 46%), linear-gradient(0deg, #11162f, transparent);
}

.archive-moon {
  position: absolute;
  top: 14%;
  left: 50%;
  width: clamp(7rem, 15vw, 13rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 34%, #fffdee 0 6%, transparent 6.5%), radial-gradient(circle at 65% 58%, rgb(176 188 227 / 42%) 0 9%, transparent 9.5%), #e7eaf6;
  box-shadow: 0 0 5rem rgb(227 235 255 / 65%);
  transform: translateX(-50%);
}

.archive-sky p {
  position: relative;
  z-index: 1;
  max-width: 11rem;
  font-size: .78rem;
  font-variant-caps: small-caps;
  letter-spacing: .13em;
  line-height: 1.65;
}

.archive-panel {
  display: flex;
  min-width: 0;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: linear-gradient(145deg, rgb(235 235 248 / 96%), rgb(201 204 230 / 96%));
  color: #252950;
  flex-direction: column;
  justify-content: center;
}

.archive-heading { width: min(100%, 38rem); margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.archive-heading .section-label { margin-bottom: 1rem; color: #4d5281; opacity: 1; }
.archive-heading h1 { margin-bottom: 1.25rem; font-size: clamp(2.8rem, 5vw, 5.5rem); font-style: italic; font-weight: 300; letter-spacing: -.04em; line-height: .98; }
.archive-heading > p:last-child { max-width: 32rem; color: #4d5278; font-size: 1.06rem; font-style: italic; }

.archive-panel .fiction-grid { width: min(100%, 40rem); background: rgb(37 41 80 / 24%); border-color: rgb(37 41 80 / 24%); }
.archive-panel .fiction-card { min-height: 12rem; padding: 1.5rem; background: rgb(248 248 255 / 68%); }
.archive-panel .fiction-card h2 { color: #252950; }
.archive-panel .log-list, .archive-panel .review-list { width: min(100%, 40rem); border-top: 1px solid rgb(37 41 80 / 24%); }
.archive-panel .log-entry, .archive-panel .review-entry { padding: 2rem 0; color: #252950; border-color: rgb(37 41 80 / 24%); }
.archive-panel .entry-date, .archive-panel .review-author { color: #4d5278; opacity: 1; }

.dream-page { background: #34385f; color: #252950; }
.dream-page::before, .dream-page::after { display: none; }
.dream-page .masthead { background: var(--navy); color: var(--paper); border-color: rgb(242 239 230 / 15%); backdrop-filter: none; }
.dream-page .site-footer { position: relative; z-index: 1; background: #34385f; color: #d9dcef; border-color: rgb(249 247 232 / 20%); }
.dream-page .shrine-return { color: inherit; }
.dream-page .dream-archive { position: relative; z-index: 1; }
.dream-gate.archive-shell, .dream-contents.archive-shell { width: auto; margin: 0; padding: 0; background: #b4b6d5; border-radius: 0; box-shadow: 0 1.5rem 4rem rgb(8 10 32 / 32%); text-align: left; backdrop-filter: none; }
.dream-contents[hidden] { display: none !important; }
.dream-gate-panel { text-align: center; align-items: center; }
.dream-gate-panel .dream-label { margin-bottom: 1.5rem; color: #4d5281; }
.dream-gate-panel h1 { max-width: 42rem; color: #252950; font-size: clamp(2.4rem, 5vw, 5rem); font-weight: 300; }
.dream-gate-panel .dream-question { color: #4d5281; }
.dream-gate-panel .dream-actions button { background: rgb(248 248 255 / 58%); color: #252950; border-color: rgb(37 41 80 / 32%); }
.dream-gate-panel .dream-actions button:hover, .dream-gate-panel .dream-actions button:focus-visible { background: #444a7b; color: #fffdf2; }
.dream-content-panel { justify-content: flex-start; }
.dream-heading { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.dream-heading h1 { margin-bottom: 1.25rem; color: #252950; font-size: clamp(2.8rem, 5vw, 5.5rem); font-style: italic; font-weight: 300; letter-spacing: -.04em; text-shadow: none; }
.dream-heading > p:last-child { color: #4d5278; }
.dream-list { width: min(100%, 40rem); border-color: rgb(37 41 80 / 24%); }
.dream-entry { padding: 2rem 0; gap: 1.5rem; background: transparent; border-color: rgb(37 41 80 / 24%); box-shadow: none; }
.dream-meta { color: #4d5281; }
.dream-body h2, .dream-body p { color: #252950; }
.dream-symbols { background: rgb(248 248 255 / 46%); border-color: rgb(37 41 80 / 18%); border-radius: 0; }
.dream-symbols h2, .dream-symbols div { color: #252950; }
.dream-symbols div { border-color: rgb(37 41 80 / 36%); }
.wake-link { color: #3e4574; border-color: rgb(37 41 80 / 35%); }

@media (max-width: 780px) {
  .archive-section, .dream-archive { padding: 0; }
  .archive-shell { min-height: calc(100vh - 65px); border: 0; grid-template-columns: 1fr; }
  .archive-sky { min-height: 18rem; }
  .archive-moon { top: 14%; left: 72%; }
  .archive-panel { padding: 2rem 6vw 3rem; }
  .archive-heading { margin-bottom: 2.5rem; }
}

/* Entry navigation on the original section themes. */
.entry-pager [data-entry][hidden] { display: none !important; }
.entry-controls { display: flex; max-width: 620px; margin-top: 1.75rem; gap: 1rem; align-items: center; justify-content: space-between; }
.entry-controls button { padding: .55rem .8rem; background: transparent; color: inherit; border: 1px solid currentColor; font: inherit; font-size: .75rem; font-variant-caps: small-caps; letter-spacing: .08em; cursor: pointer; }
.entry-controls button:hover:not(:disabled), .entry-controls button:focus-visible:not(:disabled) { background: var(--ink); color: var(--paper); }
.entry-controls button:disabled { opacity: .32; cursor: not-allowed; }
.entry-controls p { font-size: .76rem; font-variant-caps: small-caps; letter-spacing: .12em; }
.dev-log .entry-controls button:hover:not(:disabled), .dev-log .entry-controls button:focus-visible:not(:disabled) { background: var(--paper); color: var(--navy); }

/* Restore the original cloud-and-meadow Dreams page. */
.dream-page { position: relative; isolation: isolate; overflow-x: hidden; background: linear-gradient(180deg, #a9d5e8 0%, #d7edf0 44%, #dce7bd 73%, #9ebd72 100%); color: #284436; }
.dream-page::before, .dream-page::after { position: fixed; z-index: 0; display: block; content: ""; pointer-events: none; }
.dream-page::before { top: 5rem; left: -12vw; width: 68vw; height: 30vw; min-height: 15rem; opacity: .65; background: radial-gradient(ellipse at 20% 60%, rgb(255 255 249 / 88%) 0 18%, transparent 19%), radial-gradient(ellipse at 39% 42%, rgb(255 255 249 / 90%) 0 24%, transparent 25%), radial-gradient(ellipse at 63% 54%, rgb(255 255 249 / 80%) 0 27%, transparent 28%); filter: blur(10px); }
.dream-page::after { right: -14vw; bottom: 8vw; width: 65vw; height: 28vw; min-height: 14rem; opacity: .55; background: radial-gradient(ellipse at 25% 68%, rgb(255 255 250 / 90%) 0 22%, transparent 23%), radial-gradient(ellipse at 50% 44%, rgb(255 255 250 / 86%) 0 26%, transparent 27%), radial-gradient(ellipse at 76% 66%, rgb(255 255 250 / 74%) 0 21%, transparent 22%); filter: blur(12px); }
.dream-page .masthead { position: relative; z-index: 1; background: rgb(220 241 238 / 62%); color: #285440; border-color: rgb(51 101 71 / 18%); backdrop-filter: blur(14px); }
.dream-page .site-footer { position: relative; z-index: 1; background: rgb(234 242 213 / 48%); color: #284436; border-color: rgb(51 101 71 / 18%); }
.dream-page .shrine-return { color: #397350; }
.dream-page .dream-archive { position: relative; z-index: 1; display: grid; min-height: calc(100vh - 65px); padding: 10vw 6vw; background: transparent; align-content: center; }
.dream-gate { width: min(100%, 46rem); margin: 0 auto; padding: clamp(2rem, 6vw, 5rem); background: rgb(255 255 248 / 62%); border: 1px solid rgb(51 101 71 / 16%); border-radius: 50% 50% 44% 44% / 28% 28% 14% 14%; box-shadow: 0 1.5rem 4rem rgb(49 104 77 / 13%); text-align: center; backdrop-filter: blur(12px); }
.dream-label { margin-bottom: 1.5rem; color: #477857; font-size: .76rem; font-variant-caps: small-caps; letter-spacing: .15em; }
.dream-gate h1 { color: #315342; font-size: clamp(2.5rem, 6vw, 5.3rem); font-weight: 300; line-height: 1.05; }
.dream-question { margin: 3rem 0 1.5rem; color: #477857; font-size: .9rem; font-variant-caps: small-caps; letter-spacing: .12em; }
.dream-actions { display: flex; gap: .6rem; justify-content: center; }
.dream-actions button { min-width: 7rem; padding: .8rem 1.25rem; background: rgb(255 255 248 / 50%); color: #315342; border: 1px solid rgb(51 101 71 / 34%); border-radius: 999px; font: inherit; font-size: .8rem; font-variant-caps: small-caps; letter-spacing: .1em; cursor: pointer; transition: background .25s ease, color .25s ease, transform .25s ease; }
.dream-actions button:hover, .dream-actions button:focus-visible { background: #4f8657; color: #fffdf2; transform: translateY(-2px); }
.dream-contents { width: min(100%, 68rem); margin: 0 auto; }
.dream-contents[hidden] { display: none !important; }
.dream-heading { margin-bottom: clamp(3rem, 7vw, 6rem); }
.dream-heading h1 { margin-bottom: 1rem; color: #315342; font-size: clamp(4rem, 11vw, 9rem); font-weight: 300; letter-spacing: -.04em; text-shadow: 0 .2rem 0 rgb(255 255 248 / 40%); }
.dream-heading > p:last-child { max-width: 25rem; color: #3f6951; font-size: 1.05rem; font-style: italic; }
.dream-list { border-top: 1px solid rgb(51 101 71 / 24%); }
.dream-entry { display: grid; padding: clamp(1.5rem, 4vw, 3rem); gap: 2rem; background: rgb(255 255 248 / 62%); border-bottom: 1px solid rgb(51 101 71 / 22%); box-shadow: 0 1rem 2rem rgb(49 104 77 / 7%); grid-template-columns: minmax(10rem, .6fr) minmax(0, 1.4fr); }
.dream-meta { color: #578061; font-size: .72rem; font-variant-caps: small-caps; letter-spacing: .08em; line-height: 1.75; }
.dream-body h2 { margin-bottom: 1rem; color: #315342; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 400; }
.dream-body p { max-width: 34rem; color: #365a47; font-size: 1.08rem; font-style: italic; }
.dream-symbols { max-width: 28rem; margin-top: clamp(4rem, 9vw, 7rem); padding: 2rem; background: rgb(234 242 213 / 58%); border: 1px solid rgb(51 101 71 / 14%); border-radius: 1.5rem; }
.dream-symbols h2 { margin-bottom: 1.25rem; color: #477857; font-size: .8rem; font-variant-caps: small-caps; letter-spacing: .13em; }
.dream-symbols div { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px dotted rgb(51 101 71 / 36%); color: #365a47; font-size: .85rem; }
.dream-symbols dt { text-transform: uppercase; letter-spacing: .08em; }
.dream-symbols dd { margin-left: 1rem; }
.dream-page .entry-controls { color: #365a47; }
.dream-page .entry-controls button:hover:not(:disabled), .dream-page .entry-controls button:focus-visible:not(:disabled) { background: #4f8657; color: #fffdf2; }
.wake-link { display: inline-block; margin-top: 4rem; padding-bottom: .25rem; color: #397350; border-bottom: 1px solid rgb(51 101 71 / 35%); font-size: .85rem; }

@media (max-width: 780px) {
  .dream-page .dream-archive { display: grid; padding: 10vw 6vw; }
  .dream-entry { gap: 1rem; grid-template-columns: 1fr; }
}
