.rf-art {display:block; width:100%; height:100%; object-fit:contain; pointer-events:none;}
.rf-art[hidden] {display:none;}
.rf-sample {--rf-avatar-inset:11%; position:relative; display:inline-grid; place-items:center; width:clamp(64px, 9vw, 104px); aspect-ratio:1; flex:none;}
.rf-sample::before {content:""; position:absolute; inset:var(--rf-avatar-inset); border-radius:50%; background:radial-gradient(circle at 33% 20%, #45505c, #1a222a 66%, #141921);}
.rf-sample .rf-art {position:relative;}
.gc-art-preview .rf-sample > .rf-art {padding:0; max-height:none;}
.rf-sample > .rf-art[src$=".webp"], .fp-avatar-frame > .rf-art[src$=".webp"] {
  --rf-avatar-size:calc(100% - 2 * var(--rf-avatar-inset));
  position:absolute;
  inset:auto;
  top:calc(var(--rf-avatar-inset) - var(--rf-avatar-size) * var(--rf-top));
  left:calc(var(--rf-avatar-inset) - var(--rf-avatar-size) * var(--rf-left));
  width:calc(var(--rf-avatar-size) * (1 + var(--rf-left) + var(--rf-right)));
  height:calc(var(--rf-avatar-size) * (1 + var(--rf-top) + var(--rf-bottom)));
  max-width:none;
  max-height:none;
  object-fit:cover;
  transform:rotate(var(--rf-rotation, 0deg));
}
[data-reputation-frame] {position:relative;}
[data-reputation-frame]::after {
  content:"";
  position:absolute;
  top:calc(-100% * var(--rf-top));
  left:calc(-100% * var(--rf-left));
  width:calc(100% * (1 + var(--rf-left) + var(--rf-right)));
  height:calc(100% * (1 + var(--rf-top) + var(--rf-bottom)));
  z-index:1;
  background:var(--rf-image) center / 100% 100% no-repeat;
  transform:rotate(var(--rf-rotation, 0deg));
  pointer-events:none;
}
[data-reputation-frame$="/frame-0.svg"] {--rf-image:url("../gamification/reputation-frames/frame-0.svg"); --rf-top:.1154; --rf-right:.1154; --rf-bottom:.1154; --rf-left:.1154;}
.rf-art[src$="/creator-chrome-frame-1.webp"], [data-reputation-frame$="/creator-chrome-frame-1.webp"] {--rf-image:url("../gamification/reputation-frames/creator-chrome-frame-1.webp"); --rf-top:.116; --rf-right:.1012; --rf-bottom:.1054; --rf-left:.1203; --rf-rotation:135deg;}
.rf-art[src$="/creator-chrome-frame-2.webp"], [data-reputation-frame$="/creator-chrome-frame-2.webp"] {--rf-image:url("../gamification/reputation-frames/creator-chrome-frame-2.webp"); --rf-top:.1608; --rf-right:.1412; --rf-bottom:.1706; --rf-left:.1903;}
.rf-art[src$="/creator-chrome-frame-3.webp"], [data-reputation-frame$="/creator-chrome-frame-3.webp"] {--rf-image:url("../gamification/reputation-frames/creator-chrome-frame-3.webp"); --rf-top:.1586; --rf-right:.1829; --rf-bottom:.1607; --rf-left:.1807;}
.rf-art[src$="/creator-chrome-frame-4.webp"], [data-reputation-frame$="/creator-chrome-frame-4.webp"] {--rf-image:url("../gamification/reputation-frames/creator-chrome-frame-4.webp"); --rf-top:.1153; --rf-right:.185; --rf-bottom:.1545; --rf-left:.0848;}
.rf-art[src$="/creator-chrome-frame-5.webp"], [data-reputation-frame$="/creator-chrome-frame-5.webp"] {--rf-image:url("../gamification/reputation-frames/creator-chrome-frame-5.webp"); --rf-top:.1312; --rf-right:.1213; --rf-bottom:.1146; --rf-left:.1246; --rf-rotation:180deg;}
.rf-score {color:var(--rf-color, inherit);}
.rf-detail {display:flex; align-items:center; gap:14px;}
.rf-detail > div, .rf-result > div {display:grid; gap:4px;}
.rf-detail strong {font-size:1.375rem;}
.rf-detail span, .rf-result small {opacity:.8;}
.rf-detail .rf-sample {opacity:1;}
.rf-results, .rf-cards {display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap:12px;}
.rf-cards {grid-template-columns:repeat(auto-fit, minmax(min(100%, 170px), 1fr));}
.rf-result {display:flex; align-items:center; gap:12px; padding:10px; background:#161b21; color:#eef2f6; border:1px solid #ffffff26; border-radius:14px;}
.rf-result strong, .rf-result .rf-score {font-weight:650;}
.rf-controls {display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin-block:8px 14px;}
.rf-controls label {display:grid; gap:4px; min-width:0; max-width:100%;}
.rf-controls input, .rf-controls select, .rf-controls button {box-sizing:border-box; height:38px; max-width:100%; padding:4px 9px; border:1px solid #677380; border-radius:8px; background:#1b2229; color:#f0f3f6; font:inherit; color-scheme:dark;}
.rf-controls input {width:135px;}
.rf-controls button {cursor:pointer;}
.rf-controls button:disabled {opacity:.55; cursor:default;}
.rf-controls :focus-visible {outline:2px solid #c9f56c; outline-offset:2px;}
@media (prefers-reduced-motion:no-preference) {
  .rf-animate > .rf-art {animation:rf-glint 900ms 180ms ease-in-out both;}
}
@keyframes rf-glint {
  0%, 100% {filter:none;}
  42% {filter:brightness(1.25) drop-shadow(0 0 5px var(--rf-color, #e8e2ff));}
}
