:root {
  color-scheme: light;
  --paper: #f8f4eb;
  --ink: #163a2d;
  --forest: #12392e;
  --muted: #4d6256;
  --line: #d8d6c7;
  --cream: #fffcf5;
  font: 16px/1.5 "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; }
:where(a, button):focus-visible { outline: 3px solid #a05b36; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(720px, calc(100% - 36px)); margin-inline: auto; }
.hero {
  text-align: center;
  padding: 28px 0 22px;
}
.imprint {
  position: relative;
  display: inline-block;
  vertical-align: top;
  width: min(100%, clamp(220px, 64vw, 265px));
  height: 53px;
  isolation: isolate;
}
.imprint-window { position: absolute; inset: -22px -20px -12px; overflow: hidden; }
.imprint-canvas { position: absolute; inset: 22px 20px 12px; }
.imprint img, .imprint video {
  position: absolute;
  top: 50%;
  left: -39.255%;
  width: 178.882%;
  max-width: none;
  height: auto;
  aspect-ratio: 8 / 3;
  transform: translateY(-50%);
  /* Keep the full fall and splash while removing the preview canvas margins. */
  clip-path: inset(2% 21% 31% 19%);
  pointer-events: none;
}
.imprint video {
  visibility: hidden;
  transform: translateY(calc(-50% + var(--entrance-offset, 0%)));
}
.imprint.is-playing img { opacity: 0; }
.imprint.is-playing video { visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .imprint.is-playing img { opacity: 1; }
  .imprint.is-playing video { visibility: hidden; }
}
.hero h1 {
  margin: 13px 0 7px;
  font-size: clamp(2rem, 6.2vw, 3.5rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.038em;
  text-wrap: balance;
}
.hero h1 span { color: #855331; }
.hero p { margin: 0 auto; color: var(--muted); font-size: .97rem; }
.jump-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 478px;
  margin: 17px auto 0;
}
.jump-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 44px;
  padding: 7px 11px;
  border-radius: 8px;
  background: var(--forest);
  color: var(--cream);
  font-size: .84rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}
.jump-links a + a { border: 1px solid #bfcaba; background: #e7ece1; color: var(--forest); }
.jump-links a:hover { filter: brightness(1.1); }
.shelf {
  margin-bottom: 24px;
  border: 1px solid #dbdece;
  border-radius: 13px;
  background: #edf0e6;
  padding: 15px 14px 10px;
  scroll-margin-top: 10px;
}
.shelf + .shelf { background: #f1eadf; border-color: #e1d7c6; }
.shelf-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.shelf h2 {
  margin: 0;
  font-size: clamp(1.2rem, 4.4vw, 1.62rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.02em;
}
.shelf-heading p { margin: 5px 0 0; font-size: .85rem; color: var(--muted); }
.shelf-track {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 24px) / 3.25);
  gap: 9px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  padding: 4px 4px 8px;
  scroll-padding-inline: 4px;
  margin-inline: -4px;
}
.shelf-track::-webkit-scrollbar { display: none; }
.book { min-width: 0; display: flex; }
.book--lantern { --mat: #dedfc9; }
.book--mallow { --mat: #e8dfc7; }
.book--bramble { --mat: #e7dcc2; }
.book--picnic { --mat: #dce8e2; }
.book--shellwork { --mat: #dce7e3; }
.book--teashop { --mat: #eaddc9; }
.book--evening { --mat: #eedbc9; }
.book--better { --mat: #eee0c7; }
.book--decisions { --mat: #e1e9da; }
.book-link {
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--cream);
  text-decoration: none;
}
.book-link:focus-visible { outline-offset: 2px; }
.cover {
  display: grid;
  place-items: center;
  aspect-ratio: 1.02;
  padding: 10px;
  overflow: hidden;
  background: var(--mat);
  container-type: size;
  isolation: isolate;
}
.book-face {
  position: relative;
  width: min(100cqw, calc(100cqh * (var(--cover-ratio))));
  aspect-ratio: var(--cover-ratio);
  box-shadow: 2px 5px 7px #17271d35;
  transition: transform .2s ease, box-shadow .2s ease;
}
.book-face--paperback { --edge: 3px; }
.book-face--hardcover { --edge: 6px; }
.book-face--paperback::before, .book-face--hardcover::before {
  position: absolute;
  inset: 100% 0 auto;
  height: calc(var(--edge) / 2);
  background: linear-gradient(#f2e6ce, #b9a98b);
  content: "";
}
.book-face--paperback::after, .book-face--hardcover::after {
  position: absolute;
  inset: 0 auto 0 100%;
  width: var(--edge);
  background: linear-gradient(90deg, #cabda5, #f4ebd8 58%, #a49780);
  clip-path: polygon(0 0, 100% var(--edge), 100% calc(100% - var(--edge)), 0 100%);
  content: "";
}
.book-face--hardcover::after {
  background: linear-gradient(90deg, #536457 1px, #d3c7af 1px, #f4ebd8 70%, #637064);
}
.book-face--kindle { box-shadow: 2px 4px 7px #17271d30; }
.cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (hover: hover) {
  .book-link:hover .book-face {
    transform: translateY(-2px);
    box-shadow: 3px 7px 9px #17271d40;
  }
}
.book-details { padding: 8px 9px 11px; }
.book h3 { margin: 0 0 5px; font-size: clamp(.9rem, 3.8vw, 1.03rem); line-height: 1.28; font-weight: 700; }
.format { margin: 0; color: var(--muted); font-size: .81rem; font-weight: 500; }
.format [data-edition]::before { content: " · "; }
.footer { padding: 0 0 20px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.footer .brand { font-size: .92rem; font-weight: 700; }
.social-links { display: flex; flex: none; gap: 8px; }
.social-link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--cream);
}
.social-link--instagram { color: #171717; }
.social-link--pinterest { color: #e60023; }
.social-link:hover { background: #eee8db; border-color: var(--muted); }
.social-link svg { display: block; width: 21px; height: 21px; }
@media (max-width: 580px) {
  .hero { padding-top: 23px; }
  .shelf { padding: 12px 10px 8px; }
  .shelf-track { grid-auto-columns: calc((100% - 18px) / 2.25); }
  .shelf-heading p { font-size: .79rem; }
}
@media (max-width: 365px) {
  .wrap { width: calc(100% - 24px); }
  .jump-links a { font-size: .77rem; }
}

body:has(.book-sheet[open]) { overflow: hidden; }
.book-sheet {
  position: fixed;
  inset: 0;
  width: min(490px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 33px 25px 23px;
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 50px #12211935;
  text-align: center;
}
.book-sheet[open] { animation: sheet-in .24s cubic-bezier(.18, .75, .25, 1) both; }
.book-sheet:not([open]) { display: none; }
.book-sheet::backdrop { background: #23291eb0; animation: dim-in .18s ease-out both; }
.sheet-close {
  position: absolute;
  top: 5px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.sheet-close:hover { background: #e6e5d6; }
.sheet-cover {
  width: auto;
  max-width: 86%;
  height: auto;
  max-height: min(30dvh, 240px);
  margin: 0 auto 12px;
  border-radius: 3px;
  object-fit: contain;
  box-shadow: 0 4px 12px #17271d28;
}
.book-sheet h2 {
  margin: 0 0 5px;
  font-size: clamp(1.55rem, 6vw, 2.1rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.025em;
  text-wrap: balance;
}
#sheet-description { margin: 10px auto 15px; max-width: 38ch; font-size: .94rem; }
.sheet-editions p { margin: 0 0 7px; color: var(--muted); font-size: .87rem; font-weight: 700; }
.edition-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-shop {
  display: flex;
  flex: 1 1 120px;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 9px 14px;
  border-radius: 7px;
  background: var(--forest);
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
}

.sheet-shop:hover { background: #285241; }

@keyframes sheet-in { from { transform: translateY(44px); opacity: .35; } to { transform: translateY(0); opacity: 1; } }
@keyframes dim-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 550px) {
  .book-sheet {
    inset: auto 0 0;
    width: 100%;
    max-height: calc(100dvh - 12px);
    padding: 35px 17px max(17px, env(safe-area-inset-bottom));
    margin: 0;
    border-bottom: 0;
    border-radius: 17px 17px 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .book-sheet[open], .book-sheet::backdrop { animation: none; }
  .book-face { transition: none; }
  .book-link:hover .book-face { transform: none; }
}

/* Quiet, tactile controls and fractional shelf movement. */
html { scroll-behavior: smooth; }
.jump-links { gap: 12px; max-width: 540px; margin-top: 23px; }
.jump-links a {
  min-height: 62px; padding: 14px 17px; border: 1px solid #64785c;
  border-radius: 16px; background: linear-gradient(135deg, #294e3d, #12392e);
  box-shadow: inset 0 1px 0 #ffffff26, 0 5px 12px #163a2d12;
  font-weight: 600; letter-spacing: -.01em;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.jump-links a + a { border-color: #cebc96; background: linear-gradient(135deg, #fffaf0, #eee3ce); color: var(--forest); }
.jump-links a span {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px;
  border-radius: 50%; border: 1px solid #bda57580; color: #e4cd9c;
}
.jump-links a + a span { color: #816533; border-color: #bda57599; }
.jump-links a:hover { filter: none; transform: translateY(-2px); box-shadow: 0 8px 20px #163a2d18; }
.jump-links a:active { transform: translateY(0); }
.shelf-track.has-rail { display: block; }
.shelf-rail { display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-width); gap: 9px; width: max-content; will-change: transform; }
.sheet-close, .social-link {
  border: 1px solid #d7ccb6; background: linear-gradient(145deg, #fffdf7, #efe9dc);
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px #163a2d08;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.sheet-close:active { transform: scale(.95); }
.book-link { border-radius: 11px; }
.book-face { transition-duration: .35s; }
.book-sheet { border-color: #ded1b7; border-radius: 24px; padding-top: 54px; box-shadow: 0 24px 80px #12211940; }
.book-sheet[open] { animation: sheet-in .42s cubic-bezier(.22, 1, .36, 1) both; }
.book-sheet::backdrop { background: #132b24a8; backdrop-filter: blur(5px); animation: dim-in .3s ease both; }
.book-sheet.is-closing { animation: sheet-out .22s ease-in both; }
.book-sheet.is-closing::backdrop { animation: dim-out .22s ease both; }
.sheet-close { top: 10px; right: 12px; font-size: 1.6rem; }
.sheet-close:hover { background: #e9e2d3; box-shadow: 0 3px 10px #163a2d15; }
.sheet-shop {
  min-height: 52px; border: 1px solid #64785c; border-radius: 13px;
  background: linear-gradient(135deg, #294e3d, #12392e);
  box-shadow: inset 0 1px 0 #ffffff26, 0 4px 9px #163a2d12;
  transition: transform .25s ease, box-shadow .25s ease;
}
.sheet-shop:hover { background: linear-gradient(135deg, #365f4b, #1b4435); transform: translateY(-1px); box-shadow: 0 6px 14px #163a2d22; }

@keyframes sheet-out { to { transform: translateY(25px); opacity: 0; } }
@keyframes dim-out { to { opacity: 0; } }
@media (max-width: 550px) {
  .book-sheet { border-radius: 24px 24px 0 0; padding-top: 54px; }
  .jump-links a { padding: 12px; gap: 6px; font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .book-sheet[open], .book-sheet::backdrop { animation: none; }
  .jump-links a, .sheet-shop, .sheet-close, .social-link { transition: none; }
}

.shelf-track:focus-visible { outline: 2px solid #9e8050; outline-offset: 3px; border-radius: 10px; }
.shelf-track.is-dragging, .shelf-track.is-dragging * { cursor: grabbing; user-select: none; }

.sheet-shop {
  justify-content: space-between; padding: 12px 16px;
  border-color: #8d815d;
  background: linear-gradient(155deg, #365946 0%, #1e4433 48%, #123529 100%);
  box-shadow: inset 0 1px 0 #f5e7c329, 0 2px 5px #163a2d18;
}
.sheet-shop:hover { box-shadow: inset 0 1px 0 #f5e7c338, 0 4px 9px #163a2d1c; }
.sheet-shop:active { transform: translateY(0); box-shadow: inset 0 1px 2px #102e2320; }
.edition-arrow {
  display: grid; place-items: center; flex: none; width: 27px; height: 27px;
  border: 1px solid #e5d1a780; border-radius: 8px;
  background: linear-gradient(145deg, #efdfba, #cdb17a);
  color: #674614;
  box-shadow: inset 0 1px 0 #fff5db66, 0 1px 2px #0002;
}
.edition-arrow svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;  }

.sheet-close { line-height: 0; }
.sheet-close svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.edition-arrow svg { display: block; }
