:root{color-scheme:dark;--bg:#0d1016;--surface:#171d25;--surface-2:#212832;--surface-3:#2b333f;--ink:#f5f6f8;--muted:#97a2b0;--muted-2:#6e7b89;--line:#303944;--accent:#c8fb8a;--accent-ink:#1c2910;--danger:#ff7776;--shadow:0 16px 46px rgba(0,0,0,.18)}
:root[data-theme="light"]{color-scheme:light;--bg:#f5f6f2;--surface:#fff;--surface-2:#edf0e9;--surface-3:#dfe5db;--ink:#171d1c;--muted:#687571;--muted-2:#77827e;--line:#dce1dd;--accent:#446b36;--accent-ink:#fff;--danger:#b63737;--shadow:0 16px 40px rgba(10,20,15,.06)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;-webkit-font-smoothing:antialiased}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}a{color:inherit}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}svg{width:21px;height:21px}h1,h2,h3,p{margin-top:0}h1{font-weight:750;letter-spacing:-.055em}h2{letter-spacing:-.025em}p{line-height:1.55}[hidden]{display:none!important}.app-shell{width:min(100%,680px);min-height:100dvh;margin:0 auto;padding-bottom:calc(104px + env(safe-area-inset-bottom));background:var(--bg)}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:12px 20px;position:sticky;top:0;z-index:5;background:color-mix(in srgb,var(--bg) 91%,transparent);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.brand{display:flex;gap:11px;align-items:center}.brand-mark{font-size:27px;line-height:1;letter-spacing:-.13em;font-weight:950;color:var(--accent);width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:var(--surface-2)}.brand-dot{color:var(--ink)}.brand-label{display:grid;gap:1px}.brand-label b{font-size:15px;letter-spacing:.19em}.brand-label small{font-size:8px;font-weight:700;letter-spacing:.18em;color:var(--muted)}.top-actions{display:flex;align-items:center;gap:8px}.offline-pill{border-radius:999px;padding:6px 9px;font-size:10px;color:#e4ad66;background:#383022}.icon-button{width:42px;height:42px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);color:var(--ink);border-radius:14px}
.view{display:none;padding:8px 20px 12px}.view.active{display:block}.welcome{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:27px 23px 24px;min-height:229px;overflow:hidden;display:flex;align-items:center}.eyebrow{font-size:10px;color:var(--accent);letter-spacing:.20em;font-weight:800;margin:0 0 10px}.welcome h1{font-size:clamp(30px,7vw,39px);line-height:1.1;margin:0 0 12px;position:relative;z-index:1}.welcome h1 em{font-style:normal;color:var(--accent)}.welcome-copy{font-size:12px;color:var(--muted);max-width:204px;margin:0;position:relative;z-index:1}.welcome-art{position:absolute;right:13px;top:21px;width:40%;height:200px;transform:rotate(16deg);opacity:.82;overflow:hidden}.art-frame{position:absolute;width:85px;height:134px;border:2px solid var(--accent);border-radius:10px;background:radial-gradient(circle at 67% 27%,var(--accent) 0 13px,transparent 14px),linear-gradient(145deg,var(--surface-2) 55%,var(--line) 55% 67%,var(--surface-2) 68%)}.art-one{right:52px;top:-20px;opacity:.4}.art-two{right:2px;top:50px}.art-three{right:100px;top:75px;opacity:.45}.section-heading{display:flex;align-items:end;justify-content:space-between;margin:26px 0 15px}.section-heading--spaced{margin-top:36px}.section-heading h2{font-size:19px;margin:0 0 3px}.section-heading p{font-size:12px;color:var(--muted);margin:0}.text-action{border:0;background:transparent;color:var(--accent);font-size:12px;font-weight:750;padding:7px 0}.text-action span{font-size:20px;vertical-align:middle}.continue-list{display:grid;gap:12px}.continue-item{display:flex;gap:14px;align-items:center;text-align:left;background:var(--surface);padding:10px;border:1px solid var(--line);border-radius:18px;color:var(--ink);width:100%}.continue-cover{width:62px;height:83px;border-radius:9px;object-fit:cover;background:var(--surface-2);flex:none}.continue-details{min-width:0;flex:1}.continue-details strong{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.continue-details small{display:block;color:var(--muted);font-size:11px;margin:6px 0 11px}.progress-track{height:5px;border-radius:9px;overflow:hidden;background:var(--surface-3)}.progress-fill{height:100%;background:var(--accent);border-radius:9px}.empty-state{border:1px dashed var(--line);border-radius:19px;text-align:center;padding:25px 18px;background:var(--surface)}.empty-icon{font-size:28px;color:var(--accent)}.empty-state h3{font-size:15px;margin:10px 0 6px}.empty-state p{font-size:12px;color:var(--muted);margin:0 auto 13px;max-width:270px}.small-btn{background:var(--accent);border:0;border-radius:11px;color:var(--accent-ink);font-weight:750;padding:10px 15px;font-size:12px}.empty-state.compact{padding:20px}.book-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 12px}.book-tile{min-width:0;position:relative}.book-cover-button{padding:0;border:0;background:none;display:block;width:100%;position:relative}.book-cover{width:100%;aspect-ratio:3 / 4.25;object-fit:cover;display:block;border-radius:12px;background:var(--surface-2);border:1px solid var(--line)}.cover-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--accent);text-align:center;padding:12px;font-weight:800;font-size:12px;letter-spacing:.04em;overflow-wrap:anywhere}.cover-fallback::before{content:'K.';font-weight:900;font-size:30px;color:var(--accent)}.book-title{font-size:12px;margin:8px 0 3px;font-weight:700;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:30px}.book-meta{font-size:10px;color:var(--muted)}.tile-menu{border:1px solid var(--line);background:var(--surface);color:var(--ink);position:absolute;right:6px;top:6px;border-radius:10px;width:28px;height:28px;font-size:19px;line-height:1;box-shadow:var(--shadow)}.tile-progress{position:absolute;bottom:0;left:0;right:0;height:4px;border-radius:0 0 12px 12px;overflow:hidden;background:rgba(0,0,0,.4)}.tile-progress span{display:block;background:var(--accent);height:100%}.page-heading{padding:14px 0 25px}.page-heading h1{font-size:36px;margin:0 0 6px}.page-heading>p:last-child{color:var(--muted);font-size:13px;margin:0}.searchbar{height:49px;display:flex;align-items:center;gap:10px;border:1px solid var(--line);background:var(--surface);border-radius:13px;padding:0 15px;margin:0 0 23px}.searchbar svg{color:var(--muted)}.searchbar input{background:transparent;border:0;outline:0;min-width:0;width:100%;color:var(--ink);font-size:14px}.searchbar input::placeholder{color:var(--muted-2)}.info-card{border:1px solid var(--line);border-radius:20px;padding:23px;background:var(--surface);margin-bottom:15px}.info-card.secondary{background:transparent}.info-symbol{font-size:31px;color:var(--accent);margin-bottom:7px}.mini-label{font-size:9px;font-weight:850;letter-spacing:.15em;color:var(--accent)}.info-card h2{font-size:20px;margin:7px 0 8px}.info-card p{font-size:13px;color:var(--muted);margin:0 0 19px}.outline-link{display:inline-block;border:1px solid var(--line);border-radius:11px;padding:12px 14px;font-size:12px;font-weight:800;text-decoration:none}.outline-link span{margin-left:4px;color:var(--accent)}.notice{font-size:12px;line-height:1.6;color:var(--muted);border-left:2px solid var(--accent);padding:7px 13px;margin-top:26px}.settings-group{margin-bottom:27px}.settings-group h2{font-size:15px;margin:0 0 11px}.setting-row{border:1px solid var(--line);background:var(--surface);min-height:72px;padding:15px;display:flex;align-items:center;justify-content:space-between;gap:14px}.setting-row:first-of-type{border-radius:14px 14px 0 0}.setting-row:last-of-type{border-radius:0 0 14px 14px}.setting-row:only-of-type{border-radius:14px}.setting-row+ .setting-row{border-top:0}.setting-row b,.setting-row strong{font-size:13px}.setting-row small{display:block;color:var(--muted);font-size:11px;margin-top:5px}.setting-row select{min-width:100px;max-width:170px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--ink);font-size:11px;padding:9px 7px}.status-dot{width:9px;height:9px;background:var(--accent);border-radius:100%}.setting-button{width:100%;background:var(--surface);border:1px solid var(--line);color:var(--ink);padding:17px 15px;text-align:left;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:space-between;margin-top:7px;border-radius:13px}.setting-button span{font-size:17px;color:var(--accent)}.setting-help{color:var(--muted);font-size:11px;margin:11px 0 0}.setting-help b{color:var(--ink)}.footer-note{font-size:10px;text-align:center;color:var(--muted-2);padding:15px}
.bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,680px);height:calc(66px + env(safe-area-inset-bottom));padding:7px 10px calc(7px + env(safe-area-inset-bottom));display:flex;justify-content:space-around;align-items:center;background:color-mix(in srgb,var(--surface) 95%,transparent);border-top:1px solid var(--line);z-index:8;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.nav-button{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;color:var(--muted);background:transparent;flex:1;font-size:10px;font-weight:650}.nav-button svg{width:21px;height:21px}.nav-button.selected{color:var(--accent)}.fab{position:fixed;bottom:calc(84px + env(safe-area-inset-bottom));right:max(calc((100vw - 680px)/2 + 20px),20px);z-index:7;border:0;border-radius:16px;background:var(--accent);color:var(--accent-ink);font-size:13px;font-weight:850;display:flex;align-items:center;gap:8px;padding:12px 15px;box-shadow:0 8px 30px rgba(6,10,12,.26)}.fab span:first-child{font-size:23px;font-weight:450;line-height:1}
.dialog-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.74);z-index:30;display:flex;align-items:flex-end;justify-content:center}.dialog{width:min(100%,560px);max-height:95dvh;overflow:auto;background:var(--surface);border-radius:24px 24px 0 0;padding:25px 23px calc(24px + env(safe-area-inset-bottom));border:1px solid var(--line);box-shadow:var(--shadow)}.dialog.compact{padding-bottom:calc(20px + env(safe-area-inset-bottom))}.dialog-top{display:flex;justify-content:space-between;align-items:start;gap:14px}.dialog h2{font-size:20px;margin:0 0 8px}.small-close{font-size:26px;width:34px;height:34px;border:0;border-radius:10px;background:var(--surface-2);color:var(--ink);line-height:1}.dialog-description{font-size:13px;color:var(--muted);margin:13px 0 18px}.field-label{display:block;font-weight:800;font-size:12px;margin-bottom:7px}.text-field{width:100%;border-radius:12px;padding:14px;background:var(--bg);color:var(--ink);border:1px solid var(--line);outline:0;margin-bottom:17px}.file-pick{width:100%;border:1px dashed var(--muted-2);border-radius:15px;background:var(--surface-2);color:var(--ink);padding:22px 10px;display:flex;flex-direction:column;align-items:center;gap:6px}.file-icon{border-radius:12px;width:37px;height:37px;background:var(--surface-3);display:grid;place-items:center;font-size:27px;color:var(--accent)}.file-pick strong{font-size:12px}.file-pick small{font-size:11px;color:var(--muted)}.dialog-actions{display:flex;gap:10px;margin-top:20px}.dialog-actions button{flex:1;padding:13px;border-radius:12px;font-size:13px;font-weight:850}.btn-outline{border:1px solid var(--line);background:transparent;color:var(--ink)}.btn-primary{background:var(--accent);color:var(--accent-ink);border:0}.btn-danger{background:var(--danger);color:#161616;border:0}.dialog-hint{font-size:11px;color:var(--muted);margin:13px 0 0}.mode-list{display:grid;gap:9px;margin-top:12px}.mode-list button{border:1px solid var(--line);border-radius:11px;text-align:left;background:var(--surface-2);color:var(--ink);padding:14px;font-size:13px}.mode-list button.selected-mode{border-color:var(--accent);color:var(--accent)}.toast{position:fixed;z-index:60;left:50%;bottom:calc(88px + env(safe-area-inset-bottom));transform:translateX(-50%);padding:12px 17px;max-width:min(88vw,420px);text-align:center;background:#e7f1e0;color:#18291a;border-radius:12px;font-size:13px;font-weight:750;box-shadow:var(--shadow)}.toast.error{background:#ffe4e2;color:#702121}
.reader{position:fixed;inset:0;z-index:20;background:#08090c;color:#fafafa;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}.reader-head{height:58px;padding:0 12px;display:flex;align-items:center;gap:10px;background:rgba(16,19,25,.94);flex:none}.reader-icon{width:40px;height:40px;border:0;border-radius:10px;background:#252b33;color:#fff;font-size:24px}.reader-title{flex:1;min-width:0}.reader-title strong,.reader-title span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reader-title strong{font-size:13px}.reader-title span{font-size:11px;color:#aab0b9;margin-top:3px}.reader-body{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;position:relative;display:flex;align-items:center;justify-content:center}.page-stage{height:100%;width:100%;position:relative;display:flex;align-items:center;justify-content:center;overflow:auto}.page-stage img{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;margin:auto}.tap-zone{position:absolute;top:0;bottom:0;width:25%;background:transparent;border:0;z-index:1}.tap-prev{left:0}.tap-next{right:0}.reader-footer{height:60px;flex:none;display:flex;align-items:center;justify-content:space-around;gap:13px;padding:0 13px;background:rgba(16,19,25,.95)}.reader-control{background:#252b33;border:0;border-radius:11px;color:#fff;font-size:29px;width:40px;height:40px;flex:none}.reader-progress{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.reader-progress span{font-size:11px;color:#c5cbd2}.reader-progress input{width:100%;accent-color:#c8fb8a}.webtoon-stage{height:100%;width:100%;overflow-y:auto;overscroll-behavior:contain;display:block;text-align:center}.webtoon-stage img{width:100%;height:auto;display:block;margin:0 auto}.webtoon-placeholder{min-height:70vh;display:grid;place-items:center;color:#777;font-size:12px}.reader.reader-webtoon .reader-body{display:block}.reader.reader-webtoon .reader-footer{height:49px}.reader.reader-webtoon #pageSlider{display:none}
@media (min-width:580px){.welcome{min-height:240px}.book-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px 14px}.welcome-art{right:35px}.fab{bottom:calc(90px + env(safe-area-inset-bottom))}.dialog-backdrop{align-items:center}.dialog{border-radius:23px;padding-bottom:26px}.dialog.compact{padding-bottom:26px}}
@media (max-width:350px){.view{padding-left:14px;padding-right:14px}.welcome h1{font-size:29px}.book-grid{gap:12px 8px}.topbar{padding-left:14px;padding-right:14px}.welcome-art{opacity:.4}}
