/* GACHA MALL /test2 redesign — one canonical layer for hero, curated machines
   and the draw stage. The production /test namespace does not load this file. */

body.gm-test2-motion {
  --gm2-surface: #fffdf8;
  --gm2-surface-2: #f2f0f8;
  --gm2-panel: rgba(255,255,255,.9);
  --gm2-ink: #17151f;
  --gm2-dim: #686475;
  --gm2-line: rgba(23,21,31,.11);
  --gm2-accent: #7454ea;
  --gm2-accent-2: #c7ff32;
  --gm2-machine-plaque: rgba(255,255,255,.94);
  --gm2-machine-shadow: 0 18px 46px rgba(31,24,63,.13);
}

html.gm-dark body.gm-test2-motion {
  --gm2-surface: #0d0b14;
  --gm2-surface-2: #151221;
  --gm2-panel: rgba(20,17,31,.94);
  --gm2-ink: #f6f4ff;
  --gm2-dim: #aaa5bd;
  --gm2-line: rgba(255,255,255,.1);
  --gm2-accent: #a08aff;
  --gm2-accent-2: #c7ff32;
  --gm2-machine-plaque: rgba(16,13,25,.94);
  --gm2-machine-shadow: 0 24px 56px rgba(0,0,0,.42);
}

/* ── Clean campaign hero: no embedded borders, bulbs, pink rails or dot nav. ── */
body.gm-test2-motion #gm2-hero {
  position: relative;
  isolation: isolate;
  width: min(calc(100% - 24px), 1440px);
  min-height: clamp(260px, 22vw, 338px);
  margin: 14px auto 12px;
  overflow: hidden;
  border: 1px solid var(--gm2-line);
  border-radius: 28px;
  background: var(--gm2-surface-2);
  box-shadow: 0 22px 58px rgba(31,24,63,.12);
  color: var(--gm2-ink);
}

html.gm-dark body.gm-test2-motion #gm2-hero {
  box-shadow: 0 30px 72px rgba(0,0,0,.42);
}

body.gm-test2-motion .gm2-hero__image,
body.gm-test2-motion .gm2-hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

body.gm-test2-motion .gm2-hero__image {
  z-index: -3;
  object-fit: cover;
  object-position: center 53%;
  filter: saturate(.88) contrast(.96) brightness(1.17);
  transform: scale(1.015);
}

html.gm-dark body.gm-test2-motion .gm2-hero__image {
  filter: saturate(.9) contrast(1.02) brightness(.88);
}

body.gm-test2-motion .gm2-hero__shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255,253,248,.98) 0 35%, rgba(255,253,248,.84) 51%, rgba(255,253,248,.08) 78%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(244,241,250,.28));
}

html.gm-dark body.gm-test2-motion .gm2-hero__shade {
  background:
    linear-gradient(90deg, rgba(9,7,16,.98) 0 35%, rgba(9,7,16,.86) 51%, rgba(9,7,16,.12) 79%),
    linear-gradient(180deg, rgba(12,9,24,.02), rgba(7,5,13,.34));
}

body.gm-test2-motion .gm2-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: inherit;
  max-width: 790px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 58px) clamp(24px, 5vw, 72px);
}

body.gm-test2-motion .gm2-hero__eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 9px;
  color: var(--gm2-accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .15em;
}

body.gm-test2-motion .gm2-hero__eyebrow i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gm2-accent-2);
  box-shadow: 0 0 0 4px rgba(199,255,50,.15), 0 0 18px rgba(199,255,50,.55);
}

body.gm-test2-motion #gm2-hero h1 {
  margin: 13px 0 0;
  color: var(--gm2-ink);
  font-size: clamp(36px, 4.6vw, 68px);
  font-weight: 950;
  letter-spacing: -.055em;
  line-height: .98;
  text-wrap: balance;
}

body.gm-test2-motion #gm2-hero h1 strong {
  color: var(--gm2-accent);
  font-weight: inherit;
}

html.gm-dark body.gm-test2-motion #gm2-hero h1 strong {
  color: var(--gm2-accent-2);
}

body.gm-test2-motion #gm2-hero p {
  max-width: 590px;
  margin: 16px 0 0;
  color: var(--gm2-dim);
  font-size: clamp(13px, 1.1vw, 16px);
  font-weight: 720;
  line-height: 1.65;
}

body.gm-test2-motion .gm2-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

body.gm-test2-motion .gm2-hero__actions button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 1px solid var(--gm2-line);
  border-radius: 14px;
  background: var(--gm2-panel);
  color: var(--gm2-ink);
  padding: 0 17px;
  box-shadow: 0 10px 24px rgba(31,24,63,.1);
  font-size: 13px;
  font-weight: 900;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

body.gm-test2-motion .gm2-hero__actions button:first-child {
  border-color: transparent;
  background: var(--gm2-accent-2);
  color: #15180d;
}

body.gm-test2-motion .gm2-hero__actions button:hover,
body.gm-test2-motion .gm2-hero__actions button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gm2-accent);
  outline: none;
}

body.gm-test2-motion .gm2-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 20px;
  color: var(--gm2-dim);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

body.gm-test2-motion .gm2-hero__meta span:not(:first-child)::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 11px 2px 0;
  border-radius: 50%;
  background: var(--gm2-accent);
}

body.gm-test2-motion .gm2-hero__edition {
  position: absolute;
  right: clamp(20px, 3.5vw, 52px);
  bottom: clamp(18px, 2.8vw, 38px);
  z-index: 2;
  display: grid;
  min-width: 126px;
  justify-items: end;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.72);
}

body.gm-test2-motion .gm2-hero__edition small,
body.gm-test2-motion .gm2-hero__edition span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
}

body.gm-test2-motion .gm2-hero__edition strong {
  font-size: 44px;
  font-weight: 950;
  letter-spacing: -.05em;
  line-height: .95;
}

/* ── 1F / 10-machine curation. ── */
body.gm-test2-motion .floor-line[hidden],
body.gm-test2-motion .floor-nav__item[hidden],
body.gm-test2-motion .compact-machine[hidden],
body.gm-test2-motion .gm-filter[hidden] {
  display: none !important;
}

body.gm-test2-motion .gm-curated-store .floor-nav {
  align-content: start;
}

body.gm-test2-motion .gm-curated-store .gacha-shop-scene {
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(0,1fr) !important;
}

body.gm-test2-motion .gm-curated-line {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  border: 1px solid var(--gm2-line) !important;
  border-radius: 28px !important;
  background: var(--gm2-panel) !important;
  padding: 12px !important;
  box-shadow: 0 24px 62px rgba(31,24,63,.1) !important;
}

html.gm-dark body.gm-test2-motion .gm-curated-line {
  box-shadow: 0 28px 72px rgba(0,0,0,.38) !important;
}

body.gm-test2-motion .gm-curated-line::before,
body.gm-test2-motion .gm-curated-line::after,
body.gm-test2-motion .gm-curated-line .machine-wall::before,
body.gm-test2-motion .gm-curated-line .machine-wall::after {
  content: none !important;
  display: none !important;
}

body.gm-test2-motion .gm-curated-line .floor-line__header {
  border: 1px solid var(--gm2-line) !important;
  background: var(--gm2-surface) !important;
  color: var(--gm2-ink) !important;
  box-shadow: none !important;
}

body.gm-test2-motion .gm-curated-line .floor-line__copy strong,
body.gm-test2-motion .gm-curated-line .floor-line__copy small {
  color: var(--gm2-ink) !important;
}

body.gm-test2-motion .gm-curated-line .floor-line__copy small {
  color: var(--gm2-dim) !important;
}

body.gm-test2-motion .gm-curated-line .machine-wall {
  overflow: visible !important;
  border: 0 !important;
  border-radius: 22px !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--gm2-surface-2) 84%, transparent), color-mix(in srgb, var(--gm2-surface) 92%, transparent)) !important;
  padding: 18px 14px 22px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08) !important;
}

body.gm-test2-motion .gm-curated-line .machine-wall__track,
body.gm-test2-motion .gm-curated-line.floor-line--expanded .machine-wall__track {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0,1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
  overflow: visible !important;
}

body.gm-test2-motion .gm-curated-line .gm2-machine-card {
  display: grid !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  grid-template-rows: auto minmax(122px,auto) !important;
  align-content: start !important;
  overflow: visible !important;
  border: 1px solid var(--gm2-line) !important;
  border-radius: 22px !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--gm2-surface) 92%, transparent), var(--gm2-surface-2)) !important;
  padding: 10px 9px 9px !important;
  box-shadow: var(--gm2-machine-shadow) !important;
  contain: layout style !important;
  content-visibility: visible !important;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), border-color .22s ease, box-shadow .22s ease !important;
}

body.gm-test2-motion .gm-curated-line .gm2-machine-card:hover,
body.gm-test2-motion .gm-curated-line .gm2-machine-card:focus-visible {
  transform: translateY(-6px) !important;
  border-color: color-mix(in srgb, var(--gm2-accent) 54%, transparent) !important;
  box-shadow: 0 26px 58px rgba(31,24,63,.2) !important;
  outline: none !important;
}

html.gm-dark body.gm-test2-motion .gm-curated-line .gm2-machine-card:hover,
html.gm-dark body.gm-test2-motion .gm-curated-line .gm2-machine-card:focus-visible {
  box-shadow: 0 30px 68px rgba(0,0,0,.58), 0 0 0 1px rgba(199,255,50,.2) !important;
}

body.gm-test2-motion .gm-curated-line .gm2-machine-card .compact-machine__body {
  display: grid !important;
  min-height: 0 !important;
  place-items: center !important;
  margin: 0 !important;
  overflow: visible !important;
  padding: 2px 0 0 !important;
  background: transparent !important;
}

body.gm-test2-motion .gm-curated-line .machine-visual--prototype.machine-visual--mini {
  width: min(100%, 205px) !important;
  height: auto !important;
  aspect-ratio: 970 / 1617 !important;
  margin: 0 auto !important;
}

body.gm-test2-motion .gm-curated-line .machine-visual--prototype::before {
  inset: 8% 5% 4% !important;
  border-radius: 28% !important;
  background: radial-gradient(circle at 50% 10%, rgba(116,84,234,.2), transparent 42%) !important;
  filter: blur(16px) !important;
}

body.gm-test2-motion .gm-curated-line .machine-visual--prototype .gm-prototype-frame {
  filter: brightness(1.18) saturate(.78) contrast(.96) drop-shadow(0 14px 20px rgba(54,45,92,.2)) !important;
}

html.gm-dark body.gm-test2-motion .gm-curated-line .machine-visual--prototype .gm-prototype-frame {
  filter: brightness(1.06) saturate(.92) contrast(1.04) drop-shadow(0 18px 26px rgba(0,0,0,.52)) !important;
}

body.gm-test2-motion .gm-curated-line .machine-visual__glass-sticker {
  border: 1px solid rgba(255,255,255,.86) !important;
  background: #fff !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.16), inset 0 0 0 1px rgba(23,21,31,.06) !important;
  filter: saturate(1.02) contrast(1.02) !important;
}

body.gm-test2-motion .gm-curated-line .compact-machine__info {
  display: grid !important;
  min-height: 122px !important;
  align-content: start !important;
  margin: 7px 0 0 !important;
  border: 1px solid var(--gm2-line) !important;
  border-radius: 15px !important;
  background: var(--gm2-machine-plaque) !important;
  padding: 11px 12px 10px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08) !important;
  color: var(--gm2-ink) !important;
}

body.gm-test2-motion .gm-curated-line .compact-machine__info p {
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--gm2-accent) !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .08em !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body.gm-test2-motion .gm-curated-line .compact-machine__info h3 {
  display: -webkit-box !important;
  min-height: 2.7em !important;
  margin: 6px 0 9px !important;
  overflow: hidden !important;
  color: var(--gm2-ink) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: -.02em !important;
  line-height: 1.34 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

body.gm-test2-motion .gm-curated-line .compact-machine__info > div {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 5px !important;
  margin-top: auto !important;
}

body.gm-test2-motion .gm-curated-line .compact-machine__info > div span,
body.gm-test2-motion .gm-curated-line .compact-machine__info > div span:first-child,
body.gm-test2-motion .gm-curated-line .compact-machine__info > div .compact-machine__low {
  display: inline-flex !important;
  min-width: 0 !important;
  align-items: center !important;
  gap: 4px !important;
  border: 1px solid var(--gm2-line) !important;
  border-radius: 999px !important;
  background: var(--gm2-surface-2) !important;
  padding: 5px 7px !important;
  box-shadow: none !important;
  color: var(--gm2-dim) !important;
  font-family: inherit !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-shadow: none !important;
}

body.gm-test2-motion .gm-curated-line .compact-machine__info > div span:first-child {
  color: var(--gm2-ink) !important;
}

body.gm-test2-motion .gm-curated-line .compact-machine__info > div svg {
  color: var(--gm2-accent) !important;
  filter: none !important;
}

/* ── Draw detail: same machine geometry, different room treatment per theme. ── */
body.gm-test2-motion .gm-prototype-detail {
  background: rgba(18,16,26,.72) !important;
  backdrop-filter: none !important;
}

body.gm-test2-motion .gm-prototype-detail > div {
  border-color: var(--gm2-line) !important;
  background: var(--gm2-surface) !important;
  box-shadow: 0 30px 90px rgba(24,18,58,.28) !important;
}

html.gm-dark body.gm-test2-motion .gm-prototype-detail > div {
  box-shadow: 0 36px 110px rgba(0,0,0,.62) !important;
}

body.gm-test2-motion .gm-prototype-detail .machine-detail-stage > .mt-5 {
  border: 1px solid var(--gm2-line) !important;
  background:
    radial-gradient(circle at 50% 10%, rgba(116,84,234,.16), transparent 34%),
    linear-gradient(180deg, #fbfaff, #eceaf5) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 22px 56px rgba(44,34,86,.12) !important;
}

html.gm-dark body.gm-test2-motion .gm-prototype-detail .machine-detail-stage > .mt-5 {
  border-color: rgba(255,255,255,.1) !important;
  background:
    radial-gradient(circle at 50% 10%, rgba(199,255,50,.13), transparent 30%),
    linear-gradient(180deg, #151222, #090711) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 26px 70px rgba(0,0,0,.52) !important;
}

body.gm-test2-motion .gm-prototype-detail .machine-visual--prototype.machine-visual--detail {
  width: min(460px, 78vw) !important;
  height: auto !important;
  aspect-ratio: 970 / 1617 !important;
}

body.gm-test2-motion .gm-prototype-detail .machine-visual--prototype .gm-prototype-frame {
  filter: brightness(1.2) saturate(.78) contrast(.96) drop-shadow(0 28px 38px rgba(41,31,78,.24)) !important;
}

html.gm-dark body.gm-test2-motion .gm-prototype-detail .machine-visual--prototype .gm-prototype-frame {
  filter: brightness(1.12) saturate(.95) contrast(1.05) drop-shadow(0 32px 46px rgba(0,0,0,.58)) !important;
}

body.gm-test2-motion .gm-prototype-detail .machine-detail-panel {
  border: 1px solid var(--gm2-line) !important;
  background: var(--gm2-panel) !important;
  color: var(--gm2-ink) !important;
  box-shadow: none !important;
}

body.gm-test2-motion .gm-prototype-detail .machine-detail-panel h2,
body.gm-test2-motion .gm-prototype-detail .machine-detail-panel h3,
body.gm-test2-motion .gm-prototype-detail .machine-detail-panel .text-ink {
  color: var(--gm2-ink) !important;
}

body.gm-test2-motion .gm-prototype-detail .machine-detail-panel .text-graphite\/70,
body.gm-test2-motion .gm-prototype-detail .machine-detail-panel .text-graphite\/62 {
  color: var(--gm2-dim) !important;
}

body.gm-test2-motion .gm-prototype-detail .machine-visual--prototype.machine-visual--active,
body.gm-test2-motion .gm-prototype-detail .machine-visual--prototype.machine-visual--active .gm-prototype-frame {
  animation: none !important;
}

/* Match React's real state clock: mixing 1.28–2.68s, dispensing 2.68–4.18s. */
body.gm-test2-motion .machine-visual--prototype[data-gm2-phase="cranking"] .gm2-knob-layer,
body.gm-test2-motion .machine-visual--prototype[data-gm2-phase="cranking"] .gm2-knob-ring,
body.gm-test2-motion .machine-visual--prototype[data-gm2-phase="cranking"] > .gm-prototype-frame,
body.gm-test2-motion .machine-visual--prototype[data-gm2-phase="cranking"] > .machine-visual__glass,
body.gm-test2-motion .machine-visual--prototype[data-gm2-phase="cranking"] > .gm2-effects {
  animation-duration: 1.34s !important;
}

body.gm-test2-motion .machine-visual--prototype[data-gm2-phase="dispensing"] .gm2-chute-glow,
body.gm-test2-motion .machine-visual--prototype[data-gm2-phase="dispensing"] .gm2-capsule {
  animation-duration: 1.46s !important;
}

body.gm-test2-motion .reward-modal {
  border: 1px solid var(--gm2-line) !important;
  background: var(--gm2-surface) !important;
  color: var(--gm2-ink) !important;
}

@media (min-width: 1101px) and (max-width: 1500px) {
  body.gm-test2-motion .gm-curated-line .machine-wall__track,
  body.gm-test2-motion .gm-curated-line.floor-line--expanded .machine-wall__track {
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  }
}

@media (max-width: 900px) {
  body.gm-test2-motion #gm2-hero {
    min-height: 420px;
    border-radius: 22px;
  }

  body.gm-test2-motion .gm2-hero__image {
    object-position: 67% center;
  }

  body.gm-test2-motion .gm2-hero__shade {
    background: linear-gradient(180deg, rgba(255,253,248,.96) 0 55%, rgba(255,253,248,.66) 72%, rgba(255,253,248,.08) 100%);
  }

  html.gm-dark body.gm-test2-motion .gm2-hero__shade {
    background: linear-gradient(180deg, rgba(9,7,16,.98) 0 58%, rgba(9,7,16,.68) 76%, rgba(9,7,16,.16) 100%);
  }

  body.gm-test2-motion .gm2-hero__content {
    min-height: 420px;
    justify-content: flex-start;
    padding: 28px 22px;
  }

  body.gm-test2-motion #gm2-hero h1 {
    font-size: clamp(36px, 11vw, 52px);
  }

  body.gm-test2-motion #gm2-hero p {
    max-width: 440px;
  }

  body.gm-test2-motion .gm2-hero__edition {
    right: 18px;
    bottom: 17px;
  }

  body.gm-test2-motion .gm-curated-line .machine-wall__track,
  body.gm-test2-motion .gm-curated-line.floor-line--expanded .machine-wall__track {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 10px !important;
  }

  body.gm-test2-motion .gm-curated-line .gm2-machine-card {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 7px !important;
  }

  body.gm-test2-motion .gm-curated-line .machine-visual--prototype.machine-visual--mini {
    width: 100% !important;
    max-width: 176px !important;
    height: auto !important;
  }

  body.gm-test2-motion .gm-curated-line .compact-machine__info {
    min-height: 116px !important;
    margin-top: 4px !important;
    padding: 9px !important;
  }
}

@media (max-width: 520px) {
  body.gm-test2-motion #gm2-hero {
    width: calc(100% - 20px);
    min-height: 446px;
    margin-top: 10px;
  }

  body.gm-test2-motion .gm2-hero__content {
    min-height: 446px;
    padding: 24px 18px;
  }

  body.gm-test2-motion .gm2-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    width: min(100%, 300px);
  }

  body.gm-test2-motion .gm2-hero__actions button {
    width: 100%;
  }

  body.gm-test2-motion .gm2-hero__meta {
    display: none;
  }

  body.gm-test2-motion .gm-curated-line {
    padding: 8px !important;
  }

  body.gm-test2-motion .gm-curated-line .machine-wall {
    padding: 10px 7px 14px !important;
  }

  body.gm-test2-motion .gm-curated-line .compact-machine__info h3 {
    font-size: 10.5px !important;
  }

  body.gm-test2-motion .gm-curated-line .compact-machine__info > div span,
  body.gm-test2-motion .gm-curated-line .compact-machine__info > div span:first-child {
    padding: 4px 5px !important;
    font-size: 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.gm-test2-motion #gm2-hero *,
  body.gm-test2-motion .gm2-machine-card {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
