/* Shared navigation and light editorial book layout. */
body { background:#fff; }
.reference-header .header-inner,.reference-header .header-primary,.reference-header .header-status { display:flex; align-items:center; }
.reference-header .header-inner { justify-content:space-between; gap:24px; }
.reference-header .header-primary { gap:28px; }
.reference-header .header-status { gap:16px; }
.reference-header .brand { border:0; background:transparent; font:inherit; }
.offline-hero .eyebrow { color:#24586a; background:#fff; }
.reference-header .brand { display:flex; align-items:center; gap:10px; cursor:pointer; }
.reference-header .brand-copy strong,.reference-header .brand-copy span { display:block; }
.reference-header .main-nav { display:flex; align-items:center; }
.reference-header .header-account .account-avatar { display:inline-flex; align-items:center; justify-content:center; }
.reference-header .header-account { cursor:pointer; font-size:13px; font-weight:700; }
.category-menu { position:relative; color:#03314b; }
.category-menu summary { display:flex; align-items:center; gap:12px; min-height:44px; cursor:pointer; list-style:none; font-size:13px; font-weight:700; }
.category-menu summary::-webkit-details-marker { display:none; }
.category-menu[open] summary span { transform:rotate(180deg); }
.category-menu-panel { position:absolute; top:55px; right:0; width:560px; max-width:calc(100vw - 40px); padding:28px; border:1px solid #e0e8e9; border-radius:12px; background:white; box-shadow:0 20px 60px #03314b24; z-index:1100; }
.category-menu-panel > strong { display:block; font-size:18px; margin-bottom:22px; }
.category-menu-panel > div { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.category-menu-panel button { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px; border:0; border-radius:6px; background:#f1f7f5; color:#234e5f; text-align:right; font:13px Tahoma,sans-serif; cursor:pointer; }
.category-menu-panel button:hover { background:#dff5e9; }
.category-menu-panel .menu-all-books { margin-top:18px; background:transparent; color:#087352; font-weight:700; }
#app:has(.book-page) { color:#03314b; background:#fff; }
#app:has(.book-page) .book-page { width:min(1120px,calc(100% - 64px)); padding-top:32px; }
#app:has(.book-page) .book-breadcrumb { padding:12px 0; color:#607983; font-size:12px; }
#app:has(.book-page) .book-topbar { padding:10px 0 20px; }
#app:has(.book-page) .book-hero { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:70px; padding:28px 0 60px !important; border-radius:0 !important; background:#fff !important; min-height:440px; overflow:visible; }
#app:has(.book-page) .book-hero::before { display:none; }
#app:has(.book-page) .book-hero-content { grid-column:1; grid-row:1; }
.book-cover-stage { grid-column:2; grid-row:1; display:flex; flex-direction:column; align-items:center; gap:28px; background:#dbe8f8; border-radius:8px; overflow:hidden; padding-top:30px; }
#app:has(.book-page) .book-cover-stage .book3d { width:185px; height:270px; margin:0 auto; }
.book-cover-caption { display:block; width:100%; padding:20px; background:#03314b; color:white; text-align:center; font-size:14px; }
#app:has(.book-page) .book-hero .book-title { font-size:38px; color:#03314b !important; line-height:1.5; margin:18px 0 8px; }
#app:has(.book-page) .book-hero .book-author { color:#163f53 !important; font-size:16px; font-weight:700; }
#app:has(.book-page) .book-hero .book-description { color:#536973 !important; font-size:16px; line-height:2; margin-top:20px; }
#app:has(.book-page) .book-hero .mini-badge { background:#f0f6f4 !important; border:0 !important; color:#42616e !important; font-size:11px; border-radius:4px; }
#app:has(.book-page) .book-progress-block { color:#687f89; max-width:440px; margin-top:24px; }
#app:has(.book-page) .book-progress-block .progress-track { background:#e8efec; }
#app:has(.book-page) .book-main-tabs { top:72px; padding:0; border:0; border-bottom:1px solid #dce6e9; border-radius:0; background:#fff; margin:0 0 38px; scroll-margin-top:76px; }
#app:has(.book-page) .book-tab-btn { flex-direction:row; justify-content:center; gap:8px; padding:20px 10px; border-radius:0; border-bottom:3px solid transparent; }
#app:has(.book-page) .book-tab-btn.active { box-shadow:none; border-bottom-color:#20c97a; background:#f4faf7; }
#app:has(.book-page) .book-tab-btn .tab-icon { display:none; }
#app:has(.book-page) .book-tab-btn .tab-title { font-size:14px; }
#app:has(.book-page) .listen-tab-grid { grid-template-columns:minmax(0,1fr) 330px; gap:36px; }
#app:has(.book-page) .panel { padding:26px; border:1px solid #e1e8ea; border-radius:8px; margin-bottom:20px; }
#app:has(.book-page) .panel-title h2 { color:#03314b; font-size:24px; }
#app:has(.book-page) .panel-title p { font-size:13px; line-height:1.8; }
.audio-version-switcher { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:24px 0; }
.audio-version-card { padding:16px; border:1px solid #dde6e9; border-radius:8px; background:#f6f9fa; }
.audio-version-card.is-active { border-color:#85d7b2; background:#f0faf5; }
.audio-version-head { display:grid; gap:10px; }
.audio-version-head strong { font-size:13px; line-height:1.8; }
.audio-version-tag,.audio-version-meta { font-size:10px; color:#627a86; }
.audio-version-meta { display:grid; gap:7px; margin-top:12px; }
.audio-chapters-panel { margin-top:24px; }
.audio-chapters-title { display:grid; gap:8px; margin-bottom:12px; font-size:13px; font-weight:700; }
.audio-chapters-list { display:grid; gap:8px; }
.chapter-cue-btn { display:flex; justify-content:space-between; gap:14px; padding:14px; border:1px solid #e2e9eb; border-radius:6px; background:white; color:#335668; text-align:right; cursor:pointer; }
.chapter-cue-btn:hover { background:#eef8f3; }
#app:has(.book-page) .idea-item { border:0; border-bottom:1px solid #e4ebee; border-radius:0; background:white; padding:14px 0; font-size:13px; line-height:1.85; }
#app:has(.book-page) .idea-number { background:#eef7f3; color:#107555; }
#app:has(.book-page) #summaryPanel { max-width:820px; margin-inline:auto; padding:36px; }
#app:has(.book-page) .summary-text { color:#294858; }
#app:has(.book-page) .summary-text p { font-size:var(--reader-size,16px); line-height:var(--reader-line,2.2); }
#app:has(.book-page) .zen-topbar { display:none; }
body.zen-reading-mode #app .zen-topbar { display:flex; }
#app .site-footer { background:#f4f7f9 !important; color:#03314b !important; border-top:1px solid #e0e8eb !important; }
#app .site-footer :is(.footer-brand strong,.footer-brand-panel h2,.footer-nav-grid h3) { color:#03314b !important; }
#app .site-footer :is(.footer-brand small,.footer-brand-panel p,.footer-nav-grid a,.footer-nav-grid button,.footer-socials a,.footer-bottom) { color:#536f7c !important; }
#app .footer-bottom { border-color:#dce5e9; }
#app:has(.offline-hero) .site-header { position:sticky; top:0 !important; max-width:none !important; margin:0 !important; border-radius:0 !important; background:white !important; }
#app:has(.offline-hero) :is(.daily-goal-pill,.header-streak-pill,.status-pill) { display:none; }
.offline-hero { padding:48px; border:0; border-radius:10px; background:#edf5fa; box-shadow:none; }
.offline-hero h1 { color:#03314b; font-size:38px; }
.offline-hero p { color:#57727e; line-height:2; }
.storage-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:30px; }
.storage-stat { padding:20px; background:#fff; border:1px solid #dce7e9; border-radius:8px; }
@media(max-width:800px) {
 .reference-header .header-primary { gap:16px; }
}
@media(max-width:600px) {
 .reference-header .main-nav { display:none !important; }
 .category-menu-panel { position:fixed; top:72px; right:16px; left:16px; width:auto; max-width:none; max-height:75vh; overflow:auto; }
 #app:has(.book-page) .book-hero { grid-template-columns:minmax(0,1fr) 220px; gap:30px; }
 #app:has(.book-page) .book-hero .book-title { font-size:30px; }
 #app:has(.book-page) .listen-tab-grid { grid-template-columns:1fr; }
}
@media(max-width:560px) {
 .reference-header .brand-copy { display:none; }
 .category-menu summary { font-size:12px; }
 .category-menu-panel { padding:20px; }
 .category-menu-panel > div { grid-template-columns:1fr; }
 #app:has(.book-page) .book-page { width:calc(100% - 32px); padding-top:16px; }
 #app:has(.book-page) .book-hero { display:flex; flex-direction:column; padding:12px 0 32px !important; gap:28px; }
 .book-cover-stage { width:100%; max-width:320px; }
 #app:has(.book-page) .book-hero-content { width:100%; }
 #app:has(.book-page) .book-main-tabs { grid-template-columns:repeat(2,1fr); }
 #app:has(.book-page) .book-tab-btn { padding:14px 6px; }
 #app:has(.book-page) .book-tab-btn .tab-title { font-size:12px; }
 #app:has(.book-page) .panel,#app:has(.book-page) #summaryPanel { padding:20px; }
 .audio-version-switcher { grid-template-columns:1fr; }
 .offline-hero { padding:28px 20px; }
 .storage-grid { grid-template-columns:1fr; }
 #app:has(.book-page) .site-footer { padding-bottom:90px !important; }
}

.category-menu-panel .menu-offline-books { margin-top:10px; background:#eef7f2; color:#087352; font-weight:700; border:1px dashed #2ce080; border-radius:8px; width:100%; padding:11px 14px; display:flex; align-items:center; justify-content:space-between; cursor:pointer; }
.category-menu-panel .menu-offline-books:hover { background:#dff5e9; }
