:root{font-family:Inter,Arial,sans-serif;color:#172b33;background:#edf2f3;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;border:1px solid #c6d1d5;background:white;color:#17313b;border-radius:8px;padding:10px 15px;min-height:44px}button:hover{background:#e8f3f3}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible{outline:3px solid #12a8a0;outline-offset:3px}.primary{background:#086c67;color:white;border-color:#086c67}.primary:hover{background:#075953}header{height:80px;border-bottom:1px solid #d1dcdf;display:flex;align-items:center;justify-content:space-between;padding:0 32px;background:white}.brand{display:flex;align-items:center;gap:12px;font-size:25px;font-weight:750;letter-spacing:-1px}.mark{background:#086c67;color:white;padding:6px 10px;border-radius:6px;font-family:Georgia,serif}.edition{font-size:14px;color:#657880;margin-left:14px;letter-spacing:0;font-weight:400}main{display:grid;grid-template-columns:300px 1fr;min-height:calc(100dvh - 80px)}aside{padding:28px 24px;background:#fff;border-right:1px solid #d1dcdf}h1{font-size:24px;letter-spacing:-.6px;margin:0 0 12px}p{line-height:1.6;color:#52666e;margin:0 0 22px}.overline{text-transform:uppercase;letter-spacing:2px;color:#63757c;font-size:12px;font-weight:700;margin:0 0 18px}.drop{border:2px dashed #b8cdd0;border-radius:12px;padding:25px 16px;text-align:center;margin-bottom:12px;background:#f5f9f9}.drop.drag{background:#d4f0ed;border-color:#086c67}.drop p{font-size:14px;margin:12px 0 0}.upload-icon{font-size:30px;margin-bottom:15px;color:#086c67}.wide{width:100%}.minor{font-size:14px;color:#647981}.divider{height:1px;background:#e0e7e9;margin:24px 0}.field{display:block;font-size:14px;font-weight:600;margin-bottom:8px}input[type=text]{width:100%;border:1px solid #bdced2;border-radius:7px;padding:11px;font-size:16px}#download{margin-top:16px}#info{overflow-wrap:anywhere;margin:14px 0 0;font-size:14px}#status{font-size:14px;line-height:1.5;margin:12px 0 0;color:#086c67}#status.error{color:#aa2626}progress{width:100%;accent-color:#086c67;margin-top:14px}.workspace{display:flex;flex-direction:column;min-width:0}.topbar{padding:20px 28px;display:flex;gap:14px;align-items:center;justify-content:space-between}.label{font-size:14px;color:#566c74}.stage{flex:1;min-height:440px;display:flex;align-items:center;justify-content:center;padding:25px;overflow:auto;background:radial-gradient(ellipse at center,#edf3f3,#dfe8eb)}.placeholder{width:min(620px,90%);border:1px solid #c4d3d7;border-radius:12px;padding:60px 32px;text-align:center;background:#f9fcfc;box-shadow:0 20px 60px #263e4910}.placeholder h2{font-family:Georgia,serif;font-size:36px;font-weight:400;line-height:1.2;margin:0 0 14px}.placeholder p{margin-bottom:0}.page{background:#fff;box-shadow:inset 0 0 25px #0000000a;overflow:hidden}.page img{display:block;width:100%;height:100%;object-fit:contain;user-select:none}.controls{padding:18px 24px;background:#fff;border-top:1px solid #d1dcdf;display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap}.controls input{width:65px;padding:9px;border:1px solid #bdced2;border-radius:6px}.controls label{font-size:14px}#pagecount{min-width:80px;font-size:14px;text-align:center}.zoom-image{width:100%;height:85dvh;object-fit:contain}.modal{padding:16px;border:0;border-radius:10px;width:min(1000px,96vw);background:#fff}.modal::backdrop{background:#10262fe0}.modal button{float:right}footer{padding:12px;text-align:center;font-size:12px;color:#687e87;background:#fff}.reader header,.reader footer{background:#fff}.reader main{display:block;min-height:auto}.reader .workspace{height:calc(100dvh - 80px)}.reader aside{display:none}.reader .topbar{display:none}[hidden]{display:none!important}@media(max-width:800px){header{padding:0 18px;height:68px}.edition{display:none}main{grid-template-columns:1fr}aside{border-right:0;border-bottom:1px solid #d1dcdf;padding:20px}.overline,.upload-icon{display:none}h1{font-size:22px}.drop{padding:15px;margin-top:14px}.drop p{margin:8px 0 0}aside>p{margin-bottom:12px}.divider{margin:16px 0}.stage{min-height:420px;padding:18px 10px}.placeholder{padding:40px 20px}.placeholder h2{font-size:29px}.topbar{padding:15px 18px}.controls{padding:12px;gap:8px}.reader .workspace{height:calc(100dvh - 68px)}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.cover-cta{position:relative;padding:0;border:0;border-radius:2px;background:#fff;box-shadow:0 22px 50px #17343b38;max-width:min(90%,560px);max-height:620px;line-height:0;transition:transform .2s}.cover-cta:hover{transform:translateY(-4px);background:white}.cover-cta img{display:block;max-width:100%;max-height:min(65dvh,620px);width:auto;object-fit:contain}.cover-cta span{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);white-space:nowrap;padding:13px 22px;border-radius:30px;background:#ffffffed;color:#0a4547;font-size:16px;font-weight:700;line-height:1.2;box-shadow:0 4px 20px #0003}@media(prefers-reduced-motion:reduce){.cover-cta{transition:none}}

.by-dhruv{font-size:16px;font-weight:500;letter-spacing:0;white-space:nowrap}.connect{display:block;text-align:center;padding:12px 15px;margin:12px 0 18px;border:1px solid #086c67;border-radius:8px;color:#086c67;text-decoration:none;min-height:44px}.connect:focus-visible{outline:3px solid #12a8a0;outline-offset:3px}#publishing-account{margin-bottom:12px;line-height:1.5}@media(max-width:600px){header>.minor{display:none}.brand{gap:10px}}

/* Fit the page to the available reading area, including short phone viewports. */
.reader .workspace{height:calc(100vh - 80px);height:calc(100dvh - 80px);overflow:hidden}
.reader .stage,.reader-expanded .stage{min-height:0;flex:1 1 0;padding:12px;overflow:hidden}
.reader .controls,.reader-expanded .controls{flex:0 0 auto;padding:10px 14px;gap:8px}
.reader footer,.reader-expanded footer{flex:0 0 auto}
.reading-settings{display:flex;align-items:center;justify-content:center;gap:9px;flex-wrap:wrap;flex-basis:100%;font-size:14px}
.reading-settings select{font:inherit;min-height:44px;padding:8px;border:1px solid #bdced2;border-radius:6px;background:#fff;color:#17313b}
.reading-settings input[type=range]{width:125px;padding:0;accent-color:#086c67}
.reading-settings output{min-width:48px;font-variant-numeric:tabular-nums}
.speed-label{font-size:12px;color:#52666e}
.flat-book{position:relative;overflow:hidden;background:#fff;box-shadow:0 10px 25px #17343b25;touch-action:pan-y}
.flat-book img{width:100%;height:100%;display:block;object-fit:contain;user-select:none}
.reader-expanded,.reader-expanded:fullscreen{position:fixed!important;inset:0;z-index:10000;width:100vw;height:100vh!important;height:100dvh!important;background:#edf2f3;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.reader-fullscreen{overflow:hidden}
.reader-expanded .topbar{display:none}
.reader header{gap:12px}.reader header #heading{flex:1;min-width:0}.reader header button{white-space:nowrap;font-size:14px}
@media(max-width:800px){.reader .workspace{height:calc(100vh - 68px);height:calc(100dvh - 68px)}.reader header{padding:0 12px}.reader .controls,.reader-expanded .controls{gap:5px;padding:6px}.controls button{padding:8px 10px}.reading-settings{gap:5px}.reading-settings input[type=range]{width:88px}.reader footer{font-size:12px;padding:7px}.reader .stage{padding:8px}}
@media(max-height:520px){.reader footer,.reader-expanded footer{display:none}.reader .controls,.reader-expanded .controls{padding:4px}.reading-settings{flex-basis:auto}.reader-expanded .stage{padding:4px}}

.file-picker{display:block;width:100%;min-height:48px;font:inherit;font-size:16px;color:#17313b;background:#fff;border:1px solid #bdced2;border-radius:8px;padding:6px;cursor:pointer}.file-picker::file-selector-button{font:inherit;background:#086c67;color:white;border:0;border-radius:6px;padding:12px;margin-right:8px;cursor:pointer}.file-picker:disabled{opacity:.45;cursor:default}#picker-help{margin:14px 0;line-height:1.5}

.mode-tabs{display:flex;gap:8px;background:#fff;padding:12px 24px;border-bottom:1px solid #d1dcdf}.mode-tabs button[aria-pressed=true]{background:#086c67;color:#fff}main{grid-template-columns:390px 1fr}.creator-field,.creator-page label{display:grid;gap:8px;font-size:14px;font-weight:600;margin:14px 0}.creator-field textarea,.creator-field input,.creator-field select,.creator-page input,.creator-page textarea,.creator-page select,#creation-request{width:100%;font:inherit;font-size:16px;padding:10px;border:1px solid #bdced2;border-radius:7px;background:#fff;color:#172b33}.creator-field textarea,.creator-page textarea{resize:vertical}.creator-page{border:1px solid #bdced2;border-radius:10px;padding:14px;margin:18px 0}.creator-page legend{font-weight:600}.creator-page button{margin:6px 4px 0 0}#build-book,#write-pages{margin-top:12px}.insert-editor{padding:12px;background:#edf5f5;border-radius:8px;margin:12px 0}.page-inserts{padding:18px;background:white;display:flex;flex-wrap:wrap;gap:12px}.insert-card{border:1px solid #bdced2;border-radius:8px;padding:14px;display:flex;flex-direction:column;gap:10px;flex:1;min-width:180px;max-width:100%}.insert-card a{color:#086c67;overflow-wrap:anywhere}.insert-card img,.insert-card video{width:100%;max-height:360px;object-fit:contain}.insert-card audio{max-width:100%}.reader-expanded .page-inserts{max-height:35dvh;overflow:auto}@media(max-width:800px){main{grid-template-columns:1fr}.mode-tabs{padding:12px 18px}.mode-tabs button{flex:1}.creator-page{padding:12px}}

#open-book{margin-top:16px}#download{margin-top:8px}.back-to-folio{white-space:nowrap;color:#086c67;font-size:16px;font-weight:700;text-decoration:none}.reader-heading{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.reader header{gap:16px}
.reader .controls label[for="jump"],.reader #jump,.reader #zoom{display:none}
.share-card{margin-top:18px;border:1px solid #9cc9c4;border-radius:12px;background:#edf7f6;padding:18px;box-shadow:0 8px 24px #0d5f5a14}.share-card h2{margin:0 0 6px;font-size:20px}.share-card p{margin:0 0 12px}.share-card .share-url{display:block;padding:12px;background:#fff;border:1px solid #b9d6d3;border-radius:8px;word-break:break-all;color:#075953;text-decoration:none;font-size:14px}.share-card button{margin-top:10px}
.page-inserts.glyph-row{display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:10px;padding:10px 14px;overflow-x:auto;max-width:100%;min-height:64px;background:#fff}
.page-inserts.glyph-row[hidden]{display:none}
.page-inserts.glyph-row .insert-action{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:48px;margin:0;padding:0 9px;border:1px solid #bdd0d2;border-radius:12px;background:#f7fbfb;color:#075f5d;font:normal 26px/1 system-ui,sans-serif;text-decoration:none;cursor:pointer}
.page-inserts.glyph-row .insert-action:hover,.page-inserts.glyph-row .insert-action:focus-visible{background:#e7f4f2;outline:2px solid #086c67;outline-offset:2px}
.page-inserts.glyph-row img,.page-inserts.glyph-row video{max-width:min(80vw,420px);max-height:35dvh;object-fit:contain}
.page-inserts.glyph-row audio{max-width:min(80vw,420px)}
@media(max-width:600px){.page-inserts.glyph-row{justify-content:flex-start;gap:8px;padding:8px 16px}}
