:root { --bar: #0b2a4a; --accent: #1b6fd1; --bg: #eef1f5; --text: #17212d; --muted: #5d6978; --line: #d7dde5; --card: #fff; }
[hidden] { display: none !important; }
@media (prefers-color-scheme: dark) { :root { --bg: #14181d; --text: #e7ebf0; --muted: #9aa5b1; --line: #2b323b; --card: #1c2229; } }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px -apple-system, "Segoe UI", Roboto, Arial, sans-serif; overscroll-behavior: none; }
#bar { position: fixed; top: 0; left: 0; right: 0; height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0; display: flex; align-items: center; gap: 8px; background: var(--bar); color: #fff; z-index: 10; }
#title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sheet { width: 130px; border: 0; border-radius: 8px; padding: 8px 10px; font-size: 15px; }
.ib { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 8px; min-width: 40px; height: 38px; font-size: 18px; }
.ib.on { background: #2e7d32; }
#net { font-size: 12px; opacity: .8; }
main#home { padding: calc(64px + env(safe-area-inset-top)) 16px 30px; max-width: 900px; margin: 0 auto; }
h1 { font-size: 28px; } h2 { font-size: 17px; margin: 22px 0 8px; } h2 small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.btn { border: 0; border-radius: 10px; padding: 12px 18px; font-size: 16px; background: var(--card); color: var(--text); }
.btn.primary { background: var(--accent); color: #fff; }
.list { background: var(--card); border-radius: 12px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { color: var(--muted); font-size: 12px; }
.row.dir .nm { font-weight: 600; }
.row:active { background: rgba(27,111,209,.12); }
#crumbs { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
#crumbs a { color: var(--accent); text-decoration: none; }
.muted { color: var(--muted); } .small { font-size: 13px; }
a { color: var(--accent); }
#viewerWrap { position: fixed; inset: calc(52px + env(safe-area-inset-top)) 0 0 0; background: #6b7480; }
#viewerContainer { position: absolute; inset: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
#viewer .page { margin: 8px auto; border: 0; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
aside#sheets { position: fixed; top: calc(52px + env(safe-area-inset-top)); right: 0; bottom: 0; width: min(380px, 90vw); background: var(--card); z-index: 9; box-shadow: -4px 0 20px rgba(0,0,0,.25); display: flex; flex-direction: column; }
#sfilter { margin: 10px; padding: 10px; border-radius: 8px; border: 1px solid var(--line); font-size: 15px; background: var(--bg); color: var(--text); }
#slist { flex: 1; overflow: auto; }
#slist .row { padding: 10px 14px; }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(20,30,40,.92); color: #fff; padding: 10px 16px; border-radius: 10px; opacity: 0; transition: opacity .25s; pointer-events: none; max-width: 90vw; z-index: 20; }
#toast.on { opacity: 1; }
.annotationLayer .linkAnnotation > a:hover, .hoodlink:active { background: rgba(255, 200, 0, .3); }
.hoodlink { position: absolute; border-radius: 3px; }
