.post-detail-article {
  max-inline-size: calc(54rem + 2 * var(--gutter));
  padding-block: calc(var(--header-height) + clamp(24px, 3.5vw, 48px)) clamp(40px, 6vw, 72px);
}

.post-detail-category {
  width: fit-content;
  margin-block-end: 9px;
  padding: 2px 8px;
  border-radius: 2px;
  background: #595959;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.5;
}

.post-detail-header h1 {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.post-detail-date {
  display: block;
  margin-block-start: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.post-detail-cover { margin: clamp(20px, 3vw, 32px) 0 0; }
.post-detail-cover img { display: block; inline-size: 100%; block-size: auto; }
.post-detail-cover .post-detail-fallback { aspect-ratio: 3 / 2; object-fit: cover; }

.post-detail-reading {
  margin-block-start: clamp(20px, 3vw, 32px);
}

.post-detail-body {
  min-inline-size: 0;
  font-size: 0.875rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.post-detail-body > * + * { margin-block-start: 1.25em; }
.post-detail-body :is(h2, h3, h4) { line-height: 1.45; }
.post-detail-body h2 {
  margin-block-start: 2em;
  padding-block-start: 0.8em;
  border-block-start: 1px solid var(--line);
  font-size: 1rem;
  font-weight: 600;
}
.post-detail-body h3 { margin-block-start: 1.7em; font-size: 1rem; font-weight: 600; }
.post-detail-body h4 { font-size: 0.875rem; font-weight: 600; }
.post-detail-body :is(h2, h3, h4):first-child { margin-block-start: 0; padding-block-start: 0; border: 0; }
.post-detail-body :is(h2, h3, h4) + * { margin-block-start: 0.65em; }
.post-detail-body a { text-underline-offset: 0.2em; }
.post-detail-body :is(img, video, iframe) { max-inline-size: 100%; }
.post-detail-body img { block-size: auto; }
.post-detail-body figure { max-inline-size: 100%; }
.post-detail-body figcaption { color: var(--muted); font-size: 0.875rem; }
.post-detail-body :is(pre, .wp-block-table) { max-inline-size: 100%; overflow-x: auto; }
.post-detail-body blockquote {
  padding-inline-start: 1.25rem;
  border-inline-start: 3px solid var(--line);
  color: var(--muted);
}

.post-detail-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
  margin-block-start: clamp(32px, 5vw, 64px);
}
.post-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-block-size: 44px;
  padding: 0 3px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.75rem;
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
}
.post-nav-button:first-child { justify-self: start; }
.post-nav-button:last-child { justify-self: end; }
.post-nav-button--index { justify-self: center; }
.post-nav-button:first-child::before,
.post-nav-button:last-child::after {
  content: "";
  inline-size: 8px;
  block-size: 8px;
  flex: none;
  border-block-start: 1px solid currentColor;
  border-inline-start: 1px solid currentColor;
  transform: rotate(-45deg);
}
.post-nav-button:last-child::after { transform: rotate(135deg); }
.post-nav-button:disabled { color: var(--muted); opacity: 0.55; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .post-nav-button[href] { transition: transform 200ms ease; }
  .post-nav-button[href]:first-child:hover { transform: translateX(-3px); }
  .post-nav-button--index:hover { transform: translateY(-2px); }
  .post-nav-button[href]:last-child:hover { transform: translateX(3px); }
}
.post-nav-button[href]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
