/* ---- Reset / base ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #6A6A6A;
  font-size: 1.1rem;
  background-color: #ffffff;
}
img { max-width: 100%; }

/* Utilities (subset of Bootstrap used by the markup) */
.d-none { display: none !important; }
.lock { overflow: hidden; height: 100%; }

/* ---- Shared components ---- */
.red-title {
  color: #DD1D21;
  font-weight: 700;
  text-align: center;
  font-size: 1.25rem;
}
.red-button {
  color: #ffffff;
  background-color: #DD1D21;
  border: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 1rem 4rem;
  margin: 0 auto;
  display: block;
  cursor: pointer;
}
.red-button:hover { color: #ffffff; text-decoration: none; }

/* ---- Game wrapper ---- */
.game-wrapper {
  background-color: #ffffff;
  width: 100%;
  height: auto;
  padding: 1rem 1rem 3rem;
}
@media (min-width:768px) { .game-wrapper { padding: 3rem 4rem; } }

.game-floating-logos {
  display: block;
  padding: 1rem 1rem 2rem;
}

.game-container {
  background-color: #ffffff;
  padding: 2rem 1rem 3rem;
}
.game-container .red-title {
  font-size: 1.5rem;
  text-align: left;
  margin-bottom: 2rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.game-container p {
  margin-bottom: 2rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-size: 1rem;
}
.game-container .result-title {
  color: #DD1D21;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}
.game-container .result-description {
  font-weight: 700;
  color: #595959;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 0;
}
@media (min-width:768px) {
  .game-container { padding: 4rem 2rem 3rem; }
  .game-container .red-title { font-size: 2.2rem; text-align: center; margin-bottom: 2rem; }
  .game-container .red-title br { display: none; }
  .game-container p {
    width: 440px; text-align: center; display: block;
    margin: 0 auto 4rem; font-size: 1.2rem; padding-left: 0; padding-right: 0;
  }
}

/* ---- Scratch cards ---- */
#scratchgame {
  width: 100%;
  height: auto;
  margin: 3rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: all .3s ease-in;
}
/* Square + white on EVERY card, not just the embedded ones. The round scratch
   overlay has transparent corners, so a card with no background lets the page
   behind show through them as dark square corners; and without a fixed ratio
   the engine derives the card height from the injected logo, so a wide logo
   squashes the overlay into an ellipse.
   background-size beats the engine's inline 100% (which slams the logo
   edge-to-edge); !important is needed to survive its resize re-init. */
#scratchgame div {
  width: 60px;
  float: left;
  margin-right: .5rem;
  aspect-ratio: 1 / 1;
  background-color: #ffffff !important;
  background-size: 68% !important;
}
@media (min-width:350px) { #scratchgame { gap: 10px; } #scratchgame div { width: 80px; } }
@media (min-width:450px) { #scratchgame { gap: 15px; } #scratchgame div { width: 100px; } }
@media (min-width:550px) { #scratchgame { gap: 20px; } #scratchgame div { width: 110px; } }
@media (min-width:768px) {
  #scratchgame { gap: 50px; margin-bottom: 4rem; }
  #scratchgame div { width: 120px; margin-right: 0; }
}

#revealButton { }
@media (min-width:768px) { #revealButton { font-size: 1rem; padding: 1rem 3rem; } }

#revealPrizeButton { font-size: 1rem; margin-top: 2rem; }
@media (min-width:768px) {
  #revealPrizeButton { font-size: 1.2rem; margin-top: 3rem; margin-bottom: -3rem; }
}

/* ---- Hub (iframe) mode ----
   Applied via html.embedded when the game runs inside the Epic hub. One
   seamless white surface with a tight vertical rhythm; the game reports its
   content height to the hub (epic:resize), which sizes the iframe to match —
   so no min-height here and no dead space above/below. Overflow stays hidden
   (overflow-x alone would turn the body into a scroll box). */
html.embedded, html.embedded body { overflow: hidden; }
html.embedded .game-wrapper {
  padding: 1rem;
}
html.embedded .game-floating-logos {
  display: block;
  width: auto;
  max-height: 56px;
  margin: 0 auto;
  padding: 0 0 0.75rem;
}
html.embedded .game-container { padding: 0.5rem 1rem 0.5rem; }
html.embedded .game-container .red-title { text-align: center; margin-bottom: 1rem; }
html.embedded .game-container p { margin-bottom: 1rem; }
html.embedded #scratchgame { margin: 1.5rem auto; }
html.embedded #revealButton { margin-top: 0.5rem; }
/* No coin in hub mode: the engine's cursor-follower element then stays
   position:static and stacks below the canvas as an empty full-size block,
   doubling the card height. Hide it; block-level canvas kills the inline
   baseline gap so the card is exactly the canvas. */
html.embedded #scratchgame .scratchcard-Cursor { display: none !important; }
html.embedded #scratchgame canvas { display: block; }

/* ---- Prize result (standalone only) ---- */
.result-prize .red-title { font-size: 1.8rem; margin-bottom: 0.5rem; }
.result-prize .bold-text { font-weight: 700; }
.result-prize .disclaimer { font-size: 0.9rem; }
@media (min-width:768px) {
  .result-prize .red-title { font-size: 2.5rem; }
}
