/* IKRAM Book Portal — colours and type from the IKRAM coffee table books */
:root {
  --navy: #0A3A66; --navy-2: #0F4C85; --green: #128045; --forest: #0B5A35; --leaf: #6DBE45;
  --ink: #13221B; --grey: #5D6B65; --mist: #F1F5F2; --line: #DCE4DF; --stage: #0D1612; --warn: #C8462E;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Barlow', 'Helvetica Neue', Arial, sans-serif; color: var(--ink); line-height: 1.5; background: var(--mist); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding: 96px 0 60px; }

/* nav */
.nav { position: fixed; z-index: 50; top: 12px; left: 50%; transform: translateX(-50%); width: min(760px, calc(100% - 24px)); display: flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 16px; border-radius: 20px; background: rgba(255,255,255,.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 10px 30px -14px rgba(0,0,0,.3); }
.nav-brand img { height: 20px; display: block; }
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-links a, .nav-links span { font-size: 14px; font-weight: 700; padding: 7px 12px; border-radius: 12px; text-decoration: none; color: var(--grey); }
.nav-links a.on { background: var(--mist); color: var(--navy); }
.nav-links .soon { opacity: .45; cursor: default; }
.nav-me { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--grey); }
.nav-me button { border: 0; background: var(--mist); font: 700 13px 'Barlow'; color: var(--navy); padding: 7px 12px; border-radius: 12px; cursor: pointer; }
@media (max-width: 640px) { .nav-me span { display: none; } }
.flash { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 40; padding: 10px 16px; border-radius: 12px; font-weight: 600; background: var(--navy); color: #fff; }
.flash--error { background: var(--warn); }

/* page */
.ph { margin-bottom: 22px; }
.kick { font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.ph h1 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; color: var(--navy); line-height: 1.05; letter-spacing: -.015em; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stats div { background: #fff; border-radius: 16px; padding: 14px 16px; }
.stats b { display: block; font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stats span { font-size: 13px; color: var(--grey); } .stats .w b { color: var(--warn); }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }
.empty { background: #fff; border: 2px dashed #C7D5CC; border-radius: 18px; padding: 40px 24px; text-align: center; color: var(--grey); }
.empty b { display: block; color: var(--navy); font-size: 20px; margin-bottom: 6px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.cov { position: relative; aspect-ratio: 6 / 5;   /* IKRAM coffee table books are landscape 10.2 × 8.5 in */ border-radius: 6px 14px 14px 6px; background-size: cover; background-position: center; overflow: hidden; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; border-left: 5px solid rgba(0,0,0,.28); box-shadow: 0 16px 30px -18px rgba(0,0,0,.55); }
.cov::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(8,26,44,.9)); }
.cov > * { position: relative; } .cov b { font-size: 18px; line-height: 1.1; } .cov small { font-size: 12px; opacity: .85; }
.cov .st { position: absolute; top: 10px; right: 10px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.92); color: var(--forest); padding: 3px 8px; border-radius: 8px; }
.cov.blank { background: linear-gradient(150deg, var(--navy-2), var(--navy)); }
.foot { text-align: center; color: var(--grey); font-size: 13px; padding: 30px 0 40px; }

/* login / error */
.solo { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(120deg, var(--navy) 0%, #0C4A5A 60%, var(--forest) 100%); }
#dots { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }   /* always behind, never catches clicks */
.solo-card { position: relative; z-index: 1; width: min(400px, 100%); background: #fff; border-radius: 22px; padding: 30px; box-shadow: 0 40px 90px -40px rgba(0,0,0,.6); }
.solo-logo { height: 26px; display: block; margin-bottom: 22px; }
.solo-card h1 { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.solo-card p { color: var(--grey); margin: 6px 0 18px; }
.err { color: var(--warn) !important; font-weight: 600; }
.f { display: block; margin-bottom: 14px; } .f span { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.f input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; }
.f input:focus { outline: none; border-color: var(--green); }
.btn { display: inline-flex; justify-content: center; width: 100%; border: 0; background: var(--green); color: #fff; font: 800 16px 'Barlow'; padding: 13px 18px; border-radius: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--forest); }

/* nav: my account link */
.nav-me .me-link { font-weight: 700; color: var(--navy); text-decoration: none; padding: 7px 10px; border-radius: 12px; }
.nav-me .me-link.on { background: var(--mist); }
@media (max-width: 640px) { .nav-me .me-link { display: none; } .nav-links a, .nav-links span { padding: 7px 8px; } }

/* cards, rows, forms (staff area) */
.lead { color: var(--grey); font-size: 17px; margin-top: 6px; max-width: 640px; }
.muted { color: var(--grey); font-size: 15px; margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: #fff; border-radius: 18px; padding: 22px; }
.card h2 { font-size: 20px; color: var(--navy); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.newlink { margin-bottom: 18px; border: 2px solid var(--green); }
.newlink b { color: var(--forest); font-size: 17px; } .newlink p { color: var(--grey); margin: 4px 0 12px; }
.copyrow { display: flex; gap: 8px; } .copyrow input { flex: 1; min-width: 0; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; font: 600 14px 'JetBrains Mono', monospace; color: var(--forest); background: #F4FAF6; }
.rows { display: grid; } .row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; } .row.off { opacity: .6; }
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); }
.row-meta { display: block; font-size: 13.5px; color: var(--grey); margin-top: 2px; }
.chip { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--mist); color: var(--grey); padding: 2px 8px; border-radius: 8px; }
.chip--owner { background: var(--navy); color: #fff; } .chip--admin { background: #E3EDF7; color: var(--navy-2); } .chip--staff { background: #EAF5EE; color: var(--forest); }
.chip--off { background: #FBF1EE; color: var(--warn); } .chip--wait { background: #FFF5E0; color: #8A5408; } .chip--on { background: #EAF5EE; color: var(--forest); }
.row-acts { flex: none; text-align: right; } .row-acts summary { cursor: pointer; font-weight: 700; color: var(--navy-2); font-size: 14px; list-style: none; }
.row-acts summary::-webkit-details-marker { display: none; }
.row-acts[open] { display: grid; gap: 6px; justify-items: end; } .row-acts form.inline { display: flex; gap: 6px; }
.you { font-size: 13px; color: var(--grey); }
.form .f select, .f select, .row-acts select { padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.f select { width: 100%; padding: 12px 14px; font-size: 16px; }
.f i { font-style: normal; font-weight: 500; color: var(--grey); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; margin-bottom: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.btn--sm { width: auto; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn--ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); width: auto; } .btn--ghost:hover { background: var(--mist); }
.card .btn:not(.btn--sm):not(.btn--ghost) { width: auto; }
.textbtn { border: 0; background: none; font: 700 14px 'Barlow'; color: var(--navy-2); cursor: pointer; padding: 4px 0; }
.textbtn--danger { color: var(--warn); }
.roles { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--grey); display: grid; gap: 6px; }
.roles b { color: var(--navy); }
.qrbox { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin: 4px 0 16px; }
.qrbox img { border: 1px solid var(--line); border-radius: 12px; }
.qrbox code { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--navy); background: var(--mist); padding: 8px 10px; border-radius: 10px; word-break: break-all; max-width: 220px; }
.steps2 { padding-left: 18px; color: var(--grey); margin-bottom: 10px; }
.code-in { font: 600 22px 'JetBrains Mono', monospace !important; letter-spacing: .3em; }
.savebar { margin-top: 18px; } .savebar .btn { width: auto; padding: 13px 26px; }
.err { color: var(--warn); font-weight: 600; margin-bottom: 10px; }
.okmsg { color: var(--forest) !important; font-weight: 600; background: #EAF5EE; padding: 8px 12px; border-radius: 10px; }
.hint { font-size: 13px; margin: 14px 0 0 !important; }

/* library */
.ph-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.btn--auto { width: auto !important; padding: 12px 20px; }
.kick a { text-decoration: none; } .kick a:hover { text-decoration: underline; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.search { flex: 1; min-width: 220px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; background: #fff; }
.search:focus { outline: none; border-color: var(--green); }
.tools select { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; background: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { border: 1px solid var(--line); background: #fff; font: 600 14px 'Barlow'; color: var(--navy); padding: 8px 14px; border-radius: 20px; cursor: pointer; }
.chip-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
a.cov { text-decoration: none; transition: transform .25s, box-shadow .25s; } a.cov:hover { transform: translateY(-4px); box-shadow: 0 26px 40px -20px rgba(0,0,0,.6); }
.cov em { position: relative; font-style: normal; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: auto; padding-top: 30px; }
.cov.blank::before { background: radial-gradient(circle at 80% 15%, rgba(109,190,69,.35) 1.2px, transparent 1.8px) 0 0 / 11px 11px; -webkit-mask-image: linear-gradient(160deg, #000, transparent 70%); mask-image: linear-gradient(160deg, #000, transparent 70%); }
.st--draft { color: #8A5408 !important; } .st--archived { color: var(--grey) !important; }
.none { color: var(--grey); text-align: center; padding: 30px 0; }
.narrow { max-width: 720px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (max-width: 600px) { .form-2 { grid-template-columns: 1fr; } }
.f textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; resize: vertical; }
.f textarea:focus { outline: none; border-color: var(--green); }

/* book page */
.book-top { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
@media (max-width: 700px) { .book-top { grid-template-columns: 1fr; } .cov.big { max-width: 240px; } }
.book-info h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; color: var(--navy); line-height: 1.05; letter-spacing: -.015em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 16px 0; font-size: 15px; }
.kv span { color: var(--grey); } .kv b { font-weight: 600; }
.desc { color: #2E3D36; margin-bottom: 16px; max-width: 620px; }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.status-form { display: flex; gap: 8px; align-items: center; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.small { font-size: 13.5px; margin-top: 10px; }
.row.cur { background: #F4FAF6; margin: 0 -12px; padding: 13px 12px; border-radius: 12px; }
.row-side { display: flex; gap: 10px; align-items: center; flex: none; }
.notes { margin: 6px 0 0 18px; color: #2E3D36; font-size: 14px; }
.mini-edit { margin-top: 6px; } .mini-edit summary { list-style: none; font-size: 13px; } .mini-edit summary::-webkit-details-marker { display: none; }
.drop { display: flex; gap: 12px; align-items: center; border: 2px dashed #C7D5CC; border-radius: 14px; padding: 16px; cursor: pointer; margin-bottom: 14px; background: #FAFCFB; }
.drop:hover { border-color: var(--green); } .drop input { max-width: 110px; font-size: 13px; }
.drop b { display: block; color: var(--navy); } .drop small { color: var(--grey); font-size: 13px; }
.bar { position: relative; height: 34px; margin-top: 12px; background: var(--mist); border-radius: 10px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--green), var(--leaf)); transition: width .2s; }
.bar span { position: relative; display: block; line-height: 34px; padding: 0 12px; font-weight: 700; font-size: 14px; color: var(--ink); }

/* clients */
.row--link { text-decoration: none; color: inherit; align-items: center; justify-content: flex-start; border-radius: 12px; }
.row--link:hover { background: var(--mist); margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
.row--link .row-main { flex: 1; min-width: 0; }
.row-count { flex: none; font-size: 13.5px; color: var(--grey); } .row-count b { color: var(--navy); }
.logo-sm { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--mist); display: grid; place-items: center; font-weight: 800; color: var(--navy); font-size: 14px; overflow: hidden; }
.logo-sm img { max-width: 40px; max-height: 40px; object-fit: contain; }
.client-top { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.logo-lg { width: 120px; height: 120px; border-radius: 22px; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: 0 14px 30px -20px rgba(10,58,102,.5); }
.logo-lg img { max-width: 100px; max-height: 100px; object-fit: contain; } .logo-lg span { font-size: 36px; font-weight: 900; color: var(--navy); }
.h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; color: var(--navy); line-height: 1.05; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.shelf--sm { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; } .shelf--sm .cov b { font-size: 15px; }
.empty--in { border: 0; padding: 20px 0; }
.pre { white-space: pre-wrap; color: #2E3D36; }

/* links */
.h2-row { justify-content: space-between; }
.tabs2 { gap: 8px; } .tabs2 a { text-decoration: none; } .tabs2 a span { opacity: .6; margin-left: 4px; }
.st-active { background: #EAF5EE !important; color: var(--forest) !important; } .st-soon { background: #FFF5E0 !important; color: #8A5408 !important; }
.st-expired, .st-off, .st-used { background: #FBF1EE !important; color: var(--warn) !important; }
.pick { display: grid; gap: 2px; max-height: 240px; overflow: auto; border: 1.5px solid var(--line); border-radius: 12px; padding: 6px; }
.pick-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.pick-row:hover { background: var(--mist); } .pick-row input { width: 18px; height: 18px; accent-color: var(--green); }
.chips label.chip-btn { user-select: none; }
.prefix { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.prefix em { font-style: normal; font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--grey); padding: 0 4px 0 12px; }
.prefix input { border: 0 !important; padding-left: 2px !important; }
.f input[type="date"], .form input[type="date"] { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; }
code.pw { font: 700 16px 'JetBrains Mono', monospace; background: #fff; border: 1px solid #CBE6D4; padding: 3px 8px; border-radius: 8px; color: var(--forest); }
.qr-card { text-align: center; } .qr-card img { display: block; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: 12px; } .qr-card .btnrow { justify-content: center; }
.big-n { font-size: 28px; color: var(--navy); }
.n-in { width: 80px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; }
.btn--danger { background: var(--warn); } .btn--danger:hover { background: #A63823; }
.check i.muted { font-style: normal; font-size: 13px; margin: 0; }

/* stats & activity */
.top3 { color: var(--grey); margin: -6px 0 18px; font-size: 15px; } .top3 a { font-weight: 700; color: var(--navy); } .top3 span { color: var(--grey); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.mini-stats div { background: var(--mist); border-radius: 12px; padding: 10px 12px; } .mini-stats b { display: block; font-size: 20px; color: var(--navy); } .mini-stats span { font-size: 12.5px; color: var(--grey); }
.vt { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; } .vt th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--grey); padding: 6px 4px; border-bottom: 1.5px solid var(--line); }
.vt td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.act .row-title { font-weight: 500; } .act a { color: var(--navy-2); font-weight: 600; } .act-l { color: #2E3D36; }
.act--warn .act-l { color: var(--warn); }
.act { border-left: 3px solid transparent; padding-left: 10px; } .act--link { border-left-color: var(--leaf); } .act--book { border-left-color: var(--navy-2); } .act--client { border-left-color: #C77A12; } .act--user { border-left-color: var(--grey); }
.hint-code { font: 600 12px 'JetBrains Mono', monospace; background: var(--mist); padding: 1px 6px; border-radius: 6px; color: var(--grey); }

/* book page (calm layout: header + tabs) */
.back { display: inline-block; font-weight: 700; color: var(--grey); text-decoration: none; font-size: 14px; margin-bottom: 14px; } .back:hover { color: var(--navy); }
.bk-head { display: grid; grid-template-columns: 320px 1fr; gap: 30px; align-items: center; margin-bottom: 26px; }
@media (max-width: 680px) { .bk-head { grid-template-columns: 1fr; gap: 18px; } .bk-cov { max-width: 320px; } }
.bk-cov { position: relative; justify-content: center; align-items: center; }
.bk-cov em { margin: 0 !important; padding: 0 !important; position: relative; }
.cov-change { position: absolute; inset: auto 10px 10px 10px; z-index: 2; }
.cov-change label { display: block; text-align: center; background: rgba(255,255,255,.92); color: var(--navy); font-weight: 700; font-size: 13px; padding: 7px; border-radius: 10px; cursor: pointer; opacity: 0; transition: opacity .2s; }
.bk-cov:hover .cov-change label, .cov-change label:focus-within, .bk-cov.blank .cov-change label { opacity: 1; }
.cov-change .bar { margin-top: 6px; height: 26px; } .cov-change .bar span { line-height: 26px; font-size: 12px; }
.pill { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border-radius: 20px; }
.pill--published { background: #EAF5EE; color: var(--forest); } .pill--draft { background: #FFF5E0; color: #8A5408; } .pill--archived { background: #ECEFEE; color: var(--grey); }
.bk-main h1 { font-size: clamp(32px, 4.8vw, 52px); font-weight: 800; color: var(--navy); line-height: 1.02; letter-spacing: -.02em; margin: 10px 0 6px; }
.bk-meta { color: var(--grey); font-size: 17px; }
.bk-reads { color: var(--ink); font-weight: 600; margin-top: 10px; font-size: 15px; }
.bk-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; } .bk-acts form { display: contents; }
.bk-main .hint { color: var(--grey); font-size: 14px; margin-top: 10px; }
.tabs3 { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 18px; gap: 4px; padding: 5px; background: #fff; border-radius: 999px; box-shadow: 0 10px 26px -18px rgba(10,58,102,.45); overflow-x: auto; }
.tabs3 button { border: 0; background: none; font: 700 15px 'Barlow'; color: var(--grey); padding: 10px 22px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.tabs3 button:hover { color: var(--navy); background: var(--mist, #F1F5F2); }
.tabs3 button.on { color: #fff; background: var(--navy); } .tabs3 button span { font-weight: 600; opacity: .6; margin-left: 4px; }
.add-v > summary { list-style: none; display: inline-flex; width: auto; } .add-v > summary::-webkit-details-marker { display: none; }
.add-v[open] > summary { margin-bottom: 14px; } .add-v { margin-bottom: 8px; }
.more-opts { margin: 0 0 12px; } .more-opts summary { cursor: pointer; font-weight: 700; color: var(--navy-2); font-size: 14px; margin-bottom: 10px; }
.vrow .row-title { font-size: 16px; } .vnotes { color: #2E3D36; font-size: 14px; margin-top: 4px; }
.danger-zone { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-zone form { display: flex; gap: 14px; }
.cov-auto { margin-top: 10px; font-size: 13px; text-align: center; } .cov-auto .textbtn { font-size: 13px; }
/* a book card: the cover (already carries its title) clean, the words under it */
.bcard { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); }
.bcard .cov { margin-bottom: 9px; transition: transform .25s, box-shadow .25s; } .bcard:hover .cov { transform: translateY(-3px); box-shadow: 0 22px 36px -18px rgba(0,0,0,.55); }
.bcard > b { font-size: 16px; color: var(--navy); line-height: 1.2; } .bcard > small { font-size: 13px; color: var(--grey); }
.cov.img::before { display: none; }
.shelf--sm .bcard > b { font-size: 14.5px; }

/* ============ PAGE TRANSITIONS (browser-native, cross-document — same as akm.systems) ============
 * One continuous surface: the nav stays put, the page glides the way you travel
 * (deeper = left, back up = right, same page after a save = soft fade), and a book's cover flies
 * from its Library card into the book page and back. The direction is set in partials/head.ejs.
 */
@view-transition { navigation: auto; }
.nav { view-transition-name: site-nav; }
.wrap { view-transition-name: page-body; }
.solo-card { view-transition-name: solo-card; }

::view-transition-group(*) { animation-duration: .7s; animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
::view-transition-old(site-nav) { animation: none; opacity: 0; }
::view-transition-new(site-nav) { animation: none; }

::view-transition-old(page-body) { animation: .3s cubic-bezier(.65, 0, .35, 1) both vt-out-up; }
::view-transition-new(page-body) { animation: .6s .1s cubic-bezier(.22, .8, .24, 1) both vt-in-up; }
::view-transition-old(root) { animation: .25s ease both vt-fade-out; }
::view-transition-new(root) { animation: .4s .08s ease both vt-fade-in; }

/* a cover is one picture moving between pages (the group morphs; old/new cross-fade inside it) */
::view-transition-old(*.cover), ::view-transition-new(*.cover) { height: 100%; object-fit: cover; }
::view-transition-old(*.cover) { animation: .35s ease both vt-fade-out; }
::view-transition-new(*.cover) { animation: .45s ease both vt-fade-in; }

html:active-view-transition-type(forward)::view-transition-old(page-body) { animation: .35s cubic-bezier(.65, 0, .35, 1) both vt-out-left; }
html:active-view-transition-type(forward)::view-transition-new(page-body) { animation: .65s .08s cubic-bezier(.22, .8, .24, 1) both vt-in-right; }
html:active-view-transition-type(forward)::view-transition-new(page-body) { animation-delay: .15s; }

html:active-view-transition-type(back)::view-transition-old(page-body) { animation: .35s cubic-bezier(.65, 0, .35, 1) both vt-out-right; }
html:active-view-transition-type(back)::view-transition-new(page-body) { animation: .65s .08s cubic-bezier(.22, .8, .24, 1) both vt-in-left; }
html:active-view-transition-type(back)::view-transition-new(page-body) { animation-delay: .15s; }

html:active-view-transition-type(same)::view-transition-group(*) { animation-duration: .3s; }
html:active-view-transition-type(same)::view-transition-old(page-body) { animation: .18s ease both vt-fade-out; }
html:active-view-transition-type(same)::view-transition-new(page-body) { animation: .3s ease both vt-fade-in; }

/* signing in: the login card fades away, the library rises in */
html:active-view-transition-type(enter)::view-transition-old(solo-card) { animation: .4s cubic-bezier(.65, 0, .35, 1) both vt-out-up; }
html:active-view-transition-type(enter)::view-transition-new(page-body) { animation: .8s .25s cubic-bezier(.22, .8, .24, 1) both vt-in-up; }

@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes vt-out-up { to { opacity: 0; transform: translateY(-30px); } }
@keyframes vt-in-up { from { opacity: 0; transform: translateY(50px); } }
@keyframes vt-out-left { to { opacity: 0; transform: translateX(-70px); } }
@keyframes vt-in-right { from { opacity: 0; transform: translateX(100px); } }
@keyframes vt-out-right { to { opacity: 0; transform: translateX(70px); } }
@keyframes vt-in-left { from { opacity: 0; transform: translateX(-100px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
