/* MEMEJONG — arcade reward machine: one richly illustrated progress rail for points, then XP. */
.modal:has(.arcade-settlement){
 width:min(574px,calc(100% - 20px));max-width:574px;max-height:min(95dvh,920px);padding:22px 24px 18px;
 overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
 background:radial-gradient(ellipse 110% 65% at 50% -13%,#6a4389 0%,#332347 65%,#251c3b 100%);
 border:2px solid #a687b8;border-radius:25px;box-shadow:0 24px 75px #09031fcc, inset 0 2px #ffffff39;
}
.arcade-settlement{--arcade-tint:#fff1a2;text-align:center;position:relative;isolation:isolate;color:#fff8f3}
.arcade-head{position:relative;z-index:1}
.arcade-head__chapter{font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:#e8c9ff;font-size:11px;line-height:1.5}
.arcade-head__chapter span{color:#fff0c3}
.arcade-head h2{font-size:clamp(22px,4vw,31px);line-height:1.08;font-weight:1000;letter-spacing:-.7px;
 margin:7px 0 6px;color:#fff8dd;text-shadow:0 3px 0 #a95480,0 7px 17px #130a2b}
.arcade-head .settlement__stars{margin:0 0 12px;font-size:30px;gap:10px}
.arcade-head .settlement__stars span{text-shadow:0 3px 0 #594273,0 0 12px #654583}
.arcade-head .settlement__stars .earned{text-shadow:0 3px #b06830,0 0 20px #ffd35e}
/* Toy-like bevelled cabinet and dramatic lights */
.arcade-machine{position:relative;border-radius:25px;margin:4px 0 13px;padding:8px;background:linear-gradient(155deg,#ffe7a7 0%,#ff98b0 35%,#8b6bdc 82%,#ffcb99 100%);
 border:2px solid #fff0bc;box-shadow:0 7px 0 #63436a,0 12px 19px #10042177,0 0 22px #ffc47845,inset 0 2px #fff9dc}
.arcade-machine::before{content:"";position:absolute;inset:3px;border:1px solid #ffffff99;border-radius:20px;pointer-events:none}
.arcade-machine__body{position:relative;z-index:1;border-radius:18px;overflow:visible;padding:13px 17px 9px;
 background:linear-gradient(148deg,#242344,#342456 53%,#39234d);box-shadow:inset 0 4px 12px #0b052576, inset 0 1px #ffffff29}
.arcade-machine__accent{position:absolute;z-index:3;top:3px;width:18px;height:8px;background:#fff9df;border-radius:50%;box-shadow:0 0 15px #fffbb1;transform:rotate(25deg)}
.arcade-machine__accent--one{left:29px}.arcade-machine__accent--two{right:29px;transform:rotate(-25deg)}
.arcade-stage{display:flex;align-items:center;text-align:left;gap:11px;min-height:54px}
.arcade-stage__icon{width:49px;height:49px;display:grid;place-items:center;flex:0 0 49px;font-size:29px;border-radius:16px;
 background:linear-gradient(145deg,#fffbe1,#ffbd91);box-shadow:0 4px 0 #c78383,0 5px 12px #1b082a88;filter:drop-shadow(0 0 8px #fff6bb38)}
.arcade-stage__copy{min-width:0;flex:1}
.arcade-stage__copy b{font-size:clamp(13px,2.8vw,16px);line-height:1.2;display:block;color:#fff9de;text-shadow:0 2px #24112e}
.arcade-stage__copy small{font-size:11px;line-height:1.3;color:#d9c4e1;display:block;margin-top:4px}
.arcade-stage__gain{color:#fff8c8;text-shadow:0 2px 0 #b2735b,0 0 15px #ffd98088;font-weight:1000;font-size:clamp(15px,4vw,22px);white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:-1px}
.arcade-stage-change .arcade-stage__icon{animation:arcadePunch .48s cubic-bezier(.18,1.85,.29,1) both}
.arcade-stage-change .arcade-stage__gain{animation:arcadePunch .5s cubic-bezier(.2,1.65,.32,1) both}
.arcade-count{display:flex;align-items:end;justify-content:center;gap:12px;margin:6px 0 6px;min-height:79px}
.arcade-count__label{display:block;color:#e8bdf7;letter-spacing:.16em;font-size:10px;font-weight:1000;text-align:center}
.arcade-count__value{font-weight:1000;font-size:clamp(46px,10vw,69px);letter-spacing:-2.5px;font-variant-numeric:tabular-nums;line-height:1.02;color:#fff8da;
 -webkit-text-stroke:1px #fff3b3;text-shadow:0 4px 0 #a45f72,0 8px 0 #3a214b,0 11px 22px #080322a4}
.arcade-count__unit{color:#ffe4ac;font-weight:1000;font-size:11px;white-space:nowrap;padding-bottom:11px;line-height:1.2}
/* One single liquid candy meter, with an illustrated rider above the liquid front. */
.arcade-meter{padding-top:23px;position:relative}
.arcade-meter__rail{height:63px;border-radius:34px;position:relative;border:5px solid #ffefcb;background:linear-gradient(#221132,#3b2456);overflow:visible;
 box-shadow:0 6px 0 #ad6f8c,0 9px 0 #532e61,0 12px 18px #08011f8c,inset 0 4px 13px #12071eb5,inset 0 -4px 5px #ffffff14}
.arcade-meter__rail::after{content:"";position:absolute;left:6px;right:6px;top:3px;height:11px;border-radius:40px;background:linear-gradient(#fff8ee4d,#ffffff08);pointer-events:none;z-index:5}
.arcade-meter__back-dots{position:absolute;inset:7px 8px;border-radius:24px;overflow:hidden;opacity:.24;
 background-image:radial-gradient(#dcc7fa 1.8px,transparent 2px);background-size:18px 17px}
.arcade-meter__liquid{position:absolute;z-index:1;left:0;top:0;bottom:0;min-width:0;border-radius:22px;overflow:hidden;
 background:linear-gradient(95deg,#49eddb 0%,#77f4e9 22%,#ffe67a 59%,#ffa65a 100%);
 box-shadow:inset 0 8px 8px #ffffff6b,inset 0 -7px 5px #ad4e5b55,0 0 14px #55f6b3b8}
.arcade-meter__wave{position:absolute;inset:0;background:repeating-linear-gradient(110deg,transparent 0,transparent 22px,#ffffff66 23px,#ffffff66 33px,transparent 36px,transparent 68px);background-size:270px 100%;animation:arcadeLiquidFlow 1.7s linear infinite}
.arcade-meter__bubbles{position:absolute;inset:0;background-image:radial-gradient(circle at 17px 18px,#fff9dd9e 0 3px,transparent 4px),radial-gradient(circle at 44px 39px,#fffeef7a 0 4px,transparent 5px);background-size:78px 50px;animation:arcadeBubble 1.8s linear infinite;opacity:.8}
.arcade-meter__ticks{position:absolute;z-index:3;inset:7px 0;display:flex;align-items:stretch;justify-content:space-evenly;pointer-events:none}
.arcade-meter__ticks i{height:100%;width:2px;border-radius:8px;background:#fffbe1c7;box-shadow:0 0 4px #ffaaf780}
.arcade-meter__runner{position:absolute;z-index:7;left:25px;top:-42px;width:73px;height:70px;transform:translateX(-50%);pointer-events:none;filter:drop-shadow(0 5px 3px #18112b94);transition:none}
.arcade-critter{width:100%;height:100%;animation:arcadePetWiggle .75s ease-in-out infinite alternate;transform-origin:50% 75%}
.arcade-meter__particles{position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;z-index:10;overflow:visible}
.arcade-spark{position:absolute;width:13px;height:13px;left:var(--arcade-tip,50%);top:8px;
 background:var(--spark-color,#fff6a5);clip-path:polygon(50% 0,61% 36%,100% 50%,61% 61%,50% 100%,39% 61%,0 50%,39% 36%);
 filter:drop-shadow(0 0 3px #fff);animation:arcadeSparkFly .84s cubic-bezier(.13,.61,.2,1) forwards}
.arcade-meter__labels{display:flex;justify-content:space-between;gap:8px;align-items:center;margin:10px 5px 2px;color:#e9d0f3;font-size:11px;font-weight:850}
.arcade-meter__labels #arcadeMeterPercent{color:#ffed9c;font-size:13px;font-variant-numeric:tabular-nums}
.arcade-bonus-path{display:flex;justify-content:center;align-items:center;gap:8px;min-height:37px;margin:4px auto 0}
.arcade-bonus-path__item{display:grid;place-items:center;width:30px;height:30px;line-height:1;border-radius:10px;transform:scale(.9);opacity:.48;font-size:19px;
 border:1px solid #ffffff4a;background:#594069;transition:transform .22s ease,opacity .22s ease,background .22s ease;filter:saturate(.7)}
.arcade-bonus-path__item.active{opacity:1;transform:scale(1.24) rotate(-5deg);background:#a966a4;border-color:#ffdb95;box-shadow:0 0 16px #ffe1a578;filter:none;z-index:2}
.arcade-bonus-path__item.complete{opacity:1;filter:none;background:#5b7b79;border-color:#b8f8d7}
.arcade-bonus-path__xp{border-color:#edb2ff}
/* Two numeric badges, never two parallel progress bars */
.arcade-totals{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:16px}
.arcade-totals__card{padding:10px 9px;background:linear-gradient(125deg,#4b355d,#57375c);border:1px solid #d5a6be;border-bottom:3px solid #c58f91;border-radius:15px;text-align:center;min-width:0;box-shadow:inset 0 1px #ffffff36}
.arcade-totals__card--xp{background:linear-gradient(120deg,#443463,#56396f);border-color:#b6a0eb;border-bottom-color:#8471bb}
.arcade-totals__card span{display:block;color:#f4d8fb;font-size:10px;font-weight:1000;letter-spacing:.05em}
.arcade-totals__card strong{display:block;color:#fff3ae;font-size:clamp(22px,5vw,28px);font-weight:1000;font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:-.7px;line-height:1.25;margin:2px auto}
.arcade-totals__card--xp strong{color:#b6fff0}
.arcade-totals__card small{display:block;font-weight:750;color:#e5cadb;font-size:10px}
.arcade-foot{display:flex;justify-content:space-between;font-size:11px;font-weight:750;color:#f5d9dd;gap:9px;margin:12px 2px 6px}
.arcade-foot b{color:#fff3ab}
.arcade-chapter{display:flex;justify-content:space-between;gap:5px 12px;align-items:center;color:#decee7;font-size:11px;text-align:left;border-top:1px dashed #ffffff40;padding:9px 1px 2px}
.arcade-chapter span:last-child{text-align:right;max-width:60%;color:#ffe7a0}
.arcade-details{margin:8px auto 0;border:1px solid #aa8bbb70;border-radius:13px;background:#231b36;text-align:left;font-size:12px;color:#f0ddf3}
.arcade-details summary{list-style:none;cursor:pointer;font-size:12px;font-weight:850;padding:10px 12px}
.arcade-details summary::-webkit-details-marker{display:none}
.arcade-details summary span{float:right}
.arcade-details[open] summary span{transform:rotate(180deg)}
.arcade-details__row{display:flex;justify-content:space-between;gap:7px;padding:7px 12px;border-top:1px solid #ffffff18;color:#e7d5ee;font-size:11px}
.arcade-details__row strong{color:#ffe8a7;white-space:nowrap}
.arcade-settlement .settlement__next{width:100%;margin:13px auto 0!important;border-radius:16px!important;font-size:clamp(13px,3vw,15px)!important;padding:15px 12px!important;
 background:linear-gradient(#ffe7a0,#ffc35e)!important;border:2px solid #fff0bc!important;border-bottom:4px solid #c98639!important;
 color:#3d234c!important;text-shadow:none!important;box-shadow:0 6px 17px #ffb75b64,inset 0 2px #ffffff9c!important}
.arcade-finished .settlement__next{animation:arcadeButtonBreathe 1.9s ease-in-out infinite}
.arcade-settlement .settlement__skip{display:block;margin:8px auto 1px;background:transparent;border:none;color:#e8cdff;text-decoration:underline;text-underline-offset:2px;padding:4px;font-size:11px;font-weight:750;cursor:pointer}
.arcade-settlement .settlement__share{display:block;font-size:11px;margin:0 auto;padding:3px 5px;color:#ffe3b7}
.arcade-settlement .modal-actions{margin-top:1px}.arcade-settlement .modal-actions .text-btn{padding:5px;color:#e7d2f5}
.arcade-pop{animation:arcadePunch .48s cubic-bezier(.12,1.8,.27,1) both!important}
.arcade-ranked-up .arcade-machine{animation:arcadeRankFlash 1s ease-out 1}
.arcade-settlement[data-mode="xp"] .arcade-meter__liquid{background:linear-gradient(90deg,#c073ff 0%,#ff80d7 40%,#ffd47b 77%,#fff7af 100%);box-shadow:inset 0 8px 8px #fff9ff66,inset 0 -7px #d6549466,0 0 17px #e38fffa6}
.arcade-settlement[data-mode="xp"] .arcade-count__value{color:#f7d3ff;-webkit-text-stroke:1px #f8c5f3;text-shadow:0 4px #ab4d9e,0 8px #3c245a,0 11px 22px #080322a4}
.arcade-settlement[data-mode="xp"] .arcade-machine{border-color:#f8c9ff}
@keyframes arcadePunch{0%{transform:scale(.45) rotate(-13deg);opacity:.2}68%{transform:scale(1.27) rotate(6deg);opacity:1}100%{transform:scale(1)}}
@keyframes arcadeLiquidFlow{from{background-position:0 0}to{background-position:270px 0}}
@keyframes arcadeBubble{from{background-position:0 0}to{background-position:78px -50px}}
@keyframes arcadePetWiggle{from{transform:rotate(-5deg) translateY(2px)}to{transform:rotate(5deg) translateY(-3px)}}
@keyframes arcadeSparkFly{0%{opacity:0;transform:translate(0,0) rotate(0) scale(.45)}20%{opacity:1}100%{opacity:0;transform:translate(var(--sx),var(--sy)) rotate(var(--spin)) scale(.15)}}
@keyframes arcadeRankFlash{0%,100%{filter:none}40%{filter:drop-shadow(0 0 24px #fffc7b)}}
@keyframes arcadeButtonBreathe{0%,100%{filter:brightness(1);box-shadow:0 6px 17px #ffb75b64,inset 0 2px #ffffff9c}50%{filter:brightness(1.09);box-shadow:0 6px 26px #ffde72b0,inset 0 2px #ffffff9c}}
@media(max-width:520px){
 .modal:has(.arcade-settlement){width:calc(100% - 12px);max-height:calc(100dvh - 14px);padding:13px 12px 15px;border-radius:18px}
 .arcade-head h2{font-size:22px;margin:4px 0}
 .arcade-head .settlement__stars{margin-bottom:7px;font-size:26px}
 .arcade-machine{padding:6px;border-radius:19px;margin-top:1px;margin-bottom:10px}
 .arcade-machine__body{padding:9px 11px 5px;border-radius:14px}
 .arcade-stage{gap:8px;min-height:46px}
 .arcade-stage__icon{width:40px;height:40px;flex-basis:40px;font-size:24px;border-radius:12px}
 .arcade-stage__copy b{font-size:12px}.arcade-stage__copy small{font-size:10px}
 .arcade-stage__gain{font-size:14px;letter-spacing:-.5px}
 .arcade-count{min-height:61px;margin:3px auto}
 .arcade-count__value{font-size:clamp(39px,11vw,53px)}
 .arcade-count__label{font-size:9px}.arcade-count__unit{font-size:10px;padding-bottom:7px}
 .arcade-meter{padding-top:19px}.arcade-meter__rail{height:52px;border-width:4px}
 .arcade-meter__runner{top:-39px;width:65px;height:64px}
 .arcade-bonus-path{min-height:32px;gap:5px}.arcade-bonus-path__item{height:25px;width:25px;font-size:16px}
 .arcade-meter__labels{margin:8px 4px 2px;font-size:10px}
 .arcade-totals{gap:7px;margin-top:13px}
 .arcade-totals__card{padding:8px 5px}.arcade-totals__card strong{font-size:clamp(17px,5.5vw,24px)}
 .arcade-totals__card span{font-size:9px}.arcade-totals__card small{font-size:9px}
 .arcade-foot{font-size:10px;margin:9px 0 5px}.arcade-chapter{font-size:10px;padding:6px 0 1px}
 .arcade-details{margin-top:6px}.arcade-details summary{padding:7px 9px;font-size:11px}
 .arcade-settlement .settlement__next{margin-top:8px!important;padding:11px 7px!important}
}
@media(max-width:355px){
 .arcade-stage__copy small{display:none}.arcade-stage__copy b{font-size:11px}
 .arcade-head h2{font-size:20px}.arcade-head__chapter{font-size:10px}
 .arcade-meter__runner{width:56px;height:60px;top:-36px}
 .arcade-count__value{font-size:39px}
 .arcade-totals__card span{font-size:8px}
 .arcade-foot{font-size:9px}.arcade-chapter span:last-child{max-width:57%}
}
@media(prefers-reduced-motion:reduce){
 .arcade-meter__wave,.arcade-meter__bubbles,.arcade-critter,.arcade-machine,.arcade-settlement .settlement__next,.arcade-stage-change .arcade-stage__icon,.arcade-stage-change .arcade-stage__gain{animation:none!important}
}
.fx-disabled .arcade-meter__wave,.fx-disabled .arcade-meter__bubbles,.fx-disabled .arcade-critter,.fx-disabled .arcade-settlement .settlement__next,.fx-disabled .arcade-stage-change .arcade-stage__icon,.fx-disabled .arcade-stage-change .arcade-stage__gain{animation:none!important}

/* Each prize pours into the SAME rail with a distinct cartoon color. */
.arcade-settlement[data-mode="score"][data-reward-stage="combo"] .arcade-meter__liquid{background:linear-gradient(90deg,#ff9c5b,#ffcc64 55%,#fff58e)}
.arcade-settlement[data-mode="score"][data-reward-stage="time"] .arcade-meter__liquid{background:linear-gradient(90deg,#48dcaf,#8af6b3 45%,#d9ff8b)}
.arcade-settlement[data-mode="score"][data-reward-stage="gold"] .arcade-meter__liquid{background:linear-gradient(90deg,#ffbe4b,#ffe36b 52%,#fff9b9)}
.arcade-settlement[data-mode="score"][data-reward-stage="boss"] .arcade-meter__liquid{background:linear-gradient(90deg,#ce85f9,#ff91ca 57%,#ffe87f)}
.arcade-settlement[data-mode="score"][data-reward-stage="penalties"] .arcade-meter__liquid{background:linear-gradient(90deg,#ff9c9d,#fcb882)}
.arcade-coin-flight{position:fixed;z-index:60;pointer-events:none;display:grid;place-items:center;width:24px;height:24px;font-size:25px;line-height:1;
 filter:drop-shadow(0 0 7px var(--coin-tint,#fff6c5)) drop-shadow(0 2px 2px #1b0a32)}
