/* =============================================================================
   Partner × MomentScience — styles.css
   Landscape iPhone bezel — game screenshot backdrop + offer card (three skins)
============================================================================= */

/* Fonts: Hanken Grotesk, Exo 2 and Bangers, self-hosted as Latin subsets of the
   variable fonts, trimmed to the weights used below (see assets/fonts/OFL.txt).
   font-display: swap shows text in the fallback at once. */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/hanken-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-weight: 700 800;
  font-display: swap;
  src: url("assets/fonts/exo-2-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Bangers";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/bangers-latin.woff2") format("woff2");
}

/* ============================================================
   PRIMITIVES — shared with the portrait template. Keep them: the
   accessibility checks look for each one (see CLONE.md).
============================================================ */
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
html,
body {
  overscroll-behavior: none;
}
/* One focus ring for every control. This page is dark throughout, so the ring
   is white. */
:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}
/* Headings, regions and messages take focus from script only (tabindex="-1"):
   it tells a screen reader where it is, and is not an operable control to ring. */
[tabindex="-1"]:focus {
  outline: none;
}
button {
  touch-action: manipulation;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --brand-green: #4db840;
  --picker-accent: var(--dc-gold);
  --picker-accent-ink: var(--dc-ink);

  /* Dragon City palette, from the game's own captures (assets/level2.PNG and the
     IMG_63xx shots): forest-green frame, cream signs, red ribbon banners, gold
     currency. The two greens and the ribbon reds behind white text are the
     darker stops, so every stop clears 4.5:1 with margin. */
  --dc-wood-deep: #0f3d24;
  --dc-wood-mid: #1c7a42;
  --dc-cream: #fdf5e2;
  --dc-cream-shadow: #e9d9b3;
  --dc-ribbon: #b63a1c; /* white text 5.8:1 */
  --dc-ribbon-d: #962f16;
  --dc-ribbon-ink: #9a3117; /* brand lines on cream, 5.4:1 on the darkest cream */
  --dc-leaf: #2f7a25; /* white text 5.3:1 */
  --dc-leaf-d: #24611c;
  --dc-leaf-edge: #1a4a14;
  --dc-ink: #17342a;
  --dc-ink-soft: #3c574a;
  --dc-gold: #f5c842;
  --dc-gold-d: #e0a820;
  --dc-gold-glow: rgba(245, 200, 66, 0.45);
  --dc-dim: rgba(8, 30, 45, 0.55);
  --dc-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --dc-body: "Nunito", system-ui, sans-serif;
}

/* ============================================================
   DEMO BODY
============================================================ */
.demo-body {
  min-height: 100vh;
  min-height: 100dvh;
  background: #0a1020;
  font-family:
    "Hanken Grotesk",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Touch phones: no body scroll, the frame fills the viewport. Non-touch pointers
     (any desktop window, at any zoom) scroll instead. */
  overflow: hidden;
}
@media (not (pointer: coarse)) {
  .demo-body {
    overflow-x: hidden;
    overflow-y: auto;
  }
}

/* ============================================================
   DESKTOP LABEL
============================================================ */
.desktop-label {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  text-align: center;
}
.desktop-label-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.desktop-label-sub {
  display: none;
}

/* ============================================================
   IPHONE FRAME
============================================================ */
.iphone-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  overflow: hidden;
}
.screen-content {
  position: relative;
  width: 100%;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dynamic-island,
.home-indicator,
.iphone-frame .btn {
  display: none;
}

@media (min-width: 920px) and (not (pointer: coarse)) {
  html,
  body {
    height: 100%;
  }
  .demo-body {
    background-image: radial-gradient(
      ellipse at 50% 40%,
      #141e34 0%,
      #0a1020 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    /* was: justify-content: center + overflow: hidden. Centering a
       flex item taller than the viewport clips both ends and offers
       no way to scroll to the clipped top — same issue fixed in
       momoney-portrait/styles.css, applied here too since .demo-stage
       (below) can exceed the viewport on short embedded panes even
       though this template's frame is shorter than portrait's.
       .demo-stage's own margin: auto 0 does the centering instead,
       safely collapsing to top-anchored + scrollable when it doesn't fit. */
    justify-content: flex-start;
    padding: 20px;
    overflow-y: auto;
    height: 100vh;
    height: 100dvh;
  }
  .desktop-label {
    display: none;
  }
  .demo-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: auto 0;
  }
  .iphone-frame {
    /* Screen size unchanged (844x390) — momoney-portrait targets 375x812
       (iPhone X/11 Pro/mini-class), this template targets 844x390
       (iPhone 12/13/14 rotated) — two different iPhone generations.
       Reconciling that is a separate, larger fix that touches every
       pixel-positioned UI element in this file; out of scope here.
       This pass only upgrades the bezel chrome. The frame itself stays
       unclipped (overflow:visible overrides the mobile overflow:hidden
       above) so the buttons below, which protrude slightly past its
       edge, aren't cut off — the clipped titanium body lives on
       ::before instead. */
    width: 872px;
    height: 418px;
    overflow: visible;
    /* The bezel's rounded body is ::before, clipped to the squircle. This
       box is square, so the full-screen phone background has to go here or
       its corners show past the rounded edge. */
    background: none;
    flex-shrink: 0;
  }
  .iphone-frame::before {
    /* Titanium body, clipped to Figma's published corner-smoothing
       squircle (see <svg><defs> in index.html) — cornerRadius=83.6px
       (20% of the shorter side), cornerSmoothing=0.6, same as portrait.
       Border-radius is a fallback for browsers without clip-path
       support. */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      133deg,
      #4c4c4f 0%,
      #2d2d2f 13%,
      #1c1c1e 32%,
      #232326 56%,
      #18181a 79%,
      #3c3c3f 100%
    );
    border-radius: 40px;
    clip-path: url(#frame-squircle-landscape);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.16),
      inset 0 1px 1px rgba(255, 255, 255, 0.22),
      0 40px 80px -20px rgba(0, 0, 0, 0.7),
      0 20px 40px -10px rgba(0, 0, 0, 0.5);
    z-index: 0;
  }
  /* Scoped to .iphone-frame — #screen-content is shared with .android-frame
     via a class swap on #phone-frame (device swap, see CLONE.md), and
     .android-frame .screen-content below doesn't override position/
     clip-path, so a bare .screen-content selector here would leak the
     iPhone's absolute positioning and squircle clip onto the Android
     skin (wrong corner shape, 2px position offset). */
  .iphone-frame .screen-content {
    position: absolute;
    left: 14px;
    top: 14px;
    width: 844px;
    height: 390px;
    border-radius: 28px;
    clip-path: url(#screen-squircle-landscape);
    overflow: hidden;
    flex: none;
  }
  /* Dynamic Island deliberately left off — was already display:none in
     this template before this pass, and game screenshots captured from
     a real landscape device may already bake in the island's black
     cutout. Turning it on blind risks a doubled/misaligned shape.
     Revisit once someone confirms whether the source screenshots
     already include it. */
  .dynamic-island {
    display: none;
  }
  .iphone-frame .home-indicator {
    display: block;
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 3px;
    z-index: 200;
    pointer-events: none;
  }
  /* Physical buttons, CCW-rotated from portrait's edges (same mapping
     the .android-frame rule below already documents and uses):
     portrait's right-edge power -> landscape top edge; portrait's
     left-edge action+volume pair -> landscape bottom edge. Positions
     are typical placement (rounded percentages of frame width), not
     device-specific measurements — same convention as portrait. */
  .iphone-frame .btn {
    display: block;
    position: absolute;
    background: linear-gradient(180deg, #3d3d3f, #1c1c1e);
    box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.14);
    z-index: 1;
  }
  .iphone-frame .btn-power {
    top: -3px;
    left: 262px;
    width: 105px;
    height: 3px;
    border-radius: 2px 2px 0 0;
  }
  .iphone-frame .btn-action {
    bottom: -3px;
    left: 157px;
    width: 44px;
    height: 3px;
    border-radius: 0 0 2px 2px;
  }
  .iphone-frame .btn-vol-up {
    bottom: -3px;
    left: 235px;
    width: 61px;
    height: 3px;
    border-radius: 0 0 2px 2px;
  }
  .iphone-frame .btn-vol-dn {
    bottom: -3px;
    left: 314px;
    width: 61px;
    height: 3px;
    border-radius: 0 0 2px 2px;
  }
}

/* the old "shrink .screen-content to 100% on short viewports" rule that
   lived here is gone — it fought the new fixed-coordinate clip-path
   (see .iphone-frame .screen-content above). Same removal portrait's
   styles.css already made for the same reason; short viewports now
   scroll via .demo-stage's margin:auto centering instead of shrinking. */

/* ============================================================
   ANDROID FRAME — full-bleed on mobile, bezel on desktop.
   Alternate to .iphone-frame; provisioning picks one via device swap
   (swaps the class on #phone-frame, no markup restructuring needed).
   No status-bar/icon overlay — screenshots carry their own OS chrome.
============================================================ */
/* The iPhone's .btn divs (action/volume/power) live in the same markup
   regardless of which frame class is active — explicitly hidden here so
   a future generic style can't make four unstyled bars appear on the
   Android skin. Android's own physical-button treatment is the
   ::before/::after pair below. */
.android-frame .btn {
  display: none;
}
.android-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  overflow: hidden;
}

.android-punch-hole,
.android-gesture-pill {
  display: none;
}

@media (min-width: 920px) and (not (pointer: coarse)) {
  .android-frame {
    width: calc(844px + 24px);
    height: calc(390px + 24px);
    padding: 12px;
    background: linear-gradient(155deg, #323234 0%, #202022 55%, #18181a 100%);
    border-radius: 34px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.08),
      0 40px 80px -20px rgba(0, 0, 0, 0.7),
      0 20px 40px -10px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
  }
  .android-frame .screen-content {
    width: 844px;
    height: 390px;
    border-radius: 24px;
    overflow: hidden;
    flex: none;
  }
  .android-frame .android-punch-hole {
    display: block;
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 50%;
    z-index: 200;
    pointer-events: none;
  }
  .android-frame .android-gesture-pill {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 2px;
    z-index: 200;
    pointer-events: none;
  }
  /* Physical volume/power buttons — portrait's right-edge pair maps to this
     frame's top edge after the CCW rotation to landscape (same rotation
     that puts the punch-hole camera at left-center instead of top-center).
     Protrude upward off the top edge, grouped near the punch-hole side. */
  .android-frame::before,
  .android-frame::after {
    content: "";
    position: absolute;
    top: -4px;
    height: 7px;
    background: #101012;
    border-radius: 2px 2px 0 0;
  }
  .android-frame::before {
    left: 80px;
    width: 46px;
  }
  .android-frame::after {
    left: 140px;
    width: 30px;
  }
}

@media (min-width: 920px) and (not (pointer: coarse)) and (max-height: 480px) {
  .android-frame .screen-content {
    width: 100%;
    height: 100%;
  }
}

/* ============================================================
   SCREENS
============================================================ */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  transition: opacity 0.35s var(--ease);
}
.screen.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.screen.hidden {
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

#screen-game {
  background: #0a1020;
}

.game-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  background: #0a1020;
  overflow: hidden;
}

/* Full-bleed game screenshot */
.game-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Dark scrim over the screenshot */
.game-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 10, 0.38);
  pointer-events: none;
  z-index: 1;
}

/* Dim overlay */
.game-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  z-index: 10;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.game-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   FORMAT PICKER
============================================================ */
.format-picker {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  z-index: 50;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
}
.format-picker::-webkit-scrollbar {
  display: none;
}
.format-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.format-pill:hover {
  color: rgba(255, 255, 255, 0.8);
}
.format-pill:active {
  opacity: 0.75;
}
.format-pill.is-active {
  background: var(--picker-accent);
  color: var(--picker-accent-ink);
}
.format-pill-emoji {
  font-size: 13px;
  line-height: 1;
}
.format-pill-label {
  white-space: nowrap;
}

/* Desktop: floating fixed panel on the left, bezel stays centered */
@media (min-width: 920px) and (not (pointer: coarse)) {
  .format-picker {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    border-radius: 14px;
    padding: 6px;
    gap: 2px;
    width: 168px;
    z-index: 60;
  }
  .format-pill {
    width: 100%;
    justify-content: flex-start;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
  }
  .format-pill.is-active {
    border-radius: 10px;
  }
}

/* ── Format-picker header ── */
.format-picker-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 6px;
}
.format-picker-title {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  text-align: center;
}
.format-picker-subtitle {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}
.format-picker-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin: 2px 0 1px;
  border-radius: 20px;
  background: rgba(77, 184, 64, 0.15);
  border: 1px solid rgba(77, 184, 64, 0.35);
  color: var(--picker-accent);
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.format-picker-title-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
/* Mobile pill bar: header would clutter the horizontal row — pills stand alone */
@media not all and (min-width: 920px) and (not (pointer: coarse)) {
  .format-picker-header {
    display: none;
  }
}

@media not all and (min-width: 920px) and (not (pointer: coarse)) {
  /* Make demo-stage own the full viewport so game + picker stack cleanly */
  .demo-stage {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
  }

  /* Game area fills whatever height remains above the picker */
  .iphone-frame {
    flex: 1;
    height: auto;
    min-height: 0;
  }

  /* Picker becomes a true layout element — solid, docked at top */
  .format-picker {
    position: static;
    transform: none;
    bottom: auto;
    left: auto;
    order: -1;
    flex-shrink: 0;
    background: #13161f;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px calc(8px + env(safe-area-inset-right)) 10px
      calc(8px + env(safe-area-inset-left));
    padding-top: calc(10px + env(safe-area-inset-top));
    max-width: 100%;
    justify-content: stretch;
    gap: 6px;
  }

  .format-pill {
    flex: 1;
    justify-content: center;
    min-height: 44px;
    font-size: 12px;
    padding: 8px 6px;
  }
}

/* A short window with a mouse (a laptop at 200% zoom is 640x400 CSS px): the
   phone keeps the room its offer card needs and the page scrolls to it. Touch
   phones keep the full-bleed layout. */
@media (not (pointer: coarse)) and (max-height: 560px) and (max-width: 919px) {
  .demo-stage {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .iphone-frame,
  .android-frame {
    flex: none;
    height: 400px;
  }
}

/* ============================================================
   BONUS MODAL — BASE
   Right-anchored card, vertically centered in the bezel.
   Skin class on .game-shell drives all visual treatment.
============================================================ */
.bonus-modal {
  position: absolute;
  right: calc(20px + env(safe-area-inset-right));
  top: 50%;
  transform: translateY(-50%);
  width: 210px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bonus-modal[hidden] {
  display: none;
}

/* Close button — positioned top-right of card */
.oc-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.15s,
    color 0.15s;
}
.oc-close:hover {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}
/* Small round controls keep their look; the invisible hit box reaches 44px. */
.oc-close::before,
.toast-dismiss::before,
.bs-close::before {
  content: "";
  position: absolute;
  inset: -8px;
}
.skin-bottom-sheet .oc-close {
  background: rgba(0, 0, 0, 0.5);
  color: rgba(255, 255, 255, 0.9);
}

@keyframes oc-enter {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 10px)) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}
.bonus-modal:not([hidden]) {
  animation: oc-enter 0.35s var(--ease) both;
}

.oc-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  flex-shrink: 0;
}
.oc-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.4;
  padding: 1px 6px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}
.oc-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
/* When the card has to scroll on a short screen, only the offer copy does:
   the header, arrows, Claim and Save keep their size and stay in view. The
   thumb and text centre with auto margins, not align-items: center, which
   would push the top of long copy out of reach. */
.oc-offer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.oc-offer > * {
  margin-block: auto;
}
.oc-nav,
.oc-actions,
.bonus-modal > .ms-state {
  flex-shrink: 0;
}
.oc-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  display: block;
}
.oc-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.oc-headline {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.oc-brand {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.oc-brand:empty {
  display: none;
}
.oc-desc {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.oc-desc:empty {
  display: none;
}
.oc-actions {
  display: flex;
  gap: 7px;
  padding: 8px 12px 12px;
}
.oc-btn {
  flex: 1;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    opacity 0.15s,
    transform 0.1s;
  letter-spacing: 0.02em;
}
.oc-btn:active {
  opacity: 0.75;
  transform: translateY(1px);
}
.oc-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* The HUD buttons are clipped to a parallelogram, which cuts an outer ring off.
   Draw it inside the clip instead. */
.skin-bonus-modal .oc-btn:focus-visible {
  outline-offset: -5px;
}

/* Loading, empty and error are states of a surface (data-state); the offer
   content and its Claim/Save only exist in "ready". */
.ms-state {
  display: none;
  padding: 14px 16px 16px;
  text-align: center;
}
[data-state]:not([data-state="ready"]) > .ms-state,
[data-state]:not([data-state="ready"]) > .bottom-sheet-card > .ms-state {
  display: block;
}
.ms-state-title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}
.ms-state-body {
  margin: 4px 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0.85;
}
.ms-state-body:empty {
  display: none;
}
.bonus-modal:not([data-state="ready"]) .oc-offer,
.bonus-modal:not([data-state="ready"]) .oc-nav,
.bonus-modal:not([data-state="ready"]) .oc-actions,
.bottom-sheet:not([data-state="ready"]) .bs-body,
.offer-toast:not([data-state="ready"]) .toast-hero,
.offer-toast:not([data-state="ready"]) .toast-footer {
  display: none;
}

/* ============================================================
   BONUS MODAL — GAME HUD TREATMENT 🎮
   Dark translucent panel, purple glow, Exo 2 font.
   Feels like a native game overlay UI element.
============================================================ */
.skin-bonus-modal .bonus-modal {
  /* Floating HUD panel. Inset from the screen edge so the bezel's rounded
     corners, and a real phone's screen corners and safe area, never clip it. */
  background: rgba(6, 2, 18, 0.97);
  border: 1px solid rgba(140, 80, 255, 0.45);
  border-left: 2px solid rgba(140, 80, 255, 0.7);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  right: calc(24px + env(safe-area-inset-right, 0px));
  /* Phones: anchored to the bottom edge, because a fixed top offset or a centre
     line put the buttons below the fold on short screens (568x320). It scrolls
     inside itself as a last resort. */
  top: auto;
  bottom: calc(8px + env(safe-area-inset-bottom));
  max-height: calc(100% - 16px);
  overflow-y: auto;
  --oc-y: 0px;
  transform: translateY(var(--oc-y));
  transform-origin: bottom right;
  width: 295px;
}
/* The bezel: vertically centred so the panel stays on the straight run of the
   screen edge as longer copy makes it taller. */
@media (min-width: 920px) and (not (pointer: coarse)) {
  .skin-bonus-modal .bonus-modal {
    top: 50%;
    bottom: auto;
    --oc-y: -50%;
    transform-origin: center right;
  }
}
.skin-bonus-modal .ms-state {
  color: #f0e6ff;
}
.skin-bonus-modal .oc-header {
  background: linear-gradient(
    90deg,
    rgba(120, 60, 220, 0.3) 0%,
    transparent 100%
  );
  border-bottom: 1px solid rgba(140, 80, 255, 0.3);
  padding: 7px 12px;
}
.skin-bonus-modal .oc-badge {
  display: none;
}
.skin-bonus-modal .oc-eyebrow {
  font-family: "Exo 2", sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: #c084fc;
  font-weight: 700;
}
.skin-bonus-modal .oc-offer {
  padding: 9px 12px;
}
.skin-bonus-modal .oc-thumb {
  border-radius: 6px;
  border: 1px solid rgba(140, 80, 255, 0.3);
}
.skin-bonus-modal .oc-headline {
  font-family: "Exo 2", sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #f0e6ff;
  line-height: 1.3;
}
.skin-bonus-modal .oc-brand {
  font-family: "Exo 2", sans-serif;
  color: #c084fc; /* 7.4:1 on the HUD panel */
}
.skin-bonus-modal .oc-desc {
  font-family: "Exo 2", sans-serif;
  color: rgba(240, 230, 255, 0.82);
}
.skin-bonus-modal .oc-nav {
  padding: 0 10px 6px;
}
.skin-bonus-modal .lnav-arrow {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(192, 132, 252, 0.6);
  color: #e9d5ff;
}
.skin-bonus-modal .lnav-dot::after {
  border-color: rgba(233, 213, 255, 0.75);
}
.skin-bonus-modal .lnav-dot[aria-current="true"]::after {
  background: #c084fc;
  border-color: #c084fc;
}
.skin-bonus-modal .oc-actions {
  padding: 6px 10px 10px;
  gap: 6px;
  border-top: 1px solid rgba(140, 80, 255, 0.2);
}
.skin-bonus-modal .oc-btn {
  border-radius: 0;
  clip-path: polygon(5px 0%, 100% 0%, calc(100% - 5px) 100%, 0% 100%);
  font-family: "Exo 2", sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 7px 8px;
}
.skin-bonus-modal .oc-btn--claim {
  background: linear-gradient(180deg, #9333ea 0%, #7c3aed 100%);
  color: #fff;
  border: 1px solid rgba(200, 150, 255, 0.4) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 3px 0 #4a1c9e,
    0 4px 12px rgba(120, 60, 220, 0.4);
}
.skin-bonus-modal .oc-btn--claim:active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 #4a1c9e,
    0 2px 6px rgba(120, 60, 220, 0.3);
  transform: translateY(3px);
}
.skin-bonus-modal .oc-btn--save {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* HUD: combat hit — flies in from off-screen right, skids to stop */
@keyframes oc-enter-hud {
  0% {
    opacity: 0;
    transform: translate(80px, var(--oc-y)) rotate(4deg) scale(0.88);
  }
  55% {
    opacity: 1;
    transform: translate(-10px, var(--oc-y)) rotate(-0.7deg) scale(1.04);
  }
  75% {
    transform: translate(4px, var(--oc-y)) rotate(0.3deg) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translate(0, var(--oc-y)) rotate(0deg) scale(1);
  }
}
.skin-bonus-modal .bonus-modal:not([hidden]) {
  animation: oc-enter-hud 0.46s var(--spring) both;
}

/* HUD: brief brightness flash on the game screenshot when card lands */
@keyframes hud-impact-flash {
  0% {
    filter: brightness(1);
  }
  18% {
    filter: brightness(1.6) saturate(1.15);
  }
  55% {
    filter: brightness(1.08);
  }
  100% {
    filter: brightness(1);
  }
}
.game-bg-img.hud-impact {
  animation: hud-impact-flash 0.44s ease-out both;
}

/* Lighter scrim so the home-screen UI reads clearly in HUD mode */
.skin-bonus-modal.game-shell::after {
  background: rgba(0, 0, 0, 0.1);
}

/* ============================================================
   SKIN 3: POST-$ / POST-TRANSACTION MODAL 💰
   Matches Partner's native modal language — solid black header
   bar, two-column body (hero image left / content right),
   medium-purple body, green CTA, red X in header.
============================================================ */

/* Hide the corner card for this treatment — modal takes over */
.skin-bottom-sheet .bonus-modal {
  display: none !important;
}

/* Slightly heavier scrim so modal pops */
.skin-bottom-sheet.game-shell::after {
  background: rgba(0, 0, 0, 0.45);
}

.bottom-sheet {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bottom-sheet[hidden] {
  display: none;
}

.bottom-sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 16, 0.72);
  animation: sm-overlay-in 0.3s var(--ease) both;
}
@keyframes sm-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.bottom-sheet-card {
  position: relative;
  z-index: 1;
  width: 510px;
  max-width: calc(
    100% - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)
  );
  background: #2b2488;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  /* A column whose offer copy (.bs-copy) is the part that gives way: on a
     short screen only the copy scrolls, and the header, arrows, Claim and
     Save stay in view. The card scrolls only as a last resort. */
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100% - 16px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 20px 56px rgba(0, 0, 0, 0.75);
  animation: sm-card-in 0.45s var(--spring) 0.06s both;
}
/* Post-$: level-up scale — punchy spring from center */
@keyframes sm-card-in {
  0% {
    opacity: 0;
    transform: scale(0.52) translateY(28px);
  }
  52% {
    opacity: 1;
    transform: scale(1.06) translateY(-5px);
  }
  72% {
    transform: scale(0.97) translateY(2px);
  }
  87% {
    transform: scale(1.01) translateY(-1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Header: solid black bar, centered Bangers title, X on right */
.bs-header {
  background: #0a0614;
  border-bottom: 2px solid rgba(255, 215, 0, 0.25);
  padding: 9px 46px 9px 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 42px;
  overflow: hidden;
  /* Angled bottom-right — matches TMNT panel header language */
  clip-path: polygon(0% 0%, 100% 0%, calc(100% - 6px) 100%, 0% 100%);
}
/* Gold shimmer sweeps left→right on every modal open */
.bs-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 215, 0, 0.45) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: sm-shimmer 0.7s ease-out 0.35s both;
  pointer-events: none;
}
@keyframes sm-shimmer {
  from {
    background-position: -200% 0;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  to {
    background-position: 200% 0;
    opacity: 0;
  }
}
.bs-title {
  font-family: "Bangers", cursive;
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 2px;
  color: #ffd700;
  text-align: center;
  text-shadow: 0 1px 8px rgba(255, 200, 0, 0.5);
}

/* Red X — lives inside the header bar, right-anchored */
.bs-state {
  background: #2b2488;
  color: #fff;
  padding: 22px 20px 18px;
}
.bs-close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: #cc1111;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.bs-close:hover {
  background: #ee2222;
}

/* Two-column body: icon art left, offer detail right */
.bs-body {
  display: flex;
  flex-direction: row;
  flex: 0 1 auto;
  min-height: 0;
}
.bs-header,
.bottom-sheet-card > .ms-state,
.bs-nav,
.bs-actions {
  flex-shrink: 0;
}
.bs-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.bs-art {
  width: 130px;
  flex-shrink: 0;
  background: #1a1060;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.bs-art-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
  border-radius: 20px;
  padding: 10px;
  flex-shrink: 0;
}

/* With a hero image the panel is a frame: blurred fill behind the whole image,
   and the advertiser icon as a badge in the corner. */
.bs-art {
  position: relative;
  overflow: hidden;
}
.bs-art.has-hero {
  width: 150px;
  padding: 0;
}
.bs-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) brightness(0.7);
  transform: scale(1.2);
}
.bs-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.bs-hero-bg[hidden],
.bs-hero[hidden],
.bs-art-img[hidden],
.bs-icon-wrap[hidden] {
  display: none;
}
.bs-icon-wrap {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
  border: 2px solid #ffd700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.bs-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bs-brand {
  margin: 0;
  font-family: "Exo 2", sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd700; /* 8.5:1 on the modal body */
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.bs-brand:empty {
  display: none;
}
.bs-desc {
  font-family: "Exo 2", sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.bs-desc:empty {
  display: none;
}
.bs-nav .lnav-arrow {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}
.bs-nav .lnav-dot[aria-current="true"]::after {
  background: #ffd700;
  border-color: #ffd700;
}

.bs-detail {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #2b2488;
  justify-content: center;
  min-width: 0;
  min-height: 0;
}
.bs-headline {
  font-family: "Exo 2", sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bs-actions {
  display: flex;
  flex-direction: row;
  gap: 7px;
}
.bs-btn {
  flex: 1;
  min-height: 44px;
  padding: 10px 8px;
  font-family: "Exo 2", sans-serif;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: 0;
  clip-path: polygon(7px 0%, 100% 0%, calc(100% - 7px) 100%, 0% 100%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    opacity 0.15s,
    transform 0.1s,
    box-shadow 0.1s;
}
.bs-btn:active {
  opacity: 0.85;
  transform: translateY(1px);
}
.bs-btn:focus-visible {
  outline: 2px solid #ffd700;
  outline-offset: -6px; /* inside the clip-path, which cuts an outer ring off */
}
.bs-btn--claim:focus-visible {
  outline-color: #061000; /* gold is 1.5:1 on the lime */
}
.bs-btn--claim {
  background: linear-gradient(180deg, #8ed629 0%, #5fa812 100%);
  color: #061000;
  box-shadow:
    0 3px 0 #2e5800,
    0 4px 14px rgba(90, 180, 0, 0.3);
}
.bs-btn--claim:active {
  box-shadow: none;
  transform: translateY(3px);
}
.bs-btn--save {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  font-size: 0.75rem;
}

/* ============================================================
   CAROUSEL — Moments A and B
   Arrows sit at the ends of the dots row inside the card: both cards scroll
   on short screens, so nothing can hang off their edge. Small controls keep
   their look; their hit area reaches 44px (arrows) or 24px (dots).
============================================================ */
.lnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  touch-action: pan-y;
}
.lnav-arrow {
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* Measured from inside the 1px border: (30 - 2) + 2 x 8 = 44px */
.lnav-arrow::before {
  content: "";
  position: absolute;
  inset: -8px;
}
.lnav-arrow:disabled {
  visibility: hidden;
}
.lnav-arrow:focus-visible,
.lnav-dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.lnav-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.lnav-dots[hidden] {
  display: none;
}
.lnav-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.lnav-dot::after {
  content: "";
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  transition:
    background 0.2s,
    transform 0.2s;
}
.lnav-dot[aria-current="true"]::after {
  background: #fff;
  transform: scale(1.25);
}
/* Swipe surfaces: no text selection or image ghost-drag mid-gesture */
.oc-offer,
.bs-body {
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.oc-offer img,
.bs-body img {
  -webkit-user-drag: none;
}

@media (prefers-reduced-motion: reduce) {
  .lnav-dot::after {
    transition: none;
  }
}

/* Short landscape phones (568x320 and below): tighten spacing and type so
   Claim and Save stay in view without scrolling the card. Targets keep their
   hit areas; nothing is hidden. */
@media (max-height: 340px) {
  .skin-bonus-modal .oc-header {
    padding: 3px 12px;
  }
  .skin-bonus-modal .oc-offer {
    padding: 5px 12px;
  }
  .oc-text {
    gap: 2px;
  }
  .skin-bonus-modal .oc-headline {
    font-size: 0.8125rem;
    line-height: 1.25;
  }
  .oc-desc {
    font-size: 0.6875rem;
    line-height: 1.3;
  }
  .skin-bonus-modal .oc-nav {
    padding-bottom: 2px;
  }
  .skin-bonus-modal .oc-actions {
    padding: 4px 10px 6px;
  }
  .bs-header {
    min-height: 32px;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .bs-detail,
  .bs-copy {
    gap: 4px;
  }
  .bs-detail {
    padding: 6px 12px;
  }
  .bs-headline {
    font-size: 0.875rem;
    line-height: 1.25;
  }
  .bs-desc {
    font-size: 0.75rem;
    line-height: 1.3;
  }
  .bs-art {
    min-height: 0;
  }
  .lnav-arrow {
    width: 26px;
    height: 26px;
  }
  .lnav-arrow::before {
    inset: -10px; /* (26 - 2) + 2 x 10 = 44px */
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-sheet-overlay {
    animation: none;
  }
  .bottom-sheet-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .bs-header::after {
    animation: none;
    opacity: 0;
  }
  .skin-bonus-modal .bonus-modal:not([hidden]) {
    animation: none;
    opacity: 1;
    transform: translateY(var(--oc-y));
  }
  .game-bg-img.hud-impact {
    animation: none;
  }
}

/* ============================================================
   TOAST — notification-banner surface
   Slides up from the bottom edge of the game frame. Same
   claim/save contract as bonus-modal + bottom-sheet, styled to
   match the existing dark game-panel aesthetic (not a native OS
   toast — a compact card with logo + copy + stacked CTAs).
============================================================ */
.offer-toast {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom));
  left: calc(12px + env(safe-area-inset-left));
  right: calc(12px + env(safe-area-inset-right));
  z-index: 30;
  background: #17102c;
  border: 1px solid rgba(140, 80, 255, 0.35);
  border-radius: 14px;
  box-shadow:
    0 -2px 20px rgba(0, 0, 0, 0.4),
    0 10px 28px rgba(0, 0, 0, 0.5);
  overflow-x: hidden;
  overflow-y: auto;
  max-height: calc(100% - 20px - env(safe-area-inset-bottom));
  transform: translateY(120%);
  opacity: 0;
  transition:
    transform 0.42s var(--spring),
    opacity 0.25s var(--ease);
}
.offer-toast[hidden] {
  display: none;
}
.offer-toast.open {
  transform: translateY(0);
  opacity: 1;
}
.toast-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.toast-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 32px 9px 12px;
  border-bottom: 1px solid rgba(140, 80, 255, 0.2);
}
.toast-logo-wrap {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.toast-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.toast-meta {
  flex: 1;
  min-width: 0;
}
.toast-eyebrow {
  font-family: "Exo 2", sans-serif;
  font-size: 0.5625rem;
  letter-spacing: 2px;
  color: #c084fc;
  font-weight: 700;
}
/* The advertiser, over the headline, as on Moments A and B: the logo alone
   doesn't identify every brand. #c084fc is 6.9:1 on the toast. */
.toast-brand {
  margin: 2px 0 1px;
  font-family: "Exo 2", sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c084fc;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.toast-brand:empty {
  display: none;
}
.toast-headline {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #f0e6ff;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.toast-desc {
  font-family: "Hanken Grotesk", sans-serif;
  font-size: 0.6875rem;
  color: rgba(240, 230, 255, 0.6);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.toast-footer {
  padding: 9px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.toast-claim {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(200, 150, 255, 0.4);
  border-radius: 10px;
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  color: #fff;
  background: linear-gradient(180deg, #9333ea 0%, #7c3aed 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 3px 0 #4a1c9e,
    0 4px 12px rgba(120, 60, 220, 0.4);
  cursor: pointer;
}
.toast-claim:active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 0 #4a1c9e,
    0 2px 6px rgba(120, 60, 220, 0.3);
  transform: translateY(3px);
}
.toast-state {
  padding: 14px 40px 14px 14px;
  text-align: left;
  color: #f0e6ff;
}
.toast-save {
  width: 100%;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .offer-toast {
    transition: opacity 0.15s;
    transform: translateY(0);
  }
}

/* ============================================================
   IN-PHONE BROWSER SHEET — Save for Later on the desktop bezel. Claim opens
   a new tab instead (see openLink in script.js). A modal dialog: [hidden]
   until opened, then it slides up over the whole screen.
============================================================ */
.webview {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1a1a1a;
  transform: translateY(100%);
  transition: transform 0.45s var(--ease);
  pointer-events: none;
}
.webview[hidden] {
  display: none;
}
.webview.open {
  transform: translateY(0);
  pointer-events: auto;
}
.webview-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px 10px;
  /* Side padding keeps the buttons clear of the bezel's rounded corners. */
  background: #f2f2f7;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.webview-close,
.webview-open {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #6b6b6b; /* 3:1+ on the bar */
  background: #fff;
  color: #1a1a1a;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* The sheet is light, so the page's white ring would vanish on it. */
.webview :focus-visible {
  outline-color: #233d71;
}
.webview-url {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.webview-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
}
.webview-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
}
.webview-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 24px;
  text-align: center;
  background: #fff;
  color: #444;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
}
.webview-fallback[hidden] {
  display: none;
}
.webview-fallback p {
  margin: 0;
}
.webview-fallback-open {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: #1a1a1a;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* Handoff: covers the frame once it leaves save-offer (see showHandoff). */
.webview-handoff {
  z-index: 1;
}
.webview-handoff:not([hidden]) {
  display: flex;
}
.webview-handoff-back {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #6b6b6b; /* 3:1+ on white */
  border-radius: 10px;
  background: #fff;
  color: #1a1a1a;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   ROTATE GUARD — a phone held upright only. script.js shows it (a coarse pointer,
   phone width, not yet dismissed); the [hidden] rule at the top does the hiding.
   A desktop window or a tablet never gets it, and "Continue anyway" ends it.
============================================================ */
.landscape-guard {
  position: fixed;
  inset: 0;
  background: #0d0d0d;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  font-size: 0.875rem;
  padding: 16px;
}
.landscape-guard-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.landscape-guard-continue {
  min-height: 44px;
  padding: 10px 22px;
  border: 2px solid #fff;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* ============================================================
   MOBILE OVERRIDES
============================================================ */
@media (max-width: 479px) {
  .bonus-modal {
    right: calc(8px + env(safe-area-inset-right));
    width: 190px;
  }
}

/* ============================================================
   FORCED COLOURS — Windows High Contrast and similar. The browser swaps the
   palette for system colours and drops backgrounds and shadows, so anything
   that was only a coloured fill needs a border, and the pressed state needs a
   system colour that still reads.
============================================================ */
@media (forced-colors: active) {
  .webview {
    background: Canvas;
    color: CanvasText;
  }
  .webview-bar {
    border-bottom: 1px solid CanvasText;
  }
  .webview-close,
  .webview-open,
  .webview-fallback-open,
  .webview-handoff-back {
    border: 1px solid ButtonText;
  }
  .webview-url {
    border: 1px solid CanvasText;
  }
  .lnav-arrow {
    border: 1px solid ButtonText;
  }
  .lnav-dot::after {
    border-color: ButtonText;
  }
  .lnav-dot[aria-current="true"]::after {
    forced-color-adjust: none;
    background: Highlight;
    border-color: Highlight;
  }
  .format-pill,
  .oc-btn,
  .bs-btn,
  .toast-claim,
  .toast-save,
  .oc-close,
  .bs-close,
  .toast-dismiss,
  .landscape-guard-continue {
    border: 1px solid ButtonText;
  }
  /* the skins set their button borders with !important */
  .oc-btn,
  .bs-btn {
    border: 1px solid ButtonText !important;
  }
  .format-pill[aria-pressed="true"] {
    /* system colours chosen by hand: left to the browser, the label gets a
       white text backplate and disappears on the Highlight fill */
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
    border-color: HighlightText;
  }
  .format-picker {
    background: Canvas;
    border: 1px solid CanvasText;
  }
  .bonus-modal,
  .bottom-sheet-card,
  .offer-toast {
    background: Canvas;
    color: CanvasText;
    border: 1px solid CanvasText;
  }
  .bs-header {
    background: Canvas;
    color: CanvasText;
    border-bottom: 1px solid CanvasText;
  }
  .bs-title {
    color: CanvasText;
    text-shadow: none;
  }
  .bs-art,
  .bs-detail {
    background: Canvas;
  }
  /* the slanted clip-path would cut the border off a button */
  .oc-btn,
  .bs-btn {
    clip-path: none;
  }
}

/* =============================================================================
   DRAGON CITY SKIN — everything above is the landscape template, unchanged
   except the palette in :root. Moment A is the cream "wooden sign" with the red
   ribbon banner, Moment B the cream sheet that slides up from the bottom, and
   Moment C the Gift Egg: an egg on the right edge whose reward card (the
   template's toast) sits beside it.
============================================================================= */
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("assets/fonts/fredoka-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/nunito-latin.woff2") format("woff2");
}

.demo-body {
  font-family: var(--dc-body);
}
#screen-game,
.game-wrap {
  background: var(--dc-wood-deep);
}
/* The capture's own HUD (level, dragons, gold) and the Congratulations ribbon
   are at the top: keep them when the docked picker makes the screen shorter. */
.game-bg-img {
  object-position: center top;
}
/* The game dims under every open offer, as in Dragon City's own pop-ups. */
.game-shell::after {
  transition: background 0.4s var(--ease);
}
#screen-game:has(#bonus-modal:not([hidden])) .game-shell::after,
#screen-game:has(#offer-toast.open) .game-shell::after {
  background: var(--dc-dim);
}

/* ── Picker ─────────────────────────────────────────────── */
.format-picker {
  background: rgba(20, 20, 22, 0.72);
}
.format-pill {
  font-family: var(--dc-body);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.72);
}
.format-pill:hover {
  color: #fff;
}
.format-pill.is-active {
  background: linear-gradient(
    180deg,
    var(--dc-cream) 0%,
    var(--dc-cream-shadow) 100%
  );
  color: var(--dc-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 2px 6px rgba(0, 0, 0, 0.3);
}
.format-picker-header {
  border-bottom-color: rgba(245, 200, 66, 0.18);
}
.format-picker-title {
  font-family: var(--dc-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--dc-gold);
  -webkit-text-stroke: 1px var(--dc-ink);
  paint-order: stroke fill;
  text-shadow:
    0 1px 6px rgba(0, 0, 0, 0.6),
    0 0 18px var(--dc-gold-glow);
}
.format-picker-badge {
  background: rgba(245, 200, 66, 0.12);
  border-color: rgba(245, 200, 66, 0.4);
}
.format-picker-subtitle {
  font-family: var(--dc-body);
  color: rgba(255, 255, 255, 0.62);
}
/* Phones and small windows: a slim bar. Each button keeps its 44px hit area,
   but the pressed pill is drawn 32px tall inside it, so the bar takes 48px
   from the game instead of 64 and the capture's HUD stays in view. */
@media not all and (min-width: 920px) and (not (pointer: coarse)) {
  .format-picker {
    background: #13161f;
    padding-top: calc(2px + env(safe-area-inset-top));
    padding-bottom: 2px;
  }
  .format-pill,
  .format-pill.is-active {
    position: relative;
    isolation: isolate;
    background: transparent;
    box-shadow: none;
    padding: 0 6px;
  }
  .format-pill::after {
    content: "";
    position: absolute;
    inset: 6px 0;
    z-index: -1;
    border-radius: 999px;
  }
  .format-pill.is-active::after {
    background: linear-gradient(
      180deg,
      var(--dc-cream) 0%,
      var(--dc-cream-shadow) 100%
    );
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      0 2px 6px rgba(0, 0, 0, 0.3);
  }
}

/* ── Moment A: Bonus Modal ──────────────────────────────── */
/* Centred over the game like Dragon City's reward pop-ups: on the bezel in the
   middle of the screen, on a phone pinned to the bottom edge (the template's
   rule) so Claim and Save fit any height. */
.skin-bonus-modal .bonus-modal {
  left: 50%;
  right: auto;
  width: min(
    400px,
    calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right))
  );
  --oc-x: -50%;
  transform: translate(var(--oc-x), var(--oc-y));
  transform-origin: center bottom;
  background: linear-gradient(
    180deg,
    var(--dc-cream) 0%,
    var(--dc-cream-shadow) 100%
  );
  border: 2.5px solid var(--dc-wood-mid);
  border-radius: 20px;
  box-shadow:
    inset 0 -4px 0 rgba(80, 40, 10, 0.22),
    0 6px 0 rgba(0, 0, 0, 0.4),
    0 18px 40px rgba(0, 0, 0, 0.55);
  color: var(--dc-ink);
  font-family: var(--dc-body);
}
@media (min-width: 920px) and (not (pointer: coarse)) {
  .skin-bonus-modal .bonus-modal {
    transform-origin: center;
  }
}
@keyframes dc-pop {
  from {
    opacity: 0;
    transform: translate(var(--oc-x), var(--oc-y)) scale(0.4);
  }
  to {
    opacity: 1;
    transform: translate(var(--oc-x), var(--oc-y)) scale(1);
  }
}
.skin-bonus-modal .bonus-modal:not([hidden]) {
  animation: dc-pop 0.55s var(--spring) both;
}
/* The red ribbon banner */
.skin-bonus-modal .oc-header {
  position: relative;
  gap: 6px;
  padding: 7px 46px 8px 14px;
  background: linear-gradient(
    180deg,
    var(--dc-ribbon) 0%,
    var(--dc-ribbon-d) 100%
  );
  border-bottom: 2px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.dc-ribbon-icon {
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}
.oc-title {
  margin: 0;
  font-family: var(--dc-display);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.35);
}
.dc-sparkle {
  position: absolute;
  color: var(--dc-gold);
  pointer-events: none;
  text-shadow: 0 0 10px var(--dc-gold-glow);
  animation: dc-sparkle 2s ease-in-out infinite;
}
.dc-sparkle--a {
  right: 54px;
  top: 3px;
  font-size: 13px;
}
.dc-sparkle--b {
  right: 76px;
  bottom: 2px;
  font-size: 9px;
  animation-delay: 0.6s;
}
@keyframes dc-sparkle {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-3px) rotate(13deg);
    opacity: 1;
  }
}
/* Close: the game's round green button with the gold ring */
.skin-bonus-modal .oc-close {
  top: 4px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: var(--dc-wood-deep);
  border: 2px solid var(--dc-gold);
  color: var(--dc-gold);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}
.skin-bonus-modal .oc-close:hover {
  background: var(--dc-wood-mid);
  color: #fff;
}
/* Hero band: the bezel only, where the screen has room for it */
.dc-hero {
  display: none;
}
@media (min-width: 920px) and (not (pointer: coarse)) {
  .skin-bonus-modal .dc-hero {
    display: block;
    position: relative;
    flex-shrink: 0;
    height: 96px;
    overflow: hidden;
    background: var(--dc-wood-deep);
    border-bottom: 2px solid rgba(0, 0, 0, 0.12);
  }
}
.dc-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  filter: blur(14px) saturate(1.2) brightness(0.85);
}
.dc-hero-img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.skin-bonus-modal .oc-offer {
  padding: 10px 14px 6px;
  gap: 12px;
}
.skin-bonus-modal .oc-thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.16);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.skin-bonus-modal .oc-brand {
  font-family: var(--dc-display);
  color: var(--dc-ribbon-ink);
}
.skin-bonus-modal .oc-headline {
  font-family: var(--dc-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--dc-ink);
}
.skin-bonus-modal .oc-desc {
  font-family: var(--dc-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--dc-ink-soft);
}
.skin-bonus-modal .ms-state {
  color: var(--dc-ink);
}
/* Dots in the game's wooden pill with the gold rim */
.skin-bonus-modal .oc-nav {
  padding: 0 12px 4px;
}
.skin-bonus-modal .lnav-dots,
.bs-nav .lnav-dots {
  padding: 0 4px;
  background: var(--dc-wood-deep);
  border: 1px solid var(--dc-gold);
  border-radius: 999px;
}
.skin-bonus-modal .lnav-dot::after,
.bs-nav .lnav-dot::after {
  border-color: rgba(255, 255, 255, 0.8);
}
.skin-bonus-modal .lnav-dot[aria-current="true"]::after,
.bs-nav .lnav-dot[aria-current="true"]::after {
  background: var(--dc-gold);
  border-color: var(--dc-gold);
}
.skin-bonus-modal .lnav-arrow,
.bs-nav .lnav-arrow {
  background: #fff;
  border: 2px solid rgba(23, 52, 42, 0.45);
  color: var(--dc-ink);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
.skin-bonus-modal .oc-actions {
  gap: 10px;
  padding: 6px 14px 14px;
  border-top: 0;
}
/* Claim: the game's chunky green button; Save: the outlined secondary */
.skin-bonus-modal .oc-btn,
.bs-btn,
.toast-claim,
.toast-save {
  clip-path: none;
  border-radius: 14px;
  font-family: var(--dc-display);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
}
.skin-bonus-modal .oc-btn {
  font-size: 0.875rem;
  padding: 8px 10px;
}
.skin-bonus-modal .oc-btn--claim,
.bs-btn--claim,
.toast-claim {
  background: linear-gradient(180deg, var(--dc-leaf) 0%, var(--dc-leaf-d) 100%);
  color: #fff;
  border: 2px solid var(--dc-leaf-edge) !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    0 4px 0 var(--dc-leaf-edge);
}
.skin-bonus-modal .oc-btn--claim:active,
.bs-btn--claim:active,
.toast-claim:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    0 1px 0 var(--dc-leaf-edge);
}
.skin-bonus-modal .oc-btn--save,
.bs-btn--save,
.toast-save {
  background: transparent;
  color: var(--dc-ink);
  border: 2px solid rgba(23, 52, 42, 0.4) !important;
  box-shadow: none;
}
/* Cream surfaces: the page's white focus ring would vanish, so it is ink here
   (12:1 on cream). The ring sits outside the button now there is no clip. */
.skin-bonus-modal .bonus-modal :focus-visible:not([tabindex="-1"]),
.bottom-sheet-card :focus-visible:not([tabindex="-1"]),
.offer-toast :focus-visible:not([tabindex="-1"]) {
  outline: 2px solid var(--dc-ink);
  outline-offset: 2px;
}
.skin-bonus-modal .oc-btn:focus-visible,
.bs-btn:focus-visible,
.bs-btn--claim:focus-visible {
  outline: 2px solid var(--dc-ink);
  outline-offset: 2px;
}
/* The skin's 2px borders sit inside the template's hit boxes: widen them back
   to 44px, measured from inside the border. */
.skin-bonus-modal .lnav-arrow::before,
.bs-nav .lnav-arrow::before {
  inset: -9px; /* (30 - 4) + 2 x 9 = 44px */
}
.skin-bonus-modal .oc-close::before,
.bs-close::before {
  inset: -10px; /* (28 - 4) + 2 x 10 = 44px */
}
@media (max-height: 340px) {
  .skin-bonus-modal .lnav-arrow::before,
  .bs-nav .lnav-arrow::before {
    inset: -11px; /* (26 - 4) + 2 x 11 = 44px */
  }
}
/* Except on the dark close button over the red ribbon */
.skin-bonus-modal .oc-close:focus-visible {
  outline-color: #fff;
}

/* ── Moment B: Bottom Sheet ─────────────────────────────── */
.bottom-sheet {
  align-items: flex-end;
}
.bottom-sheet-overlay {
  background: var(--dc-dim);
}
.bottom-sheet-card {
  width: 560px;
  max-height: calc(100% - 8px);
  background: linear-gradient(
    180deg,
    var(--dc-cream) 0%,
    var(--dc-cream-shadow) 100%
  );
  border: 3px solid rgba(0, 0, 0, 0.32);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.7),
    0 -8px 30px rgba(0, 0, 0, 0.4);
  color: var(--dc-ink);
  font-family: var(--dc-body);
  padding-bottom: env(safe-area-inset-bottom);
  animation: dc-sheet-up 0.45s var(--spring) both;
}
@keyframes dc-sheet-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* The grab handle */
.bottom-sheet-card::before {
  content: "";
  flex-shrink: 0;
  width: 44px;
  height: 4px;
  margin: 8px auto 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
}
.bs-header {
  min-height: 0;
  padding: 4px 52px 6px;
  background: none;
  border-bottom: 0;
  clip-path: none;
  overflow: visible;
}
.bs-header::after {
  display: none;
}
/* The red ribbon tag */
.bs-title {
  padding: 3px 12px;
  border-radius: 5px;
  background: linear-gradient(
    180deg,
    var(--dc-ribbon) 0%,
    var(--dc-ribbon-d) 100%
  );
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  font-family: var(--dc-display);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: none;
}
.bs-close {
  top: 2px;
  right: 12px;
  transform: none;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(23, 52, 42, 0.4);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: var(--dc-ink);
  font-size: 12px;
}
.bs-close:hover {
  background: #fff;
}
.bs-body {
  padding: 0 0 0 14px;
}
.bs-art {
  width: 112px;
  min-height: 100px;
  margin: 2px 0 12px;
  padding: 10px;
  align-self: flex-start;
  background: var(--dc-cream-shadow);
  border: 2px solid rgba(0, 0, 0, 0.16);
  border-radius: 14px;
}
.bs-art.has-hero {
  width: 150px;
  padding: 0;
  background: var(--dc-wood-deep);
}
.bs-art-img {
  width: 72px;
  height: 72px;
  padding: 6px;
  border-radius: 14px;
}
.bs-icon-wrap {
  border-color: var(--dc-cream);
}
.bs-detail {
  padding: 2px 16px 12px 14px;
  background: transparent;
}
.bs-brand {
  font-family: var(--dc-display);
  color: var(--dc-ribbon-ink);
}
.bs-headline {
  font-family: var(--dc-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--dc-ink);
}
.bs-desc {
  font-family: var(--dc-body);
  font-weight: 600;
  color: var(--dc-ink-soft);
}
.bs-actions {
  gap: 10px;
}
.bs-btn {
  font-size: 0.875rem;
}
.bs-state {
  background: transparent;
  color: var(--dc-ink);
}

/* ── Moment C: Gift Egg ─────────────────────────────────── */
.dc-egg {
  position: absolute;
  right: calc(14px + env(safe-area-inset-right));
  top: 50%;
  z-index: 31;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid var(--dc-gold);
  background:
    radial-gradient(
      circle at 30% 25%,
      rgba(255, 255, 255, 0.25) 0%,
      transparent 50%
    ),
    linear-gradient(160deg, var(--dc-wood-mid) 0%, var(--dc-wood-deep) 100%);
  box-shadow:
    0 0 0 2px var(--dc-gold-d),
    0 6px 20px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: translateY(-50%) scale(0.4);
  transition:
    transform 0.5s var(--spring),
    opacity 0.3s var(--ease);
}
.dc-egg.open {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  animation: dc-egg-glow 2.2s ease-in-out infinite;
}
.dc-egg:active {
  transform: translateY(calc(-50% + 2px)) scale(0.97);
}
.dc-egg:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}
.dc-egg-art {
  display: block;
  width: 30px;
  height: 34px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4));
}
.dc-egg-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd24d 0%, #f0a000 100%);
  border: 2px solid rgba(0, 0, 0, 0.3);
  color: #3d2200;
  font-family: var(--dc-display);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
@keyframes dc-egg-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 2px var(--dc-gold-d),
      0 6px 20px rgba(0, 0, 0, 0.45);
  }
  50% {
    box-shadow:
      0 0 0 2px var(--dc-gold),
      0 0 20px 5px var(--dc-gold-glow),
      0 6px 20px rgba(0, 0, 0, 0.45);
  }
}
/* The egg's reward card: a cream popover beside the egg, pointing at it. Only
   the copy scrolls when it is long; Claim and Save stay in view. */
.offer-toast {
  top: 50%;
  bottom: auto;
  left: auto;
  right: calc(84px + env(safe-area-inset-right));
  width: min(
    300px,
    calc(100% - 108px - env(safe-area-inset-left) - env(safe-area-inset-right))
  );
  max-height: calc(100% - 16px);
  display: flex;
  flex-direction: column;
  overflow: visible;
  background: linear-gradient(
    180deg,
    var(--dc-cream) 0%,
    var(--dc-cream-shadow) 100%
  );
  border: 2.5px solid rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.7),
    0 6px 0 rgba(0, 0, 0, 0.35),
    0 16px 32px rgba(0, 0, 0, 0.45);
  color: var(--dc-ink);
  font-family: var(--dc-body);
  transform-origin: right center;
  transform: translateY(-50%) translateX(12px) scale(0.92);
}
.offer-toast.open {
  transform: translateY(-50%);
}
.offer-toast::after {
  content: "";
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 9px solid #f3e8cb;
  filter: drop-shadow(2px 0 0 rgba(0, 0, 0, 0.3));
}
.toast-dismiss {
  top: -10px;
  right: -10px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 2px solid var(--dc-cream);
  background: rgba(0, 0, 0, 0.82);
  color: var(--dc-cream);
  font-size: 11px;
  font-weight: 700;
}
.toast-dismiss::before {
  inset: -9px;
}
.offer-toast .toast-dismiss:focus-visible {
  outline-color: #fff;
}
.toast-hero {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 8px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.toast-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.18);
}
.toast-eyebrow {
  font-family: var(--dc-display);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dc-ribbon-ink);
}
.toast-brand {
  font-family: var(--dc-display);
  color: var(--dc-ribbon-ink);
}
.toast-headline {
  font-family: var(--dc-display);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--dc-ink);
}
.toast-desc {
  font-family: var(--dc-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dc-ink-soft);
}
.toast-footer {
  flex-shrink: 0;
  gap: 8px;
  padding: 8px 12px 14px;
}
.toast-claim {
  font-size: 0.875rem;
}
.toast-save {
  font-size: 0.8125rem;
}
.toast-state {
  flex-shrink: 0;
  color: var(--dc-ink);
}

/* ── Reduced motion: no pops, slides, sparkles or glow ──── */
@media (prefers-reduced-motion: reduce) {
  .skin-bonus-modal .bonus-modal:not([hidden]) {
    animation: none;
    opacity: 1;
    transform: translate(var(--oc-x), var(--oc-y));
  }
  .bottom-sheet-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .dc-sparkle,
  .dc-egg.open {
    animation: none;
  }
  .dc-egg,
  .offer-toast {
    transition: opacity 0.15s;
  }
  .dc-egg,
  .dc-egg.open {
    transform: translateY(-50%);
  }
  .offer-toast,
  .offer-toast.open {
    transform: translateY(-50%);
  }
  .game-shell::after {
    transition: none;
  }
}

/* ── Forced colours ─────────────────────────────────────── */
@media (forced-colors: active) {
  .format-pill.is-active,
  .format-pill.is-active::after {
    forced-color-adjust: none;
    background: Highlight;
    color: HighlightText;
  }
  .skin-bonus-modal .bonus-modal,
  .bottom-sheet-card,
  .offer-toast {
    background: Canvas;
  }
  .format-picker-title {
    -webkit-text-stroke: 0;
    text-shadow: none;
  }
  .skin-bonus-modal .oc-header,
  .bs-title {
    background: Canvas;
    color: CanvasText;
    border: 1px solid CanvasText;
  }
  .skin-bonus-modal .lnav-dots,
  .bs-nav .lnav-dots {
    background: Canvas;
    border-color: CanvasText;
  }
  .dc-egg {
    border: 2px solid ButtonText;
    background: ButtonFace;
  }
  .dc-egg-badge {
    border-color: CanvasText;
  }
  .offer-toast::after {
    border-left-color: CanvasText;
  }
  .skin-bonus-modal .oc-btn,
  .bs-btn,
  .toast-claim,
  .toast-save {
    border: 1px solid ButtonText !important;
  }
}
