@font-face{font-family:Poppins;src:url('./fonts/poppins-400.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:Poppins;src:url('./fonts/poppins-500.woff2') format('woff2');font-weight:500;font-display:swap}
@font-face{font-family:Poppins;src:url('./fonts/poppins-700.woff2') format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:Poppins;src:url('./fonts/poppins-900.woff2') format('woff2');font-weight:900;font-display:swap}
@font-face{font-family:Spartan;src:url('./fonts/spartan-400.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:Spartan;src:url('./fonts/spartan-600.woff2') format('woff2');font-weight:600;font-display:swap}
@font-face{font-family:Spartan;src:url('./fonts/spartan-700.woff2') format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:Spartan;src:url('./fonts/spartan-900.woff2') format('woff2');font-weight:900;font-display:swap}

:root{
  --primary:#ff6740;
  --primary-dark:#ef4e2e;
  --text:#242424;
  --text-soft:#5d5d5d;
  --muted:#9b9b9b;
  --background:#fff;
  --accent:#f0f1f2;
  --accent-2:#e6e8ea;
  --card:#f0f1f2;
  --line:#d7d9dc;
  --shadow:0 2px 8px rgba(0,0,0,.15);
  --sidebar:256px;
}

html[data-theme="dark"]{
  --text:#f3f3f3;
  --text-soft:#c9c9c9;
  --muted:#929292;
  --background:#111315;
  --accent:#25282b;
  --accent-2:#303438;
  --card:#232629;
  --line:#3b3f43;
  color-scheme:dark;
}

*{box-sizing:border-box}
html{min-height:100%;background:var(--background);color:var(--text);scroll-behavior:smooth}
body{margin:0;min-height:100vh;background:var(--background);color:var(--text);font-family:Poppins,"Microsoft YaHei UI","Microsoft YaHei",sans-serif;font-size:16px;line-height:1.45;overflow-x:hidden}
button,input,select,textarea{font:inherit;color:inherit}
button,a{touch-action:manipulation}
button{border:0;background:none;cursor:pointer}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
p,h1,h2,h3{margin:0}
::selection{background:rgba(255,103,64,.25)}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#aeb1b5;border:3px solid transparent;background-clip:padding-box;border-radius:10px}

.md-icon{width:24px;height:24px;display:inline-block;flex:none}
.site-shell{min-height:100vh}
.site-main{width:calc(100% - var(--sidebar));min-height:100vh;margin-left:var(--sidebar);position:relative}
.site-main.with-compact-rail{margin-left:var(--sidebar);width:calc(100% - var(--sidebar))}
.icon-button{width:40px;height:40px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--text)}
.icon-button:hover{background:rgba(0,0,0,.07)}
.drawer-shade{position:fixed;inset:0;background:rgba(0,0,0,.42);z-index:49;opacity:0;visibility:hidden;transition:.15s}
.drawer{position:fixed;z-index:50;left:0;top:0;width:var(--sidebar);height:100vh;display:flex;flex-direction:column;background:var(--accent);color:var(--text);overflow:hidden}
.drawer-head{height:56px;display:flex;align-items:center;padding:8px 16px;flex:none}
.md-logo{height:40px;display:flex;align-items:center;min-width:0}
.md-logo-mark{width:40px;height:34px;object-fit:contain;margin-right:4px}
.md-logo-word{width:112px;height:28px;object-fit:contain}
html[data-theme="dark"] .md-logo-word{filter:invert(1)}
.drawer-close{margin-left:auto;margin-right:-8px}
.drawer-nav{padding:0 16px 16px;overflow-y:auto;overscroll-behavior:contain;flex:1}
.drawer-link{height:28px;margin:0 0 8px;border-radius:4px;padding:2px 8px;display:flex;align-items:center;gap:8px;font-weight:700}
.drawer-link .md-icon{width:24px;height:24px}
.drawer-link.is-active{height:28px;background:var(--primary);color:#fff}
.drawer-link:hover,.drawer-sub:hover{background:rgba(0,0,0,.06)}
.drawer-badge{margin-left:auto;border:1px solid var(--primary);color:var(--primary);border-radius:4px;padding:0 4px;font-size:12px;line-height:18px;background:var(--background)}
.drawer-sub{height:28px;border-radius:4px;display:flex;align-items:center;margin-left:8px;padding:2px 8px;font-size:14px;color:var(--text-soft)}
.drawer-sub.is-active{background:var(--primary);color:#fff;font-weight:700}
.drawer-section-title{height:36px;margin-top:10px;display:flex;align-items:center;gap:8px;padding:4px 8px}
.drawer-section-title .md-icon{width:24px;height:24px}
.circle-badge{margin-left:auto;background:var(--primary);color:#fff;font-size:12px;width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}
.drawer-foot{padding:12px 24px 18px;border-top:1px solid var(--line);text-align:center;color:var(--text-soft);flex:none}
.drawer-social{font-size:24px;letter-spacing:4px;margin-bottom:8px;color:var(--text)}
.drawer-foot small{font-size:11px}
.compact-rail{position:fixed;left:0;top:0;width:var(--sidebar);height:100vh;background:var(--background);z-index:8;padding:64px 24px}
.compact-rail a{height:32px;display:flex;align-items:center;gap:8px}
.compact-rail .md-icon{width:24px;height:24px}

.topbar{height:56px;position:relative;z-index:20;display:flex;align-items:center;padding:8px 16px;background:var(--background)}
.topbar.is-transparent{position:absolute;top:0;left:0;right:0;background:transparent}
.mobile-menu,.mobile-logo{display:none}
.top-search{margin-left:auto;width:300px;height:40px;border-radius:10px;background:rgba(240,241,242,.86);display:flex;align-items:center;padding:0 10px;color:#242424;backdrop-filter:blur(8px)}
.top-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;height:100%;padding:0 6px}
.top-search>span{display:flex;gap:5px;font-size:12px;color:#666;margin:0 6px}
.top-search kbd{font:inherit;background:#d8dade;border-radius:3px;padding:0 4px;line-height:18px}
.top-search button{width:26px;height:32px;padding:4px;display:flex;align-items:center;justify-content:center}
.top-search .md-icon{width:20px;height:20px}
.profile-button{width:40px;height:40px;margin-left:16px;border-radius:50%;background:rgba(240,241,242,.9);display:flex;align-items:center;justify-content:center;color:#242424}
.profile-button .md-icon{width:30px;height:30px}
.profile-button img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.profile-popover{display:none;position:absolute;right:16px;top:52px;width:240px;padding:14px;background:var(--background);border:1px solid var(--line);border-radius:8px;box-shadow:0 12px 32px rgba(0,0,0,.18);z-index:80}
.profile-popover.is-open{display:grid;gap:8px}
.profile-popover p{font-size:13px;color:var(--text-soft)}
.profile-popover button,.profile-popover a{height:36px;border-radius:4px;padding:8px 10px;background:var(--accent);text-align:left}

.home-content{padding:0 16px 80px}
.featured-section{height:432px;position:relative;margin:0 -16px;overflow:hidden;padding:56px 16px 16px}
.featured-section>h1{position:relative;z-index:5;font-family:Spartan,sans-serif;font-size:24px;line-height:32px;font-weight:600;margin:0 0 12px;max-width:100%}
.featured-slide{position:absolute;z-index:2;left:16px;right:16px;top:96px;bottom:16px;display:flex;gap:16px;opacity:0;visibility:hidden;transform:translateX(40px);transition:opacity .28s ease,transform .28s ease}
.featured-slide::before{content:"";position:absolute;z-index:-3;left:-16px;right:-16px;top:-96px;bottom:-16px;background:linear-gradient(90deg,rgba(255,255,255,.8) 0%,rgba(255,255,255,.64) 55%,rgba(255,255,255,.82) 100%),var(--slide-cover) center 30%/cover no-repeat;filter:saturate(.7)}
.featured-slide::after{content:"";position:absolute;z-index:-2;left:-16px;right:-16px;top:-96px;bottom:-16px;background:linear-gradient(90deg,rgba(255,255,255,.12),rgba(255,255,255,.56));backdrop-filter:blur(3px)}
html[data-theme="dark"] .featured-slide::before{background:linear-gradient(90deg,rgba(17,19,21,.84),rgba(17,19,21,.55),rgba(17,19,21,.84)),var(--slide-cover) center 30%/cover no-repeat}
.featured-slide.is-active{opacity:1;visibility:visible;transform:translateX(0)}
.featured-cover{width:216px;height:308px;flex:none;border-radius:4px;overflow:hidden;box-shadow:var(--shadow);position:relative;z-index:2}
.featured-cover img{width:100%;height:100%;object-fit:cover}
.featured-copy{padding:0 0 28px;min-width:0;flex:1;display:flex;flex-direction:column;align-items:flex-start;position:relative;z-index:2}
.featured-copy h2{font-family:Poppins,"Microsoft YaHei UI",sans-serif;font-size:36px;line-height:1.25;font-weight:900;margin:0 0 8px;max-width:100%;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.featured-tags,.tag-line,.detail-tags,.detail-mobile-tags{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.md-tag{display:inline-flex;align-items:center;min-height:16px;padding:1px 7px;border-radius:3px;background:rgba(240,241,242,.9);color:#242424;font-size:10px;line-height:14px;font-weight:700;text-transform:uppercase;white-space:nowrap}
.md-tag.tag-primary{background:#f28b00;color:#fff}
.featured-copy p{font-size:14px;line-height:20px;margin:14px 0 8px;max-width:920px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden}
.featured-copy em{font-size:16px;margin-top:auto}
.featured-number{position:absolute;right:112px;bottom:2px;font-size:14px;font-weight:700}
.carousel-controls{position:absolute;z-index:8;bottom:21px;right:16px;display:flex;align-items:center;gap:20px}
.carousel-controls button{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:34px;line-height:1}
.carousel-controls button:hover{background:rgba(255,255,255,.55)}
.carousel-controls span{display:none;font-size:13px;color:var(--text-soft)}

.promo-banner{position:relative;height:228px;margin:48px 0 30px;background:#202020;overflow:hidden;display:flex;align-items:center;padding:24px 52px;color:#fff}
.promo-banner::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#121212 0%,rgba(18,18,18,.78) 38%,rgba(18,18,18,.28)),var(--promo-cover) center 35%/cover no-repeat;filter:grayscale(1);opacity:.94}
.promo-banner::after{content:"";position:absolute;right:8%;top:-40%;width:260px;height:430px;border:3px solid rgba(255,255,255,.35);transform:rotate(28deg);border-radius:45%}
.promo-banner>*{position:relative;z-index:2}
.promo-banner>span{position:absolute;left:18px;top:18px;border:3px solid #c62e39;background:#070707;color:#ff5f5f;width:184px;height:calc(100% - 36px);display:flex;align-items:center;justify-content:center;text-align:center;font-family:Spartan,sans-serif;font-weight:900;font-size:22px}
.promo-banner strong{font-family:Spartan,"Microsoft YaHei UI",sans-serif;font-size:34px;line-height:1.25;margin-left:240px;max-width:520px}
.promo-banner small{position:absolute;right:30px;bottom:20px;max-width:380px;font-size:13px}

.home-section{margin-top:30px}
.section-heading{height:48px;display:flex;align-items:center;margin-bottom:10px}
.section-heading h2{font-family:Spartan,sans-serif;font-size:24px;font-weight:600}
.section-heading a{margin-left:auto;width:40px;height:40px;display:flex;align-items:center;justify-content:center}
.updates-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
.update-card{height:96px;background:var(--card);display:grid;grid-template-columns:64px minmax(0,1fr) 112px;gap:8px;padding:8px}
.update-cover{width:56px;height:80px;border-radius:3px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.14)}
.update-cover img{width:100%;height:100%;object-fit:cover}
.update-info{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:4px}
.update-title{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.update-chapter,.update-group{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text-soft)}
.update-group{display:flex;align-items:center;gap:5px;font-style:italic}
.update-group .md-icon{width:18px;height:18px}
.update-side{display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;font-size:13px;color:var(--text-soft);gap:7px}
.update-side span{display:flex;align-items:center;gap:3px}
.update-side .md-icon{width:18px;height:18px}
.cover-row{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
.cover-card{min-width:0;display:flex;flex-direction:column}
.cover-card img{width:100%;aspect-ratio:7/10;object-fit:cover;border-radius:4px;box-shadow:0 2px 8px rgba(0,0,0,.14);background:var(--accent)}
.cover-card strong{margin-top:8px;font-size:14px;line-height:20px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.cover-card small{color:var(--text-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.titles-content{padding:0 16px 64px}
.titles-heading{height:76px;display:flex;align-items:center;gap:22px}
.titles-heading>a{width:34px;height:34px;display:flex;align-items:center;justify-content:center}
.titles-heading h1{font-family:Spartan,sans-serif;font-size:28px;line-height:36px;font-weight:600}
.advanced-search{display:grid;grid-template-columns:minmax(0,1fr) 192px;gap:12px 8px}
.large-search{height:40px;border-radius:4px;background:var(--accent);display:flex;align-items:center;padding:0 10px;gap:8px}
.large-search input{min-width:0;flex:1;height:100%;border:0;outline:0;background:transparent}
.filter-toggle{height:40px;background:var(--accent);border-radius:4px;font-weight:500;display:flex;align-items:center;justify-content:center}
.filter-toggle .md-icon{display:none}
.filter-panel{grid-column:1/-1;display:none;background:var(--accent);border-radius:4px;padding:12px;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.filter-panel.is-open{display:grid}
.filter-panel-title,.filter-mobile-actions{display:none}
.filter-panel label{font-size:13px;color:var(--text-soft)}
.filter-panel select{display:block;width:100%;height:38px;margin-top:4px;background:var(--background);border:1px solid var(--line);border-radius:4px;padding:0 8px}
.search-actions{grid-column:1/-1;height:64px;display:flex;align-items:center;justify-content:flex-end;gap:16px}
.search-actions>a{height:40px;display:flex;align-items:center;padding:0 12px;border-radius:4px}
.search-actions>a:first-child{color:#ffb7ac}
.search-actions .lucky-button{background:var(--accent)}
.primary-button{height:40px;border-radius:4px;background:var(--primary);color:#fff;padding:0 18px;display:inline-flex;align-items:center;gap:8px;font-weight:700}
.primary-button .md-icon{width:22px;height:22px}
.search-result-meta{height:72px;display:flex;align-items:center;justify-content:space-between;color:var(--text-soft);padding-top:12px}
.search-result-meta div{background:var(--accent);padding:8px 12px;font-size:22px;color:var(--text)}
.search-result-meta>span{visibility:hidden}
.titles-promo{height:230px;margin:16px 0 32px}
.search-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 8px}
.search-card{height:278px;min-width:0;background:var(--card);display:grid;grid-template-columns:144px minmax(0,1fr);gap:10px;padding:8px;overflow:hidden}
.search-card-cover{height:194px;width:136px;align-self:start;border-radius:3px;overflow:hidden;box-shadow:var(--shadow)}
.search-card-cover img{width:100%;height:100%;object-fit:cover}
.search-card-body{min-width:0;position:relative;overflow:hidden}
.search-card-heading{min-height:50px;display:flex;gap:8px;align-items:flex-start}
.search-card-heading>a{min-width:0;flex:1;font-size:16px;line-height:24px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.flag-dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#e50026;margin-right:6px}
.status-pill{flex:none;background:var(--background);border-radius:3px;padding:5px 7px;font-size:11px;display:flex;align-items:center;gap:5px}
.status-pill i{width:8px;height:8px;border-radius:50%;background:#00c72c}
.search-stats{display:flex;gap:16px;align-items:center;font-size:13px;color:var(--text-soft);height:28px}
.search-stats span{display:flex;align-items:center;gap:3px}
.search-stats .md-icon{width:17px;height:17px}
.rating{color:var(--primary)!important}
.tag-line{height:28px;overflow:hidden;flex-wrap:nowrap}
.tag-line b{margin-left:auto;color:var(--primary);font-size:11px}
.search-card-body>p{font-size:14px;line-height:20px;margin-top:4px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:6;overflow:hidden}
.pagination{height:58px;display:flex;justify-content:center;align-items:center;gap:16px}
.pagination a{width:38px;height:38px;border-radius:50%;background:var(--accent);display:flex;align-items:center;justify-content:center;font-size:24px}
.empty-state{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px;text-align:center;color:var(--text-soft)}
.empty-state strong{font-family:Spartan,sans-serif;font-size:24px;color:var(--text)}
.empty-state a{color:var(--primary)}

.detail-content{min-height:100vh}
.detail-hero{height:280px;position:relative;background:linear-gradient(90deg,rgba(15,25,42,.78),rgba(0,22,58,.44)),var(--detail-cover) center 37%/cover no-repeat;color:#fff}
.detail-hero::after{content:"";position:absolute;inset:0;backdrop-filter:blur(5px);background:linear-gradient(90deg,rgba(9,20,38,.28),rgba(0,24,64,.12))}
.detail-cover{position:absolute;z-index:3;left:32px;top:64px;width:200px;height:299px;border-radius:3px;box-shadow:var(--shadow);overflow:hidden}
.detail-cover img{width:100%;height:100%;object-fit:cover}
.detail-cover span{position:absolute;right:8px;bottom:7px;width:24px;height:24px;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:2px;font-size:16px}
.detail-heading{position:absolute;z-index:3;left:256px;right:24px;top:62px;display:flex;flex-direction:column;align-items:flex-start}
.detail-heading h1{font-family:Poppins,"Microsoft YaHei UI",sans-serif;font-size:72px;line-height:1.12;font-weight:900;text-shadow:0 3px 8px rgba(0,0,0,.35);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.detail-heading h2{font-size:21px;line-height:32px;font-weight:500}
.detail-heading strong{font-size:17px;margin-top:70px}
.detail-mobile-stats,.detail-mobile-tags{display:none}
.detail-grid{padding:16px 32px 60px;display:grid;grid-template-columns:333px minmax(0,1fr);gap:24px}
.detail-meta{padding-top:280px;min-width:0}
.detail-meta section{margin-bottom:16px}
.detail-meta section>strong{display:block;font-size:16px;margin-bottom:8px}
.detail-meta section>a,.detail-meta section>div>a{display:inline-flex;align-items:center;min-height:28px;background:var(--accent);border-radius:4px;padding:4px 9px;margin:0 6px 6px 0;font-size:12px;color:var(--text-soft)}
.detail-meta section>p{font-size:13px;color:var(--text-soft)}
.mini-recs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.mini-recs a{display:flex!important;flex-direction:column!important;padding:0!important;background:none!important;margin:0!important;min-width:0}
.mini-recs img{width:100%;aspect-ratio:7/10;object-fit:cover;border-radius:3px}
.mini-recs span{margin-top:4px;line-height:16px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.detail-main{min-width:0}
.detail-actions{height:52px;display:flex;gap:8px;align-items:center}
.library-button{height:48px;min-width:220px;padding:0 20px;background:var(--primary);color:#fff;border-radius:4px;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:700}
.library-button .md-icon{display:none}
.library-button.is-saved{background:#dd4b2b}
.square-button{width:48px;height:48px;border-radius:4px;background:var(--accent);display:flex;align-items:center;justify-content:center}
.mobile-read-button{display:none}
.detail-tags{min-height:36px;padding:8px 0 4px}
.publication-dot{width:9px;height:9px;border-radius:50%;background:#00bdd4;display:inline-block}
.detail-tags>b,.detail-mobile-tags>b{font-size:11px;text-transform:uppercase}
.detail-stats{height:40px;display:flex;align-items:center;gap:10px;color:var(--text-soft)}
.detail-stats span,.detail-mobile-stats span{display:flex;align-items:center;gap:3px}
.detail-stats .md-icon,.detail-mobile-stats .md-icon{width:18px;height:18px}
.muted{color:#b5b5b5!important}
.detail-summary{min-height:88px;font-size:14px;line-height:20px;padding:8px 0 20px;position:relative}
.detail-summary button{display:none}
.detail-tabs{height:40px;display:flex;align-items:stretch;background:var(--accent);width:max-content;max-width:100%;overflow-x:auto}
.detail-tabs button{height:36px;padding:0 12px;color:#c2c2c2;font-weight:700;white-space:nowrap}
.detail-tabs button.is-active{background:#080808;color:#fff;border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.tab-panel{display:none}.tab-panel.is-active{display:block}
.chapter-toolbar{height:84px;display:flex;align-items:center;gap:12px}
.chapter-toolbar label{display:flex;align-items:center;gap:10px;font-size:16px}
.chapter-toolbar input{width:20px;height:20px;accent-color:var(--primary)}
.chapter-toolbar button{height:32px;background:var(--accent);border-radius:3px;padding:0 10px;margin-left:auto}
.chapter-toolbar span{font-size:14px;margin-left:auto}
.chapter-group{margin-bottom:10px}
.chapter-group>header{height:38px;display:flex;align-items:center;justify-content:space-between;padding:0 8px;color:var(--text-soft)}
.chapter-row{min-height:56px;background:var(--accent);display:flex;align-items:center;padding:5px 8px;gap:12px}
.chapter-name{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.chapter-name b{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chapter-name small{display:flex;align-items:center;gap:5px;color:var(--text-soft)}
.chapter-name .md-icon{width:17px;height:17px}
.chapter-meta{width:220px;display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:2px 8px;font-size:12px;color:var(--text-soft)}
.chapter-meta small{display:flex;align-items:center;gap:3px}
.chapter-meta .md-icon{width:16px;height:16px}
.chapter-meta time{grid-column:1/-1;text-align:right}
.recommendation-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding-top:20px}

.reader-page{width:100vw;height:100vh;overflow:hidden;background:#fff;color:#242424;user-select:none}
.reader-stage{width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fff}
.reader-image{display:none;max-width:100vw;max-height:100vh;width:auto;height:auto;object-fit:contain;margin:auto}
.reader-image.is-active{display:block}
.reader-page[data-fit="width"] .reader-image{width:100vw;max-width:100vw;max-height:none;height:auto}
.reader-page[data-fit="height"] .reader-image{height:100vh;max-height:100vh;max-width:none;width:auto}
.reader-page.is-long{height:auto;overflow-y:auto}
.reader-page.is-long .reader-stage{height:auto;display:block;overflow:visible}
.reader-page.is-long .reader-image{display:block;width:auto;max-width:100%;max-height:none;margin:0 auto}
.reader-header{position:fixed;z-index:100;left:0;right:0;top:0;height:56px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);display:flex;align-items:center;padding:0 16px;gap:12px;box-shadow:0 1px 4px rgba(0,0,0,.12);opacity:0;transform:translateY(-100%);transition:.18s}
.reader-page.show-controls .reader-header{opacity:1;transform:translateY(0)}
.reader-header>a,.reader-header>button{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.reader-header>div{display:flex;flex-direction:column;min-width:0}
.reader-header>div strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reader-header>div small{color:#777}
.reader-header>span{margin-left:auto;white-space:nowrap}
.reader-progress{position:fixed;z-index:110;left:24px;right:24px;bottom:2px;height:4px;background:#eceff0;border-radius:4px;overflow:hidden}
.reader-progress span{display:block;height:100%;background:var(--primary);transition:width .18s}
.reader-progress.is-hidden{display:none}
.reader-page.controls-pinned .reader-header{opacity:1;transform:translateY(0)}
.reader-panel{position:fixed;z-index:120;right:0;top:0;width:304px;height:100vh;background:rgba(255,255,255,.97);box-shadow:-4px 0 18px rgba(0,0,0,.2);padding:16px;display:flex;flex-direction:column;gap:10px;transform:translateX(105%);transition:.18s;overflow-y:auto}
.reader-panel.is-open{transform:translateX(0)}
.reader-panel-head{display:flex;align-items:center;gap:8px;border-bottom:1px solid #ddd;padding-bottom:10px}
.reader-panel-head>div{min-width:0;flex:1;display:flex;flex-direction:column}
.reader-panel-head strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reader-panel-head button{width:36px;height:36px;display:flex;align-items:center;justify-content:center}
.reader-panel label{font-size:13px;color:#666}
.reader-panel select,.reader-panel>button,.reader-panel>a{display:flex;align-items:center;width:100%;height:40px;margin-top:4px;border:0;border-radius:4px;background:#f0f1f2;padding:0 12px;text-align:left;color:#242424}
.reader-panel>a{margin-top:auto}
.reader-click{position:fixed;z-index:20;top:56px;bottom:16px;width:28%;cursor:pointer}
.reader-click.previous{left:0}.reader-click.next{right:0}
.reader-chapter-nav{position:fixed;z-index:99;left:50%;bottom:12px;transform:translate(-50%,80px);opacity:0;display:flex;align-items:center;gap:8px;padding:6px;background:rgba(255,255,255,.95);border-radius:5px;box-shadow:0 2px 8px rgba(0,0,0,.16);transition:.18s}
.reader-page.show-controls .reader-chapter-nav{transform:translate(-50%,0);opacity:1}
.reader-chapter-nav a,.reader-chapter-nav span{min-width:90px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:4px;background:#f0f1f2;font-size:13px}

@media (max-width:1200px){
  .cover-row{grid-template-columns:repeat(5,minmax(0,1fr))}
  .cover-row .cover-card:nth-child(6){display:none}
  .featured-copy h2{font-size:30px}
  .featured-copy p{-webkit-line-clamp:5}
}

@media (max-width:1023px){
  :root{--sidebar:256px}
  .site-main,.site-main.with-compact-rail{width:100%;margin-left:0}
  .drawer{transform:translateX(-100%);transition:transform .15s ease}
  .drawer.is-open{transform:translateX(0)}
  .drawer-shade.is-open{opacity:1;visibility:visible}
  .compact-rail{display:none}
  .topbar{height:56px;padding:8px 16px;background:var(--background)}
  .topbar.is-transparent{position:absolute;background:transparent}
  .mobile-menu{display:flex;margin-left:-2px;margin-right:8px}
  .mobile-logo{display:block;height:40px}
  .mobile-logo .md-logo{height:40px}
  .mobile-logo .md-logo-mark{width:40px}
  .mobile-logo .md-logo-word{width:112px}
  .top-search{margin-left:auto;width:40px;padding:0;border-radius:50%;background:rgba(240,241,242,.9)}
  .top-search input,.top-search>span{display:none}
  .top-search button{width:40px;height:40px;padding:8px}
  .top-search .md-icon{width:28px;height:28px}
  .profile-button{margin-left:4px;background:rgba(240,241,242,.9)}
  .profile-popover{right:12px}

  .home-content{padding:0 16px 56px}
  .featured-section{height:318px;padding:48px 0 0;margin:0 -16px}
  .featured-section>h1{height:28px;font-size:20px;line-height:28px;margin:0;padding:0 16px;z-index:7}
  .featured-slide{left:0;right:0;top:76px;bottom:0;padding:5px 16px 44px;gap:16px}
  .featured-slide::before{left:0;right:0;top:-76px;bottom:0;background:linear-gradient(90deg,rgba(255,255,255,.84),rgba(255,255,255,.52),rgba(255,255,255,.76)),var(--slide-cover) center 20%/cover no-repeat}
  .featured-slide::after{left:0;right:0;top:-76px;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.38));backdrop-filter:blur(2px)}
  html[data-theme="dark"] .featured-slide::before{background:linear-gradient(90deg,rgba(17,19,21,.86),rgba(17,19,21,.5),rgba(17,19,21,.8)),var(--slide-cover) center 20%/cover no-repeat}
  .featured-cover{width:112px;height:160px;border-radius:3px}
  .featured-copy{height:190px;padding:0;display:block}
  .featured-copy h2{font-size:20px;line-height:1.25;-webkit-line-clamp:3;margin:0 0 72px}
  .featured-copy p{display:none}
  .featured-copy em{position:absolute;left:144px;bottom:48px;font-size:16px;max-width:calc(100vw - 170px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .featured-tags{position:absolute;left:16px;right:16px;bottom:12px;gap:5px;flex-wrap:nowrap;overflow:hidden}
  .featured-number{display:none}
  .carousel-controls{left:16px;right:16px;bottom:2px;justify-content:space-between;pointer-events:none}
  .carousel-controls button{width:28px;height:28px;background:#666;color:#fff;font-size:26px;pointer-events:auto}
  .carousel-controls span{display:block;color:var(--text);font-size:12px}

  .promo-banner{height:256px;margin:14px 0 24px;padding:18px}
  .promo-banner::before{background:linear-gradient(180deg,rgba(10,10,10,.12),rgba(10,10,10,.56)),var(--promo-cover) center/cover no-repeat}
  .promo-banner>span{left:0;top:auto;bottom:0;width:100%;height:38px;border-width:2px;font-size:15px;background:rgba(7,7,7,.94)}
  .promo-banner strong{font-size:24px;margin:0;align-self:flex-start;text-shadow:0 2px 5px #000}
  .promo-banner small{display:none}
  .home-section{margin-top:22px}
  .section-heading{height:42px;margin-bottom:8px}
  .section-heading h2{font-size:20px}
  .updates-grid{grid-template-columns:1fr;gap:8px}
  .update-card{height:88px;grid-template-columns:56px minmax(0,1fr) 46px;padding:4px;background:transparent}
  .update-cover{width:52px;height:80px}
  .update-info{gap:2px}
  .update-title{font-size:14px}
  .update-chapter,.update-group{font-size:13px}
  .update-side{font-size:12px}
  .cover-row{display:flex;gap:12px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity}
  .cover-row .cover-card,.cover-row .cover-card:nth-child(6){display:flex;flex:0 0 128px;scroll-snap-align:start}

  .titles-content{padding:0 16px 48px}
  .titles-heading{height:58px;gap:22px}
  .titles-heading h1{font-size:22px}
  .advanced-search{grid-template-columns:minmax(0,1fr) 40px;gap:24px 8px;margin-top:18px}
  .large-search{grid-column:1/-1}
  .filter-toggle{width:40px;font-size:0}
  .filter-toggle .md-icon{display:block;width:26px;height:26px}
  .filter-toggle span{display:none}
  .filter-panel{position:fixed;z-index:100;inset:0;border-radius:0;padding:16px;background:var(--background);grid-template-columns:1fr;align-content:start;overflow-y:auto}
  .filter-panel.is-open{display:flex;flex-direction:column;gap:16px}
  body.filter-open{overflow:hidden}
  .filter-panel-title{height:48px;display:flex;align-items:flex-start;justify-content:space-between}
  .filter-panel-title strong{font-family:Spartan,"Microsoft YaHei UI",sans-serif;font-size:24px;line-height:36px}
  .filter-panel-title button{width:40px;height:40px;display:flex;align-items:center;justify-content:center}
  .filter-panel label{font-size:14px}
  .filter-panel select{height:40px;font-size:16px}
  .filter-mobile-actions{display:flex;flex-direction:column;gap:10px;margin-top:auto;padding-top:24px}
  .filter-mobile-actions .primary-button,.filter-mobile-actions a{height:42px;display:flex;align-items:center;justify-content:center;border-radius:4px}
  .filter-mobile-actions .lucky-button{background:var(--accent)}
  .filter-mobile-actions>a:last-child{color:var(--primary)}
  .search-actions{display:none}
  .search-result-meta{height:40px;margin-top:-40px;padding-top:0}
  .titles-promo{height:256px;margin:28px 0 32px}
  .search-results{grid-template-columns:1fr}
  .search-card{height:278px;grid-template-columns:90px minmax(0,1fr);gap:8px;padding:8px}
  .search-card-cover{width:86px;height:123px}
  .search-card-heading{min-height:44px}
  .search-card-heading>a{font-size:14px;line-height:20px}
  .status-pill{font-size:10px;padding:3px 5px}
  .search-stats{gap:8px;font-size:12px;height:25px}
  .tag-line{height:24px}
  .search-card-body>p{font-size:12px;line-height:17px;-webkit-line-clamp:5}

  .detail-page .topbar{z-index:30}
  .detail-hero{height:286px;background-position:center 30%}
  .detail-cover{left:16px;top:64px;width:100px;height:150px}
  .detail-cover span{right:7px;bottom:5px;width:22px;height:20px;font-size:14px}
  .detail-heading{left:132px;right:16px;top:64px}
  .detail-heading h1{font-size:26px;line-height:34px;text-shadow:0 1px 4px rgba(0,0,0,.4)}
  .detail-heading h2{font-size:16px;line-height:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .detail-heading strong{font-size:13px;margin-top:0}
  .detail-mobile-stats{position:absolute;z-index:4;left:132px;right:8px;top:190px;height:28px;display:flex;align-items:center;gap:8px;font-size:13px}
  .detail-mobile-tags{position:absolute;z-index:4;left:16px;right:12px;top:226px;display:flex;gap:4px;max-height:55px;overflow:hidden}
  .detail-mobile-tags .md-tag{font-size:9px;padding:1px 5px}
  .detail-grid{display:block;padding:8px 16px 40px}
  .detail-meta{display:none}
  .detail-actions{height:56px;gap:8px}
  .library-button{min-width:40px;width:40px;height:40px;padding:0}
  .library-button .md-icon{display:block}
  .library-button span{display:none}
  .detail-actions>.square-button{display:none;width:40px;height:40px}
  .detail-actions>.square-button:nth-of-type(2){display:flex}
  .detail-actions>.square-button:nth-of-type(2) .md-icon{display:none}
  .detail-actions>.square-button:nth-of-type(2)::before{content:"•••";letter-spacing:2px}
  .mobile-read-button{height:40px;display:flex;align-items:center;justify-content:center;gap:10px;flex:1;background:var(--accent);border-radius:3px;font-size:18px}
  .detail-tags,.detail-stats{display:none}
  .detail-summary{min-height:118px;max-height:126px;overflow:hidden;padding:7px 0 28px;font-size:14px;line-height:20px}
  .detail-summary::after{content:"";position:absolute;left:0;right:0;bottom:23px;height:42px;background:linear-gradient(transparent,var(--background))}
  .detail-summary.is-expanded{max-height:none}
  .detail-summary.is-expanded::after{display:none}
  .detail-summary button{display:block;position:absolute;z-index:3;left:50%;bottom:0;transform:translateX(-50%);height:24px;background:var(--primary);color:#fff;padding:0 10px;font-size:12px;white-space:nowrap}
  .detail-tabs{width:calc(100% + 32px);margin-left:-16px;height:40px}
  .detail-tabs button{font-size:16px;padding:0 11px}
  .chapter-toolbar{height:92px;flex-wrap:wrap;padding:8px 2px}
  .chapter-toolbar label{width:100%;font-size:16px}
  .chapter-toolbar button{margin-left:0;width:32px;padding:0;font-size:0}
  .chapter-toolbar button::after{content:"⇵";font-size:18px}
  .chapter-toolbar span{margin-left:auto}
  .chapter-group>header{padding:0;height:36px}
  .chapter-row{min-height:68px;padding:5px 6px}
  .chapter-name b{font-size:12px}
  .chapter-name small{font-size:12px}
  .chapter-meta{width:94px;display:flex;flex-direction:column;align-items:flex-end;gap:2px}
  .chapter-meta time{order:3}
  .recommendation-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

  .reader-header{height:52px;padding:0 8px;gap:6px}
  .reader-header>div{max-width:160px}
  .reader-header>div strong{font-size:13px}
  .reader-header>div small{font-size:11px}
  .reader-header>span{font-size:12px}
  .reader-panel{width:min(304px,88vw)}
  .reader-click{width:34%}
  .reader-progress{left:24px;right:24px}
  .reader-chapter-nav{display:none}
}

@media (max-width:420px){
  .md-logo-word{width:108px}
  .profile-button{width:40px}
  .featured-copy h2{font-size:19px}
  .featured-copy em{font-size:15px}
  .promo-banner strong{font-size:21px}
  .search-actions .lucky-button{display:none}
  .detail-heading h1{font-size:24px}
  .detail-mobile-stats{gap:6px}
}
