#dlgRewards#dlgRewards.royalRewards.royalProfile[open] {height:fit-content;}
#dlgRewards#dlgRewards.royalProfile .pane[data-rwp="profile"]:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #aa8dc5 #0b0a26;
  border-top: 1px solid #9c78cc;
  background:
    linear-gradient(112deg,#11083136,transparent 52%,#10051f25),
    url('../leagues/sky.webp') center 47% / cover no-repeat #090923;
  border-radius: 4px 4px 18px 18px;
}
#rwProfile {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  padding: clamp(8px,1vw,16px) clamp(8px,1.2vw,19px) clamp(16px,1.5vw,26px);
  color: #fff7eb;
}
#rwProfile::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto auto;
  width: 37%;
  height: clamp(90px,9.6vw,148px);
  background: url('../quests/galaxy.webp') center / 100% 100% no-repeat;
  mask-image: radial-gradient(ellipse at 50% 50%, black 22%, #000c 42%, transparent 72%);
  pointer-events: none;
}
#rwProfile::after {
  content:"";position:absolute;z-index:-1;inset:auto 0 0;height:10%;pointer-events:none;
  background:url('../quests/landscape.webp') center bottom / 100% 100% no-repeat;
  mask-image:linear-gradient(transparent,#0009 76%,black);
}
#rwProfile .prof {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: min(840px, 65%);
  margin: 0;
  gap: clamp(10px,1.7vw,25px);
  padding: 6px clamp(12px,2vw,28px) 6px 8px;
  border: 1px solid #8cd2ff;
  border-radius: 100px 70px 70px 100px;
  background: linear-gradient(95deg, #130c33ed, #090821f0 40%, #101340be 77%, #0e154170),
    url('../../diskilay-match-space-55.webp') right 62% / cover;
  box-shadow: inset 0 1px 3px #b88aff, inset 0 -1px 5px #387efe, 0 0 12px #3069e655;
}
#rwProfile .prof::before {
  content:"";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 auto;
  width: 30%;
  border-radius: 0 80px 80px 0;
  background: url('../hall/planet.webp') left 72% / cover;
  mask-image: linear-gradient(90deg,transparent, black 42%);
}
#rwProfile .prof .ava {
  width: clamp(62px,6.3vw,100px);
  height: auto;
  aspect-ratio: 1;
  flex: none;
  outline: 1px solid #ffdb78;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #643712, 0 0 12px #ff9c3db3;
}
#rwProfile .profileDetails { min-width: 0; flex: 1; text-shadow: 0 1px 4px #02021c; }
#rwProfile .pn {display:block;overflow-wrap:anywhere;font-size:clamp(19px,1.9vw,30px);line-height:1.1;color:#fff4d4;}
#rwProfile .pt {margin:3px 0 5px;color:#ffe7a1;font-size:clamp(12px,1.13vw,17px);line-height:1.25;}
#rwProfile .profileDetails small {display:block;font-size:clamp(11px,.94vw,15px);line-height:1.35;color:#f4edff;}
#rwProfile .xpBar {box-sizing:border-box;width:min(100%,560px);height:clamp(9px,.95vw,14px);margin:4px 0 5px;border:1px solid #adc8e6;background:#070d21;box-shadow:inset 0 2px 4px #000a;}
#rwProfile .xpBar i {border-radius:inherit;background:linear-gradient(180deg,#ffffff8f,transparent 35%,#113eca22 82%,#b0f8ff80),linear-gradient(90deg,#00c6eb,#47edff 68%,#fff192 94%,#ffa433);box-shadow:0 0 8px #ffe48e;}
#rwProfile h3 {
  margin:clamp(10px,1.15vw,19px) 0 clamp(8px,.8vw,13px);
  display:flex;align-items:center;gap:10px;
  font:700 clamp(17px,1.5vw,24px)/1.1 var(--rq-serif,Georgia,serif);
  color:#ffedc8;text-shadow:0 2px 5px #05000a;
}
#rwProfile h3::before {content:"";width:1.8em;height:1.28em;background:var(--heading-art) center / contain no-repeat;mask-image:radial-gradient(ellipse,black 47%, transparent 78%);flex:none;}
#rwProfile .frameTitle {--heading-art:url('../meteor/rain/saturn.webp');}
#rwProfile .statsTitle {--heading-art:url('../modes/cup.webp');}
#rwProfile h3::after {content:"";height:17px;flex:1;min-width:10px;background:radial-gradient(ellipse at center,#fffbd2, #e4acff 35%,transparent 72%) 45% center/16px 12px no-repeat,linear-gradient(90deg,#daa47e,#bc80ff 20%,#fff6bb 45%,#b783ff 62%,transparent) center / 100% 1px no-repeat;
  filter:drop-shadow(0 0 3px #c374ff);}
#rwProfile .frames {display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:clamp(5px,.64vw,10px);}
#rwProfile .frBtn {
  box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;
  gap:4px;min-width:0;width:100%;min-height:clamp(74px,6.15vw,98px);padding:7px 2px 5px;
  border:1px solid #528bff;border-radius:clamp(9px,.85vw,15px);
  background:radial-gradient(ellipse at 50% 0%,#223a69bd,transparent 70%),linear-gradient(160deg,#131630ee,#080e28f5 65%,#1b204dea);
  --profile-frame-shadow:inset 0 1px 2px #99dcff,inset 0 -2px 4px #273b96,0 2px 4px #060212;
  text-shadow:0 1px 3px #020015;
}
#rwProfile .frBtn small {display:block;font-size:clamp(10px,.81vw,13px);line-height:1.16;color:#fff5e6;overflow-wrap:anywhere;}
#rwProfile .frBtn .ava {width:clamp(36px,3.15vw,49px);height:auto;aspect-ratio:1;flex:none;}
#rwProfile .frBtn:disabled {opacity:1;border-color:#515c9e;background:linear-gradient(150deg,#17182cd9,#090c24f0 78%,#231648f2);}
#rwProfile .frBtn:disabled .ava {filter:saturate(.9) brightness(.83);}
#rwProfile .frBtn:disabled small {color:#e0dbea;}
#rwProfile .frBtn.on {
  border-color:#fff4a5;
  background:radial-gradient(ellipse at 50% 28%,#97571bdd,#48220af5 60%,#66330eea);
  --profile-frame-shadow:inset 0 0 0 1px #ffaf3b,inset 0 0 10px #ffac3b,0 0 5px #ffc861,0 0 13px #ff880697;
}
#rwProfile .frBtn:enabled:hover,#rwProfile .frBtn:focus-visible {outline:2px solid #9ceaff;outline-offset:1px;}
#rwProfile .stGrid {display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:clamp(6px,.8vw,13px);}
#rwProfile .stGrid>div {
  --cut:10px;
  clip-path:polygon(var(--cut) 0,calc(100% - var(--cut)) 0,100% var(--cut),100% calc(100% - var(--cut)),calc(100% - var(--cut)) 100%,var(--cut) 100%,0 calc(100% - var(--cut)),0 var(--cut));
  position:relative;isolation:isolate;box-sizing:border-box;border-radius:0;min-width:0;
  display:grid;grid-template-columns:auto auto;grid-template-rows:auto auto;align-content:center;justify-content:center;align-items:center;
  gap:3px 5px;padding:8px 5px;min-height:clamp(70px,5.8vw,90px);
  background:linear-gradient(137deg,#f0caff,#9481ff 8%,#1979dc 25%,#79dfff 49%,#9449e0 70%,#ffbe66 94%,#3d176d);
}
#rwProfile .stGrid>div::after {content:"";position:absolute;z-index:-1;inset:1.4px;clip-path:inherit;background:radial-gradient(ellipse at 75% 120%,#6d2b60,transparent 60%),linear-gradient(160deg,#14325f,#0c102a 38%,#100c2e 88%,#413167);}
#rwProfile .stGrid>div::before {content:"";grid-row:1;grid-column:1;width:clamp(26px,2.5vw,39px);height:clamp(25px,2.35vw,37px);background:var(--stat-art) center/contain no-repeat;mask-image:radial-gradient(ellipse at center,black 48%,transparent 80%);}
#rwProfile .stGrid span {text-align:start;color:#fff4eb;font-size:clamp(11px,.96vw,15px);line-height:1.13;overflow-wrap:anywhere;}
#rwProfile .stGrid b {grid-column:1 / -1;text-align:center;color:#fff0cd;font-size:clamp(20px,1.8vw,29px);line-height:1.1;overflow-wrap:anywhere;}
#rwProfile [data-stat="games"] {--stat-art:url('../crystal-dice.webp');}
#rwProfile [data-stat="wins"] {--stat-art:url('../modes/cup.webp');}
#rwProfile [data-stat="mars"] {--stat-art:url('../meteor/rain/mars.webp');}
#rwProfile [data-stat="best"] {--stat-art:url('../asteroid/charge.webp');}
#rwProfile [data-stat="kush"] {--stat-art:url('../asteroid/coin.webp');}
#rwProfile [data-stat="hits"] {--stat-art:url('../crystal-light-checkers.webp');}
#rwProfile [data-stat="puzzles"] {--stat-art:url('../achievement-icons/puzzle1.png');}
#rwProfile [data-stat="cups"] {--stat-art:url('../master-trophy.webp');}
@media(max-width:1050px) {
  #rwProfile .frames {grid-template-columns:repeat(9,minmax(0,1fr));}
  #rwProfile .prof {width:74%;}
}
@media(max-width:760px) {
  #rwProfile .frames {grid-template-columns:repeat(6,minmax(0,1fr));}
  #rwProfile .stGrid {grid-template-columns:repeat(4,minmax(0,1fr));}
  #rwProfile .prof {width:90%;}
}
@media(max-width:520px) {
  #rwProfile {padding:9px 5px 16px;}
  #rwProfile .prof {width:100%;border-radius:22px;padding:9px 10px;gap:11px;}
  #rwProfile .prof .ava {width:53px;}
  #rwProfile .prof::before {border-radius:0 22px 22px 0;}
  #rwProfile .frames {grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;}
  #rwProfile .frBtn {min-height:72px;}
  #rwProfile .frBtn small {font-size:11px;}
  #rwProfile .stGrid {grid-template-columns:repeat(2,minmax(0,1fr));}
  #rwProfile .stGrid span {font-size:12px;}
}
@media(max-width:340px) { #rwProfile .frames {grid-template-columns:repeat(3,minmax(0,1fr));} }

@layer diskilayControls {
  @media (forced-colors:none) {
    #rwProfile button.frBtn {box-shadow:var(--profile-frame-shadow) !important;}
    #rwProfile button.frBtn:disabled {filter:none !important;}
  }
}
