/* ════════════════════════════════════════════════════════════════════════
   SUPPORTER COSMETICS - render recipes (ported from the locked shop preview).
   Namespaced lv-* so nothing collides. Consumed by the real renderers
   (profile.js / chat.js / idle.js) + the supporter shop panel, so the shop
   preview and the live surfaces share ONE set of styles (carbon copy).
   Catalogue + ownership: data/cosmetics.js + server cosmetic_entitlements.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Shared sweep + crown-glow keyframes ── */
@keyframes lv-foil-sweep { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes lv-crown-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,144,32,.4), 0 0 22px rgba(255,144,32,.18); }
  50%      { box-shadow: 0 0 0 1px rgba(255,228,160,.7), 0 0 34px rgba(255,200,120,.4); }
}

/* ── Name treatments (equip-one) ──────────────────────────────────────────
   color = inline on the element. glow = the existing .lv-name-glow (ui-system.css)
   + inline ramp; .lv-glow-static freezes the pulse. foil + gradient below. */
.lv-glow-static { animation: none !important; }
.lv-foil {
  --gc: #ffcf4d; --gc-lo: #ff9020;
  background: linear-gradient(100deg, var(--gc-lo) 0%, var(--gc) 30%, #fffbe9 48%, var(--gc) 66%, var(--gc-lo) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: lv-foil-sweep 5.5s linear infinite;
  filter: drop-shadow(0 0 4px var(--gc)) drop-shadow(0 0 9px rgba(255,144,32,.55));
}
.lv-nt-aurora {
  background: linear-gradient(100deg, #7af0d0, #7ab8ff 50%, #b88cff);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: lv-foil-sweep 9s linear infinite alternate;
}

/* ── Supporter badges (chat + profile) ── */
.lv-sbadge { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 4px;
  font-family: var(--lv-mono); font-size: 12px; font-weight: 700; letter-spacing: .5px; vertical-align: middle; }
.lv-pip { width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); display: inline-block; }
.lv-sbadge-bronze { color: #e8a766; background: rgba(199,123,59,.14); border: 1px solid #c77b3b; }
.lv-sbadge-bronze .lv-pip { background: linear-gradient(135deg, #c77b3b, #e8a766); }
.lv-sbadge-silver { color: #e9eef2; background: rgba(184,194,204,.14); border: 1px solid #b8c2cc; }
.lv-sbadge-silver .lv-pip { background: linear-gradient(135deg, #b8c2cc, #e9eef2); }
.lv-sbadge-gold { color: #ffd97a; background: rgba(255,193,80,.14); border: 1px solid #ffc150; box-shadow: 0 0 8px rgba(255,193,80,.25); }
.lv-sbadge-gold .lv-pip { background: linear-gradient(135deg, #e0a020, #ffe49a); }
.lv-sbadge-founder { color: #fffbe9; background: rgba(255,160,40,.16); border: 1px solid #ffb24d; }
.lv-sbadge-founder .lv-pip { background: linear-gradient(120deg, #ff9020, #fffbe9 50%, #ff9020); background-size: 220% 100%; animation: lv-foil-sweep 3.5s linear infinite; }

/* Prestige badge (Architect; profile-only) - animated foil pips. */
.lv-sbadge-prestige { color: #fffbe9; background: rgba(255,160,40,.16); border: 1px solid #ffb24d; box-shadow: 0 0 10px rgba(255,178,77,.3); }
.lv-sbadge-prestige .lv-pip { background: linear-gradient(120deg, #ff9020, #fffbe9 50%, #ff9020); background-size: 220% 100%; animation: lv-foil-sweep 3.5s linear infinite; }

/* Founder flair chip (profile) */
.lv-founder { display: inline-flex; align-items: center; padding: 2px 9px; font-family: var(--lv-mono);
  font-size: 12px; letter-spacing: .5px; color: #ffe7c2; border: 1px solid #ffb24d; background: rgba(255,178,77,.12);
  clip-path: polygon(5px 0,100% 0,100% calc(100% - 5px),calc(100% - 5px) 100%,0 100%,0 5px); }
/* Profile identity badge row (supporter pip badge + founder flair). */
.profile-sup-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

/* ── Profile-card frames (border weight escalates by tier) ── */
.profile-card.lv-frame-silver { border-color: #cdd6df !important; }
.profile-card.lv-frame-gold { border-color: #ffc150 !important; border-width: 2px !important; }
.profile-card.lv-frame-architect { border-color: #ffb24d !important; border-width: 3px !important; animation: lv-crown-glow 5.5s ease-in-out infinite; }

/* ── Emote (inline SVG in chat) ── */
.lv-emote { display: inline-block; vertical-align: middle; }

/* ── Loot-burst (own combat view; rare+ drop) ── */
.combat-loot-box { position: relative; }   /* anchor for the burst overlay */
.lv-lootburst { position: absolute; width: 64px; height: 64px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,180,80,.5), rgba(0,200,255,.2) 45%, transparent 65%); opacity: 0; animation: lv-lb-flash 1.6s ease-out; }
@keyframes lv-lb-flash { 0% { transform: scale(.3); opacity: 0; } 20% { opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.lv-lootburst span { position: absolute; left: 50%; top: 50%; width: 4px; height: 16px; margin: -8px 0 0 -2px; border-radius: 2px;
  background: linear-gradient(var(--lv-r-legendary), transparent); transform-origin: 50% 0; animation: lv-lb-spark 1.6s ease-out; }
@keyframes lv-lb-spark { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }

/* ════ Profile backgrounds (apply to .profile-bg-layer; renderer injects the
   child elements / asset <img>s per the catalogue fx + assets). ════ */

/* Deep Signal - animated sonar (transform-scale soft rings = GPU, no layout). */
.lv-cbg-deepsignal { background: radial-gradient(circle at 50% 58%, #0e2a4e, #061226 72%); }
/* Scanlines scroll via transform (GPU-composited, no per-frame repaint) instead
   of animating background-position, which forced a full-panel repaint at 60fps
   and made scrolling the profile laggy with this bg equipped. The layer is 60px
   taller so translating down 60px (= 10 gradient periods) loops seamlessly. */
.lv-cbg-deepsignal .lv-sig-scan { position: absolute; left: 0; right: 0; top: -60px; height: calc(100% + 60px); opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(95,208,224,.10) 0 1px, transparent 1px 6px);
  animation: lv-sig-scan 6s linear infinite; will-change: transform; }
@keyframes lv-sig-scan { from { transform: translateY(0); } to { transform: translateY(60px); } }
.lv-cbg-deepsignal .lv-sig-src { position: absolute; left: 50%; top: 58%; width: 6px; height: 6px; margin: -3px; border-radius: 50%;
  background: #9fe8f4; box-shadow: 0 0 8px #5fd0e0; animation: lv-sig-dot 3.6s ease-in-out infinite; }
@keyframes lv-sig-dot { 0%,100% { opacity: .5; } 10% { opacity: 1; } }
.lv-cbg-deepsignal .lv-sig-ring { position: absolute; left: 50%; top: 58%; width: 300px; height: 300px; margin: -150px 0 0 -150px;
  border-radius: 50%; background: radial-gradient(circle, transparent 58%, rgba(120,216,232,.5) 65%, rgba(95,208,224,.12) 70%, transparent 77%);
  opacity: 0; transform: scale(.03); will-change: transform, opacity; animation: lv-sig-ping 4.4s cubic-bezier(.12,.6,.3,1) infinite; }
.lv-cbg-deepsignal .lv-sig-ring:nth-of-type(2) { animation-delay: 1.47s; }
.lv-cbg-deepsignal .lv-sig-ring:nth-of-type(3) { animation-delay: 2.94s; }
@keyframes lv-sig-ping { 0% { transform: scale(.03); opacity: 0; } 14% { opacity: .6; } 100% { transform: scale(1); opacity: 0; } }

/* Scrapfield - floating scrap icons (varied drift) + dust. */
.lv-cbg-scrapfield { background: radial-gradient(circle at 35% 30%, #2a2118, #100d07 72%); }
.lv-cbg-scrapfield .lv-scrap-bit { position: absolute; filter: grayscale(.35) brightness(1.15); animation: linear infinite; }
@keyframes lv-scrap-a { 0% { transform: translate(0,8px) rotate(0deg); } 100% { transform: translate(-18px,-20px) rotate(300deg); } }
@keyframes lv-scrap-b { 0% { transform: translate(0,-6px) rotate(0deg); } 100% { transform: translate(15px,-22px) rotate(-380deg); } }
@keyframes lv-scrap-c { 0% { transform: translate(0,4px) rotate(18deg); } 100% { transform: translate(-12px,16px) rotate(-150deg); } }
@keyframes lv-scrap-d { 0% { transform: translate(0,0) rotate(-12deg); } 100% { transform: translate(20px,-12px) rotate(210deg); } }
/* Dust drifts via a single GPU transform (oscillating so it never snaps) rather
   than animating four background-positions, which repainted the panel each frame.
   The faint per-dot variation is imperceptible at 1px / .55 opacity. */
.lv-cbg-scrapfield .lv-dust { position: absolute; inset: 0; opacity: .55; will-change: transform;
  background: radial-gradient(1px 1px at 15% 25%, #8a7a5a, transparent), radial-gradient(1px 1px at 60% 40%, #6b5a3a, transparent),
    radial-gradient(1px 1px at 82% 72%, #8a7a5a, transparent), radial-gradient(1px 1px at 35% 85%, #6b5a3a, transparent);
  animation: lv-dust-drift 24s ease-in-out infinite alternate; }
@keyframes lv-dust-drift { 0% { transform: translateY(0); } 100% { transform: translateY(-26px); } }

/* Slow Drift - seamless parallax star tiles + wreckage img (mid layer). */
.lv-cbg-drift { background: linear-gradient(160deg, #0c1018, #161d2e); }
/* Parallax stars scroll via transform (GPU) instead of background-position. Each
   layer extends one tile-width past the right edge, so translating left by one
   tile (150 / 210px) loops seamlessly without a repaint. */
.lv-cbg-drift .lv-star-layer { position: absolute; top: 0; bottom: 0; left: 0; background-repeat: repeat; will-change: transform; }
.lv-cbg-drift .lv-star-far { right: -150px; opacity: .55; background-size: 150px 150px; animation: lv-star-far 40s linear infinite;
  background-image: radial-gradient(1px 1px at 18px 24px, #9fb0cc, transparent), radial-gradient(1px 1px at 96px 70px, #9fb0cc, transparent),
    radial-gradient(1px 1px at 132px 38px, #9fb0cc, transparent), radial-gradient(1px 1px at 56px 120px, #9fb0cc, transparent); }
.lv-cbg-drift .lv-star-near { right: -210px; opacity: .95; background-size: 210px 210px; animation: lv-star-near 20s linear infinite;
  background-image: radial-gradient(2px 2px at 38px 56px, #e8f0ff, transparent), radial-gradient(2px 2px at 168px 120px, #d8e4f5, transparent),
    radial-gradient(1.6px 1.6px at 108px 28px, #e8f0ff, transparent); }
@keyframes lv-star-far { from { transform: translateX(0); } to { transform: translateX(-150px); } }
@keyframes lv-star-near { from { transform: translateX(0); } to { transform: translateX(-210px); } }
.lv-cbg-drift .lv-drift-wreck { position: absolute; opacity: .62; filter: drop-shadow(0 0 6px rgba(120,150,200,.2));
  animation: lv-wreck-drift 30s ease-in-out infinite alternate; }
@keyframes lv-wreck-drift { 0% { transform: translate(0,0) rotate(-3deg); } 100% { transform: translate(-12px,9px) rotate(3deg); } }

/* Nebula - blurred screen-blend clouds + two drifting moon imgs. */
.lv-cbg-nebula { background: radial-gradient(circle at 40% 35%, #1e1438, #08060f 72%); }
/* NB: no will-change here. mix-blend-mode:screen + an own-layer promotion
   (will-change/transform) + the profile card's ancestor clip-path makes Chrome
   silently drop the blend, so the cloud renders as nothing on a profile. The
   blur is static (not animated) so will-change bought no perf - only the bug. */
.lv-cbg-nebula .lv-neb-cloud { position: absolute; inset: -20%; filter: blur(26px); mix-blend-mode: screen; animation: lv-neb-drift 26s ease-in-out infinite alternate;
  background: radial-gradient(closest-side at 30% 42%, rgba(154,108,240,.55), transparent 70%), radial-gradient(closest-side at 66% 56%, rgba(0,160,255,.40), transparent 70%); }
.lv-cbg-nebula .lv-neb-cloud2 { position: absolute; inset: -20%; filter: blur(34px); mix-blend-mode: screen; animation: lv-neb-drift2 34s ease-in-out infinite alternate;
  background: radial-gradient(closest-side at 52% 32%, rgba(255,110,200,.28), transparent 72%), radial-gradient(closest-side at 40% 70%, rgba(95,208,224,.30), transparent 72%); }
@keyframes lv-neb-drift { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(4%,-3%) scale(1.12); } }
@keyframes lv-neb-drift2 { 0% { transform: translate(0,0) scale(1.05); } 100% { transform: translate(-5%,4%) scale(1); } }
/* Two-moon cluster: ONE positioned group drifts together (single timing) so the
   small moon stays locked half-overlapping the big one, bottom-right + in front. */
.lv-cbg-nebula .lv-neb-moons { position: absolute; left: 52%; top: 9%; width: 34%;
  animation: lv-moon-drift 22s ease-in-out infinite alternate; will-change: transform; }
.lv-cbg-nebula .lv-neb-moon-big { display: block; width: 100%; height: auto; opacity: .9; }
.lv-cbg-nebula .lv-neb-moon-small { position: absolute; right: -16%; bottom: -12%; width: 52%; height: auto; opacity: .82; }
@keyframes lv-moon-drift { 0% { transform: translate(0,0); } 100% { transform: translate(7px,-9px); } }

/* Aurora - waving light-curtain ribbons + floating crystal imgs. */
.lv-cbg-aurora { background: linear-gradient(180deg, #04101e, #020812); }
/* Aurora curtains: vertical light striations (repeating-linear-gradient) inside
   a green->cyan->violet wash, alpha-masked to fade top & bottom so they read as
   draped light rather than a haze. skewX in the keyframes makes the curtains
   sway. Two bands pinned to the TOP and BOTTOM of the card so the centre (avatar
   + text) stays clear. No will-change: this is a screen-blend element under the
   card's clip-path, and own-layer promotion makes Chrome drop the blend. */
.lv-cbg-aurora .lv-aur-ribbon { position: absolute; left: -12%; right: -12%; top: 1%; height: 44%;
  opacity: .9; mix-blend-mode: screen; filter: blur(6px); border-radius: 0;
  background:
    repeating-linear-gradient(94deg, transparent 0 16px, rgba(160,255,222,.5) 19px 23px, transparent 26px 44px),
    linear-gradient(92deg, transparent 2%, rgba(120,255,200,.6) 26%, rgba(120,200,255,.55) 56%, rgba(184,140,255,.5) 82%, transparent 99%);
  -webkit-mask: linear-gradient(180deg, transparent 0%, #000 38%, #000 62%, transparent 100%);
          mask: linear-gradient(180deg, transparent 0%, #000 38%, #000 62%, transparent 100%);
  animation: lv-aur-wave 14s ease-in-out infinite alternate; }
.lv-cbg-aurora .lv-aur-ribbon2 { top: auto; bottom: 2%; height: 40%; filter: blur(8px); opacity: .72;
  background:
    repeating-linear-gradient(87deg, transparent 0 20px, rgba(198,158,255,.42) 23px 27px, transparent 30px 50px),
    linear-gradient(88deg, transparent 2%, rgba(184,140,255,.52) 24%, rgba(120,240,210,.46) 62%, rgba(120,200,255,.44) 86%, transparent 99%);
  -webkit-mask: linear-gradient(180deg, transparent 0%, #000 32%, #000 68%, transparent 100%);
          mask: linear-gradient(180deg, transparent 0%, #000 32%, #000 68%, transparent 100%);
  animation: lv-aur-wave2 18s ease-in-out infinite alternate; }
@keyframes lv-aur-wave  { 0% { transform: translateX(-4%) skewX(-7deg); } 100% { transform: translateX(4%) skewX(6deg); } }
@keyframes lv-aur-wave2 { 0% { transform: translateX(4%) skewX(6deg); } 100% { transform: translateX(-4%) skewX(-6deg); } }
.lv-cbg-aurora .lv-crystal-bit { position: absolute; opacity: .55; filter: drop-shadow(0 0 6px rgba(122,184,255,.55)); animation: lv-cryst-float ease-in-out infinite alternate; }
@keyframes lv-cryst-float { 0% { transform: translateY(0) rotate(-4deg); } 100% { transform: translateY(-10px) rotate(4deg); } }

/* ── Void I.D.L.E. ambiance (idle panel; client-only) ── */
.lv-voididle { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.lv-voididle .lv-vi-ring { position: absolute; width: 86%; height: 86%; border-radius: 50%;
  background: radial-gradient(circle, rgba(150,60,240,.35), transparent 65%); animation: lv-vi-pulse 4s ease-in-out infinite; }
@keyframes lv-vi-pulse { 0%,100% { transform: scale(.9); opacity: .5; } 50% { transform: scale(1.1); opacity: .9; } }
.lv-voididle .lv-vi-bot { position: relative; z-index: 2; animation: lv-vi-float 4s ease-in-out infinite, lv-vi-aura 3s ease-in-out infinite; }
@keyframes lv-vi-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes lv-vi-aura { 0%,100% { filter: drop-shadow(0 0 7px rgba(150,60,240,.55)); } 50% { filter: drop-shadow(0 0 17px rgba(180,90,255,.9)); } }
.lv-voididle .lv-vi-mote { position: absolute; bottom: 18%; width: 5px; height: 5px; border-radius: 50%;
  background: #b46cff; box-shadow: 0 0 6px #9a4cff; opacity: 0; animation: lv-vi-mote linear infinite; }
@keyframes lv-vi-mote { 0% { transform: translateY(0) scale(1); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-110px) scale(.4); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .lv-foil, .lv-nt-aurora, .lv-sbadge-founder .lv-pip,
  .profile-card.lv-frame-architect,
  .lv-cbg-deepsignal *, .lv-cbg-scrapfield *, .lv-cbg-drift *, .lv-cbg-nebula *, .lv-cbg-aurora *,
  .lv-voididle * { animation: none !important; }
}
