/* Give each case enough width for readable Japanese titles and comparable figures. */
#all-case-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-columns: auto;
  align-items: stretch;
  gap: 28px 24px;
  width: 100%;
  max-width: 100%;
  padding: 0;
  overflow: visible;
  scroll-snap-type: none;
}

#all-case-list > article {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #ccd4dc;
  border-top: 3px solid var(--orange);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

#all-case-list .case-card-image {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
}

#all-case-list .case-card-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 35%;
}

#all-case-list .case-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 24px;
}

#all-case-list .case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#all-case-list .case-tags span {
  padding: 5px 10px;
  font-size: .875rem;
  line-height: 1.6;
}

#all-case-list h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.65;
  letter-spacing: -.02em;
  line-break: strict;
  overflow-wrap: anywhere;
}

#all-case-list h3 br {
  display: none;
}

#all-case-list .case-card-body > p {
  margin: 0;
  color: #343c43;
  font-size: 1rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

#all-case-list dl {
  display: block;
  width: 100%;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  overflow: visible;
}

#all-case-list dl > div {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

#all-case-list dl > div:last-child {
  padding-bottom: 0;
}

#all-case-list dt {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gray);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.7;
  text-align: left;
}

#all-case-list dd {
  display: block;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: right;
  overflow-wrap: anywhere;
}

#all-case-list dl > div:first-child dd {
  color: var(--orange-deep);
  font-size: 1.75rem;
}

#all-case-list dl > div:last-child dd {
  font-size: 1.125rem;
}

.case-gallery .case-image-note {
  margin-top: 18px;
}

@media (max-width: 1024px) {
  #all-case-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  #all-case-list {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 16px;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
    scroll-padding-inline: 0;
    overscroll-behavior-x: auto;
  }
  #all-case-list > article { scroll-snap-align: none; }
  #all-case-list .case-card-body { padding: 22px 20px 24px; gap: 16px; }
  #all-case-list h3 { font-size: 1.1875rem; }
  .case-gallery .case-image-note { margin-top: 12px; }
}
