:root {
  --green: #18362f;
  --green-2: #21473d;
  --cream: #f3eddc;
  --paper: #fbf8ef;
  --gold: #b49a61;
  --ink: #1f2623;
  --muted: #6d746f;
  --line: rgba(24,54,47,.18);
  --shadow: 0 18px 50px rgba(12, 29, 25, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "EB Garamond", Georgia, serif;
  line-height: 1.55;
}

a { color: inherit; }

.wrap {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  background: var(--green);
  color: var(--cream);
  border-bottom: 1px solid rgba(180,154,97,.55);
}

.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  text-decoration: none;
  letter-spacing: .15em;
  font-size: 1.15rem;
  font-weight: 600;
}

.brand small {
  display: block;
  margin-top: 2px;
  font-size: .66rem;
  letter-spacing: .22em;
  color: #cdbb91;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 26px;
  font-size: 1rem;
}

nav a {
  text-decoration: none;
  opacity: .92;
}

nav a:hover { color: #d9c79e; }

.hero {
  background:
    linear-gradient(rgba(24,54,47,.97), rgba(24,54,47,.97)),
    radial-gradient(circle at 75% 20%, rgba(180,154,97,.25), transparent 35%);
  color: var(--cream);
  padding: 88px 0 92px;
  border-bottom: 1px solid rgba(180,154,97,.45);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 70px;
  align-items: end;
}

.eyebrow {
  color: #cfbd94;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  font-weight: 600;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-size: clamp(3.3rem, 8vw, 6.7rem);
  line-height: .88;
  letter-spacing: -.035em;
  font-weight: 500;
  margin: 15px 0 24px;
}

.hero p {
  max-width: 690px;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: #e6dfcd;
  margin-bottom: 0;
}

.hero-note {
  border-left: 1px solid var(--gold);
  padding-left: 26px;
  color: #d7cfbc;
  font-size: 1rem;
}

.section {
  padding: 78px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.section h2 {
  font-size: 2rem;
  font-weight: 500;
  margin: 0;
}

.section-head span {
  color: var(--muted);
  font-size: .95rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 28px;
}

.book-card {
  text-decoration: none;
  display: block;
}

.cover {
  aspect-ratio: 5.5 / 8.5;
  background: var(--green);
  border: 1px solid rgba(180,154,97,.72);
  box-shadow: var(--shadow);
  padding: 8%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--cream);
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(180,154,97,.5);
  pointer-events: none;
}

.book-card:hover .cover {
  transform: translateY(-4px);
  box-shadow: 0 24px 62px rgba(12,29,25,.17);
}

.cover-kicker {
  font-size: .67rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #cbb886;
}

.cover-title {
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  line-height: .96;
  font-weight: 500;
  letter-spacing: -.02em;
  padding-right: 6%;
}

.cover-author {
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ded5bf;
}

.card-copy {
  padding: 18px 3px 0;
}

.card-copy h3 {
  font-size: 1.35rem;
  line-height: 1.1;
  font-weight: 500;
  margin-bottom: 7px;
}

.card-copy p {
  color: var(--muted);
  margin: 0;
}

.about {
  background: #eee7d4;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 70px;
}

.about-copy p {
  font-size: 1.22rem;
  max-width: 760px;
}

.site-footer {
  background: var(--green);
  color: #ddd5c3;
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  font-size: .95rem;
}

.footer-inner a {
  color: #d2bd8d;
  text-decoration: none;
}

.book-page {
  padding: 72px 0 92px;
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(250px, 360px) 1fr;
  gap: 70px;
  align-items: start;
}

.book-page .cover {
  position: sticky;
  top: 28px;
}

.book-meta {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  margin-bottom: 15px;
}

.book-page h1 {
  color: var(--green);
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: .95;
  margin: 0 0 18px;
}

.byline {
  font-size: 1.35rem;
  color: #45514c;
  margin-bottom: 30px;
}

.lede {
  font-size: 1.35rem;
  max-width: 740px;
}

.buy {
  display: inline-block;
  margin: 22px 0 38px;
  padding: 13px 20px 12px;
  background: var(--green);
  color: var(--cream);
  border: 1px solid var(--green);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: .05em;
}

.buy:hover {
  background: var(--green-2);
}

.details {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 16px 30px;
  max-width: 620px;
}

.details div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.details strong {
  display: block;
  font-size: .75rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.note {
  margin-top: 34px;
  padding: 18px 20px;
  background: #f1ead8;
  border-left: 3px solid var(--gold);
  max-width: 760px;
  color: #4b524f;
}

@media (max-width: 900px) {
  .hero-grid, .about-grid, .book-layout { grid-template-columns: 1fr; }
  .hero-grid { gap: 36px; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .book-page .cover { position: relative; top: 0; max-width: 340px; }
}

@media (max-width: 620px) {
  .wrap { width: min(100% - 28px, 1160px); }
  .header-inner { min-height: 78px; }
  nav { gap: 14px; font-size: .92rem; }
  .brand small { display: none; }
  .hero { padding: 64px 0 68px; }
  .book-grid { grid-template-columns: 1fr; gap: 34px; }
  .cover { max-width: 410px; }
  .section { padding: 58px 0; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .details { grid-template-columns: 1fr; }
}

.real-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5.5 / 8.5;
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 1px solid rgba(24,54,47,.16);
  transition: transform .18s ease, box-shadow .18s ease;
}
.book-card:hover .real-cover {
  transform: translateY(-4px);
  box-shadow: 0 24px 62px rgba(12,29,25,.17);
}
.book-page .real-cover {
  width: 100%;
  max-width: 360px;
}
.coming-soon {
  display: inline-block;
  margin: 22px 0 38px;
  padding: 11px 17px 10px;
  border: 1px solid var(--gold);
  color: var(--green);
  background: #f1ead8;
  letter-spacing: .05em;
}

.brand {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
}
.brand-mark {
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}
.brand small {
  grid-column: 2;
}
@media (max-width: 620px) {
  .brand-mark {
    width: 26px;
    height: 26px;
  }
}

.book-gallery {
  width: 100%;
  max-width: 360px;
}
.book-gallery-stage {
  width: 100%;
  aspect-ratio: 5.5 / 8.5;
  display: grid;
  place-items: center;
  background: rgba(24,54,47,.035);
  border: 1px solid rgba(24,54,47,.12);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.book-gallery-stage .real-cover {
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
  object-fit: contain;
  border: 0;
  box-shadow: none;
  transition: opacity .12s ease;
}
.book-gallery-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}
.book-gallery-choice {
  appearance: none;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 7px 10px 7px 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.book-gallery-choice:hover {
  border-color: rgba(180,154,97,.75);
  background: rgba(180,154,97,.07);
}
.book-gallery-choice:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.book-gallery-choice.is-active,
.book-gallery-choice[aria-pressed="true"] {
  border-color: var(--gold);
  background: #f1ead8;
}
.book-gallery-choice img {
  width: 42px;
  height: 48px;
  display: block;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(24,54,47,.12);
}
.book-gallery-choice span {
  display: block;
  line-height: 1.05;
}
.book-gallery-choice small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 900px) {
  .book-gallery { max-width: 340px; }
}
@media (max-width: 620px) {
  .book-gallery { max-width: 410px; }
  .book-gallery-controls { gap: 8px; }
  .book-gallery-choice { min-height: 58px; padding-right: 8px; }
  }
@media (prefers-reduced-motion: reduce) {
  .book-gallery-stage .real-cover,
  .book-gallery-choice { transition: none; }
}

/* Cover gallery: click the main image to open a near-full-screen viewer. */
.book-gallery-stage {
  appearance: none;
  position: relative;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}
.book-gallery-stage:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.book-gallery-expand {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(243,237,220,.58);
  border-radius: 999px;
  background: rgba(24,54,47,.84);
  color: var(--cream);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  opacity: .88;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.book-gallery-stage:hover .book-gallery-expand,
.book-gallery-stage:focus-visible .book-gallery-expand {
  opacity: 1;
  transform: scale(1.05);
}

body.lightbox-open {
  overflow: hidden;
}

.book-lightbox[hidden] {
  display: none !important;
}
.book-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
}
.book-lightbox-backdrop {
  appearance: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: rgba(6, 12, 10, .94);
  cursor: default;
}
.book-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 96vw);
  height: min(94vh, 980px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #101713;
  border: 1px solid rgba(243,237,220,.18);
  box-shadow: 0 28px 90px rgba(0,0,0,.48);
}
.book-lightbox-toolbar {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid rgba(243,237,220,.13);
  color: var(--cream);
}
.book-lightbox-side-label {
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(243,237,220,.84);
}
.book-lightbox-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.book-lightbox-tool,
.book-lightbox-level,
.book-lightbox-close,
.book-lightbox-arrow,
.book-lightbox-side {
  appearance: none;
  font: inherit;
  color: var(--cream);
  cursor: pointer;
}
.book-lightbox-tool,
.book-lightbox-level,
.book-lightbox-close {
  min-width: 38px;
  height: 38px;
  border: 1px solid rgba(243,237,220,.22);
  background: rgba(255,255,255,.045);
}
.book-lightbox-tool {
  font-size: 1.35rem;
  line-height: 1;
}
.book-lightbox-tool:disabled {
  opacity: .35;
  cursor: default;
}
.book-lightbox-level {
  min-width: 64px;
  padding: 0 9px;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
.book-lightbox-close {
  width: 40px;
  font-size: 1.55rem;
  line-height: 1;
}
.book-lightbox-tool:hover:not(:disabled),
.book-lightbox-level:hover,
.book-lightbox-close:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(180,154,97,.78);
}
.book-lightbox-tool:focus-visible,
.book-lightbox-level:focus-visible,
.book-lightbox-close:focus-visible,
.book-lightbox-arrow:focus-visible,
.book-lightbox-side:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.book-lightbox-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  place-items: center;
  padding: 22px 72px;
  scrollbar-color: rgba(243,237,220,.35) transparent;
}
.book-lightbox-image-wrap {
  min-width: min-content;
  min-height: min-content;
  display: grid;
  place-items: center;
}
.book-lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(78vw, 720px);
  max-height: calc(94vh - 178px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
  box-shadow: 0 20px 60px rgba(0,0,0,.42);
}
.book-lightbox-image.is-zoomed {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
.book-lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 64px;
  border: 1px solid rgba(243,237,220,.18);
  background: rgba(16,23,19,.72);
  font-family: Georgia, serif;
  font-size: 2.2rem;
  line-height: 1;
}
.book-lightbox-prev {
  left: max(26px, calc(50vw - 550px));
}
.book-lightbox-next {
  right: max(26px, calc(50vw - 550px));
}
.book-lightbox-arrow:hover {
  background: rgba(24,54,47,.95);
  border-color: rgba(180,154,97,.72);
}

.book-lightbox-footer {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(243,237,220,.13);
}
.book-lightbox-side {
  display: grid;
  grid-template-columns: 34px auto;
  align-items: center;
  gap: 8px;
  min-width: 118px;
  padding: 6px 12px 6px 6px;
  border: 1px solid rgba(243,237,220,.18);
  background: transparent;
  text-align: left;
}
.book-lightbox-side:hover {
  background: rgba(255,255,255,.055);
}
.book-lightbox-side.is-active,
.book-lightbox-side[aria-pressed="true"] {
  border-color: var(--gold);
  background: rgba(180,154,97,.12);
}
.book-lightbox-side img {
  width: 34px;
  height: 42px;
  object-fit: cover;
  border: 1px solid rgba(243,237,220,.16);
}
.book-lightbox-side span {
  font-size: .92rem;
}

@media (max-width: 700px) {
  .book-lightbox {
    padding: 0;
  }
  .book-lightbox-panel {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border: 0;
  }
  .book-lightbox-toolbar {
    min-height: 54px;
    grid-template-columns: 1fr auto;
    padding: 8px 10px 8px 14px;
  }
  .book-lightbox-side-label {
    font-size: .8rem;
  }
  .book-lightbox-zoom {
    position: absolute;
    right: 56px;
  }
  .book-lightbox-tool {
    display: none;
  }
  .book-lightbox-level {
    min-width: 58px;
    height: 36px;
  }
  .book-lightbox-close {
    grid-column: 2;
    width: 38px;
    height: 38px;
  }
  .book-lightbox-viewport {
    padding: 12px 12px 20px;
  }
  .book-lightbox-image {
    max-width: 94vw;
    max-height: calc(100dvh - 146px);
  }
  .book-lightbox-arrow {
    display: none;
  }
  .book-lightbox-footer {
    padding: 8px 10px 10px;
  }
  .book-lightbox-side {
    min-width: 0;
    flex: 1 1 0;
    justify-content: center;
    grid-template-columns: 30px auto;
    max-width: 170px;
  }
  .book-lightbox-side img {
    width: 30px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-gallery-expand {
    transition: none;
  }
}


/* Zoomed cover fix: use a real scroll canvas so all four edges remain reachable. */
.book-lightbox-viewport.is-zoomed {
  display: block;
  padding: 0;
}
.book-lightbox-image-wrap.is-zoomed-canvas {
  display: block;
  min-width: 0;
  min-height: 0;
  position: relative;
}
.book-lightbox-image-wrap.is-zoomed-canvas .book-lightbox-image {
  position: absolute;
  top: 28px;
  left: 28px;
  margin: 0;
}

/* Refined full-screen cover viewer, inspired by retail product galleries. */
.book-lightbox {
  padding: 0;
  background: #173a31;
}
.book-lightbox-backdrop {
  background: #173a31;
}
.book-lightbox-panel {
  width: 100vw;
  height: 100dvh;
  max-height: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: 1fr;
  background: #173a31;
  border: 0;
  box-shadow: none;
}
.book-lightbox-viewport {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 26px 42px;
  background: #f5f1e7;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.book-lightbox-viewport::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.book-lightbox-viewport.is-zoomed {
  display: block;
  padding: 0;
  cursor: grab;
}
.book-lightbox-viewport.is-zoomed.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.book-lightbox-image {
  max-width: min(74vw, 760px);
  max-height: calc(100dvh - 52px);
  box-shadow: 0 18px 48px rgba(21,29,26,.18);
}
.book-lightbox-image.is-zoomed {
  cursor: inherit;
}
.book-lightbox-image-wrap.is-zoomed-canvas .book-lightbox-image {
  top: 34px;
  left: 34px;
}

.book-lightbox-rail {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #173a31;
  color: var(--cream);
  border-left: 1px solid rgba(180,154,97,.34);
}
.book-lightbox-rail-top {
  min-height: 58px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 12px;
}
.book-lightbox-close {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-size: 2rem;
  opacity: .92;
}
.book-lightbox-close:hover {
  background: rgba(255,255,255,.07);
  border-color: transparent;
}
.book-lightbox-rail-body {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 18px;
  align-items: start;
  padding: 4px 30px 0 24px;
}
.book-lightbox-title {
  grid-column: 2;
  padding-top: 9px;
  font-size: 1.36rem;
  line-height: 1.08;
  font-weight: 500;
  color: var(--cream);
}
.book-lightbox-zoom-vertical {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.book-lightbox-zoom-vertical .book-lightbox-tool {
  width: 48px;
  min-width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(23,58,49,.24);
  background: #f5f1e7;
  color: #173a31;
  box-shadow: 0 5px 14px rgba(0,0,0,.15);
  font-size: 1.65rem;
}
.book-lightbox-zoom-vertical .book-lightbox-level {
  width: auto;
  min-width: 62px;
  height: 30px;
  border: 0;
  border-radius: 16px;
  padding: 0 8px;
  background: transparent;
  color: rgba(243,237,220,.70);
  box-shadow: none;
  font-size: .76rem;
}
.book-lightbox-zoom-vertical .book-lightbox-tool:hover:not(:disabled) {
  background: #fffaf0;
  border-color: var(--gold);
}
.book-lightbox-zoom-vertical .book-lightbox-tool:disabled {
  opacity: .40;
}
.book-lightbox-side-switcher {
  margin-top: auto;
  padding: 18px 22px 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  border-top: 1px solid rgba(243,237,220,.13);
  background: transparent;
}
.book-lightbox-side {
  min-width: 0;
  width: 100%;
  grid-template-columns: 36px 1fr;
  gap: 9px;
  padding: 7px 9px 7px 7px;
  border-color: rgba(243,237,220,.18);
  color: var(--cream);
}
.book-lightbox-side img {
  width: 36px;
  height: 46px;
}
.book-lightbox-side.is-active,
.book-lightbox-side[aria-pressed="true"] {
  border-color: var(--gold);
  background: rgba(180,154,97,.12);
}

/* Old top toolbar, side label, and arrow buttons are intentionally gone. */
.book-lightbox-toolbar,
.book-lightbox-side-label,
.book-lightbox-arrow {
  display: none !important;
}

@media (max-width: 820px) {
  .book-lightbox-panel {
    grid-template-columns: minmax(0, 1fr) 112px;
  }
  .book-lightbox-viewport {
    padding: 18px 12px;
  }
  .book-lightbox-image {
    max-width: calc(100vw - 142px);
    max-height: calc(100dvh - 36px);
  }
  .book-lightbox-rail-top {
    min-height: 52px;
    padding: 6px;
  }
  .book-lightbox-close {
    width: 40px;
    height: 40px;
  }
  .book-lightbox-rail-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
  }
  .book-lightbox-title {
    display: none;
  }
  .book-lightbox-zoom-vertical .book-lightbox-tool {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }
  .book-lightbox-zoom-vertical .book-lightbox-level {
    min-width: 52px;
  }
  .book-lightbox-side-switcher {
    grid-template-columns: 1fr;
    padding: 10px 8px 12px;
  }
  .book-lightbox-side {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    padding: 6px 4px;
    text-align: center;
  }
  .book-lightbox-side img {
    width: 38px;
    height: 48px;
  }
  .book-lightbox-side span {
    font-size: .72rem;
  }
}

@media (max-width: 560px) {
  .book-lightbox-panel {
    grid-template-columns: minmax(0, 1fr) 74px;
  }
  .book-lightbox-image {
    max-width: calc(100vw - 94px);
  }
  .book-lightbox-rail-body {
    padding-left: 5px;
    padding-right: 5px;
  }
  .book-lightbox-zoom-vertical .book-lightbox-tool {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }
  .book-lightbox-zoom-vertical .book-lightbox-level {
    display: none;
  }
  .book-lightbox-side-switcher {
    padding-left: 5px;
    padding-right: 5px;
  }
  .book-lightbox-side span {
    display: none;
  }
  .book-lightbox-side img {
    width: 40px;
    height: 50px;
  }
}
