/* ==========================================================================
   site-design.css — admin-controlled header, theme, animation, page
   background and mystery-gift UI shared by every storefront page.
   Everything is gated behind attributes written by /src/js/site-design.js,
   so a page with no saved design renders exactly as before.
   ========================================================================== */

/* ---------- theme tokens ------------------------------------------------- */
html[data-sd-theme="on"] {
  --sd-primary: #2874f0;
  --sd-secondary: #fb641b;
  --sd-accent: #ff9f00;
  --sd-surface: #ffffff;
  --sd-text: #0f172a;
  /* Derived neutrals: site-design.js recomputes these from the corrected
     text colour, the block defaults keep the file usable before JS runs. */
  --sd-muted: #64748b;
  --sd-line: #e2e8f0;
  --sd-soft: #f1f5f9;
  /* Storefront aliases used by the page stylesheets. Higher specificity than
     the page-level :root block, so the admin palette wins without !important.
     Text/Surface now reach EVERY page token (--ink/--muted/--line/--soft/
     --card), which is what the admin's own colour inputs promise. */
  --pri: var(--sd-primary);
  --pri-d: color-mix(in srgb, var(--sd-primary) 78%, #000);
  --pri-l: color-mix(in srgb, var(--sd-primary) 12%, #fff);
  --p: var(--sd-primary);
  --acc: var(--sd-secondary);
  --accent: var(--sd-secondary);
  --ink: var(--sd-text);
  --muted: var(--sd-muted);
  --line: var(--sd-line);
  --soft: var(--sd-soft);
  --card: var(--sd-surface);
}

/* ---------- header presets ---------------------------------------------- */
.sd-header {
  position: relative;
  transition: background .25s ease, box-shadow .25s ease, color .25s ease;
}
.sd-header.sd-sticky {
  position: sticky;
  top: 0;
  z-index: 950;
}
.sd-header > * { position: relative; z-index: 1; }

html[data-sd-header="simitolkFkt"] .sd-header {
  background: linear-gradient(180deg, #2874f0 0%, #1f63d6 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .22);
}
html[data-sd-header="simitolkFkt"] .sd-header a,
html[data-sd-header="simitolkFkt"] .sd-header button,
html[data-sd-header="simitolkFkt"] .sd-header .topbar-icon,
html[data-sd-header="simitolkFkt"] .sd-header .logo { color: #fff !important; }
html[data-sd-header="simitolkFkt"] .sd-header input {
  background: #fff !important;
  color: #0f172a !important;
}

/* classic was selectable in the admin dropdown but had NO rule here, so the
   header fell back to whatever the page shipped — the "missing style" bug. */
html[data-sd-header="classic"] .sd-header {
  background: var(--sd-primary, #2563eb) !important;
  color: var(--sd-on-primary, #fff) !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, .2);
}
html[data-sd-header="classic"] .sd-header a,
html[data-sd-header="classic"] .sd-header button,
html[data-sd-header="classic"] .sd-header .logo { color: var(--sd-on-primary, #fff) !important; }
html[data-sd-header="classic"] .sd-header input {
  background: #fff !important;
  color: #0f172a !important;
}

html[data-sd-header="colorful"] .sd-header {
  background: linear-gradient(100deg, #7c3aed 0%, #db2777 48%, #f59e0b 100%) !important;
  color: #fff !important;
  box-shadow: 0 6px 22px rgba(124, 58, 237, .28);
}
html[data-sd-header="colorful"] .sd-header a,
html[data-sd-header="colorful"] .sd-header button,
html[data-sd-header="colorful"] .sd-header .logo { color: #fff !important; }

html[data-sd-header="neon"] .sd-header {
  background: #0b1120 !important;
  color: #22d3ee !important;
  box-shadow: inset 0 -2px 0 rgba(34, 211, 238, .8), 0 0 18px rgba(34, 211, 238, .35);
  text-shadow: 0 0 8px rgba(34, 211, 238, .35);
}
html[data-sd-header="neon"] .sd-header a,
html[data-sd-header="neon"] .sd-header button,
html[data-sd-header="neon"] .sd-header .logo { color: #67e8f9 !important; text-shadow: 0 0 8px rgba(34, 211, 238, .45); }
html[data-sd-header="neon"] .sd-header input {
  background: rgba(15, 23, 42, .9) !important;
  color: #67e8f9 !important;
  border-color: rgba(34, 211, 238, .6) !important;
}

html[data-sd-header="royal"] .sd-header {
  background: linear-gradient(180deg, #1e1b4b 0%, #4c1d95 100%) !important;
  color: #fde68a !important;
  border-bottom: 2px solid rgba(253, 230, 138, .55);
  box-shadow: 0 4px 18px rgba(30, 27, 75, .45);
}
html[data-sd-header="royal"] .sd-header a,
html[data-sd-header="royal"] .sd-header button,
html[data-sd-header="royal"] .sd-header .logo { color: #fde68a !important; }
html[data-sd-header="royal"] .sd-header input {
  background: rgba(255, 255, 255, .95) !important;
  color: #1e1b4b !important;
}

html[data-sd-header="sunset"] .sd-header {
  background: linear-gradient(120deg, #f97316 0%, #ef4444 55%, #db2777 100%) !important;
  color: #fff !important;
  box-shadow: 0 6px 22px rgba(239, 68, 68, .3);
}
html[data-sd-header="sunset"] .sd-header a,
html[data-sd-header="sunset"] .sd-header button,
html[data-sd-header="sunset"] .sd-header .logo { color: #fff !important; }

html[data-sd-header="ocean"] .sd-header {
  background: linear-gradient(180deg, #0ea5e9 0%, #0369a1 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(14, 165, 233, .32);
}
html[data-sd-header="ocean"] .sd-header a,
html[data-sd-header="ocean"] .sd-header button,
html[data-sd-header="ocean"] .sd-header .logo { color: #fff !important; }
html[data-sd-header="ocean"] .sd-header input {
  background: #fff !important;
  color: #0f172a !important;
}

html[data-sd-header="gradient"] .sd-header {
  background: linear-gradient(110deg, var(--sd-primary, #2874f0) 0%, var(--sd-secondary, #fb641b) 100%) !important;
  /* ink picked by measured contrast against BOTH gradient stops (see
     applyTheme) — a pale-yellow palette no longer produces white-on-white */
  color: var(--sd-on-brand, #fff) !important;
  box-shadow: 0 6px 24px rgba(15, 23, 42, .18);
}
html[data-sd-header="gradient"] .sd-header a,
html[data-sd-header="gradient"] .sd-header button,
html[data-sd-header="gradient"] .sd-header .logo { color: var(--sd-on-brand, #fff) !important; }

html[data-sd-header="dark"] .sd-header {
  background: #0f172a !important;
  color: #f8fafc !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}
html[data-sd-header="dark"] .sd-header a,
html[data-sd-header="dark"] .sd-header button,
html[data-sd-header="dark"] .sd-header .logo { color: #f8fafc !important; }

html[data-sd-header="glass"] .sd-header {
  background: rgba(255, 255, 255, .72) !important;
  color: #0f172a !important;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(148, 163, 184, .25);
  box-shadow: 0 8px 30px rgba(15, 23, 42, .08);
}
html[data-sd-theme="on"][data-sd-header="glass"] .sd-header {
  background: color-mix(in srgb, var(--sd-surface) 78%, transparent) !important;
}

html[data-sd-header="minimal"] .sd-header {
  background: var(--sd-surface, #fff) !important;
  color: var(--sd-text, #0f172a) !important;
  border-bottom: 1px solid rgba(148, 163, 184, .3);
  box-shadow: none;
}
html[data-sd-header="minimal"] .sd-header a,
html[data-sd-header="minimal"] .sd-header button,
html[data-sd-header="minimal"] .sd-header .logo { color: var(--sd-text, #0f172a) !important; }

html[data-sd-search="off"] .sd-header form,
html[data-sd-search="off"] .sd-header .search-wrap,
html[data-sd-search="off"] .sd-header .search-bar,
html[data-sd-search="off"] .sd-header .topbar-search,
html[data-sd-search="off"] .sd-header #searchInput,
html[data-sd-search="off"] .sd-header #searchBox { display: none !important; }

/* ---------- header animations ---------------------------------------------
   Round 32: the motion was "loud demo" — bounce/float/swing looped forever
   and made the whole sticky bar dance on every page, rainbow oscillated hard
   enough to look like a toy, and glow flashed a fixed blue that fought every
   palette. Professional rule applied here:
     • ENTRANCE effects (fade / slide / bounce) run ONCE per page view;
     • AMBIENT effects (glow / shimmer / pulse / rainbow / float / swing) are
       slow, low-amplitude and GPU-friendly (filter / box-shadow), so a sticky
       header never wobbles while the customer scrolls;
     • nothing is gated on a fixed colour — glow follows --sd-primary. */
@keyframes sdHdrFade { from { opacity: .35; } to { opacity: 1; } }
@keyframes sdHdrSlide { from { transform: translateY(-14px); opacity: .2; } to { transform: none; opacity: 1; } }
/* one-shot settle: drops in, overshoots a hair, stops — no endless bobbing */
@keyframes sdHdrBounce {
  0% { transform: translateY(-12px); opacity: .4; }
  55% { transform: translateY(3px); opacity: 1; }
  78% { transform: translateY(-2px); }
  100% { transform: none; opacity: 1; }
}
@keyframes sdHdrGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(40, 116, 240, 0); }
  50% { box-shadow: 0 0 22px color-mix(in srgb, var(--sd-primary, #2874f0) 45%, transparent); }
}
@keyframes sdHdrPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.06); }
}
@keyframes sdHdrShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.sd-hdr-anim-fade { animation: sdHdrFade .6s ease both; }
.sd-hdr-anim-slide { animation: sdHdrSlide .55s cubic-bezier(.22, 1, .36, 1) both; }
.sd-hdr-anim-bounce { animation: sdHdrBounce .7s cubic-bezier(.22, 1, .36, 1) both; }
.sd-hdr-anim-glow { animation: sdHdrGlow 3.6s ease-in-out infinite; }
.sd-hdr-anim-pulse { animation: sdHdrPulse 3.8s ease-in-out infinite; }
/* NO overflow:hidden here — it clipped the mega-menu dropdowns that hang off
   the header. The sweep lives inside ::after (inset 0), so it cannot escape. */
.sd-hdr-anim-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 34%, rgba(255, 255, 255, .22) 50%, transparent 66%);
  background-size: 220% 100%;
  animation: sdHdrShimmer 7s linear infinite;
}
@keyframes sdHdrRainbow {
  0%, 100% { filter: hue-rotate(0deg) saturate(1); }
  50% { filter: hue-rotate(14deg) saturate(1.1); }
}
@keyframes sdHdrFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes sdHdrSwing {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-.35deg); }
  75% { transform: rotate(.35deg); }
}
/* ambient set: long cycles, tiny amplitude — motion you notice only if you
   look for it, which is how a storefront header should behave */
.sd-hdr-anim-rainbow { animation: sdHdrRainbow 9s ease-in-out infinite; }
.sd-hdr-anim-float { animation: sdHdrFloat 6s ease-in-out infinite; }
.sd-hdr-anim-swing { transform-origin: 50% 0; animation: sdHdrSwing 7.5s ease-in-out infinite; }

/* ---------- page transition --------------------------------------------- */
@keyframes sdFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sdSlideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sdZoom { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
@keyframes sdBounceIn {
  0% { opacity: 0; transform: scale(.97); }
  55% { opacity: 1; transform: scale(1.012); }
  100% { transform: none; }
}
body.sd-page-fade { animation: sdFade var(--sd-anim-dur, .5s) ease both; }
body.sd-page-slide-up { animation: sdSlideUp var(--sd-anim-dur, .5s) cubic-bezier(.22, 1, .36, 1) both; }
body.sd-page-zoom { animation: sdZoom var(--sd-anim-dur, .5s) ease both; }
body.sd-page-bounce { animation: sdBounceIn var(--sd-anim-dur, .55s) ease both; }

/* ---------- page background --------------------------------------------- */
/* background-attachment: fixed is the "white / cut-off background" bug:
   iOS and several Android WebViews paint it against the viewport only, so an
   uploaded image shows up zoomed, sliced in half or not at all on a phone.
   The parallax `fixed` behaviour is now a DESKTOP-ONLY enhancement; phones
   get plain scroll, which every mobile browser paints correctly. */
html[data-sd-bg="on"] body {
  background-color: var(--sd-bg-color, #f1f5f9) !important;
  background-size: cover !important;
  -webkit-background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}
@media (min-width: 1024px) and (hover: hover) {
  html[data-sd-bg="on"] body { background-attachment: fixed !important; }
}
/* The wash over an uploaded image used to be hard-coded white, which turned a
   dark photo into a milky white page. site-design.js computes the tint from
   the admin's own base colour + opacity into --sd-bg-overlay, so the wash
   always matches the design the admin picked (and never falls back to white). */
html[data-sd-bg="on"][data-sd-bg-type="image"] body {
  background-image:
    linear-gradient(var(--sd-bg-overlay, rgba(241, 245, 249, .2)), var(--sd-bg-overlay, rgba(241, 245, 249, .2))),
    var(--sd-bg-image) !important;
}
html[data-sd-bg="on"][data-sd-bg-type="color"] body { background-image: none !important; }
/* The fixed video layer sits at z-index -1, so the body must stay transparent
   or an opaque body background would paint over the video entirely. */
html[data-sd-bg="on"][data-sd-bg-type="video"] body { background-color: transparent !important; }
#sdBgVideoLayer {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--sd-bg-color, #f1f5f9);
}
#sdBgVideoLayer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: calc(1 - var(--sd-bg-opacity, .2));
  filter: blur(var(--sd-bg-blur, 0px));
  transform: scale(1.04); /* hide blurred edges */
}
#sdBgVideoLayer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sd-bg-overlay, rgba(241, 245, 249, .2));
}

/* ---------- cards / buttons --------------------------------------------- */
html[data-sd-cards] .product-card,
html[data-sd-cards] .shop-card,
html[data-sd-cards] .grocery-card,
html[data-sd-cards] .card {
  border-radius: var(--sd-card-radius, 12px);
}
html[data-sd-cards="glass"] .product-card,
html[data-sd-cards="glass"] .shop-card,
html[data-sd-cards="glass"] .grocery-card,
html[data-sd-cards="glass"] .card,
html[data-sd-cards="glass"] .sc {
  background: rgba(255, 255, 255, .72) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .55) !important;
}
html[data-sd-cards="outline"] .product-card,
html[data-sd-cards="outline"] .shop-card,
html[data-sd-cards="outline"] .grocery-card,
html[data-sd-cards="outline"] .card {
  box-shadow: none !important;
  border: 1px solid rgba(148, 163, 184, .4) !important;
}
/* elevated / flat were both offered in the admin dropdown with NO rule here,
   so choosing either produced exactly the default look — the same
   "missing style" bug class the classic header once had. Elevated now means
   a real hover lift with a soft shadow; flat means no shadow at all, ever
   (including on hover), with a hairline edge instead. */
html[data-sd-cards="elevated"] .product-card,
html[data-sd-cards="elevated"] .shop-card,
html[data-sd-cards="elevated"] .grocery-card,
html[data-sd-cards="elevated"] .card {
  transition: transform .18s ease, box-shadow .18s ease;
}
html[data-sd-cards="elevated"] .product-card:hover,
html[data-sd-cards="elevated"] .shop-card:hover,
html[data-sd-cards="elevated"] .grocery-card:hover,
html[data-sd-cards="elevated"] .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .16), 0 3px 8px rgba(15, 23, 42, .08);
}
html[data-sd-cards="flat"] .product-card,
html[data-sd-cards="flat"] .shop-card,
html[data-sd-cards="flat"] .grocery-card,
html[data-sd-cards="flat"] .card {
  box-shadow: none !important;
  border: 1px solid rgba(148, 163, 184, .38) !important;
}
html[data-sd-cards="flat"] .product-card:hover,
html[data-sd-cards="flat"] .shop-card:hover,
html[data-sd-cards="flat"] .grocery-card:hover,
html[data-sd-cards="flat"] .card:hover {
  transform: none !important;
}
html[data-sd-btn="pill"] .btn,
html[data-sd-btn="pill"] button.btn,
html[data-sd-btn="pill"] .buy-btn { border-radius: 999px !important; }
html[data-sd-btn="sharp"] .btn,
html[data-sd-btn="sharp"] button.btn,
html[data-sd-btn="sharp"] .buy-btn { border-radius: 4px !important; }

/* ---------- mystery gift button ----------------------------------------- */
#sdMysteryBtn {
  position: fixed;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: var(--sd-on-brand, #fff);
  background: linear-gradient(135deg, var(--sd-primary, #7c3aed) 0%, var(--sd-secondary, #db2777) 100%);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--sd-primary, #7c3aed) 34%, transparent), 0 3px 10px rgba(0, 0, 0, .18);
  animation: sdGiftFloat 2.8s ease-in-out infinite;
  transition: transform .2s ease, box-shadow .2s ease;
}
#sdMysteryBtn:hover { transform: translateY(-3px) scale(1.03); }
#sdMysteryBtn .sd-gift-emoji { font-size: 22px; line-height: 1; animation: sdGiftWiggle 2.4s ease-in-out infinite; }
#sdMysteryBtn .sd-gift-label { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sdMysteryBtn.sd-mystery-hidden {
  padding: 10px;
  width: 44px;
  height: 44px;
  justify-content: center;
  opacity: .42;
  background: rgba(124, 58, 237, .9);
}
#sdMysteryBtn.sd-mystery-hidden:hover { opacity: 1; }
#sdMysteryBtn.sd-mystery-hidden .sd-gift-label { display: none; }
#sdMysteryBtn.sd-mystery-box {
  border-radius: 16px;
  background: linear-gradient(160deg, #f59e0b 0%, #ea580c 100%);
  box-shadow: 0 14px 34px rgba(234, 88, 12, .4);
}
#sdMysteryBtn.sd-mystery-gif { background: #111827; padding: 8px; }
/* contain + white plate: an uploaded gift GIF is never cropped into an
   unrecognisable corner (cover used to slice it on the 46px button). */
#sdMysteryBtn.sd-mystery-gif img { width: 46px; height: 46px; border-radius: 10px; object-fit: contain; background: #fff; }
#sdMysteryBtn.sd-pos-bottom-right { right: 18px; bottom: 20px; }
#sdMysteryBtn.sd-pos-bottom-left { left: 18px; bottom: 20px; }
#sdMysteryBtn.sd-pos-top-right { right: 18px; top: 84px; }
#sdMysteryBtn.sd-pos-top-left { left: 18px; top: 84px; }

@keyframes sdGiftFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes sdGiftWiggle {
  0%, 80%, 100% { transform: rotate(0); }
  85% { transform: rotate(-12deg); }
  90% { transform: rotate(10deg); }
  95% { transform: rotate(-6deg); }
}

/* ---------- mystery modal ----------------------------------------------- */
#sdMysteryModal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 6, 23, .62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#sdMysteryModal.sd-open { display: flex; animation: sdFade .25s ease both; }
.sd-mystery-card {
  position: relative;
  width: min(420px, 96vw);
  max-height: 90vh;
  overflow: auto;
  padding: 26px 22px 22px;
  border-radius: 24px;
  text-align: center;
  color: #0f172a;
  background: radial-gradient(120% 100% at 50% 0%, #fff7ed 0%, #ffffff 48%, #f5f3ff 100%);
  box-shadow: 0 30px 90px rgba(2, 6, 23, .45);
  animation: sdMysteryPop .45s cubic-bezier(.22, 1, .36, 1) both;
}
/* A dark admin palette must not leave a glaring white card in the middle of
   the page — the card follows the published surface/text colours instead. */
html[data-sd-theme="on"] .sd-mystery-card {
  color: var(--sd-text, #0f172a);
  background:
    radial-gradient(120% 100% at 50% 0%,
      color-mix(in srgb, var(--sd-primary, #7c3aed) 12%, var(--sd-surface, #fff)) 0%,
      var(--sd-surface, #ffffff) 52%,
      color-mix(in srgb, var(--sd-secondary, #db2777) 10%, var(--sd-surface, #fff)) 100%) !important;
}
html[data-sd-theme="on"] .sd-mystery-line { color: color-mix(in srgb, var(--sd-text, #0f172a) 72%, transparent); }
@keyframes sdMysteryPop {
  0% { transform: scale(.82) translateY(18px); opacity: 0; }
  70% { transform: scale(1.02) translateY(-2px); opacity: 1; }
  100% { transform: none; }
}
.sd-mystery-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(15, 23, 42, .07);
  color: #334155;
  font-size: 16px;
}
.sd-mystery-art {
  width: 96px;
  height: 96px;
  margin: 2px auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .12), 0 10px 26px rgba(124, 58, 237, .18);
  animation: sdGiftWiggle 2.6s ease-in-out infinite;
}
.sd-mystery-art img { width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: 50%; }
.sd-mystery-title { margin: 0 0 6px; font-size: 20px; font-weight: 900; letter-spacing: -.2px; }
.sd-mystery-line { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: #475569; }
.sd-mystery-open {
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 900;
  color: var(--sd-on-brand, #fff);
  background: linear-gradient(135deg, var(--sd-primary, #7c3aed), var(--sd-secondary, #db2777));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--sd-primary, #7c3aed) 32%, transparent);
}
.sd-mystery-open:disabled { opacity: .65; cursor: wait; }
.sd-mystery-result { display: none; margin-top: 16px; }
.sd-mystery-result.sd-show { display: block; animation: sdFade .3s ease both; }
.sd-coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 10px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 900;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .35);
}
.sd-mystery-msg { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: #334155; }
.sd-mystery-login {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  background: #2874f0;
}
.sd-mystery-note { margin-top: 12px; font-size: 10.5px; color: #94a3b8; }

/* ---------- celebration particles --------------------------------------- */
#sdParticles {
  position: fixed;
  inset: 0;
  z-index: 3100;
  pointer-events: none;
  overflow: hidden;
}
.sd-particle {
  position: absolute;
  top: -12px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: .95;
  animation: sdFall linear forwards;
}
@keyframes sdFall {
  0% { transform: translate3d(0, -20px, 0) rotate(0); opacity: 1; }
  100% { transform: translate3d(var(--sd-x, 40px), 108vh, 0) rotate(720deg); opacity: .1; }
}
.sd-spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 12px #fbbf24;
  animation: sdSpark 1.1s ease-out forwards;
}
@keyframes sdSpark {
  0% { transform: scale(.4); opacity: 1; }
  100% { transform: scale(2.4) translate(var(--sd-dx, 0), var(--sd-dy, -60px)); opacity: 0; }
}

/* ---------- small screens ----------------------------------------------- */
@media (max-width: 640px) {
  #sdMysteryBtn { padding: 10px 13px; font-size: 12px; }
  #sdMysteryBtn .sd-gift-label { max-width: 120px; }
  #sdMysteryBtn.sd-pos-bottom-right { right: 12px; bottom: 74px; }
  #sdMysteryBtn.sd-pos-bottom-left { left: 12px; bottom: 74px; }
  .sd-mystery-card { padding: 22px 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  #sdMysteryBtn,
  #sdMysteryBtn .sd-gift-emoji,
  .sd-mystery-art,
  .sd-header,
  body { animation: none !important; }
}
