/*!
 * BENKO CHESS COPYRIGHT NOTICE
 * © 2023–2026 Petar Benković / Benko Chess. All rights reserved.
 * This notice applies to original Benko Chess code in this file.
 * Third-party components retain their respective licences and notices.
 */
:root{--ink:#08245c;--gold:#d99a23;--paper:#fffaf0}body{margin:0;background:#f5eddf;color:var(--ink);font-family:Arial,Helvetica,sans-serif}.library-shell{width:min(1180px,calc(100% - 32px));margin:42px auto}.library-shell h1{font-family:Georgia,serif;font-size:clamp(32px,5vw,56px);margin-bottom:12px}.library-shell .eyebrow{color:#88601b;letter-spacing:2px;font-size:12px;font-weight:bold}.library-intro{max-width:720px;line-height:1.65}.library-toolbar{display:flex;gap:14px;align-items:end;flex-wrap:wrap;margin:30px 0}label{display:grid;gap:6px;font-size:14px;font-weight:bold}input,select,textarea,button{font:inherit;padding:12px;border:1px solid #c8c2b7;border-radius:8px;box-sizing:border-box}button{background:var(--ink);color:white;cursor:pointer}button:disabled{opacity:.55;cursor:default}.secondary{background:white;color:var(--ink)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--gold);outline-offset:3px}#status{min-height:26px;line-height:1.5}#books{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:22px;margin:24px 0}.book-card{background:#fffdf9;padding:20px;border:1px solid #e3d4b9;border-radius:14px;display:flex;flex-direction:column;gap:12px;box-shadow:0 8px 24px #08245c08}.book-card h2,.book-card p{margin:0;overflow-wrap:anywhere}.book-card p{line-height:1.5;color:#4f5867}.book-card small{margin-top:auto;color:#576171}.book-cover{height:250px;background:linear-gradient(135deg,#173765,#08245c);display:grid;place-items:center;font:100px Georgia;color:#e6bd6c;border-radius:6px;overflow:hidden}.book-cover img{width:100%;height:100%;object-fit:contain}.badge{font-size:12px;color:#705016}.admin-card{padding:24px;background:white;border:1px solid #e3d4b9;border-radius:14px;margin:35px 0}#book-form{display:grid;grid-template-columns:1fr 1fr;gap:18px}#book-form .wide{grid-column:1/-1}textarea{min-height:100px;width:100%}#book-form input{width:100%}dialog{border:0;padding:0;background:#172333;color:white;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0}dialog::backdrop{background:#07152b}.reader-top,.reader-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:12px 20px;background:#08245c}.reader-top h2{font-size:18px;margin:0;flex:1}.reader-controls input[type=number]{width:80px}.reader-controls label{display:flex;align-items:center;font-size:13px}.reader-controls button{border-color:#9ba9bd}.reader-controls input[type=range]{max-width:140px}.reader-scroll{height:calc(100% - 180px);overflow:auto;display:flex;align-items:start;justify-content:start;padding:16px;box-sizing:border-box}#pages{display:flex;gap:3px;width:100%;min-width:100%;margin:auto;justify-content:center;align-items:start;transform-origin:center}#pages img{width:calc(50% - 2px);height:auto;box-shadow:0 5px 20px #0008;object-fit:contain}#pages img:only-child{width:min(100%,760px)}#reader-status{padding:0 20px}#pages.turn{animation:page-turn .3s ease-out}@keyframes page-turn{from{opacity:.3;transform:perspective(1200px) rotateY(-5deg)}to{opacity:1;transform:none}}[hidden]{display:none!important}@media(max-width:849px){#pages img{width:100%}.reader-scroll{height:calc(100% - 235px)}#spread-label{display:none}}@media(max-width:600px){#book-form{grid-template-columns:1fr}.library-shell{margin-top:24px}.reader-top,.reader-controls{padding:10px;gap:8px}.reader-controls button{padding:9px}}@media(prefers-reduced-motion:reduce){#pages.turn{animation:none}}

body .reader-top h2{color:#fff}

body .reader-top h2{color:#fff!important}

html:root body #reader #reader-title{color:#fff!important}

/* Follow the shared Benko Chess hero, content width and footer template. */
body .library-hero{padding:32px 36px;margin-bottom:28px}
body .library-hero .bc-hero-badge-standard{display:inline-flex;margin-bottom:12px}
body .library-hero h1{font-family:Arial,Helvetica,sans-serif;margin:0 0 14px}
body .library-hero p{max-width:900px;margin:0}
.library-hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.library-hero-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:11px 20px;border-radius:999px;font-weight:800;text-decoration:none}
.library-hero-actions .library-login-link{background:#f2dfbd;color:#08245c;border:1px solid #f2dfbd}
.library-hero-actions .library-browse-link{color:#fff;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.4)}
body .library-shell{margin-top:0;margin-bottom:32px;min-height:220px}
.library-catalogue{padding:28px;background:#fffdf8;border:1px solid #ead8b8;border-radius:22px;box-shadow:0 12px 30px rgba(69,43,12,.08);scroll-margin-top:100px}
.library-catalogue>h2{margin:0 0 8px;font-size:24px}
.library-catalogue .library-toolbar{margin:22px 0}

@media(max-width:560px){body .library-hero{padding:26px 22px;margin-bottom:20px}.library-catalogue{padding:20px 16px}.library-hero-actions a{width:100%}}

.library-hero-actions{justify-content:flex-start}

/* Match the left-aligned hero used by the original site pages. */
html:root body .library-hero.bc-hero-standard{text-align:left!important}
html:root body .library-hero.bc-hero-standard h1,
html:root body .library-hero.bc-hero-standard p{margin-left:0!important;margin-right:0!important;text-align:left!important}
html:root body .library-hero .library-hero-actions{justify-content:flex-start!important}

/* Hero copy on the left; a centered vertical action group on the right. */
html:root body .library-hero.bc-hero-standard{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,32%);gap:36px;align-items:center}
.library-hero-copy{min-width:0}
html:root body .library-hero .library-hero-actions{flex-direction:column;align-items:stretch;justify-content:center!important;justify-self:center;width:100%;max-width:280px;margin:0;gap:12px}
.library-hero-actions a{width:100%;text-align:center}
@media(max-width:760px){html:root body .library-hero.bc-hero-standard{grid-template-columns:minmax(0,1fr);gap:24px}html:root body .library-hero .library-hero-actions{max-width:340px}}

/* Availability labels must remain readable outside the dark site hero. */
body .library-catalogue .book-card .badge{align-self:flex-start;padding:4px 8px;border-radius:6px;background:#fff2cf!important;border:1px solid #d4b46b!important;color:#08245c!important;font-weight:700}

