
:root{--accent:#2e666c;--dark:#0d0f0e;--paper:#f7f4ed;--white:#fff;--muted:#aeb8b3}
*{box-sizing:border-box}html,body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* HOME */
.home-page{background:var(--dark);color:#fff;font-family:Arial,Helvetica,sans-serif;line-height:1.7}
.home-header{height:64px;padding:0 clamp(18px,4vw,62px);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:10;background:rgba(13,15,14,.9);backdrop-filter:blur(14px);border-bottom:1px solid rgba(255,255,255,.12)}
.brand{color:#fff;text-decoration:none;font:700 1rem Georgia,serif}.header-read{color:#fff;text-decoration:none;background:var(--accent);padding:8px 14px;border-radius:9px;font-weight:700}
.hero{width:min(1180px,calc(100% - 34px));min-height:calc(100dvh - 64px);margin:auto;padding:44px 0;display:grid;grid-template-columns:minmax(270px,420px) 1fr;align-items:center;gap:clamp(40px,7vw,94px)}
.cover-frame img{display:block;width:100%;max-height:76dvh;object-fit:contain;box-shadow:0 28px 75px rgba(0,0,0,.5)}
.overline,.section-label{color:#75aeb3;letter-spacing:.16em;text-transform:uppercase;font-size:.76rem;font-weight:800}
.hero h1,.home-section h2{font-family:Georgia,serif;line-height:1.06}.hero h1{font-size:clamp(3rem,7vw,6rem);margin:.15em 0}.lead{color:#c1cac6;font:clamp(1.05rem,2vw,1.25rem)/1.6 Georgia,serif;max-width:650px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin:26px 0}.primary-btn,.secondary-btn{min-height:50px;padding:0 20px;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;text-decoration:none;font-weight:800}.primary-btn{background:var(--accent);color:#fff}.secondary-btn{border:1px solid rgba(255,255,255,.22);color:#fff}
.book-facts{display:flex;flex-wrap:wrap;gap:14px;color:#aeb8b3;font-size:.88rem}
.home-section{padding:clamp(75px,10vw,130px) 20px;border-top:1px solid rgba(255,255,255,.12)}.home-section>h2,.home-section>.section-label,.prose,.about-card{width:min(850px,100%);margin-left:auto;margin-right:auto}.home-section h2{font-size:clamp(2.3rem,5vw,4rem);margin:.18em auto .65em}.prose{font:clamp(1.05rem,2vw,1.22rem)/1.85 Georgia,serif}.prose p{margin:0 0 1.3em}
.about-section{background:linear-gradient(145deg,#182321,#0d0f0e)}.about-card{padding:clamp(24px,5vw,48px);border:1px solid rgba(255,255,255,.2);border-radius:24px;background:rgba(0,0,0,.22);font:1.04rem/1.75 Georgia,serif}.authors-list{padding:20px;border-left:3px solid var(--accent);background:rgba(255,255,255,.04);font-family:Arial,sans-serif;font-size:.9rem;line-height:1.8}.signature{text-align:right}.signature span{color:#aeb8b3}
.home-footer{padding:42px 18px;display:grid;text-align:center;color:#aeb8b3;border-top:1px solid rgba(255,255,255,.12)}.home-footer strong{color:#fff}

/* READER */
.reader-page{width:100%;height:100%;overflow:hidden;background:#111513;font-family:Arial,sans-serif}
.reader-app{height:100vh;height:100dvh;display:grid;grid-template-rows:58px minmax(0,1fr) 58px;background:#111513}
.reader-header,.reader-footer{position:relative;z-index:20;display:flex;align-items:center;background:#111513;color:#fff;transition:transform .25s ease,opacity .25s ease}
.reader-header{padding:0 10px;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.12)}
.reader-footer{padding:7px 10px;gap:10px;border-top:1px solid rgba(255,255,255,.12)}
.controls-hidden .reader-header{transform:translateY(-100%);opacity:0}.controls-hidden .reader-footer{transform:translateY(100%);opacity:0}
.controls-hidden{grid-template-rows:0 minmax(0,1fr) 0}
.reader-icon-btn,.footer-nav{min-width:44px;min-height:44px;border:0;border-radius:11px;background:transparent;color:#fff;display:grid;place-items:center;text-decoration:none;cursor:pointer}
.reader-icon-btn:hover,.footer-nav:hover{background:rgba(255,255,255,.08)}
.reader-heading{display:grid;text-align:center;min-width:0}.reader-heading strong{max-width:55vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.92rem}.reader-heading span{font-size:.72rem;color:#aeb8b3}
.reader-head-actions{display:flex}.reader-stage{position:relative;min-height:0;background:#f7f4ed;overflow:hidden}.reader-stage iframe{width:100%;height:100%;border:0;display:block}
.tap-zone{position:absolute;top:0;bottom:0;z-index:5;border:0;background:transparent;padding:0}.left-zone{left:0;width:27%}.right-zone{right:0;width:27%}.center-zone{left:27%;width:46%}
.page-status{flex:1;display:grid;gap:5px;text-align:center;font-size:.75rem;color:#bcc5c1}.progress-track{height:4px;border-radius:99px;background:rgba(255,255,255,.15);overflow:hidden}.progress-track span{display:block;height:100%;width:0;background:#55949a;transition:width .25s ease}
.panel-backdrop{position:fixed;z-index:80;inset:0;background:rgba(0,0,0,.58);backdrop-filter:blur(2px)}
.side-panel{position:fixed;z-index:90;left:0;top:0;bottom:0;width:min(88vw,390px);background:#171b1a;color:#fff;padding:18px;overflow-y:auto;box-shadow:20px 0 60px rgba(0,0,0,.45)}
.panel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.panel-header small{color:#8fa09a}.panel-header h2{margin:3px 0;font:2rem Georgia,serif}.panel-close{width:44px;height:44px;border:1px solid rgba(255,255,255,.14);border-radius:11px;background:transparent;color:#fff;font-size:1.6rem}
.toc-list{display:grid;gap:6px}.toc-list button{min-height:48px;padding:10px 13px;border:1px solid rgba(255,255,255,.11);border-radius:9px;background:#202725;color:#fff;text-align:left;cursor:pointer}.toc-list button.active{border-color:#5e9ba1;background:#243432}
.settings-sheet{position:fixed;z-index:90;left:50%;bottom:0;transform:translateX(-50%);width:min(860px,100%);max-height:min(82dvh,760px);overflow-y:auto;border-radius:28px 28px 0 0;background:#202221;color:#fff;box-shadow:0 -22px 70px rgba(0,0,0,.45)}
.sheet-handle{width:52px;height:6px;border-radius:99px;background:#9ca19f;margin:14px auto}
.settings-tabs{display:grid;grid-template-columns:repeat(4,1fr);position:sticky;top:0;background:#202221;border-bottom:1px solid #555;z-index:2}.settings-tabs button{min-height:56px;border:0;border-bottom:3px solid transparent;background:transparent;color:#fff;font-size:1rem}.settings-tabs button.active{color:#4aa3da;border-bottom-color:#4aa3da}
.settings-content{display:none;padding:24px clamp(20px,5vw,48px) 42px}.settings-content.active{display:block}.settings-content h3{font-size:1.25rem}
.font-carousel{display:flex;gap:16px;overflow-x:auto;padding:12px 0 20px}.font-carousel button{flex:0 0 130px;min-height:110px;border:2px solid transparent;border-radius:12px;background:#171918;color:#fff;font-size:2.5rem}.font-carousel button span{display:block;font:14px Arial;margin-top:9px}.font-carousel button.active{border-color:#3498db;color:#3498db}
.range-setting{display:grid;grid-template-columns:1fr auto;gap:8px;margin:22px 0}.range-setting input{grid-column:1/-1;width:100%;accent-color:#3498db}.range-setting output{color:#aeb8b3}
.theme-dots{display:flex;gap:22px;margin:18px 0 30px}.theme-dots button{width:62px;height:62px;border-radius:50%;border:3px solid transparent}.theme-dots button:nth-child(1){background:#fff}.theme-dots button:nth-child(2){background:#f4e6c8}.theme-dots button:nth-child(3){background:#c8e7dc}.theme-dots button:nth-child(4){background:#050505}.theme-dots button:nth-child(5){background:linear-gradient(135deg,#fff,#222);color:#000;font-weight:bold}.theme-dots button.active{outline:4px solid #2589ce}
.setting-row,.toggle-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 0;border-top:1px solid #555}.setting-row small,.toggle-row small{display:block;color:#aaa;margin-top:4px}.setting-row select{background:#151716;color:#fff;border:1px solid #666;border-radius:9px;padding:10px;max-width:190px}
.toggle-row input{width:56px;height:30px;accent-color:#3498db}.preset-card{width:100%;min-height:88px;margin:8px 0;padding:14px 18px;border:1px solid #555;border-radius:12px;background:#181a19;color:#fff;display:flex;align-items:center;gap:20px;font-size:1.1rem}.preset-lines{width:60px;height:58px;border:2px solid #fff;border-radius:8px;background:repeating-linear-gradient(to bottom,transparent 0 6px,#fff 7px 9px)}.preset-lines.compact{background-size:auto 7px}.preset-lines.large{background-size:auto 14px}.preset-eye{width:60px;font-size:2.4rem}.reset-button{width:100%;min-height:48px;margin-top:24px;border:1px solid #8a5555;border-radius:10px;background:transparent;color:#ffaaaa}.hidden{display:none!important}

@media(max-width:760px){
 .home-header{height:58px}.header-read{font-size:.86rem}.hero{grid-template-columns:1fr;gap:32px;text-align:center;min-height:auto;padding:32px 0 68px}.cover-frame img{width:min(78vw,330px);margin:auto}.hero-actions{flex-direction:column}.hero-actions a{width:100%}.book-facts{justify-content:center}.home-section{text-align:left}.authors-list{font-size:.8rem}
 .reader-app{grid-template-rows:54px minmax(0,1fr) 54px}.reader-header{padding:0 5px}.reader-heading strong{max-width:44vw}.settings-sheet{max-height:88dvh}.settings-tabs button{font-size:.91rem}.settings-content{padding:18px 18px 34px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
