/* V31: restore the original equal-column card layouts.
   Applied only to Home and Writing. Shared page styles are untouched. */

.work-grid.restored-work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 18px;
  align-items: stretch;
}
.restored-work-grid > .work-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 0;
  transform: none;
}
.restored-work-grid > .work-card > img {
  display: block;
  flex: none;
  width: 100%;
  height: 205px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}
.restored-work-grid .card-title {
  font-size: 24px;
  line-height: 1.08;
  margin-top: 4px;
}
.restored-work-grid .card-desc {
  font-size: 14px;
  line-height: 1.4;
  margin-top: 7px;
  min-height: 0;
  padding-bottom: 15px;
}
.restored-work-grid .mini {
  align-self: flex-start;
  margin-top: auto;
  min-height: 28px;
}

.writing-grid.restored-writing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 24px;
  align-items: stretch;
}
.restored-writing-grid > .story {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.restored-writing-grid > .story::before {
  content: none;
}
.restored-writing-grid > .story > img {
  display: block;
  flex: none;
  width: 100%;
  height: 150px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}
.restored-writing-grid .story-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 12px 1px 0;
}
.restored-writing-grid .story h2,
.restored-writing-grid .story h3 {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.12;
  font-weight: 400;
  letter-spacing: -.015em;
  margin: 6px 0 8px;
}
.restored-writing-grid .story p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.4;
  margin: 0;
  padding-bottom: 14px;
}
.restored-writing-grid .story time {
  margin-top: auto;
}

@media (max-width: 1100px) and (min-width: 901px) {
  .restored-work-grid .card-title {
    min-height: 2.16em;
  }
}
@media (max-width: 900px) {
  .work-grid.restored-work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .writing-grid.restored-writing-grid {
    grid-template-columns: 1fr;
  }
  .restored-writing-grid > .story > img {
    height: auto;
    aspect-ratio: 2.5 / 1;
  }
}
@media (max-width: 680px) {
  .work-grid.restored-work-grid {
    grid-template-columns: 1fr;
    row-gap: 36px;
  }
  .restored-work-grid > .work-card > img {
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .restored-work-grid .card-title {
    min-height: 0;
    font-size: 27px;
  }
  .restored-writing-grid > .story > img {
    height: auto;
    aspect-ratio: 2 / 1;
  }
  .restored-writing-grid .story h2,
  .restored-writing-grid .story h3 {
    font-size: 26px;
  }
}
