/* Paid theme scenes and small decorative UI accents.
   Kept separate from the theme palettes so every collectible preview owns its colors. */

/* Scene-local palettes: shop thumbnails stay true to their theme regardless of the
   currently selected page theme. */
.theme-scene[data-scene-theme="spongebob"] {
  --scene-a: #c6eef7;
  --scene-b: #edfafd;
  --scene-ink: #164c63;
  --scene-accent: #238db5;
  --scene-warm: #e4c457;
  --scene-soft: #fff9e7;
}
.theme-scene[data-scene-theme="new-year"] {
  --scene-a: #f7e7d2;
  --scene-b: #fff8ec;
  --scene-ink: #60353b;
  --scene-accent: #a94752;
  --scene-warm: #bc8947;
  --scene-soft: #fff9f0;
}
.theme-scene[data-scene-theme="hangyodon"] {
  --scene-a: #c9eeea;
  --scene-b: #f0faf7;
  --scene-ink: #20545c;
  --scene-accent: #318f94;
  --scene-warm: #e78388;
  --scene-soft: #fff5f3;
}
.theme-scene[data-scene-theme="cinnamoroll"] {
  --scene-a: #f5f0e5;
  --scene-b: #f5faff;
  --scene-ink: #45586b;
  --scene-accent: #85a9c4;
  --scene-warm: #dbaec7;
  --scene-soft: #fffdf7;
}
.theme-scene[data-scene-theme="starlight"] {
  --scene-a: #e7e9ef;
  --scene-b: #f7f7fa;
  --scene-ink: #424b5a;
  --scene-accent: #818c9f;
  --scene-warm: #aaa0bc;
  --scene-soft: #fcfbff;
}

.theme-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
  isolation: isolate;
  border-radius: inherit;
  color: var(--scene-ink, #445);
  pointer-events: none;
}
.theme-scene *,
.theme-burst * {
  pointer-events: none;
}
.scene-ground,
.scene-orbit,
.scene-motifs {
  position: absolute;
  pointer-events: none;
}
.scene-ground {
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background-color: var(--scene-b, #f7f7f7);
}
.scene-orbit {
  z-index: 1;
  border: 1px solid color-mix(in srgb, var(--scene-accent) 30%, white);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--scene-a) 22%, transparent);
}
.scene-motifs {
  z-index: 2;
  inset: 0;
}
.scene-motif {
  position: absolute;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--scene-accent, #71869a);
  opacity: .76;
  filter: drop-shadow(0 2px 2px #273d4a16);
  transform-origin: center;
  animation: scene-drift 6.8s ease-in-out infinite;
}
.scene-motif:nth-child(even) { animation-delay: -3.4s; }
.scene-motif .theme-symbol,
.scene-motif svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.scene-mascot {
  position: absolute;
  z-index: 3;
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 6px 6px #28394729);
  transform-origin: center bottom;
  animation: scene-mascot-bob 5s ease-in-out infinite;
}
.scene-caption {
  position: absolute;
  z-index: 4;
  max-width: calc(100% - 20px);
  padding: 4px 9px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--scene-accent) 22%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--scene-soft) 94%, white);
  color: var(--scene-ink);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: .035em;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 8px #263b4912;
}

/* Home hero: a soft illustrated surround sits behind the original wheel and labels. */
.hero-wheel { isolation: isolate; }
.scene-home {
  border-radius: 34px;
  overflow: visible;
}
.scene-home .scene-ground {
  inset: 4px 0;
  border-radius: 36px;
}
.scene-home .scene-orbit {
  inset: 8px 7px;
  border-style: dotted;
}
.scene-home .scene-motif {
  width: 23px;
  height: 23px;
}
.scene-home .motif-1 { left: 3%; top: 30%; }
.scene-home .motif-2 { left: 18%; top: 3%; }
.scene-home .motif-3 { right: 18%; top: 3%; }
.scene-home .motif-4 { right: 3%; top: 30%; }
.scene-home .motif-5 { right: 5%; bottom: 13%; }
.scene-home .motif-6 { right: 28%; bottom: 1%; }
.scene-home .motif-7 { left: 28%; bottom: 1%; }
.scene-home .motif-8 { left: 5%; bottom: 13%; }
.scene-home .scene-caption { top: 2px; right: 7px; }
.scene-home .scene-mascot {
  left: -7px;
  bottom: 5px;
  width: 96px;
  height: 96px;
}
.hero-disc { z-index: 1; }
.hero-label { z-index: 2; }
.hero-center { z-index: 3; }
.hero-pointer { z-index: 4; }
.hero-wheel.theme-active > .theme-hero-mascot { display: none; }

/* The wheel screen gets a padded, themed ring; all icons sit outside the canvas. */
.wheel-wrap {
  padding: 15px;
  isolation: isolate;
}
.scene-wheel {
  border-radius: 50%;
  overflow: visible;
}
.scene-wheel .scene-ground {
  inset: 1px;
  border-radius: 50%;
}
.scene-wheel .scene-orbit {
  inset: 1px;
  border-style: dotted;
}
.scene-wheel .scene-motif {
  width: 22px;
  height: 22px;
}
.scene-wheel .motif-1 { left: 7%; top: 13%; }
.scene-wheel .motif-2 { left: 43%; top: 1%; }
.scene-wheel .motif-3 { right: 7%; top: 13%; }
.scene-wheel .motif-4 { right: 1%; top: 43%; }
.scene-wheel .motif-5 { right: 7%; bottom: 12%; }
.scene-wheel .motif-6 { left: 43%; bottom: 1%; }
.scene-wheel .motif-7 { left: 7%; bottom: 12%; }
.scene-wheel .motif-8 { left: 1%; top: 43%; }
.scene-wheel .scene-caption { right: 19px; bottom: 1px; }
.wheel-wrap canvas { position: relative; z-index: 2; }
.wheel-pointer { z-index: 3; }
.wheel-hub { z-index: 4; }

/* Compact gallery art and the optional wide card preview. */
.theme-card {
  position: relative;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border-radius: 17px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.theme-card.is-current {
  border-color: color-mix(in srgb, var(--theme-control, #8058aa) 55%, white);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-control, #8058aa) 18%, transparent),
    0 7px 20px var(--theme-shadow-soft, #36204d12);
}
.theme-card:hover { transform: translateY(-1px); }
.theme-art {
  position: relative;
  width: 132px;
  height: 130px;
  min-width: 0;
  border: 1px solid #ffffffbd;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px #3e50600c, 0 5px 14px #30445412;
}
.theme-art .scene-art {
  inset: 0;
  border-radius: inherit;
}
.scene-art .scene-orbit {
  inset: 9px;
  border-style: dotted;
}
.scene-art .scene-motif {
  width: 19px;
  height: 19px;
}
.scene-art .motif-1 { left: 8%; top: 12%; }
.scene-art .motif-2 { right: 13%; top: 9%; }
.scene-art .motif-3 { right: 5%; top: 44%; }
.scene-art .motif-4 { right: 13%; bottom: 8%; }
.scene-art .motif-5 { left: 8%; bottom: 12%; }
.scene-art .motif-6 { left: 3%; top: 45%; }
.scene-art .motif-7 { left: 36%; top: 4%; }
.scene-art .motif-8 { right: 35%; bottom: 3%; }
.scene-art .scene-mascot {
  left: 50%;
  top: 51%;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  animation: scene-mascot-bob 4.8s ease-in-out infinite;
}
.scene-art .scene-caption {
  top: 7px;
  left: 50%;
  padding: 3px 7px;
  font-size: 8px;
  transform: translateX(-50%);
}
.theme-detail { align-self: center; }
.theme-benefits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin: 8px 0 0;
  padding: 0;
  color: var(--ink);
  list-style: none;
  font-size: 10px;
  line-height: 1.45;
}
.theme-benefits li {
  position: relative;
  padding-left: 12px;
  color: var(--muted);
}
.theme-benefits li::before {
  position: absolute;
  left: 0;
  top: .52em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--theme-control, #8058aa);
  content: "";
}
.theme-preview-button,
.theme-decor-controls .decor-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--theme-edge, var(--line, #deded1));
  border-radius: 10px;
  background: var(--theme-wash, #fff);
  color: var(--theme-deep, var(--ink, #2d352b));
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.theme-preview-button { grid-column: 1 / -1; width: 100%; }
.theme-preview-button { cursor: pointer; list-style: none; }
.theme-preview-button::-webkit-details-marker { display: none; }
.theme-preview-button::after { content: "+"; margin-left: auto; font-size: 18px; }
.theme-preview[open] > .theme-preview-button::after { content: "−"; }
.theme-preview-button:hover,
.theme-decor-controls .decor-toggle:hover { background: var(--theme-control-soft, #f2e9ff); }
.theme-preview-button:active,
.theme-decor-controls .decor-toggle:active { transform: translateY(1px); }
.theme-preview {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--theme-control, #8058aa) 22%, white);
  border-radius: 15px;
  background: var(--theme-wash, #fff);
  box-shadow: inset 0 1px 0 #fff;
}
.scene-preview {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: inherit;
}
.scene-preview .scene-ground { border-radius: inherit; }
.scene-preview .scene-orbit {
  top: 10px;
  bottom: 9px;
  left: 50%;
  width: 164px;
  border-style: dashed;
  transform: translateX(-50%);
}
.scene-preview .scene-motif {
  width: 24px;
  height: 24px;
}
.scene-preview .motif-1 { left: calc(50% - 108px); top: 22px; }
.scene-preview .motif-2 { left: calc(50% - 73px); top: 12px; }
.scene-preview .motif-3 { left: calc(50% + 53px); top: 15px; }
.scene-preview .motif-4 { left: calc(50% + 82px); top: 67px; }
.scene-preview .motif-5 { left: calc(50% + 51px); bottom: 13px; }
.scene-preview .motif-6 { left: calc(50% - 75px); bottom: 12px; }
.scene-preview .motif-7 { left: calc(50% - 110px); top: 100px; }
.scene-preview .motif-8 { left: calc(50% + 91px); top: 111px; }
.scene-preview .scene-mini-disc {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 94px;
  height: 94px;
  border: 5px solid var(--scene-soft);
  border-radius: 50%;
  background: conic-gradient(from -20deg, var(--scene-a), var(--scene-b), color-mix(in srgb, var(--scene-warm) 30%, var(--scene-b)), var(--scene-a));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--scene-accent) 27%, white), 0 8px 18px #293e4a22;
  transform: translate(-50%, -50%);
}
.scene-mini-disc { display: grid; place-items: center; }
.scene-mini-disc > span { padding: 6px; border-radius: 50%; background: var(--scene-soft); color: var(--scene-ink); font-size: 13px; font-weight: 800; }
.scene-home .scene-mascot, .passport-mascot, .result-mascot { border-radius: 12px; }
.scene-preview .scene-mascot {
  z-index: 3;
  top: auto;
  right: calc(50% - 91px);
  bottom: 8px;
  left: auto;
  width: 68px;
  height: 68px;
}
.scene-preview .scene-caption {
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
}
.theme-preview-note {
  padding: 9px 12px 10px;
  border-top: 1px solid color-mix(in srgb, var(--theme-control, #8058aa) 16%, white);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

/* Five distinctly drawn scene worlds. SpongeBob: sunlit water, bubble trails, and
   a soft scallop-like tide pattern. Yellow is only a small decorative glint. */
.theme-scene[data-scene-theme="spongebob"] .scene-ground {
  background:
    radial-gradient(circle at 14% 23%, #ffffffd9 0 2px, #83d5e9a8 3px 7px, transparent 8px),
    radial-gradient(circle at 81% 54%, #ffffffcf 0 2px, #69c4dfa0 3px 6px, transparent 7px),
    radial-gradient(ellipse at 18% 79%, #ffffffa8 0, transparent 37%),
    linear-gradient(148deg, #e6f9fc 0%, #bfeef6 52%, #def7fb 100%);
}
.theme-scene[data-scene-theme="spongebob"] .scene-ground::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, transparent 0 16px, #218bb316 17px 18px, transparent 19px) 0 0 / 42px 25px repeat;
  opacity: .72;
  content: "";
}
.theme-scene[data-scene-theme="spongebob"] .scene-ground::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 33% 46%, #ffffffbd 0 2px, transparent 3px),
    radial-gradient(circle at 38% 38%, #ffffff99 0 3px, transparent 4px),
    radial-gradient(circle at 70% 34%, #ffffffb5 0 2px, transparent 3px),
    radial-gradient(circle at 74% 27%, #ffffff8c 0 4px, transparent 5px),
    radial-gradient(circle at 95% 78%, #e7c65d85 0 2px, transparent 3px);
  content: "";
}
.theme-scene[data-scene-theme="spongebob"] .scene-orbit {
  border-color: #54b7d58c;
  border-style: dotted;
  box-shadow: inset 0 0 0 4px #ffffff44, 0 0 0 4px #fff8;
}
.theme-scene[data-scene-theme="spongebob"] .scene-motif {
  color: #258db2;
  filter: drop-shadow(0 2px 2px #14567424);
}
.theme-scene[data-scene-theme="spongebob"] .motif-1,
.theme-scene[data-scene-theme="spongebob"] .motif-5 { color: #d0a92d; }
.theme-scene[data-scene-theme="spongebob"] .motif-2,
.theme-scene[data-scene-theme="spongebob"] .motif-6 { transform: rotate(-12deg) scale(.84); }
.theme-scene[data-scene-theme="spongebob"] .motif-3,
.theme-scene[data-scene-theme="spongebob"] .motif-7 { transform: rotate(10deg) scale(1.1); }

/* New Year: folded rice-paper warmth, lantern glow and tiny gold confetti. */
.theme-scene[data-scene-theme="new-year"] .scene-ground {
  background:
    radial-gradient(ellipse at 78% 13%, #e8c67858 0 9%, transparent 34%),
    radial-gradient(ellipse at 15% 90%, #ba59651c 0 23%, transparent 52%),
    repeating-linear-gradient(135deg, transparent 0 22px, #a94b5010 23px 24px, transparent 25px 43px),
    linear-gradient(145deg, #fff8ed, #f6e1d8 72%, #fbf2e4);
}
.theme-scene[data-scene-theme="new-year"] .scene-ground::before {
  position: absolute;
  top: -18px;
  right: 16%;
  width: 38px;
  height: 57px;
  border: 1px solid #b86c5b6e;
  border-radius: 48% 48% 44% 44%;
  background: repeating-linear-gradient(90deg, #b9474b1c 0 5px, #f3d7b64f 6px 9px);
  box-shadow: 0 10px 22px #b84d4625;
  transform: rotate(5deg);
  content: "";
}
.theme-scene[data-scene-theme="new-year"] .scene-ground::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 11% 32%, #aa455078 0 2px, transparent 3px),
    radial-gradient(ellipse at 24% 72%, #c297537a 0 2px, transparent 3px),
    radial-gradient(ellipse at 59% 17%, #a9434c75 0 2px, transparent 3px),
    radial-gradient(ellipse at 89% 75%, #c2985c8c 0 2px, transparent 3px),
    radial-gradient(ellipse at 48% 90%, #a9434c55 0 2px, transparent 3px);
  content: "";
}
.theme-scene[data-scene-theme="new-year"] .scene-orbit {
  border: 1px double #b473586b;
  box-shadow: inset 0 0 0 4px #fff4e5b3, 0 0 0 4px #c99d6333;
}
.theme-scene[data-scene-theme="new-year"] .scene-motif { color: #a84450; }
.theme-scene[data-scene-theme="new-year"] .motif-1,
.theme-scene[data-scene-theme="new-year"] .motif-5 { color: #a77b3d; }
.theme-scene[data-scene-theme="new-year"] .motif-2,
.theme-scene[data-scene-theme="new-year"] .motif-6 { transform: rotate(12deg) scale(.88); }
.theme-scene[data-scene-theme="new-year"] .motif-3,
.theme-scene[data-scene-theme="new-year"] .motif-7 { transform: rotate(-12deg) scale(1.08); }

/* Hangyodon: clear lagoon ripples, rising bubbles and a low coral/sea-grass reef. */
.theme-scene[data-scene-theme="hangyodon"] .scene-ground {
  background:
    radial-gradient(ellipse at 18% 24%, #ffffffaa 0 13%, transparent 37%),
    repeating-radial-gradient(ellipse at 48% 108%, transparent 0 19px, #4cabb225 20px 21px, transparent 22px 37px),
    linear-gradient(155deg, #e9f9f5, #bfeae7 66%, #e2f6f3);
}
.theme-scene[data-scene-theme="hangyodon"] .scene-ground::before {
  position: absolute;
  inset: auto 0 0;
  height: 29%;
  background: linear-gradient(0deg, #57a99e28, #57a99e00);
  clip-path: polygon(0 72%, 6% 68%, 11% 75%, 15% 30%, 19% 75%, 24% 67%, 30% 77%, 35% 42%, 39% 76%, 46% 70%, 53% 77%, 58% 39%, 63% 77%, 71% 65%, 76% 74%, 82% 26%, 86% 76%, 93% 65%, 100% 73%, 100% 100%, 0 100%);
  content: "";
}
.theme-scene[data-scene-theme="hangyodon"] .scene-ground::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 17% 47%, #ffffffc4 0 2px, transparent 3px),
    radial-gradient(circle at 21% 39%, #ffffff8c 0 3px, transparent 4px),
    radial-gradient(circle at 84% 33%, #ffffffb0 0 2px, transparent 3px),
    radial-gradient(ellipse at 7% 83%, #e783883d 0 7%, transparent 8%),
    radial-gradient(ellipse at 93% 83%, #e7838838 0 8%, transparent 9%);
  content: "";
}
.theme-scene[data-scene-theme="hangyodon"] .scene-orbit {
  border-color: #4babb485;
  border-style: solid;
  box-shadow: inset 0 0 0 3px #ffffff5e, 0 0 0 4px #e7838826;
}
.theme-scene[data-scene-theme="hangyodon"] .scene-motif { color: #308d93; }
.theme-scene[data-scene-theme="hangyodon"] .motif-1,
.theme-scene[data-scene-theme="hangyodon"] .motif-5 { color: #df7e84; }
.theme-scene[data-scene-theme="hangyodon"] .motif-2,
.theme-scene[data-scene-theme="hangyodon"] .motif-6 { transform: rotate(9deg) scale(.88); }
.theme-scene[data-scene-theme="hangyodon"] .motif-3,
.theme-scene[data-scene-theme="hangyodon"] .motif-7 { transform: rotate(-9deg) scale(1.08); }

/* Cinnamoroll: creamy cloudlike wash, pastel rainbow arc and tiny sky speckles. */
.theme-scene[data-scene-theme="cinnamoroll"] .scene-ground {
  background:
    radial-gradient(ellipse at 50% 5%, #ffffffd9 0 16%, transparent 44%),
    radial-gradient(ellipse at 9% 90%, #efd6e133 0 18%, transparent 40%),
    radial-gradient(ellipse at 94% 83%, #cce4f555 0 20%, transparent 44%),
    radial-gradient(circle, #93b6cb6e 0 1px, transparent 1.6px) 0 0 / 20px 20px,
    linear-gradient(145deg, #fffaf0, #e8f3f8 72%, #f7eef3);
}
.theme-scene[data-scene-theme="cinnamoroll"] .scene-ground::before {
  position: absolute;
  left: 50%;
  bottom: -123px;
  width: 186px;
  height: 186px;
  border: 5px solid #e9bfd4a3;
  border-bottom-color: transparent;
  border-radius: 50%;
  box-shadow: 0 0 0 6px #f2dfb891, 0 0 0 12px #c8e4d5a1, 0 0 0 18px #c7dff0a6;
  transform: translateX(-50%);
  content: "";
}
.theme-scene[data-scene-theme="cinnamoroll"] .scene-ground::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 26%, #d8b4d68c 0 2px, transparent 3px),
    radial-gradient(ellipse at 79% 23%, #dfc2778c 0 2px, transparent 3px),
    radial-gradient(ellipse at 13% 70%, #83b7cf8c 0 2px, transparent 3px),
    radial-gradient(ellipse at 88% 65%, #8ec3a17a 0 2px, transparent 3px);
  content: "";
}
.theme-scene[data-scene-theme="cinnamoroll"] .scene-orbit {
  border-color: #91b8d48c;
  border-style: dashed;
  box-shadow: inset 0 0 0 4px #ffffff75, 0 0 0 4px #e7c9dc38;
}
.theme-scene[data-scene-theme="cinnamoroll"] .scene-motif { color: #7ea5c0; }
.theme-scene[data-scene-theme="cinnamoroll"] .motif-1,
.theme-scene[data-scene-theme="cinnamoroll"] .motif-5 { color: #d09ab6; }
.theme-scene[data-scene-theme="cinnamoroll"] .motif-2,
.theme-scene[data-scene-theme="cinnamoroll"] .motif-6 { transform: rotate(-10deg) scale(.9); }
.theme-scene[data-scene-theme="cinnamoroll"] .motif-3,
.theme-scene[data-scene-theme="cinnamoroll"] .motif-7 { transform: rotate(9deg) scale(1.08); }

/* Starlight: warm-grey dusk, fine constellation points and a quiet astrolabe ring. */
.theme-scene[data-scene-theme="starlight"] .scene-ground {
  background:
    radial-gradient(ellipse at 68% 24%, #ffffffcf 0 2%, transparent 34%),
    radial-gradient(circle, #727e925a 0 1px, transparent 1.6px) 3px 2px / 26px 26px,
    radial-gradient(circle, #a99fbe55 0 1px, transparent 1.8px) 13px 13px / 39px 39px,
    linear-gradient(135deg, #f8f8fa, #e5e7ed 62%, #f2eff6);
}
.theme-scene[data-scene-theme="starlight"] .scene-ground::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(28deg, transparent 49.7%, #7d89971f 50%, transparent 50.3%),
    linear-gradient(151deg, transparent 49.7%, #8e849f1a 50%, transparent 50.3%),
    radial-gradient(circle at 19% 31%, #737f93a8 0 2px, transparent 2.8px),
    radial-gradient(circle at 77% 63%, #a393bca8 0 2px, transparent 2.8px),
    radial-gradient(circle at 41% 82%, #737f9380 0 1.5px, transparent 2.5px);
  content: "";
}
.theme-scene[data-scene-theme="starlight"] .scene-ground::after {
  position: absolute;
  top: 11%;
  left: 70%;
  width: 42px;
  height: 42px;
  border: 1px solid #9098a342;
  border-radius: 50%;
  box-shadow: 0 0 0 6px #ffffff3d, 0 0 0 12px #aaa0bc22;
  content: "";
}
.theme-scene[data-scene-theme="starlight"] .scene-orbit {
  border-color: #858d9b77;
  border-style: dotted;
  box-shadow: inset 0 0 0 4px #ffffff68, 0 0 0 4px #aaa0bc33;
}
.theme-scene[data-scene-theme="starlight"] .scene-motif { color: #697587; }
.theme-scene[data-scene-theme="starlight"] .motif-1,
.theme-scene[data-scene-theme="starlight"] .motif-5 { color: #988da9; }
.theme-scene[data-scene-theme="starlight"] .motif-2,
.theme-scene[data-scene-theme="starlight"] .motif-6 { transform: rotate(18deg) scale(.82); }
.theme-scene[data-scene-theme="starlight"] .motif-3,
.theme-scene[data-scene-theme="starlight"] .motif-7 { transform: rotate(-14deg) scale(1.06); }

/* Small, normal-flow membership ribbon. */
.theme-passport {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  max-height: 70px;
  margin: 0 0 15px;
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid var(--theme-edge, var(--line, #deded1));
  border-radius: 13px;
  background: linear-gradient(100deg, var(--theme-wash, #fff), var(--theme-control-soft, #f4eff9));
  color: var(--ink, #2d352b);
  box-shadow: 0 3px 12px var(--theme-shadow-soft, #36204d0b);
}
.theme-passport::after {
  position: absolute;
  top: -23px;
  right: 37px;
  width: 76px;
  height: 76px;
  border: 1px solid color-mix(in srgb, var(--theme-control, #8058aa) 17%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--theme-control, #8058aa) 5%, transparent);
  content: "";
  pointer-events: none;
}
.passport-mascot {
  z-index: 1;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px #263a4a20);
}
.passport-copy {
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "kicker title" "line line";
  align-items: baseline;
  column-gap: 8px;
  row-gap: 1px;
  min-width: 0;
  line-height: 1.25;
}
.passport-kicker {
  grid-area: kicker;
  color: var(--theme-control-ink, var(--muted, #737b6e));
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.passport-title {
  grid-area: title;
  overflow: hidden;
  color: var(--theme-deep, var(--ink, #2d352b));
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.passport-line {
  grid-area: line;
  overflow: hidden;
  color: var(--muted, #737b6e);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.theme-passport .decor-toggle {
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 40px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 6px 9px;
  border: 1px solid var(--theme-edge-strong, var(--line, #deded1));
  border-radius: 9px;
  background: var(--theme-wash, #fff);
  color: var(--theme-deep, var(--ink, #2d352b));
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}
.theme-passport .decor-toggle[aria-pressed="true"] {
  border-color: var(--theme-control, #8058aa);
  background: var(--theme-control-soft, #f2e9ff);
}
.theme-passport[hidden] { display: none !important; }
.theme-decor-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.theme-decor-controls .decor-toggle { flex: 0 0 auto; }

/* A tiny result-side character note and a one-shot celebratory burst. */
.theme-result-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  max-width: 100%;
  margin: 10px auto -12px;
  color: var(--theme-control-ink, var(--muted, #737b6e));
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  pointer-events: none;
}
.result-mascot {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px #273a491c);
}
.theme-result-note span { min-width: 0; }
#result { position: relative; }
.theme-burst {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.burst-motif {
  position: absolute;
  top: 240px;
  left: 50%;
  display: block;
  width: 22px;
  height: 22px;
  color: var(--theme-control, #8058aa);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--burst-r, 0deg)) scale(.35);
}
.burst-motif svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.theme-burst.is-celebrating .burst-motif {
  animation: theme-burst-pop 1.08s cubic-bezier(.16,.7,.24,1) both;
}
.theme-burst.is-celebrating .burst-motif:nth-child(2n) { animation-delay: 35ms; }
.theme-burst.is-celebrating .burst-motif:nth-child(3n) { animation-delay: 70ms; }

/* Very restrained repeating accents on app surfaces. */
.location-panel,
.result-card { position: relative; }
.location-panel::before,
.result-card::before {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 12px;
  left: 12px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--brand) 20%, var(--line) 80%, transparent);
  opacity: .58;
  content: "";
  pointer-events: none;
}
.list-heading::after {
  display: block;
  width: 30px;
  height: 8px;
  flex: 0 0 30px;
  border-radius: 10px;
  background:
    radial-gradient(circle, var(--theme-control, #8058aa) 0 2px, transparent 2.5px) left center / 8px 8px no-repeat,
    linear-gradient(90deg, transparent, var(--line), transparent) center / 17px 1px no-repeat,
    radial-gradient(circle, var(--theme-control, #8058aa) 0 1.5px, transparent 2px) right center / 8px 8px no-repeat;
  opacity: .55;
  content: "";
}

/* Minimal mode keeps each paid palette and its shop previews, while decluttering
   the home/wheel canvases and reducing the small in-flow passport. */
:root[data-decor="minimal"] .scene-home,
:root[data-decor="minimal"] .scene-wheel,
:root[data-decor="minimal"] .theme-burst { display: none !important; }
:root[data-decor="minimal"] .theme-passport {
  min-height: 48px;
  max-height: 54px;
  padding-top: 5px;
  padding-bottom: 5px;
}
:root[data-decor="minimal"] .theme-passport .passport-mascot,
:root[data-decor="minimal"] .theme-passport .passport-line { display: none !important; }
:root[data-decor="minimal"] .theme-passport .passport-copy { grid-template-areas: "kicker title"; }
:root[data-decor="minimal"] .theme-result-note .result-mascot { display: none; }

@keyframes scene-drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}
@keyframes scene-mascot-bob {
  0%, 100% { translate: 0 0; rotate: -2deg; }
  50% { translate: 0 -5px; rotate: 2deg; }
}
@keyframes theme-burst-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--burst-r, 0deg)) scale(.35); }
  18% { opacity: .95; }
  70% { opacity: .78; transform: translate(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y))) rotate(calc(var(--burst-r, 0deg) + 22deg)) scale(1.08); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--burst-x)), calc(-50% + var(--burst-y))) rotate(calc(var(--burst-r, 0deg) + 42deg)) scale(.72); }
}

@media (max-width: 680px) {
  .scene-home .scene-motif.motif-7,
  .scene-home .scene-motif.motif-8,
  .scene-wheel .scene-motif.motif-7,
  .scene-wheel .scene-motif.motif-8 { display: none; }
  .scene-home .scene-mascot { width: 76px; height: 76px; left: -4px; bottom: 7px; }
  .theme-card { grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .theme-art { width: 104px; height: 112px; }
  .scene-art .scene-mascot { width: 64px; height: 64px; }
  .theme-detail p { min-height: 0; }
  .theme-benefits { font-size: 9.5px; }
  .theme-passport { gap: 8px; }
  .passport-mascot { width: 42px; height: 42px; flex-basis: 42px; }
  .passport-copy { column-gap: 5px; }
  .passport-kicker { font-size: 8px; }
  .passport-title { font-size: 12px; }
  .passport-line { font-size: 9px; }
  .theme-passport .decor-toggle { min-width: 44px; padding: 5px 7px; font-size: 9px; }
  .theme-decor-controls { align-items: flex-start; }
}

@media (max-width: 360px) {
  .scene-home .scene-mascot { width: 68px; height: 68px; left: -3px; bottom: 9px; }
  .scene-home .scene-orbit { inset: 12px 5px; }
  .wheel-wrap { padding: 12px; }
  .scene-wheel .scene-motif { width: 18px; height: 18px; }
  .theme-card { grid-template-columns: 78px minmax(0, 1fr); gap: 8px; padding: 8px; }
  .theme-art { width: 78px; height: 96px; }
  .scene-art .scene-mascot { width: 55px; height: 55px; }
  .theme-detail h3 { font-size: 13px; }
  .theme-benefits { gap: 2px; font-size: 9px; }
  .theme-preview-button,
  .theme-decor-controls .decor-toggle { font-size: 11px; }
  .scene-preview { height: 160px; }
  .scene-preview .scene-mini-disc { width: 82px; height: 82px; }
  .scene-preview .scene-mascot { width: 58px; height: 58px; right: calc(50% - 79px); }
  .theme-passport { gap: 6px; padding-right: 7px; }
  .passport-mascot { width: 34px; height: 34px; flex-basis: 34px; }
  .passport-copy { grid-template-columns: auto minmax(0, 1fr); column-gap: 4px; }
  .passport-kicker { font-size: 7px; letter-spacing: .07em; }
  .passport-title { font-size: 11px; }
  .passport-line { font-size: 8px; }
  .theme-passport .decor-toggle { min-width: 44px; padding: 4px 6px; font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-motif,
  .scene-mascot,
  .theme-art img,
  .theme-art span,
  .theme-art-fallback,
  .theme-card,
  .theme-preview-button,
  .theme-decor-controls .decor-toggle {
    animation: none !important;
    transition: none !important;
  }
  .theme-burst.is-celebrating .burst-motif { animation: none !important; opacity: 0; }
}
