:root{--ink:#f2efff;--muted:#918da7;--panel:#171522;--panel2:#201d2f;--purple:#a884ff;--red:#ff5e7e;--line:#312c47}*{box-sizing:border-box}body{margin:0;background:#0d0c14;color:var(--ink);font-family:Manrope,system-ui,sans-serif;min-height:100vh}body:before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 50% -10%,#29233f 0,transparent 45%),linear-gradient(120deg,transparent 60%,#13101e)}.screen{min-height:100vh;display:flex;flex-direction:column;align-items:center;padding:clamp(35px,7vh,80px) 20px;position:relative}.hidden{display:none!important}.eyebrow{letter-spacing:.3em;font-size:11px;color:var(--purple);font-weight:800;margin:0 0 14px}h1{font-size:clamp(36px,6vw,62px);font-weight:800;line-height:1;margin:0 0 20px;letter-spacing:-.05em}.warning{font-family:'Baloo 2',cursive;font-weight:800;font-size:clamp(19px,3vw,29px);letter-spacing:.08em;color:#ffc3cf;margin:0 0 40px;transform:rotate(-1.5deg);text-shadow:3px 3px #44273b}.hero-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,300px));gap:20px;width:min(960px,100%)}.hero-card{background:linear-gradient(145deg,#211d31,#14121e);border:1px solid var(--line);border-radius:22px;padding:25px 22px;cursor:pointer;transition:.2s;box-shadow:0 15px 40px #0003}.hero-card:hover{transform:translateY(-7px);border-color:var(--purple);box-shadow:0 18px 45px #9270ff29}.avatar{height:150px;border-radius:16px;display:grid;place-items:center;margin-bottom:20px;font-size:78px;background:#11101a}.hero-card h2{margin:0 0 7px;font-size:26px}.hero-card p{color:var(--muted);font-size:13px;line-height:1.6;min-height:63px}.stats{border-top:1px solid var(--line);padding-top:14px;display:flex;justify-content:space-between;color:#d5d0e5;font-size:11px}.muted,.server-note{color:var(--muted)}.home-card{width:min(420px,100%);background:var(--panel);border:1px solid var(--line);padding:30px;border-radius:20px;margin-top:25px;box-shadow:0 20px 60px #0006}.home-card label{font-size:11px;letter-spacing:.15em;color:var(--muted);font-weight:800}input{display:block;width:100%;background:#0e0d15;border:1px solid var(--line);border-radius:11px;padding:15px;color:white;font:inherit;margin:9px 0 16px;outline:none}input:focus{border-color:var(--purple)}button{border:0;font:inherit;font-weight:800;cursor:pointer}.primary{width:100%;padding:15px;border-radius:11px;background:var(--purple);color:#171222;font-size:15px}.primary span{float:right;font-size:22px;line-height:15px}.server-note{text-align:center;font-size:12px;margin:18px 0 0}.game-screen{position:relative;height:100vh;overflow:hidden;background:#0a0910}.hud{height:78px;background:#14121e;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:relative;z-index:2}.hud strong{display:block;letter-spacing:.12em;font-size:13px}.hud small{color:var(--muted);font-size:11px}.health-wrap{display:flex;align-items:center;gap:10px;font-size:10px;color:var(--muted);font-weight:800}.health-bar{width:210px;height:8px;background:#34212d;border-radius:99px;overflow:hidden}.health-bar i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#ff4c74,#ff9a8b);transition:.2s}.class-label{color:var(--purple);font-size:12px;font-weight:800}.controls{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);color:#747084;font-size:10px;letter-spacing:.12em;white-space:nowrap}.ghost-button{position:absolute;right:22px;bottom:17px;background:transparent;color:#807b92;font-size:11px}.ghost-button:hover{color:white}canvas{display:block;width:100%;height:calc(100vh - 78px);cursor:crosshair}
@media(max-width:760px){.hero-grid{grid-template-columns:1fr;max-width:360px}.hero-card{padding:17px}.avatar{height:80px;font-size:48px;display:inline-grid;width:80px;float:left;margin:0 16px 10px 0}.hero-card p{min-height:0}.hud{padding:0 14px}.health-bar{width:100px}.controls{display:none}}
.hud{gap:24px}.hud-progress{width:190px}.hud-progress>div:first-child{display:flex;justify-content:space-between;font-size:10px;font-weight:800;color:#cfc8e9}.hud-progress span+span{color:var(--muted)}.xp-bar{height:6px;background:#292440;border-radius:9px;margin-top:6px;overflow:hidden}.xp-bar i{display:block;height:100%;width:0;background:var(--purple)}.quests-button{background:#292440;color:#d9d1ff;border:1px solid #4a4070;border-radius:7px;padding:8px 11px;font-size:10px;letter-spacing:.12em}.quest-panel{position:absolute;right:22px;top:96px;width:280px;background:#171522ef;border:1px solid #403760;border-radius:14px;padding:24px;z-index:3;box-shadow:0 20px 50px #0008}.quest-panel h2{margin:0 0 18px}.quest-panel button{position:absolute;right:12px;top:8px;background:none;color:#aaa;font-size:25px}.quest{padding:12px 0;border-top:1px solid var(--line);font-size:12px;color:#ddd}.quest small{display:block;color:var(--muted);margin-top:5px}.minimap{position:absolute;right:22px;bottom:48px;width:180px;height:105px;border:2px solid #65558d;background:#11101bd9;border-radius:8px;z-index:2}.minimap i{position:absolute;width:7px;height:7px;border-radius:50%;background:#ff637f;transform:translate(-50%,-50%);box-shadow:0 0 8px #ff637f}
.avatar img{width:100%;height:100%;object-fit:contain;border-radius:12px}.avatar{overflow:hidden}
.secondary{display:block;width:100%;padding:12px;border-radius:10px;background:#292440;color:#ddd5ff;margin-top:10px}.home-actions{display:flex;gap:10px}.home-actions .secondary{width:50%}.setting-label{display:block;color:#b9b2ce;font-size:12px;margin-top:18px}.setting-label input{padding:0;margin:8px 0 0}.back-button{position:absolute;top:24px;left:24px;background:transparent;color:#bcb4d2;font-size:14px}.back-button:hover{color:white}.game-screen.paused:after{content:"";position:absolute;inset:78px 0 0;background:#07060bb8;z-index:1;pointer-events:none}
.modal-card{position:fixed;z-index:10;top:50%;left:50%;transform:translate(-50%,-50%);margin:0}.close-modal{position:absolute;right:18px;top:12px;background:transparent;color:#aaa;font-size:25px}.boosts-left{color:#bda9ff;text-align:center;font-size:12px;font-weight:800}
.quest-panel>button.primary,.quest-panel>button.secondary{position:static;display:block}.quest-panel>.setting-label input{display:block}.quest-panel>#close-quests,.quest-panel>#close-settings{position:absolute;right:12px;top:8px;background:none;color:#aaa;font-size:25px}.measurement{position:absolute;left:24px;top:50%;z-index:2;color:#d0c9e8;font-size:10px;text-align:center}.measurement i{display:block;height:38px;width:2px;background:#c7bfdf;margin:0 auto 5px;position:relative}.measurement i:before,.measurement i:after{content:"";position:absolute;left:-5px;width:12px;height:2px;background:#c7bfdf}.measurement i:before{top:0}.measurement i:after{bottom:0}.game-screen canvas{background:linear-gradient(#161421,#0d0c15)}
.quest-panel{text-align:center}.quest-panel .setting-label{text-align:left}.quest-panel .primary,.quest-panel .secondary{margin-left:auto;margin-right:auto}
.damage-wrap{display:flex;align-items:center;gap:8px;font-size:10px;color:var(--muted);font-weight:800}.damage-bar{width:100px;height:8px;background:#292440;border-radius:99px;overflow:hidden}.damage-bar i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#a884ff,#d5a6ff)}
.control-choice{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0 0 18px;color:#cfc8e9;text-align:left}.control-choice legend{font-size:10px;color:var(--muted);letter-spacing:.12em;padding:0 6px}.control-choice label{display:inline-flex;align-items:center;gap:6px;margin-right:18px;font-size:12px}.control-choice input{display:inline-block;width:auto;margin:0;padding:0}.setting-label.hidden{display:none}
.modal-card{padding:34px 32px 30px;min-width:340px}.modal-card h2{margin:0 0 24px;text-align:center}.modal-card .setting-label{margin-top:20px}.modal-card .setting-label input{margin-top:10px}.modal-card .primary{margin-top:26px}.modal-card .close-modal{line-height:1}.home-actions{margin-top:4px}
button{border-radius:12px;transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}button:not([hidden]):hover{transform:scale(1.07);filter:brightness(1.12);box-shadow:0 8px 22px #0007}button:not([hidden]):active{transform:scale(.98)}.quests-button,.secondary,.primary,.ghost-button,.back-button{border-radius:999px}.quests-button{padding:9px 14px}.ghost-button,.back-button{padding:9px 14px}
.minimap .bush-dot{position:absolute;width:5px;height:5px;border-radius:50%;background:#67c96b;transform:translate(-50%,-50%);box-shadow:0 0 4px #67c96b}

/* The 100x100-stud world overview is a true square, split into four 50x50 squares. */
.minimap{width:160px;height:160px;overflow:hidden}
.minimap:before,.minimap:after{content:"";position:absolute;z-index:1;background:rgba(255,255,255,.32);pointer-events:none}.minimap:before{left:50%;top:0;width:2px;height:100%;transform:translateX(-50%)}.minimap:after{top:50%;left:0;width:100%;height:2px;transform:translateY(-50%)}
.minimap i,.minimap .bush-dot{z-index:2}
.player-stats{border-top:1px solid var(--line);margin-top:18px;padding-top:14px;color:#d5d0e5;font-size:12px;line-height:1.9}.death-panel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(360px,calc(100% - 40px));padding:28px;background:#171522f2;border:1px solid #65558d;border-radius:22px;text-align:center;z-index:5;box-shadow:0 20px 70px #000b}.death-panel h2{margin:0;color:#ff708d;letter-spacing:.12em}.death-panel p{color:var(--muted);font-size:13px;margin:12px 0 20px}.death-panel button{width:100%}

.tesseract-title{display:flex;align-items:center;justify-content:center;gap:0}.tesseract-letter{display:inline-flex;align-items:center;justify-content:center;width:.82em;height:.92em;margin:0 .01em;transform:translateY(.055em);overflow:hidden}.tesseract-letter img{width:118%;height:118%;object-fit:cover;mix-blend-mode:screen;opacity:.8;filter:saturate(1.35) contrast(1.2) drop-shadow(0 0 5px rgba(82,169,255,.75));-webkit-mask-image:radial-gradient(ellipse at center,black 38%,transparent 72%);mask-image:radial-gradient(ellipse at center,black 38%,transparent 72%)}
.home-utility-actions{display:flex;gap:10px;margin-top:10px}.home-utility-actions .secondary{width:50%;margin-top:0}.upgrade-note{margin:-10px 0 18px;text-align:center;color:var(--muted);font-size:12px}.upgrade-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;border-top:1px solid var(--line)}.upgrade-row:first-child{border-top:0}.upgrade-name{display:flex;flex-direction:column;gap:3px;font-size:13px;font-weight:800}.upgrade-name span{font-size:10px;color:var(--muted);letter-spacing:.1em}.upgrade-plus{min-width:102px;margin:0!important;padding:10px 12px!important;font-size:11px!important}.upgrade-plus:disabled{cursor:default;filter:grayscale(.7);opacity:.6}.upgrade-plus:disabled:hover{transform:none;box-shadow:none}
.home-utility-actions{justify-content:center}.home-utility-actions #upgrades-button{position:fixed;left:24px;top:calc(50% + 108px);z-index:6;width:94px;height:62px;margin:0;padding:10px!important;border-radius:18px!important;font-size:10px;line-height:1.2;box-shadow:0 12px 30px #0008}.home-utility-actions #use-boost{position:fixed;left:24px;top:50%;z-index:6;width:94px;height:94px!important;margin:0;padding:12px!important;border-radius:22px!important;line-height:1.2;box-shadow:0 12px 30px #0008;transform:translateY(-50%)}.home-utility-actions #use-boost:hover{transform:translateY(-50%) scale(1.07)}.home-utility-actions #use-boost:active{transform:translateY(-50%) scale(.98)}#home-settings,#shop-home{position:fixed;left:24px;z-index:6;width:94px!important;margin:0!important;padding:11px 8px!important;border-radius:18px!important;font-size:10px;box-shadow:0 12px 30px #0008}#home-settings{top:24px}#shop-home{top:94px}.home-utility-actions #upgrades-button:hover,#home-settings:hover,#shop-home:hover{transform:scale(1.07)}.home-utility-actions #upgrades-button:active,#home-settings:active,#shop-home:active{transform:scale(.98)}
.home-utility-actions #use-boost strong{display:block;font-size:13px;letter-spacing:.1em}.home-utility-actions #use-boost small{display:block;margin-top:7px;color:#bdb3e0;font-size:9px;font-weight:700;letter-spacing:0;text-transform:none}
@media(max-width:760px){.home-utility-actions #use-boost{left:14px;width:78px;height:78px!important;font-size:10px;border-radius:18px!important}.home-utility-actions #upgrades-button{left:14px;top:calc(50% + 92px);width:78px;height:54px;font-size:9px}#home-settings,#shop-home{left:14px;width:78px!important;font-size:9px}#home-settings{top:14px}#shop-home{top:76px}}

/* Home menu placement overrides. */
#home-settings{left:auto;right:24px;top:24px;width:58px!important;font-size:20px;line-height:1}
#close-home-settings{display:none}
@media(max-width:760px){#home-settings{left:auto;right:14px;top:14px;width:52px!important;font-size:18px}}

.currency-display{position:fixed;right:94px;top:24px;z-index:6;display:flex;align-items:center;justify-content:center;gap:3px;width:58px;height:44px;padding:4px;background:#292440;border:1px solid #4a4070;border-radius:18px;color:#ffe070;font-size:11px;font-weight:800;text-shadow:0 2px 8px #000}.currency-display img{width:22px;height:22px;object-fit:cover;border-radius:50%;mix-blend-mode:screen;filter:drop-shadow(0 0 4px #ffbe2d)}
@media(max-width:760px){.currency-display{right:80px;top:14px;width:52px;height:40px;font-size:10px;gap:2px}.currency-display img{width:19px;height:19px}}

/* Clean home screen and settings motion. */
#home-screen>.home-card:not(.modal-card){background:transparent;border:0;box-shadow:none}
.home-utility-actions #upgrades-button,#shop-home{font-size:13px}
#home-settings-panel:not(.hidden){transform-origin:88% 0;animation:settings-pop .32s cubic-bezier(.2,.85,.25,1) both}
@keyframes settings-pop{from{opacity:0;transform:translate(-50%,-50%) scale(.72)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}

/* Left action stack: Upgrades, Boost, then Shop. */
.home-utility-actions #use-boost{width:114px;height:114px!important}.home-utility-actions #upgrades-button,#shop-home{left:24px;width:114px!important;height:114px!important;padding:12px!important;border-radius:24px!important;font-size:10px;line-height:1.2}.home-utility-actions #upgrades-button{top:calc(50% - 185px)}#shop-home{top:calc(50% + 71px)}
@media(max-width:760px){.home-utility-actions #use-boost{width:92px;height:92px!important}.home-utility-actions #upgrades-button,#shop-home{left:14px;width:92px!important;height:92px!important;border-radius:20px!important;font-size:9px}.home-utility-actions #upgrades-button{top:calc(50% - 152px)}#shop-home{top:calc(50% + 60px)}}

@media(min-width:900px){
  #selection-screen{padding-left:clamp(34px,6vw,110px);padding-right:clamp(34px,6vw,110px)}
  #selection-screen .hero-grid{width:min(1180px,100%);grid-template-columns:repeat(3,minmax(250px,1fr));gap:28px}
  #home-screen{display:grid;grid-template-columns:minmax(180px,1fr) minmax(430px,540px) minmax(180px,1fr);grid-template-rows:auto auto 1fr;column-gap:clamp(32px,6vw,110px);align-content:start;align-items:start;padding:clamp(54px,8vh,100px) clamp(42px,7vw,130px)}
  #home-screen>.eyebrow,#home-screen>h1,#home-screen>#chosen-hero{grid-column:2;text-align:center;width:100%}
  #home-screen>.eyebrow{margin-bottom:18px}
  #home-screen>h1{font-size:clamp(42px,4.5vw,68px);white-space:nowrap}
  #home-screen>#chosen-hero{margin:0 0 8px}
  #home-screen>.home-card{grid-column:2;width:100%;max-width:540px;margin:22px auto 0;padding:34px 38px}
  #home-screen>.home-card:not(.modal-card){grid-row:3}
  #home-screen>.home-card:not(.modal-card) .home-actions{margin-top:14px}
  #home-screen>.home-card:not(.modal-card) .server-note{margin-top:24px}
  #home-settings-panel{grid-column:2}
}

@media(min-width:900px) and (max-width:1200px){
  #home-screen{column-gap:28px;padding-left:32px;padding-right:32px}
  #home-screen>h1{font-size:44px}
}

/* Main-menu shop placement. */
#shop-home,#pets-home{left:auto!important;right:24px;font-size:17px!important}
#shop-home{top:calc(50% - 185px)!important}
#pets-home{position:fixed;top:calc(50% - 61px);z-index:6;width:114px;height:114px;margin:0;padding:12px;border-radius:24px;font-size:17px!important;line-height:1.2;box-shadow:0 12px 30px #0008}
#pets-home:hover{transform:scale(1.07)}
#pets-home:active{transform:scale(.98)}
.pets-note{font-size:12px}
.owned-pets-list{width:min(920px,100%);display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px;margin:26px auto 0}
.pet-card{width:min(460px,100%);display:flex;align-items:center;gap:22px;padding:22px 26px;border:1px solid #443b65;border-radius:24px;background:linear-gradient(160deg,#29233f 0%,#191625 68%,#12101b 100%);box-shadow:0 18px 44px #0008}
.pet-card img{width:118px;height:118px;object-fit:contain;flex:0 0 auto;filter:drop-shadow(0 10px 14px #0008)}
.pet-card h2{margin:0 0 8px;color:#f4f0ff}
.pet-card p{margin:0;color:#aaa2bc;font-size:14px;line-height:1.45}
.pet-card .pet-equip{margin-top:14px;min-width:110px}
.pet-empty{margin:0}
@media(max-width:600px){.pet-card{flex-direction:column;text-align:center;padding:18px}.pet-card img{width:100px;height:100px}}
.shop-carousel{display:flex;width:min(1000px,100%);overflow-x:auto;gap:24px;padding:4px 4px 22px;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-x:contain}
.shop-section{flex:0 0 min(920px,100%);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;scroll-snap-align:center;text-align:center}
.shop-section>h2{margin:0 0 14px;font-size:24px;color:var(--purple);letter-spacing:.04em}
.shop-section>h2{grid-column:1/-1}
.shop-section .home-card{width:100%;margin:0}
.boost-use{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.boost-use .boost-logo{width:38px;height:38px;object-fit:contain}
.shop-boost-logo{display:block;width:68px;height:68px;object-fit:contain;margin:0 auto 10px}
.shop-section:first-child .home-card:nth-child(3),.shop-section:first-child .home-card:nth-child(4){background-repeat:no-repeat;background-position:center 14px;background-size:112px;padding-top:136px}
.shop-section:first-child .home-card:nth-child(3){background-image:url('assets/small-chest.png')}
.shop-section:first-child .home-card:nth-child(4){background-image:url('assets/big-chest.png')}
@media(max-width:760px){#shop-home,#pets-home{right:14px;font-size:14px!important}#shop-home{top:calc(50% - 152px)!important}#pets-home{top:calc(50% - 50px);width:92px;height:92px;border-radius:20px;font-size:14px!important}.shop-section{position:relative;flex-basis:100%;display:flex;flex-wrap:nowrap;overflow-x:auto;scroll-snap-align:start;padding-bottom:8px}.shop-section>h2{position:absolute;transform:translateY(-4px);width:calc(100% - 8px)}.shop-section .home-card{flex:0 0 82%;margin-top:42px}}

/* Game-like shop presentation: broad cards, dark panels, and clear horizontal sections. */
#shop-screen{align-items:stretch;width:100%;height:100vh;min-height:0;overflow:hidden;padding:clamp(30px,5vh,56px) clamp(22px,5vw,78px) 24px;background:radial-gradient(circle at 50% 0%,#292043 0%,#12101c 48%,#0b0a11 100%)}
#shop-screen:after{content:"";position:absolute;inset:auto 0 0;height:110px;pointer-events:none;background:linear-gradient(transparent,#090810)}
#shop-screen>.back-button{align-self:flex-start;position:relative;z-index:2;margin:0 0 8px}
#shop-screen>h1{position:relative;z-index:1;margin:0 0 5px;padding-left:4px;font-size:clamp(38px,5vw,60px);letter-spacing:-.06em}
#shop-screen>.shop-carousel{position:relative;z-index:1;align-self:center;width:min(1180px,100%);margin:auto;gap:30px;padding:16px 4px 42px}
#shop-screen .shop-section{flex-basis:min(1080px,100%);grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding:0 6px}
#shop-screen .shop-section>h2{font-size:13px;text-transform:uppercase;letter-spacing:.28em;text-align:left;color:#cbbcff;border-bottom:1px solid #3b3456;padding:0 0 12px;margin:0 0 4px}
#shop-screen .shop-section .home-card{position:relative;width:100%;height:390px;min-height:390px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end;padding:25px 22px 22px;margin:0;border:1px solid #443b65;border-radius:25px;background:linear-gradient(160deg,#29233f 0%,#191625 68%,#12101b 100%);box-shadow:0 18px 44px #0008;overflow:hidden;transition:transform .2s,border-color .2s,box-shadow .2s}
#shop-screen .shop-section .home-card:before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(135deg,#ffffff10,transparent 34%)}
#shop-screen .shop-section .home-card:hover{transform:translateY(-7px);border-color:#a884ff;box-shadow:0 25px 55px #000b,0 0 24px #9875ff22}
#shop-screen .shop-section .home-card h2{position:relative;margin:0 0 8px;font-size:22px;color:#f7f4ff;text-transform:uppercase;letter-spacing:.04em}
#shop-screen .shop-section .home-card p{position:relative;margin:0 0 18px;line-height:1.5}
#shop-screen .shop-section .home-card .primary{position:relative;margin-top:auto;border-radius:14px;box-shadow:inset 0 -3px #7655c6;transition:filter .2s,transform .2s}
#shop-screen .shop-section .home-card .primary:hover{filter:brightness(1.12);transform:scale(1.02)}
#shop-screen .shop-section:first-child .home-card:nth-child(3),#shop-screen .shop-section:first-child .home-card:nth-child(4){background-position:center 24px;background-size:170px;padding-top:210px}
#shop-screen .shop-section:first-child .home-card:nth-child(3),#shop-screen .shop-section:first-child .home-card:nth-child(4){background-color:transparent}
#shop-screen .shop-section:nth-child(2) .home-card{background:linear-gradient(160deg,#1d2a43,#171725 70%)}
#shop-screen .shop-section:nth-child(2) .home-card:first-of-type{border-color:#4f74aa}
#shop-screen .shop-section:nth-child(2) .home-card:last-of-type{border-color:#6e54a6}
#shop-screen .shop-carousel:after{content:"OFFERS     DAILY FREEBIE";position:absolute;left:50%;bottom:7px;transform:translateX(-50%);white-space:pre;color:#857c9b;font-size:11px;font-weight:800;letter-spacing:.18em;pointer-events:none}
@media(max-width:760px){#shop-screen{padding:24px 14px 18px}#shop-screen>h1{font-size:42px}#shop-screen>.shop-carousel{margin-top:8px;padding-bottom:36px}.shop-section{gap:14px!important}.shop-section .home-card{height:340px!important;min-height:340px!important;border-radius:22px!important;padding-left:18px!important;padding-right:18px!important}.shop-section:first-child .home-card:nth-child(3),.shop-section:first-child .home-card:nth-child(4){background-size:140px!important;padding-top:170px!important}.shop-section .home-card h2{font-size:18px!important}.shop-carousel:after{font-size:9px!important}}

/* Keep the chest artwork after the themed card gradients are applied. */
#shop-screen .shop-section:first-child .home-card:nth-child(3){background-image:url('assets/small-chest.png');background-repeat:no-repeat;background-position:center 24px;background-size:170px}
#shop-screen .shop-section:first-child .home-card:nth-child(4){background-image:url('assets/big-chest.png');background-repeat:no-repeat;background-position:center 24px;background-size:170px}
@media(max-width:760px){#shop-screen .shop-section:first-child .home-card:nth-child(3),#shop-screen .shop-section:first-child .home-card:nth-child(4){background-size:140px;background-position:center 20px}}

/* Align every shop visual to one shared frame. */
#shop-screen .shop-boost-logo{position:absolute;top:24px;left:50%;transform:translateX(-50%);width:170px;height:170px;margin:0;object-fit:contain}
#shop-screen .shop-section .home-card:has(.shop-boost-logo){padding-top:210px}
#shop-screen .shop-section:first-child .home-card:nth-child(3){background-size:200px}
#shop-screen .shop-section:first-child .home-card:nth-child(4){background-size:170px}
#shop-screen .shop-section:nth-child(2) .home-card:first-of-type:after{content:"";position:absolute;top:24px;left:50%;width:170px;height:170px;transform:translateX(-50%);background:url('assets/tesseract-coin.png') center/contain no-repeat;mix-blend-mode:screen;filter:drop-shadow(0 12px 12px #0008);pointer-events:none}
#shop-screen .shop-section:nth-child(2) .home-card:first-of-type{padding-top:210px}
@media(max-width:760px){#shop-screen .shop-boost-logo{top:20px;width:140px;height:140px}#shop-screen .shop-section .home-card:has(.shop-boost-logo),#shop-screen .shop-section:nth-child(2) .home-card:first-of-type{padding-top:170px}#shop-screen .shop-section:first-child .home-card:nth-child(3){background-size:165px}#shop-screen .shop-section:first-child .home-card:nth-child(4){background-size:140px}#shop-screen .shop-section:nth-child(2) .home-card:first-of-type:after{top:20px;width:140px;height:140px}}

/* Keep Daily Freebie cards on the same dark offer background. */
#shop-screen .shop-section:nth-child(2) .home-card{background:linear-gradient(160deg,#29233f 0%,#191625 68%,#12101b 100%)}

/* One shared card surface and one shared content rhythm for every shop item. */
#shop-screen .shop-section .home-card{background:linear-gradient(160deg,#29233f 0%,#191625 68%,#12101b 100%)!important;text-align:center;justify-content:flex-start}
#shop-screen .shop-section .home-card h2{width:100%;min-height:52px;display:flex;align-items:center;justify-content:center;margin:210px 0 0}
#shop-screen .shop-section .home-card p.muted{width:100%;min-height:58px;display:flex;align-items:flex-start;justify-content:center;margin:0}
#shop-screen .shop-section .home-card .primary{margin-top:auto}
#shop-screen .shop-section .home-card .server-note{min-height:18px;margin:12px 0 0}
#shop-screen .shop-section .home-card:has(.shop-boost-logo) h2,#shop-screen .shop-section:nth-child(2) .home-card:first-of-type h2,#shop-screen .shop-section:first-child .home-card:nth-child(3) h2,#shop-screen .shop-section:first-child .home-card:nth-child(4) h2{margin-top:0}
@media(max-width:760px){#shop-screen .shop-section .home-card h2{margin-top:170px}#shop-screen .shop-section .home-card:has(.shop-boost-logo) h2,#shop-screen .shop-section:nth-child(2) .home-card:first-of-type h2{margin-top:0}}

/* Restore chest artwork above the shared card surface. */
#shop-screen .shop-section:first-child .home-card:nth-child(3){background-color:#191625!important;background-image:url('assets/small-chest.png')!important;background-repeat:no-repeat;background-position:center 24px;background-size:200px!important}
#shop-screen .shop-section:first-child .home-card:nth-child(4){background-color:#191625!important;background-image:url('assets/big-chest.png')!important;background-repeat:no-repeat;background-position:center 24px;background-size:170px!important}
@media(max-width:760px){#shop-screen .shop-section:first-child .home-card:nth-child(3){background-size:165px!important;background-position:center 20px}#shop-screen .shop-section:first-child .home-card:nth-child(4){background-size:140px!important;background-position:center 20px}}

/* Use one dedicated chest layer per card so no legacy background rule can duplicate it. */
#shop-screen .shop-section:first-child .home-card:nth-child(3),#shop-screen .shop-section:first-child .home-card:nth-child(4){background-image:none!important}
#shop-screen .shop-section:first-child .home-card:nth-child(3):after,#shop-screen .shop-section:first-child .home-card:nth-child(4):after{content:"";position:absolute;top:24px;left:50%;transform:translateX(-50%);width:200px;height:200px;background-position:center;background-repeat:no-repeat;background-size:contain;pointer-events:none;z-index:1}
#shop-screen .shop-section:first-child .home-card:nth-child(3):after{background-image:url('assets/small-chest.png')}
#shop-screen .shop-section:first-child .home-card:nth-child(4):after{background-image:url('assets/big-chest.png');width:170px;height:170px}
@media(max-width:760px){#shop-screen .shop-section:first-child .home-card:nth-child(3):after{top:20px;width:165px;height:165px}#shop-screen .shop-section:first-child .home-card:nth-child(4):after{top:20px;width:140px;height:140px}}

/* The shop itself fills the viewport; only its horizontal carousel may scroll. */
#shop-screen{overflow:hidden!important}
#shop-screen>.shop-carousel{height:calc(100vh - 190px);min-height:0;overflow-x:auto;overflow-y:hidden}
#shop-screen .shop-section{height:100%;min-height:0}
#shop-screen .shop-section .home-card{height:100%;min-height:0!important}
body:has(#shop-screen:not(.hidden)){overflow:hidden}

/* Chest reveal: the scene stays soft while the reward remains crisp and readable. */
.chest-opening{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:#08061166;backdrop-filter:blur(0);opacity:1;transition:opacity 1s ease,backdrop-filter 1s ease}
.chest-opening:not(.hidden){backdrop-filter:blur(8px)}
.chest-opening.hidden{display:none}
.chest-opening.is-closing{opacity:0;backdrop-filter:blur(0)}
.chest-focus{position:relative;width:min(430px,80vw);height:min(520px,78vh);display:grid;place-items:center;text-align:center;transform:scale(.82);animation:chest-zoom 2.4s cubic-bezier(.16,.8,.18,1) forwards}
.opening-chest{position:absolute;width:min(330px,65vw);height:min(330px,65vw);object-fit:contain;filter:drop-shadow(0 22px 25px #000b);animation:chest-open-glow 2.4s ease forwards}
.opening-burst{position:absolute;width:260px;height:260px;border-radius:50%;background:#c6a5ff66;filter:blur(24px);opacity:0;animation:burst-in 2.4s ease forwards}
.opening-pet{position:absolute;width:170px;height:170px;object-fit:contain;top:15px;opacity:0;transform:translateY(35px) scale(.7);filter:drop-shadow(0 10px 18px #000);animation:pet-reveal .75s 2.15s cubic-bezier(.2,.8,.2,1) forwards}
.opening-label{position:absolute;bottom:67px;margin:0;color:#cbbcff;font-size:12px;font-weight:800;letter-spacing:.24em;opacity:0;animation:label-in .5s 2.35s ease forwards}
.opening-name{position:absolute;bottom:18px;margin:0;color:#fff;font-size:28px;text-shadow:0 3px 18px #9b6cff;opacity:0;animation:label-in .5s 2.45s ease forwards}
@keyframes chest-zoom{0%{transform:scale(.82)}100%{transform:scale(1.066)}}
@keyframes chest-open-glow{0%,70%{filter:drop-shadow(0 22px 25px #000b)}100%{filter:drop-shadow(0 0 34px #d9bfff) brightness(1.18)}}
@keyframes burst-in{0%,65%{opacity:0;transform:scale(.4)}100%{opacity:.8;transform:scale(1.35)}}
@keyframes pet-reveal{to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes label-in{to{opacity:1}}
@media(max-width:600px){.opening-pet{width:135px;height:135px}.opening-label{font-size:10px}.opening-name{font-size:23px}}

/* Chest opening sequence: blur the shop, grow the chest, then reveal the pet. */
.chest-opening{background:rgb(5 4 12 / .58);transition:opacity 1s ease,backdrop-filter 1s ease}
.chest-opening:not(.hidden){backdrop-filter:blur(12px)}
.chest-opening .chest-focus,.chest-opening .opening-chest,.chest-opening .opening-burst,.chest-opening .opening-pet,.chest-opening .opening-label,.chest-opening .opening-name{animation:none}
.chest-opening.play .chest-focus{animation:chest-zoom-to-open 1.7s cubic-bezier(.18,.75,.2,1) forwards;animation-delay:calc(-1 * var(--reveal-skip, 0s))}
.chest-opening.play .opening-chest{animation:chest-open-and-fade 2.05s cubic-bezier(.2,.75,.2,1) forwards;animation-delay:calc(-1 * var(--reveal-skip, 0s))}
.chest-opening.play .opening-burst{animation:chest-reveal-burst .7s 1.55s ease-out forwards;animation-delay:calc(1.55s - var(--reveal-skip, 0s))}
.chest-opening.play .opening-pet{animation:pet-reveal .55s 1.65s cubic-bezier(.2,.82,.2,1) forwards;animation-delay:calc(1.65s - var(--reveal-skip, 0s))}
.chest-opening.play .opening-label{animation:label-in .35s 1.9s ease forwards;animation-delay:calc(1.9s - var(--reveal-skip, 0s))}
.chest-opening.play .opening-name{animation:label-in .35s 1.98s ease forwards;animation-delay:calc(1.98s - var(--reveal-skip, 0s))}
@keyframes chest-zoom-to-open{0%{transform:scale(1)}78%{transform:scale(1.3)}100%{transform:scale(1.3)}}
@keyframes chest-open-and-fade{0%,76%{opacity:1;transform:scale(1) rotate(var(--chest-turn, 0deg))}86%{opacity:.45;transform:scale(1.12) rotate(var(--chest-turn, 0deg));filter:drop-shadow(0 0 42px #f3e5ff) brightness(1.45)}100%{opacity:0;transform:scale(1.2) rotate(var(--chest-turn, 0deg))}}
.chest-opening.show-reward .opening-chest{opacity:0;transform:scale(1.2) rotate(var(--chest-turn, 0deg))}
.chest-opening.show-reward .opening-burst{opacity:.8;transform:scale(1.65)}
.chest-opening.show-reward .opening-pet{opacity:1;transform:translateY(0) scale(1)}
.chest-opening.show-reward .opening-label,.chest-opening.show-reward .opening-name{opacity:1}
@keyframes chest-reveal-burst{0%{opacity:0;transform:scale(.35)}45%{opacity:.95;transform:scale(1.25)}100%{opacity:0;transform:scale(1.65)}}
@media(max-width:760px){#shop-screen>.shop-carousel{height:calc(100vh - 150px)} }

/* Fit the complete offer stack, including prices, inside the visible card. */
#shop-screen .shop-section .home-card{padding-top:170px!important;padding-bottom:18px!important}
#shop-screen .shop-section .home-card h2{min-height:44px;margin-top:0!important;font-size:21px}
#shop-screen .shop-section .home-card p.muted{min-height:48px;line-height:1.35}
#shop-screen .shop-section .home-card .primary{min-height:52px;padding:12px 10px;font-size:13px}
#shop-screen .shop-section .home-card .server-note{min-height:16px;margin-top:8px;font-size:11px}
#shop-screen .shop-boost-logo{top:14px;width:160px;height:160px}
#shop-screen .shop-section:nth-child(2) .home-card:first-of-type:after{top:14px;width:160px;height:160px}
#shop-screen .shop-section:first-child .home-card:nth-child(3):after{top:14px;width:160px;height:160px}
#shop-screen .shop-section:first-child .home-card:nth-child(4):after{top:14px;width:160px;height:160px}
@media(max-width:760px){#shop-screen .shop-section .home-card{padding-top:150px!important}#shop-screen .shop-boost-logo{top:12px;width:140px;height:140px}#shop-screen .shop-section:nth-child(2) .home-card:first-of-type:after,#shop-screen .shop-section:first-child .home-card:nth-child(3):after,#shop-screen .shop-section:first-child .home-card:nth-child(4):after{top:12px;width:140px;height:140px}}

/* Let the carousel use all remaining viewport height instead of flex-shrinking. */
#shop-screen>.shop-carousel{flex:1 1 auto!important;height:auto!important;min-height:0!important;margin:10px auto 0!important}
#shop-screen .shop-section{height:100%!important}
#shop-screen .shop-section .home-card{height:100%!important}
#shop-screen .shop-carousel:after{display:none!important}
#shop-screen .shop-section .home-card .primary{position:absolute!important;left:18px;right:18px;bottom:38px;width:auto!important;margin:0!important}
#shop-screen .shop-section .home-card .server-note{position:absolute;left:0;right:0;bottom:12px;margin:0!important}
@media(max-width:760px){#shop-screen .shop-section .home-card .primary{left:14px;right:14px;bottom:36px}#shop-screen .shop-section .home-card .server-note{bottom:10px}}

/* Explicit card rows prevent titles and descriptions from sitting behind buttons. */
#shop-screen .shop-section .home-card h2{position:absolute;top:198px;left:18px;right:18px;margin:0!important;min-height:44px}
#shop-screen .shop-section .home-card p.muted{position:absolute;top:249px;left:18px;right:18px;min-height:42px;margin:0!important}
@media(max-width:760px){#shop-screen .shop-section .home-card h2{top:172px}#shop-screen .shop-section .home-card p.muted{top:220px}}

/* Final visual order: image → title → description → purchase button. */
#shop-screen .shop-section .home-card h2{position:absolute!important;top:198px!important;bottom:auto!important;z-index:2}
#shop-screen .shop-section .home-card p.muted{position:absolute!important;top:248px!important;bottom:auto!important;z-index:2}
#shop-screen .shop-section .home-card .primary{top:300px!important;bottom:auto!important;z-index:3}
@media(max-width:760px){#shop-screen .shop-section .home-card h2{top:172px!important}#shop-screen .shop-section .home-card p.muted{top:218px!important}#shop-screen .shop-section .home-card .primary{top:270px!important}}

/* Final shop layout: every card is a fixed, self-contained stack.
   Order is always artwork, title, description, purchase button, status. */
#shop-screen{overflow:hidden!important;padding-bottom:18px!important}
#shop-screen>.shop-carousel{
  flex:0 0 500px!important;
  height:500px!important;
  min-height:500px!important;
  width:min(100%,1500px)!important;
  margin:8px auto 0!important;
  padding:0 4px 8px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  align-self:stretch!important;
}
#shop-screen .shop-section{
  flex:0 0 min(1120px,100%)!important;
  height:455px!important;
  min-height:455px!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:22px!important;
  padding:0 6px!important;
  align-content:start!important;
}
#shop-screen .shop-section>h2{height:42px!important;margin:0 0 10px!important;padding:0 0 12px!important}
#shop-screen .shop-section .home-card{
  position:relative!important;
  display:block!important;
  height:400px!important;
  min-height:400px!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
  background:linear-gradient(160deg,#29233f 0%,#191625 68%,#12101b 100%)!important;
}
#shop-screen .shop-section .home-card:before{z-index:0!important}
#shop-screen .shop-section .home-card h2{
  position:absolute!important;
  top:210px!important;
  left:16px!important;
  right:16px!important;
  width:auto!important;
  height:34px!important;
  min-height:0!important;
  margin:0!important;
  display:block!important;
  line-height:34px!important;
  font-size:21px!important;
  z-index:2!important;
}
#shop-screen .shop-section .home-card p.muted{
  position:absolute!important;
  top:252px!important;
  left:16px!important;
  right:16px!important;
  width:auto!important;
  height:46px!important;
  min-height:0!important;
  margin:0!important;
  display:block!important;
  line-height:1.35!important;
  font-size:13px!important;
  z-index:2!important;
}
#shop-screen .shop-section .home-card .primary{
  position:absolute!important;
  top:318px!important;
  left:16px!important;
  right:16px!important;
  width:calc(100% - 32px)!important;
  height:52px!important;
  min-height:52px!important;
  margin:0!important;
  padding:10px 8px!important;
  font-size:13px!important;
  z-index:3!important;
}
#shop-screen .shop-section .home-card .server-note{
  position:absolute!important;
  top:374px!important;
  left:10px!important;
  right:10px!important;
  height:18px!important;
  min-height:0!important;
  margin:0!important;
  font-size:11px!important;
  z-index:2!important;
}
#shop-screen .shop-section .home-card .shop-boost-logo{
  position:absolute!important;
  top:20px!important;
  left:50%!important;
  width:170px!important;
  height:170px!important;
  margin:0!important;
  transform:translateX(-50%)!important;
  z-index:1!important;
}
#shop-screen .shop-section:first-child .home-card:nth-child(3):after,
#shop-screen .shop-section:first-child .home-card:nth-child(4):after,
#shop-screen .shop-section:nth-child(2) .home-card:first-of-type:after{
  top:20px!important;
  left:50%!important;
  width:170px!important;
  height:170px!important;
  transform:translateX(-50%)!important;
  background-size:contain!important;
  z-index:1!important;
}
@media(max-width:760px){
  #shop-screen>.shop-carousel{flex-basis:430px!important;height:430px!important;min-height:430px!important}
  #shop-screen .shop-section{height:390px!important;min-height:390px!important;gap:14px!important}
  #shop-screen .shop-section .home-card{height:340px!important;min-height:340px!important}
  #shop-screen .shop-section .home-card h2{top:174px!important;font-size:17px!important;line-height:28px!important;height:28px!important}
  #shop-screen .shop-section .home-card p.muted{top:210px!important;font-size:11px!important;height:40px!important}
  #shop-screen .shop-section .home-card .primary{top:264px!important;height:46px!important;min-height:46px!important;font-size:10px!important}
  #shop-screen .shop-section .home-card .server-note{top:316px!important;font-size:9px!important}
  #shop-screen .shop-section .home-card .shop-boost-logo,
  #shop-screen .shop-section:first-child .home-card:nth-child(3):after,
  #shop-screen .shop-section:first-child .home-card:nth-child(4):after,
  #shop-screen .shop-section:nth-child(2) .home-card:first-of-type:after{top:14px!important;width:140px!important;height:140px!important}
}
#home-settings-panel button,#settings-panel button{box-sizing:border-box;height:44px;min-height:44px;padding:10px 12px;line-height:1.1}
#home-settings-panel .display-mode button,#home-settings-panel .graphics-quality button,#settings-panel .display-mode button,#settings-panel .graphics-quality button{height:44px;min-height:44px;padding:8px 6px}
#home-settings-panel .close-modal,#settings-panel>#close-settings{width:44px;height:44px;min-height:44px;padding:0;line-height:1}
#home-settings-panel .sound-range,#settings-panel .sound-range{height:7px;min-height:7px;padding:0}
body.mobile-mode #home-settings-panel button,body.mobile-mode #settings-panel button{height:44px!important;min-height:44px!important;padding:10px 12px!important}
body.mobile-mode #home-settings-panel .display-mode button,body.mobile-mode #home-settings-panel .graphics-quality button,body.mobile-mode #settings-panel .display-mode button,body.mobile-mode #settings-panel .graphics-quality button{height:44px!important;min-height:44px!important;padding:8px 6px!important}
body.mobile-mode #home-settings-panel .close-modal,body.mobile-mode #settings-panel>#close-settings{width:44px!important;height:44px!important;min-height:44px!important;padding:0!important}
body.mobile-mode #home-settings-panel .sound-range,body.mobile-mode #settings-panel .sound-range{height:7px!important;min-height:7px!important;padding:0!important}
#settings-panel{width:min(310px,calc(100vw - 32px));padding:22px 16px 16px;overflow:hidden}
#settings-panel h2{margin:0 0 12px;text-align:center;line-height:1.1;font-size:22px}
#settings-panel .display-mode,#settings-panel .graphics-quality{width:100%;min-width:0}
#settings-panel .display-mode button,#settings-panel .graphics-quality button{box-sizing:border-box;display:block;position:static!important;width:100%!important;min-width:0!important;max-width:none!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#settings-panel>button.primary,#settings-panel>button.secondary{box-sizing:border-box;display:block;position:static!important;width:100%!important;max-width:100%!important;min-width:0!important;white-space:normal;overflow-wrap:anywhere}
#settings-panel>#close-settings{position:absolute!important;display:block;width:44px!important;min-width:44px!important;max-width:44px!important}
#home-settings-panel button:not(.close-modal),#settings-panel button:not(#close-settings){height:40px!important;min-height:40px!important;max-height:40px!important;padding:0 9px!important;display:flex;align-items:center;justify-content:center}
@media(max-width:760px){#settings-panel{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;padding:26px 12px 12px!important;overflow-y:auto!important;overflow-x:hidden!important}#settings-panel h2{font-size:20px!important;margin-bottom:9px!important}#settings-panel>button.primary,#settings-panel>button.secondary{width:100%!important}}
/* Mobile mode is an explicit phone layout, even when previewed in a wider browser. */
body.mobile-mode #home-screen{display:flex!important;align-items:center!important;justify-content:flex-start!important;min-height:100dvh!important;height:auto!important;overflow-y:auto!important;padding:62px 14px 92px!important}
body.mobile-mode #home-screen>.tesseract-title{font-size:42px!important;margin:0 0 8px!important;white-space:nowrap!important}
body.mobile-mode #home-screen>.home-card:not(.modal-card){width:min(390px,calc(100vw - 28px))!important;margin:10px auto 0!important;padding:20px 16px 18px!important;background:#171522dd!important;border:1px solid #403760!important;border-radius:22px!important;box-shadow:0 18px 45px #0009!important}
body.mobile-mode .home-utility-actions #use-boost,body.mobile-mode .home-utility-actions #upgrades-button{top:auto!important;bottom:12px!important;width:86px!important;height:62px!important;border-radius:16px!important;font-size:9px!important}
body.mobile-mode .home-utility-actions #use-boost{left:12px!important;right:auto!important}.mobile-mode .home-utility-actions #upgrades-button{left:106px!important;right:auto!important}
body.mobile-mode #shop-home,body.mobile-mode #pets-home{right:12px!important;left:auto!important;width:76px!important;height:46px!important;padding:8px!important;border-radius:15px!important;font-size:10px!important}
body.mobile-mode #shop-home{top:62px!important}body.mobile-mode #pets-home{top:114px!important}
body.mobile-mode .game-screen .hud{display:grid!important;grid-template-columns:minmax(96px,1fr) auto auto!important;grid-template-areas:"brand quests settings" "progress progress progress" "health damage class";align-content:center!important;height:142px!important;min-height:142px!important;padding:8px 10px!important;gap:6px!important}
body.mobile-mode .game-screen .hud>div:first-child{grid-area:brand;min-width:0!important}body.mobile-mode .game-screen .hud-progress{grid-area:progress;width:100%!important;min-width:0!important}body.mobile-mode .game-screen .health-wrap{grid-area:health;min-width:0!important}body.mobile-mode .game-screen .damage-wrap{grid-area:damage;min-width:0!important}body.mobile-mode .game-screen .class-label{grid-area:class;display:block!important;font-size:9px!important;text-align:right}body.mobile-mode .game-screen #quests-button{grid-area:quests}body.mobile-mode .game-screen #settings-button{grid-area:settings}body.mobile-mode .game-screen canvas{height:calc(100dvh - 142px)!important}

/* Move the shop contents up by one UI stud without moving the title controls. */
#shop-screen>.shop-carousel{transform:translateY(-24px)!important}
#shop-screen>.back-button,#shop-screen>h1{transform:translateY(-24px)!important}
#shop-screen>.back-button{position:absolute!important;left:auto!important;top:24px!important;right:24px!important;width:58px!important;height:44px!important;margin:0!important;padding:4px!important;background:#292440!important;border:1px solid #4a4070!important;border-radius:18px!important;color:#f2efff!important;font-size:11px!important;font-weight:800!important;line-height:1!important;text-align:center!important}
@media(max-width:760px){#shop-screen>.back-button{top:14px!important;right:14px!important;width:52px!important;height:40px!important;border-radius:16px!important;font-size:10px!important}}

/* Keep the shop Back control pinned to the right edge, regardless of older layout rules. */
#shop-screen>.back-button{position:absolute!important;left:auto!important;right:24px!important;top:34px!important;align-self:auto!important}
@media(max-width:760px){#shop-screen>.back-button{left:auto!important;right:14px!important;top:24px!important}}
#shop-screen>.shop-carousel{scrollbar-width:none!important;overflow-y:hidden!important}
#shop-screen>.shop-carousel::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}

/* Wheel scrolling must move continuously; mandatory snapping cancels small wheel steps. */
#shop-screen>.shop-carousel{scroll-snap-type:none!important;scroll-behavior:auto!important}
#shop-screen .shop-section{scroll-snap-align:none!important}

/* Home leaderboard */
.leaderboard{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);text-align:left}.leaderboard h2{margin:0 0 10px;color:var(--purple);font-size:11px;letter-spacing:.18em}.leaderboard-head{display:grid;grid-template-columns:minmax(0,1fr) 92px 50px;gap:8px;margin:0 0 5px 26px;color:#aaa2bc;font-size:9px;font-weight:800;letter-spacing:.12em}.leaderboard ol{margin:0;padding-left:26px;color:#d8d1eb}.leaderboard li{display:grid;grid-template-columns:minmax(0,1fr) 92px 50px;gap:8px;padding:5px 0;font-size:12px}.leaderboard li span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.leaderboard li span:nth-child(2){color:#b9b0cf}.leaderboard li span:last-child{color:#aaa2bc;font-weight:800;text-align:right}.leaderboard li::marker{color:#a884ff;font-weight:800}
.pet-card img{transform:rotate(180deg)}
.pet-icon-button{position:relative}.pet-count{position:absolute;right:8px;bottom:8px;padding:3px 7px;border:1px solid #ffffff33;border-radius:999px;background:#171525dd;color:#fff;font-size:12px;font-weight:800}
.pet-card[data-pet="dragon"] img,.opening-pet[src*="pet-dragon"]{filter:hue-rotate(120deg) saturate(.85) drop-shadow(0 10px 14px #0008)}
.pet-icon-button{display:block;width:100%;padding:0;background:transparent}.pet-icon-button img{cursor:pointer;transition:transform .2s}.pet-icon-button:hover img{transform:rotate(180deg) scale(1.06)}
.pet-details{position:fixed;inset:0;z-index:50;display:grid;place-items:center;background:#08061166;backdrop-filter:blur(9px);padding:20px}.pet-details.hidden{display:none}.pet-details-card{position:relative;width:min(390px,100%);padding:30px;border:1px solid #514475;border-radius:24px;background:linear-gradient(160deg,#29233f,#12101b);box-shadow:0 25px 70px #000b;text-align:center}.pet-details-image{display:block;width:min(250px,70vw);height:min(250px,70vw);object-fit:contain;margin:0 auto 12px;transform:rotate(180deg);filter:drop-shadow(0 15px 18px #0008)}.pet-details-card:has(#pet-details-name) #pet-details-image[src*="pet-dragon"]{filter:hue-rotate(120deg) saturate(.85) drop-shadow(0 15px 18px #0008)}.pet-details-card h2{margin:0 0 5px}.pet-details-level{margin:0;color:var(--purple);font-size:12px;font-weight:800;letter-spacing:.15em}.pet-details-stats{min-height:42px;margin:14px 0;color:#d8d1eb;line-height:1.5}.pet-details-actions{display:grid;gap:8px}.pet-details-actions button{margin:0}.pet-details-actions button:disabled{opacity:.55;cursor:not-allowed}
.name-status{min-height:16px;margin:-8px 0 8px;color:var(--muted);font-size:11px;text-align:center}.name-status:empty{visibility:hidden}
.help-text{text-align:left;margin-top:18px}.help-text p{margin:0;padding:12px 0;border-top:1px solid var(--line);color:#d8d1eb;font-size:13px;line-height:1.5}.help-text p:first-child{border-top:0}
.display-mode{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0}.display-mode span{grid-column:1/-1;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.15em}.display-mode-option{padding:11px;border:1px solid var(--line);border-radius:10px;background:#0e0d15;color:#aaa2bc}.display-mode-option.selected{border-color:var(--purple);box-shadow:0 0 0 2px #a884ff55;color:#fff;background:#292440}.mobile-controls{display:none}
.graphics-quality{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0}.graphics-quality span{grid-column:1/-1;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.15em}.graphics-quality-option{padding:10px 7px;border:1px solid var(--line);border-radius:10px;background:#0e0d15;color:#aaa2bc;cursor:pointer}.graphics-quality-option.selected{border-color:var(--purple);box-shadow:0 0 0 2px #a884ff55;color:#fff;background:#292440}
.quest-panel .display-mode button,.quest-panel .graphics-quality button{position:static!important;right:auto!important;top:auto!important;width:auto!important;min-height:0!important;margin:0!important}
body.mobile-mode .game-screen{overflow:hidden}body.mobile-mode canvas{touch-action:none}.mobile-mode .hud{height:auto;min-height:78px;flex-wrap:wrap;gap:8px;padding:10px 12px}.mobile-mode .hud-progress{order:3;width:100%}.mobile-mode .health-wrap,.mobile-mode .damage-wrap{font-size:9px}.mobile-mode .health-bar{width:80px}.mobile-mode .controls{display:none}.mobile-mode .mobile-controls{position:absolute;display:flex;right:16px;bottom:22px;z-index:3;gap:10px}.mobile-mode .mobile-controls button{min-width:82px;min-height:52px;border:1px solid #65558d;border-radius:14px;background:#292440dd;color:#eee7ff;font-size:10px;font-weight:800}.mobile-mode .mobile-controls button:active{background:var(--purple);color:#171222}.mobile-mode .quest-panel,.mobile-mode #settings-panel{top:90px;right:12px;left:12px;width:auto;max-height:calc(100vh - 115px);overflow:auto}.mobile-mode .measurement,.mobile-mode .minimap{display:none}.mobile-mode .ghost-button{right:14px;bottom:86px}
.sound-setting{margin:18px 0;padding:14px 15px 16px;border:1px solid #40365f;border-radius:15px;background:linear-gradient(135deg,#211c35,#13111d);box-shadow:inset 0 1px #ffffff0d,0 8px 20px #0003}.sound-setting-head{display:flex;align-items:center;gap:9px;margin-bottom:12px;color:#eee9ff;font-size:12px;font-weight:800;letter-spacing:.05em}.sound-icon{display:grid;place-items:center;width:27px;height:27px;border-radius:9px;background:#a884ff22;color:#cbbcff;font-size:17px}.sound-setting output{margin-left:auto;color:#cbbcff;font-variant-numeric:tabular-nums}.sound-range{display:block;width:100%;height:7px;margin:0!important;padding:0!important;border:0!important;border-radius:99px;accent-color:#a884ff;background:linear-gradient(90deg,#a884ff,#e2d6ff);cursor:pointer}.sound-range::-webkit-slider-runnable-track{height:7px;border-radius:99px;background:linear-gradient(90deg,#a884ff,#6e54a6)}.sound-range::-webkit-slider-thumb{appearance:none;width:19px;height:19px;margin-top:-6px;border:3px solid #fff;border-radius:50%;background:#a884ff;box-shadow:0 0 0 4px #a884ff33,0 3px 10px #0008}.sound-range::-moz-range-track{height:7px;border-radius:99px;background:linear-gradient(90deg,#a884ff,#6e54a6)}.sound-range::-moz-range-thumb{width:14px;height:14px;border:3px solid #fff;border-radius:50%;background:#a884ff;box-shadow:0 0 0 4px #a884ff33,0 3px 10px #0008}
.mobile-mode .mobile-controls{display:flex!important;position:absolute!important;right:14px!important;bottom:18px!important;left:auto!important;width:auto!important;height:auto!important;z-index:8!important;gap:10px!important;pointer-events:auto!important}
.mobile-mode .mobile-controls button{display:flex!important;align-items:center!important;justify-content:center!important;width:96px!important;min-width:96px!important;height:58px!important;min-height:58px!important;margin:0!important;padding:10px!important;border:1px solid #7563a8!important;border-radius:16px!important;background:#292440ee!important;color:#eee7ff!important;font-size:11px!important;font-weight:800!important;line-height:1.1!important;touch-action:none!important}
.mobile-mode .mobile-controls button:active{transform:scale(.96);background:#a884ff!important;color:#171222!important}
.mobile-mode #settings-panel{position:absolute!important;top:92px!important;right:12px!important;left:auto!important;width:min(340px,calc(100vw - 24px))!important;max-height:calc(100vh - 112px)!important;overflow-y:auto!important;padding:30px 18px 18px!important;z-index:20!important}
.mobile-mode #settings-panel>button.primary,.mobile-mode #settings-panel>button.secondary{display:block!important;position:static!important;width:100%!important;height:auto!important;min-height:46px!important;margin:10px 0 0!important;padding:12px!important;transform:none!important}
.mobile-mode #settings-panel>#close-settings{position:absolute!important;top:7px!important;right:10px!important;width:38px!important;height:38px!important;min-height:38px!important;margin:0!important;padding:0!important;border-radius:50%!important;font-size:24px!important;line-height:1!important;transform:none!important;z-index:2!important}
.mobile-mode #settings-panel .graphics-quality,.mobile-mode #settings-panel .display-mode{margin:12px 0 16px!important}
@media(max-width:760px){.mobile-mode .hud{height:auto!important;min-height:96px!important;padding:9px 10px 12px!important;gap:7px!important}.mobile-mode .hud>div:first-child{min-width:92px}.mobile-mode .hud-progress{flex:1 1 150px!important;width:auto!important;min-width:130px!important}.mobile-mode .health-wrap,.mobile-mode .damage-wrap{flex:0 0 auto!important}.mobile-mode .class-label{display:none!important}.mobile-mode .quests-button{min-height:36px!important;padding:8px 10px!important;font-size:9px!important}.mobile-mode .mobile-controls{right:10px!important;bottom:12px!important}.mobile-mode .mobile-controls button{width:88px!important;min-width:88px!important;height:56px!important;min-height:56px!important}.mobile-mode #settings-panel{top:104px!important;max-height:calc(100vh - 116px)!important}}
@media(max-width:760px){
  body.mobile-mode{overflow-x:hidden}
  body.mobile-mode #home-screen{display:flex!important;align-items:center!important;justify-content:flex-start!important;min-height:100dvh!important;height:auto!important;overflow-y:auto!important;padding:62px 14px 92px!important}
  body.mobile-mode #home-screen>.tesseract-title{font-size:42px!important;margin:0 0 8px!important;white-space:nowrap!important}
  body.mobile-mode #home-screen>.home-card:not(.modal-card){width:min(100%,390px)!important;margin:10px auto 0!important;padding:20px 16px 18px!important;background:#171522dd!important;border:1px solid #403760!important;border-radius:22px!important;box-shadow:0 18px 45px #0009!important}
  body.mobile-mode #home-screen>.home-card:not(.modal-card) input{font-size:16px!important;padding:13px!important}
  body.mobile-mode #home-screen>.home-card:not(.modal-card) .primary{min-height:50px!important;margin-top:14px!important}
  body.mobile-mode .leaderboard{width:100%!important;margin-top:18px!important;padding-top:14px!important}
  body.mobile-mode .leaderboard-head,body.mobile-mode .leaderboard li{grid-template-columns:minmax(0,1fr) 76px 42px!important;gap:5px!important;font-size:10px!important}
  body.mobile-mode .leaderboard ol{padding-left:22px!important}
  body.mobile-mode #home-settings{top:12px!important;right:12px!important;left:auto!important;width:46px!important;height:42px!important;padding:8px!important;font-size:18px!important}
  body.mobile-mode #currency-left{top:12px!important;right:66px!important;width:54px!important;height:42px!important}
  body.mobile-mode #shop-home,body.mobile-mode #pets-home{right:12px!important;left:auto!important;width:76px!important;height:46px!important;padding:8px!important;border-radius:15px!important;font-size:10px!important}
  body.mobile-mode #shop-home{top:62px!important}
  body.mobile-mode #pets-home{top:114px!important}
  body.mobile-mode .home-utility-actions #use-boost,body.mobile-mode .home-utility-actions #upgrades-button{top:auto!important;bottom:12px!important;width:86px!important;height:62px!important;border-radius:16px!important;font-size:9px!important}
  body.mobile-mode .home-utility-actions #use-boost{left:12px!important;right:auto!important}
  body.mobile-mode .home-utility-actions #upgrades-button{left:106px!important;right:auto!important}
  body.mobile-mode #home-settings-panel,body.mobile-mode #manual-panel,body.mobile-mode #upgrades-panel{width:calc(100vw - 24px)!important;min-width:0!important;max-height:calc(100dvh - 28px)!important;overflow-y:auto!important;padding:26px 18px 18px!important}
  body.mobile-mode .game-screen .hud{display:grid!important;grid-template-columns:minmax(96px,1fr) auto auto!important;grid-template-areas:"brand quests settings" "progress progress progress" "health damage class";align-content:center!important;height:142px!important;min-height:142px!important;padding:8px 10px!important;gap:6px!important}
  body.mobile-mode .game-screen .hud>div:first-child{grid-area:brand;min-width:0!important}
  body.mobile-mode .game-screen .hud-progress{grid-area:progress;width:100%!important;min-width:0!important}
  body.mobile-mode .game-screen .health-wrap{grid-area:health;min-width:0!important}
  body.mobile-mode .game-screen .damage-wrap{grid-area:damage;min-width:0!important}
  body.mobile-mode .game-screen .class-label{grid-area:class;display:block!important;font-size:9px!important;text-align:right}
  body.mobile-mode .game-screen #quests-button{grid-area:quests}
  body.mobile-mode .game-screen #settings-button{grid-area:settings}
body.mobile-mode .game-screen canvas{height:calc(100dvh - 142px)!important}
.codes-button{position:fixed!important;left:4px!important;right:auto!important;top:auto!important;bottom:4px!important;z-index:7;width:18px!important;height:8px!important;min-width:18px!important;min-height:8px!important;padding:0!important;border:0!important;outline:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#69627d!important;font-size:3px!important;font-weight:700!important;letter-spacing:0!important;line-height:8px!important;opacity:.22!important;appearance:none!important}.codes-button:hover,.codes-button:focus{opacity:.7!important;color:#aaa0c7!important;background:transparent!important;box-shadow:none!important;border:0!important;outline:0!important}.promo-panel{width:min(340px,calc(100vw - 32px))!important;min-width:0!important;padding:26px 20px 20px!important}.promo-panel h2{margin:0 0 16px;text-align:center}.promo-panel .primary{margin-top:4px}.promo-panel .server-note{min-height:18px}.promo-panel .close-modal{width:40px!important;height:40px!important;min-height:40px!important;padding:0!important}
@media(max-width:760px){.codes-button{left:3px!important;bottom:3px!important;width:15px!important;height:7px!important;min-width:15px!important;min-height:7px!important;font-size:2.5px!important;line-height:7px!important}.promo-panel{max-height:calc(100dvh - 24px);overflow-y:auto}}
.pet-card img[src$="common-frog.png"],#pet-details-image[src$="common-frog.png"]{transform:scaleX(-1)}
body.mobile-mode #selection-screen.hidden,body.mobile-mode #home-screen.hidden,body.mobile-mode #shop-screen.hidden,body.mobile-mode #pets-screen.hidden,body.mobile-mode #game-screen.hidden{display:none!important}
@media(max-width:760px){body.mobile-mode #shop-screen{padding:18px 12px 12px!important}body.mobile-mode #shop-screen>h1{transform:none!important;margin:0 0 8px!important;font-size:38px!important}body.mobile-mode #shop-screen>.back-button{top:12px!important;right:12px!important;transform:none!important}body.mobile-mode #shop-screen>.shop-carousel{transform:none!important;margin:8px 0 0!important;padding:0 0 12px!important}body.mobile-mode #shop-screen .shop-section{position:relative!important;display:flex!important;overflow-x:auto!important;overflow-y:hidden!important}body.mobile-mode #shop-screen .shop-section>h2{position:absolute!important;top:0!important;left:6px!important;width:calc(100% - 12px)!important;height:42px!important;margin:0!important;padding:0 0 12px!important;z-index:2!important}body.mobile-mode #shop-screen .shop-section .home-card{flex:0 0 82%!important;width:82%!important;margin-top:52px!important}body.mobile-mode #shop-screen .shop-carousel,body.mobile-mode #shop-screen .shop-section{scrollbar-width:none!important}body.mobile-mode #shop-screen .shop-carousel::-webkit-scrollbar,body.mobile-mode #shop-screen .shop-section::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}}
  body.mobile-mode .game-screen.paused:after{inset:142px 0 0!important}
  body.mobile-mode #settings-panel,body.mobile-mode #quest-panel{top:150px!important;max-height:calc(100dvh - 160px)!important}
  body.mobile-mode #settings-panel{box-sizing:border-box!important;width:calc(100vw - 20px)!important;right:10px!important;padding:34px 14px 16px!important;border-radius:18px!important}
  body.mobile-mode #settings-panel h2{margin:0 0 12px!important;font-size:24px!important;line-height:1.1!important;text-align:center!important}
  body.mobile-mode #settings-panel .display-mode,body.mobile-mode #settings-panel .graphics-quality{width:100%!important;margin:10px 0 14px!important;gap:6px!important}
  body.mobile-mode #settings-panel .display-mode-option,body.mobile-mode #settings-panel .graphics-quality-option{min-height:42px!important;padding:8px 5px!important;font-size:10px!important;line-height:1.1!important}
  body.mobile-mode #settings-panel .sound-setting{margin:12px 0!important;padding:12px!important}
  body.mobile-mode #settings-panel .sound-setting-head{font-size:10px!important}
  body.mobile-mode #settings-panel>button.primary,body.mobile-mode #settings-panel>button.secondary{min-height:42px!important;padding:10px!important;font-size:11px!important}
}

/* Codes stays intentionally tiny and hidden in the bottom-left on every display mode. */
.codes-button{position:fixed!important;left:4px!important;right:auto!important;top:auto!important;bottom:4px!important;z-index:7!important;width:18px!important;height:8px!important;min-width:18px!important;min-height:8px!important;padding:0!important;border:0!important;outline:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#69627d!important;font-size:3px!important;font-weight:700!important;letter-spacing:0!important;line-height:8px!important;opacity:.22!important;appearance:none!important}.codes-button:hover,.codes-button:focus{opacity:.7!important;color:#aaa0c7!important;background:transparent!important;box-shadow:none!important;border:0!important;outline:0!important}
@media(max-width:760px){.codes-button{left:3px!important;bottom:3px!important;width:15px!important;height:7px!important;min-width:15px!important;min-height:7px!important;font-size:2.5px!important;line-height:7px!important}}

/* Final phone layout.  Keep this block last so the phone mode cannot inherit
   desktop positioning rules from the older themed layout above. */
body.mobile-mode{width:100%;min-width:0;overflow-x:hidden}
body.mobile-mode .screen{width:100%;min-width:0;min-height:100dvh}
body.mobile-mode #selection-screen{justify-content:flex-start;padding:38px 14px 28px;overflow-y:auto}
body.mobile-mode #selection-screen h1{font-size:clamp(31px,10vw,44px);text-align:center}
body.mobile-mode #selection-screen .warning{max-width:330px;margin:0 auto 24px;text-align:center;font-size:clamp(15px,4.5vw,21px);line-height:1.25}
body.mobile-mode #selection-screen .hero-grid{width:100%;max-width:420px;grid-template-columns:1fr;gap:12px}
body.mobile-mode #selection-screen .hero-card{width:100%;padding:14px;border-radius:18px}
body.mobile-mode #selection-screen .avatar{width:64px;height:64px;margin:0 13px 7px 0;font-size:38px}
body.mobile-mode #selection-screen .hero-card h2{font-size:20px;margin:0 0 4px}
body.mobile-mode #selection-screen .hero-card p{font-size:11px;line-height:1.35;margin:0 0 9px}
body.mobile-mode #selection-screen .stats{font-size:10px;padding-top:9px}

body.mobile-mode #home-screen{display:flex!important;align-items:center;justify-content:flex-start;width:100%;height:auto;min-height:100dvh;overflow-y:auto;overflow-x:hidden;padding:62px 12px 92px}
body.mobile-mode #home-screen>.tesseract-title{width:100%;font-size:clamp(32px,11vw,46px)!important;line-height:1;margin:0 0 8px;white-space:nowrap!important}
body.mobile-mode #home-screen>#chosen-hero{max-width:100%;margin:0 0 5px;text-align:center;font-size:11px}
body.mobile-mode #home-screen>.home-card:not(.modal-card){display:block;width:100%!important;max-width:430px;margin:8px auto 0!important;padding:16px 14px 18px!important;border-radius:18px!important}
body.mobile-mode #home-screen>.home-card:not(.modal-card) label{font-size:10px}
body.mobile-mode #home-screen>.home-card:not(.modal-card) input{height:46px;margin:7px 0 10px;padding:11px 12px;font-size:16px}
body.mobile-mode #home-screen>.home-card:not(.modal-card) #play-button{height:50px;min-height:50px;margin-top:8px;padding:10px;font-size:14px}
body.mobile-mode .leaderboard{width:100%;margin-top:14px;padding-top:13px}
body.mobile-mode .leaderboard h2{font-size:10px;margin-bottom:8px}
body.mobile-mode .leaderboard-head,body.mobile-mode .leaderboard li{grid-template-columns:minmax(0,1fr) 67px 36px;gap:4px;font-size:9px}
body.mobile-mode .leaderboard li{padding:4px 0}
body.mobile-mode .leaderboard ol{padding-left:21px}
body.mobile-mode .home-actions{display:contents}
body.mobile-mode #home-settings{top:10px!important;right:10px!important;width:44px!important;height:40px!important;padding:6px!important;font-size:17px!important}
body.mobile-mode #currency-left{top:10px!important;right:61px!important;width:52px!important;height:40px!important;padding:3px!important}
body.mobile-mode #shop-home,body.mobile-mode #pets-home{right:10px!important;width:70px!important;height:42px!important;padding:7px!important;border-radius:14px!important;font-size:10px!important}
body.mobile-mode #shop-home{top:58px!important}
body.mobile-mode #pets-home{top:106px!important}
body.mobile-mode .home-utility-actions #use-boost,body.mobile-mode .home-utility-actions #upgrades-button{bottom:10px!important;width:calc((100vw - 38px)/2)!important;max-width:128px!important;height:58px!important;border-radius:15px!important}
body.mobile-mode .home-utility-actions #use-boost{left:10px!important;right:auto!important}
body.mobile-mode .home-utility-actions #upgrades-button{left:calc(19px + (100vw - 38px)/2)!important;right:auto!important}

body.mobile-mode .game-screen{width:100%;height:100dvh;min-height:0;overflow:hidden}
body.mobile-mode .game-screen .hud{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"brand quests settings" "progress progress progress" "health damage damage";gap:5px;align-content:center;width:100%;height:122px!important;min-height:122px!important;padding:8px 9px!important;overflow:hidden}
body.mobile-mode .game-screen .hud>div:first-child{grid-area:brand;min-width:0;overflow:hidden}
body.mobile-mode .game-screen .hud strong{font-size:11px;letter-spacing:.1em}
body.mobile-mode .game-screen .hud small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px}
body.mobile-mode .game-screen .hud-progress{grid-area:progress;width:100%!important;min-width:0!important}
body.mobile-mode .game-screen .quests-button{min-width:0;min-height:32px;height:32px;padding:7px 8px;font-size:8px;letter-spacing:.06em}
body.mobile-mode .game-screen .health-wrap,body.mobile-mode .game-screen .damage-wrap{min-width:0;gap:5px;font-size:8px;white-space:nowrap;overflow:hidden}
body.mobile-mode .game-screen .health-bar{width:clamp(42px,18vw,76px);height:6px}
body.mobile-mode .game-screen .damage-bar{width:clamp(36px,15vw,62px);height:6px}
body.mobile-mode .game-screen .health-wrap b,body.mobile-mode .game-screen .damage-wrap b{font-size:9px}
body.mobile-mode .game-screen .class-label{display:none!important}
body.mobile-mode .game-screen canvas{width:100%!important;height:calc(100dvh - 122px)!important;touch-action:none}
body.mobile-mode .mobile-controls{display:flex!important;position:absolute!important;left:auto!important;right:10px!important;bottom:10px!important;width:auto!important;gap:6px!important;z-index:8!important;pointer-events:auto!important}
body.mobile-mode .mobile-controls button{width:min(140px,calc((100vw - 38px)/2))!important;min-width:0!important;height:54px!important;min-height:54px!important;padding:8px 4px!important;border-radius:15px!important;font-size:10px!important;line-height:1.1!important;white-space:normal}
body.mobile-mode .ghost-button{right:10px;bottom:76px;font-size:9px}
body.mobile-mode .game-screen.paused:after{inset:122px 0 0!important}
body.mobile-mode #settings-panel,body.mobile-mode #quest-panel{box-sizing:border-box;top:10px!important;right:10px!important;left:10px!important;width:calc(100% - 20px)!important;max-width:none!important;max-height:calc(100dvh - 20px)!important;overflow-y:auto!important;overflow-x:hidden!important;padding:42px 12px 14px!important;border-radius:18px!important}
body.mobile-mode #settings-panel h2,body.mobile-mode #quest-panel h2{font-size:21px;line-height:1.1;margin:0 0 11px}
body.mobile-mode #settings-panel .display-mode,body.mobile-mode #settings-panel .graphics-quality{width:100%;gap:6px;margin:10px 0 12px}
body.mobile-mode #settings-panel .display-mode-option,body.mobile-mode #settings-panel .graphics-quality-option{min-width:0;height:40px!important;min-height:40px!important;padding:7px 3px!important;font-size:9px;white-space:nowrap}
body.mobile-mode #settings-panel>button.primary,body.mobile-mode #settings-panel>button.secondary{width:100%!important;height:42px!important;min-height:42px!important;margin:8px 0 0!important;padding:9px!important;font-size:10px}
body.mobile-mode #settings-panel>#close-settings{top:7px!important;right:8px!important;width:36px!important;height:36px!important;min-height:36px!important;padding:0!important}
body.mobile-mode #settings-panel .sound-setting{margin:11px 0;padding:11px}

@media(max-width:360px){
  body.mobile-mode #home-screen{padding-left:8px;padding-right:8px}
  body.mobile-mode #home-screen>.home-card:not(.modal-card){padding-left:10px!important;padding-right:10px!important}
  body.mobile-mode #home-settings{right:8px!important}
  body.mobile-mode #currency-left{right:57px!important}
  body.mobile-mode #shop-home,body.mobile-mode #pets-home{right:8px!important;width:64px!important}
  body.mobile-mode .game-screen .hud{padding-left:6px!important;padding-right:6px!important}
  body.mobile-mode .game-screen .quests-button{padding-left:5px;padding-right:5px;font-size:7px}
  body.mobile-mode .mobile-controls{right:7px!important;gap:5px!important}
}

.boss-health-bar{position:fixed;z-index:6;top:92px;left:50%;transform:translateX(-50%);width:min(560px,calc(100vw - 32px));padding:10px 14px 12px;border:1px solid #7d3944;border-radius:10px;background:linear-gradient(180deg,#21131aee,#100d14ee);box-shadow:0 8px 24px #0008;pointer-events:none}.boss-health-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:7px;color:#ffe8ea;font-size:11px;letter-spacing:.13em}.boss-health-header span{color:#ffb4bd;font-variant-numeric:tabular-nums;letter-spacing:.04em}.boss-health-track{height:14px;border:1px solid #5b2732;border-radius:99px;background:#2b1720;overflow:hidden}.boss-health-track i{display:block;height:100%;width:100%;border-radius:99px;background:linear-gradient(90deg,#bd233f,#ff6178);box-shadow:0 0 14px #ff3b5c88;transition:width .12s linear}.boss-respawn-timer{position:fixed;z-index:6;top:58px;left:10px;color:#c7b9e6;font-size:11px;letter-spacing:.08em;text-shadow:0 2px 5px #000;pointer-events:none}
@media(max-width:760px){.boss-health-bar{top:128px;width:calc(100vw - 24px);padding:8px 10px}.boss-health-header{font-size:9px}.boss-health-track{height:11px}}

/* Restore the dragon artwork's original warm red/orange colours. */
.pet-card[data-pet="dragon"] img,.opening-pet[src*="pet-dragon"]{filter:drop-shadow(0 10px 14px #0008)!important}
.pet-details-card #pet-details-image[src*="pet-dragon"]{filter:drop-shadow(0 15px 18px #0008)!important}
.pet-card p,.pet-details-stats{white-space:pre-wrap}
