/* =========================================================
   1 LYRIC FAMILY — Wild West Interactive Reveal Home Page
   Adaptive 1920x1080 Proportional Canvas + Full-Bleed Backdrop
   Android 8 (Chromium 58+) & Modern Browser Compatible
   Zero reliance on clamp(), min(), max(), inset, flex gap,
   aspect-ratio, or CSS Grid.
   ========================================================= */

@font-face {
  font-family: "RyeLocal";
  src: url("/static/fonts/Rye-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RobotoSlabLocal";
  src: url("/static/fonts/RobotoSlab-Variable.ttf") format("truetype");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "CinzelLocal";
  src: url("/static/fonts/Cinzel-Variable.ttf") format("truetype");
  font-weight: 500 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ww-teal-dark: #003C3D;
  --ww-green-deep: #002728;
  --ww-teal-emerald: #087B75;
  --ww-gold: #E8BF70;
  --ww-cream: #FFF0C5;
  --ww-orange: #F28B24;
  --ww-orange-dark: #C34C13;
  --ww-font-western: "RyeLocal", "CinzelLocal", Georgia, serif;
  --ww-font-slab: "RobotoSlabLocal", Georgia, serif;
  --ww-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* =========================================================
   HOME ENTRY SCREEN (Full Actual Viewport)
   ========================================================= */
.ww-entry-screen {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #002D2E;
  background-image:
    radial-gradient(ellipse 68% 48% at 50% 12%, rgba(8, 123, 117, 0.58) 0%, transparent 66%),
    radial-gradient(ellipse 58% 36% at 50% 94%, rgba(242, 139, 36, 0.34) 0%, rgba(232, 191, 112, 0.14) 42%, transparent 74%),
    linear-gradient(180deg, #003C3D 0%, #002D2E 46%, #002728 100%);
  opacity: 0;
  pointer-events: none;
  -webkit-transform: scale(0.99);
  transform: scale(0.99);
  -webkit-transition: opacity 0.4s ease, -webkit-transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.ww-entry-screen.is-active {
  opacity: 1;
  pointer-events: auto;
  -webkit-transform: scale(1);
  transform: scale(1);
}

.ww-entry-screen.is-leaving {
  opacity: 0;
  -webkit-transform: scale(1.02);
  transform: scale(1.02);
  pointer-events: none;
}

/* =========================================================
   LAYERED WILD WEST CINEMATIC BACKGROUND (Full-Bleed Viewport)
   ========================================================= */
.ww-bg-layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Rotating radial light rays behind top logo (progressively enhanced) */
.ww-sunburst {
  position: absolute;
  top: -34%;
  left: 50%;
  width: 135vmax;
  height: 135vmax;
  margin-left: -67.5vmax;
  opacity: 0.2;
  background: radial-gradient(circle at center, rgba(255, 240, 197, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

@supports (background-image: repeating-conic-gradient(red 0deg, blue 10deg)) {
  .ww-sunburst {
    background: repeating-conic-gradient(
      from 0deg,
      rgba(255, 240, 197, 0.32) 0deg 6deg,
      transparent 6deg 18deg
    );
    -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.35) 38%, transparent 68%);
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.35) 38%, transparent 68%);
    -webkit-animation: ww-rays-rotate 95s linear infinite;
    animation: ww-rays-rotate 95s linear infinite;
  }
}

@-webkit-keyframes ww-rays-rotate {
  from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes ww-rays-rotate {
  from { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* Warm golden sunset horizon glow near bottom center */
.ww-sunset-glow {
  position: absolute;
  bottom: -14%;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  width: 78%;
  height: 40%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(242, 139, 36, 0.42) 0%,
    rgba(232, 191, 112, 0.22) 38%,
    rgba(8, 123, 117, 0.08) 65%,
    transparent 82%
  );
  -webkit-filter: blur(14px);
  filter: blur(14px);
}

/* Western geometric decorative strips along top & bottom edges */
.ww-trim {
  position: absolute;
  left: 0;
  right: 0;
  height: 18px;
  z-index: 4;
  background-color: rgba(0, 29, 30, 0.88);
  border-color: rgba(232, 191, 112, 0.5);
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='20' viewBox='0 0 64 20'%3E%3Cpath d='M0 10 L10 2 L20 10 L10 18 Z M32 10 L42 2 L52 10 L42 18 Z' fill='none' stroke='%23E8BF70' stroke-width='1.5' opacity='0.78'/%3E%3Cpath d='M10 6 L14 10 L10 14 L6 10 Z M42 6 L46 10 L42 14 L38 10 Z' fill='%23FFF0C5' opacity='0.65'/%3E%3Cpath d='M22 10 L30 10 M54 10 L62 10' stroke='%23E8BF70' stroke-width='1.4' opacity='0.6'/%3E%3C/svg%3E");
}

.ww-trim-top {
  top: 0;
  border-bottom: 1.5px solid rgba(232, 191, 112, 0.55);
}

.ww-trim-bottom {
  bottom: 0;
  border-top: 1.5px solid rgba(232, 191, 112, 0.55);
}

/* Desert mountains + cacti SVG layer */
.ww-horizon-svg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  width: 100%;
  height: 44%;
  z-index: 1;
}

/* Corner Silhouettes */
.ww-corner-art {
  position: absolute;
  bottom: 16px;
  z-index: 2;
  pointer-events: none;
  height: auto;
}

.ww-corner-cowboy {
  left: -1.2%;
  width: 17%;
  max-width: 320px;
  min-width: 130px;
  -webkit-filter: drop-shadow(0 0 18px rgba(242, 139, 36, 0.3));
  filter: drop-shadow(0 0 18px rgba(242, 139, 36, 0.3));
}

.ww-corner-western {
  right: -0.8%;
  width: 17.5%;
  max-width: 330px;
  min-width: 135px;
  -webkit-filter: drop-shadow(0 0 18px rgba(242, 139, 36, 0.28));
  filter: drop-shadow(0 0 18px rgba(242, 139, 36, 0.28));
}

/* Floating golden dust particles */
.ww-particles {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
}

.ww-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF0C5 0%, #E8BF70 55%, transparent 100%);
  opacity: 0;
  -webkit-animation: ww-float-up 12s linear 0s infinite;
  animation: ww-float-up 12s linear 0s infinite;
}

@-webkit-keyframes ww-float-up {
  0% { -webkit-transform: translate3d(0, 12%, 0) scale(0.5); transform: translate3d(0, 12%, 0) scale(0.5); opacity: 0; }
  18% { opacity: 0.6; }
  80% { opacity: 0.42; }
  100% { -webkit-transform: translate3d(16px, -680px, 0) scale(1.05); transform: translate3d(16px, -680px, 0) scale(1.05); opacity: 0; }
}
@keyframes ww-float-up {
  0% { -webkit-transform: translate3d(0, 12%, 0) scale(0.5); transform: translate3d(0, 12%, 0) scale(0.5); opacity: 0; }
  18% { opacity: 0.6; }
  80% { opacity: 0.42; }
  100% { -webkit-transform: translate3d(16px, -680px, 0) scale(1.05); transform: translate3d(16px, -680px, 0) scale(1.05); opacity: 0; }
}

/* Subtle dark vignette around screen edges */
.ww-vignette {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse 86% 84% at 50% 50%,
    transparent 52%,
    rgba(0, 17, 18, 0.46) 84%,
    rgba(0, 12, 13, 0.78) 100%
  );
}

/* =========================================================
   DISCREET TOP-RIGHT OPERATOR CONTROLS (FULLSCREEN + SETTINGS)
   ========================================================= */
.rv-top-actions {
  position: fixed;
  top: 22px;
  right: 18px;
  z-index: 1500;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
}

.rv-top-actions > * + * {
  margin-left: 8px;
}

.rv-icon-action {
  width: 40px;
  height: 40px;
  padding: 0;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 39, 40, 0.72);
  border: 1.5px solid rgba(232, 191, 112, 0.46);
  color: #FFF0C5;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.58;
  -webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rv-icon-action:hover,
.rv-icon-action:focus,
.rv-icon-action:active {
  opacity: 1;
  border-color: #FFF0C5;
  background: rgba(0, 60, 61, 0.94);
  -webkit-transform: scale(1.06);
  transform: scale(1.06);
}

.rv-icon-action svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  display: block;
}

.rv-icon-action.is-hidden {
  display: none;
}

/* =========================================================
   PROPORTIONAL 1920x1080 KIOSK DESIGN CANVAS
   Scaled proportionally by viewport-manager.js:
   scale = Math.min(availableWidth / 1920, availableHeight / 1080)
   Guarantees identical zero-overlap composition on ANY resolution
   from 1024x600 up to 3840x2160 and Android 8 WebView!
   ========================================================= */
.ww-design-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  width: 1920px;
  height: 1080px;
  -webkit-transform-origin: center center;
  transform-origin: center center;
  -webkit-transform: translate(-50%, -50%) scale(1);
  transform: translate(-50%, -50%) scale(1);
  overflow: hidden;
}

.ww-stage-layout {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 26px 40px 26px 40px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

/* Top Logo Zone (Strictly bounded height — NEVER overflows or pushes frame!) */
.ww-logo-zone {
  position: relative;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  width: 560px;
  height: 122px;
  max-height: 128px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  z-index: 14;
  margin-top: 4px;
  margin-bottom: 16px;
}

.ww-logo-glow {
  position: absolute;
  width: 135%;
  height: 150%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 240, 197, 0.5) 0%,
    rgba(232, 191, 112, 0.28) 34%,
    rgba(242, 139, 36, 0.12) 58%,
    transparent 74%
  );
  -webkit-filter: blur(16px);
  filter: blur(16px);
  -webkit-animation: ww-logo-breathe 4.4s ease-in-out infinite;
  animation: ww-logo-breathe 4.4s ease-in-out infinite;
}

@-webkit-keyframes ww-logo-breathe {
  0%, 100% { opacity: 0.72; -webkit-transform: scale(0.95); transform: scale(0.95); }
  50% { opacity: 1; -webkit-transform: scale(1.06); transform: scale(1.06); }
}
@keyframes ww-logo-breathe {
  0%, 100% { opacity: 0.72; -webkit-transform: scale(0.95); transform: scale(0.95); }
  50% { opacity: 1; -webkit-transform: scale(1.06); transform: scale(1.06); }
}

.ww-logo-img {
  position: relative;
  z-index: 2;
  max-height: 122px;
  height: 100%;
  width: auto;
  max-width: 520px;
  object-fit: contain;
  display: block;
  -webkit-filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}

/* =========================================================
   ORNATE WESTERN MAIN CONTENT CONTAINER (1500 x 836 in 1920x1080)
   ========================================================= */
.ww-frame-wrap {
  position: relative;
  width: 1500px;
  height: 836px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-filter:
    drop-shadow(0 0 24px rgba(232, 191, 112, 0.25))
    drop-shadow(0 22px 48px rgba(0, 0, 0, 0.62));
  filter:
    drop-shadow(0 0 24px rgba(232, 191, 112, 0.25))
    drop-shadow(0 22px 48px rgba(0, 0, 0, 0.62));
}

.ww-main-frame {
  position: relative;
  width: 100%;
  height: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 28px 52px 20px 52px;
  border-radius: 18px;
  border: 2px solid rgba(232, 191, 112, 0.55);
  background-color: #002F30;
  background-image:
    radial-gradient(ellipse 74% 55% at 50% 42%, rgba(8, 123, 117, 0.34) 0%, transparent 72%),
    linear-gradient(180deg, rgba(0, 56, 58, 0.94) 0%, rgba(0, 39, 40, 0.97) 100%);
  box-shadow:
    inset 0 0 60px rgba(0, 15, 16, 0.68),
    inset 0 1px 0 rgba(255, 240, 197, 0.2);
}

/* Notched corners progressive enhancement */
@supports (clip-path: polygon(0 0, 100% 0, 100% 100%)) {
  .ww-main-frame {
    border: none;
    border-radius: 0;
    -webkit-clip-path: polygon(
      26px 0%, calc(100% - 26px) 0%,
      100% 26px, 100% calc(100% - 26px),
      calc(100% - 26px) 100%, 26px 100%,
      0% calc(100% - 26px), 0% 26px
    );
    clip-path: polygon(
      26px 0%, calc(100% - 26px) 0%,
      100% 26px, 100% calc(100% - 26px),
      calc(100% - 26px) 100%, 26px 100%,
      0% calc(100% - 26px), 0% 26px
    );
  }
}

.ww-frame-svg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.ww-corner-orn {
  position: absolute;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 4;
  color: #E8BF70;
  opacity: 0.92;
}
.ww-corner-orn.tl { top: 10px; left: 10px; }
.ww-corner-orn.tr { top: 10px; right: 10px; -webkit-transform: scaleX(-1); transform: scaleX(-1); }
.ww-corner-orn.bl { bottom: 10px; left: 10px; -webkit-transform: scaleY(-1); transform: scaleY(-1); }
.ww-corner-orn.br { bottom: 10px; right: 10px; -webkit-transform: scale(-1); transform: scale(-1); }

/* =========================================================
   HEADING SECTION
   ========================================================= */
.ww-header-block {
  position: relative;
  z-index: 5;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  text-align: center;
  width: 100%;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.ww-banner-pill {
  display: inline-block;
  padding: 6px 28px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(232, 191, 112, 0.24), rgba(0, 39, 40, 0.85));
  border: 1.5px solid #E8BF70;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 240, 197, 0.45);
  color: #FFF0C5;
  font-family: "RobotoSlabLocal", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ww-heading-row {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 8px;
}

.ww-flourish {
  width: 168px;
  height: 18px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  color: #E8BF70;
  opacity: 0.9;
}

.ww-flourish.left {
  margin-right: 24px;
}

.ww-flourish.right {
  margin-left: 24px;
  -webkit-transform: scaleX(-1);
  transform: scaleX(-1);
}

.ww-main-heading {
  font-family: "RyeLocal", "CinzelLocal", Georgia, serif;
  font-size: 52px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.08;
  white-space: nowrap;
  color: #FFF0C5;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.65);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .ww-main-heading {
    background: linear-gradient(180deg, #FFF7DC 0%, #FFF0C5 44%, #E8BF70 86%, #C99342 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    -webkit-filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
  }
}

.ww-description {
  max-width: 820px;
  font-family: "RobotoSlabLocal", Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  color: rgba(255, 240, 197, 0.9);
  line-height: 1.35;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* =========================================================
   PUZZLE CARDS ROW (2 MYSTERY CARDS — NO FLEX GAP DEPENDENCY)
   ========================================================= */
.ww-cards-row {
  position: relative;
  z-index: 5;
  width: 100%;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 auto;
  flex: 1 1 auto;
  min-height: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 12px 0 8px 0;
}

.ww-card-slot {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0 44px;
  cursor: pointer;
  outline: none;
  -webkit-transition: -webkit-transform 0.22s ease, opacity 0.3s ease;
  transition: transform 0.22s ease, opacity 0.3s ease;
}

.ww-card-slot.ww-mystery-card {
  width: 392px;
  height: 392px;
  margin-top: 18px;
  border-radius: 26px;
  border: 2.5px solid rgba(232, 191, 112, 0.6);
  background-color: #002D2E;
  background-image:
    radial-gradient(ellipse 90% 62% at 50% 24%, rgba(8, 123, 117, 0.52) 0%, rgba(0, 44, 45, 0.94) 64%, rgba(0, 29, 30, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 197, 0.25),
    inset 0 -24px 44px rgba(0, 16, 17, 0.72),
    0 14px 32px rgba(0, 0, 0, 0.56);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 36px 22px 20px 22px;
  overflow: visible;
  text-align: center;
}

.ww-card-slot.is-locked {
  cursor: not-allowed;
  opacity: 0.78;
}

.ww-card-slot.ww-mystery-card.is-active {
  cursor: pointer;
  opacity: 1;
  z-index: 3;
  border-color: #F6CF75;
  background-image:
    radial-gradient(ellipse 96% 62% at 50% 22%, rgba(242, 139, 36, 0.55) 0%, rgba(168, 86, 22, 0.34) 36%, rgba(0, 46, 47, 0.94) 68%, rgba(0, 29, 30, 0.98) 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 244, 214, 0.5),
    inset 0 -20px 36px rgba(0, 16, 17, 0.65),
    0 0 28px rgba(242, 139, 36, 0.48),
    0 16px 34px rgba(0, 0, 0, 0.6);
  -webkit-animation: ww-active-pulse 2.8s ease-in-out infinite;
  animation: ww-active-pulse 2.8s ease-in-out infinite;
}

@-webkit-keyframes ww-active-pulse {
  0%, 100% {
    box-shadow:
      inset 0 1px 1px rgba(255, 244, 214, 0.5),
      inset 0 -20px 36px rgba(0, 16, 17, 0.65),
      0 0 22px rgba(242, 139, 36, 0.42),
      0 14px 30px rgba(0, 0, 0, 0.6);
  }
  50% {
    box-shadow:
      inset 0 1px 1px rgba(255, 244, 214, 0.62),
      inset 0 -20px 36px rgba(0, 16, 17, 0.65),
      0 0 40px rgba(255, 214, 102, 0.72),
      0 18px 36px rgba(0, 0, 0, 0.66);
  }
}
@keyframes ww-active-pulse {
  0%, 100% {
    box-shadow:
      inset 0 1px 1px rgba(255, 244, 214, 0.5),
      inset 0 -20px 36px rgba(0, 16, 17, 0.65),
      0 0 22px rgba(242, 139, 36, 0.42),
      0 14px 30px rgba(0, 0, 0, 0.6);
  }
  50% {
    box-shadow:
      inset 0 1px 1px rgba(255, 244, 214, 0.62),
      inset 0 -20px 36px rgba(0, 16, 17, 0.65),
      0 0 40px rgba(255, 214, 102, 0.72),
      0 18px 36px rgba(0, 0, 0, 0.66);
  }
}

.ww-card-slot.is-active:hover,
.ww-card-slot.is-active:focus {
  -webkit-transform: translateY(-4px) scale(1.02);
  transform: translateY(-4px) scale(1.02);
}

.ww-card-slot.is-active:active,
.ww-card-slot.is-active.is-pressed {
  -webkit-transform: scale(0.97);
  transform: scale(0.97);
}

.ww-card-slot.ww-mystery-card.is-completed {
  cursor: pointer;
  opacity: 0.96;
  border-color: rgba(45, 212, 180, 0.85);
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 24%, rgba(24, 180, 155, 0.42) 0%, rgba(0, 46, 47, 0.95) 66%, rgba(0, 29, 30, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 197, 0.3),
    0 0 18px rgba(8, 123, 117, 0.55),
    0 14px 28px rgba(0, 0, 0, 0.55);
}

.ww-card-slot.just-unlocked {
  -webkit-animation: ww-card-unlock-pop 0.85s ease;
  animation: ww-card-unlock-pop 0.85s ease;
}

@-webkit-keyframes ww-card-unlock-pop {
  0% { -webkit-transform: scale(0.92); transform: scale(0.92); }
  55% { -webkit-transform: scale(1.05); transform: scale(1.05); }
  100% { -webkit-transform: scale(1); transform: scale(1); }
}
@keyframes ww-card-unlock-pop {
  0% { -webkit-transform: scale(0.92); transform: scale(0.92); }
  55% { -webkit-transform: scale(1.05); transform: scale(1.05); }
  100% { -webkit-transform: scale(1); transform: scale(1); }
}

/* Number medallion centered on top border */
.ww-card-num {
  position: absolute;
  top: -26px;
  left: 50%;
  margin-left: -26px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-family: "RyeLocal", Georgia, serif;
  font-size: 26px;
  font-weight: 800;
  color: #FFF0C5;
  background: linear-gradient(180deg, #094D4D 0%, #022C2D 100%);
  border: 3px solid #E8BF70;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  z-index: 5;
}

.ww-card-slot.ww-mystery-card.is-active .ww-card-num {
  background: linear-gradient(180deg, #FFE493 0%, #F2B138 55%, #D97E18 100%);
  color: #1A1002;
  border-color: #FFF6D6;
  box-shadow: 0 0 18px rgba(242, 183, 5, 0.65), 0 6px 16px rgba(0, 0, 0, 0.55);
}

.ww-card-slot.ww-mystery-card.is-completed .ww-card-num {
  background: linear-gradient(180deg, #27CFAF 0%, #0A7B73 100%);
  color: #FFF8E1;
  border-color: #FFF0C5;
}

/* Corner completed checkmark badge */
.ww-done-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  background: linear-gradient(135deg, #22C9A8 0%, #087B75 100%);
  border: 2.5px solid #FFF0C5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  color: #FFF0C5;
  opacity: 0;
  -webkit-transform: scale(0.4);
  transform: scale(0.4);
  pointer-events: none;
  z-index: 6;
  -webkit-transition: opacity 0.3s ease, -webkit-transform 0.35s ease;
  transition: opacity 0.3s ease, transform 0.35s ease;
}

.ww-done-check svg {
  width: 22px;
  height: 22px;
}

.ww-card-slot.is-completed .ww-done-check {
  opacity: 1;
  -webkit-transform: scale(1);
  transform: scale(1);
}

/* Card Mystery Artwork Area */
.ww-card-art {
  position: relative;
  width: 100%;
  height: 168px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: #E8BF70;
}

.ww-card-jigsaw-grid {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.75;
}

.ww-mystery-emblem {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.ww-emblem-active,
.ww-emblem-locked,
.ww-emblem-done {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  opacity: 0;
  -webkit-transform: scale(0.75);
  transform: scale(0.75);
  -webkit-transition: opacity 0.3s ease, -webkit-transform 0.35s ease;
  transition: opacity 0.3s ease, transform 0.35s ease;
}

.ww-card-slot.ww-mystery-card.is-active .ww-emblem-active {
  opacity: 1;
  -webkit-transform: scale(1);
  transform: scale(1);
}

.ww-card-slot.ww-mystery-card.is-locked .ww-emblem-locked {
  opacity: 1;
  -webkit-transform: scale(1);
  transform: scale(1);
  width: 76px;
  height: 76px;
  margin: auto;
  border-radius: 50%;
  background: rgba(0, 32, 33, 0.86);
  border: 2.5px solid rgba(138, 206, 198, 0.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  color: #FFF0C5;
}

.ww-emblem-locked svg {
  width: 36px;
  height: 36px;
}

.ww-card-slot.ww-mystery-card.is-completed .ww-emblem-done {
  opacity: 1;
  -webkit-transform: scale(1);
  transform: scale(1);
  width: 82px;
  height: 82px;
  margin: auto;
  border-radius: 50%;
  background: radial-gradient(circle, #24CCA8 0%, #087B75 72%, #003C3D 100%);
  border: 3px solid #FFF0C5;
  box-shadow: 0 0 22px rgba(36, 204, 168, 0.6);
  color: #FFF8E1;
}

.ww-emblem-done svg {
  width: 42px;
  height: 42px;
}

.ww-puzzle-q-svg {
  width: 100%;
  height: 100%;
}

.ww-q-mark {
  position: absolute;
  font-family: "RyeLocal", Georgia, serif;
  font-size: 46px;
  font-weight: 800;
  color: #FFF4CC;
  text-shadow: 0 2px 12px rgba(242, 139, 36, 0.9), 0 3px 6px rgba(0, 0, 0, 0.7);
  -webkit-animation: ww-q-float 2.6s ease-in-out infinite;
  animation: ww-q-float 2.6s ease-in-out infinite;
}

@-webkit-keyframes ww-q-float {
  0%, 100% { -webkit-transform: translateY(0) scale(1); transform: translateY(0) scale(1); }
  50% { -webkit-transform: translateY(-3px) scale(1.05); transform: translateY(-3px) scale(1.05); }
}
@keyframes ww-q-float {
  0%, 100% { -webkit-transform: translateY(0) scale(1); transform: translateY(0) scale(1); }
  50% { -webkit-transform: translateY(-3px) scale(1.05); transform: translateY(-3px) scale(1.05); }
}

.ww-card-body {
  width: 100%;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  padding-top: 8px;
}

.ww-card-title {
  font-family: "RobotoSlabLocal", Georgia, serif;
  font-size: 27px;
  font-weight: 800;
  color: #FFF3CC;
  letter-spacing: 0.02em;
  line-height: 1.12;
  margin-bottom: 5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.ww-card-sub {
  font-family: "RobotoSlabLocal", Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 240, 197, 0.88);
  line-height: 1.18;
  margin-bottom: 6px;
}

.ww-card-meta {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(232, 191, 112, 0.78);
  margin-bottom: 12px;
}

.ww-card-pill {
  width: 90%;
  padding: 10px 14px;
  border-radius: 999px;
  font-family: "RobotoSlabLocal", sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border: 2px solid rgba(154, 206, 202, 0.42);
  background: rgba(16, 56, 56, 0.84);
  color: rgba(255, 240, 197, 0.86);
}

.ww-card-slot.ww-mystery-card.is-active .ww-card-pill {
  background: linear-gradient(180deg, #0E5855 0%, #033635 100%);
  border-color: #2BE0C2;
  color: #FFF7D6;
  box-shadow: 0 0 16px rgba(43, 224, 194, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ww-card-slot.ww-mystery-card.is-completed .ww-card-pill {
  background: linear-gradient(180deg, #0D6B62 0%, #04413C 100%);
  border-color: #E8BF70;
  color: #FFF4CC;
  box-shadow: 0 0 14px rgba(34, 201, 168, 0.42);
}

/* =========================================================
   MAIN ORANGE WESTERN ENTER BUTTON
   ========================================================= */
.ww-cta-zone {
  position: relative;
  z-index: 5;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 6px 0 12px 0;
}

.ww-enter-btn {
  position: relative;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  border: 3px solid #E8BF70;
  border-radius: 18px;
  padding: 17px 62px;
  background: linear-gradient(180deg, #FFA33B 0%, #F28B24 44%, #C34C13 100%);
  color: #FFF0C5;
  font-family: "RyeLocal", "CinzelLocal", Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 3px 6px rgba(72, 22, 2, 0.72);
  cursor: pointer;
  display: -webkit-inline-box;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  box-shadow:
    inset 0 2px 1px rgba(255, 246, 214, 0.72),
    inset 0 -3px 6px rgba(120, 34, 4, 0.55),
    0 6px 0 #7E2D09,
    0 12px 30px rgba(242, 139, 36, 0.52),
    0 0 38px rgba(232, 191, 112, 0.32);
  -webkit-animation: ww-btn-idle 3.2s ease-in-out infinite;
  animation: ww-btn-idle 3.2s ease-in-out infinite;
  -webkit-transition: -webkit-transform 0.14s ease, box-shadow 0.14s ease;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

@-webkit-keyframes ww-btn-idle {
  0%, 100% {
    box-shadow:
      inset 0 2px 1px rgba(255, 246, 214, 0.72),
      inset 0 -3px 6px rgba(120, 34, 4, 0.55),
      0 6px 0 #7E2D09,
      0 12px 28px rgba(242, 139, 36, 0.46),
      0 0 30px rgba(232, 191, 112, 0.26);
  }
  50% {
    box-shadow:
      inset 0 2px 2px rgba(255, 248, 224, 0.85),
      inset 0 -3px 6px rgba(120, 34, 4, 0.55),
      0 6px 0 #7E2D09,
      0 14px 38px rgba(242, 139, 36, 0.7),
      0 0 48px rgba(255, 240, 197, 0.44);
  }
}
@keyframes ww-btn-idle {
  0%, 100% {
    box-shadow:
      inset 0 2px 1px rgba(255, 246, 214, 0.72),
      inset 0 -3px 6px rgba(120, 34, 4, 0.55),
      0 6px 0 #7E2D09,
      0 12px 28px rgba(242, 139, 36, 0.46),
      0 0 30px rgba(232, 191, 112, 0.26);
  }
  50% {
    box-shadow:
      inset 0 2px 2px rgba(255, 248, 224, 0.85),
      inset 0 -3px 6px rgba(120, 34, 4, 0.55),
      0 6px 0 #7E2D09,
      0 14px 38px rgba(242, 139, 36, 0.7),
      0 0 48px rgba(255, 240, 197, 0.44);
  }
}

.ww-enter-btn::after {
  content: "";
  position: absolute;
  top: -15%;
  left: -120%;
  width: 48%;
  height: 130%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 248, 224, 0.48) 50%, transparent 100%);
  -webkit-transform: skewX(-18deg);
  transform: skewX(-18deg);
  -webkit-animation: ww-btn-sweep 4.6s ease-in-out infinite;
  animation: ww-btn-sweep 4.6s ease-in-out infinite;
  pointer-events: none;
}

@-webkit-keyframes ww-btn-sweep {
  0%, 66% { left: -120%; }
  100% { left: 165%; }
}
@keyframes ww-btn-sweep {
  0%, 66% { left: -120%; }
  100% { left: 165%; }
}

.ww-enter-btn:hover,
.ww-enter-btn:focus {
  -webkit-transform: translateY(-2px) scale(1.02);
  transform: translateY(-2px) scale(1.02);
}

.ww-enter-btn:active,
.ww-enter-btn.is-pressed {
  -webkit-transform: translateY(4px) scale(0.975);
  transform: translateY(4px) scale(0.975);
  box-shadow:
    inset 0 2px 2px rgba(255, 240, 197, 0.5),
    0 2px 0 #7E2D09,
    0 6px 18px rgba(242, 139, 36, 0.45);
}

.ww-enter-icon {
  width: 30px;
  height: 30px;
  margin-right: 14px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

/* =========================================================
   BOTTOM INSTRUCTION ROW (3 FLEX ITEMS + DIVIDERS)
   ========================================================= */
.ww-instructions {
  position: relative;
  z-index: 5;
  width: 100%;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(232, 191, 112, 0.28);
}

.ww-inst-item {
  position: relative;
  -webkit-box-flex: 1;
  -webkit-flex: 1 1 0%;
  flex: 1 1 0%;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 2px 14px;
}

.ww-inst-item + .ww-inst-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(232, 191, 112, 0.55), transparent);
}

.ww-inst-icon {
  width: 36px;
  height: 36px;
  margin-right: 12px;
  border-radius: 50%;
  border: 1.5px solid #E8BF70;
  background: rgba(0, 39, 40, 0.78);
  box-shadow: 0 0 10px rgba(232, 191, 112, 0.22);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: #FFF0C5;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.ww-inst-icon svg {
  width: 20px;
  height: 20px;
}

.ww-inst-text {
  font-family: "RobotoSlabLocal", Georgia, serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #FFF0C5;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* =========================================================
   GRAPHICS QUALITY: COMPATIBILITY & BALANCED MODES
   Preserves full Western visual theme while eliminating heavy
   GPU blur/drop-shadow/particle overhead on 3GB Android 8 IFPD
   ========================================================= */
html.gfx-compatibility .ww-sunburst,
html.gfx-compatibility .ww-particles {
  display: none !important;
}

html.gfx-compatibility .ww-sunset-glow,
html.gfx-compatibility .ww-logo-glow {
  -webkit-filter: none !important;
  filter: none !important;
  -webkit-animation: none !important;
  animation: none !important;
  opacity: 0.45;
}

html.gfx-compatibility .ww-corner-cowboy,
html.gfx-compatibility .ww-corner-western,
html.gfx-compatibility .ww-logo-img,
html.gfx-compatibility .ww-frame-wrap,
html.gfx-compatibility .ww-main-heading {
  -webkit-filter: none !important;
  filter: none !important;
}

html.gfx-compatibility .ww-main-heading {
  background: none !important;
  color: #FFF0C5 !important;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.72);
}

html.gfx-compatibility .ww-card-slot.ww-mystery-card.is-active,
html.gfx-compatibility .ww-enter-btn,
html.gfx-compatibility .ww-enter-btn::after,
html.gfx-compatibility .ww-q-mark {
  -webkit-animation: none !important;
  animation: none !important;
}

html.gfx-compatibility .ww-enter-btn::after {
  display: none !important;
}

html.gfx-balanced .ww-sunburst {
  -webkit-animation: none !important;
  animation: none !important;
  opacity: 0.14;
}

html.gfx-balanced .ww-sunset-glow,
html.gfx-balanced .ww-logo-glow {
  -webkit-filter: blur(8px);
  filter: blur(8px);
}

/* Pause all animations when page is hidden / backgrounded */
html.is-page-hidden *,
html.is-page-hidden *::before,
html.is-page-hidden *::after {
  -webkit-animation-play-state: paused !important;
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .ww-sunburst,
  .ww-logo-glow,
  .ww-particle,
  .ww-card-slot.is-active,
  .ww-enter-btn,
  .ww-enter-btn::after,
  .ww-q-mark {
    -webkit-animation: none !important;
    animation: none !important;
  }
}
