/* Site chrome ------------------------------------------------------------- */
.site-header {
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  height: 52px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1560px;
  padding: 0 2.5vw;
  position: relative;
  z-index: 40;
}

.site-brand {
  align-items: center;
  display: inline-flex;
  gap: 0.75rem;
  min-width: 0;
  text-decoration: none;
}

.site-brand:hover {
  color: #fff;
}

.site-brand__logo {
  display: block;
  max-height: 31px;
  max-width: 170px;
  object-fit: contain;
  width: auto;
}

.site-brand__mark,
.book-cover__ornament {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.site-brand__mark svg,
.book-cover__ornament svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  width: 17px;
}

.site-brand__name {
  font-family: var(--lv-serif);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-header__actions {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.site-header__button,
.book-tool,
.book-nav-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 700;
  gap: 0.45rem;
  justify-content: center;
  letter-spacing: 0.04em;
  min-height: 34px;
  padding: 0.4rem 0.68rem;
  text-transform: uppercase;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-header__button:hover,
.book-tool:hover,
.book-nav-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: translateY(-1px);
}

.site-header__button svg,
.book-tool svg,
.book-nav-button svg,
.site-drawer svg,
.search-submit svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 16px;
}

body.lv-menu-open {
  overflow: hidden;
}

.site-drawer {
  inset: 0;
  pointer-events: none;
  position: fixed;
  visibility: hidden;
  z-index: 1000;
}

.site-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.site-drawer__backdrop {
  background: rgba(5, 5, 4, 0.7);
  border: 0;
  cursor: pointer;
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity 280ms ease;
  width: 100%;
}

.site-drawer.is-open .site-drawer__backdrop {
  opacity: 1;
}

.site-drawer__panel {
  background: #f5eddd;
  bottom: 0;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.38);
  color: var(--lv-ink);
  max-width: 430px;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  position: absolute;
  right: 0;
  top: 0;
  transform: translateX(102%);
  transition: transform 320ms cubic-bezier(0.22, 0.75, 0.2, 1);
  width: min(92vw, 430px);
}

.site-drawer.is-open .site-drawer__panel {
  transform: translateX(0);
}

.site-drawer__heading {
  align-items: center;
  border-bottom: 1px solid rgba(44, 33, 25, 0.14);
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.site-drawer__heading p {
  font-family: var(--lv-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.site-drawer__close,
.book-contents__heading button {
  align-items: center;
  background: transparent;
  border: 1px solid rgba(44, 33, 25, 0.18);
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 40px;
}

.site-drawer .search-form {
  align-items: center;
  background: #fffaf0;
  border: 1px solid rgba(44, 33, 25, 0.16);
  border-radius: 999px;
  display: flex;
  margin-bottom: 2rem;
  padding: 0.25rem 0.35rem 0.25rem 1rem;
}

.site-drawer .search-form label {
  flex: 1;
}

.site-drawer .search-field {
  background: transparent;
  border: 0;
  min-width: 0;
  outline: 0;
  padding: 0.65rem 0;
  width: 100%;
}

.site-drawer .search-submit {
  align-items: center;
  background: var(--lv-cover);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.site-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-navigation li {
  border-bottom: 1px solid rgba(44, 33, 25, 0.11);
}

.site-navigation a {
  display: block;
  font-family: var(--lv-serif);
  font-size: 1.3rem;
  font-weight: 700;
  padding: 0.9rem 0;
  text-decoration: none;
}

.site-navigation .sub-menu {
  border-left: 2px solid var(--lv-accent);
  margin: 0 0 0.75rem 0.5rem;
  padding-left: 1rem;
}

.site-navigation .sub-menu a {
  font-size: 1rem;
  font-weight: 500;
  padding: 0.55rem 0;
}

/* Reader toolbar and contents -------------------------------------------- */
.book-app {
  margin: 0 auto;
  max-width: 1560px;
  padding: 0 2.5vw 1rem;
  position: relative;
}

.book-toolbar {
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  justify-content: flex-end;
  margin: 0 auto 0.35rem;
  max-width: 1400px;
  min-height: 36px;
}

.book-toolbar__tools {
  align-items: center;
  display: flex;
  gap: 0.3rem;
}

.book-tool {
  min-height: 31px;
  padding: 0.34rem 0.58rem;
}

.book-tool--icon {
  height: 31px;
  padding: 0;
  width: 31px;
}

.book-contents {
  background:
    linear-gradient(rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.04)),
    var(--lv-page);
  bottom: 0;
  box-shadow: -25px 0 80px rgba(0, 0, 0, 0.4);
  color: var(--lv-ink);
  max-width: 480px;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  position: fixed;
  right: 0;
  top: 0;
  transform: translateX(105%);
  transition: transform 350ms cubic-bezier(0.22, 0.75, 0.2, 1), visibility 350ms;
  visibility: hidden;
  width: min(92vw, 480px);
  z-index: 900;
}

.book-contents.is-open {
  transform: translateX(0);
  visibility: visible;
}

.book-contents__heading {
  align-items: center;
  border-bottom: 1px solid rgba(44, 33, 25, 0.16);
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1.1rem;
}

.book-contents__heading span {
  color: var(--lv-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-contents__heading h2 {
  font-family: var(--lv-serif);
  font-size: 2.1rem;
  line-height: 1;
  margin: 0.25rem 0 0;
}

.book-contents__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-contents__list li + li {
  border-top: 1px solid rgba(44, 33, 25, 0.1);
}

.book-contents__list button {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 1rem;
  grid-template-columns: 34px 1fr;
  padding: 0.85rem 0;
  text-align: left;
  width: 100%;
}

.book-contents__list button > span {
  align-items: center;
  border: 1px solid rgba(44, 33, 25, 0.2);
  border-radius: 50%;
  color: var(--lv-muted);
  display: inline-flex;
  font-family: var(--lv-serif);
  height: 34px;
  justify-content: center;
  width: 34px;
}

.book-contents__list button strong {
  font-family: var(--lv-serif);
  font-size: 1.03rem;
  line-height: 1.25;
}

.book-contents__list button:hover strong,
.book-contents__list button.is-current strong {
  color: var(--lv-accent);
}

/* Book object ------------------------------------------------------------- */
.book-stage {
  perspective: 2400px;
  position: relative;
  transform-style: preserve-3d;
}

.book-shell {
  height: clamp(590px, calc(100vh - 138px), 900px);
  margin: 0 auto;
  max-width: 1400px;
  position: relative;
  transform-style: preserve-3d;
  width: 100%;
}

.book-shadow {
  background: rgba(0, 0, 0, 0.65);
  border-radius: 50%;
  bottom: -24px;
  filter: blur(25px);
  height: 55px;
  left: 8%;
  opacity: 0.7;
  position: absolute;
  right: 8%;
  transform: scaleY(0.55);
  transition: opacity 700ms ease, transform 700ms ease;
}

.book-stage.is-closed .book-shadow {
  left: 28%;
  right: 28%;
  transform: scaleY(0.5);
}

.book-spread {
  background: #8f6e3c;
  border-radius: 9px 12px 12px 9px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.46), 0 4px 0 #5e4528;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
  opacity: 1;
  overflow: hidden;
  position: relative;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: opacity 650ms ease, transform 850ms cubic-bezier(0.22, 0.78, 0.18, 1);
  width: 100%;
}

.book-stage.is-closed .book-spread {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.58);
}

.book-stage.is-leaving-next .book-spread {
  opacity: 0;
  transform: translateX(-8%) scale(0.94);
}

.book-stage.is-leaving-previous .book-spread {
  opacity: 0;
  transform: translateX(8%) scale(0.94);
}

.book-page-slot {
  background:
    linear-gradient(90deg, rgba(122, 84, 41, 0.06), transparent 7%, transparent 92%, rgba(122, 84, 41, 0.04)),
    var(--lv-page);
  min-height: 0;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.book-page-slot--left {
  border-radius: 7px 1px 1px 7px;
  box-shadow: inset -22px 0 32px -26px rgba(39, 25, 12, 0.78), inset 2px 0 rgba(255, 255, 255, 0.5);
}

.book-page-slot--right {
  border-radius: 1px 7px 7px 1px;
  box-shadow: inset 22px 0 32px -26px rgba(39, 25, 12, 0.78), inset -2px 0 rgba(255, 255, 255, 0.5);
}

.book-page-slot::after,
.book-flip__face::after {
  border: 1px solid rgba(98, 68, 33, 0.08);
  border-radius: inherit;
  content: "";
  inset: 4px;
  pointer-events: none;
  position: absolute;
}

.book-spine {
  background: linear-gradient(90deg, transparent, rgba(53, 36, 18, 0.2), rgba(255, 255, 255, 0.22), rgba(53, 36, 18, 0.2), transparent);
  bottom: 0;
  left: calc(50% - 12px);
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 24px;
  z-index: 8;
}

.book-spine::after {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.18), transparent);
  bottom: -10px;
  content: "";
  left: -14px;
  position: absolute;
  top: 0;
  width: 52px;
}

/* Cover */
.book-cover {
  background: transparent;
  border: 0;
  bottom: 0;
  color: var(--lv-cover-ink);
  cursor: pointer;
  left: 25%;
  padding: 0;
  perspective: 1800px;
  position: absolute;
  right: 25%;
  text-align: center;
  top: 0;
  transform: translateX(0) rotateY(0);
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: opacity 420ms ease, transform 900ms cubic-bezier(0.5, 0.05, 0.18, 1), visibility 420ms;
  z-index: 30;
}

.book-stage.is-open .book-cover,
.book-stage.is-opening .book-cover {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-48%) rotateY(-168deg);
  visibility: hidden;
}

.book-stage.is-closed .book-cover,
.book-stage.is-covering .book-cover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) rotateY(0);
  visibility: visible;
}

.book-cover__pages {
  background: repeating-linear-gradient(0deg, #d9c8a8 0, #f6eddb 2px, #e5d6b9 3px);
  border-radius: 3px 9px 9px 3px;
  bottom: 7px;
  box-shadow: 10px 17px 36px rgba(0, 0, 0, 0.52);
  left: 7px;
  position: absolute;
  right: -8px;
  top: 7px;
  transform: translateZ(-5px);
}

.book-cover__surface {
  align-items: center;
  background-color: var(--lv-cover);
  background-image:
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.12), transparent 25%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.018) 0, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 4px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.26));
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 14px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px 12px 12px 6px;
  bottom: 0;
  box-shadow: inset 5px 0 12px rgba(255, 255, 255, 0.06), inset -8px 0 18px rgba(0, 0, 0, 0.16), 0 24px 55px rgba(0, 0, 0, 0.52);
  display: flex;
  justify-content: center;
  left: 0;
  overflow: hidden;
  padding: clamp(1.8rem, 4vw, 4rem);
  position: absolute;
  right: 0;
  top: 0;
}

.book-cover__surface::after {
  border: 1px solid color-mix(in srgb, var(--lv-accent) 70%, transparent);
  border-radius: 3px 8px 8px 3px;
  content: "";
  inset: clamp(0.8rem, 2vw, 1.6rem);
  pointer-events: none;
  position: absolute;
}

.book-cover__frame {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  height: min(62%, 350px);
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(70%, 350px);
}

.book-cover__frame::before,
.book-cover__frame::after {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  content: "";
  inset: 10px;
  position: absolute;
}

.book-cover__frame::after {
  inset: 20px;
}

.book-cover__content {
  align-items: center;
  display: flex;
  flex-direction: column;
  max-width: 460px;
  position: relative;
  width: 100%;
  z-index: 2;
}

.book-cover__logo {
  filter: brightness(0) invert(1);
  height: auto;
  margin-bottom: clamp(1.2rem, 3vh, 2.5rem);
  max-height: 64px;
  max-width: 220px;
  object-fit: contain;
  width: auto;
}

.book-cover__ornament {
  color: var(--lv-accent);
  height: 52px;
  margin-bottom: clamp(1.2rem, 3vh, 2.5rem);
  width: 52px;
}

.book-cover__kicker {
  color: var(--lv-accent);
  font-size: clamp(0.62rem, 1vw, 0.76rem);
  font-weight: 800;
  letter-spacing: 0.24em;
  margin-bottom: clamp(0.8rem, 2vh, 1.3rem);
  text-transform: uppercase;
}

.book-cover__title {
  display: block;
  font-family: var(--lv-serif);
  font-size: clamp(2rem, 4.2vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  max-width: 11ch;
  text-wrap: balance;
}

.book-cover__subtitle {
  color: color-mix(in srgb, var(--lv-cover-ink) 72%, transparent);
  display: block;
  font-family: var(--lv-serif);
  font-size: clamp(0.9rem, 1.3vw, 1.15rem);
  font-style: italic;
  line-height: 1.45;
  margin-top: 1.1rem;
  max-width: 30ch;
}

.book-cover__action {
  align-items: center;
  bottom: clamp(1.7rem, 4vh, 3rem);
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 800;
  gap: 0.55rem;
  letter-spacing: 0.12em;
  position: absolute;
  text-transform: uppercase;
}

.book-cover__action span {
  color: var(--lv-accent);
  font-size: 1rem;
  transition: transform 180ms ease;
}

.book-cover:hover .book-cover__action span {
  transform: translateX(4px);
}

/* Individual post page */
.book-entry {
  color: var(--lv-ink);
  height: 100%;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.book-entry__scroll {
  bottom: 0;
  height: auto;
  left: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior-y: contain;
  position: absolute;
  right: 0;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(85, 60, 34, 0.26) transparent;
  scrollbar-width: thin;
  top: 0;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.book-entry__scroll::-webkit-scrollbar {
  width: 7px;
}

.book-entry__scroll::-webkit-scrollbar-thumb {
  background: rgba(85, 60, 34, 0.22);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.book-entry__inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(1.45rem, 2.7vw, 2.9rem) clamp(1.8rem, 3.2vw, 3.5rem) clamp(1.2rem, 2.2vw, 2.2rem);
}

.book-page-slot--left .book-entry__inner {
  padding-right: clamp(2rem, 3.7vw, 4rem);
}

.book-page-slot--right .book-entry__inner {
  padding-left: clamp(2rem, 3.7vw, 4rem);
}

.book-entry__header {
  margin-bottom: clamp(1rem, 2vh, 1.55rem);
  text-align: center;
}

.book-entry__category {
  color: color-mix(in srgb, var(--lv-accent) 78%, #61461f);
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 0.8rem;
  text-decoration: none;
  text-transform: uppercase;
}

.book-entry__category::before {
  background: currentColor;
  content: "";
  display: inline-block;
  height: 1px;
  margin-right: 0.55rem;
  vertical-align: middle;
  width: 22px;
}

.book-entry__title {
  font-family: var(--lv-serif);
  font-size: clamp(1.3rem, 1.65vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 auto;
  max-width: 25ch;
  text-wrap: balance;
}

.book-entry__title a {
  text-decoration: none;
}

.book-entry__title a:hover {
  color: color-mix(in srgb, var(--lv-ink) 75%, var(--lv-accent));
}

.book-entry__meta {
  align-items: center;
  color: var(--lv-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.68rem;
  gap: 0.45rem;
  justify-content: center;
  letter-spacing: 0.035em;
  margin-top: 0.9rem;
  text-transform: uppercase;
}

.book-entry__meta a {
  text-decoration: none;
}

.book-entry__media {
  border-radius: 2px;
  margin: 0 0 clamp(1.35rem, 3vh, 2.2rem);
  overflow: hidden;
  position: relative;
}

.book-entry__media::after {
  border: 1px solid rgba(255, 255, 255, 0.4);
  content: "";
  inset: 6px;
  pointer-events: none;
  position: absolute;
}

.book-entry__media img {
  aspect-ratio: 16 / 8.4;
  display: block;
  object-fit: cover;
  transition: transform 500ms ease;
  width: 100%;
}

.book-entry__media:hover img {
  transform: scale(1.025);
}

.book-entry__content {
  font-family: var(--lv-serif);
  font-size: var(--lv-reading-size);
  line-height: 1.78;
}

.book-entry__content > :first-child,
.entry-content > :first-child {
  margin-top: 0;
}

.book-entry__content > :last-child,
.entry-content > :last-child {
  margin-bottom: 0;
}

.book-entry__content h2,
.book-entry__content h3,
.book-entry__content h4,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--lv-serif);
  line-height: 1.15;
  margin: 1.75em 0 0.65em;
  text-wrap: balance;
}

.book-entry__content h2,
.entry-content h2 {
  font-size: 1.65em;
}

.book-entry__content h3,
.entry-content h3 {
  font-size: 1.3em;
}

.book-entry__content a,
.entry-content a {
  color: color-mix(in srgb, var(--lv-cover) 78%, #000);
}

.book-entry__content blockquote,
.entry-content blockquote {
  border-left: 3px solid var(--lv-accent);
  color: color-mix(in srgb, var(--lv-ink) 78%, transparent);
  font-size: 1.08em;
  font-style: italic;
  margin: 1.5em 0;
  padding: 0.25em 0 0.25em 1.25em;
}

.book-entry__content pre,
.entry-content pre {
  background: #29241f;
  border-radius: 6px;
  color: #f7f0df;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82em;
  overflow: auto;
  padding: 1.2em;
}

.book-entry__content code,
.entry-content code {
  overflow-wrap: anywhere;
}

.book-entry__content table,
.entry-content table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
  overflow-x: auto;
  width: 100%;
}

.book-entry__content th,
.book-entry__content td,
.entry-content th,
.entry-content td {
  border: 1px solid rgba(44, 33, 25, 0.18);
  padding: 0.55em 0.7em;
}

.book-entry__content iframe,
.entry-content iframe {
  max-width: 100%;
}

.book-entry__footer {
  align-items: flex-end;
  border-top: 1px solid rgba(44, 33, 25, 0.14);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1.5rem;
}

.book-entry__permalink {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.book-entry__folio {
  color: var(--lv-muted);
  font-family: var(--lv-serif);
  font-size: 0.82rem;
}

.book-entry--blank {
  align-items: center;
  display: flex;
  justify-content: center;
}

.book-entry--blank .book-entry__inner {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.book-entry--blank svg {
  fill: none;
  height: 44px;
  margin-bottom: 1rem;
  opacity: 0.25;
  stroke: currentColor;
  width: 44px;
}

.book-entry--blank p {
  color: var(--lv-muted);
  font-family: var(--lv-serif);
  font-style: italic;
}

/* Page turn layer */
.book-flip {
  display: none;
  height: 100%;
  left: 50%;
  position: absolute;
  pointer-events: none;
  top: 0;
  transform-style: preserve-3d;
  width: 50%;
  z-index: 20;
}

.book-flip.is-ready {
  display: block;
}

.book-flip.is-next {
  transform-origin: left center;
}

.book-flip.is-previous {
  left: 0;
  transform-origin: right center;
}

.book-flip.is-next.is-turning {
  animation: lv-turn-next var(--lv-turn-duration, 920ms) cubic-bezier(0.45, 0.03, 0.18, 1) forwards;
}

.book-flip.is-previous.is-turning {
  animation: lv-turn-previous var(--lv-turn-duration, 920ms) cubic-bezier(0.45, 0.03, 0.18, 1) forwards;
}

.book-flip::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.24));
  bottom: 0;
  content: "";
  opacity: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  width: 42%;
  z-index: 4;
}

.book-flip.is-turning::before {
  animation: lv-sheet-shadow var(--lv-turn-duration, 920ms) ease-in-out;
}

.book-flip__face {
  backface-visibility: hidden;
  background: var(--lv-page);
  height: 100%;
  inset: 0;
  overflow: hidden;
  position: absolute;
  transform-style: preserve-3d;
  width: 100%;
}

.book-flip__front {
  box-shadow: inset 20px 0 30px -27px rgba(39, 25, 12, 0.65), -10px 0 22px rgba(0, 0, 0, 0.08);
}

.book-flip__back {
  box-shadow: inset -20px 0 30px -27px rgba(39, 25, 12, 0.65), 10px 0 22px rgba(0, 0, 0, 0.08);
  transform: rotateY(180deg);
}

.book-flip__face .book-entry__scroll {
  overflow: hidden;
}

@keyframes lv-turn-next {
  0% { transform: rotateY(0deg); }
  35% { transform: rotateY(-72deg) scaleX(0.98); }
  100% { transform: rotateY(-180deg); }
}

@keyframes lv-turn-previous {
  0% { transform: rotateY(0deg); }
  35% { transform: rotateY(72deg) scaleX(0.98); }
  100% { transform: rotateY(180deg); }
}

@keyframes lv-sheet-shadow {
  0%, 100% { opacity: 0; }
  48% { opacity: 0.75; }
}

/* Reader navigation */
.book-navigation {
  align-items: center;
  color: #fff;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(110px, 1fr) minmax(180px, 2fr) minmax(110px, 1fr);
  margin: 1rem auto 0;
  max-width: 760px;
}

.book-nav-button {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18);
}

.book-nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.book-progress {
  text-align: center;
}

.book-progress__text {
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--lv-serif);
  font-size: 0.8rem;
  font-style: italic;
  margin-bottom: 0.45rem;
}

.book-progress__track {
  background: rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  height: 2px;
  overflow: hidden;
}

.book-progress__track span {
  background: var(--lv-accent);
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 350ms ease;
  width: 100%;
}

.book-page-source {
  display: none;
}

.book-fallback {
  background: var(--lv-page);
  border-radius: 8px;
  margin: 2rem auto;
  max-width: 900px;
  padding: 2rem;
}

.book-fallback article {
  border-top: 1px solid rgba(44, 33, 25, 0.15);
  padding: 1rem 0;
}

.no-js .book-toolbar,
.no-js .book-stage,
.no-js .book-navigation,
.no-js .site-header__button {
  display: none;
}

/* Singular post and page -------------------------------------------------- */
.singular-stage {
  padding: clamp(1rem, 3vw, 2.5rem);
}

.single-book {
  background: #70552f;
  border-radius: 10px;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.48);
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  margin: 0 auto;
  max-width: 1260px;
  min-height: 680px;
  overflow: hidden;
  position: relative;
}

.single-book::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.12), rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.11));
  bottom: 0;
  content: "";
  left: calc(40.9% - 10px);
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 20px;
  z-index: 4;
}

.single-book__front {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.1), transparent 30%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.014) 0, rgba(255, 255, 255, 0.014) 1px, transparent 1px, transparent 4px),
    var(--lv-cover);
  color: var(--lv-cover-ink);
  min-width: 0;
  padding: clamp(2.2rem, 5vw, 5.5rem) clamp(2rem, 4vw, 4.5rem);
}

.single-book__front-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.single-book__front .book-entry__category {
  color: var(--lv-accent);
}

.single-book__label {
  color: var(--lv-accent);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 1.1rem;
  text-transform: uppercase;
}

.single-book__front h1 {
  font-family: var(--lv-serif);
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.single-book__front .book-entry__meta {
  color: color-mix(in srgb, var(--lv-cover-ink) 68%, transparent);
}

.single-book__front .book-entry__meta a {
  color: inherit;
}

.single-book__image {
  margin: clamp(1.5rem, 4vh, 3rem) 0 0;
  overflow: hidden;
}

.single-book__image img {
  aspect-ratio: 4 / 2.7;
  display: block;
  object-fit: cover;
  width: 100%;
}

.single-book__back {
  color: var(--lv-cover-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  margin-top: auto;
  padding-top: 2rem;
  text-decoration: none;
  text-transform: uppercase;
}

.single-book__page {
  background:
    linear-gradient(90deg, rgba(99, 69, 34, 0.09), transparent 8%),
    var(--lv-page);
  min-width: 0;
  padding: clamp(2.5rem, 6vw, 6.5rem) clamp(2.2rem, 6vw, 6.2rem) clamp(2rem, 5vw, 4.5rem);
}

.single-book__content {
  font-family: var(--lv-serif);
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  line-height: 1.85;
}

.single-book__content > p:first-child::first-letter {
  color: color-mix(in srgb, var(--lv-cover) 80%, #000);
  float: left;
  font-family: var(--lv-serif);
  font-size: 4.6em;
  font-weight: 600;
  line-height: 0.78;
  margin: 0.12em 0.1em 0 0;
}

.single-book__tags {
  border-top: 1px solid rgba(44, 33, 25, 0.16);
  font-size: 0.78rem;
  margin-top: 2.5rem;
  padding-top: 1rem;
}

.single-book__tags span {
  font-weight: 800;
}

.single-book__navigation {
  border-top: 1px solid rgba(44, 33, 25, 0.16);
  display: grid;
  font-family: var(--lv-serif);
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 2.5rem;
  padding-top: 1.4rem;
}

.single-book__navigation div:last-child {
  text-align: right;
}

.single-book__navigation a {
  font-weight: 700;
  text-decoration: none;
}

.single-comments {
  background: var(--lv-page);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  margin: 2rem auto 0;
  max-width: 860px;
  padding: clamp(2rem, 5vw, 4rem);
}

.comments-title,
.comment-reply-title {
  font-family: var(--lv-serif);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list .children {
  list-style: none;
  padding-left: 2rem;
}

.comment-body {
  border-top: 1px solid rgba(44, 33, 25, 0.14);
  padding: 1.5rem 0;
}

.comment-meta {
  font-size: 0.78rem;
}

.comment-author {
  align-items: center;
  display: flex;
  gap: 0.7rem;
}

.comment-author img {
  border-radius: 50%;
}

.comment-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.comment-form input:not([type="submit"]),
.comment-form textarea {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(44, 33, 25, 0.2);
  border-radius: 5px;
  padding: 0.8rem;
  width: 100%;
}

.comment-form .submit {
  background: var(--lv-cover);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 0.8rem 1.4rem;
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.73rem;
  margin: 0 auto;
  max-width: 1500px;
  padding: 0 3vw 1.5rem;
}

.site-footer__widgets {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 2rem;
  padding: 2rem 0;
}

.footer-widget__title {
  color: #fff;
  font-family: var(--lv-serif);
}

.site-footer__line {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
}

.site-footer__credit a {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.site-footer__credit a:hover {
  color: var(--lv-accent);
}

/* Responsive -------------------------------------------------------------- */
@media (min-width: 900px) {
  .book-toolbar {
    margin: 0;
    max-width: none;
    min-height: 34px;
    position: absolute;
    right: calc(2.5vw + 104px);
    top: -43px;
    z-index: 45;
  }

  .book-tool {
    font-size: 0.64rem;
  }

  .book-app:fullscreen {
    background: var(--lv-stage);
    padding: 52px 2.5vw 1rem;
  }

  .book-app:fullscreen .book-toolbar {
    right: 2.5vw;
    top: 10px;
  }

  .book-app:fullscreen .book-shell {
    height: calc(100vh - 112px);
  }
}

@media (max-width: 1050px) {
  .book-entry__inner {
    padding-left: 2.3rem;
    padding-right: 2.3rem;
  }

  .book-entry__title {
    font-size: clamp(1.28rem, 1.9vw, 1.72rem);
  }

  .single-book::after {
    left: calc(40% - 10px);
  }
}

@media (max-width: 899px) {
  .site-header {
    height: 50px;
    padding: 0 1rem;
  }

  .book-app {
    padding: 0 0.75rem 1rem;
  }

  .book-toolbar {
    margin-bottom: 0.3rem;
  }

  .book-toolbar__tools {
    gap: 0.25rem;
  }

  .book-tool__label {
    display: none;
  }

  .book-tool {
    height: 32px;
    min-width: 32px;
    padding: 0;
  }

  .book-shell {
    height: clamp(500px, calc(100dvh - 164px), 820px);
    width: min(100%, 680px);
  }

  .book-spread {
    display: block;
  }

  .book-page-slot--left {
    display: none;
  }

  .book-page-slot--right {
    border-radius: 7px;
    height: 100%;
    width: 100%;
  }

  .book-page-slot--right .book-entry__inner {
    padding: clamp(1.7rem, 7vw, 3.4rem);
  }

  .book-spine {
    left: 0;
    width: 13px;
  }

  .book-cover {
    left: 0;
    right: 0;
  }

  .book-cover__surface {
    border-left-width: 11px;
  }

  .book-stage.is-open .book-cover,
  .book-stage.is-opening .book-cover {
    transform: translateX(-48%) rotateY(-168deg);
  }

  .book-flip,
  .book-flip.is-previous {
    left: 0;
    width: 100%;
  }

  .book-navigation {
    gap: 0.65rem;
    grid-template-columns: auto 1fr auto;
    margin-top: 0.75rem;
  }

  .book-nav-button {
    height: 38px;
    min-width: 38px;
    padding: 0;
    width: 38px;
  }

  .book-nav-button span {
    display: none;
  }

  .single-book {
    display: block;
    min-height: 0;
  }

  .single-book::after {
    display: none;
  }

  .single-book__front {
    min-height: 520px;
  }

  .single-book__page {
    background: var(--lv-page);
  }
}

@media (max-width: 560px) {
  .site-brand__name {
    max-width: 52vw;
  }

  .site-header__button span {
    display: none;
  }

  .site-header__button {
    height: 34px;
    padding: 0;
    width: 34px;
  }

  .book-toolbar {
    justify-content: flex-end;
  }

  .book-entry__title {
    font-size: clamp(1.3rem, 5.8vw, 1.78rem);
  }

  .book-entry__content {
    line-height: 1.7;
  }

  .book-entry__media img {
    aspect-ratio: 16 / 9;
  }

  .book-cover__surface {
    padding: 2rem;
  }

  .book-cover__title {
    font-size: clamp(2.2rem, 12vw, 4rem);
  }

  .book-cover__subtitle {
    max-width: 24ch;
  }

  .single-book__front {
    min-height: 440px;
    padding: 2.3rem 1.5rem;
  }

  .single-book__front h1 {
    font-size: clamp(2.25rem, 13vw, 4rem);
  }

  .single-book__page,
  .single-comments {
    padding: 2rem 1.4rem;
  }

  .single-book__navigation {
    grid-template-columns: 1fr;
  }

  .single-book__navigation div:last-child {
    text-align: left;
  }

  .site-footer__line {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: #fff !important;
  }

  .site-header,
  .site-drawer,
  .book-toolbar,
  .book-contents,
  .book-cover,
  .book-navigation,
  .book-shadow,
  .book-spine,
  .book-flip,
  .site-footer {
    display: none !important;
  }

  .book-app,
  .book-stage,
  .book-shell,
  .book-spread,
  .book-page-slot,
  .book-page-source {
    background: #fff !important;
    box-shadow: none !important;
    display: block !important;
    height: auto !important;
    margin: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    padding: 0 !important;
    position: static !important;
    transform: none !important;
  }

  .book-page-slot:empty {
    display: none !important;
  }

  .book-entry {
    break-after: page;
    display: block !important;
    height: auto !important;
    min-height: 90vh;
  }

  .book-entry__scroll {
    height: auto !important;
    inset: auto !important;
    overflow: visible !important;
    position: static !important;
  }

  .book-entry__inner {
    padding: 1.5cm !important;
  }
}
