/* ORDER-226 상세 B: 성분·레시피·회수 상세 3화면 전용 — style.bundle.css(홈 gzip 예산)에는 안 붙는다.
   .shelf/.shelf-card 규칙은 home-shelves.css·list.css와 같은 내용을 그대로 담는다(중복이지만 같은 화면에
   세 파일이 동시에 실리지 않는다 — 화면 전용 CSS 원칙, ORDER-226 목록 A 주석과 같은 사정).
   상세 화면은 점수가 없는 항목이 대부분이라 data-score-band="none"(중립 회색)만 쓴다. */
.shelf {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  margin: var(--s6) 0;
}
.shelf h2 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: var(--t-head);
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.shelf-more {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--t-sub);
  font-weight: 700;
  color: var(--ink-2);
  text-decoration: none;
}
.shelf-rail {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: var(--s3);
  display: flex;
  gap: var(--s3);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.shelf-rail::-webkit-scrollbar {
  display: none;
}
.shelf-card {
  flex: 0 0 136px;
  width: 136px;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  border-radius: var(--r-sm);
  padding: var(--s3);
  color: #fff;
  text-decoration: none;
}
.shelf-card[data-score-band="80"] { background: #123f30; }
.shelf-card[data-score-band="60"] { background: #2c443a; }
.shelf-card[data-score-band="40"] { background: #57451f; }
.shelf-card[data-score-band="00"] { background: #56271f; }
.shelf-card[data-score-band="none"] { background: var(--muted); }
.shelf-card-score {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.shelf-card-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shelf-card-maker {
  font-size: 11px;
  opacity: 0.8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shelf-card-value {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.94;
  margin-top: auto;
}

@media (min-width: 600px) and (max-width: 1023px) {
  .shelf-rail {
    overflow-x: visible;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .shelf-card {
    width: auto;
  }
  .shelf-card:nth-child(n + 9) {
    display: none;
  }
}

@media (min-width: 1024px) {
  .shelf-rail {
    overflow-x: visible;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
  }
  .shelf-card {
    width: auto;
  }
  .shelf-card:nth-child(n + 7) {
    display: none;
  }
  /* 레시피 상세는 ≥1280px에서 옛 사이드바(desktop-recordable-side)가 같은 "다른 레시피"를 다시 보여준다 —
     여기서는 그 폭부터 숨겨 둘 다 겹쳐 보이지 않게 한다. */
  .recipe-detail-shelf {
    display: block;
  }
}
@media (min-width: 1280px) {
  .recipe-detail-shelf {
    display: none;
  }
}
