.post-page {
  padding: clamp(1.4rem, 3vw, 2.75rem) clamp(1rem, 3vw, 3rem) clamp(5rem, 9vw, 9rem);
}

.post-page .back-link {
  margin-bottom: clamp(2rem, 4vw, 4rem);
}

.post-masthead {
  min-height: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3.6rem);
  align-items: end;
  padding: clamp(2rem, 4vw, 4rem) 0 clamp(2.2rem, 4vw, 3.8rem);
  border-bottom: 1px solid var(--line);
}

.post-title-block {
  align-self: end;
  max-width: 76rem;
}

.post-title-block h1 {
  max-width: 15.5em;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  font-size: clamp(4.2rem, 7.4vw, 8.8rem);
  line-height: 0.94;
  text-wrap: balance;
  word-break: keep-all;
}

:lang(ja) .post-title-block h1 {
  overflow-wrap: anywhere;
  word-break: normal;
}

.post-subtitle {
  display: inline-flex;
  margin: 0 0 clamp(0.7rem, 1.3vw, 1.05rem);
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  color: #d9d2ca;
  font-size: clamp(1rem, 1.45vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.post-subtitle[hidden] {
  display: none;
}

.post-title-block p:not(.kicker):not(.post-subtitle) {
  max-width: 48rem;
  color: #e1dbd4;
  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.65;
}

.post-skeleton {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(225, 219, 212, 0.08), rgba(225, 219, 212, 0.18), rgba(225, 219, 212, 0.08));
  background-size: 220% 100%;
  animation: post-skeleton-scan 1.4s linear infinite;
}

.post-skeleton-title {
  width: min(72vw, 9.5em);
  height: clamp(4.2rem, 7.4vw, 8.8rem);
}

.post-skeleton-summary {
  width: min(100%, 36rem);
  height: 1.2em;
}

.post-skeleton-meta {
  width: 8.5rem;
  height: 1em;
}

@keyframes post-skeleton-scan {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: -120% 0;
  }
}

.post-cover {
  position: relative;
  margin: 0;
  width: min(100%, 78rem);
  justify-self: end;
  aspect-ratio: 16 / 9;
  min-height: 20rem;
  max-height: 43rem;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.is-post-loading .post-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(225, 219, 212, 0.06), rgba(225, 219, 212, 0.14), rgba(225, 219, 212, 0.06));
  background-size: 220% 100%;
  animation: post-skeleton-scan 1.4s linear infinite;
}

.post-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 9, 9, 0.08), rgba(9, 9, 9, 0.52)),
    linear-gradient(90deg, rgba(9, 9, 9, 0.48), transparent 54%, rgba(9, 9, 9, 0.2));
  pointer-events: none;
}

.post-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
}

.post-cover img[hidden] {
  display: none;
}

.post-read {
  display: grid;
  grid-template-columns: minmax(12rem, 0.36fr) minmax(0, 0.72fr) minmax(8rem, 0.22fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding-top: clamp(3rem, 7vw, 7rem);
}

.post-meta-panel {
  position: sticky;
  top: 5.5rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.post-meta-list {
  display: grid;
  gap: 1.1rem;
  margin: 0 0 2rem;
}

.post-meta-list div {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.post-meta-list dt {
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.post-meta-list dd {
  margin: 0;
  color: var(--fg);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.post-tags span {
  border: 1px solid var(--line);
  padding: 0.42rem 0.55rem;
  color: #c9c1b8;
  font-size: 0.72rem;
  font-weight: 750;
}

.post-body {
  max-width: 48rem;
  color: #e4ded6;
  font-size: clamp(1.06rem, 1.28vw, 1.18rem);
  line-height: 1.86;
  word-break: keep-all;
}

:lang(ja) .post-body {
  overflow-wrap: anywhere;
  word-break: normal;
}

.post-loading-widget,
.post-error-widget {
  display: grid;
  min-height: 16rem;
  align-content: center;
  justify-items: start;
  gap: 1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.post-loading-mark {
  position: relative;
  display: block;
  width: min(100%, 28rem);
  height: 2px;
  overflow: hidden;
  background: rgba(225, 219, 212, 0.13);
}

.post-loading-mark::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 36%;
  background: #d96f63;
  animation: post-loading-signal 1.2s ease-in-out infinite;
}

.post-loading-copy,
.post-error-widget strong {
  color: var(--fg);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.post-error-widget p {
  max-width: 32rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

@keyframes post-loading-signal {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(310%);
  }
}

.post-body h1 {
  display: none;
}

.post-body h2,
.post-body h3 {
  color: var(--fg);
  line-height: 1.08;
}

.post-body h2 {
  margin: clamp(3.5rem, 7vw, 5rem) 0 1.25rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 900;
}

.post-body h3 {
  margin: 2.4rem 0 0.75rem;
  font-size: clamp(1.25rem, 2.1vw, 1.75rem);
  font-weight: 850;
}

.post-body h2:first-of-type {
  margin-top: 0;
}

.post-body p {
  margin-bottom: 1.45rem;
}

.post-body strong {
  color: var(--fg);
  font-weight: 850;
}

.post-body a {
  color: var(--fg);
  text-decoration-color: rgba(225, 219, 212, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.post-body a:hover {
  text-decoration-color: var(--fg);
}

.article-image {
  margin: clamp(2.4rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 0.9rem;
}

.article-image img {
  display: block;
  width: 100%;
  max-height: 34rem;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
}

.article-image figcaption {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.post-body > p:first-of-type {
  margin-bottom: 2.2rem;
  color: var(--fg);
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.45;
}

.post-body ul {
  margin: 0 0 1.65rem;
  padding-left: 1.15rem;
}

.post-body li {
  margin-bottom: 0.55rem;
}

@media (max-width: 900px) {
  .post-read {
    grid-template-columns: 1fr;
  }

  .post-meta-panel {
    position: static;
  }

  .post-masthead {
    min-height: auto;
  }

  .post-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 18rem;
  }

  .post-title-block h1 {
    max-width: 100%;
    font-size: clamp(3.2rem, 12vw, 5.6rem);
    line-height: 0.96;
  }
}

@media (max-width: 620px) {
  .post-page {
    padding-top: 2.75rem;
  }

  .post-title-block h1 {
    font-size: clamp(2.95rem, 12.2vw, 4.45rem);
    line-height: 0.98;
  }

  .post-cover {
    aspect-ratio: 4 / 3;
    min-height: 18rem;
  }

  .post-body {
    font-size: 1.02rem;
  }
}
