:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--bg:#f6f3ee;--surface:#fffdf9;--text:#22201c;--muted:#6b665d;--line:#ddd6ca;--accent:#1f5f8b;--on-accent:#fff;--highlight:#fde9a8;--problem:#a3261d}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#16181b;--surface:#1f2226;--text:#e6e2da;--muted:#9a958b;--line:#34383e;--accent:#7db8e0;--on-accent:#10202c;--highlight:#574a1c;--problem:#ff9b90}}*{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--bg);color:var(--text);margin:0;font:16px/1.5 system-ui,sans-serif}.app{flex-direction:column;max-width:44rem;height:100dvh;margin:0 auto;display:flex}.topbar{border-bottom:1px solid var(--line);align-items:center;gap:.75rem;padding:.6rem 1rem;display:flex}.topbar h1{white-space:nowrap;text-overflow:ellipsis;flex:1;margin:0;font-size:1rem;font-weight:600;overflow:hidden}button,select,textarea{font:inherit;color:inherit}button{border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:10px;min-height:44px;padding:.5rem 1rem}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent);font-weight:600}button.link{min-height:0;color:var(--accent);white-space:nowrap;background:0 0;border:0;padding:.25rem 0}select{border:1px solid var(--line);background:var(--surface);border-radius:10px;width:100%;min-height:44px;padding:.4rem .5rem}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.row{gap:.6rem;display:flex}.row>button{flex:1}.problem{color:var(--problem)}.banner{border-bottom:1px solid var(--line);margin:0;padding:.6rem 1rem}.library{flex-direction:column;flex:1;gap:1.5rem;padding:1rem;display:flex;overflow-y:auto}.library h2{letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:0 0 .5rem;font-size:.8rem;font-weight:600}.books{border:1px solid var(--line);background:var(--surface);border-radius:10px;margin:0;padding:0;list-style:none}.books li{align-items:stretch;display:flex}.books li+li{border-top:1px solid var(--line)}.book{text-align:left;background:0 0;border:0;border-radius:10px;flex-direction:column;flex:1;align-items:flex-start;gap:.1rem;min-width:0;padding:.7rem .9rem;display:flex}.book-title{white-space:nowrap;text-overflow:ellipsis;max-width:100%;font-weight:600;overflow:hidden}.book-meta{color:var(--muted);font-variant-numeric:tabular-nums;font-size:.85rem}.remove{width:48px;color:var(--muted);background:0 0;border:0;border-radius:10px;place-items:center;padding:0;display:grid}.add{flex-direction:column;gap:.75rem;display:flex}.add h2{margin:0}.add textarea{border:1px solid var(--line);background:var(--surface);resize:vertical;border-radius:10px;min-height:9rem;padding:.75rem}.add .problem,.add .busy{margin:0}.busy{color:var(--muted)}.footnote{color:var(--muted);margin:0;font-size:.85rem}.footnote a{color:var(--accent)}.reader{overflow-wrap:break-word;flex:1;padding:1rem 1.1rem 2rem;font:1.15rem/1.7 Georgia,Times New Roman,serif;overflow-y:auto}.reader p{margin:0 0 1em}.reader h2{margin:1.6em 0 .7em;font:600 1.15rem/1.4 system-ui,sans-serif}.reader h2:first-child{margin-top:0}.reader span{cursor:pointer;border-radius:4px}.reader span.current{background:var(--highlight);box-shadow:0 0 0 3px var(--highlight)}.controls{padding:.5rem 1rem calc(.75rem + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--surface)}.status{text-align:center;min-height:1.3rem;color:var(--muted);font-variant-numeric:tabular-nums;margin:0 0 .5rem;font-size:.85rem}.status.problem{color:var(--problem)}.notice{border:1px solid var(--line);background:var(--highlight);border-radius:10px;margin:0 0 .5rem;padding:.5rem .75rem;font-size:.9rem}.prep{flex-wrap:wrap;align-items:center;gap:.3rem .75rem;margin-bottom:.6rem;display:flex}.prep progress{width:100%;height:6px;accent-color:var(--accent);flex-basis:100%}.prep p{color:var(--muted);font-variant-numeric:tabular-nums;flex:1;margin:0;font-size:.85rem}.prep button{min-height:36px;padding:.3rem .9rem}.transport{justify-content:center;align-items:center;gap:1.25rem;margin-bottom:.6rem;display:flex}.transport button{border-radius:50%;place-items:center;width:52px;height:52px;padding:0;display:grid}.transport .play{width:64px;height:64px}.controls label{min-width:5.5rem;color:var(--muted);flex-direction:column;gap:.15rem;font-size:.75rem;display:flex}.controls label.grow{flex:1;min-width:0}.controls select{color:var(--text);font-size:1rem}dialog.export{border:1px solid var(--line);background:var(--surface);width:min(30rem,100vw - 2rem);color:var(--text);border-radius:14px;padding:1.25rem}dialog.export::backdrop{background:#00000073}dialog.export h2{margin:0 0 .75rem;font-size:1.1rem}dialog.export p{overflow-wrap:anywhere;margin:0 0 .9rem}dialog.export label{color:var(--muted);flex-direction:column;gap:.2rem;margin-bottom:.9rem;font-size:.8rem;display:flex}dialog.export select{color:var(--text);font-size:1rem}dialog.export progress{width:100%;height:8px;accent-color:var(--accent);margin-bottom:.75rem}dialog.export .hint{color:var(--muted);font-size:.85rem}
