.csat-widget-container {
  margin-top: clamp(40px, 6vw, 80px);
  margin-bottom: clamp(40px, 6vw, 80px);
}

.csat-widget {
  --csat-accent: #ffd400;
  --csat-ink: #17191c;
  --csat-muted: #626870;
  position: relative;
  overflow: hidden;
  color: var(--csat-ink);
}

.csat-widget[hidden],
.csat-widget__reviews[hidden],
.csat-widget__reply-time[hidden],
.csat-widget__updated[hidden] {
  display: none !important;
}

.csat-widget__header {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.csat-widget__eyebrow,
.csat-widget__score-label {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.csat-widget__eyebrow {
  margin-bottom: 10px;
  color: #755f00;
}

.csat-widget__title {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.25;
  letter-spacing: -.035em;
}

.csat-widget__description {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--csat-muted);
}

.csat-widget__preview-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #614d00;
  background: #fff4b8;
  border: 1px solid #e8c900;
  border-radius: 999px;
}

.csat-widget__body {
  display: grid;
  gap: 34px;
  margin-top: 32px;
}

.csat-widget__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 320px));
  justify-content: center;
  gap: 18px;
}

.csat-widget__metric {
  min-width: 0;
}

.csat-widget__score-label,
.csat-widget__responses,
.csat-widget__updated,
.csat-widget__reply-label,
.csat-widget__reply-detail {
  color: var(--csat-muted);
}

.csat-widget__score {
  margin: 8px 0 10px;
  font-size: clamp(48px, 7vw, 76px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.06em;
}

.csat-widget__percent {
  margin-left: 4px;
  font-size: .48em;
  letter-spacing: -.02em;
}

.csat-widget__responses,
.csat-widget__updated {
  margin: 4px 0 0;
  font-size: 13px;
}

.csat-widget__reply-label,
.csat-widget__reply-detail {
  margin: 0;
  font-size: 12px;
}

.csat-widget__reply-label {
  font-weight: 700;
}

.csat-widget__reply-value {
  margin: 8px 0;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.csat-review {
  position: relative;
  min-width: 0;
  margin: 0;
}

.csat-review__quote {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.csat-review__quote::before {
  position: absolute;
  top: 13px;
  left: 2px;
  content: "“";
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: var(--csat-accent);
}

.csat-review__meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  font-size: 12px;
  font-style: normal;
  color: var(--csat-muted);
}

.csat-review__meta time::before {
  margin-right: 8px;
  content: "·";
}

.csat-widget__status {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--csat-muted);
}

.csat-widget[data-state="ready"] .csat-widget__status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 게시판형 */
.csat-widget--cards {
  padding: clamp(28px, 4vw, 50px);
  background: #fff;
  border: 1px solid #d9dcdf;
  border-radius: 16px;
}

.csat-widget--cards .csat-widget__metric {
  padding: 24px 22px;
  text-align: center;
  background: #fbfaf6;
  border: 1px solid #cfd2d5;
  border-radius: 12px;
}

.csat-widget--cards .csat-widget__reviews {
  display: block;
  width: 100%;
  min-width: 0;
}

.csat-widget--cards .csat-widget__reviews-track {
  display: block;
  width: 100%;
  border-top: 1px solid #d9dcdf;
}

.csat-widget--cards .csat-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  width: 100%;
  padding: 19px 10px;
  border-bottom: 1px solid #e2e4e6;
}

.csat-widget--cards .csat-review:last-child {
  border-bottom: 0;
}

.csat-widget--cards .csat-review__quote::before {
  display: none;
}

.csat-widget--cards .csat-review__quote {
  font-size: 15px;
}

.csat-widget--cards .csat-review__meta {
  margin: 0;
  white-space: nowrap;
}

/* 라이브형 */
.csat-widget--spotlight {
  padding: clamp(30px, 5vw, 58px);
  color: #fff;
  background: #131519;
  border-radius: 24px;
}

.csat-widget--spotlight .csat-widget__eyebrow,
.csat-widget--spotlight .csat-widget__score {
  color: var(--csat-accent);
}

.csat-widget--spotlight .csat-widget__description,
.csat-widget--spotlight .csat-widget__score-label,
.csat-widget--spotlight .csat-widget__responses,
.csat-widget--spotlight .csat-widget__updated,
.csat-widget--spotlight .csat-widget__reply-label,
.csat-widget--spotlight .csat-widget__reply-detail,
.csat-widget--spotlight .csat-review__meta,
.csat-widget--spotlight .csat-widget__status {
  color: #c8ccd0;
}

.csat-widget--spotlight .csat-widget__body {
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.5fr);
  gap: clamp(38px, 6vw, 86px);
  align-items: center;
  margin-top: 38px;
}

.csat-widget--spotlight .csat-widget__summary {
  display: block;
  text-align: center;
}

.csat-widget--spotlight .csat-widget__reply-time {
  padding-top: 20px;
  margin-top: 22px;
  border-top: 1px solid #4b5056;
}

.csat-widget--spotlight .csat-widget__reply-value {
  color: #fff;
}

.csat-widget--spotlight .csat-widget__reviews {
  position: relative;
  display: block;
  height: 276px;
  overflow: hidden;
  border-top: 1px solid #4b5056;
  border-bottom: 1px solid #4b5056;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 13%, #000 87%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 13%, #000 87%, transparent);
}

.csat-widget--spotlight .csat-widget__reviews-track {
  display: flex;
  flex-direction: column;
}

.csat-widget--spotlight.csat-widget--ticker .csat-widget__reviews-track {
  animation: csat-review-ticker var(--csat-ticker-duration, 21s) linear infinite;
}

.csat-widget--spotlight .csat-widget__reviews:hover .csat-widget__reviews-track,
.csat-widget--spotlight .csat-widget__reviews:focus-within .csat-widget__reviews-track {
  animation-play-state: paused;
}

.csat-widget--spotlight .csat-review {
  min-height: 138px;
  padding: 32px 24px 24px 48px;
  color: #fff;
  border-bottom: 1px solid #34383d;
}

.csat-widget--spotlight .csat-review__quote {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 600;
}

@keyframes csat-review-ticker {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

/* 가로 카드형 */
.csat-widget--minimal {
  padding: 30px 0 36px;
  border-top: 3px solid #17191c;
  border-bottom: 1px solid #cfd2d5;
}

.csat-widget--minimal .csat-widget__body {
  padding-top: 24px;
  margin-top: 22px;
  border-top: 1px solid #d9dcdf;
}

.csat-widget--minimal .csat-widget__metric {
  min-height: 230px;
  padding: 24px 22px;
  text-align: center;
  background: #fff;
  border: 1px solid #cfd2d5;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(23, 25, 28, .07);
}

.csat-widget--minimal .csat-widget__reply-time {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.csat-widget--minimal .csat-widget__score {
  font-size: clamp(46px, 5vw, 64px);
}

.csat-widget--minimal .csat-widget__reviews {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 4px 2px 16px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
}

.csat-widget--minimal .csat-widget__reviews-track {
  display: flex;
  gap: 16px;
  width: max-content;
}

.csat-widget--minimal .csat-review {
  flex: 0 0 clamp(300px, 34vw, 430px);
  width: clamp(300px, 34vw, 430px);
  min-height: 190px;
  padding: 28px 26px 22px 48px;
  background: #fff;
  border: 1px solid #d7dadd;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(23, 25, 28, .07);
  scroll-snap-align: start;
}

@media (prefers-reduced-motion: reduce) {
  .csat-widget--spotlight.csat-widget--ticker .csat-widget__reviews-track {
    animation: none;
  }

  .csat-widget--spotlight [aria-hidden="true"] {
    display: none;
  }
}

@media (max-width: 900px) {
  .csat-widget--spotlight .csat-widget__body {
    grid-template-columns: minmax(190px, .65fr) minmax(0, 1.35fr);
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .csat-widget-container {
    margin-top: 32px;
    margin-bottom: 32px;
  }

  .csat-widget__header {
    display: block;
  }

  .csat-widget__preview-badge {
    display: inline-block;
    margin-top: 14px;
  }

  .csat-widget__summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .csat-widget--cards,
  .csat-widget--spotlight {
    padding: 26px 20px;
    border-radius: 12px;
  }

  .csat-widget--cards .csat-review {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .csat-widget--cards .csat-review__meta {
    white-space: normal;
  }

  .csat-widget--spotlight .csat-widget__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .csat-widget--spotlight .csat-widget__summary {
    text-align: left;
  }

  .csat-widget--spotlight .csat-widget__reviews {
    height: 246px;
  }

  .csat-widget--spotlight .csat-review {
    min-height: 123px;
    padding: 26px 12px 20px 40px;
  }

  .csat-widget--minimal .csat-review {
    flex-basis: 82vw;
    width: 82vw;
  }
}
