:root{color:#1e2127;background:#12161b;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box;-webkit-user-select:none;user-select:none}html,body{overscroll-behavior:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;margin:0;overflow:hidden}body{-webkit-tap-highlight-color:transparent;background:linear-gradient(135deg,#161b21 0%,#101216 55%,#1b1715 100%);position:fixed;inset:0;overflow-x:hidden}button{appearance:none;color:inherit;font:inherit;cursor:pointer;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;border:0;font-weight:900}button:focus-visible{outline-offset:4px;outline:3px solid #e1be48}.shell{width:100vw;max-width:100vw;height:100dvh;min-height:100svh;padding-block:max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-bottom));-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;place-items:center;padding-inline:0;display:grid;overflow:hidden}.gameboy{background:linear-gradient(135deg,#ffffff6b,#0000 30%),linear-gradient(#d7d2c7 0%,#aaa698 100%);border-radius:24px 24px 68px;grid-template-rows:auto auto 1fr;gap:clamp(12px,2.5svh,22px);width:min(430px,100vw - 8px);max-width:100%;min-height:min(760px,100svh - 20px);margin-inline:auto;padding:clamp(14px,3.6vw,26px);display:grid;position:relative;box-shadow:inset 0 2px #ffffffbf,inset 0 -10px 22px #57524961,0 26px 70px #00000080}.device-bar{grid-template-columns:minmax(0,1fr) auto auto auto auto;align-items:center;gap:8px;min-height:34px;display:grid}.brand{color:#343841;letter-spacing:0;white-space:nowrap;text-overflow:ellipsis;min-width:0;font-size:clamp(.92rem,3.8vw,1.2rem);font-weight:950;overflow:hidden}.status{color:#f5dc7a;text-align:center;background:#30343d;border-radius:999px;min-width:78px;padding:6px 10px;font-size:clamp(.68rem,2.7vw,.82rem);font-weight:950}.reset-button{color:#2c3038;background:#eee8d8;border-radius:999px;min-width:58px;min-height:32px;padding:0 11px;font-size:.68rem;box-shadow:inset 0 2px #fffc,inset 0 -3px #00000038,0 4px 9px #0000002e}.sound-button,.tool-button{color:#f5dc7a;background:#30343d;border-radius:999px;min-width:68px;min-height:32px;padding:0 11px;font-size:.68rem;box-shadow:inset 0 2px #ffffff1f,inset 0 -3px #00000042,0 4px 9px #0000002e}.sound-button{min-width:58px}.sound-button.muted{color:#30343d;background:#c7c0b1}.screen-bezel{background:linear-gradient(#ffffff17,#0000 18%),#2d3038;border-radius:16px 16px 38px;width:100%;padding:clamp(16px,4vw,24px);box-shadow:inset 0 2px #ffffff14,inset 0 -8px 18px #00000073,0 12px 22px #4a463f52}canvas{aspect-ratio:160/144;width:min(100%,320px);image-rendering:pixelated;image-rendering:crisp-edges;background:#f8f8f0;border-radius:3px;margin-inline:auto;display:block;box-shadow:0 0 0 4px #101216}.controls-deck{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"dpad actions""system system";align-items:center;gap:8px clamp(14px,6vw,30px);min-height:clamp(286px,39svh,332px);display:grid;position:relative}.controls-deck:after{content:"";opacity:.32;pointer-events:none;background:repeating-linear-gradient(105deg,#0000 0 10px,#555a62 10px 14px,#0000 14px 24px);border-radius:8px;width:clamp(82px,24vw,116px);height:58px;position:absolute;bottom:clamp(10px,2svh,18px);right:clamp(10px,3vw,18px)}.dpad{aspect-ratio:1;touch-action:none;grid-area:dpad;justify-self:center;width:min(100%,176px);position:relative}.dpad-button,.dpad-center{background:#20242c;width:36%;height:36%;position:absolute;box-shadow:inset 0 2px #ffffff1f,inset 0 -5px #00000070,0 7px 12px #0000003d}.dpad-button:before{content:"";opacity:.7;width:0;height:0;margin:auto;position:absolute;inset:0}.dpad-up{border-radius:12px 12px 4px 4px;top:0;left:32%}.dpad-up:before{border-bottom:10px solid #969daa;border-left:7px solid #0000;border-right:7px solid #0000}.dpad-left{border-radius:12px 4px 4px 12px;top:32%;left:0}.dpad-left:before{border-top:7px solid #0000;border-bottom:7px solid #0000;border-right:10px solid #969daa}.dpad-center{pointer-events:none;border-radius:4px;top:32%;left:32%}.dpad-right{border-radius:4px 12px 12px 4px;top:32%;right:0}.dpad-right:before{border-top:7px solid #0000;border-bottom:7px solid #0000;border-left:10px solid #969daa}.dpad-down{border-radius:4px 4px 12px 12px;bottom:0;left:32%}.dpad-down:before{border-top:10px solid #969daa;border-left:7px solid #0000;border-right:7px solid #0000}.action-pad{aspect-ratio:1.15;touch-action:none;grid-area:actions;justify-self:center;width:min(100%,178px);position:relative}.face-button{aspect-ratio:1;color:#fff8f2;background:#82305f;border-radius:50%;width:clamp(68px,48%,90px);height:auto;font-size:clamp(1.35rem,5vw,1.8rem);position:absolute;box-shadow:inset 0 2px #ffffff30,inset 0 -6px #00000047,0 8px 12px #00000038}.button-a{top:4%;right:0}.button-b{bottom:4%;left:0}.system-controls{grid-area:system;justify-content:center;align-self:start;align-items:center;gap:clamp(18px,6vw,30px);padding-top:8px;display:flex}.system-button{color:#f1f2f4;background:#676b72;border-radius:999px;min-width:clamp(96px,28vw,124px);min-height:36px;padding:0 16px;font-size:clamp(.64rem,2.5vw,.76rem);transform:rotate(-15deg);box-shadow:inset 0 2px #ffffff29,inset 0 -4px #00000047,0 5px 8px #0003}.dpad-button.active,.dpad-button:active,.face-button.active,.face-button:active,.tool-button.active,.tool-button:active,.reset-button.active,.reset-button:active{transform:translateY(3px)}.system-button.active,.system-button:active{transform:rotate(-15deg)translateY(3px)}.dpad-button.active,.dpad-button:active{background:#2b303a;box-shadow:inset 0 3px 8px #00000080,0 2px 5px #00000038}.face-button.active,.face-button:active{background:#95396f;box-shadow:inset 0 4px 10px #0000006b,0 3px 6px #0003}.system-button.active,.system-button:active{background:#747982}.reset-button.active,.reset-button:active{background:#f4e5b7}.tool-button.active,.tool-button:active{background:#3d424d}.debug-shell{background:linear-gradient(#efe2ae14,#0000 26%),#15191d;width:100%;min-height:100svh;padding:clamp(12px,3vw,24px);display:block}.level-debug{color:#eef2d0;width:min(1160px,100%);margin-inline:auto}.level-debug-toolbar{justify-content:space-between;align-items:center;gap:12px;min-height:46px;margin-bottom:16px;display:flex}.level-debug h1,.level-debug h2,.level-debug p{margin:0}.level-debug h1{letter-spacing:0;font-size:clamp(1.1rem,3vw,1.65rem)}.level-debug-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.level-debug-button{color:#20242a;background:#e7d06e;border-radius:7px;min-height:34px;padding:0 12px;font-size:.78rem;box-shadow:inset 0 2px #ffffff73,inset 0 -3px #0000003d}.level-debug-grid{grid-template-columns:repeat(auto-fill,180px);gap:12px;display:grid}.level-debug-card{color:#e9efc8;text-align:left;background:#252b2d;border-radius:8px;gap:7px;min-width:0;padding:10px;display:grid;box-shadow:inset 0 0 0 1px #eef2d01f,0 10px 18px #00000047}.level-debug-card:hover,.level-debug-card:focus-visible{background:#303736}.level-debug-canvas{aspect-ratio:160/144;width:160px;image-rendering:pixelated;image-rendering:crisp-edges;background:#f8f8f8;border-radius:3px;box-shadow:0 0 0 2px #0f1314}.level-debug-canvas.is-large{width:min(100%,640px)}.level-debug-card-label{font-size:.85rem;font-weight:950;display:block}.level-debug-card-meta{color:#b9c6a5;min-height:2.4em;font-size:.7rem;line-height:1.2;display:block}.level-debug-single{justify-items:start;gap:12px;display:grid}.level-debug-single h2{font-size:clamp(1rem,2.4vw,1.35rem)}.level-debug-single p{color:#c8d4b4;max-width:74ch;font-size:.9rem}@media (width<=390px){.gameboy{gap:10px;width:min(100vw,100vw - 4px)}.device-bar{grid-template-columns:minmax(0,1fr) auto auto auto}.tool-button,.reset-button{min-width:54px;padding-inline:8px}.screen-bezel{padding:15px}.controls-deck{min-height:274px}}@media (height<=660px){.gameboy{gap:10px;min-height:calc(100svh - 20px)}.screen-bezel{justify-self:center;width:min(100%,330px);padding:14px}.controls-deck{min-height:252px}.dpad{width:min(100%,150px)}.action-pad{width:min(100%,156px)}.face-button{width:clamp(62px,46%,78px);height:auto}}@media (width<=620px){.level-debug-toolbar{flex-direction:column;align-items:flex-start}.level-debug-actions{justify-content:flex-start}}
