#stage { touch-action: pan-x pan-y; overflow-anchor: none; }
#stage[data-comfort="soft"] .page canvas { filter: sepia(.25) saturate(1.15) brightness(.96); }
#stage[data-comfort="warm"] .page canvas { filter: sepia(.65) saturate(1.25) brightness(.9); }
#toolbar { flex-wrap: wrap; max-width: calc(100vw - 24px); width: max-content; justify-content: center; }
#manga[hidden] { display: none; }
#comfort { max-width: 190px; }
.library-access-dialog { width: min(440px, calc(100vw - 32px)); padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); color: var(--text); box-shadow: 0 24px 100px #0008; text-align: left; }
.library-access-dialog::backdrop { background: #090d0bd9; backdrop-filter: blur(8px); }
.library-access-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: #c5d5a81a; color: var(--accent); font-size: 30px; margin-bottom: 20px; }
.library-access-dialog p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.library-access-folder { display: block; overflow-wrap: anywhere; padding: 14px; border: 1px solid var(--line); border-radius: 10px; margin-top: 20px; }
.library-access-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.library-access-actions button { padding: 11px 16px; border-radius: 9px; }
.library-access-actions .library-access-primary { color: var(--bg); background: var(--accent); font-weight: 600; }
.library-access-error:empty { display: none; }
#reader:fullscreen { height: 100dvh; width: 100vw; background: var(--bg); }
#reader:fullscreen #stage { padding: 16px 16px 24px; }
#reader:fullscreen #toolbar { bottom: 10px; gap: 8px; padding: 5px 8px; border-radius: 9px; font-size: 12px; }
#reader:fullscreen #toolbar select { font-size: 12px; }
#reader:fullscreen .toolgroup button { min-height: 28px; min-width: 28px; }
#reader:fullscreen #back { display: none; }
#welcome footer { flex-wrap: wrap; gap: 14px; }
.developer-link { color: var(--muted); text-decoration: none; text-underline-offset: 4px; }
.developer-link:hover, .developer-link:focus-visible { color: var(--text); text-decoration: underline; }
.library-rails:empty { display: none; }
.library-rails { margin-bottom: 32px; }
.library-rails section { margin-bottom: 28px; }
.library-rail { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.library-rail-item { flex: 0 0 150px; scroll-snap-align: start; }
.library-book, .library-rail-item { position: relative; min-width: 0; }
.library-book > .library-card, .library-rail-item > .library-card { width: 100%; }
.library-list-action { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 22px; cursor: pointer; }
.library-list-action[aria-pressed="true"] { color: var(--accent); }
.library-list-action:hover, .library-list-action:focus-visible { outline: 2px solid var(--accent); }
.library-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.library-breadcrumb button { color: var(--muted); background: transparent; padding: 6px 8px; font: inherit; font-size: 13px; }
.library-breadcrumb button:last-child { color: var(--text); }
.library-breadcrumb:empty { display: none; }
.library-list-action[hidden] { display: none; }
#language { flex-shrink: 0; max-width: 145px; padding: 7px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 12px; }
@media (max-width: 540px) { #language { max-width: 105px; } #header .divider { display: none; } }
