/* RE:LIGHT v9 — cinematic reader / actual chapter manuscript and interaction APIs remain unchanged. */
:root{--v9-night:#061324;--v9-moon:#78c9fa;--v9-paper:#fffaf0;--v9-ink:#263342}
.v9-reader{background:var(--v9-night);color:#e5edf7}
.v9-reader .site-header,.v9-reader .site-header.is-scrolled{background:rgba(6,16,32,.88);border-bottom-color:rgba(150,208,244,.13);box-shadow:0 8px 27px #03101e33}
.v9-reader .site-header .brand{font-family:Georgia,'Times New Roman',serif;letter-spacing:.1em;font-weight:400;color:#eef9ff}
.v9-reader .site-header .brand-mark{color:#7dd7ff}
.v9-reader .site-nav a{color:#e6f2ff}
.v9-reader .site-nav a[aria-current="page"]{color:#8fdfff}
.v9-reading-progress{position:fixed;z-index:270;top:0;left:0;right:0;height:3px;pointer-events:none;background:#102b4640}
.v9-reading-progress span{display:block;width:0;height:100%;background:linear-gradient(90deg,#3f89cf,#92e6ff);box-shadow:0 0 14px #68cdff;transition:width .12s linear}
.v9-sidebar{display:none}
/* Chapter opening: real RE:LIGHT art, not simulated sample images. */
.v9-reader .reader-hero{position:relative;display:flex;align-items:flex-end;min-height:510px;padding:154px 0 72px;background-image:linear-gradient(0deg,#061324 1%,#071728c9 20%,#07172842 68%,#04101ca3 100%),linear-gradient(90deg,#031023e0,#03102325 70%),url('assets/relight-keyvisual.webp');background-position:center,center,center 45%;background-size:cover;color:#f5faff;isolation:isolate}
.v9-reader .reader-hero::before{display:none}
.v9-reader .reader-hero::after{width:380px;height:380px;right:8%;top:9%;max-width:none;max-height:none;border-radius:50%;border:1px solid #bde7ff13;box-shadow:0 0 0 35px #7bb6e808;opacity:.75}
.v9-reader .reader-hero .detail-container{z-index:1;width:min(100% - 70px,1050px)}
.v9-reader .reader-hero .breadcrumbs{margin:0 0 60px;color:#dfebf9;font-size:10px;letter-spacing:.16em}
.v9-reader .reader-hero .breadcrumbs a{color:#dceefa}
.v9-reader .reader-hero .detail-topline{color:#a5e4ff;font-size:11px;letter-spacing:.25em}
.v9-reader .reader-episode-num{font:400 12px/1.6 Georgia,serif;letter-spacing:.28em;color:#8ecff6;margin-top:14px}
.v9-reader .reader-hero h1{font:400 clamp(39px,4.7vw,64px)/1.44 var(--serif);text-shadow:0 4px 28px #030e1a;letter-spacing:.09em;margin:8px 0 13px}
.v9-reader .reader-intro{color:#e0eaf5;font-size:14px;text-shadow:0 2px 7px #071322;max-width:660px}
.v9-reader .reader-start{margin-top:20px;color:#fff;border:1px solid #85cdfc8a;border-radius:6px;background:#0f345bb9;box-shadow:0 10px 30px #0003;padding:12px 25px;font-size:12px}
.v9-reader .reader-start:hover{background:#246295e8}
/* Reading preferences: shown in an unobtrusive in-page reading bar. */
.v9-reader .reader-tools-wrap{background:#07182ddf;border-bottom:1px solid #71abdb2e;box-shadow:0 10px 30px #0002;top:68px;backdrop-filter:blur(14px)}
.v9-reader .reader-tools{width:min(100% - 70px,965px);min-height:66px}
.v9-reader .reader-back{color:#b9d7e9;font-size:11px}
.v9-reader .reader-controls button{background:#112b45;border:1px solid #668bae69;color:#d4ebff;border-radius:5px;min-width:40px;min-height:38px}
.v9-reader .reader-controls button:hover{background:#1b4264}
/* Ruined city seen beyond parchment. */
.v9-reader .reader-paper{--novel-font-size:18px;position:relative;padding:36px 0 40px;background:linear-gradient(90deg,#061324ea 0%,#061b339c 55%,#061324e6 100%),url('assets/relight-keyvisual.webp') top center / auto 740px no-repeat,#061324;scroll-margin-top:145px}
.v9-reader .reader-content{position:relative;width:min(100% - 64px,980px);margin:0 auto;padding:72px clamp(36px,8.6vw,120px) 93px;background:linear-gradient(155deg,#fffdfa,#fff9ed 72%,#f8efdf);color:var(--v9-ink);border:1px solid #ecdec6;border-radius:3px;box-shadow:0 18px 100px #0008,0 0 0 7px #cae5f30b}
.v9-reader .reader-content::before{content:"✧";position:absolute;top:22px;left:50%;transform:translateX(-50%);font:24px/1 Georgia,serif;color:#6299ba}
.v9-reader .novel-heading{text-align:left;margin-bottom:62px;border-bottom:1px solid #a8b0b8;padding-bottom:27px}
.v9-reader .novel-heading span{font:500 11px/1.6 var(--sans);letter-spacing:.1em;color:#6c8295}
.v9-reader .novel-heading h2{font:500 clamp(28px,3.1vw,38px)/1.5 var(--serif);letter-spacing:.07em;margin:13px 0 14px;color:#203b55}
.v9-reader .novel-title-rule{display:none}
.v9-chapter-stats{display:flex;justify-content:flex-end;align-items:center;gap:27px;margin:0 0 0 auto}
.v9-stat-button,.v9-stat-plain{display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:31px;color:#31495c;text-decoration:none;font-family:var(--sans);font-size:16px;background:transparent;border:0;padding:0;line-height:1.1}
.v9-stat-button{cursor:pointer}.v9-stat-button:hover{color:#246b9d}
.v9-stat-button span,.v9-stat-plain span{font:20px/1 var(--sans)!important;letter-spacing:0!important;color:inherit!important}
.v9-stat-button strong,.v9-stat-plain strong{font:600 13px/1.2 var(--sans);font-variant-numeric:tabular-nums}
.v9-head-like.is-liked{color:#c94d73}
.v9-reader .novel-text{color:#303d49;line-height:2.18;letter-spacing:.025em}
.v9-reader .novel-line{margin-bottom:.32em}
.v9-reader .reader-illustration{margin:65px auto 70px;width:fit-content;max-width:100%;text-align:center}
.v9-reader .reader-illustration img{display:block;max-height:none;max-width:min(100%,540px);width:auto;height:auto;border-radius:2px;box-shadow:0 0 0 5px #f1e9d9,0 16px 42px #1128414a}
.v9-reader .reader-illustration figcaption{color:#6a7d8c;font-size:10px;margin-top:20px;letter-spacing:.14em}
.v9-reader .reader-end{margin-top:86px}
/* Reader-friendly dark theme retains the existing preference logic. */
.v9-reader.reader-night .reader-paper{background:linear-gradient(0deg,#030e1d,#0b223b),#041322}
.v9-reader.reader-night .reader-content{background:linear-gradient(155deg,#142439,#0b192a);border-color:#36516b;color:#e3eef8;box-shadow:0 19px 85px #0008}
.v9-reader.reader-night .novel-heading{border-color:#486482}
.v9-reader.reader-night .novel-heading h2,.v9-reader.reader-night .novel-text{color:#e2eef8}
.v9-reader.reader-night .novel-heading span{color:#a7bfd4}
.v9-reader.reader-night .v9-stat-button,.v9-reader.reader-night .v9-stat-plain{color:#d3eaff}
.v9-reader.reader-night .reader-illustration img{box-shadow:0 0 0 5px #273e54,0 16px 42px #0009}
/* After the last paragraph: chapter navigation first, reactions and comments follow. */
.v9-reader .reader-bottom{position:relative;text-align:center;padding:48px 0 94px;background:linear-gradient(180deg,#061324,#0a2440 66%,#08172c);color:#dfedfc}
.v9-reader .reader-bottom>.detail-container{width:min(100% - 64px,1000px)}
.v9-reader .reader-encourage{font:400 20px/1.75 var(--serif);letter-spacing:.03em;color:#e3ebf3}
.v9-reader .reader-pixiv{color:#9bd4f2;border-color:#6495b0;margin:11px 0 33px}
.v9-reader .reader-chapter-nav{max-width:100%;margin:8px auto 32px;gap:15px}
.v9-reader .reader-chapter-nav>a{background:linear-gradient(120deg,#12253b,#153755);border:1px solid #6f9fb36e;border-radius:5px;box-shadow:0 8px 25px #0004;color:#e5f3ff;min-height:98px;padding:20px 28px;transition:.2s}
.v9-reader .reader-chapter-nav>a:hover{background:#225987;border-color:#8fcef7;transform:translateY(-2px)}
.v9-reader .reader-chapter-nav small{color:#8ecded}
.v9-reader .reader-community{max-width:100%;padding:52px clamp(28px,6vw,75px);margin:0 auto;background:linear-gradient(155deg,#fffdf8,#faf6ee);border:1px solid #dcd8cf;border-radius:7px;box-shadow:0 18px 60px #0005;color:#223850}
.v9-reader .community-kicker{color:#437797}
.v9-reader .reader-community h2{font-size:clamp(22px,2.7vw,29px);color:#20374e}
.v9-reader .community-lead{color:#698096}
.v9-reader .community-stats{width:min(100%,580px);margin:0 auto 16px;padding:17px 5px;border-top:1px solid #d9e0e3;border-bottom:1px solid #d9e0e3;gap:7px}
.v9-reader .community-stat,.v9-reader .community-like{flex-wrap:nowrap;gap:9px;min-height:45px;font:14px/1.2 var(--sans);border:0;color:#365b77}
.v9-reader .community-stat strong,.v9-reader .community-like strong{font:600 17px/1.2 var(--sans);color:#233f56;font-variant-numeric:tabular-nums}
.v9-reader .community-stat-icon{font-size:22px;color:inherit}
.v9-reader .community-like{background:transparent;border-radius:4px}
.v9-reader .community-like:hover{background:#e9f1f4}
.v9-reader .community-like[aria-pressed="true"]{background:#ffeef1}
.v9-reader .community-heart{color:#cc6f82;line-height:1;font-size:28px}
.v9-reader .community-stat>span:last-child,.v9-reader .community-like [data-heart-label]{display:none}
.v9-reader .community-comment{background:#eff2f0;border:1px solid #dce4e5;border-radius:8px}
.v9-reader .community-comment.is-reply{background:#f5f7f7;border-left:3px solid #83bce0}
.v9-reader .community-author-badge{border-radius:3px;background:#245f91}
.v9-reader .community-write-box input:not([type="hidden"]),.v9-reader .community-write-box textarea{background:#fff;border-radius:5px}
.v9-reader .community-send{background:#175484;border-radius:5px}
.v9-reader .reader-community .community-note{color:#627b8d}
.v9-reader .site-footer{background:#060f20}
.v9-reader .author-footer-link{border:0;opacity:.55;font-size:10px}
.v9-reader .author-footer-link:hover{opacity:1}
@media(min-width:1250px){
  .v9-reader{padding-left:226px}
  .v9-sidebar{position:fixed;z-index:120;display:flex;flex-direction:column;left:0;top:0;bottom:0;width:226px;padding:72px 19px 20px 24px;overflow-y:auto;background:linear-gradient(180deg,#061529ef,#081932f0),url('assets/volume1-cover.webp') bottom center/auto 65% no-repeat;border-right:1px solid #8ac6fc36;box-shadow:8px 0 40px #0003;color:#f6fcff}
  .v9-sidebar-brand{display:block;font:400 24px/1.4 Georgia,serif;letter-spacing:.075em;text-shadow:0 0 20px #67bfff4f;color:#fff}
  .v9-sidebar-brand span{display:block;font:400 10px/2.1 var(--serif);letter-spacing:.02em;color:#9fc9e1;margin-top:12px}
  .v9-sidebar-rule{width:42px;height:1px;background:#8abde1;margin:17px 0 29px}
  .v9-side-home{display:flex;align-items:center;gap:13px;font:400 12px/1.3 var(--sans);padding:12px 9px;color:#c0dbea}
  .v9-side-home:hover{color:#fff;background:#4e9fdf21}
  .v9-side-kicker{font:500 9px/1.4 var(--sans);letter-spacing:.17em;color:#7197b0;margin:27px 0 9px}
  .v9-sidebar nav{display:flex;flex-direction:column;gap:2px}
  .v9-chapter-link{display:flex;gap:13px;align-items:center;padding:10px 8px;color:#aec3d7;font:400 12px/1.4 var(--serif);border-radius:4px;transition:background .15s;color:#d9e7f0}
  .v9-chapter-link span{font:11px/1 Georgia,serif;color:#73a5c8}
  .v9-chapter-link em{font-style:normal}
  .v9-chapter-link:hover,.v9-chapter-link.is-current{background:#1b54804f;color:#fff}
  .v9-chapter-link.is-current{border-left:2px solid #69caff}
  .v9-side-end{margin-top:auto;padding-top:25px;color:#8ab3d1;font:11px/1.9 var(--serif)}
  .v9-side-end>span{font-size:22px;color:#63c5f9}
  .v9-reader .site-header,.v9-reader .site-header.is-scrolled{left:226px;right:0;padding:0 clamp(20px,4vw,60px)}
  .v9-reader .site-header .brand{font-size:19px}
  .v9-reader .reader-hero .detail-container{width:min(100% - 80px,1000px)}
  .v9-reader .reader-tools{width:min(100% - 80px,1000px)}
}
@media(max-width:850px){
  .v9-reader .reader-hero{min-height:410px;padding:119px 0 54px;background-position:center,center,43% center}
  .v9-reader .reader-hero .breadcrumbs{margin-bottom:40px}
  .v9-reader .reader-content{width:min(100% - 28px,800px);padding:66px clamp(28px,5vw,62px) 75px}
  .v9-reader .reader-bottom>.detail-container{width:min(100% - 32px,800px)}
}
@media(max-width:650px){
  .v9-reader .site-header .brand{font-size:19px;letter-spacing:.09em}
  .v9-reader .reader-hero{min-height:345px;padding:96px 0 42px;background-position:center,center,39% center;background-size:cover}
  .v9-reader .reader-hero .detail-container{width:calc(100% - 38px)}
  .v9-reader .reader-hero .breadcrumbs{font-size:9px;letter-spacing:.03em;margin-bottom:24px}
  .v9-reader .reader-hero .detail-topline{font-size:9px}
  .v9-reader .reader-episode-num{font-size:11px;margin-top:10px}
  .v9-reader .reader-hero h1{font-size:clamp(29px,8.2vw,39px);line-height:1.45;margin:12px 0 9px;letter-spacing:.05em}
  .v9-reader .reader-intro{font-size:11px;line-height:2;color:#deedfb}
  .v9-reader .reader-start{margin-top:13px;padding:11px 14px;font-size:10px;gap:15px}
  .v9-reader .reader-tools-wrap{top:63px}
  .v9-reader .reader-tools{min-height:55px;width:calc(100% - 26px)}
  .v9-reader .reader-back{font-size:10px}
  .v9-reader .reader-controls{gap:5px}
  .v9-reader .reader-controls button{min-width:32px;min-height:34px;padding:6px 8px;font-size:11px}
  .v9-reader .reader-paper{padding:14px 0 20px}
  .v9-reader .reader-content{width:calc(100% - 16px);padding:55px 22px 58px;border-radius:3px}
  .v9-reader .reader-content::before{top:18px;font-size:17px}
  .v9-reader .novel-heading{margin-bottom:34px;padding-bottom:17px}
  .v9-reader .novel-heading span{font-size:9px;letter-spacing:.03em}
  .v9-reader .novel-heading h2{font-size:26px;letter-spacing:.035em;margin:9px 0 8px}
  .v9-chapter-stats{gap:21px}
  .v9-stat-button span,.v9-stat-plain span{font-size:19px!important}
  .v9-stat-button strong,.v9-stat-plain strong{font-size:12px}
  .v9-reader .novel-text{line-height:2.08;letter-spacing:.012em}
  .v9-reader .reader-illustration{margin:42px auto 51px}
  .v9-reader .reader-illustration img{max-width:100%}
  .v9-reader .reader-bottom{padding:37px 0 73px}
  .v9-reader .reader-encourage{font-size:17px}
  .v9-reader .reader-pixiv{font-size:11px;margin:7px 0 20px}
  .v9-reader .reader-chapter-nav{gap:9px;margin-bottom:20px}
  .v9-reader .reader-chapter-nav>a{min-height:79px;padding:16px 13px;font-size:12px}
  .v9-reader .reader-chapter-nav small{margin-bottom:7px;font-size:9px}
  .v9-reader .reader-community{padding:28px 17px 37px;border-radius:5px}
  .v9-reader .reader-community h2{font-size:21px}
  .v9-reader .community-stat,.v9-reader .community-like{flex-direction:row;gap:5px;padding:4px}
  .v9-reader .community-heart{font-size:24px}
  .v9-reader .community-stat-icon{font-size:20px}
  .v9-reader .community-stat strong,.v9-reader .community-like strong{font-size:15px}
  .v9-reader .community-comment.is-reply{margin-left:12px}
  .v9-reader .community-stats{gap:3px}
}
@media(prefers-reduced-motion:reduce){.v9-reading-progress span{transition:none}}
