:root {
  color-scheme: light;
  --bg: #fff;
  --txt: #202124;
  --sub: #85878c;
  --line: #ededee;
  --surface: #f5f5f6;
  --red: #d93645;
  --red-soft: #fceef0;
  --viewport-height: 100vh;
  --inset-top: env(safe-area-inset-top, 0px);
  --inset-bottom: env(safe-area-inset-bottom, 0px);
  --inset-left: env(safe-area-inset-left, 0px);
  --inset-right: env(safe-area-inset-right, 0px);
  --safe-top: clamp(0px, var(--inset-top), min(64px, calc(var(--viewport-height) * .1)));
  --safe-bottom: clamp(0px, var(--inset-bottom), min(48px, calc(var(--viewport-height) * .1)));
  --safe-left: clamp(0px, var(--inset-left), min(64px, 10vw));
  --safe-right: clamp(0px, var(--inset-right), min(64px, 10vw));
  --tabbar-height: 59px;
}
@supports (height: 100dvh) {
  :root { --viewport-height: 100dvh; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { background: #f5f5f6; color: var(--txt); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input { font: inherit; appearance: none; -webkit-appearance: none; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .4; }
button, a, input { touch-action: manipulation; }
button:active, a:active { opacity: .7; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
[hidden] { display: none !important; }
.app { max-width: 600px; margin: auto; min-height: var(--viewport-height); padding: 0 var(--safe-right) 0 var(--safe-left); background: var(--bg); }
#view { padding-bottom: calc(var(--tabbar-height) + var(--safe-bottom)); }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
#topnav { display: none; }
#tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 600px; height: calc(var(--tabbar-height) + var(--safe-bottom)); z-index: 60; display: flex; background: #fff; border-top: 1px solid var(--line); padding: 4px var(--safe-right) var(--safe-bottom) var(--safe-left); }
.tab { flex: 1; border: 0; background: none; text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; color: var(--sub); font-size: 11px; }
.tab .ic { display: flex; }
.tab.on { color: var(--txt); font-weight: 600; }
.tab.on .ic { color: var(--red); }
.tab:focus-visible { background: var(--surface); }
.topbar, .searchbar { border-bottom: 1px solid var(--line); }
.topbar { display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-top)) 16px 12px; min-height: 56px; background: #fff; }
.topbar .ttl { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back { flex-shrink: 0; border: 0; padding: 8px; margin-left: -8px; background: none; display: flex; }
.home-header { padding-bottom: 4px; }
.home-brand { font-size: 22px; font-weight: 650; letter-spacing: -.5px; white-space: nowrap; }
.searchpill { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--sub); background: var(--surface); border-radius: 6px; height: 40px; padding: 0 12px; flex: 1; min-width: 0; font-size: 13px; }
.searchpill .icon { width: 18px; height: 18px; }
.searchpill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chips { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; padding: 0 16px; border-bottom: 1px solid var(--line); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 15px 0 11px; font-size: 15px; color: #75777c; }
.chip.on { color: var(--txt); font-weight: 600; border-bottom-color: var(--red); }
.seclabel { display: flex; align-items: baseline; gap: 12px; padding: 20px 16px 12px; }
.seclabel b { font-size: 16px; font-weight: 600; }
.seclabel span { margin-left: auto; color: var(--sub); font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px 10px; padding: 16px; }
.card { display: block; text-decoration: none; color: inherit; min-width: 0; }
.card .cover { display: block; width: 100%; aspect-ratio: 2/3; object-fit: cover; background: var(--surface); border-radius: 4px; }
.card .t { margin-top: 7px; font-size: 13px; font-weight: 500; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: flex; gap: 6px; justify-content: space-between; margin-top: 3px; color: var(--sub); font-size: 10px; min-height: 15px; }
.badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge .cnt { flex-shrink: 0; }
.loading, .empty, .errbox { padding: 40px 20px; text-align: center; color: var(--sub); font-size: 13px; line-height: 1.8; }
.empty p { margin: 8px 0 20px; }
.errbox { color: #a33b44; }
.errbox .btn { margin-top: 16px; }
.loader { width: 20px; height: 20px; margin: 0 auto 10px; border: 2px solid var(--line); border-top-color: var(--sub); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 5px; background: var(--red); color: #fff; padding: 11px 18px; min-height: 42px; font-size: 14px; font-weight: 500; }
.btn.gray { background: var(--surface); color: var(--txt); }
.btn.sm { padding: 9px 16px; }
.dwrap { padding: 16px; }
.dleft, .dright { min-width: 0; }
.dright { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 4px; }
.dhead { display: flex; gap: 18px; }
.dhead img { width: 112px; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; background: var(--surface); align-self: flex-start; }
.dinfo { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dinfo h1 { font-size: 20px; line-height: 1.4; margin: 1px 0 12px; font-weight: 600; }
.dmeta { display: flex; gap: 6px 8px; flex-wrap: wrap; }
.dmeta .tg { font-size: 11px; color: #72747a; }
.dmeta .tg + .tg::before { content: '·'; margin-right: 8px; color: #b8b8bc; }
.dact { margin-top: auto; padding-top: 16px; }
.dact .btn { width: 100%; }
.dintro { margin-top: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); color: #72747a; font-size: 13px; line-height: 1.85; }
.dintro::before { content: '剧情简介'; display: block; font-size: 15px; font-weight: 600; color: var(--txt); margin-bottom: 8px; }
.more { border: 0; background: none; padding: 4px; color: var(--txt); font-size: 12px; }
.more:empty { display: none; }
.dright .seclabel { padding-left: 0; padding-right: 0; }
.eps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.ep { min-width: 0; min-height: 44px; padding: 10px 2px; border: 1px solid transparent; border-radius: 4px; background: var(--surface); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep.done { color: var(--red); }
.ep.busy { color: var(--red); background: var(--red-soft); border-color: #f1ccd1; }
.searchbar { display: flex; align-items: center; gap: 8px; padding: calc(12px + var(--safe-top)) 16px 12px; background: #fff; position: sticky; top: 0; z-index: 40; }
.search-field { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; height: 42px; background: var(--surface); border-radius: 6px; padding: 0 10px; color: var(--sub); }
.search-field .icon { width: 19px; height: 19px; }
.search-field input { min-width: 0; width: 100%; border: 0; outline: none; background: none; color: var(--txt); padding: 10px 0; }
.search-field:focus-within { outline: 1px solid #bfc0c4; }
.search-field input::placeholder { color: #96989d; }
.search-clear { border: 0; background: none; display: flex; padding: 8px 0 8px 4px; }
.searchbar .go { border: 0; background: none; padding: 10px 0 10px 8px; font-weight: 500; }
.stabs { display: flex; padding: 0 16px; gap: 28px; border-bottom: 1px solid var(--line); }
.stab { border: 0; border-bottom: 2px solid transparent; background: none; padding: 10px 0; color: var(--sub); font-size: 15px; }
.stab.on { color: var(--txt); font-weight: 600; border-bottom-color: var(--red); }
.hotline { padding: 16px 16px 0; color: var(--sub); font-size: 12px; }
.search-cover { display: block; position: relative; width: 100%; height: 0; padding-top: 150%; }
.card .search-cover .cover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.search-suggestions { padding: 22px 16px; }
.search-suggestions h2 { font-size: 15px; margin: 0 0 16px; font-weight: 600; }
.suggestions { display: flex; gap: 10px; flex-wrap: wrap; }
.suggestions button { border: 0; border-radius: 4px; background: var(--surface); padding: 9px 18px; font-size: 13px; }
.mine-summary { padding: 16px 16px 24px; border-bottom: 8px solid var(--surface); display: flex; align-items: center; gap: 14px; }
.avatar { width: 48px; height: 48px; border-radius: 6px; display: grid; place-items: center; background: var(--surface); color: #777980; }
.avatar .icon { width: 26px; height: 26px; }
.mine-summary h1 { font-size: 17px; margin: 0 0 4px; font-weight: 600; }
.mine-summary p { margin: 0; color: var(--sub); font-size: 12px; }
.sec-h { padding: 20px 16px 4px; display: flex; align-items: baseline; justify-content: space-between; }
.sec-h h2 { margin: 0; font-size: 16px; font-weight: 600; }
.sec-h span { font-size: 12px; color: var(--sub); }
#histbox { padding: 0 16px; }
.histcard { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.hist-link { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; text-decoration: none; color: inherit; }
.histcard img { width: 56px; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; background: var(--surface); }
.histcard .hi { min-width: 0; flex: 1; }
.histcard .ht { font-size: 14px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.histcard .hs { font-size: 11px; color: var(--sub); margin-top: 7px; }
.histcard .continue { color: var(--red); font-size: 12px; margin-top: 6px; }
.histcard .del { border: 0; background: none; padding: 12px 4px 12px 12px; color: #a0a1a6; display: flex; }
.histcard .del .icon { width: 18px; height: 18px; pointer-events: none; }
#toast { position: fixed; top: 45%; left: 50%; transform: translate(-50%,-50%); background: #27282c; color: #fff; padding: 11px 18px; border-radius: 5px; font-size: 13px; z-index: 200; display: none; max-width: 85%; }
.is-player { background: #000; overflow: hidden; color-scheme: dark; }
.is-player .app { max-width: none; padding: 0; background: #000; }
.is-player #topnav, .is-player #tabbar { display: none !important; }
.is-player #view { padding: 0 !important; }
.pwrap { position: fixed; inset: 0 0 auto; width: 100%; height: var(--viewport-height); background: #000; color: #fff; z-index: 99; overflow: hidden; }
.pleft { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; }
.player-clean-hint { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 48px); box-sizing: border-box; padding: 14px 20px 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(0,0,0,.68); color: #fff; font-size: 13px; line-height: 1.6; text-align: center; z-index: 9; pointer-events: none; }
.player-clean-hint-gesture { display: block; width: 56px; height: 56px; margin: 0 auto 8px; overflow: visible; }
.player-clean-hint-hand { transform-origin: 27px 19px; animation: player-clean-hint-press 1.8s ease-in-out infinite; }
.player-clean-hint-ring { transform-origin: 27px 19px; opacity: 0; animation: player-clean-hint-ripple 1.8s ease-out infinite; }
.player-clean-hint-title, .player-clean-hint-subtitle { display: block; }
.player-clean-hint-title { font-weight: 500; }
.player-clean-hint-subtitle { margin-top: 3px; color: rgba(255,255,255,.6); font-size: 11px; }
@keyframes player-clean-hint-press { 0%, 65%, 100% { transform: translateY(0) scale(1); } 25%, 35% { transform: translateY(2px) scale(.92); } }
@keyframes player-clean-hint-ripple { 0%, 20% { transform: scale(.55); opacity: 0; } 30% { opacity: .65; } 70%, 100% { transform: scale(1.65); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .player-clean-hint-hand, .player-clean-hint-ring { animation: none; }
  .player-clean-hint-ring { opacity: .3; }
}
.phead { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; touch-action: pan-x; }
.phead video, .phead .h265web-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.phead .h265web-video canvas { display: block; width: 100%; height: 100%; object-fit: contain; }

/* 顶部栏：返回 + 标题 + 全屏 */
.ptopbar { position: absolute; top: var(--safe-top); left: 0; right: 0; height: 48px; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 0 max(16px, var(--safe-right)) 0 max(16px, var(--safe-left)); pointer-events: none; }
.ptopbar > * { pointer-events: auto; }
.pback-hg { width: 36px; height: 36px; display: grid; place-items: center; background: rgba(0,0,0,0.3); backdrop-filter: blur(4px); border: 0; color: #fff; border-radius: 50%; }
.ptop-title { font-size: 15px; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,0.8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.ptop-actions { display: flex; align-items: center; gap: 8px; }
.ptop-btn { width: 36px; height: 36px; display: grid; place-items: center; background: rgba(0,0,0,0.3); backdrop-filter: blur(4px); border: 0; color: #fff; border-radius: 50%; }

/* 播放状态提示条 */
.pstatebar { position: absolute; top: calc(52px + var(--safe-top)); left: max(16px, var(--safe-left)); right: max(6px, var(--safe-right)); z-index: 10; display: flex; align-items: center; gap: 8px; pointer-events: none; }
#pst { min-width: 0; flex: 0 1 auto; }
#pst:not(:empty) { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); padding: 5px 12px; border-radius: 14px; font-size: 12px; color: #ff861b; font-weight: 500; }

/* 中间大播放暂停反馈图标 (暂停时居中微透显示) */
.play-center-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; background: rgba(0,0,0,0.45); backdrop-filter: blur(4px); border-radius: 50%; display: grid; place-items: center; z-index: 8; pointer-events: auto; cursor: pointer; transition: opacity .2s, transform .2s; }
.play-center-btn svg { width: 32px; height: 32px; fill: #fff; margin-left: 4px; }
.play-center-btn.playing { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.8); }

/* 底部信息层与控制栏 */
.pbottom-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 12; padding: 30px max(16px, var(--safe-right)) max(14px, var(--safe-bottom)) max(16px, var(--safe-left)); background: #101010; pointer-events: none; }
.pbottom-info > * { pointer-events: auto; }
.pbottom-text { margin-bottom: 8px; min-width: 0; }
.pbottom-title { font-size: 16px; font-weight: 600; line-height: 1.4; text-shadow: 0 1px 3px rgba(0,0,0,0.8); display: flex; align-items: center; gap: 8px; }
.pbottom-title > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbottom-badge { flex-shrink: 0; white-space: nowrap; font-size: 11px; font-weight: normal; background: #ff861b; color: #fff; padding: 1px 6px; border-radius: 4px; }
.pbottom-desc { font-size: 13px; color: rgba(255,255,255,0.85); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.8); }

/* 播放器进度条 (红果特色：沉浸滑轨) */
.seek { height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; margin-bottom: 6px; }
.seek-track { position: relative; width: 100%; height: 3px; background: rgba(255,255,255,0.25); border-radius: 2px; }
.seek-track i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; }
.seek-track #pbuffer { background: rgba(255,255,255,0.4); }
.seek-track #pprogress { background: #ff861b; }
.seek-track b { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgba(0,0,0,0.5); transform: translate(-50%, -50%); transition: transform .1s; }
.seek:hover .seek-track b, .seek:active .seek-track b { transform: translate(-50%, -50%) scale(1.6); }

/* 底部工具条：时间、倍速、选集胶囊 */
.pfooter-bar { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; justify-content: space-between; min-width: 0; font-size: 12px; color: rgba(255,255,255,0.9); }
.pfooter-left { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.ptime-text { font-variant-numeric: tabular-nums; font-size: 11px; opacity: 0.85; white-space: nowrap; }
.prate-wrap { position: relative; flex-shrink: 0; }
.prate-menu { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 20; display: flex; flex-direction: column; gap: 4px; width: 88px; max-height: max(0px, calc(var(--viewport-height) - var(--safe-top) - var(--safe-bottom) - 100px)); overflow-y: auto; overscroll-behavior: contain; padding: 6px; border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; background: rgba(28,28,30,0.96); box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.prate-option { flex-shrink: 0; border: 0; border-radius: 6px; background: transparent; color: #fff; min-height: 32px; padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.prate-option:hover, .prate-option[aria-pressed="true"] { background: #ff861b; color: #fff; }
.prate-btn, .pquality-btn { border: 0; background: rgba(255,255,255,0.12); color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 11px; cursor: pointer; }
.pquality-wrap { position: relative; flex-shrink: 0; }
.pquality-menu { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 20; display: flex; flex-direction: column; gap: 4px; width: 88px; max-height: calc(var(--viewport-height) - var(--safe-top) - var(--safe-bottom) - 100px); overflow-y: auto; padding: 6px; border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; background: rgba(28,28,30,0.96); }
.pquality-option { border: 0; border-radius: 6px; background: transparent; color: #fff; min-height: 32px; padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.pquality-option:hover, .pquality-option[aria-pressed="true"] { background: #ff861b; color: #fff; }
.pmute-btn { border: 0; background: transparent; color: #fff; font-size: 11px; padding: 2px 4px; cursor: pointer; opacity: 0.85; }
.pplay-btn { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; padding: 6px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; opacity: 0.85; }
.pplay-btn svg { width: 20px; height: 20px; fill: currentColor; }
.pplay-btn:hover { opacity: 1; background: rgba(255,255,255,0.12); }
.pplay-btn:focus-visible { outline: 2px solid #ff861b; outline-offset: 2px; }
.pep-capsule { display: inline-flex; flex: 0 0 auto; flex-shrink: 0; width: max-content; max-width: 100%; white-space: nowrap; word-break: keep-all; overflow: hidden; align-items: center; gap: 6px; background: rgba(255,255,255,0.18); backdrop-filter: blur(6px); border: 0; color: #fff; font-size: 12px; padding: 5px 14px; border-radius: 16px; font-weight: 500; cursor: pointer; }
.pep-capsule span { display: block; white-space: nowrap; word-break: keep-all; }
.pep-capsule svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2; fill: none; }

/* 准备/重试面板提示 */
#pact:empty { display: none; }
.player-actions { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; pointer-events: none; }
.player-actions > * { pointer-events: auto; }
#pact .player-action-icon { display: grid; place-items: center; width: 40px; height: 40px; padding: 9px; background: transparent; color: rgba(255,255,255,.88); border: 0; border-radius: 50%; }
.player-action-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 2px #0008); }

/* 选集底部弹窗 (高保真还原红果样式) */
.sheet-mask { position: absolute; inset: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); border: 0; z-index: 100; backdrop-filter: blur(2px); }
.pright { display: none; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 600px; min-width: 0; height: 65%; max-height: calc(100% - var(--safe-top)); overflow-y: auto; background: #1c1c1e; color: #fff; color-scheme: dark; border-radius: 16px 16px 0 0; padding: 12px max(16px, var(--safe-right)) max(16px, var(--safe-bottom)) max(16px, var(--safe-left)); z-index: 101; overscroll-behavior: contain; touch-action: pan-y; }
.pright.open { display: flex; flex-direction: column; }
.sheet-handle { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); margin: 0 auto 12px; flex-shrink: 0; }
.sheet-header-hg { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-shrink: 0; }
.sheet-title-area { display: flex; min-width: 0; align-items: baseline; gap: 8px; }
.sheet-title-area h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0; font-size: 16px; font-weight: 600; color: #fff; }
.sheet-title-area span { flex-shrink: 0; white-space: nowrap; font-size: 12px; color: rgba(255,255,255,0.5); }
.sheet-close-hg { flex-shrink: 0; }
.sheet-close-hg { width: 32px; height: 32px; display: grid; place-items: center; background: none; border: 0; color: rgba(255,255,255,0.6); border-radius: 50%; padding: 0; cursor: pointer; }

/* 选集范围Tabs */
.episode-ranges-hg { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; flex-shrink: 0; padding-bottom: 2px; }
.episode-ranges-hg::-webkit-scrollbar { display: none; }
.episode-ranges-hg button { border: 0; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); padding: 5px 12px; border-radius: 12px; font-size: 12px; flex-shrink: 0; cursor: pointer; }
.episode-ranges-hg button.on { background: #ff861b; color: #fff; font-weight: 500; }

/* 选集九宫格网格 */
#peps { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); align-content: start; min-height: 0; gap: 10px; overflow-y: auto; flex: 1; }
#peps .ep { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid transparent; border-radius: 8px; height: 46px; font-size: 15px; font-weight: 500; display: grid; place-items: center; cursor: pointer; transition: all .15s; }
#peps .ep:active { transform: scale(0.95); }
#peps .ep.busy { background: #ff861b; color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(255,134,27,0.4); }
.pwrap:fullscreen, .pwrap.is-fullscreen { width: 100%; height: 100%; }
.pwrap:-webkit-full-screen { width: 100%; height: 100%; }
.pwrap.video-landscape .phead video, .pwrap.video-portrait .phead video { object-fit: contain; object-position: center; }
.pwrap.controls-hidden .ptopbar,
.pwrap.controls-hidden .pstatebar,
.pwrap.controls-hidden .player-actions,
.pwrap.controls-hidden .play-center-btn,
.pwrap.controls-hidden .pbottom-info { visibility: hidden; }
.pwrap.controls-hidden :is(.ptopbar, .pstatebar, .player-actions, .play-center-btn, .pbottom-info),
.pwrap.controls-hidden :is(.ptopbar, .pstatebar, .player-actions, .play-center-btn, .pbottom-info) * { pointer-events: none; }
.pwrap.controls-hidden .prate-menu:not([hidden]),
.pwrap.controls-hidden .prate-menu:not([hidden]) *,
.pwrap.controls-hidden .pquality-menu:not([hidden]),
.pwrap.controls-hidden .pquality-menu:not([hidden]) * { visibility: visible; pointer-events: auto; }
@media (max-height: 480px) {
  .pbottom-info { padding-top: 12px; padding-bottom: max(6px, var(--safe-bottom)); }
  .pbottom-desc { display: none; }
  .pbottom-text { margin-bottom: 4px; }
  .seek { margin-bottom: 2px; }
  .pright { height: 85%; }
  .sheet-handle { margin-bottom: 8px; }
}
@media (min-width: 760px) {
  .app { max-width: 1120px; }
  #topnav { display: flex; align-items: center; gap: 40px; padding: var(--safe-top) 32px 0; height: calc(64px + var(--safe-top)); background: #fff; border-bottom: 1px solid var(--line); }
  #topnav .brand { font-size: 20px; font-weight: 600; color: var(--txt); text-decoration: none; }
  #topnav .tabs { display: flex; gap: 32px; height: 100%; }
  #topnav .tab { font-size: 14px; min-width: 32px; border-bottom: 2px solid transparent; padding-top: 2px; }
  #topnav .tab.on { border-bottom-color: var(--red); }
  .tn-right { margin-left: auto; width: 240px; }
  #tabbar { display: none; }
  #view { padding-bottom: var(--safe-bottom); }
  .home-header { display: none; }
  .topbar { padding: 20px 32px 12px; }
  .chips { padding: 0 32px; gap: 30px; }
  .chip { padding-top: 20px; padding-bottom: 15px; }
  .grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 28px 16px; padding: 24px 32px; }
  .card .t { font-size: 14px; }
  .badge { font-size: 11px; }
  .dwrap { display: grid; grid-template-columns: 360px minmax(0,1fr); gap: 40px; padding: 16px 32px; }
  .dright .seclabel { padding-top: 0; }
  .dright .eps { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .searchbar { position: static; max-width: 700px; padding: 24px 32px 16px; }
  .stabs { padding: 0 32px; }
  .hotline { padding-left: 32px; }
  .search-suggestions { padding: 28px 32px; }
  .mine-summary { margin: 8px 32px 0; padding: 16px 0 24px; border-bottom: 1px solid var(--line); }
  .sec-h { padding: 24px 32px 4px; }
  #histbox { padding: 0 32px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 36px; }
  #histbox .empty { grid-column: 1/-1; }
}
@media (max-width: 360px) {
  .home-brand { font-size: 19px; }
  .home-header { gap: 10px; }
  .searchpill { font-size: 12px; padding: 0 8px; }
  .dhead { gap: 12px; }
  .dhead img { width: 92px; }
  .dinfo h1 { font-size: 18px; }
  .pfooter-left { gap: 6px; }
  .pep-capsule { gap: 4px; padding-left: 8px; padding-right: 8px; }
}
/* 小说与短剧共用导航，内容样式独立。 */
.mode-switch { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.mode-switch a { text-decoration: none; color: var(--sub); padding: 8px 0; }
.mode-switch a.on { color: var(--txt); box-shadow: inset 0 -2px var(--red); }
#topnav .mode-switch .brand:not(.on) { color: var(--sub); }
.novel-back { color: inherit; text-decoration: none; }
#novel-genders .stab { min-width: 44px; }
.novel-rank-heading { margin: 20px 16px 0; padding: 22px; background: #f5f1e8; border-left: 3px solid #a38856; }
.novel-rank-heading small { color: #806b47; letter-spacing: 2px; }
.novel-rank-heading h1 { font-size: 22px; margin: 8px 0; }
.novel-rank-heading p { margin: 0; font-size: 12px; color: #787064; }
.novel-list { display: grid; gap: 0 28px; padding: 0 16px; }
.novel-card { display: flex; align-items: center; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.novel-cover { display: flex; flex-direction: column; justify-content: space-between; flex-shrink: 0; width: 88px; height: 126px; padding: 12px 10px; background: #eee7d9; border: 1px solid #e0d6c2; border-left: 4px solid #bca77f; color: #554833; overflow: hidden; }
.novel-cover { position: relative; }
.novel-cover-text { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.novel-cover.has-image { border: 0; background: var(--surface); }
.novel-cover.has-image .novel-cover-text { visibility: hidden; }
.novel-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.novel-cover small { display: block; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.novel-cover strong { font-family: Georgia, 'Songti SC', SimSun, serif; font-size: 16px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.novel-info { display: flex; flex-direction: column; min-width: 0; gap: 8px; }
.novel-info > strong { font-size: 16px; overflow-wrap: anywhere; }
.novel-info > small { color: var(--sub); }
.novel-info > span { color: #777; font-size: 12px; line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.novel-list-footer { padding: 28px 16px; text-align: center; color: var(--sub); }
.novel-detail { padding: 20px 16px; }
.novel-book-head { display: flex; gap: 20px; align-items: flex-start; }
.novel-book-head > div { min-width: 0; }
.novel-book-head .novel-cover { width: 110px; height: 160px; }
.novel-book-head h1 { font-size: 22px; margin: 0 0 12px; overflow-wrap: anywhere; }
.novel-book-head p { color: var(--sub); }
.novel-detail h2 { font-size: 17px; margin: 26px 0 12px; }
.novel-detail a.btn, .novel-reader a.btn, .novel-history a.btn { text-decoration: none; }
.novel-intro { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; color: #72747a; }
.novel-directory-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.novel-directory-head label { white-space: nowrap; font-size: 12px; color: var(--sub); }
.novel-directory-head input { width: 58px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 4px; color: var(--txt); background: var(--bg); }
.novel-chapters { display: grid; grid-template-columns: minmax(0, 1fr); }
.novel-chapters a { text-decoration: none; color: inherit; padding: 14px 6px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.novel-chapters a.on { color: var(--red); background: var(--red-soft); }
.novel-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 24px 0; }
.novel-pagination .btn { padding: 10px 12px; }
.novel-history { padding: 0 16px; }
.novel-history .novel-cover { width: 56px; height: 82px; padding: 6px; }
.novel-history .novel-cover strong { font-size: 12px; -webkit-line-clamp: 2; }
.novel-history .novel-cover small { font-size: 8px; }
.novel-reader { max-width: 780px; margin: auto; padding: 40px 40px 64px; min-height: calc(var(--viewport-height) - 140px); }
body.novel-reading { --bg: #f5f0e5; --txt: #3e392f; --sub: #877e6e; --line: #e2dacb; --surface: #ebe3d4; --red: #887046; --red-soft: #e9dfcb; background: var(--bg); }
.novel-reading .app { max-width: none; background: var(--bg); }
.novel-reading #topnav, .novel-reading #tabbar { display: none; }
.novel-reading #view { padding-bottom: calc(76px + var(--safe-bottom)); }
.reader-top { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: calc(10px + var(--safe-top)) 24px 10px; max-width: 860px; margin: auto; border-bottom: 1px solid var(--line); }
.reader-top a { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; }
.reader-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.reader-top small { margin-left: auto; flex-shrink: 0; color: var(--sub); }
.reader-bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 65; display: flex; justify-content: center; padding: 8px max(12px, var(--safe-right)) calc(8px + var(--safe-bottom)) max(12px, var(--safe-left)); background: var(--bg); border-top: 1px solid var(--line); }
.reader-bottom button { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; flex: 1; max-width: 160px; min-height: 48px; border: 0; background: none; font-size: 13px; }
.reader-bottom button span { font-size: 18px; line-height: 22px; }
.reader-bottom button:hover { background: var(--surface); border-radius: 8px; }
.reader-dialog { position: fixed; inset: auto 0 0; margin: 0 auto; padding: 24px 24px max(20px, var(--safe-bottom)); width: min(100%, 560px); max-width: 100%; max-height: calc(var(--viewport-height) - var(--safe-top) - 24px); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; background: var(--bg); color: var(--txt); box-shadow: 0 -8px 50px #0002; overflow: auto; }
.reader-dialog::backdrop { background: #15130f70; }
.reader-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.reader-dialog-head h2 { margin: 0; font-size: 20px; }
.reader-dialog button { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 8px 12px; }
.reader-dialog-head button { display: grid; place-items: center; border: 0; background: none; }
.reader-directory-book { color: var(--sub); font-size: 13px; overflow-wrap: anywhere; }
.reader-directory-tools, .reader-directory-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reader-directory-tools { padding-bottom: 16px; font-size: 12px; }
.reader-directory-tools select { font: inherit; color: var(--txt); background: var(--bg); border: 1px solid var(--line); padding: 10px 6px; border-radius: 6px; max-width: 150px; }
.reader-chapters { overflow-y: auto; height: min(48vh, 430px); overscroll-behavior: contain; scrollbar-width: thin; }
.reader-chapters a { display: block; padding: 15px 12px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; overflow-wrap: anywhere; font-size: 14px; }
.reader-chapters a[aria-current] { background: var(--red-soft); color: var(--red); font-weight: 600; border-radius: 6px; }
.reader-directory-pager { padding-top: 16px; font-size: 12px; }
.reader-font-controls, .reader-themes { display: flex; align-items: center; gap: 16px; }
.reader-font-controls button, .reader-themes button { flex: 1; }
.reader-setting-label { color: var(--sub); margin: 24px 0 12px; }
.reader-themes button[aria-pressed="true"] { border-color: var(--red); color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.reader-dialog.settings { padding-bottom: max(28px, var(--safe-bottom)); }
.novel-reading .novel-reader-note { text-align: center; margin-top: 40px; }
.novel-reading .errbox { color: var(--txt); }
@media (max-width: 759px) {
  .novel-reader { padding: 28px 22px 40px; }
  .reader-top { padding-left: 10px; padding-right: 22px; }
  .reader-dialog { padding-left: 20px; padding-right: 20px; }
}
@media (max-height: 500px) {
  .reader-chapters { height: 25vh; }
  .reader-dialog { padding-top: 12px; }
}
.novel-reader-book, .novel-reader-note { color: var(--sub); font-size: 12px; }
.novel-reader h1 { font-size: 24px; margin: 16px 0 28px; overflow-wrap: anywhere; }
.novel-content { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 2; font-family: Georgia, 'Songti SC', SimSun, serif; }
body.novel-dark { --bg: #202226; --txt: #d3d1cc; --sub: #a09e99; --line: #393b40; --surface: #303238; --red: #d5bb87; --red-soft: #39352d; background: #181a1e; color-scheme: dark; }
.novel-dark #topnav, .novel-dark #tabbar, .novel-dark .topbar { background: var(--bg); }
@media (min-width: 760px) {
  .novel-rank-heading { margin: 24px 32px 0; }
  .novel-list, .novel-history { padding: 0 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .novel-history > .empty { grid-column: 1 / -1; }
  .novel-detail { padding: 24px 32px; }
  .novel-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
  .novel-reader { padding-top: 24px; }
}
/* 小说书房：独立色彩、版式与响应式布局。 */
body.novel-app:not(.novel-reading) { --bg: #fcfaf6; --txt: #292722; --sub: #817a70; --line: #e9e3d9; --surface: #f1ece3; --red: #a45732; --red-soft: #f5e9df; background: #f1ede6; }
.novel-app:not(.novel-reading) .app { background: var(--bg); }
.novel-app :is(.topbar, .searchbar, #topnav, #tabbar) { background: var(--bg); }
.novel-app .btn { border-radius: 8px; text-decoration: none; }
.novel-app .searchpill { border-radius: 9px; }
.novel-app .novel-home-heading { display: flex; align-items: center; justify-content: space-between; padding: 30px 24px 18px; gap: 16px; }
.novel-eyebrow { color: var(--sub); font-size: 11px; letter-spacing: 2px; margin: 0 0 12px; }
.novel-home-heading h1 { margin: 0; font-size: 32px; font-family: 'Songti SC', SimSun, serif; letter-spacing: 3px; }
.novel-home-heading h1 span { margin-left: 16px; font: 12px/1.5 -apple-system, 'Microsoft YaHei', sans-serif; color: var(--sub); letter-spacing: 1px; }
.novel-mode-link { color: var(--sub); font-size: 12px; text-decoration: none; white-space: nowrap; }
.novel-app .novel-home-search { margin: 0 24px 24px; height: 48px; padding: 0 16px; border: 1px solid var(--line); }
.novel-home-search b { color: var(--red); font-size: 12px; margin-left: auto; flex-shrink: 0; }
.novel-app #novel-genders { width: max-content; margin: 0 24px 8px; padding: 4px; gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.novel-app #novel-genders .stab { padding: 8px 28px; border: 0; border-radius: 7px; font-size: 14px; }
.novel-app #novel-genders .stab.on { background: var(--bg); box-shadow: 0 2px 5px #48321a0c; color: var(--red); }
.novel-app #novel-ranks { margin: 0 24px; padding: 0; gap: 28px; }
.novel-app #novel-ranks .chip { font-size: 14px; padding: 16px 0 13px; }
.novel-app .novel-rank-heading { background: none; border: 0; margin: 0; padding: 26px 24px 4px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.novel-rank-heading small { font-size: 10px; color: var(--red); letter-spacing: 2px; }
.novel-rank-heading h2 { font-size: 21px; margin: 6px 0 0; }
.novel-app .novel-rank-heading p { font-size: 11px; color: var(--sub); padding-bottom: 3px; }
.novel-app .novel-list { padding: 0 24px; column-gap: 40px; }
.novel-app .novel-card { padding: 24px 0; align-items: flex-start; gap: 18px; }
.novel-cover-wrap { position: relative; flex-shrink: 0; }
.novel-app .novel-cover { width: 94px; height: 136px; border-radius: 3px 7px 7px 3px; box-shadow: 3px 5px 10px #37260f13; }
.novel-rank-number { position: absolute; left: -6px; top: -7px; min-width: 26px; padding: 2px 5px; color: #fff; background: #a45732; border-radius: 3px; font: 600 13px/1.5 Georgia, serif; text-align: center; }
.novel-app .novel-info { gap: 6px; flex: 1; min-height: 136px; }
.novel-app .novel-info > strong { font-size: 16px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.novel-app .novel-info > small { font-size: 11px; }
.novel-app .novel-info > span { color: var(--sub); line-height: 1.8; }
.novel-info em { color: var(--red); font-size: 11px; font-style: normal; margin-top: auto; padding-top: 5px; }
.novel-info em span { margin-left: 8px; }
.novel-app .novel-detail, .novel-directory { padding: 32px 24px; max-width: 900px; margin: auto; }
.novel-app .novel-book-head { gap: 24px; align-items: center; }
.novel-app .novel-book-head .novel-cover { width: 124px; height: 180px; }
.novel-app .novel-book-head h1 { font-size: 26px; line-height: 1.5; margin-bottom: 10px; }
.novel-app .novel-book-head p { margin: 8px 0 16px; font-size: 13px; }
.novel-app .novel-book-head .novel-eyebrow { font-size: 10px; }
.novel-book-count { font-size: 11px; display: inline-block; border: 1px solid var(--line); padding: 5px 9px; border-radius: 5px; color: var(--sub); }
.novel-detail-actions { display: flex; gap: 12px; margin-top: 28px; }
.novel-detail-actions .btn { flex: 1; min-height: 50px; }
.novel-detail-actions .btn:first-child { flex: 2; justify-content: space-between; padding: 12px 22px; }
.novel-last-read { font-size: 12px; color: var(--sub); overflow-wrap: anywhere; }
.novel-intro-section { padding: 6px 0 28px; margin-top: 24px; border-top: 1px solid var(--line); }
.novel-app .novel-intro { color: #696358; font-size: 14px; line-height: 2; margin-bottom: 8px; }
.novel-intro.is-collapsed { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.novel-text-button { border: 0; background: none; color: var(--red); padding: 10px 0; font-size: 12px; }
.novel-directory-entry { display: flex; gap: 20px; align-items: center; justify-content: space-between; color: inherit; text-decoration: none; border-top: 1px solid var(--line); padding: 4px 0 20px; }
.novel-directory-entry div { min-width: 0; }
.novel-directory-entry h2 small { margin-left: 10px; font-size: 12px; font-weight: 400; color: var(--sub); }
.novel-directory-entry p { font-size: 12px; color: var(--sub); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.novel-directory-title h1 { font-size: 25px; margin: 8px 0; overflow-wrap: anywhere; }
.novel-directory-title > p:last-child { color: var(--red); font-size: 12px; }
.novel-directory-title p span { color: var(--sub); margin-left: 8px; }
.novel-directory-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.novel-directory-controls select { max-width: 145px; padding: 10px 8px; margin-left: 6px; color: var(--txt); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.novel-directory .novel-chapters a { display: flex; align-items: baseline; gap: 14px; padding: 18px 8px; font-size: 13px; scroll-margin: 20px; }
.novel-directory .novel-chapters a > span { color: var(--sub); font: 12px/1.8 Georgia, serif; min-width: 28px; }
.novel-directory .novel-chapters strong { font-weight: 400; flex: 1; }
.novel-directory .novel-chapters small { font-size: 10px; flex-shrink: 0; }
.novel-directory .novel-chapters .on { border-radius: 6px; }
.novel-app.novel-reading .reader-top { max-width: 900px; min-height: 74px; }
.novel-app.novel-reading .novel-reader { max-width: 760px; padding: 52px 44px 64px; }
.novel-app.novel-reading .novel-reader-book { letter-spacing: 1px; margin-bottom: 16px; }
.novel-app.novel-reading .novel-reader h1 { font: 600 28px/1.6 'Songti SC', SimSun, serif; margin: 0 0 36px; }
.novel-app.novel-reading .novel-content { line-height: 2.15; letter-spacing: .035em; text-align: justify; }
.novel-app.novel-reading .reader-bottom { padding-top: 10px; box-shadow: 0 -6px 24px #32281606; }
.novel-app.novel-reading .reader-bottom button:first-child, .novel-app.novel-reading .reader-bottom button:last-child { border: 1px solid var(--line); border-radius: 8px; margin: 0 8px; }
@media (min-width: 760px) {
  .novel-app:not(.novel-reading) .app { max-width: 1120px; }
  .novel-app .novel-home-heading { padding: 42px 48px 22px; }
  .novel-home-heading h1 { font-size: 40px; }
  .novel-app .novel-home-search { margin: 0 48px 26px; max-width: 620px; }
  .novel-app #novel-genders { margin-left: 48px; }
  .novel-app #novel-ranks { margin: 0 48px; gap: 40px; }
  .novel-app .novel-rank-heading { padding: 32px 48px 6px; }
  .novel-app .novel-list { padding: 0 48px; }
  .novel-app .novel-book-head .novel-cover { width: 160px; height: 228px; }
  .novel-app .novel-book-head { gap: 36px; }
  .novel-app .novel-book-head h1 { font-size: 34px; }
  .novel-detail-actions { max-width: 470px; }
  .novel-app .novel-detail, .novel-directory { padding: 40px 48px 60px; }
}
@media (max-width: 759px) {
  .novel-app.novel-reading .novel-reader { padding: 32px 24px 48px; }
  .novel-app.novel-reading .novel-reader h1 { font-size: 25px; margin-bottom: 28px; }
  .novel-app .novel-rank-heading p { display: none; }
  .novel-app .novel-book-head h1 { font-size: 22px; }
  .novel-app .novel-book-head .novel-eyebrow { display: none; }
}
@media (max-width: 360px) {
  .novel-app .novel-home-heading { padding: 24px 18px 18px; }
  .novel-home-heading h1 span { margin-left: 10px; font-size: 10px; }
  .novel-app .novel-home-search { margin-left: 18px; margin-right: 18px; padding: 0 10px; }
  .novel-app .novel-list { padding: 0 18px; }
  .novel-app .novel-card { gap: 14px; }
  .novel-app .novel-cover { width: 82px; height: 122px; }
  .novel-app .novel-info { min-height: 122px; }
  .novel-app .novel-detail, .novel-directory { padding: 24px 18px; }
  .novel-app .novel-book-head { gap: 16px; }
  .novel-app .novel-book-head .novel-cover { width: 96px; height: 145px; }
  .novel-app .novel-book-head h1 { font-size: 20px; }
  .novel-directory-controls select { max-width: 120px; margin-left: 0; }
  .novel-app.novel-reading .novel-reader { padding-left: 20px; padding-right: 20px; }
}
/* 小说首页紧凑榜单头部 */
.novel-rank-header { position: sticky; top: 0; z-index: 30; background: var(--bg); padding-top: var(--safe-top); }
.novel-rank-toolbar { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 16px; }
.novel-rank-toolbar h1 { margin: 0; font-size: 18px; white-space: nowrap; }
.novel-rank-toolbar > a { display: flex; align-items: center; justify-content: center; width: 36px; height: 40px; color: inherit; flex-shrink: 0; }
.novel-app .novel-rank-toolbar #novel-genders { margin: 0 0 0 auto; flex-shrink: 0; }
.novel-app .novel-rank-toolbar #novel-genders .stab { padding: 5px 10px; }
.novel-app .novel-rank-header #novel-ranks { position: static; }
@media (max-width: 360px) { .novel-rank-toolbar { padding-left: 8px; padding-right: 8px; gap: 4px; } .novel-rank-toolbar h1 { font-size: 16px; } }
.novel-app:not(.novel-reading) .novel-home-heading {
  min-height: 52px;
  padding: 10px 16px 6px;
  border-bottom: 1px solid var(--line);
}
.novel-app .novel-home-heading h1 { font-size: 22px; letter-spacing: 1px; }
.novel-app .novel-home-heading h1 span { margin-left: 8px; font-size: 11px; letter-spacing: 0; }
.novel-app .novel-home-search {
  margin: 8px 16px;
  height: 38px;
  padding: 0 12px;
}
.novel-app #novel-genders {
  margin: 0 16px 2px;
  padding: 2px;
  border-radius: 7px;
}
.novel-app #novel-genders .stab { padding: 5px 18px; font-size: 13px; }
.novel-app #novel-ranks {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0;
  padding: 0 16px;
  gap: 22px;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}
.novel-app #novel-ranks .chip { padding: 10px 0 8px; font-size: 13px; }
.novel-app .novel-rank-heading { padding: 12px 16px 2px; }
.novel-app .novel-rank-heading h2 { font-size: 17px; margin: 0; }
.novel-app .novel-list { padding-top: 0; }
@media (min-width: 760px) {
  .novel-app .novel-home-heading { padding: 12px 32px 6px; }
  .novel-app .novel-home-search { margin: 8px 32px; max-width: 620px; }
  .novel-app #novel-genders { margin-left: 32px; }
  .novel-app #novel-ranks { padding: 0 32px; }
  .novel-app .novel-rank-heading { padding: 14px 32px 2px; }
}
@media (max-width: 360px) {
  .novel-app .novel-home-heading { padding-left: 12px; padding-right: 12px; }
  .novel-app .novel-home-search { margin-left: 12px; margin-right: 12px; }
  .novel-app #novel-genders { margin-left: 12px; margin-right: 12px; }
  .novel-app #novel-ranks { padding-left: 12px; padding-right: 12px; gap: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
