.gp-kh-slider {
  --gp-kh-per: 2;
  --gp-kh-gap: 12px;
}

.gp-kh-stage {
  position: relative;
}

.gp-kh-viewport {
  margin: -4px;
  padding: 4px;
  overflow: hidden;
}

.gp-kh-track {
  display: flex;
  gap: var(--gp-kh-gap);
  transition: transform 1.5s ease;
  will-change: transform;
}

.gp-kh-slide {
  flex: 0 0 calc((100% - (var(--gp-kh-per) - 1) * var(--gp-kh-gap)) / var(--gp-kh-per));
  min-width: 0;
}

.gp-kh-slide-link,
.gp-kh-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #002060;
}

.gp-kh-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 5px;
  overflow: hidden;
  background: #E0E0E0;
}

.gp-kh-img {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gp-kh-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gp-kh-cat {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 0 0 0 5px;
  background: #002060;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.gp-kh-cat svg {
  flex: none;
}

.gp-kh-cat span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gp-kh-slide-title,
.gp-kh-rank-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.gp-kh-slide-title {
  -webkit-line-clamp: 2;
}

.gp-kh-rank-title {
  -webkit-line-clamp: 3;
}

.gp-kh-slide-link:hover .gp-kh-slide-title,
.gp-kh-card:hover .gp-kh-title,
.gp-kh-rank-link:hover .gp-kh-rank-title {
  text-decoration: underline;
}

.gp-kh-nav {
  position: absolute;
  top: 0;
  right: -20px;
  left: -20px;
  display: flex;
  justify-content: space-between;
  height: 0;
  padding-top: calc((100% - (var(--gp-kh-per) - 1) * var(--gp-kh-gap)) / var(--gp-kh-per) / 3.2);
  pointer-events: none;
}

.gp-kh-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #002060;
  border-radius: 50%;
  background: #FFFFFF;
  color: #002060;
  cursor: pointer;
  transform: translateY(-50%);
  pointer-events: auto;
}

.gp-kh-arrow[hidden] {
  display: none;
}

.gp-kh-arrow:hover {
  background: #002060;
  color: #FFFFFF;
}

.gp-kh-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.gp-kh-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.gp-kh-dot::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7A8BAA;
}

.gp-kh-dot[aria-current="true"]::before {
  background: #002060;
}

.gp-kh-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(56px * var(--gp-y));
  margin-top: calc(48px * var(--gp-y));
}

.gp-kh-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(48px * var(--gp-y)) 24px;
}

.gp-kh-item {
  min-width: 0;
}

.gp-kh-card {
  gap: 10px;
}

.gp-kh-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.gp-kh-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.7;
  color: #333333;
}

.gp-kh-date {
  font-size: 14px;
  line-height: 1.5;
  color: #595959;
}

.gp-kh-empty {
  font-size: 14px;
  line-height: 1.7;
  color: #333333;
}

.gp-kh-popular-h {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #002060;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: #002060;
}

.gp-kh-ranking {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 32px;
}

.gp-kh-rank-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #002060;
}

.gp-kh-rank-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 5px;
  overflow: hidden;
  background: #E0E0E0;
}

.gp-kh-rank-no {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 0 0 5px 0;
  background: #002060;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

@media (min-width: 640px) {
  .gp-kh-slider {
    --gp-kh-per: 3;
    --gp-kh-gap: 16px;
  }

  .gp-kh-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gp-kh-ranking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 32px;
  }

  .gp-kh-slide-title {
    font-size: 15px;
  }
}

@media (min-width: 1024px) {
  .gp-kh-slider {
    --gp-kh-per: 5;
    --gp-kh-gap: 20px;
  }

  .gp-kh-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
  }

  .gp-kh-ranking {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1280px) {
  .gp-kh-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .gp-kh-cat svg {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gp-kh-track {
    transition: none;
  }
}
