:root {
  --color-coral: #f25349;
  --color-teal: #2a8585;
  --color-ink: #262628;
  --color-paper: #ffffff;
  --color-stage: #e9ecef;
  --shadow-stage: 0 22px 60px rgba(20, 25, 30, 0.22);
  --font-display: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--color-stage);
  color: var(--color-ink);
  font-family: var(--font-display);
}

button,
input {
  font: inherit;
}

.app {
  position: relative;
  display: grid;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  place-items: center;
}

.exit-site {
  position: absolute;
  right: clamp(10px, 2.4vw, 18px);
  top: clamp(10px, 2.4vw, 18px);
  display: grid;
  width: clamp(38px, 5.4vw, 54px);
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: rgba(242, 83, 73, 0.96);
  color: #fff;
  box-shadow: 0 10px 24px rgba(38, 38, 40, 0.18);
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.exit-site:focus-visible {
  outline: 3px solid rgba(42, 133, 133, 0.7);
  outline-offset: 4px;
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
  place-items: center;
}

.screen.is-active {
  display: grid;
}

.artboard {
  position: relative;
  overflow: hidden;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  box-shadow: var(--shadow-stage);
}

/* PSD composites are used as exact visual artboards; controls sit above them. */
.artboard--banner {
  width: min(100vw, calc(100vh * 1600 / 533));
  width: min(100vw, calc(100svh * 1600 / 533));
  aspect-ratio: 1600 / 533;
  background-image: url("../assets/images/banner-desktop.jpg?v=10");
}

.artboard--spin,
.artboard--credentials {
  width: min(100vw, calc(100vh * 4 / 5));
  width: min(100vw, calc(100svh * 4 / 5));
  aspect-ratio: 4 / 5;
}

.artboard--spin {
  background-image: url("../assets/images/spin-mobile.jpg?v=6");
}

.artboard--credentials {
  background-image: url("../assets/images/credentials-mobile.jpg");
}

.artboard--spin::before {
  content: "";
  position: absolute;
  left: 15%;
  top: 28.1%;
  width: 70%;
  height: 9.6%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 22px 24px rgba(255, 255, 255, 0.96);
  z-index: 2;
  pointer-events: none;
}

.artboard--spin::after {
  content: "";
  position: absolute;
  left: 30%;
  top: 36%;
  width: 40%;
  height: 5.2%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 16px 16px rgba(255, 255, 255, 0.92);
  z-index: 2;
  pointer-events: none;
}

.front-instruction {
  position: absolute;
  left: 15%;
  top: 29.15%;
  width: 70%;
  margin: 0;
  color: #45484a;
  font-size: clamp(13px, 1.55vw, 22px);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.95);
  z-index: 3;
  pointer-events: none;
}

.front-instruction--landing {
  display: none;
}

.visual-accent {
  position: absolute;
  display: block;
  pointer-events: none;
  z-index: 3;
}

.accent-voucher {
  width: 84px;
  height: 52px;
  border: 3px solid var(--color-teal);
  border-radius: 10px;
  background:
    radial-gradient(circle at 0 50%, transparent 0 8px, #fff 9px),
    radial-gradient(circle at 100% 50%, transparent 0 8px, #fff 9px),
    linear-gradient(135deg, #fff, #f4fbfa);
  box-shadow: 0 12px 24px rgba(42, 133, 133, 0.16);
}

.accent-voucher::before,
.accent-voucher::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  height: 4px;
  border-radius: 999px;
  background: var(--color-coral);
}

.accent-voucher::before {
  top: 16px;
}

.accent-voucher::after {
  top: 30px;
  background: rgba(42, 133, 133, 0.42);
}

.accent-voucher--prize {
  right: 8%;
  top: 33%;
  transform: rotate(10deg);
}

.accent-phone-topup {
  right: 8.5%;
  top: 27%;
  width: 12%;
  aspect-ratio: 0.68;
  border: 4px solid var(--color-teal);
  border-radius: 16%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(236, 249, 247, 0.98));
  box-shadow: 0 14px 26px rgba(42, 133, 133, 0.18);
}

.accent-phone-topup::before {
  content: "+";
  position: absolute;
  left: 50%;
  top: 44%;
  display: grid;
  width: 54%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--color-coral);
  color: #fff;
  font-size: clamp(14px, 2.4vw, 24px);
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.accent-phone-topup::after {
  content: "";
  position: absolute;
  left: 36%;
  bottom: 8%;
  width: 28%;
  height: 4px;
  border-radius: 999px;
  background: rgba(42, 133, 133, 0.45);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Invisible hit areas preserve the designed button artwork underneath. */
.hotspot,
.submit-hotspot {
  position: absolute;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
  cursor: pointer;
}

.hotspot:focus-visible,
.submit-hotspot:focus-visible,
.vm-check input:focus-visible + span,
.field:focus-visible {
  outline: 3px solid rgba(42, 133, 133, 0.7);
  outline-offset: 4px;
}

.hotspot--start {
  left: 75%;
  top: 84.7%;
  width: 16.5%;
  height: 11.6%;
}

.hotspot--how {
  left: 47.1%;
  top: 30.2%;
  width: 20.1%;
  height: 62.5%;
}

.hotspot--faq {
  left: 91.9%;
  top: 84.7%;
  width: 6.4%;
  height: 11.6%;
  display: grid;
  place-items: center;
  border: 3px solid var(--color-teal);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-teal);
  font-size: clamp(10px, 1.05vw, 17px);
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(42, 133, 133, 0.18);
}

.hotspot--spin {
  left: 29.15%;
  top: 87.9%;
  width: 41.9%;
  height: 8.35%;
  z-index: 4;
  transition: transform 180ms ease;
}

.hotspot--spin:active {
  transform: scale(0.985);
}

.hotspot--spin.is-spinning {
  pointer-events: none;
  animation: pulseSpin 520ms ease-in-out infinite alternate;
}

@keyframes pulseSpin {
  from { transform: scale(1); }
  to { transform: scale(0.965); }
}

.spin-category {
  position: absolute;
  left: 23%;
  top: 80.7%;
  width: 54%;
  min-height: 4.2%;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--color-teal);
  color: var(--color-paper);
  font-size: clamp(11px, 2vw, 17px);
  font-weight: 900;
  z-index: 5;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.spin-category.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wheel-spin-layer {
  --spin-turn: 720deg;
  position: absolute;
  left: 28.1481%;
  top: 46.8148%;
  width: 43.7037%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  background: url("../assets/images/wheel-inner-crop.png?v=6") center / 100% 100% no-repeat;
  backface-visibility: hidden;
  contain: layout paint;
  transform-origin: 50% 50%;
  will-change: transform;
}

.wheel-spin-layer.is-spinning {
  opacity: 1;
  animation: wheelSpin var(--spin-duration, 8000ms) cubic-bezier(.16,.84,.26,1) forwards;
}

.wheel-spin-layer.is-settled {
  opacity: 1;
}

@keyframes wheelSpin {
  0% { transform: rotate(0deg); }
  9% { transform: rotate(-14deg); }
  100% { transform: rotate(var(--spin-turn)); }
}


.vm-check {
  display: none;
}

.vm-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vm-check span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 24%;
  background: rgba(255, 255, 255, 0.08);
}

.vm-check input:checked + span {
  background:
    linear-gradient(135deg, transparent 45%, var(--color-teal) 46% 58%, transparent 59%),
    linear-gradient(45deg, transparent 41%, var(--color-teal) 42% 58%, transparent 59%),
    var(--color-paper);
}

/* Real form controls are aligned to the drawn PSD field outlines. */
.field {
  position: absolute;
  left: 44.25%;
  width: 48.65%;
  height: 5.85%;
  padding: 0 2.4%;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-ink);
  font-size: clamp(14px, 2.1vw, 24px);
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
}

.field--first {
  top: 39.8%;
}

.field--last {
  top: 49.05%;
}

.field--email {
  top: 58.15%;
}

.field--phone {
  top: 68.1%;
}

.carrier-choice {
  position: absolute;
  left: 27%;
  top: 75.25%;
  display: none;
  width: 46%;
  margin: 0;
  padding: 8px 12px;
  border: 2px solid rgba(42, 133, 133, 0.25);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.carrier-choice.is-visible {
  display: grid;
  gap: 6px;
}

.carrier-choice legend {
  padding: 0 4px;
  color: var(--color-ink);
  font-size: clamp(11px, 1.7vw, 16px);
  font-weight: 900;
}

.carrier-choice label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-ink);
  font-size: clamp(12px, 1.8vw, 17px);
  font-weight: 800;
}

.carrier-choice input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-teal);
}

.carrier-choice p {
  display: none;
  margin: 0;
  color: var(--color-coral);
  font-size: 11px;
  font-weight: 900;
}

.carrier-choice.is-error p {
  display: block;
}

.submit-hotspot {
  left: 27%;
  top: 84%;
  width: 46%;
  height: 6.8%;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--color-coral);
  color: var(--color-paper);
  box-shadow: 0 10px 24px rgba(242, 83, 73, 0.28);
  font-size: clamp(18px, 3.5vw, 34px);
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
}

.credentials-has-carrier .submit-hotspot {
  top: 88.4%;
  height: 6.2%;
}

.screen--quiz,
.screen--result,
.screen--prize,
.screen--lose,
.screen--confirm {
  background:
    linear-gradient(120deg, rgba(42, 133, 133, 0.08), transparent 42%),
    linear-gradient(300deg, rgba(242, 83, 73, 0.1), transparent 46%),
    #fff;
}

.screen--quiz {
  background: #fff;
}

.quiz-shell,
.result-shell,
.prize-shell,
.lose-shell,
.confirm-shell {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: min(100vw, calc(100vh * 4 / 5));
  width: min(100vw, calc(100svh * 4 / 5));
  min-height: min(100vh, calc(100vw * 5 / 4));
  min-height: min(100svh, calc(100vw * 5 / 4));
  aspect-ratio: 4 / 5;
  padding: clamp(16px, 3.7vw, 32px);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255,255,255,0.82)),
    url("../assets/images/spin-mobile.jpg?v=6") center / cover;
  box-shadow: var(--shadow-stage);
}

.quiz-shell {
  background: #fff;
}

.quiz-shell::before,
.result-shell::before,
.prize-shell::before,
.lose-shell::before,
.confirm-shell::before {
  content: "";
  position: absolute;
  left: 29.8%;
  top: 28.95%;
  width: 40%;
  height: 4.95%;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 18px 14px rgba(255, 255, 255, 0.82);
  pointer-events: none;
}

.quiz-shell::before {
  display: none;
}

.quiz-shell > *,
.result-shell > *,
.prize-shell > *,
.lose-shell > *,
.confirm-shell > * {
  position: relative;
  z-index: 1;
}

.quiz-shell > .visual-accent,
.result-shell > .visual-accent,
.prize-shell > .visual-accent,
.lose-shell > .visual-accent,
.confirm-shell > .visual-accent {
  position: absolute;
  z-index: 0;
}

.quiz-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(8px, 2vw, 18px);
}

.quiz-header .back-link {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.header-spacer {
  display: none;
}

.back-link {
  border: 0;
  background: transparent;
  color: var(--color-ink);
  font-weight: 900;
  cursor: pointer;
}

.header-spacer {
  width: 42px;
  height: 1px;
}

.quiz-brand {
  margin: 0;
  color: var(--color-teal);
  font-size: clamp(26px, 6vw, 58px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.9;
}

.quiz-brand span {
  color: var(--color-coral);
}

.progress-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 9px 12px;
  border: 2px solid rgba(38, 38, 40, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.progress-card small {
  display: block;
  color: #6d7479;
  font-size: 11px;
  font-weight: 700;
}

.progress-card strong {
  display: block;
  color: var(--color-ink);
  font-size: clamp(13px, 2.7vw, 18px);
  font-weight: 900;
  white-space: nowrap;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e4e6;
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-coral), #ff8c00);
  transition: width 260ms ease;
}

.progress-track span.progress-track__complete {
  width: 100%;
}

.question-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: clamp(12px, 2.8vw, 22px);
}

.category-pill {
  align-self: center;
  margin: 0 0 12px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--color-teal);
  color: var(--color-paper);
  font-size: clamp(13px, 3vw, 20px);
  font-weight: 900;
}

.question-card h2 {
  margin: 0 0 12px;
  color: var(--color-ink);
  font-size: clamp(19px, 4.2vw, 30px);
  line-height: 1.25;
  text-align: center;
}

.question-timer {
  margin: 0 0 10px;
  padding: 8px 12px;
  border: 2px solid rgba(42, 133, 133, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}

.question-timer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 900;
}

.question-timer__top strong {
  color: var(--color-teal);
  font-size: 18px;
}

.question-timer__track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e4e6;
}

.question-timer__track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-teal), #35b7a8);
  transition: width 1000ms linear, background 180ms ease;
}

.question-timer.is-danger .question-timer__top strong {
  color: var(--color-coral);
}

.question-timer.is-danger .question-timer__track span {
  background: linear-gradient(90deg, var(--color-coral), #ff8c00);
}

.options {
  display: grid;
  gap: 8px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 2px solid #d8dcdf;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-ink);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.option span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--color-teal);
  color: var(--color-paper);
  font-weight: 900;
}

.option.is-selected {
  border-color: var(--color-teal);
  background: #eaf5f4;
}

.option.is-correct {
  border-color: #17a955;
  background: #e7f8ee;
}

.option.is-wrong {
  border-color: var(--color-coral);
  background: #fff0ef;
}

.feedback {
  min-height: 28px;
  margin: 8px 0 0;
  color: var(--color-ink);
  font-weight: 700;
  line-height: 1.35;
}

/* Question review navigation: appears after an answer has been submitted. */
.quiz-nav {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quiz-nav.is-visible {
  display: flex;
  margin: 10px 0 8px;
}

.quiz-nav__btn {
  min-height: 40px;
  padding: 6px 16px;
  border: 2px solid var(--color-teal);
  border-radius: 999px;
  background: var(--color-paper);
  color: var(--color-teal);
  font-size: clamp(13px, 2.4vw, 17px);
  font-weight: 900;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.quiz-nav__btn:not(:disabled):hover {
  background: var(--color-teal);
  color: var(--color-paper);
}

.quiz-nav__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.quiz-nav__label {
  color: var(--color-ink);
  font-size: clamp(12px, 2.2vw, 15px);
  font-weight: 700;
  text-align: center;
}

.question-card.is-reviewing {
  outline: 3px dashed rgba(42, 133, 133, 0.45);
  outline-offset: 4px;
}

.quiz-action {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: var(--color-coral);
  color: var(--color-paper);
  font-size: clamp(18px, 4vw, 32px);
  font-weight: 900;
  cursor: pointer;
}

.quiz-action:disabled {
  opacity: 0.55;
  cursor: default;
}

.result-shell {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.result-mark {
  display: grid;
  width: 92px;
  height: 92px;
  margin: 34px 0 16px;
  place-items: center;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 50px;
  font-weight: 900;
}

.result-mark.is-loss {
  background: var(--color-coral);
}

.result-shell h2 {
  margin: 0;
  color: var(--color-teal);
  font-size: clamp(30px, 7vw, 58px);
  font-weight: 900;
}

.result-shell p {
  margin: 12px 0 34px;
  font-size: clamp(17px, 3.5vw, 26px);
  line-height: 1.35;
  font-weight: 700;
}

.confirm-shell {
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.confirm-shell .exit-site {
  right: clamp(10px, 2.4vw, 18px);
  top: clamp(10px, 2.4vw, 18px);
  z-index: 10;
}

.confirm-mark {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 56px;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(22, 163, 74, 0.22);
}

.confirm-shell h2 {
  margin: 0;
  color: var(--color-teal);
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 900;
}

.confirm-shell p {
  margin: 0 0 16px;
  max-width: 390px;
  color: #5f6870;
  font-size: clamp(16px, 3.2vw, 22px);
  font-weight: 800;
  line-height: 1.45;
}

.prize-shell {
  align-items: stretch;
}

.prize-head {
  text-align: center;
  margin: 20px 0 16px;
}

.prize-head h2 {
  margin: 0 0 8px;
  color: var(--color-teal);
  font-size: clamp(28px, 6vw, 50px);
  font-weight: 900;
}

.prize-head p {
  margin: 0 auto;
  max-width: 440px;
  color: #5f6870;
  font-size: clamp(15px, 3vw, 22px);
  font-weight: 800;
  line-height: 1.35;
}

.gift-box {
  display: grid;
  flex: 1;
  width: 100%;
  min-height: 310px;
  place-items: center;
  align-content: center;
  gap: 0;
  border: 2px solid rgba(42, 133, 133, 0.16);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(240,253,248,.88), rgba(255,244,235,.9));
  cursor: pointer;
}

.gift-bow {
  position: relative;
  display: block;
  width: 76px;
  height: 34px;
  margin-bottom: -2px;
}

.gift-bow::before,
.gift-bow::after {
  content: "";
  position: absolute;
  top: 0;
  width: 40px;
  height: 34px;
  border-radius: 50%;
  background: #e8bd39;
}

.gift-bow::before {
  left: 4px;
  transform: rotate(-24deg);
}

.gift-bow::after {
  right: 4px;
  transform: rotate(24deg);
}

.gift-lid,
.gift-body {
  display: block;
  width: 180px;
  background:
    linear-gradient(90deg, transparent 0 44%, #e9bd2f 44% 56%, transparent 56%),
    linear-gradient(180deg, transparent 0 36%, #e9bd2f 36% 50%, transparent 50%),
    linear-gradient(135deg, #f25349, #d8342e);
  box-shadow: 0 16px 40px rgba(216, 52, 46, 0.24);
}

.gift-lid {
  height: 64px;
  border-radius: 10px 10px 4px 4px;
}

.gift-body {
  height: 150px;
  border-radius: 4px 4px 12px 12px;
}

.gift-box strong {
  display: block;
  margin-top: 24px;
  color: var(--color-teal);
  font-size: 20px;
  font-weight: 900;
}

.gift-box.is-open .gift-lid {
  transform: translateY(-24px) rotate(-8deg);
  transition: transform 420ms ease;
}

.gift-box.is-open {
  display: none;
}

.prize-reveal {
  display: none;
  flex: 1;
  min-height: 310px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  border: 2px solid rgba(42, 133, 133, 0.16);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(240,253,248,.88), rgba(255,244,235,.9));
  text-align: center;
}

.prize-reveal.is-visible {
  display: flex;
}

.prize-reveal__icon {
  font-size: 58px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}

.prize-reveal h3 {
  margin: 0;
  color: var(--color-teal);
  font-size: 28px;
  font-weight: 900;
}

.prize-reveal p {
  margin: 0;
  max-width: 320px;
  color: #5f6870;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.claim-prize {
  display: none;
  margin-top: 16px;
}

.claim-prize.is-visible {
  display: block;
}

.lose-shell {
  overflow-y: auto;
  background: #fff;
}

.lose-shell::before {
  display: none;
}

.lose-shell > * {
  flex-shrink: 0;
}

.lose-mark {
  display: grid;
  width: 112px;
  height: 112px;
  margin: 22px auto 14px;
  place-items: center;
  border: 7px solid var(--color-coral);
  border-radius: 50%;
  color: var(--color-coral);
  background: rgba(242, 83, 73, 0.08);
  box-shadow: 0 0 0 18px rgba(242,83,73,.05);
  font-size: 70px;
  line-height: 1;
}

.lose-shell h2 {
  margin: 0;
  color: var(--color-coral);
  font-size: clamp(34px, 7vw, 58px);
  font-weight: 900;
  text-align: center;
}

.lose-copy {
  margin: 14px auto 22px;
  max-width: 360px;
  color: var(--color-ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.try-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border: 2px solid #c5d8f5;
  border-radius: 16px;
  background: #eef4ff;
}

.try-card > span {
  font-size: 34px;
}

.try-card strong {
  color: #2862c7;
  font-size: 20px;
  font-weight: 900;
}

.try-card p {
  margin: 6px 0 0;
  color: #69737d;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}

.missed-title {
  margin: 18px 0 10px;
  color: var(--color-ink);
  font-size: 16px;
  font-weight: 900;
}

.missed-list {
  display: grid;
  gap: 10px;
  max-height: none;
  overflow: visible;
  margin-bottom: 16px;
}

.missed-item {
  padding: 12px 14px;
  border: 2px solid #ffd3d3;
  border-left: 4px solid var(--color-coral);
  border-radius: 14px;
  background: #fff6f6;
}

.missed-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--color-ink);
  font-size: 14px;
}

.missed-item span {
  color: var(--color-teal);
  font-size: 14px;
  font-weight: 900;
}

.try-tomorrow {
  margin-top: 8px;
  background: linear-gradient(90deg, #f05a54, #f36b20);
}

.home-action {
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  border: 3px solid var(--color-teal);
  border-radius: 999px;
  background: #fff;
  color: var(--color-teal);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

/* Small dialog is only used for help and final form confirmation. */
.modal {
  width: min(90vw, 420px);
  padding: 24px;
  border: 0;
  border-radius: 14px;
  color: var(--color-ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.modal:not([open]):not(.is-open),
.faq-modal:not([open]):not(.is-open),
.terms-modal:not([open]):not(.is-open) {
  display: none;
}

.modal.is-open,
.faq-modal.is-open,
.terms-modal.is-open {
  position: fixed;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  transform: translate(-50%, -50%);
  z-index: 30;
}

.modal.is-open {
  display: block;
}

body.has-modal::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(0, 0, 0, 0.42);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

.modal p {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.modal__actions button {
  min-width: 128px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--color-coral);
  color: var(--color-paper);
  font-weight: 900;
  cursor: pointer;
}

.faq-modal {
  width: min(90vw, 520px);
  height: min(88vh, 760px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--color-ink);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.faq-modal[open] {
  display: flex;
  flex-direction: column;
}

.faq-modal::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.faq-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 24px 18px;
  background: #fff;
}

.faq-modal h2 {
  margin: 0 0 14px;
  color: var(--color-teal);
  font-size: 26px;
  font-weight: 900;
}

.faq-list h3 {
  margin: 18px 0 6px;
  color: var(--color-ink);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}

.faq-list p {
  margin: 0;
  color: #5f6870;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.faq-modal__actions {
  padding: 16px;
  background: #fff;
  border-top: 1px solid #e4e8eb;
}

.faq-modal__actions button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--color-coral);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.terms-modal {
  width: min(90vw, 430px);
  height: min(88vh, 720px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--color-ink);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.terms-modal[open] {
  display: flex;
  flex-direction: column;
}

.terms-modal::backdrop {
  background: rgba(0, 0, 0, 0.42);
}

.terms-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 24px 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9)),
    url("../assets/images/spin-mobile.jpg?v=6") center / cover;
}

.terms-modal h2 {
  margin: 0 0 12px;
  color: var(--color-teal);
  font-size: 24px;
  font-weight: 900;
}

.terms-modal p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
}

.terms-copy {
  padding-right: 4px;
}

.terms-copy h3 {
  margin: 16px 0 6px;
  color: var(--color-ink);
  font-size: 15px;
  font-weight: 900;
}

.terms-copy p {
  font-size: 13px;
  font-weight: 700;
}

.terms-copy ul {
  margin: 0 0 12px 18px;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.terms-copy li {
  margin-bottom: 4px;
}

.terms-check {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 16px 8px;
  padding: 14px;
  border: 2px solid rgba(42, 133, 133, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.terms-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.terms-check span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #9ca8ad;
  border-radius: 7px;
  background: #fff;
}

.terms-check input:checked + span {
  border-color: var(--color-teal);
  background: var(--color-teal);
}

.terms-check input:checked + span::after {
  content: "✓";
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.terms-check strong {
  font-size: 13px;
  line-height: 1.45;
}

.terms-error {
  display: none;
  flex: 0 0 auto;
  margin: 0 20px 8px !important;
  color: var(--color-coral);
  font-size: 12px !important;
  font-weight: 900 !important;
}

.terms-error.is-visible {
  display: block;
}

.terms-modal__actions {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  background: #fff;
}

.terms-modal__actions button {
  min-height: 48px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

#terms-cancel {
  border: 2px solid #d7dcdf;
  background: #fff;
  color: var(--color-ink);
}

#terms-accept {
  border: 0;
  background: var(--color-coral);
  color: #fff;
}

#terms-accept:disabled {
  background: #b9bfc3;
  cursor: not-allowed;
}

@media (max-width: 899px), (orientation: portrait) {
  body {
    background: var(--color-paper);
  }

  .screen--landscape .artboard {
    width: min(100vw, calc(100vh * 1600 / 533));
    width: min(100vw, calc(100svh * 1600 / 533));
    aspect-ratio: 1600 / 533;
    background-image: url("../assets/images/banner-desktop.jpg?v=10");
  }

  .screen--landscape .artboard::before {
    content: none;
  }

  .screen--landscape .artboard::after {
    content: none;
  }

  .front-instruction--landing {
    display: none;
  }

  .hotspot--start {
    left: 75%;
    top: 84.7%;
    width: 16.5%;
    height: 11.6%;
  }

  .hotspot--how {
    display: block;
  }

  .hotspot--faq {
    left: 91.9%;
    top: 84.7%;
    width: 6.4%;
    height: 11.6%;
    border-width: 2px;
    font-size: clamp(8px, 1.65vw, 12px);
  }

  .accent-phone-topup {
    top: 26.5%;
    width: 10.5%;
  }
}

@media (max-width: 560px) {
  .artboard {
    box-shadow: none;
  }

  .quiz-shell,
  .result-shell,
  .prize-shell,
  .lose-shell,
  .confirm-shell {
    height: 100vh;
    height: 100svh;
    min-height: 0;
    aspect-ratio: auto;
    overflow-y: auto;
    box-shadow: none;
  }

  .field {
    font-size: clamp(13px, 4.6vw, 22px);
  }

  .accent-voucher--prize {
    opacity: 0.42;
    transform: scale(0.78);
  }
}

/* Confetti celebration overlay */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 50;
  pointer-events: none;
}

/* ---------- Engagement upgrades ---------- */

/* Answer feedback pop & shake */
@keyframes popCorrect {
  0% { transform: scale(1); }
  40% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(42, 133, 133, 0.25); }
  100% { transform: scale(1); }
}

@keyframes shakeWrong {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.option.is-correct {
  animation: popCorrect 450ms ease-out;
}

.option.is-wrong {
  animation: shakeWrong 420ms ease-in-out;
}

/* Score count-up pulse */
@keyframes scorePop {
  0% { transform: scale(1); }
  45% { transform: scale(1.25); color: var(--color-teal); }
  100% { transform: scale(1); }
}

#score-label.score-pop {
  display: inline-block;
  animation: scorePop 550ms ease-out;
}

/* Timer critical pulse (final 5 seconds) */
@keyframes timerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 4px rgba(242, 83, 73, 0.22); }
}

.question-timer.is-critical {
  animation: timerPulse 700ms ease-in-out infinite;
}

/* Round progress dots */
.round-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 0;
}

.round-dots .dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(38, 38, 40, 0.16);
  transition: transform 200ms ease, background 200ms ease;
}

.round-dots .dot--current {
  background: var(--color-teal);
  transform: scale(1.25);
  box-shadow: 0 0 0 4px rgba(42, 133, 133, 0.2);
}

.round-dots .dot--correct { background: #2eaf62; }
.round-dots .dot--wrong { background: var(--color-coral); }

/* Streak indicator */
.streak-label {
  display: none;
  margin: 8px 0 0;
  color: var(--color-coral);
  font-size: clamp(14px, 2.6vw, 18px);
  font-weight: 900;
  text-align: center;
}

@keyframes streakIn {
  from { opacity: 0; transform: translateY(6px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.streak-label.is-visible {
  display: block;
  animation: streakIn 320ms ease-out;
}

/* Sound toggle */
.sound-toggle {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(42, 133, 133, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(38, 38, 40, 0.16);
}

/* Win card button */
.win-card-btn {
  margin-top: 10px;
  min-height: 44px;
  border: 2px solid var(--color-teal);
  border-radius: 18px;
  background: var(--color-paper);
  color: var(--color-teal);
  font-size: clamp(14px, 3vw, 20px);
  font-weight: 900;
  cursor: pointer;
}
