.reader{--book-bg:#101718;--book-line:#36403d;--book-muted:#b3b9ae;--book-ink:#f2efe3;--book-accent:#e9ae78;display:flex;flex-direction:column;min-block-size:100vh;background:var(--book-bg);color:var(--book-ink)}
.book-width{width:min(100%,1200px);margin-inline:auto;padding-inline:clamp(20px,5vw,64px)}
.book-header{background:#0b1112;border-bottom:1px solid var(--book-line)}
.book-header>.book-width,.book-header nav,.book-brand{display:flex;align-items:center}
.book-header>.book-width{min-height:66px;justify-content:space-between;gap:18px}
.book-brand{gap:9px;font:italic 850 1.38rem/1 Roboto,Arial,sans-serif;letter-spacing:.065em;direction:ltr;white-space:nowrap}
.book-brand img{width:34px;height:34px}
.book-brand b{color:var(--book-accent)}
.book-header nav{gap:clamp(12px,3vw,36px);font-size:.94rem;line-height:1.25}
.book-header nav>a{padding-block:.6em}
.book-header a:is(:hover,[aria-current]){color:var(--book-accent)}
.book-language{display:flex;flex:none;align-items:center;gap:7px;position:relative;font-size:.88rem;white-space:nowrap}
.book-language::after{content:'';width:6px;height:6px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg)}
.book-language:focus-within{outline:2px solid var(--book-accent);outline-offset:6px}
.book-language select{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.book-language option{background:#101918;color:#fff}
html[dir=rtl] .book-language::after{transform:translateY(-2px) rotate(-45deg)}

.book-page{flex:1 0 auto;padding-block:clamp(26px,5vw,58px) clamp(30px,5vw,68px)}
.book-page--story{max-width:850px}
.reader h1,.chapter h2,.world-lead,.opening,.chapter>p{font-family:Georgia,'Times New Roman',serif}
.reader h1{font-size:clamp(2.1rem,4.8vw,3.65rem);line-height:1.06;letter-spacing:-.035em;font-weight:400;text-wrap:balance;margin:0 0 18px}
.world-intro{display:grid;grid-template-columns:minmax(0,2fr) minmax(200px,1fr);align-items:center;gap:clamp(18px,4vw,44px);padding-block-end:clamp(20px,3vw,34px)}
.world-intro h1{font-size:clamp(2.1rem,4.6vw,3.25rem)}
.world-intro img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;border:1px solid var(--book-line)}
.world-lead{max-width:60ch;font-size:clamp(1.12rem,1.7vw,1.32rem);line-height:1.55;color:#eee6d2}
.chapter{border-top:1px solid var(--book-line);padding-block:clamp(16px,3vw,27px);scroll-margin-block-start:16px}
.chapter h2{font-size:clamp(1.6rem,3vw,2.35rem);font-weight:400;line-height:1.1;letter-spacing:-.026em;text-wrap:balance;margin:0 0 12px}
.chapter>p{max-width:72ch;font-size:clamp(1.05rem,1.5vw,1.18rem);line-height:1.72;color:#d1d6cd}
.chapter>p+p{margin-top:1em}
.chapter strong{font-weight:690;color:#f1ecdb}
.chapter figure{margin:22px 0}
.chapter figure img{width:100%;height:auto;aspect-ratio:auto 16/9;display:block;background:#182326}
.chapter figcaption{padding:9px 0 0;color:var(--book-muted);font-size:.9rem;line-height:1.5}
.story-text{padding-block-start:0;border-top:0}
.story-toc{margin:0 0 24px;padding-block:8px;border-block:1px solid var(--book-line);color:var(--book-muted)}
.story-toc summary{color:var(--book-accent);cursor:pointer;font-weight:630}
.story-toc a:hover{color:var(--book-accent)}
.story-toc ol{padding-inline-start:1.7em;margin-block:6px 0}
.book-moved-link{display:none}
.book-moved-link:target{display:block;color:var(--book-accent);text-decoration:underline;padding-block:10px}
.story-cards{list-style:none;margin:1.5rem 0 0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(10px,2vw,20px)}
.story-cards a{display:flex;flex-direction:column;height:100%;border:1px solid var(--book-line);background:#172020}
.story-cards a:is(:hover,:focus-visible){border-color:var(--book-accent);color:var(--book-accent)}
.story-cards img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover}
.story-cards span{padding:.7rem .85rem;font:400 clamp(1rem,2vw,1.3rem)/1.25 Georgia,'Times New Roman',serif;overflow-wrap:anywhere}

.book-footer{background:#0b1112;border-block-start:1px solid var(--book-line)}
.book-footer-inner{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px clamp(20px,4vw,48px);padding-block:20px}
.book-footer .book-brand{font-size:1.1rem;justify-self:start}
.book-footer .book-brand img{width:27px;height:27px}
.book-footer-links{display:flex;align-items:center;flex-wrap:wrap;gap:8px clamp(14px,2.5vw,26px);font-size:.92rem;color:var(--book-muted)}
.book-footer-links a{padding-block:6px}
.book-footer-links a:hover{color:var(--book-accent)}
.book-footer-links .book-footer-play{padding-inline:12px;border:1px solid var(--book-line);border-radius:3px;color:var(--book-accent)}
.book-footer-play:hover{border-color:var(--book-accent);background:#1c2524}
.book-copyright{justify-self:end;font-size:.8rem;color:var(--book-muted);white-space:nowrap}

@media(min-width:861px){
  .world-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:36px}
  #stellar-systems{grid-column:1 / -1}
}
@media(max-width:690px){
  .book-header>.book-width{min-height:58px;gap:10px}
  .book-header nav{gap:9px;font-size:.83rem;overflow-wrap:anywhere}
  .book-brand{font-size:1.1rem;gap:5px}
  .book-brand img{width:27px;height:27px}
  .world-intro{grid-template-columns:minmax(0,1fr)}
  .world-intro img{aspect-ratio:16/6}
  .story-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .book-footer-inner{grid-template-columns:1fr auto;gap:10px 14px;padding-block:16px}
  .book-footer-links{grid-column:1/-1;grid-row:2;font-size:.86rem}
  .book-copyright{grid-column:2;grid-row:1}
}
@media(max-width:375px){.book-width{padding-inline:14px}.book-header nav{gap:7px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@media print{
  .book-header,.story-toc,.book-footer{display:none}
  .reader{display:block;min-block-size:0;background:white;color:black}
  .book-page{padding:0}.book-width{max-width:none}
  .reader h1,.reader h2,.reader p,.reader figcaption,.reader strong{color:black}
  .reader h1{font-size:36pt}.opening{font-size:14pt}.chapter>p{font-size:11pt}
  .chapter h2{break-after:avoid}.chapter figure{break-inside:avoid}
}
/* Naya */
.opening{display:flow-root;font-size:clamp(1.25rem,2vw,1.55rem);line-height:1.55;font-style:italic;color:#eee6d2}
.chapter .opening-portrait{
  position:relative;
  float:inline-start;
  width:clamp(132px,32%,218px);
  margin:0;
  margin-inline-end:clamp(16px,2vw,30px);
  margin-block:.16em .65em;
  border:1px solid var(--book-line);
}
.chapter .opening-portrait img{aspect-ratio:4/5;object-fit:cover}
.chapter .opening-portrait figcaption{
  position:absolute;inset:auto 0 0;
  padding:26px 12px 9px;
  background:linear-gradient(transparent,rgba(8,14,15,.86));
  color:#fff6e4;font:600 1rem/1.25 Roboto,Arial,sans-serif;letter-spacing:.02em;
}
@media(max-width:690px){.chapter .opening-portrait{width:clamp(106px,36%,158px);margin-inline-end:16px}}

.book-anchor{display:block;height:0;scroll-margin-block-start:24px}
@media(max-width:690px){.book-anchor{scroll-margin-block-start:62px}}

/* book-glossary:start */
.reader .book-term {
  display:inline;
  margin:0;
  border:0;
  border-radius:0;
  padding:0;
  appearance:none;
  background:transparent;
  color:inherit;
  font:inherit;
  letter-spacing:inherit;
  text-align:inherit;
  text-decoration:underline dotted #ad9e82;
  text-underline-offset:.19em;
  text-decoration-thickness:1px;
  cursor:help;
}
.reader .book-term:hover,.reader .book-term:focus-visible {
  color:#f5d5ab;
  text-decoration-color:currentColor;
}
.reader .book-term:focus-visible {
  outline:2px solid var(--book-accent);
  outline-offset:2px;
}
#book-term-card {
  position:fixed;
  z-index:10;
  box-sizing:border-box;
  width:max-content;
  inline-size:min(19rem,calc(100vw - 20px));
  padding:11px 14px 13px;
  border:1px solid rgba(221,198,162,.47);
  border-radius:6px;
  background:rgba(21,31,31,.80);
  backdrop-filter:blur(7px);
  box-shadow:0 5px 22px #07101061;
  text-align:start;
  font:400 .96rem/1.45 Roboto,Arial,sans-serif;
  color:#f1eee4;
  overflow-wrap:anywhere;
}
#book-term-card[hidden]{display:none}
#book-term-card strong{display:block;color:#f4c38f;font-weight:650;margin-block-end:3px}
@media print {
  #book-term-card{display:none}
  .reader .book-term{color:inherit;text-decoration:none}
}
/* book-glossary:end */

.stellar-atlas {margin:1.4em 0; border-block:1px solid currentColor; padding:.65em 0}
.stellar-atlas summary {cursor:pointer; font-weight:600}
.stellar-atlas > div {overflow-x:auto; max-height:70vh}
.stellar-atlas table {width:100%; border-collapse:collapse; font-size:.86em; line-height:1.35}
.stellar-atlas caption {position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%)}
.stellar-atlas :is(td,th) {text-align:start; padding:.4em .6em; border-bottom:1px solid #9995}
