.post-page {
  overflow-x: clip;
  background:
    radial-gradient(circle at 8% 28%, rgba(45, 167, 156, 0.05), transparent 22%),
    radial-gradient(circle at 94% 62%, rgba(255, 79, 123, 0.04), transparent 20%),
    var(--paper);
}

.post-page main {
  padding-top: 42px;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: clamp(42px, 6vw, 74px);
}

.post {
  min-width: 0;
}

.post-header {
  max-width: 790px;
}

.post-category {
  display: inline-flex;
  padding: 7px 12px 6px;
  border-radius: 9px;
  background: var(--pink);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.post-title-wrap {
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.post-header h1 {
  max-width: 720px;
  margin: 16px 0 18px;
  font-family: var(--display);
  font-size: clamp(39px, 3.7vw, 52px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.post-header h1 span {
  position: relative;
  display: inline-block;
}

.post-header h1 span::after {
  content: "";
  position: absolute;
  right: 0.08em;
  bottom: -0.1em;
  left: 0.18em;
  height: 0.12em;
  border-radius: 50%;
  background: var(--pink);
  transform: rotate(-2deg);
}

.post-title-rays {
  position: absolute;
  top: 30px;
  right: -58px;
  width: 34px;
  height: 4px;
  border-radius: 5px;
  background: var(--ink);
  box-shadow: 9px 14px 0 var(--ink), 2px 29px 0 var(--ink);
  transform: rotate(-57deg);
}

.post-title-heart {
  position: absolute;
  top: 12px;
  right: -154px;
  color: var(--pink);
  font-family: Georgia, serif;
  font-size: 58px;
  font-weight: 400;
  line-height: 1;
  transform: rotate(-9deg);
}

.post-intro {
  max-width: 650px;
  margin: 0;
  color: #48433f;
  font-size: 15px;
  line-height: 1.6;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.author-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #176f68;
  background: var(--teal-soft);
  box-shadow: 0 5px 16px rgba(31, 27, 24, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.post-meta > span:last-child {
  display: grid;
  gap: 3px;
}

.post-meta strong {
  font-size: 13px;
}

.post-meta small {
  color: var(--muted);
  font-size: 12px;
}

.post-cover {
  position: relative;
  z-index: 0;
  margin: 28px 0 42px;
}

.post-cover img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 14px 38px rgba(31, 27, 24, 0.09);
}

.post-cover::before,
.post-cover::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.post-cover::before {
  top: -62px;
  right: -38px;
  width: 235px;
  height: 280px;
  border-radius: 58% 42% 48% 52% / 41% 55% 45% 59%;
  background: var(--yellow);
  transform: rotate(8deg);
}

.post-cover::after {
  bottom: -34px;
  left: -52px;
  width: 155px;
  height: 180px;
  border-radius: 47% 53% 61% 39% / 58% 45% 55% 42%;
  background: var(--teal);
  transform: rotate(-12deg);
}

.post-content {
  max-width: 760px;
  color: #292624;
  font-size: 15px;
  line-height: 1.62;
}

.post-content > p {
  margin: 0 0 22px;
}

.post-content h2 {
  position: relative;
  width: fit-content;
  margin: 36px 0 14px;
  font-family: var(--display);
  font-size: clamp(22px, 2vw, 27px);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.post-content h2::after {
  content: "";
  position: absolute;
  right: 44%;
  bottom: -7px;
  left: 0;
  height: 3px;
  border-radius: 50%;
  background: var(--yellow);
  transform: rotate(-2deg);
}

.gift-ideas {
  display: grid;
  gap: 15px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.gift-ideas li {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: start;
  gap: 16px;
}

.gift-ideas li > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--pink);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 900;
}

.gift-ideas li:nth-child(2) > span {
  color: var(--ink);
  background: var(--yellow);
}

.gift-ideas li:nth-child(3) > span {
  background: var(--teal);
}

.gift-ideas h3 {
  margin: 0 0 3px;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.gift-ideas p {
  margin: 0;
  color: #4f4a46;
  font-size: 14px;
  line-height: 1.55;
}

.post-tip {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  margin: 28px 0 10px;
  padding: 18px 20px;
  border-radius: 15px;
  background: linear-gradient(110deg, #fff0f3, #fff8f3);
}

.post-tip > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--pink);
  border-radius: 50%;
  color: var(--pink);
  font-size: 23px;
}

.post-tip strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--display);
  font-size: 17px;
}

.post-tip p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.post-footer > div:first-child {
  display: grid;
  gap: 2px;
}

.post-footer strong {
  font-size: 13px;
}

.post-footer span {
  color: var(--muted);
  font-size: 11px;
}

.share-links {
  display: flex;
  gap: 10px;
}

.share-links button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  font-family: Georgia, serif;
  font-size: 17px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.share-links button:hover {
  border-color: var(--pink);
  transform: translateY(-2px);
}

.post-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 22px;
  padding-top: 48px;
}

.sidebar-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 32px rgba(31, 27, 24, 0.04);
}

.sidebar-card h2 {
  position: relative;
  width: fit-content;
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -0.025em;
}

.sidebar-card h2::after {
  content: "";
  position: absolute;
  right: 35%;
  bottom: -5px;
  left: 0;
  height: 3px;
  border-radius: 50%;
  background: var(--pink);
  transform: rotate(-2deg);
}

.sidebar-card:nth-child(2) h2::after {
  background: var(--yellow);
}

.sidebar-card:nth-child(3) h2::after {
  display: none;
}

.sidebar-search form {
  display: grid;
  grid-template-columns: 1fr 46px;
}

.sidebar-search input {
  min-width: 0;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: var(--white);
}

.sidebar-search button {
  border: 0;
  border-radius: 0 10px 10px 0;
  color: var(--white);
  background: var(--ink);
  font-size: 23px;
  cursor: pointer;
}

.sidebar-search-status {
  min-height: 16px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.category-list {
  display: grid;
  gap: 4px;
}

.category-list a {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
}

.category-list b {
  font-size: 16px;
}

.category-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  font-weight: 900;
}

.category-icon.teal,
.tag-label.teal {
  background: var(--teal);
}

.category-icon.pink,
.tag-label.pink {
  background: var(--pink);
}

.category-icon.yellow,
.tag-label.yellow {
  color: var(--ink);
  background: var(--yellow);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  padding: 6px 10px;
  border: 1px solid var(--pink);
  border-radius: 999px;
  color: #a52045;
  font-size: 11px;
}

.tag-cloud a:nth-child(even) {
  border-color: var(--teal);
  color: #176f68;
}

.related-posts {
  padding: 78px 0 100px;
}

.related-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.related-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 38px;
  letter-spacing: -0.035em;
}

.related-heading > a {
  font-size: 12px;
  font-weight: 800;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.related-grid article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 9px 25px rgba(31, 27, 24, 0.04);
}

.related-grid article > a {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 8;
}

.related-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.related-grid article:hover img {
  transform: scale(1.03);
}

.related-grid article > div {
  position: relative;
  padding: 20px 20px 22px;
}

.tag-label {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 20px;
  padding: 6px 10px;
  border-radius: 7px 7px 0 0;
  color: var(--white);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.related-grid h3 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.related-grid small {
  color: var(--muted);
  font-size: 11px;
}

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

  .post-sidebar {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 0;
  }
}

@media (max-width: 760px) {
  .post-page main {
    padding-top: 32px;
  }

  .post-header h1 {
    font-size: clamp(34px, 9.8vw, 44px);
  }

  .post-title-rays,
  .post-title-heart {
    display: none;
  }

  .post-sidebar,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .related-posts {
    padding-block: 76px;
  }

  .related-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .post-header h1 {
    font-size: 34px;
  }

  .post-intro,
  .post-content {
    font-size: 16px;
  }

  .post-cover {
    margin-inline: -14px;
  }

  .post-cover img {
    border-radius: 0;
  }

  .gift-ideas li {
    grid-template-columns: 34px 1fr;
    gap: 12px;
  }

  .gift-ideas li > span {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .post-tip {
    grid-template-columns: 1fr;
  }

  .post-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
