/* V7.3.1 Reader-only UI. Keep reader behavior isolated from the global theme bundle. */
.reader-topbar{
  position:static;
  top:auto;
  z-index:auto;
}

.reader-scroll-top{
  position:fixed;
  right:22px;
  bottom:calc(22px + env(safe-area-inset-bottom, 0px));
  z-index:45;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.30);
  border-radius:10px;
  background:#ff3047;
  color:#fff;
  font-size:24px;
  font-weight:800;
  line-height:1;
  box-shadow:0 10px 28px rgba(0,0,0,.34);
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(8px);
  transition:opacity .16s ease,transform .16s ease,background-color .16s ease,visibility .16s ease;
}
.reader-scroll-top:hover,
.reader-scroll-top:focus-visible{
  background:#ff4960;
  outline:none;
  border-color:rgba(255,255,255,.58);
}
.reader-scroll-top.is-visible{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}

@media(max-width:680px){
  .reader-scroll-top{
    right:14px;
    bottom:calc(14px + env(safe-area-inset-bottom, 0px));
    width:42px;
    height:42px;
    border-radius:9px;
  }
}

@media(prefers-reduced-motion:reduce){
  .reader-scroll-top{transition:none}
}

/* V13 chapter issue reporting */
.reader-report-box{margin-top:16px;padding:16px 18px}.reader-report-box summary{cursor:pointer;font-weight:800}.reader-report-box form{display:grid;gap:12px;margin-top:14px}.reader-report-box label{display:grid;gap:6px}.reader-report-box select,.reader-report-box textarea{width:100%}.reader-report-box textarea{min-height:90px;resize:vertical}.reader-report-notice{margin-bottom:12px;padding:12px 16px}.reader-report-notice.success{border-color:#2e9f79}.reader-report-notice.error{border-color:#ba315a}

/* V46 3Dimages member preview / VIP unlock */
.three-d-access-lock{max-width:760px;margin:34px auto;padding:34px;text-align:center}.three-d-access-lock h1{margin:7px 0 10px;font-size:30px}.three-d-access-lock p{max-width:620px;margin:0 auto 22px;color:var(--muted);line-height:1.7}.three-d-access-lock .lock-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.three-d-preview-lock{max-width:900px;margin:18px auto 28px;padding:22px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-color:rgba(255,189,50,.45);background:radial-gradient(circle at 92% 20%,rgba(255,189,50,.13),transparent 30%),linear-gradient(180deg,rgba(18,25,35,.98),rgba(9,18,29,.98))}.three-d-preview-lock>div{min-width:0}.three-d-preview-lock strong{display:block;margin:4px 0 5px;font-size:20px}.three-d-preview-lock p{margin:0;color:var(--muted);line-height:1.6}.three-d-preview-lock .primary-button{flex:0 0 auto}@media(max-width:720px){.three-d-access-lock{padding:24px 18px}.three-d-preview-lock{margin:14px 0 22px;padding:19px;align-items:stretch;flex-direction:column}.three-d-preview-lock .primary-button{width:100%;text-align:center}}

/* V74: unmistakable end-of-free-preview paywall after the configured 3D image limit. */
.three-d-preview-lock.three-d-preview-paywall{max-width:940px;margin:28px auto 38px;padding:28px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px 28px;border:1px solid rgba(255,189,50,.62);background:radial-gradient(circle at 88% 8%,rgba(255,189,50,.2),transparent 31%),linear-gradient(180deg,rgba(22,26,31,.99),rgba(8,16,27,.99));box-shadow:0 18px 55px rgba(0,0,0,.38),0 0 0 1px rgba(255,189,50,.07)}.three-d-preview-lock-copy h2{margin:5px 0 9px;font-size:clamp(23px,3vw,32px);line-height:1.15}.three-d-preview-lock-copy p{max-width:650px;margin:0;color:#d4dde7;font-size:16px;line-height:1.7}.three-d-preview-remaining{min-width:138px;padding:15px 18px;border:1px solid rgba(255,189,50,.35);border-radius:12px;background:rgba(255,189,50,.08);text-align:center}.three-d-preview-remaining strong{display:block;color:var(--gold);font-size:38px;line-height:1;font-weight:950}.three-d-preview-remaining span{display:block;margin-top:7px;color:#f4dfaa;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.three-d-preview-upgrade{grid-column:1/-1;min-height:58px;width:100%;font-size:18px;letter-spacing:.01em;box-shadow:0 12px 34px rgba(255,47,111,.26)}@media(max-width:720px){.three-d-preview-lock.three-d-preview-paywall{grid-template-columns:1fr;padding:21px 17px}.three-d-preview-remaining{width:100%}.three-d-preview-lock-copy p{font-size:15px}.three-d-preview-upgrade{min-height:54px;font-size:17px}}

/* V76 Reader semantic/content SEO layer */
.reader-seo-context,.reader-more-chapters{max-width:1000px;margin:20px auto;padding:22px}
.reader-seo-context-head h2{margin:5px 0 0;font-size:22px;line-height:1.35}
.reader-seo-intro{margin:14px 0 18px;line-height:1.75}
.reader-seo-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border-top:1px solid rgba(255,255,255,.08)}
.reader-seo-facts>div{display:grid;grid-template-columns:minmax(110px,.45fr) 1fr;gap:12px;padding:11px 0;border-bottom:1px solid rgba(255,255,255,.08)}
.reader-seo-facts dt{opacity:.72}.reader-seo-facts dd{margin:0;overflow-wrap:anywhere}
.reader-seo-genres{display:flex;flex-wrap:wrap;gap:8px}.reader-seo-genres a{text-decoration:underline;text-underline-offset:3px}
.reader-more-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}
.reader-more-grid>a{display:flex;flex-direction:column;gap:5px;padding:12px;border:1px solid rgba(255,255,255,.09);border-radius:10px;text-decoration:none}
.reader-more-grid span,.reader-more-grid time{font-size:12px;opacity:.7}.reader-all-chapters{display:inline-flex}
@media(max-width:760px){.reader-seo-context,.reader-more-chapters{padding:16px}.reader-seo-facts{grid-template-columns:1fr}.reader-more-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.reader-more-grid{grid-template-columns:1fr}.reader-seo-facts>div{grid-template-columns:100px 1fr}}


/* V130 · Mobile reader navigation. Header stays at the top of the document and scrolls away with the page. */
.reader-mobile-language-switch{display:none}
@media(max-width:760px){
  body.reader-page .site-header{
    position:relative;
    top:auto;
    left:auto;
    right:auto;
    z-index:50;
    transform:none;
    opacity:1;
    pointer-events:auto;
    transition:none;
  }
  body.reader-page .page-main{padding-top:8px}
  .reader-mobile-language-switch{
    display:block;
    position:fixed;
    right:14px;
    bottom:calc(14px + env(safe-area-inset-bottom, 0px));
    z-index:75;
  }
  .reader-mobile-language-switch .language-switcher{width:auto}
  .reader-mobile-language-switch .language-switcher summary{
    min-width:52px;
    height:42px;
    justify-content:center;
    gap:5px;
    padding:5px 8px;
    border-color:rgba(255,255,255,.28);
    background:rgba(7,18,31,.96);
    box-shadow:0 10px 28px rgba(0,0,0,.34);
  }
  .reader-mobile-language-switch .language-switcher summary span{display:inline;font-size:10px}
  .reader-mobile-language-switch .language-switcher summary i{display:none}
  .reader-mobile-language-switch .language-switcher-menu{
    position:absolute;
    top:auto;
    right:0;
    bottom:calc(100% + 8px);
    width:min(280px,calc(100vw - 28px));
    max-height:min(68vh,520px);
    margin:0;
    overflow:auto;
    box-shadow:0 18px 44px rgba(0,0,0,.55);
  }
  .reader-scroll-top{bottom:calc(68px + env(safe-area-inset-bottom, 0px))}
}

/* V142 Reader chapter picker: full in-reader jump list loaded only when requested. */
.reader-bottom-center{display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap}
.reader-chapter-list-trigger{cursor:pointer}
body.reader-chapter-list-open{overflow:hidden}
.reader-chapter-list-modal[hidden]{display:none!important}
.reader-chapter-list-modal{position:fixed;inset:0;z-index:180;display:grid;place-items:center;padding:24px}
.reader-chapter-list-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(4px)}
.reader-chapter-list-dialog{position:relative;z-index:1;width:min(780px,100%);max-height:min(82vh,820px);display:grid;grid-template-rows:auto auto auto minmax(0,1fr);overflow:hidden;border:1px solid #314b65;border-radius:16px;background:linear-gradient(180deg,#0b1a29,#07121e);box-shadow:0 28px 90px rgba(0,0,0,.62);color:#e7eef6}
.reader-chapter-list-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px 14px;border-bottom:1px solid rgba(255,255,255,.07)}
.reader-chapter-list-dialog h2{margin:4px 0 0;font-size:24px;line-height:1.2}.reader-chapter-list-dialog h2 small{color:#7991a8;font-size:13px;font-weight:700}
.reader-chapter-list-close{width:40px;height:40px;border:1px solid #31475e;border-radius:9px;background:#081522;color:#dce8f3;font-size:25px;line-height:1;cursor:pointer}.reader-chapter-list-close:hover{border-color:#597896;background:#0d2031}
.reader-chapter-list-search{height:44px;margin:14px 18px 6px;display:flex;align-items:center;gap:8px;border:1px solid #2b4259;border-radius:9px;background:#06121e;color:#71879c;padding:0 12px}.reader-chapter-list-search:focus-within{border-color:#5f83a7}.reader-chapter-list-search input{width:100%;height:100%;border:0;outline:0;background:transparent;color:#edf4fb;font:inherit}.reader-chapter-list-search input::placeholder{color:#6d8195}
.reader-chapter-list-status{padding:8px 20px 10px;color:#7f94a9;font-size:12px}.reader-chapter-list-status[hidden]{display:none}
.reader-chapter-list-items{min-height:120px;max-height:60vh;overflow:auto;padding:4px 18px 18px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overscroll-behavior:contain;scrollbar-gutter:stable}
.reader-chapter-list-item{min-width:0;min-height:54px;display:grid;grid-template-columns:minmax(90px,auto) minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 11px;border:1px solid rgba(255,255,255,.075);border-radius:9px;background:#081522;color:#dce7f1;text-decoration:none}.reader-chapter-list-item:hover{border-color:#43617f;background:#0c1d2d}.reader-chapter-list-item.current{border-color:#ff4257;background:rgba(255,48,71,.09);box-shadow:inset 3px 0 0 #ff3047}.reader-chapter-list-item strong{font-size:14px;white-space:nowrap}.reader-chapter-list-item span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8fa2b5;font-size:12px}.reader-chapter-list-badges{display:flex;align-items:center;justify-content:flex-end;gap:5px;white-space:nowrap}.reader-chapter-list-item em{font-style:normal;color:#ff7283;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.reader-chapter-list-item b{font-size:9px;color:#85b7e5;border:1px solid #29445f;border-radius:5px;padding:2px 4px}
@media(max-width:760px){.reader-bottom{gap:9px}.reader-bottom-center{order:3;width:100%}.reader-bottom-center>.secondary-button{flex:1 1 150px}.reader-chapter-list-modal{padding:12px}.reader-chapter-list-dialog{width:100%;max-height:88vh;border-radius:13px}.reader-chapter-list-dialog>header{padding:17px 16px 12px}.reader-chapter-list-dialog h2{font-size:21px}.reader-chapter-list-search{margin:12px 12px 5px}.reader-chapter-list-status{padding:7px 14px 9px}.reader-chapter-list-items{grid-template-columns:1fr;max-height:68vh;padding:4px 12px 14px}.reader-chapter-list-item{min-height:52px}}

/* V269 chapter editorial content */
.reader-editorial-copy{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0 18px}
.reader-editorial-copy>div{padding:14px 15px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(255,255,255,.025)}
.reader-editorial-copy h3{margin:0 0 7px;font-size:15px;line-height:1.35}
.reader-editorial-copy p{margin:0;color:#c9d4df;line-height:1.72}
@media(max-width:760px){.reader-editorial-copy{grid-template-columns:1fr;gap:10px}}


/* V391 VIP protected Reader: tile rows are reconstructed only on canvas. */
.reader-pages .vip-canvas-page{display:block;width:100%;margin:0;padding:0;background:#02060b;overflow:hidden}
.reader-pages .vip-canvas-row{display:block;width:100%;height:auto;margin:0;padding:0;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
.reader-pages .vip-canvas-page[data-vip-canvas-state="pending"],.reader-pages .vip-canvas-page[data-vip-canvas-state="loading"]{background:linear-gradient(90deg,#02060b,#07101a,#02060b);background-size:220% 100%;animation:vipCanvasLoading 1.5s linear infinite}
@keyframes vipCanvasLoading{to{background-position:-220% 0}}
