/*
Theme Name:   Astra Child - Starlit Reading Room
Theme URI:    https://reallyluckytranslations.com
Description:  Starlit Reading Room design, rebuilt clean from the mockup. Astra child theme for Really Lucky Translations.
Author:       Really Lucky Translations
Template:     astra
Version:      2.0.0
License:      GNU General Public License v2 or later
Text Domain:  astra-child
*/

/* ---- Fonts (local files, no Google Fonts request) ---- */
@font-face{font-family:'Nunito';font-style:normal;font-weight:200;font-display:swap;src:url('fonts/Nunito-200.woff2') format('woff2')}
/* Nunito Regular 400: the chapter text face Really picked. The theme only
   shipped the ExtraLight 200 cut, so every 400-weight request fell back to
   it and the reading text came out paper-thin. */
@font-face{font-family:'Nunito';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/Nunito-400.woff2') format('woff2')}
@font-face{font-family:'Outfit';font-style:normal;font-weight:100;font-display:swap;src:url('fonts/Outfit-100.woff2') format('woff2')}
@font-face{font-family:'BungeeShade';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/BungeeShade-400.woff2') format('woff2')}
@font-face{font-family:'Questrial';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/Questrial-400.woff2') format('woff2')}
/* Atkinson Hyperlegible: the Braille Institute's face, built to stay
   readable for low-vision readers. Offered in the story-font panel. */
@font-face{font-family:'Atkinson';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/AtkinsonHyperlegible-Regular.woff2') format('woff2')}
@font-face{font-family:'Atkinson';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/AtkinsonHyperlegible-Bold.woff2') format('woff2')}

/* ==== Starlit Reading Room (ported from mockup-a-starlit-reading-room.html) ==== */
:root{--display:'Nunito',system-ui,sans-serif; /* the mockup rendered titles in the body font; swap to 'BungeeShade','Outfit',sans-serif if you want the display font */
--gold:#CFA353;--purple:#AE62D9;--pink:#E88BC4;--radius:20px;--fs-chapter:1.125rem;
 --goldtint:var(--sk-goldtint);--golddeep:var(--sk-golddeep);--pinktint:var(--sk-pinktint);--pinkdeep:var(--sk-pinkdeep);
 --purpletint:var(--sk-purpletint);--purpledeep:var(--sk-purpledeep);--greentint:var(--sk-greentint);--greendeep:var(--sk-greendeep);--orangetint:var(--sk-orangetint);--orangedeep:var(--sk-orangedeep);--redtint:var(--sk-redtint);--reddeep:var(--sk-reddeep);--controlsbg:var(--sk-controlsbg);--headbg:var(--sk-headbg);--headings:var(--sk-headings);--rui:var(--gold);--ruitint:var(--goldtint);--ruideep:var(--golddeep)}
[data-theme="dark"]{--bg:#171126;--card:#1D1735;--card2:#2B2150;--line:rgba(207,163,83,.30);--ink:#EDE7F8;--muted:#A99BC7;--rail:#CFA353;--railink:#1D1735;--bubblebg:#2B2150;--sk-controlsbg:rgba(29,23,53,.85);--sk-headbg:rgba(23,17,38,.42);--sk-headings:#E4C37F;--sk-goldtint:rgba(207,163,83,.16);--sk-golddeep:#E4C37F;--sk-pinktint:rgba(232,139,196,.16);--sk-pinkdeep:#EFA8D3;--sk-purpletint:rgba(174,98,217,.18);--sk-purpledeep:#C893E4;--sk-greentint:rgba(140,200,130,.16);--sk-greendeep:#A9D8A0;--sk-orangetint:rgba(232,164,92,.18);--sk-orangedeep:#E8AC6B;--sk-redtint:rgba(232,138,138,.16);--sk-reddeep:#EFA0A0}
[data-theme="light"]{--bg:#F4EFFB;--card:#FFFFFF;--card2:#F1E9FA;--line:rgba(174,98,217,.28);--ink:#2A2138;--muted:#7C6E96;--rail:#AE62D9;--railink:#FFFFFF;--bubblebg:#FFFFFF;--sk-controlsbg:rgba(255,255,255,.85);--sk-headbg:rgba(244,239,251,.5);--sk-headings:#8A4BB8;--sk-goldtint:rgba(207,163,83,.18);--sk-golddeep:#9A7529;--sk-pinktint:rgba(232,139,196,.2);--sk-pinkdeep:#B24A87;--sk-purpletint:rgba(174,98,217,.14);--sk-purpledeep:#7A3FA8;--sk-greentint:rgba(122,178,108,.18);--sk-greendeep:#4E7A3F;--sk-orangetint:rgba(220,140,60,.18);--sk-orangedeep:#9C5E1C;--sk-redtint:rgba(200,80,80,.16);--sk-reddeep:#A83A3A}

/* The old purple and pink haze blobs read as random gas clouds on the
   chapter page, so both themes get a clean flat sky instead. */
[data-theme=dark] body{background:var(--bg)}
[data-theme=light] body{background:var(--bg)}
.tophead,.carousel,.grid,.footer{position:relative;z-index:1}
.l-main{font-family:'BungeeShade','Outfit',sans-serif;font-size:1.35rem;letter-spacing:.02em}
.sec-title,h1,h3,h4{font-family:'Questrial','Outfit',sans-serif;letter-spacing:.02em}
.sec-title{font-weight:400;color:var(--ink)}
/* contained, spinning carousel */
/* layout (width/margins/padding) comes from the .carousel rule further down */
.carousel .track{gap:clamp(12px,2.5vw,26px);padding:30px calc(50% - min(150px,39vw)) 34px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none}
.carousel .track::-webkit-scrollbar{display:none}
.carousel .slide{flex:0 0 min(300px,78vw);scroll-snap-align:center;will-change:opacity,transform;background:transparent;border:none;box-shadow:none;padding:20px 10px 14px}
/* the centered book is lit and slightly larger; its neighbors are dimmed */
.carousel .slide{transition:opacity .25s,transform .25s;opacity:.42;transform:scale(.9)}
.carousel .slide.cur{opacity:1;transform:scale(1)}


*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
html,body{overflow-x:clip}
body{font-family:'Nunito',system-ui,sans-serif;background:var(--bg);color:var(--ink);min-height:100vh;transition:background .3s}
button{font-family:inherit;cursor:pointer}
a{color:inherit;text-decoration:none}
/* Astra paints headings and link hovers its own dark/blue colours on the live
   site; these re-claim them so hovering lights things up gold like the pills */
a:hover,a:focus-visible{color:var(--gold)}
/* mouse clicks must not leave a focus ring; keyboard tabs still get the gold one */
.fbtn:focus:not(:focus-visible),.spinbtn:focus:not(:focus-visible),.pill:focus:not(:focus-visible),.dot:focus:not(:focus-visible){outline:none}
img{max-width:100%}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px;border-radius:6px}

/* progress */
.progress{position:fixed;top:0;left:0;right:0;height:3px;z-index:90;background:transparent}
.progress b{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--purple),var(--gold))}

/* header */
.tophead{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:14px;padding:12px clamp(16px,4vw,44px);background:transparent}
.avatar{width:56px;height:56px;border-radius:50%;border:2px solid var(--gold);flex:none;box-shadow:0 0 0 3px rgba(174,98,217,.25)}
.brandlink{display:flex;align-items:center;gap:14px;flex:none;text-decoration:none;color:inherit;border-radius:14px}
.brandlink:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.lockup{display:flex;flex-direction:column;line-height:1.04}
.l-top{font-weight:800;letter-spacing:.3em;font-size:.72rem}
.l-top .w-r{color:var(--purple)}.l-top .w-l{color:var(--gold)}
.l-main{font-family:var(--display);font-weight:400;font-size:1.55rem;background:linear-gradient(90deg,var(--purple),var(--gold));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.pills{margin-left:auto;display:flex;gap:8px;align-items:center}
.pill{height:38px;display:inline-flex;align-items:center;padding:0 16px;border-radius:999px;border:1.5px solid var(--line);background:transparent;font-weight:800;font-size:.84rem;color:var(--ink);transition:.15s}
.pill:hover,.pill:active{border-color:var(--gold);background:var(--goldtint)}
.pill:focus-visible{border-color:var(--gold);outline:2px solid var(--gold);outline-offset:2px}
.pill.pill-icon{width:38px;padding:0;justify-content:center}
.plogo{width:19px;height:19px;display:block}
[data-theme=dark] .plogo{filter:invert(1)}
.searchbtn{width:38px;height:38px;border-radius:50%;border:1.5px solid var(--gold);background:transparent;color:var(--ink);display:grid;place-items:center;padding:0}

/* sparkles */
.sparkles{position:absolute;inset:0;pointer-events:none}
.sp{position:absolute;color:var(--gold);animation:tw 4s ease-in-out infinite}
.sp1{top:2px;left:clamp(266px,29vw,330px);width:13px;height:13px}
.sp2{top:50px;left:clamp(240px,26vw,330px);width:7px;height:7px;color:var(--pink);opacity:.75;animation-delay:1.3s}
.sp3{top:14px;left:clamp(306px,38vw,470px);width:9px;height:9px;color:var(--purple);opacity:.8;animation-delay:2.2s}
.sp4{top:46px;left:clamp(354px,40vw,490px);width:9px;height:9px;color:var(--gold);opacity:.6;animation-delay:3s}
.sp5{top:7px;left:clamp(192px,21vw,252px);width:6px;height:6px;opacity:.7}
.sp6{top:64px;left:clamp(206px,22vw,264px);width:5px;height:5px;color:var(--purple);opacity:.55;animation-delay:1.8s}
.sp7{top:28px;left:clamp(234px,25vw,298px);width:5px;height:5px;color:var(--pink);opacity:.5;animation-delay:2.7s}
.sp8{top:10px;left:clamp(344px,36vw,432px);width:7px;height:7px;opacity:.7;animation-delay:.7s}
@keyframes tw{0%,100%{transform:scale(1) rotate(0deg);opacity:.85}50%{transform:scale(.7) rotate(14deg);opacity:.45}}
@media(max-width:760px){.sp2,.sp4,.sp5,.sp6,.sp7,.sp8{display:none}.sp1{top:4px;left:158px;width:11px;height:11px}.sp3{top:30px;left:180px;width:8px;height:8px}}

/* scattered star dots across the page */
.stars{position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.75;
 background-image:
  radial-gradient(1.4px 1.4px at 22% 28%,rgba(255,255,255,.7),transparent 100%),
  radial-gradient(1px 1px at 68% 12%,rgba(255,255,255,.5),transparent 100%),
  radial-gradient(1.2px 1.2px at 41% 62%,rgba(255,255,255,.4),transparent 100%),
  radial-gradient(.8px .8px at 86% 74%,rgba(255,255,255,.45),transparent 100%),
  radial-gradient(1px 1px at 9% 84%,rgba(255,255,255,.4),transparent 100%),
  radial-gradient(1.1px 1.1px at 54% 40%,rgba(255,255,255,.35),transparent 100%),
  radial-gradient(.9px .9px at 33% 8%,rgba(255,255,255,.5),transparent 100%),
  radial-gradient(1.2px 1.2px at 77% 34%,rgba(255,255,255,.4),transparent 100%),
  radial-gradient(.8px .8px at 12% 46%,rgba(255,255,255,.5),transparent 100%),
  radial-gradient(1px 1px at 62% 78%,rgba(255,255,255,.45),transparent 100%),
  radial-gradient(1.3px 1.3px at 90% 18%,rgba(255,255,255,.55),transparent 100%),
  radial-gradient(.7px .7px at 47% 90%,rgba(255,255,255,.4),transparent 100%),
  radial-gradient(1px 1px at 5% 18%,rgba(255,255,255,.45),transparent 100%),
  radial-gradient(1.1px 1.1px at 96% 58%,rgba(255,255,255,.4),transparent 100%),
  radial-gradient(1.3px 1.3px at 15% 60%,rgba(255,255,255,.5),transparent 100%),
  radial-gradient(.9px .9px at 25% 12%,rgba(207,197,224,.5),transparent 100%),
  radial-gradient(1.2px 1.2px at 49% 30%,rgba(255,255,255,.4),transparent 100%),
  radial-gradient(.8px .8px at 59% 92%,rgba(255,255,255,.45),transparent 100%),
  radial-gradient(1.1px 1.1px at 71% 66%,rgba(207,197,224,.4),transparent 100%),
  radial-gradient(1px 1px at 83% 50%,rgba(255,255,255,.5),transparent 100%),
  radial-gradient(.7px .7px at 92% 86%,rgba(255,255,255,.4),transparent 100%),
  radial-gradient(1.2px 1.2px at 37% 80%,rgba(255,255,255,.5),transparent 100%);
 background-size:340px 300px,420px 380px,380px 420px,300px 340px,460px 400px,360px 320px,
  400px 360px,320px 400px,380px 340px,420px 300px,300px 380px,440px 420px,360px 400px,400px 320px,420px 340px,380px 360px,340px 420px,440px 380px,360px 340px,400px 420px,320px 360px,420px 380px;
 background-repeat:repeat}
[data-theme=light] .stars{opacity:.55;
 background-image:
  radial-gradient(1.3px 1.3px at 22% 28%,rgba(174,98,217,.4),transparent 100%),
  radial-gradient(1px 1px at 68% 12%,rgba(207,163,83,.5),transparent 100%),
  radial-gradient(1.1px 1.1px at 41% 62%,rgba(174,98,217,.32),transparent 100%),
  radial-gradient(.8px .8px at 86% 74%,rgba(232,139,196,.4),transparent 100%),
  radial-gradient(1px 1px at 9% 84%,rgba(174,98,217,.3),transparent 100%),
  radial-gradient(1.1px 1.1px at 54% 40%,rgba(207,163,83,.35),transparent 100%),
  radial-gradient(.9px .9px at 33% 8%,rgba(174,98,217,.38),transparent 100%),
  radial-gradient(1.2px 1.2px at 77% 34%,rgba(232,139,196,.32),transparent 100%),
  radial-gradient(.8px .8px at 12% 46%,rgba(174,98,217,.35),transparent 100%),
  radial-gradient(1px 1px at 62% 78%,rgba(207,163,83,.4),transparent 100%),
  radial-gradient(1.3px 1.3px at 90% 18%,rgba(174,98,217,.42),transparent 100%),
  radial-gradient(.7px .7px at 47% 90%,rgba(232,139,196,.3),transparent 100%),
  radial-gradient(1px 1px at 5% 18%,rgba(207,163,83,.38),transparent 100%),
  radial-gradient(1.1px 1.1px at 96% 58%,rgba(174,98,217,.3),transparent 100%),
  radial-gradient(1.2px 1.2px at 15% 60%,rgba(174,98,217,.35),transparent 100%),
  radial-gradient(.9px .9px at 25% 12%,rgba(232,139,196,.4),transparent 100%),
  radial-gradient(1.1px 1.1px at 49% 30%,rgba(207,163,83,.35),transparent 100%),
  radial-gradient(.8px .8px at 59% 92%,rgba(174,98,217,.3),transparent 100%),
  radial-gradient(1px 1px at 71% 66%,rgba(232,139,196,.35),transparent 100%),
  radial-gradient(1.1px 1.1px at 83% 50%,rgba(174,98,217,.4),transparent 100%),
  radial-gradient(.7px .7px at 92% 86%,rgba(207,163,83,.3),transparent 100%),
  radial-gradient(1.2px 1.2px at 37% 80%,rgba(232,139,196,.3),transparent 100%)}
.carousel,.grid,.footer{position:relative;z-index:1}

/* carousel */
.carousel{max-width:1100px;margin:46px auto 34px;padding:0 clamp(16px,4vw,44px)}
.dotsrow{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:8px}
.spinbtn{width:34px;height:34px;box-sizing:border-box;padding:0;border-radius:50%;border:1.5px solid var(--gold);background:var(--card);color:var(--ink);font-size:1.3rem;line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.16);transition:.15s;flex:none;outline:none}
.spinbtn:focus-visible{border-color:var(--gold);outline:2px solid var(--gold);outline-offset:2px}
.spinbtn:hover{background:var(--goldtint)}
.spinbtn:disabled{opacity:.3;cursor:default}
.dots{display:flex;gap:8px;justify-content:center;margin:0}
.track{display:flex;gap:18px;overflow-x:auto;scroll-snap-type:x mandatory;padding:4px 6px 10px;scrollbar-width:thin}
.slide{flex:0 0 min(300px,78vw);scroll-snap-align:center;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:20px;display:flex;flex-direction:column;gap:12px;align-items:center;text-align:center}
.cover-s{width:150px;border-radius:10px;box-shadow:0 8px 20px rgba(0,0,0,.25)}
.cover-fake{width:150px;height:200px;border-radius:10px;display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;color:#fff;box-shadow:0 8px 20px rgba(0,0,0,.25)}
.cf2{background:linear-gradient(160deg,#5b2d86,#2a1440)}
.cf3{background:linear-gradient(160deg,#b0703f,#6d3a2c)}
.cf-star{font-size:1.6rem;color:var(--gold)}
.cf-title{font-family:var(--display);font-size:1.25rem;letter-spacing:.04em}
.cap{font-weight:700;font-size:.88rem;color:var(--ink)}
.dot{width:8px;height:8px;border-radius:50%;background:var(--line);border:none;padding:0;transition:.2s}
.shelfhead{max-width:1100px;margin:44px auto 0;padding:0 clamp(16px,4vw,44px);display:flex;flex-direction:column;align-items:center;text-align:center;gap:16px}
.shelfhead .sec-title{margin:0;font-size:clamp(1.5rem,3.2vw,2.1rem)}
.sparkrow{color:var(--gold);font-size:1rem;letter-spacing:.6em;text-indent:.6em}
.filters{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.fbtn{padding:6px 16px;border-radius:999px;border:1.5px solid var(--line);background:transparent;color:var(--ink);font-weight:800;font-size:.8rem;transition:.15s;outline:none}
.fbtn:hover{background:var(--goldtint);color:var(--gold)}
.fbtn:focus-visible{border-color:var(--gold);outline:2px solid var(--gold);outline-offset:2px}
/* Astra's own button focus/hover outline is more specific than the plain
   class rules, so these repeat it with a higher-powered selector to bury it */
button.fbtn:hover,button.fbtn:focus,button.fbtn:active{outline:none;box-shadow:none;border-color:var(--line)}
button.fbtn:hover{background:var(--goldtint);color:var(--gold);border-color:var(--gold)}
button.fbtn:focus:not(:focus-visible){outline:none!important;box-shadow:none!important}
button.fbtn:focus-visible{border-color:var(--gold);outline:2px solid var(--gold)!important;outline-offset:2px}
.fbtn.on{background:var(--purple);border-color:var(--purple);color:#fff}
.allnovels{margin-left:10px;display:inline-flex;align-items:center;gap:7px;padding:6px 18px;border-radius:999px;border:1.5px solid var(--gold);background:var(--gold);color:#1D1935;font-family:'Nunito',sans-serif;font-weight:800;font-size:.8rem;cursor:pointer;transition:.15s;text-decoration:none}
.allnovels .nv-star{font-size:.85em}
.allnovels:hover{background:var(--golddeep);border-color:var(--golddeep);color:#1D1935}
.dot.on{background:var(--gold);transform:scale(1.35)}

/* main grid */
.grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px;max-width:1100px;margin:22px auto 40px;padding:0 clamp(16px,4vw,44px);align-items:start}
.sec-title{font-family:var(--display);font-size:1.32rem;font-weight:400;margin:0 0 14px;color:var(--ink);letter-spacing:.02em}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius)}
.feature .card{display:flex;gap:22px;padding:22px;container-type:inline-size}
.feature .card>div{min-width:0}
.feature .card>a{flex:none;align-self:center}
.feature .cover{display:block;width:172px;max-width:100%;aspect-ratio:5/7;object-fit:cover;border-radius:12px;box-shadow:0 10px 24px rgba(0,0,0,.28)}
.feature h3{font-family:var(--display);font-weight:400;font-size:1.28rem;line-height:1.25;margin-bottom:8px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.feature .sum{color:var(--muted);font-size:.95rem;line-height:1.65;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tags{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.tag{padding:4px 13px;border-radius:999px;font-size:.7rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
/* tag chips wear the novel page's gold/pink/purple treatment wherever
   they appear (homepage feature card included); the classes are shared */
.tag.gold{background:var(--goldtint);color:var(--golddeep);border:1px solid var(--gold)}
.tag.pink{background:var(--pinktint);color:var(--pinkdeep);border:1px solid var(--pink)}
.tag.purple{background:var(--purpletint);color:var(--purpledeep);border:1px solid var(--purple)}
a.tag{text-decoration:none;color:inherit}
a.tag:hover{filter:brightness(1.18)}
.feature .tags{flex-wrap:nowrap;overflow:hidden;-webkit-mask-image:linear-gradient(90deg,#000 78%,transparent 97%);mask-image:linear-gradient(90deg,#000 78%,transparent 97%)}
.feature .tag{flex:none}
.chapters{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-direction:column;gap:8px}
.chapters a{display:flex;justify-content:space-between;align-items:baseline;gap:10px;padding:10px 14px;border-radius:12px;background:var(--card2);font-weight:800;font-size:.92rem;transition:.15s}
.chapters a:hover{transform:translateX(3px);color:var(--gold)}
.feature .chapters a>span:first-child{display:flex;align-items:baseline;gap:8px;min-width:0}
.feature .chapters a .ct{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.feature .chapters a .newchip{flex:none}
.feature .chapters a .meta{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;text-align:right}
.feature .chapters a .meta-star{color:var(--gold);font-weight:700}
.meta{color:var(--muted);font-weight:700;font-size:.78rem;white-space:nowrap}
.newchip{margin-left:6px;background:var(--pink);color:#fff;border-radius:999px;padding:3px 11px;font-size:.68rem;font-weight:800;letter-spacing:.03em;vertical-align:2px}

/* sidebar */
.sidecard{padding:16px 16px 14px;margin-bottom:18px}
.sidecard h4{font-family:var(--display);font-weight:400;font-size:1.05rem;color:var(--ink);margin-bottom:12px;letter-spacing:.02em}
.updates,.comments{margin:0;padding:0}
.updates{list-style:none;display:flex;flex-direction:column;gap:9px}
.updates a{display:block;padding:9px 12px;border-radius:12px;background:var(--card2)}
.updates .t{display:block;font-weight:800;font-size:.85rem;line-height:1.35}
.updates .c{display:block;font-style:italic;color:var(--muted);font-size:.8rem;margin-top:2px}
.updates .meta{font-style:normal;display:block;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.72rem}
.updates .t{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.comments .t a{display:flex;align-items:baseline;gap:4px;min-width:0;text-decoration:none}
.comments .t a .bt{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.comments .t a .meta-star,.comments .t a .cc{flex:none;white-space:nowrap}
.updates .meta-star,.comments .meta-star{color:var(--gold);font-weight:700}
.comments{list-style:none;display:flex;flex-direction:column;gap:9px}
.comments li{padding:9px 12px;border-radius:12px;background:var(--card2);font-size:.82rem;line-height:1.5}
.comments .t{display:block;font-weight:800;margin-bottom:2px}
.comments .t .by{display:block;font-weight:600;font-size:.85em;color:var(--muted)}
.comments .c{color:var(--muted);font-style:italic}

/* footer */
.footer{max-width:1100px;margin:0 auto;padding:28px clamp(16px,4vw,44px) 40px;text-align:center;color:var(--muted);font-size:.85rem;border-top:1px solid var(--line)}

/* chapter page */
/* The fixed star layer paints above content without its own stacking
   context, so the chapter view is lifted above it: stars stay in the
   sky around the reading window and never drift over the story text. */
.view-chapter{position:relative;z-index:1}
.chapter-box{font-size:var(--fs-chapter);/* Width in rem, not em: the column
   stays the same width when the A+/A- buttons change the font size,
   so the lines rewrap under the reader instead of the whole column
   growing and shuffling their place around. */max-width:calc(44rem + 110px);margin:30px auto 90px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 10px 26px rgba(0,0,0,.14)}
/* Google Docs paste leaves font-size:16px spans in chapter text; the reader's
   A+/A- slider must win over them or those paragraphs never scale. */
.chapter-box [style*="font-size"]{font-size:inherit !important}
/* The three pieces hug the middle as one centered cluster. Tops align,
   and since the title box is exactly as tall as the arrows, the whole
   row reads as one line. */
.chapter-head{display:flex;justify-content:center;align-items:flex-start;gap:clamp(14px,3.5vw,30px);margin:0;padding:30px clamp(16px,4vw,44px) 6px}
/* Round chapter-arrow buttons center their SVG chevron with a grid, so
   the arrow sits in the middle of the circle instead of its top-left. */
.navbtn{width:52px;height:52px;box-sizing:border-box;padding:0;border-radius:50%;border:1.5px solid var(--rui);font-size:1.15rem;font-weight:800;color:var(--rui);background:var(--card);flex:none;transition:.15s;display:grid;place-items:center}
.navbtn:hover{background:var(--ruitint)}
.chapter-head .inner{flex:0 1 auto;min-width:0;text-align:center;position:relative}
.chapter-head h1{margin:0;/* flex so the title button sits flush at the top of the h1's line box, in line with the arrows */display:flex;justify-content:center}
/* The title is the chapter menu trigger: a soft gold box around it makes
   it read as a button, the stacked triangles are the only other hint.
   One line, exactly as tall as the prev/next arrows, long titles
   truncate with an ellipsis. */
.chtitle{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;gap:8px;height:52px;padding:0 22px;/* Wider than its text so the button reads as a control, and the little arrows get a far-right edge to sit on. */min-width:min(260px,70vw);max-width:100%;font-family:var(--display);font-weight:400;font-size:clamp(1.05rem,2.6vw,1.35rem);line-height:1;color:var(--ink);background:none;border:1px solid var(--rui);border-radius:16px;white-space:nowrap;overflow:hidden;transition:border-color .25s,color .25s}
.chtitle:hover,.chtitle:focus,.chtitle:active,.chtitle:focus-visible{background:none;color:var(--rui);box-shadow:none;border-color:var(--rui);outline:none}
/* Keyboard users still get a visible ring, just a gold one, never Astra's blue. */
.chtitle:focus-visible{outline:2px solid var(--rui);outline-offset:4px}
.chtitle .t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.chtitle .chev{flex:none;display:inline-flex;flex-direction:column;gap:3px;line-height:0}
.chtitle .chev svg{display:block}
.chtitle .chev .up{color:var(--muted);transition:color .25s}
.chtitle .chev .down{color:var(--rui);transition:color .25s}
.chtitle[aria-expanded="true"] .chev .up{color:var(--rui)}
.chtitle[aria-expanded="true"] .chev .down{color:var(--muted)}
.chtitle:focus-visible{outline:2px solid var(--rui);outline-offset:4px;border-radius:6px}
/* The chapter index menu: a card that drops from under the title on desktop,
   slides up from the bottom edge as a sheet on phones. Hidden until the title
   button opens it. */
.sheetback{display:none}
.grab{display:none}
.chmenu{position:absolute;top:calc(100% + 10px);left:50%;transform:translateX(-50%);width:min(430px,86vw);z-index:40;background:var(--card);border:1px solid var(--rui);border-radius:16px;box-shadow:0 18px 44px rgba(0,0,0,.45);display:none;overflow:hidden}
.chmenu.open{display:block;animation:chdrop .18s ease-out}
@keyframes chdrop{from{opacity:0;transform:translateX(-50%) translateY(-6px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}
.menusearch{position:relative;border-bottom:1px solid var(--line)}
.menusearch input{width:100%;background:var(--input);color:var(--ink);border:none;padding:13px 42px 13px 40px;font-family:inherit;font-size:.95rem}
.menusearch input:focus{outline:2px solid var(--gold);outline-offset:-2px}
.menusearch .mag{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:.95rem}
.menusearch .closebtn{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:none;border:none;color:var(--muted);cursor:pointer;font-size:1.15rem;padding:6px;line-height:1;border-radius:8px}
.menusearch .closebtn:hover{color:var(--gold)}
.chlist{list-style:none;margin:0;padding:8px;max-height:min(46vh,340px);overflow-y:auto;display:flex;flex-direction:column;gap:8px}
.chlist::-webkit-scrollbar{width:8px}
.chlist::-webkit-scrollbar-thumb{background:var(--card2);border-radius:8px}
.chlist li{/* Kill the theme's default list-item indent: with painted card rows
   it shows up as a wide empty gutter on the left of the menu. */margin:0;padding:0;min-width:0}
.chlist a{/* The novel page's defined chapter card, carried over whole: lighter
   card fill (the panel itself is --card, so the rows take --card2 to read as
   separate rounded tiles), quiet border that turns gold on hover, then star,
   name, gold number and the NEW bubble. Flex order (not markup order) sets
   the run. */display:flex;align-items:baseline;gap:10px;padding:10px 14px;border:1.5px solid transparent;border-radius:12px;background:var(--card2);font-weight:800;text-decoration:none;color:var(--ink);font-size:.92rem}
.chlist a:hover{border-color:var(--rui);color:var(--rui);transform:translateX(3px)}
.chlist a:focus-visible{outline:2px solid var(--rui);outline-offset:-2px}
.chlist .spark{order:1;flex:none;color:var(--golddeep);font-size:.95rem}
.chlist .t{order:2;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chlist .n{order:3;flex:none;color:var(--golddeep);font-size:.85rem;font-variant-numeric:tabular-nums}
.chlist .newchip{order:4;flex:none;margin-left:0}
.chlist li.here a{border-color:var(--rui);background:var(--ruitint);color:var(--rui)}
.chlist li.chgroup{/* Group headings (worlds / arcs) inside the index: quiet small
   caps in gold, the same labels the novel page shows. The ungrouped
   run reads "Chapters" in the muted ink. */padding:12px 6px 0;font-family:'Questrial','Outfit',sans-serif;
   font-weight:400;font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--gold)}
.chlist li.chgroup.ungrouped{color:var(--muted);letter-spacing:.1em}
.menufoot{border-top:1px solid var(--line);padding:10px 14px;text-align:center}
.menufoot a{color:var(--purpledeep);text-decoration:none;font-size:.85rem}
.menufoot a:hover{color:var(--gold)}
.menufoot .fs{color:var(--golddeep);font-size:.9rem}
/* Phones: the menu becomes a bottom sheet rising from the edge, with the
   grab handle and dimmed backdrop behind it, and the whole head row shrinks. */
@media (max-width:640px){
  .chapter-head{gap:12px;padding:22px 14px 4px}
  .navbtn{width:38px;height:38px;font-size:1rem}
  .chtitle{height:38px;padding:0 12px;border-radius:12px;gap:6px;font-size:.95rem}
  .chtitle .chev svg{width:9px;height:12px}
  .chapter-head .novel{font-size:.85rem}
  .bodytitle{font-size:1.5rem}
  .grab{display:block;width:44px;height:4px;border-radius:4px;background:var(--line);margin:10px auto 2px}
  .sheetback.open{display:block;position:fixed;inset:0;background:rgba(11,8,23,.6);z-index:39}
  .chmenu{position:fixed;left:0;right:0;bottom:0;top:auto;transform:none;width:auto;border-radius:22px 22px 0 0;border-bottom:none;box-shadow:0 -14px 40px rgba(0,0,0,.5)}
  .chmenu.open{animation:chrise .22s ease-out}
  @keyframes chrise{from{transform:translateY(40px);opacity:0}to{transform:translateY(0);opacity:1}}
}
.chapter-head .novel{font-style:italic;color:var(--muted);text-align:center;margin-top:5px;font-size:.95rem}
/* The title, novel link and arrows set their colors directly: Astra's
   global link and heading rules would otherwise paint them dark on the
   dark sky, and a rule inherited from the container loses to Astra's
   own link color. */
.chapter-head .novel a{color:var(--muted)}
a.navbtn,span.navbtn,a.navbtn:visited{color:var(--rui)}
/* No chapter on this side means no button at all: the placeholder slot
   stays in the grid (so the title keeps its exact center) but is
   invisible, not a quiet circle. */
span.navbtn.off{visibility:hidden}
/* The story font the Aa panel sets. Only this article reads
   --storyfont: the headings below carry their own Questrial rule, and
   the note windows and comments live outside the article, so they all
   keep their own faces whatever the reader picks. */
/* The in-page chapter title and the divider under it. The title comes
   from its own box on the chapter screen, so the menus keep the short
   name while the reading page can show something longer. The divider
   line is the same dull gold as the window borders and always shows:
   with no in-page title the spacing above it is dropped, so it sits
   snug under the chapter buttons with just a little padding. */
.bodyhead{margin:0 auto;padding:0 clamp(24px,4.5vw,50px)}
.bodyhead .hbar{height:1px;border-radius:1px;background:var(--line);margin:0 0 1.6em}
.bodyhead.empty{padding-top:14px}
.bodytitle{font-family:'Questrial','Outfit',sans-serif;color:var(--ink);font-weight:400;text-align:center;font-size:1.8rem;line-height:1.35;margin:1.5em 0 1em}
article.chapter{font-family:var(--storyfont);margin:0 auto;padding:0 clamp(24px,4.5vw,50px) 44px;line-height:1.95}
article.chapter p{margin:0 0 1.5em}

/* footnote bubble */
.fn{position:relative;color:var(--ink);font-weight:inherit;cursor:pointer;border-bottom:2px dotted rgba(207,163,83,.55)}
.fn .bubble{display:none;position:absolute;bottom:calc(100% + 13px);left:50%;transform:translateX(calc(-50% + var(--fn-nudge,0px)));width:max-content;max-width:min(272px,calc(100vw - 24px));background:var(--card);color:var(--ink);border:1.5px solid rgba(207,163,83,.55);border-radius:14px;padding:12px 14px;font-size:.84rem;font-weight:600;font-style:normal;line-height:1.55;z-index:60;box-shadow:0 10px 26px rgba(0,0,0,.3);cursor:default}
.fn .bubble::after{content:'';position:absolute;top:100%;left:50%;width:14px;height:14px;transform:translateX(-50%) translateY(-7px) rotate(45deg);background:var(--card);border-right:1.5px solid rgba(207,163,83,.55);border-bottom:1.5px solid rgba(207,163,83,.55)}
.fn.open .bubble,.fn:hover .bubble,.fn:focus .bubble{display:block}
.fn .bstars{position:absolute;top:-11px;left:-11px;pointer-events:none;line-height:1}
.fn .bstars::before{content:'\2726';position:absolute;top:0;left:0;color:var(--gold);font-size:15px;text-shadow:0 1px 3px rgba(0,0,0,.2)}
.fn .bstars::after{content:'\2726';position:absolute;top:12px;left:14px;color:var(--pink);font-size:8px}
/* a note can carry a picture (picked from the media library); it fits
   the bubble instead of spilling out of it */
.fn .bubble img{max-width:100%;height:auto;display:block;margin:8px 0 3px;border-radius:10px}
/* Pictures in a footnote: the layout follows the count, nothing to
   configure. One picture sits beside the text (shrinking with the
   bubble so it can never come out giant); two or three line up in a
   row underneath. An image bubble stretches wide — screen width with
   a little clearance, capped at the chapter column on desktop — and
   if it would poke off the top of the screen, reading.js flips it to
   open downward instead (.fn.below). Tapping a picture opens it
   full-screen (the lightbox at the bottom of this file). */
.fn .bubble.fnimg1,.fn .bubble.fnimg2,.fn .bubble.fnimg3{width:min(calc(100vw - 24px),704px);max-width:none}
.fn .bubble .bubnote{display:block}
.fn .bubble .bubflex{display:flex;gap:14px;align-items:center}
.fn .bubble .bubflex .bubnote{flex:1 1 auto}
.fn .bubble .bubflex .bubpic{flex:0 0 auto;width:34%;max-width:190px;aspect-ratio:3/4}
.fn .bubble .bubrow{display:flex;gap:10px;margin-top:10px}
.fn .bubble .bubrow .bubpic{flex:1 1 0;aspect-ratio:3/4;max-height:210px}
.fn .bubble .bubpic{overflow:hidden}
.fn .bubble .bubpic img{width:100%;height:100%;object-fit:cover;border:1px solid rgba(207,163,83,.45);border-radius:8px;display:block;margin:0;cursor:zoom-in}
/* the bubble's tail slides along its edge to point at the term
   (--fn-tail is set by reading.js) and the whole bubble flips below
   the term when there is no room above it */
.fn .bubble::after{left:calc(50% + var(--fn-tail,0px))}
.fn.below .bubble{bottom:auto;top:calc(100% + 13px)}
.fn.below .bubble::after{top:auto;bottom:100%;transform:translateX(-50%) translateY(7px) rotate(45deg);border-right:none;border-bottom:none;border-left:1.5px solid rgba(207,163,83,.55);border-top:1.5px solid rgba(207,163,83,.55)}
/* phones: the clearance tightens a touch and the pictures shrink */
@media (max-width:600px){
.fn .bubble.fnimg1,.fn .bubble.fnimg2,.fn .bubble.fnimg3{width:calc(100vw - 16px)}
.fn .bubble .bubflex .bubpic{max-width:130px}
.fn .bubble .bubrow .bubpic{max-height:150px}
}
/* tap a footnote picture and it covers the screen, scaled to fit,
   so nothing gets cut off; tap anywhere to close */
.fnlightbox{display:none;position:fixed;inset:0;z-index:999;background:rgba(13,9,32,.92);align-items:center;justify-content:center;padding:20px;cursor:zoom-out}
.fnlightbox.open{display:flex}
.fnlightbox img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border:1px solid rgba(207,163,83,.45);border-radius:6px}
[data-theme=light] .navbtn{background:var(--card)}

/* floating rail: collapsed to the hamburger until tapped; the tools
   unfold out of it, and the painter's palette opens the color tool.
   The gold ring follows the reader's ink once they go rogue. */
.rail{position:fixed;right:18px;bottom:97px;display:flex;flex-direction:column;align-items:flex-end;gap:11px;z-index:55}
.railfold{display:grid;grid-template-rows:0fr;opacity:0;visibility:hidden;transition:grid-template-rows .25s ease,opacity .2s ease,visibility 0s .25s}
.rail.open .railfold{grid-template-rows:1fr;opacity:1;visibility:visible;transition:grid-template-rows .25s ease,opacity .2s ease}
.railfold-inner{overflow:hidden;min-height:0;display:flex;flex-direction:column;align-items:flex-end;gap:11px;padding:8px;margin:-8px}
.rail .railbtn,.totop{box-sizing:border-box;padding:0;width:52px;height:52px;border-radius:50%;border:1px solid var(--rui);background:var(--card);color:var(--rui);font-weight:800;font-size:1rem;box-shadow:0 5px 16px rgba(0,0,0,.3);transition:.15s;display:grid;place-items:center;text-decoration:none;line-height:1}
.rail .railbtn:hover,.totop:hover{transform:scale(1.07);background:var(--ruitint)}
/* the reader-color tool: unfolds upward out of the palette button */
.picker{position:fixed;right:82px;bottom:34px;width:min(320px,calc(100vw - 110px));z-index:56;display:grid;grid-template-rows:0fr;opacity:0;visibility:hidden;transition:grid-template-rows .28s ease,opacity .2s ease,visibility 0s .28s}
.picker.open{grid-template-rows:1fr;opacity:1;visibility:visible;transition:grid-template-rows .28s ease,opacity .2s ease}
.picker-inner{overflow:hidden;min-height:0}
.picker-card{background:var(--card);border:1px solid var(--rui);border-radius:16px;box-shadow:0 14px 34px rgba(0,0,0,.4);padding:16px 16px 12px}
.picker-card h3{font-family:var(--display);font-weight:400;font-size:.98rem;letter-spacing:.06em;text-transform:uppercase;color:var(--rui);margin:0 0 2px}
.picker-card .sub{color:var(--ink);opacity:.6;font-size:.78rem;margin:0 0 12px}
.colorgroup{margin-bottom:12px}
.colorgroup .cgname{display:flex;align-items:center;justify-content:space-between;font-size:.8rem;color:var(--ink);opacity:.85;margin-bottom:6px}
.colorgroup .cgname .hex{font-variant-numeric:tabular-nums;opacity:.6;font-size:.75rem}
.sliderrow{display:flex;align-items:center;gap:8px;margin-bottom:5px}
.sliderrow .ch{flex:none;width:40px;text-align:left;font-size:.72rem;color:var(--ink);opacity:.7}
.sliderrow input[type="range"]{flex:1;height:14px;appearance:none;-webkit-appearance:none;background:transparent;cursor:pointer;padding:0;margin:0}
.sliderrow input[type="range"]::-webkit-slider-runnable-track{height:8px;border-radius:8px;background:var(--track)}
.sliderrow input[type="range"]::-moz-range-track{height:8px;border-radius:8px;background:var(--track)}
.sliderrow input[type="range"]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:16px;height:16px;border-radius:50%;margin-top:-4px;background:var(--card);border:2px solid var(--rui)}
.sliderrow input[type="range"]::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:var(--card);border:2px solid var(--rui)}
.pickerfoot{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:9px;margin-top:2px}
.pickerfoot .note{font-size:.72rem;color:var(--ink);opacity:.55}
.resetbtn{appearance:none;-webkit-appearance:none;background:none;border:none;box-shadow:none;padding:0;cursor:pointer;font-family:inherit;font-size:.75rem;font-weight:800;color:var(--ink);transition:color .15s}
.resetbtn:hover,.resetbtn:focus-visible{color:var(--rui);outline:none}

/* ==== Story font tool ====
   Unfolds out of the Aa button, exactly like the color tool. The whole
   choice lands on one variable, --storyfont, and only the chapter body
   reads it, so headings, the reading rail, note windows and comments
   keep their own faces whatever the reader picks. */
:root{--storyfont:'Nunito',system-ui,sans-serif}
.fontpanel{position:fixed;right:82px;bottom:34px;width:min(320px,calc(100vw - 110px));z-index:56;display:grid;grid-template-rows:0fr;opacity:0;visibility:hidden;transition:grid-template-rows .28s ease,opacity .2s ease,visibility 0s .28s}
.fontpanel.open{grid-template-rows:1fr;opacity:1;visibility:visible;transition:grid-template-rows .28s ease,opacity .2s ease}
.fontpanel-inner{overflow:hidden;min-height:0}
.fontcard{background:var(--card);border:1px solid var(--rui);border-radius:16px;box-shadow:0 14px 34px rgba(0,0,0,.4);padding:16px 16px 12px}
.fontcard h3{font-family:var(--display);font-weight:400;font-size:.98rem;letter-spacing:.06em;text-transform:uppercase;color:var(--rui);margin:0 0 2px}
.fontcard .sub{color:var(--ink);opacity:.6;font-size:.78rem;margin:0 0 12px}
.fontlist{display:flex;flex-direction:column;gap:6px}
.fontrow{appearance:none;-webkit-appearance:none;box-sizing:border-box;cursor:pointer;display:flex;align-items:baseline;gap:10px;border:1px solid transparent;border-radius:12px;background:var(--bg);padding:9px 12px 7px;font-family:inherit;color:var(--ink);transition:border-color .15s,background .15s}
.fontrow:hover{border-color:var(--rui)}
.fontrow:focus-visible{outline:2px solid var(--rui);outline-offset:2px}
.fontrow.on{border-color:var(--rui);background:var(--ruitint)}
.fontrow .fsample{order:1;min-width:0;font-size:1.02rem;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fontrow .fname{order:2;flex:none;font-size:.72rem;opacity:.65;letter-spacing:.02em}
.fontrow .tick{order:3;flex:none;font-size:.85rem;color:var(--rui);visibility:hidden}
.fontrow.on .tick{visibility:visible}
/* Phones flash a blue rectangle under the finger on every tap (the
   browser's default highlight). The rows and rail buttons already
   answer with their own gold, so the browser's blue is just noise. */
.fontrow,.rail button,.totop,.resetbtn{-webkit-tap-highlight-color:transparent}
.fontfoot{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:9px;margin-top:12px}
.fontfoot .note{font-size:.72rem;color:var(--ink);opacity:.55}


@media(max-width:920px){
 .grid{grid-template-columns:minmax(0,1fr)}
 .pills .pill{padding:6px 11px;font-size:.76rem}
}
/* Middle widths: the sidebar stays beside the featured card (the approved
   arrangement) but slims down so the card still fits its approved layout. */
@media(min-width:921px) and (max-width:960px){
 .grid{grid-template-columns:minmax(0,1fr) 240px;gap:18px}
 .feature .cover{width:124px}
 .feature .chapters a{gap:8px;padding-left:8px;padding-right:8px}
 .feature .chapters a>span:first-child{gap:6px}
 .feature .chapters a .meta{font-size:.73rem}
 .newchip{padding:3px 8px}
}
/* Slightly wider windows once there is room: the featured card is trimmed just
   enough to keep its views/words/date line whole while the side windows gain. */
@media(min-width:961px) and (max-width:1080px){
 .grid{grid-template-columns:minmax(0,1fr) 280px;gap:18px}
 .feature .cover{width:124px}
 .feature .chapters a{gap:8px;padding-left:8px;padding-right:8px}
 .feature .chapters a>span:first-child{gap:6px}
 .feature .chapters a .meta{font-size:.73rem}
 .newchip{padding:3px 8px}
}
@media(min-width:641px) and (max-width:720px){
 .feature .cover{width:148px}
 .feature .card{gap:14px}
 .feature .chapters a .meta{font-size:.75rem}
}
@media(max-width:640px){
 .avatar{width:46px;height:46px}
 .l-main{font-size:1.05rem}
 .feature .card>a{align-self:center}
 .l-top{letter-spacing:.2em}
 .feature .card{flex-direction:column}
 .feature .cover{width:140px}
 .tophead{flex-wrap:nowrap;gap:10px}
 .pills{gap:7px;margin-left:auto;flex-wrap:nowrap}
 .pills a.pill{display:none}
 .pills .menuBtn{display:inline-flex}
 .pills .pill,.pills .searchbtn,.pills .themeBtn{height:34px}
 .pills .pill.pill-icon,.pills .searchbtn,.pills .themeBtn{width:34px}
 .pills .pill{padding:0 12px;font-size:.78rem;white-space:nowrap}
 .menupanel{top:58px;right:10px}
 .spinbtn{display:none}
 .dotsrow{gap:10px;margin-top:2px}
 .rail{right:12px;bottom:72px;gap:10px}
 .rail .railbtn,.totop{width:46px;height:46px}
 .railfold-inner{gap:10px}
 .picker,.fontpanel{right:66px;bottom:16px;width:min(300px,calc(100vw - 96px))}
 .controls{bottom:70px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ==== WordPress bits ==== */

/* Accessible skip link (screen readers, keyboard users) */
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);white-space:nowrap}
.skip-link:focus{position:fixed!important;top:8px;left:8px;width:auto;height:auto;clip:auto;clip-path:none;z-index:100;background:var(--card);color:var(--ink);padding:10px 16px;border-radius:999px;border:1.5px solid var(--gold);font-weight:800}

/* Content inside chapters: links and inline images get the room's palette */
article.chapter a{color:var(--purple);border-bottom:1px solid var(--line)}
article.chapter a:hover{color:var(--golddeep)}
article.chapter img{border-radius:12px}
article.chapter h2,article.chapter h3{font-family:'Questrial','Outfit',sans-serif;color:var(--ink);font-weight:400;margin:1.6em 0 .6em}
/* In-content headings read as body text, not gold: the reader is here
   for the story, and every word of it should be easy to read. */
article.chapter blockquote{border-left:3px solid var(--gold);margin:1.4em 0;padding:.2em 0 .2em 1.2em;color:var(--muted);font-style:italic}

/* Search overlay (opened by the header's round search button) */
.searchover{position:fixed;inset:0;z-index:95;display:none;align-items:flex-start;justify-content:center;background:rgba(10,6,20,.55);backdrop-filter:blur(6px);padding-top:18vh}
.searchover.open{display:flex}
.searchover form{display:flex;gap:8px;background:var(--card);border:1.5px solid var(--gold);border-radius:999px;padding:8px 8px 8px 22px;box-shadow:0 18px 50px rgba(0,0,0,.45)}
.searchover input{background:transparent;border:none;outline:none;color:var(--ink);font-weight:700;font-size:1rem;width:min(46vw,320px)}
.searchover button{border:1.5px solid var(--gold);background:var(--gold);color:#241b33;border-radius:999px;padding:8px 18px;font-weight:800}

/* Astra's own page containers can add widths/margins we don't want */
.ast-container{max-width:100%!important;padding-left:0!important;padding-right:0!important}

/* Theme toggle button in the header pills */
.themeBtn{width:38px;height:38px;border-radius:50%;border:1.5px solid var(--gold);background:transparent;color:var(--ink);font-size:1rem;display:grid;place-items:center;padding:0}
.themeBtn:hover{border-color:var(--gold)}
/* compact menu: hamburger + dropdown, narrow screens only */
.menuBtn{display:none}
.menuBtn svg{display:block}
.menupanel{display:none;position:fixed;top:66px;right:14px;z-index:60;flex-direction:column;gap:2px;min-width:170px;background:var(--card);border:1.5px solid var(--gold);border-radius:16px;padding:10px;box-shadow:0 14px 34px rgba(0,0,0,.35)}
.menupanel.open{display:flex}
.menupanel a{padding:10px 14px;border-radius:10px;color:var(--ink);font-weight:800;font-size:.9rem;text-decoration:none}
.menupanel a:hover{background:var(--goldtint)}

/* menu + carousel buttons share the card border colour; gold lights up on hover or tap */
.menuBtn,.searchbtn,.themeBtn,.spinbtn{border-color:var(--line)}
.menuBtn:hover,.menuBtn:active,.searchbtn:hover,.searchbtn:active,.themeBtn:hover,.themeBtn:active,.spinbtn:hover,.spinbtn:active{border-color:var(--gold);background:var(--goldtint)}
.menuBtn:focus-visible,.searchbtn:focus-visible,.themeBtn:focus-visible,.spinbtn:focus-visible{border-color:var(--gold);outline:2px solid var(--gold);outline-offset:2px}
/* Astra's own stylesheet paints bare <button>s white-on-blue on :focus and
   :hover, and the little carousel dots have no defence of their own. These
   rules keep the round controls in the room's palette in every state; pointer
   focus stays quiet, keyboard focus keeps the gold ring via :focus-visible. */
.menuBtn:focus:not(:focus-visible),.searchbtn:focus:not(:focus-visible),.themeBtn:focus:not(:focus-visible),.spinbtn:focus:not(:focus-visible){border-color:var(--gold);background:var(--goldtint);color:var(--ink);outline:none}
.dot:hover,.dot:focus{background:var(--gold);color:var(--ink);outline:none}

/* Category/archive pages (All Novels etc.) share the room's cards */
.archive .ast-archive-description,.archive .page-title{color:var(--headings)}
.archive article,.category article{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:20px;margin-bottom:18px}
.archive article a,.category article a{color:var(--ink);font-weight:800}
.archive article a:hover,.category article a:hover{color:var(--golddeep)}

/* Featured novel card: reacts to its own width (container query) */
@container (max-width:520px){
.feature .chapters li:nth-child(3){display:none}
.feature .cover{width:104px}
.feature h3{font-size:1.05rem}
.feature .tag{font-size:.62rem;padding:3px 9px}
.feature .chapters a{padding:8px 12px;font-size:.85rem;gap:8px}
.feature .chapters a .meta{font-size:.72rem}
.feature .chapters a .meta-extra,.feature .chapters a .meta-star{display:none}
.feature .meta{font-size:.74rem;white-space:nowrap}
.feature .meta .meta-star{font-size:.9em}
}

/* Print guard: on paper, the chapter text is replaced by an invitation.
   Screen readers and normal reading are untouched; this only speaks to
   the printer. The note itself is hidden on screen unless the Ctrl+P
   toast shows it. */
.print-note{display:none}
@media print{
  .chapter-box,.rail,.totop,.menupanel,.searchover,.themeBtn,.spinbtn{display:none!important}
  .print-note{display:block;font-size:14pt;line-height:1.6;color:#000;border:2px solid #000;border-radius:12px;padding:24px;margin:40px 0}
}
.print-note.print-toast{display:block;position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--card);border:1.5px solid var(--gold);color:var(--ink);font-weight:700;font-size:.95rem;padding:12px 20px;border-radius:14px;box-shadow:0 14px 34px rgba(0,0,0,.35);z-index:999;max-width:min(90vw,480px);text-align:center}


/* ==== Note windows + the Ko-fi stamp (ported from notes-and-kofi-banner-mockup.html) ==== */

/* The chapter box hands its bottom spacing over to whatever follows:
   note windows sit 26px under it, and the stamp floats 90px under the
   last thing above it, whether that is the chapter or a note window. */
.view-chapter .chapter-box{margin-bottom:0}

/* Author's / Translator's note windows, hidden when their field is empty */
.notewindow{
  font-size:var(--fs-chapter); max-width:calc(44rem + 110px); margin:26px auto 0;
  background:var(--card); border:1px solid var(--line);
  border-radius:20px; box-shadow:0 10px 26px rgba(0,0,0,.14);
  padding:24px clamp(16px,4vw,40px) 26px;
}
.notewindow h3{
  font-family:'Questrial','Outfit','Segoe UI',sans-serif; font-weight:400;
  font-size:1.18rem; letter-spacing:.02em; margin-bottom:14px;
  display:flex; align-items:center; gap:9px;
}
.notewindow h3 .spark{font-size:.9em}
.note-author h3{color:var(--purpledeep)}
.note-author h3 .spark{color:var(--gold)}
.note-translator h3{color:var(--pinkdeep)}
.note-translator h3 .spark{color:var(--pink)}
.notewindow .notebody{font-size:1.02rem; line-height:1.75; color:#DDD2F0}
[data-theme="light"] .notewindow .notebody{color:var(--ink)}
.notewindow .notebody p{margin-bottom:.9em}
.notewindow .notebody p:last-child{margin-bottom:0}

/* bottom repeat of the top row: page back, chapter menu, page forward,
   sitting between the note windows and the Ko-fi stamp. Same buttons as
   the head, so both rows always match each other; a missing chapter
   hides its button, the same quiet-vanish rule as up top. */
.endrow{
  display:flex; justify-content:center; align-items:center; gap:12px;
  margin:34px auto 0; padding:0 6px;
}
.endrow .chtitle{min-width:min(260px,64vw)}
/* the menu opened from the bottom row centers itself in the viewport on
   desktop: its default drop sits under the top title, which is scrolled
   away when the reader clicks the bottom button from the end of a long
   chapter. On phones the sheet already slides from the bottom edge. */
@media (min-width:641px){
  .chmenu.from-bottom{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);animation:chcenter .18s ease-out}
  @keyframes chcenter{from{opacity:0;transform:translate(-50%,-50%) translateY(6px)}to{opacity:1;transform:translate(-50%,-50%)}}
}

/* recurring Ko-fi moment: a rounded-rectangle stamp floating on the
   starfield under every chapter, mug in the middle and the lines
   around it. The whole frame is the link: the anchor wraps the entire
   svg, so pressing anywhere inside the rectangle opens the Ko-fi page */
.kofi-float{margin:90px auto 30px; text-align:center}
/* when a note window sits above the stamp, pull the stamp in closer:
   the chapter's own gap is generous, a note's should be snug */
.notewindow + .kofi-float{margin-top:44px}
/* when the new button row sits between a note and the stamp, give the
   row the same breathing room below it as the head has before the text
   (about 47px up top), so the page rhythm matches top and bottom */
.endrow + .kofi-float{margin-top:44px}
.kofi-float .kofi-stamp{
  display:block; margin:0 auto; width:300px; height:auto; overflow:visible;
  filter:drop-shadow(0 10px 22px rgba(0,0,0,.35));
}
/* the whole-frame button: pointer cursor over every part of the frame
   and a small lift on hover, nothing more. Really asked for the plain
   hover, so the frame and the letters keep their resting colours */
.kofi-float .kofi-stamp-link{
  display:inline-block; cursor:pointer; text-decoration:none;
  transition:transform .15s;
}
.kofi-float .kofi-stamp-link:hover{transform:translateY(-3px)}
.kofi-float .kofi-stamp .ring1{fill:var(--card); stroke:var(--gold); stroke-width:1.5}
.kofi-float .kofi-stamp .ring2{fill:none; stroke:var(--gold); stroke-width:1; opacity:.5}
.kofi-float .kofi-stamp text{
  font-family:'Questrial','Outfit','Segoe UI',sans-serif; font-weight:700;
  fill:var(--gold); letter-spacing:.08em;
}
.kofi-float .kofi-stamp .topline{font-size:14.5px}
.kofi-float .kofi-stamp .bottomline{font-size:12px}
/* the bottom line steps down a size to fit the shorter frame */
.kofi-float .kofi-stamp .compact-bottom{font-size:11px; letter-spacing:.05em}
.kofi-float .kofi-stamp .ko-fi{fill:var(--purpledeep)}

/* the stars breathe on a stagger, each one its own rhythm and colour,
   so the stamp twinkles instead of blinking in unison. The fixed
   classes here are only the no-JS fallback: the inline script in
   single.php deals every .tw a random duration and a random negative
   delay on each page load, so the glitter never repeats a pattern */
.kofi-float .kofi-stamp .tw{
  transform-box:fill-box; transform-origin:center;
  animation:stamp-tw 2.4s ease-in-out infinite;
}
.kofi-float .kofi-stamp .twb{animation-duration:3.2s;animation-delay:1.1s}
.kofi-float .kofi-stamp .twc{animation-duration:2.8s;animation-delay:.55s}
.kofi-float .kofi-stamp .twd{animation-duration:3.6s;animation-delay:1.7s}
.kofi-float .kofi-stamp .twe{animation-duration:2s;animation-delay:.3s}
.kofi-float .kofi-stamp .twf{animation-duration:4s;animation-delay:2.3s}
.kofi-float .kofi-stamp .twgold{fill:var(--golddeep)}
.kofi-float .kofi-stamp .twpink{fill:var(--pinkdeep)}
@keyframes stamp-tw{
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.2;transform:scale(.5)}
}
@media (prefers-reduced-motion:reduce){
  .kofi-float .kofi-stamp .tw{animation:none}
}
@media print{.notewindow,.kofi-float{display:none!important}}
@media (max-width:640px){
  .endrow{margin-top:26px}
  .endrow .chtitle{min-width:0; flex:1}
  .kofi-float{margin-top:70px}
  .endrow + .kofi-float{margin-top:30px}
  .kofi-float .kofi-stamp{width:250px}
}
/* Astra's stock back-to-top button is retired: the hamburger rail has
   the up arrow now, so the old one is hidden outright. It is a single
   div with id #ast-scroll-top and class ast-scroll-top-icon, and
   Astra's JS shows and hides it with an inline style, so the hide
   needs !important to beat that style whatever it says. */
#ast-scroll-top,.ast-scroll-top-icon{display:none!important}

/* ============================================================
   The Novel Shelf — template-all-novels.php
   Every colour here comes from the site's own tokens, so the
   shelf follows the dark/light theme switch like everything
   else. Status pills follow the novel info page's language:
   gold = ongoing, green = completed, orange = hiatus, red = dropped.
   ============================================================ */

/* reserve the scrollbar's slot even when filtering shortens the page,
   so the layout doesn't shudder sideways every time a chip is clicked */
html{scrollbar-gutter:stable;overflow-y:scroll}

.shelfpage .wrap{max-width:1100px;margin:0 auto;padding:0 clamp(16px,4vw,44px)}
.shelfpage .shelfhead{max-width:none;margin:0;padding:0}
.shelfpage .sparkrow{color:var(--gold);font-size:1rem;letter-spacing:.6em;text-indent:.6em}
.shelfpage .lead{color:var(--ink);opacity:.72;font-size:.95rem;max-width:34rem;margin:0}

/* search + tag controls */
.shelfpage .controls{display:flex;flex-direction:column;align-items:center;gap:14px;padding:26px 0 8px}
.shelfpage .searchwrap{position:relative;width:min(420px,100%)}
.shelfpage .searchwrap .glyph{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--gold);font-size:.95rem;pointer-events:none}
.shelfpage .searchwrap input[type="search"]{width:100%;background:var(--card);border:1px solid var(--line);border-radius:999px;color:var(--ink);font-family:'Nunito',system-ui,sans-serif;font-size:.95rem;font-weight:600;padding:11px 128px 11px 38px;outline:none;transition:border-color .15s;box-shadow:none;line-height:1.2}
.shelfpage .searchwrap input[type="search"]::placeholder{color:var(--ink);opacity:.45;font-weight:400}
.shelfpage .searchwrap input[type="search"]:focus{border-color:var(--gold);box-shadow:none;outline:none}
/* the theme-coloured clear X replaces the browser's default one */
.shelfpage .searchwrap input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.shelfpage .modegroup{position:absolute;right:7px;top:50%;transform:translateY(-50%);display:flex;gap:2px;background:var(--card2);border-radius:999px;padding:3px;z-index:2}
.shelfpage .modebtn{border:0;background:transparent;color:var(--ink);opacity:.55;font-family:'Nunito',system-ui,sans-serif;font-weight:800;font-size:.72rem;letter-spacing:.03em;padding:5px 13px;border-radius:999px;cursor:pointer;outline:none;transition:.15s;box-shadow:none}
.shelfpage .modebtn:hover{opacity:.9;background:transparent;box-shadow:none}
.shelfpage .modebtn:focus-visible{opacity:1;outline:2px solid var(--gold);outline-offset:2px}
.shelfpage .modebtn.on{background:var(--purple);color:#fff;opacity:1}
/* tag mode goes gold so the mode switch reads at a glance */
.shelfpage .modebtn.on[data-mode="tag"]{background:var(--gold);color:#1D1935;opacity:1}
.shelfpage .searchclear{position:absolute;right:118px;top:50%;transform:translateY(-50%);display:none;border:0;background:transparent;color:var(--gold);font-size:1.05rem;line-height:1;cursor:pointer;padding:4px 6px;z-index:2;font-family:'Nunito',system-ui,sans-serif;box-shadow:none}
.shelfpage .searchclear:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.shelfpage .searchwrap.hasquery .searchclear{display:block}
.shelfpage .tagrow{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:760px;margin:0 auto;width:100%}
/* the chips themselves reuse the homepage .fbtn rules above;
   the shelf only supplies the row's layout */
.shelfpage .countline{font-size:.85rem;color:var(--muted);margin:0}

/* the shelf: books sit straight on the starlit sky, no card behind
   them, the cover art is the frame. Hover lifts the whole book */
.shelfpage .shelf{display:flex;flex-wrap:wrap;gap:clamp(14px,2.5vw,24px);justify-content:center;padding:26px 0 70px}
.shelfpage .book{width:200px;padding:20px 10px 16px;display:flex;flex-direction:column;gap:10px;align-items:center;text-align:center;text-decoration:none;transition:transform .2s;border-radius:var(--radius);background:none;border:none;box-shadow:none}
.shelfpage .book:hover{transform:translateY(-4px);background:none;box-shadow:none}
.shelfpage .book:hover .bname{color:var(--gold)}
.shelfpage .coverimg{width:150px;aspect-ratio:3/4;object-fit:cover;border-radius:10px;border:1px solid var(--line);box-shadow:0 8px 20px rgba(0,0,0,.25);display:block}
.shelfpage .cover-fake{padding:12px;background:linear-gradient(165deg,#2E2750,#1D1935 60%);border:1px solid rgba(207,163,83,.22)}
.shelfpage .cover-fake.cfb{background:linear-gradient(165deg,#3A2A4E,#241E3F 60%)}
.shelfpage .cover-fake.cfc{background:linear-gradient(165deg,#27314F,#1B1B38 60%)}
.shelfpage .bname{font-weight:700;font-size:.9rem;color:var(--ink);text-decoration:none;line-height:1.35}
.shelfpage .bname:hover{color:var(--gold)}
.shelfpage .bmeta{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;font-size:.78rem;color:var(--muted);font-weight:600;white-space:nowrap}
.shelfpage .status{font-size:.7rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase;border-radius:999px;padding:3px 10px}
.shelfpage .status.ongoing{color:var(--golddeep);border:1px solid rgba(207,163,83,.45)}
.shelfpage .status.completed,.shelfpage .status.complete{color:var(--greendeep);border:1px solid rgba(140,200,130,.45)}
.shelfpage .status.hiatus{color:var(--orangedeep);border:1px solid rgba(232,164,92,.45)}
.shelfpage .status.dropped{color:var(--reddeep);border:1px solid rgba(232,138,138,.45)}

/* empty state */
.shelfpage .empty{display:none;text-align:center;padding:60px 0 90px;color:var(--ink);opacity:.75}
.shelfpage .empty .cf-star{font-size:2rem;color:var(--gold);display:block;margin-bottom:12px}

@media (max-width:560px){
  .shelfpage .book{width:calc(50% - 12px)}
  .shelfpage .cover-fake{width:110px;height:165px}
  .shelfpage .coverimg{width:110px}
  .shelfpage .searchwrap input[type="search"]{padding:11px 118px 11px 36px}
  .shelfpage .searchclear{right:112px}
}

/* Scene-break divider: a thin line with one ✦ sitting in a gap in
   the middle. The gap is a transparent stretch of the hr's own
   background, so nothing is painted over the page and no browser
   default (hr ships with overflow:hidden) can clip the star flat.
   --rui follows the reader's chosen palette (gold by default).
   Dropped by the Get Railed button as a real <hr>. */
article.chapter hr{border:none;height:1px;overflow:visible;background:linear-gradient(to right,var(--rui) calc(50% - 15px),transparent calc(50% - 15px),transparent calc(50% + 15px),var(--rui) calc(50% + 15px));margin:2.2em 0;position:relative}
article.chapter hr::after{content:'\2726';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);line-height:1;font-size:13px;color:var(--rui)}
