*,*:before,*:after{box-sizing:border-box}html,body{margin:0;padding:0;background:radial-gradient(circle at 50% 20%,rgba(120,31,18,.25),transparent 34%),linear-gradient(135deg,#1d1512,#060606 58%,#120d0a);color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;overflow:hidden;width:100%;height:100%;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;user-select:none}#game-shell{position:fixed;inset:0;display:grid;place-items:center;padding:max(18px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:linear-gradient(#08060685,#080606b3),var(--webmd-ambient-image, none) center / cover no-repeat}#game{position:relative;z-index:1;background:linear-gradient(#ffffff09 50%,#00000014 50%) 0 0 / 100% 4px,radial-gradient(circle at 50% 38%,#2a2d34f2,#08090b 68%);background-color:#08090b;background-position:center;background-size:cover;overflow:hidden;box-shadow:inset 0 0 42px #000c}.ejs_bar,.ejs_menu_bar,.ejs_virtualGamepad_open,.ejs_context_menu,.ejs_settings_parent,.ejs_list_selector{display:none!important;pointer-events:none!important}.webmd-start{position:fixed;inset:0;z-index:60;display:grid;place-items:center;background:radial-gradient(circle at center,#181820ad,#000000e0)}.webmd-start__button{appearance:none;border:3px solid #211915;border-radius:8px;background:linear-gradient(#c53628,#8f1712);color:#f7e7c9;font:inherit;font-size:18px;font-weight:800;letter-spacing:.04em;padding:13px 30px;text-transform:uppercase;box-shadow:inset 0 2px #ffffff47,inset 0 -4px #00000038,0 10px #3b2d28,0 18px 34px #00000080}.webmd-start__button:active{transform:translateY(4px);box-shadow:inset 0 2px #ffffff38,inset 0 -2px #0003,0 6px #3b2d28,0 12px 24px #00000073}body[data-mode=desktop] #game-shell:before{content:"";position:absolute;left:50%;top:calc(50% - 18px);width:min(94vw,1180px);aspect-ratio:1200 / 800;transform:translate(-50%,-50%);background:url(../assets/fc-crt-webnes-tv-4x3-widthfit-alpha.webp) center / contain no-repeat;filter:drop-shadow(0 34px 70px rgba(0,0,0,.72));pointer-events:none}body[data-mode=desktop] .webmd-controller-shell{position:absolute;left:50%;top:calc(50% - 18px);z-index:2;width:min(94vw,1180px);aspect-ratio:1200 / 800;transform:translate(-50%,-50%);background:url(../assets/arcade-controller-4x3-widthfit-alpha.webp) center / contain no-repeat;filter:drop-shadow(0 34px 70px rgba(0,0,0,.72));pointer-events:none}body[data-mode^=mobile] .webmd-controller-shell{display:none}body[data-mode=desktop] #game-shell:after{content:"";position:absolute;left:calc(50% - min(4.03vw,51px));top:calc(50% - 18px - min(7.2vw,90px));width:min(46.8vw,587px);aspect-ratio:4 / 3;transform:translate(-50%,-50%);border-radius:24px/18px;background:radial-gradient(ellipse at center,transparent 58%,rgba(0,0,0,.4) 100%),linear-gradient(#ffffff0a 50%,#00000014 50%) 0 0 / 100% 4px;pointer-events:none;z-index:3;mix-blend-mode:screen}body[data-mode=desktop] #game{position:absolute;left:calc(50% - min(4.03vw,51px));top:calc(50% - 18px - min(7.2vw,90px));width:min(46.8vw,587px);aspect-ratio:4 / 3;height:auto;border:none;border-radius:22px/16px;transform:translate(-50%,-50%)}body[data-mode=desktop] .ejs_parent,body[data-mode=desktop] .ejs_game,body[data-mode=desktop] .ejs_canvas_parent{border-radius:12px}body[data-mode=desktop] .ejs_start_button{display:none!important;z-index:40!important;bottom:calc(50% - min(8.2vw,96px))!important;left:50%!important;transform:translate(-50%)!important;border:3px solid #211915!important;border-radius:8px!important;background:linear-gradient(#c53628,#8f1712)!important;color:#f7e7c9!important;font-weight:800!important;letter-spacing:.04em;text-transform:uppercase;box-shadow:inset 0 2px #ffffff47,inset 0 -4px #00000038,0 10px #3b2d28,0 18px 34px #00000080!important}body[data-mode=desktop] .ejs_virtualGamepad{display:none!important}.webmd-hint{position:fixed;inset:auto auto 16px 50%;z-index:30;width:min(760px,calc(100vw - 32px));transform:translate(-50%);background:#181210eb;color:#fff;border:2px solid rgba(242,224,190,.18);border-radius:14px;font-size:13px;box-shadow:0 10px 30px #00000075;backdrop-filter:blur(6px)}body[data-mode=desktop]:not(.webmd-started) .webmd-hint{display:none}.webmd-hint__bar{display:flex;align-items:center;gap:6px;padding:8px 10px;border-bottom:1px solid rgba(255,255,255,.06)}.webmd-hint__title{flex:1;font-weight:600}.webmd-hint__langs{display:flex;align-items:center;gap:4px}.webmd-hint__lang{width:28px;height:24px;display:grid;place-items:center;border:1px solid rgba(241,220,179,.24);border-radius:6px;background:linear-gradient(180deg,#3f2b26f2,#251916f2);color:#f6e8cb;padding:0;font-size:11px;font-weight:700;letter-spacing:.2px;line-height:1;cursor:pointer}.webmd-hint__lang[aria-pressed=true]{border-color:#d3b37f;background:linear-gradient(180deg,#8a2620,#581613);box-shadow:inset 0 1px #fff3,0 0 0 1px #0003}.webmd-hint__toggle{background:transparent;color:#fff;border:none;cursor:pointer;font-size:16px;width:22px;height:22px;line-height:1}.webmd-hint--collapsed .webmd-hint__body,.webmd-hint--collapsed .webmd-hint__actions{display:none}.webmd-hint__body{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px 14px;padding:8px 10px 4px}.webmd-hint__row{display:flex;justify-content:space-between;align-items:center;padding:4px 0}.webmd-hint__label{opacity:.85}.webmd-hint__key{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;background:#ffffff1a;border:1px solid rgba(255,255,255,.18);border-radius:4px;padding:1px 6px;font-size:12px;min-width:36px;text-align:center}.webmd-hint__actions{padding:8px 10px 10px;border-top:1px solid rgba(255,255,255,.06)}.webmd-hint__cfg{width:100%;border:2px solid #2c2019;background:linear-gradient(#be3127,#7b1713);color:#f7e7c9;border-radius:6px;padding:6px 10px;font-size:13px;font-weight:700;letter-spacing:.02em;cursor:pointer;box-shadow:inset 0 1px #ffffff42,inset 0 -2px #00000040,0 2px #3a2b25}.webmd-modal{position:fixed;inset:0;z-index:10000;background:#0000008c;display:flex;align-items:center;justify-content:center}.webmd-modal__panel{width:min(420px,92vw);background:#1a1d24;color:#fff;border-radius:12px;border:1px solid rgba(255,255,255,.08);overflow:hidden;font-size:14px}.webmd-modal__panel header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;border-bottom:1px solid rgba(255,255,255,.06)}.webmd-modal__panel header h2{margin:0;font-size:15px;font-weight:600}.webmd-modal__close{background:transparent;color:#fff;border:none;font-size:22px;cursor:pointer;line-height:1}.webmd-modal__rows{padding:8px 16px;max-height:60vh;overflow-y:auto}.webmd-modal__row{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:10px;padding:6px 0}.webmd-modal__row kbd{font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;background:#ffffff1a;border:1px solid rgba(255,255,255,.18);border-radius:4px;padding:2px 8px;font-size:12px;min-width:56px;text-align:center}.webmd-modal__row button{background:#ffffff14;color:#fff;border:1px solid rgba(255,255,255,.16);border-radius:5px;padding:4px 10px;cursor:pointer;font-size:12px}.webmd-modal__panel footer{display:flex;justify-content:space-between;padding:12px 16px;border-top:1px solid rgba(255,255,255,.06)}.webmd-modal__reset{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.16);border-radius:6px;padding:6px 12px;cursor:pointer}.webmd-modal__done{background:var(--accent, #1AAFFF);color:#fff;border:none;border-radius:6px;padding:6px 16px;cursor:pointer}body[data-mode^=mobile]{overscroll-behavior:none;touch-action:none;--mobile-pad-width: min(100vw, 520px);--mobile-pad-height: min(72vw, 375px);--mobile-pad-bottom: max(0px, env(safe-area-inset-bottom));--mobile-top-safe: max(12px, env(safe-area-inset-top));--mobile-playfield-height: calc(100vh - var(--mobile-pad-height) - var(--mobile-pad-bottom))}body[data-mode^=mobile] .webmd-hint,body[data-mode^=mobile] .webmd-modal{display:none!important}.webmd-mobile-menu{display:none}body[data-mode^=mobile] .webmd-mobile-menu{display:block;position:fixed;top:calc(env(safe-area-inset-top) + 10px);right:10px;z-index:8;width:34px;opacity:.38;transition:opacity .16s ease}body[data-mode^=mobile] .webmd-mobile-menu--open{opacity:1}body[data-mode^=mobile] .webmd-mobile-menu__toggle{width:34px;height:34px;border-radius:8px;border:1px solid rgba(255,236,210,.72);background:linear-gradient(180deg,#c2473d,#8f261f);color:#fff6e8;font-size:20px;line-height:1;cursor:pointer;box-shadow:inset 0 1px #ffffff38,0 4px 14px #00000052}body[data-mode^=mobile] .webmd-mobile-menu__panel{position:absolute;top:42px;right:0;width:min(76vw,280px);max-height:50vh;overflow:auto;border-radius:10px;border:1px solid rgba(150,48,39,.5);background:#f8f2e8f7;color:#3a201a;box-shadow:0 10px 24px #00000073;backdrop-filter:blur(6px)}body[data-mode^=mobile] .webmd-mobile-menu__title{padding:8px 10px;font-size:12px;font-weight:600;color:#fff6e8;border-bottom:1px solid rgba(255,255,255,.2);background:linear-gradient(180deg,#ba3f35,#8f261f)}body[data-mode^=mobile] .webmd-mobile-menu__langs{display:grid;grid-template-columns:1fr;gap:4px;padding:6px}body[data-mode^=mobile] .webmd-mobile-menu__lang{border:1px solid rgba(150,48,39,.32);border-radius:8px;background:#ffffffc7;color:#4b2a23;padding:7px 8px;text-align:left;font-size:12px;font-weight:600}body[data-mode^=mobile] .webmd-mobile-menu__lang[aria-pressed=true]{border-color:#ffecd2b8;background:linear-gradient(180deg,#c2473d,#8f261f);color:#fff6e8}body[data-mode^=mobile] .ejs_start_button{display:none!important}body[data-mode^=mobile] #game-shell{padding:0}body[data-mode^=mobile] #game{width:100vw;height:100vh;max-height:100vh;background:#050505;box-shadow:none;overflow:hidden}body[data-mode^=mobile] #game:before{content:none}body[data-mode^=mobile] #game:after{content:"";position:absolute;left:50%;bottom:var(--mobile-pad-bottom);z-index:0;width:var(--mobile-pad-width);height:var(--mobile-pad-height);transform:translate(-50%);background:url(../assets/md-six-button-controller.webp) center bottom / 100% auto no-repeat;filter:drop-shadow(0 10px 24px rgba(0,0,0,.42));pointer-events:none}body[data-mode=mobile-portrait] .ejs_canvas_parent,body[data-mode=mobile-portrait] .ejs_game{position:absolute!important;left:50%!important;top:calc(var(--mobile-top-safe) + (var(--mobile-playfield-height) - var(--mobile-top-safe) - min(75vw,520px)) / 2)!important;z-index:1!important;width:min(100vw,520px)!important;height:min(75vw,calc(var(--mobile-playfield-height) - var(--mobile-top-safe)))!important;transform:translate(-50%)!important;border:none!important;border-radius:0!important;overflow:hidden!important}body[data-mode=mobile-landscape] #game{width:100vw;height:100vh}body[data-mode=mobile-landscape] .ejs_canvas_parent,body[data-mode=mobile-landscape] .ejs_game{height:calc(100vh - var(--mobile-pad-height) - var(--mobile-pad-bottom) - 8px)!important;width:100vw!important}body[data-mode^=mobile] .ejs_virtualGamepad_parent{display:none!important}.webmd-pad{position:absolute;left:50%;bottom:var(--mobile-pad-bottom);z-index:3;width:var(--mobile-pad-width);height:var(--mobile-pad-height);transform:translate(-50%)}.webmd-pad__hit{position:absolute;appearance:none;border:none;border-radius:12px;background:transparent;touch-action:none}body.webmd-debug .webmd-pad__hit{border:2px solid rgba(255,255,255,.55);background:#1aafff38}body.webmd-debug .webmd-pad__hit--active{background:#ffffff61}body.webmd-debug .webmd-pad__hit--up,body.webmd-debug .webmd-pad__hit--down,body.webmd-debug .webmd-pad__hit--left,body.webmd-debug .webmd-pad__hit--right{background:#ffd64047;border-color:#ffeb78c7}body.webmd-debug .webmd-pad__hit--a,body.webmd-debug .webmd-pad__hit--b,body.webmd-debug .webmd-pad__hit--c,body.webmd-debug .webmd-pad__hit--x,body.webmd-debug .webmd-pad__hit--y,body.webmd-debug .webmd-pad__hit--z{background:#ff40403d;border-color:#ff9696c7}body.webmd-debug .webmd-pad__hit--mode,body.webmd-debug .webmd-pad__hit--start{background:#78dcff3d;border-color:#aaebffc7}body.webmd-pad-editor .webmd-pad__hit{border:2px solid rgba(255,255,255,.62);background:#1aafff38;box-shadow:inset 0 0 0 1px #00000040;cursor:move}body.webmd-pad-editor .webmd-pad__hit:after{content:attr(data-pad-id);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:#fff;font-size:12px;font-weight:700;text-shadow:0 1px 3px rgba(0,0,0,.75);pointer-events:none}body.webmd-pad-editor .webmd-pad__hit--up,body.webmd-pad-editor .webmd-pad__hit--down,body.webmd-pad-editor .webmd-pad__hit--left,body.webmd-pad-editor .webmd-pad__hit--right{background:#ffd64047;border-color:#ffeb78db}body.webmd-pad-editor .webmd-pad__hit--a,body.webmd-pad-editor .webmd-pad__hit--b,body.webmd-pad-editor .webmd-pad__hit--c,body.webmd-pad-editor .webmd-pad__hit--x,body.webmd-pad-editor .webmd-pad__hit--y,body.webmd-pad-editor .webmd-pad__hit--z{background:#ff404042;border-color:#ff9696db}body.webmd-pad-editor .webmd-pad__hit--mode,body.webmd-pad-editor .webmd-pad__hit--start{background:#78dcff42;border-color:#aaebffdb}.webmd-pad-editor-panel{position:fixed;left:10px;top:calc(env(safe-area-inset-top) + 10px);z-index:30;width:min(90vw,340px);padding:10px;border-radius:10px;border:1px solid rgba(255,236,210,.38);background:#101218eb;color:#f4f6ff;backdrop-filter:blur(6px)}.webmd-pad-editor-panel__title{font-size:13px;font-weight:700;margin-bottom:6px}.webmd-pad-editor-panel__tips{font-size:12px;opacity:.85;margin-bottom:4px}.webmd-pad-editor-panel__output{width:100%;min-height:180px;margin-top:8px;margin-bottom:8px;padding:8px;resize:vertical;border-radius:8px;border:1px solid rgba(255,255,255,.18);background:#020408b8;color:#e8f0ff;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:11px}.webmd-pad-editor-panel__actions{display:flex;gap:6px}.webmd-pad-editor-panel__actions button{appearance:none;border:1px solid rgba(255,236,210,.45);border-radius:8px;background:linear-gradient(180deg,#c2473d,#8f261f);color:#fff6e8;padding:6px 8px;font-size:12px;font-weight:600}.webmd-pad-editor-panel__status{margin-top:8px;font-size:11px;opacity:.8}.webmd-pad__hit--up{left:14.1%;top:57.76%;width:8%;height:11.5%}.webmd-pad__hit--down{left:14.26%;top:74.62%;width:8%;height:11.5%}.webmd-pad__hit--left{left:7.93%;top:67.1%;width:9.6%;height:11.5%}.webmd-pad__hit--right{left:18.44%;top:66.94%;width:9.6%;height:11.5%}.webmd-pad__hit--mode{display:none;left:38.5%;top:78.5%;width:11.5%;height:7%;border-radius:999px}.webmd-pad__hit--start{left:36.12%;top:81.78%;width:22%;height:6.6%;border-radius:999px}.webmd-pad__hit--b{left:73.72%;top:73.78%;width:8%;height:10.4%;border-radius:50%}.webmd-pad__hit--a{left:63.89%;top:73.99%;width:8%;height:10.4%;border-radius:50%}.webmd-pad__hit--c{left:83.78%;top:73.22%;width:8%;height:10.4%;border-radius:50%}.webmd-pad__hit--x{left:64.25%;top:60.68%;width:8%;height:10.4%;border-radius:50%}.webmd-pad__hit--y{left:73.9%;top:61.52%;width:8%;height:10.4%;border-radius:50%}.webmd-pad__hit--z{left:83.59%;top:61.01%;width:8%;height:10.4%;border-radius:50%}
