
:root{
  --bg:#05030d;
  --bg-soft:#0b0618;
  --panel:rgba(13,8,29,.82);
  --panel-strong:rgba(16,10,36,.94);
  --text:#f8f1ff;
  --muted:#b9aacd;
  --line:rgba(188,120,255,.22);
  --line-strong:rgba(255,61,242,.38);
  --purple:#8b22ff;
  --violet:#5b21b6;
  --pink:#ff3df2;
  --cyan:#00e5ff;
  --gold:#ffd166;
  --danger:#ff4d6d;
  --ok:#2fffd4;
  --radius:22px;
  --shadow:0 24px 80px rgba(0,0,0,.42);
}

*{box-sizing:border-box}

html{scroll-behavior:smooth}

body{
  margin:0;
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at 12% -10%,rgba(139,34,255,.24),transparent 34rem),
    radial-gradient(circle at 92% 10%,rgba(255,61,242,.15),transparent 30rem),
    radial-gradient(circle at 45% 105%,rgba(0,229,255,.08),transparent 38rem),
    var(--bg);
  min-height:100vh;
}

a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit}
img{max-width:100%;display:block}

.shell{
  width:min(1480px,calc(100% - 44px));
  margin:0 auto;
}

.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:linear-gradient(180deg,rgba(5,3,13,.98),rgba(5,3,13,.82));
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(18px);
  box-shadow:0 18px 60px rgba(0,0,0,.28);
}

.header-shell{
  min-height:88px;
  display:grid;
  grid-template-columns:250px 1fr 430px;
  align-items:center;
  gap:18px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.brand-logo-link{
  min-width:250px;
  justify-content:flex-start;
}

.site-logo{
  width:245px;
  height:74px;
  object-fit:contain;
  object-position:left center;
  display:block;
  filter:drop-shadow(0 0 18px rgba(139,34,255,.38));
}

.footer-logo{
  width:240px;
  max-height:88px;
  object-fit:contain;
  object-position:left center;
  display:block;
  margin-bottom:14px;
  filter:drop-shadow(0 0 18px rgba(139,34,255,.32));
}

.nav{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.nav a{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  padding:0 12px;
  color:#e7ddf4;
  font-size:13px;
  font-weight:850;
  border-radius:999px;
  border:1px solid transparent;
  transition:.18s ease;
}

.nav a:hover,
.nav a.active{
  color:#fff;
  background:rgba(139,34,255,.16);
  border-color:rgba(255,61,242,.22);
  box-shadow:inset 0 -2px 0 rgba(255,61,242,.8);
}

.header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}

.top-search{
  height:46px;
  width:300px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 12px;
  border-radius:14px;
  background:
    radial-gradient(circle at 8% 0%,rgba(0,229,255,.13),transparent 5rem),
    linear-gradient(180deg,rgba(16,10,36,.98),rgba(7,5,18,.98));
  border:1px solid rgba(0,229,255,.28);
  box-shadow:0 10px 30px rgba(0,0,0,.22),inset 0 0 0 1px rgba(255,255,255,.025);
}

.top-search span{
  padding:5px 7px;
  border-radius:8px;
  background:rgba(0,229,255,.08);
  border:1px solid rgba(0,229,255,.18);
  color:var(--cyan);
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.top-search input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  color:var(--text);
  background:transparent;
  font-size:13px;
}

.top-search input::placeholder{
  color:#d7c7ea;
  opacity:.78;
}

.btn{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 16px;
  border-radius:14px;
  font-weight:900;
  font-size:13px;
  border:1px solid transparent;
  cursor:pointer;
  white-space:nowrap;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;
}

.btn:hover{transform:translateY(-2px)}

.btn.primary{
  color:#fff;
  background:linear-gradient(135deg,var(--purple),#b615ff 45%,#6400ff);
  box-shadow:0 14px 34px rgba(139,34,255,.38);
}

.btn.primary:hover{box-shadow:0 18px 44px rgba(139,34,255,.48)}

.btn.secondary{
  color:#f7edff;
  background:linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.035));
  border-color:rgba(255,255,255,.13);
  box-shadow:inset 0 0 18px rgba(139,34,255,.08);
}

.btn.secondary:hover{
  border-color:rgba(0,229,255,.34);
  background:rgba(139,34,255,.16);
}

.main-shell{padding:28px 0 0}

.hero{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:28px;
  min-height:520px;
  overflow:hidden;
  border:1px solid var(--line-strong);
  border-radius:30px;
  background:
    radial-gradient(circle at 75% 20%,rgba(0,229,255,.08),transparent 21rem),
    radial-gradient(circle at 30% 0%,rgba(255,61,242,.14),transparent 24rem),
    linear-gradient(135deg,rgba(17,10,38,.96),rgba(6,3,16,.92));
  box-shadow:var(--shadow),inset 0 0 70px rgba(139,34,255,.12);
  margin-bottom:26px;
}

.hero-copy{
  padding:54px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 12px;
  color:#ffd6fb;
  border-radius:999px;
  border:1px solid rgba(255,61,242,.38);
  background:rgba(139,34,255,.14);
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

h1{
  margin:18px 0 14px;
  color:#fff;
  font-family:Impact,Haettenschweiler,"Arial Narrow Bold",sans-serif;
  font-size:clamp(54px,6.6vw,106px);
  line-height:.88;
  letter-spacing:.02em;
  text-transform:uppercase;
  text-shadow:0 12px 0 rgba(0,0,0,.22);
}

h2{
  margin:0;
  color:#fff;
  font-size:24px;
  letter-spacing:-.03em;
}

p{
  color:#ded2ef;
  line-height:1.65;
}

.hero-copy p{
  max-width:590px;
  margin:0 0 22px;
  font-size:17px;
}

.tag-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:2px 0 28px;
}

.tag-row a{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  padding:0 12px;
  border-radius:999px;
  color:#f8efff;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(0,229,255,.22);
  font-size:12px;
  font-weight:850;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
}

.hero-art{
  position:relative;
  display:grid;
  place-items:center;
  padding:40px;
  background:
    radial-gradient(circle at 48% 36%,rgba(255,61,242,.18),transparent 18rem),
    linear-gradient(135deg,transparent,rgba(139,34,255,.22));
}

.hero-art::before{
  content:"";
  position:absolute;
  inset:36px;
  border-radius:38px;
  border:1px solid rgba(255,255,255,.1);
  transform:rotate(-4deg);
}

.hero-art img{
  position:relative;
  z-index:2;
  width:min(360px,78%);
  border-radius:24px;
  box-shadow:0 36px 100px rgba(0,0,0,.55);
  transform:rotate(3deg);
}

.hero-rating{
  position:absolute;
  right:36px;
  top:36px;
  z-index:3;
  width:104px;
  border-radius:18px;
  padding:14px;
  text-align:center;
  background:rgba(5,3,13,.78);
  border:1px solid rgba(255,61,242,.4);
}

.hero-rating strong{
  display:block;
  font-size:34px;
  line-height:1;
}

.hero-rating span{
  display:block;
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  font-weight:850;
}

.hero-empty{
  grid-template-columns:1fr .8fr;
}

.book-stack{
  position:relative;
  width:340px;
  height:430px;
}

.book-stack span{
  position:absolute;
  inset:0;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.13);
  background:
    radial-gradient(circle at 60% 16%,rgba(255,255,255,.23),transparent 9rem),
    linear-gradient(135deg,#ff3df2,#8b22ff 48%,#05030d);
  box-shadow:0 34px 100px rgba(0,0,0,.45);
}

.book-stack span:nth-child(1){transform:rotate(-10deg) translateX(-40px) translateY(20px);opacity:.55}
.book-stack span:nth-child(2){transform:rotate(7deg) translateX(30px) translateY(10px);opacity:.75}
.book-stack span:nth-child(3){transform:rotate(-1deg);}

.clean-genres{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:12px;
  margin-bottom:30px;
}

.genre-chip-clean{
  position:relative;
  overflow:hidden;
  min-height:82px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  padding:14px 16px 14px 72px;
  border-radius:18px;
  background:
    radial-gradient(circle at 92% 0%,rgba(0,229,255,.12),transparent 4rem),
    rgba(13,8,29,.76);
  border:1px solid rgba(188,120,255,.22);
  box-shadow:0 14px 34px rgba(0,0,0,.18);
}

.genre-chip-clean::before,
.genre-tile-clean::before{
  content:"";
  position:absolute;
  left:18px;
  top:50%;
  width:38px;
  height:46px;
  border-radius:7px 10px 10px 7px;
  transform:translateY(-50%);
  background:
    linear-gradient(90deg,rgba(255,255,255,.22) 0 3px,transparent 3px),
    linear-gradient(135deg,#8b22ff,#ff3df2 55%,#00e5ff);
  box-shadow:0 12px 26px rgba(139,34,255,.34);
}

.genre-chip-clean::after,
.genre-tile-clean::after{
  content:"";
  position:absolute;
  left:24px;
  top:50%;
  width:24px;
  height:2px;
  transform:translateY(-50%);
  background:rgba(255,255,255,.72);
  box-shadow:0 8px 0 rgba(255,255,255,.42),0 -8px 0 rgba(255,255,255,.42);
}

.genre-chip-clean:hover{
  border-color:rgba(0,229,255,.36);
  transform:translateY(-2px);
}

.genre-chip-clean strong{
  color:#fff;
  font-size:14px;
}

.genre-chip-clean small{
  color:var(--muted);
  font-size:12px;
  font-weight:750;
}

.home-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 420px;
  gap:24px;
  align-items:start;
}

.block{margin-bottom:34px}

.section-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 16px;
}

.section-title-row h2{
  display:flex;
  align-items:center;
  gap:10px;
}

.section-title-row h2::before{
  content:"";
  width:20px;
  height:4px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--purple),var(--pink));
  box-shadow:0 0 16px rgba(255,61,242,.45);
}

.section-title-row a{
  color:#ff94fa;
  font-size:13px;
  font-weight:900;
}

.cover-grid,
.library-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(178px,1fr));
  gap:18px;
}

.series-card{
  position:relative;
  overflow:hidden;
  aspect-ratio:2/3;
  border-radius:20px;
  background:var(--panel);
  border:1px solid rgba(255,61,242,.26);
  box-shadow:0 18px 46px rgba(0,0,0,.32);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.series-card:hover{
  transform:translateY(-5px);
  border-color:rgba(0,229,255,.44);
  box-shadow:0 26px 76px rgba(139,34,255,.28);
}

.series-card img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .22s ease;
}

.series-card:hover img{transform:scale(1.045)}

.card-gradient{
  position:absolute;
  inset:40% 0 0;
  background:linear-gradient(0deg,rgba(5,3,13,.98),rgba(5,3,13,.72),transparent);
}

.card-body{
  position:absolute;
  z-index:2;
  left:0;
  right:0;
  bottom:0;
  padding:18px 15px;
}

.card-body strong{
  display:block;
  min-height:38px;
  color:#fff;
  font-size:15px;
  line-height:1.2;
}

.card-body small{
  display:block;
  margin-top:5px;
  color:#cfc1dd;
  font-size:12px;
  font-weight:750;
}

.rank-badge,
.status-badge,
.heat-badge{
  position:absolute;
  z-index:3;
  top:12px;
  left:12px;
  min-height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  padding:0 10px;
  color:#fff;
  background:linear-gradient(135deg,var(--purple),var(--pink));
  font-size:12px;
  font-weight:950;
  box-shadow:0 10px 24px rgba(255,61,242,.28);
}

.heat-badge{
  left:auto;
  right:12px;
  background:rgba(5,3,13,.72);
  border:1px solid rgba(255,255,255,.12);
}

.panel,
.library-panel,
.empty-state{
  border-radius:24px;
  border:1px solid rgba(255,61,242,.26);
  background:
    radial-gradient(circle at 10% 0%,rgba(139,34,255,.13),transparent 18rem),
    rgba(9,6,21,.72);
  box-shadow:var(--shadow);
  padding:20px;
}

.empty-state{
  padding:30px;
}

.panel{margin-bottom:22px}

.update-item{
  display:grid;
  grid-template-columns:58px 1fr auto;
  gap:12px;
  align-items:center;
  min-height:78px;
  padding:10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.075);
  background:rgba(255,255,255,.025);
  margin-bottom:9px;
}

.update-item:hover{
  border-color:rgba(0,229,255,.28);
}

.mini-cover{
  width:58px;
  height:68px;
  border-radius:12px;
  background:
    radial-gradient(circle at 54% 20%,rgba(255,255,255,.2),transparent 42%),
    linear-gradient(135deg,var(--a),var(--b),#05030d);
  border:1px solid rgba(255,255,255,.1);
}

.update-item strong,
.update-item small,
.latest-row strong,
.latest-row small{
  display:block;
}

.update-item strong,
.latest-row strong{
  color:#fff;
  font-size:14px;
}

.update-item small,
.latest-row small{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
}

.update-item em,
.latest-row em{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  border-radius:10px;
  color:#fff;
  background:rgba(139,34,255,.18);
  border:1px solid rgba(255,61,242,.28);
  font-size:12px;
  font-style:normal;
  font-weight:900;
}

.quick-links{
  display:grid;
  gap:10px;
}

.quick-links a{
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
  color:#eadfff;
  font-weight:850;
}

.wide-cta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  margin:28px 0 34px;
  padding:28px;
  border-radius:26px;
  border:1px solid rgba(255,61,242,.3);
  background:
    radial-gradient(circle at 8% 0%,rgba(0,229,255,.1),transparent 18rem),
    rgba(13,8,29,.72);
  box-shadow:var(--shadow);
}

.wide-cta h2{
  margin:12px 0 8px;
  font-size:30px;
}

.wide-cta p{margin:0}

.page-hero{
  position:relative;
  overflow:hidden;
  padding:44px;
  margin-bottom:26px;
  border-radius:28px;
  border:1px solid rgba(255,61,242,.34);
  background:
    radial-gradient(circle at 82% 0%,rgba(0,229,255,.1),transparent 20rem),
    linear-gradient(135deg,rgba(17,10,38,.94),rgba(6,3,16,.9));
  box-shadow:var(--shadow);
}

.page-hero h1{
  margin-bottom:16px;
}

.page-hero p{
  max-width:780px;
  margin:0;
}

.browse-filter{
  display:grid;
  grid-template-columns:minmax(260px,1.15fr) 190px 190px auto;
  align-items:end;
  gap:14px;
  margin-top:28px;
  padding:16px;
  border-radius:22px;
  background:rgba(5,3,13,.48);
  border:1px solid rgba(255,255,255,.08);
}

.browse-filter label,
.field-label,
.file-field{
  display:grid;
  gap:7px;
}

.browse-filter label span,
.field-label span,
.file-field span{
  color:var(--muted);
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

input,
select,
textarea{
  width:100%;
  min-height:46px;
  color:var(--text);
  border:1px solid rgba(188,120,255,.24);
  border-radius:14px;
  background:linear-gradient(180deg,rgba(12,8,26,.98),rgba(7,5,18,.96));
  outline:0;
}

input,
textarea{
  padding:13px 14px;
}

select{
  padding:13px 38px 13px 14px;
  appearance:none;
  -webkit-appearance:none;
  background-image:
    linear-gradient(45deg,transparent 50%,var(--cyan) 50%),
    linear-gradient(135deg,var(--cyan) 50%,transparent 50%),
    linear-gradient(180deg,rgba(12,8,26,.98),rgba(7,5,18,.96));
  background-position:
    calc(100% - 18px) 21px,
    calc(100% - 12px) 21px,
    0 0;
  background-size:6px 6px,6px 6px,100% 100%;
  background-repeat:no-repeat;
}

select option{
  background:#090615;
  color:var(--text);
}

textarea{
  min-height:120px;
  resize:vertical;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(0,229,255,.45);
  box-shadow:0 0 0 3px rgba(0,229,255,.08);
}

.library-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
}

.library-top strong,
.library-top small{
  display:block;
}

.library-top strong{font-size:20px}
.library-top small{margin-top:4px;color:var(--muted);font-size:12px;font-weight:800}

.sort-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.sort-pills a{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  padding:0 12px;
  border-radius:999px;
  color:#eadfff;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.09);
  font-size:12px;
  font-weight:850;
}

.genre-grid,
.info-grid,
.premium-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:18px;
  margin-bottom:34px;
}

.genre-tile-clean,
.info-card{
  position:relative;
  overflow:hidden;
  min-height:138px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
  padding:24px 24px 24px 80px;
  border-radius:22px;
  border:1px solid rgba(255,61,242,.26);
  background:
    radial-gradient(circle at 90% 0%,rgba(0,229,255,.1),transparent 10rem),
    rgba(13,8,29,.74);
  box-shadow:0 18px 50px rgba(0,0,0,.28);
}

.info-card{
  padding-left:24px;
}

.genre-tile-clean:hover,
.info-card:hover{
  border-color:rgba(0,229,255,.35);
  transform:translateY(-2px);
}

.genre-tile-clean strong,
.info-card h2{
  color:#fff;
  font-size:20px;
}

.genre-tile-clean small,
.info-card p{
  color:var(--muted);
}

.latest-list{
  display:grid;
  gap:12px;
  margin-bottom:34px;
}

.latest-row{
  display:grid;
  grid-template-columns:64px 1fr auto;
  gap:14px;
  align-items:center;
  min-height:92px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(9,6,21,.72);
}

.series-detail{
  display:grid;
  grid-template-columns:330px minmax(0,1fr);
  gap:30px;
  margin-bottom:24px;
  padding:28px;
  border-radius:28px;
  border:1px solid rgba(255,61,242,.3);
  background:
    radial-gradient(circle at 80% 10%,rgba(139,34,255,.18),transparent 24rem),
    rgba(9,6,21,.78);
  box-shadow:var(--shadow);
}

.detail-cover{
  width:100%;
  max-height:520px;
  object-fit:cover;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 28px 80px rgba(0,0,0,.46);
}

.detail-copy h1{
  margin-top:16px;
}

.stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:22px 0 4px;
}

.stats span{
  min-height:82px;
  padding:14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.09);
  background:rgba(255,255,255,.04);
}

.stats strong,
.stats small{
  display:block;
}

.stats strong{
  color:#fff;
  font-size:24px;
}

.stats small{
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  font-weight:850;
}

.detail-layout,
.profile-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 420px;
  gap:24px;
  align-items:start;
}

.profile-summary-panel{
  grid-column:1/-1;
}

.panel.wide{width:100%}

.chapter-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(190px,1fr));
  gap:10px;
  max-height:760px;
  overflow:auto;
  padding-right:4px;
}

.chapter-grid a{
  padding:13px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);
}

.chapter-grid a:hover{
  border-color:rgba(0,229,255,.32);
}

.chapter-grid strong,
.chapter-grid small{
  display:block;
}

.chapter-grid small{
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
}

.stack-form{
  display:grid;
  gap:10px;
}

.checkbox-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
  color:var(--muted);
  line-height:1.5;
}

.checkbox-row input{
  width:auto;
  min-height:0;
  margin-top:5px;
}

.reader-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  padding:24px;
  margin-bottom:12px;
  border-radius:24px;
  border:1px solid rgba(255,61,242,.28);
  background:rgba(9,6,21,.78);
  box-shadow:var(--shadow);
}

.reader-top h1{
  font-size:clamp(34px,5vw,66px);
  margin-bottom:8px;
}

.reader-top p{margin:0}

.reader-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.text-link{
  color:#ff94fa;
  font-weight:900;
  font-size:13px;
}

.reader-progress{
  position:sticky;
  top:88px;
  z-index:20;
  height:6px;
  margin:12px 0;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden;
}

.reader-progress span{
  display:block;
  width:0;
  height:100%;
  background:linear-gradient(90deg,var(--purple),var(--pink),var(--cyan));
}

.reader-pages{
  width:min(920px,100%);
  margin:18px auto 34px;
  display:grid;
  gap:16px;
}

body[data-reader=wide] .reader-pages{
  width:min(1180px,100%);
}

.reader-page{
  min-height:720px;
  display:grid;
  place-items:center;
  text-align:center;
  padding:36px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.1);
  background:
    radial-gradient(circle at 50% 18%,rgba(255,255,255,.08),transparent 18rem),
    linear-gradient(135deg,rgba(139,34,255,.2),transparent),
    #080512;
  box-shadow:0 24px 80px rgba(0,0,0,.34);
}

.reader-page span{
  color:var(--cyan);
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.reader-page p{
  max-width:560px;
  margin:12px 0 0;
  font-size:22px;
}

.auth-card{
  width:min(660px,100%);
  margin:58px auto;
  padding:30px;
  border-radius:26px;
  border:1px solid rgba(255,61,242,.3);
  background:rgba(9,6,21,.78);
  box-shadow:var(--shadow);
}

.auth-card h1{
  font-size:clamp(44px,6vw,78px);
}

.big-search{
  display:flex;
  gap:10px;
  margin-top:24px;
}

.big-search input{
  flex:1;
}

.ad-slot,
.ad-placeholder{
  border:1px dashed rgba(0,229,255,.32);
  border-radius:18px;
  background:rgba(0,229,255,.06);
  padding:16px;
  margin:16px 0;
}

.ad-slot img{
  max-width:100%;
  border-radius:12px;
  margin-bottom:10px;
}

.ad-slot strong{
  display:block;
  color:#fff;
}

.ad-slot p{
  margin:6px 0 0;
  color:var(--muted);
}

.floating-ad{
  position:fixed;
  right:18px;
  bottom:18px;
  width:260px;
  z-index:60;
}

.ad-close{
  float:right;
  width:28px;
  height:28px;
  border:0;
  background:rgba(0,0,0,.5);
  color:#fff;
  border-radius:999px;
  cursor:pointer;
}

.reader-popup-ad{
  position:fixed;
  inset:0;
  z-index:80;
  background:rgba(0,0,0,.72);
  display:grid;
  place-items:center;
  padding:24px;
}

.reader-popup-ad[hidden]{
  display:none;
}

.reader-popup-ad .ad-slot{
  width:min(520px,100%);
  background:#100a24;
}

.site-footer{
  margin-top:30px;
  padding:38px 0 22px;
  border-top:1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 12% 0%,rgba(139,34,255,.14),transparent 20rem),
    rgba(2,1,7,.62);
}

.footer-grid{
  display:grid;
  grid-template-columns:1.8fr repeat(4,1fr);
  gap:28px;
}

.footer-grid h4{
  margin:0 0 12px;
  color:#fff;
}

.footer-grid p,
.footer-grid a{
  display:block;
  color:var(--muted);
  font-size:13px;
  line-height:1.9;
}

.footer-grid a:hover{
  color:#fff;
}

.copyright{
  width:min(1480px,calc(100% - 44px));
  margin:26px auto 0;
  color:#867696;
  text-align:center;
  font-size:12px;
}

.muted{
  color:var(--muted);
}

@media(max-width:1260px){
  .header-shell{
    grid-template-columns:240px 1fr;
  }

  .header-actions{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:1fr auto auto;
    padding-bottom:16px;
  }

  .top-search{width:100%}
  .home-layout,.detail-layout,.profile-grid{grid-template-columns:1fr}
  .home-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:18px}
  .browse-filter{grid-template-columns:1fr 180px 180px auto}
  .footer-grid{grid-template-columns:1.5fr repeat(2,1fr)}
}

@media(max-width:900px){
  .shell{width:min(100% - 28px,1480px)}
  .header-shell{display:flex;flex-direction:column;align-items:stretch;padding:12px 0 16px}
  .brand-logo-link{justify-content:center;min-width:0}
  .site-logo{width:230px;object-position:center}
  .nav{overflow:auto;justify-content:flex-start;flex-wrap:nowrap;padding-bottom:4px}
  .nav a{flex:0 0 auto}
  .header-actions{grid-template-columns:1fr 1fr}
  .top-search{grid-column:1/-1}
  .hero,.hero-empty{grid-template-columns:1fr}
  .hero-copy{padding:34px 24px}
  .hero-art{padding:28px}
  .clean-genres{grid-template-columns:repeat(2,1fr)}
  .cover-grid,.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .browse-filter{grid-template-columns:1fr}
  .library-top{align-items:flex-start;flex-direction:column}
  .home-sidebar{grid-template-columns:1fr}
  .series-detail{grid-template-columns:1fr}
  .detail-cover{max-width:360px}
  .stats{grid-template-columns:repeat(2,1fr)}
  .latest-row{grid-template-columns:58px 1fr}
  .latest-row em{grid-column:2;width:max-content}
  .reader-top{flex-direction:column}
  .floating-ad{display:none}
  .footer-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:540px){
  .cover-grid,.library-grid{grid-template-columns:1fr}
  .series-card{aspect-ratio:auto;min-height:360px}
  .page-hero{padding:30px 22px}
  .hero-art img{width:min(280px,88%)}
  .wide-cta{align-items:flex-start;flex-direction:column}
  .footer-grid{grid-template-columns:1fr}
  .book-stack{width:260px;height:330px}
}


/* === Reader focus tools and feature suggestions === */
body.raptor-reader-focus{
  --reader-zoom:1;
}

body.raptor-reader-focus .site-header{
  transform:translateY(-110%);
  opacity:0;
  pointer-events:none;
}

body.raptor-reader-focus.raptor-reader-show-header .site-header{
  transform:translateY(0);
  opacity:1;
  pointer-events:auto;
}

.reader-tool-dock{
  position:fixed;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  z-index:120;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.reader-tool-dock button,
.reader-tool-dock select,
.feature-suggest-button,
.feature-modal button{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(10,6,25,.92);
  color:#fff;
  border-radius:12px;
  min-height:38px;
  padding:8px 11px;
  font-weight:850;
  cursor:pointer;
  box-shadow:0 12px 34px rgba(0,0,0,.28);
}

.reader-tool-dock button:hover,
.feature-suggest-button:hover{
  border-color:rgba(0,229,255,.38);
  background:rgba(139,34,255,.22);
}

.reader-quick-menu{
  position:fixed;
  right:72px;
  top:50%;
  transform:translateY(-50%);
  z-index:121;
  width:min(360px,calc(100vw - 28px));
  border:1px solid rgba(255,61,242,.32);
  border-radius:18px;
  background:rgba(8,5,18,.96);
  box-shadow:0 24px 80px rgba(0,0,0,.48);
  padding:16px;
}

.reader-quick-menu[hidden]{
  display:none;
}

.reader-quick-menu h3{
  margin:0 0 10px;
  color:#fff;
}

.reader-quick-menu label{
  display:grid;
  gap:6px;
  color:#b9aacd;
  font-size:12px;
  font-weight:850;
  margin:10px 0;
}

.reader-quick-menu select,
.reader-quick-menu input[type="range"]{
  width:100%;
}

.reader-quick-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:10px;
}

body.raptor-reader-focus main img,
body.raptor-reader-focus .reader-page img,
body.raptor-reader-focus .manga-page img{
  transition:width .16s ease, transform .16s ease;
}

.feature-suggest-button{
  position:fixed;
  left:18px;
  bottom:18px;
  z-index:110;
  background:linear-gradient(135deg,rgba(139,34,255,.92),rgba(255,61,242,.72));
}

.feature-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:130;
  background:rgba(0,0,0,.68);
  display:grid;
  place-items:center;
  padding:18px;
}

.feature-modal-backdrop[hidden]{
  display:none;
}

.feature-modal{
  width:min(560px,100%);
  border:1px solid rgba(255,61,242,.34);
  border-radius:22px;
  background:rgba(9,6,21,.98);
  box-shadow:0 28px 90px rgba(0,0,0,.56);
  padding:22px;
}

.feature-modal h2{
  margin:0 0 10px;
}

.feature-modal p{
  color:#b9aacd;
}

.feature-modal input,
.feature-modal select,
.feature-modal textarea{
  width:100%;
  margin:8px 0;
  border:1px solid rgba(188,120,255,.24);
  background:#080512;
  color:#fff;
  border-radius:14px;
  padding:12px 13px;
}

.feature-modal textarea{
  min-height:120px;
  resize:vertical;
}

.feature-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
  margin-top:12px;
}

@media(max-width:760px){
  .reader-tool-dock{
    top:auto;
    right:12px;
    bottom:78px;
    transform:none;
    flex-direction:row;
    flex-wrap:wrap;
    max-width:calc(100vw - 24px);
    justify-content:flex-end;
  }

  .reader-quick-menu{
    right:12px;
    left:12px;
    top:auto;
    bottom:132px;
    transform:none;
    width:auto;
  }

  .feature-suggest-button{
    left:12px;
    bottom:12px;
  }
}

/* === Reader focus tools and feature suggestions === */
body.raptor-reader-focus{
  --reader-zoom:1;
}

body.raptor-reader-focus .site-header{
  transform:translateY(-110%);
  opacity:0;
  pointer-events:none;
}

body.raptor-reader-focus.raptor-reader-show-header .site-header{
  transform:translateY(0);
  opacity:1;
  pointer-events:auto;
}

.reader-tool-dock{
  position:fixed;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  z-index:120;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.reader-tool-dock button,
.reader-tool-dock select,
.feature-suggest-button,
.feature-modal button{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(10,6,25,.92);
  color:#fff;
  border-radius:12px;
  min-height:38px;
  padding:8px 11px;
  font-weight:850;
  cursor:pointer;
  box-shadow:0 12px 34px rgba(0,0,0,.28);
}

.reader-tool-dock button:hover,
.feature-suggest-button:hover{
  border-color:rgba(0,229,255,.38);
  background:rgba(139,34,255,.22);
}

.reader-quick-menu{
  position:fixed;
  right:72px;
  top:50%;
  transform:translateY(-50%);
  z-index:121;
  width:min(360px,calc(100vw - 28px));
  border:1px solid rgba(255,61,242,.32);
  border-radius:18px;
  background:rgba(8,5,18,.96);
  box-shadow:0 24px 80px rgba(0,0,0,.48);
  padding:16px;
}

.reader-quick-menu[hidden]{
  display:none;
}

.reader-quick-menu h3{
  margin:0 0 10px;
  color:#fff;
}

.reader-quick-menu label{
  display:grid;
  gap:6px;
  color:#b9aacd;
  font-size:12px;
  font-weight:850;
  margin:10px 0;
}

.reader-quick-menu select,
.reader-quick-menu input[type="range"]{
  width:100%;
}

.reader-quick-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:10px;
}

body.raptor-reader-focus main img,
body.raptor-reader-focus .reader-page img,
body.raptor-reader-focus .manga-page img{
  transition:width .16s ease, transform .16s ease;
}

.feature-suggest-button{
  position:fixed;
  left:18px;
  bottom:18px;
  z-index:110;
  background:linear-gradient(135deg,rgba(139,34,255,.92),rgba(255,61,242,.72));
}

.feature-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:130;
  background:rgba(0,0,0,.68);
  display:grid;
  place-items:center;
  padding:18px;
}

.feature-modal-backdrop[hidden]{
  display:none;
}

.feature-modal{
  width:min(560px,100%);
  border:1px solid rgba(255,61,242,.34);
  border-radius:22px;
  background:rgba(9,6,21,.98);
  box-shadow:0 28px 90px rgba(0,0,0,.56);
  padding:22px;
}

.feature-modal h2{
  margin:0 0 10px;
}

.feature-modal p{
  color:#b9aacd;
}

.feature-modal input,
.feature-modal select,
.feature-modal textarea{
  width:100%;
  margin:8px 0;
  border:1px solid rgba(188,120,255,.24);
  background:#080512;
  color:#fff;
  border-radius:14px;
  padding:12px 13px;
}

.feature-modal textarea{
  min-height:120px;
  resize:vertical;
}

.feature-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
  margin-top:12px;
}

@media(max-width:760px){
  .reader-tool-dock{
    top:auto;
    right:12px;
    bottom:78px;
    transform:none;
    flex-direction:row;
    flex-wrap:wrap;
    max-width:calc(100vw - 24px);
    justify-content:flex-end;
  }

  .reader-quick-menu{
    right:12px;
    left:12px;
    top:auto;
    bottom:132px;
    transform:none;
    width:auto;
  }

  .feature-suggest-button{
    left:12px;
    bottom:12px;
  }
}

/* === Reader progress bar fix: keep it out of the page/art area === */
.reader-progress{
  position:fixed !important;
  top:0 !important;
  left:0 !important;
  right:0 !important;
  z-index:9999 !important;
  width:100% !important;
  height:4px !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:0 !important;
  background:rgba(255,255,255,.08) !important;
  pointer-events:none !important;
  overflow:hidden !important;
  box-shadow:0 0 16px rgba(139,34,255,.26) !important;
}

.reader-progress span{
  display:block !important;
  height:100% !important;
  width:0;
  border-radius:0 !important;
  background:linear-gradient(90deg,#8b22ff,#ff3df2,#00e5ff) !important;
}

/* Keep reader pages clear from floating/progress UI */
.reader-pages{
  margin-top:22px !important;
}

/* Hide old read-mode/comfort/wide buttons if they appear in the reader header */
.reader-toggle,
button[data-mode="comfort"],
button[data-mode="wide"]{
  display:none !important;
}

/* Keep the side reader tool dock from covering mobile page art */
@media(max-width:760px){
  .reader-tool-dock{
    bottom:16px !important;
    right:12px !important;
    left:auto !important;
    max-width:calc(100vw - 24px) !important;
  }

  .reader-pages{
    padding-bottom:86px !important;
  }
}

/* === Reader progress bar fix: keep it out of the page/art area === */
.reader-progress{
  position:fixed !important;
  top:0 !important;
  left:0 !important;
  right:0 !important;
  z-index:9999 !important;
  width:100% !important;
  height:4px !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:0 !important;
  background:rgba(255,255,255,.08) !important;
  pointer-events:none !important;
  overflow:hidden !important;
  box-shadow:0 0 16px rgba(139,34,255,.26) !important;
}

.reader-progress span{
  display:block !important;
  height:100% !important;
  width:0;
  border-radius:0 !important;
  background:linear-gradient(90deg,#8b22ff,#ff3df2,#00e5ff) !important;
}

/* Keep reader pages clear from floating/progress UI */
.reader-pages{
  margin-top:22px !important;
}

/* Hide old read-mode/comfort/wide buttons if they appear in the reader header */
.reader-toggle,
button[data-mode="comfort"],
button[data-mode="wide"]{
  display:none !important;
}

/* Keep the side reader tool dock from covering mobile page art */
@media(max-width:760px){
  .reader-tool-dock{
    bottom:16px !important;
    right:12px !important;
    left:auto !important;
    max-width:calc(100vw - 24px) !important;
  }

  .reader-pages{
    padding-bottom:86px !important;
  }
}

/* === Reader comments, chapter navigation, themes, and music === */
.feature-suggest-button,
.feature-modal-backdrop{
  display:none !important;
}

.reader-enhanced-shell{
  width:min(980px,100%);
  margin:22px auto;
}

.reader-bottom-nav,
.reader-comments,
.reader-music-panel,
.reader-theme-panel{
  width:min(980px,100%);
  margin:18px auto;
  border:1px solid rgba(255,61,242,.28);
  border-radius:22px;
  background:rgba(9,6,21,.82);
  box-shadow:0 18px 54px rgba(0,0,0,.30);
  padding:18px;
}

.reader-bottom-nav{
  display:grid;
  grid-template-columns:auto minmax(180px,1fr) auto;
  gap:12px;
  align-items:center;
}

.reader-bottom-nav select,
.reader-comment-form input,
.reader-comment-form textarea,
.reader-theme-panel select{
  width:100%;
  border:1px solid rgba(188,120,255,.24);
  background:#080512;
  color:#fff;
  border-radius:14px;
  padding:12px 13px;
}

.reader-comments h2,
.reader-music-panel h2,
.reader-theme-panel h2{
  margin:0 0 12px;
}

.reader-comment-list{
  display:grid;
  gap:10px;
  margin-bottom:16px;
}

.reader-comment{
  display:grid;
  grid-template-columns:42px 1fr;
  gap:10px;
  padding:12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(255,255,255,.035);
}

.reader-comment-emoji{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:rgba(139,34,255,.16);
  font-size:22px;
}

.reader-comment strong{
  color:#fff;
}

.reader-comment small{
  display:block;
  margin-top:2px;
  color:#b9aacd;
  font-size:12px;
}

.reader-comment p{
  margin:7px 0 0;
}

.reader-comment-form{
  display:grid;
  gap:10px;
}

.reader-emoji-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.reader-emoji-row button{
  width:38px;
  height:38px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  background:rgba(255,255,255,.05);
  color:#fff;
  cursor:pointer;
  font-size:20px;
}

.reader-emoji-row button.active{
  border-color:rgba(0,229,255,.44);
  background:rgba(0,229,255,.12);
}

.reader-music-panel audio{
  width:100%;
  margin-top:8px;
}

.reader-tool-dock.is-hidden,
.reader-quick-menu.is-hidden{
  display:none !important;
}

.reader-tools-restore{
  position:fixed;
  right:14px;
  bottom:14px;
  z-index:122;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(10,6,25,.92);
  color:#fff;
  border-radius:14px;
  min-height:40px;
  padding:8px 12px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 12px 34px rgba(0,0,0,.28);
}

.reader-tools-restore[hidden]{
  display:none !important;
}

body.reader-theme-purple{
  background:
    radial-gradient(circle at 12% -10%,rgba(139,34,255,.30),transparent 34rem),
    radial-gradient(circle at 92% 10%,rgba(255,61,242,.16),transparent 30rem),
    #05030d !important;
}

body.reader-theme-white{
  background:#f6f2ea !important;
  color:#1c1722 !important;
}

body.reader-theme-white .reader-page,
body.reader-theme-white .reader-comments,
body.reader-theme-white .reader-bottom-nav,
body.reader-theme-white .reader-music-panel,
body.reader-theme-white .reader-theme-panel{
  background:#fffaf0 !important;
  color:#1c1722 !important;
  border-color:rgba(45,35,18,.18) !important;
}

body.reader-theme-white p,
body.reader-theme-white small,
body.reader-theme-white .muted{
  color:#51485a !important;
}

body.reader-theme-white input,
body.reader-theme-white select,
body.reader-theme-white textarea{
  background:#ffffff !important;
  color:#1c1722 !important;
}

body.reader-theme-yellow{
  background:
    radial-gradient(circle at 20% 0%,rgba(255,209,102,.28),transparent 32rem),
    linear-gradient(180deg,#211404,#090504) !important;
}

body.reader-theme-yellow .reader-page,
body.reader-theme-yellow .reader-comments,
body.reader-theme-yellow .reader-bottom-nav,
body.reader-theme-yellow .reader-music-panel,
body.reader-theme-yellow .reader-theme-panel{
  border-color:rgba(255,209,102,.34) !important;
  background:rgba(30,18,6,.88) !important;
}

@media(max-width:760px){
  .reader-bottom-nav{
    grid-template-columns:1fr;
  }

  .reader-comments,
  .reader-bottom-nav,
  .reader-music-panel,
  .reader-theme-panel{
    border-radius:18px;
    padding:14px;
  }
}

/* === Profile-linked reader comments and chapter reaction overview === */
.reader-engagement-final{
  width:min(980px,100%);
  margin:20px auto 36px;
  display:grid;
  gap:18px;
}

.chapter-reaction-panel,
.profile-comment-panel{
  border:1px solid rgba(255,61,242,.28);
  border-radius:22px;
  background:rgba(9,6,21,.84);
  box-shadow:0 18px 54px rgba(0,0,0,.30);
  padding:18px;
}

.chapter-reaction-panel h2,
.profile-comment-panel h2{
  margin:0 0 8px;
}

.reaction-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}

.reaction-button{
  min-height:82px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:16px;
  background:rgba(255,255,255,.045);
  color:#fff;
  cursor:pointer;
  font-weight:900;
  transition:.16s ease;
}

.reaction-button:hover{
  transform:translateY(-2px);
  border-color:rgba(0,229,255,.36);
  background:rgba(0,229,255,.08);
}

.reaction-button.active{
  border-color:rgba(255,61,242,.62);
  background:linear-gradient(135deg,rgba(139,34,255,.38),rgba(255,61,242,.20));
  box-shadow:0 14px 34px rgba(139,34,255,.25);
}

.reaction-button .emoji{
  font-size:25px;
  line-height:1;
}

.reaction-button .label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.reaction-button .count{
  color:#b9aacd;
  font-size:12px;
}

.profile-comment-list{
  display:grid;
  gap:10px;
  margin:14px 0;
}

.profile-comment{
  display:grid;
  grid-template-columns:44px 1fr;
  gap:12px;
  padding:12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(255,255,255,.035);
}

.profile-comment-avatar{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:linear-gradient(135deg,#8b22ff,#ff3df2);
  color:#fff;
  font-weight:950;
}

.profile-comment strong{
  color:#fff;
}

.profile-comment small{
  display:block;
  margin-top:2px;
  color:#b9aacd;
  font-size:12px;
}

.profile-comment p{
  margin:7px 0 0;
}

.profile-comment-form{
  display:grid;
  gap:10px;
}

.profile-comment-form textarea{
  width:100%;
  min-height:110px;
  border:1px solid rgba(188,120,255,.24);
  background:#080512;
  color:#fff;
  border-radius:14px;
  padding:12px 13px;
}

.comment-login-box{
  padding:16px;
  border:1px solid rgba(0,229,255,.22);
  border-radius:16px;
  background:rgba(0,229,255,.06);
}

.comment-login-box .hero-actions{
  margin-top:12px;
}

body.reader-theme-white .chapter-reaction-panel,
body.reader-theme-white .profile-comment-panel,
body.reader-theme-white .profile-comment{
  background:#fffaf0 !important;
  color:#1c1722 !important;
  border-color:rgba(45,35,18,.18) !important;
}

body.reader-theme-white .reaction-button{
  background:#fff !important;
  color:#1c1722 !important;
  border-color:rgba(45,35,18,.16) !important;
}

body.reader-theme-white .profile-comment strong{
  color:#1c1722 !important;
}

@media(max-width:820px){
  .reaction-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:480px){
  .reaction-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* === Profile-linked reader comments and chapter reaction overview === */
.reader-engagement-final{
  width:min(980px,100%);
  margin:20px auto 36px;
  display:grid;
  gap:18px;
}

.chapter-reaction-panel,
.profile-comment-panel{
  border:1px solid rgba(255,61,242,.28);
  border-radius:22px;
  background:rgba(9,6,21,.84);
  box-shadow:0 18px 54px rgba(0,0,0,.30);
  padding:18px;
}

.chapter-reaction-panel h2,
.profile-comment-panel h2{
  margin:0 0 8px;
}

.reaction-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}

.reaction-button{
  min-height:82px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  border:1px solid rgba(255,255,255,.11);
  border-radius:16px;
  background:rgba(255,255,255,.045);
  color:#fff;
  cursor:pointer;
  font-weight:900;
  transition:.16s ease;
}

.reaction-button:hover{
  transform:translateY(-2px);
  border-color:rgba(0,229,255,.36);
  background:rgba(0,229,255,.08);
}

.reaction-button.active{
  border-color:rgba(255,61,242,.62);
  background:linear-gradient(135deg,rgba(139,34,255,.38),rgba(255,61,242,.20));
  box-shadow:0 14px 34px rgba(139,34,255,.25);
}

.reaction-button .emoji{
  font-size:25px;
  line-height:1;
}

.reaction-button .label{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.reaction-button .count{
  color:#b9aacd;
  font-size:12px;
}

.profile-comment-list{
  display:grid;
  gap:10px;
  margin:14px 0;
}

.profile-comment{
  display:grid;
  grid-template-columns:44px 1fr;
  gap:12px;
  padding:12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  background:rgba(255,255,255,.035);
}

.profile-comment-avatar{
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:linear-gradient(135deg,#8b22ff,#ff3df2);
  color:#fff;
  font-weight:950;
}

.profile-comment strong{
  color:#fff;
}

.profile-comment small{
  display:block;
  margin-top:2px;
  color:#b9aacd;
  font-size:12px;
}

.profile-comment p{
  margin:7px 0 0;
}

.profile-comment-form{
  display:grid;
  gap:10px;
}

.profile-comment-form textarea{
  width:100%;
  min-height:110px;
  border:1px solid rgba(188,120,255,.24);
  background:#080512;
  color:#fff;
  border-radius:14px;
  padding:12px 13px;
}

.comment-login-box{
  padding:16px;
  border:1px solid rgba(0,229,255,.22);
  border-radius:16px;
  background:rgba(0,229,255,.06);
}

.comment-login-box .hero-actions{
  margin-top:12px;
}

body.reader-theme-white .chapter-reaction-panel,
body.reader-theme-white .profile-comment-panel,
body.reader-theme-white .profile-comment{
  background:#fffaf0 !important;
  color:#1c1722 !important;
  border-color:rgba(45,35,18,.18) !important;
}

body.reader-theme-white .reaction-button{
  background:#fff !important;
  color:#1c1722 !important;
  border-color:rgba(45,35,18,.16) !important;
}

body.reader-theme-white .profile-comment strong{
  color:#1c1722 !important;
}

@media(max-width:820px){
  .reaction-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:480px){
  .reaction-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* === FINAL reader cleanup: profile comments, reactions, themes, zoom === */
.feature-suggest-button,
.feature-modal-backdrop,
.reader-theme-panel,
.reader-comments{
  display:none !important;
}

.reader-engagement-final:not(.reader-engagement-v2){
  display:none !important;
}

.reader-engagement-v2{
  width:min(1040px,100%);
  margin:18px auto 42px;
  display:grid;
  gap:20px;
}

.chapter-reaction-strip{
  padding:18px 0 6px;
  border:0;
  background:transparent;
  box-shadow:none;
}

.chapter-reaction-strip h2{
  margin:0 0 6px;
  font-size:30px;
}

.chapter-reaction-strip p{
  margin:0 0 14px;
}

.reaction-grid-v2{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:14px;
}

.reaction-button-v2{
  min-height:118px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:24px;
  background:
    radial-gradient(circle at 50% 0%,rgba(255,255,255,.09),transparent 4rem),
    rgba(13,8,29,.78);
  color:#fff;
  cursor:pointer;
  font-weight:950;
  box-shadow:0 18px 50px rgba(0,0,0,.24);
  transition:.16s ease;
}

.reaction-button-v2:hover{
  transform:translateY(-3px);
  border-color:rgba(0,229,255,.45);
  background:rgba(0,229,255,.08);
}

.reaction-button-v2.active{
  border-color:rgba(255,61,242,.75);
  background:linear-gradient(135deg,rgba(139,34,255,.48),rgba(255,61,242,.24));
  box-shadow:0 18px 54px rgba(139,34,255,.32);
}

.reaction-button-v2 .emoji{
  font-size:38px;
  line-height:1;
}

.reaction-button-v2 .label{
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.reaction-button-v2 .count{
  color:#b9aacd;
  font-size:13px;
}

.profile-comment-panel-v2{
  border:1px solid rgba(255,61,242,.28);
  border-radius:24px;
  background:rgba(9,6,21,.84);
  box-shadow:0 18px 54px rgba(0,0,0,.30);
  padding:20px;
}

.profile-comment-panel-v2 h2{
  margin:0 0 8px;
  font-size:28px;
}

.profile-comment-list-v2{
  display:grid;
  gap:10px;
  margin:16px 0;
}

.profile-comment-v2{
  display:grid;
  grid-template-columns:46px 1fr;
  gap:12px;
  padding:13px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:17px;
  background:rgba(255,255,255,.035);
}

.profile-comment-avatar-v2{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:linear-gradient(135deg,#8b22ff,#ff3df2);
  color:#fff;
  font-weight:950;
}

.profile-comment-v2 strong{
  color:#fff;
}

.profile-comment-v2 small{
  display:block;
  margin-top:2px;
  color:#b9aacd;
  font-size:12px;
}

.profile-comment-v2 p{
  margin:7px 0 0;
}

.profile-comment-emoji-v2{
  margin-right:6px;
  font-size:18px;
}

.profile-comment-form-v2{
  display:grid;
  gap:10px;
}

.profile-comment-form-v2 textarea{
  width:100%;
  min-height:112px;
  border:1px solid rgba(188,120,255,.24);
  background:#080512;
  color:#fff;
  border-radius:14px;
  padding:12px 13px;
}

.comment-emoji-picker-v2{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.comment-emoji-picker-v2 button{
  width:42px;
  height:42px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:14px;
  background:rgba(255,255,255,.05);
  color:#fff;
  cursor:pointer;
  font-size:22px;
}

.comment-emoji-picker-v2 button.active{
  border-color:rgba(0,229,255,.5);
  background:rgba(0,229,255,.12);
}

.comment-login-box-v2{
  padding:16px;
  border:1px solid rgba(0,229,255,.24);
  border-radius:18px;
  background:rgba(0,229,255,.07);
}

.reader-quick-menu .reader-menu-extra{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.09);
}

.reader-quick-menu .reader-menu-extra label{
  display:grid;
  gap:7px;
  margin:10px 0;
  color:#b9aacd;
  font-size:12px;
  font-weight:850;
}

.reader-quick-menu .reader-menu-extra select,
.reader-quick-menu .reader-menu-extra input{
  width:100%;
  border:1px solid rgba(188,120,255,.24);
  background:#080512;
  color:#fff;
  border-radius:12px;
  padding:9px 10px;
}

.reader-size-row{
  display:grid;
  grid-template-columns:1fr 82px;
  gap:8px;
  align-items:center;
}

body.reader-theme-purple{
  background:
    radial-gradient(circle at 12% -10%,rgba(139,34,255,.30),transparent 34rem),
    radial-gradient(circle at 92% 10%,rgba(255,61,242,.16),transparent 30rem),
    #05030d !important;
}

body.reader-theme-white{
  background:#f6f2ea !important;
  color:#1c1722 !important;
}

body.reader-theme-yellow{
  background:
    radial-gradient(circle at 20% 0%,rgba(255,209,102,.28),transparent 32rem),
    linear-gradient(180deg,#211404,#090504) !important;
}

body.reader-theme-black{
  background:#000 !important;
}

body.reader-theme-blue{
  background:
    radial-gradient(circle at 20% 0%,rgba(0,229,255,.18),transparent 30rem),
    linear-gradient(180deg,#03162a,#02040b) !important;
}

body.reader-theme-green{
  background:
    radial-gradient(circle at 18% 0%,rgba(47,255,212,.18),transparent 30rem),
    linear-gradient(180deg,#031f18,#020806) !important;
}

body.reader-theme-pink{
  background:
    radial-gradient(circle at 18% 0%,rgba(255,61,242,.20),transparent 30rem),
    linear-gradient(180deg,#26051d,#08020a) !important;
}

body.reader-theme-gray{
  background:linear-gradient(180deg,#17171c,#050506) !important;
}

body.reader-theme-sepia{
  background:
    radial-gradient(circle at 18% 0%,rgba(180,120,60,.24),transparent 30rem),
    linear-gradient(180deg,#2a1a0c,#080402) !important;
}

body.reader-theme-white .reader-page,
body.reader-theme-white .profile-comment-panel-v2,
body.reader-theme-white .profile-comment-v2,
body.reader-theme-white .reaction-button-v2{
  background:#fffaf0 !important;
  color:#1c1722 !important;
  border-color:rgba(45,35,18,.18) !important;
}

body.reader-theme-white .profile-comment-v2 strong,
body.reader-theme-white .chapter-reaction-strip h2,
body.reader-theme-white .profile-comment-panel-v2 h2{
  color:#1c1722 !important;
}

body.reader-theme-white p,
body.reader-theme-white small,
body.reader-theme-white .muted{
  color:#51485a !important;
}

body.reader-theme-white textarea,
body.reader-theme-white select,
body.reader-theme-white input{
  background:#fff !important;
  color:#1c1722 !important;
}

body.reader-theme-yellow .reader-page,
body.reader-theme-yellow .profile-comment-panel-v2,
body.reader-theme-yellow .profile-comment-v2,
body.reader-theme-yellow .reaction-button-v2{
  border-color:rgba(255,209,102,.34) !important;
  background:rgba(30,18,6,.88) !important;
}

.reader-pages{
  max-width:calc(920px * var(--reader-scale, 1)) !important;
}

.reader-page img{
  transition:width .16s ease, max-width .16s ease;
}

@media(max-width:900px){
  .reaction-grid-v2{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:520px){
  .reaction-grid-v2{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .reaction-button-v2{
    min-height:100px;
  }
}
