:root{--font-heavy:GameHeavy,Grobold,"Grobold","Volkswagen Heavy","Volkswagen Serial Heavy","Cooper Black","Arial Black",Impact,sans-serif;--game-ui-scale:1;--game-popup-scale:1;--game-popup-max-width:calc(100vw - 24px);--game-popup-max-height:calc(100vh - 24px);--outline-1:-1px -1px 0 #050306,0 -1px 0 #050306,1px -1px 0 #050306,-1px 0 0 #050306,1px 0 0 #050306,-1px 1px 0 #050306,0 1px 0 #050306,1px 1px 0 #050306,0 2px 0 #050306;--outline-2:-2px -2px 0 #050306,0 -2px 0 #050306,2px -2px 0 #050306,-2px 0 0 #050306,2px 0 0 #050306,-2px 2px 0 #050306,0 2px 0 #050306,2px 2px 0 #050306,0 4px 0 #050306;--outline-3:-3px -3px 0 #050306,0 -3px 0 #050306,3px -3px 0 #050306,-3px 0 0 #050306,3px 0 0 #050306,-3px 3px 0 #050306,0 3px 0 #050306,3px 3px 0 #050306,0 5px 0 #050306;--bottom-label-outline:-1px -1px 0 #050306,0 -1px 0 #050306,1px -1px 0 #050306,-1px 0 0 #050306,1px 0 0 #050306,-1px 1px 0 #050306,0 1px 0 #050306,1px 1px 0 #050306,0 2px 0 #050306,0 3px 0 rgba(5,3,6,0.48);color:#fff;font-family:var(--font-heavy);background:#1b1020}@font-face{font-family:GameHeavy;src:url("../assets/fonts/GROBOLD.98e9c34970.ttf") format("truetype"),local("Grobold"),local("GROBOLD"),local("Volkswagen Heavy"),local("Volkswagen Serial Heavy"),local("Volkswagen-Serial-Heavy"),local("Cooper Black");font-style:normal;font-weight:900;font-display:block}*{box-sizing:border-box}html,body{width:100%;max-width:100vw;height:100%;margin:0;overflow:hidden;overflow:clip;background:#1b1020;-webkit-font-smoothing:antialiased;overscroll-behavior:none;touch-action:none;user-select:none;-webkit-touch-callout:none;-webkit-user-select:none}body,#game{position:fixed;inset:0;max-width:100vw;overflow:hidden;overflow:clip}#game{width:100vw;height:100vh;height:100dvh;overflow:hidden;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none}canvas{display:block;width:100%;height:100%;max-width:100vw;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none}.loading-screen{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;overflow:hidden;background:radial-gradient(circle at 18% 24%,rgba(255,126,205,0.48),transparent 30%),radial-gradient(circle at 82% 34%,rgba(89,225,255,0.54),transparent 32%),linear-gradient(155deg,#80eedb 0%,#baf7eb 34%,#f3c7fb 68%,#8edff6 100%);opacity:1;pointer-events:auto;transition:opacity 420ms ease}.loading-screen::before,.loading-screen::after{content:"";position:absolute;z-index:0;pointer-events:none}.loading-screen::before{inset:-8%;background:radial-gradient(circle at 17% 31%,rgba(86,255,226,0.34) 0 8%,transparent 27%),radial-gradient(circle at 76% 27%,rgba(255,113,207,0.3) 0 9%,transparent 29%),radial-gradient(circle at 66% 49%,rgba(255,246,166,0.3) 0 5%,transparent 22%);opacity:0.55;animation:loading-screen-glow 5.6s ease-in-out infinite alternate;will-change:opacity}.loading-screen::after{inset:0;width:54%;background:linear-gradient(110deg,transparent 18%,rgba(255,255,255,0.16) 48%,transparent 78%);transform:translateX(-120%) skewX(-8deg);animation:loading-screen-sheen 8.5s linear infinite;will-change:transform}.loading-screen-art{position:relative;z-index:1;width:calc(100vw - 32px);height:calc(100dvh - 44px);margin-top:0;padding:5px;overflow:hidden;border:3px solid #21132f;border-radius:19px;background:linear-gradient(90deg,#ff68b8 0 19%,#ffd85c 19% 38%,#74eedb 38% 58%,#68ccff 58% 79%,#c987ff 79% 100%);box-shadow:0 8px 0 rgba(32,17,45,0.34),0 0 34px rgba(255,93,184,0.42),0 0 56px rgba(67,225,238,0.28)}.loading-screen-art::before,.loading-screen-art::after{content:"";position:absolute;z-index:2;pointer-events:none}.loading-screen-art::before{inset:5px;border-radius:12px;background:radial-gradient(circle at 77% 25%,rgba(255,109,206,0.28),transparent 25%),radial-gradient(circle at 61% 22%,rgba(94,232,255,0.24),transparent 24%),radial-gradient(ellipse at 40% 55%,rgba(255,232,126,0.2),transparent 28%);opacity:0.34;animation:loading-art-light-pulse 4.8s ease-in-out infinite alternate;will-change:opacity}.loading-screen-art::after{top:5px;bottom:5px;left:-34%;width:28%;border-radius:12px;background:linear-gradient(105deg,transparent 10%,rgba(255,255,255,0.18) 48%,transparent 88%);transform:skewX(-12deg);animation:loading-art-light-sweep 8.8s ease-in-out infinite;will-change:transform}.loading-screen-image{display:block;width:100%;height:100%;object-fit:fill;image-rendering:auto;border:3px solid rgba(33,19,47,0.86);border-radius:12px}.loading-player-card{position:fixed;top:calc(env(safe-area-inset-top,0px) + 14px);right:auto;left:calc(env(safe-area-inset-left,0px) + 74px);z-index:32;display:grid;grid-template-columns:40px minmax(0,1fr) 32px;align-items:center;gap:5px;box-sizing:border-box;width:clamp(216px,18vw,236px);min-height:48px;padding:2px 4px 2px 3px;overflow:hidden;isolation:isolate;border:2px solid transparent;border-radius:12px;background:radial-gradient(circle at 3% 45%,rgba(188,244,255,0.64),transparent 34%) padding-box,linear-gradient(180deg,rgba(255,255,255,0.3),transparent 32%) padding-box,linear-gradient(180deg,#78dfff 0%,#49b9f2 54%,#2d91dd 100%) padding-box,linear-gradient(120deg,#164779 0%,#0e3564 54%,#08264f 100%) border-box;color:#fff;pointer-events:auto;box-shadow:inset 0 2px 0 rgba(255,255,255,0.22),inset 0 -2px 0 rgba(3,25,70,0.48),0 0 0 1px rgba(3,15,36,0.9),0 5px 13px rgba(1,20,58,0.3)}.loading-player-card::after{content:none}.loading-player-avatar{width:40px;height:40px;transform:translateX(-2px);filter:drop-shadow(0 3px 0 rgba(0,0,0,0.32))}.loading-player-identity{display:grid;min-width:0;gap:3px;align-content:center;transform:translateX(-2px)}.loading-player-name-row{display:flex;align-items:center;min-width:0;gap:4px}.loading-player-identity strong,.loading-player-identity>span{overflow:hidden;line-height:1;text-overflow:ellipsis;white-space:nowrap;-webkit-text-stroke:0.45px #05080c;paint-order:stroke fill;text-shadow:var(--outline-1)}.loading-player-identity strong{position:relative;top:-1px;flex:0 1 auto;min-width:0;max-width:calc(100% - 10px);overflow:visible;text-overflow:clip;font-size:clamp(13px,1.1vw,14px);font-weight:1000;-webkit-text-stroke:0.7px #05080c}.loading-player-identity>span{overflow:visible;text-overflow:clip;color:#c9f7ff;font-size:clamp(9.5px,0.8vw,12px);font-weight:1000;transform:translateY(1px)}.loading-player-identity>.loading-player-stats{display:flex;min-width:0;align-items:center;gap:7px;font-size:clamp(12.5px,1vw,14px)}.loading-player-stats #loadingPlayerLevel{flex:0 0 auto}.loading-player-diamonds{display:inline-flex;min-width:0;align-items:center;gap:2px;color:inherit;font:inherit;line-height:1;-webkit-text-stroke:inherit;text-shadow:inherit}.loading-player-diamonds img{flex:0 0 auto;width:1.35em;height:1.1em;object-fit:contain;filter:drop-shadow(0 0 0.8px #000) drop-shadow(0 0 0.8px #000)}.loading-player-diamonds>span{color:inherit;font:inherit;line-height:1;-webkit-text-stroke:inherit;text-shadow:inherit}.loading-player-name-row .loading-player-online{flex:0 0 auto;width:8px;height:8px;border:1px solid rgba(2,10,14,0.95);border-radius:50%;background:#78f99d;box-shadow:0 0 0 1px rgba(3,30,23,0.72),0 0 4px rgba(120,249,157,0.78),0 0 7px rgba(78,255,132,0.38)}.loading-player-identity strong.is-name-changing{color:#fff;background:none;animation:loading-player-name-shine 760ms ease-out}.loading-player-edit{position:relative;display:grid;place-items:center;width:32px;height:32px;padding:0;overflow:visible;border:2px solid #06152e;border-radius:10px;background:linear-gradient(180deg,#78eaff 0%,#29c9ff 55%,#159be8 100%);cursor:pointer;box-shadow:inset 0 3px 0 rgba(255,255,255,0.42),0 3px 0 rgba(3,34,91,0.68)}.loading-player-edit:hover{animation:loading-player-edit-bounce 380ms ease-out both;filter:brightness(1.08)}.loading-player-edit:active{animation:loading-player-edit-tap 220ms ease-out both;box-shadow:inset 0 2px 0 rgba(255,255,255,0.34),0 2px 0 rgba(3,34,91,0.68)}.loading-player-edit:focus-visible{outline:3px solid #fff59c;outline-offset:2px}.loading-player-edit img{position:absolute;top:50%;left:50%;display:block;width:26px;height:26px;max-width:none;object-fit:contain;transform:translate(-50%,-50%);pointer-events:none;filter:drop-shadow(0 1px 0 rgba(0,0,0,0.28))}@keyframes loading-player-edit-bounce{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-3px) scale(1.06)}72%{transform:translateY(0) scale(0.98)}100%{transform:translateY(-1px) scale(1)}}@keyframes loading-player-edit-tap{0%{transform:translateY(-1px) scale(1)}52%{transform:translateY(2px) scale(0.9)}100%{transform:translateY(1px) scale(0.97)}}@keyframes loading-player-name-shine{0%{filter:brightness(1)}48%{filter:brightness(1.35) drop-shadow(0 0 3px rgba(255,244,132,0.86))}100%{filter:brightness(1)}}.loading-progress{position:fixed;right:max(48px,env(safe-area-inset-right,0px));bottom:calc(max(20px,env(safe-area-inset-bottom,0px)) + 8px);left:max(48px,env(safe-area-inset-left,0px));z-index:1001;display:block;max-width:720px;margin:0 auto;padding:0;transform:translateY(-8px)}.loading-progress-copy{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:4px 18px 0;color:#fff;font-size:clamp(22px,2.7vw,36px);font-weight:1000;line-height:1;pointer-events:none;-webkit-text-stroke:0.55px #050306;paint-order:stroke fill;text-shadow:var(--bottom-label-outline);transform:translateZ(0);backface-visibility:hidden}/* Slow vs stuck (Friday #120):"taking longer than usual" / "slow connection" note,above the bar so the bar keeps its geometry. */ .loading-note{position:absolute;right:0;bottom:calc(100% + 10px);left:0;margin:0;overflow:hidden;color:#fff;font-size:clamp(18px,2.1vw,26px);font-weight:1000;line-height:1.15;text-align:center;white-space:nowrap;pointer-events:none;-webkit-text-stroke:0.45px #050306;paint-order:stroke fill;text-shadow:var(--bottom-label-outline);opacity:0;transition:opacity 300ms ease}.loading-note.is-visible{opacity:1}.loading-progress-bar{position:relative;height:54px}.loading-progress-fill-layer{position:absolute;inset:3px;z-index:2;overflow:hidden;border-radius:9px}.loading-progress-track{position:absolute;inset:0;z-index:1;isolation:isolate;border:4px solid rgba(8,7,10,0.86);border-radius:14px;background:transparent;box-shadow:0 4px 0 rgba(0,0,0,0.28)}.loading-progress-track::before{content:"";position:absolute;inset:0;z-index:0;border-radius:10px;background:rgba(22,14,25,0.72);box-shadow:inset 0 2px 0 rgba(255,255,255,0.18)}.loading-progress-fill{position:absolute;inset:0 auto 0 0;z-index:0;width:100%;height:100%;border-radius:10px;background:linear-gradient(90deg,#35ee62,#ffe95f,#ff932e,#ff4dd2);box-shadow:none;transform:translateZ(0) scaleX(0);transform-origin:left center;will-change:transform}.loading-progress-fill.is-complete{transform:translateZ(0) scaleX(1)}body:not(.is-loading) .loading-screen{opacity:0;pointer-events:none}body.loading-complete .loading-screen{display:none}@keyframes loading-screen-glow{from{opacity:0.42}to{opacity:0.72}}@keyframes loading-screen-sheen{0%,22%{transform:translateX(-120%) skewX(-8deg)}58%,100%{transform:translateX(235%) skewX(-8deg)}}@keyframes loading-art-light-pulse{from{opacity:0.2}to{opacity:0.46}}@keyframes loading-art-light-sweep{0%,22%{transform:translateX(0) skewX(-12deg)}70%,100%{transform:translateX(490%) skewX(-12deg)}}@media (prefers-reduced-motion:reduce){.loading-screen-art::before,.loading-screen-art::after,.loading-screen::before,.loading-screen::after{animation:none}.loading-player-edit:hover,.loading-player-edit:active,.loading-player-identity strong.is-name-changing,.player-name-modal,.player-name-preview.is-generating strong{animation:none}.loading-player-identity strong.is-name-changing{color:#fff;background:none}.loading-screen-art::after,.loading-screen::after{display:none}}@media (pointer:coarse){.loading-screen{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:calc(env(safe-area-inset-top,0px) + 14px) max(12px,env(safe-area-inset-right,0px)) calc(env(safe-area-inset-bottom,0px) + 14px) max(12px,env(safe-area-inset-left,0px));background:linear-gradient(180deg,#8ff3df 0%,#f6c9ff 54%,#8ff3df 100%)}.loading-screen-art{width:min(calc(100vw - 2px),840px,calc((100dvh - 96px) * 1.7768));height:auto;aspect-ratio:1672 / 941;max-height:calc(100dvh - 96px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));flex:0 1 auto;margin-top:0;padding:3px;border-width:2px;border-radius:13px;box-shadow:0 6px 0 rgba(32,17,45,0.3),0 0 24px rgba(255,93,184,0.34),0 0 38px rgba(67,225,238,0.24)}.loading-screen-art::after{opacity:0.12;animation-duration:10.5s}.loading-screen-image{border-width:2px;border-radius:9px}.loading-player-card{top:calc(env(safe-area-inset-top,0px) + 10px);right:auto;left:calc(env(safe-area-inset-left,0px) + 74px);grid-template-columns:36px minmax(0,1fr) 32px;gap:4px;width:min(216px,calc(100vw - 86px));min-height:44px;padding:2px 3px 2px 2px;border-width:2px;border-radius:11px;box-shadow:inset 0 2px 0 rgba(255,255,255,0.28),inset 0 -2px 0 rgba(43,23,91,0.28),0 0 0 1px rgba(33,19,47,0.72),0 4px 11px rgba(36,29,86,0.24)}.loading-player-card::after{content:none}.loading-player-avatar{width:36px;height:36px}.loading-player-identity{gap:2px}.loading-player-identity strong{font-size:clamp(11.5px,3.2vw,14px)}.loading-player-identity>span{font-size:clamp(8.5px,2.35vw,10.5px)}.loading-player-edit{width:32px;height:32px;padding:0;border-width:2px;border-radius:9px;box-shadow:inset 0 2px 0 rgba(255,255,255,0.45),0 3px 0 rgba(3,23,42,0.48)}.loading-player-edit img{width:26px;height:26px}.loading-player-edit::before{content:"";position:absolute;inset:-6px}.loading-progress{position:relative;right:auto;bottom:auto;left:auto;width:min(380px,calc(100vw - 48px));max-width:none;margin:2px auto 0;flex:0 0 auto}.loading-progress::before{content:none;display:none}.loading-progress-bar{height:48px}.loading-progress-copy{padding:0 15px;font-size:clamp(20px,5.4vw,27px);line-height:1}}.daily-card strong.daily-reward-copy{white-space:nowrap !important}@media (pointer:coarse) and (orientation:landscape){.loading-screen{gap:6px;padding:calc(env(safe-area-inset-top,0px) + 10px) max(12px,env(safe-area-inset-right,0px)) calc(env(safe-area-inset-bottom,0px) + 10px) max(12px,env(safe-area-inset-left,0px))}.loading-screen-art{max-height:calc(100dvh - 54px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));margin-top:0}.loading-progress{width:min(520px,calc(100vw - 80px));margin-top:0}.loading-progress::before{content:none;display:none}.loading-progress-bar{height:42px}.loading-progress-copy{padding:0 14px;font-size:clamp(16px,3vw,20px)}}.emoji-hud-icon.character-hud-icon{top:-1px}.emoji-hud-icon.character-hud-icon img{width:60px;height:48px}.emoji-hud-button.character-hud-button strong{font-size:14px}.emoji-hud-button.character-hud-button{background:radial-gradient(circle at 28% 20%,rgba(255,255,255,0.54),transparent 25%),linear-gradient(145deg,#ffd86f 0%,#ff9b3f 52%,#ef5d2f 100%)}.emoji-hud-button.character-hud-button::before{background:linear-gradient(rgba(255,255,255,0.18),rgba(255,255,255,0)),repeating-linear-gradient(135deg,rgba(255,255,255,0.24) 0 7px,rgba(199,67,27,0.14) 7px 14px)}.character-hud-button.has-alert .character-hud-alert{display:block}#characterOverlay{z-index:82}.character-modal{position:relative;display:grid;width:min(390px,calc(100vw - 28px));height:min(620px,calc(100vh - 48px));grid-template-rows:minmax(0,1fr) auto;gap:4px;padding:15px;border:5px solid #180c21;border-radius:26px;background:radial-gradient(circle at 50% 30%,rgba(255,255,255,0.72),transparent 33%),linear-gradient(160deg,#8cecff 0%,#a5bfff 48%,#d7a8ff 100%);box-shadow:inset 0 6px 0 rgba(255,255,255,0.42),inset 0 -7px 0 rgba(62,31,118,0.18),0 10px 0 rgba(0,0,0,0.34),0 24px 48px rgba(19,8,37,0.34);overflow:visible}.character-modal::before{content:"";position:absolute;inset:9px;border:2px solid rgba(24,12,33,0.24);border-radius:17px;pointer-events:none}.character-close{position:absolute;top:-20px;right:-20px;z-index:6;display:grid;width:54px;height:54px;place-items:center;padding:5px 0 0;border:4px solid #180913;border-radius:12px;background:linear-gradient(145deg,#ff6e9f,#d42166);box-shadow:inset 0 4px 0 rgba(255,255,255,0.34),0 5px 0 rgba(0,0,0,0.32);color:#fff;cursor:pointer;font-family:var(--font-heavy);font-size:34px;line-height:1;text-shadow:var(--outline-2)}.character-title-box{position:absolute;top:-34px;left:50%;z-index:7;display:inline-flex;align-items:center;gap:0;margin:0;padding:2px 9px 4px 16px;border:4px solid #110810;border-radius:12px;background:linear-gradient(180deg,#b9f2ff 0%,#61c9f7 100%);box-shadow:inset 0 5px 0 rgba(255,255,255,0.42),0 5px 0 rgba(0,0,0,0.28);color:#fff;font-family:var(--font-heavy);font-size:32px;line-height:0.95;text-shadow:var(--outline-3);transform:translateX(-50%);white-space:nowrap}.character-title-icon{display:grid;width:30px;height:46px;flex:0 0 30px;place-items:center;filter:drop-shadow(0 4px 0 rgba(0,0,0,0.34));transform:translate(-13px,-2px)}.character-title-icon img{display:block;width:47px;height:47px;object-fit:contain}.character-preview-shell{position:relative;min-height:0;overflow:hidden;border-radius:18px;background:radial-gradient(circle at 50% 45%,rgba(255,255,255,0.36),transparent 57%),#bdefff}.character-preview-canvas{display:block;width:100%;height:100%;min-height:0;transition:opacity 160ms ease-out}.character-preview-shell.is-preview-loading .character-preview-canvas{opacity:0;transition:none}.character-preview-shell::after{content:"";position:absolute;left:50%;top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;border:5px solid rgba(255,255,255,0.45);border-top-color:#ffffff;box-shadow:0 2px 10px rgba(40,90,160,0.18);opacity:0;pointer-events:none;animation:character-preview-spin 0.9s linear infinite;animation-play-state:paused}.character-preview-shell.is-preview-loading::after{opacity:1;animation-play-state:running;transition:opacity 120ms ease-in 120ms}@keyframes character-preview-spin{to{transform:rotate(360deg)}}#skinOverlay.is-waiting-images .skin-list{visibility:hidden}#skinOverlay .skin-modal::after{content:"";position:absolute;left:50%;top:50%;z-index:2;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;border:5px solid rgba(255,255,255,0.45);border-top-color:#ffffff;opacity:0;pointer-events:none;animation:character-preview-spin 0.9s linear infinite;animation-play-state:paused}#skinOverlay.is-waiting-images .skin-modal::after{opacity:1;animation-play-state:running;transition:opacity 120ms ease-in 120ms}.character-part-controls{position:absolute;inset:0;z-index:4;pointer-events:none}.character-part-controls.hidden{display:none}.character-arrow{--arrow-row:18%;position:absolute;top:var(--arrow-row);display:grid;width:58px;height:58px;place-items:center;padding:0;border:4px solid #06142f;border-radius:16px;background:linear-gradient(145deg,#28569d 0%,#102a5d 100%);box-shadow:inset 0 5px 0 rgba(121,190,255,0.36),0 6px 0 rgba(6,20,47,0.38);cursor:pointer;pointer-events:auto;transform:translateY(-50%)}.character-arrow:hover{filter:brightness(1.08)}.character-arrow:active{margin-top:3px;box-shadow:inset 0 3px 0 rgba(255,255,255,0.62),0 3px 0 rgba(7,29,77,0.32)}.character-arrow.is-left{left:28px}.character-arrow.is-right{right:28px}.character-arrow span{width:46px;height:46px;background:url("../assets/icons/character-arrow-light-lossless.c8a0cf251b.webp") center / contain no-repeat}.character-arrow.is-left span{transform:rotate(180deg)}.character-arrow.is-right span{transform:none}.character-arrow.row-face{--arrow-row:26%}.character-arrow.row-hair{--arrow-row:9%}.character-arrow.row-shirt{--arrow-row:46%}.character-arrow.row-pants{--arrow-row:69%}.character-arrow.row-shoes{--arrow-row:89%}.character-palette-panel{position:relative;z-index:3;display:grid;min-height:86px;grid-template-columns:repeat(4,1fr);gap:12px;align-items:center;padding:11px 14px 15px;border:4px solid #180c21;border-radius:18px;background:rgba(255,250,244,0.93);box-shadow:inset 0 4px 0 rgba(255,255,255,0.75),0 6px 0 rgba(0,0,0,0.27)}.character-palette-swatch{position:relative;aspect-ratio:1;width:100%;min-width:0;max-width:66px;justify-self:center;border:4px solid #24142f;border-radius:15px;box-shadow:inset 0 5px 0 rgba(255,255,255,0.3),0 4px 0 rgba(0,0,0,0.28);cursor:pointer;transition:transform 120ms ease,box-shadow 160ms ease,filter 160ms ease}.character-palette-panel.has-palette-purchases{gap:8px;padding:6px 10px 7px}.character-palette-option{display:grid;min-width:0;grid-template-rows:66px 26px;gap:4px;place-items:center}.has-palette-purchases .character-palette-swatch{width:66px;max-width:66px}.character-palette-buy,.character-palette-buy-spacer{width:66px;height:26px}.character-palette-buy{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;padding:0 3px;border:2px solid #24142f;border-radius:7px;background:linear-gradient(#ffdd4f,#f4a928);box-shadow:inset 0 2px 0 rgba(255,255,255,0.5),0 2px 0 rgba(36,20,47,0.45);color:#fff;font:900 16px/1 GameHeavy,Arial,sans-serif;text-shadow:-1px -1px 0 #5d2700,1px -1px 0 #5d2700,-1px 1px 0 #5d2700,1px 1px 0 #5d2700;cursor:pointer}.character-palette-buy img{width:16px;height:16px;flex:0 0 auto;object-fit:contain}.character-palette-buy .trophy-inline-icon{filter:drop-shadow(0 -0.65px 0 #080402) drop-shadow(0.65px 0 0 #080402) drop-shadow(0 0.65px 0 #080402) drop-shadow(-0.65px 0 0 #080402) drop-shadow(0 1.2px 0 rgba(0,0,0,0.3))}.character-palette-buy span{paint-order:stroke fill;-webkit-text-stroke:1.7px #5d2700;transform:translateX(1px)}.character-palette-buy:hover:not(:disabled){filter:brightness(1.06);transform:translateY(-1px)}.character-palette-buy:active:not(:disabled){transform:translateY(1px)}.character-palette-buy:disabled{filter:grayscale(0.25);opacity:0.78;cursor:default}.character-palette-lock{position:absolute;right:-5px;bottom:-4px;width:30px;height:30px;object-fit:contain;filter:drop-shadow(0 1px 0 rgba(22,10,35,0.65));transform-origin:50% 85%;animation:character-lock-bob 1.9s ease-in-out infinite;pointer-events:none}@keyframes character-lock-bob{0%,100%{transform:rotate(-2deg)}50%{transform:translateY(-1px) rotate(1deg) scale(1.03)}}.character-palette-option.is-locked .character-palette-swatch{cursor:pointer}.character-palette-swatch:hover{filter:brightness(1.06);transform:translateY(-2px)}.character-palette-swatch:active{transform:translateY(1px) scale(0.96)}.character-palette-swatch.is-selected{outline:3px solid #9be8ff;outline-offset:2px;box-shadow:inset 0 5px 0 rgba(255,255,255,0.35),0 4px 0 rgba(0,0,0,0.28)}@media (max-width:520px),(max-height:700px){.character-modal{width:min(350px,calc(100vw - 18px));height:min(560px,calc(100vh - 44px));gap:4px;padding:11px}.character-title-box{top:-30px;padding:1px 7px 3px 12px;font-size:27px}.character-title-icon{width:28px;height:40px;flex-basis:28px}.character-title-icon img{width:42px;height:42px}.character-close{top:-15px;right:-15px;width:42px;height:42px;border-width:3px;border-radius:10px;font-size:28px}.character-palette-panel{min-height:70px;gap:8px;padding:8px 10px 11px}.character-palette-panel.has-palette-purchases{padding:4px 8px 6px}.character-palette-option{grid-template-rows:54px 22px;gap:4px}.character-palette-swatch{max-width:54px;border-radius:12px}.has-palette-purchases .character-palette-swatch{width:54px;max-width:54px}.character-palette-buy,.character-palette-buy-spacer{width:54px;height:22px}.character-palette-buy{font-size:14px}.character-palette-buy img{width:15px;height:15px}}@media (max-width:520px){.character-arrow{width:49px;height:49px;border-radius:13px}.character-arrow.is-left{left:22px}.character-arrow.is-right{right:22px}}@media (orientation:landscape) and (max-height:600px){.character-modal{width:min(330px,calc(100vw - 18px));height:calc(100vh - 56px)}.character-palette-panel{min-height:58px}.character-palette-panel.has-palette-purchases{padding:3px 7px}.character-palette-option{grid-template-rows:44px 18px;gap:3px}.character-palette-swatch{max-width:44px}.has-palette-purchases .character-palette-swatch{width:44px;max-width:44px}.character-palette-buy,.character-palette-buy-spacer{width:44px;height:18px}.character-palette-buy{border-width:1px;border-radius:5px;font-size:12px}.character-palette-buy img{width:12px;height:12px}.character-palette-lock{right:-4px;bottom:-3px;width:22px;height:22px}}body.is-loading .hud,body.is-loading .speed-popups,body.is-loading .center-message,body.is-loading .modal-overlay,body.is-loading .mobile-controls,body.is-loading .win-claim-toast,body.is-loading .revive-offer{visibility:hidden}.ad-overlay{position:fixed;inset:0 0 auto 0;z-index:2147483647;display:none;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:10px;border:0;background:transparent;color:#fff;pointer-events:none}.ad-overlay:popover-open,.ad-overlay.is-visible{display:grid;place-items:start center}.ad-overlay::backdrop{background:transparent}/* Keep the ad's own close button (top corners) uncovered: the card never
   spans the full width, and on phones it sits at the bottom edge. */
html.has-touch-controls .ad-overlay {
  inset: auto 0 0 0;
  padding: 10px 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
}
html.has-touch-controls .ad-overlay:popover-open,
html.has-touch-controls .ad-overlay.is-visible {
  place-items: end center;
}
.ad-overlay-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: min(70vw, 560px);
  gap: 8px;
  padding: 5px 14px 6px;
  border: 2px solid #102c59;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(44, 116, 178, 0.96), rgba(15, 62, 116, 0.98));
  text-align: center;
  box-shadow: 0 3px 0 rgba(3, 20, 48, 0.5), 0 6px 14px rgba(0, 0, 0, 0.28);
}

.ad-chip {
  padding: 1px 8px 2px;
  border: 2px solid #5c3a00;
  border-radius: 7px;
  background: linear-gradient(180deg, #ffe96a, #f5ae19);
  color: #2c1b00;
  font-family: var(--font-heavy);
  font-size: 12px;
  line-height: 1;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.52), 0 2px 0 rgba(53, 33, 0, 0.46);
}

.ad-overlay-card strong {
  font-family: var(--font-heavy);
  font-size: 14px;
  line-height: 1;
  text-shadow: var(--outline-2);
}

.ad-overlay-card .ad-sub {
  display: block;
  color: #dff5ff;
  font-family: var(--font-heavy);
  font-size: 12px;
  line-height: 1.15;
  text-shadow: 0 2px 0 rgba(4, 30, 70, 0.72);
}

body.is-loading .loading-player-card {
  visibility: hidden;
  pointer-events: none;
}

/* Warm-up behind the loading screen (Friday #120): the HUD is laid out, decoded and
   rasterised under it, so the first frames of play don't wait for that. At 0.999 the loading screen looks the same but no longer hides what is under it from the browser. */ body.is-loading.is-loading-warm-up .hud,body.is-loading.is-loading-warm-up .speed-popups,body.is-loading.is-loading-warm-up .center-message,body.is-loading.is-loading-warm-up .modal-overlay,body.is-loading.is-loading-warm-up .mobile-controls,body.is-loading.is-loading-warm-up .win-claim-toast,body.is-loading.is-loading-warm-up .revive-offer,body.is-loading.is-loading-warm-up .loading-player-card{visibility:visible}body.is-loading.is-loading-warm-up .loading-screen{opacity:0.999}button{font:inherit;-webkit-tap-highlight-color:transparent}.hud{position:fixed;z-index:2;pointer-events:none}.hud-top{top:4px;right:18px;left:18px}.top-hud{display:grid;grid-template-columns:minmax(180px,1fr) auto minmax(230px,1fr);align-items:center;gap:14px}.stage-question{position:fixed;top:62px;left:50%;z-index:8;display:flex;align-items:center;justify-content:center;transform:translateX(-50%);width:fit-content;min-width:0;max-width:min(360px,calc(100vw - 56px));padding:2px 10px 3px;border:2px solid rgba(255,213,246,0.96);border-radius:999px;background:linear-gradient(180deg,rgba(255,178,239,0.98),rgba(217,112,222,0.98)),radial-gradient(circle at 24% 20%,rgba(255,239,251,0.78),transparent 42%);color:#ffffff;font-size:34px;font-weight:1000;line-height:1;text-align:center;text-shadow:none;box-shadow:inset 0 2px 0 rgba(255,255,255,0.28),0 5px 0 rgba(0,0,0,0.34),0 12px 24px rgba(0,0,0,0.28)}.stage-question-canvas{display:block;width:auto;max-width:260px;height:auto}.speed-title,.hearts-title,.multiplier-stack span,.progress-label,.wins-badge,.stage-strip,.panel strong,.icon-button strong,.custom-speed-button strong,.emoji-hud-button strong,.emoji-choice,.center-message strong,.rebirth-modal h2,.rebirth-level,.rebirth-multiplier-card,.rebirth-progress,.rebirth-button,.rebirth-speed,.speed-popup{-webkit-text-stroke:0;font-family:var(--font-heavy);paint-order:stroke fill;text-shadow:var(--outline-2)}.speed-title,.hearts-title{position:relative;display:block;width:clamp(232px,20.5vw,268px);min-height:48px;padding:0;border:4px solid #102234;border-radius:14px;background:linear-gradient(110deg,rgba(255,255,255,0.96),rgba(214,253,255,0.9) 58%,rgba(164,231,255,0.82)),radial-gradient(circle at 76% 18%,rgba(255,255,255,0.9),transparent 28%);box-shadow:inset 0 3px 0 rgba(255,255,255,0.72),inset 0 -3px 0 rgba(39,117,155,0.2),0 4px 0 rgba(7,13,22,0.78),0 7px 16px rgba(0,0,0,0.24);color:#fff;font-size:clamp(31px,2.75vw,41px);font-weight:1000;letter-spacing:0;line-height:0.95;text-align:left;text-shadow:var(--outline-3)}.speed-title{transform:translate(-72px,3px)}.hearts-title{position:absolute;top:3px;left:calc(50% + 92px);width:clamp(164px,13vw,182px);min-height:42px;border-width:3px;background:linear-gradient(110deg,rgba(255,255,255,0.96),rgba(255,202,226,0.92) 58%,rgba(255,151,190,0.86)),radial-gradient(circle at 76% 18%,rgba(255,255,255,0.9),transparent 28%)}.hearts-title.is-low{background:linear-gradient(110deg,rgba(255,255,255,0.96),rgba(255,164,184,0.95) 58%,rgba(255,82,119,0.9)),radial-gradient(circle at 76% 18%,rgba(255,255,255,0.9),transparent 28%);animation:low-heart-pulse 980ms ease-in-out infinite;box-shadow:inset 0 3px 0 rgba(255,255,255,0.72),inset 0 -3px 0 rgba(155,39,54,0.38),0 4px 0 rgba(7,13,22,0.78),0 0 10px 2px rgba(255,24,62,0.82),0 0 24px 5px rgba(255,52,86,0.46),0 0 42px 7px rgba(255,92,120,0.22)}@keyframes low-heart-pulse{0%,100%{box-shadow:inset 0 3px 0 rgba(255,255,255,0.72),inset 0 -3px 0 rgba(155,39,54,0.38),0 4px 0 rgba(7,13,22,0.78),0 0 9px 2px rgba(255,24,62,0.72),0 0 22px 5px rgba(255,52,86,0.4),0 0 38px 6px rgba(255,92,120,0.18)}50%{box-shadow:inset 0 3px 0 rgba(255,255,255,0.78),inset 0 -3px 0 rgba(155,39,54,0.5),0 4px 0 rgba(7,13,22,0.78),0 0 13px 3px rgba(255,20,58,0.92),0 0 30px 7px rgba(255,46,82,0.58),0 0 50px 9px rgba(255,94,122,0.3)}}.hearts-title .speed-title-copy strong{left:43%;top:2px}.hearts-title .speed-title-copy span{left:2px;top:30px;font-size:clamp(14px,1.15vw,18px)}@media (pointer:fine) and (max-width:1728px){.hearts-title .speed-title-copy strong{left:50%;font-size:0.7em;top:56%;transform:translate(-50%,-50%)}}.speed-title-icon{position:absolute;left:-39px;top:70%;z-index:1;display:grid;width:68px;height:68px;place-items:center;color:#ffe65e;font-family:"Arial Black",Impact,sans-serif;font-size:58px;line-height:1;text-shadow:-3px -3px 0 #102234,0 -3px 0 #102234,3px -3px 0 #102234,-3px 0 0 #102234,3px 0 0 #102234,-3px 3px 0 #102234,0 3px 0 #102234,3px 3px 0 #102234,0 6px 0 rgba(7,13,22,0.7);transform:translateY(-50%) rotate(-8deg)}.hearts-title-icon{position:absolute;left:-52px;top:60%;z-index:1;display:grid;width:94px;height:94px;place-items:center;transform:translateY(-50%) rotate(-7deg);filter:drop-shadow(0 6px 0 rgba(7,13,22,0.72))}.hearts-title-icon img{display:block;width:100%;height:100%;object-fit:contain}/* Chromebook HUD art is rendered at desktop scale,where the lightning glyph's
   visual bounds are much larger than its CSS box. Match its visible footprint
   to the heart art without changing the desktop, phone or tablet layouts. */
html.is-chromebook .speed-title-icon {
  left: -31px;
  top: 60%;
  width: 54px;
  height: 54px;
  font-size: 46px;
  text-shadow:
    -2px -2px 0 #102234,
    0 -2px 0 #102234,
    2px -2px 0 #102234,
    -2px 0 0 #102234,
    2px 0 0 #102234,
    -2px 2px 0 #102234,
    0 2px 0 #102234,
    2px 2px 0 #102234,
    0 5px 0 rgba(7, 13, 22, 0.7);
}

.speed-title-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  min-width: 0;
}

.speed-title-copy strong {
  position: relative;
  display: inline-block;
  position: absolute;
  left: 50%;
  top: 5px;
  color: #fff;
  -webkit-text-fill-color: #fff;
  font-size: 0.86em;
  line-height: 1.05;
  white-space: nowrap;
  transform: translateX(-50%);
  -webkit-text-stroke: 3px #050306;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #050306;
}

.speed-title-copy strong::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: #fff;
  -webkit-text-fill-color: #fff;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

#topSpeedValue {
  color: #fff;
  -webkit-text-fill-color: #fff;
  width: min(210px, calc(100% - 44px));
  text-align: center;
}

@media (pointer: fine) {
  #topSpeedValue {
    top: 1px;
  }
}

#topSpeedValue::after {
  content: none;
}

.speed-title-copy span {
  display: block;
  position: absolute;
  left: 9px;
  top: 33px;
  color: #fff;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1;
  text-shadow: var(--outline-3);
}

.is-safari .speed-title,
.is-safari .hearts-title,
.is-safari .multiplier-stack span,
.is-safari .progress-label,
.is-safari .wins-badge,
.is-safari .stage-strip,
.is-safari .panel strong,
.is-safari .icon-button strong,
.is-safari .center-message strong,
.is-safari .rebirth-modal h2,
.is-safari .rebirth-level,
.is-safari .rebirth-multiplier-card,
.is-safari .rebirth-progress,
.is-safari .rebirth-button,
.is-safari .rebirth-speed,
.is-safari .speed-popup {
  -webkit-text-stroke: 1.2px #050306;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #050306;
}

.is-safari .speed-title,
.is-safari .hearts-title,
.is-safari .rebirth-modal h2 {
  -webkit-text-stroke-width: 2px;
  text-shadow: 0 5px 0 #050306;
}

.is-safari .speed-title-copy span {
  -webkit-text-stroke: 1.4px #050306;
  text-shadow: 0 4px 0 #050306;
}

.is-safari .speed-title-copy strong {
  -webkit-text-stroke: 3px #050306;
  text-shadow: 0 3px 0 #050306;
}

.is-safari .speed-title-copy strong::after {
  -webkit-text-stroke: 0;
  -webkit-text-fill-color: #fff;
  text-shadow: none;
}

.is-safari .progress-label,
.is-safari .wins-badge,
.is-safari .rebirth-level,
.is-safari .rebirth-multiplier-card,
.is-safari .rebirth-progress,
.is-safari .rebirth-button {
  -webkit-text-stroke-width: 1.7px;
  text-shadow: 0 4px 0 #050306;
}

.is-safari .stage-strip,
.is-safari .progress-label {
  -webkit-text-stroke: 0.55px #050306;
  paint-order: stroke fill;
  text-shadow: var(--bottom-label-outline);
}

.multiplier-stack {
  display: grid;
  gap: 7px;
  align-content: center;
}

.multiplier-stack.right {
  text-align: right;
}

.multiplier-stack span {
  color: #ff8f2c;
  font-size: clamp(12px, 1.1vw, 16px);
  font-weight: 1000;
  line-height: 1.12;
  letter-spacing: 0;
}

.multiplier-stack.right span:first-child {
  color: #ffffff;
}

.multiplier-stack.right span:last-child {
  color: #ffffff;
}

#trailMultiplierTop {
  color: #ffd4f4;
  -webkit-text-fill-color: #ffd4f4;
  -webkit-text-stroke: 1px #ff49da;
  text-shadow:
    0 2px 0 #9c0b74,
    0 3px 5px rgba(63, 0, 48, 0.42);
}

#rebirthMultiplierTop {
  color: #c9f5ff;
  -webkit-text-fill-color: #c9f5ff;
  -webkit-text-stroke: 1px #31dfff;
  text-shadow:
    0 2px 0 #006c89,
    0 3px 5px rgba(0, 38, 54, 0.42);
}

.hud-left {
  top: clamp(142px, 19vh, 184px);
  left: 14px;
  display: grid;
  gap: 9px;
  overflow: visible;
  translate: 0 -35px;
}

.wins-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: 150px;
  color: #fff;
  font-size: 36px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: var(--outline-2);
}

.wins-badge span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  -webkit-text-stroke: 0;
  font-size: 27px;
}

.trophy-icon-image,
.trophy-inline-icon {
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 -1px 0 #080402)
    drop-shadow(1px 0 0 #080402)
    drop-shadow(0 1px 0 #080402)
    drop-shadow(-1px 0 0 #080402)
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.34));
}

.trophy-icon-image {
  width: 40px;
  height: 40px;
}

.menu-grid {
  display: grid;
  grid-template-columns: 88px;
  gap: 9px;
  overflow: visible;
  transform: scale(1);
  transform-origin: top left;
}

.icon-button {
  --button-gradient-top: #c9f5ff;
  --button-gradient-mid: #69c6ff;
  --button-gradient-bottom: #5369e8;
  --button-stripe-color: rgba(57, 125, 232, 0.14);
  --button-glow-color: rgba(87, 190, 255, 0.32);
  position: relative;
  display: grid;
  width: 88px;
  height: 84px;
  place-items: center;
  padding: 6px;
  border: 3px solid #140b08;
  border-radius: 11px;
  background:
    radial-gradient(circle at 27% 18%, rgba(255, 255, 255, 0.72) 0 8%, rgba(255, 255, 255, 0.24) 18%, transparent 31%),
    linear-gradient(145deg, var(--button-gradient-top) 0%, var(--button-gradient-mid) 50%, var(--button-gradient-bottom) 100%);
  color: #fff;
  cursor: pointer;
  overflow: visible;
  pointer-events: auto;
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 0 rgba(24, 31, 94, 0.16),
    0 6px 0 rgba(0, 0, 0, 0.36),
    0 9px 20px rgba(0, 0, 0, 0.26),
    0 0 18px var(--button-glow-color);
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.icon-button::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 48%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0 6px, var(--button-stripe-color) 6px 12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(25, 22, 91, 0.1);
  opacity: 0.92;
  pointer-events: none;
}

.icon-button span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 42px;
  place-items: center;
  font-size: 32px;
  -webkit-text-stroke: 0;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5));
}

.menu-icon-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.icon-button .rebirth-icon-slot {
  width: 68px;
  height: 52px;
  justify-items: center;
  overflow: visible;
}

.rebirth-icon-image {
  width: 65px;
  height: 65px;
  margin: 0;
  transform: translateY(-5px);
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5));
}

.icon-button .trail-icon-slot {
  width: 75px;
  height: 52px;
  justify-items: center;
  overflow: visible;
}

.trail-icon-image {
  width: 73px;
  height: 73px;
  object-fit: contain;
  margin-top: -8px;
  transform: translateX(-4px);
  border-radius: 8px;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5));
}

.icon-button strong {
  position: relative;
  z-index: 1;
  align-self: end;
  margin-bottom: 1px;
  font-size: 18px;
  font-weight: 1000;
  line-height: 1;
  text-align: center;
  -webkit-text-stroke: 0.55px #050306;
  text-shadow: var(--bottom-label-outline);
}

.menu-alert {
  position: absolute;
  z-index: 3;
  top: -8px;
  right: -8px;
  display: none;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 3px solid #140b08;
  border-radius: 999px;
  line-height: 0;
  transform-origin: center;
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0 9%, #ffd95c 10% 17%, transparent 19%),
    linear-gradient(145deg, #ff666b 0%, #f01838 52%, #a80020 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(84, 0, 17, 0.3),
    0 2px 0 rgba(0, 0, 0, 0.34),
    0 0 8px rgba(255, 32, 62, 0.72);
  animation: menu-alert-pulse 1.2s ease-in-out infinite;
}

.icon-button.has-alert .menu-alert {
  display: block;
}

.rebirth-button.rebirth-ready {
  animation: rebirth-ready-bounce 1.35s ease-in-out infinite;
}

@keyframes rebirth-ready-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 0 rgba(126, 244, 255, 0));
  }
  50% {
    transform: translateY(-4px) scale(1.035);
    filter: drop-shadow(0 0 10px rgba(126, 244, 255, 0.65));
  }
}

@keyframes menu-alert-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.92);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.55),
      inset 0 -2px 0 rgba(84, 0, 17, 0.3),
      0 2px 0 rgba(0, 0, 0, 0.34),
      0 0 7px rgba(255, 32, 62, 0.62);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.65),
      inset 0 -2px 0 rgba(84, 0, 17, 0.26),
      0 2px 0 rgba(0, 0, 0, 0.34),
      0 0 10px rgba(255, 32, 62, 0.78);
  }
}

.icon-button:hover {
  transform: translateY(-1px);
  filter: saturate(1.08) brightness(1.04);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.46),
    inset 0 -3px 0 rgba(24, 31, 94, 0.14),
    0 7px 0 rgba(0, 0, 0, 0.34),
    0 11px 22px rgba(0, 0, 0, 0.24),
    0 0 24px var(--button-glow-color);
}

.icon-button:active {
  transform: translateY(4px);
  filter: saturate(1.03);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.36),
    inset 0 -2px 0 rgba(24, 31, 94, 0.12),
    0 2px 0 rgba(0, 0, 0, 0.38),
    0 5px 12px rgba(0, 0, 0, 0.22),
    0 0 14px var(--button-glow-color);
}

.icon-button.blue {
  --button-gradient-top: #c9f7ff;
  --button-gradient-mid: #66c7ff;
  --button-gradient-bottom: #5964e8;
  --button-stripe-color: rgba(55, 111, 225, 0.14);
  --button-glow-color: rgba(78, 180, 255, 0.34);
}

.icon-button.red {
  background: linear-gradient(145deg, #ff9b92, #d83b3b);
}

.icon-button.icy {
  background: linear-gradient(145deg, #c9eeff, #75b3df);
}

.icon-button.cyan {
  --button-gradient-top: #bafff4;
  --button-gradient-mid: #47e5d4;
  --button-gradient-bottom: #278ceb;
  --button-stripe-color: rgba(25, 158, 194, 0.14);
  --button-glow-color: rgba(55, 235, 217, 0.34);
}

.icon-button.purple {
  background: linear-gradient(145deg, #c9a5ff, #7a45ce);
}

.icon-button.violet {
  background: linear-gradient(145deg, #d19aff, #8a50bb);
}

.icon-button.fire {
  background: linear-gradient(145deg, #ff655f, #b9151d);
}

.icon-button.gift {
  z-index: 1;
  --button-stripe-color: rgba(255, 92, 128, 0.13);
  --button-glow-color: rgba(255, 175, 205, 0.24);
  background:
    radial-gradient(circle at 27% 18%, rgba(255, 255, 255, 0.78) 0 8%, rgba(255, 255, 255, 0.24) 18%, transparent 31%),
    linear-gradient(145deg, #ff3f67 0%, #ff9d24 20%, #ffe600 38%, #31e765 56%, #25cfff 74%, #666dff 88%, #db3fff 100%);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 0 rgba(105, 28, 78, 0.14),
    0 6px 0 rgba(0, 0, 0, 0.38),
    0 9px 20px rgba(0, 0, 0, 0.25),
    0 0 10px rgba(255, 145, 190, 0.28);
  animation: gift-ui-glow 1.65s ease-in-out infinite;
}

.icon-button.skin {
  z-index: 2;
  overflow: visible !important;
  clip-path: none;
  contain: none;
  --button-stripe-color: rgba(121, 70, 222, 0.13);
  --button-glow-color: rgba(206, 110, 255, 0.38);
  background:
    radial-gradient(circle at 27% 18%, rgba(255, 255, 255, 0.76) 0 8%, rgba(255, 255, 255, 0.24) 18%, transparent 31%),
    linear-gradient(145deg, #f8c8ff 0%, #c576ff 50%, #7059e9 100%);
}

.icon-button.sounds {
  --button-gradient-top: #f0dfc8;
  --button-gradient-mid: #e7cfad;
  --button-gradient-bottom: #cfad80;
  --button-stripe-color: rgba(151, 112, 67, 0.1);
  --button-glow-color: rgba(243, 225, 199, 0.34);
}

.icon-button .sounds-icon-slot {
  position: absolute;
  top: 1px;
  left: calc(50% - 2px);
  z-index: 1;
  width: 76px;
  height: 58px;
  justify-items: center;
  overflow: visible;
  transform: translateX(-50%);
}

.sounds-icon-image {
  width: clamp(42px, 94%, 68px);
  height: auto;
  object-fit: contain;
  transform: translateY(-4px);
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.5));
}

.icon-button.sounds strong {
  position: absolute;
  right: 6px;
  bottom: 1px;
  left: 6px;
  z-index: 2;
}

.icon-button.skin .skin-icon-slot {
  position: absolute;
  top: -4px;
  left: 50%;
  z-index: 1;
  width: 96px;
  height: 74px;
  justify-items: center;
  overflow: visible !important;
  clip-path: none;
  contain: none;
  transform: translateX(-50%);
}

.skin-icon-image {
  width: 80px;
  height: 55px;
  object-fit: contain;
  overflow: visible !important;
  clip-path: none;
  transform: translate(-7px, -5px) scale(1.1);
  transform-origin: center;
  filter: none;
}

.icon-button.skin strong {
  position: absolute;
  right: 6px;
  bottom: 0;
  left: 6px;
  z-index: 2;
}

.icon-button.gift::before {
  inset: 6px;
  z-index: auto;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 48%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0 6px, var(--button-stripe-color) 6px 12px);
  opacity: 0.92;
  filter: none;
  transform: none;
  animation: none;
}

.icon-button.gift:hover {
  animation-play-state: paused;
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.48),
    inset 0 -3px 0 rgba(105, 28, 78, 0.12),
    0 7px 0 rgba(0, 0, 0, 0.36),
    0 11px 22px rgba(0, 0, 0, 0.24),
    0 0 14px rgba(255, 145, 190, 0.36);
}

.icon-button.gift.has-alert {
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.44),
    inset 0 -3px 0 rgba(105, 28, 78, 0.14),
    0 6px 0 rgba(0, 0, 0, 0.38),
    0 9px 20px rgba(0, 0, 0, 0.25),
    0 0 12px rgba(255, 145, 190, 0.34);
}

.icon-button.gift::after {
  content: none;
}

@keyframes gift-ui-glow {
  0%,
  100% {
    box-shadow:
      inset 0 4px 0 rgba(255, 255, 255, 0.42),
      inset 0 -3px 0 rgba(105, 28, 78, 0.14),
      0 6px 0 rgba(0, 0, 0, 0.38),
      0 9px 20px rgba(0, 0, 0, 0.25),
      0 0 9px rgba(255, 145, 190, 0.25);
  }
  50% {
    box-shadow:
      inset 0 4px 0 rgba(255, 255, 255, 0.48),
      inset 0 -3px 0 rgba(105, 28, 78, 0.12),
      0 6px 0 rgba(0, 0, 0, 0.38),
      0 9px 20px rgba(0, 0, 0, 0.25),
      0 0 13px rgba(255, 145, 190, 0.34);
  }
}

.icon-button .gift-icon-slot {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 62px;
  height: 50px;
  justify-items: center;
  overflow: visible;
  transform: translateX(-50%);
}

.gift-icon-image {
  width: 46px;
  height: 46px;
  object-fit: contain;
  overflow: visible;
  transform: translate(-1px, -3px);
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.42));
}

.icon-button.gift strong {
  transform: translateY(3px);
}

.hidden {
  display: none !important;
}

html.is-chromebook .leaderboard,
html.is-ipad .leaderboard,
html.is-chromebook .panel,
html.is-ipad .panel,
html.is-chromebook .modal-overlay,
html.is-ipad .modal-overlay {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.is-chromebook .menu-alert,
html.is-ipad .menu-alert,
html.is-chromebook .rebirth-button.rebirth-ready,
html.is-ipad .rebirth-button.rebirth-ready,
html.is-chromebook .icon-button.gift,
html.is-ipad .icon-button.gift {
  animation: none;
}

.leaderboard {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  right: calc(env(safe-area-inset-right, 0px) + 11px);
  z-index: 5;
  width: min(254px, calc(100vw - 28px));
  padding: 6px 7px 1px;
  border: 3px solid #130916;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(75, 31, 94, 0.96), rgba(28, 12, 38, 0.95)),
    radial-gradient(circle at 18% 0%, rgba(255, 137, 224, 0.28), transparent 42%);
  color: #fff;
  pointer-events: none;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.18),
    0 5px 0 rgba(0, 0, 0, 0.3),
    0 14px 28px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(7px);
}

.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 13px;
  gap: 2px;
  margin-bottom: 3px;
}

.leaderboard-header strong {
  display: flex;
  flex: 1 1 auto;
  align-items: baseline;
  min-width: 0;
  gap: 3px;
  color: #fff;
  font-family: var(--font-heavy);
  font-size: 14px;
  line-height: 13px;
  text-shadow: 0 1px 0 #100615, 0 0 2px #100615;
  white-space: nowrap;
}

.leaderboard-room-code {
  display: inline-block;
  margin-left: 0;
  color: #fbe8ff;
  font-size: 11px;
  line-height: 13px;
  white-space: nowrap;
}

.leaderboard-room-code b {
  color: #ffe985;
  font-size: 12px;
}

.leaderboard-grid {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) 46px 36px;
  align-items: center;
  gap: 2px;
}

.leaderboard-grid > :nth-child(2) {
  transform: translateX(-3px);
}

.leaderboard-grid-head {
  height: 12px;
  padding: 0 2px;
  color: #fff;
  font-family: var(--font-heavy);
  font-size: 9.5px;
  line-height: 1;
  text-shadow: 0 1px 0 #100615;
}

.leaderboard-body {
  display: grid;
  gap: 1px;
  max-height: 169px;
  margin-right: -4px;
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
  scrollbar-color: #d875d0 rgba(13, 6, 18, 0.38);
  scrollbar-width: thin;
}

.leaderboard-body::-webkit-scrollbar {
  width: 7px;
}

.leaderboard-body::-webkit-scrollbar-track {
  border-radius: 8px;
  background: rgba(13, 6, 18, 0.38);
}

.leaderboard-body::-webkit-scrollbar-thumb {
  border: 1px solid rgba(26, 9, 30, 0.8);
  border-radius: 8px;
  background: linear-gradient(180deg, #f49de9, #b747ae);
}

.leaderboard-row {
  box-sizing: border-box;
  height: 16px;
  min-height: 16px;
  padding: 0 3px;
  border: 1px solid rgba(16, 7, 18, 0.68);
  border-radius: 5px;
  background: rgba(12, 5, 17, 0.34);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 0 #09030c;
}

.leaderboard-row > span:not(.leaderboard-name) {
  font-size: 12px;
  letter-spacing: -0.3px;
  -webkit-text-stroke: 1.2px #050306;
  paint-order: stroke fill;
  text-shadow: 0 1px 0 #050306;
}

.leaderboard-row.is-local {
  background: rgba(255, 215, 64, 0.24);
  border-color: rgba(255, 240, 135, 0.78);
}

.leaderboard-name {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.leaderboard-player-name {
  box-sizing: border-box;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  margin: -3px 0;
  padding: 3px;
  color: #fff;
  font-size: 13px;
  font-style: normal;
  line-height: 1;
  letter-spacing: -0.15px;
  text-overflow: ellipsis;
  -webkit-text-stroke: 1.35px var(--player-outline, #151018);
  paint-order: stroke fill;
  text-shadow: 0 1px 0 var(--player-outline, #151018), 0 0 1px var(--player-outline, #151018);
  white-space: nowrap;
}

.leaderboard-name i {
  box-sizing: border-box;
  flex: 0 0 auto;
  display: inline-grid;
  width: 12px;
  height: 12px;
  margin-right: 3px;
  padding-top: 1px;
  place-items: center;
  border-radius: 999px;
  background: rgba(19, 9, 22, 0.58);
  color: #ffe985;
  font-style: normal;
  font-size: 9.5px;
}

.leaderboard-row:nth-child(1) .leaderboard-name i {
  border: 1px solid #fff0a3;
  background: linear-gradient(180deg, #ffe978, #d99a16);
  color: #fff4e8;
  box-shadow: 0 0 5px rgba(255, 215, 65, 0.72);
}

.leaderboard-row:nth-child(2) .leaderboard-name i {
  border: 1px solid #ffc4ec;
  background: linear-gradient(180deg, #ff9dde, #d943a6);
  color: #fff4e8;
  box-shadow: 0 0 5px rgba(255, 91, 196, 0.58);
}

.leaderboard-row:nth-child(3) .leaderboard-name i {
  border: 1px solid #f4f7ff;
  background: linear-gradient(180deg, #e9edf6, #929caf);
  color: #fff4e8;
  box-shadow: 0 0 4px rgba(218, 229, 248, 0.55);
}

.leaderboard-row:nth-child(4) .leaderboard-name i {
  border: 1px solid #f4bd8b;
  background: linear-gradient(180deg, #d9955f, #93502e);
  color: #fff4e8;
  box-shadow: 0 0 4px rgba(193, 105, 58, 0.52);
}

.room-code-panel {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: auto;
}

.room-code-toggle {
  display: none;
}

.room-code-form {
  display: grid;
  width: calc(100% + 14px);
  margin-left: -7px;
  grid-template-columns: minmax(103px, 1.15fr) 44px minmax(78px, 0.85fr);
  gap: 2px;
}

.room-code-form input,
.room-code-form button {
  min-width: 0;
  height: 25px;
  border: 2px solid #130916;
  border-radius: 6px;
  font-family: var(--font-heavy);
  font-size: 12px;
  line-height: 1;
  outline: none;
}

.room-code-form input {
  padding: 1px 7px 0;
  background: rgba(255, 255, 255, 0.9);
  color: #26152b;
  text-transform: lowercase;
}

.room-code-form input.is-error::placeholder {
  color: #a51d34;
  font-size: 11px;
  opacity: 1;
  text-transform: none;
}

.room-code-form button {
  padding: 0 5px;
  background: linear-gradient(180deg, #67ff8f, #17b848);
  color: #fff;
  text-shadow: var(--outline-1);
  cursor: pointer;
}

.room-code-form .private-server-button {
  display: grid;
  padding: 0 4px;
  place-items: center;
  background: linear-gradient(180deg, #62c9ff, #247be0);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.room-code-form .private-server-button:disabled {
  cursor: default;
  filter: saturate(0.45) brightness(0.78);
  opacity: 0.72;
}

.room-code-status {
  min-height: 10px;
  margin-top: 3px;
  color: #fff2a8;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
  text-shadow: var(--outline-1);
}

.room-code-status:empty {
  display: none;
}

.sound-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: auto;
  left: calc(env(safe-area-inset-left, 0px) + 14px);
  z-index: 32;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 4px;
  place-items: center;
  border: 3px solid #130916;
  border-radius: 10px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.78), transparent 22%),
    linear-gradient(180deg, #7deaff 0%, #39a9ff 50%, #2473dc 100%);
  cursor: pointer;
  pointer-events: auto;
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.34),
    0 5px 0 rgba(0, 0, 0, 0.34),
    0 12px 22px rgba(0, 0, 0, 0.24);
}

.sound-toggle::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 7px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.58), transparent 28%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.26) 0 5px, rgba(19, 91, 217, 0.18) 5px 10px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.sound-toggle img {
  position: relative;
  z-index: 1;
  display: block;
  width: 39px;
  height: 39px;
  object-fit: contain;
  filter:
    drop-shadow(0 -1px 0 #080402)
    drop-shadow(1px 0 0 #080402)
    drop-shadow(0 1px 0 #080402)
    drop-shadow(-1px 0 0 #080402)
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.34));
}

.sound-toggle.settings-toggle > img {
  width: 34px;
  height: 34px;
  margin: 0;
  object-position: center;
  transform: none;
}

.sound-toggle.settings-toggle::before {
  content: none;
}

.sound-toggle:hover {
  transform: translateY(-1px);
}

.sound-toggle:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.28),
    0 3px 0 rgba(0, 0, 0, 0.34),
    0 8px 16px rgba(0, 0, 0, 0.2);
}

.sound-toggle.is-muted {
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.78), transparent 22%),
    linear-gradient(180deg, #a8fff0 0%, #3fd9ff 52%, #4f8cff 100%);
}

.account-session {
  position: fixed;
  /* The settings gear above ends ~66px down; the login button draws 10px
     above this offset (its own top:-10px) — 88px leaves a clear gap. */
  top: calc(env(safe-area-inset-top, 0px) + 88px);
  left: calc(env(safe-area-inset-left, 0px) + 14px);
  z-index: 32;
  pointer-events: auto;
}

.account-greeting {
  box-sizing: border-box;
  min-height: 42px;
  padding: 7px 16px 9px;
  border: 3px solid #160c22;
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: var(--outline-1);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.35),
    0 5px 0 rgba(0, 0, 0, 0.34),
    0 10px 18px rgba(0, 0, 0, 0.2);
}

.account-login-button {
  position: relative;
  top: -10px;
  left: -10px;
  isolation: isolate;
  box-sizing: border-box;
  display: inline-flex;
  width: 202px;
  height: 42px;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 3px 7px 5px 3px;
  overflow: visible;
  border: 3px solid #140b08;
  border-radius: 11px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.54), transparent 25%),
    linear-gradient(145deg, #d9ff9a 0%, #8dff86 52%, #38d96a 100%);
  color: #fff;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.38),
    0 4px 0 rgba(0, 0, 0, 0.28),
    0 7px 14px rgba(0, 0, 0, 0.16);
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.account-login-button::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 0;
  border-radius: 7px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0 7px, rgba(51, 215, 96, 0.13) 7px 14px);
  pointer-events: none;
}

.account-login-button::after {
  content: none;
}

.account-login-logo {
  position: relative;
  z-index: 3;
  display: block;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  box-sizing: border-box;
  object-fit: contain;
  border: 2px solid #050306;
  border-radius: 9px;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.42));
  pointer-events: none;
  user-select: none;
}

.account-login-art {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  filter: saturate(1.08) brightness(1.04) contrast(1.04);
  transform: none;
  pointer-events: none;
  user-select: none;
}

html:not(.has-touch-controls) .account-login-button,
html:not(.has-touch-controls) .account-login-art {
  height: 42px;
}

/* Touch devices get the short label — the full one doesn't fit. */ .account-login-label-short{display:none}html.has-touch-controls .account-login-label-full{display:none}html.has-touch-controls .account-login-label-short{display:inline}.account-login-label{position:relative;z-index:3;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:auto;padding:0;color:#fff;font-family:var(--font-heavy);font-size:14px;line-height:1;text-align:center;white-space:nowrap;-webkit-text-stroke:0.55px #050306;paint-order:stroke fill;transform:translateY(1px);text-shadow:var(--bottom-label-outline);pointer-events:none}.account-login-button:hover{transform:translateY(2px);filter:brightness(1.05) saturate(1.06);box-shadow:inset 0 3px 0 rgba(255,255,255,0.34),0 3px 0 rgba(0,0,0,0.35),0 0 22px rgba(155,255,116,0.58)}.account-login-button:focus-visible{outline:3px solid #fff36a;outline-offset:3px}.account-login-button:active{transform:translateY(4px) scale(0.985);filter:brightness(0.97);box-shadow:inset 0 2px 0 rgba(255,255,255,0.3),0 1px 0 rgba(0,0,0,0.35),0 0 12px rgba(155,255,116,0.36)}.account-login-button:disabled{cursor:wait;filter:saturate(0.7)}html.is-account-session-visible:not(.has-touch-controls) .hud-left{/* Keep in step with .account-session's top (88px): the account area moved
     down 18px, so the trophy HUD clears it with 18px less upward pull. */
  top: clamp(142px, 19vh, 184px) !important;
  translate: 0 -17px !important;
}

.account-greeting {
  max-width: min(220px, calc(100vw - 150px));
  overflow: hidden;
  background: linear-gradient(180deg, #6de8ff 0%, #2a9ee9 58%, #1769bd 100%);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shown purely via the is-account-login-pending class on <html> — visible
   from the login tap until the modal opens, is dismissed, or the failsafe
   clears it. No JS of its own. */
.account-login-waiting {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  place-items: center;
  pointer-events: none;
}

html.is-account-login-pending .account-login-waiting {
  display: grid;
}

.account-login-waiting-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 11px;
  border: 3px solid #102c59;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(44, 116, 178, 0.96), rgba(15, 62, 116, 0.98));
  color: #fff;
  font-family: var(--font-heavy);
  font-size: 16px;
  text-shadow: var(--outline-1);
  box-shadow: 0 4px 0 rgba(3, 20, 48, 0.5), 0 10px 22px rgba(0, 0, 0, 0.3);
}

.account-login-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: account-login-spin 0.9s linear infinite;
}

@keyframes account-login-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .account-login-spinner { animation: none; }
}

.account-greeting strong {
  color: #fff5a8;
}

.settings-modal {
  position: relative;
  box-sizing: border-box;
  width: min(650px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 22px 26px 28px;
  overflow: auto;
  border: 5px solid #180913;
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.56), transparent 23%),
    radial-gradient(circle at 10px 10px, rgba(100, 36, 122, 0.13) 0 3px, transparent 3.7px) 0 0 / 26px 26px,
    linear-gradient(155deg, #ffd1fa 0%, #e68cff 48%, #7f67e9 100%);
  color: #fff;
  font-family: var(--font-heavy);
  text-align: center;
  box-shadow:
    inset 0 7px 0 rgba(255, 255, 255, 0.48),
    inset 0 -8px 0 rgba(75, 30, 125, 0.18),
    0 12px 0 rgba(0, 0, 0, 0.34),
    0 20px 38px rgba(0, 0, 0, 0.3);
}

.settings-modal:has(.feedback-panel:not(.hidden)) {
  padding-bottom: 14px;
}

.settings-modal::before {
  content: "";
  position: absolute;
  inset: 11px;
  z-index: 0;
  border: 3px solid rgba(67, 24, 91, 0.55);
  border-radius: 17px;
  pointer-events: none;
}

.settings-panel,
.feedback-panel {
  position: relative;
  z-index: 1;
}

@media (min-width: 681px) and (min-height: 621px) {
  .settings-modal:has(.settings-panel:not(.hidden)) {
    height: 330px;
    transform: translateY(-18px);
  }

  .settings-modal:has(.feedback-panel:not(.hidden)) {
    height: 443px;
    transform: none;
  }

  .feedback-send {
    margin-top: 18px;
  }

  .settings-panel {
    box-sizing: border-box;
    display: flex;
    min-height: 270px;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 0;
  }

  .settings-panel .settings-controls {
    margin-top: 20px;
  }

  .settings-panel .settings-title-box {
    font-size: clamp(24px, 3.5vw, 32px);
  }
}

.settings-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 4px 0 0;
  border: 4px solid #180913;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff665e, #c91f20);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 29px;
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.34), 0 5px 0 rgba(0, 0, 0, 0.32);
}

.settings-title-box {
  position: relative;
  z-index: 2;
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto;
  padding: 2px 18px 3px 13px;
  border: 4px solid #180913;
  border-radius: 16px;
  background: linear-gradient(180deg, #ff8ddb 0%, #ef4ab8 52%, #b32898 100%);
  color: #fff;
  font-size: clamp(28px, 4.5vw, 40px);
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.34), 0 5px 0 rgba(0, 0, 0, 0.28);
}

.settings-panel .settings-title-box {
  background: linear-gradient(180deg, #ffb0df 0%, #ff62b7 52%, #ed258f 100%);
}

.settings-title-box img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.34));
}

.feedback-intro {
  position: relative;
  margin: 16px 0 14px;
  font-size: 18px;
  text-shadow: var(--outline-1);
}

.settings-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.settings-option,
.settings-feedback-button,
.settings-respawn-button {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  border: 4px solid #180913;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  text-align: left;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.38), inset 0 -5px 0 rgba(48, 45, 133, 0.14), 0 6px 0 rgba(0, 0, 0, 0.3);
  transition: transform 120ms ease, filter 120ms ease;
}

.settings-option {
  min-height: 78px;
  padding: 3px 10px;
  border-radius: 16px;
  background: linear-gradient(145deg, #6bf2ff, #458bed 58%, #6c55df);
}

.settings-option.is-off {
  background: linear-gradient(145deg, #c6d1e9, #7887ad 58%, #5d6083);
  filter: saturate(0.78);
}

.settings-option:hover,
.settings-feedback-button:hover,
.settings-respawn-button:hover,
.feedback-send:hover,
.feedback-back:hover {
  transform: translateY(-2px);
  filter: brightness(1.06) saturate(1.05);
}

.settings-option:active,
.settings-feedback-button:active,
.settings-respawn-button:active,
.feedback-send:active,
.feedback-back:active {
  transform: translateY(3px);
}

.settings-option-icon {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
}

.settings-option-icon img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35));
}

.settings-option-icon img[hidden] {
  display: none;
}

.settings-option-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.settings-option-copy strong,
.settings-feedback-button strong,
.settings-respawn-button strong {
  font-size: clamp(21px, 3vw, 29px);
  line-height: 1;
  text-shadow: var(--outline-2);
}

.settings-option-copy small,
.settings-feedback-button small,
.settings-respawn-button small {
  font-size: 12px;
  line-height: 1.15;
  text-shadow: var(--outline-1);
}

.settings-feedback-button {
  width: 100%;
  min-height: 76px;
  justify-content: center;
  margin-top: 14px;
  padding: 4px 20px;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffb85d, #ff6b86 52%, #d441b6);
}

.settings-feedback-button > img {
  position: absolute;
  top: 50%;
  right: calc(50% + clamp(62px, 5.8vw, 78px));
  width: 58px;
  height: 58px;
  object-fit: contain;
  transform: translateY(-50%);
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.34));
}

.settings-feedback-button > span {
  display: grid;
  width: 100%;
  gap: 5px;
  text-align: center;
}

.settings-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.settings-respawn-button {
  width: 100%;
  min-height: 76px;
  justify-content: center;
  margin-top: 12px;
  padding: 4px 20px;
  border-radius: 16px;
  background: linear-gradient(145deg, #b9ff92, #43df70 52%, #159d53);
}

.settings-respawn-button > img {
  position: absolute;
  top: 50%;
  right: calc(50% + clamp(62px, 5.8vw, 78px));
  width: 58px;
  height: 58px;
  object-fit: contain;
  transform: translateY(-50%);
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.34));
}

.settings-respawn-button > span {
  display: grid;
  width: 100%;
  gap: 5px;
  text-align: center;
}

.settings-actions .settings-feedback-button,
.settings-actions .settings-respawn-button {
  margin-top: 0;
}

.feedback-back {
  position: absolute;
  top: 2px;
  left: 0;
  z-index: 3;
  min-width: 76px;
  padding: 8px 12px 9px;
  border: 3px solid #180913;
  border-radius: 12px;
  background: linear-gradient(180deg, #6ff7ff, #438eea);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 16px;
  text-shadow: var(--outline-1);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.38), 0 4px 0 rgba(0, 0, 0, 0.28);
}

.feedback-form {
  display: grid;
  gap: 8px;
  text-align: left;
}

.feedback-form label {
  font-size: 18px;
  text-shadow: var(--outline-1);
}

.feedback-form textarea {
  box-sizing: border-box;
  width: 100%;
  height: 125px;
  min-height: 125px;
  max-height: 125px;
  resize: none;
  padding: 14px 16px;
  border: 4px solid #180913;
  border-radius: 15px;
  outline: none;
  background: linear-gradient(180deg, #fffafd, #ffe9fb);
  color: #3f1848;
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: inset 0 4px 0 rgba(112, 38, 123, 0.12), 0 5px 0 rgba(0, 0, 0, 0.24);
}

.feedback-form textarea:focus {
  border-color: #37ddff;
  box-shadow: inset 0 4px 0 rgba(112, 38, 123, 0.1), 0 0 0 4px rgba(55, 221, 255, 0.28), 0 5px 0 rgba(0, 0, 0, 0.24);
}

.feedback-meta {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(57, 16, 69, 0.7);
}

.feedback-meta strong {
  white-space: nowrap;
}

.feedback-send {
  justify-self: center;
  min-width: 220px;
  padding: 12px 20px 14px;
  border: 4px solid #180913;
  border-radius: 15px;
  background: linear-gradient(180deg, #8aff92, #37d76c 58%, #20a954);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 22px;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.4), 0 6px 0 rgba(0, 0, 0, 0.3);
}

.feedback-send:disabled {
  cursor: wait;
  filter: grayscale(0.45);
  opacity: 0.72;
}

.feedback-status {
  min-height: 22px;
  margin: 0;
  text-align: center;
  font-size: 14px;
  text-shadow: var(--outline-1);
}

.feedback-status:empty {
  visibility: hidden;
}

.feedback-status.good {
  color: #d8ffbc;
}

.feedback-status.bad {
  color: #ffe1e7;
}

.player-name-modal {
  position: relative;
  box-sizing: border-box;
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 18px 28px 22px;
  overflow: visible;
  border: 5px solid #180913;
  border-radius: 25px;
  background:
    radial-gradient(circle at 16% 9%, rgba(255, 255, 255, 0.58), transparent 25%),
    radial-gradient(circle at 10px 10px, rgba(29, 77, 153, 0.13) 0 3px, transparent 3.7px) 0 0 / 26px 26px,
    linear-gradient(150deg, #b9edff 0%, #83caff 42%, #8d76ed 100%);
  color: #fff;
  font-family: var(--font-heavy);
  text-align: center;
  box-shadow:
    inset 0 7px 0 rgba(255, 255, 255, 0.48),
    inset 0 -8px 0 rgba(31, 57, 132, 0.2),
    0 11px 0 rgba(0, 0, 0, 0.34),
    0 20px 38px rgba(0, 0, 0, 0.3);
  animation: player-name-modal-pop 220ms ease-out both;
}

.player-name-modal::before {
  content: none;
}

.player-name-modal > * {
  position: relative;
  z-index: 1;
}

.player-name-close {
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 4px 0 0;
  border: 4px solid #180913;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff7169, #d42632);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 29px;
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.36), 0 5px 0 rgba(0, 0, 0, 0.32);
}

.player-name-preview {
  display: grid;
  min-height: 70px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 6px 16px 8px;
  overflow: hidden;
  border: 4px solid #180913;
  border-radius: 17px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 35%),
    linear-gradient(180deg, #3576b8 0%, #245c9b 54%, #153f78 100%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.22), 0 6px 0 rgba(0, 0, 0, 0.28);
}

.player-name-preview span {
  color: #c9f7ff;
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: var(--outline-1);
}

.player-name-preview strong {
  display: block;
  max-width: 100%;
  overflow: visible;
  color: #fff;
  font-size: clamp(25px, 5vw, 36px);
  line-height: 1;
  text-overflow: clip;
  white-space: nowrap;
  -webkit-text-stroke: 1px #05080c;
  paint-order: stroke fill;
  text-shadow: var(--outline-2);
}

.player-name-preview.is-generating strong {
  animation: player-name-choice-pop 260ms ease-out;
}

.player-name-generate,
.player-name-cancel,
.player-name-save {
  border: 4px solid #180913;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.38), 0 6px 0 rgba(0, 0, 0, 0.3);
  transition: transform 120ms ease, filter 120ms ease;
}

.player-name-button-label {
  display: inline-block;
}

.player-name-cancel .player-name-button-label {
  margin-left: 6px;
}

html.is-chromebook .player-name-button-label {
  transform: translateY(3px);
}

.player-name-generate:hover,
.player-name-cancel:hover,
.player-name-save:hover,
.player-name-close:hover {
  transform: translateY(-2px);
  filter: brightness(1.07) saturate(1.04);
}

.player-name-generate:active,
.player-name-cancel:active,
.player-name-save:active,
.player-name-close:active {
  transform: translateY(3px);
}

.player-name-generate {
  display: inline-flex;
  position: relative;
  left: -3px;
  min-width: 274px;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 16px;
  padding: 3px 9px 5px 17px;
  border-radius: 15px;
  background: linear-gradient(180deg, #8ceeff 0%, #35c5ff 52%, #2879df 100%);
  font-size: 26px;
}

.player-name-generate > img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter:
    drop-shadow(1px 0 0 #050505)
    drop-shadow(-1px 0 0 #050505)
    drop-shadow(0 1px 0 #050505)
    drop-shadow(0 -1px 0 #050505)
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.3));
}

.player-name-generate:disabled,
.player-name-save:disabled {
  cursor: wait;
  filter: grayscale(0.35);
  opacity: 0.72;
}

.player-name-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.player-name-cancel,
.player-name-save {
  display: inline-flex;
  position: relative;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 4px 10px 7px;
  border-radius: 14px;
  font-size: 20px;
}

.player-name-cancel > img,
.player-name-save > img {
  display: block;
  position: absolute;
  top: 50%;
  right: 7px;
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter:
    drop-shadow(1px 0 0 #050505)
    drop-shadow(-1px 0 0 #050505)
    drop-shadow(0 1px 0 #050505)
    drop-shadow(0 -1px 0 #050505);
  transform: translateY(-50%);
}

.player-name-cancel {
  justify-content: flex-start;
  padding-left: 22px;
  padding-right: 32px;
  background: linear-gradient(180deg, #ffd77d 0%, #ff9d42 54%, #e45b24 100%);
  white-space: nowrap;
}

.player-name-cancel > img {
  right: 3px;
  width: 26px;
  height: 26px;
}

.player-name-save {
  margin-left: 5px;
  background: linear-gradient(180deg, #9affab 0%, #42db75 54%, #18a852 100%);
  font-size: 21px;
  text-indent: -12px;
}

.player-name-save > img {
  width: 33px;
  height: 33px;
}

.player-name-status {
  min-height: 18px;
  margin: 9px 0 -3px;
  color: #e7fbff;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 2px rgba(18, 36, 87, 0.72);
}

@keyframes player-name-modal-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes player-name-choice-pop {
  0% { opacity: 0.45; transform: scale(0.9); }
  65% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px), (max-height: 620px) {
  .player-name-modal {
    width: min(480px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    padding: 14px 16px 13px;
    overflow: visible;
    border-width: 4px;
    border-radius: 20px;
  }

  .player-name-modal::before {
    content: none;
  }

  .player-name-close {
    top: -13px;
    right: -11px;
    width: 38px;
    height: 38px;
    border-width: 3px;
    font-size: 23px;
  }

  .player-name-intro {
    margin: 9px 0 8px;
    font-size: 13px;
  }

  .player-name-preview {
    min-height: 54px;
    gap: 3px;
    padding: 4px 12px 6px;
    border-width: 3px;
    border-radius: 13px;
  }

  .player-name-preview span {
    font-size: 10px;
  }

  .player-name-preview strong {
    font-size: clamp(22px, 6vw, 30px);
  }

  .player-name-generate {
    min-width: min(254px, 100%);
    min-height: 50px;
    margin-top: 10px;
    border-width: 3px;
    border-radius: 12px;
    font-size: 21px;
  }

  .player-name-generate > img {
    width: 32px;
    height: 32px;
  }

  .player-name-actions {
    gap: 9px;
    margin-top: 10px;
  }

  .player-name-cancel,
  .player-name-save {
    min-height: 38px;
    border-width: 3px;
    border-radius: 11px;
    font-size: 17px;
  }

  .player-name-cancel > img,
  .player-name-save > img {
    right: 5px;
    width: 21px;
    height: 21px;
  }

  .player-name-cancel {
    padding-left: 16px;
    padding-right: 27px;
  }

  .player-name-cancel > img {
    right: 2px;
    width: 23px;
    height: 23px;
  }

  .player-name-save > img {
    width: 29px;
    height: 29px;
  }

  .player-name-save {
    margin-left: 4px;
    font-size: 18px;
    text-indent: -8px;
  }

  .player-name-status {
    min-height: 14px;
    margin-top: 6px;
    font-size: 11px;
  }
}

@media (max-width: 680px), (max-height: 620px) {
  .settings-modal {
    width: min(560px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    padding: 14px 15px 18px;
    border-width: 4px;
    border-radius: 20px;
  }

  .settings-modal:has(.feedback-panel:not(.hidden)) {
    padding-bottom: 10px;
  }

  .settings-close {
    top: 7px;
    right: 8px;
    width: 38px;
    height: 38px;
    border-width: 3px;
    font-size: 23px;
  }

  .settings-title-box {
    min-height: 46px;
    padding: 4px 16px 5px 10px;
    border-width: 3px;
    font-size: clamp(24px, 6vw, 34px);
  }

  .settings-panel .settings-title-box {
    font-size: clamp(22px, 5vw, 29px);
  }

  .settings-title-box img {
    width: 42px;
    height: 42px;
  }

  .settings-subtitle,
  .feedback-intro {
    margin: 10px 0;
    font-size: 14px;
  }

  .settings-option {
    min-height: 72px;
    padding: 7px 9px;
    border-width: 3px;
  }

  .settings-option-icon {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
  }

  .settings-option-icon img {
    width: 52px;
    height: 52px;
  }

  .settings-option-copy strong,
  .settings-feedback-button strong,
  .settings-respawn-button strong {
    font-size: clamp(17px, 4vw, 23px);
  }

  .settings-option-copy small,
  .settings-feedback-button small,
  .settings-respawn-button small {
    font-size: 10px;
  }

  .settings-feedback-button,
  .settings-respawn-button {
    min-height: 72px;
    margin-top: 11px;
    padding: 5px 14px;
    border-width: 3px;
  }

  .settings-feedback-button > img {
    width: 58px;
    height: 58px;
  }

  .settings-respawn-button > img {
    width: 58px;
    height: 58px;
  }

  .feedback-back {
    min-width: 60px;
    padding: 6px 8px 7px;
    font-size: 12px;
  }

  .feedback-form {
    gap: 7px;
  }

  .feedback-form textarea {
    height: 100px;
    min-height: 100px;
    max-height: 100px;
    resize: none;
    padding: 10px 12px;
    font-size: 16px;
  }

  .feedback-send {
    min-width: 180px;
    padding: 9px 14px 11px;
    font-size: 18px;
  }
}

@media (max-width: 450px) {
  .settings-controls {
    grid-template-columns: 1fr;
  }

  .settings-actions {
    gap: 8px;
  }

  .settings-actions .settings-feedback-button,
  .settings-actions .settings-respawn-button {
    min-height: 64px;
    justify-content: flex-start;
    gap: 4px;
    padding: 4px 6px;
  }

  .settings-actions .settings-feedback-button > img,
  .settings-actions .settings-respawn-button > img {
    position: static;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    transform: none;
  }

  .settings-actions .settings-feedback-button > span,
  .settings-actions .settings-respawn-button > span {
    width: auto;
    gap: 2px;
    text-align: left;
  }

  .settings-actions .settings-feedback-button strong,
  .settings-actions .settings-respawn-button strong {
    font-size: 16px;
  }

  .settings-actions .settings-feedback-button small,
  .settings-actions .settings-respawn-button small {
    font-size: 8px;
  }

  .settings-option {
    min-height: 72px;
  }

  .settings-option-icon {
    flex-basis: 54px;
    width: 54px;
    height: 54px;
  }

  .settings-option-icon img {
    width: 54px;
    height: 54px;
  }

  .feedback-meta {
    align-items: flex-end;
    gap: 2px;
  }
}

.keyboard-theme-test {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 20px);
  left: calc(env(safe-area-inset-left, 0px) + 74px);
  z-index: 32;
  min-width: 86px;
  height: 28px;
  padding: 2px 8px;
  border: 2px solid #130916;
  border-radius: 8px;
  background: linear-gradient(180deg, #8ff7ff, #36bde8);
  color: #fff;
  font-family: var(--font-heavy);
  font-size: 11px;
  line-height: 1;
  text-shadow: 0 1px 0 #102b45;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 3px 0 rgba(0, 0, 0, 0.34);
}

.keyboard-theme-test[data-theme="classic"] {
  background: linear-gradient(180deg, #ffd978, #ff9f37);
}

.keyboard-theme-test[data-theme="candy"] {
  background: linear-gradient(180deg, #ff9ee8, #d84fbf);
}

.keyboard-theme-test[data-theme="snow"] {
  background: linear-gradient(180deg, #f8ffff, #83d9f2);
  color: #17455f;
  text-shadow: 0 1px 0 #fff;
}

.keyboard-theme-test[data-theme="asmr"] {
  background: linear-gradient(180deg, #d6b2ff, #8c58d7);
}

.keyboard-theme-test[data-theme="horse"] {
  background: linear-gradient(180deg, #e2b66e, #9a6530);
}

.keyboard-theme-test[data-theme="slime"] {
  background: linear-gradient(180deg, #9dff8d, #39b85f);
}

.keyboard-theme-test[data-theme="bubble-wrap"] {
  background: linear-gradient(180deg, #ffb8e8, #e15da9);
}

.keyboard-theme-test:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 1px 0 rgba(0, 0, 0, 0.34);
}

@media (pointer: coarse) {
  .keyboard-theme-test {
    top: calc(env(safe-area-inset-top, 0px) + 15px);
    left: calc(env(safe-area-inset-left, 0px) + 60px);
  }
}

@media (orientation: landscape) {
  html.has-touch-controls:not(.is-tablet-device) .keyboard-theme-test {
    top: 12px !important;
    left: 108px !important;
  }
}

.multiplier-stack.right {
  display: none;
}

.hud-right {
  top: 316px;
  right: 14px;
  display: grid;
  gap: 10px;
}

.emoji-hud-button {
  position: relative;
  display: grid;
  justify-self: end;
  width: 84px;
  height: 80px;
  margin-right: 0;
  place-items: center;
  padding: 6px;
  border: 3px solid #140b08;
  border-radius: 11px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.52), transparent 25%),
    linear-gradient(145deg, #a8f4ff 0%, #48c9ff 52%, #2b79ff 100%);
  color: #fff;
  cursor: pointer;
  overflow: visible;
  pointer-events: auto;
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.38),
    0 7px 0 rgba(0, 0, 0, 0.35),
    0 10px 22px rgba(0, 0, 0, 0.25);
}

.emoji-hud-button::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 7px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0 7px, rgba(34, 153, 255, 0.12) 7px 14px);
  pointer-events: none;
}

.emoji-hud-button:hover,
.emoji-hud-button.is-open {
  transform: translateY(2px);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.34),
    0 5px 0 rgba(0, 0, 0, 0.35),
    0 0 22px rgba(255, 236, 89, 0.58);
}

.emoji-hud-icon {
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 1;
  display: grid;
  width: 76px;
  height: 54px;
  place-items: center;
  transform: translateX(-50%);
}

.emoji-hud-icon img {
  display: block;
  width: 76px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.48));
}

.emoji-hud-button strong {
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: center;
  margin-bottom: 1px;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  -webkit-text-stroke: 0.55px #050306;
  text-shadow: var(--bottom-label-outline);
}

.custom-speed-button {
  position: relative;
  display: grid;
  justify-self: end;
  width: 84px;
  height: 80px;
  margin-right: 0;
  place-items: center;
  padding: 6px;
  border: 3px solid #140b08;
  border-radius: 11px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.54), transparent 25%),
    linear-gradient(145deg, #d9ff9a 0%, #8dff86 52%, #38d96a 100%);
  color: #fff;
  cursor: pointer;
  overflow: visible;
  pointer-events: auto;
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.38),
    0 7px 0 rgba(0, 0, 0, 0.35),
    0 10px 22px rgba(0, 0, 0, 0.25);
}

.custom-speed-button::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 7px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0 7px, rgba(51, 215, 96, 0.13) 7px 14px);
  pointer-events: none;
}

.custom-speed-button:hover,
.custom-speed-button:not(.is-locked).is-open {
  transform: translateY(2px);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.34),
    0 5px 0 rgba(0, 0, 0, 0.35),
    0 0 22px rgba(155, 255, 116, 0.58);
}

.custom-speed-button.is-locked {
  filter: saturate(0.45) brightness(0.76);
}

.custom-speed-icon {
  position: absolute;
  top: 1px;
  left: 50%;
  z-index: 1;
  display: grid;
  width: 72px;
  height: 48px;
  place-items: center;
  overflow: visible;
  border-radius: 8px;
  transform: translateX(-50%);
}

.custom-speed-icon img {
  display: block;
  width: 68px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.48));
}

.custom-speed-button strong {
  position: relative;
  z-index: 1;
  align-self: end;
  justify-self: center;
  margin-bottom: -2px;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: 0.55px #050306;
  text-shadow: var(--bottom-label-outline);
}

.emoji-menu {
  position: fixed;
  top: 306px;
  right: calc(env(safe-area-inset-right, 0px) + 108px);
  z-index: 34;
  display: grid;
  grid-template-columns: repeat(4, 54px);
  gap: 8px;
  padding: 17px;
  border: 4px solid #140b08;
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.38), transparent 28%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.13) 0 10px, rgba(57, 146, 255, 0.11) 10px 20px),
    linear-gradient(180deg, #baf6ff 0%, #73d7ff 52%, #58b4ff 100%);
  pointer-events: auto;
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.34),
    inset 0 -5px 0 rgba(15, 86, 152, 0.24),
    0 8px 0 rgba(0, 0, 0, 0.32),
    0 16px 28px rgba(0, 0, 0, 0.26);
}

.emoji-menu::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px solid rgba(10, 43, 76, 0.72);
  border-radius: 11px;
  pointer-events: none;
}

.emoji-choice {
  position: relative;
  z-index: 1;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  padding: 3px;
  border: 3px solid #140b08;
  border-radius: 14px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.56), transparent 28%),
    linear-gradient(180deg, #ffd95b, #ff9b2f);
  cursor: pointer;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.42),
    0 4px 0 rgba(0, 0, 0, 0.34);
}

.emoji-choice:hover {
  transform: translateY(2px) scale(1.04);
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.66), transparent 28%),
    linear-gradient(180deg, #fff06d, #ffb13d);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.42),
    0 2px 0 rgba(0, 0, 0, 0.34),
    0 0 18px rgba(255, 226, 89, 0.52);
}

.emoji-choice img {
  display: block;
  width: 43px;
  height: 43px;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.38));
}

.emoji-shortcut {
  position: absolute;
  z-index: 2;
  top: -7px;
  left: -7px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid #140b08;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff, #ffe46b);
  color: #ffffff;
  font-family: var(--font-heavy);
  font-size: 12px;
  line-height: 1;
  -webkit-text-stroke: 0.35px #140b08;
  text-shadow:
    -1px -1px 0 #140b08,
    0 -1px 0 #140b08,
    1px -1px 0 #140b08,
    -1px 0 0 #140b08,
    1px 0 0 #140b08,
    0 1px 0 #140b08;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.42),
    0 2px 0 rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.panel {
  position: relative;
  width: 118px;
  border: 3px solid #140b08;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(67, 34, 89, 0.92), rgba(35, 17, 47, 0.92));
  color: #fff;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.18), 0 6px 0 rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(8px);
}

.panel {
  padding: 8px 10px;
}

.panel-compact-stat {
  width: 84px;
  padding-right: 7px;
  padding-left: 7px;
  background:
    radial-gradient(circle at 24% 13%, rgba(255, 255, 255, 0.58), transparent 26%),
    linear-gradient(145deg, #ffc5f3 0%, #ff82d8 52%, #e64fbc 100%);
  overflow: hidden;
  text-align: center;
}

.panel-compact-stat::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 24% 14%, rgba(255, 255, 255, 0.42), transparent 24%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0 5px, transparent 5px 11px);
  pointer-events: none;
}

.panel-compact-stat span {
  position: relative;
  z-index: 1;
  font-size: 8px;
}

.panel-compact-stat strong {
  position: relative;
  z-index: 1;
  font-size: 10px;
}

.panel span {
  display: block;
  color: #efe4ff;
  font-family: var(--font-heavy);
  font-size: 14px;
  font-weight: 1000;
  text-shadow: var(--outline-1);
}

.panel strong {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 23px;
  line-height: 1;
}

.panel.panel-compact-stat > .multiplier-label {
  position: relative;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 14px;
}

.panel.panel-compact-stat > .multiplier-label::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  pointer-events: none;
}

.panel.panel-compact-stat strong {
  margin-top: 5px;
  font-size: 16px;
}

.panel.panel-compact-stat > #boost {
  color: #fff;
  -webkit-text-fill-color: #fff;
  -webkit-text-stroke: 0;
  paint-order: normal;
  text-shadow: var(--outline-1);
}

.hud-bottom {
  right: 18px;
  bottom: 28px;
  left: 18px;
}

.stage-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  margin-bottom: 7px;
}

.stage-title-row > .stage-strip {
  grid-column: 2;
  margin-bottom: 0;
}

.streak-multiplier-hud,
.potion-multiplier-hud {
  position: static;
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  transform: translate(var(--multiplier-stack-x, 30px), calc(5px - var(--multiplier-stack-offset, 0px)));
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-family: var(--font-heavy);
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
  paint-order: stroke fill;
  -webkit-text-stroke: 3px #d62020;
  text-shadow: 0 2px 0 #530a05, 0 3px 5px rgba(42, 3, 1, 0.5);
  pointer-events: none;
}

.potion-multiplier-hud.is-speed {
  -webkit-text-stroke-color: #0870cf;
  text-shadow: 0 2px 0 #062860, 0 3px 5px rgba(1, 16, 49, 0.58);
}

.potion-multiplier-hud.is-trophy {
  -webkit-text-stroke-color: #dd8d00;
  text-shadow: 0 2px 0 #6c3300, 0 3px 5px rgba(50, 21, 0, 0.55);
}

.streak-multiplier-hud strong,
.potion-multiplier-hud strong {
  color: #fff;
  font-size: 17px;
  font-weight: 1000;
}

.streak-multiplier-hud img,
.potion-multiplier-hud img {
  width: 25px;
  height: 25px;
  margin-left: -2px;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(17, 5, 10, 0.5));
}

.potion-multiplier-hud.is-trophy img {
  width: 21px;
  height: 21px;
}

html.has-touch-controls .potion-multiplier-hud {
  display: none !important;
}

html.has-touch-controls .streak-multiplier-hud {
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 132px);
  gap: 2px;
  font-size: clamp(11px, 2.2vmin, 16px);
  -webkit-text-stroke-width: 2px;
}

html.has-touch-controls .streak-multiplier-hud strong {
  font-size: clamp(13px, 2.4vmin, 17px);
}

html.has-touch-controls .streak-multiplier-hud img {
  width: clamp(20px, 3.2vmin, 25px);
  height: clamp(20px, 3.2vmin, 25px);
}

/*
 * Desktop HUD groups are authored at their full-size presentation dimensions.
 * Scale them together when the game is embedded in a smaller browser area so
 * their proportions stay intact while their edge anchors remain predictable.
 * Touch layouts have their own purpose-built rules below and in mobile.css.
 */
@media (pointer: fine) {
  html:not(.has-touch-controls) .hud-top {
    transform: scale(var(--game-ui-scale));
    transform-origin: top center;
  }

  html:not(.has-touch-controls) .hud-left {
    scale: var(--game-ui-scale);
    transform-origin: top left;
  }

  html:not(.has-touch-controls) .menu-grid .menu-alert {
    top: -6px;
    right: -6px;
    width: 21px;
    height: 21px;
    border-width: 2px;
  }

  html:not(.has-touch-controls) .hud-right .menu-alert {
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-width: 2px;
  }

  html:not(.has-touch-controls) .hud-right,
  html:not(.has-touch-controls) .leaderboard,
  html:not(.has-touch-controls) .emoji-menu {
    transform: scale(var(--game-ui-scale));
    transform-origin: top right;
  }

  html:not(.has-touch-controls) .hud-bottom {
    transform: scale(var(--game-ui-scale));
    transform-origin: bottom center;
  }

  html:not(.has-touch-controls) .sound-toggle {
    transform: scale(var(--game-ui-scale));
    transform-origin: top left;
  }

  html:not(.has-touch-controls) .loading-player-card {
    transform: scale(var(--game-ui-scale));
    transform-origin: top left;
  }

  html:not(.has-touch-controls) .account-session {
    transform: scale(var(--game-ui-scale));
    transform-origin: top left;
  }

  html:not(.has-touch-controls) .sound-toggle:hover {
    transform: translateY(-1px) scale(var(--game-ui-scale));
  }

  html:not(.has-touch-controls) .sound-toggle:active {
    transform: translateY(2px) scale(var(--game-ui-scale));
  }

  html.is-compact-ui:not(.has-touch-controls) .hud-left {
    top: clamp(112px, 18vh, 150px);
    left: 10px;
  }

  html.is-compact-ui:not(.has-touch-controls) .hud-right {
    top: clamp(164px, 40vh, 292px);
    right: 10px;
  }

  html.is-compact-ui:not(.has-touch-controls) .hud-bottom {
    right: 12px;
    bottom: 14px;
    left: 12px;
  }

  html.is-compact-ui:not(.has-touch-controls) .streak-multiplier-hud,
  html.is-compact-ui:not(.has-touch-controls) .potion-multiplier-hud {
    right: calc(env(safe-area-inset-right, 0px) + 4px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    gap: 2px;
    --multiplier-stack-x: clamp(4px, 2vw, 20px);
    -webkit-text-stroke-width: 2px;
  }

  html.is-compact-ui:not(.has-touch-controls) .leaderboard {
    top: calc(env(safe-area-inset-top, 0px) + 6px);
    right: calc(env(safe-area-inset-right, 0px) + 7px);
  }

  html.is-compact-ui:not(.has-touch-controls) .sound-toggle {
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    left: calc(env(safe-area-inset-left, 0px) + 10px);
  }

  html.is-compact-ui:not(.has-touch-controls) .account-session {
    top: calc(env(safe-area-inset-top, 0px) + 84px);
    left: calc(env(safe-area-inset-left, 0px) + 10px);
  }

  html.is-compact-ui:not(.has-touch-controls) .loading-player-card {
    top: calc(env(safe-area-inset-top, 0px) + 11px);
    left: calc(env(safe-area-inset-left, 0px) + 68px);
  }

  html.is-compact-ui:not(.has-touch-controls) .emoji-menu {
    top: clamp(154px, 38vh, 282px);
    right: calc(env(safe-area-inset-right, 0px) + 84px);
  }
}

@media (max-width: 600px) {
  html.has-touch-controls:not(.is-tablet-device) .account-greeting {
    min-height: 34px;
    padding: 5px 10px 7px;
    border-width: 2px;
    border-radius: 9px;
    font-size: 13px;
  }

  html.has-touch-controls .stage-title-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2px;
  }

  html.has-touch-controls .stage-title-row > .stage-strip {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    box-sizing: border-box;
    width: min(168px, calc(100vw - 44px));
    max-width: 100%;
  }

  html.has-touch-controls .streak-multiplier-hud {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    transform: none;
  }
}

.progress-wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 0;
}

html.is-chromebook:not(.has-touch-controls) .progress-wrap {
  max-width: 680px;
}

.stage-strip {
  display: grid;
  place-items: center;
  position: relative;
  width: min(240px, calc(100vw - 44px));
  margin: 0 auto 7px;
  padding: 5px 11px 7px;
  border: 3px solid #12070f;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--stage-label-top, #ffe1f3) 0%, var(--stage-label-bottom, #ff9ed4) 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 1000;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: 0.5px #050306;
  paint-order: stroke fill;
  text-shadow: var(--bottom-label-outline);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.6),
    0 4px 0 rgba(0, 0, 0, 0.28),
    0 0 14px var(--stage-label-glow, rgba(255, 158, 212, 0.28));
}

.stage-strip[data-mask-stud="1"]::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: var(--stage-title-stud-mask-x, -999px);
  top: 50%;
  width: 9px;
  height: 20px;
  transform: translateY(-48%);
  pointer-events: none;
  background: linear-gradient(180deg, var(--stage-label-top, #ffe1f3) 0%, var(--stage-label-bottom, #ff9ed4) 100%);
}

.progress-label {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 18px 0;
  color: #fff;
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 1000;
  line-height: 1;
  pointer-events: none;
  -webkit-text-stroke: 0.55px #050306;
  paint-order: stroke fill;
  text-shadow: var(--bottom-label-outline);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.progress-label span {
  display: flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}

.hud-outlined-text-canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.hud-smooth-readout {
  position: relative;
  overflow: visible;
}

.hud-smooth-readout .hud-outlined-text-canvas {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  transform-origin: right center;
}

.hud-smooth-readout[data-hud-text-align="left"] .hud-outlined-text-canvas {
  right: auto;
  left: 0;
  transform-origin: left center;
}

.progress-label #level {
  flex: 1 1 40%;
}

.progress-label #speed {
  justify-content: flex-end;
  flex: 1 1 60%;
  text-align: right;
  transform: none;
}

.progress-track {
  position: relative;
  height: 54px;
  overflow: hidden;
  border: 3px solid rgba(8, 7, 10, 0.86);
  border-radius: 12px;
  background: rgba(22, 14, 25, 0.72);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.18),
    0 4px 0 rgba(0, 0, 0, 0.28);
}

.progress-track::after {
  content: none;
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 0%;
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, #35ee62, #ffe95f, #ff932e, #ff4dd2);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.18),
    inset 0 -4px 0 rgba(0, 0, 0, 0.1);
  transition: width 160ms ease;
  transform: translateZ(0);
}

.center-message {
  position: fixed;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  min-width: min(360px, calc(100vw - 32px));
  gap: 5px;
  padding: 18px 20px;
  border: 3px solid #08070a;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 94, 194, 0.92), rgba(87, 39, 138, 0.92));
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.25), 0 8px 0 rgba(0, 0, 0, 0.35);
  animation: center-message-pop 620ms cubic-bezier(0.18, 0.9, 0.22, 1) both;
}

.center-message.hidden {
  display: none;
}

/* Halloween Candy Bucket notices (Friday #582): one plain outlined sentence, no box. */
.candy-bucket-notice {
  position: fixed;
  z-index: 33;
  top: clamp(150px, 27vh, 300px);
  left: 50%;
  width: max-content;
  max-width: calc(100vw - 32px);
  color: #fff;
  font-family: var(--font-heavy);
  font-size: 18px;
  line-height: 1.15;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  -webkit-text-stroke: 4px #a33f00;
  paint-order: stroke fill;
  text-shadow: 0 2px 0 rgba(84, 30, 0, 0.55);
}

.candy-bucket-notice-bang {
  margin-left: -0.26em;
}

.candy-bucket-notice-emoji {
  margin-left: 0.14em;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.candy-bucket-notice.is-showing {
  animation: candy-bucket-notice 4.2s ease-out both;
}

body.is-loading .candy-bucket-notice {
  visibility: hidden;
}

@keyframes candy-bucket-notice {
  0% { opacity: 0; transform: translate(-50%, -8px); }
  8%, 85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

@media (max-width: 700px), (max-height: 500px) {
  .candy-bucket-notice {
    top: clamp(108px, 34vh, 150px);
    font-size: 12px;
    -webkit-text-stroke-width: 3px;
  }
}

/* Portrait phones: the leaderboard fills the top and the button columns start below it, so the notice stays in the gap between them. */
@media (max-width: 700px) and (orientation: portrait) {
  .candy-bucket-notice {
    top: 254px;
    font-size: 12px;
  }
}

.center-message strong {
  color: #ffe85e;
  font-size: 32px;
  font-weight: 1000;
  line-height: 1;
}

.center-message span {
  color: #fff;
  font-size: 16px;
  font-weight: 1000;
  text-shadow: 0 2px 0 #08070a;
}

.mobile-controls {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

.mobile-stick,
.mobile-jump,
.mobile-camera-zone {
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

.mobile-stick {
  position: absolute;
  z-index: 2;
  left: 18px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  width: 112px;
  height: 112px;
  border: 3px solid rgba(7, 5, 12, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, rgba(255, 255, 255, 0.52), transparent 25%),
    rgba(20, 16, 26, 0.42);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.18),
    0 5px 0 rgba(0, 0, 0, 0.24),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

.mobile-stick span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 3px solid #12070f;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.86), transparent 28%),
    linear-gradient(180deg, #fff799, #51ee89);
  box-shadow:
    inset 0 -5px 0 rgba(0, 0, 0, 0.12),
    0 4px 0 rgba(0, 0, 0, 0.34);
  transform: translate(-50%, -50%);
}

.mobile-jump {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 32px);
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 3px solid #12070f;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.85), transparent 28%),
    linear-gradient(180deg, #ff8bd6, #7d58ff);
  overflow: hidden;
  padding: 0;
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.3),
    0 6px 0 rgba(0, 0, 0, 0.34),
    0 12px 24px rgba(0, 0, 0, 0.22);
}

.mobile-jump-icon {
  display: block;
  width: 104%;
  height: 104%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
  transform: translateY(1px);
}

.mobile-camera-zone {
  position: absolute;
  z-index: 1;
  top: 84px;
  right: 0;
  bottom: 136px;
  width: 52vw;
}

@keyframes center-message-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.82);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(28, 8, 35, 0.42);
  backdrop-filter: blur(5px);
  pointer-events: auto;
}

.modal-overlay.hidden {
  display: none;
}

.sounds-modal {
  position: relative;
  box-sizing: border-box;
  width: min(800px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 18px 22px 24px;
  overflow: auto;
  border: 5px solid #180913;
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 227, 192, 0.24), transparent 23%),
    radial-gradient(circle at 8px 8px, rgba(47, 20, 12, 0.2) 0 2px, transparent 2.7px) 0 0 / 22px 22px,
    linear-gradient(160deg, #ad754d 0%, #8b5639 55%, #633622 100%);
  color: #fff;
  font-family: var(--font-heavy);
  text-align: center;
  box-shadow:
    inset 0 6px 0 rgba(255, 255, 255, 0.38),
    inset 0 -8px 0 rgba(109, 58, 26, 0.18),
    0 12px 0 rgba(0, 0, 0, 0.34),
    0 18px 34px rgba(0, 0, 0, 0.28);
}

.sounds-modal::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 0;
  border: 3px solid rgba(74, 38, 20, 0.68);
  border-radius: 16px;
  pointer-events: none;
}

.sounds-close {
  position: absolute;
  top: 11px;
  right: 13px;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 4px 0 0;
  border: 4px solid #180913;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff665e, #c91f20);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 29px;
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.34),
    0 5px 0 rgba(0, 0, 0, 0.32);
}

.sounds-title-box {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: max-content;
  max-width: calc(100% - 104px);
  align-items: center;
  justify-content: center;
  margin: 0 auto 5px;
  padding: 6px 22px 8px;
  border: 4px solid #180913;
  border-radius: 13px;
  background:
    radial-gradient(circle at 26% 14%, rgba(255, 255, 255, 0.55), transparent 25%),
    linear-gradient(145deg, #f0dfc8 0%, #e7cfad 50%, #cfad80 100%);
  color: #fff;
  font-size: clamp(25px, 3.8vw, 34px);
  line-height: 0.92;
  text-shadow: var(--outline-3);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.4),
    0 5px 0 rgba(0, 0, 0, 0.3);
}

.sounds-status {
  position: relative;
  z-index: 2;
  min-height: 28px;
  margin: 6px 54px 10px;
  color: #fff;
  font-size: 23px;
  line-height: 1;
  text-shadow: var(--outline-1);
}

.sounds-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 6px;
  overscroll-behavior: contain;
}

.sound-theme-card {
  --sound-card-top: #ffd8ec;
  --sound-card-mid: #ff8fcb;
  --sound-card-bottom: #d75ac3;
  --sound-card-stripe: rgba(122, 48, 126, 0.12);
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1 / 1;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 1px;
  place-items: center;
  padding: 6px 7px 9px;
  overflow: hidden;
  border: 4px solid #180913;
  border-radius: 16px;
  background:
    radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.72) 0 8%, rgba(255, 255, 255, 0.22) 18%, transparent 29%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 8px, var(--sound-card-stripe) 8px 16px),
    linear-gradient(155deg, var(--sound-card-top) 0%, var(--sound-card-mid) 53%, var(--sound-card-bottom) 100%);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.36),
    inset 0 -4px 0 rgba(55, 25, 75, 0.14),
    0 6px 0 rgba(0, 0, 0, 0.34),
    0 10px 16px rgba(68, 30, 62, 0.18);
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.sound-theme-card::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 0;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  pointer-events: none;
}

.sound-theme-card::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  padding-top: 1px;
  border: 3px solid #180913;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff96d, #ffc832);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  text-shadow: var(--outline-1);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
  top: 4px;
  right: 4px;
  width: 34px;
  height: 34px;
  padding-top: 0;
  border: 0;
  border-radius: 0;
  background: url("../assets/icons/green-checkmark-roblox.453791bfe9.webp") center / contain no-repeat;
  color: transparent;
  font-size: 0;
  text-shadow: none;
  box-shadow: none;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.34));
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 120ms ease, transform 120ms ease;
}

.sound-theme-card:hover {
  filter: saturate(1.08) brightness(1.05);
  transform: translateY(-2px);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.42),
    inset 0 -4px 0 rgba(55, 25, 75, 0.12),
    0 8px 0 rgba(0, 0, 0, 0.32),
    0 12px 18px rgba(68, 30, 62, 0.2);
}

.sound-theme-card:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.32),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 5px 10px rgba(68, 30, 62, 0.16);
}

.sound-theme-card.is-locked {
  cursor: not-allowed;
  filter: saturate(0.82) brightness(0.9);
}

.sound-theme-card.is-locked::before,
.sound-theme-card.is-local-preview::before {
  inset: 0;
  z-index: 3;
  border: 0;
  border-radius: 12px;
  background: rgba(58, 62, 76, 0.28);
}

.sound-theme-card.is-locked:hover,
.sound-theme-card.is-locked:active {
  transform: none;
  filter: saturate(0.82) brightness(0.9);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.36),
    inset 0 -4px 0 rgba(55, 25, 75, 0.14),
    0 6px 0 rgba(0, 0, 0, 0.34),
    0 10px 16px rgba(68, 30, 62, 0.18);
}

.sound-theme-card.is-selected {
  outline: 4px solid #178f3b;
  outline-offset: 0;
  filter: saturate(1.12) brightness(1.04);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.44),
    inset 0 -4px 0 rgba(55, 25, 75, 0.12),
    0 7px 0 rgba(0, 0, 0, 0.34),
    0 0 18px rgba(23, 143, 59, 0.52);
}

.sound-theme-card.is-selected::after {
  opacity: 1;
  transform: scale(1);
}

.sound-theme-card:focus-visible,
.sounds-close:focus-visible {
  outline: 4px solid #fff36a;
  outline-offset: 3px;
}

.sound-theme-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-height: 0;
  place-items: center;
  filter: none;
}

.sound-theme-icon img {
  display: block;
  width: min(100%, 132px);
  height: min(100%, 132px);
  object-fit: contain;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.42));
  pointer-events: none;
}

.sound-theme-lock {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 5;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  pointer-events: none;
}

.sound-theme-lock img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.38));
}

.sound-theme-daily-tag {
  position: absolute;
  top: 1px;
  right: 1px;
  z-index: 6;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2px 4px 1px;
  border: 1.5px solid #180913;
  border-radius: 6px;
  background: linear-gradient(90deg, #ff726a 0%, #ffc84f 25%, #8eee78 47%, #58d9ff 70%, #c66cff 100%);
  color: #fff;
  font-family: var(--font-heavy);
  font-size: clamp(6.5px, 0.78vw, 9px);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: -0.35px;
  white-space: nowrap;
  -webkit-text-stroke: 0.35px #050306;
  text-shadow: 0 2px 0 #180913;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 2px 0 rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

.sound-theme-card.is-locked .sound-theme-daily-tag,
.sound-theme-card.is-local-preview .sound-theme-daily-tag {
  display: inline-flex;
}

.sound-theme-card.is-locked .sound-theme-lock,
.sound-theme-card.is-local-preview .sound-theme-lock {
  top: 1px;
  left: 1px;
  width: 26px;
  height: 26px;
}

.sound-theme-card.is-local-preview.is-selected::after {
  opacity: 0;
  transform: scale(0.6);
}

.sound-theme-card.is-soap .sound-theme-icon,
.sound-theme-card.is-wax .sound-theme-icon {
  transform: translateY(5px) scale(0.9);
}

.sound-theme-card strong {
  position: relative;
  z-index: 2;
  max-width: 100%;
  font-family: var(--font-heavy);
  font-weight: 1000;
  color: #fff;
  font-size: clamp(14px, 1.8vw, 20px);
  line-height: 0.95;
  text-align: center;
  white-space: nowrap;
  -webkit-text-stroke: 0.55px #050306;
  text-shadow: var(--bottom-label-outline);
}

.sound-theme-card.is-bubble-wrap strong {
  font-size: clamp(11px, 1.5vw, 16px);
}

.sound-theme-card.is-water {
  --sound-card-top: #c5f9ff;
  --sound-card-mid: #5ed9ff;
  --sound-card-bottom: #367fe9;
  --sound-card-stripe: rgba(28, 119, 190, 0.13);
}

.sound-theme-card.is-candy {
  --sound-card-top: #ffd5df;
  --sound-card-mid: #ff799d;
  --sound-card-bottom: #ef355f;
  --sound-card-stripe: rgba(181, 33, 77, 0.12);
}

.sound-theme-card.is-snow {
  --sound-card-top: #e9fbff;
  --sound-card-mid: #a9d5ff;
  --sound-card-bottom: #927eea;
  --sound-card-stripe: rgba(87, 101, 202, 0.12);
}

.sound-theme-card.is-asmr {
  --sound-card-top: #ffd2f1;
  --sound-card-mid: #d78aff;
  --sound-card-bottom: #746dec;
  --sound-card-stripe: rgba(104, 55, 176, 0.13);
}

.sound-theme-card.is-horse {
  --sound-card-top: #ffe49b;
  --sound-card-mid: #e79a42;
  --sound-card-bottom: #9b4c25;
  --sound-card-stripe: rgba(118, 58, 25, 0.14);
}

.sound-theme-card.is-slime {
  --sound-card-top: #d7ff8c;
  --sound-card-mid: #72e85f;
  --sound-card-bottom: #1da85b;
  --sound-card-stripe: rgba(20, 126, 66, 0.13);
}

.sound-theme-card.is-bubble-wrap {
  --sound-card-top: #ffd0ed;
  --sound-card-mid: #b58dff;
  --sound-card-bottom: #58a9ef;
  --sound-card-stripe: rgba(86, 76, 183, 0.13);
}

.sound-theme-card.is-soap {
  --sound-card-top: #ffd5ed;
  --sound-card-mid: #f18bca;
  --sound-card-bottom: #a961d7;
  --sound-card-stripe: rgba(142, 58, 151, 0.13);
}

.sound-theme-card.is-wax {
  --sound-card-top: #d8fff4;
  --sound-card-mid: #66e6d3;
  --sound-card-bottom: #2691c2;
  --sound-card-stripe: rgba(30, 121, 145, 0.13);
}

@media (max-width: 620px) {
  .sounds-modal {
    width: min(390px, calc(100vw - 16px));
    max-height: calc(100dvh - 16px);
    padding: 12px 12px 15px;
    border-width: 4px;
    border-radius: 19px;
  }

  .sounds-modal::before {
    inset: 7px;
    border-width: 2px;
    border-radius: 13px;
  }

  .sounds-close {
    top: 7px;
    right: 8px;
    width: 39px;
    height: 39px;
    border-width: 3px;
    border-radius: 10px;
    font-size: 24px;
  }

  .sounds-title-box {
    max-width: calc(100% - 78px);
    padding: 4px 16px 6px;
    border-width: 3px;
    font-size: 25px;
  }

  .sounds-status {
    margin: 4px 38px 8px;
    font-size: 17px;
  }

  .sounds-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 4px;
  }

  .sound-theme-card {
    min-height: 132px;
    border-width: 3px;
    border-radius: 13px;
  }

  .sound-theme-card strong {
    font-size: 15px;
  }

  .sound-theme-card.is-bubble-wrap strong {
    font-size: 12px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .sounds-modal {
    width: min(720px, calc(100vw - 112px));
    max-height: calc(100dvh - 10px);
    padding: 7px 11px 10px;
    border-width: 3px;
    border-radius: 16px;
  }

  .sounds-modal::before {
    inset: 5px;
    border-width: 2px;
    border-radius: 11px;
  }

  .sounds-close {
    top: 5px;
    right: 7px;
    width: 34px;
    height: 34px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 21px;
  }

  .sounds-title-box {
    max-width: calc(100% - 72px);
    margin-bottom: 1px;
    padding: 3px 14px 5px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 21px;
  }

  .sounds-status {
    min-height: 19px;
    margin: 2px 38px 4px;
    font-size: 15px;
  }

  .sounds-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 3px;
  }

  .sound-theme-card {
    height: 104px;
    min-height: 0;
    aspect-ratio: auto;
    padding: 3px 5px 6px;
    border-width: 3px;
    border-radius: 11px;
  }

  .sound-theme-card::before {
    inset: 4px;
    border-width: 1px;
    border-radius: 7px;
  }

  .sound-theme-card::after {
    top: 3px;
    right: 3px;
    width: 21px;
    height: 21px;
    border-width: 2px;
    font-size: 13px;
  }

  .sound-theme-icon img {
    width: min(100%, 82px);
    height: min(100%, 82px);
  }

  .sound-theme-card strong {
    font-size: 12px;
  }

  .sound-theme-card.is-bubble-wrap strong {
    font-size: 9px;
  }
}

#worldPortalOverlay {
  z-index: 88;
}

/* World selection menu (Friday #396): every portal opens this list of worlds. */
.world-portal-modal {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 20px));
  max-height: min(500px, calc(100vh - 20px), calc(100dvh - 20px));
  overflow: hidden;
  border: 3px solid #180913;
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 2px, transparent 2px) 0 0 / 22px 22px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.16) 2px, transparent 2px) 0 0 / 22px 22px,
    linear-gradient(180deg, #ffe0f3 0%, #f7c6ef 55%, #e7b8ff 100%);
  box-shadow:
    inset 0 6px 0 rgba(255, 255, 255, 0.5),
    inset 0 -7px 0 rgba(120, 40, 140, 0.16),
    0 10px 0 rgba(0, 0, 0, 0.34),
    0 18px 34px rgba(0, 0, 0, 0.3);
  color: #fff;
  text-align: center;
}

.world-portal-header {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 6px 50px 8px;
  border-bottom: 3px solid #180913;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.5), transparent 26%),
    repeating-linear-gradient(-18deg, rgba(255, 255, 255, 0.12) 0 8px, transparent 8px 22px),
    linear-gradient(145deg, #ff75c7 0%, #a671ff 52%, #66d9ff 100%);
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.3), 0 4px 0 rgba(24, 9, 19, 0.18);
}

.world-portal-modal h2 {
  margin: 0;
  color: #fff;
  font-family: var(--font-heavy);
  font-size: clamp(19px, 4.6vw, 22px);
  line-height: 1.05;
  white-space: nowrap;
  text-shadow: var(--outline-2);
}

/* Title box that hugs "Select World" (#411), like the Sounds menu's title box. */ .world-portal-title-box{display:inline-flex;box-sizing:border-box;width:max-content;max-width:100%;align-items:center;justify-content:center;gap:6px;padding:3px 8px 3px 14px;border:3px solid #180913;border-radius:12px;background:radial-gradient(circle at 22% 16%,rgba(255,255,255,0.55),transparent 32%),linear-gradient(145deg,#f27ae6 0%,#b77cff 52%,#7ea4ff 100%);box-shadow:inset 0 4px 0 rgba(255,255,255,0.42),0 4px 0 rgba(0,0,0,0.3);transform:translateY(2px)}.world-portal-title-box>span{padding-top:2px}.world-portal-title-icon{flex:none;width:32px;height:32px;margin:-5px 0 -5px;object-fit:contain;pointer-events:none;user-select:none}.world-portal-close{position:absolute;top:50%;right:9px;z-index:2;display:flex;box-sizing:border-box;width:36px;height:36px;align-items:center;justify-content:center;padding:0;border:3px solid #180913;border-radius:12px;background:linear-gradient(145deg,#ff6e9f,#d42166);box-shadow:inset 0 4px 0 rgba(255,255,255,0.34),0 4px 0 rgba(0,0,0,0.3);color:#fff;cursor:pointer;font-family:var(--font-heavy);font-size:20px;line-height:1;text-align:center;text-shadow:var(--outline-2);transform:translateY(-50%)}.world-portal-close:active{transform:translateY(calc(-50% + 3px))}.world-portal-list{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;gap:5px;padding:8px 10px 10px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#ff5fae rgba(255,255,255,0.5);scrollbar-width:thin;-webkit-overflow-scrolling:touch}.world-portal-list::-webkit-scrollbar{width:10px}.world-portal-list::-webkit-scrollbar-track{margin-block:12px;border-radius:999px;background:rgba(255,255,255,0.55)}.world-portal-list::-webkit-scrollbar-thumb{border:2px solid #c22a83;border-radius:999px;background:#ff7cc0}.world-select-row{--world-row-bg:linear-gradient(100deg,#ff6fc2 0%,#ffa6d9 52%,#8fe6ff 100%);position:relative;display:grid;flex:none;grid-template-columns:44px minmax(0,1fr) 112px;align-items:center;gap:7px;min-height:48px;padding:2px 6px 2px 4px;border:3px solid #180913;border-radius:14px;background:radial-gradient(circle at 14% 20%,rgba(255,255,255,0.4),transparent 30%),var(--world-row-bg);box-shadow:inset 0 4px 0 rgba(255,255,255,0.3),inset 0 -5px 0 rgba(0,0,0,0.12),0 4px 0 rgba(0,0,0,0.26);text-align:left}/* Row colours follow each world's lobby floor (#401). */
.world-select-row.is-world-2 { --world-row-bg: linear-gradient(100deg, #0f72d8 0%, #1fb6f2 50%, #6ef0ff 100%); }
.world-select-row.is-world-3 { --world-row-bg: linear-gradient(100deg, #6b2ee0 0%, #a25af8 52%, #e2adff 100%); }
.world-select-row.is-world-4 { --world-row-bg: linear-gradient(100deg, #078f72 0%, #19bf92 48%, #ff9a33 100%); }
.world-select-row.is-world-5 {
  --world-row-bg:
    radial-gradient(circle at 47% 26%, #fff 0 2px, rgba(255, 255, 255, 0.5) 3px, transparent 5px),
    radial-gradient(circle at 56% 72%, #fff 0 2.5px, rgba(255, 255, 255, 0.5) 3.5px, transparent 6px),
    radial-gradient(circle at 64% 34%, #fff8c0 0 1.5px, transparent 4px),
    radial-gradient(circle at 39% 80%, #fff 0 1.5px, transparent 3.5px),
    linear-gradient(100deg, #ff4fa3 0%, #ff8a3d 20%, #ffc93d 36%, #46d67a 54%, #2fa8ff 72%, #9a52ff 100%);
}

.world-select-icon {
  width: 46px;
  height: 46px;
  margin: -3px -1px -3px 0;
  object-fit: contain;
  /* Dark outline traced around the icon, like the game's outlined text. */ --world-icon-outline:drop-shadow(1.5px 0 0 #180913) drop-shadow(-1.5px 0 0 #180913) drop-shadow(0 1.5px 0 #180913) drop-shadow(0 -1.5px 0 #180913) drop-shadow(0 3px 0 rgba(24,9,19,0.38));filter:var(--world-icon-outline);pointer-events:none;user-select:none}.world-select-row[data-status="locked"] .world-select-icon{filter:saturate(0.7) brightness(0.9) var(--world-icon-outline)}.world-select-copy{display:grid;align-content:center;min-width:0;gap:0}.world-select-name{justify-self:start;max-width:100%;padding:1px 4px 3px 3px;color:#fff;font-family:var(--font-heavy);font-size:clamp(15px,3.9vw,17px);line-height:1;white-space:nowrap;text-shadow:var(--outline-2)}.world-select-level{justify-self:start;padding:0 7px 1px;border:2px solid #180913;border-radius:999px;background:rgba(24,9,19,0.38);color:#fff36a;font-family:var(--font-heavy);font-size:11px;line-height:1.1;white-space:nowrap;text-shadow:var(--outline-1)}.world-select-row.is-world-1 .world-select-level{display:none}.world-select-action{position:relative;display:grid;box-sizing:border-box;width:112px;height:34px;padding:0 6px;place-items:center;border:3px solid #180913;border-radius:12px;background:linear-gradient(90deg,rgba(255,255,255,0.14) 2px,transparent 2px) 0 0 / 14px 14px,linear-gradient(0deg,rgba(255,255,255,0.14) 2px,transparent 2px) 0 0 / 14px 14px,linear-gradient(180deg,#82ff76 0%,#22d966 100%);box-shadow:inset 0 4px 0 rgba(255,255,255,0.38),0 4px 0 rgba(0,0,0,0.32);color:#fff;cursor:pointer;font-family:var(--font-heavy);font-size:16px;line-height:1;white-space:nowrap;text-shadow:var(--outline-2);transition:transform 120ms ease,filter 120ms ease}.world-select-action>span{max-width:100%}.world-select-row[data-status="here"] .world-select-action{background:linear-gradient(90deg,rgba(255,255,255,0.16) 2px,transparent 2px) 0 0 / 14px 14px,linear-gradient(0deg,rgba(255,255,255,0.16) 2px,transparent 2px) 0 0 / 14px 14px,linear-gradient(180deg,#8ff4ef 0%,#2bbcc8 100%);font-size:14px;letter-spacing:0.02em;text-shadow:-1.5px -1.5px 0 #050306,0 -1.5px 0 #050306,1.5px -1.5px 0 #050306,-1.5px 0 0 #050306,1.5px 0 0 #050306,-1.5px 1.5px 0 #050306,0 1.5px 0 #050306,1.5px 1.5px 0 #050306}.world-select-row[data-status="locked"] .world-select-action,.world-select-row[data-status="soon"] .world-select-action{background:linear-gradient(90deg,rgba(255,255,255,0.12) 2px,transparent 2px) 0 0 / 14px 14px,linear-gradient(0deg,rgba(255,255,255,0.12) 2px,transparent 2px) 0 0 / 14px 14px,linear-gradient(180deg,#b6c3dd 0%,#7083ab 100%);color:#e9eefb}.world-select-row[data-status="locked"] .world-select-action{background:linear-gradient(90deg,rgba(255,255,255,0.14) 2px,transparent 2px) 0 0 / 14px 14px,linear-gradient(0deg,rgba(255,255,255,0.14) 2px,transparent 2px) 0 0 / 14px 14px,linear-gradient(180deg,#ffb13b 0%,#ff7a0d 100%);box-shadow:inset 0 4px 0 rgba(255,224,160,0.45),0 4px 0 rgba(120,50,0,0.45);color:#fff}.world-select-row[data-status="soon"] .world-select-action{font-size:12px}.world-select-action:disabled{cursor:default}.world-select-row[data-status="open"] .world-select-action:hover{filter:brightness(1.07);transform:translateY(-2px)}.world-select-row[data-status="open"] .world-select-action:active{transform:translateY(3px)}.world-select-row.is-portal-target[data-status="open"] .world-select-action{animation:world-select-pulse 1.1s ease-in-out infinite}@keyframes world-select-pulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.16)}}.world-select-action:focus-visible,.world-portal-close:focus-visible{outline:4px solid #fff36a;outline-offset:3px}/* The menu opens with focus on the portal's own world; its button already pulses, so no yellow ring (#411). */
.world-select-row.is-portal-target .world-select-action:focus-visible {
  outline: none;
}

@media (max-width: 520px) {
  .world-portal-header {
    min-height: 46px;
    padding-inline: 46px;
  }

  .world-portal-close {
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .world-portal-list {
    gap: 5px;
    padding: 7px 8px 9px;
  }

  .world-select-row {
    grid-template-columns: 40px minmax(0, 1fr) 100px;
    gap: 6px;
    min-height: 46px;
    padding: 2px 5px 2px 3px;
    border-radius: 13px;
  }

  .world-select-icon {
    width: 42px;
    height: 42px;
    margin: -2px -1px -2px 0;
  }

  .world-select-name {
    font-size: 14.5px;
  }

  .world-select-level {
    padding: 0 6px;
    font-size: 10px;
  }

  .world-select-action {
    width: 100px;
    height: 32px;
    border-radius: 10px;
    font-size: 14px;
  }

  .world-select-row[data-status="here"] .world-select-action { font-size: 13px; }
  .world-select-row[data-status="soon"] .world-select-action { font-size: 11px; }
}

@media (max-height: 520px) {
  .world-portal-header {
    min-height: 42px;
    padding-block: 4px 5px;
  }

  .world-portal-modal h2 {
    font-size: 18px;
  }

  .world-portal-title-box {
    padding: 2px 7px 2px 12px;
  }

  .world-portal-title-icon {
    width: 27px;
    height: 27px;
  }

  .world-portal-close {
    width: 30px;
    height: 30px;
    font-size: 17px;
  }

  .world-portal-list {
    gap: 4px;
    padding-block: 6px 8px;
  }

  .world-select-row {
    min-height: 42px;
    padding-block: 1px;
  }

  .world-select-icon {
    width: 40px;
    height: 40px;
  }

  .world-select-name {
    font-size: 14.5px;
  }

  .world-select-action {
    height: 30px;
  }
}

#mathQuizOverlay {
  z-index: 86;
}

.rebirth-modal {
  position: relative;
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  padding: clamp(16px, 3vw, 30px);
  border: 5px solid #180913;
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.42), transparent 18%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 38%),
    repeating-linear-gradient(-18deg, rgba(255, 255, 255, 0.1) 0 9px, transparent 9px 24px),
    linear-gradient(160deg, #ff80cd 0%, #a5efff 48%, #8b72ff 100%);
  box-shadow:
    inset 0 6px 0 rgba(255, 255, 255, 0.32),
    inset 0 -8px 0 rgba(48, 10, 92, 0.16),
    0 12px 0 rgba(0, 0, 0, 0.34),
    0 18px 34px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.rebirth-modal::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px solid rgba(24, 9, 19, 0.78);
  border-radius: 17px;
  pointer-events: none;
}

.rebirth-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 1;
  width: 54px;
  height: 54px;
  border: 4px solid #180913;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff6e9f, #d42166);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 34px;
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.34), 0 5px 0 rgba(0, 0, 0, 0.32);
}

.rebirth-close,
.trail-close,
.daily-close,
.math-quiz-close {
  display: grid;
  place-items: center;
  padding: 5px 0 0;
}

.rebirth-kicker {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-top: 6px;
  margin-bottom: 14px;
  padding: 5px 14px 7px;
  border: 3px solid #180913;
  border-radius: 999px;
  background: #ffe968;
  color: #fff;
  font-size: clamp(15px, 2.3vw, 22px);
  line-height: 1;
  text-shadow: none;
}

.rebirth-modal h2 {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 0.5vw, 6px);
  margin: 0 54px 12px;
  color: #fff;
  font-size: clamp(44px, 8vw, 76px);
  line-height: 0.95;
  text-shadow: var(--outline-3);
}

.rebirth-modal h2 span {
  display: block;
}

.rebirth-title-icon {
  width: clamp(72px, 9.2vw, 108px);
  height: clamp(72px, 9.2vw, 108px);
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 0 #050306) drop-shadow(0 0 10px rgba(126, 244, 255, 0.38));
}

.rebirth-level {
  position: relative;
  z-index: 1;
  width: min(330px, 74%);
  margin: 0 auto 16px;
  padding: 12px 14px;
  border: 4px solid #180913;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff59a, #ffcf4e);
  color: #fff;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.42), 0 5px 0 rgba(0, 0, 0, 0.24);
}

.rebirth-multiplier-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(8px, 2vw, 18px);
  margin-bottom: 10px;
}

.rebirth-multiplier-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: clamp(76px, 14vw, 104px);
  place-items: center;
  overflow: hidden;
  padding: 8px;
  border: 4px solid #180913;
  border-radius: 14px;
  background: linear-gradient(180deg, #bdf6ff, #4dc7ff);
  color: #fff;
  font-size: clamp(24px, 4.5vw, 42px);
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.38), 0 5px 0 rgba(0, 0, 0, 0.2);
}

.rebirth-multiplier-card span {
  position: relative;
  z-index: 1;
}

.rebirth-speed-icon {
  position: absolute;
  left: clamp(4px, 1vw, 10px);
  top: 50%;
  width: clamp(60px, 11vw, 94px);
  height: auto;
  opacity: 0.72;
  transform: translateY(-50%) rotate(-7deg);
  filter: drop-shadow(0 3px 0 rgba(5, 3, 6, 0.48));
  pointer-events: none;
}

.rebirth-arrow {
  color: #ffe968;
  font-size: clamp(34px, 5vw, 52px);
  text-shadow: var(--outline-2);
}

.rebirth-modal p {
  position: relative;
  z-index: 1;
  margin: 4px 0 10px;
  color: #fff;
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 1000;
  text-shadow: var(--outline-2);
}

.rebirth-progress {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 58px;
  place-items: center;
  overflow: hidden;
  padding: 8px 14px;
  border: 4px solid #180913;
  border-radius: 12px;
  background: rgba(61, 27, 92, 0.78);
  color: #fff;
  font-size: clamp(24px, 4.2vw, 40px);
  line-height: 1;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.2), 0 4px 0 rgba(0, 0, 0, 0.2);
}

.rebirth-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--rebirth-progress, 0%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0 18%, transparent 19%),
    linear-gradient(90deg, #35e978, #8cff67 62%, #d7ff64);
  box-shadow: inset -4px 0 0 rgba(255, 255, 255, 0.58), inset 0 -7px 0 rgba(23, 142, 66, 0.3);
  transition: width 320ms ease-out;
}

.rebirth-progress span {
  position: relative;
  z-index: 1;
}

.rebirth-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(220px, 420px);
  justify-content: center;
  margin-top: 14px;
}

.rebirth-button {
  min-height: clamp(62px, 10vw, 78px);
  border: 5px solid #180913;
  border-radius: 16px;
  background: linear-gradient(180deg, #7dff84, #22b74d);
  color: #fff;
  cursor: pointer;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1;
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.34), 0 7px 0 rgba(0, 0, 0, 0.35);
}

.rebirth-button.locked {
  filter: grayscale(0.55);
  opacity: 0.72;
}

.rebirth-speed {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: #fff;
  font-size: clamp(20px, 3.5vw, 34px);
  line-height: 1;
}

.trail-modal {
  position: relative;
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  padding: clamp(16px, 3vw, 28px);
  border: 5px solid #180913;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.38), transparent 18%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 6px, transparent 6px 24px),
    linear-gradient(160deg, #ff8bd5 0%, #aa78ff 52%, #68ddff 100%);
  box-shadow:
    inset 0 6px 0 rgba(255, 255, 255, 0.3),
    0 12px 0 rgba(0, 0, 0, 0.34),
    0 18px 34px rgba(0, 0, 0, 0.28);
}

.skin-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1040px, calc(100vw - 28px));
  height: auto;
  max-height: calc(100vh - 28px);
  overflow: hidden;
  padding: clamp(12px, 2.1vw, 20px) clamp(16px, 3vw, 28px) clamp(16px, 3vw, 28px);
  border: 5px solid #180913;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.38), transparent 18%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 6px, transparent 6px 24px),
    linear-gradient(140deg, #82f2ff 0%, #a98bff 50%, #ff92db 100%);
  box-shadow:
    inset 0 6px 0 rgba(255, 255, 255, 0.3),
    0 12px 0 rgba(0, 0, 0, 0.34),
    0 18px 34px rgba(0, 0, 0, 0.28);
}

.revive-offer {
  position: fixed;
  left: 50%;
  top: clamp(112px, 15vh, 132px);
  z-index: 10;
  display: inline-grid;
  grid-template-columns: 28px auto 28px;
  align-items: center;
  gap: 4px;
  min-width: 0;
  width: fit-content;
  max-width: min(280px, calc(100vw - 90px));
  min-height: 38px;
  padding: 5px 8px 6px;
  border: 3px solid #140912;
  border-radius: 10px;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.32), transparent 18%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 7px, transparent 7px 18px),
    linear-gradient(180deg, #31eb5c, #079f2d);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: clamp(14px, 1.85vw, 18px);
  line-height: 1;
  text-align: center;
  text-shadow: var(--outline-2);
  overflow: visible;
  transform: translateX(-50%);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.28),
    0 4px 0 rgba(0, 0, 0, 0.38),
    0 0 10px rgba(74, 255, 103, 0.42),
    0 0 20px rgba(74, 255, 103, 0.18);
  animation: revive-offer-aura 1.65s ease-in-out infinite;
}

.revive-offer::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.34);
  border-radius: 7px;
  pointer-events: none;
}

.revive-offer::after {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border: 2px solid rgba(106, 255, 126, 0.32);
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  animation: revive-offer-ring 1.65s ease-out infinite;
}

.revive-offer strong {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding-inline: 0.06em 0.12em;
  overflow: visible;
  white-space: nowrap;
}

.revive-offer-question {
  display: inline-block;
  min-width: 0.42em;
  margin-left: 0.02em;
  padding-inline: 0 0.04em;
  overflow: visible;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.12em;
  line-height: 1;
  text-shadow: var(--outline-2);
}

.revive-offer-wing {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 auto;
  width: 28px;
  height: 21px;
  background: url("../assets/icons/revive-wing-web.8295a413c6.webp") center / contain no-repeat;
  filter:
    drop-shadow(0 2px 0 #170812)
    drop-shadow(0 0 5px rgba(255, 255, 255, 0.82));
  transform: translateY(-2px);
}

.revive-offer-wing.right {
  transform: translateY(-2px) scaleX(-1);
}

@keyframes revive-offer-aura {
  0%,
  100% {
    transform: translateX(-50%);
    box-shadow:
      inset 0 4px 0 rgba(255, 255, 255, 0.28),
      0 4px 0 rgba(0, 0, 0, 0.38),
      0 0 10px rgba(74, 255, 103, 0.38),
      0 0 18px rgba(74, 255, 103, 0.16);
  }
  50% {
    transform: translateX(-50%);
    box-shadow:
      inset 0 4px 0 rgba(255, 255, 255, 0.34),
      0 4px 0 rgba(0, 0, 0, 0.36),
      0 0 14px rgba(135, 255, 95, 0.5),
      0 0 28px rgba(135, 255, 95, 0.2);
  }
}

@keyframes revive-offer-ring {
  0% {
    opacity: 0.36;
    transform: scale(0.96);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
  }
}

.math-quiz-modal {
  position: relative;
  width: min(620px, calc(100vw - 28px));
  padding: 24px 26px 28px;
  border: 5px solid #170812;
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 255, 255, 0.55), transparent 16%),
    repeating-linear-gradient(-24deg, rgba(255, 255, 255, 0.14) 0 10px, transparent 10px 24px),
    linear-gradient(150deg, #ff72c7 0%, #fff173 48%, #7ff4ff 100%);
  text-align: center;
  box-shadow:
    inset 0 6px 0 rgba(255, 255, 255, 0.36),
    0 12px 0 rgba(0, 0, 0, 0.36),
    0 18px 34px rgba(0, 0, 0, 0.26);
}

.is-hearts-quiz .math-quiz-modal {
  width: min(520px, calc(100vw - 28px));
  padding: 14px 20px 18px;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.48), transparent 15%),
    repeating-linear-gradient(-24deg, rgba(255, 255, 255, 0.13) 0 10px, transparent 10px 24px),
    linear-gradient(150deg, #ff80a4 0%, #ffb1a8 46%, #ffd5ce 100%);
}

.is-hearts-quiz .math-quiz-modal h2 {
  margin-top: 24px;
  margin-bottom: 6px;
  font-size: clamp(34px, 5.4vw, 46px);
}

.math-quiz-modal::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px solid rgba(23, 8, 18, 0.72);
  border-radius: 17px;
  pointer-events: none;
}

.math-quiz-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 1;
  width: 50px;
  height: 50px;
  border: 4px solid #170812;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff6e9f, #d42166);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 31px;
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.34), 0 5px 0 rgba(0, 0, 0, 0.32);
}

.is-hearts-quiz .math-quiz-close {
  display: none;
}

.math-quiz-kicker,
.math-quiz-progress,
.math-quiz-question,
.math-quiz-feedback,
.math-quiz-form button,
.math-quiz-keypad button {
  position: relative;
  z-index: 1;
  font-family: var(--font-heavy);
  text-shadow: var(--outline-2);
}

.math-quiz-kicker {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-top: -8px;
  margin-bottom: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  text-shadow:
    -1px -1px 0 #07162f,
    0 -1px 0 #07162f,
    1px -1px 0 #07162f,
    -1px 0 0 #07162f,
    1px 0 0 #07162f,
    -1px 1px 0 #07162f,
    0 1px 0 #07162f,
    1px 1px 0 #07162f,
    0 2px 0 rgba(7, 22, 47, 0.62);
}

.is-hearts-quiz .math-quiz-kicker {
  margin-top: 3px;
  margin-bottom: 8px;
}

.kicker-time {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 7px;
  min-width: 156px;
  min-height: 28px;
  place-items: center;
  border: 2px solid #07162f;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8fbff, #aeefff 58%, #72d8ff);
  color: #ffffff;
  font-size: 18px;
  text-transform: uppercase;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.58),
    0 2px 0 rgba(7, 22, 47, 0.28);
}

.is-hearts-quiz .kicker-time {
  position: relative;
  min-width: 184px;
  min-height: 28px;
  height: 28px;
  padding: 0 46px 0 14px;
  border: 2px solid #3d0712;
  border-color: #3d0712;
  background: linear-gradient(180deg, #ff8ca7, #f13d67 58%, #bf1238);
  font-size: 18px;
  overflow: visible;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.52),
    0 2px 0 rgba(61, 7, 18, 0.34),
    0 0 12px rgba(255, 42, 80, 0.28);
}

.is-hearts-quiz .math-quiz-progress {
  font-size: 20px;
}

.is-hearts-quiz .math-quiz-question {
  margin: 10px auto 12px;
  padding: 12px 16px 10px;
  font-size: clamp(38px, 7.8vw, 66px);
}

.is-hearts-quiz .math-quiz-answer-field,
.is-hearts-quiz .math-quiz-answer-field input {
  height: 54px;
}

.is-hearts-quiz .math-quiz-form button {
  min-width: 126px;
  font-size: 25px;
}

.is-hearts-quiz .math-quiz-feedback {
  min-height: 24px;
  margin-top: 6px;
}

.is-hearts-quiz .kicker-time span {
  transform: translateY(1px);
}

.kicker-heart-icon {
  position: absolute;
  right: -18px;
  top: 50%;
  display: block;
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgba(23, 8, 18, 0.46));
  transform: translateY(-50%);
}

.math-quiz-modal h2 {
  position: relative;
  z-index: 1;
  margin: 0 44px 10px;
  color: #fff;
  font-size: clamp(38px, 6vw, 52px);
  line-height: 0.95;
  text-shadow: var(--outline-3);
}

.math-quiz-progress {
  color: #fff;
  font-size: 22px;
}

.math-quiz-question {
  margin: 14px auto;
  width: min(430px, 100%);
  padding: 16px 18px 14px;
  border: 4px solid #170812;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #c9fbff);
  color: #fff;
  font-size: clamp(42px, 9vw, 76px);
  line-height: 1;
  -webkit-text-stroke: 0;
  paint-order: stroke fill;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.55), 0 6px 0 rgba(0, 0, 0, 0.24);
}

.math-quiz-question-canvas {
  display: block;
  width: 100%;
  height: auto;
}

.math-quiz-mark {
  display: inline-block;
  transform: translateY(0.03em);
  font-family: var(--font-heavy);
  font-size: 0.95em;
  font-weight: 900;
}

.math-quiz-form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: min(430px, 100%);
  margin: 0 auto;
}

.math-quiz-answer-field {
  position: relative;
  min-width: 0;
  height: 62px;
  overflow: visible;
}

.math-quiz-answer-field::after {
  content: attr(data-value);
  position: absolute;
  inset: -10px 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fff;
  font: 900 36px/1 var(--font-heavy);
  text-align: center;
  text-shadow:
    -2px -2px 0 #170812,
    0 -2px 0 #170812,
    2px -2px 0 #170812,
    -2px 0 0 #170812,
    2px 0 0 #170812,
    -2px 2px 0 #170812,
    0 2px 0 #170812,
    2px 2px 0 #170812,
    0 4px 0 #170812;
  pointer-events: none;
}

.math-quiz-answer-field.is-wrong::after {
  color: #ff4f6f;
}

.math-quiz-answer-field input {
  box-sizing: border-box;
  appearance: textfield;
  -moz-appearance: textfield;
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  height: 62px;
  padding: 0 12px;
  border: 4px solid #170812;
  border-radius: 14px;
  background: #fff;
  color: transparent;
  caret-color: #170812;
  font: 900 32px var(--font-heavy);
  text-align: center;
  text-shadow: none;
  outline: none;
  box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.08);
}

.math-quiz-answer-field input::-webkit-outer-spin-button,
.math-quiz-answer-field input::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.is-samsung-galaxy-tablet .math-quiz-answer-field input:disabled {
  opacity: 1;
  pointer-events: none;
  -webkit-text-fill-color: transparent;
}

.math-quiz-form button {
  min-width: 136px;
  border: 4px solid #170812;
  border-radius: 14px;
  background: linear-gradient(180deg, #8dff74, #29c85d);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.36), 0 5px 0 rgba(0, 0, 0, 0.28);
}

.math-quiz-keypad {
  position: relative;
  z-index: 1;
  display: none;
  width: min(430px, 100%);
  margin: 10px auto 0;
  gap: 8px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.has-touch-controls .math-quiz-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.math-quiz-keypad button {
  min-height: 44px;
  border: 3px solid #170812;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #b9f7ff);
  color: #fff;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.48), 0 4px 0 rgba(0, 0, 0, 0.26);
}

.math-quiz-feedback {
  min-height: 34px;
  margin-top: 10px;
  color: #fff;
  font-size: 22px;
}

.math-quiz-feedback.bad {
  color: #ff4a6b;
}

.math-quiz-feedback.good {
  color: #fff;
}

.math-quiz-dots {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.math-quiz-dots span {
  width: 18px;
  height: 18px;
  border: 3px solid #170812;
  border-radius: 50%;
  background: #fff;
}

.math-quiz-dots span.done {
  background: #56ff75;
}

@media (pointer: coarse) {
  .math-quiz-modal,
  .math-quiz-modal * {
    font-family: var(--font-heavy);
    letter-spacing: 0;
  }

  .math-quiz-answer-field input {
    caret-color: transparent;
  }

  .math-quiz-keypad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(300px, 100%);
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  .math-quiz-modal {
    width: min(360px, calc(100vw - 24px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 22px);
    padding: 16px 16px 18px;
    overflow: hidden;
  }

  .math-quiz-modal::before {
    inset: 8px;
    border-radius: 14px;
  }

  .math-quiz-close {
    top: 8px;
    right: 10px;
    width: 42px;
    height: 42px;
    font-size: 25px;
  }

  .math-quiz-kicker {
    margin-top: -4px;
    margin-bottom: 12px;
  }

  .math-quiz-modal h2 {
    margin: 0 42px 7px;
    font-size: clamp(30px, 9vw, 42px);
  }

  .math-quiz-progress {
    font-size: 18px;
  }

  .math-quiz-question {
    width: min(310px, 100%);
    margin: 10px auto;
    padding: 12px 14px 10px;
    font-size: clamp(38px, 12vw, 58px);
  }

  .math-quiz-form {
    width: min(300px, 100%);
    grid-template-columns: minmax(0, 1fr) minmax(98px, 0.58fr);
    gap: 8px;
  }

  .math-quiz-answer-field,
  .math-quiz-answer-field input {
    height: 48px;
  }

  .math-quiz-answer-field::after {
    inset: -7px 10px;
    font-size: 30px;
  }

  .math-quiz-form button {
    min-width: 0;
    border-width: 3px;
    border-radius: 11px;
    font-size: clamp(18px, 5.4vw, 21px);
  }

  .math-quiz-keypad {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(300px, 100%);
    gap: 6px;
    margin-top: 8px;
  }

  .math-quiz-keypad button {
    min-height: 40px;
    border-width: 3px;
    border-radius: 10px;
    font-size: 22px;
  }

  .math-quiz-keypad button[data-quiz-key="1"],
  .math-quiz-keypad button[data-quiz-key="4"],
  .math-quiz-keypad button[data-quiz-key="7"] {
    grid-column: 1;
  }

  .math-quiz-keypad button[data-quiz-key="2"],
  .math-quiz-keypad button[data-quiz-key="5"],
  .math-quiz-keypad button[data-quiz-key="8"] {
    grid-column: 2;
  }

  .math-quiz-keypad button[data-quiz-key="3"],
  .math-quiz-keypad button[data-quiz-key="6"],
  .math-quiz-keypad button[data-quiz-key="9"] {
    grid-column: 3;
  }

  .math-quiz-keypad button[data-quiz-key="0"] {
    grid-column: 1 / span 2;
  }

  .math-quiz-keypad button[data-quiz-key="back"] {
    grid-column: 3;
    background: linear-gradient(180deg, #ffd4e2, #ff6f9f);
    color: #fff;
    box-shadow:
      inset 0 3px 0 rgba(255, 255, 255, 0.5),
      0 4px 0 rgba(87, 8, 30, 0.38),
      0 0 10px rgba(255, 86, 135, 0.28);
  }

  .math-quiz-feedback {
    min-height: 20px;
    margin-top: 5px;
    font-size: 16px;
  }

  .math-quiz-dots {
    margin-top: 3px;
    gap: 6px;
  }

  .math-quiz-dots span {
    width: 12px;
    height: 12px;
    border-width: 2px;
  }
}

/* Final viewport anchors and modal proportions for landscape phones only. */
@media (orientation: landscape) {
  html.has-touch-controls:not(.is-tablet-device) .mobile-controls {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    margin: 0 !important;
    translate: none !important;
    transform: none !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .mobile-stick {
    position: fixed !important;
    top: auto !important;
    right: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    inset-inline-start: 0 !important;
    margin: 0 !important;
    translate: none !important;
    transform: none !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .mobile-jump {
    position: fixed !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    inset-inline-end: 0 !important;
    margin: 0 !important;
    translate: none !important;
    transform: none !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .sound-toggle {
    left: 92px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-modal h2,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-modal h2 {
    font-size: clamp(18px, 2.7vw, 22px) !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-form button,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-form button {
    font-size: 12px !important;
    text-shadow: var(--outline-1) !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-modal {
    box-sizing: border-box !important;
    width: min(500px, calc(100vw - 132px)) !important;
    max-height: calc(100dvh - 10px) !important;
    padding: 7px 8px 9px !important;
    overflow: hidden !important;
    border-width: 3px !important;
    border-radius: 13px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-close {
    top: 6px !important;
    right: 7px !important;
    width: 32px !important;
    height: 32px !important;
    border-width: 2px !important;
    border-radius: 8px !important;
    font-size: 20px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-modal .daily-title-box {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: max-content !important;
    margin: 0 auto 6px !important;
    padding: 1px 8px 3px 3px !important;
    border-width: 2px !important;
    border-radius: 8px !important;
    font-size: 19px !important;
    translate: none !important;
    transform: none !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-calendar {
    width: 25px !important;
    height: 25px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-calendar img {
    width: 43px !important;
    height: 41px !important;
    transform: translate(-8px, -7px) !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-page-arrow {
    top: auto !important;
    width: 28px !important;
    height: 39px !important;
    padding: 0 !important;
    border-width: 2px !important;
    border-radius: 8px !important;
    font-size: 30px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-page-arrow > span::before {
    width: 17px;
    height: 24px;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-page-arrow.is-left {
    left: auto !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-page-arrow.is-right {
    right: auto !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-rewards-browser {
    grid-template-columns: 28px minmax(0, 1fr) 28px !important;
    column-gap: 3px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-reward-list {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px 4px !important;
    max-height: calc(100dvh - 58px) !important;
    padding: 12px 1px 4px !important;
    overflow: visible !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-card {
    grid-template-rows: 34px minmax(24px, auto) 27px !important;
    row-gap: 3px !important;
    min-height: 104px !important;
    padding: 15px 3px 4px !important;
    border-width: 2px !important;
    border-radius: 8px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-day {
    top: -14px !important;
    min-width: 43px !important;
    padding: 2px 4px 4px !important;
    border-width: 2px !important;
    border-radius: 6px !important;
    font-size: 10px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-duration {
    top: 6px !important;
    right: -3px !important;
    gap: 2px !important;
    padding: 2px 4px 3px !important;
    border-width: 2px !important;
    font-size: 8px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-clock {
    width: 10px !important;
    height: 10px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-icon {
    width: 48px !important;
    height: 34px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-icon img {
    height: 32px !important;
    max-width: 48px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-icon-trail img {
    height: 40px !important;
    max-width: 58px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-icon-treadmill img {
    width: 100% !important;
    height: 100% !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-icon-skin img {
    top: -15px !important;
    width: 68px !important;
    height: 78px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-card strong,
  html.has-touch-controls:not(.is-tablet-device) .daily-card-day-2 strong,
  html.has-touch-controls:not(.is-tablet-device) .daily-card-day-4 strong {
    min-height: 24px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    white-space: normal !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .daily-card button {
    min-height: 27px !important;
    padding: 2px 3px 4px !important;
    border-width: 2px !important;
    border-radius: 6px !important;
    font-size: 9px !important;
  }
}

@media (orientation: portrait) {
  html.has-touch-controls .skin-card[data-skin-card="bunny_runner"] .skin-preview-image {
    height: 72px !important;
    bottom: 0 !important;
  }
}

/*
 * Hard landscape-phone layout. Tablets keep their established tablet cascade;
 * these forced anchors and compact quiz dimensions are only for phones.
 */
@media (orientation: landscape) {
  html.has-touch-controls:not(.is-tablet-device) .hud-left {
    position: fixed !important;
    top: 4px !important;
    right: auto !important;
    left: 0 !important;
    inset-inline-start: 0 !important;
    width: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    grid-template-columns: 44px !important;
    justify-content: start !important;
    justify-items: start !important;
    align-items: start !important;
    gap: 3px !important;
    translate: none !important;
    transform: none !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .hud-left .wins-badge,
  html.has-touch-controls:not(.is-tablet-device) .hud-left .menu-grid,
  html.has-touch-controls:not(.is-tablet-device) .hud-left .icon-button {
    right: auto !important;
    left: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    justify-self: start !important;
    translate: none !important;
    transform: none !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .sound-toggle {
    position: fixed !important;
    top: 4px !important;
    right: auto !important;
    left: 56px !important;
    margin: 0 !important;
    translate: none !important;
    transform: none !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .account-session {
    position: fixed !important;
    top: 56px !important;
    right: auto !important;
    left: 56px !important;
    margin: 0 !important;
    translate: none !important;
    transform: none !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .loading-player-card {
    position: fixed !important;
    top: calc(env(safe-area-inset-top, 0px) + 6px) !important;
    right: auto !important;
    left: calc(env(safe-area-inset-left, 0px) + 110px) !important;
    width: min(216px, calc(100vw - 122px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))) !important;
    margin: 0 !important;
    translate: none !important;
    transform: none !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .stage-question {
    top: calc(env(safe-area-inset-top, 0px) + 54px) !important;
    max-width: min(200px, calc(100vw - 260px)) !important;
    padding: 1px 7px 2px !important;
    border-width: 2px !important;
    font-size: 24px !important;
    line-height: 1 !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .stage-question-canvas {
    width: min(180px, 24vw) !important;
    max-width: 100% !important;
    height: auto !important;
  }

  html.has-touch-controls:not(.is-tablet-device) #mathQuizOverlay {
    padding: 4px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-modal,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-modal {
    box-sizing: border-box !important;
    width: min(520px, calc(100vw - 128px)) !important;
    max-height: calc(100dvh - 8px) !important;
    padding: 6px 12px 7px !important;
    overflow: hidden !important;
    border-width: 3px !important;
    border-radius: 13px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-modal::before {
    inset: 4px !important;
    border-width: 2px !important;
    border-radius: 9px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-close {
    top: 5px !important;
    right: 6px !important;
    width: 30px !important;
    height: 30px !important;
    padding-top: 2px !important;
    border-width: 2px !important;
    border-radius: 7px !important;
    font-size: 19px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-kicker,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-kicker {
    margin: -2px 0 1px !important;
    font-size: 11px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .kicker-time,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .kicker-time {
    min-width: 100px !important;
    min-height: 18px !important;
    height: 18px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-modal h2,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-modal h2 {
    margin: 0 34px 0 !important;
    font-size: clamp(21px, 3.4vw, 28px) !important;
    line-height: 0.92 !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-progress,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-progress {
    font-size: 12px !important;
    line-height: 1 !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-question,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-question {
    box-sizing: border-box !important;
    width: min(330px, 100%) !important;
    margin: 3px auto 4px !important;
    padding: 5px 8px 4px !important;
    border-width: 3px !important;
    border-radius: 9px !important;
    font-size: clamp(29px, 4.8vw, 42px) !important;
    line-height: 1 !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-form {
    width: min(330px, 100%) !important;
    grid-template-columns: minmax(0, 1fr) 78px !important;
    gap: 5px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-answer-field,
  html.has-touch-controls:not(.is-tablet-device) .math-quiz-answer-field input,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-answer-field,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-answer-field input {
    height: 32px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-answer-field input {
    border-width: 2px !important;
    border-radius: 8px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-answer-field::after {
    inset: -4px 6px !important;
    font-size: 20px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-form button,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-form button {
    min-width: 0 !important;
    border-width: 2px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-keypad {
    width: min(300px, 100%) !important;
    gap: 4px !important;
    margin-top: 5px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-keypad button {
    min-height: 28px !important;
    padding: 1px 4px !important;
    border-width: 2px !important;
    border-radius: 7px !important;
    font-size: 16px !important;
    line-height: 1 !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-feedback {
    min-height: 11px !important;
    margin-top: 2px !important;
    font-size: 11px !important;
    line-height: 1 !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-dots {
    gap: 4px !important;
    margin-top: 1px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-dots span {
    width: 8px !important;
    height: 8px !important;
    border-width: 1px !important;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .math-quiz-modal {
    width: min(620px, calc(100vw - 144px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 12px);
    padding: 10px 18px 12px;
    border-width: 3px;
    border-radius: 14px;
    overflow: hidden;
  }

  .is-hearts-quiz .math-quiz-modal {
    width: min(640px, calc(100vw - 144px));
    padding: 10px 18px 12px;
  }

  .math-quiz-modal::before {
    inset: 5px;
    border-width: 2px;
    border-radius: 10px;
  }

  .math-quiz-close {
    top: 6px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-width: 3px;
    border-radius: 8px;
    font-size: 21px;
  }

  .math-quiz-kicker {
    margin-top: -2px;
    margin-bottom: 3px;
    font-size: 12px;
  }

  .kicker-time {
    min-width: 112px;
    min-height: 21px;
    font-size: 12px;
  }

  .math-quiz-modal h2,
  .is-hearts-quiz .math-quiz-modal h2 {
    margin: 0 36px 2px;
    font-size: clamp(22px, 4.1vw, 31px);
  }

  .math-quiz-progress,
  .is-hearts-quiz .math-quiz-progress {
    font-size: 13px;
  }

  .math-quiz-question,
  .is-hearts-quiz .math-quiz-question {
    width: min(410px, 100%);
    margin: 4px auto 5px;
    padding: 9px 10px 7px;
    border-width: 3px;
    border-radius: 10px;
    font-size: clamp(34px, 5.8vw, 54px);
    -webkit-text-stroke-width: 0;
    text-shadow: var(--outline-2);
  }

  .math-quiz-form {
    width: min(410px, 100%);
    grid-template-columns: 1fr auto;
    gap: 6px;
  }

  .math-quiz-answer-field,
  .math-quiz-answer-field input,
  .is-hearts-quiz .math-quiz-answer-field,
  .is-hearts-quiz .math-quiz-answer-field input {
    height: 36px;
  }

  .math-quiz-answer-field input {
    border-width: 3px;
    border-radius: 9px;
  }

  .math-quiz-answer-field::after {
    inset: -5px 8px;
    font-size: 23px;
    text-shadow: var(--outline-1);
  }

  .math-quiz-form button,
  .is-hearts-quiz .math-quiz-form button {
    min-width: 88px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 17px;
  }

  .math-quiz-keypad {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(360px, 100%);
    gap: 7px;
    margin-top: 8px;
  }

  .math-quiz-keypad button {
    min-height: 36px;
    border-width: 2px;
    border-radius: 7px;
    font-size: 18px;
    text-shadow: var(--outline-1);
  }

  .math-quiz-keypad button[data-quiz-key="1"],
  .math-quiz-keypad button[data-quiz-key="4"],
  .math-quiz-keypad button[data-quiz-key="7"] {
    grid-column: 1;
  }

  .math-quiz-keypad button[data-quiz-key="2"],
  .math-quiz-keypad button[data-quiz-key="5"],
  .math-quiz-keypad button[data-quiz-key="8"] {
    grid-column: 2;
  }

  .math-quiz-keypad button[data-quiz-key="3"],
  .math-quiz-keypad button[data-quiz-key="6"],
  .math-quiz-keypad button[data-quiz-key="9"] {
    grid-column: 3;
  }

  .math-quiz-keypad button[data-quiz-key="0"] {
    grid-column: 1 / span 2;
  }

  .math-quiz-keypad button[data-quiz-key="back"] {
    grid-column: 3;
    background: linear-gradient(180deg, #ffd4e2, #ff6f9f);
    color: #fff;
    box-shadow:
      inset 0 3px 0 rgba(255, 255, 255, 0.5),
      0 4px 0 rgba(87, 8, 30, 0.38),
      0 0 10px rgba(255, 86, 135, 0.28);
  }

  .math-quiz-feedback,
  .is-hearts-quiz .math-quiz-feedback {
    min-height: 15px;
    margin-top: 2px;
    font-size: 12px;
  }

  .math-quiz-dots {
    margin-top: 2px;
    gap: 5px;
  }

  .math-quiz-dots span {
    width: 8px;
    height: 8px;
    border-width: 2px;
  }
}

.quiz-confetti {
  position: fixed;
  z-index: 120;
  width: var(--confetti-w, 20px);
  height: var(--confetti-h, 34px);
  border: 2px solid rgba(23, 8, 18, 0.42);
  border-radius: 4px;
  pointer-events: none;
  will-change: transform, opacity;
  animation: quiz-confetti-burst var(--confetti-duration, 1900ms) cubic-bezier(0.16, 0.72, 0.24, 1) var(--confetti-delay, 0ms) forwards;
}

@keyframes quiz-confetti-burst {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg) scale(0.62);
  }
  12% {
    opacity: 1;
    transform: translate(var(--confetti-pop-x), var(--confetti-pop-y)) rotate(var(--confetti-pop-rot)) scale(var(--confetti-scale, 1));
  }
  64% {
    opacity: 1;
    transform: translate(var(--confetti-float-x), var(--confetti-float-y)) rotate(var(--confetti-mid-rot)) scale(var(--confetti-scale, 1));
  }
  100% {
    opacity: 0;
    transform: translate(var(--confetti-x), var(--confetti-y)) rotate(var(--confetti-rot)) scale(0.72);
  }
}

/* Keep the main HUD type stable while the browser or game viewport is resized. */
.speed-title,
.hearts-title {
  width: 260px;
  font-size: 38px;
}

.hearts-title {
  width: 178px;
  font-size: 36px;
}

.speed-title-copy strong,
.hearts-title .speed-title-copy strong {
  font-size: 31px;
}

#topSpeedValue {
  top: 4px;
}

.hearts-title .speed-title-copy strong {
  left: 50%;
  top: 6px;
  font-size: 31px;
  transform: translateX(-50%);
}

.is-windows-pc .hearts-title .speed-title-copy strong {
  top: 2px;
}

.speed-title-copy span,
.hearts-title .speed-title-copy span {
  font-size: 18px;
}

@media (pointer: coarse) {
  .speed-title {
    width: 172px;
    font-size: 26px;
  }

  .hearts-title {
    width: 112px;
    height: 36px;
    min-height: 36px;
    font-size: 23px;
  }

  .speed-title-copy strong {
    top: 6px;
    font-size: 22px;
  }

  .hearts-title .speed-title-copy strong {
    left: 54%;
    top: 7px;
    font-size: 20px;
  }

  .speed-title-copy span {
    top: 23px;
    font-size: 10px;
  }

  .hearts-title .speed-title-copy span {
    top: 24px;
    font-size: 9px;
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  .speed-title {
    width: min(162px, calc(100vw - 207px));
    font-size: 25px;
  }

  .hearts-title {
    width: 112px;
    font-size: 23px;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .speed-title {
    width: 190px;
    font-size: 26px;
  }

  .hearts-title {
    width: 118px;
    font-size: 23px;
  }
}

.trail-modal::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px solid rgba(24, 9, 19, 0.76);
  border-radius: 17px;
  pointer-events: none;
}

.trail-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 54px;
  height: 54px;
  border: 4px solid #180913;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff6e9f, #d42166);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 34px;
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.34), 0 5px 0 rgba(0, 0, 0, 0.32);
}

.trail-balance,
.trail-shop-header,
.trail-modal h2,
.trail-scroll-wrap,
.trail-card {
  position: relative;
  z-index: 1;
}

.trail-shop-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 26px);
  min-height: 92px;
  margin: 6px 70px 10px;
}

.trail-modal h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(44px, 8vw, 76px);
  line-height: 0.95;
  text-align: center;
  text-shadow: var(--outline-3);
}

.trail-balance {
  position: absolute;
  left: -48px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 12px;
  border: 4px solid #180913;
  border-radius: 12px;
  background: rgba(65, 29, 94, 0.72);
  color: #fff;
  font-size: clamp(22px, 3.6vw, 34px);
  line-height: 1;
  text-shadow: var(--outline-2);
  transform: translateY(-50%);
}

@media (pointer: coarse) and (orientation: portrait) and (max-width: 520px) {
  .loading-screen-art {
    padding: 2px;
    border-radius: 11px;
  }

  .loading-screen-image {
    border-width: 2px;
    border-radius: 7px;
  }

  .loading-progress {
    bottom: 7px;
    width: calc(100% - 48px);
  }

  .loading-progress-bar {
    height: 36px;
  }

  .loading-progress-copy {
    gap: 10px;
    padding: 0 11px;
    font-size: clamp(14px, 4.4vw, 18px);
  }
}

@media (hover: hover) and (pointer: fine) {
  .trail-balance {
    left: -64px;
    gap: 6px;
    padding-right: 7px;
    padding-left: 7px;
  }
}

.trophy-inline-icon {
  width: 42px;
  height: 42px;
}

.trail-scroll-wrap {
  display: grid;
  grid-template-columns: 1fr 20px;
  gap: 8px;
  align-items: stretch;
}

.trail-list {
  position: relative;
  display: grid;
  max-height: min(52vh, 430px);
  gap: 12px;
  overflow-y: auto;
  padding: 2px 4px 4px 0;
  cursor: grab;
  scrollbar-width: none;
  touch-action: pan-x;
  user-select: none;
}

.trail-list::-webkit-scrollbar {
  display: none;
}

.trail-list.is-dragging {
  cursor: grabbing;
}

.trail-scrollbar {
  position: relative;
  min-height: 100%;
  border: 4px solid #180913;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 40%),
    linear-gradient(180deg, #7432ab, #4a206b);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.26),
    inset 0 -4px 0 rgba(0, 0, 0, 0.18),
    3px 0 0 rgba(0, 0, 0, 0.24);
  cursor: pointer;
  pointer-events: auto;
}

.trail-scrollbar span {
  position: absolute;
  top: -4px;
  right: -4px;
  left: -4px;
  min-height: 54px;
  border: 4px solid #180913;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.52), transparent 42%),
    linear-gradient(180deg, #fff478 0%, #ffb52e 52%, #ff65b7 100%);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.42),
    0 2px 0 rgba(0, 0, 0, 0.22);
  cursor: grab;
  will-change: transform, height;
}

.trail-scrollbar span:hover,
.trail-scrollbar.is-dragging span {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.6), transparent 42%),
    linear-gradient(180deg, #fff9a6 0%, #ffc540 52%, #ff7ac5 100%);
}

.trail-scrollbar.is-dragging span {
  cursor: grabbing;
}

.trail-card {
  display: grid;
  grid-template-columns: max-content 1fr minmax(138px, 170px);
  align-items: center;
  gap: 14px;
  min-height: 118px;
  padding: 12px;
  border: 4px solid #180913;
  border-radius: 16px;
  background-color: var(--trail-dark);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--trail-color), white 12%), color-mix(in srgb, var(--trail-dark), black 4%));
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.26), 0 6px 0 rgba(0, 0, 0, 0.26);
}

.trail-preview {
  position: relative;
  height: 88px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.trail-preview.has-icon::before,
.trail-preview.has-icon span {
  display: none;
}

.trail-preview.has-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.trail-preview.has-icon {
  width: auto;
  aspect-ratio: 1;
  justify-self: start;
}

.trail-preview::before,
.trail-preview span {
  content: "";
  position: absolute;
  inset: 12px 6px;
  border: 12px solid var(--trail-color);
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-18deg);
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.24));
}

.trail-preview span {
  inset: 30px 24px;
  border-width: 7px;
  opacity: 0.72;
}

.trail-card.trail-style-rainbow {
  background:
    linear-gradient(120deg, #ff4f70 0%, #ffad32 18%, #f8df3d 34%, #35d97b 50%, #35bfff 68%, #7759ff 84%, #f653d1 100%);
}

.trail-style-rainbow .trail-preview {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.48);
}

.trail-style-rainbow .trail-preview::before {
  border-top-color: #ffed4d;
  border-left-color: #42e37f;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.2)) drop-shadow(0 0 8px #fff);
}

.trail-style-rainbow .trail-preview span {
  border-top-color: #ff54ca;
  border-left-color: #43c7ff;
}

.trail-card.trail-style-candy {
  background: linear-gradient(135deg, #ff68d4 0%, #9d55f4 48%, #43dff2 100%);
}

.trail-style-candy .trail-preview {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.62), rgba(255, 102, 213, 0.2) 40%, rgba(77, 220, 255, 0.25) 72%);
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.5), 0 0 16px rgba(255, 236, 119, 0.55);
}

.trail-style-candy .trail-preview::before {
  inset: 5px 17px;
  border: 0;
  border-radius: 0;
  background: conic-gradient(from 12deg, #ff5fd2, #ffe66e, #62e8ff, #a56cff, #ff5fd2);
  clip-path: polygon(50% 0%, 59% 34%, 82% 8%, 70% 40%, 100% 34%, 73% 52%, 96% 70%, 64% 64%, 70% 100%, 50% 70%, 30% 100%, 36% 64%, 4% 70%, 27% 52%, 0% 34%, 30% 40%, 18% 8%, 41% 34%);
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.2)) drop-shadow(0 0 8px #fff);
  transform: rotate(-8deg);
}

.trail-style-candy .trail-preview span {
  inset: 30px 31px;
  border: 7px solid #fff;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 22%, #ff8bdd 34%, #67e9ff 68%, transparent 72%);
  filter: drop-shadow(0 0 7px #fff);
  transform: none;
}

.trail-copy strong,
.trail-copy span,
.trail-buy {
  font-family: var(--font-heavy);
  text-shadow: var(--outline-2);
}

.trail-copy {
  display: grid;
  gap: 8px;
  color: #fff;
}

.trail-copy strong {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 0.95;
}

.trail-copy span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(17px, 2.6vw, 25px);
  line-height: 1;
}

.trail-shoe {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter:
    hue-rotate(118deg)
    saturate(2.2)
    brightness(1.04)
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.42));
  transform: rotate(-12deg);
}

.trail-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 68px;
  border: 4px solid #180913;
  border-radius: 13px;
  background: linear-gradient(180deg, #fff478, #ffb52e);
  color: #fff;
  cursor: pointer;
  font-size: clamp(18px, 2.6vw, 27px);
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.38), 0 5px 0 rgba(0, 0, 0, 0.25);
}

.trail-buy span {
  text-shadow: none;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}

.trail-buy:disabled {
  cursor: default;
  filter: grayscale(0.25);
  opacity: 0.78;
}

.trail-buy.equipped {
  background: linear-gradient(180deg, #91f4ff, #2f9dff);
}

.skin-modal::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px solid rgba(24, 9, 19, 0.76);
  border-radius: 17px;
  pointer-events: none;
}

.skin-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 54px;
  height: 54px;
  border: 4px solid #180913;
  border-radius: 12px;
  background: linear-gradient(145deg, #ff6e9f, #d42166);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 34px;
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.34), 0 5px 0 rgba(0, 0, 0, 0.32);
}

.skin-shop-header,
.skin-card-shell {
  position: relative;
  z-index: 1;
}

.skin-shop-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  margin: 0 64px 4px;
}

.skin-modal h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(44px, 8vw, 76px);
  line-height: 0.95;
  text-align: center;
  text-shadow: var(--outline-3);
}

.skin-balance {
  position: absolute;
  left: 0;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 12px;
  border: 3px solid rgba(24, 9, 19, 0.78);
  border-radius: 11px;
  background: rgba(65, 29, 94, 0.72);
  color: #fff;
  font-size: clamp(20px, 3.2vw, 30px);
  line-height: 1;
  text-shadow: var(--outline-2);
  transform: translateY(-50%);
}

.skin-balance .trophy-inline-icon {
  width: 32px;
  height: 32px;
}

.skin-reset-timer {
  position: absolute;
  top: 50%;
  right: 0;
  display: grid;
  grid-template-columns: 44px auto;
  grid-template-areas:
    "icon label"
    "icon timer";
  align-items: center;
  justify-items: start;
  column-gap: 4px;
  row-gap: 6px;
  padding: 3px 6px 4px 2px;
  border: 2px solid rgba(24, 9, 19, 0.8);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%),
    rgba(48, 35, 137, 0.78);
  color: #fff;
  line-height: 1;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    0 3px 0 rgba(0, 0, 0, 0.25);
  transform: translateY(-50%);
}

.skin-reset-timer > span {
  grid-area: icon;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  line-height: 1;
  text-shadow: none;
  filter:
    drop-shadow(-1px 0 0 rgba(0, 0, 0, 0.85))
    drop-shadow(1px 0 0 rgba(0, 0, 0, 0.85))
    drop-shadow(0 -1px 0 rgba(0, 0, 0, 0.85))
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.85))
    drop-shadow(0 2px 0 rgba(0, 0, 0, 0.32));
}

.skin-reset-timer > span img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.skin-reset-timer em {
  grid-area: label;
  color: #ffc8ee;
  font-size: clamp(14px, 1.85vw, 21px);
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.92),
    -1px -1px 0 rgba(0, 0, 0, 0.92),
    1px -1px 0 rgba(0, 0, 0, 0.92),
    -1px 1px 0 rgba(0, 0, 0, 0.92),
    1px 1px 0 rgba(0, 0, 0, 0.92),
    -2px 0 0 rgba(0, 0, 0, 0.82),
    2px 0 0 rgba(0, 0, 0, 0.82),
    0 -2px 0 rgba(0, 0, 0, 0.82),
    0 2px 0 rgba(0, 0, 0, 0.82);
}

.skin-reset-timer strong {
  grid-area: timer;
  justify-self: start;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #fff;
  font-size: clamp(15px, 2.15vw, 22px);
  line-height: 0.9;
  text-shadow: var(--outline-2);
  white-space: nowrap;
}

.skin-reset-time-rest {
  margin-left: 0;
}

.skin-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-rows: 110px;
  gap: 14px;
  flex: 0 0 auto;
  max-width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
  padding: 8px 8px 10px;
  cursor: default;
  scrollbar-width: none;
  touch-action: manipulation;
  user-select: none;
}

.skin-list::-webkit-scrollbar {
  display: none;
}

.skin-list.is-dragging {
  cursor: default;
}

.skin-scrollbar {
  display: none;
}

.skin-card-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-row: span 2;
  min-height: 0;
  border-radius: 16px;
}

.skin-overlay-active .skin-card-shell .glowing-wrapper {
  z-index: 0;
  overflow: visible;
}

.skin-overlay-active .skin-card-shell .glowing-wrapper,
.skin-overlay-active .skin-card-shell .glowing-container,
.skin-overlay-active .skin-card-shell .glowing-container--blur-wrapper,
.skin-overlay-active .skin-card-shell .glowing-border,
.skin-overlay-active .skin-card-shell .glowing-border::after {
  border-radius: 18px;
}

.skin-card {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto 46px;
  gap: 5px;
  min-height: 0;
  height: 100%;
  padding: 10px;
  border: 0;
  border-radius: 16px;
  background-color: var(--skin-dark);
  background:
    radial-gradient(circle at 32% 14%, rgba(255, 255, 255, 0.58), transparent 18%),
    linear-gradient(180deg, color-mix(in srgb, var(--skin-pop, var(--skin-color)), white 14%) 0%, color-mix(in srgb, var(--skin-pop, var(--skin-color)), var(--skin-dark) 22%) 48%, color-mix(in srgb, var(--skin-dark), black 8%) 100%);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.26),
    inset 0 0 0 2px rgba(255, 255, 255, 0.2),
    0 6px 0 rgba(0, 0, 0, 0.22),
    0 0 18px color-mix(in srgb, var(--skin-color), transparent 48%);
  overflow: hidden;
}

.skin-card::before,
.skin-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.skin-card::before {
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, 0.2), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 6px, transparent 6px 24px);
}

.skin-card::after {
  z-index: 0;
  left: 0;
  right: 0;
  bottom: 54px;
  height: 78px;
  background: linear-gradient(180deg, transparent, rgba(24, 9, 19, 0.5));
}

.skin-card > * {
  position: relative;
  z-index: 1;
}

.skin-card-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  min-width: 58px;
  padding: 6px 10px 5px;
  border: 3px solid #180913;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff9fdf, #ff4ab5);
  color: #fff;
  font-family: var(--font-heavy);
  font-size: 17px;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  -webkit-text-stroke: 0;
  paint-order: normal;
  text-shadow:
    -2px 0 0 #180913,
    2px 0 0 #180913,
    0 -2px 0 #180913,
    0 2px 0 #180913,
    -2px -2px 0 #180913,
    2px -2px 0 #180913,
    -2px 2px 0 #180913,
    2px 2px 0 #180913,
    0 3px 0 #180913,
    0 5px 0 rgba(24, 9, 19, 0.44);
  transform: rotate(-4deg);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.6),
    0 3px 0 rgba(0, 0, 0, 0.28),
    0 0 12px rgba(255, 74, 181, 0.52);
}

.skin-card-badge.is-daily {
  background: linear-gradient(180deg, #fff070, #ffb52e);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.6),
    0 3px 0 rgba(0, 0, 0, 0.28),
    0 0 12px rgba(255, 181, 46, 0.52);
}

.skin-card-shell.is-wide {
  grid-column: 3 / span 2;
  grid-row: 3 / span 2;
}

.skin-card-shell.is-tall {
  grid-row: span 4;
}

.skin-card-style-0 {
  --skin-pop: color-mix(in srgb, var(--skin-color), #27e5ff 18%);
}

.skin-card-style-1 {
  --skin-pop: color-mix(in srgb, var(--skin-color), #ff6fd1 18%);
}

.skin-card-style-2 {
  --skin-pop: color-mix(in srgb, var(--skin-color), #ffe14d 24%);
}

.skin-card-style-3 {
  --skin-pop: color-mix(in srgb, var(--skin-color), #62ff9d 20%);
}

.skin-card-style-4 {
  --skin-pop: color-mix(in srgb, var(--skin-color), #8a6bff 18%);
}

.skin-card-style-5 {
  --skin-pop: color-mix(in srgb, var(--skin-color), #ff7759 22%);
}

.skin-card[data-skin-card="skater_cap"] {
  background-color: #ff58c8;
  background:
    radial-gradient(circle at 30% 14%, rgba(255, 255, 255, 0.68), transparent 18%),
    linear-gradient(135deg, #ff4fb8 0%, #ffcf3f 22%, #63f56d 42%, #45d8ff 62%, #8b5cff 82%, #ff58c8 100%);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.32),
    inset 0 0 0 2px rgba(255, 255, 255, 0.24),
    0 6px 0 rgba(0, 0, 0, 0.22),
    0 0 20px rgba(255, 88, 200, 0.55),
    0 0 30px rgba(69, 216, 255, 0.36);
}

.skin-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  margin: -6px -6px 0;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.68), transparent 28%),
    radial-gradient(circle at 50% 82%, rgba(24, 9, 19, 0.22), transparent 42%),
    rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.skin-card.has-skin-image {
  grid-template-rows: minmax(0, 1fr) auto 46px;
}

.skin-card.has-skin-image .skin-preview {
  margin: -6px -6px 0;
  border-radius: 14px 14px 10px 10px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.72), transparent 26%),
    radial-gradient(circle at 50% 82%, rgba(24, 9, 19, 0.24), transparent 44%),
    rgba(255, 255, 255, 0.14);
}

.skin-preview-image {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: block;
  width: auto;
  height: 176px;
  max-width: none;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 7px 0 rgba(0, 0, 0, 0.18));
  transform: translateX(-50%);
}

.skin-card[data-skin-card="bunny_runner"] .skin-preview-image {
  height: 150px;
  bottom: -6px;
}

.skin-card[data-skin-card="default"] .skin-preview-image {
  height: 264px;
  bottom: -108px;
}

.skin-card[data-skin-card="street_runner"] .skin-preview-image {
  height: 158px;
  bottom: -4px;
}

/* The Halloween cards (all but the tall Haunted Knight and the retired Monster Buddy) are framed like Party Guy in every layout (#588: "the skins images should be the same as the original skin images"). */
.skin-card[data-skin-card="pumpkin_kid"] .skin-preview-image,
.skin-card[data-skin-card="bat_boy"] .skin-preview-image,
.skin-card[data-skin-card="black_cat"] .skin-preview-image,
.skin-card[data-skin-card="friendly_ghost"] .skin-preview-image,
.skin-card[data-skin-card="witchy_wendy"] .skin-preview-image,
.skin-card[data-skin-card="night_magician"] .skin-preview-image,
.skin-card[data-skin-card="candy_collector"] .skin-preview-image,
.skin-card[data-skin-card="skater_cap"] .skin-preview-image {
  height: 246px;
  bottom: -92px;
}

.skin-card[data-skin-card="pirate"] .skin-preview-image {
  height: 262px;
  bottom: -104px;
}

/* Candy Collector's wide card has its own landscape picture (#596,Matthijs:"candy collector has a wide box, please try to use that better in his pose"). It shows only while the card is really wide (desktop bento);the layouts that turn the wide card into a normal one keep the portrait picture. */ .skin-card-shell.is-wide .skin-card{container-type:inline-size}.skin-preview .skin-preview-image-wide{display:none}@container (min-width:340px){.skin-preview .skin-preview-image-narrow{display:none}.skin-preview .skin-preview-image-wide{display:block;height:330px;bottom:-176px}}.skin-card[data-skin-card="pirate"] .skin-preview{background:radial-gradient(circle at 50% 18%,rgba(255,242,136,0.72),transparent 27%),radial-gradient(circle at 50% 82%,rgba(213,28,37,0.34),transparent 44%),linear-gradient(180deg,rgba(255,72,64,0.34),rgba(232,29,38,0.28))}.skin-card[data-skin-card="winter_hero"] .skin-preview-image{top:50%;bottom:auto;width:84%;height:auto;transform:translate(-50%,-50%)}.skin-model-preview{display:block;width:100%;height:100%;min-height:0;pointer-events:none}.skin-card.has-skin-image .skin-copy{position:relative;margin-top:0}.skin-card-shell.is-tall .skin-preview-image{height:360px}.skin-figure{position:relative;width:48px;height:80px;border:5px solid #180913;border-radius:22px 22px 16px 16px;background:linear-gradient(180deg,var(--skin-color),var(--skin-dark));box-shadow:0 0 0 8px rgba(255,255,255,0.16),0 6px 0 rgba(0,0,0,0.24)}.skin-figure::before,.skin-figure::after{content:"";position:absolute;background:#180913}.skin-figure::before{top:-30px;left:50%;width:46px;height:42px;border:5px solid #180913;border-radius:50%;background:color-mix(in srgb,var(--skin-color),white 28%);transform:translateX(-50%)}.skin-figure::after{right:-22px;bottom:18px;width:14px;height:48px;border-radius:12px;box-shadow:-76px 0 0 #180913,-51px 43px 0 -1px #180913,-22px 43px 0 -1px #180913;transform:rotate(-11deg)}.skin-copy strong,.skin-copy span,.skin-buy{font-family:var(--font-heavy);text-shadow:var(--outline-2)}.skin-copy{display:grid;align-content:end;justify-items:center;gap:4px;color:#fff;min-height:0;text-align:center}.skin-copy strong{font-size:clamp(18px,1.8vw,24px);line-height:0.95;text-align:center}.skin-copy span{font-size:clamp(16px,2.2vw,22px);line-height:1}.skin-buy{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin-top:5px;min-height:46px;border:4px solid #180913;border-radius:13px;background:linear-gradient(180deg,#fff478,#ffb52e);color:#fff;cursor:pointer;font-size:clamp(15px,1.55vw,20px);line-height:1;white-space:nowrap;box-shadow:inset 0 5px 0 rgba(255,255,255,0.38),0 5px 0 rgba(0,0,0,0.25)}.skin-buy .trophy-inline-icon{width:28px;height:28px}.skin-buy:disabled{cursor:default;filter:grayscale(0.25);opacity:0.78}.skin-buy.equipped{background:linear-gradient(180deg,#91f4ff,#2f9dff)}.skin-buy.reward-only,.skin-buy.reward-only:disabled{background:linear-gradient(110deg,#ff4b63,#ff9d35,#ffe94e,#5eea77,#51dfff,#8871ff,#ff65cf);filter:none;opacity:1;box-shadow:inset 0 5px 0 rgba(255,255,255,0.38),0 5px 0 rgba(0,0,0,0.25)}.daily-modal{position:relative;width:min(1040px,calc(100vw - 24px));max-height:calc(100vh - 28px);overflow:visible;padding:clamp(48px,6vw,72px) clamp(16px,2.6vw,26px) clamp(16px,2.6vw,26px);border:6px solid #120712;border-radius:18px;background:radial-gradient(circle at 10% 18%,rgba(255,255,255,0.65) 0 4px,transparent 5px) 0 0 / 34px 34px,linear-gradient(135deg,rgba(255,255,255,0.42),transparent 35%),linear-gradient(140deg,#fff7a8 0%,#82f2ff 34%,#ff92db 70%,#a98bff 100%);box-shadow:inset 0 7px 0 rgba(255,255,255,0.48),inset 0 -10px 0 rgba(79,23,128,0.24),0 0 0 3px rgba(255,255,255,0.72),0 0 0 8px rgba(39,12,34,0.34),0 12px 0 rgba(0,0,0,0.34),0 18px 34px rgba(0,0,0,0.3)}.daily-modal::before{content:none}.daily-streak-box{position:absolute;top:10px;left:14px;z-index:3;display:inline-flex;align-items:center;box-sizing:border-box;height:40px;gap:2px;padding:0 3px 1px 7px;border:3px solid #170912;border-radius:12px;background:linear-gradient(180deg,#ff9ddd 0%,#f264c7 50%,#cc459f 100%);color:#fff;font-family:var(--font-heavy);font-size:18px;line-height:1;white-space:nowrap;text-shadow:var(--outline-1);box-shadow:inset 0 3px 0 rgba(255,255,255,0.42),0 4px 0 rgba(0,0,0,0.28)}.daily-streak-box strong{display:inline-block;min-width:15px;margin-left:2px;color:#fff;font-size:22px;text-align:center;transform-origin:center;paint-order:stroke fill;-webkit-text-stroke:1px #5b1b22}.daily-streak-box>img{width:38px;height:38px;margin-left:-2px;object-fit:contain;filter:drop-shadow(0 2px 0 rgba(28,6,16,0.46));transform:translateY(-1px)}.daily-streak-box.is-increasing strong{animation:daily-streak-number-pop 620ms cubic-bezier(0.2,0.9,0.28,1.3)}.daily-streak-sparkle{position:absolute;top:50%;left:calc(100% - 53px);z-index:5;width:7px;height:7px;border-radius:2px;background:var(--sparkle-color,#fff67d);box-shadow:0 0 7px var(--sparkle-color,#fff67d);opacity:0;pointer-events:none;transform:translate(-50%,-50%) rotate(45deg) scale(0.2);animation:daily-streak-sparkle-burst 680ms ease-out forwards}@keyframes daily-streak-number-pop{0%{transform:translateY(0) scale(1)}42%{transform:translateY(-4px) rotate(-5deg) scale(1.48)}72%{transform:translateY(1px) rotate(2deg) scale(0.94)}100%{transform:translateY(0) scale(1)}}@keyframes daily-streak-sparkle-burst{0%{opacity:0;transform:translate(-50%,-50%) rotate(45deg) scale(0.2)}22%{opacity:1}100%{opacity:0;transform:translate(calc(-50% + var(--sparkle-x)),calc(-50% + var(--sparkle-y))) rotate(135deg) scale(1)}}html.has-touch-controls .daily-streak-box{position:relative;top:auto;left:auto;display:flex;height:29px;width:max-content;gap:1px;margin:0 0 1px;padding:0 2px 1px 5px;border-width:2px;border-radius:8px;font-size:12px;box-shadow:inset 0 2px 0 rgba(255,255,255,0.4),0 3px 0 rgba(0,0,0,0.26)}html.has-touch-controls .daily-streak-box strong{min-width:10px;margin-left:1px;font-size:16px;-webkit-text-stroke-width:0.7px}html.has-touch-controls .daily-streak-box>img{width:27px;height:27px;margin-left:-2px}html.has-touch-controls .daily-streak-sparkle{left:calc(100% - 38px);width:5px;height:5px}.daily-close{position:absolute;top:-20px;right:-20px;z-index:6;width:54px;height:54px;border:4px solid #180913;border-radius:12px;background:linear-gradient(145deg,#ff6e9f,#d42166);color:#fff;cursor:pointer;font-family:var(--font-heavy);font-size:34px;line-height:1;text-shadow:var(--outline-2);box-shadow:inset 0 4px 0 rgba(255,255,255,0.34),0 5px 0 rgba(0,0,0,0.32)}.daily-modal h2,.daily-reward-list{position:relative;z-index:1}.daily-rewards-browser{position:relative;display:grid;grid-template-columns:46px minmax(0,1fr) 46px;column-gap:8px;align-items:center}.daily-page-arrow{position:relative;top:auto;z-index:12;display:grid;place-items:center;width:46px;height:58px;padding:0;border:4px solid #12070f;border-radius:14px;background:linear-gradient(180deg,#fff76b 0%,#ffb12e 55%,#ff7d27 100%);color:#fff;font-family:var(--font-heavy);font-size:48px;line-height:1;text-shadow:var(--outline-2);cursor:pointer;box-shadow:inset 0 5px 0 rgba(255,255,255,0.46),0 6px 0 rgba(0,0,0,0.3);transform:none}.daily-page-arrow>span{position:absolute;inset:0;display:block;font-size:0;line-height:0;pointer-events:none}.daily-page-arrow>span::before{content:"";display:block;position:absolute;top:calc(50% + 1px);left:calc(50% - 1px);width:24px;height:32px;background:center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M7 5L18 16L7 27' fill='none' stroke='%2312070f' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M7 5L18 16L7 27' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");filter:drop-shadow(0 1px 0 rgba(255,255,255,0.22));transform:translate(-50%,-50%)}.daily-page-arrow.is-left>span::before{left:calc(50% + 1px);transform:translate(-50%,-50%) scaleX(-1)}.daily-page-arrow.is-left{grid-column:1;grid-row:1;left:auto;justify-self:start}.daily-page-arrow.is-right{grid-column:3;grid-row:1;right:auto;justify-self:end}.daily-page-arrow:hover{filter:brightness(1.08)}.daily-page-arrow:active{box-shadow:inset 0 3px 0 rgba(255,255,255,0.36),0 2px 0 rgba(0,0,0,0.3);transform:translateY(4px)}.daily-page-arrow[hidden]{display:none}.daily-reward-list{position:relative;z-index:1}.daily-modal .daily-title-box{position:absolute;top:-42px;left:50%;display:inline-flex;align-items:center;gap:6px;margin:0;padding:2px 12px 4px 6px;border:4px solid #110810;border-radius:12px;background:linear-gradient(180deg,#ff8ec8 0%,#ff56a8 100%);color:#fff;font-family:var(--font-heavy);font-size:clamp(22px,3.4vw,35px);line-height:0.95;text-shadow:var(--outline-3);transform:translateX(-50%);box-shadow:inset 0 5px 0 rgba(255,255,255,0.42),0 5px 0 rgba(0,0,0,0.28)}.daily-calendar{display:grid;place-items:center;width:clamp(38px,5vw,50px);height:clamp(38px,5vw,50px);overflow:visible;border-radius:8px;filter:drop-shadow(0 4px 0 rgba(0,0,0,0.34))}.daily-calendar img{display:block;width:clamp(58px,7.4vw,78px);height:clamp(52px,6.8vw,72px);object-fit:contain;transform:translate(-15px,-11px)}.custom-speed-modal{position:relative;width:min(430px,calc(100vw - 28px));padding:22px 22px 20px;border:5px solid #140b08;border-radius:18px;background:radial-gradient(circle at 18% 10%,rgba(255,255,255,0.54),transparent 30%),repeating-linear-gradient(135deg,rgba(255,255,255,0.14) 0 12px,rgba(255,80,188,0.12) 12px 24px),linear-gradient(180deg,#ffc5f3 0%,#ff82d8 48%,#e64fbc 100%);color:#fff;text-align:center;pointer-events:auto;box-shadow:inset 0 6px 0 rgba(255,255,255,0.36),0 8px 0 rgba(0,0,0,0.36),0 18px 34px rgba(0,0,0,0.32)}.custom-speed-modal::before{content:"";position:absolute;inset:12px;border:3px dashed rgba(255,255,255,0.26);border-radius:12px;pointer-events:none}.custom-speed-close{position:absolute;top:-16px;right:-13px;z-index:2;width:42px;height:42px;border:3px solid #140b08;border-radius:50%;background:linear-gradient(180deg,#fff06d,#ff8bd8);color:#fff;font-family:var(--font-heavy);font-size:20px;text-shadow:var(--outline-1);cursor:pointer;box-shadow:0 4px 0 rgba(0,0,0,0.34)}.custom-speed-modal h2{position:relative;z-index:1;margin:0 0 12px;color:#fff;font-size:clamp(28px,6vw,42px);line-height:0.95;white-space:nowrap;text-shadow:var(--outline-2)}.custom-speed-readout{position:relative;z-index:1;display:inline-grid;min-width:142px;margin-bottom:16px;padding:8px 16px 10px;border:3px solid #140b08;border-radius:13px;background:linear-gradient(180deg,#fff4a8,#ff8bd8);box-shadow:inset 0 3px 0 rgba(255,255,255,0.44),0 4px 0 rgba(0,0,0,0.28)}.custom-speed-readout span{color:#fff;font-family:var(--font-heavy);font-size:15px;line-height:1;text-shadow:var(--outline-1)}.custom-speed-readout strong{color:#fff;display:block;margin-top:7px;font-size:18px;line-height:1;text-shadow:var(--outline-1)}.custom-speed-slider{position:relative;z-index:1;width:100%;height:34px;margin:4px 0 8px;appearance:none;border:3px solid #140b08;border-radius:999px;background:linear-gradient(90deg,#44c8ff 0 var(--custom-speed-fill,100%),rgba(255,255,255,0.42) var(--custom-speed-fill,100%) 100%),linear-gradient(180deg,#32153a,#160817);cursor:pointer;box-shadow:inset 0 3px 0 rgba(255,255,255,0.2),0 4px 0 rgba(0,0,0,0.28)}.custom-speed-slider::-webkit-slider-thumb{appearance:none;width:38px;height:38px;border:4px solid #140b08;border-radius:50%;background:linear-gradient(180deg,#fff6a8,#ff7fd5);box-shadow:inset 0 3px 0 rgba(255,255,255,0.44),0 3px 0 rgba(0,0,0,0.35)}.custom-speed-slider::-moz-range-thumb{width:30px;height:30px;border:4px solid #140b08;border-radius:50%;background:linear-gradient(180deg,#fff6a8,#ff7fd5);box-shadow:inset 0 3px 0 rgba(255,255,255,0.44),0 3px 0 rgba(0,0,0,0.35)}.custom-speed-scale{position:relative;z-index:1;display:flex;justify-content:space-between;margin-bottom:5px;color:#fff;font-family:var(--font-heavy);font-size:14px;text-shadow:var(--outline-1)}.custom-speed-max-mini{position:relative;z-index:1;display:block;min-width:82px;margin:0 0 12px auto;padding:4px 8px 6px;border:3px solid #140b08;border-radius:10px;background:linear-gradient(180deg,#fff4a8,#ff8bd8);color:#fff;font-family:var(--font-heavy);font-size:12px;line-height:1;text-shadow:var(--outline-1);cursor:pointer;box-shadow:inset 0 2px 0 rgba(255,255,255,0.38),0 3px 0 rgba(0,0,0,0.32)}.custom-speed-apply{position:relative;z-index:1;min-width:156px;padding:8px 16px 10px;border:3px solid #140b08;border-radius:12px;background:linear-gradient(180deg,#d9ff9a,#61e86d);color:#fff;font-family:var(--font-heavy);font-size:18px;text-shadow:var(--outline-1);cursor:pointer;box-shadow:inset 0 3px 0 rgba(255,255,255,0.38),0 4px 0 rgba(0,0,0,0.32)}.daily-reward-list{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;overflow:visible;padding:38px 2px 8px}.daily-card{position:relative;z-index:2;display:grid;grid-template-rows:82px 1fr minmax(42px,auto);row-gap:7px;align-items:center;justify-items:center;min-height:190px;padding:34px 8px 8px;border:4px solid #12070f;border-radius:12px;background:linear-gradient(180deg,rgba(255,255,255,0.32),transparent 32%),linear-gradient(180deg,var(--daily-card-top,#68ccff) 0%,var(--daily-card-bottom,#1495d4) 100%);color:#fff;text-align:center;box-shadow:inset 0 5px 0 rgba(255,255,255,0.28),0 6px 0 rgba(0,0,0,0.28)}.daily-card-shell{position:relative;isolation:isolate}.daily-card-day-1{--daily-card-top:#76d8ff;--daily-card-bottom:#0987d0}.daily-overlay-active .glowing-wrapper{z-index:0;overflow:visible}.daily-overlay-active .daily-card-shell .glowing-wrapper,.daily-overlay-active .daily-card-shell .glowing-container,.daily-overlay-active .daily-card-shell .glowing-container--blur-wrapper,.daily-overlay-active .daily-card-shell .glowing-border,.daily-overlay-active .daily-card-shell .glowing-border::after{border-radius:24px}.daily-overlay-active .daily-card-shell .glowing-container{opacity:1}.daily-overlay-active .daily-card-shell .glowing-container--blur-wrapper{filter:blur(calc(var(--glowingWidth) / 2 * var(--glowingBlurRatio))) saturate(1.8) brightness(1.45)}.daily-overlay-active .daily-card-shell .glowing-border::after{opacity:1}.daily-card-day-2{--daily-card-top:#5cf0b0;--daily-card-bottom:#0ca66e}.daily-card-day-3{--daily-card-top:#ff8fdd;--daily-card-bottom:#b540ee}.daily-card-day-4{--daily-card-top:#ffe36c;--daily-card-bottom:#ff9c22}.daily-card-day-5{--daily-card-top:#ff9fcf;--daily-card-bottom:#ff4f9b}.daily-card.is-locked{filter:none}.daily-card.is-locked .daily-day,.daily-card.is-locked .daily-icon,.daily-card.is-locked strong,.daily-card.is-locked button:not([data-daily-countdown]){filter:saturate(0.82)}.daily-card.is-claimed{filter:grayscale(0.18);opacity:0.9}.daily-day,.daily-card strong,.daily-card button{font-family:var(--font-heavy);text-shadow:var(--outline-2)}.daily-day{position:absolute;top:-39px;left:50%;z-index:2;min-width:92px;padding:8px 12px 10px;border:4px solid #12070f;border-radius:9px;background:#fff;color:#fff;font-size:21px;line-height:1;transform:translateX(-50%);box-shadow:inset 0 4px 0 rgba(255,255,255,0.65),0 4px 0 rgba(0,0,0,0.26)}.daily-day-text{display:inline-block;white-space:nowrap;transform:translateY(2px)}.daily-duration{position:absolute;top:11px;right:-6px;z-index:3;display:inline-flex;align-items:center;gap:5px;padding:5px 8px 6px;border:3px solid #130712;border-radius:999px;background:linear-gradient(180deg,#fffdf7,#ffd7ef);color:#fff;font-family:var(--font-heavy);font-size:15px;line-height:1;text-shadow:var(--outline-2);box-shadow:inset 0 3px 0 rgba(255,255,255,0.72),0 3px 0 rgba(0,0,0,0.24)}.daily-clock{display:block;width:18px;height:18px;object-fit:contain;filter:drop-shadow(0 1px 0 rgba(0,0,0,0.22))}.daily-icon{position:relative;z-index:1;display:grid;place-items:center;width:104px;height:82px;line-height:1;overflow:visible}.daily-icon::before{content:none;position:absolute;z-index:1;width:50px;height:34px;border-radius:999px;background:radial-gradient(circle,rgba(255,248,154,0.34) 0%,rgba(255,190,34,0.16) 52%,rgba(255,169,26,0) 78%);filter:blur(3px);transform:translateY(7px)}.daily-icon img{position:relative;z-index:3;display:block;width:auto;height:62px;max-width:104px;object-fit:contain;filter:none}.daily-icon-wins img,.daily-icon-trophyMultiplier img{filter:drop-shadow(0 -2px 0 #080408) drop-shadow(2px 0 0 #080408) drop-shadow(0 2px 0 #080408) drop-shadow(-2px 0 0 #080408)}.daily-icon-speed img,.daily-icon-multiplier img{filter:drop-shadow(0 -1px 0 #080408) drop-shadow(1px 0 0 #080408) drop-shadow(0 1px 0 #080408) drop-shadow(-1px 0 0 #080408)}.daily-icon-trail img{height:76px;max-width:116px;transform:translateY(-4px)}.daily-icon-treadmill img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;transform:none}.daily-icon-skin img{position:absolute;top:-38px;left:50%;width:150px;height:172px;object-fit:contain;object-position:center;border-radius:0;transform:translateX(-50%)}.daily-card strong{position:relative;z-index:2;display:grid;align-items:center;min-height:52px;font-size:21px;line-height:1;white-space:nowrap}.daily-card strong.daily-reward-copy-wins,.daily-card strong.daily-reward-copy-trophyMultiplier,.daily-card strong.daily-reward-copy-treadmill{font-size:18px}.daily-card strong.daily-reward-copy-shopDiscount{font-size:15px}.daily-card-day-4 strong{white-space:nowrap;font-size:19px}.daily-card-day-2 strong{white-space:nowrap;font-size:19px}.daily-card button{display:grid;place-items:center;width:100%;min-height:42px;padding:4px 8px 7px;border:3px solid #15080f;border-radius:10px;background:linear-gradient(180deg,#fff86d,#ffb72f);color:#fff;cursor:pointer;font-size:19px;line-height:0.92;overflow:visible;text-shadow:var(--outline-1);box-shadow:inset 0 4px 0 rgba(255,255,255,0.42),0 4px 0 rgba(0,0,0,0.25)}.daily-card button:disabled{cursor:default;filter:grayscale(0.35);opacity:0.76}.daily-card button[data-daily-countdown]:disabled{filter:saturate(1.08);opacity:0.96}.daily-card button[data-daily-claimed]:disabled{background:linear-gradient(180deg,#2fa85a,#126a35)}.daily-claimed-text{display:inline-block;transform:translateY(2px)}.daily-button-day-text{display:inline-block;transform:translateY(4px)}.daily-countdown-text{display:inline-block;font-size:22px;transform:translateY(2px)}@media (pointer:fine){html:not(.has-touch-controls) .modal-overlay{overflow:hidden}html:not(.has-touch-controls) .rebirth-modal,html:not(.has-touch-controls) .trail-modal,html:not(.has-touch-controls) .skin-modal,html:not(.has-touch-controls) .daily-modal,html:not(.has-touch-controls) .sounds-modal{position:fixed;top:50%;left:50%;max-height:var(--game-popup-max-height);transform:translate(-50%,-50%) scale(var(--game-popup-scale));transform-origin:center}html:not(.has-touch-controls) .rebirth-modal,html:not(.has-touch-controls) .trail-modal{width:min(760px,var(--game-popup-max-width))}html:not(.has-touch-controls) .sounds-modal{width:min(800px,var(--game-popup-max-width))}html:not(.has-touch-controls) .skin-modal{width:min(1040px,var(--game-popup-max-width))}html:not(.has-touch-controls) .daily-modal{width:min(1040px,var(--game-popup-max-width))}html:not(.has-touch-controls) .trail-list{max-height:min(430px,calc(var(--game-popup-max-height) - 170px))}}@media (max-width:680px){.trail-card{grid-template-columns:max-content 1fr}.trail-buy{grid-column:1 / -1}.daily-modal{width:min(440px,calc(100vw - 20px));max-height:calc(100vh - 120px);padding:44px 12px 14px;border-width:5px}.daily-modal .daily-title-box{top:-36px;padding:2px 10px 4px 5px;border-width:4px;font-size:clamp(23px,8.5vw,34px)}.daily-calendar{width:40px;height:40px}.daily-calendar img{width:58px;height:54px;transform:translate(-12px,-9px)}.daily-close{top:28px;right:20px;width:44px;height:44px;border-width:3px;border-radius:10px;font-size:28px}.daily-page-arrow{width:38px;height:50px;border-width:3px;border-radius:11px;font-size:40px}.daily-rewards-browser{grid-template-columns:38px minmax(0,1fr) 38px;column-gap:5px}.daily-page-arrow.is-left{left:auto}.daily-page-arrow.is-right{right:auto}.daily-reward-list{grid-auto-flow:row;grid-template-columns:repeat(2,minmax(0,1fr));gap:30px 10px;max-height:58vh;overflow-y:auto;padding:28px 2px 12px}.daily-card{grid-template-rows:58px minmax(34px,auto) minmax(34px,auto);row-gap:5px;min-height:154px;padding:24px 6px 7px;border-width:3px;border-radius:10px}.daily-day{top:-24px;min-width:70px;padding:5px 8px 7px;border-width:3px;border-radius:8px;font-size:17px}.daily-duration{top:8px;right:-4px;gap:3px;padding:3px 6px 5px;border-width:2px;font-size:11px}.daily-clock{width:14px;height:14px}.daily-icon{width:82px;height:56px}.daily-icon img{height:46px;max-width:82px}.daily-icon-trail img{height:58px;max-width:90px}.daily-icon-treadmill img{width:100%;height:100%;max-width:100%;max-height:100%}.daily-icon-skin img{top:-26px;left:50%;width:104px;height:118px;transform:translateX(-50%)}.daily-card strong{min-height:34px;font-size:16px}.daily-card-day-4 strong{font-size:15px}.daily-card-day-2 strong{white-space:nowrap;font-size:15px}.daily-card button{min-height:34px;padding:3px 5px 5px;border-width:2px;border-radius:8px;font-size:15px}.daily-countdown-text{font-size:17px}}@media (orientation:portrait) and (min-width:700px){html.is-ipad .hud-top{top:max(6px,env(safe-area-inset-top,0px));right:0;left:0}html.is-ipad .top-hud{display:flex;align-items:flex-start;justify-content:center;gap:24px}html.is-ipad .multiplier-stack{display:none}html.is-ipad .speed-title{position:relative;width:230px;min-height:42px;margin:0;font-size:30px;transform:none}html.is-ipad .hearts-title{position:relative;inset:auto;width:132px;height:42px;min-height:42px;margin:0;font-size:26px}html.is-ipad .speed-title-copy strong,html.is-ipad #topSpeedValue,html.is-ipad #topHeartsValue{-webkit-text-fill-color:#fff !important;-webkit-text-stroke:2px #050306 !important;paint-order:stroke fill !important;text-shadow:-2px -2px 0 #050306,0 -2px 0 #050306,2px -2px 0 #050306,-2px 0 0 #050306,2px 0 0 #050306,-2px 2px 0 #050306,0 2px 0 #050306,2px 2px 0 #050306,0 3px 0 #050306 !important}html.is-ipad #topSpeedValue::after,html.is-ipad #topHeartsValue::after{content:none !important}html.is-ipad .speed-title-copy span,html.is-ipad .hearts-title .speed-title-copy span{-webkit-text-stroke:0.85px #050306 !important;paint-order:stroke fill !important;text-shadow:-1px -1px 0 #050306,0 -1px 0 #050306,1px -1px 0 #050306,-1px 0 0 #050306,1px 0 0 #050306,-1px 1px 0 #050306,0 1px 0 #050306,1px 1px 0 #050306 !important}html.is-ipad .wins-badge strong{-webkit-text-fill-color:#fff;-webkit-text-stroke:1.5px #050306;paint-order:stroke fill;text-shadow:-1.5px -1.5px 0 #050306,0 -1.5px 0 #050306,1.5px -1.5px 0 #050306,-1.5px 0 0 #050306,1.5px 0 0 #050306,-1.5px 1.5px 0 #050306,0 1.5px 0 #050306,1.5px 1.5px 0 #050306,0 2.5px 0 #050306}html.is-ipad .leaderboard{display:block;top:calc(env(safe-area-inset-top,0px) + 62px);right:calc(env(safe-area-inset-right,0px) + 7px);width:184px;padding:5px 6px 6px;border-width:2px;border-radius:9px;pointer-events:auto}html.is-ipad .leaderboard-header{display:flex;height:15px;margin-bottom:3px}html.is-ipad .leaderboard-header strong{display:flex;gap:3px;font-size:11px;line-height:1}html.is-ipad .leaderboard-room-code{margin:0;font-size:9px;line-height:1}html.is-ipad .leaderboard-room-code b{font-size:10px}html.is-ipad .leaderboard-grid-head,html.is-ipad .leaderboard-body{display:grid}html.is-ipad .leaderboard-grid{grid-template-columns:minmax(80px,1fr) 42px 30px;gap:1px}html.is-ipad .leaderboard-grid-head{height:10px;font-size:8px}html.is-ipad .leaderboard-body{max-height:none;margin:0 0 4px;padding:0;overflow:hidden}html.is-ipad .leaderboard-row{height:16px;min-height:16px;font-size:10px}html.is-ipad .leaderboard-row:nth-child(n + 4){display:none}html.is-ipad .leaderboard-player-name,html.is-ipad .leaderboard-row>span:not(.leaderboard-name){font-size:10px}html.is-ipad .room-code-toggle{display:none}html.is-ipad .leaderboard .room-code-panel,html.is-ipad .leaderboard:not(.is-room-code-open) .room-code-panel{display:block !important;margin:0;padding:0;border:0}html.is-ipad .room-code-form{width:calc(100% + 7px);margin-left:-5px;grid-template-columns:minmax(80px,1.15fr) 34px minmax(58px,0.85fr);gap:2px}html.is-ipad .room-code-form input,html.is-ipad .room-code-form button{height:22px;min-height:22px;font-size:9px}html.is-ipad .room-code-form .private-server-button{font-size:8px}html.is-ipad .room-code-status{min-height:0;font-size:8px}html.is-ipad .hud-right{top:calc(env(safe-area-inset-top,0px) + 190px)}}.speed-popups{position:fixed;inset:0;z-index:4;overflow:hidden;pointer-events:none}.multiplayer-status{flex:0 0 auto;padding:2px 4px 3px;border:1px solid rgba(19,9,22,0.82);border-radius:5px;background:rgba(29,14,42,0.66);color:#fff;font-family:var(--font-heavy);font-size:8px;line-height:1;text-shadow:var(--outline-1);transform:translate(3px,-1px);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 2px 0 rgba(0,0,0,0.24)}.speed-popup{position:absolute;display:inline-flex;align-items:center;gap:5px;color:#fff;font-size:22px;font-weight:1000;line-height:1;transform:translate(-50%,-50%);will-change:transform,opacity}.speed-popup .speed-icon{width:26px;height:26px;object-fit:contain;transform:rotate(-14deg);filter:drop-shadow(0 3px 0 rgba(0,0,0,0.48))}.level-up-popup{position:absolute;width:clamp(64px,5.8vw,94px);aspect-ratio:1;transform:translate(-50%,-50%) scale(0.48);transform-origin:50% 70%;will-change:transform,opacity}.level-up-screen-notification{position:fixed;z-index:8;top:clamp(88px,15vh,132px);left:50%;display:flex;align-items:center;justify-content:center;gap:6px;width:min(520px,calc(100vw - 24px));padding:0 42px;background:linear-gradient( 90deg,rgba(0,0,0,0) 0%,rgba(0,0,0,0.1) 10%,rgba(0,0,0,0.24) 28%,rgba(0,0,0,0.24) 72%,rgba(0,0,0,0.1) 90%,rgba(0,0,0,0) 100% );background-position:center;background-repeat:no-repeat;background-size:100% 30px;color:#fff;font-family:var(--font-heavy);font-size:clamp(20px,2.25vw,27px);font-weight:900;line-height:1;white-space:nowrap;pointer-events:none;paint-order:stroke fill;-webkit-text-stroke:3px #a96f0d;text-shadow:0 0 5px rgba(255,255,255,0.34),0 2px 2px rgba(0,0,0,0.78);filter:drop-shadow(0 0 7px rgba(255,210,64,0.16));animation:level-up-screen-notification 1.7s ease-out both}.level-up-screen-copy{display:inline-flex;align-items:baseline;gap:5px}.level-up-screen-bang{margin-left:-4px}.level-up-screen-notification::before,.level-up-screen-notification::after{content:"";width:48px;height:48px;flex:0 0 48px;background:url("../assets/icons/twinkle-stars-icon.445f4f52e9.webp") center / contain no-repeat;filter:drop-shadow(0 2px 2px rgba(0,0,0,0.4)) drop-shadow(0 0 5px rgba(255,213,57,0.28))}.level-up-screen-notification::after{margin-left:-3px;transform:scaleX(-1)}@keyframes level-up-screen-notification{0%{opacity:0;transform:translate(-50%,-8px) scale(0.88)}15%,75%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-5px) scale(0.96)}}.level-up-popup::before{content:"";position:absolute;z-index:-1;inset:13% 7% 18%;border-radius:50%;background:radial-gradient(circle,rgba(255,246,113,0.95) 0%,rgba(255,189,30,0.58) 42%,rgba(255,154,0,0) 74%);filter:blur(13px);animation:level-up-popup-aura 520ms ease-in-out infinite alternate}.level-up-popup-icon{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 0 rgba(3,15,39,0.38)) drop-shadow(0 0 7px rgba(255,247,139,0.96)) drop-shadow(0 0 18px rgba(255,181,25,0.76));animation:level-up-popup-glow 520ms ease-in-out infinite alternate}@keyframes level-up-popup-aura{from{opacity:0.58;transform:scale(0.9)}to{opacity:0.92;transform:scale(1.08)}}@keyframes level-up-popup-glow{from{filter:drop-shadow(0 3px 0 rgba(3,15,39,0.38)) drop-shadow(0 0 6px rgba(255,247,139,0.88)) drop-shadow(0 0 14px rgba(255,181,25,0.64))}to{filter:drop-shadow(0 3px 0 rgba(3,15,39,0.38)) drop-shadow(0 0 10px rgba(255,251,179,1)) drop-shadow(0 0 24px rgba(255,178,18,0.9))}}@media (prefers-reduced-motion:reduce){.level-up-popup::before,.level-up-popup-icon{animation:none}}.win-claim-popup{position:fixed;z-index:7;top:45%;left:50%;display:inline-flex;align-items:center;gap:clamp(7px,1.1vw,12px);width:max-content;max-width:min(90vw,680px);padding:14px clamp(20px,3vw,38px) 18px;border:clamp(3px,0.35vw,5px) solid #2a1606;border-radius:22px;/* #875:one clean golden pill with a darker 3D bottom lip (Matthijs's reference). */
  background: linear-gradient(180deg, #ffe46e 0%, #ffd640 55%, #f9c42a 100%);
  box-shadow:
    inset 0 -8px 0 #e3a419,
    inset 0 4px 0 rgba(255, 255, 255, 0.5),
    0 6px 0 #2a1606,
    0 12px 24px rgba(0, 0, 0, 0.3);
  overflow: visible;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.62);
  animation: win-claim-pop 1.45s cubic-bezier(0.18, 0.9, 0.22, 1) forwards;
}

.win-claim-popup::before {
  content: "";
  position: absolute;
  inset: 3px 3px 9px;
  border: 2px solid rgba(255, 249, 205, 0.75);
  border-radius: 17px 17px 13px 13px;
  pointer-events: none;
}

.win-claim-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.win-claim-copy small {
  color: #7c265a;
  font-family: var(--font-heavy);
  font-size: clamp(11px, 1.25vw, 16px);
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.win-claim-popup strong {
  display: block;
  min-width: 0;
  color: #fff;
  font-family: var(--font-heavy);
  font-size: clamp(24px, 3.6vw, 48px);
  font-weight: 1000;
  line-height: 1.12;
  white-space: nowrap;
  max-width: calc(90vw - clamp(50px, 7vw, 82px) - clamp(7px, 1.1vw, 12px) - clamp(32px, 5.2vw, 64px));
  text-shadow:
    -3px -3px 0 #2a1606,
    3px -3px 0 #2a1606,
    -3px 3px 0 #2a1606,
    3px 3px 0 #2a1606,
    0 -3px 0 #2a1606,
    0 3px 0 #2a1606,
    -3px 0 0 #2a1606,
    3px 0 0 #2a1606,
    0 6px 0 #2a1606;
}

.win-claim-punctuation {
  margin-left: -0.12em;
}

.is-safari .win-claim-popup strong {
  -webkit-text-stroke: 2px #2a1606;
  paint-order: stroke fill;
  text-shadow: 0 5px 0 #2a1606;
}

.win-claim-trophy {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(50px, 7vw, 82px);
  height: clamp(50px, 7vw, 82px);
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1;
  transform: translateX(-8%) scale(0.85);
}

.win-claim-trophy .trophy-icon-image {
  width: 100%;
  height: 100%;
  /* Thin dark outline so the gold trophy keeps its edge on the gold pill. */
  filter:
    drop-shadow(2px 0 0 #2a1606)
    drop-shadow(-2px 0 0 #2a1606)
    drop-shadow(0 2px 0 #2a1606)
    drop-shadow(0 -2px 0 #2a1606)
    drop-shadow(0 3px 0 rgba(42, 22, 6, 0.55));
  animation: win-claim-trophy-bounce 620ms cubic-bezier(0.2, 1.35, 0.35, 1) both;
}

.trophy-claim-confetti {
  position: fixed;
  z-index: 9;
  width: 11px;
  height: 18px;
  border: 1px solid rgba(24, 9, 19, 0.28);
  border-radius: 3px;
  pointer-events: none;
  animation: trophy-claim-confetti-burst 1050ms cubic-bezier(0.12, 0.72, 0.22, 1) var(--claim-delay) forwards;
}

.trophy-claim-confetti:nth-child(3n) {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

@keyframes win-claim-trophy-bounce {
  0% { transform: scale(0.3) rotate(-18deg); }
  58% { transform: scale(1.18) rotate(8deg); }
  78% { transform: scale(0.94) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes trophy-claim-confetti-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
  }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--claim-x)), calc(-50% + var(--claim-y))) scale(1) rotate(var(--claim-rot));
  }
}

@keyframes win-claim-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.32) rotate(-2deg);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.76) rotate(1deg);
  }
  32% {
    transform: translate(-50%, -50%) scale(0.68) rotate(0deg);
  }
  72% {
    opacity: 1;
    transform: translate(-50%, -58%) scale(0.68);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -72%) scale(0.56);
  }
}

@media (pointer: coarse) {
  .has-touch-controls .mobile-controls {
    display: block;
  }

  .stage-question {
    top: calc(env(safe-area-inset-top, 0px) + 50px);
  }

  .hud-top {
    top: max(4px, env(safe-area-inset-top, 0px));
    right: 8px;
    left: 8px;
  }

  .top-hud {
    display: flex;
    justify-content: center;
    gap: 0;
  }

  .speed-title {
    width: min(218px, 52vw);
    min-height: 39px;
    border-width: 3px;
    border-radius: 10px;
    font-size: clamp(24px, 6.1vw, 31px);
    transform: none;
  }

  .hearts-title {
    top: 1px;
    right: 0;
    left: auto;
    width: min(112px, 27vw);
    min-height: 34px;
    border-width: 2px;
    border-radius: 9px;
    font-size: clamp(18px, 4.9vw, 24px);
  }

  .speed-title-icon {
    left: -25px;
    width: 46px;
    height: 46px;
    font-size: 39px;
    text-shadow:
      -2px -2px 0 #102234,
      0 -2px 0 #102234,
      2px -2px 0 #102234,
      -2px 0 0 #102234,
      2px 0 0 #102234,
      -2px 2px 0 #102234,
      0 2px 0 #102234,
      2px 2px 0 #102234,
      0 4px 0 rgba(7, 13, 22, 0.7);
  }

  .hearts-title-icon {
    left: -27px;
    width: 50px;
    height: 50px;
  }

  .speed-title-copy strong {
    top: 4px;
    -webkit-text-stroke-width: 2px;
    text-shadow: 0 2px 0 #050306;
  }

  .speed-title-copy span {
    top: 25px;
    left: 7px;
    font-size: 12px;
    text-shadow: var(--outline-1);
  }

  .hearts-title .speed-title-copy strong {
    left: 55%;
    top: 4px;
  }

  .hearts-title .speed-title-copy span {
    top: 23px;
    left: 7px;
    font-size: 10px;
  }

  .multiplier-stack {
    display: none;
  }

  .hud-left {
    top: calc(env(safe-area-inset-top, 0px) + 54px);
    left: 8px;
    gap: 5px;
    transform: none;
  }

  .wins-badge {
    width: auto;
    gap: 0;
    font-size: 24px;
    text-shadow: var(--outline-1);
  }

  .wins-badge span {
    width: 32px;
    height: 32px;
  }

  .trophy-icon-image {
    width: 26px;
    height: 26px;
  }

  .menu-grid {
    grid-template-columns: repeat(3, 48px);
    gap: 6px;
  }

  .icon-button {
    width: 48px;
    height: 48px;
    padding: 3px;
    border-width: 2px;
    border-radius: 8px;
    box-shadow:
      inset 0 3px 0 rgba(255, 255, 255, 0.32),
      0 4px 0 rgba(0, 0, 0, 0.35),
      0 6px 12px rgba(0, 0, 0, 0.24);
  }

  .icon-button::before {
    inset: 5px;
    border-radius: 6px;
  }

  .icon-button span,
  .icon-button .rebirth-icon-slot,
  .icon-button .trail-icon-slot,
  .icon-button .gift-icon-slot {
    width: 34px;
    height: 28px;
  }

  .rebirth-icon-image {
    width: 42px;
    height: 42px;
    transform: translate(-6px, -4px);
  }

  .trail-icon-image {
    width: 43px;
    height: 43px;
    margin-top: -4px;
    transform: translate(-3px, -2px);
  }

  .gift-icon-image {
    width: 36px;
    height: 36px;
  }

  .icon-button strong {
    font-size: 10px;
    text-shadow: 0 1px 0 #050306;
  }

  .menu-alert {
    top: -5px;
    right: -5px;
    width: 16px;
    height: 16px;
    border-width: 2px;
  }

  .hud-right {
    display: none;
  }

  .leaderboard {
    top: calc(env(safe-area-inset-top, 0px) + 74px);
    right: calc(env(safe-area-inset-right, 0px) + 5px);
    width: 170px;
    padding: 5px 5px 1px;
    border-width: 2px;
    border-radius: 8px;
  }

  .leaderboard-grid-head,
  .leaderboard-body {
    display: none;
  }

  .leaderboard-header {
    display: block;
    margin-bottom: 3px;
  }

  .leaderboard-header strong {
    display: block;
    font-size: 11px;
    line-height: 1;
  }

  .leaderboard-header strong::first-letter {
    font-size: inherit;
  }

  .leaderboard-room-code {
    display: inline-block;
    margin-left: 14px;
    font-size: 10px;
  }

  .leaderboard-room-code b {
    font-size: 11px;
  }

  .multiplayer-status {
    display: none;
  }

  .room-code-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 23px;
    padding: 0 7px;
    border: 1px solid #130916;
    border-radius: 5px;
    background: linear-gradient(180deg, #5fe4ff, #2789e8);
    color: #fff;
    font-family: var(--font-heavy);
    font-size: 10px;
    line-height: 1;
    text-shadow: var(--outline-1);
    cursor: pointer;
    pointer-events: auto;
  }

  .room-code-toggle::after {
    content: ">";
    font-size: 12px;
    transform: rotate(90deg);
    transition: transform 140ms ease;
  }

  .leaderboard.is-room-code-open .room-code-toggle::after {
    transform: rotate(-90deg);
  }

  .leaderboard:not(.is-room-code-open) .room-code-panel {
    display: none;
  }

  .room-code-panel {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .room-code-form {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 4px;
  }

  .room-code-form input,
  .room-code-form button {
    height: 23px;
    border-width: 1px;
    border-radius: 5px;
    font-size: 10px;
  }

  .room-code-form input {
    padding-inline: 5px;
  }

  .room-code-status {
    min-height: 9px;
    margin-top: 2px;
    font-size: 9px;
  }

  .hud-bottom {
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 132px);
    left: 12px;
  }

  .progress-wrap {
    max-width: min(420px, 100%);
  }

  .stage-strip {
    width: min(178px, calc(100vw - 44px));
    margin-bottom: 5px;
    padding: 3px 10px 5px;
    border-width: 2px;
    border-radius: 8px;
    font-size: 14px;
  }

  .progress-track {
    height: 38px;
    border-width: 2px;
    border-radius: 9px;
  }

  .progress-label {
    gap: 8px;
    padding: 3px 9px 0;
    font-size: clamp(14px, 3.9vw, 19px);
    text-shadow: var(--bottom-label-outline);
  }

  .mobile-stick {
    left: 8px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
    width: 104px;
    height: 104px;
  }

  .mobile-stick span {
    width: 44px;
    height: 44px;
  }

  .mobile-jump {
    right: 8px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 26px);
    width: 82px;
    height: 82px;
    font-size: 15px;
  }

  .center-message {
    min-width: min(300px, calc(100vw - 26px));
    padding: 13px 15px;
  }

  .center-message strong {
    font-size: 25px;
  }

  .center-message span {
    font-size: 13px;
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  .leaderboard {
    display: none;
  }

  .hud-top {
    right: 7px;
    left: 7px;
  }

  .top-hud {
    justify-content: flex-start;
  }

  .speed-title {
    width: min(172px, calc(100vw - 138px));
    min-height: 36px;
    margin-left: 28px;
    font-size: clamp(22px, 6vw, 28px);
    transform: none;
  }

  .speed-title-icon {
    translate: -28px 0;
    width: 48px;
    height: 48px;
    font-size: 41px;
  }

  .speed-title-copy span {
    top: 23px;
    left: 10px;
    font-size: 11px;
  }

  .hearts-title {
    top: 1px;
    right: 0;
    left: auto;
    width: min(112px, 27vw);
    height: 36px;
    min-height: 36px;
    border-width: 3px;
    border-radius: 10px;
    font-size: clamp(18px, 4.9vw, 24px);
  }

  .hearts-title-icon {
    left: -25px;
    width: 46px;
    height: 46px;
  }

  .hearts-title .speed-title-copy strong {
    left: 54%;
    top: 6px;
    font-size: 0.92em;
  }

  .hearts-title .speed-title-copy span {
    top: 24px;
    left: 7px;
    font-size: 9px;
  }

  .hud-left {
    top: calc(env(safe-area-inset-top, 0px) + 84px);
    left: 8px;
    gap: 4px;
  }

  .wins-badge {
    font-size: 22px;
  }

  .wins-badge span {
    width: 30px;
    height: 30px;
  }

  .trophy-icon-image {
    width: 25px;
    height: 25px;
  }

  .menu-grid {
    grid-template-columns: 46px;
    gap: 5px;
  }

  .icon-button {
    width: 46px;
    height: 46px;
  }

  .icon-button span,
  .icon-button .rebirth-icon-slot,
  .icon-button .trail-icon-slot,
  .icon-button .gift-icon-slot {
    width: 32px;
    height: 27px;
  }

  .icon-button strong {
    font-size: 9px;
  }

  .mobile-stick {
    left: 4px;
    bottom: 2px;
    width: 92px;
    height: 92px;
  }

  .mobile-stick span {
    width: 39px;
    height: 39px;
  }

  .mobile-jump {
    right: 4px;
    bottom: 4px;
    width: 78px;
    height: 78px;
    font-size: 14px;
  }

  .hud-bottom {
    right: 90px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    left: 96px;
  }

  .progress-wrap {
    max-width: min(250px, 100%);
  }

  .stage-strip {
    box-sizing: border-box;
    width: 168px;
    max-width: 100%;
    margin-bottom: 4px;
    padding: 2px 6px 4px;
    font-size: 11px;
  }

  .progress-track {
    height: 38px;
    background: rgba(22, 14, 25, 0.62);
  }

  .progress-label {
    gap: 4px;
    overflow: hidden;
    flex-wrap: nowrap;
    padding: 3px 7px 2px;
    font-size: clamp(8px, 2.65vw, 12px);
    line-height: 1.18;
  }

  .progress-label #level {
    max-width: 42%;
    overflow: hidden;
    text-overflow: clip;
  }

  .progress-label #speed {
    max-width: 58%;
    overflow: hidden;
    text-overflow: clip;
    transform: none;
  }

  .stage-strip,
  .progress-label {
    -webkit-text-stroke: 0.55px #050306;
    paint-order: stroke fill;
    text-shadow: var(--bottom-label-outline);
  }

  .is-safari .stage-strip,
  .is-safari .progress-label {
    -webkit-text-stroke: 0.55px #050306;
    text-shadow: var(--bottom-label-outline);
  }

  .speed-title-copy strong {
    text-shadow: 0 1px 0 #050306;
  }
}

/* Keep mobile trail header items in real layout flow after all compact overrides. */
@media (pointer: coarse) {
  .trail-shop-header,
  .has-touch-controls .trail-shop-header {
    display: grid !important;
    grid-template-columns: minmax(92px, auto) minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    column-gap: 8px !important;
    min-height: 44px !important;
    margin: 2px 46px 7px 8px !important;
  }

  .trail-balance,
  .has-touch-controls .trail-balance {
    position: static !important;
    top: auto !important;
    left: auto !important;
    max-width: 132px !important;
    min-width: 0 !important;
    justify-self: start !important;
    transform: none !important;
  }

  .trail-balance strong,
  .has-touch-controls .trail-balance strong {
    display: block !important;
    min-width: 0 !important;
    max-width: 78px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .trail-modal h2,
  .has-touch-controls .trail-modal h2 {
    min-width: 0 !important;
    justify-self: center !important;
    overflow: hidden !important;
    font-size: clamp(24px, 7vw, 36px) !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .trail-shop-header,
  .has-touch-controls .trail-shop-header {
    grid-template-columns: minmax(86px, auto) minmax(0, 1fr) !important;
    min-height: 36px !important;
    margin: 0 38px 5px 6px !important;
    column-gap: 6px !important;
  }

  .trail-balance,
  .has-touch-controls .trail-balance {
    max-width: 118px !important;
    padding: 2px 7px 3px !important;
    font-size: 14px !important;
  }

  .trail-balance strong,
  .has-touch-controls .trail-balance strong {
    max-width: 66px !important;
  }

  .trail-modal h2,
  .has-touch-controls .trail-modal h2 {
    font-size: clamp(21px, 3.8vw, 28px) !important;
  }
}

@media (pointer: coarse) {
  .trail-shop-header,
  .has-touch-controls .trail-shop-header {
    display: grid;
    grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    column-gap: 8px;
    min-height: 44px;
    margin: 2px 46px 7px 8px;
  }

  .trail-balance,
  .has-touch-controls .trail-balance {
    position: static;
    top: auto;
    left: auto;
    max-width: 132px;
    min-width: 0;
    justify-self: start;
    transform: none;
  }

  .trail-balance strong,
  .has-touch-controls .trail-balance strong {
    display: block;
    min-width: 0;
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .trail-modal h2,
  .has-touch-controls .trail-modal h2 {
    min-width: 0;
    justify-self: center;
    overflow: hidden;
    font-size: clamp(24px, 7vw, 36px);
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .trail-shop-header,
  .has-touch-controls .trail-shop-header {
    grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
    min-height: 36px;
    margin: 0 38px 5px 6px;
    column-gap: 6px;
  }

  .trail-balance,
  .has-touch-controls .trail-balance {
    max-width: 118px;
    padding: 2px 7px 3px;
    font-size: 14px;
  }

  .trail-balance strong,
  .has-touch-controls .trail-balance strong {
    max-width: 66px;
  }

  .trail-modal h2,
  .has-touch-controls .trail-modal h2 {
    font-size: clamp(21px, 3.8vw, 28px);
  }
}

@media (pointer: coarse) {
  .trail-shop-header,
  .has-touch-controls .trail-shop-header {
    display: grid;
    grid-template-columns: minmax(92px, auto) minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    column-gap: 8px;
    min-height: 44px;
    margin: 2px 46px 7px 8px;
  }

  .trail-balance,
  .has-touch-controls .trail-balance {
    position: static;
    top: auto;
    left: auto;
    max-width: 132px;
    min-width: 0;
    justify-self: start;
    transform: none;
  }

  .trail-balance strong,
  .has-touch-controls .trail-balance strong {
    display: block;
    min-width: 0;
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .trail-modal h2,
  .has-touch-controls .trail-modal h2 {
    min-width: 0;
    justify-self: center;
    overflow: hidden;
    font-size: clamp(24px, 7vw, 36px);
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .trail-shop-header,
  .has-touch-controls .trail-shop-header {
    grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
    min-height: 36px;
    margin: 0 38px 5px 6px;
    column-gap: 6px;
  }

  .trail-balance,
  .has-touch-controls .trail-balance {
    max-width: 118px;
    padding: 2px 7px 3px;
    font-size: 14px;
  }

  .trail-balance strong,
  .has-touch-controls .trail-balance strong {
    max-width: 66px;
  }

  .trail-modal h2,
  .has-touch-controls .trail-modal h2 {
    font-size: clamp(21px, 3.8vw, 28px);
  }
}

@media (pointer: coarse) {
  .sound-toggle {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: auto;
    left: calc(env(safe-area-inset-left, 0px) + 8px);
    width: 44px;
    height: 44px;
    padding: 3px;
    border-width: 2px;
    border-radius: 9px;
    box-shadow:
      inset 0 3px 0 rgba(255, 255, 255, 0.32),
      0 4px 0 rgba(0, 0, 0, 0.34),
      0 8px 16px rgba(0, 0, 0, 0.22);
  }

  .sound-toggle::before {
    inset: 4px;
    border-radius: 6px;
  }

  .sound-toggle img {
    width: 35px;
    height: 35px;
  }
}

@media (pointer: coarse) {
  .trail-modal {
    width: min(580px, calc(100vw - 86px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 14px);
    padding: 10px 8px 8px;
    border-width: 3px;
    border-radius: 14px;
  }

  .trail-modal::before {
    inset: 8px;
    border-width: 3px;
    border-radius: 11px;
  }

  .trail-close {
    top: 9px;
    right: 10px;
    width: 42px;
    height: 42px;
    border-width: 3px;
    border-radius: 10px;
    font-size: 28px;
  }

  .trail-modal h2 {
    margin: 0;
    font-size: clamp(28px, 9vw, 44px);
    line-height: 1;
  }

  .trail-shop-header {
    gap: 8px;
    min-height: 50px;
    margin: 2px 48px 6px;
  }

  .trail-balance {
    gap: 5px;
    left: 0;
    margin: 0;
    padding: 3px 9px 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 16px;
    text-shadow: var(--outline-1);
  }

  .trail-scroll-wrap {
    grid-template-columns: 1fr 14px;
    gap: 5px;
  }

  .trail-list {
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 132px);
    gap: 6px;
    padding: 2px 2px 4px 0;
  }

  .trail-scrollbar {
    border-width: 2px;
    border-radius: 12px;
  }

  .trail-scrollbar span {
    top: -2px;
    right: -2px;
    left: -2px;
    min-height: 42px;
    border-width: 2px;
    border-radius: 12px;
  }

  .trail-card {
    grid-template-columns: max-content minmax(0, 1fr) minmax(58px, 76px);
    gap: 5px;
    min-height: 64px;
    padding: 5px;
    border-width: 3px;
    border-radius: 10px;
  }

  .trail-preview {
    height: 42px;
    border-radius: 9px;
  }

  .trail-preview::before,
  .trail-preview span {
    inset: 8px 4px;
    border-width: 8px;
  }

  .trail-preview span {
    inset: 20px 16px;
    border-width: 5px;
  }

  .trail-copy {
    gap: 3px;
    min-width: 0;
  }

  .trail-copy strong {
    overflow: hidden;
    font-size: clamp(14px, 4.4vw, 18px);
    line-height: 0.95;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: var(--outline-1);
  }

  .trail-copy span {
    gap: 3px;
    font-size: 10px;
    text-shadow: var(--outline-1);
  }

  .trail-shoe {
    width: 16px;
    height: 16px;
  }

  .trail-buy {
    min-height: 34px;
    gap: 2px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 10px;
    text-shadow: var(--outline-1);
  }

  .trail-buy .trophy-inline-icon {
    width: 22px;
    height: 22px;
  }
}

@media (pointer: coarse) {
  .trail-modal {
    width: min(580px, calc(100vw - 86px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 14px);
    padding: 10px 8px 8px;
    border-width: 3px;
    border-radius: 14px;
  }

  .trail-modal::before {
    inset: 8px;
    border-width: 3px;
    border-radius: 11px;
  }

  .trail-close {
    top: 9px;
    right: 10px;
    width: 42px;
    height: 42px;
    border-width: 3px;
    border-radius: 10px;
    font-size: 28px;
  }

  .trail-modal h2 {
    margin: 0;
    font-size: clamp(28px, 9vw, 44px);
    line-height: 1;
  }

  .trail-shop-header {
    gap: 8px;
    min-height: 50px;
    margin: 2px 48px 6px;
  }

  .trail-balance {
    gap: 5px;
    left: 0;
    margin: 0;
    padding: 3px 9px 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 16px;
    text-shadow: var(--outline-1);
  }

  .trail-scroll-wrap {
    grid-template-columns: 1fr 14px;
    gap: 5px;
  }

  .trail-list {
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 132px);
    gap: 6px;
    padding: 2px 2px 4px 0;
  }

  .trail-scrollbar {
    border-width: 2px;
    border-radius: 12px;
  }

  .trail-scrollbar span {
    top: -2px;
    right: -2px;
    left: -2px;
    min-height: 42px;
    border-width: 2px;
    border-radius: 12px;
  }

  .trail-card {
    grid-template-columns: max-content 1fr minmax(70px, 88px);
    gap: 6px;
    min-height: 58px;
    padding: 5px;
    border-width: 3px;
    border-radius: 10px;
  }

  .trail-preview {
    height: 42px;
    border-radius: 9px;
  }

  .trail-preview::before,
  .trail-preview span {
    inset: 8px 4px;
    border-width: 8px;
  }

  .trail-preview span {
    inset: 20px 16px;
    border-width: 5px;
  }

  .trail-copy {
    gap: 4px;
  }

  .trail-copy strong {
    font-size: clamp(17px, 5.4vw, 23px);
    text-shadow: var(--outline-1);
  }

  .trail-copy span {
    gap: 4px;
    font-size: 12px;
    text-shadow: var(--outline-1);
  }

  .trail-shoe {
    width: 18px;
    height: 18px;
  }

  .trail-buy {
    min-height: 36px;
    gap: 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 12px;
    text-shadow: var(--outline-1);
  }

  .icon-button.skin .skin-icon-slot {
    top: -3px;
    width: 50px;
    height: 27px;
  }

  .skin-icon-image {
    width: 58px;
    height: 40px;
    transform: translateX(-6px);
  }

  .icon-button.skin strong {
    right: 3px;
    bottom: 3px;
    left: 3px;
  }

  .skin-modal {
    width: min(580px, calc(100vw - 86px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 14px);
    padding: 7px 8px 8px;
    border-width: 3px;
    border-radius: 14px;
  }

  .skin-modal::before {
    inset: 8px;
    border-width: 3px;
    border-radius: 11px;
  }

  .skin-close {
    top: 9px;
    right: 10px;
    width: 42px;
    height: 42px;
    border-width: 3px;
    border-radius: 10px;
    font-size: 28px;
  }

  .skin-shop-header {
    min-height: 50px;
    margin: 0 45px 5px 6px;
    justify-content: center;
  }

  .skin-modal h2 {
    margin: 0;
    font-size: clamp(28px, 9vw, 44px);
    line-height: 1;
  }

  .skin-balance {
    gap: 4px;
    left: 0;
    margin: 0;
    padding: 2px 7px 3px;
    border-width: 2px;
    border-radius: 8px;
    font-size: 14px;
    text-shadow: var(--outline-1);
  }

  .skin-balance .trophy-inline-icon {
    width: 22px;
    height: 22px;
  }

  .skin-reset-timer {
    grid-template-columns: 28px auto;
    column-gap: 3px;
    row-gap: 4px;
    padding: 2px 4px 3px 2px;
  border-width: 2px;
  border-radius: 7px;
  }

  .skin-reset-timer > span {
    width: 28px;
    height: 28px;
  }

  .skin-reset-timer em {
    font-size: 10px;
  }

  .skin-reset-timer strong {
    font-size: 11px;
    text-shadow: var(--outline-1);
  }

  .skin-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: clamp(64px, 13.5vh, 82px);
    gap: 7px;
    height: auto;
    min-height: 0;
    padding: 6px;
  }

  .skin-scrollbar {
    display: none;
  }

  .skin-card-shell {
    grid-row: span 2;
    border-radius: 11px;
  }

  .skin-card {
    grid-template-rows: 78px auto 38px;
    gap: 5px;
    min-height: 0;
    padding: 6px;
    border-radius: 11px;
  }

  .skin-card-badge {
    top: 7px;
    left: 7px;
    min-width: 44px;
    padding: 4px 7px 3px;
    border-width: 2px;
    font-size: 12px;
  }

  .skin-card-shell.is-wide {
    grid-column: span 1;
    grid-row: span 2;
  }

  .skin-card-shell.is-tall {
    grid-row: span 2;
  }

  .skin-overlay-active .skin-card-shell .glowing-wrapper,
  .skin-overlay-active .skin-card-shell .glowing-container,
  .skin-overlay-active .skin-card-shell .glowing-container--blur-wrapper,
  .skin-overlay-active .skin-card-shell .glowing-border,
  .skin-overlay-active .skin-card-shell .glowing-border::after {
    border-radius: 13px;
  }

  .skin-preview {
    border-radius: 9px;
  }

  .skin-card.has-skin-image {
    grid-template-rows: 92px auto 38px;
    gap: 4px;
    min-height: 0;
  }

  .skin-card.has-skin-image .skin-preview {
    margin: -1px -1px 0;
    border-radius: 9px 9px 7px 7px;
  }

  .skin-preview-image {
    bottom: 0;
    height: 108px;
    max-width: 94%;
    transform: translateX(-50%);
  }

  .skin-card[data-skin-card="bunny_runner"] .skin-preview-image {
    height: 94px;
    bottom: -5px;
  }

  .skin-card[data-skin-card="default"] .skin-preview-image {
    height: 158px;
    bottom: -68px;
  }

  .skin-card[data-skin-card="street_runner"] .skin-preview-image {
    height: 82px;
    max-width: 86%;
    bottom: 0;
  }

  .skin-card[data-skin-card="pumpkin_kid"] .skin-preview-image,
  .skin-card[data-skin-card="bat_boy"] .skin-preview-image,
  .skin-card[data-skin-card="black_cat"] .skin-preview-image,
  .skin-card[data-skin-card="friendly_ghost"] .skin-preview-image,
  .skin-card[data-skin-card="witchy_wendy"] .skin-preview-image,
  .skin-card[data-skin-card="night_magician"] .skin-preview-image,
  .skin-card[data-skin-card="candy_collector"] .skin-preview-image,
  .skin-card[data-skin-card="skater_cap"] .skin-preview-image {
    height: 148px;
    bottom: -56px;
  }

  .skin-card[data-skin-card="pirate"] .skin-preview-image {
    height: 158px;
    bottom: -66px;
  }

  .skin-card[data-skin-card="winter_hero"] .skin-preview-image {
    top: 50%;
    bottom: auto;
    width: 90%;
    height: auto;
    transform: translate(-50%, -50%);
  }

  .skin-card.has-skin-image .skin-copy {
    margin-top: 0;
  }

  .skin-card-shell.is-tall .skin-preview-image {
    height: 142px;
  }

  .skin-card-shell.is-tall .skin-card[data-skin-card="street_runner"] .skin-preview-image {
    height: 86px;
    max-width: 84%;
    bottom: 0;
  }

  .skin-figure {
    transform: scale(0.68);
  }

  .skin-copy {
    gap: 4px;
  }

  .skin-copy strong {
    font-size: clamp(15px, 4.8vw, 20px);
    text-shadow: var(--outline-1);
  }

  .skin-copy span {
    font-size: 13px;
    text-shadow: var(--outline-1);
  }

  .skin-buy {
    margin-top: 3px;
    min-height: 38px;
    gap: 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 13px;
    text-shadow: var(--outline-1);
  }

  .skin-buy .trophy-inline-icon {
    width: 20px;
    height: 20px;
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  .skin-modal {
    width: min(520px, calc(100vw - 28px));
    padding: 8px 8px 9px;
  }

  .skin-close {
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    font-size: 25px;
  }

  .skin-shop-header {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    grid-template-areas:
      "title title"
      "balance reset";
    gap: 6px;
    align-items: center;
    min-height: 0;
    margin: 0 0 6px;
    padding-right: 2px;
  }

  .skin-modal h2 {
    grid-area: title;
    justify-self: center;
    width: calc(100% - 90px);
    min-width: 0;
    padding: 0;
    font-size: clamp(27px, 10vw, 40px);
  }

  .skin-balance,
  .skin-reset-timer {
    position: static;
    top: auto;
    right: auto;
    left: auto;
    max-width: 100%;
    transform: none;
  }

  .skin-balance {
    grid-area: balance;
    justify-self: start;
    min-width: 0;
    padding: 2px 6px 3px;
    font-size: 13px;
  }

  .skin-balance .trophy-inline-icon {
    width: 20px;
    height: 20px;
  }

  .skin-reset-timer {
    grid-area: reset;
    justify-self: end;
    grid-template-columns: 24px minmax(0, auto);
    column-gap: 2px;
    row-gap: 3px;
    min-width: 0;
    padding: 2px 4px 3px 1px;
  }

  .skin-reset-timer > span {
    width: 24px;
    height: 24px;
  }

  .skin-reset-timer em {
    overflow: hidden;
    max-width: 78px;
    font-size: 9px;
    text-overflow: ellipsis;
  }

  .skin-reset-timer strong {
    gap: 2px;
    font-size: 10px;
  }

  .skin-list {
    height: auto;
  }

  .skin-scrollbar {
    display: none;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .skin-modal {
    width: min(720px, calc(100vw - 86px));
    padding: 6px 8px 8px;
  }

  .skin-shop-header {
    min-height: 38px;
    margin: 0 42px 4px 4px;
  }

  .skin-modal h2 {
    font-size: clamp(24px, 5vw, 34px);
  }

  .skin-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: clamp(53px, 15vh, 66px);
    gap: 6px;
    padding: 5px;
  }

  .skin-card {
    grid-template-rows: minmax(0, 1fr) auto 30px;
    gap: 3px;
    padding: 5px;
  }

  .skin-card.has-skin-image {
    grid-template-rows: minmax(0, 1fr) auto 30px;
  }

  .skin-preview-image {
    height: 82px;
  }

  .skin-card[data-skin-card="bunny_runner"] .skin-preview-image {
    height: 82px;
    bottom: -3px;
  }

  .skin-card[data-skin-card="default"] .skin-preview-image,
  .skin-card[data-skin-card="pumpkin_kid"] .skin-preview-image,
  .skin-card[data-skin-card="bat_boy"] .skin-preview-image,
  .skin-card[data-skin-card="black_cat"] .skin-preview-image,
  .skin-card[data-skin-card="friendly_ghost"] .skin-preview-image,
  .skin-card[data-skin-card="witchy_wendy"] .skin-preview-image,
  .skin-card[data-skin-card="night_magician"] .skin-preview-image,
  .skin-card[data-skin-card="candy_collector"] .skin-preview-image,
  .skin-card[data-skin-card="skater_cap"] .skin-preview-image,
  .skin-card[data-skin-card="pirate"] .skin-preview-image {
    height: 104px;
    bottom: -38px;
  }

  .skin-card[data-skin-card="street_runner"] .skin-preview-image {
    height: 68px;
  }

  .skin-copy strong {
    font-size: clamp(13px, 3.2vw, 17px);
  }

  .skin-buy {
    min-height: 30px;
    margin-top: 1px;
    border-width: 2px;
    border-radius: 8px;
    font-size: 12px;
  }

  .stage-question {
    top: calc(env(safe-area-inset-top, 0px) + 46px);
  }

  .revive-offer {
    top: calc(env(safe-area-inset-top, 0px) + 120px);
    grid-template-columns: 18px auto 18px;
    gap: 2px;
    width: fit-content;
    max-width: min(240px, calc(100vw - 124px));
    min-height: 30px;
    padding: 3px 6px 4px;
    border-width: 2px;
    border-radius: 8px;
    font-size: clamp(10px, 2.45vw, 14px);
    text-shadow: var(--outline-1);
  }

  .revive-offer strong {
    padding-inline: 0.06em;
    white-space: nowrap;
  }

  .revive-offer-wing {
    display: block;
    width: 18px;
    height: 14px;
  }

  .rebirth-modal {
    width: min(500px, calc(100vw - 116px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 14px);
    overflow-y: auto;
    padding: 9px 13px 12px;
    border-width: 3px;
    border-radius: 14px;
  }

  .rebirth-modal::before {
    inset: 5px;
    border-width: 2px;
    border-radius: 10px;
  }

  .rebirth-close,
  .trail-close,
  .daily-close {
    top: 6px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 22px;
  }

  .rebirth-kicker {
    margin-top: 0;
    margin-bottom: 4px;
    padding: 3px 9px 5px;
    border-width: 2px;
    font-size: 12px;
  }

  .rebirth-modal h2 {
    gap: 2px;
    margin: 0 38px 4px;
    font-size: clamp(24px, 4.8vw, 34px);
    text-shadow: var(--outline-2);
  }

  .rebirth-title-icon {
    width: 48px;
    height: 48px;
  }

  .rebirth-level {
    width: min(240px, 72%);
    margin-bottom: 6px;
    padding: 6px 9px;
    border-width: 3px;
    border-radius: 10px;
    font-size: clamp(20px, 4vw, 29px);
  }

  .rebirth-multiplier-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 3px;
    margin-bottom: 5px;
  }

  .rebirth-multiplier-card {
    min-height: 48px;
    padding: 5px 2px;
    border-width: 3px;
    border-radius: 9px;
    font-size: clamp(10px, 2.1vw, 15px);
    text-shadow: var(--outline-1);
  }

  .rebirth-speed-icon {
    width: 52px;
  }

  .rebirth-arrow {
    font-size: 22px;
  }

  .rebirth-modal p {
    margin: 3px 0 5px;
    font-size: 14px;
    text-shadow: var(--outline-1);
  }

  .rebirth-progress {
    padding: 5px 9px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 18px;
  }

  .rebirth-actions {
    grid-template-columns: minmax(170px, 280px);
    margin-top: 7px;
  }

  .rebirth-button {
    min-height: 42px;
    border-width: 3px;
    border-radius: 10px;
    font-size: 23px;
  }

  .trail-modal {
    width: min(480px, calc(100vw - 156px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 14px);
    padding: 9px 9px 8px;
    border-width: 3px;
    border-radius: 14px;
  }

  .trail-modal::before {
    inset: 5px;
    border-width: 2px;
    border-radius: 10px;
  }

  .trail-modal h2 {
    margin: 0;
    font-size: clamp(22px, 4vw, 28px);
    line-height: 1.05;
    text-shadow: var(--outline-3);
  }

  .trail-shop-header {
    gap: 7px;
    min-height: 38px;
    margin: 1px 38px 4px;
  }

  .trail-balance {
    gap: 5px;
    margin: 0;
    padding: 3px 9px 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 16px;
    text-shadow: var(--outline-1);
  }

  .trophy-inline-icon {
    width: 27px;
    height: 27px;
  }

  .trail-list {
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 82px);
    gap: 4px;
    padding-right: 2px;
  }

  .trail-scroll-wrap {
    grid-template-columns: 1fr 14px;
    gap: 5px;
  }

  .trail-list::-webkit-scrollbar {
    display: none;
  }

  .trail-scrollbar {
    border-width: 2px;
    border-radius: 12px;
  }

  .trail-scrollbar span {
    top: -2px;
    right: -2px;
    left: -2px;
    min-height: 42px;
    border-width: 2px;
    border-radius: 12px;
  }

  .trail-card {
    grid-template-columns: max-content 1fr minmax(64px, 80px);
    gap: 5px;
    min-height: 49px;
    padding: 4px;
    border-width: 3px;
    border-radius: 10px;
  }

  .trail-preview {
    height: 34px;
    border-radius: 9px;
  }

  .trail-preview::before,
  .trail-preview span {
    inset: 8px 4px;
    border-width: 8px;
  }

  .trail-preview span {
    inset: 20px 16px;
    border-width: 5px;
  }

  .trail-copy {
    gap: 4px;
  }

  .trail-copy strong {
    font-size: clamp(15px, 2.9vw, 19px);
    text-shadow: var(--outline-1);
  }

  .trail-copy span {
    gap: 4px;
    font-size: 11px;
    text-shadow: var(--outline-1);
  }

  .trail-shoe {
    width: 18px;
    height: 18px;
  }

  .trail-buy {
    min-height: 32px;
    gap: 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 12px;
    text-shadow: var(--outline-1);
  }

  .daily-modal {
    width: min(580px, calc(100vw - 156px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 14px);
    overflow: hidden;
    padding: 10px 8px 8px;
    border-width: 3px;
    border-radius: 14px;
  }

  .daily-modal .daily-title-box {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: max-content;
    margin: 0 auto 8px;
    padding: 1px 9px 3px 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: clamp(17px, 3.4vw, 22px);
    text-shadow: var(--outline-3);
  }

  .daily-calendar {
    width: 28px;
    height: 28px;
  }

  .daily-calendar img {
    width: 50px;
    height: 48px;
    transform: translate(-10px, -8px);
  }

  .daily-reward-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px 5px;
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 76px);
    overflow-y: auto;
    padding: 15px 2px 5px;
  }

  .daily-card {
    grid-template-rows: 32px minmax(21px, auto) minmax(24px, auto);
    row-gap: 3px;
    min-height: 88px;
    padding: 14px 4px 5px;
    border-width: 3px;
    border-radius: 9px;
  }

  .daily-day {
    top: -16px;
    min-width: 46px;
    padding: 3px 5px 4px;
    border-width: 2px;
    border-radius: 7px;
    font-size: 11px;
    text-shadow: var(--outline-1);
  }

  .daily-duration {
    top: 6px;
    right: -3px;
    gap: 2px;
    padding: 2px 5px 4px;
    border-width: 2px;
    font-size: 10px;
    text-shadow: var(--outline-1);
  }

  .daily-clock {
    width: 12px;
    height: 12px;
  }

  .daily-icon {
    width: 56px;
    height: 32px;
  }

  .daily-icon img {
    height: 30px;
    max-width: 56px;
  }

  .daily-icon-trail img {
    height: 46px;
    max-width: 74px;
  }

  .daily-icon-treadmill img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
  }

  .daily-icon-skin img {
    top: -18px;
    left: 50%;
    width: 82px;
    height: 96px;
    transform: translateX(-50%);
  }

  .daily-card strong,
  .daily-card-day-4 strong {
    min-height: 26px;
    font-size: 11px;
    text-shadow: var(--outline-1);
    white-space: normal;
  }

  .daily-card-day-2 strong {
    white-space: nowrap;
  }

  .daily-card button {
    min-height: 27px;
    padding: 2px 4px 4px;
    border-width: 2px;
    border-radius: 7px;
    font-size: 11px;
  }

  .daily-countdown-text {
    font-size: 13px;
  }

  .hearts-title .speed-title-copy strong {
    top: 6px;
    transform: translateX(-50%);
  }

  .stage-strip,
  .progress-label {
    -webkit-text-stroke: 0.55px #050306;
    text-shadow: var(--bottom-label-outline);
  }

  .is-safari .stage-strip,
  .is-safari .progress-label {
    -webkit-text-stroke: 0.55px #050306;
    text-shadow: var(--bottom-label-outline);
  }

  .math-quiz-modal {
    width: min(640px, calc(100vw - 144px));
  }

  .math-quiz-form {
    width: min(410px, 100%);
  }

  .math-quiz-keypad {
    width: min(520px, 100%);
    gap: 7px;
  }

  .math-quiz-keypad button {
    min-height: 38px;
    border-radius: 9px;
    font-size: 18px;
  }
}

@media (orientation: landscape) {
  .has-touch-controls .revive-offer {
    top: calc(env(safe-area-inset-top, 0px) + 120px);
    grid-template-columns: 18px auto 18px;
    gap: 2px;
    width: fit-content;
    max-width: min(240px, calc(100vw - 124px));
    min-height: 30px;
    padding: 3px 6px 4px;
    border-width: 2px;
    border-radius: 8px;
    font-size: clamp(10px, 2.45vw, 14px);
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .revive-offer strong {
    padding-inline: 0.06em;
    white-space: nowrap;
  }

  .has-touch-controls .revive-offer-wing {
    display: block;
    width: 18px;
    height: 14px;
  }

  .has-touch-controls .rebirth-modal,
  .has-touch-controls .trail-modal {
    width: min(480px, calc(100vw - 156px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 14px);
    overflow-y: auto;
    padding: 9px 9px 8px;
    border-width: 3px;
    border-radius: 14px;
  }

  .has-touch-controls .rebirth-modal {
    width: min(500px, calc(100vw - 116px));
  }

  .has-touch-controls .rebirth-modal::before,
  .has-touch-controls .trail-modal::before {
    inset: 5px;
    border-width: 2px;
    border-radius: 10px;
  }

  .has-touch-controls .rebirth-close,
  .has-touch-controls .trail-close,
  .has-touch-controls .daily-close {
    top: 6px;
    right: 8px;
    width: 34px;
    height: 34px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 22px;
  }

  .has-touch-controls .rebirth-kicker {
    margin-top: 0;
    margin-bottom: 4px;
    padding: 3px 9px 5px;
    border-width: 2px;
    font-size: 12px;
  }

  .has-touch-controls .rebirth-modal h2,
  .has-touch-controls .trail-modal h2 {
    margin: 0;
    font-size: clamp(22px, 4vw, 28px);
    line-height: 1.05;
    text-shadow: var(--outline-3);
  }

  .has-touch-controls .rebirth-modal h2 {
    gap: 2px;
  }

  .has-touch-controls .trail-shop-header {
    gap: 7px;
    min-height: 38px;
    margin: 1px 38px 4px;
  }

  .has-touch-controls .rebirth-title-icon {
    width: 48px;
    height: 48px;
  }

  .has-touch-controls .rebirth-level {
    width: min(240px, 72%);
    margin-bottom: 6px;
    padding: 6px 9px;
    border-width: 3px;
    border-radius: 10px;
    font-size: clamp(20px, 4vw, 29px);
  }

  .has-touch-controls .rebirth-multiplier-row {
    gap: 3px;
    margin-bottom: 5px;
  }

  .has-touch-controls .rebirth-multiplier-card {
    min-height: 48px;
    padding: 5px 2px;
    border-width: 3px;
    border-radius: 9px;
    font-size: clamp(10px, 2.15vw, 15px);
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .rebirth-speed-icon {
    width: 52px;
  }

  .has-touch-controls .rebirth-arrow {
    font-size: 22px;
  }

  .has-touch-controls .rebirth-modal p {
    margin: 3px 0 5px;
    font-size: 14px;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .rebirth-progress {
    padding: 5px 9px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 18px;
  }

  .has-touch-controls .rebirth-actions {
    grid-template-columns: minmax(170px, 280px);
    margin-top: 7px;
  }

  .has-touch-controls .rebirth-button {
    min-height: 42px;
    border-width: 3px;
    border-radius: 10px;
    font-size: 23px;
  }

  .has-touch-controls .trail-balance {
    gap: 5px;
    margin: 0;
    padding: 3px 9px 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 16px;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .trophy-inline-icon {
    width: 27px;
    height: 27px;
  }

  .has-touch-controls .trail-list {
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 82px);
    gap: 4px;
    padding-right: 2px;
  }

  .has-touch-controls .trail-scroll-wrap {
    grid-template-columns: 1fr 14px;
    gap: 5px;
  }

  .has-touch-controls .trail-scrollbar {
    border-width: 2px;
    border-radius: 12px;
  }

  .has-touch-controls .trail-scrollbar span {
    top: -2px;
    right: -2px;
    left: -2px;
    min-height: 42px;
    border-width: 2px;
    border-radius: 12px;
  }

  .has-touch-controls .trail-card {
    grid-template-columns: max-content 1fr minmax(64px, 80px);
    gap: 5px;
    min-height: 49px;
    padding: 4px;
    border-width: 3px;
    border-radius: 10px;
  }

  .has-touch-controls .trail-preview {
    height: 34px;
    border-radius: 9px;
  }

  .has-touch-controls .trail-copy strong {
    font-size: clamp(15px, 2.9vw, 19px);
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .trail-copy span {
    gap: 4px;
    font-size: 11px;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .trail-shoe {
    width: 18px;
    height: 18px;
  }

  .has-touch-controls .trail-buy {
    min-height: 32px;
    gap: 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 12px;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .daily-modal {
    width: min(580px, calc(100vw - 156px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 14px);
    overflow: hidden;
    padding: 10px 8px 8px;
    border-width: 3px;
    border-radius: 14px;
  }

  .has-touch-controls .daily-modal .daily-title-box {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: max-content;
    margin: 0 auto 8px;
    padding: 1px 9px 3px 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: clamp(17px, 3.4vw, 22px);
    text-shadow: var(--outline-3);
  }

  .has-touch-controls .daily-calendar {
    width: 28px;
    height: 28px;
  }

  .has-touch-controls .daily-calendar img {
    width: 50px;
    height: 48px;
    transform: translate(-10px, -8px);
  }

  .has-touch-controls .daily-reward-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px 5px;
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 76px);
    overflow-y: auto;
    padding: 15px 2px 5px;
  }

  .has-touch-controls .daily-card {
    grid-template-rows: 32px minmax(21px, auto) minmax(24px, auto);
    row-gap: 3px;
    min-height: 88px;
    padding: 14px 4px 5px;
    border-width: 3px;
    border-radius: 9px;
  }

  .has-touch-controls .daily-day {
    top: -16px;
    min-width: 46px;
    padding: 3px 5px 4px;
    border-width: 2px;
    border-radius: 7px;
    font-size: 11px;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .daily-duration {
    top: 6px;
    right: -3px;
    gap: 2px;
    padding: 2px 5px 4px;
    border-width: 2px;
    font-size: 10px;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .daily-clock {
    width: 12px;
    height: 12px;
  }

  .has-touch-controls .daily-icon {
    width: 56px;
    height: 32px;
  }

  .has-touch-controls .daily-icon img {
    height: 30px;
    max-width: 56px;
  }

  .has-touch-controls .daily-icon-trail img {
    height: 46px;
    max-width: 74px;
  }

  .has-touch-controls .daily-icon-treadmill img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
  }

  .has-touch-controls .daily-icon-skin img {
    top: -18px;
    left: 50%;
    width: 82px;
    height: 96px;
    transform: translateX(-50%);
  }

  .has-touch-controls .daily-card strong,
  .has-touch-controls .daily-card-day-4 strong {
    min-height: 26px;
    font-size: 11px;
    text-shadow: var(--outline-1);
    white-space: normal;
  }

  .has-touch-controls .daily-card-day-2 strong {
    white-space: nowrap;
  }

  .has-touch-controls .daily-card button {
    min-height: 27px;
    padding: 2px 4px 4px;
    border-width: 2px;
    border-radius: 7px;
    font-size: 11px;
  }

  .has-touch-controls .daily-countdown-text {
    font-size: 13px;
  }

  .has-touch-controls .hearts-title .speed-title-copy strong {
    top: 6px;
    transform: translateX(-50%);
  }

  .has-touch-controls .stage-strip,
  .has-touch-controls .progress-label {
    -webkit-text-stroke: 0.55px #050306;
    text-shadow: var(--bottom-label-outline);
  }

  .has-touch-controls .math-quiz-modal {
    width: min(640px, calc(100vw - 144px));
  }

  .has-touch-controls .math-quiz-form {
    width: min(410px, 100%);
  }

  .has-touch-controls .math-quiz-keypad {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(360px, 100%);
    gap: 7px;
  }

  .has-touch-controls .math-quiz-keypad button {
    min-height: 38px;
    border-radius: 9px;
    font-size: 18px;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .hud-top {
    top: max(5px, env(safe-area-inset-top, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    left: max(8px, env(safe-area-inset-left, 0px));
  }

  .top-hud {
    position: relative;
    justify-content: center;
  }

  .speed-title {
    width: min(258px, 32vw);
    min-height: 34px;
    margin-left: 0;
    font-size: clamp(20px, 3.5vw, 27px);
    transform: none;
  }

  .hearts-title {
    top: 1px;
    right: 0;
    left: auto;
    width: clamp(108px, 15vw, 122px);
    height: 34px;
    min-height: 34px;
    border-width: 3px;
    border-radius: 10px;
    font-size: clamp(18px, 3vw, 23px);
  }

  .hearts-title-icon {
    left: -24px;
    width: 46px;
    height: 46px;
  }

  .hearts-title .speed-title-copy strong {
    left: 50%;
    top: 6px;
    font-size: 0.86em;
    transform: translateX(-50%);
  }

  .hearts-title .speed-title-copy span {
    top: 23px;
    left: 6px;
    font-size: 8px;
  }

  .hud-left {
    top: calc(env(safe-area-inset-top, 0px) + 44px);
    left: 8px;
    width: 44px;
    gap: 3px;
    grid-template-columns: 44px;
    justify-items: start;
    align-items: start;
    justify-content: start;
  }

  .is-samsung-galaxy-tablet .hud-left {
    top: calc(env(safe-area-inset-top, 0px) + 78px);
  }

  .is-ipad .hud-left {
    top: calc(env(safe-area-inset-top, 0px) + 78px);
  }

  .is-samsung-galaxy-tablet #topSpeedValue {
    top: 7px;
  }

  .leaderboard {
    top: calc(env(safe-area-inset-top, 0px) + 56px);
    right: calc(env(safe-area-inset-right, 0px) + 5px);
    width: 166px;
  }

  .wins-badge {
    width: 44px;
    margin-left: 0;
    gap: 0;
    font-size: 19px;
    justify-content: start;
  }

  .wins-badge span {
    width: 27px;
    height: 27px;
  }

  .trophy-icon-image {
    width: 24px;
    height: 24px;
  }

  .menu-grid {
    grid-template-columns: 42px;
    gap: 4px;
    justify-content: start;
    justify-items: start;
    margin-left: 0;
    transform: translateX(0);
  }

  .icon-button {
    width: 42px;
    height: 42px;
    justify-self: start;
  }

  .icon-button span,
  .icon-button .rebirth-icon-slot,
  .icon-button .trail-icon-slot,
  .icon-button .gift-icon-slot {
    width: 30px;
    height: 25px;
  }

  .icon-button strong {
    font-size: 8px;
  }

  .mobile-stick {
    left: 22px;
    bottom: 18px;
    width: 82px;
    height: 82px;
  }

  .mobile-stick span {
    width: 34px;
    height: 34px;
  }

  .mobile-jump {
    right: 24px;
    bottom: 18px;
    width: 72px;
    height: 72px;
    font-size: 13px;
  }

  .is-samsung-galaxy-tablet .mobile-stick {
    left: 22px;
    bottom: 18px;
    width: 112px;
    height: 112px;
  }

  .is-samsung-galaxy-tablet .mobile-stick span {
    width: 48px;
    height: 48px;
  }

  .is-samsung-galaxy-tablet .mobile-jump {
    right: 24px;
    bottom: 18px;
    width: 96px;
    height: 96px;
  }

  .hud-bottom {
    right: 108px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
    left: 108px;
  }

  .is-samsung-galaxy-tablet .hud-bottom {
    right: 130px;
    left: 130px;
  }

  .progress-wrap {
    max-width: 440px;
  }

  .stage-strip {
    width: min(170px, 30vw);
    margin-bottom: 3px;
    padding: 2px 8px 4px;
    font-size: 12px;
  }

  .progress-track {
    height: 32px;
  }

  .progress-label {
    overflow: hidden;
    flex-wrap: nowrap;
    padding: 1px 9px 0;
    font-size: clamp(11px, 2.3vw, 15px);
    line-height: 1;
  }

  .is-samsung-galaxy-tablet .progress-label {
    align-items: stretch;
    padding-top: 0;
  }

  .is-samsung-galaxy-tablet .progress-label span {
    align-items: center;
    height: 100%;
  }

  .is-samsung-galaxy-tablet .progress-label #speed .hud-outlined-text-canvas {
    transform: translateY(calc(-50% + 2px));
  }

  .stage-strip,
  .progress-label {
    -webkit-text-stroke: 0.55px #050306;
    paint-order: stroke fill;
    text-shadow: var(--bottom-label-outline);
  }

  .is-safari .stage-strip,
  .is-safari .progress-label {
    -webkit-text-stroke: 0.55px #050306;
    text-shadow: var(--bottom-label-outline);
  }

  .speed-title-copy strong {
    text-shadow: 0 1px 0 #050306;
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  .speed-title {
    width: min(162px, calc(100vw - 207px));
    margin-left: 64px;
  }

  .speed-title-icon {
    left: -12px;
    width: 42px;
    height: 42px;
    font-size: 36px;
  }

  .speed-title-copy span {
    left: 18px;
  }

  .progress-label {
    align-items: center;
    padding: 0 7px;
    line-height: 1;
  }

  .progress-label span {
    display: flex;
    align-items: center;
    min-height: 100%;
    padding-top: 0;
    padding-bottom: 0;
  }

  .progress-label #level,
  .progress-label #speed {
    align-self: stretch;
  }

  .progress-label #speed {
    transform: none;
  }

  .revive-offer,
  .has-touch-controls .revive-offer {
    grid-template-columns: 18px auto 18px;
    gap: 2px;
    width: fit-content;
    max-width: min(240px, calc(100vw - 124px));
    min-height: 30px;
    padding: 3px 6px 4px;
    font-size: clamp(10px, 2.45vw, 14px);
  }

  .revive-offer strong,
  .has-touch-controls .revive-offer strong {
    padding-inline: 0.06em;
    white-space: nowrap;
  }

  .revive-offer-wing,
  .has-touch-controls .revive-offer-wing {
    display: block;
    width: 18px;
    height: 14px;
  }
}

/* Final HUD sizing guard: avoid viewport-resize font wobble in the top bars. */
.speed-title,
.hearts-title {
  width: 260px;
  font-size: 38px;
}

.hearts-title {
  width: 178px;
  font-size: 36px;
}

.speed-title-copy strong,
.hearts-title .speed-title-copy strong {
  font-size: 31px;
}

#topSpeedValue {
  top: 4px;
}

.hearts-title .speed-title-copy strong {
  left: 50%;
  top: 6px;
  font-size: 31px;
  transform: translateX(-50%);
}

.speed-title-copy span,
.hearts-title .speed-title-copy span {
  font-size: 18px;
}

@media (pointer: coarse) {
  .speed-title {
    width: 172px;
    font-size: 26px;
  }

  .hearts-title {
    width: 112px;
    height: 36px;
    min-height: 36px;
    font-size: 23px;
  }

  .speed-title-copy strong {
    top: 6px;
    font-size: 22px;
  }

  .hearts-title .speed-title-copy strong {
    left: 54%;
    top: 7px;
    font-size: 20px;
  }

  .speed-title-copy span {
    top: 23px;
    font-size: 11px;
  }

  .hearts-title .speed-title-copy span {
    top: 24px;
    font-size: 9px;
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  .speed-title {
    width: min(162px, calc(100vw - 207px));
    font-size: 25px;
  }

  .hearts-title {
    width: 112px;
    font-size: 23px;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .speed-title {
    width: min(222px, 31vw);
    font-size: 26px;
    transform: translateX(-62px);
  }

  .hearts-title {
    top: 1px;
    left: calc(50% + 78px);
    right: auto;
    width: min(126px, 18vw);
    font-size: 23px;
  }

  .sound-toggle {
    top: calc(env(safe-area-inset-top, 0px) + 4px);
    left: calc(env(safe-area-inset-left, 0px) + 4px);
    right: auto;
  }

  .leaderboard {
    top: calc(env(safe-area-inset-top, 0px) + 70px);
    right: env(safe-area-inset-right, 0px);
    width: min(194px, 25vw);
    padding: 6px 7px 2px;
  }

  .leaderboard-header {
    margin-bottom: 5px;
  }

  .leaderboard-header strong {
    font-size: 12px;
    line-height: 1.1;
  }

  .leaderboard-room-code {
    display: inline-block;
    margin-top: 0;
    margin-left: 0;
    font-size: 10px;
    line-height: 1.05;
  }

  .hud-bottom {
    right: 118px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 42px);
    left: 118px;
  }

  .stage-strip {
    width: min(178px, calc(100vw - 44px));
    height: auto;
    margin-bottom: 4px;
  }

  .mobile-stick {
    left: calc(env(safe-area-inset-left, 0px) + 54px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  }

  .mobile-jump {
    right: calc(env(safe-area-inset-right, 0px) + 14px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  }
}

@media (pointer: coarse) {
  .hud-right {
    top: calc(env(safe-area-inset-top, 0px) + 156px);
    right: calc(env(safe-area-inset-right, 0px) + 8px);
    display: grid;
    gap: 8px;
    justify-items: end;
  }

  .hud-right .panel {
    display: none;
  }

  .hud-right .panel-compact-stat {
    position: relative;
    display: grid;
    width: 54px;
    min-height: 58px;
    align-content: center;
    justify-items: center;
    padding: 6px 4px 7px;
    border: 3px solid #160816;
    border-radius: 12px;
    background:
      radial-gradient(circle at 28% 14%, rgba(255, 255, 255, 0.58), transparent 25%),
      linear-gradient(180deg, #ffc5f3 0%, #ff82d8 48%, #e64fbc 100%);
    text-align: center;
    overflow: visible;
    pointer-events: auto;
    box-shadow:
      inset 0 4px 0 rgba(255, 255, 255, 0.32),
      0 5px 0 rgba(0, 0, 0, 0.36),
      0 9px 16px rgba(0, 0, 0, 0.24);
  }

  .hud-right .panel-compact-stat::before {
    inset: 5px;
    border: 1px dashed rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 52%),
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 4px, transparent 4px 10px);
  }

  .hud-right .panel-compact-stat .multiplier-label {
    display: block;
    position: relative;
    max-width: 100%;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 9px;
    line-height: 0.96;
    text-shadow: var(--outline-1);
  }

  .hud-right .panel-compact-stat .multiplier-label::after {
    content: attr(data-label);
    position: absolute;
    inset: 0;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    pointer-events: none;
  }

  .hud-right .panel-compact-stat strong {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    text-shadow: var(--outline-1);
    box-shadow: none;
  }

  .hud-right .panel-compact-stat > #boost {
    -webkit-text-stroke: 0;
    paint-order: normal;
    text-shadow:
      -1px -1px 0 #050306,
      0 -1px 0 #050306,
      1px -1px 0 #050306,
      -1px 0 0 #050306,
      1px 0 0 #050306,
      -1px 1px 0 #050306,
      0 1px 0 #050306,
      1px 1px 0 #050306;
  }

  .emoji-hud-button {
    width: 48px;
    height: 48px;
    margin-right: 0;
    padding: 3px;
    border-width: 2px;
    border-radius: 9px;
    box-shadow:
      inset 0 3px 0 rgba(255, 255, 255, 0.36),
      0 4px 0 rgba(0, 0, 0, 0.35),
      0 7px 14px rgba(0, 0, 0, 0.24);
  }

  .custom-speed-button {
    width: 48px;
    height: 48px;
    padding: 3px;
    border-width: 2px;
    border-radius: 9px;
    box-shadow:
      inset 0 3px 0 rgba(255, 255, 255, 0.36),
      0 4px 0 rgba(0, 0, 0, 0.35),
      0 7px 14px rgba(0, 0, 0, 0.24);
  }

  .custom-speed-button::before {
    inset: 5px;
    border-radius: 6px;
  }

  .custom-speed-icon {
    top: 0;
    width: 42px;
    height: 28px;
    border-radius: 6px;
  }

  .custom-speed-icon img {
    width: 39px;
    height: 34px;
  }

  .custom-speed-button strong {
    margin-bottom: -2px;
    font-size: 9px;
    line-height: 1;
    white-space: nowrap;
  }

  .emoji-hud-button::before {
    inset: 5px;
    border-radius: 6px;
  }

  .emoji-hud-icon {
    top: -1px;
    width: 42px;
    height: 30px;
  }

  .emoji-hud-icon img {
    width: 42px;
    height: 35px;
  }

  .emoji-hud-icon.character-hud-icon {
    top: 0;
  }

  .emoji-hud-icon.character-hud-icon img {
    width: 35px;
    height: 29px;
  }

  .emoji-hud-button strong {
    margin-bottom: 0;
    font-size: 9px;
    -webkit-text-stroke: 0.55px #050306;
    text-shadow: var(--bottom-label-outline);
  }

  .emoji-hud-button.character-hud-button strong {
    font-size: 8px;
  }

  .emoji-menu {
    top: calc(env(safe-area-inset-top, 0px) + 144px);
    right: calc(env(safe-area-inset-right, 0px) + 62px);
    grid-template-columns: repeat(4, 43px);
    gap: 6px;
    padding: 12px;
    border-width: 3px;
    border-radius: 13px;
  }

  .emoji-menu::before {
    inset: 8px;
    border-width: 2px;
    border-radius: 9px;
  }

  .custom-speed-modal {
    width: min(340px, calc(100vw - 22px));
    padding: 18px 16px 16px;
    border-width: 4px;
    border-radius: 15px;
  }

  .custom-speed-modal::before {
    inset: 9px;
    border-width: 2px;
  }

  .custom-speed-close {
    top: -13px;
    right: -10px;
    width: 34px;
    height: 34px;
    border-width: 3px;
    font-size: 16px;
  }

  .custom-speed-modal h2 {
    margin-bottom: 9px;
    font-size: clamp(23px, 7vw, 32px);
    white-space: nowrap;
  }

  .custom-speed-readout {
    min-width: 112px;
    margin-bottom: 12px;
    padding: 6px 12px 8px;
  }

  .custom-speed-readout strong {
    margin-top: 5px;
    font-size: 16px;
    text-shadow: var(--outline-1);
  }

  .custom-speed-slider {
    height: 30px;
  }

  .custom-speed-slider::-webkit-slider-thumb {
    width: 34px;
    height: 34px;
  }

  .custom-speed-scale {
    font-size: 11px;
  }

  .custom-speed-max-mini {
    min-width: 70px;
    margin-bottom: 9px;
    padding: 3px 7px 5px;
    border-width: 2px;
    font-size: 10px;
  }

  .custom-speed-apply {
    min-width: 128px;
    padding: 7px 12px 9px;
    font-size: 14px;
  }

  .emoji-choice {
    width: 43px;
    height: 43px;
    padding: 2px;
    border-width: 2px;
    border-radius: 11px;
  }

  .emoji-choice img {
    width: 34px;
    height: 34px;
  }

  .emoji-shortcut {
    top: -5px;
    left: -5px;
    width: 16px;
    height: 16px;
    border-width: 1px;
    font-size: 10px;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  .hud-right {
    top: calc(env(safe-area-inset-top, 0px) + 184px);
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  .has-touch-controls .trail-modal,
  .trail-modal {
    width: min(390px, calc(100vw - 28px));
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 58px);
    overflow: hidden;
    padding: 10px 8px 9px;
    border-width: 3px;
    border-radius: 14px;
  }

  .has-touch-controls .trail-modal::before,
  .trail-modal::before {
    inset: 6px;
    border-width: 2px;
    border-radius: 10px;
  }

  .has-touch-controls .trail-close,
  .trail-close {
    top: 7px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 23px;
  }

  .has-touch-controls .trail-shop-header,
  .trail-shop-header {
    display: grid;
    grid-template-columns: minmax(82px, max-content) minmax(0, 1fr);
    gap: 5px;
    align-items: center;
    min-height: 42px;
    margin: 0 42px 7px 0;
  }

  .has-touch-controls .trail-modal h2,
  .trail-modal h2 {
    justify-self: center;
    font-size: clamp(24px, 7vw, 32px);
    line-height: 1.04;
    white-space: nowrap;
    text-shadow: var(--outline-2);
  }

  .has-touch-controls .trail-balance,
  .trail-balance {
    position: static;
    display: inline-flex;
    gap: 5px;
    min-height: 32px;
    margin: 0;
    padding: 3px 6px 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: clamp(15px, 4.2vw, 19px);
    line-height: 1.05;
    overflow: visible;
    transform: none;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .trophy-inline-icon,
  .trophy-inline-icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
  }

  .has-touch-controls .trail-scroll-wrap,
  .trail-scroll-wrap {
    grid-template-columns: minmax(0, 1fr) 14px;
    gap: 5px;
  }

  .has-touch-controls .trail-list,
  .trail-list {
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 126px);
    gap: 6px;
    overflow-y: auto;
    padding: 2px 2px 5px 0;
    touch-action: pan-y;
  }

  .has-touch-controls .trail-card,
  .trail-card {
    grid-template-columns: max-content minmax(0, 1fr) minmax(74px, 92px);
    grid-template-areas: "preview copy buy";
    gap: 6px;
    align-items: center;
    min-height: 58px;
    padding: 5px;
    border-width: 3px;
    border-radius: 10px;
    overflow: hidden;
  }

  .has-touch-controls .trail-preview,
  .trail-preview {
    grid-area: preview;
    height: 38px;
    border-radius: 9px;
  }

  .has-touch-controls .trail-preview::before,
  .trail-preview::before,
  .has-touch-controls .trail-preview span,
  .trail-preview span {
    inset: 8px 4px;
    border-width: 7px;
  }

  .has-touch-controls .trail-preview span,
  .trail-preview span {
    inset: 19px 14px;
    border-width: 4px;
  }

  .has-touch-controls .trail-copy,
  .trail-copy {
    grid-area: copy;
    gap: 5px;
    min-width: 0;
    overflow: visible;
  }

  .has-touch-controls .trail-copy strong,
  .trail-copy strong {
    display: block;
    overflow: hidden;
    font-size: clamp(16px, 4.6vw, 22px);
    line-height: 1.04;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .trail-copy span,
  .trail-copy span {
    gap: 4px;
    font-size: clamp(11px, 3.2vw, 14px);
    line-height: 1.05;
    white-space: nowrap;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .trail-shoe,
  .trail-shoe {
    width: 18px;
    height: 18px;
  }

  .has-touch-controls .trail-buy,
  .trail-buy {
    grid-area: buy;
    width: 100%;
    min-height: 38px;
    gap: 3px;
    padding: 3px 4px;
    border-width: 3px;
    border-radius: 9px;
    font-size: clamp(12px, 3.4vw, 16px);
    line-height: 1;
    overflow: hidden;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .trail-buy .trophy-inline-icon,
  .trail-buy .trophy-inline-icon {
    width: 20px;
    height: 20px;
  }
}

@media (pointer: coarse) {
  .has-touch-controls .trail-card,
  .trail-card {
    grid-template-columns: max-content minmax(0, 1fr) minmax(70px, 86px);
    min-height: 70px;
    padding: 7px 5px;
    overflow: visible;
  }

  .has-touch-controls .trail-copy,
  .trail-copy {
    gap: 4px;
    overflow: visible;
  }

  .has-touch-controls .trail-copy strong,
  .trail-copy strong {
    overflow: visible;
    font-size: clamp(13px, 3.9vw, 17px);
    line-height: 1.2;
    text-overflow: clip;
    text-shadow: var(--outline-1);
    white-space: nowrap;
  }

  .has-touch-controls .trail-copy span,
  .trail-copy span {
    overflow: visible;
    gap: 3px;
    font-size: clamp(9px, 2.65vw, 12px);
    line-height: 1.18;
    text-shadow: var(--outline-1);
    white-space: nowrap;
  }

  .has-touch-controls .trail-shoe,
  .trail-shoe {
    width: 15px;
    height: 15px;
  }

  .has-touch-controls .trail-buy,
  .trail-buy {
    min-height: 34px;
    padding: 3px 3px 4px;
    overflow: visible;
    font-size: clamp(9px, 2.8vw, 12px);
    line-height: 1.16;
    text-shadow: var(--outline-1);
  }

  .has-touch-controls .trail-buy .trophy-inline-icon,
  .trail-buy .trophy-inline-icon {
    width: 16px;
    height: 16px;
  }
}

@media (pointer: coarse) {
  .has-touch-controls .trail-shop-header,
  .trail-shop-header {
    grid-template-columns: minmax(82px, max-content) minmax(0, 1fr) !important;
    gap: 5px !important;
    margin-left: 0 !important;
  }

  .has-touch-controls .trail-balance,
  .trail-balance {
    max-width: 108px !important;
    min-height: 32px !important;
    padding: 2px 5px 3px !important;
    font-size: 13px !important;
  }

  .has-touch-controls .trail-balance .trophy-inline-icon,
  .trail-balance .trophy-inline-icon {
    width: 24px !important;
    height: 24px !important;
  }
}

html body .hud-right .panel.panel-compact-stat > span.multiplier-label {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Landscape touch layout: keep every control anchored to a clear screen edge. */
@media (pointer: coarse) and (orientation: landscape) {
  .hud-left,
  .is-ipad .hud-left,
  .is-samsung-galaxy-tablet .hud-left {
    top: 6px;
    left: 4px;
    justify-items: start;
  }

  .sound-toggle {
    top: 4px;
    right: auto;
    left: clamp(110px, 14vw, 140px);
  }

  .menu-grid,
  .wins-badge,
  .icon-button {
    margin-left: 0;
    transform: none;
  }

  .hearts-title {
    width: min(112px, 16vw);
    height: 34px;
    min-height: 34px;
  }

  .mobile-stick,
  .is-samsung-galaxy-tablet .mobile-stick {
    left: 4px;
    bottom: 4px;
  }

  .mobile-jump,
  .is-samsung-galaxy-tablet .mobile-jump {
    right: 4px;
    bottom: 4px;
  }

  .hud-bottom,
  .is-samsung-galaxy-tablet .hud-bottom {
    right: 108px;
    bottom: max(4px, env(safe-area-inset-bottom, 0px));
    left: 108px;
  }

  .revive-offer,
  .has-touch-controls .revive-offer {
    top: calc(env(safe-area-inset-top, 0px) + 72px);
    max-width: min(300px, calc(100vw - 120px));
    font-size: clamp(12px, 2vw, 16px);
  }

  .revive-offer strong,
  .has-touch-controls .revive-offer strong {
    letter-spacing: 0.01em;
    line-height: 1.08;
    white-space: nowrap;
  }

  .revive-offer-question {
    min-width: 0.7em;
    margin-left: 0.12em;
    padding: 0;
    font-size: 1em;
    letter-spacing: 0;
    vertical-align: baseline;
  }
}


/* Final mobile Trails guard: reserve real paint space for the outlined font. */
@media (pointer: coarse) {
  .has-touch-controls .trail-modal h2,
  .trail-modal h2,
  .has-touch-controls .trail-balance strong,
  .trail-balance strong,
  .has-touch-controls .trail-copy strong,
  .trail-copy strong,
  .has-touch-controls .trail-copy span,
  .trail-copy span,
  .has-touch-controls .trail-buy,
  .trail-buy {
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .has-touch-controls .trail-modal h2,
  .trail-modal h2 {
    padding: 0.12em 0.16em 0.18em;
    line-height: 1.12;
  }

  .has-touch-controls .trail-balance strong,
  .trail-balance strong {
    max-width: none !important;
    padding: 0.12em 0.08em 0.16em;
    white-space: nowrap !important;
  }

  .has-touch-controls .trail-scroll-wrap,
  .trail-scroll-wrap,
  .has-touch-controls .trail-list,
  .trail-list,
  .has-touch-controls .trail-card,
  .trail-card,
  .has-touch-controls .trail-copy,
  .trail-copy {
    min-width: 0;
  }

  .has-touch-controls .trail-list,
  .trail-list {
    padding: 6px 5px 9px;
  }

  .has-touch-controls .trail-card,
  .trail-card {
    min-height: 74px;
    padding: 8px 6px;
    overflow: visible;
  }

  .has-touch-controls .trail-copy,
  .trail-copy {
    gap: 3px;
    padding: 3px 2px 4px;
    overflow: visible;
  }

  .has-touch-controls .trail-copy strong,
  .trail-copy strong {
    padding: 0.12em 0.12em 0.18em;
    margin: -0.12em -0.12em -0.18em;
    line-height: 1.22;
    white-space: nowrap;
  }

  .has-touch-controls .trail-copy span,
  .trail-copy span {
    padding: 0.1em 0.08em 0.16em;
    margin: -0.1em -0.08em -0.16em;
    line-height: 1.24;
    white-space: nowrap;
  }

  .has-touch-controls .trail-buy,
  .trail-buy {
    min-width: 0;
    min-height: 40px;
    padding: 6px 4px 7px;
    line-height: 1.2;
    white-space: nowrap;
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  .has-touch-controls .trail-modal,
  .trail-modal {
    width: min(400px, calc(100vw - 20px));
  }

  .has-touch-controls .trail-card,
  .trail-card {
    grid-template-columns: max-content minmax(0, 1fr) minmax(88px, 102px);
    gap: 5px;
  }

  .has-touch-controls .trail-preview,
  .trail-preview {
    height: 40px;
  }

  .has-touch-controls .trail-copy strong,
  .trail-copy strong {
    font-size: clamp(15px, 4.25vw, 19px);
  }

  .has-touch-controls .trail-copy span,
  .trail-copy span {
    font-size: clamp(9px, 2.75vw, 12px);
  }

  .has-touch-controls .trail-buy,
  .trail-buy {
    font-size: clamp(10px, 2.9vw, 13px);
  }
}


/* Final mobile Skins guard: keep outlined skin names outside clipping rows. */
@media (pointer: coarse) {
  .has-touch-controls .skin-card-shell,
  .skin-card-shell,
  .has-touch-controls .skin-copy,
  .skin-copy,
  .has-touch-controls .skin-copy strong,
  .skin-copy strong {
    overflow: visible !important;
  }

  .has-touch-controls .skin-copy,
  .skin-copy {
    position: relative;
    z-index: 4;
    display: grid;
    min-width: 0;
    min-height: 32px;
    align-content: center;
    padding: 5px 3px 6px;
    margin: -5px -3px -6px;
  }

  .has-touch-controls .skin-copy strong,
  .skin-copy strong {
    display: block;
    max-width: 100%;
    padding: 0.14em 0.16em 0.2em;
    margin: -0.14em -0.16em -0.2em;
    font-size: clamp(15px, 4.25vw, 19px);
    line-height: 1.2;
    text-align: center;
    text-overflow: clip !important;
    white-space: nowrap;
  }
}

@media (pointer: coarse) and (orientation: portrait) {
  .has-touch-controls .skin-card,
  .skin-card,
  .has-touch-controls .skin-card.has-skin-image,
  .skin-card.has-skin-image {
    grid-template-rows: minmax(0, 1fr) minmax(34px, auto) 40px;
    gap: 3px;
  }

  .has-touch-controls .skin-list,
  .skin-list {
    grid-auto-rows: clamp(68px, 13.8vh, 84px);
    padding: 8px 8px 12px;
  }
}

/* Portrait touch layouts without a coarse pointer or mobile.css (desktop user agent with touch
   controls, e.g. ?touch=1): same Skins shop as mobile.css portrait, title row + balance/reset row and 2 columns (#490). */
@media (orientation: portrait) and (max-width: 699px) and (pointer: fine) {
  html.has-touch-controls .skin-modal {
    width: min(520px, calc(100vw - 28px));
    padding: 7px 8px 8px;
  }

  html.has-touch-controls .skin-modal::before {
    inset: 6px;
    border-width: 2px;
    border-radius: 10px;
  }

  html.has-touch-controls .skin-card-badge {
    top: 7px;
    left: 7px;
    min-width: 44px;
    padding: 4px 7px 3px;
    border-width: 2px;
    font-size: 12px;
  }

  html.has-touch-controls .skin-close {
    top: 8px;
    right: 8px;
    width: 38px;
    height: 38px;
    font-size: 25px;
  }

  html.has-touch-controls .skin-shop-header {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    grid-template-areas:
      "title title"
      "balance reset";
    gap: 5px;
    align-items: center;
    min-height: 0;
    margin: 0 0 5px;
    padding-right: 2px;
  }

  html.has-touch-controls .skin-modal h2 {
    grid-area: title;
    justify-self: center;
    width: calc(100% - 84px);
    min-width: 0;
    margin: 0;
    padding: 0;
    font-size: clamp(27px, 9vw, 38px);
    line-height: 1;
  }

  html.has-touch-controls .skin-balance,
  html.has-touch-controls .skin-reset-timer {
    position: static;
    top: auto;
    right: auto;
    left: auto;
    max-width: 100%;
    margin: 0;
    transform: none;
  }

  html.has-touch-controls .skin-balance {
    grid-area: balance;
    justify-self: start;
    min-width: 0;
    padding: 2px 6px 3px;
    font-size: 13px;
  }

  html.has-touch-controls .skin-balance .trophy-inline-icon {
    width: 20px;
    height: 20px;
  }

  html.has-touch-controls .skin-reset-timer {
    grid-area: reset;
    justify-self: end;
    grid-template-columns: 24px minmax(0, auto);
    column-gap: 2px;
    row-gap: 3px;
    min-width: 0;
    padding: 2px 4px 3px 1px;
  }

  html.has-touch-controls .skin-reset-timer > span {
    width: 24px;
    height: 24px;
  }

  html.has-touch-controls .skin-reset-timer em {
    max-width: 78px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
  }

  html.has-touch-controls .skin-reset-timer strong {
    font-size: 10px;
  }

  html.has-touch-controls .skin-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-rows: 168px;
    gap: 6px;
    height: auto;
    max-height: calc(100dvh - 116px);
    padding: 5px;
    overflow-y: auto;
  }

  html.has-touch-controls .skin-scrollbar {
    display: none;
  }

  html.has-touch-controls .skin-card-shell,
  html.has-touch-controls .skin-card-shell.is-wide,
  html.has-touch-controls .skin-card-shell.is-tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  html.has-touch-controls .skin-card,
  html.has-touch-controls .skin-card.has-skin-image {
    grid-template-rows: 94px minmax(20px, auto) 34px;
    gap: 3px;
    height: 100%;
    min-height: 0;
    padding: 5px;
  }

  html.has-touch-controls .skin-preview-image,
  html.has-touch-controls .skin-card-shell.is-tall .skin-preview-image {
    bottom: 0;
    height: 112px;
    max-width: 96%;
  }

  html.has-touch-controls .skin-card[data-skin-card="default"] .skin-preview-image,
  html.has-touch-controls .skin-card[data-skin-card="pumpkin_kid"] .skin-preview-image,
  html.has-touch-controls .skin-card[data-skin-card="bat_boy"] .skin-preview-image,
  html.has-touch-controls .skin-card[data-skin-card="black_cat"] .skin-preview-image,
  html.has-touch-controls .skin-card[data-skin-card="haunted_knight"] .skin-preview-image,
  html.has-touch-controls .skin-card[data-skin-card="friendly_ghost"] .skin-preview-image,
  html.has-touch-controls .skin-card[data-skin-card="witchy_wendy"] .skin-preview-image,
  html.has-touch-controls .skin-card[data-skin-card="night_magician"] .skin-preview-image,
  html.has-touch-controls .skin-card[data-skin-card="candy_collector"] .skin-preview-image,
  html.has-touch-controls .skin-card[data-skin-card="skater_cap"] .skin-preview-image,
  html.has-touch-controls .skin-card[data-skin-card="pirate"] .skin-preview-image {
    height: 142px;
    bottom: -48px;
  }

  html.has-touch-controls .skin-card[data-skin-card="street_runner"] .skin-preview-image,
  html.has-touch-controls .skin-card-shell.is-tall .skin-card[data-skin-card="street_runner"] .skin-preview-image {
    height: 92px;
    bottom: 0;
  }

  html.has-touch-controls .skin-card[data-skin-card="winter_hero"] .skin-preview-image {
    width: 94%;
    height: auto;
  }

  html.has-touch-controls .skin-copy strong {
    overflow: hidden;
    font-size: clamp(14px, 4.3vw, 18px);
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html.has-touch-controls .skin-buy {
    min-height: 32px;
    margin-top: 0;
    padding: 2px 4px;
    overflow: hidden;
    font-size: 12px;
    white-space: nowrap;
  }
}

/* Keep the latest phone-landscape typography and Sound offset above earlier guards. */
@media (orientation: landscape) {
  html.has-touch-controls:not(.is-tablet-device) .sound-toggle {
    left: 92px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-modal h2,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-modal h2 {
    font-size: clamp(18px, 2.7vw, 22px) !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-form button,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-form button {
    font-size: 12px !important;
    text-shadow: var(--outline-1) !important;
  }
}

/* Compact landscape phone controls and quiz, with room for browser safe edges. */
@media (orientation: landscape) {
  html.has-touch-controls:not(.is-tablet-device) .mobile-stick {
    left: 26px !important;
    bottom: 8px !important;
    inset-inline-start: 26px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .mobile-jump {
    right: 24px !important;
    bottom: 10px !important;
    inset-inline-end: 24px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) #mathQuizOverlay {
    box-sizing: border-box !important;
    padding: 8px 76px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-modal,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-modal {
    width: min(430px, 100%) !important;
    max-height: calc(100dvh - 16px) !important;
    padding: 4px 9px 5px !important;
    border-width: 3px !important;
    border-radius: 11px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-modal::before {
    inset: 3px !important;
    border-width: 1px !important;
    border-radius: 7px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-close {
    top: 4px !important;
    right: 5px !important;
    width: 26px !important;
    height: 26px !important;
    border-width: 2px !important;
    border-radius: 6px !important;
    font-size: 16px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-kicker,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-kicker {
    margin: -1px 0 4px !important;
    font-size: 8px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .kicker-time,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .kicker-time {
    min-width: 82px !important;
    min-height: 14px !important;
    height: 14px !important;
    padding: 0 5px !important;
    border-width: 1px !important;
    font-size: 8px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-modal h2,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-modal h2 {
    margin: 0 28px 4px !important;
    font-size: 14px !important;
    line-height: 0.9 !important;
    text-shadow: var(--outline-1) !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-progress,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-progress {
    margin: 0 0 5px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    text-shadow: var(--outline-1) !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-question,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-question {
    width: min(250px, 100%) !important;
    margin: 2px auto 3px !important;
    padding: 3px 6px 2px !important;
    border-width: 2px !important;
    border-radius: 7px !important;
    font-size: 28px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-form {
    width: min(250px, 100%) !important;
    grid-template-columns: minmax(0, 1fr) 60px !important;
    gap: 4px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-answer-field,
  html.has-touch-controls:not(.is-tablet-device) .math-quiz-answer-field input,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-answer-field,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-answer-field input {
    height: 25px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-answer-field input {
    border-width: 2px !important;
    border-radius: 6px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-answer-field::after {
    inset: -3px 5px !important;
    font-size: 15px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-form button,
  html.has-touch-controls:not(.is-tablet-device) .is-hearts-quiz .math-quiz-form button {
    border-width: 2px !important;
    border-radius: 6px !important;
    font-size: 9px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-keypad {
    width: min(220px, 100%) !important;
    gap: 3px !important;
    margin-top: 4px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-keypad button {
    min-height: 20px !important;
    padding: 0 3px !important;
    border-width: 1px !important;
    border-radius: 5px !important;
    font-size: 11px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 2px 0 rgba(0, 0, 0, 0.26) !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-feedback {
    min-height: 8px !important;
    margin-top: 1px !important;
    font-size: 8px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-dots {
    gap: 3px !important;
    margin-top: 0 !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-dots span {
    width: 6px !important;
    height: 6px !important;
    border-width: 1px !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .math-quiz-kicker,
  html.has-touch-controls:not(.is-tablet-device) .kicker-time,
  html.has-touch-controls:not(.is-tablet-device) .math-quiz-modal h2,
  html.has-touch-controls:not(.is-tablet-device) .math-quiz-progress,
  html.has-touch-controls:not(.is-tablet-device) .math-quiz-answer-field::after,
  html.has-touch-controls:not(.is-tablet-device) .math-quiz-form button,
  html.has-touch-controls:not(.is-tablet-device) .math-quiz-keypad button,
  html.has-touch-controls:not(.is-tablet-device) .math-quiz-feedback {
    text-shadow: var(--outline-1) !important;
  }
}

/* Keep the temporary revive action readable on compact touch screens. */
@media (pointer: coarse) {
  html.has-touch-controls .revive-offer {
    grid-template-columns: 16px minmax(0, auto) 16px !important;
    gap: 3px !important;
    max-width: calc(100vw - 72px) !important;
    text-shadow: none !important;
  }

  html.has-touch-controls .revive-offer strong {
    display: block !important;
    max-width: 100% !important;
    padding: 0 2px !important;
    overflow: visible !important;
    font-size: clamp(11px, 3vw, 13px) !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    -webkit-text-stroke: 0 !important;
    text-shadow:
      -0.65px -0.65px 0 #050306,
      0.65px -0.65px 0 #050306,
      -0.65px 0.65px 0 #050306,
      0.65px 0.65px 0 #050306,
      0 1px 0 #050306 !important;
  }

  html.has-touch-controls .revive-offer-wing {
    width: 16px !important;
    height: 13px !important;
  }
}

.daily-icon-sound img {
  height: 78px !important;
  max-width: 132px !important;
  transform: translateY(-4px);
}

@media (max-width: 680px) {
  .daily-icon-sound img {
    height: 58px !important;
    max-width: 100px !important;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  html.has-touch-controls .daily-icon-sound img {
    height: 40px !important;
    max-width: 64px !important;
    transform: translateY(-2px);
  }
}

/* Diamond currency HUD and luxury three-panel shop. */
html.is-diamond-system-disabled .loading-player-diamonds,
html.is-diamond-system-disabled .diamond-badge,
html.is-diamond-system-disabled #diamondShopButton,
html.is-diamond-system-disabled #diamondShopOverlay,
html.is-diamond-system-disabled .potion-multiplier-hud,
html.is-account-ui-disabled #accountLoginButton,
html.is-account-ui-disabled #accountGreeting {
  display: none !important;
}

.currency-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-height: 52px;
}

.currency-badges .wins-badge {
  width: auto;
  min-width: 74px;
}

.diamond-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 74px;
  color: #fff;
  font-family: var(--font-heavy);
  font-size: 32px;
  font-weight: 1000;
  line-height: 1;
  text-shadow: var(--outline-2);
}

.diamond-badge span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
}

.diamond-currency-icon {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(18, 112, 174, 0.38));
}

.icon-button.diamond-shop {
  z-index: 2;
  overflow: visible;
  --button-glow-color: rgba(67, 153, 211, 0.72);
  background:
    radial-gradient(circle at 24% 14%, rgba(255, 255, 255, 0.88) 0 7%, rgba(255, 255, 255, 0.22) 18%, transparent 31%),
    linear-gradient(145deg, #f7fbfe 0%, #cce2f0 23%, #6d9fc2 57%, #356b94 100%);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.5),
    inset 0 -3px 0 rgba(30, 68, 96, 0.38),
    0 6px 0 rgba(0, 0, 0, 0.38),
    0 9px 20px rgba(0, 0, 0, 0.26),
    0 0 20px rgba(67, 153, 211, 0.58);
}

.icon-button.diamond-shop::after {
  content: none;
}

.icon-button .diamond-shop-icon-slot {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  display: grid;
  width: 68px;
  height: 59px;
  place-items: center;
  overflow: visible;
  transform: translateX(-50%);
}

.diamond-shop-icon-image {
  display: block;
  width: 68px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(1, 13, 48, 0.42));
}

.icon-button.diamond-shop strong {
  font-size: 16px;
  letter-spacing: -0.45px;
  position: relative;
  left: -3px;
  top: 2px;
}

.diamond-shop-modal {
  position: relative;
  isolation: isolate;
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 18px 24px 24px;
  overflow: hidden;
  border: 5px solid #0e3a70;
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 18%, rgba(100, 210, 249, 0.38), transparent 34%),
    radial-gradient(circle at 82% 20%, rgba(148, 225, 252, 0.34), transparent 36%),
    radial-gradient(circle at 18% 88%, rgba(24, 105, 190, 0.32), transparent 40%),
    radial-gradient(circle at 82% 84%, rgba(52, 148, 216, 0.3), transparent 42%),
    linear-gradient(180deg, #8eddf8 0%, #57c1ed 34%, #349dde 64%, #216db8 100%);
  background-clip: padding-box;
  background-origin: padding-box;
  box-shadow:
    inset 0 6px 0 rgba(255, 255, 255, 0.34),
    inset 0 -8px 18px rgba(11, 68, 139, 0.28),
    0 10px 0 rgba(10, 83, 145, 0.58),
    0 20px 40px rgba(10, 65, 112, 0.32),
    0 0 40px rgba(111, 226, 255, 0.5);
}

.diamond-shop-modal::before,
.diamond-shop-modal::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.diamond-shop-modal::before {
  inset: 10px;
  z-index: 0;
  border: 2px solid rgba(224, 250, 255, 0.92);
  border-radius: 18px;
  background: radial-gradient(circle at 10% 18%, rgba(255, 255, 255, 0.28) 0 4px, transparent 5px) 0 0 / 34px 34px;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 2px rgba(70, 185, 235, 0.38);
}

.diamond-shop-modal::after {
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(122deg, transparent 0 23%, rgba(255, 255, 255, 0.05) 24%, transparent 25%),
    linear-gradient(58deg, transparent 0 72%, rgba(65, 225, 255, 0.1) 73%, transparent 74%);
}

.diamond-shop-modal > * {
  position: relative;
  z-index: 1;
}

.diamond-shop-close {
  position: absolute;
  top: 15px;
  right: 17px;
  z-index: 5;
  width: 54px;
  height: 54px;
  border: 4px solid #07152b;
  border-radius: 13px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.48), transparent 22%),
    linear-gradient(145deg, #ff7474, #c72355 72%);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 34px;
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.34), 0 5px 0 rgba(2, 7, 25, 0.5);
}

.diamond-shop-header {
  position: relative;
  display: grid;
  min-height: 96px;
  place-items: center;
  margin: 0 62px 8px;
}

.diamond-shop-title-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.diamond-shop-title-lockup > img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 1px #0d3568) drop-shadow(0 0 1px #0d3568) drop-shadow(0 5px 8px rgba(12, 104, 166, 0.34));
}

.diamond-shop-title-lockup h2 {
  margin: 0;
  color: #fff;
  font-family: var(--font-heavy);
  font-size: clamp(36px, 4.8vw, 52px);
  line-height: 0.92;
  letter-spacing: -1px;
  text-align: center;
  text-shadow: -3px -3px 0 #0d3568, 0 -3px 0 #0d3568, 3px -3px 0 #0d3568, -3px 0 0 #0d3568, 3px 0 0 #0d3568, -3px 3px 0 #0d3568, 0 3px 0 #0d3568, 3px 3px 0 #0d3568, 0 5px 0 #08264d, 0 0 16px rgba(220, 250, 255, 0.72);
}

.diamond-shop-balance {
  position: absolute;
  top: 50%;
  left: 0;
  display: inline-flex;
  min-width: 104px;
  min-height: 46px;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 5px 4px;
  border: 3px solid #0b65a7;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.44), transparent 48%), rgba(81, 188, 239, 0.96);
  color: #fff;
  font-family: var(--font-heavy);
  font-size: 28px;
  line-height: 1;
  text-shadow: var(--outline-2);
  transform: translateY(-50%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.46), 0 4px 0 rgba(12, 82, 139, 0.48);
}

.diamond-shop-balance img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.diamond-shop-panels {
  position: relative;
  z-index: 1;
  display: grid;
  height: clamp(250px, 42vh, 360px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 5px;
  transform: translateY(-12px);
}

.diamond-shop-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 1fr auto auto 1fr;
  align-items: center;
  justify-items: center;
  padding: 18px 12px;
  overflow: hidden;
  border: 3px solid #0d3568;
  border-radius: 18px;
  background:
    linear-gradient(132deg, rgba(255, 255, 255, 0.22) 0 9%, transparent 9% 27%, rgba(255, 255, 255, 0.1) 27% 30%, transparent 30% 100%),
    repeating-linear-gradient(135deg, rgba(224, 249, 255, 0.1) 0 2px, transparent 2px 20px),
    rgba(50, 145, 205, 0.7);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  backdrop-filter: blur(14px) saturate(1.05);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.24),
    inset 0 0 0 1px rgba(190, 240, 255, 0.18),
    0 7px 0 rgba(8, 38, 77, 0.82),
    0 13px 24px rgba(4, 31, 67, 0.24),
    0 0 16px rgba(151, 237, 255, 0.16);
}

.diamond-shop-panel::before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border: 1px solid rgba(218, 249, 255, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 38%);
}

.diamond-shop-panel.diamond-shop-trophy-panel {
  border-color: #6b3b08;
  background:
    linear-gradient(132deg, rgba(255, 255, 255, 0.28) 0 9%, transparent 9% 27%, rgba(255, 246, 185, 0.14) 27% 30%, transparent 30% 100%),
    repeating-linear-gradient(135deg, rgba(255, 245, 184, 0.14) 0 2px, transparent 2px 20px),
    rgba(244, 176, 74, 0.94);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.3),
    inset 0 0 0 1px rgba(255, 232, 139, 0.28),
    0 7px 0 rgba(91, 48, 5, 0.82),
    0 13px 24px rgba(78, 39, 3, 0.26),
    0 0 16px rgba(255, 204, 69, 0.2);
}

.diamond-shop-panel.diamond-shop-trophy-panel::before {
  border-color: rgba(255, 244, 186, 0.38);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 40%);
}

.diamond-shop-panel.diamond-shop-trophy-panel > .diamond-shop-duration {
  border-color: #0d234b;
  background: linear-gradient(180deg, #fff0a0 0%, #f4ad35 100%);
  -webkit-text-stroke: 0;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.52), 0 3px 0 rgba(91, 48, 5, 0.46);
}

.diamond-shop-trophy-panel > .diamond-shop-product-image {
  filter: drop-shadow(0 7px 8px rgba(105, 54, 3, 0.42));
}

.diamond-shop-panel.diamond-shop-trophy-panel > .diamond-shop-effect {
  border-color: #3b1f00;
  background: linear-gradient(180deg, #ffdd5b, #e28f10);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  -webkit-text-stroke: 0;
  paint-order: stroke fill;
  opacity: 1;
  isolation: isolate;
  text-shadow:
    -1px -1px 0 #3b1f00,
    1px -1px 0 #3b1f00,
    -1px 1px 0 #3b1f00,
    1px 1px 0 #3b1f00,
    0 2px 0 #3b1f00;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.32), 0 2px 0 rgba(88, 45, 3, 0.38);
}

.diamond-shop-panel.diamond-shop-heart-panel {
  border-color: #681122;
  background:
    linear-gradient(132deg, rgba(255, 255, 255, 0.27) 0 9%, transparent 9% 27%, rgba(255, 205, 214, 0.14) 27% 30%, transparent 30% 100%),
    repeating-linear-gradient(135deg, rgba(255, 220, 227, 0.13) 0 2px, transparent 2px 20px),
    rgba(214, 55, 78, 0.94);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.3),
    inset 0 0 0 1px rgba(255, 190, 204, 0.28),
    0 7px 0 rgba(94, 13, 31, 0.84),
    0 13px 24px rgba(82, 8, 25, 0.26),
    0 0 16px rgba(255, 105, 134, 0.2);
}

.diamond-shop-panel.diamond-shop-heart-panel::before {
  border-color: rgba(255, 218, 226, 0.38);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 40%);
}

.diamond-shop-panel.diamond-shop-heart-panel > .diamond-shop-product-title {
  border-color: #4b0815;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0 24%, transparent 25% 100%),
    linear-gradient(180deg, #ff8ca2 0%, #ed4667 58%, #bd1739 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.48),
    inset 0 -2px 0 rgba(104, 8, 27, 0.18),
    0 3px 0 rgba(75, 8, 21, 0.5),
    0 5px 9px rgba(75, 8, 21, 0.22);
}

.diamond-shop-panel.diamond-shop-heart-panel > .diamond-shop-duration {
  border-color: #0d234b;
  background: linear-gradient(180deg, #ffd6df 0%, #ff829c 100%);
  -webkit-text-stroke: 0;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.52), 0 3px 0 rgba(94, 13, 31, 0.46);
}

.diamond-shop-heart-panel > .diamond-shop-product-image {
  filter: drop-shadow(0 7px 8px rgba(102, 8, 28, 0.42));
}

.diamond-shop-panel.diamond-shop-heart-panel > .diamond-shop-effect {
  border-color: #3f0713;
  background: linear-gradient(180deg, #ff718e, #cf2448);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  opacity: 1;
  text-shadow:
    -1px -1px 0 #3f0713,
    1px -1px 0 #3f0713,
    -1px 1px 0 #3f0713,
    1px 1px 0 #3f0713,
    0 2px 0 #3f0713;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 2px 0 rgba(75, 8, 21, 0.4);
}

.diamond-shop-panel > img {
  grid-row: 2;
  width: clamp(62px, 8vw, 92px);
  height: clamp(62px, 8vw, 92px);
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 5px 8px rgba(14, 102, 163, 0.3));
}

.diamond-shop-panel > strong {
  grid-row: 3;
  margin-top: 6px;
  color: #fff;
  font-family: var(--font-heavy);
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1;
  text-align: center;
  text-shadow: var(--outline-2);
}

.diamond-shop-panel > span {
  grid-row: 4;
  align-self: start;
  margin-top: 6px;
  color: #e7faff;
  font-family: var(--font-heavy);
  font-size: clamp(12px, 1.4vw, 16px);
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 2px 0 rgba(14, 91, 151, 0.72);
}

.diamond-shop-product-panel {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding: 16px 12px 18px;
}

.diamond-shop-product-panel > .diamond-shop-product-title {
  grid-row: 1;
  width: auto;
  max-width: calc(100% - 62px);
  margin: 0;
  padding: 4px 9px 5px;
  align-self: start;
  justify-self: center;
  border: 2px solid #0a2b54;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0 24%, transparent 25% 100%),
    linear-gradient(180deg, #63c6ec 0%, #258bc8 58%, #1767a5 100%);
  font-size: clamp(19px, 2.4vw, 25px);
  white-space: nowrap;
  transform: translate(2px, 27px);
  letter-spacing: -0.25px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.48),
    inset 0 -2px 0 rgba(5, 55, 105, 0.2),
    0 3px 0 rgba(4, 33, 73, 0.48),
    0 5px 9px rgba(4, 33, 73, 0.22);
}

.diamond-shop-panel.diamond-shop-trophy-panel > .diamond-shop-product-title {
  border-color: #5c3203;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0 24%, transparent 25% 100%),
    linear-gradient(180deg, #ffe78a 0%, #f4b438 58%, #dc8210 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 0 rgba(121, 62, 2, 0.18),
    0 3px 0 rgba(88, 45, 3, 0.48),
    0 5px 9px rgba(88, 45, 3, 0.2);
}

.diamond-shop-panel.diamond-shop-product-panel > .diamond-shop-product-title {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.diamond-shop-product-panel > .diamond-shop-duration {
  position: absolute;
  top: 6px;
  right: 4px;
  z-index: 3;
  grid-row: auto;
  display: inline-flex;
  max-width: none;
  align-self: auto;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 7px 5px;
  border: 3px solid #0d234b;
  border-radius: 999px;
  background: linear-gradient(180deg, #dff6ff, #83c9ed);
  color: #fff;
  font-family: var(--font-heavy);
  font-size: 15px;
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.58), 0 3px 0 rgba(4, 33, 73, 0.38);
}

.diamond-shop-duration img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.22));
}

.diamond-shop-product-panel > .diamond-shop-product-image {
  grid-row: 2;
  align-self: center;
  width: clamp(108px, 13vw, 150px);
  height: clamp(108px, 13vw, 150px);
  opacity: 1;
  filter: drop-shadow(0 7px 8px rgba(5, 54, 112, 0.34));
  transform: translate(-2px, 22px);
}

.diamond-shop-product-panel > .diamond-shop-effect {
  grid-row: 3;
  display: block;
  box-sizing: border-box;
  width: calc(100% - 18px);
  max-width: none;
  align-self: center;
  margin: 4px 0 0;
  padding: 6px 8px 7px;
  border: 2px solid #0b3266;
  border-radius: 9px;
  background: rgba(6, 49, 101, 0.62);
  color: #fff;
  font-size: clamp(12px, 1.45vw, 16px);
  line-height: 1.08;
  text-shadow: 0 2px 0 rgba(2, 25, 62, 0.72);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(6px);
}

.diamond-shop-multiplier-x {
  display: inline-block;
  margin: 0 1px;
  font-size: 1.55em;
  font-weight: 1000;
  line-height: 0;
  vertical-align: -0.08em;
}

.diamond-shop-buy {
  grid-row: 4;
  display: inline-flex;
  width: min(180px, 82%);
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 0;
  text-align: center;
  white-space: nowrap;
  position: relative;
  top: 6px;
  margin-top: 7px;
  border: 3px solid #082e5c;
  border-radius: 11px;
  background: linear-gradient(180deg, #51f2b0 0%, #11c984 100%);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heavy);
  font-size: 22px;
  line-height: 1;
  text-shadow: var(--outline-2);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.36), 0 5px 0 rgba(6, 52, 91, 0.72);
}

.diamond-shop-buy.is-unaffordable {
  filter: saturate(0.65);
  opacity: 0.72;
}

.diamond-shop-buy.is-active,
.diamond-shop-buy.is-active:disabled {
  border-width: 3px;
  border-color: #050306;
  background: linear-gradient(180deg, #7edcff 0%, #2c91de 100%);
  color: #fff;
  cursor: default;
  filter: none;
  opacity: 1;
}

.diamond-shop-trophy-panel .diamond-shop-buy.is-active,
.diamond-shop-trophy-panel .diamond-shop-buy.is-active:disabled {
  border-color: #050306;
  background: linear-gradient(180deg, #ffd96b 0%, #ee9f25 100%);
}

.diamond-shop-heart-panel .diamond-shop-buy.is-active,
.diamond-shop-heart-panel .diamond-shop-buy.is-active:disabled {
  border-color: #050306;
  background: linear-gradient(180deg, #ff7891 0%, #d9254c 100%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.34), 0 5px 0 rgba(91, 8, 30, 0.76);
}

.diamond-shop-buy > span {
  transform: translateX(2px);
}

.diamond-shop-buy:active {
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.26), 0 2px 0 rgba(6, 52, 91, 0.72);
  transform: translateY(3px);
}

.diamond-shop-button-price {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: row-reverse;
  align-items: center;
  gap: 2px;
  line-height: 1;
}

.diamond-shop-button-price img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter:
    drop-shadow(1px 0 0 #06111f)
    drop-shadow(-1px 0 0 #06111f)
    drop-shadow(0 1px 0 #06111f)
    drop-shadow(0 -1px 0 #06111f);
}

.diamond-shop-button-price b {
  font: inherit;
}

.diamond-shop-active-countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.diamond-shop-active-countdown img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.diamond-shop-active-countdown b {
  flex: 0 0 8.4ch;
  font: inherit;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.5px;
  text-align: center;
  -webkit-text-stroke: 1.8px #050306;
  paint-order: stroke fill;
  text-shadow: 0 2px 0 #050306, 1px 0 0 #050306, -1px 0 0 #050306;
}

@media (max-width: 680px) {
  .diamond-shop-modal {
    width: min(410px, calc(100vw - 16px));
    padding: 9px 8px 10px;
    border-width: 3px;
    border-radius: 16px;
  }

  .diamond-shop-modal::before {
    inset: 6px;
    border-width: 1px;
    border-radius: 11px;
  }

  .diamond-shop-close {
    top: 7px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-width: 3px;
    border-radius: 9px;
    font-size: 23px;
  }

  .diamond-shop-header {
    min-height: 84px;
    margin: 0 38px 4px 0;
    place-items: start center;
  }

  .diamond-shop-title-lockup {
    gap: 2px;
  }

  .diamond-shop-title-lockup > img {
    width: 43px;
    height: 43px;
  }

  .diamond-shop-title-lockup h2 {
    font-size: clamp(20px, 6vw, 27px);
    letter-spacing: -0.5px;
  }

  .diamond-shop-balance {
    top: auto;
    bottom: 0;
    min-width: 78px;
    min-height: 29px;
    padding: 1px 6px 2px 2px;
    border-width: 2px;
    border-radius: 9px;
    font-size: 15px;
    transform: none;
  }

  .diamond-shop-balance img {
    width: 27px;
    height: 27px;
  }

  .diamond-shop-panels {
    height: clamp(220px, 52vh, 310px);
    gap: 5px;
    padding: 2px;
  }

  .diamond-shop-panel {
    padding: 7px 4px;
    border-width: 2px;
    border-radius: 11px;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(190, 240, 255, 0.1), 0 4px 0 rgba(8, 38, 77, 0.82);
  }

  .diamond-shop-panel::before {
    inset: 2px;
    border-radius: 7px;
  }

  .diamond-shop-panel > img {
    width: clamp(42px, 14vw, 58px);
    height: clamp(42px, 14vw, 58px);
  }

  .diamond-shop-panel > strong {
    font-size: clamp(11px, 3.5vw, 15px);
  }

  .diamond-shop-panel > span {
    max-width: 84px;
    margin-top: 4px;
    font-size: clamp(8px, 2.4vw, 10px);
  }

  .diamond-shop-product-panel {
    padding: 7px 3px 8px;
  }

  .diamond-shop-product-panel > .diamond-shop-product-title {
    width: auto;
    max-width: calc(100% - 34px);
    padding: 0;
    border-width: 0;
    border-radius: 0;
    font-size: clamp(9px, 2.8vw, 12px);
    transform: translate(1px, 7px);
  }

  .diamond-shop-product-panel > .diamond-shop-duration {
    top: 3px;
    right: 2px;
    gap: 2px;
    padding: 2px 4px 3px;
    border-width: 2px;
    font-size: 8px;
    text-shadow: var(--outline-1);
  }

  .diamond-shop-duration img {
    width: 10px;
    height: 10px;
  }

  .diamond-shop-product-panel > .diamond-shop-product-image {
    width: clamp(52px, 16vw, 68px);
    height: clamp(52px, 16vw, 68px);
    transform: translate(-1px, 10px);
  }

  .diamond-shop-product-panel > .diamond-shop-effect {
    width: calc(100% - 6px);
    margin-top: 2px;
    padding: 3px 3px 4px;
    border-width: 1px;
    border-radius: 5px;
    font-size: clamp(7px, 2vw, 9px);
    transform: translateY(3px);
  }

  .diamond-shop-buy {
    width: 82%;
    min-height: 28px;
    margin-top: 3px;
    border-width: 2px;
    border-radius: 7px;
    font-size: 12px;
    text-shadow: var(--outline-1);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.34), 0 3px 0 rgba(6, 52, 91, 0.72);
    top: 3px;
  }

  .diamond-shop-button-price img {
    width: 20px;
    height: 20px;
  }

  .diamond-shop-active-countdown {
    gap: 3px;
  }

  .diamond-shop-active-countdown img {
    width: 16px;
    height: 16px;
  }

  .diamond-shop-active-countdown b {
    flex-basis: 8.4ch;
    font-size: 11px;
    letter-spacing: 0;
    -webkit-text-stroke-width: 1.2px;
    text-shadow: 0 1px 0 #050306, 1px 0 0 #050306, -1px 0 0 #050306;
  }

}

@media (pointer: coarse) {
  html.has-touch-controls .currency-badges {
    gap: 2px;
    min-height: 30px;
  }

  html.has-touch-controls .currency-badges .wins-badge {
    min-width: 38px;
  }

  html.has-touch-controls .diamond-badge {
    gap: 0;
    min-width: 42px;
    font-size: 21px;
  }

  html.has-touch-controls .diamond-badge span {
    width: 29px;
    height: 29px;
  }

  html.has-touch-controls .diamond-currency-icon {
    width: 27px;
    height: 27px;
  }

  html.has-touch-controls .icon-button .diamond-shop-icon-slot {
    position: absolute !important;
    top: -1px !important;
    left: 50% !important;
    width: 40px !important;
    height: 35px !important;
    transform: translateX(-50%) !important;
  }

  html.has-touch-controls .diamond-shop-icon-image {
    width: 40px !important;
    height: 36px !important;
    transform: none !important;
  }
}

@media (pointer: coarse) and (orientation: landscape) {
  html.has-touch-controls:not(.is-tablet-device) .currency-badges {
    display: grid;
    grid-template-columns: 44px;
    gap: 0;
    width: 44px;
  }

  .diamond-shop-modal {
    width: min(720px, calc(100vw - 140px));
    max-height: calc(100dvh - 12px);
    padding: 7px 10px 9px;
  }

  .diamond-shop-header {
    min-height: 52px;
    margin-bottom: 2px;
  }

  .diamond-shop-title-lockup > img {
    width: 39px;
    height: 39px;
  }

  .diamond-shop-title-lockup h2 {
    font-size: 24px;
  }

  .diamond-shop-balance {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .diamond-shop-panels {
    height: min(215px, calc(100dvh - 82px));
    gap: 8px;
  }

  .diamond-shop-panel > img {
    width: 48px;
    height: 48px;
  }

  .diamond-shop-panel > strong {
    font-size: 14px;
  }

  .diamond-shop-panel > span {
    font-size: 9px;
  }

  .diamond-shop-product-panel > .diamond-shop-product-image {
    width: 68px;
    height: 68px;
  }

  .diamond-shop-product-panel > .diamond-shop-effect {
    font-size: 9px;
  }

  .diamond-shop-buy {
    min-height: 28px;
    margin-top: 3px;
    border-width: 2px;
    font-size: 12px;
  }

  .diamond-shop-product-panel > .diamond-shop-duration {
    top: 5px;
    font-size: 9px;
  }
}

/* Final portrait-phone in-world multiplication prompt sizing. */
@media (orientation: portrait) and (max-width: 699px) {
  html.has-touch-controls:not(.is-tablet-device) .stage-question {
    top: calc(env(safe-area-inset-top, 0px) + 46px) !important;
    max-width: min(190px, calc(100vw - 36px)) !important;
    padding: 1px 6px 2px !important;
    border-width: 2px !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.24),
      0 3px 0 rgba(0, 0, 0, 0.3),
      0 7px 14px rgba(0, 0, 0, 0.2) !important;
  }

  html.has-touch-controls:not(.is-tablet-device) .stage-question-canvas {
    max-width: min(176px, 48vw) !important;
    height: auto !important;
  }
}

/* Some Android tablets (including Lenovo models with a stylus or paired mouse)
   report pointer:fine even while the game correctly enables touch controls. */
html.has-touch-controls .mobile-controls {
  display: block;
}

/* Fit translated Settings labels. */
html:not([lang="en"]) .settings-option-copy,
html:not([lang="en"]) .settings-actions span {
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 680px) {
  html:not([lang="en"]) .settings-actions strong {
    font-size: clamp(12px, 3.6vw, 22px);
    overflow-wrap: normal;
  }
}
@media (min-width: 681px) {
  html:not([lang="en"]) .settings-actions > button {
    padding-inline: 10px;
    gap: 8px;
  }
  html:not([lang="en"]) .settings-actions > button > img {
    position: static;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    transform: none;
  }
  html:not([lang="en"]) .settings-actions > button > span {
    flex: 1;
    width: auto;
    text-align: left;
  }
  html:not([lang="en"]) .settings-actions strong {
    font-size: 26px;
  }
}

/* Accommodate translated labels without covering controls or clipping words. */
html:not([lang="en"]) .rebirth-close { z-index: 5; }
html:not([lang="en"]):not([lang="de"]):not(.has-measured-localization) .rebirth-modal h2:not([translate="no"]) {
  max-width: calc(100% - 80px);
  margin-inline: 40px !important;
  font-size: clamp(20px, 4.5vw, 40px) !important;
  pointer-events: none;
}
html:not([lang="en"]) .rebirth-modal h2:not([translate="no"]) span { min-width: 0; }
html:not([lang="en"]) .rebirth-multiplier-card span {
  max-width: 100%;
  white-space: normal;
  font-size: clamp(11px, 2.7vw, 24px) !important;
}
html:not([lang="en"]) .daily-card strong.daily-reward-copy {
  max-width: 100%;
  min-width: 0;
  white-space: normal !important;
  overflow-wrap: anywhere;
  line-height: 1.12;
  font-size: clamp(10px, 2.8vw, 16px) !important;
}
html:not([lang="en"]) .skin-buy.reward-only {
  white-space: normal;
  font-size: 12px !important;
  line-height: 1.15;
}
html:not([lang="en"]) .panel.panel-compact-stat > .multiplier-label {
  font-size: 9px;
}
html:not([lang="en"]) .diamond-shop-effect {
  white-space: normal !important;
  line-height: 1.15;
}
@media (max-width: 680px) {
  html:not([lang="en"]) .icon-button strong,
  html:not([lang="en"]) .emoji-hud-button strong {
    font-size: 8px !important;
  }
}

html:not([lang="en"]) .world-portal-modal h2 {
  white-space: normal;
  overflow-wrap: anywhere;
}
html:not([lang="en"]):not(.has-touch-controls) .account-login-label {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  white-space: normal;
}

html:not([lang="en"]) .diamond-shop-product-panel > .diamond-shop-product-title {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: anywhere;
  text-overflow: clip;
  line-height: 1.15;
}
html:not([lang="en"]) .world-portal-modal h2 {
  max-width: 100%;
  white-space: normal !important;
  font-size: clamp(20px, 5.5vw, 32px);
}
@media (max-width: 680px) {
  html:not([lang="en"]) .diamond-shop-product-panel > .diamond-shop-product-title {
    margin-top: 18px;
    transform: none;
    font-size: 11px;
  }
}
html:not([lang="en"]):not(.has-measured-localization):not(.has-measured-name-controls) .player-name-button-label {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: clamp(14px, 3.8vw, 20px);
  line-height: 1.15;
}
html:not([lang="en"]):not(.has-measured-localization):not(.has-measured-name-controls) .player-name-actions button {
  min-width: 0;
  height: auto;
  min-height: 60px;
}
html:not([lang="en"]):not(.has-measured-localization):not(.has-measured-name-controls) .player-name-actions button img {
  flex-shrink: 0;
}
html:not([lang="en"]):not(.has-measured-localization):not(.has-measured-name-controls) .player-name-actions button {
  padding-right: 38px;
  text-indent: 0;
}
/* Constrain translated content to the overlay's available width,including landscape safe areas. */ html:not([lang="en"]):not(.has-measured-localization) .modal-overlay:not(#dailyOverlay):not(#playerNameOverlay):not(#diamondShopOverlay){grid-template-columns:minmax(0,1fr)}html:not([lang="en"]):not(.has-measured-localization) .modal-overlay:not(#dailyOverlay):not(#playerNameOverlay):not(#diamondShopOverlay)>:first-child{min-width:0;max-width:100%;box-sizing:border-box}html:not([lang="en"]) .diamond-shop-product-panel{grid-template-columns:minmax(0,1fr)}html:not([lang="en"]) .diamond-shop-product-panel>.diamond-shop-product-title,html:not([lang="en"]) .diamond-shop-product-panel>.diamond-shop-effect{min-width:0;max-width:100%;overflow-wrap:anywhere}html:not([lang="en"]) .trail-copy strong{white-space:normal !important;overflow-wrap:anywhere;line-height:1.15 !important;text-overflow:clip !important}@media (max-width:360px){html:not([lang="en"]) .trail-copy strong{font-size:12px !important}}@media (orientation:landscape) and (max-height:420px){html:not([lang="en"]) #settingsOverlay{padding-inline:10px}html:not([lang="en"]) .settings-option strong{font-size:20px}}@media (max-width:360px){html:not([lang="en"]) .diamond-shop-buy{width:100%;max-width:100%;flex-direction:column;gap:2px;min-height:40px;padding-block:3px;font-size:11px}}html:not([lang="en"]) .stage-strip{white-space:nowrap}html:not([lang="en"]) .stage-title-text{min-width:0;width:100%;white-space:nowrap;overflow-wrap:normal;text-align:center}html[lang="de"] .daily-title-box:not([translate="no"])>span:last-child{font-size:0.67em;white-space:nowrap}html[lang="de"] #giftButton>strong{white-space:nowrap;justify-self:center}@media (orientation:portrait) and (max-width:360px) and (max-height:620px){html[lang="de"].has-touch-controls .daily-modal .daily-title-box:not([translate="no"]){top:-14px !important;translate:-28px 0}}html[lang="de"]:not(.has-touch-controls) .account-login-label{font-size:14px}html[lang="de"] .daily-card button[data-daily-claim]{grid-template-columns:minmax(0,1fr);text-align:center}/* Shrink only the painted label,preserving the control's original layout size. */
html[lang="de"] .custom-speed-max-text {
  display: inline-block;
  transform: scale(0.595);
  transform-origin: center;
}
/* German login: requested larger lettering and a slight left adjustment. */
html[lang="de"]:not(.has-touch-controls) .account-login-logo {
  left: -3px;
}
html[lang="de"]:not(.has-touch-controls) .account-login-label {
  left: -3px;
}

html[lang="de"] .diamond-shop-title-lockup {
  translate: clamp(6px, 1vw, 14px) 0;
}

/* Reviewed locales keep reference control geometry and use measured typography. */
html.has-measured-localization .daily-calendar { flex-shrink: 0; }
html.has-measured-localization .daily-card button[data-daily-claim] { grid-template-columns: minmax(0, 1fr); text-align: center; }
html:is(.has-measured-localization, .has-measured-name-controls) .player-name-button-label { min-width: 0; }

/* Keep the short touch login caption inside the unchanged logo/button space. */
html:is([lang="es"], [lang="pl"], [lang="pt"], [lang="no"], [lang="ro"], [lang="sv"], [lang="fi"], [lang="da"], [lang="nl"]) .account-login-label { flex: 1; min-width: 0; }

/* Original glyphs, with only the measured excess advance of ä corrected. */
@font-face { font-family: GameHeavyReviewed; src: url("../assets/fonts/GROBOLD-localized-metrics.e19bb509f5.ttf") format("truetype"); font-style: normal; font-weight: 900; font-display: block; }
html.has-reviewed-font { --font-heavy: GameHeavyReviewed, GameHeavy, Grobold, "Grobold", "Volkswagen Heavy", "Volkswagen Serial Heavy", "Cooper Black", "Arial Black", Impact, sans-serif; }

/* The German version hides the account login entry button. */
html[lang="de"] #accountLoginButton { display: none !important; }

/* Reduce mobile compositing work without changing text or control geometry. */
html.has-touch-controls .modal-overlay,
html.has-touch-controls .panel,
html.has-touch-controls .leaderboard,
html.has-touch-controls .diamond-shop-panel {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html.has-touch-controls .menu-alert,
html.has-touch-controls .rebirth-button.rebirth-ready,
html.has-touch-controls .icon-button.gift {
  animation: none !important;
}

html.has-touch-controls .menu-alert {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 0 rgba(0, 0, 0, 0.34);
}

html.has-touch-controls .menu-icon-image,
html.has-touch-controls .sound-toggle img,
html.has-touch-controls .custom-speed-button img,
html.has-touch-controls .emoji-hud-button img,
html.has-touch-controls .rebirth-button.rebirth-ready {
  filter: none !important;
}

/* Navigation stays in the existing right inset without adding a grid row. */
.emoji-page-arrow { position: absolute; z-index: 3; top: 50%; right: -3px; translate: 0 -50%; width: 34px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; transition: transform 120ms ease, filter 120ms ease; }
.emoji-page-arrow img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.emoji-page-arrow.is-previous img { transform: scaleX(-1); }
.emoji-page-arrow:hover { filter: brightness(1.1); transform: translateY(1px); }
.emoji-page-arrow:active { transform: translateY(3px); }
.emoji-page-arrow:focus-visible { outline: 3px solid #fff36a; outline-offset: 2px; border-radius: 12px; }
@media (max-width: 600px), (max-height: 600px) { .emoji-page-arrow { width: 30px; height: 40px; } }
html.has-touch-controls .emoji-page-arrow { width: 30px; height: 40px; }

/* Add room only along the right edge of the emoji menu. */
html.has-preview-features .emoji-menu { padding-right: 29px; margin-right: -12px; }
html.has-preview-features:not(.has-touch-controls) .emoji-menu { margin-right: calc(-12px * var(--game-ui-scale, 1)); }
.emoji-menu .emoji-page-arrow { right: 0; }
@media (max-width: 600px) { html.has-preview-features .emoji-menu { padding-right: 24px; } }
html.has-preview-features.has-touch-controls .emoji-menu { padding-right: 24px !important; }

/* Final builds hide rewarded-ad buttons and preview-only emoji controls.
   The double-trophy button has its own switch (main.js, ?rewarded=1). */
html:not(.has-preview-features) :is(.rewarded-ad-button:not(.double-trophy-claim), .emoji-page-arrow, .daily-restore-tv) {
  display: none !important;
}

/* Skin shop picture tabs (#485): only built by renderSkinShop while Halloween skins
   are shown (?theme=halloween or owned), so the base shop keeps its geometry. */
.skin-shop-tabs {
  position: absolute;
  right: 0;
  top: 50%;
  display: flex;
  gap: 8px;
  transform: translateY(-50%);
}

.skin-shop-tab {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  padding: 4px;
  border: 3px solid rgba(24, 9, 19, 0.78);
  border-radius: 14px;
  background: rgba(65, 29, 94, 0.72);
  cursor: pointer;
  opacity: 0.78;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.22), 0 4px 0 rgba(0, 0, 0, 0.26);
  transition: transform 120ms ease, opacity 120ms ease;
}

.skin-shop-tab img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.skin-shop-tab.is-active {
  border-color: #180913;
  background: linear-gradient(180deg, #ffd45a, #ff8a1f);
  opacity: 1;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.45), 0 0 0 3px #fff, 0 5px 0 rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.skin-shop-tab:not(.is-active):hover {
  opacity: 1;
}

@media (max-width: 520px), (pointer: coarse) {
  .skin-shop-tabs {
    gap: 5px;
  }

  .skin-shop-tab {
    width: 42px;
    height: 42px;
    padding: 2px;
    border-width: 2px;
    border-radius: 10px;
  }

  .skin-shop-tab.is-active {
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.45), 0 0 0 2px #fff, 0 3px 0 rgba(0, 0, 0, 0.3);
  }
}

/* Portrait phones: the header has no room beside the title, so the tabs get their own row. */
@media (pointer: coarse) and (orientation: portrait), (max-width: 520px) {
  .skin-shop-header:has(> .skin-shop-tabs) {
    flex-wrap: wrap;
  }

  .skin-shop-tabs {
    position: static;
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-end;
    width: 100%;
    transform: none;
  }
}

/* Friday #487 Halloween UI theme: ?theme=halloween sets html.theme-halloween (shell scripts).
   Only colours, backgrounds and the gift icon change; sizes and positions stay the base ones. */
/* Friday #631: Halloween loading screen surround (night purple + pumpkin orange, no pastel cyan/pink).
   It beats the @media (pointer: coarse) .loading-screen background by specificity. */
html.theme-halloween .loading-screen {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 122, 26, 0.42), transparent 30%),
    radial-gradient(circle at 82% 34%, rgba(214, 63, 200, 0.5), transparent 32%),
    linear-gradient(155deg, #3b1670 0%, #6a24b8 34%, #c2389e 68%, #2a1252 100%);
}

html.theme-halloween .loading-screen::before {
  background:
    radial-gradient(circle at 17% 31%, rgba(255, 140, 42, 0.3) 0 8%, transparent 27%),
    radial-gradient(circle at 76% 27%, rgba(214, 63, 200, 0.3) 0 9%, transparent 29%),
    radial-gradient(circle at 66% 49%, rgba(255, 192, 74, 0.28) 0 5%, transparent 22%);
}

html.theme-halloween .loading-screen-art {
  background: linear-gradient(90deg, #ff7a1a 0 19%, #ffc04a 19% 38%, #40a231 38% 58%, #9c90bc 58% 79%, #6a24b8 79% 100%);
}

html.theme-halloween .loading-screen-image {
  background-color: #7a2fd6;
}

html.theme-halloween .loading-player-card {
  background:
    radial-gradient(circle at 3% 45%, rgba(255, 236, 170, 0.55), transparent 34%) padding-box,
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 32%) padding-box,
    url("../assets/icons/profile-card-halloween.a6263a3c3f.webp") center / cover no-repeat padding-box,
    linear-gradient(180deg, #ffb238 0%, #ff8a1c 54%, #f06a0c 100%) padding-box,
    linear-gradient(120deg, #4a1c00 0%, #2a1000 54%, #160800 100%) border-box;
  box-shadow:
    inset 0 2px 0 rgba(255, 240, 200, 0.32),
    inset 0 -2px 0 rgba(150, 50, 0, 0.42),
    0 0 0 1px rgba(26, 9, 0, 0.9),
    0 5px 13px rgba(60, 20, 0, 0.3),
    0 0 9px rgba(255, 140, 40, 0.3);
}

html.theme-halloween .loading-player-identity > span {
  color: #fff3d6;
}

/* Name edit button: Halloween purple, so it stands out on the orange card (the base is sky blue). */
html.theme-halloween .loading-player-edit {
  border-color: #1a0826;
  background: linear-gradient(180deg, #c49bff 0%, #9b5cf0 55%, #6a2fc4 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.4),
    0 3px 0 rgba(40, 10, 70, 0.68);
}

html.theme-halloween .loading-player-edit:active {
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.34),
    0 2px 0 rgba(40, 10, 70, 0.68);
}

/* Edit-name window opened from the card: orange panel, purple name box and Generate button. */
html.theme-halloween .player-name-modal {
  background:
    radial-gradient(circle at 16% 9%, rgba(255, 255, 255, 0.5), transparent 25%),
    radial-gradient(circle at 10px 10px, rgba(120, 40, 0, 0.13) 0 3px, transparent 3.7px) 0 0 / 26px 26px,
    linear-gradient(150deg, #ffd27a 0%, #ffa02e 42%, #f06a0c 100%);
  box-shadow:
    inset 0 7px 0 rgba(255, 255, 255, 0.42),
    inset 0 -8px 0 rgba(140, 45, 0, 0.22),
    0 11px 0 rgba(0, 0, 0, 0.34),
    0 20px 38px rgba(0, 0, 0, 0.3);
}

html.theme-halloween .player-name-preview {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 35%),
    linear-gradient(180deg, #8a4fe0 0%, #6a2fc4 54%, #4a1d96 100%);
}

html.theme-halloween .player-name-preview span {
  color: #ffd9a8;
}

html.theme-halloween .player-name-generate {
  background: linear-gradient(180deg, #c49bff 0%, #9b5cf0 52%, #6a2fc4 100%);
}

html.theme-halloween .player-name-status {
  text-shadow: 0 2px 2px rgba(90, 30, 0, 0.72);
}

html.theme-halloween .leaderboard {
  border-color: #1a0a00;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 140, 40, 0.3), transparent 46%),
    linear-gradient(180deg, rgba(36, 16, 6, 0.96), rgba(14, 8, 4, 0.95));
}

html.theme-halloween .leaderboard-room-code {
  color: #ffe2c2;
}

html.theme-halloween .leaderboard-room-code b,
html.theme-halloween .leaderboard-name i {
  color: #ffb347;
}

html.theme-halloween .leaderboard-body {
  scrollbar-color: #ff9a2e rgba(10, 5, 2, 0.45);
}

html.theme-halloween .leaderboard-body::-webkit-scrollbar-track {
  background: rgba(10, 5, 2, 0.45);
}

html.theme-halloween .leaderboard-body::-webkit-scrollbar-thumb {
  border-color: rgba(30, 12, 0, 0.85);
  background: linear-gradient(180deg, #ffb347, #d25a00);
}

html.theme-halloween .leaderboard-row {
  background: rgba(8, 4, 2, 0.4);
}

html.theme-halloween .leaderboard-row.is-local {
  background: rgba(255, 128, 20, 0.3);
  border-color: rgba(255, 170, 70, 0.85);
}

html.theme-halloween .leaderboard-row:nth-child(1) .leaderboard-name i {
  border-color: #ffe9a8;
  background: linear-gradient(180deg, #ffd65c, #e08a00);
  color: #fff4e8;
  box-shadow: 0 0 5px rgba(255, 190, 50, 0.75);
}

html.theme-halloween .leaderboard-row:nth-child(2) .leaderboard-name i {
  border-color: #ffc890;
  background: linear-gradient(180deg, #ff9a3c, #c84a00);
  color: #fff4e8;
  box-shadow: 0 0 5px rgba(255, 120, 20, 0.6);
}

html.theme-halloween .leaderboard-row:nth-child(3) .leaderboard-name i,
html.theme-halloween .leaderboard-row:nth-child(4) .leaderboard-name i {
  color: #fff4e8;
}

html.theme-halloween .room-code-panel {
  border-top-color: rgba(255, 160, 60, 0.3);
}

html.theme-halloween .icon-button.gift {
  --button-stripe-color: rgba(120, 40, 0, 0.14);
  --button-glow-color: rgba(255, 170, 60, 0.3);
  background:
    radial-gradient(circle at 27% 18%, rgba(255, 255, 255, 0.78) 0 8%, rgba(255, 255, 255, 0.24) 18%, transparent 31%),
    linear-gradient(145deg, #ffd27a 0%, #ffa02e 30%, #ff7a12 62%, #d24a00 100%);
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 0 rgba(110, 35, 0, 0.18),
    0 6px 0 rgba(0, 0, 0, 0.38),
    0 9px 20px rgba(0, 0, 0, 0.25),
    0 0 10px rgba(255, 140, 40, 0.32);
}

/* Friday #617 (Matthijs 2026-10-14): Halloween Skins button as a fully green diagonal gradient (round 6, 2026-10-15: "make skins button green instead"); colours only. */
html.theme-halloween .icon-button.skin {
  --button-stripe-color: rgba(20, 70, 10, 0.14);
  --button-glow-color: rgba(120, 230, 80, 0.5);
  background:
    radial-gradient(circle at 27% 18%, rgba(255, 255, 255, 0.72) 0 8%, rgba(255, 255, 255, 0.24) 18%, transparent 31%),
    linear-gradient(125deg, #9cf26e 0%, #5fd640 40%, #3db534 70%, #23801f 100%);
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 0 rgba(15, 60, 10, 0.24),
    0 6px 0 rgba(0, 0, 0, 0.36),
    0 9px 20px rgba(0, 0, 0, 0.26),
    0 0 12px rgba(120, 230, 80, 0.5);
}

html.theme-halloween .icon-button.skin:hover {
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.46),
    inset 0 -3px 0 rgba(15, 60, 10, 0.22),
    0 7px 0 rgba(0, 0, 0, 0.34),
    0 11px 22px rgba(0, 0, 0, 0.24),
    0 0 16px rgba(120, 230, 80, 0.6);
}

/* Friday #604 (Matthijs 2026-10-15): Halloween Trails button in light purple; colours only. */
html.theme-halloween #trailsButton.icon-button {
  --button-gradient-top: #f1e4ff;
  --button-gradient-mid: #cba6ff;
  --button-gradient-bottom: #9a6ef0;
  --button-stripe-color: rgba(90, 40, 170, 0.14);
  --button-glow-color: rgba(190, 150, 255, 0.45);
}

html.theme-halloween:not(.is-chromebook):not(.is-ipad):not(.has-touch-controls) .icon-button.gift {
  animation-name: gift-ui-glow-halloween;
}

html.theme-halloween .icon-button.gift:hover {
  box-shadow:
    inset 0 5px 0 rgba(255, 255, 255, 0.48),
    inset 0 -3px 0 rgba(110, 35, 0, 0.16),
    0 7px 0 rgba(0, 0, 0, 0.36),
    0 11px 22px rgba(0, 0, 0, 0.24),
    0 0 14px rgba(255, 140, 40, 0.42);
}

html.theme-halloween .icon-button.gift.has-alert {
  box-shadow:
    inset 0 4px 0 rgba(255, 255, 255, 0.44),
    inset 0 -3px 0 rgba(110, 35, 0, 0.18),
    0 6px 0 rgba(0, 0, 0, 0.38),
    0 9px 20px rgba(0, 0, 0, 0.25),
    0 0 12px rgba(255, 140, 40, 0.4);
}

@keyframes gift-ui-glow-halloween {
  0%,
  100% {
    box-shadow:
      inset 0 4px 0 rgba(255, 255, 255, 0.42),
      inset 0 -3px 0 rgba(110, 35, 0, 0.18),
      0 6px 0 rgba(0, 0, 0, 0.38),
      0 9px 20px rgba(0, 0, 0, 0.25),
      0 0 9px rgba(255, 140, 40, 0.3);
  }
  50% {
    box-shadow:
      inset 0 4px 0 rgba(255, 255, 255, 0.48),
      inset 0 -3px 0 rgba(110, 35, 0, 0.16),
      0 6px 0 rgba(0, 0, 0, 0.38),
      0 9px 20px rgba(0, 0, 0, 0.25),
      0 0 13px rgba(255, 140, 40, 0.42);
  }
}

/* Friday #484 (Matthijs, 2026-10-13): the stage/lobby title bar above the level bar is orange in the
   Halloween theme instead of the stage colours (JS sets --stage-label-* per stage; the background wins here). */
html.theme-halloween .stage-strip {
  background: linear-gradient(180deg, #ffb45c 0%, #ff7a1a 100%);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.5),
    0 4px 0 rgba(0, 0, 0, 0.28),
    0 0 14px rgba(255, 122, 26, 0.35);
}

/* Friday #503 (Matthijs): two small Roblox-vector AI pumpkins (1.2em tall, the Halloween skin-shop title pumpkin) beside the
   Halloween "Lobby" label, centred on the text, with about 0.8em of air to it and a black outline (CSS drop-shadows, so the shop's pumpkins keep their own look);only in the lobby (part 45 sets data-lobby on #stageName),not on stages. 2026-10-15:pumpkins replaced the bats;later the black outline,closer,a bit higher;then 0.14em higher again. The bar's one grid column shrinks to the label (the text node), and the absolutely placed ::before
   takes that grid cell as its box, so the pumpkins follow the text at any label length. ::after is the stud mask;
   em sizes follow the bar's font-size (smaller on phones). */ html.theme-halloween .stage-strip[data-lobby="1"]{grid-template-columns:max-content;justify-content:center}html.theme-halloween .stage-strip[data-lobby="1"]::before{content:"";position:absolute;z-index:3;grid-area:1 / 1 / 2 / 2;top:50%;left:-2em;right:-2em;height:1.2em;transform:translateY(calc(-50% - 0.12em));pointer-events:none;filter:drop-shadow(0.07em 0 0 #000) drop-shadow(-0.07em 0 0 #000) drop-shadow(0 0.07em 0 #000) drop-shadow(0 -0.07em 0 #000);background:url("../assets/icons/skin-title-pumpkin-left.0b024b9345.webp") left center / auto 100% no-repeat,url("../assets/icons/skin-title-pumpkin-right.0c414b633b.webp") right center / auto 100% no-repeat}/* Friday #566 (Matthijs,2026-10-14):the top-left settings button in Halloween colours:purple box (like the player card's edit button) around the recoloured orange cog (assets-src/settings-cog-halloween.mjs, swapped in by
   the shells' inline script). Only colours change;sizes,positions and box-shadows stay with the base/media rules. */ html.theme-halloween .sound-toggle.settings-toggle{border-color:#1a0826;background:radial-gradient(circle at 28% 18%,rgba(255,255,255,0.6),transparent 22%),linear-gradient(180deg,#c49bff 0%,#9b5cf0 50%,#6a2fc4 100%)}/* Friday #570 (Matthijs,2026-10-14):the skin shop window in Halloween style while its Halloween tab is open (renderSkinShop toggles .is-halloween-tab on .skin-modal). Friday #588 (Matthijs,2026-10-14:"the halloween skins
   menu is too dark use a design with brighter halloween colors, also use pumpkins instead of bat icons"):a bright panel built like the pastel original (white glow top-left,light stripes,one diagonal gradient),but pumpkin orange ->peach ->lilac with a lime glow,purple inner line,pumpkin-orange title between two jack-o'-lanterns (assets-src/skin-title-pumpkins-halloween.mjs),orange close button. Only colours and the title icons change;sizes and positions stay with the base,touch and mobile.css rules. */ .skin-modal.is-halloween-tab{background:radial-gradient(circle at 20% 12%,rgba(255,255,255,0.4),transparent 18%),radial-gradient(ellipse at 96% 100%,rgba(186,240,92,0.62),transparent 34%),repeating-linear-gradient(0deg,rgba(255,255,255,0.08) 0 6px,transparent 6px 24px),linear-gradient(140deg,#ffb24a 0%,#ffcf8a 34%,#d9a8ff 66%,#b07cff 100%);box-shadow:inset 0 6px 0 rgba(255,255,255,0.3),0 12px 0 rgba(0,0,0,0.34),0 18px 34px rgba(0,0,0,0.28),0 0 26px rgba(255,122,26,0.32)}.skin-modal.is-halloween-tab::before{border-color:rgba(74,24,120,0.72)}html .skin-modal.is-halloween-tab h2{position:relative;width:fit-content;color:#ff9a0a;text-shadow:var(--outline-3),0 0 10px rgba(255,150,20,0.95),0 0 24px rgba(255,120,0,0.7)}.skin-modal.is-halloween-tab h2::before{content:"";position:absolute;top:50%;left:-0.86em;right:-0.86em;height:0.72em;transform:translateY(-50%);pointer-events:none;background:url("../assets/icons/skin-title-pumpkin-left.0b024b9345.webp") left center / auto 100% no-repeat,url("../assets/icons/skin-title-pumpkin-right.0c414b633b.webp") right center / auto 100% no-repeat}.skin-modal.is-halloween-tab .skin-close{border-color:#1a0a00;background:linear-gradient(145deg,#ffb238,#f06a0c)}.skin-modal.is-halloween-tab .skin-balance{border-color:rgba(40,12,64,0.82);background:rgba(124,62,196,0.78)}.skin-modal.is-halloween-tab .skin-shop-tab:not(.is-active){background:rgba(132,74,204,0.72)}