/* ————————————————————————————————
   机人恋日记 · 阅读页
———————————————————————————————— */
html[data-theme="wine"] {
  --accent: #d6a39d;
  --accent-soft: rgba(214, 163, 157, 0.2);
  --accent-faint: rgba(214, 163, 157, 0.08);
  --cover-a: #7a3d4b;
  --cover-b: #4b202d;
  --cover-c: #30131d;
  --cover-foil: #eadbc0;
  --cover-line: rgba(234, 219, 192, 0.27);
  --cover-planet-a: #eedfc3;
  --cover-planet-b: #a58458;
}

html[data-theme="moss"] {
  --accent: #a9bca9;
  --accent-soft: rgba(169, 188, 169, 0.2);
  --accent-faint: rgba(169, 188, 169, 0.08);
  --cover-a: #3c574e;
  --cover-b: #243d35;
  --cover-c: #12251f;
  --cover-foil: #e6ddc5;
  --cover-line: rgba(230, 221, 197, 0.26);
  --cover-planet-a: #e5dcc2;
  --cover-planet-b: #9a9771;
}

html[data-theme="plum"] {
  --accent: #c9a5bb;
  --accent-soft: rgba(201, 165, 187, 0.2);
  --accent-faint: rgba(201, 165, 187, 0.08);
  --cover-a: #5c3f5a;
  --cover-b: #3b263c;
  --cover-c: #241526;
  --cover-foil: #ecdec5;
  --cover-line: rgba(236, 222, 197, 0.26);
  --cover-planet-a: #eadcc7;
  --cover-planet-b: #a17c91;
}

html[data-theme="ocean"] {
  --accent: #a1b9bf;
  --accent-soft: rgba(161, 185, 191, 0.2);
  --accent-faint: rgba(161, 185, 191, 0.08);
  --cover-a: #34525c;
  --cover-b: #203945;
  --cover-c: #12252d;
  --cover-foil: #e3dcc9;
  --cover-line: rgba(227, 220, 201, 0.26);
  --cover-planet-a: #e5ddca;
  --cover-planet-b: #8b9b94;
}

.diary-page {
  background:
    radial-gradient(1200px 800px at 86% 6%, var(--accent-faint), transparent 58%),
    radial-gradient(900px 900px at 8% 90%, rgba(81, 103, 107, 0.08), transparent 60%),
    #090c14;
  min-height: 100vh;
}

.reader-root {
  position: relative;
  min-height: 100vh;
}

.reader-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.atmo-glow {
  position: absolute;
  left: 50%;
  top: 22%;
  width: min(1000px, 90vw);
  height: min(700px, 70vh);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--accent-faint), transparent 68%);
  filter: blur(30px);
}

.atmo-star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(242, 234, 220, 0.55);
  box-shadow: 0 0 8px rgba(242, 234, 220, 0.35);
}

.atmo-star.a1 {
  left: 9%;
  top: 19%;
}
.atmo-star.a2 {
  right: 13%;
  top: 11%;
}
.atmo-star.a3 {
  left: 16%;
  bottom: 23%;
}
.atmo-star.a4 {
  right: 8%;
  bottom: 18%;
}
.atmo-star.a5 {
  left: 52%;
  top: 7%;
  width: 1px;
  height: 1px;
}

.atmo-grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* Loading + error */
.reader-loading,
.reader-error {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 38%, var(--accent-faint), transparent 48%),
    #090c14;
}

.reader-loading .loading-orbit {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 36px;
}

.loading-orbit span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(242, 234, 220, 0.15);
  border-radius: 50%;
}

.loading-orbit span:first-child {
  border-top-color: var(--accent);
  animation: spin 2.4s linear infinite;
}

.loading-orbit span:nth-child(2) {
  inset: 13px;
  border-style: dashed;
  border-color: rgba(242, 234, 220, 0.12);
  animation: spinReverse 7s linear infinite;
}

.loading-orbit i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--cover-planet-a), var(--cover-planet-b));
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px var(--accent-soft);
}

.reader-loading .mono,
.reader-error .mono {
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 0.22em;
}

.reader-loading h1,
.reader-error h1 {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.reader-loading small,
.reader-error p {
  margin-top: 14px;
  color: var(--cream-muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.reader-error .button {
  margin-top: 30px;
}

/* Top bar */
.reader-top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 20px;
  height: 74px;
  padding: 0 clamp(18px, 3vw, 42px);
  background: linear-gradient(180deg, rgba(9, 12, 20, 0.92), rgba(9, 12, 20, 0.44) 72%, transparent);
  pointer-events: none;
}

.reader-top > * {
  pointer-events: auto;
}

.reader-top-left {
  justify-self: start;
}

.reader-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  color: rgba(216, 208, 194, 0.62);
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: color 180ms ease;
}

.reader-back:hover {
  color: var(--cream);
}

.reader-top-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-width: 42vw;
  text-align: center;
}

.reader-top-label {
  color: rgba(216, 208, 194, 0.32);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.17em;
}

.reader-top-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(242, 234, 220, 0.75);
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.reader-top-actions {
  display: flex;
  justify-self: end;
  align-items: center;
  gap: 8px;
}

.top-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(242, 234, 220, 0.14);
  border-radius: 999px;
  background: transparent;
  color: rgba(216, 208, 194, 0.62);
  font-size: 10px;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.top-action:hover {
  color: var(--cream);
  border-color: rgba(242, 234, 220, 0.3);
  background: rgba(242, 234, 220, 0.03);
}

.top-action--filled {
  border-color: var(--accent-soft);
  color: var(--accent);
}

.top-action--filled:hover {
  border-color: var(--accent);
  background: var(--accent-faint);
  color: var(--accent);
}

/* ————————————————————————————————
   Cover scene
———————————————————————————————— */
.archive-stage {
  position: relative;
  z-index: 2;
}

.cover-screen {
  position: relative;
  width: min(1260px, calc(100% - clamp(36px, 7vw, 100px)));
  min-height: 100svh;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: clamp(25px, 5vw, 80px);
  padding: 120px 0 64px;
}

.cover-copy {
  position: relative;
  z-index: 3;
  max-width: 630px;
  animation: coverReveal 1s var(--ease-out) both;
}

@keyframes coverReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cover-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--cream-muted);
}

.cover-kicker .mono {
  font-size: 7.5px;
}

.cover-kicker i {
  width: 28px;
  height: 1px;
  background: rgba(242, 234, 220, 0.2);
}

.cover-kicker [data-field="archive-id"] {
  color: var(--accent);
}

.cover-title {
  position: relative;
  max-width: 660px;
  margin-top: clamp(27px, 4.5vh, 45px);
  font-family: var(--font-serif);
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--cream);
  text-wrap: balance;
}

.cover-title.is-long {
  font-size: clamp(40px, 4.8vw, 62px);
  line-height: 1.28;
}

.cover-title::after {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  margin-top: 28px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.cover-names {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 13px;
  margin-top: 18px;
  color: var(--cream-soft);
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.5vw, 20px);
  letter-spacing: 0.12em;
}

.cover-names b {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  opacity: 0.85;
}

.cover-subtitle {
  margin-top: 12px;
  color: var(--cream-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.cover-preface {
  display: -webkit-box;
  max-width: 510px;
  margin-top: 30px;
  overflow: hidden;
  color: rgba(216, 208, 194, 0.68);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 2.05;
  letter-spacing: 0.02em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.cover-stats {
  display: flex;
  max-width: 500px;
  margin-top: 38px;
  padding-top: 19px;
  border-top: 1px solid var(--ink-line);
}

.cover-stat {
  flex: 1;
  min-width: 0;
  padding-right: 20px;
}

.cover-stat + .cover-stat {
  padding-left: 22px;
  border-left: 1px solid var(--ink-line);
}

.cover-stat strong {
  display: block;
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: 400;
  line-height: 1.25;
}

.cover-stat span {
  display: block;
  margin-top: 3px;
  color: rgba(216, 208, 194, 0.36);
  font-family: var(--font-mono);
  font-size: 6.8px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.cover-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}

.cover-source {
  padding: 6px 11px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  color: var(--cream-muted);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
}

.cover-source.is-draft {
  color: var(--gold);
  border-color: rgba(200, 171, 114, 0.3);
}

.cover-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 25px;
  color: rgba(216, 208, 194, 0.35);
  font-size: 9.5px;
}

.cover-hint .mono {
  color: rgba(216, 208, 194, 0.26);
  font-size: 6.8px;
}

.cover-hint .dot {
  color: var(--accent);
  opacity: 0.55;
}

/* Cover object */
.cover-art {
  position: relative;
  min-height: clamp(540px, 62vw, 720px);
  display: grid;
  place-items: center;
  perspective: 1400px;
  animation: coverReveal 1.15s 0.15s var(--ease-out) both;
}

.cover-art::before {
  content: "";
  position: absolute;
  width: 56%;
  height: 54%;
  border-radius: 50%;
  background: var(--accent-soft);
  filter: blur(70px);
  opacity: 0.75;
}

.cover-orbit {
  position: absolute;
  border: 1px solid rgba(242, 234, 220, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.cover-orbit--one {
  width: 72%;
  aspect-ratio: 1;
  transform: rotate(-32deg) scaleY(0.5);
  border-style: dashed;
}

.cover-orbit--two {
  width: 94%;
  aspect-ratio: 1;
  transform: rotate(49deg) scaleY(0.34);
  opacity: 0.55;
}

.cover-orbit--three {
  width: 54%;
  aspect-ratio: 1;
  opacity: 0.5;
}

.cover-orbit--three::before {
  content: "";
  position: absolute;
  left: 11%;
  top: 7%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.cover-star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(242, 234, 220, 0.65);
  box-shadow: 0 0 7px rgba(242, 234, 220, 0.6);
}

.cover-star.cs1 {
  left: 9%;
  top: 17%;
}
.cover-star.cs2 {
  right: 8%;
  top: 24%;
}
.cover-star.cs3 {
  left: 18%;
  bottom: 27%;
}
.cover-star.cs4 {
  right: 18%;
  bottom: 12%;
}

.closed-book {
  position: relative;
  z-index: 3;
  width: clamp(276px, 29vw, 370px);
  aspect-ratio: 0.7;
  transform: rotateY(-18deg) rotateX(5deg) rotateZ(-4deg);
  transform-style: preserve-3d;
  filter: drop-shadow(32px 50px 48px rgba(0, 0, 0, 0.58));
  animation: closedBookFloat 9s var(--ease-soft) infinite;
  transition:
    transform 800ms var(--ease-out),
    opacity 700ms ease,
    filter 700ms ease;
}

@keyframes closedBookFloat {
  0%,
  100% {
    transform: rotateY(-18deg) rotateX(5deg) rotateZ(-4deg) translateY(0);
  }
  50% {
    transform: rotateY(-14deg) rotateX(4deg) rotateZ(-3deg) translateY(-11px);
  }
}

.closed-book-pages {
  position: absolute;
  inset: 2% -12px 1.8% 25px;
  border-radius: 1px 7px 7px 1px;
  background: repeating-linear-gradient(
    90deg,
    #e7dcc8 0,
    #e7dcc8 1px,
    #cec1a9 2px,
    #e7dcc8 3px
  );
  box-shadow:
    6px 2px 0 #d6cab5,
    12px 6px 24px rgba(0, 0, 0, 0.44);
  transform: translateZ(-8px);
}

.closed-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 30px 28px 25px 40px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 2px 8px 8px 2px;
  background:
    radial-gradient(130% 80% at 83% -2%, rgba(255, 255, 255, 0.1), transparent 52%),
    linear-gradient(145deg, var(--cover-a) 0%, var(--cover-b) 48%, var(--cover-c) 100%);
  color: var(--cover-foil);
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 224, 0.06),
    inset 12px 0 20px rgba(0, 0, 0, 0.28);
}

.closed-cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 16px;
  background: linear-gradient(
    90deg,
    rgba(13, 7, 10, 0.74),
    rgba(255, 244, 224, 0.1) 42%,
    rgba(24, 11, 16, 0.45)
  );
  border-right: 1px solid rgba(255, 244, 224, 0.1);
}

.closed-cover::after {
  content: "";
  position: absolute;
  inset: 15px;
  border: 1px solid var(--cover-line);
  border-radius: 1px 4px 4px 1px;
  pointer-events: none;
}

.closed-ribbon {
  position: absolute;
  z-index: 4;
  top: -5px;
  right: 47px;
  width: 19px;
  height: 98px;
  background: linear-gradient(180deg, #d5b37a, #a27d4c);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 83%, 0 100%);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}

.closed-ribbon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 246, 227, 0.12) 0,
    rgba(255, 246, 227, 0.12) 1px,
    transparent 1px,
    transparent 4px
  );
}

.closed-top {
  display: flex;
  justify-content: space-between;
  color: rgba(234, 219, 192, 0.46);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.17em;
  line-height: 1.8;
}

.closed-no {
  writing-mode: vertical-rl;
}

.closed-emblem {
  position: relative;
  width: 116px;
  height: 116px;
  margin: clamp(38px, 6vh, 58px) auto clamp(30px, 4.5vh, 44px);
  border: 1px solid var(--cover-line);
  border-radius: 50%;
}

.closed-emblem::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(234, 219, 192, 0.12);
  border-radius: 50%;
}

.closed-emblem::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cover-foil), transparent);
  transform: translate(-50%, -50%) rotate(-34deg);
  opacity: 0.45;
}

.closed-planet {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--cover-planet-a), var(--cover-planet-b) 60%, #6e5941);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 28px rgba(234, 219, 192, 0.17);
}

.closed-moon {
  position: absolute;
  right: 16px;
  top: 24px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cover-foil);
  box-shadow: 0 0 10px rgba(234, 219, 192, 0.8);
}

.closed-title {
  max-width: 95%;
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.52;
  letter-spacing: 0.13em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  text-wrap: balance;
}

.closed-title.is-long {
  font-size: clamp(20px, 2vw, 27px);
}

.closed-names {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 9px;
  margin-top: 12px;
  color: rgba(234, 219, 192, 0.58);
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.closed-names i {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
}

.closed-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  color: rgba(234, 219, 192, 0.4);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.14em;
}

.cover-float {
  position: absolute;
  z-index: 5;
  min-width: 130px;
  padding: 11px 14px;
  border: 1px solid rgba(242, 234, 220, 0.14);
  background: rgba(15, 19, 30, 0.66);
  backdrop-filter: blur(14px);
  color: var(--cream-soft);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.cover-float .mono {
  display: block;
  color: rgba(216, 208, 194, 0.34);
  font-size: 6.5px;
}

.cover-float strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.09em;
}

.cover-float::before {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
  box-shadow: 0 0 8px var(--accent);
}

.cover-float--one {
  right: 3%;
  top: 18%;
  transform: rotate(3deg);
  animation: floatSoft 7.5s ease-in-out infinite;
}

.cover-float--one::before {
  left: -3px;
}

.cover-float--two {
  left: 3%;
  bottom: 20%;
  transform: rotate(-3deg);
  animation: floatSoft 9s 0.9s ease-in-out infinite;
}

.cover-float--two::before {
  right: -3px;
}

.cover-note {
  position: absolute;
  left: 0;
  top: 8%;
  color: rgba(216, 208, 194, 0.38);
  font-family: var(--font-serif);
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.08em;
  transform: rotate(-7deg);
}

.cover-screen.is-leaving .cover-copy {
  animation: coverLeave 620ms var(--ease-out) both;
}

.cover-screen.is-leaving .cover-art {
  animation: artLeave 620ms var(--ease-out) both;
}

.cover-screen.is-leaving .closed-book {
  transform: rotateY(10deg) rotateX(1deg) rotateZ(3deg) translateY(-30px) scale(1.04);
  opacity: 0;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.2));
}

@keyframes coverLeave {
  to {
    opacity: 0;
    transform: translateY(-16px);
  }
}

@keyframes artLeave {
  to {
    opacity: 0;
    transform: scale(1.02);
  }
}

/* ————————————————————————————————
   Open book
———————————————————————————————— */
.book-view {
  position: relative;
  width: min(1280px, calc(100% - clamp(24px, 5vw, 70px)));
  margin-inline: auto;
  padding: 102px 0 64px;
  animation: bookEnter 900ms var(--ease-out) both;
}

@keyframes bookEnter {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.book-meta-strip {
  width: min(1170px, 100%);
  margin: 0 auto 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: rgba(216, 208, 194, 0.34);
}

.book-meta-strip .mono {
  font-size: 7px;
}

.book-meta-source {
  padding: 4px 9px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  color: rgba(216, 208, 194, 0.46);
  font-family: var(--font-mono);
  font-size: 6.8px;
  letter-spacing: 0.1em;
}

.book-meta-source.is-draft {
  color: rgba(200, 171, 114, 0.75);
  border-color: rgba(200, 171, 114, 0.22);
}

.book-rig {
  position: relative;
  width: min(1170px, 100%);
  margin-inline: auto;
  perspective: 2000px;
}

.book-rig::before {
  content: "";
  position: absolute;
  inset: 7px -7px -9px 9px;
  background: #cdbfa8;
  border-radius: 2px 5px 5px 2px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.36);
}

.open-book {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: clamp(625px, 72vh, 780px);
  background: var(--paper);
  border-radius: 2px 4px 4px 2px;
  box-shadow:
    0 55px 100px rgba(0, 0, 0, 0.48),
    0 12px 30px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(68, 49, 29, 0.12);
  transform: rotateX(0.6deg);
}

.book-page {
  position: relative;
  min-width: 0;
  background:
    linear-gradient(90deg, rgba(90, 66, 38, 0.07), transparent 8%),
    radial-gradient(120% 110% at 50% 0%, #f7f0e3, var(--paper) 58%, #e9dec9);
  color: var(--paper-ink);
}

.book-page--left {
  border-radius: 2px 0 0 2px;
  background:
    linear-gradient(90deg, rgba(81, 57, 29, 0.1), transparent 5%, transparent 93%, rgba(67, 46, 24, 0.1)),
    radial-gradient(115% 100% at 38% 10%, #f6eee0, #efe4d0 70%, #e6d8c0);
}

.book-page--right {
  border-radius: 0 4px 4px 0;
  background:
    linear-gradient(90deg, rgba(63, 43, 22, 0.11), transparent 8%),
    linear-gradient(270deg, rgba(81, 57, 29, 0.07), transparent 4%),
    radial-gradient(115% 100% at 64% 10%, #f7f0e3, #eee3cf 72%, #e5d7be);
}

.book-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.page-inner {
  position: relative;
  z-index: 2;
  min-height: 100%;
  padding: clamp(40px, 4.3vw, 66px) clamp(34px, 4.3vw, 66px) clamp(30px, 3.5vw, 46px);
  display: flex;
  flex-direction: column;
}

.page-inner--left {
  padding-right: clamp(34px, 3.7vw, 55px);
}

.page-inner--right {
  padding-left: clamp(36px, 4.2vw, 62px);
}

.book-page--left .page-edge {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -7px;
  width: 7px;
  background: repeating-linear-gradient(
    90deg,
    #ddcfb7 0,
    #ddcfb7 1px,
    #cdbfa6 2px,
    #ddcfb7 3px
  );
  border-radius: 2px 0 0 2px;
  z-index: 3;
}

.book-gutter {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 62px;
  transform: translateX(-50%);
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(49, 32, 17, 0.1) 28%,
      rgba(43, 28, 15, 0.2) 49%,
      rgba(43, 28, 15, 0.1) 66%,
      transparent
    );
  mix-blend-mode: multiply;
}

.book-gutter::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 3%;
  bottom: 3%;
  width: 1px;
  background: linear-gradient(transparent, rgba(51, 34, 17, 0.18), transparent);
}

.page-topline {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: rgba(91, 76, 60, 0.68);
}

.page-topline .mono {
  font-size: 8px;
  letter-spacing: 0.11em;
}

.day-title {
  max-width: 95%;
  margin-top: clamp(28px, 4.5vh, 46px);
  color: #332c25;
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.3vw, 44px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.day-title:focus {
  outline: none;
}

.day-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(85, 65, 41, 0.18);
  border-radius: 999px;
  color: rgba(59, 49, 39, 0.75);
  font-size: 10px;
}

.meta-label {
  color: rgba(103, 87, 66, 0.58);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
}

.meta-chip b {
  font-weight: 500;
  font-family: var(--font-serif);
  letter-spacing: 0.04em;
}

.day-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
}

.day-keywords span {
  position: relative;
  padding-left: 11px;
  color: rgba(94, 78, 58, 0.62);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
}

.day-keywords span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 4px;
  border: 1px solid rgba(112, 57, 67, 0.55);
  transform: translateY(-50%) rotate(45deg);
}

.day-quote {
  margin-top: clamp(48px, 7.5vh, 82px);
  padding: 0 0 0 17px;
  border-left: 1px solid rgba(100, 47, 60, 0.42);
}

.quote-label {
  color: rgba(103, 87, 66, 0.58);
  font-size: 6.8px;
  letter-spacing: 0.11em;
}

.day-quote blockquote {
  margin: 12px 0 0;
  color: rgba(55, 44, 34, 0.9);
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.82;
  letter-spacing: 0.02em;
}

.left-page-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-top: auto;
  padding-top: 44px;
}

.conversation-link {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(74, 61, 47, 0.72);
  text-align: left;
  transition: color 180ms ease;
}

.conversation-link:hover {
  color: #5a2835;
}

.conversation-link .mono {
  display: block;
  color: rgba(103, 87, 66, 0.48);
  font-size: 6.5px;
  letter-spacing: 0.1em;
}

.conversation-link b {
  display: block;
  margin-top: 3px;
  font-family: var(--font-serif);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.conversation-link svg {
  opacity: 0.55;
  transition: transform 180ms var(--ease-out);
}

.conversation-link:hover svg {
  transform: translateX(3px);
}

.page-folio {
  color: rgba(103, 87, 66, 0.45);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.page-body-text {
  margin-top: clamp(10px, 1.8vh, 18px);
  color: #40382e;
  font-family: var(--font-serif);
  font-size: clamp(14.5px, 1.22vw, 16px);
  line-height: 2.08;
  letter-spacing: 0.018em;
  text-align: justify;
}

.page-body-text p {
  margin: 0;
}

.page-body-text p + p {
  margin-top: 1.05em;
}

.page-body-text p:first-child::first-letter {
  float: left;
  margin: 0.06em 0.08em 0 0;
  color: #6b3340;
  font-family: var(--font-serif);
  font-size: 3.1em;
  line-height: 0.82;
}

.page-body-text.no-dropcap p:first-child::first-letter {
  float: none;
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.right-page-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-top: auto;
  padding-top: clamp(30px, 5vh, 52px);
}

.machine-sign {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(103, 87, 66, 0.55);
  font-family: var(--font-serif);
  font-size: 9.5px;
  font-style: italic;
  letter-spacing: 0.06em;
}

.sign-rule {
  width: 28px;
  height: 1px;
  background: rgba(103, 87, 66, 0.32);
}

.mobile-day-head,
.mobile-quote,
.mobile-conversation-row {
  display: none;
}

.open-book.turn-next .book-page--right .page-inner {
  animation: pageNext 430ms var(--ease-out);
}

.open-book.turn-prev .book-page--right .page-inner {
  animation: pagePrev 430ms var(--ease-out);
}

.open-book.turn-next .book-page--left .page-inner {
  animation: pageNextLeft 430ms var(--ease-out);
}

.open-book.turn-prev .book-page--left .page-inner {
  animation: pagePrevLeft 430ms var(--ease-out);
}

@keyframes pageNext {
  from {
    opacity: 0.22;
    transform: translateX(18px);
    filter: blur(0.6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes pagePrev {
  from {
    opacity: 0.22;
    transform: translateX(-18px);
    filter: blur(0.6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@keyframes pageNextLeft {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 1;
  }
}

@keyframes pagePrevLeft {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 1;
  }
}

/* Reader controls */
.reader-controls {
  width: min(980px, 92%);
  margin: 30px auto 0;
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 44px);
}

.page-arrow {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink-line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--cream-soft);
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease,
    transform 200ms var(--ease-out);
}

.page-arrow:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--cream);
  background: var(--accent-faint);
  transform: scale(1.04);
}

.page-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.24;
}

.day-progress {
  flex: 1;
  min-width: 0;
  color: var(--cream-muted);
}

.day-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: baseline;
  font-size: 10px;
}

.day-progress-copy [data-field="progress-label"] {
  color: rgba(216, 208, 194, 0.62);
  font-family: var(--font-serif);
  letter-spacing: 0.05em;
}

.day-progress-copy .mono {
  color: rgba(216, 208, 194, 0.3);
  font-size: 7px;
}

.day-progress-track {
  position: relative;
  height: 1px;
  margin-top: 12px;
  background: rgba(242, 234, 220, 0.12);
}

.day-progress-track span {
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 10%;
  background: var(--accent);
  transition: width 450ms var(--ease-out);
  box-shadow: 0 0 7px var(--accent-soft);
}

.day-progress-track span::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.day-progress-hint {
  margin-top: 10px;
  color: rgba(216, 208, 194, 0.23);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
}

.reader-bottom-actions {
  width: min(1170px, 100%);
  margin: 25px auto 0;
  padding-top: 17px;
  border-top: 1px solid rgba(242, 234, 220, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.quiet-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(216, 208, 194, 0.38);
  font-size: 9.5px;
  transition: color 180ms ease;
}

.quiet-link:hover {
  color: var(--cream-soft);
}

.bottom-mark {
  color: rgba(216, 208, 194, 0.18);
  font-size: 6.5px;
  letter-spacing: 0.11em;
  text-align: center;
}

/* ————————————————————————————————
   Drawers
———————————————————————————————— */
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 6, 11, 0.66);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 300ms ease;
}

.drawer-scrim.is-open {
  opacity: 1;
}

.side-drawer {
  position: fixed;
  z-index: 210;
  top: 0;
  right: 0;
  width: min(390px, 100%);
  height: 100svh;
  padding: clamp(26px, 4vw, 40px) clamp(22px, 3vw, 32px) 30px;
  overflow-y: auto;
  border-left: 1px solid rgba(242, 234, 220, 0.13);
  background:
    radial-gradient(120% 80% at 100% 0%, var(--accent-faint), transparent 52%),
    #10141f;
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.36);
  transform: translateX(103%);
  visibility: hidden;
  transition:
    transform 440ms var(--ease-out),
    visibility 440ms;
}

.side-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.side-drawer--wide {
  width: min(560px, 100%);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink-line);
}

.drawer-head .mono {
  color: var(--accent);
  font-size: 7px;
}

.drawer-head h2 {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.drawer-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink-line);
  border-radius: 50%;
  background: transparent;
  color: var(--cream-muted);
  transition:
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.drawer-close:hover {
  color: var(--cream);
  border-color: var(--ink-line-strong);
  transform: rotate(90deg);
}

.drawer-sub {
  margin-top: 17px;
  color: var(--cream-muted);
  font-size: 10.5px;
  line-height: 1.8;
}

.toc-list {
  margin-top: 20px;
}

.toc-item {
  display: grid;
  grid-template-columns: 57px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: baseline;
  width: 100%;
  padding: 15px 0;
  border: 0;
  border-bottom: 1px solid rgba(242, 234, 220, 0.075);
  background: transparent;
  color: var(--cream-soft);
  text-align: left;
  transition:
    color 180ms ease,
    padding-left 250ms var(--ease-out);
}

.toc-item:hover {
  color: var(--cream);
  padding-left: 4px;
}

.toc-item.is-current {
  color: var(--accent);
}

.toc-date {
  color: rgba(216, 208, 194, 0.37);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.toc-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.toc-index {
  color: rgba(216, 208, 194, 0.27);
  font-family: var(--font-mono);
  font-size: 7px;
  text-align: right;
}

.toc-item.is-current .toc-index {
  color: var(--accent);
}

.drawer-cover-button {
  width: 100%;
  margin-top: 26px;
  padding: 13px 16px;
  border: 1px solid var(--ink-line);
  background: transparent;
  color: var(--cream-muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  transition:
    color 180ms ease,
    border-color 180ms ease;
}

.drawer-cover-button:hover {
  color: var(--cream);
  border-color: var(--ink-line-strong);
}

/* Conversation drawer */
.dialogue-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.dialogue-message {
  padding: 15px 16px;
  border: 1px solid rgba(242, 234, 220, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.dialogue-message.is-human {
  border-left-color: rgba(214, 163, 157, 0.55);
  background: var(--accent-faint);
}

.dialogue-message.is-machine {
  border-left-color: rgba(145, 162, 151, 0.4);
}

.dialogue-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  color: rgba(216, 208, 194, 0.42);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.dialogue-head b {
  font-weight: 400;
  color: var(--cream-soft);
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.dialogue-text {
  margin-top: 10px;
  color: var(--cream-soft);
  font-family: var(--font-serif);
  font-size: 12.5px;
  line-height: 1.95;
  white-space: pre-wrap;
  word-break: break-word;
}

.dialogue-message.is-human .dialogue-text {
  color: var(--cream);
}

.dialogue-note {
  margin-top: 23px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-line);
  color: rgba(216, 208, 194, 0.3);
  font-size: 8.5px;
  line-height: 1.8;
}

/* Share card */
.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 22px;
}

.share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 11, 0.78);
  backdrop-filter: blur(12px);
}

.share-card {
  position: relative;
  width: min(550px, 100%);
  max-height: 91svh;
  overflow-y: auto;
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid rgba(242, 234, 220, 0.16);
  background:
    radial-gradient(110% 80% at 100% 0%, var(--accent-faint), transparent 55%),
    #111521;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.6);
  animation: shareIn 420ms var(--ease-out) both;
}

@keyframes shareIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.share-close {
  position: absolute;
  right: 18px;
  top: 18px;
}

.share-card > .mono {
  color: var(--accent);
  font-size: 7px;
}

.share-card h2 {
  margin-top: 13px;
  padding-right: 35px;
  font-family: var(--font-serif);
  font-size: clamp(25px, 3.4vw, 32px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.03em;
}

.share-lede {
  margin-top: 10px;
  color: var(--cream-muted);
  font-size: 10.5px;
  line-height: 1.8;
}

.share-link-block {
  margin-top: 22px;
  padding: 13px 14px;
  border: 1px solid var(--ink-line);
  background: rgba(255, 255, 255, 0.015);
}

.share-link-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.share-link-top > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.share-link-top b {
  color: var(--cream-soft);
  font-size: 11px;
  font-weight: 500;
}

.share-link-top span {
  color: var(--cream-muted);
  font-family: var(--font-mono);
  font-size: 6.8px;
  letter-spacing: 0.08em;
}

.copy-mini {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid var(--ink-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--cream-muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.copy-mini:hover {
  color: var(--cream);
}

.share-link-block input {
  width: 100%;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(216, 208, 194, 0.46);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1.7;
  text-overflow: ellipsis;
  user-select: all;
}

.import-note {
  margin-top: 22px;
  padding: 14px 15px;
  border-left: 1px solid var(--accent-soft);
  background: var(--accent-faint);
}

.import-note .mono {
  color: var(--accent);
  font-size: 6.8px;
}

.import-note p {
  margin-top: 7px;
  color: rgba(216, 208, 194, 0.58);
  font-size: 9.5px;
  line-height: 1.85;
}

.share-actions {
  display: flex;
  gap: 9px;
  margin-top: 24px;
}

.share-actions .button {
  flex: 1;
}

.noscript-note {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 300;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid var(--ink-line);
  background: #121725;
  color: var(--cream-muted);
  font-size: 11px;
  line-height: 1.8;
}

.noscript-note a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}

/* Responsive */
@media (max-width: 1080px) {
  .cover-screen {
    grid-template-columns: minmax(0, 1.06fr) minmax(310px, 0.94fr);
  }

  .cover-title {
    font-size: clamp(46px, 5.8vw, 68px);
  }

  .closed-book {
    width: clamp(260px, 30vw, 330px);
  }

  .page-inner {
    padding-inline: clamp(30px, 3.8vw, 50px);
  }

  .day-title {
    font-size: clamp(29px, 3.4vw, 39px);
  }

  .page-body-text {
    font-size: 14.5px;
    line-height: 2.03;
  }
}

@media (max-width: 860px) {
  .cover-screen {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 110px;
    padding-bottom: 46px;
  }

  .cover-copy {
    max-width: 650px;
  }

  .cover-title {
    max-width: 620px;
    font-size: clamp(44px, 8vw, 66px);
  }

  .cover-art {
    min-height: 500px;
  }

  .closed-book {
    width: 260px;
  }

  .cover-note {
    display: none;
  }

  .book-view {
    padding-top: 92px;
  }

  .open-book {
    min-height: 600px;
  }

  .page-inner {
    padding: 34px 30px 27px;
  }

  .page-inner--left {
    padding-right: 26px;
  }

  .page-inner--right {
    padding-left: 30px;
  }

  .day-title {
    font-size: 29px;
    margin-top: 25px;
  }

  .day-quote {
    margin-top: 38px;
  }

  .day-quote blockquote {
    font-size: 16px;
  }

  .page-body-text {
    font-size: 13.8px;
    line-height: 1.98;
  }

  .page-body-text p:first-child::first-letter {
    font-size: 2.7em;
  }

  .reader-bottom-actions .bottom-mark {
    display: none;
  }
}

@media (max-width: 680px) {
  .reader-top {
    grid-template-columns: 1fr auto;
    height: 65px;
    padding-inline: 15px;
    background: linear-gradient(180deg, rgba(9, 12, 20, 0.93), rgba(9, 12, 20, 0.55), transparent);
  }

  .reader-top-center {
    display: none;
  }

  .reader-back span {
    display: none;
  }

  .reader-back {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border: 1px solid var(--ink-line);
    border-radius: 50%;
  }

  .top-action {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
  }

  .top-action span {
    display: none;
  }

  .top-action--filled {
    width: auto;
    padding: 0 11px;
  }

  .top-action--filled span {
    display: inline;
    font-size: 9px;
  }

  .cover-screen {
    width: calc(100% - 36px);
    min-height: auto;
    padding-top: 94px;
    padding-bottom: 38px;
  }

  .cover-kicker .mono {
    font-size: 6.5px;
  }

  .cover-title {
    margin-top: 25px;
    font-size: clamp(39px, 11vw, 56px);
    line-height: 1.23;
  }

  .cover-title::after {
    margin-top: 20px;
  }

  .cover-title.is-long {
    font-size: clamp(33px, 9vw, 46px);
  }

  .cover-names {
    margin-top: 14px;
    font-size: 15px;
  }

  .cover-subtitle {
    font-size: 10.5px;
  }

  .cover-preface {
    margin-top: 23px;
    font-size: 12px;
    line-height: 1.95;
    -webkit-line-clamp: 4;
  }

  .cover-stats {
    margin-top: 27px;
    padding-top: 15px;
  }

  .cover-stat {
    padding-right: 10px;
  }

  .cover-stat + .cover-stat {
    padding-left: 12px;
  }

  .cover-stat strong {
    font-size: 25px;
  }

  .cover-stat span {
    font-size: 6px;
    white-space: normal;
  }

  .cover-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-top: 27px;
  }

  .cover-hint {
    margin-top: 18px;
    font-size: 8px;
  }

  .cover-art {
    min-height: 400px;
    margin-top: 4px;
  }

  .closed-book {
    width: 216px;
  }

  .closed-emblem {
    width: 80px;
    height: 80px;
    margin-top: 28px;
    margin-bottom: 23px;
  }

  .closed-planet {
    width: 31px;
    height: 31px;
  }

  .closed-cover {
    padding: 20px 16px 17px 28px;
  }

  .closed-title {
    font-size: 23px;
  }

  .closed-ribbon {
    height: 73px;
    right: 32px;
  }

  .cover-float {
    min-width: 107px;
    padding: 8px 10px;
  }

  .cover-float strong {
    font-size: 10px;
  }

  .cover-float--one {
    right: 0;
    top: 13%;
  }

  .cover-float--two {
    left: 0;
    bottom: 12%;
  }

  .book-view {
    width: calc(100% - 18px);
    padding-top: 76px;
    padding-bottom: 36px;
  }

  .book-meta-strip {
    width: calc(100% - 18px);
    margin-bottom: 10px;
  }

  .book-meta-strip .mono {
    display: none;
  }

  .book-rig::before {
    inset: 4px -4px -5px 5px;
  }

  .open-book {
    display: block;
    min-height: 0;
    border-radius: 2px;
    transform: none;
  }

  .book-page--left,
  .book-gutter {
    display: none;
  }

  .book-page--right {
    border-radius: 2px;
  }

  .page-inner--right {
    padding: 26px 22px 25px;
    min-height: 0;
  }

  .mobile-day-head {
    display: block;
  }

  .mobile-day-head .page-topline .mono {
    font-size: 7px;
  }

  .mobile-day-head .day-title {
    max-width: 100%;
    margin-top: 22px;
    font-size: 29px;
    line-height: 1.35;
  }

  .mobile-day-head .day-meta {
    margin-top: 18px;
  }

  .mobile-day-head .day-keywords {
    margin-top: 14px;
  }

  .page-body-text {
    margin-top: 28px;
    font-size: 14.8px;
    line-height: 2.02;
    text-align: left;
  }

  .page-body-text p:first-child::first-letter {
    font-size: 2.9em;
  }

  .mobile-quote {
    display: block;
    margin-top: 34px;
    padding-top: 19px;
    border-top: 1px solid rgba(85, 65, 41, 0.16);
  }

  .mobile-quote .mono {
    color: rgba(103, 87, 66, 0.5);
    font-size: 6.5px;
    letter-spacing: 0.1em;
  }

  .mobile-quote p {
    margin-top: 9px;
    padding-left: 14px;
    border-left: 1px solid rgba(100, 47, 60, 0.38);
    color: rgba(55, 44, 34, 0.9);
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.8;
  }

  .right-page-foot {
    padding-top: 34px;
  }

  .mobile-conversation-row {
    display: block;
    margin-top: 23px;
    padding-top: 17px;
    border-top: 1px solid rgba(85, 65, 41, 0.14);
  }

  .conversation-link--mobile {
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  .conversation-link--mobile > span:last-child {
    color: rgba(103, 87, 66, 0.5);
    font-family: var(--font-mono);
    font-size: 7.5px;
  }

  .reader-controls {
    width: calc(100% - 8px);
    gap: 9px;
    margin-top: 20px;
  }

  .page-arrow {
    width: 40px;
    height: 40px;
  }

  .day-progress-copy {
    font-size: 9px;
  }

  .day-progress-copy .mono {
    font-size: 6px;
  }

  .day-progress-hint {
    display: none;
  }

  .reader-bottom-actions {
    width: calc(100% - 14px);
    margin-top: 20px;
    font-size: 8px;
  }

  .reader-bottom-actions .quiet-link {
    font-size: 8.5px;
  }

  .side-drawer {
    width: 100%;
    padding: 25px 20px 26px;
    border-left: 0;
  }

  .drawer-head h2 {
    font-size: 24px;
  }

  .toc-item {
    padding-block: 13px;
  }

  .dialogue-text {
    font-size: 13px;
  }

  .share-overlay {
    padding: 0;
    align-items: end;
  }

  .share-card {
    width: 100%;
    max-height: 90svh;
    padding: 27px 20px 28px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .share-card h2 {
    font-size: 25px;
  }

  .share-actions {
    flex-wrap: wrap;
  }

  .share-actions .button {
    flex: 1 1 100%;
  }

  .share-link-block input {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .closed-book,
  .cover-float {
    animation: none !important;
  }
}

@media print {
  .reader-top,
  .reader-controls,
  .reader-bottom-actions,
  .drawer-scrim,
  .side-drawer,
  .share-overlay,
  .cover-screen {
    display: none !important;
  }

  .diary-page {
    background: #fff;
  }

  .book-view {
    display: block !important;
    padding: 0;
    width: 100%;
  }

  .open-book {
    box-shadow: none;
    min-height: auto;
  }
}
