#dlgChal{
  --wm-gold:#ffdf91;--wm-light:#fff9e8;
  box-sizing:border-box;width:min(940px,calc(100vw - 26px));max-width:calc(100vw - 12px);
  max-height:calc(100dvh - 16px);margin:auto;padding:0;isolation:isolate;overflow:hidden;
  color:#fff9f9;border:2px solid #ffc561;border-radius:clamp(20px,3vw,42px);
  background:#080a27 url('sky.webp') center center / cover no-repeat;
  box-shadow:inset 0 0 0 2px #6a3545,inset 0 0 0 4px #f4ae4970,0 0 0 1px #704f77,0 0 24px #d79bff45,0 12px 64px #010112ee;
  font-family:"Golos Text",system-ui,sans-serif;
}
body.cosmos dialog#dlgChal{background:#080a27 url('sky.webp') center center / cover no-repeat!important;border-color:#ffc561!important}
#dlgChal[open]{display:flex;flex-direction:column}
#dlgChal::before{content:"";position:absolute;inset:0;z-index:3;pointer-events:none;border-radius:inherit;border:24px solid transparent;border-image:url('../season-result/frame.webp') 46 58 / 24px 29px / 0 stretch}
#dlgChal::backdrop{background:#05031ac9;backdrop-filter:blur(4px)}
#dlgChal .dlgHead{flex:0 0 auto;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 4.5% 0 4%;border:0;background:linear-gradient(180deg,#0506205c,#06062024);position:relative}
#dlgChal #chT{display:flex;align-items:center;gap:clamp(6px,1.3vw,20px);position:relative;min-width:0;margin:0;text-align:left;
  color:#ffe392;font:700 clamp(25px,3.8vw,46px)/1.08 Georgia,"Times New Roman",serif;text-shadow:0 2px 0 #763d16,0 0 11px #ce7b4570}
#dlgChal #chT span{position:relative;padding:0 0 .11em}
#dlgChal #chT span::after{content:"";position:absolute;left:0;right:-4%;bottom:-4px;height:7px;background:radial-gradient(ellipse at center,#ffe7a4 0%,#edaf54 5%,transparent 42%) center/28% 100% no-repeat,linear-gradient(90deg,transparent,#ffbf54,#fff0b0,#ffbf54,transparent) center/100% 1px no-repeat}
#dlgChal .wm-crest{width:clamp(65px,9vw,133px);height:auto;flex:none;mix-blend-mode:screen;mask-image:radial-gradient(ellipse at 50% 49%,black 60%,transparent 80%)}
#dlgChal .dlgHead button{flex:none;padding:7px 18px;min-height:42px;font-size:clamp(14px,1.55vw,20px);color:#fff7e2}
#dlgChal .wm-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8267a6 #0b0925;padding:0 3.8% clamp(34px,4.7vw,65px);position:relative;z-index:1}
.wm-card{color:#fff9fc;text-align:center;line-height:1.28;text-shadow:0 1px 3px #05031c;isolation:isolate}
.wm-card .wm-intro{max-width:86%;margin:7px auto 10px;padding:4px 5px;text-align:center;font-size:clamp(14px,1.75vw,20px);line-height:1.39;font-weight:450;text-wrap:pretty;color:#fff8ff;text-shadow:0 1px 4px #01021a,0 0 6px #03061d}
.wm-card .wm-intro strong{font:700 1.15em/1.26 "Golos Text",system-ui,sans-serif;display:block;color:#ffdd79;text-shadow:0 1px 2px #532514,0 0 9px #251132}
.wm-showpiece{--hero-h:clamp(122px,12.4vw,165px);position:relative;width:min(420px,74%);height:var(--hero-h);margin:0 auto -6px;z-index:2;pointer-events:none;background:radial-gradient(ellipse at 50% 71%,#fce19e5c,transparent 58%)}
.wm-showpiece::before,.wm-showpiece::after{content:"";position:absolute;bottom:2%;left:0;width:22%;height:76%;background:url('../player-laurel.svg') center / contain no-repeat;filter:drop-shadow(0 0 2px #ffd767) drop-shadow(0 0 6px #f6983b88)}
.wm-showpiece::after{left:auto;right:0;transform:scaleX(-1)}
.wm-showpiece img{position:absolute;height:auto;object-fit:contain}
.wm-showpiece .wm-dice{left:16%;bottom:3%;width:61%;height:99%;filter:drop-shadow(0 0 3px #fff3a4) drop-shadow(0 0 8px #f9ad4b9c)}
.wm-showpiece .wm-coins{right:12%;bottom:2%;width:27%;height:50%;filter:drop-shadow(0 2px 1px #4c240f) drop-shadow(0 0 4px #ffb84c99)}
.wm-coins-only .wm-coins{width:60%;height:95%;right:20%}
.wm-prize{position:relative;z-index:1;box-sizing:border-box;width:min(75%,690px);margin:0 auto -28px;padding:8px 19px 13px;
  color:#ffe59c;font:700 clamp(19px,2.1vw,25px)/1.2 "Golos Text",system-ui,sans-serif;
  border:2px solid transparent;border-radius:42px;
  background:linear-gradient(175deg,#291044,#090620 50%,#210c35) padding-box,linear-gradient(138deg,#fff1bc,#a45c17 16%,#fff5b5 25%,#ffc568 63%,#8d4617 80%,#fff3b7) border-box;
  box-shadow:inset 0 1px 5px #fff3a966,inset 0 -3px 8px #ee9b3266,0 0 0 1px #ba722d,0 0 11px #f9ac4966}
.wm-prize span,.wm-prize strong{display:block}.wm-prize span{font-size:.87em;color:#ffe7a1}.wm-prize strong{font-weight:750}
.wm-objectives{box-sizing:border-box;padding:39px 4.1% 10px;border:2px solid transparent;border-radius:clamp(17px,3.2vw,37px);
  background:linear-gradient(151deg,#0b0c39ed,#040723f5 54%,#160735ed) padding-box,linear-gradient(120deg,#ffbf51,#ffffbd 10%,#a65321 22%,#533d91 40%,#a5eaff 62%,#d78b36 87%,#fff1a7) border-box;
  box-shadow:inset 0 0 0 3px #6450a766,inset 0 -3px 18px #3e31a6a8,0 2px 13px #32156194}
.wm-row{display:grid;grid-template-columns:clamp(46px,6.6vw,78px) minmax(0,1.25fr) minmax(0,1.9fr) max-content;align-items:center;gap:clamp(10px,1.7vw,21px);text-align:left;padding:9px 0;min-height:57px}
.wm-row+.wm-row{border-top:1px solid #735d9f99}
.wm-row .wm-icon{width:100%;height:54px;object-fit:contain;filter:drop-shadow(0 0 4px #797efd66)}
.wm-row:nth-child(2) .wm-icon{mix-blend-mode:screen;mask-image:radial-gradient(ellipse at 50% 50%,black 59%,transparent 80%)}
.wm-name{font-weight:600;font-size:clamp(16px,1.75vw,21px)}
.wm-track{box-sizing:border-box;display:block;height:22px;border:1.5px solid #9de0ff;border-radius:999px;overflow:hidden;background:linear-gradient(#050925,#071135 50%,#0d174a);box-shadow:inset 0 1px 5px #000b,inset 0 -2px 5px #2264c9,0 0 7px #156ce1aa}
.wm-track i{height:100%;display:block;border-radius:inherit;background:linear-gradient(#c0f9ff,#35dfff 36%,#0596ff 68%,#1664ce);box-shadow:inset 0 1px 2px #f1ffff}
.wm-count{box-sizing:border-box;min-width:90px;padding:3px 12px;text-align:center;border:1px solid #efbc57;border-radius:99px;background:linear-gradient(#0b0b30,#100820);color:#ffe59a;font:700 clamp(17px,1.95vw,22px)/1.18 "Golos Text",system-ui,sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap}
.wm-card .wm-done,.wm-card .wm-claim{margin:8px auto 5px}.wm-card .wm-done{color:#97f2bd;font-size:15px;font-weight:650}
#endChal .wm-card{background:#090b28 url('sky.webp') center / cover no-repeat;border-radius:14px;padding:10px;font-size:14px}
#endChal .wm-intro{display:none}#endChal .wm-showpiece{width:158px;height:56px}
#endChal .wm-prize{width:90%;font-size:15px;padding:4px 10px 6px;margin-bottom:-13px}#endChal .wm-prize span{display:inline;margin-right:.32em}#endChal .wm-prize strong{display:inline}
#endChal .wm-objectives{padding:18px 10px 5px;border-radius:16px}#endChal .wm-row{grid-template-columns:32px minmax(0,1fr) minmax(30px,.66fr) max-content;gap:6px;min-height:32px;padding:4px 0}
#endChal .wm-icon{height:27px}#endChal .wm-name,#endChal .wm-count{font-size:13px}#endChal .wm-count{min-width:49px;padding:2px 5px}#endChal .wm-track{height:10px}
@media(max-width:600px){
  body.cosmos dialog#dlgChal,#dlgChal{background-size:108% 100%!important}
  #dlgChal{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:24px}
  #dlgChal .dlgHead{padding:8px 12px 1px;gap:5px}
  #dlgChal #chT{font-size:clamp(20px,5.45vw,30px);gap:4px}
  #dlgChal .wm-crest{width:clamp(40px,11vw,64px)}
  #dlgChal .dlgHead button{font-size:13px;padding:5px 10px;min-height:34px}
  #dlgChal .wm-scroll{padding:0 9px 32px}
  #dlgChal .wm-intro{max-width:95%;margin:9px auto 4px;font-size:14px;line-height:1.37}
  #dlgChal .wm-showpiece{width:min(270px,84%);height:106px}
  #dlgChal .wm-prize{width:93%;margin-bottom:-18px;border-radius:23px;padding:5px 8px 8px;font-size:16px}
  #dlgChal .wm-objectives{padding:24px 12px 6px;border-radius:20px}
  #dlgChal .wm-row{grid-template-columns:41px minmax(0,1fr) max-content;grid-template-rows:auto auto;gap:3px 9px;padding:8px 0;min-height:43px}
  #dlgChal .wm-icon{grid-row:span 2;height:37px}
  #dlgChal .wm-name{font-size:15px}
  #dlgChal .wm-count{grid-column:3;grid-row:1;min-width:58px;font-size:15px;padding:1px 7px}
  #dlgChal .wm-track{grid-column:2/4;grid-row:2;height:11px}
}
@media(min-width:601px) and (max-height:560px){
  #dlgChal .dlgHead{padding-top:2px}#dlgChal .wm-crest{width:71px}#dlgChal #chT{font-size:29px}
  #dlgChal .wm-showpiece{height:85px;width:210px}#dlgChal .wm-intro{font-size:15px;margin-top:3px;margin-bottom:3px}
  #dlgChal .wm-prize{font-size:17px;padding:3px 12px 6px;margin-bottom:-16px}
  #dlgChal .wm-objectives{padding-top:20px}#dlgChal .wm-row{min-height:32px;padding:3px 0}
  #dlgChal .wm-icon{height:33px}#dlgChal .wm-scroll{padding-bottom:25px}
}
