.boss-world{box-sizing:border-box;width:min(1120px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid #655075;border-radius:14px;background:#111321;color:#eeeaf4;overflow:auto;box-shadow:0 24px 110px #000a;font-family:inherit}.boss-world *{box-sizing:border-box}.boss-world::backdrop{background:#03050ee8;backdrop-filter:blur(8px)}.boss-header{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;gap:12px;background:#191827;font:11px monospace;letter-spacing:2px}.boss-world button{border:1px solid #645371;background:#262335;color:#eeeaf4;border-radius:6px;padding:11px 16px;font:inherit;cursor:pointer;touch-action:manipulation}.boss-world button:hover,.boss-world button:focus-visible{background:#433253;outline:2px solid #b5efdc;outline-offset:2px}.boss-header button{font-size:12px;letter-spacing:0;padding:8px 12px}.boss-stage{position:relative;background:#0b0d1c}.boss-stage canvas{display:block;width:100%;height:auto;image-rendering:pixelated;outline-offset:-4px}.boss-gate,.boss-result{position:absolute;left:4%;top:7%;width:45%;padding:22px;background:#10101dd9;border:1px solid #635276;box-shadow:0 10px 50px #0006;border-radius:8px}.boss-gate>span{font:10px monospace;letter-spacing:2px;color:#b69ecb}.boss-gate h2,.boss-result h2{font:900 clamp(18px,3vw,36px) monospace;color:#f1dcff;margin:14px 0}.boss-gate p,.boss-result p{font-size:14px;line-height:1.6;color:#cac2d4}.boss-gate button,.boss-result button{background:#705091;border-color:#cba1ed}.boss-result{left:22%;top:22%;width:56%;text-align:center;background:#10101df5}.boss-world [hidden]{display:none!important}.boss-hud{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:18px;padding:14px 20px 0}.boss-hud label{display:grid;gap:6px;min-width:0;font:11px monospace;letter-spacing:1px}.boss-hud label:last-child{text-align:right}.boss-hud meter{display:block;width:100%;height:14px;border:0;background:#272538;accent-color:#80dfc1}.boss-hud meter::-webkit-meter-bar{background:#272538;border:0;border-radius:0}.boss-hud meter::-webkit-meter-optimum-value{background:#80dfc1}.boss-hud label:last-child meter::-webkit-meter-optimum-value{background:#c091dc}.boss-hud strong{font:italic 22px monospace;color:#b79acb}.boss-comment{min-height:24px;margin:12px 20px;font:13px monospace;color:#e6c38d}.boss-controls{display:flex;justify-content:space-between;gap:12px;padding:0 20px}.boss-controls>div{display:flex;gap:8px;align-items:center}.boss-controls button{min-width:48px;min-height:46px;user-select:none;-webkit-user-select:none;touch-action:none;font-size:13px}.boss-controls [data-hold=guard]{border-color:#6faba9;background:#223b41}.boss-controls [data-action=fire]{border-color:#7dba9a;background:#244235}.boss-help{margin:12px 20px 18px;font-size:11px;line-height:1.6;color:#a19aaf}@media(max-width:600px){.boss-world{width:calc(100vw - 8px);max-height:calc(100dvh - 8px);border-radius:8px}.boss-header{padding:9px;font-size:9px;letter-spacing:1px}.boss-header button{font-size:10px;padding:8px}.boss-gate{left:3%;top:5%;width:51%;padding:10px}.boss-gate h2{font-size:18px;margin:8px 0}.boss-gate p{font-size:10px;line-height:1.4;margin:5px 0}.boss-gate button{font-size:11px;padding:9px}.boss-gate>span{font-size:8px;letter-spacing:0}.boss-result{left:10%;top:7%;width:80%;padding:12px}.boss-result h2{font-size:20px;margin:8px}.boss-result p{font-size:12px;margin:8px}.boss-hud{padding:12px 10px 0;gap:9px}.boss-hud label{font-size:9px;letter-spacing:0}.boss-comment{font-size:11px;margin:10px;min-height:28px}.boss-controls{padding:0 8px;gap:6px;flex-wrap:wrap}.boss-controls>div{gap:5px}.boss-controls button{font-size:11px;padding:9px;min-width:42px}.boss-help{margin:10px;font-size:10px}}@media(prefers-reduced-motion:reduce){.boss-world::backdrop{backdrop-filter:none}}
.boss-controls button{border:1px solid #8e959e;border-bottom:4px solid #777e89;background:linear-gradient(145deg,#f0f2f5,#b7bec8 55%,#d2d7de);color:#232a35;box-shadow:inset 0 1px 0 #fff,0 3px 0 #111725,0 5px 8px #0006;text-shadow:0 1px #ffffffa8;font-weight:800}.boss-controls button:hover,.boss-controls button:focus-visible{background:linear-gradient(145deg,#fff,#c4cbd5);color:#131b26}.boss-controls button:active{transform:translateY(3px);border-bottom-width:1px;box-shadow:inset 0 2px 5px #5d697d70}.boss-controls [data-hold=guard],.boss-controls [data-action=fire]{background:linear-gradient(145deg,#edf1f5,#adb8c6 60%,#d6dce6);border-color:#8e959e}.boss-controls [data-hold=left],.boss-controls [data-hold=right]{font-size:21px;min-width:52px}.boss-controls [data-action=fire],.boss-controls [data-hold=guard]{border-radius:50%;width:60px;height:60px}.boss-controls [data-pause]{min-width:65px;font-size:10px}@media(max-width:600px){.boss-controls{padding:10px 12px 14px;background:linear-gradient(#303747,#252b38);border-top:1px solid #4f5869;border-radius:0 0 14px 14px;justify-content:center;gap:14px}.boss-controls>div{gap:9px}.boss-controls [data-hold=left],.boss-controls [data-hold=right]{min-width:48px}.boss-controls [data-action=jump]{min-height:48px}.boss-controls [data-action=fire],.boss-controls [data-hold=guard]{width:56px;height:56px}.boss-controls [data-pause]{padding:7px;min-width:64px}.boss-stage{margin:8px;border:5px solid #384253;border-radius:7px;overflow:hidden}.boss-world{background:linear-gradient(120deg,#262c3a,#151a26)}.boss-help{padding:0 4px}}

html:has(.boss-world[open]),body:has(.boss-world[open]){overflow:hidden}.boss-world{overflow:hidden;max-height:calc(100dvh - 12px)}.boss-stage{height:min(56.25vw,calc(100dvh - 270px));min-height:100px}.boss-stage canvas{height:100%;object-fit:contain}.is-embedded,html:has(body.is-embedded){scrollbar-width:none}.is-embedded::-webkit-scrollbar,html:has(body.is-embedded)::-webkit-scrollbar{display:none}@media(max-width:600px){.boss-stage{height:min(56.25vw,calc(100dvh - 300px));margin:8px}.boss-controls>div:first-child{display:grid;grid-template-columns:48px 48px 48px;grid-template-rows:44px 44px;gap:4px}.boss-controls [data-action=jump]{grid-column:2;grid-row:1;min-height:44px;padding:6px}.boss-controls [data-hold=left]{grid-column:1;grid-row:2}.boss-controls [data-hold=right]{grid-column:3;grid-row:2}.boss-controls{flex-wrap:nowrap;gap:10px;padding:8px;align-items:center}.boss-controls>div:last-child{display:grid;grid-template-columns:56px 56px;gap:6px}.boss-controls [data-pause]{grid-column:1/3;min-height:28px;padding:5px}.boss-help{margin:6px 10px;font-size:9px}.boss-comment{margin:7px 10px;min-height:26px}.boss-hud{padding-top:7px}}@media(max-height:480px){.boss-stage{height:calc(100dvh - 170px);min-height:65px}.boss-help{display:none}.boss-header{padding:5px 12px}.boss-controls button{min-height:32px;height:36px;width:auto;padding:5px 12px}.boss-comment{margin:5px 12px;min-height:16px}.boss-hud{padding-top:6px}}

.boss-world,.boss-world *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.boss-world [data-hold],.boss-world [data-action]{touch-action:none}.boss-stage canvas{touch-action:pan-y pinch-zoom}.boss-world input,.boss-world textarea{user-select:text;-webkit-user-select:text;touch-action:auto}
.boss-world.is-lobby{overflow:auto}.boss-world.is-lobby .boss-stage{height:auto;min-height:0;overflow:visible;background:#151426}.boss-world.is-lobby .boss-stage canvas,.boss-world.is-lobby .boss-hud,.boss-world.is-lobby .boss-controls,.boss-world.is-lobby .boss-help{display:none}.boss-world.is-lobby .boss-gate{position:relative;inset:auto;width:auto;max-width:540px;margin:16px auto;padding:20px;border:0;box-sizing:border-box;background:transparent}.boss-lobby{display:grid;gap:14px;text-align:left}.boss-lobby>label{display:grid;gap:7px;font-size:14px}.boss-lobby input[name=nickname]{display:block;width:100%;min-height:46px;padding:10px 12px;box-sizing:border-box;border:1px solid #847897;border-radius:8px;background:#f9f6fc;color:#202435;font:16px Arial,sans-serif}.boss-lobby fieldset{padding:0;border:0;margin:0;min-width:0}.boss-lobby legend{margin-bottom:8px;font-size:14px}.boss-weapons{display:grid;gap:8px}.boss-weapons label{display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 12px;box-sizing:border-box;border:1px solid #62556f;border-radius:8px;background:#211b30;color:#eee7f7;font-size:13px;cursor:pointer}.boss-weapons input{width:20px;height:20px;accent-color:#c39af0;flex:0 0 auto}.boss-weapons label:has(input:checked){background:#3b2a50;border-color:#d5b4f8}.boss-lobby [data-enter]{min-height:48px;font-size:14px!important}.boss-lobby :focus-visible{outline:3px solid #e8c18f;outline-offset:3px}@media(max-width:600px){.boss-world.is-lobby .boss-gate{margin:0;padding:12px}.boss-world.is-lobby .boss-gate h2{font-size:24px}.boss-world.is-lobby .boss-gate p{font-size:12px}.boss-lobby{gap:10px}}
.boss-world .boss-controls [data-pause]{min-height:44px}@media(max-height:480px){.boss-world .boss-controls button{min-height:44px}}

/* Full viewport boss arena with a flexible, undistorted canvas. */
.boss-world{inset:0;width:100%;height:100vh;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;padding:0;overflow:hidden}
.boss-world[open]{display:flex;flex-direction:column}
.boss-world .boss-header{flex:0 0 auto;flex-wrap:wrap;padding:4px max(10px,env(safe-area-inset-right)) 4px max(10px,env(safe-area-inset-left));padding-top:max(4px,env(safe-area-inset-top));gap:6px}
.boss-world .boss-header button{min-height:44px}
.boss-world .boss-stage{flex:1 1 0;height:auto;min-height:0;margin:0;border:0;border-radius:0;overflow:hidden}
.boss-world .boss-stage canvas{width:100%;height:100%;object-fit:contain;touch-action:none}
.boss-world .boss-hud,.boss-world .boss-comment,.boss-world .boss-controls,.boss-world .boss-help{flex:0 0 auto}
.boss-world .boss-controls{border-radius:0;padding-bottom:max(8px,env(safe-area-inset-bottom))}
.boss-world .boss-help{margin:4px 10px 8px}.boss-world .boss-comment{margin:4px 10px;min-height:20px}
.boss-world.is-lobby{overflow:auto}.boss-world.is-lobby .boss-stage{flex:1 0 auto;overflow:visible;display:grid;align-content:center}
.boss-world.is-lobby .boss-gate{width:min(540px,100%);margin:auto}
@media(max-height:520px) and (orientation:landscape){.boss-world[open]:not(.is-lobby){display:grid;grid-template-columns:minmax(0,1fr) 200px;grid-template-rows:auto auto minmax(0,1fr) auto}.boss-world .boss-header{grid-column:1/-1}.boss-world .boss-hud{grid-column:1;grid-row:2;padding:4px 12px}.boss-world .boss-stage{grid-column:1;grid-row:3}.boss-world .boss-comment{grid-column:1;grid-row:4}.boss-world .boss-controls{grid-column:2;grid-row:2/5;display:flex;flex-direction:column;justify-content:center;padding:8px;gap:12px}.boss-world .boss-help{display:none}.boss-world .boss-controls>div{flex-wrap:wrap;justify-content:center}.boss-world.is-lobby .boss-stage{display:block}}


@media(max-width:600px) and (orientation:portrait),(max-width:950px) and (max-height:520px) and (orientation:landscape){
 .boss-world .boss-controls{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:18px;padding:12px max(14px,env(safe-area-inset-right)) max(36px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));background:#252d3a}
 .boss-world .boss-controls>div:first-child{display:grid;grid-template-columns:repeat(2,54px);grid-template-rows:58px;gap:10px}
 .boss-world .boss-controls [data-hold=left]{grid-column:1;grid-row:1}.boss-world .boss-controls [data-hold=right]{grid-column:2;grid-row:1}
 .boss-world .boss-controls>div:last-child{display:grid;grid-template-columns:repeat(2,58px);grid-template-rows:54px 58px 36px;gap:10px}
 .boss-world .boss-controls [data-action=jump]{grid-column:1/3;grid-row:1;justify-self:center;width:58px;min-height:54px;padding:5px;border-radius:50%}
 .boss-world .boss-controls [data-action=fire]{grid-column:1;grid-row:2}.boss-world .boss-controls [data-hold=guard]{grid-column:2;grid-row:2}
 .boss-world .boss-controls [data-action=fire],.boss-world .boss-controls [data-hold=guard]{width:58px;height:58px;min-height:58px;padding:5px;font-size:12px}
 .boss-world .boss-controls [data-pause]{grid-column:1/3;grid-row:3;min-height:36px;padding:4px}.boss-world .boss-help{display:none}
}
@media(max-width:350px) and (orientation:portrait){.boss-world .boss-controls{padding-left:10px;padding-right:10px;gap:12px}.boss-world .boss-controls>div:first-child{grid-template-columns:repeat(2,48px);gap:8px}.boss-world .boss-controls>div:last-child{grid-template-columns:repeat(2,54px);gap:8px}.boss-world .boss-controls [data-action=fire],.boss-world .boss-controls [data-hold=guard]{width:54px;height:54px;min-height:54px}}
@media(max-height:520px) and (orientation:landscape){.boss-world[open]:not(.is-lobby){display:flex;flex-direction:column}.boss-world .boss-controls{padding:4px max(20px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}.boss-world .boss-controls>div:last-child{grid-template-columns:repeat(3,48px) 68px;grid-template-rows:44px 44px;gap:7px}.boss-world .boss-controls [data-action=jump]{grid-column:2;grid-row:1;width:48px;min-height:44px}.boss-world .boss-controls [data-action=fire]{grid-column:1;grid-row:2}.boss-world .boss-controls [data-hold=guard]{grid-column:3;grid-row:2}.boss-world .boss-controls [data-action=fire],.boss-world .boss-controls [data-hold=guard]{width:48px;height:48px;min-height:48px}.boss-world .boss-controls [data-pause]{grid-column:4;grid-row:1/3;align-self:center}.boss-world .boss-stage{min-height:60px}.boss-world .boss-comment{display:none}}
