/* Decorative layers never intercept links, selection or profile controls. */
.profile-card{border-radius:18px;box-shadow:0 16px 40px #243b3811;border-color:#dce5e1;background:#fbfdfc}
.profile-banner{position:relative;z-index:0;height:120px;background-position:center;background-size:cover}
.profile-body{z-index:2;background-color:transparent}
.profile-avatar{border-width:4px;box-shadow:0 0 0 1px #d3e0d8,0 4px 14px #24443b1a!important}
.profile-avatar>img:not(.avatar-decoration){position:relative;z-index:1}
.profile-avatar .avatar-decoration,.mini-avatar .avatar-decoration{position:absolute;inset:-20%;width:140%;height:140%;max-width:none;border-radius:0;object-fit:contain;pointer-events:none;z-index:2;filter:drop-shadow(0 2px 3px #243c3e22)}
.mini-avatar{position:relative;box-shadow:0 3px 14px #213f3320!important}
.profile-insignia{width:36px;height:36px;flex-shrink:0;filter:drop-shadow(0 2px 2px #263c3d25);margin-left:3px}
.item-insignia{width:88px;height:88px;filter:drop-shadow(0 7px 7px #2b374a35);transition:transform .35s}
.item-art[class*="insignia-"]{background:radial-gradient(ellipse at 50% 20%,#fbefd8,#e8e7e3)}
.item-art.insignia-lunar{background:radial-gradient(ellipse at 50% 20%,#e0f1ff,#c7d0e3)}
.item-art.insignia-phoenix{background:radial-gradient(ellipse at 50% 20%,#ffe3c0,#ead1d7)}
.item-art.frame-crystal{background:radial-gradient(ellipse,#eefaff,#d5ddf0)}
.item-art.frame-sakura{background:radial-gradient(ellipse,#fff4f7,#eedbe5)}
.banner-dusk .profile-banner,.item-art.banner-dusk,.banner-dusk .mini-profile-banner{background-image:url('/sua/oj/cosmetics/banner-dusk.svg');background-position:center;background-size:cover}
.banner-ocean .profile-banner,.item-art.banner-ocean,.banner-ocean .mini-profile-banner{background-image:url('/sua/oj/cosmetics/banner-ocean.svg');background-position:center;background-size:cover}
.banner-nebula .profile-banner,.item-art.banner-nebula,.banner-nebula .mini-profile-banner{background-image:url('/sua/oj/cosmetics/banner-nebula.svg');background-position:center;background-size:cover}
.banner-garden .profile-banner,.item-art.banner-garden,.banner-garden .mini-profile-banner{background-image:url('/sua/oj/cosmetics/banner-garden.svg');background-position:center;background-size:cover}
.background-grid .profile-body{background-image:linear-gradient(#769f8d0c 1px,transparent 1px),linear-gradient(90deg,#769f8d0c 1px,transparent 1px),radial-gradient(ellipse at 100% 100%,#b8dac344,transparent 75%);background-size:24px 24px,24px 24px,100% 100%}
.background-aurora .profile-body{background:radial-gradient(ellipse at 10% 90%,#ddd0ef66,transparent 70%),radial-gradient(ellipse at 100% 30%,#bde9dd55,transparent 70%)}
.background-starmap .profile-body,.item-art.background-starmap{background-color:#edf2fa;background-image:radial-gradient(circle at 23px 19px,#8397ba99 1px,transparent 1.7px),radial-gradient(circle at 81px 63px,#baa1c988 1.5px,transparent 2px),linear-gradient(31deg,transparent 49.5%,#94a6c519 50%,transparent 50.5%);background-size:107px 97px,137px 113px,147px 133px}
.background-starmap .mini-profile-body{background:linear-gradient(140deg,#e9eff8,#e0e5f3)}
.profile-card.background-starmap{background-color:#edf2fa}.background-starmap .profile-body{background-color:transparent}
.shop-item{border-radius:14px;transition:box-shadow .25s,border-color .25s,transform .25s}
.shop-item:focus-within,.shop-item.is-previewing{border-color:#8daea0;box-shadow:0 0 0 2px #bdd3c82b,0 10px 26px #2341330c}
.shop-item .item-art{border-radius:10px;min-height:132px}
.shop-item .item-bottom{margin-top:auto}
.shop-item .button[aria-pressed="true"]{background:#e8f2ed;border-color:#8aaf9d;color:#285c49}
.shop-preview .preview-note{min-height:36px;color:#61766e}
.profile-card.effect-error:after,.profile-card.effect-error h2:after,.item-art.effect-error:after{content:none;animation:none}
.effect-error .profile-banner{animation:none}
.profile-fx{position:absolute;inset:0;z-index:1;overflow:hidden;pointer-events:none;contain:paint;border-radius:inherit}
.profile-fx i{display:block;position:absolute;pointer-events:none}
.fx-particle{left:var(--x);top:var(--y);width:var(--size);height:var(--size);animation-delay:var(--delay)!important}
.fx-ribbon,.fx-ripple{display:none!important}
.profile-fx.effect-sakura{background:radial-gradient(ellipse at 0 80%,#ffdbe644,transparent 65%)}
.effect-sakura .fx-particle{top:-8%;width:var(--size);height:calc(var(--size)*1.35);border-radius:75% 5% 65% 35%;background:linear-gradient(135deg,#fff0f4,#dd91b1);box-shadow:inset 1px 1px 1px #fff9,0 1px 3px #b97b9b22;animation:fx-petal var(--duration) linear infinite}
.effect-sakura .fx-ripple,.effect-rain .fx-ripple{display:block!important;left:var(--x);bottom:4%;width:52px;height:15px;border:1px solid #cc8eac66;border-radius:50%;opacity:0;box-shadow:0 0 0 7px #cb8da30a;animation:fx-ripple 6.5s ease-out infinite;animation-delay:var(--delay)}
.profile-fx.effect-error{background:repeating-linear-gradient(0deg,transparent 0 6px,#447e720a 6px 7px),linear-gradient(135deg,#6dddb41c,transparent 55%)}
.effect-error .fx-particle{height:2px;width:calc(var(--size)*8);background:linear-gradient(90deg,transparent,#6fbaae66,transparent);opacity:.15;animation:fx-signal var(--duration) steps(1) infinite}
.effect-error .fx-ribbon{display:block!important;left:0;right:0;height:13%;top:var(--scan,10%);background:linear-gradient(transparent,#71bbaa18,transparent);animation:fx-scan 9s linear infinite}
.effect-error .ribbon-1{--scan:40%;animation-delay:-3s}.effect-error .ribbon-2{--scan:70%;animation-delay:-6s}
.profile-fx.effect-aurora{background:radial-gradient(ellipse at 0 75%,#9ddac43a,transparent 70%)}
.effect-aurora .fx-ribbon{display:block!important;width:120%;height:70%;left:-35%;top:10%;border-radius:45%;filter:blur(13px);transform-origin:center;background:linear-gradient(110deg,transparent 20%,#77d6be44 45%,#95bde63b 60%,transparent 85%);animation:fx-aurora 14s ease-in-out infinite alternate}
.effect-aurora .ribbon-1{left:15%;top:30%;background:linear-gradient(110deg,transparent,#b29ce447,transparent);animation-delay:-8s;animation-duration:18s}
.effect-aurora .ribbon-2{left:-25%;top:60%;background:linear-gradient(130deg,transparent,#d8edab55,transparent);animation-delay:-5s;animation-duration:21s}
.effect-aurora .fx-particle,.effect-constellation .fx-particle{width:2px;height:2px;border-radius:50%;background:#9b91bc;box-shadow:0 0 5px #a995c655;animation:fx-twinkle var(--duration) ease-in-out infinite}
.profile-fx.effect-constellation{background:radial-gradient(ellipse at 90% 60%,#b5b0e52e,transparent 75%),radial-gradient(ellipse at 0 15%,#a0cbd329,transparent 65%)}
.effect-constellation .fx-particle:nth-of-type(4n){width:4px;height:4px;clip-path:polygon(50% 0,60% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%);background:#b39abf}
.effect-constellation .fx-ribbon{display:block!important;width:90px;height:1px;left:65%;top:15%;background:linear-gradient(90deg,transparent,#b2a0d7);rotate:-35deg;opacity:0;animation:fx-meteor 11s ease-in infinite}
.effect-constellation .ribbon-1{top:42%;left:90%;animation-delay:-4s;animation-duration:14s}.effect-constellation .ribbon-2{top:70%;left:45%;animation-delay:-9s;animation-duration:17s}
.profile-fx.effect-rain{background:linear-gradient(140deg,#8ab6c420,transparent 60%,#89b5c32b)}
.effect-rain .fx-particle{width:1px;height:calc(var(--size)*5);top:-20%;background:linear-gradient(transparent,#779eae66);rotate:12deg;animation:fx-rain calc(var(--duration)*.4) linear infinite}
.effect-rain .fx-ripple{border-color:#7a9eaf66;animation-duration:4s}
.fx-control{position:absolute;z-index:4;top:12px;right:12px;min-height:32px;padding:6px 10px;border:1px solid #ffffff55;background:#183430b8;color:#fff;font-size:10px;border-radius:20px;backdrop-filter:blur(8px)}
.fx-control:hover{background:#25483fec;border-color:#d4ede3;color:white}
.fx-control:focus-visible{outline-color:#e2fff3;outline-offset:2px}
.item-art .profile-fx{z-index:0;border-radius:inherit}
.effect-sample{position:relative;z-index:2;width:111px;height:73px;border:1px solid #ffffffac;border-radius:10px;background:#ffffff77;box-shadow:0 8px 18px #37514d12;padding:12px;display:grid;gap:6px;transform:rotate(-5deg)}
.effect-sample i{width:22px;height:22px;border-radius:50%;background:#bfd1cc;border:3px solid #fff}
.effect-sample span,.effect-sample b{display:block;height:3px;width:66px;border-radius:5px;background:#7f9f9366}.effect-sample b{width:43px;background:#a2b9af66}
.item-art.effect-error{background:#e2eeea}.item-art.effect-aurora{background:#e4f0ed}.item-art.effect-constellation{background:#e9e8f4}.item-art.effect-rain{background:#e5edf2}
.shop-item .profile-fx *{animation-play-state:paused}
.shop-item:hover .profile-fx *,.shop-item:focus-within .profile-fx *{animation-play-state:running}
.effects-paused .profile-fx *{animation-play-state:paused!important}
@keyframes fx-petal{0%{top:-8%;transform:translateX(0) rotate(0);opacity:0}8%{opacity:.8}80%{opacity:.65}100%{top:103%;transform:translateX(var(--drift)) rotate(230deg);opacity:0}}
@keyframes fx-ripple{0%,60%{transform:translateX(-50%) scale(.2);opacity:0}65%{opacity:.65}100%{transform:translateX(-50%) scale(1.8);opacity:0}}
@keyframes fx-signal{0%,75%,100%{opacity:.12;translate:0}76%,80%{opacity:.65;translate:12px}78%,83%{opacity:.3;translate:-9px}}
@keyframes fx-scan{from{translate:0 -150%}to{translate:0 800%}}
@keyframes fx-aurora{from{transform:translate(-6%,-6%) rotate(-18deg) scale(1)}to{transform:translate(12%,8%) rotate(24deg) scale(1.2)}}
@keyframes fx-twinkle{0%,100%{opacity:.18;scale:.7}50%{opacity:.85;scale:1.2}}
@keyframes fx-meteor{0%,72%,100%{transform:translate(0,0);opacity:0}76%{opacity:.7}88%{transform:translate(-190px,80px);opacity:0}}
@keyframes fx-rain{0%{top:-20%;opacity:0}10%,75%{opacity:.6}100%{top:110%;translate:-30px;opacity:0}}
@media(max-width:650px){.shop-item .item-art{min-height:120px}.shop-preview{position:relative}.shop-preview .profile-banner{height:100px}.shop-preview .profile-body{min-height:155px}.shop-preview .profile-avatar{width:60px;height:60px;margin-top:-29px}.shop-preview .profile-insignia{width:32px;height:32px}.fx-control{top:10px;right:10px}.profile-fx .fx-particle:nth-of-type(n+16){display:none}.effect-aurora .fx-ribbon{filter:blur(8px)}}
@media(prefers-reduced-motion:reduce){.profile-fx *{animation:none!important}.effect-sakura .fx-particle,.effect-rain .fx-particle{top:var(--y);opacity:.25}.effect-constellation .fx-ribbon{opacity:0}.fx-control{display:none}.shop-item,.item-insignia{transition:none}}
.code-runner{padding:19px;border-top:1px solid #3a444d;background:#1b242d;color:#dce7ed;max-height:620px;overflow:auto;overscroll-behavior:contain}
.run-heading,.run-actions,.run-stream-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.run-heading{margin-bottom:13px}.run-heading h3{font-size:13px;margin:0;color:#e2ece7}
.run-heading select{background:#25313a;color:#c2d5d2;border-color:#40514f;min-height:32px;padding:6px 9px}
.run-label{display:block;font-size:10px;color:#a6b8c1;margin-bottom:8px}
.run-input{display:block;resize:vertical;min-height:90px;max-height:260px;width:100%;padding:12px;border:1px solid #3d5054;border-radius:8px;background:#121b23;color:#e3efe9;font:12px/1.8 Consolas,OJMono,monospace;letter-spacing:0;tab-size:4}
.run-input::placeholder{color:#7d929e}.run-input:focus-visible{outline-color:#89b6a3}
.run-actions{margin:12px 0}.run-actions small{font-size:9px;line-height:1.6;color:#a1b6b1;max-width:210px}
.run-button{background:#d0e5db;color:#22483a;border-color:#b4d5c5;white-space:nowrap}.run-button .oj-icon{width:16px;height:16px}
.run-status{font-size:10px;line-height:1.7;margin:13px 0 0;color:#b0c7bd;overflow-wrap:anywhere}
.run-output{margin-top:15px}.run-output pre{padding:12px;border:1px solid #34424d;border-radius:7px;background:#121b23;color:#dce9ed;white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.8 Consolas,OJMono,monospace;max-height:240px;overflow:auto;letter-spacing:0}
.run-stream-heading{font-size:10px;color:#afc4ce}.run-stream .button{color:#b8d3c8;min-height:24px;padding:3px 7px}
.run-stream .button:hover{background:#324a43}.run-stream{margin-top:12px}.run-comparison{font-size:11px;line-height:1.7;padding:9px 11px;border-radius:7px}
.run-comparison.matches{background:#204638;color:#b1e8cd}.run-comparison.differs{background:#4a3829;color:#efcbaa}
.run-output details{font-size:10px;margin-top:13px;color:#b7c6d0}.run-output summary{cursor:pointer;padding:5px 0}.run-note{font-size:9px;line-height:1.8;color:#94aaa5;margin:15px 0 0}
.code-runner>.notice,.run-output .notice{font-size:10px;margin-top:12px}.editor-expanded{overflow:auto}.editor-expanded .code-runner{flex-shrink:0;max-height:42vh}
@media(max-width:650px){.code-runner{padding:15px}.run-heading{gap:8px}.run-heading h3{font-size:12px}.run-actions{align-items:flex-start}.run-actions small{max-width:160px}.run-button{padding:9px 11px}.run-input,.run-output pre{font-size:13px}.run-input{font-size:16px}.code-runner{max-height:none}}
/* Profile studio: visual choices, readable foreground and motion-safe backgrounds. */
.profile-message{position:relative;display:block;max-width:100%;width:fit-content;margin:18px 0 22px;padding:12px 16px;border:1px solid #dae5df;border-radius:18px 18px 18px 5px;line-height:1.65;overflow-wrap:anywhere;box-shadow:0 4px 14px #243c3710;background:#fff;color:#344b43}
.profile-message:before{content:'';position:absolute;left:18px;top:-7px;width:12px;height:12px;background:inherit;border-top:inherit;border-left:inherit;transform:rotate(45deg)}
.profile-message.bubble-cloud{background:linear-gradient(145deg,#fff,#f0f4f8)}
.profile-message.bubble-glass{background:linear-gradient(120deg,#ffffffb8,#e7e1f1aa);backdrop-filter:blur(12px);border-color:#d6cce3}
.profile-message.bubble-mint{background:linear-gradient(130deg,#e6f6ed,#e0f0f2);border-color:#b3d6c9}
.profile-message.bubble-sunset{background:linear-gradient(130deg,#fff1d9,#f6e1e8);border-color:#e9cabb}
.profile-fx.effect-error{background:repeating-linear-gradient(0deg,#2863590d 0 1px,transparent 1px 4px),repeating-linear-gradient(93deg,transparent 0 7px,#896ca514 8px 9px,transparent 10px 17px);animation:signal-texture 4.7s steps(1,end) infinite}
.profile-fx.effect-error:before,.profile-fx.effect-error:after{content:'';position:absolute;inset:-10%;pointer-events:none;background:repeating-linear-gradient(174deg,#21393018 0 1px,transparent 1px 3px,#fff3 3px 4px);opacity:.28;animation:signal-noise 5.3s steps(1,end) infinite}
.profile-fx.effect-error:after{background:linear-gradient(transparent 20%,#79d3c52c 20% 23%,transparent 23% 62%,#ab7fbd25 62% 65%,transparent 65%);animation:signal-tear 6.3s steps(1,end) infinite}
@keyframes signal-texture{0%,68%,100%{background-position:0 0;opacity:.65}69%{background-position:15px -9px;opacity:.9}71%{background-position:-18px 12px;opacity:.7}74%{background-position:4px -5px;opacity:.85}}
@keyframes signal-noise{0%,64%,100%{transform:translate(0,0)}65%{transform:translate(-3%,2%)}67%{transform:translate(3%,-1%)}69%{transform:translate(-1%,3%)}72%{transform:translate(2%,-2%)}}
@keyframes signal-tear{0%,70%,100%{transform:translateY(-30%);opacity:.12}71%{transform:translate(3%,12%);opacity:.7}74%{transform:translate(-4%,26%);opacity:.5}77%{transform:translate(1%,-10%);opacity:.15}}
.nameplate{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;gap:10px;min-height:56px;padding:10px 14px;border-radius:10px;background:#f0f4f2;color:#273e37;min-width:0}
.rank-person.nameplate{min-width:170px;max-width:300px}.nameplate>*{position:relative;z-index:1}.nameplate strong,.nameplate small{overflow-wrap:anywhere}.nameplate small{font-size:9px}.nameplate .avatar{flex-shrink:0;object-fit:cover}
.nameplate:before{content:'';position:absolute;inset:-100%;z-index:0;pointer-events:none}
.nametag-aurora{background:#e5edf4}.nametag-aurora:before{background:conic-gradient(from 0deg,transparent,#87cfbb66,#aea0dd66,transparent,#8bbfd955,transparent);animation:nameplate-flow 15s linear infinite}
.nametag-orbit{background:#e9e6f4}.nametag-orbit:before{background:radial-gradient(circle,#fff 1px,transparent 2px) 0 0/27px 29px,linear-gradient(125deg,transparent 48%,#b29cd58c 50%,transparent 52%);animation:nameplate-stars 12s linear infinite}
.nametag-ginkgo{background:#f7efd9}.nametag-ginkgo:before{background:radial-gradient(ellipse at 30% 40%,#e8bd6880 0 5px,transparent 6px) 0 0/59px 43px,linear-gradient(120deg,transparent,#fff8,transparent);animation:nameplate-stars 17s linear infinite}
@keyframes nameplate-flow{to{transform:rotate(360deg)}}@keyframes nameplate-stars{to{transform:translate(59px,43px)}}
.item-art[class*='nametag-']{background:#eef0f3}.item-art .nameplate{width:90%;font-size:12px;box-shadow:0 8px 25px #33413918}.item-art .nameplate .avatar{width:28px;height:28px;font-size:12px}
.profile-studio{margin-top:28px;padding:28px;min-width:0}.studio-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,340px);gap:28px;align-items:start}.studio-controls{min-width:0}.studio-section{padding:22px 0;border-bottom:1px solid #dfe6e2}.studio-section:first-child{padding-top:0}.studio-section h3{font-size:15px;margin:0 0 15px}.studio-section .form-field{margin-bottom:14px}.studio-section input[type=file]{max-width:100%;font-size:12px}.studio-section .muted{font-size:11px;line-height:1.6}.studio-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.studio-choice.button{display:flex;flex-direction:column;gap:8px;height:auto;min-height:52px;padding:8px;white-space:normal;line-height:1.5;font-size:11px;text-align:left;border-radius:12px;background:#f8faf9;color:#3d514a}.studio-choice .item-art{width:100%;height:85px;margin:0;border-radius:7px}.studio-choice[aria-pressed=true]{border-color:#477e68;background:#eaf2ed;box-shadow:0 0 0 1px #477e68}.studio-shop-link{display:inline-block;margin-top:12px;font-size:11px;color:#577a68}.studio-preview{position:sticky;top:95px;min-width:0}.studio-preview .profile-card{width:100%}.studio-preview>.eyebrow{margin-top:20px}.studio-save{position:sticky;bottom:12px;z-index:5;margin-top:22px;display:flex;gap:10px;justify-content:flex-end;align-items:center;padding:14px;border:1px solid #dce4dd;background:#fffffff2;backdrop-filter:blur(14px);border-radius:12px;box-shadow:0 8px 25px #253e3512}.studio-save small{margin-right:auto;color:#6b7a73;font-size:10px}.studio-preview .nameplate{margin-bottom:12px}
@media(max-width:850px){.studio-layout{grid-template-columns:minmax(0,1fr) minmax(220px,280px);gap:18px}.profile-studio{padding:20px}}
@media(max-width:650px){.studio-layout{display:flex;flex-direction:column}.studio-preview{position:static;order:-1;width:100%;max-width:380px;margin:0 auto 15px}.studio-controls{width:100%}.profile-studio{padding:18px}.studio-save{flex-wrap:wrap;bottom:8px}.studio-save small{width:100%}.rank-person.nameplate{min-width:150px;padding:8px}.studio-choice .item-art{height:90px}}
.effects-paused .nameplate:before,.effects-paused .profile-fx,.effects-paused .profile-fx:before,.effects-paused .profile-fx:after{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.nameplate:before,.profile-fx,.profile-fx:before,.profile-fx:after{animation:none!important}}
.studio-tabs{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:20px;margin-bottom:18px;border-bottom:1px solid #dfe6e2}.studio-tabs .button{font-size:11px}.studio-tabs [aria-pressed=true]{background:#28483b;color:#fff;border-color:#28483b}.studio-section[hidden]{display:none}.profile-edit-open{margin-bottom:22px}.profile-studio{scroll-margin-top:95px}.studio-section .status-art{font-size:10px}
