.cbps {
  --cbps-bg: #ffffff;
  --cbps-fg: var(--cb-color-text);
  --cbps-muted: rgba(17, 24, 39, 0.64);
  --cbps-border: rgba(17, 24, 39, 0.14);
  --cbps-card: rgba(255, 255, 255, 1);
  --cbps-accent: #1f6feb;
  --cbps-radius: 16px;
  --cbps-shadow: 0 14px 48px rgba(17, 24, 39, 0.10);
  font-family: var(--cb-font-serif);
  color: var(--cbps-fg);
  background: var(--cbps-bg);
  border: 1px solid var(--cbps-border);
  border-radius: 0;
  box-shadow: var(--cbps-shadow);
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  padding: 22px clamp(14px, 3vw, 34px) clamp(4rem, 10vw, 8rem);
  margin-bottom: clamp(4rem, 8vw, 7rem);
  font-size: 17px;
}

.cb-single__content > .cbps.alignfull {
  width: min(var(--cb-content-max), calc(100vw - (2 * var(--cb-pad-x))));
  max-width: none;
  margin-left: 50%;
  margin-right: 0;
  transform: translateX(-50%);
}

.cbps__top {
  display: grid;
  gap: 14px;
}

.cbps__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cbps__search {
  flex: 1 1 320px;
  width: 100%;
  border: 1px solid var(--cbps-border);
  background: rgba(17, 24, 39, 0.03);
  color: var(--cbps-fg);
  padding: 14px 14px;
  border-radius: 0;
  font-family: inherit;
  font-size: 17px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.cbps__search:focus,
.cbps__search:focus-visible {
  border-color: rgba(31, 111, 235, 0.85);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.18);
  outline: 2px solid rgba(31, 111, 235, 0.55);
  outline-offset: 2px;
}

.cbps__search::placeholder {
  color: rgba(17, 24, 39, 0.40);
}

.cbps__viewToggle {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.cbps__filters {
  display: flex;
  flex: 2 1 420px;
  min-width: 240px;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.cbps__filterActions {
  display: flex;
  justify-content: flex-start;
}

.cbps__clear {
  border: 1px solid var(--cbps-border);
  background: rgba(17, 24, 39, 0.03);
  color: var(--cbps-fg);
  border-radius: 0;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 16px;
  transition: transform 150ms ease, background 150ms ease;
}

.cbps__clear:focus-visible {
  outline: 2px solid rgba(31, 111, 235, 0.8);
  outline-offset: 2px;
}

.cbps__clear:active {
  transform: scale(0.96);
}

.cbps__filterNotice {
  margin-top: 10px;
  border: 1px solid rgba(31, 111, 235, 0.18);
  background: rgba(31, 111, 235, 0.06);
  color: var(--cbps-fg);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  transition: opacity 200ms ease, transform 200ms ease;
}

[data-filtering="0"] .cbps__filterNotice {
  border-color: rgba(17, 24, 39, 0.10);
  background: rgba(17, 24, 39, 0.03);
  color: rgba(33, 37, 41, 0.78);
}

.cbps__filterGroup {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
}

.cbps__filterLabel {
  font-size: 15px;
  color: var(--cbps-muted);
  margin-right: 2px;
}

.cbps__filterBtns {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
  padding: 6px 0;
}

.cbps__chip {
  border: 1px solid var(--cbps-border);
  background: rgba(17, 24, 39, 0.03);
  color: var(--cbps-fg);
  border-radius: 0;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 16px;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
  position: relative;
}

.cbps__chip:active {
  transform: scale(0.95);
}

.cbps__chip[aria-pressed="true"] {
  border-color: rgba(31, 111, 235, 0.55);
  background: rgba(31, 111, 235, 0.10);
  color: rgba(17, 24, 39, 0.92);
}

.cbps__chip--just-active {
  animation: cbpsChipPop 250ms ease;
  z-index: 2;
}

.cbps__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--cbps-muted);
  font-size: 15px;
}

.cbps__meta div {
  transition: opacity 150ms ease;
}

.cbps__grid {
  margin-top: 16px;
  display: grid;
  gap: 0;
  transition: opacity 150ms ease;
}

.cbps .cbcat-list.cbps__grid:not(.is-list-view) {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cbps .cbcat-list.cbps__grid:not(.is-list-view) .cbcat-row:nth-child(3n) {
  border-right: 1px solid var(--museum-line, #d4d2cc);
}

.cbps .cbcat-list.cbps__grid:not(.is-list-view) .cbcat-row:nth-child(5n) {
  border-right: none;
}

.cbps .cbcat-row__img {
  background: #fff;
}

.cbps .cbcat-row__img.is-empty {
  background: #f3f1ec;
}

.cb-single__content .cbps .cbcat-row__img img {
  margin: 0;
}

.cbps .cbcat-row__body {
  gap: 0.4rem;
  padding: clamp(0.95rem, 2vw, 1.25rem) clamp(1.1rem, 2.2vw, 1.5rem) clamp(1.9rem, 3.6vw, 2.5rem);
}

.cb-single__content .cbps .cbcat-row,
.cb-single__content .cbps .cbcat-row *,
.cbps .cbcat-row,
.cbps .cbcat-row * {
  text-decoration: none;
}

.cbps .cbcat-row__title {
  line-height: 1.1;
}

.cbps .cbcat-row:hover .cbcat-row__titleLink,
.cbps .cbcat-row:focus-within .cbcat-row__titleLink {
  text-decoration: none;
}

.cbps .cbcat-row:hover .cbcat-row__actionLink--primary,
.cbps .cbcat-row:hover .cbcat-row__actionLink--secondary,
.cbps .cbcat-row:focus-within .cbcat-row__actionLink--primary,
.cbps .cbcat-row:focus-within .cbcat-row__actionLink--secondary {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.cbps .cbcat-row__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cbps-muted);
  margin-bottom: 0.15rem;
}

.cbps .cbcat-row__titleLink {
  color: inherit;
  text-decoration: none;
}

.cbps .cbcat-row__metaText {
  font-size: 0.84rem;
  color: var(--cbps-muted);
}

.cbps .cbcat-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  padding-top: 0.85rem;
  padding-bottom: clamp(1.15rem, 2vw, 1.55rem);
}

.cbps .cbcat-row__actionLink {
  color: inherit;
  text-decoration: none;
}

.cbps .cbcat-row__actionLink--secondary {
  color: var(--cbps-muted);
}

.cbps .cbcat-row__imgLink {
  display: block;
  width: 100%;
  height: 100%;
}

.cbps .cbcat-row__imgLink:focus-visible,
.cbps .cbcat-row__titleLink:focus-visible,
.cbps .cbcat-row__actionLink:focus-visible {
  outline: 2px solid rgba(31, 111, 235, 0.75);
  outline-offset: 3px;
}

.cbps__grid--switching {
  opacity: 0.4;
}

.cbps__grid--cards {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.cbps__grid--list {
  grid-template-columns: 1fr;
}

.cbps__card {
  border: 1px solid var(--cbps-border);
  background: var(--cbps-card);
  border-radius: var(--cbps-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  display: grid;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  animation: cbpsFadeIn 300ms ease forwards;
}

.cbps__card:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(31, 111, 235, 0.30);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.14);
}

.cbps__card--wide {
  grid-column: span 2;
  grid-template-columns: 220px 1fr;
}

.cbps__cardThumb {
  background: rgba(17, 24, 39, 0.03);
  background-size: cover;
  background-position: center;
  height: clamp(120px, 16vw, 170px);
}

.cbps__card--wide .cbps__cardThumb {
  height: clamp(120px, 16vw, 170px);
}

.cbps__cardBody {
  padding: 12px 12px 14px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.cbps__row {
  border: 1px solid var(--cbps-border);
  background: var(--cbps-card);
  border-radius: var(--cbps-radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 0;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  animation: cbpsFadeIn 300ms ease forwards;
}

.cbps__row:hover {
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(31, 111, 235, 0.30);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.14);
}

.cbps__thumb {
  background: rgba(17, 24, 39, 0.03);
  background-size: cover;
  background-position: center;
  min-height: 90px;
  height: 100%;
}

.cbps__body {
  padding: 12px 12px 12px;
  display: grid;
  gap: 6px;
  align-content: start;
  align-self: start;
}

.cbps__title {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--museum-black, #0d0d0d);
  text-decoration: none;
}

.cbps__card:hover .cbps__title,
.cbps__row:hover .cbps__title {
  text-decoration: underline;
  text-decoration-color: var(--museum-black, #0d0d0d);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  color: var(--museum-black, #0d0d0d);
}

.cbps__tag,
.cbps__card:hover .cbps__tag,
.cbps__row:hover .cbps__tag {
  text-decoration: none !important;
}

.cbps__card:hover,
.cbps__row:hover {
  text-decoration: none;
}

.cbps__titleWrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.cbps__tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(31, 111, 235, 0.25);
  background: rgba(31, 111, 235, 0.08);
  color: rgba(17, 24, 39, 0.82);
  text-decoration: none !important;
  width: fit-content;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cbps__city {
  font-size: 13px;
  color: var(--cbps-muted);
}

.cbps__found {
  font-size: 14px;
  color: var(--cbps-muted);
}

.cbps__foundLink {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: rgba(31, 111, 235, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.cbps__foundLink:focus-visible {
  outline: 2px solid rgba(31, 111, 235, 0.8);
  outline-offset: 2px;
  border-radius: 6px;
}

.cbps__hits {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(17, 24, 39, 0.10);
  display: grid;
  gap: 6px;
}

.cbps__hitsHead {
  font-size: 12px;
  color: rgba(17, 24, 39, 0.55);
  letter-spacing: 0.02em;
}

.cbps__hitLine {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
  color: rgba(17, 24, 39, 0.86);
}

.cbps__hitKind {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(31, 111, 235, 0.25);
  background: rgba(31, 111, 235, 0.08);
  color: rgba(17, 24, 39, 0.82);
  flex: 0 0 auto;
}

.cbps__hitText {
  flex: 1 1 auto;
}

.cbps__hitMore {
  font-size: 12px;
  color: rgba(17, 24, 39, 0.60);
}

.cbps__empty {
  margin-top: 18px;
  border: 1px dashed var(--cbps-border);
  border-radius: var(--cbps-radius);
  padding: 18px;
  color: var(--cbps-muted);
  transition: opacity 200ms ease;
}

.cbps__error {
  margin-top: 16px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  background: rgba(220, 38, 38, 0.05);
  border-radius: var(--cbps-radius);
  padding: 12px 14px;
  color: rgba(127, 29, 29, 0.95);
  display: none;
  transition: opacity 200ms ease;
}

.cbps__loader {
  margin: 18px 0 0;
  display: grid;
  place-items: center;
  color: var(--cbps-muted);
  font-size: 15px;
  height: 56px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease;
}

.cbps[data-loading="1"] .cbps__loader {
  opacity: 1;
  visibility: visible;
}

.cbps__moreWrap {
  display: none;
  margin: 10px 0 0;
  text-align: center;
}

.cbps__more {
  border: 1px solid var(--cbps-border);
  background: rgba(17, 24, 39, 0.03);
  color: var(--cbps-fg);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 16px;
  transition: transform 150ms ease, background 150ms ease;
}

.cbps__more:active {
  transform: scale(0.96);
}

.cbps__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(17, 24, 39, 0.14);
  border-top-color: rgba(31, 111, 235, 0.9);
  border-radius: 50%;
  animation: cbpsSpin 900ms linear infinite;
  margin-bottom: 8px;
}

.cbps__skeleton {
  display: none;
  border: 1px solid var(--cbps-border);
  border-radius: var(--cbps-radius);
  overflow: hidden;
  background: rgba(17, 24, 39, 0.03);
}

.cbps__skeleton--thumb {
  background: linear-gradient(90deg, rgba(17,24,39,0.04) 25%, rgba(17,24,39,0.08) 50%, rgba(17,24,39,0.04) 75%);
  background-size: 200% 100%;
  animation: cbpsSkeleton 1.5s ease-in-out infinite;
  aspect-ratio: 4 / 3;
}

.cbps__skeleton--body {
  padding: 12px;
  display: grid;
  gap: 8px;
}

.cbps__skeleton--title {
  height: 18px;
  width: 75%;
  background: linear-gradient(90deg, rgba(17,24,39,0.06) 25%, rgba(17,24,39,0.12) 50%, rgba(17,24,39,0.06) 75%);
  background-size: 200% 100%;
  animation: cbpsSkeleton 1.5s ease-in-out infinite;
  border-radius: 6px;
}

.cbps__skeleton--subtitle {
  height: 14px;
  width: 50%;
  background: linear-gradient(90deg, rgba(17,24,39,0.04) 25%, rgba(17,24,39,0.08) 50%, rgba(17,24,39,0.04) 75%);
  background-size: 200% 100%;
  animation: cbpsSkeleton 1.5s ease-in-out infinite;
  border-radius: 6px;
}

.cbps__skeleton.cbps__skeleton--row {
  display: grid;
  grid-template-columns: 168px 1fr;
}

.cbps__skeleton--row .cbps__skeleton--thumb {
  aspect-ratio: 16 / 10;
}

@keyframes cbpsSkeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes cbpsFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cbpsChipPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes cbpsSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .cbps {
    padding: 16px 12px;
  }
  .cbps__filters {
    flex: 1 1 100%;
    min-width: 0;
  }
  .cbps__row {
    grid-template-columns: 132px 1fr;
  }
  .cbps__card--wide {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  .cbps__card--wide .cbps__cardThumb {
    aspect-ratio: 4 / 3;
  }
  .cbps__skeleton.cbps__skeleton--row {
    grid-template-columns: 132px 1fr;
  }
}

@media (max-width: 1400px) {
  .cbps .cbcat-list.cbps__grid:not(.is-list-view) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cbps .cbcat-list.cbps__grid:not(.is-list-view) .cbcat-row:nth-child(5n) {
    border-right: 1px solid var(--museum-line, #d4d2cc);
  }

  .cbps .cbcat-list.cbps__grid:not(.is-list-view) .cbcat-row:nth-child(4n) {
    border-right: none;
  }
}

@media (max-width: 1100px) {
  .cbps .cbcat-list.cbps__grid:not(.is-list-view) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cbps .cbcat-list.cbps__grid:not(.is-list-view) .cbcat-row:nth-child(4n) {
    border-right: 1px solid var(--museum-line, #d4d2cc);
  }

  .cbps .cbcat-list.cbps__grid:not(.is-list-view) .cbcat-row:nth-child(3n) {
    border-right: none;
  }
}

@media (max-width: 800px) {
  .cbps .cbcat-list.cbps__grid:not(.is-list-view) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cbps .cbcat-list.cbps__grid:not(.is-list-view) .cbcat-row:nth-child(3n) {
    border-right: 1px solid var(--museum-line, #d4d2cc);
  }

  .cbps .cbcat-list.cbps__grid:not(.is-list-view) .cbcat-row:nth-child(2n) {
    border-right: none;
  }
}

@media (max-width: 560px) {
  .cb-single__content > .cbps.alignfull {
    width: calc(100vw - (2 * var(--cb-pad-x)));
  }

  .cbps .cbcat-list.cbps__grid:not(.is-list-view) {
    grid-template-columns: 1fr;
  }

  .cbps .cbcat-list.cbps__grid:not(.is-list-view) .cbcat-row:nth-child(2n) {
    border-right: 1px solid var(--museum-line, #d4d2cc);
  }

  .cbps .cbcat-list.cbps__grid:not(.is-list-view) .cbcat-row {
    border-right: none;
  }
}
