:root {
  --green: #22c55e;
  --green-dark: #16a34a;
  --yellow: #f5c518;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --line: #e8e8e8;
  --bg: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: Manrope, sans-serif;
  background: var(--bg);
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  padding: 20px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 24px 80px;
}

.panel {
  animation: fadeUp 0.4s ease;
}

.step {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.progress {
  height: 4px;
  background: #f1f1f1;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
}

.progress span {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--yellow);
  transition: width 0.25s ease;
}

.question-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 24px;
  background: #f7f7f7;
}

.question-photo.hidden {
  margin: 0;
  height: 0;
}

h1,
h2 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 28px;
}

.hint {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  margin: -16px 0 24px;
}

.options,
.ratings {
  display: grid;
  gap: 20px;
}

.option,
.other-box,
.rating-card {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 18px 18px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.option {
  cursor: pointer;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.option-num,
.option-text {
  position: relative;
  z-index: 1;
}

.option-num {
  color: inherit;
  font-weight: 800;
  min-width: 28px;
}

.option:hover {
  border-color: var(--yellow);
  background: #fffbeb;
}

.option.sweeping {
  border-color: var(--yellow);
}

.option-sweep {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  z-index: 0;
}

.option-fill {
  position: absolute;
  inset: 0;
  background: var(--yellow);
}

.option-arrow {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 22px;
  height: 36px;
  color: #fff;
  transform: translateY(-50%);
  pointer-events: none;
}

.option-arrow svg {
  width: 22px;
  height: 36px;
  display: block;
}

.option.sweeping .option-sweep {
  animation: optionSweep 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

@keyframes optionSweep {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.other-box input {
  width: 100%;
  border: 0;
  outline: 0;
  font: inherit;
  background: transparent;
}

.rating-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.rating-card img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}

.rating-card.dark img,
.logo-dark {
  background: #000;
  padding: 8px;
  border-radius: 10px;
}

.stars-wrap {
  width: 100%;
  border-radius: 28px;
  background: #f3f3f3;
  padding: 14px 10px;
}

.stars {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.star {
  flex: 1;
  height: 64px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: #d0d0d0;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  position: relative;
}

.star svg {
  width: 52px;
  height: 52px;
  display: block;
  transition: color 0.15s ease, transform 0.15s ease;
}

.star-num {
  position: absolute;
  font-size: 12px;
  font-weight: 800;
  color: #4a4a4a;
  pointer-events: none;
  line-height: 1;
  padding-top: 2px;
}

.star.active .star-num,
.star:hover .star-num,
.stars:hover .star .star-num {
  color: #111;
}

.stars:hover .star:hover ~ .star .star-num {
  color: #4a4a4a;
}

.star.active,
.star:hover {
  color: var(--yellow);
}

.stars:hover .star {
  color: var(--yellow);
}

.stars:hover .star:hover ~ .star {
  color: #d0d0d0;
}

.star.pop {
  animation: starPop 0.38s cubic-bezier(0.18, 0.9, 0.32, 1.25);
}

@keyframes starPop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.4) rotate(-8deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  color: #fff;
  background: var(--green);
  padding: 16px 22px;
  border-radius: 12px;
  margin-top: 28px;
  width: 100%;
}

.btn:hover {
  background: var(--green-dark);
}

.btn-sm {
  width: auto;
  margin-top: 0;
  padding: 10px 14px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.72);
  z-index: 20;
}

.hidden {
  display: none !important;
}

.popup {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 28px 36px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.flag-bar {
  height: 8px;
  margin: -28px -28px 22px;
  background: linear-gradient(
    90deg,
    #006341 0 33.33%,
    #ffffff 33.33% 66.66%,
    #ce1126 66.66% 100%
  );
}

.popup p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.highlight {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 2px 10px;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.4;
}

.prize {
  width: 96px;
  margin: 0 auto 16px;
}

.reward {
  text-align: center;
  padding-top: 24px;
}

.reward p {
  color: var(--muted);
  margin-bottom: 24px;
}

.coupon {
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: center;
  width: 100%;
  padding: 22px 18px;
  border: 2px dashed var(--green);
  border-radius: 16px;
  background: repeating-linear-gradient(
    135deg,
    #ffffff,
    #ffffff 10px,
    #f7fff9 10px,
    #f7fff9 20px
  );
}

.coupon small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 800;
}

.coupon span {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.coupon .btn-sm {
  min-width: 110px;
}

.timer {
  margin-top: 18px;
  margin-bottom: 28px;
}

.store-list {
  display: grid;
  gap: 18px;
  margin-bottom: 8px;
}

.store-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  padding-bottom: 12px;
}

.store-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
}

.store-row img {
  height: 42px;
  width: 120px;
  object-fit: contain;
  object-position: left center;
}

.store-row .btn-sm {
  flex-shrink: 0;
  text-decoration: none;
  text-align: center;
}

.shop-meta {
  display: grid;
  gap: 8px;
  padding: 0 14px 10px;
  text-align: left;
}

.shop-rating,
.card-rating,
.pdp-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.star-row {
  --rating: 5;
  position: relative;
  display: inline-block;
  width: 5.5em;
  height: 1em;
  flex-shrink: 0;
}

.star-row::before,
.star-row::after {
  position: absolute;
  left: 0;
  top: 0;
  content: "★★★★★";
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1;
}

.star-row::before {
  color: #e2e2e2;
}

.star-row::after {
  width: calc(var(--rating) / 5 * 100%);
  overflow: hidden;
  color: var(--yellow);
  white-space: nowrap;
}

.ship-row {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border-radius: 4px;
  width: fit-content;
}

.ship-free {
  display: inline-flex;
  align-items: center;
  background: #d8f4e4;
  color: #00a650;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 8px;
  line-height: 1;
}

.ship-full {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #00a650;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 8px 4px 6px;
  line-height: 1;
}

.ship-full svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  display: block;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 10px 11px;
  font-size: 13px;
  white-space: nowrap;
}

.btn-store svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-store .btn-chevron {
  width: 8px;
  height: 14px;
}

.store-marquee {
  padding: 0 10px;
}

.store-marquee .marquee-group img {
  height: 128px;
  width: 148px;
}

.store-card:nth-child(2) .marquee-track {
  animation-duration: 26s;
  animation-delay: -8s;
}

.store-card:nth-child(3) .marquee-track {
  animation-duration: 20s;
  animation-delay: -12s;
}

.marquee {
  overflow: hidden;
  width: 100%;
  border-radius: 16px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
}

.marquee-group {
  display: flex;
  gap: 12px;
  padding-right: 12px;
}

.marquee-group img {
  height: 96px;
  width: 148px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  background: #f4f4f4;
}

.marquee-group img.logo-slide {
  object-fit: contain;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
}

.marquee-group img.logo-slide.logo-dark {
  background: #000;
  border-color: #000;
}

.popup-marquee {
  margin-top: 8px;
}

.popup-marquee .marquee-group img {
  height: 150px;
  width: 150px;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.popup-in {
  animation: popupIn 0.5s ease;
}

.prize-bounce {
  animation: trophyBounce 1.2s ease-in-out infinite;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes trophyBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
