/* MUDA MAX v4.8 -- independent home, play, roadmap, brand-new sky game */
.muda-screen[hidden]{display:none!important}
body[data-screen="play"] .top,body[data-screen="roadmap"] .top,body[data-screen="sky"] .top{display:none}
body[data-screen="play"] main,body[data-screen="sky"] main,body[data-screen="roadmap"] main{padding-top:5px}
#screenHome .screen-heading,#screenHome .home-quick{display:none!important}
#screenHome #level1Nav,#screenHome #level2Nav,#screenHome .sectiontop,#screenHome .level-hub,#screenHome .footerrow,#screenHome .footer-tools,#screenHome>.hero:not(.muda-home-hero){display:none!important}
#screenHome .install-panel{margin:20px 0 12px}
#screenHome .muda-home-hero{margin:4px 0 17px}
.home-deck{margin:16px 0 18px;padding:18px;border:2px solid #c2abff8a;border-radius:22px;background:radial-gradient(ellipse at 110% 0,#4c3b96aa,transparent 53%),linear-gradient(135deg,#181f45,#1d1740);box-shadow:0 8px 0 #0c1530,0 17px 32px #0008}
.home-deck-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 13px}.home-deck-title span{font-size:18px;font-weight:1000;color:#fff7ad}.home-deck-title small{font-size:11px;color:#c6d5f7}
.home-deck-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.home-deck-grid button{display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;min-height:125px;border:2px solid #94dff1;border-radius:18px;background:linear-gradient(145deg,#305d8c,#2d2c62);color:white;box-shadow:0 6px 0 #0a1b39;font-weight:900}
.home-deck-grid button:nth-child(2){background:linear-gradient(145deg,#8060c8,#483c85);border-color:#ddc5ff}
.home-deck-grid button:nth-child(3){background:linear-gradient(145deg,#b15ea5,#553777);border-color:#ffbbeb}
.home-deck-grid button span{font-size:35px}.home-deck-grid button strong{font-size:16px}.home-deck-grid button small{font-size:11px;color:#e5deff}.home-deck-grid button:active,.home-shortcuts button:active{transform:translateY(4px);box-shadow:0 1px #071833}
.home-shortcuts{border-top:1px solid #93aaff55;margin-top:18px;padding-top:13px}.home-shortcuts>strong{display:block;margin-bottom:9px;font-size:13px;color:#d7fda3}.home-shortcuts>div{display:flex;gap:8px;flex-wrap:wrap}.home-shortcuts button{min-height:43px;border:1px solid #b2f5ff;background:#283b65;color:#fff;border-radius:10px;padding:8px 12px;font-size:12px;font-weight:900}
/* Real independent game page */
#screenPlay{padding:0 0 18px}
.play-screen-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;margin:1px 0 9px;background:linear-gradient(110deg,#202753,#2b2052);border:1px solid #aaa9ef9f;border-radius:17px}
.play-screen-header div{text-align:center;display:grid;gap:2px;min-width:0}.play-screen-header small{font-size:9px;color:#eff3a5;font-weight:1000;letter-spacing:.12em}.play-screen-header strong{font-size:clamp(14px,2.7vw,18px);color:#fff}
.play-screen-header button{min-height:41px;border-radius:12px;border:1px solid #ada7ee;background:#37335d;color:#fff;padding:8px 12px;font-size:12px;font-weight:900}
#screenPlay .app-command{margin:0 0 10px;position:relative;top:auto}
#screenPlay .play-surface{background:linear-gradient(135deg,#111c37,#251e4c);border:2px solid #8a78d9;border-radius:22px;padding:13px;box-shadow:0 11px 32px #0008}
#screenPlay .muda-mission-hud{display:block!important;position:relative;top:auto;margin:0 0 15px;border:3px solid #fee38a;border-radius:19px;background:linear-gradient(130deg,#342451,#23415d);box-shadow:0 6px 0 #74572c;overflow:hidden;z-index:1}
#screenPlay .now-playing{padding:9px 3px 13px}
#screenPlay .play-container>.pane{min-height:330px}
#screenPlay .muda-mission-hud .muda-mission-copy{min-width:0;flex:1}
#screenPlay .muda-mission-hud .muda-mission-count{font-size:18px}
#screenPlay .app-command .command-menu{z-index:160}
#screenPlay .play-screen-header{scroll-margin-top:0}
#screenPlay .play-container{scroll-margin-top:110px}
#screenPlay .play-surface .btn{min-height:44px}
/* Four buttons in shared bottom dock */
.muda-dock{gap:clamp(1px,1vw,9px)}.muda-dock-btn{width:min(23vw,160px)}
/* Galaxy: new game built independently; remove obsolete sky visual layout constraints */
body[data-screen="sky"] #screenSky{display:block!important;height:auto!important;min-height:0!important;overflow:visible!important;padding:0 0 18px!important}
.galaxy-wrap{color:#fff;max-width:760px;margin:0 auto}
.galaxy-hud{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:12px 16px;background:linear-gradient(120deg,#15234b,#38225f);border:2px solid #b49cff;border-radius:17px;margin-bottom:9px;box-shadow:0 4px 0 #0d1b39}
.galaxy-hud>div:first-child{display:grid;gap:3px}.galaxy-hud small{font-size:9px;color:#bdf6ff;letter-spacing:.16em;font-weight:1000}.galaxy-hud strong{font-size:clamp(17px,4vw,24px);line-height:1.3}.galaxy-hud-progress{display:grid;justify-items:end;gap:5px;flex:none}.galaxy-hud-progress span:first-child{font-size:12px;font-weight:1000;color:#ffdf8a}.galaxy-hud-progress span:last-child{font-size:10px;color:#cff3da}
.galaxy-mission{background:linear-gradient(135deg,#28235c,#22425b);border:2px solid #dfb65b;border-radius:15px;padding:10px 13px;margin-bottom:9px;box-shadow:0 4px 0 #302040}
.galaxy-mission-heading,.galaxy-stats{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.galaxy-mission-heading span{font-weight:1000;color:#ffe48b}.galaxy-mission #galaxyMissionText{font-size:13px;font-weight:800;color:#e9ebfa;margin-top:5px}.galaxy-meter{height:8px;border-radius:90px;background:#161c38;margin:8px 0;border:1px solid #7c84b5;overflow:hidden}.galaxy-meter>span{display:block;width:0;height:100%;background:linear-gradient(90deg,#72e8fd,#caff84,#ffe586);transition:width .18s}.galaxy-stats{flex-wrap:wrap;font-size:11px}.galaxy-stats b{color:#ffffac}
.galaxy-board-frame{overflow:hidden;background:radial-gradient(ellipse at 50% 30%,#143a6c,#10132d 74%);border:3px solid #78d1ec;border-radius:19px;box-shadow:0 9px 24px #000a;padding:10px 10px 12px}
.galaxy-board-top{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;font-weight:900;color:#d8faff;margin-bottom:9px}.galaxy-board-top button{border:1px solid #9dddf5;border-radius:9px;color:#fff;background:#264269;min-height:33px;padding:5px 12px;font-size:11px;font-weight:900}
.galaxy-board{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));gap:3px;aspect-ratio:9/7.7;max-height:390px;width:min(100%,453px);margin:auto}
.galaxy-tile{font-size:clamp(17px,4vw,30px);border:1px solid #4bbacf88;background:linear-gradient(160deg,#183a62,#132846);box-shadow:inset 0 1px #ffffff1b;color:#a0cbe1;border-radius:7px;display:grid;place-items:center;padding:0;min-width:0;min-height:0;line-height:1}
.galaxy-tile:disabled{opacity:1;cursor:default}
.galaxy-tile.wall{background:linear-gradient(135deg,#35416a,#303551);border-color:#7986bc;box-shadow:inset 0 2px #a7b8ed44}
.galaxy-tile.player{background:#335b8c;border:2px solid #ffe47a;box-shadow:0 0 16px #83f7ff99;position:relative;z-index:1}
.galaxy-tile.stamp{background:#575083}.galaxy-tile.exit{background:#524d62;filter:grayscale(.45)}.galaxy-tile.exit.ready{filter:none;background:#1b704f;box-shadow:0 0 13px #84ffb776}
.galaxy-tile.trap{background:#50396d}.galaxy-tile.fuel{background:#4e5335}.galaxy-tile.robot{background:#753b5d}
.galaxy-tile:not(:disabled):active{filter:brightness(1.3)}
.galaxy-controls{display:flex;align-items:center;justify-content:space-between;max-width:450px;margin:12px auto 0;padding:0 5px}
.galaxy-pad{position:relative;width:130px;height:125px;flex:none}.galaxy-pad button{position:absolute;min-width:41px;min-height:41px;border:2px solid #bee4ff;background:linear-gradient(#5565a1,#323860);border-radius:11px;color:#fff;font-size:17px;font-weight:1000;box-shadow:0 4px 0 #0b152d}
.galaxy-pad button[data-move="up"]{top:0;left:44px}.galaxy-pad button[data-move="left"]{top:43px;left:0}.galaxy-pad button[data-move="right"]{top:43px;left:87px}.galaxy-pad button[data-move="down"]{top:83px;left:44px}
.galaxy-actions{display:flex;gap:12px;align-items:center}.galaxy-actions button{border-radius:100%;width:78px;height:78px;border:3px solid #ffedb2;box-shadow:inset 0 3px #ffffff77,0 5px 0 #10122d;color:#fff;font-size:13px;font-weight:1000;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:1px}.galaxy-actions button b{font-size:24px}.galaxy-actions button span{font-size:10px}.galaxy-actions button:first-child{background:linear-gradient(145deg,#fa9a55,#c64b69)}.galaxy-actions button:last-child{background:linear-gradient(145deg,#5cacf5,#3959b7)}
.galaxy-pad button:active,.galaxy-actions button:active{transform:translateY(3px);box-shadow:0 1px #0d142d}
.galaxy-log{background:#1d2549;border:1px solid #6d94c4;border-radius:13px;padding:12px 14px;min-height:46px;margin:9px 0;color:#f6edcf;font-size:12px;line-height:1.6}
.galaxy-bottom{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:2px 2px 10px}.galaxy-bottom button{min-height:41px;padding:9px 15px;color:#fff;font-size:12px;font-weight:900;background:#393c6d;border:1px solid #c0b3f0;border-radius:11px}.galaxy-bottom #galaxyNext{background:linear-gradient(#ffe998,#ffab43);border-color:#fff5ae;color:#2a2737}.galaxy-bottom button[hidden]{display:none}.galaxy-bottom>span{font-size:10px;color:#cbd7ec;flex:1}
.galaxy-help{padding:10px 12px;border:1px solid #706fa1;border-radius:13px;background:#1a1e3b;color:#e4e7ff;margin-bottom:15px}.galaxy-help summary{font-size:12px;font-weight:850;cursor:pointer}.galaxy-help p{font-size:12px;line-height:1.8;color:#c7c9e5}
@media(max-width:600px){
 #screenHome .muda-home-hero{margin:2px 0 15px}
 .home-deck{padding:12px;border-radius:18px}.home-deck-title{display:block}.home-deck-title span{font-size:15px}.home-deck-title small{display:block;margin-top:3px}
 .home-deck-grid{gap:6px}.home-deck-grid button{min-height:105px;border-radius:12px;padding:7px 3px}.home-deck-grid button span{font-size:29px}.home-deck-grid button strong{font-size:12px}.home-deck-grid button small{font-size:9px;line-height:1.5}
 .home-shortcuts button{font-size:11px;flex:1;padding:8px}
 .play-screen-header{padding:8px 7px}.play-screen-header button{padding:8px 7px;font-size:11px}.play-screen-header strong{font-size:12px}
 #screenPlay .app-command{margin-left:0;margin-right:0}
 #screenPlay .play-surface{padding:9px}
 #screenPlay .muda-mission-hud .muda-mission-main{padding:12px 9px;gap:6px}
 #screenPlay .muda-mission-hud .muda-mission-copy strong{font-size:16px}
 #screenPlay .muda-mission-hud .muda-mission-copy span{font-size:12px}
 .muda-dock{padding-left:4px;padding-right:4px;gap:1px}.muda-dock-btn{width:25%;min-height:53px;padding:4px 2px}.muda-dock-btn .dock-emoji{font-size:20px}.muda-dock-btn strong{font-size:10px}
 .galaxy-board-frame{padding:7px 5px 9px}.galaxy-board{gap:2px;width:min(100%,380px)}.galaxy-tile{border-radius:5px;font-size:clamp(15px,5.6vw,24px)}
 .galaxy-pad{width:116px;height:116px}.galaxy-pad button{min-width:38px;min-height:38px;font-size:16px}.galaxy-pad button[data-move="up"]{left:39px}.galaxy-pad button[data-move="left"]{top:39px}.galaxy-pad button[data-move="right"]{top:39px;left:78px}.galaxy-pad button[data-move="down"]{top:77px;left:39px}
 .galaxy-actions{gap:8px}.galaxy-actions button{width:65px;height:65px}.galaxy-actions button b{font-size:22px}.galaxy-actions button span{font-size:9px}
}
@media(prefers-reduced-motion:reduce){.galaxy-meter span,.galaxy-pad button,.galaxy-actions button{transition:none!important}}

/* optional Moai easter egg */
#screenHome .muda-home-hero .moai-secret{position:absolute;right:6%;top:29%;z-index:4;width:clamp(95px,17vw,165px);height:clamp(125px,20vw,190px);border:none;background:transparent;color:transparent;font-size:0;cursor:pointer;border-radius:40%;transform:rotate(-8deg)}
#screenHome .muda-home-hero .moai-secret:focus-visible{outline:3px solid #ffffa5}
.muda-secret-toast{position:fixed;bottom:calc(92px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%) translateY(12px);z-index:180;opacity:0;pointer-events:none;background:#ffe787;color:#36273c;box-shadow:0 9px 26px #000b;border-radius:13px;padding:12px 17px;font-weight:1000;font-size:12px;max-width:85%;text-align:center;transition:opacity .18s,transform .18s}
.muda-secret-toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}
/* Do not show Level 2 collectible info during Level 1 gameplay */
.l2-remix-global[hidden]{display:none!important}
