:root {
  --bg: #efefef;
  --bg-wheel: #e9ddba;
  --topbar: #161616;
  --text: #111418;
  --muted: #4f6278;
  --brand: #e7be67;
  --accent: #8f4c2a;
  --line: #ced1d7;
  --option: #e7e7e9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
}

body.wheel-mode {
  background: var(--bg-wheel);
}

body.kits-mode {
  background: #efefef;
}

.hidden {
  display: none !important;
}

.topbar {
  position: relative;
  height: 68px;
  background: linear-gradient(90deg, #0f1625 0%, #141414 55%, #1a1a1a 100%);
  border-bottom: 1px solid #23262a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.menu-button {
  gap: 4px;
}

.menu-button span {
  width: 25px;
  height: 3px;
  border-radius: 99px;
  background: var(--brand);
}

.brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #f2f3f5;
}

.brand-text {
  line-height: 1;
  transform: translateY(-1px);
}

.brand-text strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 45px;
  line-height: 0.84;
  font-weight: 600;
}

.brand-text small {
  display: block;
  text-align: center;
  font-size: 8px;
  letter-spacing: 3px;
  transform: translateX(2px);
}

.actions {
  display: flex;
  align-items: center;
}

.actions svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #07080a;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart {
  position: relative;
}

.badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #627ca7;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.quiz-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 14px 50px;
}

.quiz-card {
  width: min(100%, 800px);
}

h1 {
  margin: 0 0 10px;
  text-align: center;
  color: #4f2f1a;
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: 1.1;
}

.quiz-card > p {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: clamp(18px, 1.4vw, 31px);
}

.progress-track {
  margin: 24px auto 24px;
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  width: 25%;
  height: 100%;
  background: var(--accent);
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(34px, 2.4vw, 44px);
  line-height: 1.16;
}

.answers {
  display: grid;
  gap: 10px;
}

.answer-option {
  display: block;
  width: 100%;
}

.answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answer-option span {
  display: block;
  width: 100%;
  background: var(--option);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: clamp(30px, 1.8vw, 34px);
  line-height: 1.2;
}

.answer-option input:checked + span {
  border-color: #7b4e34;
  box-shadow: 0 0 0 3px #dbc4b6;
}

.status-panel {
  text-align: center;
  padding-top: 2px;
}

.loader {
  margin: 8px auto 10px;
  width: 48px;
  height: 48px;
  border: 4px solid #d8d8d8;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.status-text {
  color: #4f6278;
  font-size: clamp(18px, 1.5vw, 33px);
}

.success-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 4px auto 8px;
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  background: #29c15b;
}

.status-panel h3 {
  margin: 0 0 8px;
  font-size: clamp(32px, 2.8vw, 53px);
}

.status-panel p {
  margin: 0 0 8px;
  color: #1f252d;
  font-size: clamp(18px, 1.4vw, 30px);
}

.status-panel p + p {
  color: #4f6278;
}

.spin-cta {
  border: 0;
  border-radius: 6px;
  background: #904d29;
  color: #fff;
  padding: 10px 18px;
  font-size: clamp(18px, 1.2vw, 26px);
  font-weight: 700;
  cursor: pointer;
}

.roulette-section {
  width: min(100%, 980px);
  text-align: center;
  padding: 10px 0 70px;
}

.roulette-badge-img {
  display: block;
  margin: 2px auto 12px;
  width: min(360px, 74vw);
  height: auto;
}

.roulette-title {
  margin: 0 0 6px;
  color: #994918;
  font-size: clamp(50px, 4vw, 78px);
}

.pointer {
  width: 0;
  height: 0;
  margin: 0 auto -8px;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 30px solid #f8d10d;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.22));
}

.wheel-wrap {
  display: grid;
  place-items: center;
}

.wheel {
  position: relative;
  width: min(74vw, 610px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(64, 37, 17, 0.26);
  transition: transform 2.1s cubic-bezier(0.15, 0.85, 0.2, 1);
  overflow: hidden;
}

.wheel-image {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}

.roulette-button {
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #fdda2a, #e9c31b);
  color: #962b1c;
  padding: 12px 40px;
  font-size: clamp(22px, 1.9vw, 34px);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(117, 81, 4, 0.18);
}

.roulette-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.chances {
  margin: 12px 0 0;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-size: clamp(24px, 2vw, 40px);
  font-weight: 700;
}

.result-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.64);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 640px);
  margin: min(20vh, 220px) auto 0;
  background: #ececec;
  border-radius: 24px;
  padding: 26px 24px 34px;
  text-align: center;
}

.modal-card h3 {
  margin: 0 0 16px;
  font-size: clamp(42px, 3.5vw, 68px);
  color: #e12626;
}

.modal-card p {
  margin: 0 auto 18px;
  max-width: 76%;
  font-size: clamp(24px, 2vw, 45px);
  line-height: 1.2;
  font-weight: 700;
  color: #dfaa00;
}

.btn-close,
.btn-redeem {
  display: block;
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  font-size: clamp(22px, 1.8vw, 38px);
  font-weight: 700;
  padding: 12px 30px;
  cursor: pointer;
}

.btn-close {
  background: linear-gradient(180deg, #db2b2b, #b51010);
  color: #fff;
  margin-bottom: 16px;
}

.btn-redeem {
  background: linear-gradient(180deg, #27c65f, #14a94b);
  color: #fff;
}

.confetti {
  position: absolute;
  inset: -26px;
  pointer-events: none;
}

.confetti::before,
.confetti::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, #ffd45f 2px, transparent 3px),
    radial-gradient(circle, #82c7ff 2px, transparent 3px),
    radial-gradient(circle, #f58df5 2px, transparent 3px),
    radial-gradient(circle, #90e27d 2px, transparent 3px),
    radial-gradient(circle, #ff9d66 2px, transparent 3px);
  background-size: 120px 90px;
  animation: confetti-fall 1.5s linear infinite;
  opacity: 0.8;
}

.confetti::after {
  animation-delay: -0.7s;
}

.kits-page {
  width: min(100%, 1080px);
  padding: 14px 10px 42px;
}

.kits-hero {
  border-radius: 18px;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.kits-hero img {
  width: 100%;
  height: 100%;
  min-height: 250px;
  object-fit: cover;
  display: block;
}

.kits-intro {
  text-align: center;
  padding: 24px 10px 8px;
}

.kits-intro h2 {
  font-size: clamp(30px, 2.2vw, 44px);
  margin: 0 0 8px;
  line-height: 1.15;
}

.kits-intro p {
  margin: 0 auto 12px;
  max-width: 820px;
  color: #3a4450;
  font-size: clamp(16px, 1.05vw, 22px);
}

.offer-chip {
  width: fit-content;
  background: #080808;
  color: #fff !important;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
}

.warn-box {
  background: #f1e5bf;
  border-left: 4px solid #d33;
  border-radius: 10px;
  padding: 12px 16px;
}

.kits-grid-wrap h3 {
  text-align: center;
  font-size: clamp(40px, 2.15vw, 46px);
  margin: 18px 0;
}

.kits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}

.kit-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e1e1e1;
  padding: 0 0 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.kit-thumb {
  aspect-ratio: 16 / 9;
  background: #2f170b;
}

.kit-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kit-thumb .p1 {
  object-position: center;
}

.kit-thumb .p2 {
  object-position: center;
}

.kit-thumb .p3 {
  object-position: center;
}

.kit-thumb .p4 {
  object-position: center;
}

.kit-card h4 {
  margin: 12px 14px 6px;
  text-align: center;
  font-size: clamp(21px, 1.2vw, 29px);
  line-height: 1.15;
}

.kit-card p {
  margin: 0 14px 8px;
  text-align: center;
  color: #56606e;
  font-size: clamp(16px, 0.95vw, 20px);
}

.price-old {
  text-align: center;
  color: #8d8d8d;
  text-decoration: line-through;
  margin-top: 8px;
  font-size: clamp(17px, 0.95vw, 20px);
}

.price-now {
  text-align: center;
  color: #d30000;
  font-weight: 700;
  font-size: clamp(30px, 1.8vw, 42px);
}

.stock {
  text-align: center;
  color: #5d6673;
  font-size: clamp(15px, 0.92vw, 18px);
  margin-top: 2px;
}

.kit-card button {
  display: block;
  margin: 10px auto 0;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  width: calc(100% - 28px);
  font-size: clamp(20px, 1.15vw, 24px);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #5b4734, #453426);
  cursor: pointer;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes confetti-fall {
  from {
    transform: translateY(-12px);
  }
  to {
    transform: translateY(28px);
  }
}

@media (max-width: 900px) {
  .topbar {
    height: 64px;
  }

  .brand-text strong {
    font-size: 35px;
  }

  .brand-text small {
    font-size: 6px;
    letter-spacing: 2px;
  }

  .actions .icon-button {
    width: 28px;
    height: 28px;
  }

  .actions svg {
    width: 17px;
    height: 17px;
  }

  .quiz-page {
    padding: 20px 10px 34px;
  }

  h1 {
    font-size: clamp(27px, 8vw, 40px);
  }

  .quiz-card > p {
    font-size: clamp(14px, 3.3vw, 18px);
  }

  h2 {
    font-size: clamp(22px, 5vw, 32px);
  }

  .answer-option span {
    font-size: clamp(16px, 4vw, 22px);
    padding: 12px 11px;
  }

  .roulette-title {
    font-size: clamp(36px, 10vw, 50px);
  }

  .wheel {
    width: min(90vw, 430px);
  }

  .modal-card p {
    max-width: 92%;
  }

  .kits-page {
    padding: 10px 8px 32px;
  }

  .kits-hero,
  .kits-hero img {
    min-height: 150px;
  }

  .kits-intro {
    padding-top: 18px;
  }

  .kits-intro h2 {
    font-size: clamp(22px, 5.4vw, 30px);
  }

  .kits-intro p {
    font-size: clamp(14px, 3.3vw, 17px);
  }

  .offer-chip {
    padding: 8px 12px;
    font-size: 13px !important;
  }

  .warn-box {
    font-size: 13px !important;
  }

  .kits-grid-wrap h3 {
    font-size: clamp(30px, 6vw, 36px);
    margin: 14px 0;
  }

  .kits-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .kit-card h4 {
    font-size: 24px;
  }

  .kit-card p {
    font-size: 15px;
  }

  .price-old {
    font-size: 15px;
  }

  .price-now {
    font-size: 36px;
  }

  .stock {
    font-size: 14px;
  }

  .kit-card button {
    font-size: 19px;
  }
}
