/* CHILL-category-card-Control v1.1.0 */
.chill-cat,
.chill-cat * {
  box-sizing: border-box;
}

.chill-cat-debug {
  width: min(100% - 28px, 1240px);
  margin: 14px auto !important;
  padding: 10px !important;
  background: #eef1f5 !important;
  border: 1px solid #d7dde6 !important;
  white-space: pre-wrap !important;
  color: #111 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

.chill-cat {
  width: min(100% - 28px, 1240px);
  margin: 28px auto 34px;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(160, 255, 60, 0.06), transparent 30%),
    linear-gradient(180deg, #10120c 0%, #080906 100%);
  border: 1px solid rgba(164, 220, 62, 0.11);
  border-radius: 18px;
  color: #f2f6e8;
  overflow: hidden;
}

.chill-cat a {
  text-decoration: none !important;
}

.chill-cat__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 14px;
}

.chill-cat__heading {
  margin: 0 0 6px !important;
  color: #f7fbe8 !important;
  font-size: 23px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.02em !important;
}

.chill-cat__subtitle {
  margin: 0 !important;
  color: rgba(238, 245, 220, 0.72) !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.chill-cat__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a9d937 !important;
  text-decoration: none !important;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  padding-top: 3px;
  background: transparent !important;
}

.chill-cat__grid {
  display: grid;
  gap: 10px;
}

/* PC: 1~6개는 반드시 한 줄 */
.chill-cat--count-1 .chill-cat__grid { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.chill-cat--count-2 .chill-cat__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chill-cat--count-3 .chill-cat__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chill-cat--count-4 .chill-cat__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chill-cat--count-5 .chill-cat__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.chill-cat--count-6 .chill-cat__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* 7개부터는 6열 기준으로 자동 2줄 이상 */
.chill-cat--count-7 .chill-cat__grid,
.chill-cat--count-8 .chill-cat__grid,
.chill-cat--count-9 .chill-cat__grid,
.chill-cat--count-10 .chill-cat__grid,
.chill-cat--count-11 .chill-cat__grid,
.chill-cat--count-12 .chill-cat__grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.chill-cat__card {
  position: relative;
  display: block;
  min-height: 108px;
  border-radius: 13px;
  overflow: hidden;
  background: #0b0d08;
  border: 1px solid rgba(172, 225, 55, 0.18);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.30);
  isolation: isolate;
}

.chill-cat__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.58) 45%, rgba(0,0,0,0.20) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 55%);
  z-index: 1;
  pointer-events: none;
}

.chill-cat__card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), inset 0 -28px 58px rgba(0,0,0,0.34);
  z-index: 3;
  pointer-events: none;
}

.chill-cat__card:hover .chill-cat__image {
  transform: scale(1.045);
  filter: saturate(1.12) brightness(1.05);
}

.chill-cat__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease, filter 0.32s ease;
}

.chill-cat__content {
  position: absolute;
  left: 13px;
  bottom: 11px;
  z-index: 4;
  width: calc(100% - 26px);
}

.chill-cat__label {
  margin: 0 0 4px !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: 0.02em !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.75);
}

.chill-cat__sub {
  margin: 0 !important;
  color: #f4f7e9 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.75);
}

@media (max-width: 1024px) {
  .chill-cat__grid,
  .chill-cat--count-1 .chill-cat__grid,
  .chill-cat--count-2 .chill-cat__grid,
  .chill-cat--count-3 .chill-cat__grid,
  .chill-cat--count-4 .chill-cat__grid,
  .chill-cat--count-5 .chill-cat__grid,
  .chill-cat--count-6 .chill-cat__grid,
  .chill-cat--count-7 .chill-cat__grid,
  .chill-cat--count-8 .chill-cat__grid,
  .chill-cat--count-9 .chill-cat__grid,
  .chill-cat--count-10 .chill-cat__grid,
  .chill-cat--count-11 .chill-cat__grid,
  .chill-cat--count-12 .chill-cat__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chill-cat__card {
    min-height: 124px;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  @supports (overflow-x: clip) {
    html,
    body {
      overflow-x: clip !important;
    }
  }

  .chill-cat {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    margin: 10px 0 18px;
    padding: 16px 0 18px;
    transform: translateX(-50%);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    border-color: transparent;
    background:
      radial-gradient(circle at 18% 0%, rgba(168, 220, 50, 0.11), transparent 42%),
      linear-gradient(180deg, #080906 0%, #050604 100%);
    box-shadow: none;
    overflow: hidden;
  }

  @supports (width: 100dvw) {
    .chill-cat {
      width: 100dvw;
      max-width: 100dvw;
    }
  }

  .chill-cat__head {
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    gap: 10px;
    margin: 0 0 10px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .chill-cat__heading {
    font-size: 20px !important;
    line-height: 1.15 !important;
    margin-bottom: 4px !important;
  }

  .chill-cat__subtitle {
    font-size: 11.5px !important;
    line-height: 1.45 !important;
    max-width: 220px;
  }

  .chill-cat__all {
    position: relative;
    margin-left: auto;
    padding: 0 !important;
    font-size: 0;
    line-height: 0;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(168, 220, 50, 0.36);
    display: block;
    background: rgba(168, 220, 50, 0.035) !important;
  }

  .chill-cat__all span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    font-size: 17px;
    line-height: 1;
    transform: translate(-50%, -52%);
  }

  .chill-cat__grid,
  .chill-cat--count-1 .chill-cat__grid,
  .chill-cat--count-2 .chill-cat__grid,
  .chill-cat--count-3 .chill-cat__grid,
  .chill-cat--count-4 .chill-cat__grid,
  .chill-cat--count-5 .chill-cat__grid,
  .chill-cat--count-6 .chill-cat__grid,
  .chill-cat--count-7 .chill-cat__grid,
  .chill-cat--count-8 .chill-cat__grid,
  .chill-cat--count-9 .chill-cat__grid,
  .chill-cat--count-10 .chill-cat__grid,
  .chill-cat--count-11 .chill-cat__grid,
  .chill-cat--count-12 .chill-cat__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chill-cat__grid {
    gap: 10px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .chill-cat__card {
    min-height: 112px;
    border-radius: 15px;
    border-color: rgba(172, 225, 55, 0.18);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.42);
  }

  .chill-cat__card::before {
    background:
      linear-gradient(90deg, rgba(0,0,0,0.84) 0%, rgba(0,0,0,0.52) 48%, rgba(0,0,0,0.18) 100%),
      linear-gradient(180deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0) 55%);
  }

  .chill-cat__card::after {
    border-radius: 15px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), inset 0 -32px 68px rgba(0,0,0,0.36);
  }

  .chill-cat__content {
    left: 12px;
    bottom: 11px;
    width: calc(100% - 24px);
  }

  .chill-cat__label {
    font-size: 14px !important;
    line-height: 1.18 !important;
    margin-bottom: 4px !important;
  }

  .chill-cat__sub {
    font-size: 10px !important;
    line-height: 1.1 !important;
  }
}

@media (max-width: 380px) {
  .chill-cat {
    padding-top: 16px;
    padding-bottom: 18px;
  }

  .chill-cat__head {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .chill-cat__subtitle {
    max-width: 205px;
  }

  .chill-cat__grid {
    gap: 9px;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .chill-cat__card {
    min-height: 104px;
    border-radius: 14px;
  }

  .chill-cat__card::after {
    border-radius: 14px;
  }

  .chill-cat__label {
    font-size: 13px !important;
  }

  .chill-cat__sub {
    font-size: 9.5px !important;
  }
}
