:root {
  --espresso-deep: #241304;
  --espresso: #593509;
  --bronze: #855720;
  --gold-brand: #B87C1C;
  --gold-bright: #D78400;
  --amber: #FFA912;
  --gold-light: #FFD76A;
  --gold-pale: #FFF3C4;
  --copper: #A7553F;
  --champagne: #DCCAC6;
  --cream: #FFF8EE;
  --muted: rgba(255, 244, 228, 0.8);
  --border: rgba(255, 215, 106, 0.3);
  --font: 'Cairo', Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html {
  overflow-x: clip;
  background: var(--espresso-deep);
}
body {
  margin: 0;
  color: var(--cream);
  font-family: var(--font);
  background: var(--espresso-deep);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  position: relative;
}
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--gold-light); }
[hidden] { display: none !important; }

/* Atmospheric Ultra Dent Espresso & Gold Chamber */
.chamber-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 92% 62% at 50% 34%, rgba(184, 124, 28, 0.68) 0%, rgba(133, 87, 32, 0.5) 38%, rgba(89, 53, 9, 0.88) 72%, #241304 100%),
    linear-gradient(155deg, #855720 0%, #593509 48%, #241304 100%);
}
.ambient {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(85px);
  z-index: 0;
}
.ambient-a {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(255, 169, 18, 0.34), transparent 70%);
  top: -170px;
  right: -110px;
}
.ambient-b {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(167, 85, 63, 0.32), transparent 70%);
  bottom: -220px;
  left: -130px;
}
.spotlight {
  position: fixed;
  top: -12%;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, 145vw);
  height: 82vh;
  pointer-events: none;
  z-index: 0;
  background: conic-gradient(from 180deg at 50% 0%, transparent 138deg, rgba(255, 224, 130, 0.13) 170deg, rgba(255, 240, 185, 0.22) 180deg, rgba(255, 224, 130, 0.13) 190deg, transparent 222deg);
}
.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 25;
}

/* Single-Viewport Mobile-First Game Shell (No Scrolling Required!) */
.app-screen {
  position: relative;
  z-index: 2;
  width: min(680px, calc(100% - 28px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 0px) 0 max(12px, env(safe-area-inset-bottom, 0px));
}
.app-screen.screen-shake {
  animation: screenShake 0.42s cubic-bezier(.36,.07,.19,.97) both;
}

/* Compact Header */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 10px;
  border-bottom: 1px solid rgba(255, 215, 106, 0.16);
  gap: 10px;
  flex-shrink: 0;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 249, 238, 0.96), rgba(246, 234, 214, 0.92));
  padding: 5px 11px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 215, 106, 0.65);
  box-shadow: 0 5px 18px rgba(24, 10, 0, 0.4);
}
.brand-logo { display: block; width: 128px; height: auto; }

.sound-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(36, 19, 4, 0.68);
  border: 1px solid rgba(255, 215, 106, 0.38);
  color: var(--gold-light);
  border-radius: 999px;
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.sound-pill:hover { background: rgba(184, 124, 28, 0.32); border-color: var(--amber); }
.sound-pill svg { width: 18px; height: 18px; flex-shrink: 0; }
.sound-pill[aria-pressed="false"] .sound-wave { opacity: 0.2; }
.sound-pill[aria-pressed="true"] {
  background: linear-gradient(90deg, rgba(167, 85, 63, 0.85), rgba(215, 132, 0, 0.9));
  color: #fff;
  border-color: var(--gold-pale);
  box-shadow: 0 0 16px rgba(255, 169, 18, 0.45);
}

/* Main Above-The-Fold Game Viewport */
.game-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  padding: 6px 0 4px;
  gap: 6px;
}

.hero-heading { flex-shrink: 0; }
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-pale);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(36, 19, 4, 0.5);
  border: 1px solid rgba(255, 215, 106, 0.28);
}
.eyebrow-dot {
  width: 5px;
  height: 5px;
  background: var(--amber);
  transform: rotate(45deg);
  box-shadow: 0 0 8px var(--amber);
}
.hero-heading h1 {
  font-size: clamp(28px, 6.8vw, 48px);
  line-height: 1.2;
  margin: 8px 0 4px;
  font-weight: 900;
  color: var(--champagne);
  text-shadow: 0 4px 18px rgba(20, 9, 0, 0.65);
}
.hero-heading h1 em {
  font-style: normal;
  background: linear-gradient(180deg, #fff8d6 0%, #ffd25a 45%, #d78400 100%);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(215, 132, 0, 0.4));
}
.hero-heading p {
  font-size: clamp(13px, 3.4vw, 15px);
  line-height: 1.6;
  color: rgba(255, 246, 232, 0.92);
  margin: 0 auto;
  max-width: 420px;
}

/* 3D Game Treasure Stage */
.stage {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: clamp(250px, 41dvh, 370px);
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  flex-shrink: 0;
}
.sunburst {
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(500px, 118vw);
  height: min(500px, 118vw);
  transform: translate(-50%, -50%) scale(0.25);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 226, 130, 0.36) 0deg 9deg,
    transparent 9deg 22.5deg
  );
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.95) 8%, rgba(0,0,0,0.4) 45%, transparent 68%);
  mask-image: radial-gradient(circle, rgba(0,0,0,0.95) 8%, rgba(0,0,0,0.4) 45%, transparent 68%);
  transition: opacity 0.65s ease, transform 0.85s cubic-bezier(.16, 1, .3, 1);
}
.stage.charging .sunburst {
  opacity: 0.55;
  transform: translate(-50%, -50%) scale(0.78);
  animation: spinSlow 14s linear infinite;
}
.stage.opened .sunburst {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
  animation: spinSlow 24s linear infinite;
}

.burst-flash {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #fff4b8 38%, rgba(255, 169, 18, 0.65) 68%, transparent 100%);
  transform: translate(-50%, -50%) scale(0.1);
  opacity: 0;
  pointer-events: none;
  z-index: 12;
}
.burst-flash.flash {
  animation: flashBurst 0.55s cubic-bezier(.16, 1, .3, 1) forwards;
}

.shockwave {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid var(--gold-pale);
  box-shadow: 0 0 32px var(--amber), inset 0 0 24px var(--amber);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  pointer-events: none;
  z-index: 8;
}
.shockwave.boom {
  animation: shockwaveExpand 0.72s cubic-bezier(.12, .85, .28, 1) forwards;
}

.halo {
  position: absolute;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.halo-one {
  width: min(275px, 68vw);
  height: min(275px, 68vw);
  border: 1.5px solid rgba(255, 215, 106, 0.25);
  box-shadow: 0 0 85px rgba(255, 169, 18, 0.28);
}
.halo-two {
  width: min(350px, 86vw);
  height: min(350px, 86vw);
  border: 1px dashed rgba(255, 215, 106, 0.2);
  animation: spinSlow 55s linear infinite;
}
.pedestal {
  position: absolute;
  width: min(300px, 76vw);
  height: 46px;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 189, 72, 0.4) 0%, rgba(133, 87, 32, 0.24) 55%, transparent 78%);
  border: 1px solid rgba(255, 215, 106, 0.24);
}
.stage-floor {
  position: absolute;
  width: min(340px, 84vw);
  height: 70px;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255, 169, 18, 0.5), transparent 68%);
  filter: blur(18px);
}

/* 3D Game Chest Image Assembly */
.chest-holder {
  position: relative;
  width: clamp(235px, 37dvh, 330px);
  max-width: 78vw;
  aspect-ratio: 1 / 1;
  transform-origin: 50% 82%;
  filter: drop-shadow(0 22px 24px rgba(14, 6, 0, 0.78));
  animation: chestIdle 4.2s ease-in-out infinite;
  z-index: 5;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.chest-holder:focus-visible {
  filter: drop-shadow(0 0 20px var(--amber)) drop-shadow(0 22px 24px rgba(14, 6, 0, 0.78));
}
.stage.ready-to-play .chest-holder {
  animation: chestReady 2s ease-in-out infinite;
}
.chest-holder.tap-hit {
  animation: chestImpact 0.36s cubic-bezier(.22, 1.5, .45, 1) both !important;
}
.chest-holder.charge-1 {
  filter: drop-shadow(0 0 24px rgba(255, 169, 18, 0.52)) drop-shadow(0 22px 24px rgba(14, 6, 0, 0.78));
}
.chest-holder.charge-2 {
  filter: drop-shadow(0 0 40px rgba(255, 200, 65, 0.85)) drop-shadow(0 22px 24px rgba(14, 6, 0, 0.78));
}
.chest-holder.charging {
  animation: chestChargeRumble 0.13s linear infinite !important;
  filter: drop-shadow(0 0 56px rgba(255, 214, 80, 1)) drop-shadow(0 22px 24px rgba(14, 6, 0, 0.78));
}
.chest-holder.open {
  animation: chestPopBounce 0.65s cubic-bezier(.18, 1.4, .4, 1) forwards !important;
  filter: drop-shadow(0 0 40px rgba(255, 198, 72, 0.72)) drop-shadow(0 20px 22px rgba(14, 6, 0, 0.72));
}

.chest-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 4;
}
.chest-img.chest-closed {
  opacity: 1;
  transition: opacity 0.16s ease;
}
.chest-img.chest-open {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.18s ease, transform 0.5s cubic-bezier(.18, 1.35, .36, 1);
}
.chest-holder.open .chest-img.chest-closed {
  opacity: 0;
}
.chest-holder.open .chest-img.chest-open {
  opacity: 1;
  transform: scale(1.02);
}

.chest-aura {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 175, 0.85) 0%, rgba(255, 169, 18, 0.45) 45%, transparent 74%);
  filter: blur(14px);
  z-index: 2;
  opacity: 0.25;
  transform: scale(0.8);
  transition: opacity 0.35s ease, transform 0.45s ease;
  pointer-events: none;
}
.chest-holder.charge-1 .chest-aura { opacity: 0.55; transform: scale(1); }
.chest-holder.charge-2 .chest-aura { opacity: 0.85; transform: scale(1.15); }
.chest-holder.charging .chest-aura { opacity: 1; transform: scale(1.32); }
.chest-holder.open .chest-aura { opacity: 0.95; transform: scale(1.38); }

.chest-beam {
  position: absolute;
  left: 50%;
  bottom: 44%;
  width: 220px;
  height: 250px;
  transform: translateX(-50%) scaleY(0);
  transform-origin: bottom center;
  background: linear-gradient(to top, rgba(255, 245, 195, 0.9) 0%, rgba(255, 185, 50, 0.42) 48%, transparent 100%);
  clip-path: polygon(25% 100%, 75% 100%, 100% 0%, 0% 0%);
  filter: blur(7px);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  transition: transform 0.65s cubic-bezier(.16, 1, .3, 1), opacity 0.5s ease;
}
.chest-holder.open .chest-beam {
  opacity: 1;
  transform: translateX(-50%) scaleY(1);
}

/* Interactive Golden Key & Tap Ring */
.golden-key {
  position: absolute;
  left: 56%;
  top: 2%;
  width: 44px;
  height: 64px;
  transform: translateX(-50%) scale(0.5);
  opacity: 0;
  z-index: 8;
  pointer-events: none;
  filter: drop-shadow(0 0 14px rgba(255, 190, 50, 0.9));
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(.2, 1.4, .4, 1), top 0.4s cubic-bezier(.2, 1.4, .4, 1);
}
.stage.ready-to-play .golden-key {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: keyHover 1.6s ease-in-out infinite;
}
.stage.ready-to-play .chest-holder.charge-1 .golden-key {
  top: 20%;
  animation: none;
  transform: translateX(-50%) rotate(42deg) scale(1.06);
}
.stage.ready-to-play .chest-holder.charge-2 .golden-key {
  top: 34%;
  animation: none;
  transform: translateX(-50%) rotate(92deg) scale(1.12);
}
.chest-holder.charging .golden-key,
.chest-holder.open .golden-key {
  top: 44%;
  opacity: 0;
  animation: none;
  transform: translateX(-50%) rotate(180deg) scale(0.2);
}

.tap-ring {
  position: absolute;
  left: 56%;
  top: 52%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-light);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  z-index: 6;
  pointer-events: none;
}
.stage.ready-to-play:not(.opened):not(.charging) .tap-ring {
  animation: tapPulseRing 1.55s ease-out infinite;
}

.chest-spark {
  position: absolute;
  font-size: 24px;
  color: var(--gold-pale);
  text-shadow: 0 0 14px var(--amber);
  z-index: 7;
  animation: twinkle 2s infinite;
  pointer-events: none;
}
.spark-one { left: 6%; top: 24%; }
.spark-two { right: 8%; top: 14%; animation-delay: 0.7s; }
.spark-three { left: 48%; top: 2%; animation-delay: 1.3s; }

/* Floating Prize Pill Launching Out of Chest */
.floating-prize {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, 25px) scale(0.2);
  opacity: 0;
  z-index: 11;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(120deg, #fff5c8 0%, #ffd25a 45%, #d78400 100%);
  color: #2c1503;
  font-weight: 900;
  font-size: 16px;
  box-shadow: 0 0 40px rgba(255, 200, 70, 0.95), 0 12px 26px rgba(0, 0, 0, 0.5);
  border: 2px solid #ffffff;
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.floating-prize.launch {
  animation: prizeRise 1.2s cubic-bezier(.16, 1, .3, 1) forwards;
}

/* 3-Tap Unlock Meter */
.tap-meter {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 9;
  width: 100%;
}
.tap-dots {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
}
.tap-dot {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 245, 225, 0.22);
  border: 1px solid rgba(255, 215, 106, 0.42);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.tap-dot.filled {
  background: linear-gradient(90deg, #ffa912, #fff1b8);
  border-color: #fff;
  box-shadow: 0 0 14px rgba(255, 185, 40, 0.95);
  transform: scale(1.1);
}
.tap-prompt {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-pale);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

/* Bottom Action Dock (Always Above the Fold on Mobile!) */
.dock {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-top: 4px;
}
.dock-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dock-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--champagne);
  opacity: 0.9;
}
.dock-status {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(36, 19, 4, 0.65);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dock-status strong { color: var(--gold-pale); font-size: 16px; }
.dock-status span { color: var(--muted); font-size: 13px; }
.dock-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}
.text-link {
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--champagne);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--gold-light); }
.dot-sep { color: rgba(255, 215, 106, 0.45); font-size: 12px; }

/* Glossy 3D Game Buttons */
.primary-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(90deg, #a7553f 0%, #d78400 58%, #ffa912 100%);
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  text-shadow: 0 1px 4px rgba(45, 20, 0, 0.45);
  box-shadow: 0 5px 0 #593509, 0 14px 30px rgba(215, 132, 0, 0.4), inset 0 1px 0 rgba(255, 245, 205, 0.55);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}
.primary-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.28) 46%, transparent 65%);
  transform: translateX(130%);
  animation: btnGloss 3.8s ease-in-out infinite;
}
.primary-btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.primary-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #593509, 0 6px 14px rgba(215, 132, 0, 0.3); }
.primary-btn:disabled { opacity: 0.6; cursor: wait; }
.game-cta {
  background: linear-gradient(90deg, #d78400 0%, #ffa912 48%, #ffd25a 100%);
  color: #361b03;
  text-shadow: none;
  font-size: 17px;
}
.arrow { font-size: 18px; }
.pulse { animation: ctaPulse 1.6s ease-in-out infinite; }
.honeypot {
  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;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Slide-Up Mobile Bottom Sheet / Desktop Modal */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 7, 1, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  animation: fadeIn 0.22s ease;
}
.sheet-card {
  position: relative;
  width: min(490px, 100%);
  max-height: 92dvh;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 24px;
  padding: 22px 20px 24px;
  border: 1.5px solid rgba(255, 215, 106, 0.42);
  background: linear-gradient(160deg, #5e380b 0%, #361d05 62%, #241203 100%);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 232, 170, 0.25);
  animation: sheetSlideUp 0.32s cubic-bezier(.16, 1, .3, 1);
}
.sheet-handle {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 224, 150, 0.35);
  margin: 0 auto 12px;
}
.sheet-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 106, 0.35);
  background: rgba(24, 11, 2, 0.55);
  color: var(--gold-pale);
  font-size: 15px;
  display: grid;
  place-items: center;
}
.sheet-close:hover { background: rgba(184, 124, 28, 0.4); }
.sheet-head { text-align: center; margin-bottom: 16px; }
.step-pill {
  display: inline-block;
  color: var(--gold-pale);
  font-size: 12px;
  font-weight: 800;
  background: rgba(184, 124, 28, 0.35);
  border: 1px solid rgba(255, 215, 106, 0.5);
  padding: 3px 14px;
  border-radius: 999px;
}
.sheet-head h2 {
  font-size: 21px;
  font-weight: 900;
  color: var(--gold-pale);
  margin: 10px 0 4px;
}
.sheet-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}

/* Crisp Form Inputs */
label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: var(--cream);
  margin: 0 0 12px;
  text-align: right;
}
label > span:not(.agree span) { color: var(--amber); }
input:not([type="checkbox"]) {
  width: 100%;
  border: 1.5px solid rgba(220, 202, 198, 0.75);
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  color: #1f1205;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  margin-top: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:not([type="checkbox"]):focus {
  border-color: var(--gold-brand);
  box-shadow: 0 0 0 4px rgba(255, 169, 18, 0.28);
}
input::placeholder { color: #8c7b6b; font-weight: 400; }
input[dir="ltr"] { text-align: right; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.agree {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  line-height: 1.7;
  font-weight: 600;
  color: rgba(255, 245, 232, 0.92);
  margin: 4px 0 14px;
}
.agree input { accent-color: var(--amber); width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }

.notice {
  background: rgba(155, 34, 28, 0.9);
  color: #fff3f2;
  border: 1px solid rgba(255, 185, 165, 0.65);
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

/* Floating Luxury VIP Gift Card Stage (Airy, No Outer Box Clutter) */
#resultModal {
  align-items: center;
  overflow-y: auto;
  padding: 18px;
}
.win-stage {
  width: min(430px, 100%);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.win-stage-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.win-stage-title {
  margin: 0;
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 900;
  color: var(--gold-pale);
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.7);
}
.stage-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 106, 0.45);
  background: rgba(36, 19, 4, 0.72);
  color: var(--gold-pale);
  font-size: 15px;
  display: grid;
  place-items: center;
}
.stage-close:hover { background: rgba(184, 124, 28, 0.45); }

.win-stage.reveal-pop .reward-card {
  animation: cardFlipIn 0.8s cubic-bezier(.18, 1.25, .36, 1) both;
}

.reward-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 206, 94, 0.28) 0%, transparent 46%),
    radial-gradient(circle at 12% 94%, rgba(167, 85, 63, 0.28) 0%, transparent 48%),
    linear-gradient(145deg, #2d1704 0%, #68400d 48%, #241203 100%);
  border-radius: 24px;
  padding: 24px 22px 20px;
  border: 1.5px solid rgba(255, 215, 106, 0.78);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.72), 0 0 42px rgba(255, 169, 18, 0.24), inset 0 1px 0 rgba(255, 244, 204, 0.32);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.reward-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 28%, rgba(255, 245, 200, 0.16) 46%, transparent 62%);
  transform: translateX(130%);
  animation: btnGloss 4.8s ease-in-out infinite;
}
.reward-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}
.reward-logo-pill {
  background: rgba(255, 249, 238, 0.97);
  padding: 5px 11px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}
.reward-logo-pill img { display: block; width: 98px; height: auto; }
.reward-top small {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.3px;
}

.reward-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.reward-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--champagne);
  opacity: 0.9;
}
.reward-name {
  font-size: clamp(23px, 6vw, 29px);
  font-weight: 900;
  line-height: 1.35;
  color: var(--gold-pale);
  text-shadow: 0 3px 16px rgba(215, 132, 0, 0.45);
}

.reward-code-box {
  width: 100%;
  background: rgba(20, 9, 1, 0.56);
  border: 1px solid rgba(255, 215, 106, 0.38);
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}
.reward-code-box:hover {
  border-color: var(--amber);
  background: rgba(34, 15, 2, 0.7);
}
.reward-code-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--champagne);
  opacity: 0.85;
}
.reward-code {
  font: 800 clamp(18px, 5.2vw, 25px) 'Outfit', monospace;
  letter-spacing: 2.2px;
  color: #ffffff;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reward-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 215, 106, 0.22);
  font-size: 12.5px;
}
.reward-person { color: var(--cream); font-weight: 800; }
.reward-valid { color: var(--gold-light); font-weight: 700; }

.reward-actions {
  width: 100%;
  display: flex;
  gap: 10px;
}
.save-btn { flex: 1.15; min-height: 52px; font-size: 14.5px; }
.whatsapp-btn {
  flex: 1;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 15px;
  text-decoration: none;
  background: linear-gradient(90deg, #1ca64f 0%, #25d366 100%);
  color: #ffffff;
  font-weight: 900;
  font-size: 14.5px;
  text-shadow: 0 1px 3px rgba(0, 60, 20, 0.35);
  box-shadow: 0 5px 0 #136d34, 0 12px 24px rgba(37, 211, 102, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}
.whatsapp-btn svg { width: 19px; height: 19px; flex-shrink: 0; }
.whatsapp-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.whatsapp-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #136d34, 0 5px 12px rgba(37, 211, 102, 0.28); }
.outline-btn {
  border: 1.5px solid rgba(255, 215, 106, 0.58);
  background: rgba(36, 19, 4, 0.72);
  color: var(--gold-pale);
  border-radius: 15px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 13px;
  transition: background 0.2s, border-color 0.2s, transform 0.16s;
}
.outline-btn:hover { background: rgba(184, 124, 28, 0.42); border-color: var(--amber); transform: translateY(-1px); }

.win-note {
  margin: 0;
  color: rgba(255, 244, 228, 0.82);
  font-size: 12.5px;
  line-height: 1.7;
}

/* Sold-Out Friendly Card */
.soldout-area { text-align: center; }
.soldout-icon { font-size: 46px; margin-bottom: 6px; }
.soldout-area h2 { font-size: 23px; font-weight: 900; color: var(--gold-pale); margin: 4px 0 12px; }
.soldout-greeting { font-size: 17px; font-weight: 800; color: var(--champagne); margin: 0 0 10px; }
.soldout-body { font-size: 14px; line-height: 1.9; color: var(--muted); margin: 0 auto 18px; max-width: 350px; }
.soldout-close-btn { width: 100%; }

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-25px);
  background: linear-gradient(90deg, #fff2c4, #ffd25a);
  color: #2c1503;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  z-index: 99;
  transition: opacity 0.26s, transform 0.26s;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.legal-page { max-width: 800px; padding: 40px 22px; margin: auto; line-height: 2.1; }
.legal-page h1 { color: var(--gold-light); font-size: 26px; }
.legal-page li { margin: 10px 0; color: var(--cream); }
.legal-page .warning { padding: 14px; border: 1px solid rgba(255, 215, 106, 0.55); border-radius: 12px; background: rgba(89, 53, 9, 0.5); color: var(--gold-pale); }
.backlink { font-size: 13px; font-weight: 700; }

/* Keyframe Animations */
@keyframes chestIdle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-9px) scale(1.015); }
}
@keyframes chestReady {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-11px) scale(1.035); }
}
@keyframes chestImpact {
  0% { transform: scale(1, 1); }
  22% { transform: translateY(10px) scale(1.12, 0.86) rotate(-3deg); }
  55% { transform: translateY(-18px) scale(0.94, 1.09) rotate(2.5deg); }
  80% { transform: translateY(3px) scale(1.03, 0.97) rotate(-1deg); }
  100% { transform: translateY(0) scale(1, 1) rotate(0); }
}
@keyframes chestChargeRumble {
  0% { transform: translate(-4px, 5px) scale(1.08, 0.9) rotate(-3.2deg); }
  25% { transform: translate(4px, 6px) scale(1.09, 0.89) rotate(3.2deg); }
  50% { transform: translate(-3px, 4px) scale(1.1, 0.88) rotate(-2.5deg); }
  75% { transform: translate(3px, 6px) scale(1.08, 0.9) rotate(2.8deg); }
  100% { transform: translate(-4px, 5px) scale(1.08, 0.9) rotate(-3.2deg); }
}
@keyframes chestPopBounce {
  0% { transform: translateY(10px) scale(1.14, 0.84); }
  35% { transform: translateY(-20px) scale(0.94, 1.1); }
  68% { transform: translateY(4px) scale(1.03, 0.97); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes keyHover {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-6deg); }
  50% { transform: translateX(-50%) translateY(-10px) rotate(6deg); }
}
@keyframes tapPulseRing {
  0% { transform: translate(-50%, -50%) scale(0.55); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(1.85); opacity: 0; }
}
@keyframes flashBurst {
  0% { transform: translate(-50%, -50%) scale(0.15); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.9); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}
@keyframes shockwaveExpand {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(4.2); opacity: 0; }
}
@keyframes prizeRise {
  0% { transform: translate(-50%, 30px) scale(0.2); opacity: 0; }
  28% { transform: translate(-50%, -72px) scale(1.12); opacity: 1; }
  75% { transform: translate(-50%, -88px) scale(1.02); opacity: 1; }
  100% { transform: translate(-50%, -120px) scale(0.85); opacity: 0; }
}
@keyframes cardFlipIn {
  0% { opacity: 0; transform: perspective(900px) rotateY(70deg) scale(0.84); }
  55% { opacity: 1; transform: perspective(900px) rotateY(-6deg) scale(1.02); }
  100% { opacity: 1; transform: perspective(900px) rotateY(0deg) scale(1); }
}
@keyframes screenShake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-6px, -4px); }
  30% { transform: translate(6px, 4px); }
  45% { transform: translate(-5px, 3px); }
  60% { transform: translate(5px, -3px); }
  75% { transform: translate(-3px, 2px); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetSlideUp { from { opacity: 0; transform: translateY(42px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes spinSlow { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(0.65); opacity: 0.35; } 50% { transform: scale(1.25); opacity: 1; } }
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 5px 0 #593509, 0 12px 26px rgba(255, 169, 18, 0.4); }
  50% { box-shadow: 0 5px 0 #593509, 0 14px 44px rgba(255, 200, 60, 0.82); }
}
@keyframes btnGloss {
  0%, 68% { transform: translateX(130%); }
  100% { transform: translateX(-130%); }
}

/* Desktop Centering for Modal & Spacious Chest */
@media (min-width: 768px) {
  .sheet-backdrop { align-items: center; }
  .brand-logo { width: 152px; }
  .stage { height: clamp(310px, 46dvh, 410px); }
  .chest-holder { width: clamp(290px, 42dvh, 365px); }
}

/* Extra-Small Phones (320px–360px) */
@media (max-width: 360px) {
  .fields { grid-template-columns: 1fr; }
  .brand-logo { width: 110px; }
  .hero-heading h1 { font-size: 25px; }
  .stage { height: 225px; }
  .chest-holder { width: 200px; }
  .reward-card { padding: 18px 16px 16px; gap: 14px; }
  .reward-actions { flex-direction: column; }
  .save-btn, .whatsapp-btn { flex: none; width: 100%; }
}

/* Short Phones (e.g. iPhone SE 375x667, Android 360x640) */
@media (max-height: 700px) {
  .masthead { padding: 8px 0; }
  .brand-logo { width: 112px; }
  .hero-heading h1 { font-size: clamp(24px, 6vw, 34px); margin: 5px 0 2px; }
  .hero-heading p { font-size: 12.5px; }
  .stage { height: clamp(205px, 37dvh, 270px); }
  .chest-holder { width: clamp(190px, 34dvh, 245px); }
  .primary-btn { min-height: 48px; font-size: 15px; }
}

/* Mobile Landscape */
@media (max-height: 520px) {
  .eyebrow, .dock-meta { display: none; }
  .stage { height: 180px; }
  .chest-holder { width: 165px; }
  .dock { gap: 6px; }
}

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