/* Sunny Knoll Library — built on the Sunny Knoll design system.
   Brand: cream ground, deep green, sage + hill-dark hills, one orange sun, Georgia, square edges.
   The library leans on the deep green for a darker, more formal frame. */
:root {
  /* brand palette (from the Sunny Knoll design system) */
  --sk-cream: #faf6ee;     /* bg */
  --sk-green: #2f3a2f;     /* text — deep green */
  --sk-muted: #6b766b;     /* muted — large text only */
  --sk-sun: #e8a33d;       /* sun — fills only */
  --sk-hill: #8fae7e;      /* sage */
  --sk-hill-dark: #6f9160; /* deeper green */
  --sk-on-hill: #eef3ea;
  /* library shades derived from the palette */
  --sk-green-deep: #232c23;  /* darker band under the header */
  --sk-green-ink: #4f6e42;   /* hill-dark darkened so it passes as small text (5.3:1) */

  --bg: var(--sk-cream);
  --card: #fffdf8;
  --ink: var(--sk-green);
  --muted: #5c675c;          /* muted, darkened for small text (5.5:1 on cream) */
  --line: #e4dfd2;
  --accent: var(--sk-green);           /* buttons and links: deep green */
  --accent-ink: var(--sk-cream);
  --accent-soft: var(--sk-on-hill);
  --leaf: var(--sk-green-ink);
  --danger: #a3262a;
  --brass: var(--sk-sun);              /* loan badges */
  --on-brass: var(--sk-green);
  --forest: var(--sk-green);
  --forest-deep: var(--sk-green-deep);
  --band: var(--sk-green);             /* header, finder, footer */
  --band-ink: var(--sk-cream);
  --band-muted: #d6dfd0;
  --ok-bg: var(--sk-on-hill);  --ok-ink: var(--sk-green);
  --warn-bg: #fbeed6;          --warn-ink: #7a5212;
  --err-bg: #f8e3e1;           --err-ink: #7a1d1f;   --err-line: #e2a7a4;
  --cover-shadow: rgba(35, 44, 35, .22);
  --radius: 0px;            /* brand: square edges */
  --radius-ctl: 2px;        /* buttons and fields: just off square */
  --shadow: 0 1px 0 rgba(35, 44, 35, .04), 0 10px 30px -18px rgba(35, 44, 35, .35);
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e261e; --card: #263026; --ink: var(--sk-cream); --muted: #b8c2b2; --line: #3a463a;
    --accent: var(--sk-sun); --accent-ink: var(--sk-green); --accent-soft: #2f3a2f; --leaf: #a9c49a;
    --danger: #ef7b7f; --band: #161c16; --forest-deep: #141914;
    --ok-bg: #2f3a2f; --ok-ink: #d6dfd0; --warn-bg: #3a3020; --warn-ink: #f1dca8;
    --err-bg: #3d2224; --err-ink: #f3c7c8; --err-line: #6a3a3a;
    --cover-shadow: rgba(0, 0, 0, .45); --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.65 "Source Sans 3", system-ui, -apple-system, Segoe UI, sans-serif;
}
h1, h2, h3, .brand { font-family: Fraunces, Georgia, serif; font-weight: 600; line-height: 1.2; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
body.narrow main { max-width: 460px; }
body.editor-page main { max-width: 760px; }

/* header / footer */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { font-size: 1.35rem; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 16px; font-size: .95rem; }
.site-header nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.site-header nav a:not(.btn):hover { color: var(--accent); }
.site-footer { color: var(--muted); font-size: .85rem; padding: 40px 0; text-align: center; }

/* hero */
.hero { text-align: center; padding: 48px 0 28px; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); margin: 0 0 6px; }
.hero p { color: var(--muted); margin: 0; font-size: 1.1rem; }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 36px; align-items: start; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } .sidebar { order: -1; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 10px 20px; font: 600 1rem/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-big { padding: 14px 28px; font-size: 1.08rem; }
.btn-small { padding: 7px 14px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid currentColor; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block; background: var(--accent-soft); color: var(--accent); border: 0;
  border-radius: 999px; padding: 3px 11px; font-size: .88rem; text-decoration: none; font-family: inherit; cursor: pointer;
}
.tag:hover, .tag.active { background: var(--accent); color: var(--accent-ink); }
.tag small { opacity: .7; }

/* forms */
input[type=text], input[type=password], input[type=search], input[type=datetime-local], textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; margin-top: 6px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; min-height: 220px; line-height: 1.6; }
label, .field { display: block; margin-bottom: 22px; font-weight: 600; }
.label { display: block; }
label small, .label small { font-weight: 400; color: var(--muted); }
label.big input { font-size: 1.3rem; font-family: Fraunces, Georgia, serif; }
.sublabel { font-weight: 400; color: var(--muted); margin: 14px 0 8px; font-size: .95rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.login { margin-top: 48px; }
.login h1 { margin-top: 0; }
.login .btn { width: 100%; }
.hint { text-align: center; font-size: .95rem; }
.notice { background: var(--ok-bg); color: var(--ok-ink); border-radius: 10px; padding: 12px 16px; margin: 16px 0; }
.notice.error { background: var(--err-bg); color: var(--err-ink); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.filtering { color: var(--muted); }


/* ===== library ===== */
.site-footer a { color: var(--muted); }
.back { margin: 22px 0 10px; } .back a { text-decoration: none; }
.page-title { margin: 28px 0 14px; }
.finder { margin: 24px 0 14px; padding: 18px; }
.search-row { display: flex; gap: 10px; }
.search-row input { margin-top: 0; font-size: 1.1rem; }
.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.filters label { margin: 0; font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) { .filters { grid-template-columns: 1fr 1fr; } }
select { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-top: 4px; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); margin: 6px 2px 16px; }
.view-toggle a { color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 8px; }
.view-toggle a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; } }
.book { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.cover { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--line); box-shadow: 0 2px 8px var(--cover-shadow); margin-bottom: 8px; transition: transform .2s; }
.book:hover .cover { transform: translateY(-3px); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.nocover { display: grid; place-items: center; height: 100%; padding: 12px; text-align: center; font-family: Fraunces, Georgia, serif; font-size: .95rem; color: #fff; background: linear-gradient(160deg, var(--forest), var(--forest-deep)); }
.nocover.big { height: auto; width: 100%; aspect-ratio: 2/3; font-size: 1.4rem; border-radius: 8px; }
.lent { position: absolute; top: 8px; left: 8px; background: var(--brass); color: #fff; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.lent-inline { background: var(--brass); color: #fff; font-size: .72rem; padding: 1px 7px; border-radius: 999px; }
.book .t { font-weight: 600; line-height: 1.25; }
.book .a { color: var(--muted); font-size: .9rem; line-height: 1.3; }
.book .shelf { color: var(--leaf); font-size: .82rem; margin-top: 2px; }

.table-wrap { padding: 0; overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .98rem; }
.list th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px; border-bottom: 1px solid var(--line); }
.list td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:hover td { background: var(--accent-soft); cursor: pointer; }
.list td a { color: var(--ink); font-weight: 600; text-decoration: none; }
.list .mini { width: 46px; } .list .mini img { width: 34px; height: 50px; object-fit: cover; border-radius: 3px; }
@media (max-width: 640px) { .list th:nth-child(4), .list td:nth-child(4) { display: none; } }

.detail { display: grid; grid-template-columns: 260px 1fr; gap: 32px; }
@media (max-width: 680px) { .detail { grid-template-columns: 1fr; } .detail-cover { max-width: 220px; margin: 0 auto; } }
.detail-cover img { width: 100%; border-radius: 8px; box-shadow: 0 4px 16px var(--cover-shadow); }
.detail h1 { margin: 0 0 4px; font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
.subtitle { color: var(--muted); margin: 0 0 6px; font-size: 1.1rem; }
.by { margin: 0 0 18px; font-size: 1.1rem; }
.where { display: flex; flex-direction: column; background: var(--ok-bg); color: var(--ok-ink); border-radius: 12px; padding: 12px 16px; text-decoration: none; margin-bottom: 14px; }
.where span { font-size: .85rem; } .where strong { font-size: 1.25rem; }
.lent-box { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 10px 16px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 10px 0 16px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.notes { background: var(--bg); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* editor */
body.editor-page main { max-width: 820px; }
.scan-box { text-align: center; background: var(--accent-soft); border-radius: 12px; padding: 20px 16px; margin-bottom: 22px; }
.scan-box .btn { width: 100%; max-width: 360px; }
.scan-box .tip { margin: 10px 0 0; }
.tip { color: var(--muted); font-size: .9rem; font-weight: 400; }
.linkish { display: inline; margin: 0; font-weight: 400; color: var(--accent); cursor: pointer; }
#scanner { margin-top: 14px; } #reader { max-width: 480px; margin: 0 auto 10px; border-radius: 10px; overflow: hidden; }
#reader video { border-radius: 10px; }
.isbn-row { display: flex; gap: 10px; align-items: flex-end; }
.isbn-row label { flex: 1; margin-bottom: 0; } .isbn-row .btn { margin-bottom: 1px; height: 47px; }
.lookup-msg { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--bg); font-size: .95rem; }
.lookup-msg.ok { background: var(--ok-bg); color: var(--ok-ink); } .lookup-msg.error { background: var(--err-bg); color: var(--err-ink); } .lookup-msg.warn { background: var(--warn-bg); color: var(--warn-ink); }
.two-col { display: grid; grid-template-columns: 170px 1fr; gap: 24px; margin-top: 22px; }
@media (max-width: 600px) { .two-col { grid-template-columns: 1fr; } .cover-field { display: flex; flex-direction: column; align-items: center; } }
.cover-preview { width: 150px; aspect-ratio: 2/3; border: 2px dashed var(--line); border-radius: 8px; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-weight: 400; font-size: .9rem; margin: 8px 0 10px; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.file-btn { margin: 0 0 8px; font-weight: 600; }
.check { display: flex; gap: 6px; align-items: center; font-weight: 400; font-size: .9rem; }
.suggest { margin: -12px 0 20px; font-weight: 400; font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.shelf-field input { font-size: 1.1rem; }
input.filled { background: var(--ok-bg); transition: background 1.2s; }
details.more { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 20px; }
details.more summary { cursor: pointer; font-weight: 600; margin-bottom: 14px; }
.grid-fields { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 0 12px; }
@media (max-width: 600px) { .grid-fields { grid-template-columns: 1fr 1fr; } }
.sticky-actions { position: sticky; bottom: 0; background: var(--card); padding: 12px 0 4px; }
.danger { margin-top: 24px; text-align: right; }

/* shelves */
.shelf-list { display: grid; gap: 16px; }
.shelf-card { padding: 18px 20px; }
.shelf-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.shelf-head h2 { margin: 0; font-size: 1.25rem; }
.shelf-head .count { color: var(--muted); }
.small-link { margin-left: auto; font-weight: 600; text-decoration: none; }
.spines { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 6px; }
.spine { flex: none; width: 56px; aspect-ratio: 2/3; border-radius: 4px; overflow: hidden; background: linear-gradient(160deg, var(--forest), var(--forest-deep)); color: #fff; font-size: .6rem; text-decoration: none; display: grid; place-items: center; text-align: center; }
.spine img { width: 100%; height: 100%; object-fit: cover; }
.spine span { padding: 4px; overflow: hidden; max-height: 100%; }
.spine.more { background: var(--accent-soft); color: var(--accent); font-size: 1rem; font-weight: 600; }
.rename summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.rename form { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.rename input { margin: 0; }

/* ===== accounts & loans ===== */
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--brass); color: #fff; font-size: .75rem; font-weight: 600; text-align: center; line-height: 20px; }
.account-menu { position: relative; }
.account-menu summary { cursor: pointer; list-style: none; color: var(--muted); }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu .menu { position: absolute; right: 0; top: calc(100% + 10px); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.12); padding: 6px; min-width: 210px; display: flex; flex-direction: column; z-index: 20; }
.account-menu .menu a { padding: 9px 12px; border-radius: 8px; color: var(--ink) !important; }
.account-menu .menu a:hover { background: var(--accent-soft); }
@media (max-width: 560px) { .site-header nav { gap: 12px; font-size: .9rem; } }

.loan-box { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; }
.loan-box.overdue { background: var(--err-bg); color: var(--err-ink); }
.loan-main { display: flex; flex-direction: column; }
.loan-main > span:first-child { font-size: .85rem; }
.loan-main strong { font-size: 1.3rem; }
.loan-meta { font-size: .9rem; } .loan-note { font-size: .9rem; font-style: italic; margin-top: 2px; }
.home-shelf { margin: 0 0 12px; font-size: .95rem; color: var(--muted); }
details.lend { margin: 4px 0 18px; }
details.lend summary { list-style: none; display: inline-flex; }
details.lend summary::-webkit-details-marker { display: none; }
details.lend[open] summary { margin-bottom: 12px; }
.lend-form { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.lend-form label { margin-bottom: 14px; }
.quick-due { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin: -6px 0 14px; }
.grid-fields.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .grid-fields.two { grid-template-columns: 1fr; } }
input[type=date] { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 6px; }
.history { margin: 0 0 18px; } .history summary { cursor: pointer; color: var(--muted); }
.history ul { margin: 8px 0 0; padding-left: 20px; }
.lent.od, .od-text { color: var(--danger); } .lent.od { background: var(--danger); color: #fff; }
.lent { max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.page-title.small { font-size: 1.2rem; margin-top: 34px; }
.person-title { font-size: 1.15rem; margin: 22px 0 8px; }
.loan-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
.loan-list li { display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; }
.loan-list li.overdue { border-color: var(--err-line); }
.loan-list .thumb { width: 48px; height: 72px; border-radius: 4px; overflow: hidden; flex: none; background: var(--bg); display: grid; place-items: center; font-size: 1.4rem; }
.loan-list .thumb img { width: 100%; height: 100%; object-fit: cover; }
.loan-list .info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.loan-list .t { font-weight: 600; color: var(--ink); text-decoration: none; }
.loan-list .m { font-size: .9rem; color: var(--muted); }
.returned { color: var(--muted); padding-left: 20px; }

.people { display: grid; gap: 10px; margin: 18px 0 28px; }
.person { padding: 14px 18px; }
.person-head { display: flex; gap: 12px; align-items: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 1.1rem; flex: none; }
.you { background: var(--accent-soft); color: var(--accent); font-size: .75rem; padding: 1px 8px; border-radius: 999px; }
.person details { margin-top: 10px; } .person summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.inline-form input, .inline-form select { margin: 0; width: auto; flex: 1; min-width: 160px; }
#add-person h2 { margin-top: 0; }

/* =====================================================================
   Sunny Knoll theme — darker, more formal library frame
   ===================================================================== */
body { font: 17px/1.6 var(--sans); }
h1, h2, h3, .page-title { font-family: var(--serif); font-weight: 400; letter-spacing: .01em; }
a { color: var(--ink); text-decoration-color: var(--sk-hill-dark); text-underline-offset: 3px; }
a:hover { color: var(--leaf); }

/* header: deep green band; the cream wordmark on wide screens, the badge alone on phones */
.site-header { background: var(--band); color: var(--band-ink); border-bottom: 0; box-shadow: inset 0 -3px 0 var(--sk-sun); }
.site-header .wrap { min-height: 72px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--band-ink); text-decoration: none; }
.brand img { display: block; height: auto; }
.brand-wordmark { width: 168px; }
.brand-badge { width: 40px; display: none !important; }
.brand-section { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--band-muted);
  padding-left: 14px; border-left: 1px solid rgba(250, 246, 238, .28); line-height: 1.6; }
@media (max-width: 600px) {
  .brand-wordmark { display: none !important; }
  .brand-badge { display: block !important; }
  .brand-section { padding-left: 0; border-left: 0; }
}
.site-header nav { gap: 22px; }
.site-header nav a:not(.btn), .account-menu summary { color: var(--band-muted); font-size: .92rem; letter-spacing: .02em; }
.site-header nav a:not(.btn):hover, .account-menu summary:hover { color: var(--band-ink); }
.site-header .btn { background: var(--sk-sun); color: var(--sk-green); }
.badge { background: var(--sk-sun); color: var(--sk-green); }

/* buttons: square-shouldered, quiet */
.btn { border-radius: var(--radius-ctl); letter-spacing: .02em; padding: 11px 22px; }
.btn-small { padding: 7px 14px; }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--accent-soft); filter: none; }

/* fields */
input[type=text], input[type=password], input[type=search], input[type=datetime-local], input[type=date], textarea, select {
  border-radius: var(--radius-ctl); background: var(--card); border-color: #d9d2c2; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--sk-hill-dark); outline-offset: 1px; border-color: transparent; }
@media (prefers-color-scheme: dark) {
  input[type=text], input[type=password], input[type=search], input[type=datetime-local], input[type=date], textarea, select { background: #1e261e; border-color: #3a463a; }
  input:focus, textarea:focus, select:focus { outline-color: var(--sk-sun); }
}
label { letter-spacing: .01em; }

/* cards: square, hairline, soft lift */
.card { border-radius: 0; border-color: var(--line); }
.notice, .lookup-msg, .where, .lent-box, .loan-box, .scan-box, .lend-form, .notes { border-radius: 0; }
.notice { border-left: 0; }

/* the finder: a deep green band carried down from the header */
body { overflow-x: clip; }
.finder.card { background: var(--band); color: var(--band-ink); border: 0; box-shadow: none;
  margin: 0 calc(50% - 50vw) 0; padding: 30px max(16px, calc(50vw - 524px)) 34px; }
.finder::before { content: "The Library"; display: block; font-family: var(--serif); font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1.15; letter-spacing: .015em; margin-bottom: 4px; }
.finder .search-row { margin-top: 18px; }
.finder .search-row input { background: var(--sk-cream); color: var(--sk-green); border-color: transparent; }
.finder .search-row .btn { background: var(--sk-sun); color: var(--sk-green); }
.finder .filters label { color: var(--band-muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .12em; font-weight: 600; }
.finder select { background: rgba(250, 246, 238, .08); color: var(--band-ink); border-color: rgba(250, 246, 238, .22); text-transform: none; letter-spacing: 0; font-weight: 400; }
.finder select option { color: #2f3a2f; background: #faf6ee; }
.finder input:focus, .finder select:focus { outline-color: var(--sk-sun); }

.results-bar { margin-top: 18px; font-size: .92rem; letter-spacing: .02em; }
.view-toggle a.on { background: var(--ink); color: var(--bg); border-radius: var(--radius-ctl); }

/* covers */
.grid { gap: 30px 22px; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
.cover { border-radius: 1px; box-shadow: 0 1px 2px var(--cover-shadow), 0 12px 24px -12px var(--cover-shadow); }
.book .t { font-family: var(--serif); font-weight: 400; font-size: 1.02rem; line-height: 1.3; margin-top: 2px; }
.book .a { font-style: italic; font-family: var(--serif); }
.book .shelf { color: var(--leaf); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.nocover { position: relative; font-family: var(--serif); color: var(--sk-cream); padding: 52px 14px 14px; place-items: start center;
  background: linear-gradient(170deg, var(--sk-green), var(--sk-green-deep)); box-shadow: inset 0 0 0 6px var(--sk-green-deep), inset 0 0 0 7px rgba(232, 163, 61, .55); }
.nocover::before { content: ""; position: absolute; top: 20px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--sk-sun); }
.lent { background: var(--sk-sun); color: var(--sk-green); border-radius: 1px; letter-spacing: .02em; }
.lent-inline { background: var(--sk-sun); color: var(--sk-green); border-radius: 1px; }
.lent.od { background: var(--danger); color: #fff; }

/* list view */
.list th { color: var(--muted); letter-spacing: .1em; font-size: .72rem; }
.list td a { font-family: var(--serif); font-weight: 400; font-size: 1.04rem; }
.list tr:hover td { background: var(--accent-soft); }

/* book page */
.detail h1 { font-weight: 400; }
.by { font-family: var(--serif); font-style: italic; }
.where { background: var(--band); color: var(--band-ink); box-shadow: inset 3px 0 0 var(--sk-sun); }
.where span { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--band-muted); }
.where strong { font-family: var(--serif); font-weight: 400; }
.detail-cover img { border-radius: 1px; box-shadow: 0 2px 4px var(--cover-shadow), 0 24px 40px -20px var(--cover-shadow); }
.tag { border-radius: 1px; background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.tag:hover, .tag.active { background: var(--ink); color: var(--bg); }

/* shelves */
.shelf-head h2 { font-weight: 400; }
.spine { border-radius: 1px; }
.spine.more { background: var(--accent-soft); color: var(--ink); }

/* people */
.avatar { background: var(--band); color: var(--band-ink); font-family: var(--serif); font-weight: 400; }
.you { background: var(--accent-soft); color: var(--ink); border-radius: 1px; }

/* account menu */
.account-menu .menu { border-radius: 0; }

/* empty state */
.empty-badge { width: 96px; height: 96px; margin: 0 auto 10px; display: block; }

/* footer: deep green, sun-orange hairline */
/* the hills run along the bottom of every page into the footer */
.hills { display: block; width: 100%; height: 72px; margin-top: 64px; color: var(--band); }
@media (max-width: 600px) { .hills { height: 44px; } }
.site-footer { background: var(--band); color: var(--band-muted); padding: 22px 0 34px; margin-top: -1px; font-size: .85rem; letter-spacing: .03em; }
.site-footer a { color: var(--band-ink); text-decoration-color: var(--sk-sun); }

/* sign-in page: centred, more space */
body.narrow main { padding-top: 12px; }
.login h1 { font-weight: 400; }

/* phone header: brand on its own row, links in one tidy row beneath */
.site-header .btn, .site-header nav a, .account-menu summary { white-space: nowrap; }
@media (max-width: 600px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; row-gap: 8px; min-height: 0; }
  .site-header nav { width: 100%; justify-content: space-between; gap: 10px; font-size: .88rem; }
  .site-header nav .btn-small { padding: 7px 12px; }
}

/* loan labels and empty thumbnails */
.loan-main > span:first-child { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; }
.loan-main strong { font-family: var(--serif); font-weight: 400; }
.loan-list .thumb span { display: block; width: 100%; height: 100%; background: linear-gradient(170deg, var(--sk-green), var(--sk-green-deep)); }
.person-title { font-weight: 400; }
