/* Keep the homepage's mobile case slider independent of the case-page grid. */
@media (max-width: 980px) {
  .home-page .cases-home {
    padding-block: 36px;
    background: var(--warm);
  }

  #home-case-list {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    padding: 2px 0 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  #home-case-list::-webkit-scrollbar { display: none; }

  #home-case-list > article {
    position: relative;
    flex: 0 0 calc(100% - 52px);
    min-width: 0;
    border: 1px solid #bcc6ce;
    border-top: 3px solid var(--orange-deep);
    border-radius: 8px;
    background: #fff;
    scroll-snap-align: start;
  }

  #home-case-list .case-card-image img {
    height: 96px;
    aspect-ratio: auto;
    object-fit: cover;
  }

  #home-case-list .case-card-body {
    gap: 10px;
    padding: 14px;
    min-width: 0;
  }

  #home-case-list .case-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 6px;
  }

  #home-case-list .case-tags span {
    padding: 4px 8px;
    font-size: .875rem;
    line-height: 1.5;
  }

  #home-case-list h3 {
    font-size: 1.125rem;
    line-height: 1.5;
    letter-spacing: -.02em;
  }

  #home-case-list .case-card-body > p {
    font-size: 1rem;
    line-height: 1.6;
  }

  #home-case-list dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: auto 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  #home-case-list dl > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 4px;
    background: var(--warm);
  }

  #home-case-list dl > div:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  #home-case-list dt {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gray);
    font-size: .875rem;
    line-height: 1.5;
    text-align: left;
  }

  #home-case-list dd,
  #home-case-list dl > div:last-child dd {
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    color: var(--ink);
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
  }

  #home-case-list dl > div:first-child dd {
    color: var(--orange-deep);
    font-size: 1.5rem;
    text-align: right;
  }

  #home-case-list dl > div:last-child { padding-bottom: 8px; }
}

@media (min-width: 600px) and (max-width: 980px) {
  #home-case-list > article { flex-basis: 46%; }
}
