@font-face {
  font-family: "Cocogoose";
  src: url("/Cocogoose-6492c62045d90c139380.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Kalam";
  src: url("/rentree-assets/kalam-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --red: #ed1c24;
  --red-dark: #be0f18;
  --navy: #153451;
  --cream: #f4ddcb;
  --paper: #fffdf9;
  --ink: #173252;
  --muted: #715d54;
  --shadow: 0 18px 50px rgba(64, 22, 6, 0.24);
  --radius: 28px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background: #e9cbb5;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
[tabindex="-1"]:focus { outline: none; }

.app-shell {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--cream);
}

.screen {
  display: none;
  position: relative;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
}

.screen.is-active { display: flex; }
.screen-centered { align-items: center; justify-content: center; flex-direction: column; padding: 28px; text-align: center; }

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(237, 28, 36, 0.18);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.brand {
  display: block;
  width: min(190px, 48vw);
  height: auto;
  margin-inline: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.brand-small { width: min(150px, 42vw); }
.brand-form { width: 145px; margin-bottom: 24px; }

.kitchen-background,
.result-background {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-image: linear-gradient(to bottom, rgba(238, 206, 183, 0.12), rgba(64, 17, 8, 0.08)), url("/rentree-assets/gift-closed.webp");
  transform: scale(1.01);
}

.kitchen-background::after,
.result-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(244, 221, 203, 0.18), rgba(244, 221, 203, 0.02) 50%, rgba(41, 12, 4, 0.16));
}

.kitchen-background-open,
.result-background.is-win { background-image: url("/rentree-assets/gift-open.webp"); }

.hero-screen { align-items: stretch; justify-content: center; }

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  min-height: 100dvh;
  margin-inline: auto;
  padding: max(34px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-prize {
  margin-top: clamp(32px, 8vh, 90px);
  padding: 10px 22px 14px;
  color: var(--navy);
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.65);
}

.eyebrow {
  margin: 0 0 10px;
  color: white;
  font: 700 clamp(0.78rem, 2vw, 0.95rem)/1.2 Cocogoose, Arial, sans-serif;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow.dark { color: var(--navy); }

.hero-prize h1 {
  margin: 0;
  font: 700 clamp(2rem, 8.2vw, 4.4rem)/0.92 Kalam, "Comic Sans MS", cursive;
}

.hero-prize h1 span {
  display: block;
  margin-bottom: 12px;
  color: white;
  font: 700 clamp(1.65rem, 6vw, 3.7rem)/1 Cocogoose, Arial, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgba(21, 52, 81, 0.15);
}

.hero-content > .primary-button {
  min-width: 240px;
  border: 0;
  border-radius: 18px;
  color: var(--navy);
  background: #fff;
  box-shadow: 0 6px 8px rgba(48, 44, 42, 0.48);
}

.hero-content > .primary-button:hover {
  box-shadow: 0 8px 10px rgba(48, 44, 42, 0.5);
}

.hero-content > .primary-button:active {
  box-shadow: 0 2px 4px rgba(48, 44, 42, 0.45);
}

.primary-button,
.secondary-button {
  min-height: 52px;
  padding: 14px 28px;
  border-radius: 15px;
  font-family: Cocogoose, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  border: 0;
  color: white;
  background: linear-gradient(180deg, #fa2931, var(--red));
  box-shadow: 0 7px 0 var(--red-dark), 0 14px 26px rgba(190, 15, 24, 0.26);
}

.primary-button:hover { transform: translateY(-2px); box-shadow: 0 9px 0 var(--red-dark), 0 17px 30px rgba(190, 15, 24, 0.3); }
.primary-button:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--red-dark); }
.primary-button:disabled { cursor: wait; opacity: 0.66; transform: none; }

.secondary-button {
  border: 2px solid rgba(237, 28, 36, 0.5);
  color: var(--red);
  background: rgba(255, 255, 255, 0.9);
}

.campaign-dates {
  margin: auto 0 0;
  padding: 10px 15px;
  border-radius: 999px;
  color: white;
  background: rgba(21, 52, 81, 0.83);
  font-size: 0.82rem;
  font-weight: 700;
}

.content-screen { align-items: center; justify-content: center; padding: 24px; }

.content-card,
.status-card {
  position: relative;
  z-index: 2;
  width: min(100%, 530px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 30px clamp(22px, 5vw, 42px) 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.92);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(10px);
}

.content-card .eyebrow { color: var(--red); }

.content-card h1,
.status-card h1,
.form-wrap > h1 {
  margin: 0;
  color: var(--navy);
  font: 700 clamp(1.55rem, 5vw, 2.65rem)/1.08 Cocogoose, Arial, sans-serif;
  text-transform: uppercase;
}

.content-card h1 span { color: var(--red); font-size: 0.62em; }

.intro-screen {
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  background: #fff;
}

.intro-page {
  width: min(100%, 390px);
  min-height: 100%;
  overflow: hidden;
  background: #fff;
}

.intro-stage {
  position: relative;
  height: min(204.17vw, 796px);
  overflow: hidden;
  background: #e8c9b4 url("/rentree-assets/kitchen-clean.webp") center center / cover no-repeat;
}

.intro-stage h1 {
  position: relative;
  z-index: 5;
  margin: 0;
  padding-top: min(16.1vw, 63px);
  color: #fff;
  font: 700 1.45rem/0.92 Cocogoose, Arial, sans-serif;
  letter-spacing: 0.02em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(68, 32, 20, 0.2);
}

.intro-stage h1 small {
  display: block;
  margin-top: 4px;
  color: var(--red);
  font-size: 0.61em;
  line-height: 1;
}

.intro-prize-tag {
  position: absolute;
  z-index: 1;
  top: min(56.1vw, 219px);
  left: 50%;
  width: min(79.5%, 310px);
  height: min(119.4vw, 466px);
  padding-top: min(40.3vw, 157px);
  color: var(--navy);
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 79%, 50% 100%, 0 79%);
  text-align: center;
  transform: translateX(-50%);
}

.intro-prize-tag p {
  margin: 0 0 8px;
  color: var(--red);
  font: 700 1.75rem/1 Cocogoose, Arial, sans-serif;
  text-transform: uppercase;
}

.intro-prize-tag strong {
  display: block;
  font: 700 2rem/0.92 Kalam, "Comic Sans MS", cursive;
  transform: rotate(-2deg);
}

.intro-gift-art {
  position: absolute;
  z-index: 3;
  top: min(13.3vw, 52px);
  left: 50%;
  width: min(236.1vw, 921px);
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
}

.intro-actions {
  padding: 40px 37px 46px;
  background: #fff;
}

.intro-rules-button {
  width: 100%;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid var(--red);
  border-radius: 11px;
  color: var(--red);
  background: #fff;
  font-size: 0.92rem;
}

.intro-rules-button span { margin-left: 3px; font-size: 1.15em; }

.intro-consent {
  display: grid;
  grid-template-columns: 17px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 29px;
  color: #1c2e39;
  font-size: 0.79rem;
  line-height: 1.25;
}

.intro-consent input {
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  border: 1px solid var(--red);
  border-radius: 2px;
  background: #fff;
}

.intro-consent input:checked {
  background: var(--red);
  box-shadow: inset 0 0 0 3px #fff;
}

.intro-consent input:focus-visible { outline: 3px solid rgba(21, 52, 81, 0.25); outline-offset: 2px; }

.intro-consent-error {
  min-height: 18px;
  margin: 10px 0 0 27px;
  color: #94131a;
  font-size: 0.78rem;
}

.intro-actions > .primary-button {
  display: block;
  width: min(230px, 100%);
  min-height: 55px;
  margin: 10px auto 0;
  border-radius: 18px;
}

.back-button {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 4;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--navy);
  font-size: 1.35rem;
  box-shadow: 0 7px 18px rgba(21, 52, 81, 0.22);
}

.form-screen { overflow-y: auto; background: linear-gradient(180deg, #fff 0%, #fff 62%, #f5ded0 100%); }

.form-wrap {
  position: relative;
  width: min(100%, 760px);
  margin: auto;
  padding: max(34px, env(safe-area-inset-top)) clamp(18px, 5vw, 54px) max(54px, env(safe-area-inset-bottom));
  text-align: center;
}

.back-on-light { top: 24px; left: 18px; }
.required-note { margin: 8px 0 18px; color: var(--muted); font-size: 0.78rem; }

#participant-form {
  padding: clamp(18px, 4vw, 34px);
  border-radius: 28px;
  color: white;
  background: var(--red);
  box-shadow: var(--shadow);
  text-align: left;
}

.gender-fieldset { margin: 0 0 16px; padding: 0; border: 0; }
.gender-fieldset legend { margin-bottom: 10px; font-weight: 700; }
.gender-fieldset label { display: inline-flex; align-items: center; gap: 5px; margin: 0 14px 7px 0; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field-full { grid-column: 1 / -1; }

.field { display: block; }
.field > span { display: block; margin: 0 0 6px 4px; font-size: 0.82rem; font-weight: 700; }

.field input,
.challenge-card select {
  width: 100%;
  height: 48px;
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  background: white;
  padding: 0 13px;
  outline: 0;
}

.field input:focus,
.challenge-card select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(21, 52, 81, 0.18); }
.field.has-error input { border-color: #641014; }

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 17px;
  font-size: 0.8rem;
  line-height: 1.42;
}

.check-field input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--navy); }
.inline-link { border: 0; padding: 0; color: white; background: transparent; text-decoration: underline; }

.field-error { display: block; min-height: 1em; margin: 4px 0 0 4px; color: #fff1a9; font-size: 0.74rem; font-weight: 700; }
.check-error { margin-left: 28px; }

.challenge-card {
  margin: 24px 0 18px;
  padding: 17px;
  border-radius: 18px;
  color: var(--navy);
  background: #fff8f2;
  text-align: center;
}

.challenge-card p { margin: 0 0 8px; font-size: 0.82rem; }
#challenge-code { display: block; margin: 8px 0 12px; font: 700 1.45rem/1 Cocogoose, monospace; letter-spacing: 0.16em; }
.website-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.global-error { min-height: 1.2em; margin: 8px 0; color: #fff1a9; font-weight: 700; text-align: center; }
#participant-form .primary-button { display: block; width: min(100%, 330px); margin: 16px auto 0; }

.play-screen { align-items: stretch; justify-content: stretch; background: #d8b596; }

.gift-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.play-overlay {
  position: relative;
  z-index: 2;
  width: min(100%, 680px);
  min-height: 100dvh;
  margin: auto;
  padding: max(30px, env(safe-area-inset-top)) 20px max(30px, env(safe-area-inset-bottom));
  text-align: center;
  pointer-events: none;
}

.play-overlay h1 {
  margin: clamp(35px, 9vh, 90px) 0 0;
  color: white;
  font: 700 clamp(1.75rem, 6vw, 3.35rem)/1.08 Cocogoose, Arial, sans-serif;
  text-shadow: 0 4px 14px rgba(54, 18, 6, 0.5);
  text-transform: uppercase;
}

.gift-hotspot {
  position: absolute;
  left: 50%;
  bottom: 17%;
  width: min(300px, 68vw);
  aspect-ratio: 1.15;
  transform: translateX(-50%);
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(237, 28, 36, 0.01);
  pointer-events: auto;
}

.gift-hotspot::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  animation: pulse 1.45s ease-out infinite;
}

.gift-hotspot span {
  position: absolute;
  left: 50%;
  bottom: -4px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(21, 52, 81, 0.88);
  font-weight: 700;
}

.gift-hotspot.is-opening { pointer-events: none; opacity: 0; }

@keyframes pulse {
  from { opacity: 0.85; transform: scale(0.72); }
  to { opacity: 0; transform: scale(1.35); }
}

.animation-status { position: absolute; left: 20px; right: 20px; bottom: 30px; color: white; font-weight: 700; text-shadow: 0 2px 8px #000; }

.result-screen { align-items: center; justify-content: center; padding: 24px; }

.result-card {
  position: relative;
  z-index: 2;
  width: min(100%, 500px);
  padding: 30px clamp(22px, 6vw, 42px) 34px;
  border-radius: 30px;
  background: rgba(255, 253, 249, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(10px);
}

.result-card .eyebrow { color: var(--navy); }
.result-card h1 { margin: 0 0 16px; color: var(--navy); font: 700 clamp(2.5rem, 11vw, 5rem)/0.95 Cocogoose, Arial, sans-serif; text-transform: uppercase; }
.result-card.is-win h1 { color: var(--red); }
.result-card p { line-height: 1.55; }
.result-card strong { color: var(--navy); }
.result-link { display: inline-flex; align-items: center; justify-content: center; margin-top: 16px; }

.status-card { padding: 36px; }
.status-card .eyebrow { color: var(--red); }
.status-card p:last-child { line-height: 1.6; }

.rules-dialog {
  width: min(92vw, 760px);
  max-height: 90dvh;
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.rules-dialog::backdrop { background: rgba(21, 52, 81, 0.72); backdrop-filter: blur(4px); }
.rules-header { position: sticky; top: 0; z-index: 2; padding: 24px 60px 18px 28px; background: var(--cream); }
.rules-header h1 { margin: 0; font: 700 clamp(1.5rem, 5vw, 2.3rem)/1.05 Cocogoose, Arial, sans-serif; text-transform: uppercase; }
.provisional-label { display: inline-block; margin: 10px 0 0; padding: 5px 9px; border-radius: 7px; color: #6d3a06; background: #ffe3a8; font-size: 0.76rem; font-weight: 700; }
.dialog-close { position: absolute; top: 17px; right: 18px; width: 40px; height: 40px; border: 0; border-radius: 50%; color: white; background: var(--navy); font-size: 1.6rem; }
.rules-content { padding: 24px 28px; line-height: 1.6; }
.rules-content h2 { margin: 1.5em 0 0.3em; color: var(--red); font-size: 1rem; text-transform: uppercase; }
.rules-content h2:first-child { margin-top: 0; }
.rules-content a { color: var(--red-dark); }
.dialog-bottom-close { display: block; width: calc(100% - 56px); margin: 0 28px 32px; }

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

.preview-badge {
  position: fixed;
  z-index: 1000;
  right: 12px;
  bottom: 12px;
  padding: 8px 11px;
  border-radius: 9px;
  color: white;
  background: rgba(21, 52, 81, 0.92);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
  font-size: 0.72rem;
  font-weight: 700;
  pointer-events: none;
}

@media (max-width: 600px) {
  .field-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .content-screen { padding: 14px; }
  .content-card { max-height: calc(100dvh - 28px); }
  .kitchen-background { background-position: center; }
  .hero-content { justify-content: flex-start; }
  .hero-content > .primary-button { margin-top: 6px; }
  .hero-prize { margin-top: 28px; }
}

@media (min-width: 900px) {
  .hero-content { padding-top: 38px; }
  .hero-content > .primary-button { min-width: 250px; }
  .kitchen-background,
  .result-background { background-attachment: fixed; }
  .gift-video { object-fit: cover; }
  .gift-hotspot { bottom: 8%; }

  .intro-screen {
    align-items: center;
    min-height: 100dvh;
    padding: 40px;
    background:
      linear-gradient(90deg, rgba(77, 29, 11, 0.08), rgba(255, 246, 239, 0.2)),
      url("/rentree-assets/kitchen-clean.webp") center / cover no-repeat;
  }

  .intro-page {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(390px, 0.9fr);
    align-items: center;
    width: min(1180px, calc(100vw - 80px));
    min-height: min(780px, calc(100dvh - 80px));
    overflow: visible;
    background: transparent;
  }

  .intro-stage {
    width: 100%;
    height: min(780px, calc(100dvh - 80px));
    min-height: 680px;
    border-radius: 32px;
    box-shadow: 0 28px 70px rgba(63, 24, 9, 0.28);
  }

  .intro-stage h1 {
    padding-top: 42px;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
  }

  .intro-prize-tag {
    top: 166px;
    width: 330px;
    height: 405px;
    padding-top: 132px;
  }

  .intro-prize-tag p { font-size: 1.8rem; }
  .intro-prize-tag strong { font-size: 2rem; }

  .intro-gift-art {
    top: 24px;
    width: 800px;
  }

  .intro-actions {
    position: relative;
    z-index: 8;
    margin-left: -34px;
    padding: 44px 40px 42px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(63, 24, 9, 0.24);
    backdrop-filter: blur(12px);
  }

  .intro-rules-button { font-size: 0.9rem; }
  .intro-consent { font-size: 0.79rem; line-height: 1.35; }
  .intro-actions > .primary-button { margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
