:root{
  --bg1:#2b0f45;
  --bg2:#0b0b0f;
  --panel: rgba(18,18,24,0.92);
  --text:#eaeaf0;
  --muted:#b5b5c5;
  --accent:#b45cff;
  --accent2:#8b3cff;
  --shadow: 0 18px 50px rgba(0,0,0,0.55);
  --shadow2: 0 30px 90px rgba(0,0,0,0.65);
  --radius: 22px;
}

*{ margin:0; padding:0; box-sizing:border-box; }
body{
  font-family: "Rajdhani", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top left, var(--bg1), var(--bg2) 45%);
  color: var(--text);
  line-height:1.55;
  position: relative;
}



/* Sakura overlay */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: url("assets/sakurabg.webp") center center / cover no-repeat;
  pointer-events: none;      /* clicks pass through */
  opacity: 0.9;             /* adjust strength */
  z-index: 0;
}

/* keep page content above overlay */
body > *{
  position: relative;
  z-index: 1;
}

a{ text-decoration:none; color:inherit; }
img{ max-width:100%; display:block; border-radius:16px; }
.container{ width:95%; max-width:1200px; margin:0 auto; }
.muted{ color:var(--muted); }
.thin{ font-weight: 400; }
.small{ font-size: 13px; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace; }

.logo{ width: 150px !important; border-radius: 0; }

/* Skeleton loading */
.skeleton .card-title{ opacity: 0.85; }
.skeleton-line{
  color: transparent !important;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  height: 14px;
  width: 75%;
  position: relative;
  overflow: hidden;
}
.skeleton-line::after{
  content:"";
  position:absolute; inset:0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer{ 100% { transform: translateX(100%); } }

.header{
  position: sticky; top:0; z-index:100;
  background: rgba(18,18,24,0.90);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap: 12px;
  padding: 12px 0;
}

.brand{ display:flex; align-items:center; gap:12px; }

/* small fix: keep right buttons grouped */
.header-actions{
  display:flex;
  align-items:center;
  gap: 8px;
}

.iconbtn{
  width: 42px; height: 42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  padding:0;
  line-height:1;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-weight: 700;
  cursor:pointer;
  transition: 0.2s;
}
.iconbtn:hover{ transform: translateY(-1px); border-color: rgba(180,92,255,0.25); }

/* Search: button sits inside input area */
.top-search{
  position: relative;
  flex: 1;
  max-width: 720px;
}
.top-search input{
  width: 100%;
  padding: 12px 54px 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color:#fff;
  outline:none;
  font-weight: 500;
}
.top-search input:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(180,92,255,0.12);
}
.iconbtn-in{
  position:absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background-color: linear-gradient(135deg, var(--accent), var(--accent2)) !important;
}

/* suggestions */
.suggest{
  display:none;
  position:absolute;
  top: 54px;
  left: 0;
  width: 100%;
  background: rgba(18,18,24,0.96);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow:hidden;
  box-shadow: var(--shadow);
}
.suggest-item{
  padding: 10px 12px;
  cursor:pointer;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.suggest-item:hover{ background: rgba(255,255,255,0.06); }

/* Filters panel */
.filters{
  display:none;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(18,18,24,0.88);
}
.filters.open{ display:block; }
.filters-inner{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items:flex-end;
  padding: 12px 0 14px;
}
.fgroup{ display:flex; flex-direction:column; gap: 6px; }
.fgroup label{ font-size: 12px; color: rgba(255,255,255,0.75); font-weight: 500; }
.fgroup select{
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color:#fff;
  font-weight: 500;
  min-width: 190px;
}
.factions{ display:flex; gap: 10px; flex-wrap: wrap; }

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 11px 16px;
  border-radius: 14px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  transition: 0.2s;
}
.btn.primary{
  border:none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.btn.ghost{ background: rgba(255,255,255,0.06); }
.btn:hover{ transform: translateY(-1px); opacity:0.94; }
.btn.disabled{ opacity: 0.45; pointer-events:none; }

.main{ padding: 10px 0 34px; }
.layout{
  display:grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items:start;
}
.layout.noside{ grid-template-columns: 1fr; }
.layout > .content{min-width:0}

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 12px;
  margin: 18px 0 14px;
}
.section-head h2{ font-size: 22px; font-weight: 700; }

.alert{
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(180,92,255,0.10);
  border: 1px solid rgba(180,92,255,0.25);
  box-shadow: 0 12px 35px rgba(0,0,0,0.45);
}

/* HERO: anchor character to bottom, let head overflow up */
.hero{
  margin: 18px 0;
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow2);
  overflow: visible;
  position: relative;
}
.hero::before{
  content:"";
  position:absolute; inset:0;
  border-radius: calc(var(--radius) + 10px);
  background:
    linear-gradient(135deg, rgba(180,92,255,0.22), rgba(18,18,24,0.96)),
    var(--bg);
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-inner{
  position: relative;
  z-index: 1;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: end;
  padding: 10px;
}
.kicker{
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  margin-bottom: 8px;
}
.hero-left h1{ font-size: 36px; font-weight: 700; line-height: 1.12; margin-bottom: 8px; }
.hero-left p{ color: rgba(255,255,255,0.85); font-weight: 400; max-width: 70ch; }
.hero-ctas{ margin-top: 14px; display:flex; gap: 10px; flex-wrap: wrap; }

.hero-left {
  padding-top: 40px;
  padding-bottom: 40px;
}


.hero-inner h1{
  font-size: 7vh;
  line-height: -1;
}

.hero-right{
  position: relative;
  min-height: 320px;
}
.hero-char{
  position: absolute;
  right: 0;
  bottom: -10px;
  max-height: 420px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 70px rgba(0,0,0,0.7));
}

/* Banner */
.banner{
  margin: 22px 0;
  border-radius: calc(var(--radius) + 10px);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: visible;
  position: relative;
}
.banner::before{
  content:"";
  position:absolute; inset:0;
  border-radius: calc(var(--radius) + 10px);
  background:
    linear-gradient(135deg, rgba(180,92,255,0.18), rgba(18,18,24,0.96)),
    var(--bg);
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.banner-inner{
  position: relative;
  z-index: 1;
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: end;
  padding: 18px 22px;
}

.banner-left{
  padding-bottom: 30px;
}
.banner.small .banner-inner{ padding: 14px 22px; }
.banner-left h1{ font-size: 30px; font-weight: 700; }
.banner-left p{ color: rgba(255,255,255,0.85); font-weight: 400; }
.banner-right{ position: relative; min-height: 220px; }
.banner-char{
  position:absolute;
  right: 0;
  bottom: -8px;
  max-height: 340px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 70px rgba(0,0,0,0.7));
}

/* Trend strip (if you already had it, keep yours) */
.trend-strip{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0 4px;
}
.trend-chip{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  font-weight: 600;
  font-size: 13px;
  transition: 0.2s;
}
.trend-chip:hover{
  transform: translateY(-1px);
  border-color: rgba(180,92,255,0.28);
  background: rgba(180,92,255,0.12);
}

/* GRID */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 18px;
}
.latest-grid{
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

/* Cards */
.card{
  background: var(--panel);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.06);
  transition: 0.25s;
}
.card:hover{
  transform: translateY(-6px);
  border-color: rgba(180,92,255,0.25);
  box-shadow: 0 28px 70px rgba(0,0,0,0.65);
}
.card-img{ position: relative; }
.card-img img{ width:100%; height: 250px; object-fit: cover; }

.card-pill{
  position:absolute;
  top: 10px; left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.55);
}
.card-pill.new{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
}
.card-pill.upd{
  background: rgb(179, 92, 255);
  border-color: rgba(180,92,255,0.35);
}
.card-pill.off{ opacity:0; pointer-events:none; }

.card-top-right{
  position:absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}

.fav-btn{
  width: 38px; height: 38px;
  display:grid;
  place-items:center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(12,12,18,0.74);
  color: rgba(255,255,255,0.92);
  font: 900 17px/1 system-ui, sans-serif;
  cursor:pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,0.40);
  backdrop-filter: blur(10px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.fav-btn:hover{
  transform: translateY(-1px) scale(1.04);
  border-color: rgba(255,255,255,0.30);
  background: rgba(24,24,32,0.88);
}
.fav-btn.on{
  background: linear-gradient(135deg, #ff3d77, #b35cff);
  border-color: rgba(255,255,255,0.22);
  color:#fff;
  box-shadow: 0 12px 30px rgba(255,61,119,0.28);
}
.fav-btn:disabled{
  opacity:.65;
  cursor:wait;
  transform:none;
}

.card-info{ padding: 12px; }
.card-title{ font-weight: 700; font-size: 15px; line-height: 1.1; }
.card-sub{ margin-top: 6px; font-weight: 400; color: var(--muted); font-size: 13px; }
.card-sub.ready{ opacity: 0.95; }

/* Rating placeholders */
.card-rating{
  margin-top: 6px;
  display:flex;
  align-items:center;
  gap: 8px;
}
.stars{
  letter-spacing: 1px;
  font-size: 12px;
  opacity: 0.85;
}
.stars-on{ color:#c993ff; text-shadow:0 0 10px rgba(180,92,255,.35); }
.stars-off{ color:rgba(255,255,255,.24); }
.rating-text{
  font-size: 12px;
}

.pagination{
  margin-top: 16px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 12px;
}
.page-btn{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(180,92,255,0.40);
  background: rgba(18,18,24,0.85);
  font-weight: 600;
  transition: 0.2s;
}
.page-btn:hover{ background: rgba(180,92,255,0.18); transform: translateY(-1px); }
.page-btn.disabled{ opacity:0.45; pointer-events:none; }
.page-num{ color: var(--accent); font-weight: 700; min-width: 36px; text-align:center; }

/* sidebar */
.sidebar{
  position: sticky;
  top: 92px;
  display:flex;
  flex-direction: column;
  gap: 14px;
}
.side-card{
  background: var(--panel);
  border-radius: calc(var(--radius) + 6px);
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow);
}
.side-title{ font-weight: 700; font-size: 18px; margin-bottom: 10px; }
.mini-list{ display:flex; flex-direction:column; gap: 10px; }
.mini-item{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 8px;
  border-radius: 14px;
  transition: 0.2s;
}
.mini-item:hover{ background: rgba(255,255,255,0.06); transform: translateY(-1px); }
.mini-item img{
  width: 52px; height: 72px;
  object-fit: cover;
  border-radius: 12px;
}
.mini-title{ font-weight: 600; line-height: 1.1; }
.mini-sub{ font-size: 12px; }

/* detail */
.detail{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  background: var(--panel);
  border-radius: calc(var(--radius) + 8px);
  padding: 18px;
  box-shadow: var(--shadow2);
  border: 1px solid rgba(255,255,255,0.06);
}
.detail-cover{ position:relative; }
.detail-cover img{ width:100%; height: 380px; object-fit: cover; border: 1px solid rgba(255,255,255,0.06); }
.detail-fav{ position:absolute; top: 12px; right: 12px; }

.fav-big{
  width: 48px; height: 48px;
  display:grid;
  place-items:center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(12,12,18,0.78);
  color: rgba(255,255,255,0.94);
  font: 900 21px/1 system-ui, sans-serif;
  cursor:pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.42);
  backdrop-filter: blur(10px);
  transition: .18s ease;
}
.fav-big.on{
  background: linear-gradient(135deg, #ff3d77, #b35cff);
  border-color: rgba(255,255,255,0.22);
  color:#fff;
  box-shadow: 0 12px 34px rgba(255,61,119,.30);
}

.title{ font-size: 28px; font-weight: 700; line-height: 1.12; }
.detail-top{ display:flex; justify-content:space-between; gap: 12px; flex-wrap: wrap; }
.chips{ display:flex; gap: 10px; flex-wrap: wrap; }
.chip{
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  font-weight: 700;
  font-size: 12px;
}
.chip.soft{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  font-weight: 600;
}
.rating-chip{
  display:inline-flex;
  gap: 8px;
  align-items:center;
}

.tags{ margin-top: 10px; display:flex; gap: 8px; flex-wrap: wrap; }
.tag{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  font-weight: 600;
  font-size: 12px;
}
.desc{
  margin-top: 10px;
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  white-space: normal;
  overflow-wrap: anywhere;
}
.detail-actions{
  display:flex;
  align-items:stretch;
  gap:10px;
  margin-top:18px;
  flex-wrap:wrap;
}
.detail-start{
  min-height:54px;
  gap:11px;
  padding:9px 18px;
  text-align:left;
}
.detail-start-icon{font-size:16px;line-height:1}
.detail-start-copy{display:grid;gap:2px;line-height:1.08}
.detail-start-copy small{font-size:11px;font-weight:600;color:rgba(255,255,255,.78)}
.detail-chapters-link{min-height:54px}

/* chapters */
.chapter-box{
  margin-top: 16px;
  background: var(--panel);
  border-radius: calc(var(--radius) + 8px);
  padding: 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.06);
  scroll-margin-top:90px;
}
.chapter-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  transition: 0.2s;
}
.chapter-row:hover{ background: rgba(255,255,255,0.06); transform: translateY(-1px); }
.chapter-left{ min-width:0; }
.chapter-title{ font-weight: 700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chapter-sub{ margin-top: 4px; font-size: 13px; font-weight: 400; }
.chapter-right{ flex:0 0 auto; color: rgba(255,255,255,.78); font-weight:700; }
.badge-new{
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

/* chapter pill links under cards */
.chap-links{
  margin-top: 10px;
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chaplink{
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  font-weight: 600;
  font-size: 12px;
  transition: 0.2s;
}
.chaplink:hover{
  transform: translateY(-1px);
  border-color: rgba(180,92,255,0.25);
  background: rgba(180,92,255,0.12);
}

/* comments */
.comments-box{
  margin-top: 16px;
  background: var(--panel);
  border-radius: calc(var(--radius) + 8px);
  padding: 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.06);
}
.comment-form{ display:flex; flex-direction:column; gap: 10px; margin-top: 10px; }
.comment-form textarea{
  min-height: 110px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  outline:none;
  font-weight: 400;
}
.comment-item{
  display:grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.comment-item:first-child{ margin-top: 10px; }
.comment-item img{
  width:42px;
  height:42px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255,255,255,0.08);
}
.comment-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.comment-main{min-width:0}
.comment-body{
  margin-top: 4px;
  color: rgba(255,255,255,0.9);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.comment-actions{display:flex;align-items:center;gap:12px;margin-top:8px}
.comment-action{appearance:none;border:0;background:none;color:#cba4ff;padding:2px 0;font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.comment-action:hover{text-decoration:underline}.comment-action.danger{color:#ff91ad}.comment-action:disabled{opacity:.45;cursor:wait}
.comment-replies{margin:10px 0 0 8px;padding-left:18px;border-left:2px solid rgba(180,92,255,.22)}
.comment-reply-item{grid-template-columns:34px 1fr;padding:10px 0}.comment-reply-item img{width:34px;height:34px;border-radius:11px}
.comment-item.is-deleted .comment-body{color:var(--muted)}
.comment-reply-editor{display:grid;gap:8px;margin-top:10px;padding:10px;border-radius:13px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.08)}
.comment-reply-editor textarea{width:100%;resize:vertical;min-height:76px;padding:10px 11px;border-radius:11px;background:rgba(0,0,0,.2);border:1px solid rgba(255,255,255,.13);color:#fff;font:inherit;outline:none}
.comment-reply-editor textarea:focus{border-color:rgba(180,92,255,.65);box-shadow:0 0 0 3px rgba(180,92,255,.1)}
.comment-reply-buttons{display:flex;justify-content:flex-end;gap:8px}.comment-reply-buttons .btn{padding:8px 12px}

/* reader */
.reader-head{ display:flex; align-items:center; justify-content:flex-end; width: 100%;}
.reader-jump{ display:flex; flex-direction:column; gap: 6px; }
.reader-jump .rlabel{ font-size: 12px; color: rgba(255,255,255,0.75); font-weight: 500; }
.reader-jump select{
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 500;
  min-width: 240px;
}
.reader-top{
  padding: 14px 16px;
  background: var(--panel);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow);
}
.reader-title{ font-weight: 700; font-size: 22px; margin-top: 2px; }
.pages{
  width: min(900px, 58vw);
  max-width: 100%;
  min-width:0;
  margin: 14px auto 0;
  overflow:hidden;
}
.pages img{
  display:block;
  width:100%;
  max-width:100%;
  height:auto;
  margin:0 auto;
  cursor:pointer;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}
.reader-bottom{ margin-top: 10px; }
.reader-bottom-inner{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  background: rgba(18,18,24,0.85);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.rb-left, .rb-right{ display:flex; gap: 10px; flex-wrap: wrap; }

/* footer */
.footer{
  margin-top: 18px;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Menu */
.menu{ display:none; position: fixed; inset:0; z-index: 999; }
.menu.open{ display:block; }
.menu-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,0.65); backdrop-filter: blur(6px); }
.menu-card{
  position: relative;
  width: min(420px, 92vw);
  margin: 10vh auto;
  background: rgba(18,18,24,0.96);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: var(--shadow2);
  overflow:hidden;
}
.menu-top{
  display:flex; justify-content:space-between; align-items:center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.menu-title{ font-weight: 700; font-size: 20px; }
.menu-body{ padding: 14px 16px 18px; display:flex; flex-direction:column; gap: 10px; }

/* Modal with image */
.modal{ display:none; position: fixed; inset:0; z-index: 999; }
.modal.open{ display:block; }
.modal-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,0.65); backdrop-filter: blur(6px); }
.modal-card{
  position: relative;
  width: min(820px, 92vw);
  margin: 8vh auto;
  background: rgba(18,18,24,0.96);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: var(--shadow2);
  overflow:hidden;
  display:grid;
  grid-template-columns: 1fr 1.2fr;
}
.modal-side{
  background: linear-gradient(135deg, rgba(180,92,255,0.18), rgba(18,18,24,0.96));
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.modal-side img{
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  filter: drop-shadow(0 30px 70px rgba(0,0,0,0.7));
}
.modal-main{ display:flex; flex-direction:column; }
.modal-top{
  display:flex; justify-content:space-between; align-items:center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.modal-title{ font-weight: 700; font-size: 20px; }
.x{
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color:#fff;
  cursor:pointer;
}
.modal-body{ padding: 14px 16px 18px; display:flex; flex-direction:column; gap: 10px; }
.modal-body label{ font-size: 12px; color: rgba(255,255,255,0.75); font-weight: 500; }
.modal-body input{
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  outline:none;
  font-weight: 500;
}
.auth-msg{
  min-height: 18px;
  color: #ffb4c8;
  font-size: 13px;
  font-weight: 600;
}
.auth-msg.ok{ color: #8ff0c2; }
.auth-switch{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  color: rgba(255,255,255,.68);
  font-size: 13px;
}
.link-btn{
  border:0;
  background:transparent;
  color:#fff;
  padding:0;
  font: inherit;
  font-weight:800;
  cursor:pointer;
}
.link-btn:hover{ color: var(--accent2); }

/* Responsive */
@media(max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ position: static; top:auto; }
  .hero-inner, .banner-inner{ grid-template-columns: 1fr; }
  .modal-card{ grid-template-columns: 1fr; }
  .modal-side{ display:none; }

  /* DETAIL PAGE: image on top, text below */
  .detail{ grid-template-columns: 1fr; }
  .detail-cover img{ height: 320px; }

  /* Hero: keep char visible but not insane */
  .hero-right{ min-height: 220px; }
  .hero-char{ max-height: 360px; }
}

@media(max-width: 720px){
  .top-search{ max-width: none; }
  .filters-inner{ flex-direction: column; align-items: stretch; }
  .fgroup select{ min-width: 100%; }
  .hero-left h1{ font-size: 30px; }
  .banner-left h1{ font-size: 26px; }

  .header-inner{ gap: 10px; }
  .header-actions{ gap: 6px; }
}

/* Global Scrollbar */
*{
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255,255,255,0.08);
}
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: rgba(18,18,24,0.75); border-radius: 999px; }
::-webkit-scrollbar-thumb{
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  border-radius: 999px;
  border: 2px solid rgba(18,18,24,0.85);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 6px 18px rgba(180,92,255,0.35);
}
::-webkit-scrollbar-thumb:hover{
  background: linear-gradient(180deg, #c06cff, #9b4cff);
}
::-webkit-scrollbar-corner{ background: rgba(18,18,24,0.85); }

/* Search layout */
.top-search { flex: 1; max-width: 560px; position: relative; }
.search-wrap { position: relative; }
.search-wrap input { width: 100%; padding-right: 46px; }

.iconbtn-in{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)) !important;

}

/* Suggestions should align under the input */
.suggest{
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  z-index: 50;
}

/* MOBILE: put search below logo/actions so it isn't tight */
@media (max-width: 700px){
  .header-inner{ flex-wrap: wrap; gap: 10px; }
  .brand{ order: 1; }
  .header-actions{ order: 2; margin-left: auto; }
  .top-search{
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin-top: 6px;
  }
}


/* Rating UI */
.rating-ui{ user-select:none; }
.rate-stars{ display:inline-flex; gap: 4px; align-items:center; }
.star{
  appearance:none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  color: rgba(255,255,255,0.35);
  transition: transform .12s, color .12s, opacity .12s;
}
.star:hover{ transform: translateY(-1px); }
.star.on{ color: rgba(180,92,255,0.95); }
.star.hover{ color: rgba(180,92,255,1); }
.rate-label{ margin-left: 8px; font-size: 12px; }

.reader-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reader-actions{ display:flex; gap: 10px; flex-wrap: wrap; }

/* Reader widths: comfortable by default, with explicit wide/focused options. */
body.reader-focus #readerPages{
  width:min(720px, 48vw);
  max-width:720px;
}
body.reader-wide #readerPages{
  width:100%;
  max-width:none;
}

@media (max-width: 980px){
  .pages,
  body.reader-focus #readerPages,
  body.reader-wide #readerPages{
    width:100%;
    max-width:100%;
    margin:12px auto 0;
  }
}

.reader-actions .active{
  border-color:rgba(180,92,255,.68);
  background:rgba(180,92,255,.17);
}
.reader-quick-controls{
  position:fixed;
  left:50%;
  bottom:18px;
  z-index:10020;
  width:min(580px, calc(100vw - 28px));
  padding:14px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:18px;
  background:rgba(19,13,27,.96);
  box-shadow:0 24px 80px rgba(0,0,0,.7), 0 0 32px rgba(150,65,225,.14);
  backdrop-filter:blur(18px);
  opacity:0;
  pointer-events:none;
  transform:translate(-50%, calc(100% + 42px));
  transition:opacity .18s ease, transform .22s ease;
}
.reader-quick-controls.open{
  opacity:1;
  pointer-events:auto;
  transform:translate(-50%, 0);
}
.reader-quick-head,.reader-quick-nav{display:flex;align-items:center;justify-content:space-between;gap:10px}
.reader-quick-head{margin-bottom:12px}
.reader-quick-nav .btn{flex:1;justify-content:center;text-align:center}
.reader-quick-close{display:grid;place-items:center;width:34px;height:34px;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(255,255,255,.05);color:#fff;cursor:pointer}
.reader-quick-select{display:grid;gap:5px;margin-top:12px;color:var(--muted);font-size:12px;font-weight:700}
.reader-quick-select select{width:100%;min-width:0}
.reader-quick-details{display:flex;justify-content:center;margin-top:10px}
.reader-quick-controls .disabled{opacity:.42;pointer-events:none}

@media (max-width: 700px){
  body{overflow-x:hidden}
  body.reader-view .main{padding-left:8px!important;padding-right:8px!important}
  body.reader-view .layout,body.reader-view .content{width:100%;min-width:0}
  body.reader-view .header-inner{flex-direction:column;align-items:stretch}
  body.reader-view .brand{order:1}
  body.reader-view .reader-head{order:2}
  .reader-head,.reader-jump{width:100%;min-width:0}
  .reader-jump select{width:100%;min-width:0}
  .reader-top{display:grid;width:100%;max-width:calc(100vw - 16px);grid-template-columns:minmax(0,1fr);padding:11px 12px;border-radius:14px;overflow:hidden}
  .reader-top > *{width:100%;min-width:0}
  .reader-title{font-size:18px}
  .reader-actions{display:none}
  .pages,body.reader-focus #readerPages,body.reader-wide #readerPages{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important}
  .reader-quick-controls{
    bottom:0;
    width:100%;
    max-width:none;
    padding:14px 14px calc(14px + env(safe-area-inset-bottom));
    border-radius:20px 20px 0 0;
    transform:translate(-50%, 105%);
  }
  .reader-quick-controls.open{transform:translate(-50%, 0)}
}

.btn.ghost {
  color: #fff;
}


select {
  background-color: #2b0f45;
  color: #eaeaf0;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: inherit;
}

/* dropdown list */
select option {
  background-color: #2b0f45;
  color: #eaeaf0;
}

/* selected / hovered option (works in Firefox & some Chromium builds) */
select option:checked,
select option:hover {
  background-color: #3a165c;
  color: #ffffff;
}
/* =========================================================
   A) Floating purple petals (glow + mobile fewer)
   ========================================================= */
   .petals{
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 999;
  }
  
  .header, .main, .menu, .modal{
    position: relative;
    z-index: 2;
  }
  
  .petals span{
    position: absolute;
    top: -12vh;
    left: 0;
    width: 14px;
    height: 14px;
  
    border-radius: 70% 30% 70% 30%;
    transform: rotate(15deg);
  
    background:
      radial-gradient(circle at 35% 35%,
        rgba(255,255,255,0.45) 0%,
        rgba(255,255,255,0.12) 22%,
        rgba(180,92,255,0.90) 55%,
        rgba(139,60,255,0.70) 100%);
  
    /* more glow */
    box-shadow:
      0 10px 22px rgba(0,0,0,0.25),
      0 0 18px rgba(180,92,255,0.22),
      0 0 34px rgba(180,92,255,0.14);
  
    opacity: 0.9;
    filter: blur(0.1px) saturate(1.05);
  
    animation:
      petal-fall var(--dur, 12s) linear infinite,
      petal-sway var(--swaydur, 4s) ease-in-out infinite,
      petal-spin var(--spindur, 3.6s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
  z-index: 999;  }
  
  @keyframes petal-fall{
    0%   { transform: translate3d(var(--x, 0vw), -15vh, 0) rotate(0deg); }
    100% { transform: translate3d(calc(var(--x, 0vw) + var(--drift, 8vw)), 115vh, 0) rotate(360deg); }
  }
  @keyframes petal-sway{
    0%,100% { margin-left: 0; }
    50%     { margin-left: var(--sway, 22px); }
  }
  @keyframes petal-spin{
    0%,100% { border-radius: 70% 30% 70% 30%; }
    50%     { border-radius: 45% 55% 35% 65%; }
  }
  
  /* Variations (20) */
  .petals span:nth-child(1)  { --x: 6vw;  --drift: 10vw; --dur: 13s;  --sway: 18px; --swaydur: 4.2s; --spindur: 3.2s; --delay: -2s;  width:12px;height:12px; opacity:.65; }
  .petals span:nth-child(2)  { --x: 14vw; --drift: 6vw;  --dur: 11s;  --sway: 26px; --swaydur: 3.6s; --spindur: 4.1s; --delay: -7s;  width:16px;height:16px; opacity:.88; }
  .petals span:nth-child(3)  { --x: 22vw; --drift: 12vw; --dur: 15s;  --sway: 20px; --swaydur: 4.8s; --spindur: 3.7s; --delay: -5s;  width:10px;height:10px; opacity:.55; }
  .petals span:nth-child(4)  { --x: 30vw; --drift: 8vw;  --dur: 12s;  --sway: 24px; --swaydur: 3.9s; --spindur: 3.1s; --delay: -9s;  width:14px;height:14px; opacity:.78; }
  .petals span:nth-child(5)  { --x: 38vw; --drift: 14vw; --dur: 16s;  --sway: 22px; --swaydur: 5.1s; --spindur: 4.4s; --delay: -3s;  width:18px;height:18px; opacity:.84; }
  
  .petals span:nth-child(6)  { --x: 46vw; --drift: 7vw;  --dur: 10s;  --sway: 28px; --swaydur: 3.4s; --spindur: 3.0s; --delay: -6s;  width:12px;height:12px; opacity:.70; }
  .petals span:nth-child(7)  { --x: 54vw; --drift: 11vw; --dur: 14s;  --sway: 18px; --swaydur: 4.7s; --spindur: 4.2s; --delay: -10s; width:15px;height:15px; opacity:.90; }
  .petals span:nth-child(8)  { --x: 62vw; --drift: 9vw;  --dur: 12.5s;--sway: 25px; --swaydur: 3.8s; --spindur: 3.6s; --delay: -4s;  width:11px;height:11px; opacity:.60; }
  .petals span:nth-child(9)  { --x: 70vw; --drift: 13vw; --dur: 17s;  --sway: 16px; --swaydur: 5.4s; --spindur: 4.6s; --delay: -8s;  width:19px;height:19px; opacity:.82; }
  .petals span:nth-child(10) { --x: 78vw; --drift: 6vw;  --dur: 11.5s;--sway: 30px; --swaydur: 3.3s; --spindur: 3.4s; --delay: -1s;  width:13px;height:13px; opacity:.72; }
  
  .petals span:nth-child(11) { --x: 86vw; --drift: 10vw; --dur: 15.5s;--sway: 20px; --swaydur: 4.9s; --spindur: 4.0s; --delay: -11s; width:16px;height:16px; opacity:.86; }
  .petals span:nth-child(12) { --x: 92vw; --drift: 8vw;  --dur: 13.5s;--sway: 24px; --swaydur: 4.1s; --spindur: 3.3s; --delay: -5.5s;width:10px;height:10px; opacity:.58; }
  .petals span:nth-child(13) { --x: 10vw; --drift: 15vw; --dur: 18s;  --sway: 22px; --swaydur: 5.7s; --spindur: 4.8s; --delay: -12s; width:20px;height:20px; opacity:.84; }
  .petals span:nth-child(14) { --x: 50vw; --drift: 5vw;  --dur: 9.5s; --sway: 28px; --swaydur: 3.2s; --spindur: 3.0s; --delay: -2.5s;width:12px;height:12px; opacity:.66; }
  .petals span:nth-child(15) { --x: 74vw; --drift: 12vw; --dur: 16.5s;--sway: 18px; --swaydur: 5.0s; --spindur: 4.1s; --delay: -7.5s;width:17px;height:17px; opacity:.88; }
  
  .petals span:nth-child(16) { --x: 4vw;  --drift: 9vw;  --dur: 12.8s;--sway: 16px; --swaydur: 4.4s; --spindur: 3.6s; --delay: -6.8s;width:11px;height:11px; opacity:.62; }
  .petals span:nth-child(17) { --x: 26vw; --drift: 7vw;  --dur: 10.8s;--sway: 24px; --swaydur: 3.5s; --spindur: 3.2s; --delay: -9.8s;width:14px;height:14px; opacity:.78; }
  .petals span:nth-child(18) { --x: 58vw; --drift: 13vw; --dur: 17.8s;--sway: 20px; --swaydur: 5.6s; --spindur: 4.7s; --delay: -3.8s;width:18px;height:18px; opacity:.86; }
  .petals span:nth-child(19) { --x: 82vw; --drift: 8vw;  --dur: 13.8s;--sway: 26px; --swaydur: 4.0s; --spindur: 3.9s; --delay: -1.8s;width:12px;height:12px; opacity:.70; }
  .petals span:nth-child(20) { --x: 96vw; --drift: 10vw; --dur: 15.8s;--sway: 18px; --swaydur: 5.0s; --spindur: 4.3s; --delay: -8.8s;width:16px;height:16px; opacity:.82; }
  
  /* MOBILE: fewer petals + slightly calmer */
  @media (max-width: 700px){
    .petals span:nth-child(n+11){
      display: none; /* keep only first 10 on mobile */
    }
    .petals span{
      opacity: 0.55;
      filter: blur(0.2px);
    }
  }
  
  /* Reduced motion */
  @media (prefers-reduced-motion: reduce){
    .petals span{ animation: none; opacity: 0.18; }
  }
  
  .flying {
    position: absolute;
width: 350px;
  }

/* Production pages */
.account-page,.legal-page{max-width:1040px;margin:0 auto 40px}
.account-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.account-stats>div,.account-card{border:1px solid var(--border);background:rgba(20,13,29,.78);border-radius:16px;padding:18px;box-shadow:0 14px 40px rgba(0,0,0,.12)}
.account-stats strong{display:block;font-size:28px;color:#fff}.account-stats span{display:block;color:var(--muted);font-size:13px;margin-top:3px}
.account-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.account-card{display:grid;gap:9px}.account-card h3{margin:0;font-size:20px}.account-card p{margin:0 0 4px}.account-card label{font-weight:700;font-size:13px;color:#d7cfdf}.account-card input{width:100%;border:1px solid var(--border);border-radius:10px;padding:11px 12px;background:#0e0914;color:#fff;font:inherit;outline:none}.account-card input:focus{border-color:#a56cf4;box-shadow:0 0 0 3px rgba(165,108,244,.12)}.account-card input:disabled{opacity:.62}.account-card .btn{justify-self:start}.danger-zone{margin-top:16px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.legal-page{padding:clamp(22px,4vw,46px);border:1px solid var(--border);border-radius:20px;background:rgba(18,11,26,.86);line-height:1.75}.legal-page>h1{font-size:clamp(34px,5vw,54px);margin:4px 0 8px}.legal-page h2{font-size:21px;margin:28px 0 7px}.legal-page p{color:#d2c9da}.legal-page a,.footer-links a{color:#c49af8;text-decoration:none}.legal-page a:hover,.footer-links a:hover{text-decoration:underline}.legal-contact{border-top:1px solid var(--border);padding-top:18px;margin-top:30px}
.footer-links{display:flex;align-items:center;gap:16px;flex-wrap:wrap}.footer-inner{gap:20px}
.card{content-visibility:auto;contain-intrinsic-size:280px 470px}
.reader-img{content-visibility:auto;contain-intrinsic-size:auto 1400px}

@media(max-width:760px){.account-grid{grid-template-columns:1fr}.account-stats{grid-template-columns:1fr 1fr}.danger-zone{align-items:flex-start;flex-direction:column}.footer-inner{align-items:flex-start}.footer-links{gap:10px 14px}}
@media(max-width:430px){.account-stats{grid-template-columns:1fr}.legal-page{padding:20px 17px}}

/* 3.0 responsive storefront polish */
.hero-inner h1{font-size:clamp(38px,4.1vw,68px);line-height:1.06}
.hero-left,.banner-left{position:relative;z-index:2}
.hero-right,.banner-right{z-index:1}
.content-banner .btn{margin-top:14px}
.content-banner::before{background-position:center}

@media (min-width:701px) and (max-width:980px){
  .hero-inner{grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr)}
  .banner-inner{grid-template-columns:minmax(0,1.15fr) minmax(250px,.85fr)}
  .hero-right{min-height:300px}
}

@media (max-width: 700px){
  :root{--radius:16px}
  body::before{
    opacity:.62;
    background:
      linear-gradient(180deg,rgba(24,10,38,.18),rgba(7,6,10,.58)),
      url("assets/banner1.webp") center / cover no-repeat;
  }
  .container{width:calc(100% - 24px)}
  .main{padding:4px 12px 28px!important}

  .header-inner{display:grid;grid-template-columns:minmax(0,1fr) auto;padding:9px 0}
  .brand{grid-column:1;grid-row:1}
  .logo{width:124px!important}
  .iconbtn{width:38px;height:38px;border-radius:12px}
  .header-actions{grid-column:2;grid-row:1;display:grid;grid-auto-flow:column;gap:5px;margin-left:0}
  .header-actions .whoami{display:none}
  .top-search{grid-column:1/-1;grid-row:2;width:100%;margin-top:1px}
  .top-search input{min-height:44px;font-size:16px}
  .filters{max-height:calc(100vh - 118px);overflow:auto}
  .filters-inner{padding-bottom:18px}
  .factions,.factions .btn{width:100%}
  .factions .btn{flex:1}

  .hero.content-banner{
    min-height:390px;
    margin:12px;
    overflow:hidden;
    border-radius:22px;
  }
  .hero::before{
    border-radius:22px;
    background:
      linear-gradient(90deg,rgba(16,10,24,.95) 0%,rgba(27,12,40,.78) 55%,rgba(18,18,24,.36) 100%),
      var(--bg);
    background-size:cover;
    background-position:center;
  }
  .hero-inner{
    display:block;
    width:100%;
    min-height:388px;
    padding:0 18px;
  }
  .hero-left{width:72%;padding:40px 0 32px}
  .hero-inner h1,.hero-left h1{font-size:clamp(32px,10.5vw,43px);line-height:1.02}
  .hero-left p{font-size:14px;line-height:1.4}
  .hero-ctas{gap:8px}
  .hero-ctas .btn{width:100%;padding:10px 12px}
  .hero-right{position:absolute;inset:0;min-height:0;pointer-events:none}
  .hero-char{right:-54px;bottom:-5px;max-height:290px;max-width:66%;object-position:right bottom}
  .flying{display:none}

  .banner.content-banner{
    min-height:244px;
    margin:20px 0;
    overflow:hidden;
    border-radius:20px;
  }
  .banner.content-banner::before{
    border-radius:20px;
    background:
      linear-gradient(90deg,rgba(17,10,25,.96) 0%,rgba(29,13,42,.80) 58%,rgba(18,18,24,.40) 100%),
      var(--bg);
    background-size:cover;
    background-position:center;
  }
  .banner-inner,.banner.small .banner-inner{
    display:block;
    width:100%;
    min-height:242px;
    padding:0 16px;
  }
  .banner-left{width:70%;padding:27px 0 25px}
  .banner-left h1{font-size:clamp(23px,7vw,29px);line-height:1.05}
  .banner-left p{font-size:13px;line-height:1.35;margin-top:7px}
  .banner-left .btn{padding:8px 11px;font-size:13px}
  .banner-right{position:absolute;inset:0;min-height:0;pointer-events:none}
  .banner-char{right:-42px;bottom:-6px;max-height:224px;max-width:60%;object-position:right bottom}

  .section-head{align-items:center;margin:20px 0 10px}
  .section-head h2{font-size:21px}
  .section-head .muted{font-size:12px;text-align:right}
  .trend-strip{
    flex-wrap:nowrap;
    gap:8px;
    margin:0 -12px 12px;
    padding:5px 12px 9px;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scrollbar-width:none;
    scroll-snap-type:x proximity;
  }
  .trend-strip::-webkit-scrollbar{display:none}
  .trend-chip{flex:0 0 auto;min-height:36px;padding:8px 12px;display:inline-flex;align-items:center;scroll-snap-align:start}

  .grid,.latest-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
  .card{min-width:0;border-radius:16px;contain-intrinsic-size:190px 360px}
  .card:hover{transform:none}
  .card-img img{height:auto;aspect-ratio:2/3;object-fit:cover;border-radius:15px 15px 0 0}
  .card-info{padding:9px}
  .card-title{font-size:14px;line-height:1.14;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .card-sub{font-size:11px}
  .card-rating{gap:4px;overflow:hidden}
  .stars{font-size:9px;letter-spacing:0}
  .rating-text{font-size:10px;white-space:nowrap}
  .card-pill{top:7px;left:7px;padding:4px 7px;font-size:9px;line-height:1;z-index:3}
  .card-top-right{top:7px;right:7px}
  .fav-btn{width:32px;height:32px;font-size:14px}
  .chap-links{gap:5px;min-width:0}
  .chaplink{font-size:11px;padding:5px 7px;min-width:0}
  .pagination{margin:18px 0 4px}
  .page-btn{padding:9px 13px}

  .sidebar{margin-top:24px}
  .side-card{border-radius:18px}
  .detail{padding:12px;border-radius:18px}
  .detail-cover img{height:auto;aspect-ratio:3/4}
  .detail-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;margin-top:16px}
  .detail-start,.detail-chapters-link{width:100%;min-height:54px}
  .detail-start{justify-content:flex-start;padding:10px 16px}
  .detail-chapters-link{min-height:46px}
  .chapter-box{padding:10px;border-radius:18px}
  .chapter-row{min-height:58px;padding:11px 9px}
  .chapter-right{font-size:12px}
}

@media (max-width: 370px){
  .container{width:calc(100% - 18px)}
  .main{padding-left:9px!important;padding-right:9px!important}
  .logo{width:112px!important}
  .hero.content-banner{margin:9px;min-height:370px}
  .hero-inner{min-height:368px;padding:0 15px}
  .hero-left{width:76%}
  .banner-left{width:74%}
  .grid,.latest-grid{gap:8px}
}

/* =========================================================
   Banner character: anchor to the OUTER banner bottom.
   The transparent character may overflow upward only.
   Keep this block at the very end of the stylesheet.
   ========================================================= */
.banner,
.banner.content-banner {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.banner-inner,
.banner.small .banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: clamp(230px, 24vw, 290px);
  padding: 24px 22px;
}

.banner-left {
  position: relative;
  z-index: 2;
  width: min(60%, 680px);
  padding: 18px 0;
}

/* Cover the complete banner instead of taking up a grid column. */
.banner-right {
  position: absolute;
  inset: 0;
  min-height: 0;
  z-index: 1;
  pointer-events: none;
}

.banner-char {
  position: absolute;
  right: 0;
  bottom: 0;
  display: block;
  width: clamp(260px, 34vw, 430px);
  max-width: 48%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 30px 70px rgba(0,0,0,0.7));
}

/* Tablet */
@media (min-width: 701px) and (max-width: 980px) {
  .banner-inner,
  .banner.small .banner-inner {
    min-height: clamp(235px, 31vw, 285px);
    padding: 22px 20px;
  }

  .banner-left {
    width: 57%;
  }

  .banner-char {
    width: clamp(280px, 43vw, 390px);
    max-width: 52%;
  }
}

/* Phone */
@media (max-width: 700px) {
  .banner.content-banner {
    min-height: 250px;
    overflow: visible;
  }

  .banner-inner,
  .banner.small .banner-inner {
    display: flex;
    min-height: 250px;
    padding: 18px 16px;
  }

  .banner-left {
    width: 62%;
    padding: 10px 0;
  }

  .banner-right {
    position: absolute;
    inset: 0;
    min-height: 0;
  }

  .banner-char {
    right: 0;
    bottom: 0;
    width: min(58vw, 240px);
    max-width: none;
  }
}
