/* Through Lyntharia's Eyes — independent memoir layout, v148 */
html { scroll-behavior:auto!important; }
body.memoir-body { overflow-x:hidden; overflow-y:auto!important; background:#070914; }
.memoir-main { height:auto!important; min-height:100svh!important; overflow:visible!important; }
.memoir-layout { max-width:1170px; margin-inline:auto; padding:clamp(4.5rem,8vw,7.25rem) clamp(1.5rem,5vw,6rem) 6rem; }
.memoir-hero { max-width:835px; margin-bottom:clamp(2.25rem,5vw,4rem); }
.memoir-hero .page-kicker { margin-bottom:1rem; }
.memoir-hero h1 { margin:0; font:400 clamp(3.8rem,6.2vw,6.5rem)/.98 'Cormorant Garamond',Georgia,serif; letter-spacing:-.035em; color:#f0f1f6; }
.memoir-hero h1 .memoir-title-name { font-weight:400; font-style:normal; color:inherit; }
.memoir-deck { margin:1.45rem 0 .6rem; max-width:685px; font:400 clamp(1.4rem,2.25vw,2.1rem)/1.22 'Cormorant Garamond',Georgia,serif; color:#b9bfd0; }
.memoir-note { color:#aeb6c7; font-size:.94rem; line-height:1.6; margin:0; }
.memoir-hero-actions { display:flex; flex-wrap:wrap; gap:.8rem; margin-top:2rem; }
.memoir-start,.memoir-browse { display:inline-flex; min-height:48px; align-items:center; justify-content:center; gap:1rem; text-decoration:none; text-transform:uppercase; font-family:Inter,system-ui,sans-serif; font-size:.68rem; font-weight:400; letter-spacing:.1em; padding:.8rem 1.15rem; transition:background-color .2s,color .2s; }
.memoir-start { background:#f2f3f6; color:#080a14; border-color:transparent; }
.memoir-start:hover { background:white; }
.memoir-browse { border:1px solid var(--line2); color:var(--silver); }
.memoir-browse:hover { border-color:#e8e8ed; color:#fff; }
.memoir-contents { max-width:880px; margin-bottom:4.5rem; scroll-margin-top:4.5rem; }
/* Always-visible contents: chapter navigation never requires expanding a menu. */
.memoir-contents { border-top:1px solid rgba(211,219,240,.2); border-bottom:1px solid rgba(211,219,240,.2); }
.memoir-index-heading { padding:1.35rem 0; }
.memoir-index-heading h2 { margin:0; font:400 1.75rem/1.1 'Cormorant Garamond',Georgia,serif; color:#f0f1f6; }
.memoir-index-heading p { margin:.35rem 0 0; font-size:.83rem; line-height:1.55; color:#aeb5c7; }
/* Match the musical program: read I–X down the left column, then XI–XIX down the right. */
.memoir-index-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:repeat(10,auto); grid-auto-flow:column; gap:0 2rem; list-style:none; margin:0; padding:0 0 1.6rem; }
.memoir-index-list li { min-width:0; border-top:1px solid rgba(211,219,240,.1); }
.memoir-index-list a { display:flex; gap:.85rem; padding:.75rem .15rem; text-decoration:none; align-items:baseline; }
.memoir-index-list a:hover .memoir-index-title { color:white; text-decoration:underline; text-underline-offset:.25rem; }
.memoir-index-num { font:400 1.15rem/1.1 'Cormorant Garamond',Georgia,serif; color:#b6a0da; min-width:2.3rem; }
.memoir-index-title { font-size:.87rem; line-height:1.48; color:#bfc4d2; }
.memoir-index-kind { display:block; font-size:.68rem; text-transform:uppercase; letter-spacing:.07em; color:#999db1; margin-top:.1rem; }
.memoir-narrative { max-width:790px; }
.memoir-chapter { scroll-margin-top:2.2rem; padding:0 0 clamp(4.25rem,7vw,7rem); margin-bottom:clamp(4rem,6vw,6rem); border-bottom:1px solid rgba(211,219,240,.16); }
.memoir-chapter-context { font-size:.73rem; letter-spacing:.2em; color:#a99ac1; font-weight:600; text-transform:uppercase; margin-bottom:1rem; }
.memoir-chapter-heading { text-align:center; padding:0 0 clamp(2rem,4vw,3.2rem); }
.memoir-chapter-number { margin:0 0 .55rem; display:flex; flex-direction:column; gap:.2rem; align-items:center; text-transform:uppercase; font-size:.67rem; font-weight:600; letter-spacing:.2em; color:#b9a4d6; }
.memoir-chapter-number span { font:400 clamp(2.7rem,5vw,4.25rem)/.95 'Cormorant Garamond',Georgia,serif; letter-spacing:0; text-transform:none; color:#d6cce7; }
.memoir-chapter-heading h2 { font:400 clamp(2.45rem,4vw,4rem)/1.03 'Cormorant Garamond',Georgia,serif; letter-spacing:-.02em; margin:.75rem auto .65rem; color:#f0f1f6; max-width:760px; text-wrap:balance; }
.memoir-music { margin:0; font-size:.86rem; line-height:1.55; color:#9da6bd; }
.memoir-prose { max-width:660px; margin-inline:auto; font-size:1.04rem; line-height:1.93; color:#c5cad7; overflow-wrap:break-word; }
.memoir-paragraph { margin:0 0 1.3em; }
.memoir-paragraph:last-child { margin-bottom:0; }
.memoir-emphasis { color:#ebebf0; }
.memoir-awaiting { font-style:italic; color:#9098ab; text-align:center; }
.memoir-signature { font:italic 1.7rem 'Cormorant Garamond',Georgia,serif; text-align:right; color:#d5cde3; margin:2.3rem 0 0; }
.memoir-chapter-footer { max-width:660px; margin:2.5rem auto 0; display:flex; justify-content:space-between; gap:2rem; border-top:1px solid rgba(211,219,240,.1); padding-top:.85rem; }
.memoir-chapter-footer a,.memoir-finish { font-size:.79rem; color:#b9a5d6; text-decoration:none; }
.memoir-chapter-footer a { padding:.5rem 0; }
.memoir-chapter-footer a:hover { color:#fff; text-decoration:underline; text-underline-offset:.3rem; }
.memoir-finish { color:#8f98ad; padding:.5rem 0; }
.memoir-page-footer { text-align:center; padding:0 0 2rem; }
.memoir-page-footer p { font:400 1.8rem 'Cormorant Garamond',Georgia,serif; color:#cbc9d2; margin:.1rem 0 1rem; }
.memoir-page-footer a { font-size:.85rem; color:#a69ac1; }
.memoir-body a:focus-visible { outline:2px solid #b9a5d6; outline-offset:4px; }
@media(max-width:980px) {
  .memoir-layout { padding:clamp(4.5rem,8vw,6rem) clamp(1.25rem,5vw,3.5rem) 4rem; }
  .memoir-hero h1 { font-size:clamp(3.3rem,10vw,5.8rem); }
}
@media(max-width:650px) {
  .memoir-layout { padding:5rem 1.25rem 3rem; }
  .memoir-hero { margin-bottom:2.1rem; }
  .memoir-hero h1 { font-size:clamp(3.2rem,13.4vw,4.8rem); }
  .memoir-deck { font-size:1.65rem; }
  .memoir-note { font-size:.93rem; }
  .memoir-hero-actions { flex-direction:column; align-items:stretch; }
  .memoir-contents { margin-bottom:3.6rem; scroll-margin-top:4rem; }
  .memoir-index-heading { padding:1rem 0; }
  .memoir-index-list { grid-template-columns:1fr; grid-template-rows:none; grid-auto-flow:row; }
  .memoir-index-list a { padding:.85rem .12rem; }
  .memoir-index-title { font-size:.97rem; }
  .memoir-chapter { scroll-margin-top:4.7rem; margin-bottom:3.4rem; padding-bottom:3.6rem; }
  .memoir-chapter-heading { padding-bottom:2.1rem; }
  .memoir-chapter-heading h2 { font-size:clamp(2.45rem,11vw,3.15rem); }
  .memoir-prose { font-size:1.03rem; line-height:1.85; }
  .memoir-paragraph { margin-bottom:1.25em; }
  .memoir-chapter-footer { margin-top:2rem; }
}
@media(max-width:350px){
  .memoir-layout { padding-inline:1rem; }
  .memoir-prose { font-size:1rem; }
  .memoir-chapter-footer { gap:.65rem; }
}
@media(prefers-reduced-motion:reduce) {
  .memoir-start,.memoir-browse { transition:none; }
}

/* Password-protected Chapter XIX: epilogue and afterword share one unlocked page. */
.memoir-final-chapter { max-width:790px; margin-inline:0; scroll-margin-top:5rem; }
.memoir-final-intro { padding-bottom:1.4rem; }
.memoir-lock-panel { max-width:580px; margin:0 auto; padding:0; background:transparent; border:0; }
.memoir-lock-message { margin:0 0 1.4rem; text-align:center; color:#c6cbda; font-size:1rem; line-height:1.7; }
.memoir-sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.memoir-lock-controls { display:flex; gap:.75rem; }
.memoir-lock-controls input { flex:1; min-width:0; min-height:50px; border:1px solid #626783; border-radius:0; color:#f0f1f6; background:#101422; padding:.75rem .9rem; font:400 1rem/1.2 'Inter',sans-serif; }
.memoir-lock-controls input::placeholder { color:#a7adbf; }
.memoir-lock-controls button { cursor:pointer; min-height:50px; border:0; border-radius:0; background:#e8e8ed; color:#0a0d17; padding:.7rem 1.2rem; font:600 .83rem/1.3 'Inter',sans-serif; }
.memoir-lock-controls button:hover { background:#fff; }
.memoir-lock-controls button:disabled { cursor:wait; opacity:.6; }
.memoir-lock-controls input:focus-visible,.memoir-lock-controls button:focus-visible { outline:2px solid #b9a5d6; outline-offset:3px; }
.memoir-lock-feedback { margin:.65rem 0 0; min-height:1.4em; font-size:.85rem; color:#efb5b5; }
#finale-content[hidden] { display:none; }
@media(max-width:650px) { .memoir-lock-controls { flex-direction:column; } .memoir-lock-panel { padding:0; } .memoir-lock-controls button { width:100%; } }


/* v154 — Desktop memoir landing page: one-line book title and fully visible index
   at the standard 1649×928 desktop viewport. Keep natural scrolling on mobile. */
@media (min-width: 981px) {
  .memoir-hero { max-width: 900px; margin-bottom: 2.2rem; }
  .memoir-hero h1 {
    font-size: clamp(3.45rem, 4.9vw, 5.1rem);
    line-height: 1.02;
    white-space: nowrap;
  }
  .memoir-hero .page-kicker { margin-bottom: .7rem; }
  .memoir-deck { margin-top: .9rem; margin-bottom: .2rem; }
  .memoir-hero-actions { margin-top: 1.25rem; }
  .memoir-index-heading { padding: .75rem 0 .85rem; }
  .memoir-index-heading p { margin-top: .15rem; }
  .memoir-index-list { padding-bottom: .65rem; }
  .memoir-index-list a { padding: .42rem .15rem; }
  .memoir-index-title { line-height: 1.35; }
  .memoir-index-kind { margin-top: .02rem; line-height: 1.3; }
  .memoir-index-num { font-size: 1.12rem; }
}
/* A little extra room when the browser window is comparatively short. */
@media (min-width: 981px) and (max-height: 930px) {
  .memoir-layout { padding-top: 4.25rem; }
  .memoir-hero { margin-bottom: 1.65rem; }
  .memoir-hero-actions { margin-top: .9rem; }
  .memoir-start, .memoir-browse { min-height: 42px; padding-top: .65rem; padding-bottom: .65rem; }
  .memoir-index-heading { padding: .58rem 0 .67rem; }
  .memoir-index-list { padding-bottom: .45rem; }
  .memoir-index-list a { padding: .3rem .15rem; }
  .memoir-index-title { font-size: .84rem; }
  .memoir-index-kind { font-size: .62rem; }
}

/* v158 — A discreet navigation cue on this long memoir, desktop only.
   Mobile retains native touch scrolling without an always-on visual track.
   Overrides the site's global scrollbar-hiding rules for this page alone. */
@media (min-width:981px) {
  html, body.memoir-body {
    scrollbar-width:thin !important;
    scrollbar-color:#5a566f #111115 !important;
  }
  html::-webkit-scrollbar, body.memoir-body::-webkit-scrollbar {
    width:9px !important;
    height:0 !important;
    display:block !important;
    background:#111115 !important;
  }
  html::-webkit-scrollbar-track, body.memoir-body::-webkit-scrollbar-track { background:#111115; }
  html::-webkit-scrollbar-thumb, body.memoir-body::-webkit-scrollbar-thumb {
    background:#5a566f;
    border-radius:20px;
    border:2px solid #111115;
  }
  html::-webkit-scrollbar-thumb:hover, body.memoir-body::-webkit-scrollbar-thumb:hover { background:#817998; }
}

/* Chapter XIX's locked screen is quiet; all narrative text remains encrypted. */
.memoir-final-intro { padding-bottom:1.3rem; }
.memoir-legacy-anchor { display:block; position:relative; top:-2rem; height:0; width:0; }
.memoir-final-context { text-align:center; color:#b9a4d6; font-family:Inter,system-ui,sans-serif; font-size:.72rem; font-weight:600; letter-spacing:.18em; text-transform:uppercase; margin:0 auto 2.25rem; }
.memoir-finale-prose { margin-top:4rem; }
.memoir-final-afterword { margin-top:clamp(4rem,10vw,7rem); padding-top:clamp(3rem,7vw,5rem); border-top:1px solid rgba(211,219,240,.2); }
.memoir-subchapter-heading { padding-bottom:2.2rem; }
.memoir-subchapter-heading h3 { font:400 clamp(2.45rem,4vw,4rem)/1.03 'Cormorant Garamond',Georgia,serif; letter-spacing:-.02em; margin:.75rem auto .65rem; color:#f0f1f6; max-width:760px; text-wrap:balance; }
.memoir-finale-reveal { text-align:center; font:400 clamp(1.6rem,3.2vw,2.4rem)/1.4 'Cormorant Garamond',Georgia,serif; color:#f0f1f6; margin:2.7rem auto; }
.memoir-finale-last { text-align:center; margin:2.6rem auto 0; color:#e2dced; }
.memoir-lock-controls button { text-transform:uppercase; letter-spacing:.055em; font-weight:500; white-space:nowrap; font-size:.69rem; }
@media(max-width:650px) { .memoir-finale-prose { margin-top:2.6rem; } .memoir-subchapter-heading h3 { font-size:clamp(2.45rem,11vw,3.15rem); } }

/* v162: compact accessible eye toggle with no native browser validation popup. */
.memoir-lock-controls .memoir-password-wrap { position:relative; flex:1; min-width:0; }
.memoir-lock-controls .memoir-password-wrap input { width:100%; height:100%; box-sizing:border-box; padding-right:3.8rem; }
.memoir-lock-controls .memoir-password-toggle { position:absolute; z-index:1; top:50%; right:.36rem; transform:translateY(-50%); display:flex; align-items:center; justify-content:center; width:42px; height:42px; min-height:42px; padding:0; border:0; background:transparent; color:#b9bfd0; cursor:pointer; border-radius:3px; }
.memoir-lock-controls .memoir-password-toggle:hover { color:#fff; background:rgba(210,215,233,.09); }
.memoir-lock-controls .memoir-password-toggle:focus-visible { outline:2px solid #b9a5d6; outline-offset:1px; }
.memoir-password-toggle .memoir-eye-closed { display:none; }
.memoir-password-toggle[data-visible="true"] .memoir-eye-open { display:none; }
.memoir-password-toggle[data-visible="true"] .memoir-eye-closed { display:block; }
.memoir-lock-feedback { color:#b9bfd0; font-size:.79rem; min-height:1.2em; }
@media (max-width:650px) { .memoir-lock-controls .memoir-password-wrap { width:100%; } .memoir-lock-controls .memoir-password-toggle { width:42px; } }


/* v163 — Stable chapter-title column even for longer Roman numerals such as XVIII.
   Each chapter number occupies an identically sized grid track rather than expanding a flex item. */
.memoir-index-list a {
  display:grid;
  grid-template-columns:3rem minmax(0,1fr);
  column-gap:.45rem;
  align-items:start;
}
.memoir-index-list .memoir-index-num {
  display:block;
  width:auto;
  min-width:0;
  white-space:nowrap;
}
.memoir-index-list .memoir-index-title {
  display:block;
  min-width:0;
}

/* Unlocked epilogue rises gently into view instead of popping in. */
#finale-content.memoir-finale-unfold {
  animation:memoir-finale-unfold 3s cubic-bezier(.19,.70,.22,1) both;
  transform-origin:top center;
}
@keyframes memoir-finale-unfold {
  0% { opacity:0; transform:translateY(12px); filter:blur(5px); }
  38% { opacity:.32; filter:blur(2px); }
  100% { opacity:1; transform:translateY(0); filter:blur(0); }
}
@media(prefers-reduced-motion:reduce) {
  #finale-content.memoir-finale-unfold { animation:none; }
}
