:root {
  --paper: #f3ede2;
  --ink: #1f1a17;
  --muted: #665d55;
  --line: rgba(31, 26, 23, 0.14);
  --card: rgba(255, 252, 246, 0.76);
  --shadow: 0 18px 48px rgba(31, 26, 23, 0.12);
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Aptos", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(184, 138, 59, 0.16), transparent 28%),
    linear-gradient(180deg, #f7f1e7 0%, var(--paper) 48%, #ede3d2 100%);
  color: var(--ink);
  font-family: var(--sans);
}

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

.site-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px 48px;
}

.page {
  display: grid;
  gap: 24px;
}

.site-header,
.site-footer,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header {
  padding: 28px 0 18px;
}

.brand {
  font-family: var(--serif);
  font-size: 2rem;
}

.brand-block {
  display: grid;
  gap: 4px;
}

.tagline {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav,
.tag-row,
.button-row,
.pill-row,
.prompt-list,
.list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav a,
.nav summary,
.tag-row a,
.pill,
.button {
  border-radius: 999px;
}

.nav a,
.nav summary {
  padding: 10px 14px;
}

.nav summary {
  list-style: none;
  cursor: pointer;
}

.nav summary::-webkit-details-marker {
  display: none;
}

.nav a.active,
.home-template .nav-home,
.page-books-template .nav-books,
.page-search-template .nav-search,
.tag-template.tag-poetry .nav-poetry,
.tag-template.tag-memoir .nav-memoir,
.tag-template.tag-short-story .nav-short-stories,
.nav-menu[open] summary {
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--line);
}

.nav a:hover,
.nav summary:hover {
  background: rgba(255, 255, 255, 0.45);
}

.nav-menu {
  position: relative;
}

.nav-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  min-width: 220px;
  display: grid;
  gap: 8px;
  padding: 14px;
  background: rgba(255, 252, 246, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.nav-menu-panel a {
  padding: 9px 12px;
  border-radius: 12px;
}

.nav-menu-panel a:hover {
  background: rgba(255, 255, 255, 0.56);
}

.eyebrow {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.display,
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
}

.display,
h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

h3 {
  font-size: 1.55rem;
}

.lede,
.muted {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-grid,
.page-hero,
.split-layout,
.split-panels,
.book-page-grid,
.post-grid,
.module-grid {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: 1.45fr 0.75fr;
}

.page-hero,
.split-layout {
  grid-template-columns: 1.2fr 0.8fr;
}

.module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.module-grid > * {
  height: 100%;
}

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

.hero-main,
.topline-main,
.right-stack {
  display: grid;
  gap: 16px;
}

.hero-card,
.genre-panel,
.stack-card,
.panel,
.hero-panel,
.side-panel,
.content-page,
.comment-panel,
.filter-panel,
.image-card,
.book-card,
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-card,
.hero-panel,
.side-panel,
.panel,
.stack-card,
.content-page,
.comment-panel,
.filter-panel,
.book-card,
.card {
  padding: 24px;
}

.hero-split,
.book-card-featured {
  display: grid;
  grid-template-columns: 0.58fr 1.12fr;
  gap: 22px;
}

.hero-media {
  display: flex;
}

.cover-frame,
.art-block,
.cover-block,
.hero-image img {
  width: 100%;
  border-radius: 24px;
}

.cover-frame {
  min-height: 100%;
  display: flex;
  align-items: end;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(31, 26, 23, 0.08)),
    linear-gradient(135deg, rgba(41, 70, 58, 0.26), rgba(122, 47, 36, 0.22), rgba(184, 138, 59, 0.18));
  background-size: cover;
  background-position: center;
}

.cover-frame--empty {
  min-height: 420px;
}

.media-label {
  width: 100%;
  border-radius: 18px;
  padding: 16px;
  background: rgba(18, 15, 13, 0.76);
  color: #f6eee4;
}

.media-label .eyebrow {
  color: rgba(246, 238, 228, 0.76);
}

.media-label strong {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.04;
}

.media-label span {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  font-weight: 600;
  border: 1px solid transparent;
}

.button-primary {
  background: var(--ink);
  color: #faf5ee;
}

.button-secondary {
  border-color: var(--line);
  background: transparent;
}

.button.is-disabled,
.button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.pill,
.tag-row a {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid var(--line);
}

.search-shell {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-top: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.stack-panel,
.stack-card {
  display: grid;
  gap: 14px;
}

.preview-frame,
.art-block,
.cover-block {
  min-height: 220px;
  display: flex;
  align-items: end;
  padding: 16px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.image-card {
  padding: 18px 18px 24px;
}

.bottom-cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.image-card > .eyebrow {
  margin-bottom: 4px;
}

.image-card .art-block {
  min-height: 340px;
  margin-top: 14px;
  margin-bottom: 18px;
}

.front-page-quad {
  display: grid;
  gap: 18px;
}

.front-page-quad .button-row {
  margin-top: 0;
}

.front-page-quad__stage {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  width: 100%;
  margin-top: 14px;
  margin-bottom: 18px;
  border-radius: 28px;
  display: flex;
  align-items: end;
  padding: 16px;
}

.front-page-quad__overlay {
  width: 100%;
}

.front-page-quad__overlay--dark {
  background: rgba(18, 15, 13, 0.92);
  color: #f6eee4;
}

.front-page-quad__overlay--paper {
  background:
    radial-gradient(circle at top left, rgba(237, 210, 159, 0.2), transparent 28%),
    linear-gradient(135deg, #ede2d2, #e4d7c6 52%, #efe5d5);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: var(--ink);
}

.front-page-quad__overlay--paper .eyebrow {
  color: var(--muted);
}

.front-page-quad__stage--poetry::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(184, 138, 59, 0.14), transparent 26%),
    radial-gradient(circle at 82% 24%, rgba(161, 121, 71, 0.1), transparent 24%),
    linear-gradient(135deg, rgba(255, 250, 242, 0.08), rgba(75, 62, 49, 0.03));
  pointer-events: none;
}

.front-page-quad--poetry .front-page-quad__stage {
  margin-top: 0;
}

.poetry-stage__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.poetry-stage__header h3 {
  margin-top: 6px;
  font-size: 1.55rem;
  line-height: 1.12;
  color: var(--ink);
}

.poetry-stage__note {
  max-width: 42rem;
  margin: 0;
  color: #4d433b;
  font-size: 1rem;
  line-height: 1.7;
}

.poem-snippet--home {
  width: 100%;
  max-width: none;
  max-height: 10.5rem;
  overflow: hidden;
  padding-right: 0;
  color: var(--ink);
}

.poem-snippet--home > * {
  margin-top: 0;
  margin-bottom: 0.95rem;
}

.poem-snippet--home > *:first-child {
  margin-top: 0;
}

.poem-snippet--home > *:last-child {
  margin-bottom: 0;
}

.poem-snippet--home p,
.poem-snippet--home div {
  color: inherit;
  white-space: pre-line;
  line-height: 1.8;
}

.poem-snippet--home p {
  width: auto;
  max-width: 100%;
  font-size: 0.98rem;
  line-height: 1.55;
}

.poem-snippet--home h1,
.poem-snippet--home h2,
.poem-snippet--home h3,
.poem-snippet--home h4,
.poem-snippet--home h5,
.poem-snippet--home h6,
.poem-snippet--home figure,
.poem-snippet--home img,
.poem-snippet--home hr,
.poem-snippet--home blockquote {
  display: none;
}

.poetry-card {
  overflow: hidden;
  display: grid;
  gap: 18px;
}

.poetry-card__link {
  display: grid;
  gap: 18px;
}

.poetry-card .art-block {
  min-height: 240px;
  margin-bottom: 18px;
}

.poetry-card .media-label {
  max-width: 88%;
}

.poem-snippet {
  max-height: 13.5em;
  overflow: hidden;
}

.poem-snippet--card {
  position: relative;
  max-height: 8.6em;
  overflow: hidden;
}

.poem-snippet--card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3.2em;
  background: linear-gradient(180deg, rgba(247, 241, 231, 0), rgba(247, 241, 231, 0.92) 58%, rgba(247, 241, 231, 1) 100%);
  pointer-events: none;
}

.poetry-card__ellipsis {
  justify-self: end;
  margin-top: -8px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1;
}

.image-card .muted {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-cta-card__excerpt {
  flex: 1 1 auto;
  width: 100%;
  overflow: hidden;
}

.bottom-cta-card__excerpt .muted {
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0;
}

.bottom-cta-card .button-row,
.bottom-cta-card__actions {
  margin-top: auto;
}

.poem-snippet > *:first-child {
  margin-top: 0;
}

.poem-snippet p,
.poem-snippet div {
  white-space: pre-line;
}

.homepage-reboot {
  display: grid;
  gap: 0;
}

.home-quad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.home-quad {
  display: grid;
  gap: 18px;
  padding: 20px 20px 24px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.home-quad > .eyebrow {
  margin-bottom: 0;
}

.home-quad__stage {
  min-height: 460px;
  display: flex;
  align-items: end;
  padding: 16px;
  border-radius: 28px;
  overflow: hidden;
}

.home-quad__stage--books {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(31,26,23,0.12)),
    linear-gradient(135deg, #8f3027, #1a2b45 52%, #d38b3c);
  background-size: cover;
  background-position: center;
}

.home-quad__stage--poetry {
  background:
    radial-gradient(circle at top left, rgba(184, 138, 59, 0.14), transparent 28%),
    linear-gradient(180deg, #f7f1e7 0%, #f3ede2 48%, #ede3d2 100%);
}

.home-quad__panel {
  width: 100%;
  border-radius: 18px;
  padding: 16px;
}

.home-quad__panel--dark {
  background: rgba(18, 15, 13, 0.92);
  color: #f6eee4;
}

.home-quad__panel--dark .eyebrow {
  color: rgba(246, 238, 228, 0.76);
}

.home-quad--books .home-quad__panel--dark {
  background:
    linear-gradient(135deg, rgba(12, 24, 31, 0.42), rgba(34, 56, 72, 0.28) 38%, rgba(110, 79, 52, 0.24) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 32px rgba(18, 15, 13, 0.18);
  backdrop-filter: blur(10px) saturate(135%);
  -webkit-backdrop-filter: blur(10px) saturate(135%);
}

.home-quad--books .home-quad__panel--dark span {
  color: rgba(255, 248, 238, 0.98);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(16, 13, 11, 0.35);
}

.home-quad__panel--paper {
  background:
    radial-gradient(circle at top left, rgba(237, 210, 159, 0.2), transparent 28%),
    linear-gradient(135deg, #ede2d2, #e4d7c6 52%, #efe5d5);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.home-quad__panel strong {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.04;
}

.home-quad__panel span {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}

.home-quad__poem {
  margin-top: 10px;
  max-height: 7.4rem;
  overflow: hidden;
}

.home-quad__poem > *:first-child {
  margin-top: 0;
}

.home-quad__poem > *:last-child {
  margin-bottom: 0;
}

.home-quad__poem p,
.home-quad__poem div {
  white-space: pre-line;
  line-height: 1.55;
}

.home-quad__poem h1,
.home-quad__poem h2,
.home-quad__poem h3,
.home-quad__poem h4,
.home-quad__poem h5,
.home-quad__poem h6,
.home-quad__poem figure,
.home-quad__poem img,
.home-quad__poem hr,
.home-quad__poem blockquote {
  display: none;
}

.books-storefront {
  display: grid;
  gap: 28px;
}

.theme-books,
.theme-writing {
  display: grid;
  gap: 18px;
}

.section-head--stacked {
  justify-content: start;
}

.books-storefront__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.books-storefront__hero-copy,
.books-storefront__hero-note {
  padding: 24px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.books-storefront__hero-note {
  display: grid;
  gap: 10px;
}

.books-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  gap: 20px;
  justify-content: start;
}

.books-empty-state {
  display: grid;
  gap: 10px;
  padding: 28px;
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.book-product-card {
  display: grid;
  grid-template-rows: 360px minmax(0, 1fr);
  height: 577px;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.book-product-card__cover {
  position: relative;
  display: block;
  width: 100%;
  height: 360px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.36);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.book-product-card__cover-fallback {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: end;
  padding: 18px;
  color: #f6eee4;
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.1;
}

.book-product-card__cover-fallback.is-red {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(31,26,23,0.12)),
    linear-gradient(135deg, #962e25, #102848 55%, #df8d3f);
}

.book-product-card__cover-fallback.is-blue {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(31,26,23,0.12)),
    linear-gradient(135deg, #243a63, #4f657f 55%, #c4d1d9);
}

.book-product-card__cover-fallback.is-olive {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(31,26,23,0.12)),
    linear-gradient(135deg, #586141, #2f3930 52%, #ceb98c);
}

.book-product-card__body {
  display: grid;
  grid-template-rows: 5.8rem 1.6rem auto;
  gap: 8px;
  align-content: start;
  min-height: 0;
}

.book-product-card__header {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.book-product-card__header h2 {
  font-size: 1.45rem;
  line-height: 1.12;
}

.book-product-card__subhead {
  margin: 0;
  color: #305b95;
  font-size: 0.98rem;
  line-height: 1.45;
  white-space: pre-line;
  max-height: 5.8rem;
  overflow: hidden;
}

.book-product-card__meta {
  display: flex;
  align-items: center;
  min-height: 1.6rem;
  visibility: hidden;
}

.book-product-card__meta[data-has-status="true"] {
  visibility: visible;
}

.book-meta-slot {
  display: grid;
  gap: 2px;
}

.book-meta-slot__label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-meta-slot__value {
  font-size: 0.96rem;
  line-height: 1.45;
}

.book-meta-slot--plain .book-meta-slot__value {
  font-size: 1rem;
  line-height: 1.5;
}

.book-meta-slot--plain {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.book-meta-slot__rating {
  display: inline-flex;
  color: #c28a1b;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.book-product-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.book-product-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.book-product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 0;
  align-items: center;
  margin-top: auto;
}

.image-card-tall .art-block {
  min-height: 460px;
}

.book-cover {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(31,26,23,0.12)),
    linear-gradient(135deg, #8f3027, #1a2b45 52%, #d38b3c);
}

.story-art {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(31,26,23,0.12)),
    linear-gradient(135deg, #5c4d3d, #27433e 52%, #9a5a44);
}

.poetry-art {
  background:
    radial-gradient(circle at top left, rgba(184, 138, 59, 0.14), transparent 28%),
    linear-gradient(180deg, #f7f1e7 0%, #f3ede2 48%, #ede3d2 100%);
}

.poetry-card__title-link {
  display: block;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid var(--line);
}

.poetry-card__title-link h3 {
  margin: 0;
}

.memoir-art {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), rgba(31,26,23,0.12)),
    linear-gradient(135deg, #a57a58, #677487 58%, #d2b18b);
}

.book-card {
  display: grid;
  gap: 14px;
}

.book-card-portrait .cover-block {
  min-height: 460px;
}

.cover-block.red {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(31,26,23,0.12)),
    linear-gradient(135deg, #962e25, #102848 55%, #df8d3f);
}

.cover-block.blue {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(31,26,23,0.12)),
    linear-gradient(135deg, #243a63, #4f657f 55%, #c4d1d9);
}

.cover-block.olive {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(31,26,23,0.12)),
    linear-gradient(135deg, #586141, #2f3930 52%, #ceb98c);
}

.content-page,
.post-layout {
  display: grid;
  gap: 24px;
}

.book-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  align-items: start;
  gap: 36px;
}

.book-detail-rail {
  display: grid;
  justify-items: start;
  min-width: 0;
  gap: 18px;
}

.book-detail-main {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 24px;
  overflow-x: hidden;
}

.book-detail-header {
  display: grid;
  gap: 10px;
}

.title-share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(31, 26, 23, 0.52);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.share-link:hover,
.share-link:focus-visible {
  color: rgba(31, 26, 23, 0.84);
  transform: translateY(-1px);
}

.share-link--icon-only {
  width: 32px;
  height: 32px;
  margin-top: 4px;
}

.share-link--icon-only svg {
  width: 18px;
  height: 18px;
  display: block;
}

.share-link:focus-visible,
.button:focus-visible,
.poem-share-modal__close:focus-visible {
  outline: 2px solid rgba(48, 91, 149, 0.5);
  outline-offset: 3px;
}

.book-detail-header h1 {
  max-width: none;
  width: 100%;
  margin-top: 4px;
  font-size: clamp(1.3rem, 1.75vw, 1.7rem);
  line-height: 1.12;
}

.book-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.book-detail-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.book-detail-cover {
  width: 328px;
  max-width: 328px;
  margin: 0;
  padding: 0;
  align-self: start;
  justify-self: start;
  background: #fff;
  border: 1px solid #c9c9c9;
  box-shadow: none;
  overflow: visible;
  box-sizing: border-box;
}

.book-detail-cover,
.book-detail-cover figure,
.book-detail-cover .kg-image-card,
.book-detail-cover .kg-width-wide,
.book-detail-cover .kg-width-full {
  max-width: 328px;
  width: 100%;
  margin: 0;
}

.book-detail-cover img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: #fff;
  border: 0;
  border-radius: 0 !important;
  box-shadow: none;
  clip-path: none;
}

.page-header {
  display: grid;
  gap: 12px;
}

.page-header--post {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
}

.page-header-main {
  display: grid;
  gap: 8px;
}

.post-meta-rail {
  display: flex;
  justify-content: end;
  align-items: start;
}

.page-header--post .title-share-row {
  align-items: center;
}

.page-header--post .share-link--icon-only {
  margin-top: 10px;
}

.poem-share-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.poem-share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 26, 23, 0.34);
  backdrop-filter: blur(4px);
}

.poem-share-modal__dialog {
  position: relative;
  width: min(92vw, 640px);
  margin: 8vh auto 0;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 252, 246, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 24px 64px rgba(31, 26, 23, 0.22);
}

.poem-share-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  color: rgba(31, 26, 23, 0.38);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.poem-share-preview {
  margin-top: 16px;
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(184, 138, 59, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(244, 237, 226, 0.96));
  border: 1px solid rgba(31, 26, 23, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.poem-share-preview::after {
  content: "";
  position: absolute;
  right: 26px;
  bottom: 24px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 138, 59, 0.14), rgba(184, 138, 59, 0));
  pointer-events: none;
}

.poem-share-preview__header {
  position: relative;
  z-index: 1;
  padding: 14px 20px;
  border-radius: 22px;
  border: 1px solid rgba(31, 26, 23, 0.14);
  background: rgba(255, 252, 246, 0.94);
}

.poem-share-preview__kicker {
  margin-bottom: 10px;
  color: #7d5e27;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.poem-share-preview__header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.06;
}

.poem-share-preview__body {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(247, 241, 231, 0.9), rgba(243, 237, 226, 0.76));
}

.poem-share-preview__body p {
  margin: 0;
  max-width: 26ch;
  color: #1f1a17;
  font-size: 1.05rem;
  line-height: 1.72;
  white-space: pre-line;
}

.poem-share-preview__footer {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(31, 26, 23, 0.08);
}

.poem-share-preview__path {
  display: inline-block;
  max-width: 100%;
  color: rgba(31, 26, 23, 0.52);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.poem-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.poem-share-status {
  margin-top: 16px;
  color: #7d5e27;
  font-size: 0.95rem;
  line-height: 1.5;
}

.poem-share-status.is-error {
  color: #8f2f2f;
}

.post-kind-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  font-size: 0.92rem;
  white-space: nowrap;
}

.post-content-grid {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.content-body {
  background: transparent;
}

.content-page--book .content-body {
  overflow-x: hidden;
}

.content-page--book .gh-content {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-page--book .gh-content > * {
  max-width: 100%;
}

.content-page--book .gh-content a,
.content-page--book .gh-content code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-page--book .gh-content p,
.content-page--book .gh-content li,
.content-page--book .gh-content blockquote,
.content-page--book .gh-content figcaption,
.content-page--book .gh-content div {
  width: auto;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-page--book .gh-content .kg-width-wide,
.content-page--book .gh-content .kg-width-full,
.content-page--book .gh-content .kg-html-card {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.content-page--book .gh-content figure:not(.kg-width-wide):not(.kg-width-full),
.content-page--book .gh-content .kg-card:not(.kg-width-wide):not(.kg-width-full):not(.kg-html-card) {
  display: table;
  width: fit-content;
  max-width: min(100%, 820px);
  margin-left: 0;
  margin-right: 0;
}

.content-page--book .gh-content figure:not(.kg-width-wide):not(.kg-width-full) img,
.content-page--book .gh-content .kg-card:not(.kg-width-wide):not(.kg-width-full):not(.kg-html-card) img {
  width: auto;
  max-width: 100%;
  height: auto;
}

.content-page--book .gh-content .kg-width-wide {
  width: min(100%, 1120px);
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.content-page--book .gh-content .kg-width-full {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.gh-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.gh-content .kg-width-wide {
  width: min(100%, 1120px);
  margin-right: auto;
  margin-left: auto;
}

.gh-content .kg-width-full {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

.gh-content > * + * {
  margin-top: 1.2em;
}

.hero-image,
.page-feature-image {
  margin: 0;
}

.hero-image img,
.page-feature-image img {
  display: block;
  width: 100%;
  border-radius: 24px;
}

.hero-image img {
  max-height: clamp(320px, 62vh, 760px);
  object-fit: cover;
  object-position: center;
}

.hero-image--inline img {
  max-height: 420px;
  aspect-ratio: 4 / 5;
}

.tag-poetry .post-content-grid {
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}

.tag-poetry .page-header--post {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: 10px;
}

.tag-poetry .page-header-main {
  justify-items: center;
}

.tag-poetry .post-meta-rail {
  justify-content: center;
}

.tag-poetry .hero-image--inline {
  max-width: 660px;
  margin: 0 auto;
}

.tag-poetry .hero-image--inline img {
  width: 100%;
  max-height: 270px;
  aspect-ratio: 16 / 9;
}

.tag-poetry .content-body {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow-x: auto;
}

.tag-poetry .gh-content p {
  width: max-content;
  max-width: none;
  white-space: nowrap;
}

body .content-page--book .gh-content,
body .content-page--book .content-body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body .content-page--book .gh-content p,
body .content-page--book .gh-content li,
body .content-page--book .gh-content blockquote,
body .content-page--book .gh-content figcaption,
body .content-page--book .gh-content div {
  width: auto;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.page-feature-image img {
  max-height: clamp(260px, 48vh, 620px);
  object-fit: cover;
  object-position: center;
}

.site-footer {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.theme-version {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.audio-modal[hidden] {
  display: none;
}

.audio-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.audio-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 15, 13, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.audio-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  background: rgba(255, 252, 246, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  box-shadow: 0 24px 64px rgba(18, 15, 13, 0.24);
}

.audio-modal__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.audio-modal__title {
  margin: 0;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.audio-modal__close {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.audio-modal__player {
  width: 100%;
}

.audio-modal__hint {
  margin: 0;
}

.copyright-year::before {
  content: attr(data-year);
}

.mobile-search {
  display: none;
}

@media (max-width: 980px) {
  .site-header,
  .site-footer,
  .section-head,
  .hero-grid,
  .page-hero,
  .split-layout,
  .split-panels,
  .module-grid,
  .book-page-grid,
  .post-grid,
  .post-content-grid,
  .hero-split,
  .book-card-featured,
  .page-header--post {
    grid-template-columns: 1fr;
  }

  .book-detail-layout {
    --book-detail-breakout: 0px;
    grid-template-columns: 1fr;
  }

  .book-detail-cover,
  .book-detail-cover figure,
  .book-detail-cover .kg-image-card,
  .book-detail-cover img {
    width: min(100%, 328px);
    max-width: min(100%, 328px);
  }

  .site-header,
  .site-footer,
  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .hero-grid .right-stack {
    display: none;
  }

  .mobile-search {
    display: block;
  }

  .post-meta-rail {
    justify-content: start;
  }

}

@media (max-width: 640px) {
  .site-shell {
    padding: 0 16px 36px;
  }

  .audio-modal {
    padding: 16px;
  }

  .audio-modal__dialog {
    padding: 18px;
  }

  .poem-share-modal__dialog {
    width: min(100%, 640px);
    margin-top: 5vh;
    padding: 18px;
  }

  .nav a,
  .nav summary,
  .tag-row a,
  .button,
  .search-shell {
    width: 100%;
  }

  .nav-menu {
    width: 100%;
  }

  .nav-menu-panel {
    position: static;
    min-width: 0;
    margin-top: 8px;
  }

  .cover-frame,
  .art-block,
  .cover-block {
    min-height: 300px;
  }

  .home-quad-grid {
    grid-template-columns: 1fr;
  }

  .books-storefront__hero,
  .books-shelf {
    grid-template-columns: 1fr;
  }

  .home-quad__stage {
    min-height: 380px;
  }

  .home-quad__poem {
    max-height: 5.8rem;
  }

  .front-page-quad__stage {
    min-height: 380px;
    padding: 16px;
  }

  .front-page-quad__overlay {
    padding: 16px;
  }

  .poem-snippet--home {
    max-height: 3.2rem;
  }

  .poem-share-preview {
    padding: 18px;
  }

  .poem-share-preview__header,
  .poem-share-preview__body {
    padding: 16px;
  }

  .poem-share-preview__header h2 {
    font-size: clamp(1.45rem, 8vw, 2.1rem);
  }

  .gh-content .kg-width-full {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}
