/* Responsive, themeable surfaces. No external fonts or animation runtime. */
:root{--surface:#fffef8;--canvas:#f5f4ef;--text:#26382e;--subtle:#586752;--border:#d6ddcf;--reading:#f7f6ec;--accent:#244b3c;color-scheme:light}
body[data-theme=warm]{--surface:#f9f0da;--canvas:#efe5d2;--text:#403828;--subtle:#665c46;--border:#d9cdb6;--reading:#f5e9cb;--accent:#5c5135}
body[data-theme=dark]{--surface:#202c28;--canvas:#141e1a;--text:#e8ece4;--subtle:#bcc9bb;--border:#48564b;--reading:#202c28;--accent:#bdd7b5;color-scheme:dark}
body{background:var(--canvas);color:var(--text);font-family:system-ui,-apple-system,'Segoe UI',sans-serif;min-height:100dvh}h1,h2,h3{text-wrap:balance}p{text-wrap:pretty}.content{max-width:1540px}button,select,input,textarea{font-family:inherit}button,select{min-height:44px}.muted,.intro,.book-meta,.eyebrow,.paper-foot,.source-link,.reader-footer,.device-caption{color:var(--subtle)}button,.select,input[type=search],.catalog-filters select{background:var(--surface);color:var(--text);border-color:var(--border)}button:hover{background:var(--reading)}.primary{background:var(--accent);color:var(--surface);border-color:var(--accent)}.primary:hover{filter:brightness(.93);background:var(--accent)}.paper,.panel,.book-card,.note-card,dialog,.lock-screen{background:var(--surface);color:var(--text);border-color:var(--border)}.paper{background:var(--reading)}.paper-kicker{color:var(--subtle);border-color:var(--border)}.paper input,.paper textarea{color:var(--text)}.topbar{border-color:var(--border);gap:12px}.topbar-right{flex-wrap:wrap;justify-content:flex-end}.hero{background:var(--reading);border-color:var(--border)}.brand{letter-spacing:.18em}.sidebar{height:100dvh}.nav-button{min-height:48px;background:transparent;color:#d0ddcf;border-color:transparent}.nav-button:hover{background:#294d3f}.nav-button.active{background:#345448;color:#fff}.sidebar nav{gap:5px}.paper h2{color:var(--text)}.note-editor .ink-canvas{background-color:#f7f6ec}.note-editor .actions button,.ink-toolbar button,.source-link button{min-height:40px}.device{background:#26362e;box-shadow:0 12px 30px #142a201c;border-radius:18px}.controls button{background:#33473a;min-width:44px;min-height:44px;border:1px solid #8b9b86}.controls{gap:20px}.book-text{font-family:Georgia,'Times New Roman',serif}.book-text h3{color:var(--text)}.book-text figcaption{color:var(--subtle)}.book-text[dir=rtl]{text-align:right}.reader-toolbar select{min-width:0}.reader-heading{gap:24px}.reader-heading .actions{justify-content:flex-end}.reader-heading h1{max-width:700px}.reader-footer,.stat-number,.day{font-variant-numeric:tabular-nums}.catalog-filters{display:flex;flex-wrap:wrap;gap:12px;margin:28px 0}.catalog-filters input{flex:1;min-width:180px;padding:13px;border:1px solid var(--border);border-radius:8px}.catalog-filters select{max-width:100%;padding:12px;border:1px solid var(--border);border-radius:8px}.catalog-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.catalog-card{min-width:0;border:1px solid var(--border);border-radius:12px;overflow:hidden;background:var(--surface)}.catalog-cover{min-height:240px;background:#244b3c;color:#f1ecd7;padding:30px;display:flex;flex-direction:column;justify-content:space-between;gap:20px;border-inline-start:10px solid #17382a}.catalog-card:nth-child(3n+2) .catalog-cover{background:#5a4f38;border-color:#3f3828}.catalog-card:nth-child(3n+3) .catalog-cover{background:#3e5359;border-color:#2b4046}.catalog-cover span,.catalog-cover small{font-size:11px}.catalog-cover strong{font:27px/1.28 Georgia,serif;overflow-wrap:anywhere;text-wrap:balance}.catalog-details{padding:22px}.catalog-details h2{font-size:24px;margin:10px 0}.catalog-details>p{line-height:1.7}.catalog-details>button{width:100%}.catalog-details details{margin-top:18px;font-size:12px;line-height:1.75;overflow-wrap:anywhere}.catalog-details summary{cursor:pointer;min-height:30px}.catalog-details a{display:block;color:var(--text);margin:8px 0;text-underline-offset:3px}.platform-card{display:flex;flex-wrap:wrap;align-items:center;gap:20px;justify-content:space-between}.platform-card>div:first-child{max-width:600px}.platform-card>p{flex-basis:100%;margin:0}.platform-card h2{margin:8px 0}.theme-label{display:none}.daily-goal{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.daily-goal input{max-width:80px;padding:10px;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:6px}.partial-book{padding:12px 16px;border-inline-start:3px solid #8b744b;background:var(--reading);font-size:13px}#platform-notice:empty{display:none}#platform-notice{position:fixed;bottom:18px;inset-inline-start:250px;z-index:30;display:flex;gap:15px;align-items:center;max-width:min(680px,calc(100vw - 280px));padding:14px 18px;background:var(--surface);color:var(--text);box-shadow:0 4px 20px #0003;border:1px solid var(--border);border-radius:10px}#platform-notice button{flex-shrink:0}#status{background:var(--surface);color:var(--text);border-color:var(--border);bottom:max(14px,env(safe-area-inset-bottom))}.danger{color:#b13b35}body[data-theme=dark] .danger{color:#ffb0a4}body[data-theme=dark] .bar-track{background:#33433a}body[data-theme=dark] .selected{background:#415841;color:#eef5e7}body[data-theme=dark] .book-illustration{opacity:.85}[dir=rtl] .topbar-right{justify-content:flex-start}[dir=rtl] .nav-button{text-align:right}[dir=rtl] .source-link,[dir=rtl] .book-text{overflow-wrap:anywhere}[dir=rtl] .controls{direction:ltr}
@media(min-width:1600px){.catalog-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.content{padding-inline:58px}.device.duo{max-width:1280px}.book-text{height:clamp(400px,54vh,680px)}}
@media(max-width:1150px){.catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.topbar{padding-block:14px;height:auto}.topbar-right{gap:7px}.topbar .eyebrow{display:none}.reader-heading{flex-wrap:wrap}.reader-heading .actions{justify-content:flex-start}#platform-notice{inset-inline-start:210px;max-width:calc(100vw - 240px)}}
@media(max-width:760px){.sidebar{height:auto;padding:20px 18px 10px}.sidebar nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;gap:3px}.nav-button{display:flex;flex-direction:column;gap:5px;font-size:10px;padding:9px 3px;min-width:0;overflow-wrap:anywhere;text-align:center;justify-content:center}.nav-button .icon{font-size:18px}.brand{font-size:22px}.topbar{padding:12px 18px}.topbar-right{width:100%;justify-content:space-between;gap:6px}.topbar-right select{min-width:0;max-width:100%;font-size:11px;padding:8px}.content{padding:26px 16px calc(90px + env(safe-area-inset-bottom))}h1{font-size:34px}.catalog-grid{gap:15px}.catalog-cover{padding:20px;min-height:220px}.catalog-cover strong{font-size:24px}.catalog-details{padding:16px}.catalog-details h2{font-size:21px}.catalog-filters input{flex-basis:100%}.catalog-filters select{flex:1;min-width:0;font-size:12px}.reader-heading .actions{justify-content:flex-start}.reader-toolbar .actions{width:100%;flex-wrap:wrap}.reader-toolbar select{max-width:100%;flex:1}.reader-toolbar button{flex-grow:1}.device{padding:12px 11px 10px}.paper{padding:18px}.device.one,.device.duo{max-width:650px}.book-text{height:min(56dvh,550px);min-height:310px}.controls{gap:14px}.controls button{min-width:40px;min-height:40px;width:40px;height:40px}.note-editor .ink-canvas{height:290px}.filter-bar .select{max-width:100%}.platform-card{padding:22px}.platform-card h2{font-size:27px}#platform-notice{bottom:55px;inset-inline:12px;max-width:none;font-size:12px;flex-wrap:wrap}#status{max-width:calc(100vw - 24px);font-size:10px}dialog{max-width:calc(100vw - 24px);padding:22px}.focus-mode .content{padding-top:18px}.theme-label{display:none}}
@media(max-width:440px){.catalog-grid{grid-template-columns:1fr}.catalog-cover{min-height:200px}.catalog-details h2{font-size:25px}.book-cards{grid-template-columns:1fr}.book-cover{height:230px}.topbar-right select{flex:1}.topbar-right #mode{flex:1.4}.note-editor .ink-options{gap:7px}.paper h2{font-size:23px}.hero{padding:22px}.reader-toolbar .select{flex-basis:50%}}
@media print{#platform-notice,.platform-card,.partial-book{display:none!important}body,.paper{color:#111!important;background:white!important}}
