:root{--font-scale: 1;--bg: #fbf7f0;--surface: #ffffff;--text: #241a12;--muted: #6b5a4b;--accent: #7a3e12;--accent-text: #ffffff;--border: #e3d7c6;--highlight: #ffe9b8;--danger: #b3261e;--notice: #fff4d6;--shadow: 0 1px 3px rgba(0, 0, 0, .12);color-scheme:light}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--bg: #15120f;--surface: #221d18;--text: #f1e9df;--muted: #b6a796;--accent: #f0a868;--accent-text: #1a1009;--border: #3b332b;--highlight: #4a3a1c;--danger: #ff8a80;--notice: #3a301b;color-scheme:dark}}:root[data-theme=dark]{--bg: #15120f;--surface: #221d18;--text: #f1e9df;--muted: #b6a796;--accent: #f0a868;--accent-text: #1a1009;--border: #3b332b;--highlight: #4a3a1c;--danger: #ff8a80;--notice: #3a301b;color-scheme:dark}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:Noto Sans Telugu,Nirmala UI,Gautami,system-ui,sans-serif;font-size:17px;line-height:1.6;-webkit-text-size-adjust:100%}button,input,select{font:inherit;color:inherit}button{min-height:48px;padding:.5rem .9rem;border-radius:12px;border:1px solid var(--border);background:var(--surface);cursor:pointer}button:disabled{opacity:.55;cursor:default}button.primary{background:var(--accent);color:var(--accent-text);border-color:var(--accent);font-weight:600}button.big{width:100%;min-height:60px;font-size:1.15rem}button.danger,.icon-btn.danger{color:var(--danger)}:focus-visible{outline:3px solid var(--accent);outline-offset:2px}input:not([type=radio],[type=checkbox],[type=range]),select{width:100%;min-height:48px;padding:.5rem .7rem;border-radius:10px;border:1px solid var(--border);background:var(--surface)}input[type=range]{width:100%;min-height:40px;accent-color:var(--accent)}.skip{position:absolute;left:-9999px}.skip:focus{left:.5rem;top:.5rem;z-index:100;background:var(--surface);padding:.5rem}.app{min-height:100dvh;display:flex;flex-direction:column}.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:.6rem;padding:.5rem .75rem;padding-top:max(.5rem,env(safe-area-inset-top));background:var(--surface);border-bottom:1px solid var(--border)}.topbar h1{margin:0;font-size:1.15rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.title-block{min-width:0}.icon-btn{min-width:48px;font-size:1.25rem;border:none;background:transparent}.grow{flex:1;min-width:0}.row{display:flex;gap:.5rem;align-items:center}.stack{display:flex;flex-direction:column;gap:.8rem}.muted{color:var(--muted)}.small{font-size:.88rem}.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:.9rem;box-shadow:var(--shadow)}.notice{background:var(--notice);border-radius:10px;padding:.6rem .8rem}.error{color:var(--danger)}.banner{display:flex;align-items:flex-start;gap:.5rem;padding:.4rem .75rem;border-bottom:1px solid var(--border)}.banner.error{background:var(--notice);color:var(--danger);font-weight:600}.banner.info{background:var(--notice)}.library{padding:1rem;max-width:720px;width:100%;margin:0 auto;display:flex;flex-direction:column;gap:1rem}.intro p{margin-top:0}.import-progress{margin-top:.8rem}progress{width:100%;height:12px;accent-color:var(--accent)}.doc-list,.chapter-list,.para-list,.log{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.doc-item{display:flex;align-items:center;padding:.3rem}.doc-open{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;border:none;text-align:start;background:transparent}.doc-title{font-weight:600;font-size:1.05rem}.bar{display:block;width:100%;height:6px;border-radius:3px;background:var(--border);overflow:hidden}.bar>span{display:block;height:100%;background:var(--accent)}.toolbar{position:sticky;top:calc(57px + env(safe-area-inset-top));z-index:9;display:grid;grid-template-columns:repeat(4,1fr);gap:.35rem;padding:.4rem .5rem;background:var(--bg);border-bottom:1px solid var(--border)}.toolbar button{padding:.3rem;font-size:.85rem;line-height:1.25}.reader{flex:1;width:100%;max-width:760px;margin:0 auto;padding:1rem 1rem 13rem;font-size:calc(1.12rem * var(--font-scale));line-height:1.85}.para{margin:0 0 .9rem;padding:.35rem .55rem;border-radius:10px;white-space:pre-wrap;overflow-wrap:anywhere;cursor:pointer;scroll-margin:8rem;content-visibility:auto;contain-intrinsic-size:auto 4rem}h2.para,h3.para,h4.para,h5.para,h6.para{line-height:1.5;color:var(--accent)}h2.para{font-size:1.35em}h3.para{font-size:1.15em}h4.para,h5.para,h6.para{font-size:1.05em}.para.current{background:var(--highlight);box-shadow:inset 4px 0 0 var(--accent)}.player{position:fixed;left:0;right:0;bottom:0;z-index:10;background:var(--surface);border-top:1px solid var(--border);padding:.5rem .75rem;padding-bottom:max(.6rem,env(safe-area-inset-bottom));box-shadow:0 -2px 8px #00000014}.player-info{max-width:760px;margin:0 auto .4rem}.controls{max-width:520px;margin:0 auto;display:grid;grid-template-columns:1fr 1fr 1.4fr 1fr;gap:.5rem}.ctrl{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:64px;font-size:1.5rem;line-height:1.1;padding:.3rem}.ctrl span{font-size:.78rem}.ctrl.play{background:var(--accent);color:var(--accent-text);border-color:var(--accent);font-size:1.9rem}.sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:#00000073;display:flex;align-items:flex-end;justify-content:center}.sheet{width:100%;max-width:720px;max-height:88dvh;display:flex;flex-direction:column;background:var(--bg);border-radius:18px 18px 0 0;outline:none}.sheet-head{display:flex;align-items:center;padding:.4rem .5rem .4rem 1rem;border-bottom:1px solid var(--border)}.sheet-head h2{flex:1;margin:0;font-size:1.15rem}.sheet-body{overflow-y:auto;padding:1rem;padding-bottom:max(1.5rem,env(safe-area-inset-bottom))}.list-btn{width:100%;text-align:start;min-height:48px;line-height:1.45}.list-btn.active{background:var(--highlight);border-color:var(--accent)}.list-btn.level-1{font-weight:700}.list-btn.heading{font-weight:600}.para-no{display:inline-block;min-width:2.4rem;color:var(--muted);font-size:.8rem}.field{display:flex;flex-direction:column;gap:.3rem;border:none;margin:0;padding:0}.field legend{font-weight:600;margin-bottom:.3rem}.radio,.check,.chip{display:flex;gap:.6rem;align-items:flex-start;padding:.5rem 0;min-height:44px}.radio input,.check input,.chip input{width:22px;height:22px;margin-top:.2rem;accent-color:var(--accent);flex-shrink:0}.chip{border:1px solid var(--border);border-radius:999px;padding:.4rem .8rem;align-items:center}.chip input{margin:0}.log li{font-family:ui-monospace,monospace;font-size:.85rem}details summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:600}@media(min-width:720px){.toolbar button{font-size:1rem}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
