/* Avatar decorations: a layer that sits around the avatar (any size: it is sized in % of the avatar box) */
.av-deco { position: absolute; inset: -22%; pointer-events: none; z-index: 4; font-size: 13px; }
.av-deco svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.av-deco .float { animation: avfloat 3s ease-in-out infinite; }
.av-deco .glow { filter: drop-shadow(0 0 5px #ffe27a); }
.av-deco .wings { filter: drop-shadow(0 0 6px rgba(160,210,255,.7)); }
.av-deco .top { filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }

.av-deco .ring { position: absolute; inset: 11%; border-radius: 50%;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.ring-neon { background: conic-gradient(var(--glow-color, #39ff14), transparent 35%, var(--accent, #fff) 60%, transparent 85%, var(--glow-color, #39ff14)); animation: avspin 3.5s linear infinite; filter: drop-shadow(0 0 6px var(--glow-color, #39ff14)); }
.ring-rainbow { background: conic-gradient(#ff3b3b, #ffd23f, #7cff5b, #38e8ff, #6a5cff, #ff4df0, #ff3b3b); animation: avspin 5s linear infinite; filter: drop-shadow(0 0 5px rgba(255,255,255,.35)); }
.ring-fire { background: conic-gradient(#ff3b00, #ffb000, #fff1a0, #ff7a00, #c21500, #ff3b00); animation: avspin 2.6s linear infinite, avflick .35s steps(2) infinite; filter: drop-shadow(0 0 8px #ff6a00); }
.ring-toxic { -webkit-mask: none; mask: none; border: 3px solid #39ff14; box-shadow: 0 0 12px #39ff14, inset 0 0 9px rgba(57,255,20,.55); animation: avflick 1.6s ease-in-out infinite alternate; }
.ring-glitch { -webkit-mask: none; mask: none; border: 2px solid #00f0ff; mix-blend-mode: screen; animation: avjit 1.5s steps(1) infinite; }
.ring-glitch.b { border-color: #ff2bd6; animation-delay: -.75s; }
.av-deco .drip { overflow: visible; }
.av-deco .drip g { animation: avdrip 2.2s ease-in infinite; transform-box: fill-box; }

.av-deco .pulse { position: absolute; inset: 16%; border-radius: 50%; border: 2px solid var(--glow-color, #39ff14); opacity: 0; animation: avpulse 2.4s ease-out infinite; }
.av-deco .pulse.p2 { animation-delay: 1.2s; }

.av-deco .orbit { position: absolute; inset: 11%; animation: avspin 8s linear infinite; }
.av-deco .orbit b, .av-deco .sparks b { position: absolute; transform: translate(-50%, -50%); color: #ffe27a; font-size: 1.15em; text-shadow: 0 0 6px #ffd23f; }
.av-deco .sparks { position: absolute; inset: 0; }
.av-deco .sparks b { color: #fff; opacity: 0; animation: avtw 2.4s ease-in-out infinite; }
.av-deco .hearts { position: absolute; inset: 0; }
.av-deco .hearts b { position: absolute; bottom: 24%; color: #ff5d8f; font-size: 1.1em; opacity: 0; animation: avrise 3.3s ease-in infinite; }

.av-deco.avd-custom img { width: 100%; height: 100%; object-fit: contain; display: block; }
.av-deco .plus { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.2em; color: #aab; font-weight: 300; }
.deco-own { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.deco-own label { display: block; font-size: .85rem; margin: 10px 0 4px; color: #c8d0ca; }
.deco-own .row { display: flex; gap: 10px; }
.deco-own .row input[type=url] { flex: 1; }
/* more sets */
.av-deco b svg { position: static; inset: auto; width: auto; height: auto; display: block; overflow: visible; }
.av-deco .glow-g { filter: drop-shadow(0 0 4px rgba(120,255,120,.6)); }
.av-deco .glow-p { filter: drop-shadow(0 0 5px rgba(178,140,255,.8)); }
.av-deco .glow-c { filter: drop-shadow(0 0 5px rgba(0,229,255,.8)); }
.av-deco .glow-o { filter: drop-shadow(0 0 5px rgba(255,184,107,.7)); }
.av-deco .spin { transform-origin: 50% 50%; animation: avspin 9s linear infinite; }
.av-deco .spin.r { animation-direction: reverse; animation-duration: 6s; }
.av-deco .flick { animation: avflick .5s steps(2) infinite; }
.ring-gold { background: conic-gradient(#ffd23f, #fff3b0, #b8860b, #ffd23f, #8a6508, #ffd23f); animation: avspin 6s linear infinite; filter: drop-shadow(0 0 6px #ffcc33); }
.ring-bolt { -webkit-mask: none; mask: none; border: 2px solid #9fdcff; box-shadow: 0 0 10px #4dc3ff, inset 0 0 8px rgba(77,195,255,.5); animation: avflick .4s steps(2) infinite; }
.ring-cyan { -webkit-mask: none; mask: none; border: 2px solid #00e5ff; box-shadow: 0 0 10px rgba(0,229,255,.7); }
.ring-radar { -webkit-mask: none; mask: none; border: 2px solid #39ff14; box-shadow: 0 0 10px rgba(57,255,20,.6); }
.ring-blood { -webkit-mask: none; mask: none; border: 3px solid #c1121f; box-shadow: 0 0 12px #c1121f, inset 0 0 9px rgba(193,18,31,.6); }
.ring-frost { -webkit-mask: none; mask: none; border: 3px solid #bfeaff; box-shadow: 0 0 12px #9fdcff, inset 0 0 10px rgba(191,234,255,.6); }
.ring-galaxy { background: conic-gradient(#5b2bd6, #ff4df0, #38e8ff, #5b2bd6, #1a1060, #5b2bd6); animation: avspin 7s linear infinite; filter: drop-shadow(0 0 6px #8a5cff); }
.av-deco .scan, .av-deco .radar { position: absolute; inset: 15.3%; border-radius: 50%; overflow: hidden; }
.av-deco .scan::after { content: ""; position: absolute; left: 0; right: 0; height: 22%; background: linear-gradient(transparent, rgba(0,240,255,.6), transparent); animation: avscan 2s linear infinite; }
.av-deco .radar { background: conic-gradient(rgba(57,255,20,0) 68%, rgba(57,255,20,.55)); animation: avspin 3s linear infinite; mix-blend-mode: screen; }
.av-deco .pulse.blue { border-color: #4dc3ff; }
.av-deco .orbit.slow { animation-duration: 11s; }
.av-deco .orbit.slow b { color: inherit; text-shadow: none; line-height: 0; }
.av-deco .comet { width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: -12px 0 9px rgba(120,190,255,.75), -22px 0 12px rgba(120,190,255,.35), 0 0 9px #fff; }
.av-deco .bf { animation: avflap .45s ease-in-out infinite alternate; }
.av-deco .sparks.cold b { color: #d6f3ff; text-shadow: 0 0 6px #9fdcff; }
.av-deco .petals { position: absolute; inset: 0; }
.av-deco .petals b { position: absolute; top: 4%; color: #ff9ec7; font-size: 1.1em; opacity: 0; animation: avfall 3.6s ease-in infinite; }
.ring-water { background: conic-gradient(#1e90ff, #7fe3ff, #1e60ff, #7fe3ff, #1e90ff); animation: avspin 5s linear infinite; filter: drop-shadow(0 0 6px #3aa0ff); }
.ring-thorn { -webkit-mask: none; mask: none; border: 2px solid #2e8b57; }
.av-deco .smoke { position: absolute; inset: 0; overflow: visible; }
.av-deco .smoke b { position: absolute; bottom: 20%; width: 1.6em; height: 1.6em; border-radius: 50%; background: radial-gradient(rgba(220,220,235,.75), rgba(220,220,235,0) 70%); opacity: 0; animation: avsmoke 3.8s ease-out infinite; }
@keyframes avsmoke { 0% { transform: translateY(0) scale(.5); opacity: 0; } 25% { opacity: .9; } 100% { transform: translateY(-60px) scale(1.7); opacity: 0; } }
@keyframes avscan { from { top: -25%; } to { top: 105%; } }
@keyframes avflap { to { transform: scaleX(.4); } }
@keyframes avfall { 0% { transform: translateY(0) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(75px) rotate(200deg); opacity: 0; } }
@keyframes avspin { to { transform: rotate(360deg); } }
@keyframes avfloat { 50% { transform: translateY(-4%); } }
@keyframes avflick { 50% { filter: brightness(1.35); } }
@keyframes avjit { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3%, 1%); } 40% { transform: translate(2%, -2%); } 60% { transform: translate(-1%, 3%); } 80% { transform: translate(3%, 0); } }
@keyframes avpulse { 0% { transform: scale(.82); opacity: .8; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes avdrip { 0% { transform: translateY(-3px); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(9px); opacity: 0; } }
@keyframes avtw { 0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2) rotate(35deg); } }
@keyframes avrise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-70px) scale(1.15); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .av-deco * { animation: none !important; } }

/* templates */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; margin-top: 12px; }
.tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.03); color: #e6e6ea; cursor: pointer; text-align: left; font: inherit; transition: transform .25s, border-color .2s, background .2s; }
.tpl:hover { transform: translateY(-3px); border-color: var(--accent, #39ff14); background: rgba(255,255,255,.06); }
.tpl-pv { position: relative; display: grid; place-items: center; width: 100%; height: 64px; border: 1px solid; border-radius: 10px; margin-bottom: 4px; }
.tpl-pv b { font-size: 1.5rem; }
.tpl-pv i { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; }
.tpl strong { font-size: .92rem; }
.tpl em { font-style: normal; font-size: .72rem; color: #9aa; line-height: 1.3; }
/* icon grid on top of the Customization tab */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-bottom: 18px; }
.sec-grid button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 6px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(255,255,255,.03); color: #aab4ac; font: 600 .8rem inherit; cursor: pointer; transition: border-color .2s, background .2s, color .2s, transform .25s; }
.sec-grid button i { font-size: 1.15rem; }
.sec-grid button:hover { color: #fff; background: rgba(255,255,255,.07); transform: translateY(-2px); }
.sec-grid button.on { color: var(--accent, #39ff14); border-color: var(--accent, #39ff14); background: rgba(57,255,20,.07); }

/* the picker in the dashboard */
.deco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; margin-top: 12px; }
.deco-h { grid-column: 1 / -1; margin: 10px 0 -2px; font-size: .78rem; color: #8d978f; font-weight: 700; }
.deco-tile { display: flex; flex-direction: column; align-items: center; padding: 6px 4px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.03); color: #ddd; cursor: pointer; font: inherit; transition: border-color .2s, background .2s, transform .25s; }
.deco-tile:hover { background: rgba(255,255,255,.07); transform: translateY(-2px); }
.deco-tile.on { border-color: var(--accent, #39ff14); background: rgba(57,255,20,.08); }
.deco-tile em { font-style: normal; font-size: .74rem; color: #aab; margin-top: 2px; text-align: center; }
.deco-tile .dm { position: relative; display: block; width: 44px; height: 44px; margin: 18px auto 12px; --glow-color: #39ff14; --accent: #b6ff00; }
.deco-tile .dm-av { display: block; width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, #4a5160, #20242c); }
.deco-tile .av-deco { font-size: 6.5px; }
