:root {
  color-scheme: dark;
  --night-950: #041012;
  --night-900: #07191b;
  --night-850: #0a2022;
  --night-800: #0e292a;
  --petrol: #123537;
  --petrol-soft: #1a4444;
  --wood-900: #2b1512;
  --wood-800: #42201a;
  --wood-700: #603025;
  --wood-600: #7a4431;
  --ivory: #f4e8ce;
  --ivory-soft: #d9c9aa;
  --paper: #c7b48f;
  --amber: #d7a456;
  --amber-bright: #f1c875;
  --wine: #6f2931;
  --ink: #172021;
  --line: rgba(244, 232, 206, .15);
  --line-warm: rgba(215, 164, 86, .24);
  --shadow-deep: 0 28px 70px rgba(0, 0, 0, .46);
  --shadow-book: 0 18px 34px rgba(0, 0, 0, .5), -8px 0 20px rgba(0, 0, 0, .2);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: "Avenir Next", Avenir, Montserrat, "Segoe UI", system-ui, sans-serif;
  --radius-xl: 34px;
  --radius-lg: 22px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  min-width: 300px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 14% 5%, rgba(38, 87, 85, .38), transparent 31rem),
    radial-gradient(circle at 93% 14%, rgba(111, 41, 49, .18), transparent 30rem),
    linear-gradient(180deg, var(--night-950) 0, var(--night-900) 45rem, #081617 100%);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  color: var(--night-950);
  background: var(--amber-bright);
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button,
input {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 4px;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  color: var(--night-950);
  background: var(--amber-bright);
  font-weight: 800;
  transform: translateY(-180%);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-veil {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .05) 0 1px, transparent 1.3px),
    radial-gradient(circle at 78% 18%, rgba(241, 200, 117, .06) 0 1px, transparent 1.4px),
    radial-gradient(circle at 65% 72%, rgba(255, 255, 255, .035) 0 1px, transparent 1.5px);
  background-size: 39px 39px, 71px 71px, 97px 97px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

.site-header {
  position: absolute;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  border-bottom: 1px solid rgba(244, 232, 206, .08);
  background: linear-gradient(180deg, rgba(4, 16, 18, .88), rgba(4, 16, 18, .1));
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1320px, calc(100% - 3rem));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: var(--ivory);
}

.brand-seal {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 164, 86, .55);
  border-radius: 50% 50% 48% 52%;
  color: var(--amber-bright);
  background: radial-gradient(circle at 35% 25%, rgba(215, 164, 86, .15), transparent 65%);
  box-shadow: inset 0 0 0 4px rgba(4, 16, 18, .7), 0 0 28px rgba(215, 164, 86, .08);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-style: italic;
}

.brand > span:last-child {
  display: grid;
  line-height: 1.1;
}

.brand strong {
  font-family: var(--serif);
  font-size: 1.04rem;
  font-weight: 500;
  letter-spacing: .025em;
}

.brand small {
  margin-top: .15rem;
  color: var(--paper);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .23em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  color: var(--ivory-soft);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.main-nav a {
  position: relative;
  padding: .65rem 0;
}

.main-nav a::after {
  position: absolute;
  right: 50%;
  bottom: .3rem;
  left: 50%;
  height: 1px;
  content: "";
  background: var(--amber);
  transition: right .2s ease, left .2s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  right: 0;
  left: 0;
}

.hero {
  position: relative;
  min-height: 840px;
  overflow: hidden;
  padding: 10rem 0 0;
  border-bottom: 1px solid var(--line-warm);
  background:
    linear-gradient(90deg, rgba(3, 13, 15, .58), rgba(3, 13, 15, .04) 58%, rgba(3, 13, 15, .38)),
    radial-gradient(ellipse at 76% 36%, rgba(33, 91, 88, .35), transparent 35rem),
    radial-gradient(ellipse at 20% 80%, rgba(95, 45, 34, .3), transparent 36rem),
    linear-gradient(145deg, #061719 0, #0d292a 50%, #071718 100%);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .18;
  background:
    repeating-linear-gradient(90deg, transparent 0 84px, rgba(255, 255, 255, .035) 85px 86px),
    linear-gradient(180deg, transparent 70%, rgba(30, 13, 10, .62));
  mask-image: linear-gradient(to right, #000, transparent 45%);
}

.hero::after {
  position: absolute;
  right: -8vw;
  bottom: 108px;
  width: 50vw;
  height: 35px;
  content: "";
  border-radius: 50%;
  background: rgba(0, 0, 0, .46);
  filter: blur(22px);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 3rem));
  min-height: 570px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, .98fr);
  align-items: center;
  gap: clamp(2rem, 8vw, 7rem);
}

.hero-copy {
  position: relative;
  z-index: 4;
  max-width: 690px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  margin: 0 0 1.1rem;
  color: var(--amber);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.hero-kicker::before,
.section-kicker::before,
.detail-kicker::before {
  display: inline-block;
  width: 32px;
  height: 1px;
  margin: 0 .7rem .25rem 0;
  content: "";
  background: currentColor;
}

.hero h1 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(3.9rem, 7.2vw, 7.2rem);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .88;
  text-wrap: balance;
}

.hero h1 em {
  color: var(--amber-bright);
  font-weight: 400;
}

.hero-intro {
  max-width: 580px;
  margin: 2rem 0 0;
  color: var(--ivory-soft);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.75;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
}

.hero-cta {
  width: fit-content;
  margin-top: 2rem;
  padding: .82rem 1.2rem .78rem;
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  border: 1px solid rgba(215, 164, 86, .45);
  border-radius: 999px;
  color: var(--ivory);
  background: rgba(215, 164, 86, .08);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.hero-actions .hero-cta {
  margin-top: 0;
}

.hero-cta-admin {
  border-color: var(--amber-bright);
  color: var(--night-950);
  background: var(--amber-bright);
  box-shadow: 0 10px 30px rgba(215, 164, 86, .2);
}

.hero-cta:hover {
  color: var(--night-950);
  background: var(--amber-bright);
  transform: translateY(-2px);
}

.hero-cta-admin:hover {
  background: var(--ivory);
}

.hero-cta span {
  font-size: 1.1rem;
}

.hero-library {
  position: relative;
  min-height: 470px;
  display: grid;
  place-items: end center;
  perspective: 1200px;
}

.hero-books {
  position: relative;
  z-index: 2;
  width: min(100%, 570px);
  height: 430px;
}

.hero-book {
  position: absolute;
  bottom: 20px;
  overflow: hidden;
  border: 1px solid rgba(244, 232, 206, .2);
  border-radius: 5px 10px 10px 5px;
  background: var(--wood-900);
  box-shadow: var(--shadow-book);
  transform-origin: bottom center;
  transition: z-index 0s, transform .35s ease, box-shadow .35s ease;
}

.hero-book:hover {
  z-index: 10;
  box-shadow: 0 35px 70px rgba(0, 0, 0, .64), 0 0 34px rgba(215, 164, 86, .12);
  transform: translateY(-18px) rotate(0deg) !important;
}

.hero-book img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: var(--night-950);
}

.hero-book-1 {
  z-index: 3;
  left: 19%;
  width: 205px;
  height: 315px;
  transform: rotate(-7deg) translateY(-4px);
}

.hero-book-2 {
  z-index: 4;
  left: 37%;
  width: 230px;
  height: 355px;
  transform: rotate(1.5deg);
}

.hero-book-3 {
  z-index: 2;
  right: 3%;
  width: 195px;
  height: 300px;
  transform: rotate(8deg) translateY(4px);
}

.wood-shelf {
  position: absolute;
  z-index: 1;
  right: 2%;
  bottom: 2px;
  left: 2%;
  height: 35px;
  border: 1px solid rgba(244, 232, 206, .13);
  border-radius: 5px 5px 11px 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .13), transparent 25%),
    repeating-linear-gradient(94deg, rgba(255, 255, 255, .025) 0 2px, transparent 3px 17px),
    linear-gradient(90deg, var(--wood-900), var(--wood-600) 38%, var(--wood-800) 75%, #311713);
  box-shadow: 0 20px 28px rgba(0, 0, 0, .55), inset 0 -7px 12px rgba(0, 0, 0, .4);
}

.hero-moon {
  position: absolute;
  z-index: 1;
  top: 14%;
  right: 7%;
  width: clamp(240px, 28vw, 430px);
  aspect-ratio: 1;
  border: 1px solid rgba(215, 164, 86, .13);
  border-radius: 50%;
  opacity: .7;
  box-shadow: 0 0 100px rgba(215, 164, 86, .04), inset 0 0 90px rgba(215, 164, 86, .025);
}

.hero-moon::before,
.hero-moon::after,
.hero-moon span {
  position: absolute;
  border: 1px solid rgba(215, 164, 86, .12);
  border-radius: 50%;
  content: "";
}

.hero-moon::before {
  inset: 11%;
}

.hero-moon::after {
  inset: 24%;
}

.hero-moon span {
  inset: 42%;
  background: rgba(215, 164, 86, .11);
  box-shadow: 0 0 28px rgba(215, 164, 86, .15);
}

.hero-stars {
  position: absolute;
  top: 18%;
  left: 47%;
  color: rgba(215, 164, 86, .5);
  font-size: .78rem;
  letter-spacing: .8em;
  transform: rotate(-16deg);
}

.hero-stats {
  position: relative;
  z-index: 5;
  width: min(1160px, calc(100% - 3rem));
  min-height: 112px;
  margin: 0 auto;
  padding: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(244, 232, 206, .1);
  background: linear-gradient(90deg, transparent, rgba(4, 16, 18, .22), transparent);
}

.hero-stats div {
  display: grid;
  place-content: center;
  text-align: center;
  border-right: 1px solid rgba(244, 232, 206, .1);
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats strong {
  color: var(--amber-bright);
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1;
}

.hero-stats span {
  margin-top: .4rem;
  color: var(--paper);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.main-shell {
  width: min(1320px, calc(100% - 3rem));
  margin: 0 auto;
}

.featured-section,
.library-section {
  padding: clamp(5rem, 8vw, 8rem) 0;
}

.featured-section {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 3rem;
}

.section-heading h2,
.reading-note h2 {
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .98;
}

.section-heading > p {
  max-width: 420px;
  margin: 0 0 .3rem;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.7;
}

.featured-shelf {
  position: relative;
  padding: 1rem 1rem 3rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(.85rem, 2vw, 1.5rem);
}

.featured-shelf::before {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 1.05rem;
  left: 0;
  height: 31px;
  content: "";
  border: 1px solid rgba(244, 232, 206, .11);
  border-radius: 5px 5px 13px 13px;
  background:
    repeating-linear-gradient(92deg, transparent 0 28px, rgba(255, 255, 255, .025) 29px 30px),
    linear-gradient(90deg, #321814, #6b3828 35%, #45231b 78%, #2b1512);
  box-shadow: 0 18px 25px rgba(0, 0, 0, .5), inset 0 -8px 10px rgba(0, 0, 0, .4);
}

.featured-book {
  min-width: 0;
  display: grid;
  gap: 1rem;
  align-content: end;
  transition: transform .25s ease;
}

.featured-book:hover {
  transform: translateY(-10px);
}

.featured-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(244, 232, 206, .16);
  border-radius: 4px 9px 9px 4px;
  background: var(--night-950);
  box-shadow: var(--shadow-book);
}

.featured-cover::after,
.book-cover::after,
.detail-cover-wrap::after {
  position: absolute;
  top: 1%;
  bottom: 1%;
  left: 3px;
  width: 1px;
  content: "";
  background: rgba(255, 255, 255, .22);
  box-shadow: 3px 0 rgba(0, 0, 0, .23);
}

.featured-cover img,
.book-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #090d0d;
  transition: transform .4s ease, filter .4s ease;
}

.featured-book:hover img,
.book-card:hover .book-cover img {
  filter: saturate(1.05) brightness(1.04);
  transform: scale(1.025);
}

.featured-copy {
  min-width: 0;
  display: grid;
  gap: .17rem;
}

.featured-kicker,
.book-status {
  color: var(--amber);
  font-size: .59rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.featured-copy strong {
  overflow: hidden;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.18;
  text-overflow: ellipsis;
}

.featured-copy small {
  overflow: hidden;
  color: var(--paper);
  font-size: .75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-section {
  min-height: 100vh;
}

.library-toolbar {
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(18, 53, 55, .72), rgba(7, 25, 27, .82)),
    var(--night-850);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .025);
}

.search-form {
  height: 58px;
  padding: .35rem .4rem .35rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .75rem;
  border: 1px solid rgba(244, 232, 206, .16);
  border-radius: 16px;
  background: rgba(3, 14, 15, .56);
}

.search-form > span {
  color: var(--amber);
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1;
  transform: rotate(-15deg);
}

.search-form input {
  min-width: 0;
  height: 100%;
  padding: 0 .25rem;
  border: 0;
  outline: 0;
  color: var(--ivory);
  background: transparent;
}

.search-form input::placeholder {
  color: rgba(217, 201, 170, .58);
}

.search-form button {
  height: 44px;
  padding: 0 1.25rem;
  border: 1px solid rgba(215, 164, 86, .42);
  border-radius: 12px;
  color: var(--night-950);
  background: linear-gradient(135deg, var(--amber-bright), #c78d3e);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: filter .2s ease, transform .2s ease;
}

.search-form button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.toolbar-row {
  padding: .85rem .15rem .05rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.filter-pill {
  padding: .55rem .85rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--paper);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .05em;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.filter-pill:hover {
  color: var(--ivory);
  border-color: var(--line-warm);
}

.filter-pill.active {
  color: var(--amber-bright);
  border-color: rgba(215, 164, 86, .3);
  background: rgba(215, 164, 86, .09);
}

.view-switch {
  display: flex;
  gap: .35rem;
}

.view-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--paper);
  background: rgba(4, 16, 18, .34);
  cursor: pointer;
}

.view-button.active {
  color: var(--amber-bright);
  border-color: var(--line-warm);
  background: rgba(215, 164, 86, .08);
}

.results-line {
  margin: 0 0 1.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--paper);
  font-size: .73rem;
  letter-spacing: .06em;
}

.results-line p {
  margin: 0;
  color: var(--ivory-soft);
  font-weight: 800;
  text-transform: uppercase;
}

.results-line a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1.4rem, 2.6vw, 2.5rem) clamp(1rem, 2vw, 1.75rem);
  transition: opacity .2s ease;
}

.book-card {
  min-width: 0;
}

.book-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.book-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(244, 232, 206, .14);
  border-radius: 5px 12px 12px 5px;
  background: #080e0e;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .42), -5px 2px 12px rgba(0, 0, 0, .2);
  transform: translateZ(0);
  transition: border-color .25s ease, box-shadow .3s ease, transform .3s ease;
}

.book-card:hover .book-cover {
  border-color: rgba(215, 164, 86, .38);
  box-shadow: 0 25px 48px rgba(0, 0, 0, .56), -8px 3px 18px rgba(0, 0, 0, .24);
  transform: translateY(-7px);
}

.book-glow {
  position: absolute;
  z-index: 2;
  right: -20%;
  bottom: -25%;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: rgba(215, 164, 86, .23);
  filter: blur(30px);
  transition: opacity .3s ease;
}

.book-card:hover .book-glow {
  opacity: .55;
}

.favorite-mark {
  position: absolute;
  z-index: 4;
  top: .7rem;
  right: .7rem;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 232, 206, .2);
  border-radius: 50%;
  color: #ffd7a0;
  background: rgba(76, 22, 29, .84);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .34);
  backdrop-filter: blur(8px);
  font-size: .85rem;
}

.book-info {
  min-width: 0;
  display: grid;
  align-content: start;
}

.book-info strong {
  margin-top: .35rem;
  overflow: hidden;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  font-weight: 500;
  letter-spacing: -.015em;
  line-height: 1.18;
  text-wrap: balance;
}

.book-author {
  margin-top: .25rem;
  overflow: hidden;
  color: var(--paper);
  font-size: .77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-meta {
  margin-top: .65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  color: rgba(199, 180, 143, .76);
  font-size: .65rem;
}

.stars {
  color: var(--amber-bright);
  letter-spacing: .08em;
}

.book-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.book-grid.compact .book-link {
  min-height: 180px;
  padding: .65rem;
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(14, 41, 42, .45);
}

.book-grid.compact .book-cover {
  height: 158px;
  aspect-ratio: 2 / 3;
}

.book-grid.compact .book-info strong {
  font-size: 1.25rem;
}

.empty-library {
  grid-column: 1 / -1;
  min-height: 360px;
  padding: 3rem;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border: 1px dashed var(--line-warm);
  border-radius: var(--radius-xl);
  background: rgba(14, 41, 42, .25);
}

.empty-library > span {
  color: var(--amber);
  font-family: var(--serif);
  font-size: 3rem;
}

.empty-library h3 {
  margin: .4rem 0 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
}

.empty-library p {
  margin: .5rem 0 1.2rem;
  color: var(--paper);
}

.empty-library a {
  color: var(--amber-bright);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.detail-main {
  position: relative;
  min-height: 100vh;
  padding: 9rem 1.5rem 6rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 45%, rgba(48, 101, 97, .33), transparent 28rem),
    radial-gradient(circle at 80% 80%, rgba(96, 48, 37, .23), transparent 30rem);
}

.detail-main::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: .12;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 104px, rgba(255, 255, 255, .04) 105px 106px);
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.back-link {
  margin-bottom: 2.2rem;
  display: inline-flex;
  align-items: center;
  color: var(--ivory-soft);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.back-link:hover {
  color: var(--amber-bright);
}

.book-detail {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
}

.detail-cover-wrap {
  position: relative;
  min-width: 0;
  aspect-ratio: 2 / 3;
}

.detail-cover {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border: 1px solid rgba(244, 232, 206, .2);
  border-radius: 6px 14px 14px 6px;
  background: #070d0d;
  box-shadow: 0 35px 70px rgba(0, 0, 0, .58), -12px 4px 25px rgba(0, 0, 0, .28);
}

.detail-cover-halo {
  position: absolute;
  z-index: 1;
  inset: 10%;
  border-radius: 50%;
  background: rgba(215, 164, 86, .2);
  filter: blur(60px);
}

.detail-copy h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 400;
  letter-spacing: -.06em;
  line-height: .93;
  text-wrap: balance;
}

.detail-author {
  margin: 1.2rem 0 0;
  color: var(--ivory-soft);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
}

.detail-heart {
  width: fit-content;
  margin-top: 1.4rem;
  padding: .45rem .75rem;
  display: inline-flex;
  border: 1px solid rgba(188, 78, 90, .36);
  border-radius: 999px;
  color: #f2b1b8;
  background: rgba(111, 41, 49, .24);
  font-size: .69rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-rating {
  margin-top: 1.6rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}

.detail-rating .stars {
  font-size: 1.15rem;
}

.detail-rating strong {
  color: var(--ivory-soft);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
}

.detail-meta {
  margin: 2rem 0 0;
  padding: 1.2rem 0;
  display: flex;
  gap: 3rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-meta div {
  display: grid;
  gap: .2rem;
}

.detail-meta dt {
  color: var(--paper);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.detail-meta dd {
  margin: 0;
  color: var(--ivory);
  font-family: var(--serif);
  font-size: 1.05rem;
}

.reading-note {
  margin-top: 2rem;
}

.reading-note .section-kicker {
  margin-bottom: .6rem;
}

.reading-note h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.reading-note blockquote {
  margin: 1.3rem 0 0;
  padding: 1rem 0 1rem 1.3rem;
  border-left: 2px solid var(--amber);
  color: var(--ivory-soft);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.75;
}

.no-note {
  margin: 1rem 0 0;
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
}

.detail-stars {
  position: absolute;
  top: 18%;
  right: 8%;
  color: rgba(215, 164, 86, .35);
  letter-spacing: .9em;
}

.error-main {
  min-height: 88vh;
  padding: 10rem 1.5rem 5rem;
  display: grid;
  place-items: center;
}

.error-card {
  max-width: 680px;
  padding: 4rem;
  text-align: center;
  border: 1px solid var(--line-warm);
  border-radius: var(--radius-xl);
  background: rgba(14, 41, 42, .45);
  box-shadow: var(--shadow-deep);
}

.error-card > span {
  color: var(--amber);
  font-size: 3.5rem;
}

.error-card h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
}

.error-card p:not(.section-kicker) {
  color: var(--paper);
}

.site-footer {
  min-height: 230px;
  padding: 4rem 1.5rem;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border-top: 1px solid var(--line-warm);
  background:
    linear-gradient(rgba(3, 12, 13, .75), rgba(3, 12, 13, .92)),
    repeating-linear-gradient(90deg, var(--wood-900) 0 3px, var(--wood-800) 4px 70px);
}

.footer-ornament {
  color: var(--amber);
  font-size: 1rem;
}

.site-footer p {
  margin: .7rem 0 0;
  color: var(--ivory-soft);
  font-family: var(--serif);
  font-size: 1.05rem;
}

.site-footer .footer-note {
  margin-top: .25rem;
  color: rgba(199, 180, 143, .62);
  font-family: var(--sans);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.reveal {
  opacity: 1;
  transform: none;
}

@media (max-width: 1120px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(330px, .82fr);
    gap: 1rem;
  }

  .hero-book-1 {
    left: 8%;
  }

  .hero-book-2 {
    left: 29%;
  }

  .hero-book-3 {
    right: 0;
  }

  .featured-shelf {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 3rem;
  }

  .book-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .header-inner,
  .main-shell,
  .hero-inner,
  .hero-stats {
    width: min(100% - 2rem, 720px);
  }

  .main-nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 8rem;
  }

  .hero-inner {
    min-height: 0;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy {
    margin: 0 auto;
  }

  .hero-kicker::before {
    display: none;
  }

  .hero-intro {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-cta {
    margin-right: auto;
    margin-left: auto;
  }

  .hero-library {
    min-height: 390px;
  }

  .hero-books {
    width: min(100%, 500px);
    height: 370px;
  }

  .hero-book-1 {
    left: 12%;
    width: 175px;
    height: 270px;
  }

  .hero-book-2 {
    left: 35%;
    width: 196px;
    height: 302px;
  }

  .hero-book-3 {
    right: 7%;
    width: 165px;
    height: 254px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    padding: 0;
  }

  .hero-stats div {
    min-height: 90px;
    border-bottom: 1px solid rgba(244, 232, 206, .1);
  }

  .hero-stats div:nth-child(2) {
    border-right: 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 1rem;
  }

  .section-heading > p {
    max-width: 580px;
  }

  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .book-grid.compact {
    grid-template-columns: 1fr;
  }

  .book-detail {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .site-header {
    position: absolute;
  }

  .header-inner {
    min-height: 72px;
  }

  .brand-seal {
    width: 38px;
    height: 38px;
  }

  .hero {
    padding-top: 7.4rem;
  }

  .hero h1 {
    font-size: clamp(3.35rem, 17vw, 5.2rem);
  }

  .hero-intro {
    max-width: 34rem;
    font-size: 1rem;
  }

  .hero-library {
    min-height: 330px;
  }

  .hero-books {
    height: 315px;
  }

  .hero-book-1 {
    left: 5%;
    width: 145px;
    height: 224px;
  }

  .hero-book-2 {
    left: 30%;
    width: 166px;
    height: 256px;
  }

  .hero-book-3 {
    right: 2%;
    width: 138px;
    height: 212px;
  }

  .wood-shelf {
    right: 0;
    left: 0;
  }

  .hero-stats span {
    letter-spacing: .08em;
  }

  .featured-section,
  .library-section {
    padding: 4.5rem 0;
  }

  .featured-shelf {
    margin-right: -1rem;
    margin-left: -1rem;
    padding-right: 1rem;
    padding-left: 1rem;
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .featured-book {
    flex: 0 0 43vw;
    scroll-snap-align: start;
  }

  .featured-shelf::before {
    display: none;
  }

  .search-form {
    height: auto;
    grid-template-columns: auto 1fr;
  }

  .search-form input {
    min-height: 46px;
  }

  .search-form button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .toolbar-row {
    align-items: start;
  }

  .view-switch {
    display: none;
  }

  .results-line {
    align-items: start;
    flex-direction: column;
    gap: .25rem;
  }

  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.8rem .9rem;
  }

  .book-info strong {
    font-size: 1rem;
  }

  .book-meta {
    align-items: start;
    flex-direction: column;
  }

  .detail-main {
    padding-top: 7rem;
  }

  .book-detail {
    grid-template-columns: 1fr;
  }

  .detail-cover-wrap {
    width: min(72vw, 330px);
    margin: 0 auto;
  }

  .detail-copy {
    text-align: center;
  }

  .detail-copy h1 {
    font-size: clamp(2.9rem, 14vw, 4.8rem);
  }

  .detail-heart,
  .detail-rating {
    margin-right: auto;
    margin-left: auto;
  }

  .detail-meta {
    justify-content: center;
  }

  .reading-note blockquote {
    text-align: left;
  }

  .error-card {
    padding: 2.5rem 1.5rem;
  }
}

@media (max-width: 390px) {
  .brand strong {
    font-size: .94rem;
  }

  .brand small {
    letter-spacing: .16em;
  }

  .hero-book-1 {
    left: -2%;
  }

  .hero-book-2 {
    left: 26%;
  }

  .hero-book-3 {
    right: -4%;
  }

  .filter-list {
    gap: .25rem;
  }

  .filter-pill {
    padding: .48rem .63rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Administration, archives et cadrage — mécanisme CSP-safe par variables de classes. */
.cover-fit-cover { object-fit: cover !important; object-position: var(--cover-x, 50%) var(--cover-y, 50%) !important; }
.cover-fit-contain { object-fit: contain !important; object-position: var(--cover-x, 50%) var(--cover-y, 50%) !important; transform: none !important; }
.cover-x-0 { --cover-x: 0%; } .cover-x-5 { --cover-x: 5%; } .cover-x-10 { --cover-x: 10%; }
.cover-x-15 { --cover-x: 15%; } .cover-x-20 { --cover-x: 20%; } .cover-x-25 { --cover-x: 25%; }
.cover-x-30 { --cover-x: 30%; } .cover-x-35 { --cover-x: 35%; } .cover-x-40 { --cover-x: 40%; }
.cover-x-45 { --cover-x: 45%; } .cover-x-50 { --cover-x: 50%; } .cover-x-55 { --cover-x: 55%; }
.cover-x-60 { --cover-x: 60%; } .cover-x-65 { --cover-x: 65%; } .cover-x-70 { --cover-x: 70%; }
.cover-x-75 { --cover-x: 75%; } .cover-x-80 { --cover-x: 80%; } .cover-x-85 { --cover-x: 85%; }
.cover-x-90 { --cover-x: 90%; } .cover-x-95 { --cover-x: 95%; } .cover-x-100 { --cover-x: 100%; }
.cover-y-0 { --cover-y: 0%; } .cover-y-5 { --cover-y: 5%; } .cover-y-10 { --cover-y: 10%; }
.cover-y-15 { --cover-y: 15%; } .cover-y-20 { --cover-y: 20%; } .cover-y-25 { --cover-y: 25%; }
.cover-y-30 { --cover-y: 30%; } .cover-y-35 { --cover-y: 35%; } .cover-y-40 { --cover-y: 40%; }
.cover-y-45 { --cover-y: 45%; } .cover-y-50 { --cover-y: 50%; } .cover-y-55 { --cover-y: 55%; }
.cover-y-60 { --cover-y: 60%; } .cover-y-65 { --cover-y: 65%; } .cover-y-70 { --cover-y: 70%; }
.cover-y-75 { --cover-y: 75%; } .cover-y-80 { --cover-y: 80%; } .cover-y-85 { --cover-y: 85%; }
.cover-y-90 { --cover-y: 90%; } .cover-y-95 { --cover-y: 95%; } .cover-y-100 { --cover-y: 100%; }
.featured-book:hover .cover-fit-contain, .book-card:hover .cover-fit-contain { transform: none !important; }
.admin-link { color: var(--amber-bright); opacity: .8; }
.logout-form { margin: 0; }
.logout-form button, .admin-controls button { padding: 0; border: 0; color: var(--paper); background: none; cursor: pointer; font: inherit; text-transform: inherit; letter-spacing: inherit; }
.admin-main, .archive-main { min-height: 90vh; padding: 9rem 1.5rem 6rem; }
.admin-shell { width: min(1120px, 100%); margin: 0 auto; }
.admin-title, .archive-heading { margin-bottom: 2rem; display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
.admin-title h1, .admin-panel h1, .archive-main h1, .archive-heading h2 { margin: 0; color: var(--ivory); font-family: var(--serif); font-size: clamp(2.7rem, 6vw, 5rem); font-weight: 400; line-height: 1; }
.primary-button, .secondary-button { width: fit-content; padding: .8rem 1.05rem; display: inline-flex; justify-content: center; border: 1px solid var(--line-warm); border-radius: 11px; cursor: pointer; font-weight: 800; }
.primary-button { color: var(--night-950); background: linear-gradient(135deg, var(--amber-bright), #c78d3e); }
.secondary-button { color: var(--ivory); background: rgba(215,164,86,.08); }
.admin-panel, .candidate-card { margin: 1.2rem 0; padding: clamp(1.3rem, 4vw, 2.4rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(14,41,42,.68); box-shadow: var(--shadow-deep); }
.login-panel { width: min(520px, 100%); margin: 4rem auto; }
.admin-panel h2 { margin: 0 0 1rem; font-family: var(--serif); font-size: 1.8rem; font-weight: 400; }
.admin-summary, .archive-stats { display: flex; flex-wrap: wrap; gap: .7rem; }
.admin-summary span, .archive-stats span { padding: .65rem .9rem; border: 1px solid var(--line-warm); border-radius: 999px; color: var(--paper); background: rgba(215,164,86,.06); font-size: .78rem; }
.admin-summary strong, .archive-stats strong { color: var(--amber-bright); }
.admin-list { margin: 0; padding: 0; list-style: none; }
.admin-list li { padding: .8rem 0; display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.admin-list-actions { display: flex; flex-wrap: wrap; gap: .8rem; color: var(--amber-bright); }
.admin-list-actions b { color: #f2b1b8; }
.admin-form { display: grid; gap: 1.4rem; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.admin-form label { display: grid; gap: .35rem; color: var(--ivory-soft); font-size: .76rem; font-weight: 800; letter-spacing: .04em; }
.admin-form .wide { grid-column: 1 / -1; }
.admin-form input, .admin-form select, .admin-form textarea { width: 100%; padding: .75rem; border: 1px solid rgba(244,232,206,.18); border-radius: 10px; color: var(--ivory); background: rgba(3,14,15,.72); font: inherit; }
.admin-form .check-label { display: flex; align-items: center; }
.admin-form .check-label input { width: auto; }
.admin-form fieldset { padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius-md); }
.admin-form legend { padding: 0 .5rem; color: var(--amber); font-weight: 800; }
.form-error, .form-notice { padding: .8rem 1rem; border-radius: 10px; }
.form-error { color: #ffd2d6; background: rgba(111,41,49,.45); }
.form-notice { color: var(--ivory); background: rgba(215,164,86,.12); }
.crop-editor { display: grid; grid-template-columns: 190px minmax(0,1fr); align-items: center; gap: 2rem; }
.cover-preview, .candidate-preview { aspect-ratio: 2 / 3; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line-warm); border-radius: 7px; color: var(--paper); background: #070d0d; text-align: center; }
.cover-preview img, .candidate-preview img { width: 100%; height: 100%; display: block; }
.candidate-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.2rem; }
.candidate-card { margin: 0; padding: 1rem; }
.candidate-card h3 { margin: .8rem 0 .2rem; font-family: var(--serif); font-weight: 400; }
.candidate-card p { margin: .2rem 0; color: var(--paper); font-size: .73rem; }
.candidate-actions { margin-top: .8rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.candidate-actions form { margin: 0; }
.candidate-status { color: var(--paper); text-transform: uppercase; }
.candidate-status.approved { color: #9ed5ba; }
.candidate-status.rejected { color: #d59e9e; }
.admin-controls { margin-top: .55rem; display: flex; flex-wrap: wrap; gap: .6rem; color: var(--amber); font-size: .65rem; }
.admin-controls form { margin: 0; }
.archive-main .section-heading { padding-top: 1rem; }
.archive-year { padding: 2rem 0 5rem; border-top: 1px solid var(--line); }
.archive-heading h2 { font-size: clamp(2.8rem,7vw,5.5rem); color: var(--amber-bright); }
.camille-reading {
  position: fixed;
  z-index: 4;
  top: 88px;
  right: clamp(12px, 3vw, 42px);
  width: clamp(110px, 16vw, 190px);
  max-height: 210px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .42));
}
@media (max-width: 760px) {
  .form-grid, .candidate-grid { grid-template-columns: 1fr; }
  .admin-title, .archive-heading, .admin-list li { align-items: start; flex-direction: column; }
  .crop-editor { grid-template-columns: 130px minmax(0,1fr); gap: 1rem; }
  .admin-main, .archive-main { padding: 7rem 1rem 4rem; }
  .camille-reading { top: 76px; width: 96px; opacity: .92; }
}
