.cards-shell { padding-top: 30px; }
.breadcrumbs { display: flex; gap: 9px; margin-bottom: 23px; color: #f0ddbb; font-size: .7rem; }
.breadcrumbs a { text-underline-offset: 3px; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 30px; color: #f4e7cb; }
.catalog-heading h1 { margin: 0 0 12px; font-size: clamp(3rem, 7vw, 5.5rem); }
.catalog-heading > div:first-child > p:last-child { max-width: 720px; color: #e0cba7; font: italic .95rem/1.6 Georgia, serif; }
.catalog-heading .eyebrow { color: #efc688; }
.catalog-count { min-width: 145px; padding: 17px; border: 1px solid rgba(231, 199, 147, .28); background: rgba(49, 32, 20, .38); text-align: center; }
.catalog-count strong, .catalog-count span { display: block; }
.catalog-count strong { color: #f3d99f; font: 700 2rem Georgia, serif; }
.catalog-count span { color: #cbb693; font-size: .59rem; font-weight: 900; text-transform: uppercase; }

.filter-sheet { position: relative; padding: 31px 28px 26px; border: 1px solid var(--line); border-radius: 3px 12px 4px 9px; background: linear-gradient(145deg, #f0e4bd, #d6c392); box-shadow: var(--shadow); }
.filter-tape { position: absolute; top: -10px; left: 50%; width: 94px; height: 21px; background: rgba(226, 203, 155, .86); transform: translateX(-50%) rotate(-1deg); }
.filter-title-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
.filter-title-row h2 { margin: 0; font: 700 1.8rem Georgia, serif; }
.filter-title-row button, .empty-card button { padding: 8px 11px; border: 1px solid rgba(78, 61, 39, .35); border-radius: 3px; color: #594a35; background: rgba(255, 250, 224, .42); font-size: .66rem; font-weight: 900; cursor: pointer; }
.filter-grid { display: grid; grid-template-columns: 2fr repeat(5, minmax(110px, 1fr)); gap: 11px; }
.filter-grid label { min-width: 0; }
.filter-grid label > span, .color-filter legend { display: block; margin-bottom: 6px; color: #725e43; font-size: .59rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.filter-grid input, .filter-grid select { width: 100%; min-width: 0; height: 43px; padding: 9px 10px; border: 1px solid rgba(79, 62, 39, .33); border-radius: 3px 6px 3px 5px; color: var(--ink); background: rgba(255, 252, 232, .72); outline: none; }
.filter-grid input:focus, .filter-grid select:focus { box-shadow: 0 0 0 2px rgba(68, 108, 80, .22); }
.color-filter { margin: 19px 0 0; padding: 0; border: 0; }
#color-options { display: flex; flex-wrap: wrap; gap: 7px; }
#color-options button { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; padding: 7px 11px; border: 1px solid rgba(78, 61, 39, .28); border-radius: 99px; color: #64533c; background: rgba(255, 251, 228, .42); font-size: .68rem; font-weight: 850; cursor: pointer; }
#color-options button.selected { color: #f7ecd0; background: #3e3325; box-shadow: 2px 3px 0 rgba(50, 31, 17, .16); }
.color-dot { width: 11px; height: 11px; border: 1px solid rgba(42, 29, 21, .25); border-radius: 50%; }
.color-dot.red { background: #bd5b50; }.color-dot.blue { background: #4f89ae; }.color-dot.green { background: #5f8a58; }.color-dot.purple { background: #785c98; }.color-dot.colorless { background: #c9c1ad; }
.parallel-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 17px; color: #62523c; font-size: .72rem; font-weight: 800; }
.parallel-check input { accent-color: #3f644b; }
.active-summary { margin: 24px 0 15px; color: #f0ddbb; font-size: .75rem; font-weight: 800; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.catalog-card { --card-accent: #80745f; position: relative; display: grid; grid-template-columns: 42% minmax(0, 1fr); min-height: 335px; overflow: hidden; border: 1px solid rgba(78, 59, 38, .34); border-radius: 4px 13px 5px 10px; background: linear-gradient(145deg, #eee3be, #d5c494); box-shadow: 6px 8px 0 rgba(52, 30, 16, .15); }
.catalog-card::before { position: absolute; z-index: 3; top: 0; left: 0; width: 5px; height: 100%; background: var(--card-accent); content: ""; }
.catalog-card.color-red { --card-accent: #a95048; }.catalog-card.color-blue { --card-accent: #3f789d; }.catalog-card.color-green { --card-accent: #507c50; }.catalog-card.color-purple { --card-accent: #6e508b; }.catalog-card.color-colorless { --card-accent: #8a8170; }
.card-image-link { position: relative; display: grid; min-height: 100%; padding: 18px 8px 18px 14px; background: rgba(71, 53, 33, .09); place-items: center; }
.card-image-link img { position: relative; z-index: 2; display: block; width: 100%; max-height: 290px; object-fit: contain; filter: drop-shadow(0 8px 7px rgba(42, 25, 13, .25)); }
.image-fallback { position: absolute; z-index: 1; max-width: 120px; color: #786850; font: italic .8rem Georgia, serif; text-align: center; }
.card-image-link.image-missing img { display: none; }
.card-copy { display: flex; min-width: 0; flex-direction: column; padding: 20px 17px 16px; }
.card-kicker { display: flex; justify-content: space-between; gap: 8px; color: #856032; font-size: .56rem; font-weight: 900; }
.card-kicker strong { color: var(--card-accent); }
.card-copy h2 { margin: 8px 0 10px; font: 700 1.08rem/1.12 Georgia, serif; }
.card-copy h2 a { text-decoration: none; }
.card-copy h2 a:hover { text-decoration: underline; text-decoration-color: var(--card-accent); text-underline-offset: 3px; }
.card-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.card-badges > span { padding: 3px 6px; border: 1px solid rgba(75, 58, 38, .2); border-radius: 99px; color: #645640; background: rgba(255, 250, 226, .42); font-size: .55rem; font-weight: 850; }
.card-badges .color-badge { color: #fff5de; background: var(--card-accent); }
.card-stats { display: flex; gap: 5px; margin-bottom: 12px; }
.card-stats > span { min-width: 48px; padding: 6px; border-left: 2px solid var(--card-accent); background: rgba(255, 250, 225, .38); }
.card-stats small, .card-stats strong { display: block; }
.card-stats small { color: #84745c; font-size: .48rem; font-weight: 900; text-transform: uppercase; }
.card-stats strong { font: 700 .82rem Georgia, serif; }
.rules-text { display: -webkit-box; margin: 0; overflow: hidden; color: #5e513e; font-size: .68rem; line-height: 1.48; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.rules-text.muted { color: #81735d; font-style: italic; }
.card-footer { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px dashed rgba(79, 61, 39, .23); }
.card-footer span { color: #7b6b52; font-size: .52rem; line-height: 1.3; }
.card-footer a { flex: 0 0 auto; color: #355c43; font-size: .57rem; font-weight: 900; }
.empty-card { padding: 45px; border: 1px solid var(--line); background: linear-gradient(145deg, #eee3bd, #d5c18f); box-shadow: var(--shadow); text-align: center; }
.empty-card strong { font: 700 1.4rem Georgia, serif; }
.empty-card p { color: #6f604a; }
.hidden { display: none !important; }
.source-note { max-width: 850px; margin: 32px auto 0; color: #e2cfab; font: italic .72rem/1.6 Georgia, serif; text-align: center; }
.source-note a { text-underline-offset: 3px; }

@media (max-width: 1080px) {
  .filter-grid { grid-template-columns: 2fr repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .catalog-heading { align-items: start; flex-direction: column; }
  .catalog-count { min-width: 130px; }
  .filter-sheet { padding-inline: 17px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .filter-title-row { align-items: start; }
  .filter-grid { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .catalog-card { grid-template-columns: 39% minmax(0, 1fr); min-height: 315px; }
  .card-image-link { padding-inline: 10px 4px; }
  .card-copy { padding-inline: 13px; }
}
