@font-face {
  font-family: Baskervville;
  src: url("./assets/baskervville.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("./assets/dmsans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --card: #fffdf8;
  --ink: #233c31;
  --green: #284b3b;
  --green-dark: #20392d;
  --muted: #566357;
  --border: #dfdfd4;
  --sage: #e8eee4;
  --serif: Baskervville, Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100vh; margin: 0; display: flex; flex-direction: column; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
small { font-size: .82em; }
:focus-visible { outline: 2px solid #526e53; outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }

.shell {
  width: min(calc(100% - clamp(2rem, 10vw, 9rem)), 79rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  inset: 8px auto auto 8px;
  padding: 12px 16px;
  background: var(--card);
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header { background: var(--card); border-bottom: 1px solid var(--border); }
.header-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 11px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  color: #fff6df;
  font-size: 19px;
}
.brand-type { display: grid; min-width: 0; gap: 3px; }
.brand-type strong { font: 600 1.44rem/.96 var(--serif); letter-spacing: -.04em; }
.brand-type small {
  font-size: .60rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .145em;
  text-transform: uppercase;
}
.icon { position: relative; display: inline-block; width: 1.3em; height: 1.1em; flex: none; }
.icon-book::before, .icon-book::after {
  content: "";
  position: absolute;
  top: 9%;
  width: 51%;
  height: 79%;
  border: .075em solid currentColor;
}
.icon-book::before { left: 0; border-radius: 2px 4px 1px 2px; transform: skewY(10deg); }
.icon-book::after { right: 0; border-radius: 4px 2px 2px 1px; transform: skewY(-10deg); }

.main-navigation { display: flex; align-self: stretch; gap: clamp(19px, 2.7vw, 44px); }
.main-navigation a {
  position: relative;
  display: flex;
  align-items: center;
  white-space: nowrap;
  color: var(--muted);
  font-size: .91rem;
  font-weight: 600;
}
.main-navigation a:hover, .main-navigation a[aria-current] { color: var(--green-dark); }
.main-navigation a[aria-current]::after {
  content: "";
  position: absolute;
  bottom: -1px;
  inset-inline: 0;
  height: 2px;
  background: var(--green);
}
.header-action { justify-self: end; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 43px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  white-space: nowrap;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.3;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.button-primary { background: var(--green); color: #fffdf4; }
.button-primary:hover { background: #18392a; }
.button-light { background: #f8f2e3; color: var(--green-dark); padding-inline: 18px; }
.button-light:hover { background: #fffaf0; }
.button-light:focus-visible { outline-color: #fff4db; }
.button-hero-outline { border-color: #f8f2e380; background: #213a2d80; color: #fff7e7; }
.button-hero-outline:hover { border-color: #f8f2e3; background: #fff7e724; }
.button-hero-outline:focus-visible { outline-color: #fff4db; }
.button-secondary { background: var(--card); border-color: var(--border); }
.button-secondary:hover { background: var(--sage); border-color: #bdcaba; }
.button-subtle { background: transparent; color: #865344; }
.button-subtle:hover { background: #f9eee8; }
.button-danger { color: #fff; background: #8d4334; }
.button-danger:hover { background: #733025; }
.plus { font-size: 1.3rem; font-weight: 500; line-height: .8; }
.arrow { font-size: 1.16em; line-height: 1; }

.site-main { flex: 1; padding-block: 32px 64px; }
.hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(26rem, 38vw, 30rem);
  border-radius: 14px;
  color: #fff7e7;
  background: #213a2d;
  box-shadow: 0 12px 32px #27312512;
}
.hero-image {
  position: absolute;
  inset: 0 0 0 auto;
  width: 62%;
  height: 100%;
  z-index: -2;
  object-fit: cover;
  object-position: center 57%;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #213a2d 38%, #213a2def 44%, #213a2d6b 57%, #213a2d00 74%);
}
.hero-content { padding: clamp(2rem, 5.5vw, 5.1rem); }
.hero h1 {
  font-size: clamp(3.25rem, 6.25vw, 5.55rem);
  line-height: .96;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.hero h1 span { display: block; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hero p {
  max-width: 25rem;
  margin: 21px 0 26px;
  color: #f0eddd;
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.55;
}

.home-directory { margin-top: clamp(36px, 4.25vw, 62px); }
.section-heading { margin-bottom: 20px; }
.section-heading h2, .album-content h2 {
  font-size: clamp(2.05rem, 3.55vw, 3rem);
  line-height: 1.11;
  letter-spacing: -.045em;
}
.section-heading p, .page-heading p, .album-content p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}
.family-shelf-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.directory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.member-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 1.65vw, 24px);
  width: 100%;
  min-height: 116px;
  padding: 20px clamp(15px, 2vw, 27px);
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.family-shelf-card { background: #edf1e8; border-color: #d8e3d6; }
.member-card:hover {
  background: #fffefb;
  border-color: #aebfae;
  box-shadow: 0 6px 15px #243b3010;
}
.member-card-add { background: #eeefe530; border-style: dashed; border-color: #b9c3b5; }
.member-card-add:hover { background: #edf0e8; box-shadow: none; }
.monogram {
  display: grid;
  place-items: center;
  width: clamp(45px, 5.3vw, 63px);
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  background: var(--sage);
  color: var(--green);
  font: 500 clamp(1.15rem, 2.2vw, 1.6rem)/1 var(--serif);
}
.add-monogram {
  border: 1px solid #d0d9ca;
  background: #eef0e7;
  font: 400 1.55rem/1 var(--sans);
}
.member-card-copy { display: grid; gap: 5px; min-width: 0; }
.member-card-copy strong {
  font: 500 clamp(1.34rem, 2.6vw, 1.95rem)/1.15 var(--serif);
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.member-count { font-size: .88rem; color: var(--muted); }
.member-card-arrow {
  display: grid;
  place-items: center;
  width: 37px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #dce4d8;
  color: var(--green);
  font-size: 1.15rem;
}
.member-card-add .member-card-arrow { border-color: transparent; }

.album-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(46%, 25rem);
  overflow: hidden;
  margin-top: 38px;
  min-height: 236px;
  border: 1px solid #e2dccb;
  border-radius: 12px;
  background: #f1ecdd;
}
.album-content { align-self: center; padding: clamp(22px, 4.2vw, 58px); }
.album-content p { max-width: 29rem; }
.album-feature img {
  width: 100%;
  height: 100%;
  max-height: 392px;
  object-fit: cover;
  object-position: center 30%;
}
.text-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: .92rem;
  font-weight: 700;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.album-content .text-link { margin-top: 17px; }
.album-page { min-height: 386px; margin-top: 0; }
.album-page img { max-height: 430px; }
.photo-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.photo-actions:not(:has(> :not([hidden]))) { display: none; }
.photo-status { margin: 22px 0; color: var(--muted); line-height: 1.5; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 16px;
  margin-top: 24px;
}
.photo-card {
  display: grid;
  align-content: start;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
  text-align: left;
}
.photo-card:hover { border-color: #a4b5a0; box-shadow: 0 5px 13px #243b3010; }
.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--sage);
}
.photo-card-copy { display: grid; gap: 4px; padding: 12px 13px; overflow-wrap: anywhere; }
.photo-card-copy strong { font-weight: 600; }
.photo-card-copy small { color: var(--muted); }
.photo-queue { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.photo-queue:empty { display: none; }
.photo-queue li {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f5f4ee;
}
.photo-queue img { width: 46px; height: 46px; object-fit: cover; border-radius: 4px; background: var(--sage); }
.photo-queue-detail { display: grid; gap: 8px; }
.photo-queue-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .83rem;
  overflow-wrap: anywhere;
}
.photo-queue-name button { min-height: 29px; padding: 3px 7px; font-size: .78rem; }
.photo-viewer { width: min(calc(100% - 28px), 850px); }
.expanded-photo { margin: 0; }
.expanded-photo img {
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 6px;
  background: var(--sage);
}
.expanded-photo figcaption { margin-top: 10px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

.page-heading { margin-block: 24px 25px; }
.page-heading h1, .shelf-heading h1, .album-content h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.65rem);
  line-height: 1.02;
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
}
.book-directory-status, .book-directory-author { color: var(--muted); }
.book-directory-list { margin: 0; padding: 0; list-style: none; }
.book-directory-list:not(:empty) { border-top: 1px solid var(--border); }
.book-directory-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 9px 20px;
  padding-block: 13px;
  border-bottom: 1px solid var(--border);
}
.book-directory-copy { display: grid; gap: 3px; overflow-wrap: anywhere; }
.book-directory-copy strong { font: 600 1.2rem/1.23 var(--serif); }
.book-directory-author { font-size: .85rem; }
.book-directory-shelves { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px 8px; }
.book-directory-shelf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 36px;
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  font-size: .84rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.book-directory-shelf:hover { background: var(--sage); border-color: #bdcaba; }
.book-directory-initials { width: 24px; font-size: .75rem; }
.back-link { margin: 8px 0 22px; }
.shelf-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 27px);
  padding: 0 0 25px;
  border-bottom: 1px solid var(--border);
}
.shelf-monogram { width: clamp(54px, 7vw, 88px); font-size: clamp(1.6rem, 3vw, 2.25rem); }
.shelf-heading p { margin-top: 5px; color: var(--muted); }
.shelf-categories { margin-top: 24px; }
.shelf-category-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.shelf-category-heading h2, .shelf-results-title { font-size: clamp(1.45rem, 2.5vw, 1.95rem); }
.shelf-results-title { margin-top: 24px; scroll-margin-top: 20px; }
.shelf-category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 10px; }
.shelf-category-card {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 75px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  line-height: 1.3;
}
.shelf-category-card:hover, .shelf-category-card[aria-pressed="true"] { border-color: #a6bba8; background: var(--sage); }
.shelf-category-card span { color: var(--muted); font-size: .86rem; }
.shelf-tools {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.shelf-tools .field { flex: 1 1 10rem; max-width: 15rem; }
.shelf-tools .button { margin-inline-start: auto; white-space: normal; }
.shelf-pagination { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 19px; }
.shelf-pagination .button { min-height: 36px; padding: 6px 12px; }
.shelf-pagination .button:disabled { opacity: .55; }
.shelf-page-picker { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; }
.shelf-page-picker select {
  min-height: 36px;
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
}
.empty-shelf {
  display: grid;
  justify-items: center;
  padding: clamp(34px, 6vw, 78px) 18px;
  margin-top: 24px;
  border: 1px dashed #bcc6b6;
  border-radius: 11px;
  background: #fffdf770;
  text-align: center;
}
.empty-symbol {
  display: grid;
  place-items: center;
  width: 59px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--sage);
  color: var(--green);
  font-size: 26px;
}
.empty-shelf h2 { margin-top: 17px; font-size: clamp(1.75rem, 4vw, 2.65rem); letter-spacing: -.04em; }
.empty-shelf p { margin: 8px 0 20px; color: var(--muted); line-height: 1.5; }
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 213px), 1fr));
  gap: 16px;
}
.book-grid:not(:empty) { margin-top: 24px; }
.book-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.book-card:hover { border-color: #aebfae; box-shadow: 0 7px 15px #243b3011; }
.book-cover {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 173px;
  overflow: hidden;
  background: #e6ebe1;
  color: #647c67;
  font-size: 38px;
}
.book-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.book-card-copy { display: grid; align-content: start; justify-items: start; gap: 7px; padding: 16px; }
.book-card-labels { display: flex; flex-wrap: wrap; gap: 5px; }
.book-card-copy strong { font: 500 1.55rem/1.08 var(--serif); letter-spacing: -.025em; overflow-wrap: anywhere; }
.book-card-author, .book-card-files { font-size: .87rem; color: var(--muted); overflow-wrap: anywhere; }
.reading-status, .featured-badge, .comment-count {
  display: inline-block;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 4px;
  background: #e9eee4;
  color: #385746;
  font-size: .75rem;
  font-weight: 700;
}
.featured-badge { background: #f4ead5; color: #694c20; }
.comment-count { background: #eeeee8; color: var(--muted); }
.comment-count[data-has-comments] { background: #dce9e1; color: var(--green-dark); }

.site-footer { border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding-block: 22px;
}
.footer-name { font: 600 1.15rem/1.2 var(--serif); }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.footer-links .text-link { font-size: .84rem; }
.footer-inner p, .form-help { font-size: .84rem; line-height: 1.45; color: var(--muted); }
.footer-credit { flex-basis: 100%; }
.footer-credit a { text-decoration: underline; text-underline-offset: 2px; }
.notice {
  padding: 13px 16px;
  margin-bottom: 16px;
  border-radius: 6px;
  background: #f4ead8;
  color: #5e4a2a;
}
.installation-page { max-width: 43rem; }
.installation-page .page-heading { margin-top: 8px; }
.installation-icon { width: 64px; aspect-ratio: 1; margin-bottom: 18px; border-radius: 14px; }
.installation-steps {
  display: grid;
  gap: 0;
  margin: 24px 0 0;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--card);
}
.installation-steps > div { padding: 15px 0; }
.installation-steps > div + div { border-top: 1px solid var(--border); }
.installation-steps dt { font-weight: 700; }
.installation-steps dd { margin: 5px 0 0; color: var(--muted); line-height: 1.5; }
.installation-page .notice { margin: 15px 0 0; }
.toast:not(:empty) {
  position: fixed;
  z-index: 4;
  bottom: 20px;
  right: 20px;
  max-width: calc(100vw - 40px);
  padding: 11px 17px;
  border-radius: 7px;
  background: var(--green-dark);
  color: #fffdf4;
  box-shadow: 0 6px 20px #263a2233;
  font-size: .9rem;
}

body:has(dialog[open]) { overflow: hidden; }
.dialog {
  width: min(calc(100% - 28px), 650px);
  max-height: calc(100% - 28px);
  padding: 0;
  border: 1px solid #d9ded2;
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 20px 80px #151f1750;
}
.dialog::backdrop { background: #14261c9c; }
.member-dialog { width: min(calc(100% - 28px), 454px); }
.dialog-inner { display: grid; gap: 16px; padding: clamp(18px, 4vw, 30px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-header h2 { font-size: clamp(1.8rem, 5vw, 2.45rem); line-height: 1.1; letter-spacing: -.045em; overflow-wrap: anywhere; }
.close-button {
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  font-size: 1.33rem;
  line-height: 1;
}
.close-button:hover { background: var(--sage); }
.fields-grid, .upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field { display: grid; align-content: start; gap: 5px; min-width: 0; }
.field > span, .file-fields legend { font-weight: 700; font-size: .88rem; }
.field small, .file-fields legend small { margin-inline-start: 4px; font-weight: 500; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cbd3c8;
  border-radius: 6px;
  background: #fffefa;
  color: var(--ink);
  font-size: 1rem;
}
.field textarea { resize: vertical; }
.file-fields { min-width: 0; border: 0; padding: 0; margin: 0; }
.file-fields legend { padding: 0; margin-bottom: 7px; }
.upload-group { min-width: 0; }
.upload-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 8px;
  border: 1px dashed #b9c5b8;
  border-radius: 6px;
  background: #f2f4ec;
  cursor: pointer;
}
.upload-card:hover { background: #e9eee4; }
.upload-card:focus-within { outline: 2px solid #526e53; outline-offset: 2px; }
.upload-card input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-card strong, .upload-card small { display: block; }
.upload-card strong { font-size: .84rem; }
.upload-card small { font-size: .76rem; color: var(--muted); }
.upload-plus {
  display: grid;
  place-items: center;
  flex: none;
  width: 27px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #e1e8dc;
  font-size: 1.12rem;
}
.selected-files { display: grid; gap: 4px; padding: 0; margin: 6px 0 0; list-style: none; }
.selected-files:empty { margin: 0; }
.selected-files li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 6px 3px 8px;
  border-radius: 4px;
  background: #f0eee6;
  font-size: .78rem;
}
.selected-files li span { overflow-wrap: anywhere; }
.remove-file { flex: none; padding: 1px 6px; border: 0; border-radius: 3px; background: transparent; }
.remove-file:hover { background: #e3ddd1; }
.form-error { color: #8d4334; font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.detail-actions { justify-content: space-between; }
#detail-content { display: grid; gap: 15px; }
.detail-top { display: flex; align-items: flex-start; gap: 16px; }
.detail-top .book-cover { width: 116px; height: 142px; flex: none; border-radius: 5px; }
.detail-meta { display: grid; gap: 7px; min-width: 0; }
.detail-meta p { color: var(--muted); overflow-wrap: anywhere; }
.detail-meta .button { justify-self: start; }
.detail-notes, .attachment-list { padding-top: 12px; border-top: 1px solid var(--border); }
.detail-notes h3, .attachment-list h3 { margin-bottom: 5px; font-size: 1.27rem; }
.detail-notes p { line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.attachment-list ul { display: grid; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.attachment-list li {
  display: grid;
  gap: 7px;
  padding: 9px;
  border-radius: 6px;
  background: #f3f2eb;
}
.attachment-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .85rem; }
.attachment-line span { min-width: 0; overflow-wrap: anywhere; }
.attachment-line a { flex: none; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.attachment-list audio, .attachment-list video { width: 100%; }
.attachment-list video { max-height: 285px; background: #203228; }
.group-form { display: grid; gap: 12px; }
.group-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}
.group-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.group-list strong, .group-list small { display: block; overflow-wrap: anywhere; }
.group-list small { margin-top: 2px; color: var(--muted); }
.group-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.group-actions .button, .comment-remove { min-height: 34px; padding: 5px 9px; font-size: .82rem; }
.group-choices {
  display: grid;
  align-content: start;
  gap: 5px;
  max-height: 156px;
  overflow: auto;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f3f2eb;
}
.group-choices > span { font-size: .84rem; font-weight: 700; }
.group-choice { display: flex; align-items: baseline; gap: 7px; font-size: .87rem; overflow-wrap: anywhere; }
.group-choice input { flex: none; margin: 0; accent-color: var(--green); }
.detail-group-label { display: block; font-size: .79rem; }
.book-comments { display: grid; gap: 11px; padding-top: 13px; border-top: 1px solid var(--border); }
.book-comments h3 { font-size: 1.36rem; }
.comment-status { color: var(--muted); font-size: .87rem; }
.comment-status:empty, .comment-list:empty { display: none; }
.comment-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.comment-list li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: #f5f4ee; }
.comment-meta, .comment-submit { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; }
.comment-meta strong { font-size: .88rem; overflow-wrap: anywhere; }
.comment-meta time { font-size: .79rem; color: var(--muted); }
.comment-list p { margin-top: 5px; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-form { display: grid; gap: 8px; }
.comment-remove { margin-top: 4px; }
.delete-box { display: grid; gap: 12px; border: 1px solid #eedcd1; border-radius: 6px; padding: 10px; background: #fbf2eb; }
.delete-box p { font-size: .9rem; }

@media (max-width: 780px) {
  .header-inner { grid-template-columns: auto 1fr; gap: 0 13px; padding-top: 12px; }
  .main-navigation { grid-row: 2; grid-column: 1 / -1; min-height: 47px; flex-wrap: wrap; row-gap: 0; }
  .main-navigation a { min-height: 44px; }
  .header-action { grid-row: 1; grid-column: 2; }
  .site-main { padding-top: 24px; }
  .hero { min-height: 23rem; }
  .hero-content { padding-inline: 28px; }
  .hero p { max-width: 19rem; }
  .hero-image { width: 76%; }
  .hero::after { background: linear-gradient(90deg, #213a2d 22%, #213a2df5 35%, #213a2da6 57%, #213a2d14 82%); }
}

@media (max-width: 560px) {
  .site-main { padding-block: 18px 40px; }
  .hero { min-height: 510px; align-items: flex-start; }
  .hero-content { padding: 29px 23px 206px; }
  .hero h1 { font-size: clamp(2.38rem, 11.5vw, 3.65rem); }
  .hero p { margin: 14px 0 18px; }
  .hero-image { inset: 0; width: 100%; object-position: center; }
  .hero::after { background: linear-gradient(180deg, #213a2df5 35%, #213a2dd9 48%, #213a2d5e 66%, #213a2d00 84%); }
  .directory-grid { grid-template-columns: 1fr; gap: 10px; }
  .book-directory-row { grid-template-columns: minmax(0, 1fr); }
  .book-directory-shelves { justify-content: flex-start; }
  .member-card { min-height: 96px; padding-block: 13px; }
  .member-card-arrow { width: 33px; }
  .album-feature { grid-template-columns: 1fr; margin-top: 27px; }
  .album-feature img { max-height: 360px; object-position: center 28%; }
  .album-page { margin-top: 0; }
  .shelf-heading { grid-template-columns: auto minmax(0, 1fr); }
  .shelf-action { grid-column: 2; justify-self: start; }
  .shelf-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelf-category-card { padding-inline: 10px; }
  .shelf-tools .button { margin-inline-start: 0; }
  .fields-grid, .upload-grid { gap: 9px; }
}

@media (max-width: 360px) {
  .main-navigation { gap: 14px; }
  .main-navigation a { font-size: .82rem; }
  .header-action { padding-inline: 10px; }
  .hero { min-height: 465px; }
  .hero-content { padding-inline: 16px; }
  .fields-grid, .upload-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
