.ts-decoration {
  --ts-dec-primary:#57bdf2;
  --ts-dec-secondary:#8662e5;
  --ts-dec-glow:#6cc8ff;
  --ts-dec-intensity:.55;
  position:relative;
  display:flex;
  align-items:center;
  gap:1.1rem;
  min-width:0;
  color:#eef5fb;
  isolation:isolate;
}
.ts-decoration-emblem {
  width:5rem;
  height:5rem;
  flex:0 0 auto;
  overflow:visible;
  filter:drop-shadow(0 0 calc(18px * var(--ts-dec-intensity)) color-mix(in srgb,var(--ts-dec-glow) 72%,transparent));
}
.ts-decoration-core {
  fill:color-mix(in srgb,var(--ts-dec-primary) 12%,#050a11);
  stroke:none;
}
.ts-decoration-aura {
  fill:none;
  stroke:var(--ts-dec-glow);
  stroke-width:8;
  opacity:calc(.08 + var(--ts-dec-intensity) * .2);
  filter:blur(5px);
}
.ts-decoration-frame {
  vector-effect:non-scaling-stroke;
  fill:none;
  stroke-linejoin:round;
}
.ts-decoration-frame-outer {
  stroke-width:2.7;
}
.ts-decoration-frame-inner {
  stroke:var(--ts-dec-secondary);
  stroke-width:1.1;
  opacity:.82;
  transform:scale(.84);
  transform-origin:50% 50%;
}
.ts-decoration-symbol {
  fill:#f7fbff;
  font:700 27px Georgia,serif;
  paint-order:stroke;
  stroke:color-mix(in srgb,var(--ts-dec-secondary) 65%,#02040a);
  stroke-width:1.7px;
  filter:drop-shadow(0 0 5px var(--ts-dec-glow));
}
.ts-decoration-copy { display:grid; min-width:0; gap:.2rem; }
.ts-decoration-eyebrow {
  color:var(--ts-dec-primary);
  font-size:.58rem;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.ts-decoration-name {
  display:block;
  max-width:100%;
  margin:0;
  color:#f2f6fb;
  font-family:Georgia,serif;
  font-size:clamp(2rem,5vw,4.2rem);
  font-weight:400;
  line-height:1;
  overflow-wrap:anywhere;
}
.ts-decoration-title { color:#96a5b7; font-size:.72rem; }
.ts-decoration[data-mode="badge"] { gap:.55rem; }
.ts-decoration[data-mode="badge"] .ts-decoration-emblem { width:2rem; height:2rem; }
.ts-decoration[data-mode="badge"] .ts-decoration-eyebrow { display:none; }
.ts-decoration[data-mode="badge"] .ts-decoration-name {
  font-family:inherit;
  font-size:.65rem;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.ts-decoration[data-mode="badge"] .ts-decoration-title { display:none; }
.ts-decoration[data-mode="compact"] { gap:.7rem; }
.ts-decoration[data-mode="compact"] .ts-decoration-emblem { width:2.7rem; height:2.7rem; }
.ts-decoration[data-mode="compact"] .ts-decoration-copy { gap:.16rem; }
.ts-decoration[data-mode="compact"] .ts-decoration-name {
  font-family:inherit;
  font-size:.8rem;
  font-weight:750;
  line-height:1.1;
}
.ts-decoration[data-mode="compact"] .ts-decoration-title {
  font-size:.55rem;
  line-height:1.2;
}
.ts-decoration[data-mode="compact"] .ts-decoration-eyebrow { display:none; }
.ts-decoration[data-mode="preview"] { min-height:7rem; }

.ts-decoration[data-frame="arcane"] .ts-decoration-frame-outer { stroke-dasharray:2 2.8; stroke-width:3.2; }
.ts-decoration[data-frame="celestial"] .ts-decoration-frame-outer { stroke:#eaf9ff; stroke-width:2; }
.ts-decoration[data-frame="celestial"] .ts-decoration-frame-inner { stroke-dasharray:1 3; stroke-width:2; }
.ts-decoration[data-frame="royal"] .ts-decoration-frame-outer { stroke:#f1d27e; stroke-width:3.7; }
.ts-decoration[data-frame="royal"] .ts-decoration-frame-inner { stroke:#fff4c2; stroke-width:1.5; }
.ts-decoration[data-frame="infernal"] .ts-decoration-core { fill:color-mix(in srgb,#310609 76%,var(--ts-dec-secondary)); }
.ts-decoration[data-frame="infernal"] .ts-decoration-frame-outer { stroke:#ff9a3d; stroke-width:4; }
.ts-decoration[data-frame="frost"] .ts-decoration-core { fill:color-mix(in srgb,#071624 82%,var(--ts-dec-primary)); }
.ts-decoration[data-frame="frost"] .ts-decoration-frame-outer { stroke:#e8fbff; stroke-width:3.1; }
.ts-decoration[data-frame="shadow"] .ts-decoration-core { fill:#09050f; }
.ts-decoration[data-frame="shadow"] .ts-decoration-frame-outer { stroke:var(--ts-dec-secondary); stroke-width:4; opacity:.74; }
.ts-decoration[data-frame="nature"] .ts-decoration-frame-outer { stroke-dasharray:7 1.5; stroke-width:3.3; }
.ts-decoration[data-frame="mechanical"] .ts-decoration-frame-outer { stroke:#b9d0db; stroke-dasharray:10 2; stroke-width:3; }
.ts-decoration[data-frame="portal"] .ts-decoration-frame-outer { stroke:var(--ts-dec-primary); stroke-width:4.5; }
.ts-decoration[data-frame="portal"] .ts-decoration-frame-inner { stroke-dasharray:3 2; stroke-width:2.2; }
.ts-decoration[data-frame="minimal"] .ts-decoration-aura { display:none; }
.ts-decoration[data-frame="minimal"] .ts-decoration-frame-outer { stroke-width:1.4; }
.ts-decoration[data-frame="minimal"] .ts-decoration-frame-inner { display:none; }
.ts-decoration[data-frame="engraved"] .ts-decoration-frame-outer { stroke:#d7e0e6; stroke-width:3.2; }
.ts-decoration[data-frame="neon"] .ts-decoration-frame-outer { stroke:var(--ts-dec-glow); stroke-width:3; }

.ts-decoration[data-name-effect="gradient"] .ts-decoration-name,
.ts-decoration[data-name-effect="living"] .ts-decoration-name,
.ts-decoration[data-name-effect="rift"] .ts-decoration-name {
  background:linear-gradient(95deg,#fff 5%,var(--ts-dec-primary) 48%,var(--ts-dec-secondary) 92%);
  background-clip:text;
  color:transparent;
}
.ts-decoration[data-name-effect="glow"] .ts-decoration-name {
  text-shadow:0 0 calc(20px * var(--ts-dec-intensity)) var(--ts-dec-glow);
}
.ts-decoration[data-name-effect="metallic"] .ts-decoration-name,
.ts-decoration[data-name-effect="steel"] .ts-decoration-name {
  background:linear-gradient(#fff 12%,#718397 42%,#f5f8fb 55%,#394657 88%);
  background-clip:text;
  color:transparent;
}
.ts-decoration[data-name-effect="starlight"] .ts-decoration-name {
  background:linear-gradient(90deg,#fff,#aee9ff 35%,#fff 52%,#a987ff 82%,#fff);
  background-size:180% 100%;
  background-clip:text;
  color:transparent;
  text-shadow:0 0 18px color-mix(in srgb,var(--ts-dec-glow) 45%,transparent);
}
.ts-decoration[data-name-effect="ember"] .ts-decoration-name,
.ts-decoration[data-name-effect="fire"] .ts-decoration-name {
  background:linear-gradient(#fff6c7 8%,#ffb13b 44%,#e32f3d 88%);
  background-clip:text;
  color:transparent;
  text-shadow:0 0 16px #ff572266;
}
.ts-decoration[data-name-effect="frost"] .ts-decoration-name {
  background:linear-gradient(#fff,#9ee9ff 55%,#8393ff);
  background-clip:text;
  color:transparent;
  text-shadow:0 0 15px #69d8ff66;
}
.ts-decoration[data-name-effect="void"] .ts-decoration-name {
  color:#eadfff;
  text-shadow:0 0 3px #fff,0 0 15px #8a45ff,0 0 30px #230052;
}
.ts-decoration[data-name-effect="rainbow"] .ts-decoration-name {
  background:linear-gradient(90deg,#67d9ff,#9874ff,#ff6ec7,#ffd166,#67d9ff);
  background-size:200% 100%;
  background-clip:text;
  color:transparent;
  animation:ts-dec-rainbow 5s linear infinite;
}
.ts-decoration[data-name-effect="rift"] .ts-decoration-name {
  text-shadow:-2px 0 color-mix(in srgb,var(--ts-dec-primary) 55%,transparent),2px 0 color-mix(in srgb,var(--ts-dec-secondary) 55%,transparent);
}

.ts-decoration[data-animation="rune_pulse"] .ts-decoration-frame-inner,
.ts-decoration[data-animation="pulse"] .ts-decoration-frame-inner { animation:ts-dec-pulse 2.8s ease-in-out infinite; }
.ts-decoration[data-animation="orbit"] .ts-decoration-orbit,
.ts-decoration[data-animation="portal"] .ts-decoration-orbit,
.ts-decoration[data-animation="gear"] .ts-decoration-orbit {
  position:absolute;
  left:2.35rem;
  top:.25rem;
  width:.34rem;
  height:.34rem;
  border-radius:50%;
  background:var(--ts-dec-glow);
  box-shadow:0 0 10px var(--ts-dec-glow);
  transform-origin:.15rem 2.25rem;
  animation:ts-dec-orbit 4s linear infinite;
}
.ts-decoration[data-animation="shimmer"] .ts-decoration-name,
.ts-decoration[data-name-effect="starlight"] .ts-decoration-name { animation:ts-dec-shimmer 5s linear infinite; }
.ts-decoration[data-animation="flicker"] .ts-decoration-emblem { animation:ts-dec-flicker 3.2s steps(1) infinite; }
.ts-decoration[data-animation="breathe"] .ts-decoration-emblem,
.ts-decoration[data-animation="shadow_breathe"] .ts-decoration-emblem { animation:ts-dec-breathe 3.5s ease-in-out infinite; }
.ts-decoration[data-animation="gear"] .ts-decoration-frame-inner { animation:ts-dec-spin 12s linear infinite; }
.ts-decoration[data-animation="portal"] .ts-decoration-frame-inner { animation:ts-dec-spin 7s linear infinite reverse; }
.ts-decoration[data-animation="float"] .ts-decoration-emblem { animation:ts-dec-float 3s ease-in-out infinite; }
.ts-decoration[data-animation="chromatic"] .ts-decoration-emblem { animation:ts-dec-chromatic 6s linear infinite; }

@keyframes ts-dec-pulse { 50% { opacity:.35; transform:scale(.77); } }
@keyframes ts-dec-orbit { to { transform:rotate(360deg); } }
@keyframes ts-dec-shimmer { to { background-position:180% 0; } }
@keyframes ts-dec-flicker { 0%,16%,20%,71%,75%,100%{opacity:1} 18%,73%{opacity:.62} }
@keyframes ts-dec-breathe { 50% { filter:brightness(1.3) saturate(1.18) drop-shadow(0 0 16px var(--ts-dec-glow)); } }
@keyframes ts-dec-spin { to { transform:scale(.84) rotate(360deg); } }
@keyframes ts-dec-float { 50% { transform:translateY(-5px); } }
@keyframes ts-dec-chromatic { to { filter:hue-rotate(360deg); } }
@keyframes ts-dec-rainbow { to { background-position:200% 0; } }

.ts-profile-theme {
  --ts-profile-border-width:1px;
  position:relative;
  isolation:isolate;
}
.ts-profile-theme::before {
  position:absolute;
  z-index:2;
  inset:-1px;
  padding:var(--ts-profile-border-width);
  border-radius:inherit;
  background:linear-gradient(115deg,transparent 5%,var(--ts-dec-primary) 24%,color-mix(in srgb,var(--ts-dec-glow) 72%,#fff) 43%,var(--ts-dec-secondary) 62%,transparent 83%);
  background-position:0 50%;
  background-size:260% 100%;
  content:"";
  pointer-events:none;
  opacity:calc(.42 + var(--ts-dec-intensity) * .5);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask-composite:exclude;
}
.ts-profile-theme[data-profile-frame="minimal"]::before { background:var(--ts-dec-primary);opacity:.3; }
.ts-profile-theme[data-profile-frame="royal"]::before {
  --ts-profile-border-width:2px;
  background:linear-gradient(105deg,#6e4a17,#f7dc8b 30%,#fff4bd 48%,#936428 70%,var(--ts-dec-secondary));
}
.ts-profile-theme[data-profile-frame="frost"]::before {
  background:linear-gradient(110deg,transparent,#fff 20%,#8de7ff 36%,var(--ts-dec-secondary) 54%,#eaffff 72%,transparent);
  filter:drop-shadow(0 0 5px color-mix(in srgb,var(--ts-dec-glow) 45%,transparent));
}
.ts-profile-theme[data-profile-frame="infernal"]::before {
  background:linear-gradient(110deg,#401018,#ff5a25,#ffd078,#b7183d,#3c0711);
  filter:drop-shadow(0 0 6px color-mix(in srgb,var(--ts-dec-glow) 50%,transparent));
}
.ts-profile-theme[data-profile-frame="shadow"]::before {
  background:linear-gradient(110deg,transparent,var(--ts-dec-secondary),#d7c4ff,var(--ts-dec-primary),transparent);
  opacity:.56;
}
.ts-profile-theme[data-profile-frame="nature"]::before {
  background:repeating-linear-gradient(120deg,var(--ts-dec-primary) 0 8px,var(--ts-dec-secondary) 8px 12px,transparent 12px 16px);
}
.ts-profile-theme[data-profile-frame="mechanical"]::before {
  background:repeating-linear-gradient(90deg,#a9c3cf 0 12px,var(--ts-dec-secondary) 12px 15px,#263640 15px 18px);
}
.ts-profile-theme[data-profile-frame="portal"]::before {
  --ts-profile-border-width:2px;
  background:linear-gradient(90deg,var(--ts-dec-primary),var(--ts-dec-secondary),#fff,var(--ts-dec-primary));
  background-size:300% 100%;
  filter:drop-shadow(0 0 7px color-mix(in srgb,var(--ts-dec-glow) 54%,transparent));
}
.ts-profile-theme[data-profile-animation="rune_pulse"]::before,
.ts-profile-theme[data-profile-animation="orbit"]::before,
.ts-profile-theme[data-profile-animation="shimmer"]::before,
.ts-profile-theme[data-profile-animation="gear"]::before,
.ts-profile-theme[data-profile-animation="portal"]::before,
.ts-profile-theme[data-profile-animation="pulse"]::before,
.ts-profile-theme[data-profile-animation="chromatic"]::before { animation:ts-profile-border-flow 6s linear infinite; }
.ts-profile-theme[data-profile-animation="flicker"]::before { animation:ts-profile-border-flicker 3.4s steps(1) infinite; }
.ts-profile-theme[data-profile-animation="breathe"]::before,
.ts-profile-theme[data-profile-animation="shadow_breathe"]::before { animation:ts-profile-border-breathe 3.8s ease-in-out infinite; }

.public-profile-dialog.ts-profile-theme {
  border-color:transparent;
  box-shadow:0 30px 90px rgba(0,0,0,.6),0 0 calc(30px * var(--ts-dec-intensity)) color-mix(in srgb,var(--ts-dec-glow) 22%,transparent);
}
.public-profile-dialog.ts-profile-theme .public-profile-level {
  border-color:color-mix(in srgb,var(--ts-dec-primary) 65%,#24394c);
  background:radial-gradient(circle at 50% 42%,color-mix(in srgb,var(--ts-dec-primary) 15%,#07101a),#050a12 72%);
  box-shadow:inset 0 0 18px color-mix(in srgb,var(--ts-dec-secondary) 11%,transparent),0 0 18px color-mix(in srgb,var(--ts-dec-glow) 16%,transparent);
}
.public-profile-dialog.ts-profile-theme .public-profile-facts > div,
.public-profile-dialog.ts-profile-theme .public-profile-achievements,
.rpg-decoration-preview.ts-profile-theme .rpg-decoration-profile-sample > span {
  position:relative;
  overflow:hidden;
  border-color:color-mix(in srgb,var(--ts-dec-primary) 26%,#263748);
  background:radial-gradient(circle at 100% 0,color-mix(in srgb,var(--ts-dec-secondary) 10%,transparent),transparent 48%),linear-gradient(125deg,rgba(5,13,21,.9),rgba(10,8,17,.82));
  box-shadow:inset 2px 0 color-mix(in srgb,var(--ts-dec-primary) 62%,transparent);
}
.public-profile-dialog.ts-profile-theme[data-profile-frame="royal"] .public-profile-facts > div,
.public-profile-dialog.ts-profile-theme[data-profile-frame="royal"] .public-profile-achievements,
.rpg-decoration-preview.ts-profile-theme[data-profile-frame="royal"] .rpg-decoration-profile-sample > span {
  box-shadow:inset 0 1px color-mix(in srgb,#f4d981 60%,transparent),inset 3px 0 color-mix(in srgb,var(--ts-dec-secondary) 55%,transparent);
}
.player-search-results article.ts-profile-theme {
  border-color:transparent;
  background:radial-gradient(circle at 100% 0,color-mix(in srgb,var(--ts-dec-secondary) 9%,transparent),transparent 45%),linear-gradient(120deg,rgba(6,14,23,.94),rgba(9,8,17,.9));
  box-shadow:0 8px 22px rgba(0,0,0,.15);
}
.player-search-results article.ts-profile-theme::after { display:none; }
.leaderboard-entry.ts-profile-theme {
  border-color:transparent;
  background:
    radial-gradient(circle at 100% 50%,color-mix(in srgb,var(--ts-dec-secondary) 8%,transparent),transparent 42%),
    linear-gradient(110deg,rgba(7,15,24,.9),rgba(9,8,16,.86));
}

@keyframes ts-profile-border-flow { to { background-position:260% 50%; } }
@keyframes ts-profile-border-flicker {
  0%,91%,100% { opacity:.85; }
  92% { opacity:.18; }
  94% { opacity:1; }
  96% { opacity:.4; }
}
@keyframes ts-profile-border-breathe {
  0%,100% { opacity:.34;filter:none; }
  50% { opacity:1;filter:drop-shadow(0 0 7px color-mix(in srgb,var(--ts-dec-glow) 48%,transparent)); }
}

@media(max-width:620px) {
  .ts-decoration { gap:.75rem; }
  .ts-decoration-emblem { width:4rem; height:4rem; }
  .ts-decoration-name { font-size:clamp(1.7rem,11vw,3rem); }
}
@media(prefers-reduced-motion:reduce) {
  .ts-decoration *,
  .ts-profile-theme::before { animation:none!important; transition:none!important; }
}
