:root { color-scheme: light; }
body { margin:0; }
.vb-app { --paper:#fff; --surface:#f1f5f7; --ink:#172b38; --muted:#4f6472; --rule:#cbd6de; --accent:#076b76; --on-accent:#fff; --nav:#102f3a; --nav-ink:#eef5f7; --focus:#b04700; --reading:1.125rem; min-height:100vh; color:var(--ink); background:var(--paper); font:1rem/1.55 system-ui,-apple-system,"Segoe UI",sans-serif; }
html[data-theme="dark"] { color-scheme:dark; }
html[data-theme="dark"] .vb-app { --paper:#111d25; --surface:#1b2c36; --ink:#e7eef2; --muted:#afc0cb; --rule:#425662; --accent:#8adce1; --on-accent:#09272b; --nav:#0c1a22; --focus:#ffc66f; }
html[data-font="small"] .vb-app { --reading:1rem; }
html[data-font="large"] .vb-app { --reading:1.3rem; }
html[data-font="largest"] .vb-app { --reading:1.5rem; }
.vb-app * { box-sizing:border-box; }
.vb-app [hidden] { display:none !important; }
.vb-app button,.vb-app input { font:inherit; }
.vb-app button { color:var(--ink); background:var(--paper); border:1px solid var(--rule); border-radius:5px; padding:.55rem .8rem; cursor:pointer; min-height:42px; }
.vb-app button:hover { background:var(--surface); }
.vb-app button:disabled { opacity:.5; cursor:default; }
.vb-app input { color:var(--ink); background:var(--paper); border:1px solid var(--rule); padding:.75rem; border-radius:5px; width:100%; }
.vb-app :focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.vb-app a { color:var(--accent); text-underline-offset:.18em; }
.vb-app .vb-skip { position:fixed; top:-100px; left:1rem; z-index:100; padding:1rem; background:var(--paper); }
.vb-app .vb-skip:focus { top:1rem; }
.vb-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.vb-topbar { position:sticky; top:0; z-index:20; min-height:88px; display:flex; gap:1.2rem; align-items:center; justify-content:space-between; padding:1rem 2rem; background:var(--paper); border-bottom:1px solid var(--rule); }
.vb-brand { display:flex; flex-direction:column; max-width:42rem; }
.vb-eyebrow { font-size:.75rem; font-weight:650; letter-spacing:.1em; color:var(--muted); }
.vb-book-title { font-size:1.1rem; font-weight:650; line-height:1.35; margin-top:.22rem; }
.vb-tools { display:flex; align-items:center; gap:.45rem; flex-shrink:0; }
.vb-tools button { font-size:.875rem; }
.vb-login { max-width:36rem; margin:clamp(2rem,7vh,7rem) auto; padding:1.5rem; }
.vb-login-line { width:3.5rem; height:4px; background:var(--accent); margin:0 0 2rem; }
.vb-login h1 { font-family:Georgia,"Times New Roman",serif; font-size:2.5rem; line-height:1.15; font-weight:500; margin:1rem 0; }
.vb-author { color:var(--muted); }
.vb-login form { display:flex; flex-direction:column; align-items:stretch; margin-top:2rem; }
.vb-login label { margin:.8rem 0 .4rem; font-weight:600; }
.vb-app .vb-primary { background:var(--accent); color:var(--on-accent); border-color:var(--accent); font-weight:650; margin-top:1.3rem; }
.vb-fine { font-size:.875rem; color:var(--muted); margin-top:2rem; }
#login-error { color:var(--ink); min-height:1.5em; }
.vb-layout { display:grid; grid-template-columns:296px minmax(0,1fr); align-items:start; }
.vb-sidebar { position:sticky; top:var(--vb-header-height,89px); height:calc(100dvh - var(--vb-header-height,89px)); overflow-y:auto; overscroll-behavior:contain; background:var(--nav); color:var(--nav-ink); padding:1.5rem 1.1rem; }
.vb-sidebar .vb-eyebrow,.vb-sidebar-footer { color:#b9cdd6; }
.vb-sidebar-top,.vb-search-heading { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.vb-sidebar-top { margin-bottom:1.2rem; }
.vb-search-row { display:flex; gap:.35rem; }
.vb-search-row input { min-width:0; font-size:.875rem; }
.vb-search-row button { font-size:.875rem; padding:.4rem; }
.vb-sidebar nav { margin-top:1.6rem; }
.vb-sidebar details { border-bottom:1px solid #35515d; }
.vb-sidebar summary { cursor:pointer; font-size:.9rem; line-height:1.45; padding:.8rem .3rem; font-weight:600; }
.vb-sidebar summary::marker { color:#80ced5; }
.vb-sidebar a { color:#e0edf2; text-decoration:none; display:block; padding:.5rem .6rem; font-size:.875rem; border-left:2px solid transparent; }
.vb-sidebar a:hover { background:#1b4352; }
.vb-sidebar a[aria-current="page"] { background:#235462; border-left-color:#9febf0; color:#fff; }
.vb-sidebar ul { padding:0 0 .8rem .9rem; margin:0; list-style:none; }
.vb-sidebar-footer { font-size:.8rem; padding:.8rem .5rem 1rem; }
.vb-search-heading p { font-size:.875rem; }
#search-results { list-style:none; padding:0; margin:0; }
#search-results li { border-bottom:1px solid #35515d; padding:.7rem 0; }
#search-results a { font-weight:600; font-size:.875rem; padding:.2rem 0; }
#search-results p { color:#ccdde4; font-size:.875rem; line-height:1.5; margin:.4rem 0; }
.vb-main { min-width:0; }
.vb-reading-bar { position:sticky; top:var(--vb-header-height,89px); z-index:10; background:var(--surface); border-bottom:1px solid var(--rule); display:flex; justify-content:space-between; gap:1rem; padding:.65rem 2.5rem; font-size:.8rem; color:var(--muted); }
#current-chapter { max-width:65%; }
#access-stamp { white-space:nowrap; }
.vb-status { margin:1rem 2.5rem 0; color:var(--muted); }
.vb-status:empty { display:none; }
.vb-content { max-width:900px; padding:2.5rem clamp(1.2rem,4vw,4rem); margin:auto; font:var(--reading)/1.72 Georgia,"Times New Roman",serif; overflow-wrap:break-word; -webkit-user-select:none; user-select:none; }
.vb-content:focus { outline:none; }
.vb-content h1,.vb-content h2,.vb-content h3 { line-height:1.25; color:var(--ink); scroll-margin-top:calc(var(--vb-header-height,89px) + 90px); }
.vb-content h1 { font-size:2.15em; font-weight:500; margin:.8rem 0 2rem; }
.vb-content h2 { font-size:1.55em; font-weight:500; border-top:1px solid var(--rule); padding-top:1.2rem; margin:2.8rem 0 1.2rem; }
.vb-content h3 { font-size:1.15em; margin:2rem 0 1rem; }
.vb-content p { margin:.75em 0; }
.vb-content li { margin:.28em 0; }
.vb-content ul,.vb-content ol { padding-left:1.6em; }
.vb-content [id] { scroll-margin-top:calc(var(--vb-header-height,89px) + 90px); }
.vb-content .vb-lead { font-weight:700; margin-top:1.5em; }
.vb-content .vb-reference { font-size:.9em; padding-left:1.3em; text-indent:-1.3em; line-height:1.5; margin:.7em 0; }
.vb-content .vb-reference a { overflow-wrap:anywhere; }
.vb-content .vb-backheading { font-size:1.25em; border:0; padding-top:0; }
.vb-table-scroll { overflow-x:auto; max-width:100%; border:1px solid var(--rule); margin:1.2rem 0; }
.vb-content table { border-collapse:collapse; font-family:system-ui,-apple-system,"Segoe UI",sans-serif; font-size:.8em; line-height:1.45; width:100%; min-width:35rem; }
.vb-content th,.vb-content td { border:1px solid var(--rule); padding:.6rem .65rem; vertical-align:top; text-align:left; }
.vb-content th { background:var(--surface); font-weight:650; }
.vb-content td p,.vb-content th p { margin:.1em 0; }
.vb-content .vb-caption { font-family:system-ui,sans-serif; font-size:.86em; line-height:1.5; font-weight:600; margin:1.4rem 0 .5rem; }
.vb-content .vb-note { font-family:system-ui,sans-serif; font-size:.8em; line-height:1.5; color:var(--muted); }
.vb-content .vb-watermark { font:500 .72rem/1.4 system-ui,sans-serif; color:var(--muted); border-bottom:1px solid var(--rule); padding:.4rem 0; margin:1.2rem 0; text-align:right; letter-spacing:.02em; }
.vb-content figure { margin:1.8rem 0; }
.vb-content .vb-figure-button { padding:0; width:100%; border:1px solid var(--rule); background:#fff; display:block; }
.vb-content .vb-figure-button img { width:100%; display:block; height:auto; -webkit-user-drag:none; }
.vb-content figcaption { font: .8em/1.5 system-ui,sans-serif; margin-top:.6rem; }
.vb-content .vb-figure-hint { display:block; font-size:.875rem; color:var(--muted); margin-top:.3rem; }
.vb-chapter-nav { max-width:900px; margin:0 auto; padding:1rem clamp(1.2rem,4vw,4rem) 2rem; display:flex; justify-content:space-between; gap:1rem; }
.vb-reading-footer { border-top:1px solid var(--rule); padding:1.5rem 2.5rem; color:var(--muted); font-size:.8rem; }
.vb-figure-dialog { max-width:min(96vw,1400px); max-height:94dvh; padding:1rem; border:1px solid var(--rule); border-radius:8px; background:var(--paper); color:var(--ink); -webkit-user-select:none; user-select:none; }
.vb-figure-dialog::backdrop { background:#00101bc9; }
.vb-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.vb-dialog-head h2 { font-size:1rem; max-width:90%; }
.vb-figure-dialog img { width:100%; min-width:260px; height:auto; display:block; background:white; }
.vb-figure-stamp { font-size:.75rem; text-align:right; color:var(--muted); }
.vb-app #menu-close { display:none; }
.vb-print-message { display:none; }
@media(max-width:1050px) { .vb-topbar { padding:.8rem 1.2rem; } .vb-book-title { font-size:.95rem; } .vb-layout { grid-template-columns:255px minmax(0,1fr); } .vb-tools { gap:.25rem; } .vb-tools button { padding:.45rem .55rem; } .vb-content { padding:2rem 1.7rem; } .vb-reading-bar { padding:.6rem 1.7rem; } }
@media(max-width:760px) { .vb-topbar { flex-wrap:wrap; min-height:105px; gap:.5rem; } .vb-brand { flex:1; } .vb-brand .vb-eyebrow { font-size:.65rem; } .vb-tools { width:100%; justify-content:flex-end; } .vb-layout { display:block; } .vb-sidebar { display:none; position:fixed; top:0; bottom:0; left:0; z-index:40; width:min(88vw,340px); height:100dvh; box-shadow:8px 0 30px #001c3d66; } .vb-app.vb-menu-open .vb-sidebar { display:block; } .vb-app #menu-close { display:block; } .vb-reading-bar { padding:.5rem 1rem; font-size:.7rem; } .vb-content { padding:1.4rem 1.2rem; } .vb-content h1 { font-size:1.8em; } .vb-content h2 { font-size:1.35em; } .vb-content h1,.vb-content h2,.vb-content h3,.vb-content [id] { scroll-margin-top:calc(var(--vb-header-height,136px) + 90px); } .vb-reading-footer { padding:1.2rem; } .vb-chapter-nav { padding:1rem 1.2rem 2rem; } .vb-chapter-nav button { font-size:.875rem; } .vb-login h1 { font-size:2.1rem; } .vb-login { margin:2rem auto; } }
@media(prefers-reduced-motion:no-preference) { .vb-app button { transition:background .15s ease; } }
@media print { html,body { background:white !important; color:black !important; } #vet-reader { display:none !important; } .vb-print-message { display:block !important; margin:2cm; color:black; font:12pt/1.5 Georgia,serif; } }

@media(min-width:761px) { .vb-app #menu-toggle { display:none; } }

.vb-figure-tools { display:flex; gap:1rem; align-items:center; margin:.5rem 0; }
.vb-figure-dialog #figure-large { overflow:auto; max-height:65dvh; }
.vb-figure-dialog #figure-large img { max-width:none; }

/* Library and administration share the reader's colour and typography tokens. */
.vb-topbar { flex-wrap:wrap; gap:.7rem; }
.vb-brand { margin-right:auto; }
.vb-app textarea,.vb-app select { color:var(--ink); background:var(--paper); font:inherit; border:1px solid var(--rule); border-radius:5px; padding:.7rem; max-width:100%; }
.portal-page { max-width:1200px; margin:auto; padding:clamp(1.2rem,4vw,3rem); min-height:65vh; }
.portal-page h1 { font:500 clamp(2rem,4vw,3rem)/1.15 Georgia,serif; margin:.35rem 0 1rem; }
.portal-page h2 { font-size:1.4rem; }
.portal-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem; margin-bottom:2rem; }
.portal-heading p { color:var(--muted); margin:.4rem 0; }
.portal-tabs,.portal-actions { display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; }
.portal-tabs { margin:1.3rem 0; }
.portal-tabs button[aria-pressed="true"] { background:var(--nav); color:var(--nav-ink); border-color:var(--nav); }
.portal-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr)); gap:1.5rem; }
.portal-book { border:1px solid var(--rule); border-top:5px solid var(--accent); padding:1.6rem; border-radius:6px; display:flex; flex-direction:column; gap:.8rem; background:var(--paper); }
.portal-book h2 { font:500 1.65rem/1.25 Georgia,serif; margin:.2rem 0; }
.portal-book p { margin:0; white-space:pre-line; overflow-wrap:anywhere; }
.portal-book .portal-actions { margin-top:auto; padding-top:1rem; }
.portal-book .portal-author,.portal-hint { color:var(--muted); font-size:.9rem; }
.portal-badge { display:inline-block; padding:.25rem .65rem; border:1px solid var(--rule); border-radius:30px; font-size:.875rem; align-self:flex-start; }
.portal-badge.available { border-color:var(--accent); color:var(--accent); }
.portal-price { font-size:1.25rem; font-weight:700; }
.portal-app-link { display:inline-block; border:1px solid var(--rule); border-radius:5px; padding:.6rem .85rem; text-decoration:none; }
.portal-contact { border-top:1px solid var(--rule); padding:1.5rem 2rem; display:flex; flex-wrap:wrap; justify-content:center; gap:.7rem 1.5rem; font-size:.9rem; }
.portal-empty { padding:2rem; border:1px dashed var(--rule); border-radius:6px; color:var(--muted); }
.portal-status { position:sticky; bottom:1rem; z-index:25; margin:1rem auto; max-width:700px; padding:1rem; background:var(--nav); color:var(--nav-ink); border-radius:6px; box-shadow:0 3px 15px #0003; }
.portal-form { display:grid; gap:.7rem; }
.portal-form label { font-weight:600; }
.portal-form input,.portal-form textarea,.portal-form select { width:100%; }
.portal-form input[type="checkbox"] { width:auto; }
.portal-form .vb-primary,.portal-actions .vb-primary { margin-top:0; }
#change-password .vb-primary:hover { background:var(--accent); color:var(--on-accent); }
#forgot-password-form .vb-primary:hover,#password-reset-form .vb-primary:hover,#email-settings-form .vb-primary:hover { background:var(--accent); color:var(--on-accent); }
.vb-app .portal-text-button { padding:.35rem 0; border:0; color:var(--accent); background:transparent; text-decoration:underline; text-underline-offset:.2em; justify-self:start; align-self:flex-start; }
.vb-app .portal-text-button:hover { color:var(--ink); background:transparent; }
#email-test-recipient,#email-delivery-status,#email-delivery-error,#email-action-error { overflow-wrap:anywhere; }
.portal-columns { display:grid; grid-template-columns:minmax(220px,1fr) minmax(0,2fr); gap:2rem; }
.portal-panel { padding:1.5rem; border:1px solid var(--rule); border-radius:6px; margin:1rem 0; }
.portal-panel h2 { margin-top:0; }
.portal-editor { min-height:360px; max-height:65vh; overflow:auto; padding:1.5rem; border:1px solid var(--rule); border-radius:5px; font:1.1rem/1.7 Georgia,serif; background:var(--paper); }
.portal-editor table { border-collapse:collapse; width:100%; }
.portal-editor td,.portal-editor th { border:1px solid var(--rule); padding:.5rem; }
.portal-editor img { max-width:100%; height:auto; }
.portal-editor:focus { outline:2px solid var(--accent); }
.portal-toolbar { display:flex; flex-wrap:wrap; gap:.3rem; margin:.7rem 0; }
.portal-table-wrap { overflow-x:auto; }
.portal-table { width:100%; border-collapse:collapse; font-size:.95rem; }
.portal-table th,.portal-table td { text-align:left; padding:1rem .7rem; border-bottom:1px solid var(--rule); vertical-align:top; }
.portal-table th { background:var(--surface); }
.portal-table td { overflow-wrap:anywhere; }
.portal-dialog { width:min(94vw,620px); max-height:90dvh; overflow:auto; color:var(--ink); background:var(--paper); border:1px solid var(--rule); border-radius:10px; padding:1.7rem; }
.portal-dialog::backdrop { background:#00101bb0; }
.portal-dialog h2 { font:500 1.8rem/1.2 Georgia,serif; }
.portal-dialog #portal-dialog-close { margin-top:1rem; }
.portal-dialog .portal-author { color:var(--muted); margin-top:.5rem; }
#book-preview h2,#book-preview .portal-author { overflow-wrap:anywhere; }
.portal-preview-head { display:flex; align-items:center; justify-content:space-between; gap:.7rem; flex-wrap:wrap; }
.portal-preview-text { margin:1.4rem 0; padding:1rem 0; border-top:1px solid var(--rule); border-bottom:1px solid var(--rule); white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.85; }
.portal-preview-actions { margin-top:1.25rem; padding-top:1rem; border-top:1px solid var(--rule); }
.portal-preview-settings { min-width:0; margin:.7rem 0; padding:1rem; border:1px solid var(--rule); border-radius:5px; display:grid; gap:.7rem; }
.portal-preview-settings legend { padding:0 .35rem; font-weight:600; }
.portal-preview-settings p { margin:0; }
.portal-waiting { border-left:4px solid #c17d15; }
.portal-page .danger,.portal-dialog .danger { color:#b33725; }
html[data-theme="dark"] .portal-page .danger,html[data-theme="dark"] .portal-dialog .danger { color:#ff9b8b; }
.portal-note { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:760px) { .portal-columns { grid-template-columns:1fr; } .portal-heading { margin-bottom:1rem; } .portal-panel { padding:1rem; } .portal-contact { padding:1.5rem 1rem; flex-direction:column; align-items:center; } #library-nav { justify-content:flex-start; width:auto; } .portal-editor { padding:1rem; } }
.vb-content img { max-width:100%; height:auto; cursor:zoom-in; }
.portal-page .portal-form .portal-actions { margin-top:.7rem; }
.portal-source-preview { margin-top:1.2rem; border:1px solid var(--rule); padding:1rem; border-radius:5px; }
.portal-source-preview img { width:100%; height:auto; background:white; }
.portal-source-preview summary,.vb-pdf-original summary { cursor:pointer; font:600 1rem/1.5 system-ui,sans-serif; padding:.7rem 0; }
.portal-storage-path { display:block; overflow-wrap:anywhere; white-space:normal; padding:.8rem; background:var(--surface); }
.vb-pdf-original { border-top:1px solid var(--rule); margin-top:2rem; }

/* Viešas katalogas ir knygos pristatymas. */
.portal-guest-nav { flex-wrap:wrap; }
.portal-guest-nav a { font-size:.875rem; padding:.5rem .7rem; }
.portal-book h2 a { color:inherit; text-decoration:none; overflow-wrap:anywhere; }
.portal-book h2 a:hover { text-decoration:underline; text-underline-offset:.15em; }
.portal-public-detail { max-width:840px; margin:auto; }
.portal-public-detail h1 { overflow-wrap:anywhere; }
.portal-public-detail > .vb-eyebrow { margin-top:2rem; }
.portal-public-detail > .portal-author { color:var(--muted); font-size:1.1rem; }
.portal-public-description { white-space:pre-line; overflow-wrap:anywhere; line-height:1.8; margin:1.5rem 0; }
.portal-public-purchase { margin:2rem 0; padding:1.4rem; border:1px solid var(--rule); border-radius:6px; background:var(--surface); }
.portal-public-purchase .portal-price { margin:0 0 1rem; }
.portal-public-purchase .portal-hint { margin-bottom:0; }
.portal-public-excerpt { margin-top:2.5rem; }
#public-view .vb-primary:hover { background:var(--accent); color:var(--on-accent); }
#auth-book-intent { padding:1rem; margin:1.2rem 0; border-left:3px solid var(--accent); background:var(--surface); overflow-wrap:anywhere; }
#auth-book-message { margin:0 0 .6rem; }
@media(max-width:760px) { .portal-guest-nav { justify-content:flex-start; } .portal-public-purchase { padding:1rem; } }

#register-privacy-notice { font-size:.875rem; line-height:1.6; margin:1.1rem 0 0; }
#account-privacy p { overflow-wrap:anywhere; }
.portal-contact [data-privacy-settings] { font-size:.875rem; padding:.4rem .65rem; }
