
:root{
  --bg:#071510; --surface:#0d211b; --surface2:#112a23; --panel:#10251f;
  --text:#f7f1e6; --muted:#b9c4be; --line:#31493f;
  --gold:#d9aa55; --gold2:#f0ca7a; --green:#164a40; --danger:#bd3c32;
  --shadow:0 14px 40px rgba(0,0,0,.28);
  --reader-bg:#f7f0e2; --reader-text:#202521; --reader-muted:#6b726e; --reader-line:#d6cbb8;
}
html[data-theme="light"]{
  --bg:#e8dfcf; --surface:#fffaf0; --surface2:#f3eadb; --panel:#fffdf8;
  --text:#18231f; --muted:#616c67; --line:#d3c5aa;
  --gold:#a9712e; --gold2:#c68d3c; --green:#17463e; --shadow:0 12px 34px rgba(62,45,22,.11);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,sans-serif;min-height:100vh}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
img{max-width:100%;display:block}
.hidden{display:none!important}
.container{width:min(1120px,calc(100% - 28px));margin:auto}
.serif{font-family:"Noto Serif",Georgia,serif}
.muted{color:var(--muted)}
.icon{width:22px;height:22px;display:block;flex:0 0 22px}
.icon *{vector-effect:non-scaling-stroke}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Header */
.site-header{position:sticky;top:0;z-index:1000;background:#06131a;border-bottom:1px solid rgba(217,170,85,.42);box-shadow:0 10px 25px rgba(0,0,0,.22)}
.header-top{height:86px;display:grid;grid-template-columns:50px minmax(0,1fr) 50px 50px;align-items:center;gap:8px}
.brand-link{height:76px;display:flex;align-items:center;justify-content:center;min-width:0}
.brand-link img{height:72px;width:100%;object-fit:contain;filter:contrast(1.08) saturate(1.08)}
.header-icon{width:46px;height:46px;border:1px solid rgba(217,170,85,.5);border-radius:12px;background:#0a1b24;color:var(--gold2);display:grid;place-items:center;padding:0}
.header-icon:hover,.header-icon:focus-visible{background:#112a33}
.search-row{padding:0 0 12px}
.search-box{position:relative;height:50px;display:grid;grid-template-columns:45px minmax(0,1fr) auto;background:#0b1b24;border:1px solid #33474e;border-radius:12px;overflow:visible}
.search-box>span{display:grid;place-items:center;color:#a8b2b3}
.search-box input{border:0;outline:0;background:transparent;color:#fff;min-width:0;font-size:14px}
.search-box input::placeholder{color:#9ca7a8}
.search-box>button{border:0;background:linear-gradient(135deg,#e4b45b,#be7e2f);color:#101a18;font-weight:800;padding:0 23px;border-radius:0 11px 11px 0}
.search-suggest{display:none;position:absolute;left:0;right:0;top:calc(100% + 7px);z-index:1500;background:#0b1c24;border:1px solid #33484f;border-radius:12px;box-shadow:0 18px 45px rgba(0,0,0,.5);overflow:hidden}
.search-suggest.show{display:block}
.search-suggest a{display:grid;grid-template-columns:38px 1fr;gap:10px;align-items:center;padding:9px 11px;border-bottom:1px solid #21353c;color:#f5f2e9}
.search-suggest a:last-child{border-bottom:0}
.search-suggest img{width:38px;height:50px;object-fit:cover;border-radius:5px}
.search-suggest b{display:block;font-size:12px}.search-suggest small{display:block;color:#aeb8b7;margin-top:2px}
.desktop-nav{display:flex;gap:6px;padding:0 0 10px}
.desktop-nav a{display:flex;align-items:center;gap:7px;color:#d5ddda;padding:8px 11px;border-radius:8px;font-size:12px}
.desktop-nav a.active,.desktop-nav a:hover{background:#15312b;color:#f5c974}

/* drawer */
.drawer-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:1990;opacity:0;pointer-events:none;transition:.18s}
.drawer{position:fixed;top:0;left:0;bottom:0;width:min(330px,88vw);background:#0b1d18;color:#fff;z-index:2000;transform:translateX(-102%);transition:.2s;box-shadow:20px 0 55px rgba(0,0,0,.38);border-right:1px solid #b7833d}
body.drawer-open .drawer{transform:none}
body.drawer-open .drawer-backdrop{opacity:1;pointer-events:auto}
.drawer-head{height:76px;display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid #365047}
.drawer-head b{color:#f0c875;font-size:18px}.drawer-head button{width:44px;height:44px;border:0;border-radius:10px;background:#15332c;color:white;font-size:25px}
.drawer nav a{display:flex;align-items:center;gap:12px;min-height:54px;padding:0 18px;border-bottom:1px solid #2d453d;color:#f7f4eb;font-weight:700}
.drawer nav a:hover{background:#173c34;color:#ffd88c}

/* page */
.page{padding:28px 0 90px}
.page-kicker{color:var(--gold2);font-size:11px;font-weight:800;letter-spacing:2px}
.page-title{font-family:"Noto Serif",Georgia,serif;font-size:clamp(34px,7vw,54px);line-height:1.05;margin:8px 0 10px}
.page-lead{max-width:720px;color:var(--muted);line-height:1.7;margin:0 0 24px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
.section{margin-top:28px}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:14px}
.section-head h2{font-family:"Noto Serif",Georgia,serif;font-size:26px;margin:0}
.section-head a{color:var(--muted);font-size:12px}

/* hero */
.hero{position:relative;min-height:490px;border-radius:17px;overflow:hidden;border:1px solid #7e683e;box-shadow:var(--shadow)}
.hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(2,12,14,.94),rgba(2,12,14,.48) 54%,rgba(2,12,14,.06)),linear-gradient(0deg,rgba(1,10,11,.65),transparent 55%)}
.hero-copy{position:absolute;z-index:2;left:34px;bottom:48px;max-width:570px;color:#fff}
.pill{display:inline-block;background:#c99137;color:#fff;padding:7px 11px;border-radius:6px;font-size:10px;font-weight:800}
.hero h1{font-family:"Noto Serif",Georgia,serif;font-size:clamp(40px,8vw,64px);line-height:1.02;margin:13px 0}
.hero p{line-height:1.6;color:#f0f0eb;margin:0 0 18px}
.primary{display:inline-flex;align-items:center;gap:10px;min-height:48px;background:linear-gradient(135deg,#e6b75d,#c88731);color:#121b19;border:0;border-radius:9px;padding:0 20px;font-weight:800}
.hero-dots{position:absolute;z-index:3;left:50%;bottom:17px;transform:translateX(-50%);display:flex;gap:7px}
.hero-dots button{width:21px;height:6px;padding:0;border:0;border-radius:10px;background:#536064}.hero-dots button.active{background:#e4b45b}

/* grids */
.story-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px}
.story-card{overflow:hidden;background:var(--panel);border:1px solid var(--line);border-radius:12px;transition:.16s}
.story-card:hover{transform:translateY(-3px)}
.story-card img{width:100%;aspect-ratio:3/4;object-fit:cover}
.story-card-body{padding:10px}
.story-card .tag{color:var(--gold2);font-size:9px;font-weight:800}
.story-card h3{font-family:"Noto Serif",Georgia,serif;font-size:15px;margin:5px 0}
.story-card p{font-size:10px;color:var(--muted);margin:0;line-height:1.4}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.panel{padding:18px}
.rank-row{display:grid;grid-template-columns:30px 44px 1fr auto;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.rank-row:last-child{border-bottom:0}.rank-row>strong{font-size:20px;color:var(--gold2)}
.rank-row img{width:44px;height:58px;object-fit:cover;border-radius:5px}
.rank-row b{display:block;font-size:12px}.rank-row small{color:var(--muted)}.rank-row em{font-style:normal;color:var(--gold2);font-size:10px}
.genre-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.genre-tile{min-height:78px;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface2);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center;color:var(--text)}
.genre-tile .icon{color:var(--gold2)}
.genre-tile span{font-size:10px;font-weight:700}

/* list/filter pages */
.filters{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}
.filter-btn{min-height:46px;border:1px solid var(--line);background:var(--surface2);color:var(--text);border-radius:10px;padding:0 13px;font-weight:700}
.filter-btn.active{background:var(--gold);border-color:var(--gold2);color:#10211d}
.notice{border-left:4px solid var(--gold);background:var(--surface2);color:var(--muted);padding:13px 15px;margin:18px 0}
.list-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.list-card{display:grid;grid-template-columns:88px 1fr;gap:12px;padding:10px}
.list-card img{width:88px;aspect-ratio:3/4;object-fit:cover;border-radius:8px}
.list-card h3{font-family:"Noto Serif",Georgia,serif;margin:2px 0 7px;font-size:18px}
.list-card p{color:var(--muted);font-size:11px;line-height:1.5;margin:4px 0}
.empty{padding:28px;text-align:center;color:var(--muted)}

/* story */
.story-hero{display:grid;grid-template-columns:210px 1fr;gap:24px;padding:20px}
.story-hero img{width:210px;aspect-ratio:2/3;object-fit:cover;border-radius:12px}
.story-hero h1{font-family:"Noto Serif",Georgia,serif;font-size:40px;margin:7px 0}
.story-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.secondary{min-height:46px;padding:0 17px;border-radius:9px;border:1px solid var(--line);background:var(--surface2);color:var(--text);font-weight:700}
.chapter-list a{display:flex;justify-content:space-between;gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}
.chapter-list a:last-child{border-bottom:0}

/* reader: separate, explicit, no inherited dimming */
.reader-page{background:var(--reader-bg);color:var(--reader-text)}
.reader-page.reader-dark{--reader-bg:#131b18;--reader-text:#f3eee4;--reader-muted:#b8c0bb;--reader-line:#37453f}
.reader-header{position:sticky;top:0;z-index:1000;background:#06131a;border-bottom:1px solid #b8873d}
.reader-top{height:78px;display:grid;grid-template-columns:46px minmax(0,1fr) 46px 46px;align-items:center;gap:7px}
.reader-logo{height:68px;display:flex;align-items:center;justify-content:center}.reader-logo img{height:65px;width:100%;object-fit:contain;filter:contrast(1.08) saturate(1.08)}
.reader-main{width:min(760px,calc(100% - 30px));margin:auto;padding:0 0 100px}
.read-progress{position:fixed;left:0;top:0;height:3px;background:var(--gold);z-index:3000;width:0}
.reading{padding:34px 0 28px;font-family:"Noto Serif",Georgia,serif;font-size:var(--reader-font-size,20px);line-height:2.05;color:var(--reader-text)}
.reading .chapter-label{text-align:center;color:#a17a43;font-family:Inter,sans-serif;font-size:10px;letter-spacing:1.5px}
.reading h1{text-align:center;font-size:38px;margin:7px 0 34px}
.reading p{margin:0 0 22px;color:var(--reader-text);opacity:1}
.reader-nav{display:grid;grid-template-columns:1fr 1.1fr 1fr;gap:8px;padding:20px 0;border-top:1px solid var(--reader-line);border-bottom:1px solid var(--reader-line)}
.reader-nav a,.reader-nav button{min-height:66px;border-radius:10px;border:1px solid var(--reader-line);background:transparent;color:var(--reader-text);display:flex;align-items:center;justify-content:center;gap:8px;font-family:"Noto Serif",Georgia,serif;font-weight:700;text-align:center}
.reader-nav button{background:#114c43;color:#fff;border-color:#114c43}
.comments{padding:34px 0;border-bottom:1px solid var(--reader-line)}
.comments h2,.recommend h2{font-family:"Noto Serif",Georgia,serif;font-size:28px;margin:0 0 16px}
.comments textarea{width:100%;min-height:135px;padding:14px;border-radius:10px;border:1px solid var(--reader-line);background:transparent;color:var(--reader-text);font-size:15px}
.comment{display:grid;grid-template-columns:44px 1fr;gap:12px;padding:18px 0;border-top:1px solid var(--reader-line)}
.avatar{width:44px;height:44px;border-radius:50%;background:url('images/bg-mountain.jpg') center/cover}
.comment p{margin:7px 0;color:var(--reader-text)}.comment small,.comment span{color:var(--reader-muted)}
.comment-actions{display:flex;gap:8px}.comment-actions button{min-height:36px;padding:6px 12px}.comments .notice a{color:var(--gold)}
.recommend{padding:30px 0}
.rec-card{display:grid;grid-template-columns:110px 1fr;gap:13px;padding:11px;background:transparent;border:1px solid var(--reader-line);border-radius:11px}
.rec-card img{width:110px;aspect-ratio:3/4;object-fit:cover;border-radius:8px}
.rec-card h3{font-family:"Noto Serif",Georgia,serif;font-size:21px;margin:5px 0}

/* floating + bottom nav */
.float-actions{position:fixed;right:12px;bottom:86px;z-index:850;display:flex;flex-direction:column;gap:9px}
.float-actions button{width:48px;height:48px;border-radius:50%;border:1px solid #bd8534;background:#0c3d36;color:#f0c875;display:grid;place-items:center;padding:0;box-shadow:0 8px 22px rgba(0,0,0,.25)}
.bottom-nav{display:none;position:fixed;left:0;right:0;bottom:0;z-index:800;background:#071510f5;border-top:1px solid #334a42;padding:6px 0 calc(6px + env(safe-area-inset-bottom));grid-template-columns:repeat(5,1fr)}
.bottom-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#aeb8b4;font-size:8px;min-height:48px}
.bottom-nav a.active{color:#e6bb69}.bottom-nav .icon{width:22px;height:22px}

/* sheets */
.sheet-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:2500;opacity:0;pointer-events:none;transition:.18s}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:2600;background:var(--reader-bg);color:var(--reader-text);border-radius:18px 18px 0 0;transform:translateY(105%);transition:.22s;max-height:82vh;overflow:auto;padding:12px 16px calc(18px + env(safe-area-inset-bottom))}
body.sheet-open .sheet{transform:none}body.sheet-open .sheet-backdrop{opacity:1;pointer-events:auto}
.sheet-handle{width:42px;height:5px;border-radius:5px;background:#929994;margin:0 auto 16px}
.tool-row{display:grid;grid-template-columns:30px 1fr auto;gap:10px;align-items:center;min-height:52px;border-bottom:1px solid var(--reader-line)}
.tool-row button{border:0;background:transparent;color:var(--reader-text);font-weight:700;text-align:left;padding:0}
.font-row{display:grid;grid-template-columns:40px 1fr 40px;gap:10px;align-items:center;padding:14px 0;border-bottom:1px solid var(--reader-line)}
.close-sheet{width:100%;min-height:48px;border:0;background:transparent;color:var(--reader-text);font-weight:800;margin-top:8px}

/* accessibility */
:focus-visible{outline:3px solid #e0ac55;outline-offset:2px}
@media(max-width:900px){
  .story-grid{grid-template-columns:repeat(3,1fr)}
  .list-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:760px){
  body{padding-bottom:66px}
  .container{width:min(100% - 24px,700px)}
  .header-top{height:78px;grid-template-columns:46px minmax(0,1fr) 46px 46px}
  .brand-link{height:68px}.brand-link img{height:64px}
  .desktop-nav{display:none}
  .search-row{padding-bottom:10px}
  .page{padding-top:22px}
  .hero{min-height:420px}.hero-copy{left:20px;right:20px;bottom:44px}.hero h1{font-size:40px}.hero p{font-size:13px}
  .story-grid{grid-template-columns:repeat(2,1fr);gap:9px}
  .story-card h3{font-size:14px}
  .two-col{grid-template-columns:1fr}
  .genre-grid{grid-template-columns:repeat(4,1fr)}
  .list-grid{grid-template-columns:1fr}
  .story-hero{grid-template-columns:105px 1fr;gap:13px;padding:13px}.story-hero img{width:105px}.story-hero h1{font-size:29px}
  .bottom-nav{display:grid}
  .float-actions{bottom:80px}
  .reader-top{height:72px;grid-template-columns:42px minmax(0,1fr) 42px 42px}.reader-logo{height:62px}.reader-logo img{height:59px}
  .reader-main{width:calc(100% - 30px)}
  .reading{line-height:2}.reading h1{font-size:33px}
  .reader-nav{grid-template-columns:1fr 1.05fr 1fr}.reader-nav a,.reader-nav button{min-height:72px;font-size:12px;padding:7px}
}
@media(max-width:390px){
  .genre-grid{grid-template-columns:repeat(2,1fr)}
  .hero{min-height:390px}.hero h1{font-size:36px}
  .reading{}
}

/* =========================================================
   V41 — SMOOTH MOBILE BOTTOM NAV
   Fix Android/file:// repaint jitter while scrolling.
   ========================================================= */
:root{
  --bottom-nav-h:64px;
}

/* Remove expensive translucent repainting + lock nav into its own layer. */
.bottom-nav{
  height:var(--bottom-nav-h)!important;
  min-height:var(--bottom-nav-h)!important;
  padding:5px 0 max(5px,env(safe-area-inset-bottom))!important;
  background:#071510!important;
  border-top:1px solid #334a42!important;
  box-shadow:0 -6px 20px rgba(0,0,0,.22)!important;

  -webkit-transform:translate3d(0,0,0)!important;
  transform:translate3d(0,0,0)!important;
  -webkit-backface-visibility:hidden!important;
  backface-visibility:hidden!important;
  will-change:transform!important;
  contain:layout paint style!important;

  transition:none!important;
  animation:none!important;
}
.bottom-nav *,
.bottom-nav a,
.bottom-nav .icon{
  transition:none!important;
  animation:none!important;
}

/* Fixed, equal icon cells. Avoid font/layout recalculation while scrolling. */
.bottom-nav a{
  height:54px!important;
  min-height:54px!important;
  padding:3px 2px 2px!important;
  line-height:1!important;
  flex:1 1 20%!important;
  overflow:hidden!important;
}
.bottom-nav a .icon{
  width:22px!important;
  height:22px!important;
  min-width:22px!important;
  min-height:22px!important;
  flex:0 0 22px!important;
}
.bottom-nav a span:last-child{
  display:block!important;
  height:12px!important;
  line-height:12px!important;
  white-space:nowrap!important;
}

/* Reserve exact space so content never slides underneath during viewport resize. */
@media(max-width:760px){
  body{
    padding-bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom))!important;
  }
  .page{
    padding-bottom:28px!important;
  }
  .reader-main{
    padding-bottom:38px!important;
  }
  .float-actions{
    bottom:calc(var(--bottom-nav-h) + 14px + env(safe-area-inset-bottom))!important;
  }
}

/* Android browser toolbar show/hide can trigger viewport resize.
   Keeping the nav fully opaque and isolated reduces the visible jump. */
@supports (height:100dvh){
  .bottom-nav{
    bottom:0!important;
  }
}

/* =========================================================
   V42 — PRODUCTION FOUNDATION / MOBILE UX HARDENING
   ========================================================= */
:root{
  --tap:48px;
}
button,a,input,textarea,select{touch-action:manipulation}
body{overscroll-behavior-y:none}
.card,.story-card,.list-card,.genre-tile,.filter-btn,.primary,.secondary{transition:transform .12s ease,border-color .12s ease,background .12s ease}
@media(hover:hover){
  .filter-btn:hover,.genre-tile:hover,.secondary:hover{border-color:var(--gold)}
}
.search-history{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.search-history button{border:1px solid var(--line);background:var(--surface2);color:var(--text);min-height:38px;border-radius:999px;padding:0 12px}
.progress-card{display:grid;grid-template-columns:70px 1fr auto;gap:12px;align-items:center;padding:10px}
.progress-card img{width:70px;height:92px;object-fit:cover;border-radius:8px}
.progress-meta h3{font-family:"Noto Serif",Georgia,serif;margin:2px 0 6px}
.progress-bar{height:7px;background:var(--surface2);border-radius:8px;overflow:hidden;margin-top:8px}
.progress-bar span{display:block;height:100%;background:linear-gradient(90deg,var(--gold),var(--gold2))}
.progress-card>em{font-style:normal;color:var(--gold2);font-weight:800}
.saved-list{display:grid;gap:10px}
.saved-row{display:grid;grid-template-columns:52px 1fr auto;gap:11px;align-items:center;padding:10px}
.saved-row img{width:52px;height:70px;object-fit:cover;border-radius:7px}
.saved-row h3{font-family:"Noto Serif",Georgia,serif;font-size:16px;margin:0 0 4px}
.saved-row p{margin:0;color:var(--muted);font-size:11px}
.saved-row button{min-width:44px;min-height:44px;border:1px solid var(--line);background:var(--surface2);color:var(--text);border-radius:9px}
.jump-box{display:grid;grid-template-columns:1fr auto;gap:8px;margin:10px 0}
.jump-box input{min-height:46px;padding:0 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface2);color:var(--text)}
.jump-box button{min-height:46px;border:0;border-radius:9px;background:var(--gold);color:#10211d;font-weight:800;padding:0 16px}
.reader-options-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:10px 0}
.reader-options-grid button{min-height:46px;border:1px solid var(--reader-line);background:transparent;color:var(--reader-text);border-radius:9px;font-weight:700}
.reader-options-grid button.active{background:#174c43;color:#fff;border-color:#174c43}
.speed-row{display:grid;grid-template-columns:70px 1fr 55px;gap:10px;align-items:center;padding:14px 0;border-bottom:1px solid var(--reader-line)}
.speed-row input{width:100%}
.speed-row output{text-align:right;color:var(--reader-muted)}
.account-switch{display:flex;justify-content:center;gap:6px;margin-top:18px;color:var(--muted)}
.account-switch a{color:var(--gold2);font-weight:800}
.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-card{padding:16px}
.form-card label{display:block;font-weight:700;margin:10px 0 5px}
.form-card input,.form-card textarea,.form-card select{width:100%;min-height:44px;border:1px solid var(--line);border-radius:8px;background:var(--surface2);color:var(--text);padding:9px 11px}
.form-card textarea{min-height:120px}
.admin-list{display:grid;gap:8px}
.admin-item{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:9px;background:var(--surface2)}
.badge-new{display:inline-block;padding:3px 7px;border-radius:999px;background:#8b2e27;color:white;font-size:9px;font-weight:800}
.status-tabs{display:flex;gap:7px;flex-wrap:wrap;margin:10px 0 16px}
.status-tabs button{min-height:42px;padding:0 13px;border:1px solid var(--line);background:var(--surface2);color:var(--text);border-radius:9px;font-weight:700}
.status-tabs button.active{background:var(--gold);color:#10211d;border-color:var(--gold2)}
.chapter-window{display:grid;gap:0}
.chapter-window a{display:flex;justify-content:space-between;gap:10px;padding:13px 0;border-bottom:1px solid var(--line)}
.chapter-pager{display:flex;justify-content:space-between;gap:8px;margin-top:12px}
.chapter-pager button{min-height:44px;min-width:110px;border:1px solid var(--line);background:var(--surface2);color:var(--text);border-radius:9px}
@media(max-width:760px){
  .admin-grid{grid-template-columns:1fr}
  .progress-card{grid-template-columns:58px 1fr auto}
  .progress-card img{width:58px;height:78px}
}

/* =========================================================
   V43 RELEASE CANDIDATE — refined xianxia decoration, feedback,
   accessibility and production-like admin UX.
   ========================================================= */
.section-head h2{position:relative;padding-left:20px}
.section-head h2:before{content:"";position:absolute;left:0;top:50%;width:12px;height:12px;border-left:2px solid var(--gold);border-bottom:2px solid var(--gold);transform:translateY(-50%) rotate(45deg);opacity:.9}
.section-head h2:after{content:"";display:inline-block;width:38px;height:1px;background:linear-gradient(90deg,var(--gold),transparent);vertical-align:middle;margin-left:10px}
.site-header:after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:.6}
.card,.story-card,.panel{position:relative}
.story-card:before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.015)}
.story-card .tag:before{content:"◆";font-size:7px;margin-right:4px}
.empty:before{content:"萬";display:block;font-family:"Noto Serif",serif;font-size:36px;color:var(--gold);opacity:.32;margin-bottom:7px}
.toast-host{position:fixed;left:50%;bottom:82px;transform:translateX(-50%);z-index:5000;display:grid;gap:8px;pointer-events:none;width:min(92vw,420px)}
.toast{background:#0d2b25;color:#fff6e7;border:1px solid #b9853b;border-radius:10px;padding:11px 14px;box-shadow:0 12px 32px rgba(0,0,0,.34);opacity:0;transform:translateY(8px);transition:.18s}
.toast.show{opacity:1;transform:none}.toast.warn{background:#5a321d}.toast.error{background:#682923}
.suggest-label{padding:9px 11px;color:#e8c475;font-size:10px;font-weight:800;letter-spacing:1px;border-bottom:1px solid #21353c}
.recent-search{width:100%;min-height:44px;border:0;border-bottom:1px solid #21353c;background:#0b1c24;color:#f3f0e8;display:flex;align-items:center;gap:9px;padding:0 12px;text-align:left}.recent-search:last-child{border-bottom:0}.recent-search .icon{width:18px;height:18px;color:#d5ae67}
.site-footer{margin-top:40px;border-top:1px solid var(--line);background:color-mix(in srgb,var(--surface) 92%,transparent)}
.footer-inner{min-height:110px;display:grid;grid-template-columns:54px 1fr auto;gap:14px;align-items:center}
.footer-seal{width:48px;height:48px;border:2px solid #a84638;color:#a84638;display:grid;place-items:center;font-family:"Noto Serif",serif;font-weight:800;transform:rotate(-3deg)}
.footer-inner b{font-family:"Noto Serif",serif;font-size:18px}.footer-inner p{margin:4px 0 0;color:var(--muted);font-size:11px}.footer-inner>a{color:var(--gold2);font-weight:800;font-size:11px}
.genre-tile{overflow:hidden}
.genre-tile:after{content:"";position:absolute;width:44px;height:44px;border:1px solid currentColor;border-radius:50%;opacity:.05;right:-12px;top:-12px}
.genre-tile .icon{width:25px;height:25px}
.badge-hot,.badge-done,.badge-new2{position:absolute;left:6px;top:6px;z-index:3;padding:3px 6px;border-radius:5px;color:white;font-size:8px;font-weight:900}
.badge-hot{background:#b53a31}.badge-done{background:#226d5e}.badge-new2{background:#3b7b33}
.tonight-box{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:16px}
.tonight-box h3{font-family:"Noto Serif",serif;margin:0 0 5px}.tonight-box p{margin:0;color:var(--muted);font-size:11px}
.tonight-result{margin-top:12px}
.reader-page.reader-sepia{--reader-bg:#eee1c8;--reader-text:#362f25;--reader-muted:#786c5b;--reader-line:#cabb9f}
.reader-page.reader-sepia .reader-header{background:#322b23}
.line-row{display:grid;grid-template-columns:70px 1fr 55px;gap:10px;align-items:center;padding:14px 0;border-bottom:1px solid var(--reader-line)}
.line-row input{width:100%}.line-row output{text-align:right;color:var(--reader-muted)}
.schedule-preview{overflow:auto;border:1px solid var(--line);border-radius:10px;margin-top:12px}
.schedule-table{width:100%;border-collapse:collapse;min-width:620px}
.schedule-table th,.schedule-table td{text-align:left;padding:9px;border-bottom:1px solid var(--line);font-size:11px}.schedule-table th{color:var(--gold2);background:var(--surface2)}
.batch-help{font-size:11px;color:var(--muted);line-height:1.6;background:var(--surface2);border-left:3px solid var(--gold);padding:10px 12px}
.admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin:12px 0 18px}
.stat-card{padding:12px}.stat-card strong{display:block;font-size:26px;color:var(--gold2)}.stat-card span{font-size:10px;color:var(--muted)}
.admin-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:760px){
  .footer-inner{grid-template-columns:48px 1fr}.footer-inner>a{grid-column:2}
  .admin-stats{grid-template-columns:repeat(2,1fr)}
  .toast-host{bottom:76px}
}

/* V44: trang truyện/đọc truyện thu thanh điều hướng thành ấn nhỏ */
.reader-mini-home{position:fixed;left:14px;bottom:calc(14px + env(safe-area-inset-bottom));width:48px;height:48px;border-radius:50%;z-index:1400;display:grid;place-items:center;text-decoration:none;background:#08241f;border:1px solid #d5a64f;box-shadow:0 8px 24px rgba(0,0,0,.32);color:#f0c66d}
.reader-mini-home .mini-seal{width:31px;height:31px;border:1px solid currentColor;border-radius:6px;display:grid;place-items:center;font-family:"Noto Serif",serif;font-size:17px;font-weight:900}
.reader-mini-home:active{transform:scale(.94)}

/* V45 data-unified polish */
.story-card img,.list-card img,.rec-card img{background:var(--surface2)}
.admin-item .secondary{min-height:36px;padding:0 10px}
.admin-item a.secondary{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.admin-schedule-filters{grid-template-columns:repeat(3,minmax(0,1fr))}
.schedule-admin-item{grid-template-columns:auto minmax(0,1fr) auto}
.schedule-select{margin:0!important;display:grid!important;place-items:center}
.schedule-select input{width:20px!important;min-height:20px!important;margin:0}
.schedule-admin-main{min-width:0;display:grid;gap:4px}.schedule-admin-main b,.schedule-admin-main small{overflow-wrap:anywhere}
.schedule-admin-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.schedule-error{color:#ff9d91}
.data-live{display:inline-block;padding:2px 6px;border-radius:999px;background:#1c5e50;color:#fff;font-size:8px;font-weight:800}

/* =========================================================
   V46 — AUTO SCROLL: visible in reading mode, smooth RAF loop
   ========================================================= */
.auto-float-state{
  position:fixed;
  right:14px;
  bottom:calc(76px + env(safe-area-inset-bottom));
  z-index:1750;
  min-width:64px;
  height:34px;
  padding:0 10px;
  border:1px solid #c28e3e;
  border-radius:999px;
  background:#0b3e36;
  color:#f4cf83;
  font-size:10px;
  font-weight:900;
  letter-spacing:.7px;
  box-shadow:0 7px 20px rgba(0,0,0,.28);
  display:none;
}
body.auto-reading .auto-float-state{display:block}
body.auto-reading .read-progress{box-shadow:0 0 7px rgba(217,170,85,.65)}
@media(max-width:760px){
  .auto-float-state{bottom:calc(18px + env(safe-area-inset-bottom))}
  .reader-mini-home + .auto-float-state{right:14px}
}

/* =========================================================
   V47 — READER COMFORT / FOCUS MODE
   ========================================================= */
.reader-page .reader-header,
.reader-page .float-actions,
.reader-page .bottom-nav{
  transition:transform .22s ease,opacity .18s ease,visibility .18s ease;
}
.reader-page.reader-focus:not(.reader-controls-visible) .bottom-nav{
  transform:translateY(115%);opacity:0;visibility:hidden;pointer-events:none;
}
.reader-page.reader-focus:not(.reader-controls-visible) .reader-main{padding-bottom:18px}
.reader-page.auto-reading:not(.reader-controls-visible) .reader-header,
.reader-page.auto-reading:not(.reader-controls-visible) .float-actions,
.reader-page.auto-reading:not(.reader-controls-visible) .bottom-nav{
  transform:translateY(-110%);opacity:0;visibility:hidden;pointer-events:none;
}
.reader-page.auto-reading:not(.reader-controls-visible) .float-actions{transform:translateX(130%)}
.reader-jump{display:grid;grid-template-columns:1fr 62px;gap:8px;padding:8px 0 14px}
.reader-jump input,.reader-jump button{min-height:46px;border-radius:12px;border:1px solid #42554e;padding:0 12px;font:inherit}
.reader-jump input{background:transparent;color:inherit}
.reader-jump button{background:#c99542;color:#101b17;font-weight:900}
.chapter-window a.chapter-read{opacity:.68}
.chapter-window a.chapter-read b{color:#71817b}
.chapter-hint{margin:4px 0 10px;font-size:12px}
@media(max-width:760px){
  .reader-page.reader-focus:not(.reader-controls-visible) .reading{padding-top:18px}
  .reader-page.reader-focus:not(.reader-controls-visible){padding-bottom:0!important}
}
@media(prefers-reduced-motion:reduce){
  .reader-page .reader-header,.reader-page .float-actions,.reader-page .bottom-nav{transition:none}
}

/* =========================================================
   V48 — CLEAN NAV + LIGHTER READER
   Home keeps bottom nav. All other pages navigate via hamburger.
   ========================================================= */

/* Non-home pages no longer reserve space for bottom nav. */
body:not(.reader-page){
  padding-bottom:0;
}

/* Reader has no bottom navigation at all. */
.reader-page{
  padding-bottom:0!important;
}
.reader-page .reader-main{
  padding-bottom:34px!important;
}

/* Only two floating buttons remain in reader: bookmark + tools. */
.reader-page .float-actions{
  bottom:18px!important;
  gap:8px!important;
}
.reader-page .float-actions button{
  width:46px!important;
  height:46px!important;
}

/* Chapter jump: never overflow on narrow phones. */
.jump-box{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
.jump-box input,
.jump-box button{
  max-width:100%!important;
  min-width:0!important;
}
@media(max-width:760px){
  .jump-box{
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  .jump-box input{
    width:100%!important;
  }
  .jump-box button{
    width:100%!important;
    min-height:48px!important;
  }

  /* Reader utility jump also stacks safely on smaller screens. */
  .reader-jump{
    grid-template-columns:1fr!important;
  }
  .reader-jump button{
    width:100%!important;
  }

  /* Non-home pages do not carry obsolete bottom-nav spacing. */
  body:not(.reader-page) .page{
    padding-bottom:34px!important;
  }
}

/* Homepage remains the only page that reserves space for its bottom nav. */
body:has(.bottom-nav) {
  padding-bottom:calc(var(--bottom-nav-h) + env(safe-area-inset-bottom))!important;
}

/* Fallback for browsers without :has(): index's nav is fixed, page already has generous bottom spacing. */
@supports not selector(body:has(*)){
  .bottom-nav{display:grid}
}

/* Less repaint while scrolling: header/floating controls get their own compositor layers. */
.reader-page .reader-header,
.reader-page .float-actions{
  transform:translate3d(0,0,0);
  backface-visibility:hidden;
  will-change:transform,opacity;
}

/* Utility panel remains the only full navigation/control surface inside reading mode. */
.reader-page .sheet{
  overscroll-behavior:contain;
}

/* =========================================================
   V50 — CLEAN MOBILE NAV
   One navigation system only: hamburger drawer.
   ========================================================= */

/* No bottom fixed navigation anywhere. */
.bottom-nav{
  display:none!important;
}

/* No floating mini seal shortcut. */
.reader-mini-home{
  display:none!important;
}

/* Remove obsolete reserved bottom space created by older versions. */
html,body{
  padding-bottom:0!important;
}
.page{
  padding-bottom:36px!important;
}
.reader-page{
  padding-bottom:0!important;
}
.reader-page .reader-main{
  padding-bottom:36px!important;
}

/* Keep reader light: only bookmark + tools remain fixed. */
.reader-page .float-actions{
  bottom:18px!important;
}

/* On mobile, content can use the full viewport height now. */
@media(max-width:760px){
  body,
  body:not(.reader-page),
  .reader-page{
    padding-bottom:0!important;
  }
  .page{
    padding-bottom:30px!important;
  }
  .reader-page .reader-main{
    padding-bottom:30px!important;
  }
  .toast-host{
    bottom:18px!important;
  }
}

/* Remove old compositor work tied to bottom nav. */
.bottom-nav,
.bottom-nav *{
  transition:none!important;
  animation:none!important;
  will-change:auto!important;
}

/* V51 — self-managed admin */
.admin-tabs{position:sticky;top:8px;z-index:50;background:var(--bg);padding:8px;border-radius:12px}
.admin-tab-pane{margin-top:14px}
.file-label{display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.admin-item>span:last-child{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end}
.admin-item .secondary{white-space:nowrap}
@media(max-width:760px){
  .admin-tabs{position:static}
  .admin-item{grid-template-columns:1fr}
  .admin-item>span:last-child{justify-content:flex-start}
  .admin-schedule-filters{grid-template-columns:1fr}
  .schedule-admin-item{grid-template-columns:auto minmax(0,1fr)}
  .schedule-admin-actions{grid-column:1/-1;justify-content:flex-start}
}

.admin-hint{margin:6px 0 10px;font-size:11px;line-height:1.55;opacity:.82}

/* =========================================================
   V54 — compact mobile hero + chapter list + rich night pick
   ========================================================= */
.chapter-quick-list{
  max-height:min(52vh,520px);
  overflow:auto;
  margin-top:6px;
  border-top:1px solid rgba(255,255,255,.08);
  overscroll-behavior:contain;
}
.chapter-quick-list a{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:13px 2px;border-bottom:1px solid rgba(255,255,255,.08);
  color:inherit;text-decoration:none;
}
.chapter-quick-list a.current{color:#e3b657;font-weight:900}
.night-pick-card{display:grid;grid-template-columns:112px 1fr;gap:14px;align-items:start;margin-top:12px}
.night-pick-cover{display:block;aspect-ratio:3/4;border-radius:14px;overflow:hidden;border:1px solid rgba(210,167,86,.45)}
.night-pick-cover img{width:100%;height:100%;object-fit:cover;display:block}
.night-pick-info{min-width:0}
.night-pick-meta{font-size:12px;opacity:.72;margin-bottom:4px}
.night-pick-title{display:block;font-size:22px;font-weight:900;line-height:1.15;color:inherit;text-decoration:none}
.night-pick-info p{margin:7px 0 10px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45;opacity:.82}
.night-pick-actions{display:flex;flex-wrap:wrap;gap:8px}
.mini-btn{min-height:40px!important;padding:0 14px!important;font-size:13px!important}
@media(max-width:760px){
  .hero{
    min-height:0!important;
    height:auto!important;
    aspect-ratio:1 / 1.28!important;
    max-height:610px!important;
  }
  .hero .hero-copy{padding:clamp(22px,6vw,34px)!important}
  .hero h1{font-size:clamp(38px,10vw,58px)!important;line-height:.98!important}
  .hero p{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
  .hero .primary{min-height:52px!important;padding:0 22px!important}
  #continueSection{margin-top:26px!important}
}
@media(max-width:420px){
  .night-pick-card{grid-template-columns:96px 1fr;gap:12px}
  .night-pick-title{font-size:20px}
}

.hero-carousel{position:relative!important;overflow:hidden!important;isolation:isolate;background:#07130f!important}
.hero-blur{position:absolute;inset:-28px;z-index:0;background-position:center;background-size:cover;filter:blur(22px) saturate(1.12);transform:scale(1.12);opacity:.58}
.hero-shade{position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,rgba(3,15,12,.94),rgba(3,15,12,.7) 48%,rgba(3,15,12,.2)),linear-gradient(0deg,rgba(3,15,12,.92),rgba(3,15,12,.05) 60%)}
.hero-cover{position:absolute!important;right:0!important;top:0!important;width:58%!important;height:100%!important;object-fit:contain!important;object-position:right center!important;z-index:2!important;filter:drop-shadow(-18px 0 28px rgba(0,0,0,.34));transform:translateX(4%)}
.hero-carousel .hero-copy{position:relative!important;z-index:4!important;width:68%!important}
.hero-arrow{position:absolute;z-index:7;top:50%;transform:translateY(-50%);width:40px;height:52px;border:1px solid rgba(223,176,84,.55);border-radius:13px;background:rgba(3,18,14,.58);color:#f0c66b;font-size:34px}
.hero-prev{left:10px}.hero-next{right:10px}
.hero-enter .hero-cover{animation:vukHeroCover .42s ease both}.hero-enter .hero-copy>*{animation:vukHeroCopy .42s ease both}
@keyframes vukHeroCover{from{opacity:.35;transform:translateX(9%) scale(.985)}to{opacity:.98;transform:translateX(4%) scale(1)}}@keyframes vukHeroCopy{from{opacity:.28;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:760px){.hero-carousel{aspect-ratio:1/1.12!important;max-height:535px!important;min-height:430px!important}.hero-cover{width:66%!important}.hero-carousel .hero-copy{width:82%!important;padding:28px 26px!important}.hero-carousel h1{font-size:clamp(36px,9.2vw,52px)!important}.hero-carousel p{font-size:15px!important}.hero-arrow{width:34px;height:44px;font-size:28px}.hero-prev{left:8px}.hero-next{right:8px}}
@media(max-width:420px){.hero-carousel{min-height:410px!important;max-height:500px!important}.hero-cover{width:69%!important}.hero-carousel .hero-copy{padding:24px 20px!important;width:86%!important}}

/* V56 — unified 2:3 covers + compact split hero */
.story-card img,.list-card img,.story-hero img,.rec-card img,.night-pick-cover,.rank-row img,.progress-card img,.saved-row img{aspect-ratio:2/3!important;object-fit:cover!important}
.hero-carousel{min-height:0!important;height:auto!important;aspect-ratio:16/8.7!important;max-height:430px!important;display:flex!important;align-items:stretch!important}
.hero-carousel .hero-blur{inset:-34px!important;filter:blur(26px) saturate(1.08)!important;opacity:.52!important}
.hero-carousel .hero-shade{background:linear-gradient(90deg,rgba(3,15,12,.97) 0%,rgba(3,15,12,.91) 43%,rgba(3,15,12,.44) 68%,rgba(3,15,12,.24) 100%)!important}
.hero-carousel .hero-cover{inset:auto!important;right:5%!important;top:7%!important;width:auto!important;height:86%!important;aspect-ratio:2/3!important;object-fit:cover!important;object-position:center!important;border-radius:13px!important;z-index:2!important;box-shadow:0 16px 38px rgba(0,0,0,.42)!important;transform:none!important}
.hero-carousel .hero-copy{position:relative!important;left:auto!important;bottom:auto!important;width:57%!important;max-width:none!important;padding:38px 28px 42px 38px!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important}
.hero-carousel h1{font-size:clamp(31px,5vw,50px)!important;margin:10px 0!important}.hero-carousel p{font-size:15px!important;line-height:1.5!important;display:-webkit-box!important;-webkit-line-clamp:3!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
@media(max-width:760px){.hero-carousel{aspect-ratio:16/10!important;min-height:0!important;max-height:none!important}.hero-carousel .hero-cover{right:4%!important;top:8%!important;height:84%!important;width:auto!important}.hero-carousel .hero-copy{width:60%!important;padding:22px 10px 30px 22px!important}.hero-carousel h1{font-size:clamp(25px,7vw,36px)!important;line-height:1.02!important}.hero-carousel p{font-size:12px!important;-webkit-line-clamp:3!important;margin-bottom:12px!important}.hero-carousel .primary{min-height:44px!important;padding:0 16px!important;font-size:15px!important}.hero-carousel .pill{font-size:10px!important;padding:7px 10px!important}.hero-dots{bottom:9px!important}.hero-arrow{width:30px!important;height:40px!important;font-size:25px!important}.hero-prev{left:5px!important}.hero-next{right:5px!important}}
@media(max-width:420px){.hero-carousel{aspect-ratio:16/10.5!important;min-height:0!important;max-height:none!important}.hero-carousel .hero-cover{right:3.5%!important;top:8%!important;height:84%!important}.hero-carousel .hero-copy{width:61%!important;padding:18px 7px 27px 18px!important}.hero-carousel h1{font-size:clamp(23px,6.7vw,31px)!important}.hero-carousel p{font-size:11.5px!important;line-height:1.4!important}.hero-carousel .primary{min-height:40px!important;padding:0 13px!important}}

/* ===== V57 HOME COMPACT ===== */
@media(max-width:760px){
 .hero-carousel{width:calc(100% - 24px)!important;margin:22px auto 26px!important;
   min-height:0!important;height:auto!important;max-height:none!important;aspect-ratio:16/10!important;
   border-radius:22px!important;overflow:hidden!important}
 .hero-carousel .hero-cover{right:12px!important;top:50%!important;width:38%!important;height:82%!important;
   max-width:38%!important;max-height:82%!important;aspect-ratio:2/3!important;object-fit:cover!important;
   object-position:center!important;transform:translateY(-50%)!important;border-radius:14px!important}
 .hero-enter .hero-cover{animation:v57cover .36s ease both!important}
 @keyframes v57cover{from{opacity:.35;transform:translate(8%,-50%) scale(.985)}
   to{opacity:1;transform:translate(0,-50%) scale(1)}}
 .hero-carousel .hero-copy{width:61%!important;padding:20px 12px 23px 22px!important}
 .hero-carousel h1{font-size:clamp(27px,7.5vw,38px)!important;line-height:1.03!important;margin:10px 0!important}
 .hero-carousel p{font-size:13.5px!important;line-height:1.45!important;display:-webkit-box!important;
   -webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden!important;margin-bottom:14px!important}
 .hero-carousel .primary{min-height:44px!important;padding:10px 16px!important;font-size:16px!important}
 .hero-carousel .hero-arrow{width:31px!important;height:42px!important;font-size:25px!important}
 .hero-carousel .hero-prev{left:5px!important}.hero-carousel .hero-next{right:5px!important}

 main section{margin-top:27px!important;margin-bottom:27px!important}
 .section-head{margin-bottom:13px!important}
 .section-head h2,section>h2{font-size:clamp(28px,7.3vw,38px)!important;line-height:1.08!important}

 /* latest/new-story containers used across prior builds */
 #latestGrid,.latest-grid,.story-grid{
   display:grid!important;grid-auto-flow:column!important;grid-auto-columns:minmax(142px,42vw)!important;
   grid-template-columns:none!important;gap:12px!important;overflow-x:auto!important;overflow-y:hidden!important;
   scroll-snap-type:x proximity!important;overscroll-behavior-inline:contain!important;-webkit-overflow-scrolling:touch!important;
   padding:2px 22px 10px!important;margin-left:-22px!important;margin-right:-22px!important;scrollbar-width:none!important}
 #latestGrid::-webkit-scrollbar,.latest-grid::-webkit-scrollbar,.story-grid::-webkit-scrollbar{display:none}
 #latestGrid>*,.latest-grid>*,.story-grid>*{scroll-snap-align:start!important;min-width:0!important}
 #latestGrid .story-card,.latest-grid .story-card,.story-grid .story-card{height:auto!important;border-radius:16px!important;overflow:hidden!important}
 #latestGrid .story-card img,.latest-grid .story-card img,.story-grid .story-card img,
 .story-card .cover,.story-card>img{width:100%!important;aspect-ratio:2/3!important;height:auto!important;
   object-fit:cover!important;object-position:center!important}
 .story-card .story-body,.story-card .card-body{padding:10px!important}
 .story-card h3{font-size:17px!important;line-height:1.18!important;margin:6px 0!important}
 .story-card p,.story-card .meta{font-size:12px!important;line-height:1.35!important}
 .genre-grid,.category-grid{gap:10px!important}
 .genre-grid>*,.category-grid>*{min-height:70px!important;padding:11px!important}
}
.story-card img,.book-cover,.cover-img,img[data-cover]{object-fit:cover;object-position:center}

/* ===== V58 VISUAL SYSTEM: calmer, consistent homepage ===== */
@media(max-width:760px){
  :root{--v58-gap:24px;--v58-radius:18px}

  /* one rhythm for homepage sections */
  main section{margin:24px 0!important}
  .section-head{display:flex!important;align-items:end!important;justify-content:space-between!important;
    gap:12px!important;margin:0 22px 12px!important}
  .section-head h2,section>h2{
    font-size:clamp(25px,6.5vw,32px)!important;line-height:1.08!important;
    letter-spacing:-.015em!important;margin:0!important
  }
  .section-head a{font-size:13px!important;line-height:1.2!important}

  /* cinematic hero */
  .hero-carousel{
    width:calc(100% - 28px)!important;aspect-ratio:1.72/1!important;
    margin:22px auto 24px!important;border-radius:20px!important;
    overflow:hidden!important;isolation:isolate!important
  }
  .hero-carousel::after{
    content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
    background:linear-gradient(90deg,rgba(2,16,13,.96) 0%,rgba(2,16,13,.86) 42%,rgba(2,16,13,.24) 74%,rgba(2,16,13,.48) 100%)!important
  }
  .hero-carousel .hero-bg{filter:blur(18px) brightness(.48) saturate(.82)!important;transform:scale(1.12)!important}
  .hero-carousel .hero-copy{
    position:relative!important;z-index:3!important;width:58%!important;
    padding:18px 8px 20px 20px!important;display:flex!important;flex-direction:column!important;
    justify-content:center!important
  }
  .hero-carousel h1{
    font-size:clamp(24px,6.7vw,34px)!important;line-height:1.02!important;
    display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;
    overflow:hidden!important;margin:9px 0!important
  }
  .hero-carousel p{
    font-size:12.5px!important;line-height:1.42!important;-webkit-line-clamp:2!important;
    margin:0 0 12px!important;opacity:.88
  }
  .hero-carousel .hero-cover{
    z-index:2!important;right:15px!important;width:34%!important;height:82%!important;
    max-width:34%!important;max-height:82%!important;border-radius:12px!important;
    box-shadow:0 12px 28px rgba(0,0,0,.28)!important
  }
  .hero-carousel .primary{
    align-self:flex-start!important;min-height:40px!important;padding:9px 14px!important;
    border-radius:12px!important;font-size:14px!important
  }
  .hero-carousel .badge,.hero-carousel .tag{font-size:11px!important;padding:6px 9px!important;border-radius:9px!important}
  .hero-carousel .hero-arrow{opacity:.72!important;width:28px!important;height:38px!important}
  .hero-dots{bottom:8px!important}
  .hero-dots>*{height:5px!important}

  /* Continue reading: less dashboard-like */
  .continue-card,.reading-card{
    margin-left:22px!important;margin-right:22px!important;border-radius:var(--v58-radius)!important;
    padding:14px!important
  }
  .continue-card img,.reading-card img{width:62px!important;aspect-ratio:2/3!important;height:auto!important;
    object-fit:cover!important;border-radius:10px!important}
  .continue-card h3,.reading-card h3{font-size:18px!important;line-height:1.18!important}

  /* Latest rail: one family of cards, 2.4 visible */
  #latestGrid,.latest-grid,.story-grid{
    grid-auto-columns:minmax(132px,39vw)!important;gap:11px!important;
    padding-left:22px!important;padding-right:22px!important
  }
  #latestGrid .story-card,.latest-grid .story-card,.story-grid .story-card{
    border-radius:14px!important;background:rgba(15,47,39,.72)!important;
    border:1px solid rgba(216,171,83,.14)!important;box-shadow:none!important
  }
  .story-card .story-body,.story-card .card-body{padding:9px 10px 10px!important}
  .story-card h3{font-size:15px!important;line-height:1.2!important;
    display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden!important}
  .story-card p,.story-card .meta{font-size:11.5px!important;opacity:.76!important}
  .story-card .badge,.story-card .tag{font-size:9.5px!important;padding:4px 6px!important;border-radius:7px!important}

  /* Category/utility blocks share scale */
  .genre-grid,.category-grid{margin-left:22px!important;margin-right:22px!important;gap:9px!important}
  .genre-grid>*,.category-grid>*{min-height:62px!important;border-radius:14px!important;padding:10px!important}

  /* gold = accent, not wallpaper */
  .section-head h2{color:var(--text,#f1eee5)!important}
}

/* ===== V59 MOBILE REDESIGN — compact-first ===== */
@media(max-width:760px){
  /* overall: less vertical travel */
  main{padding-bottom:28px!important}
  main section{margin:18px 0!important}
  .section-head{margin:0 18px 9px!important;gap:8px!important}
  .section-head h2,section>h2{
    font-size:clamp(22px,5.9vw,28px)!important;
    line-height:1.05!important;
  }
  .section-head a{font-size:12px!important}

  /* compact cinematic hero */
  .hero-carousel{
    width:calc(100% - 24px)!important;
    aspect-ratio:1.92/1!important;
    margin:16px auto 18px!important;
    border-radius:18px!important;
  }
  .hero-carousel .hero-copy{
    width:60%!important;
    padding:14px 6px 16px 18px!important;
  }
  .hero-carousel h1{
    font-size:clamp(21px,5.9vw,29px)!important;
    margin:6px 0 7px!important;
    -webkit-line-clamp:2!important;
  }
  .hero-carousel p{
    font-size:11.5px!important;
    line-height:1.35!important;
    -webkit-line-clamp:2!important;
    margin-bottom:9px!important;
  }
  .hero-carousel .hero-cover{
    right:13px!important;
    width:31%!important;
    height:80%!important;
    max-width:31%!important;
    max-height:80%!important;
    border-radius:11px!important;
  }
  .hero-carousel .primary{
    min-height:36px!important;
    padding:7px 12px!important;
    font-size:13px!important;
    border-radius:10px!important;
  }
  .hero-carousel .badge,.hero-carousel .tag{
    font-size:9.5px!important;padding:4px 7px!important;
  }
  .hero-carousel .hero-arrow{
    width:25px!important;height:34px!important;font-size:20px!important;
  }
  .hero-dots{bottom:6px!important}

  /* continue card = one compact horizontal strip */
  .continue-card,.reading-card{
    margin:0 18px!important;
    padding:11px 12px!important;
    min-height:0!important;
    border-radius:15px!important;
  }
  .continue-card img,.reading-card img{
    width:50px!important;
    border-radius:8px!important;
  }
  .continue-card h3,.reading-card h3{
    font-size:16px!important;
    line-height:1.15!important;
    margin:2px 0 4px!important;
  }
  .continue-card p,.reading-card p,.continue-card .meta,.reading-card .meta{
    font-size:11px!important;line-height:1.3!important;
  }

  /* story sections = horizontal shelves, never tall grids */
  #latestGrid,.latest-grid,.story-grid{
    grid-auto-columns:minmax(116px,34vw)!important;
    gap:9px!important;
    padding:1px 18px 7px!important;
    margin-left:-18px!important;
    margin-right:-18px!important;
  }
  #latestGrid .story-card,.latest-grid .story-card,.story-grid .story-card{
    border-radius:12px!important;
  }
  .story-card .story-body,.story-card .card-body{padding:7px 8px 8px!important}
  .story-card h3{
    font-size:13.5px!important;
    line-height:1.15!important;
    margin:4px 0!important;
  }
  .story-card p,.story-card .meta{
    font-size:10px!important;
    line-height:1.25!important;
  }
  .story-card .badge,.story-card .tag{
    font-size:8.5px!important;
    padding:3px 5px!important;
  }

  /* categories: six compact choices on home, rest belongs in category page */
  .genre-grid,.category-grid{
    margin:0 18px!important;
    gap:7px!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .genre-grid>*,.category-grid>*{
    min-height:48px!important;
    padding:7px!important;
    border-radius:11px!important;
    font-size:11.5px!important;
  }
  .genre-grid>*:nth-child(n+7),
  .category-grid>*:nth-child(n+7){display:none!important}

  /* random / tonight card stays short */
  .random-card,.tonight-card,.pick-card{
    margin:0 18px!important;
    min-height:0!important;
    padding:12px!important;
    border-radius:15px!important;
  }
  .random-card img,.tonight-card img,.pick-card img{
    width:54px!important;
    aspect-ratio:2/3!important;
    height:auto!important;
    object-fit:cover!important;
    border-radius:8px!important;
  }

  /* rankings: preview only, full list via its own page */
  .ranking-list>*:nth-child(n+6),
  .rank-list>*:nth-child(n+6){display:none!important}
  .ranking-list>*,.rank-list>*{
    min-height:42px!important;
    padding:7px 10px!important;
  }

  /* tame ornamental separators */
  .section-head:after{max-width:44px!important;opacity:.5!important}
}

/* ===== V60 MOBILE HOME — real structural redesign ===== */
.home-v60 .v60-home{background:var(--bg);min-height:100vh}
.home-v60 .v60-shell{max-width:760px;margin:auto;padding:12px 16px 28px}
.home-v60 .v60-section{margin:18px 0 22px}
.home-v60 .v60-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.home-v60 .v60-head h2{margin:0;font-size:17px;line-height:1.15;text-transform:uppercase;letter-spacing:.02em;font-family:inherit;font-weight:900;color:var(--text)}
.home-v60 .v60-head a{font-size:12px;color:var(--muted);white-space:nowrap}
.home-v60 .v60-head a:hover{color:var(--gold)}

.home-v60 .v60-genre-row{display:grid;grid-template-columns:repeat(6,minmax(82px,1fr));gap:9px;overflow-x:auto;padding:1px 0 4px;scrollbar-width:none}
.home-v60 .v60-genre-row::-webkit-scrollbar{display:none}
.home-v60 .v60-genre{min-width:82px;display:grid;place-items:center;gap:7px;padding:12px 7px;border-radius:13px;background:rgba(15,38,33,.72);border:1px solid rgba(216,171,83,.10);color:var(--text);text-align:center}
.home-v60 .v60-genre svg{width:25px;height:25px;color:var(--gold)}
.home-v60 .v60-genre span{font-size:11px;font-weight:800;white-space:nowrap}

.home-v60 .v60-progress{display:grid;grid-template-columns:62px minmax(0,1fr) 46px;grid-template-areas:"img copy pct" "img copy btn";gap:10px 12px;align-items:center;padding:11px;border-radius:15px;background:rgba(15,43,36,.68);border:1px solid rgba(216,171,83,.13);color:inherit}
.home-v60 .v60-progress img{grid-area:img;width:62px;aspect-ratio:2/3;height:auto;object-fit:cover;border-radius:9px}
.home-v60 .v60-progress-copy{grid-area:copy;min-width:0}
.home-v60 .v60-progress h3{margin:0 0 2px;font-size:17px;line-height:1.15}
.home-v60 .v60-progress-copy span,.home-v60 .v60-progress-copy p{display:block;margin:0 0 5px;font-size:11px;color:var(--muted)}
.home-v60 .v60-bar{height:5px;border-radius:99px;background:rgba(255,255,255,.06);overflow:hidden}
.home-v60 .v60-bar i{display:block;height:100%;background:var(--gold)}
.home-v60 .v60-progress strong{grid-area:pct;font-size:18px;color:var(--gold);text-align:right}
.home-v60 .v60-progress>b{grid-area:btn;justify-self:end;font-size:10px;font-weight:800;color:var(--gold);border:1px solid rgba(216,171,83,.6);border-radius:10px;padding:7px 8px}

.home-v60 .v60-story-rail{display:grid;grid-auto-flow:column;grid-auto-columns:132px;gap:10px;overflow-x:auto;scroll-snap-type:x proximity;padding:1px 0 6px;scrollbar-width:none}
.home-v60 .v60-story-rail::-webkit-scrollbar{display:none}
.home-v60 .v60-story{scroll-snap-align:start;color:inherit;min-width:0}
.home-v60 .v60-cover-wrap{position:relative;border-radius:12px;overflow:hidden;border:1px solid rgba(216,171,83,.22);background:#09120f}
.home-v60 .v60-cover-wrap img{width:100%;aspect-ratio:2/3;height:auto;display:block;object-fit:cover}
.home-v60 .v60-cover-wrap span{position:absolute;top:7px;left:7px;padding:3px 6px;border-radius:7px;font-size:9px;font-weight:900;color:white}
.home-v60 .v60-cover-wrap .hot{background:#bd3e36}.home-v60 .v60-cover-wrap .new{background:#438c46}
.home-v60 .v60-story h3{margin:7px 2px 2px;font-size:13px;line-height:1.18;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home-v60 .v60-story p{margin:0 2px;font-size:10.5px;color:var(--muted)}

.home-v60 .v60-tonight{display:grid;grid-template-columns:92px minmax(0,1fr);gap:13px;padding:10px;border-radius:15px;background:rgba(11,34,29,.66);border:1px solid rgba(216,171,83,.13)}
.home-v60 .v60-tonight-cover img{width:92px;aspect-ratio:4/3;height:auto;object-fit:cover;border-radius:10px;display:block}
.home-v60 .v60-tonight-copy{min-width:0;align-self:center}
.home-v60 .v60-tonight-copy h3{margin:0 0 5px;font-size:17px;line-height:1.15}
.home-v60 .v60-tonight-copy p{margin:0 0 9px;font-size:11px;line-height:1.4;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home-v60 .v60-tonight-copy>div{display:flex;align-items:center;justify-content:space-between;gap:8px}
.home-v60 .v60-outline,.home-v60 .v60-dice{border:1px solid var(--gold);color:var(--gold);background:transparent;border-radius:10px;min-height:34px;padding:7px 11px;font-size:11px;font-weight:800}
.home-v60 .v60-dice{width:36px;padding:0;font-size:18px}

.home-v60 .v60-ranking{padding-bottom:4px}
.home-v60 .v60-rank-tabs{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid rgba(216,171,83,.11);border-radius:11px 11px 0 0;overflow:hidden}
.home-v60 .v60-rank-tabs button{min-height:34px;background:transparent;border:0;color:var(--muted);font-size:11px}
.home-v60 .v60-rank-tabs button.active{color:var(--gold);box-shadow:inset 0 -2px var(--gold)}
.home-v60 .v60-rank-list{border:1px solid rgba(216,171,83,.11);border-top:0;border-radius:0 0 11px 11px;padding:4px 9px}
.home-v60 .v60-rank-row{display:grid;grid-template-columns:24px minmax(0,1fr) auto 28px;gap:8px;align-items:center;min-height:39px;color:inherit}
.home-v60 .v60-rank-row strong{width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:rgba(216,171,83,.18);color:var(--gold);font-size:10px}
.home-v60 .v60-rank-row span{font-size:12px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-v60 .v60-rank-row em{font-size:10px;color:var(--muted);font-style:normal}
.home-v60 .v60-rank-row img{width:25px;aspect-ratio:2/3;height:auto;object-fit:cover;border-radius:4px}

@media(max-width:420px){
 .home-v60 .v60-shell{padding-left:14px;padding-right:14px}
 .home-v60 .v60-genre-row{grid-template-columns:repeat(6,78px)}
 .home-v60 .v60-genre{min-width:78px}
 .home-v60 .v60-story-rail{grid-auto-columns:122px}
}

/* ===== V61 COMPACT GENRES ===== */
.home-v60 .v60-genres{margin-top:14px!important;margin-bottom:16px!important}
.home-v60 .v60-genres .v60-head{margin-bottom:7px!important}
.home-v60 .v60-genres .v60-head h2{font-size:14px!important;letter-spacing:.015em!important}
.home-v60 .v60-genres .v60-head a{font-size:11px!important}
.home-v60 .v60-genre-row{
  display:grid!important;
  grid-auto-flow:column!important;
  grid-auto-columns:76px!important;
  grid-template-columns:none!important;
  gap:7px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  padding:0 0 3px!important;
  scrollbar-width:none!important;
  scroll-snap-type:x proximity!important;
}
.home-v60 .v60-genre-row::-webkit-scrollbar{display:none!important}
.home-v60 .v61-genre{
  scroll-snap-align:start;
  width:76px!important;
  min-width:76px!important;
  min-height:60px!important;
  padding:7px 5px 6px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  border-radius:12px!important;
  background:rgba(12,34,29,.62)!important;
  border:1px solid rgba(216,171,83,.10)!important;
  color:var(--text)!important;
  text-align:center!important;
}
.home-v60 .v61-genre svg{
  width:23px!important;
  height:23px!important;
  fill:none!important;
  stroke:var(--gold)!important;
  stroke-width:1.7!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.home-v60 .v61-genre span{
  display:block!important;
  max-width:68px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:10.5px!important;
  line-height:1!important;
  font-weight:800!important;
}

/* Prevent text from escaping cards */
.home-v60 .v60-progress-copy,
.home-v60 .v60-tonight-copy,
.home-v60 .v60-story,
.home-v60 .v61-random-card>div{min-width:0!important}
.home-v60 .v60-progress h3,
.home-v60 .v60-tonight-copy h3,
.home-v60 .v61-random-card h3{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

/* Compact random story at the very bottom */
.home-v60 .v61-random{margin-bottom:10px!important}
.home-v60 .v61-random-again{
  border:0;background:transparent;color:var(--muted);font-size:11px;padding:4px 0;
}
.home-v60 .v61-random-card{
  display:grid;grid-template-columns:48px minmax(0,1fr) 18px;
  gap:10px;align-items:center;padding:9px 10px;
  border-radius:13px;background:rgba(11,34,29,.58);
  border:1px solid rgba(216,171,83,.12);color:inherit;
}
.home-v60 .v61-random-card img{
  width:48px;aspect-ratio:2/3;height:auto;object-fit:cover;border-radius:7px;
}
.home-v60 .v61-random-card h3{margin:0 0 3px;font-size:13.5px;line-height:1.1}
.home-v60 .v61-random-card p{margin:0 0 3px;font-size:9.5px;color:var(--gold)}
.home-v60 .v61-random-card span{
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;
  font-size:10px;color:var(--muted);line-height:1.25
}
.home-v60 .v61-random-card>b{font-size:16px;color:var(--gold);text-align:right}

@media(max-width:420px){
  .home-v60 .v60-genre-row{grid-auto-columns:72px!important}
  .home-v60 .v61-genre{width:72px!important;min-width:72px!important;min-height:58px!important}
}

/* ===== V62 UI REFINEMENT ===== */

/* Shared genre icon visual */
.genre-icon{width:24px;height:24px;color:var(--gold);flex:0 0 auto}

/* Drawer: lighter, grouped, less "table-like" */
.drawer{max-width:min(86vw,340px)!important}
.drawer-head{padding:20px 18px 16px!important;border-bottom:1px solid rgba(216,171,83,.12)!important}
.drawer-head b{font-size:20px!important;color:var(--gold)!important}
.drawer-head button{width:42px!important;height:42px!important;border-radius:12px!important;background:rgba(255,255,255,.04)!important}
.drawer-nav{padding:10px 10px 18px!important}
.drawer-label{display:block;padding:12px 10px 6px;font-size:10px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:rgba(216,171,83,.72)}
.drawer-nav a{min-height:50px!important;padding:0 12px!important;margin:2px 0!important;border:0!important;border-radius:12px!important;gap:12px!important}
.drawer-nav a:hover,.drawer-nav a.active{background:rgba(216,171,83,.08)!important}
.drawer-nav a .icon{width:22px!important;height:22px!important;color:var(--gold)!important}
.drawer-nav a span{font-size:15px!important;font-weight:750!important}

/* Genres page: equal cells, organized icon grid */
#genreFilters{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:9px!important;
  margin:18px 0 16px!important;
}
#genreFilters .genre-choice{
  min-width:0!important;
  min-height:76px!important;
  padding:10px 7px!important;
  border-radius:14px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  text-align:center!important;
}
#genreFilters .genre-choice .genre-icon,
#genreFilters .genre-choice .icon{width:26px!important;height:26px!important;color:var(--gold)!important}
#genreFilters .genre-choice span{
  width:100%!important;
  font-size:13px!important;
  line-height:1.1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#genreFilters .genre-choice.active{
  background:linear-gradient(135deg,#e5b651,#c99233)!important;
  color:#10231d!important;
  border-color:transparent!important;
}
#genreFilters .genre-choice.active .genre-icon,
#genreFilters .genre-choice.active .icon{color:#10231d!important}
.genre-sort{
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:8px!important;
  overflow-x:auto!important;
  padding:1px 0 5px!important;
  scrollbar-width:none!important;
}
.genre-sort::-webkit-scrollbar{display:none!important}
.genre-sort .filter-btn{
  flex:0 0 auto!important;
  min-height:40px!important;
  padding:8px 13px!important;
  border-radius:11px!important;
  font-size:12px!important;
}
.notice{font-size:11px!important;line-height:1.4!important;padding:10px 12px!important;margin:12px 0 18px!important}

/* Story detail: compact and balanced */
.story-hero-v62{
  display:grid!important;
  grid-template-columns:118px minmax(0,1fr)!important;
  gap:16px!important;
  align-items:start!important;
  padding:16px!important;
}
.story-cover-wrap{width:118px}
.story-cover-wrap img{
  width:118px!important;height:auto!important;aspect-ratio:2/3!important;object-fit:cover!important;border-radius:13px!important;display:block!important
}
.story-info-v62{min-width:0}
.story-info-v62 .page-kicker{font-size:11px!important}
.story-info-v62 h1{
  font-size:clamp(27px,7.2vw,42px)!important;
  line-height:1.03!important;
  margin:7px 0 8px!important;
  overflow-wrap:anywhere!important;
}
.story-info-v62 #storyAuthor{font-size:14px!important;margin:0 0 5px!important}
.story-meta-v62{font-size:12px!important;margin:0 0 8px!important}
.story-desc-v62{
  margin:8px 0 12px!important;
  font-size:14px!important;
  line-height:1.45!important;
  display:-webkit-box!important;
  -webkit-line-clamp:4!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
}
.story-actions-v62{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
  margin-top:10px!important;
}
.story-actions-v62 .primary{
  grid-column:1/-1!important;
  min-height:44px!important;
  padding:10px 13px!important;
  font-size:14px!important;
}
.story-actions-v62 .secondary{
  min-height:40px!important;
  padding:8px 10px!important;
  font-size:12px!important;
}
.chapter-window a{min-height:48px!important}
.chapter-window a b{font-size:14px!important}
.chapter-window a span{font-size:11px!important}

@media(max-width:420px){
  .story-hero-v62{grid-template-columns:102px minmax(0,1fr)!important;gap:13px!important;padding:13px!important}
  .story-cover-wrap,.story-cover-wrap img{width:102px!important}
  #genreFilters{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important}
  #genreFilters .genre-choice{min-height:70px!important}
}

/* ===== V63 FUNCTIONAL FIXES ===== */
html,body{max-width:100%;overflow-x:clip}
.site-header,.site-header>.container{max-width:100%}
.brand-link{min-width:0;overflow:hidden;padding:0 2px}
.brand-link img{width:auto!important;max-width:100%!important;height:auto!important;max-height:70px!important;object-fit:contain!important;object-position:center!important;clip-path:inset(2px 0 2px)}
@media(max-width:760px){
 .site-header>.container{width:calc(100% - 20px)!important}
 .header-top{height:76px!important;grid-template-columns:44px minmax(0,1fr) 44px 44px!important;gap:6px!important}
 .header-icon{width:44px!important;height:44px!important}.brand-link{height:66px!important}.brand-link img{max-height:62px!important}
}
@media(max-width:380px){
 .site-header>.container{width:calc(100% - 14px)!important}.header-top{grid-template-columns:42px minmax(0,1fr) 42px 42px!important;gap:4px!important}
 .header-icon{width:42px!important;height:42px!important}.brand-link img{max-height:57px!important}.search-box>button{padding:0 16px!important}
}
.genre-pager{display:flex;align-items:center;justify-content:center;gap:7px;margin:22px 0 6px;flex-wrap:wrap}
.genre-pager button,.genre-pager a,.genre-pager span{min-width:38px;height:38px;padding:0 9px;border-radius:10px;display:grid;place-items:center}
.genre-pager button,.genre-pager a{border:1px solid var(--line);background:var(--surface2);color:var(--text);font-weight:800;text-decoration:none}
.genre-pager button.active,.genre-pager a.active{background:var(--gold);color:#10211d;border-color:var(--gold2)}.genre-pager button:disabled,.genre-pager a[aria-disabled="true"]{opacity:.35}.genre-pager span{color:var(--muted)}
.story-actions-v63{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.story-actions-v63 .primary{grid-column:1/-1!important}.story-actions-v63>*{min-width:0!important;text-align:center!important}
.reader-search-modal{position:fixed;inset:0;z-index:4200;background:rgba(0,0,0,.58);display:none;align-items:center;justify-content:center;padding:20px}
.reader-search-modal.show{display:flex}
.reader-search-dialog{position:relative;width:min(100%,420px);border-radius:18px;background:#10251f;color:#f7f1e6;border:1px solid rgba(217,170,85,.45);box-shadow:0 28px 80px rgba(0,0,0,.5);padding:22px}
.reader-search-dialog h3{margin:0 34px 6px 0;font-size:22px;font-family:"Noto Serif",Georgia,serif}.reader-search-dialog p{margin:0 0 16px;color:#b9c4be;font-size:13px}
.reader-search-dialog input{width:100%;height:48px;border-radius:11px;border:1px solid #3a554a;background:#0b1d18;color:#fff;padding:0 13px;outline:none}
.reader-search-dialog form>div{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.reader-search-close{position:absolute;right:12px;top:10px;width:36px;height:36px;border:0;border-radius:10px;background:transparent;color:#f0ca7a;font-size:26px}
.admin-genre-picker{display:flex;flex-wrap:wrap;gap:8px;padding:10px;border:1px solid var(--line);border-radius:12px;background:rgba(0,0,0,.08)}
.admin-genre-chip{min-height:40px;display:flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface2);color:var(--text);font-size:12px;font-weight:800}
.admin-genre-chip .genre-icon{width:19px;height:19px}.admin-genre-chip.active{background:linear-gradient(135deg,#e5b651,#c99233);color:#10211d;border-color:transparent}.admin-genre-chip.active .genre-icon{color:#10211d}

/* ===== V64 REGRESSION FIX: header/logo + reader auto-hide ===== */

/* Header logo sizing is scoped; do not let generic responsive rules stretch/crop it. */
.site-header .header-top,
.reader-header .reader-top{
  width:100%;
  max-width:100%;
  min-width:0;
}
.site-header .brand-link,
.reader-header .reader-logo{
  min-width:0!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.site-header .brand-link img,
.reader-header .reader-logo img{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  clip-path:none!important;
  margin:0!important;
  transform:none!important;
}

/* Keep actual logo inside the slot on narrow phones. */
@media(max-width:760px){
  .site-header .brand-link{height:58px!important;padding:0 4px!important}
  .reader-header .reader-logo{height:58px!important;padding:0 4px!important}
}
@media(max-width:390px){
  .site-header .brand-link{height:54px!important}
  .reader-header .reader-logo{height:54px!important}
}

/* ===== READER CONTROL VISIBILITY — canonical ===== */
.reader-page .reader-header,
.reader-page .float-actions{
  transition:transform .18s ease,opacity .18s ease!important;
  will-change:transform,opacity;
}
.reader-page.reader-focus:not(.reader-controls-visible) .reader-header{
  transform:translate3d(0,-125%,0)!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
.reader-page.reader-focus:not(.reader-controls-visible) .float-actions{
  transform:translate3d(145%,0,0)!important;
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
.reader-page.reader-controls-visible .reader-header,
.reader-page.reader-controls-visible .float-actions{
  transform:translate3d(0,0,0)!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
}

/* ===== V66 FINAL QA ===== */
.v66-random-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px}
.v66-random-book{display:block;min-width:0;color:inherit;text-decoration:none}
.v66-random-book img{display:block;width:100%;height:auto;aspect-ratio:2/3;object-fit:cover;object-position:center;border-radius:10px;border:1px solid rgba(216,171,83,.18)}
.v66-random-book h3{margin:6px 1px 2px;font-size:12px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.4em}
.v66-random-book p{margin:0 1px;font-size:9.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.admin-cover-preview-wrap{display:flex;align-items:center;gap:14px;margin:9px 0 14px;padding:10px;border:1px solid var(--line);border-radius:12px;background:rgba(0,0,0,.08)}
.admin-cover-preview{flex:0 0 82px;width:82px;aspect-ratio:2/3;overflow:hidden;border-radius:9px;border:1px solid rgba(216,171,83,.25)}
.admin-cover-preview img{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
.admin-cover-preview-copy{min-width:0;display:flex;flex-direction:column;gap:4px}
.admin-cover-preview-copy b{font-size:13px}
.admin-cover-preview-copy span{font-size:11px;color:var(--muted)}
\n/* ===== V67 FIX: balanced story actions ===== */
.story-actions-v63{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:stretch!important;
}
.story-actions-v63 .primary{grid-column:1/-1!important}
.story-actions-v63 #readStart,.story-actions-v63 #resume{
  width:100%!important;min-height:58px!important;height:100%!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:10px 8px!important;line-height:1.15!important;
}
.story-actions-v63 #saveBtn{
  grid-column:1/-1!important;justify-self:center!important;
  width:min(58%,190px)!important;min-height:48px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:9px 12px!important;line-height:1.15!important;
}
.story-actions-v63 .hidden{display:none!important}
@media(max-width:380px){.story-actions-v63 #saveBtn{width:min(64%,180px)!important}}

.reader-page.reader-light{--reader-bg:#f7f0e2;--reader-text:#202521;--reader-muted:#6b726e;--reader-line:#d6cbb8}

/* V68 MINI HERO — V67 baseline */
.home-v60 .v67-mini-hero{position:relative;isolation:isolate;overflow:hidden;min-height:310px;margin:18px 0 22px;border-radius:20px;border:1px solid rgba(217,170,85,.24);box-shadow:var(--shadow);display:grid;grid-template-columns:minmax(0,1fr) 150px;align-items:center;gap:22px;padding:26px 30px}
.v67-mini-hero-bg{position:absolute;inset:-24px;z-index:-3;background-size:cover;background-position:center;filter:blur(18px) saturate(.85);transform:scale(1.08)}
.v67-mini-hero-shade{position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,rgba(4,17,14,.96) 0%,rgba(4,17,14,.80) 53%,rgba(4,17,14,.42) 100%)}
.v67-mini-hero-copy{min-width:0}.v67-mini-kicker{display:block;margin-bottom:7px;color:#e0b86d;font-size:11px;font-weight:800;letter-spacing:1.5px}
.v67-mini-hero h1{margin:0 0 8px;font-family:"Noto Serif",Georgia,serif;font-size:32px;line-height:1.12;color:#fff}.v67-mini-hero p{max-width:610px;margin:0 0 15px;color:#d5ddd8;font-size:14px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.v67-mini-actions{display:flex;gap:9px}.v67-mini-read,.v67-mini-detail{min-height:40px;padding:0 15px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:800}.v67-mini-read{background:#d9aa55;color:#142019}.v67-mini-detail{border:1px solid rgba(255,255,255,.30);color:#fff;background:rgba(0,0,0,.12)}
.v67-mini-cover{justify-self:end;width:140px;filter:drop-shadow(0 12px 18px rgba(0,0,0,.38))}.v67-mini-cover img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:12px;border:1px solid rgba(255,255,255,.2)}
.v67-mini-dots{display:flex;gap:6px;margin-top:14px}.v67-mini-dots button{width:18px;height:4px;padding:0;border:0;border-radius:99px;background:rgba(255,255,255,.28)}.v67-mini-dots button.active{width:30px;background:#d9aa55}
@media(max-width:640px){.home-v60 .v67-mini-hero{min-height:238px;height:238px;margin:12px 0 16px;border-radius:15px;grid-template-columns:minmax(0,1fr) 92px;gap:12px;padding:17px 15px}.v67-mini-hero-shade{background:linear-gradient(90deg,rgba(4,17,14,.96) 0%,rgba(4,17,14,.82) 62%,rgba(4,17,14,.48) 100%)}.v67-mini-kicker{font-size:9px;letter-spacing:1.1px;margin-bottom:5px}.v67-mini-hero h1{font-size:22px;line-height:1.08;margin-bottom:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.v67-mini-hero p{font-size:11px;line-height:1.42;margin-bottom:10px;-webkit-line-clamp:2}.v67-mini-actions{gap:6px}.v67-mini-read,.v67-mini-detail{min-height:34px;padding:0 10px;font-size:11px;border-radius:8px}.v67-mini-cover{width:88px}.v67-mini-cover img{border-radius:9px}.v67-mini-dots{margin-top:9px}.v67-mini-dots button{width:13px;height:3px}.v67-mini-dots button.active{width:22px}}

.reader-search-hit{background:#f0c875;color:#142019;border-radius:3px;padding:0 .08em;box-shadow:0 0 0 1px rgba(20,32,25,.15)}

/* V68.3 — hide stray transparent-image artifacts at the brand PNG top-right only */
.site-header .brand-link{position:relative!important}
.site-header .brand-link::after{
  content:"";position:absolute;z-index:2;top:0;right:0;
  width:8%;height:18%;background:#06131a;pointer-events:none;
}


/* V68.6 — LIGHT MODE CONTRAST FIX ONLY
   Remove the dark translucent veil from homepage visual cards in light mode.
   No layout, reader, hero logic, pagination or dark-mode changes. */
body.light.home-v60 .v67-mini-hero{
  opacity:1;
  filter:none;
}
body.light.home-v60 .v67-mini-hero::before,
body.light.home-v60 .v67-mini-hero::after{
  opacity:1;
}
body.light.home-v60 .v67-mini-hero-shade{
  background:linear-gradient(90deg,rgba(7,22,18,.91) 0%,rgba(7,22,18,.73) 58%,rgba(7,22,18,.30) 100%);
}
body.light.home-v60 .continue-card{
  opacity:1;
  filter:none;
  color:#f7f2e8;
}
body.light.home-v60 .continue-card::before,
body.light.home-v60 .continue-card::after{
  opacity:1;
}
body.light.home-v60 .continue-card .continue-info,
body.light.home-v60 .continue-card .continue-info strong,
body.light.home-v60 .continue-card .continue-info span,
body.light.home-v60 .continue-card .continue-info p{
  opacity:1;
}

/* V68.7 — actual light-theme homepage fix.
   Theme is driven by html[data-theme="light"], not body.light. */
html[data-theme="light"] .home-v60 .v61-genre,
html[data-theme="light"] .home-v60 .v60-genre{
  background:var(--surface2)!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
html[data-theme="light"] .home-v60 .v60-progress{
  background:var(--surface)!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
html[data-theme="light"] .home-v60 .v60-progress-copy span,
html[data-theme="light"] .home-v60 .v60-progress-copy p{
  color:var(--muted)!important;
  opacity:1!important;
}
html[data-theme="light"] .home-v60 .v60-bar{
  background:rgba(24,35,31,.10)!important;
}
html[data-theme="light"] .home-v60 .v60-tonight,
html[data-theme="light"] .home-v60 .v61-random-card{
  background:var(--surface)!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
html[data-theme="light"] .home-v60 .v60-rank-tabs,
html[data-theme="light"] .home-v60 .v60-rank-list{
  background:var(--surface)!important;
  border-color:var(--line)!important;
}

/* V68.8 — GLOBAL LIGHT THEME CARD FIX
   Fix at the shared card layer, not per-page. Dark mode untouched. */
html[data-theme="light"] .story-card,
html[data-theme="light"] #latestGrid .story-card,
html[data-theme="light"] .latest-grid .story-card,
html[data-theme="light"] .story-grid .story-card{
  background:var(--panel)!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}
html[data-theme="light"] .story-card h3,
html[data-theme="light"] .story-card .story-card-body{
  color:var(--text)!important;
  opacity:1!important;
}
html[data-theme="light"] .story-card p,
html[data-theme="light"] .story-card .meta{
  color:var(--muted)!important;
  opacity:1!important;
}
html[data-theme="light"] .story-card .tag{
  color:var(--gold)!important;
  opacity:1!important;
}
html[data-theme="light"] .card,
html[data-theme="light"] .list-card,
html[data-theme="light"] .rec-card,
html[data-theme="light"] .progress-card,
html[data-theme="light"] .saved-row{
  background-color:var(--panel)!important;
  border-color:var(--line)!important;
  color:var(--text)!important;
}

/* V69 — server-ready Admin cover upload UI only */
.admin-cover-upload-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:4px}
.admin-cover-pick{display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.admin-cover-file-name{font-size:12px;overflow-wrap:anywhere}
.admin-cover-preview-copy small{display:block;margin-top:7px;line-height:1.45}
button:disabled{opacity:.55;cursor:not-allowed}

/* V69.1 — native Android-safe cover picker */
.admin-cover-native-input{width:100%;max-width:430px;min-height:48px;padding:7px;border:1px solid var(--line);border-radius:10px;background:var(--surface2);color:var(--text);cursor:pointer}
.admin-cover-native-input::file-selector-button{min-height:34px;margin-right:10px;padding:0 13px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text);font-weight:700;cursor:pointer}

/* V69.2 — robust cover picker: direct button + native fallback */
#pickCoverBtn{min-height:48px}
.admin-cover-native-input{display:block!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;position:static!important}

/* V69.8 — MOBILE HERO COVER BALANCE ONLY */
@media(max-width:640px){
  .home-v60 .v67-mini-hero{
    min-height:218px;
    height:218px;
    margin:10px 0 14px;
    padding:13px 16px;
    grid-template-columns:minmax(0,1fr) 96px;
    gap:12px;
  }
  .v67-mini-kicker{
    margin-bottom:4px;
    font-size:8px;
  }
  .v67-mini-hero h1{
    font-size:19px;
    line-height:1.06;
    margin-bottom:4px;
  }
  .v67-mini-hero p{
    font-size:10.5px;
    line-height:1.34;
    margin-bottom:7px;
    -webkit-line-clamp:2;
  }
  .v67-mini-cover{
    width:94px;
    justify-self:end;
  }
  .v67-mini-actions{
    gap:5px;
  }
  .v67-mini-read,.v67-mini-detail{
    min-height:31px;
    padding:0 8px;
    font-size:10.5px;
  }
  .v67-mini-dots{
    margin-top:6px;
  }
}

/* V69.9 account completion — isolated from home/hero */
.auth-panel{max-width:520px;margin:auto;padding:22px}
.auth-title{font-size:38px;margin-bottom:8px}
.auth-form{display:grid;gap:13px;margin-top:22px}
.auth-field{display:grid;gap:7px}.auth-field span{font-weight:800;font-size:13px}
.auth-input{width:100%;min-height:50px;padding:0 13px;border-radius:10px;border:1px solid var(--line);background:var(--surface2);color:var(--text);font:inherit;outline:none}
.auth-input:focus{border-color:var(--gold2);box-shadow:0 0 0 2px color-mix(in srgb,var(--gold2) 20%,transparent)}
.auth-submit{width:100%;min-height:50px;margin-top:2px}
.auth-message{padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface2);font-size:13px}
.auth-message[data-type="error"]{border-color:#9b4a42;color:#e4aaa3}.auth-note{margin-top:14px;color:var(--muted);font-size:12px;line-height:1.55}
.auth-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.auth-link{display:inline-flex;align-items:center;text-decoration:none}.auth-secondary{min-height:44px;padding:0 16px;border-radius:9px;border:1px solid var(--line);background:transparent;color:var(--text);font-weight:800}
@media(max-width:640px){.auth-panel{padding:18px}.auth-title{font-size:34px}.auth-form{margin-top:18px}}

/* V69.11 — Owner account management only */
.owner-recovery-panel{margin-top:14px}
.owner-recovery-panel summary{cursor:pointer;font-weight:800;color:var(--gold2)}
.owner-recovery-panel details[open] summary{margin-bottom:12px}

/* V69.13 — Owner email recovery */
.owner-email-recovery-panel{margin-top:14px}
.owner-email-recovery-panel h2{margin:4px 0 8px}
.owner-email-recovery-panel [data-owner-email-state]{margin-top:10px}


/* ===== V71.4 targeted polish ===== */
.v67-mini-kicker{font-size:13px!important;font-weight:900!important;letter-spacing:1.6px!important}
@media(max-width:640px){
  .v67-mini-kicker{font-size:11px!important;letter-spacing:1.2px!important}
}

.story-desc-wrap{margin:8px 0 12px}.story-desc-wrap .story-desc-v62{margin:0!important}.story-desc-v62.expanded{display:block!important;-webkit-line-clamp:unset!important;overflow:visible!important}.story-desc-toggle{margin-top:6px;border:0;background:transparent;color:var(--gold);font-weight:800;padding:4px 0;cursor:pointer}.reader-retry{margin-top:12px}#chapterNo[readonly]{opacity:.78;background:rgba(127,127,127,.08)}
