:root{color-scheme:dark}*{box-sizing:border-box}body{margin:0;background:#101320;color:#fff0d5;font-family:system-ui,sans-serif}button{font:800 12px monospace;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible{outline:3px solid #ffd476;outline-offset:3px}main{max-width:1240px;margin:auto;padding:22px 28px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;gap:14px}.brand{font:900 20px monospace;color:#ffedc8;text-decoration:none;letter-spacing:2px}.brand span{color:#65e2ef}header>div{display:flex;gap:8px}header button{min-height:38px;padding:8px 12px;border:1px solid #46516b;background:#20273a;border-radius:5px}.cabinet{border:1px solid #566279;border-radius:10px;overflow:hidden;box-shadow:0 20px 70px #0008}.screen{aspect-ratio:16/9;position:relative;background:#122a45;overflow:hidden}#game{width:100%;height:100%;display:block;image-rendering:pixelated}.hud{position:absolute;inset:0 0 auto;display:grid;grid-template-columns:1fr .7fr 1fr;gap:28px;padding:18px 22px 34px;background:linear-gradient(#101528dc,transparent);pointer-events:none;text-shadow:2px 2px #081322}.hud small{display:block;font:900 14px monospace;color:#ffdb82;margin-bottom:6px}.hud span{display:block;font:11px monospace;margin-top:6px}.health,.special{height:13px;border:2px solid #f1e7cf;background:#1a2336;box-shadow:2px 2px #111728}.health i{display:block;width:100%;height:100%;background:#ff647d}.score{text-align:center}.score strong{font:900 27px monospace}.right{text-align:right}.special{margin-top:8px;height:6px;border:0}.special i{display:block;width:100%;height:100%;background:#69dfee}.overlay{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:20px;background:#091228cf;backdrop-filter:blur(2px)}.overlay.hidden{display:none}.overlay>small{font:800 12px monospace;letter-spacing:2px;color:#6fdfeb}h1{font:1000 clamp(34px,5vw,66px)/.95 monospace;letter-spacing:-2px;margin:15px 0 6px;text-shadow:4px 4px #342c53}h1 span{color:#ff7c92}.overlay p{font-size:14px;margin:10px 0}.choices{display:flex;gap:16px;margin:8px 0 16px}.choices button{display:flex;align-items:center;gap:5px;border:1px solid #637088;background:#12233a;padding:3px 10px;border-radius:6px;min-width:165px}.choices button.selected{border:2px solid #ffe18d;background:#35314a}.choices canvas{width:50px;height:66px;image-rendering:pixelated}.choices b{font-size:11px}#start{border:0;border-bottom:4px solid #9c623d;background:#ffda89;color:#171c2f;border-radius:4px;padding:13px 28px;min-height:44px;font-size:14px}#start:disabled{opacity:.65}.overlay .small{font-size:11px;color:#acbacf}footer{display:flex;justify-content:center;gap:25px;flex-wrap:wrap;padding:14px;background:#1c2436;font:11px monospace}kbd{border:1px solid #64718a;padding:3px 5px;border-radius:3px;font:12px monospace;color:#fff0c9}.under{display:flex;justify-content:space-between;gap:20px;margin-top:15px;font:10px monospace;letter-spacing:1px;color:#94a1b8}.under>span:first-child{color:#ffba89}#callout{position:absolute;left:50%;top:23%;transform:translateX(-50%);font:900 20px monospace;color:#ffe586;text-shadow:3px 3px #172749;text-align:center;pointer-events:none}dialog{max-width:650px;width:calc(100% - 30px);max-height:85vh;border:1px solid #637ca3;background:#142038;color:#e0e8f5;border-radius:8px;padding:24px}dialog::backdrop{background:#000b}dialog button{padding:10px 18px;background:#283b58;border:1px solid #65778f}dialog h2{font:800 20px monospace;color:#ffda89}table{border-collapse:collapse;width:100%;font-size:14px}td{padding:10px;border-bottom:1px solid #344058}td:first-child{font-weight:bold;white-space:nowrap;color:#68dfea}dialog p{font-size:14px;line-height:1.6}[hidden]{display:none!important}@media(max-width:750px){main{padding:12px}.brand{font-size:14px;letter-spacing:1px}header button{font-size:10px;padding:6px}.hud{padding:10px;gap:14px}.hud small{font-size:10px}.hud span{font-size:9px}.score strong{font-size:18px}.health{height:9px}.overlay{padding:10px}.overlay>small{font-size:9px}h1{font-size:30px;margin:8px 0}.overlay p{font-size:11px;margin:5px}.choices{margin:4px 0 8px;gap:8px}.choices button{min-width:120px;padding:2px 6px}.choices canvas{width:30px;height:40px}.choices b{font-size:9px}#start{padding:9px 18px;min-height:36px;font-size:12px}.overlay .small{font-size:9px}.under{display:none}footer{gap:12px;padding:12px;font-size:10px}#callout{font-size:15px}}

#settings{display:flex;gap:18px;align-items:center;margin:4px 0 12px;font-size:14px}#settings label{display:flex;gap:7px;align-items:center}select{font:inherit;color:#fff0d5;background:#202c44;padding:6px;border:1px solid #65778f;border-radius:4px}#resume{background:#254457;border:1px solid #69dfee;border-radius:4px;padding:9px 20px;margin-bottom:9px;font-size:14px}.choices b small{display:block;font:10px monospace;color:#bdd0dd;margin-top:6px}#context{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);background:#101528d9;padding:7px 12px;border-radius:4px;font:800 14px monospace;color:#ffe187;pointer-events:none;white-space:nowrap}#context:empty{display:none}.hud span{font-size:12px}.overlay .small{font-size:12px}header button{font-size:14px}.under{font-size:12px}.overlay h1{font-size:clamp(30px,4.6vw,58px)}@media(max-width:750px){#settings{font-size:11px;gap:10px;margin:2px 0 6px}select{padding:2px}.choices b small{font-size:8px;margin-top:2px}.overlay .small{font-size:9px}.hud span{font-size:9px}#context{font-size:11px;bottom:6px;padding:4px 7px}#resume{font-size:11px;padding:5px 12px;margin-bottom:5px}header button{font-size:10px}.overlay h1{font-size:25px;margin:5px 0}.overlay>small{letter-spacing:1px}.choices canvas{height:35px;width:27px}}
#timer{display:block;font:900 25px monospace;color:#ffdf88;margin-top:6px}.hud{z-index:1}.overlay{z-index:4}.cinematic{position:absolute;inset:0;z-index:3;display:flex;align-items:flex-end;background:linear-gradient(transparent 28%,#07112422 40%,#071124f5 83%)}.cinematic.hidden{display:none}.cinematic>div{width:100%;padding:24px 36px 26px}.cinematic small{font:900 16px monospace;letter-spacing:1px;color:#ffd582}.cinematic #dialogue{font:800 25px/1.25 system-ui;margin:12px 0;color:#fff3dd;max-width:800px;text-shadow:2px 2px #122032}.cinematic #caption{font:14px/1.5 system-ui;color:#c9d9ed;margin:10px 0 16px;max-width:850px}.cinematic button{background:#ffdc93;color:#16223a;border:0;border-bottom:3px solid #a76c42;border-radius:4px;padding:11px 22px;font-size:14px}.cinematic span{font:12px monospace;color:#bdd0e3;margin-left:15px}.choices button{min-width:220px}.choices b{font-size:14px}.choices b small{font-size:10px}.overlay[data-mode=ending] h1{color:#ffecbc}.overlay[data-mode=ending]{background:#071228a6}.overlay[data-mode=ending] p{max-width:650px;line-height:1.6}.hud #streak{color:#ffdb92}.hud #best{font-size:12px}@media(max-width:750px){.cinematic>div{padding:12px 18px}.cinematic small{font-size:11px}.cinematic #dialogue{font-size:17px;margin:6px 0}.cinematic #caption{font-size:11px;line-height:1.35;margin:6px 0 9px}.cinematic button{font-size:11px;padding:7px 12px}.cinematic span{font-size:9px;margin-left:8px}.choices button{min-width:150px}.choices b{font-size:10px}.choices b small{font-size:8px}#timer{font-size:19px;margin-top:3px}.hud #best{font-size:9px}.under{display:none}}@media(max-height:500px) and (min-width:751px){main{max-width:1000px;padding:8px}header{margin-bottom:8px}footer{padding:9px}.under{display:none}}

.touch-controls{position:absolute;inset:0;z-index:2;pointer-events:none;user-select:none;-webkit-user-select:none}.touch-controls button,#joystick{pointer-events:auto;touch-action:none;-webkit-tap-highlight-color:transparent;opacity:.3;transition:opacity .12s,scale .12s;background:#17243ddd;border:2px solid #fff2d9;color:white;box-shadow:0 3px 12px #0008}.touch-controls button.pressed,#joystick.pressed{opacity:.88}.touch-controls button.pressed{scale:.91;background:#577599}.touch-actions{position:absolute;right:max(14px,env(safe-area-inset-right));bottom:max(22px,env(safe-area-inset-bottom));width:160px;height:146px}.touch-actions button{position:absolute;width:64px;height:64px;border-radius:50%;font:bold 14px monospace}#touchJump{top:0;left:48px}#touchHit{bottom:0;left:0}#touchKick{bottom:0;right:0}#joystick{position:absolute;left:max(18px,env(safe-area-inset-left));bottom:max(32px,env(safe-area-inset-bottom));width:132px;height:132px;border-radius:50%}.stick-cross{position:absolute;inset:0;display:grid;place-items:center;font-size:82px;opacity:.5}#stick{position:absolute;left:50%;top:50%;width:56px;height:56px;border-radius:50%;transform:translate(-50%,-50%);background:#d9e8fa;border:2px solid white;box-shadow:0 3px 7px #0009}.touch-hint{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:3px;font:11px monospace;color:#dde7f8;opacity:.7;pointer-events:none}.touch-device footer,.touch-device .under{display:none}.touch-device #game{touch-action:none}.touch-device #context{bottom:175px;max-width:90%;white-space:normal;text-align:center;font-size:11px}.mobile-help{line-height:1.5}
@media (pointer:coarse) and (max-width:1400px){body{overscroll-behavior:none}main{padding:8px max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left));max-width:none}header{height:36px;margin-bottom:6px;gap:6px}.brand{font-size:13px;letter-spacing:0}header>div{gap:4px}header button{min-height:36px;font-size:10px;padding:6px}.screen{height:calc(100svh - 54px);aspect-ratio:auto;min-height:260px}#game{object-fit:contain}.cabinet{border-radius:5px}.hud{padding:8px;gap:8px}.hud small{font-size:10px}.hud span{font-size:9px}.score strong{font-size:18px}#timer{font-size:18px}.overlay{overflow-y:auto;padding:12px}.cinematic>div{max-height:100%;overflow-y:auto}.choices button{min-width:145px}.overlay .small{max-width:95%}.cinematic span{display:none}#settings{flex-wrap:wrap;justify-content:center}.touch-device #context{bottom:170px}}
@media (pointer:coarse) and (orientation:portrait){.hud{grid-template-columns:1fr .55fr 1fr}.hud #zone{font-size:9px}.touch-device #context{bottom:185px}.overlay h1{font-size:40px}.overlay p{font-size:14px}.choices{flex-direction:column}.choices button{min-width:230px;min-height:64px}.choices canvas{width:42px;height:55px}.choices b{font-size:13px}.choices b small{font-size:10px}#start{min-height:44px}.cinematic #dialogue{font-size:21px}.cinematic #caption{font-size:14px}}
@media(prefers-reduced-motion:reduce){.touch-controls button,#joystick{transition:none}}

.rotate-notice{display:none}
@media(pointer:coarse) and (max-width:1400px){.cabinet{width:min(100%,calc((100svh - 58px) * 16 / 9));margin:0 auto}.screen{height:auto;min-height:0;aspect-ratio:16/9}#game{object-fit:contain}}
.touch-portrait .cabinet{display:none}.touch-portrait .rotate-notice{display:flex;min-height:65svh;padding:24px;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px}.rotate-notice strong{font:bold 26px monospace;color:#ffda89}.rotate-notice p{font-size:18px;line-height:1.5;max-width:330px}.rotate-notice span{font-size:14px;color:#a8cddd}

.touch-landscape .rotate-notice{display:none}.touch-landscape .cabinet{display:block}.rotate-notice button{min-height:44px;padding:12px 22px;border:1px solid #69dfee;border-radius:6px;background:#254457;font-size:14px}.rotate-notice small{max-width:310px;line-height:1.5;color:#acbacf}.touch-landscape .choices{flex-direction:row}.touch-landscape .choices button{min-width:145px;min-height:0}.touch-landscape .choices canvas{width:30px;height:40px}.touch-landscape .choices b{font-size:11px}.touch-landscape .overlay h1{font-size:clamp(25px,4vw,48px)}

.cabinet{position:relative}.play-toolbar{display:none}#displayStatus{position:absolute;left:50%;top:25%;transform:translateX(-50%);z-index:12;max-width:85%;background:#101320ee;border-radius:6px;padding:10px 16px;text-align:center;font:14px/1.4 system-ui;pointer-events:none}#displayStatus:empty{display:none}.expanded-play{overflow:hidden}.expanded-play .cabinet{position:fixed;inset:0;width:100%;height:100dvh;max-width:none;margin:0;border:0;border-radius:0;background:#070c18;display:flex;align-items:center;justify-content:center;overflow:hidden}.expanded-play .screen{width:min(100vw,calc(100dvh * 16 / 9));height:auto;aspect-ratio:16/9;flex-shrink:0;min-height:0}.expanded-play footer{display:none}.expanded-play .play-toolbar{display:flex;position:absolute;z-index:10;bottom:max(7px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);gap:6px}.play-toolbar button{font:800 11px monospace;min-height:36px;padding:7px 10px;border:1px solid #7585a3;border-radius:5px;background:#142039d9;color:#fff0d5}.expanded-play #context{bottom:48px}.expanded-play.touch-portrait .cabinet{display:none}.expanded-play.touch-portrait .rotate-notice{display:flex}#installGuide{z-index:20}#installGuide p{font-size:16px}
@media(pointer:coarse){header .brand{font-size:11px}header>div{gap:3px}header button{padding:6px;font-size:9px}.expanded-play #joystick{left:max(14px,env(safe-area-inset-left))}.expanded-play .touch-actions{right:max(14px,env(safe-area-inset-right))}}
@media(max-height:430px){.expanded-play .overlay{justify-content:flex-start;padding:8px 12px 48px}.expanded-play .overlay h1{font-size:29px;margin:4px}.expanded-play .choices{margin:3px;gap:8px}.expanded-play .choices canvas{width:26px;height:34px}.expanded-play .choices button{min-height:0}.expanded-play .overlay p{margin:4px;font-size:12px}.expanded-play #settings{margin:3px;font-size:12px}.expanded-play .cinematic>div{padding-bottom:49px}}

/* Keep utility controls clear of the two-thumb play area. */
.expanded-play .cabinet{inset:auto;top:var(--visible-top,0px);left:var(--visible-left,0px);width:var(--visible-width,100vw);height:var(--visible-height,100dvh);padding-top:48px;padding-bottom:max(8px,env(safe-area-inset-bottom))}.expanded-play .screen{width:min(var(--visible-width,100vw),calc((var(--visible-height,100dvh) - 56px) * 16 / 9))}.expanded-play .play-toolbar{top:max(5px,env(safe-area-inset-top));bottom:auto;white-space:nowrap}.play-toolbar button{flex-shrink:0;white-space:nowrap}.expanded-play .touch-actions{bottom:max(24px,calc(env(safe-area-inset-bottom) + 12px))}.expanded-play #joystick{bottom:max(32px,calc(env(safe-area-inset-bottom) + 18px))}.expanded-play .touch-hint{bottom:max(6px,env(safe-area-inset-bottom))}.expanded-play #displayStatus{top:52px;font-size:12px;padding:6px 10px;max-width:88%}.expanded-play #context{display:none}
#boardOpen,#bonusOptions button{background:#253852;border:1px solid #69dfee;border-radius:5px;padding:9px 16px;margin:4px;font-size:13px}#bonusOptions{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}#bonusOptions button:first-child{background:#2a553f;color:#f6e7a7}.board-filters{display:flex;gap:14px;flex-wrap:wrap}.board-filters label{display:flex;flex-direction:column;gap:5px;font-size:14px}#leaderboard{max-width:780px}#boardForm{display:flex;gap:10px;flex-wrap:wrap;align-items:flex-end;margin:18px 0}#boardForm label{display:flex;flex-direction:column;gap:5px}#boardName{font:16px system-ui;padding:10px;background:#091426;border:1px solid #7894bc;border-radius:5px;color:#fff}#boardForm small{width:100%;font-size:12px;color:#adbed6}#boardFormula{color:#adbed6;font-size:13px}#myRank{color:#ffe19b;font-weight:bold}.board-table{overflow-x:auto}.board-table table{font:14px monospace}.board-table th,.board-table td{padding:10px;text-align:left;white-space:nowrap}.board-table th{color:#ffe19b}#boardStatus{min-height:20px}#boardRefresh{margin-top:14px}.overlay #boardOpen{min-height:36px}.overlay[data-mode=ending]{overflow-y:auto}

/* Four separate targets, inset from browser gestures and safe areas. */
body.touch-device #context{display:none!important}
.touch-controls .touch-actions,.expanded-play .touch-actions{width:200px;height:216px;right:max(22px,env(safe-area-inset-right));bottom:max(44px,calc(env(safe-area-inset-bottom) + 24px))}
.touch-actions button{width:64px!important;height:64px!important;inset:auto!important;opacity:.3;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.touch-actions #touchJump{left:68px!important;top:0!important}
.touch-actions #touchHit{left:0!important;top:76px!important}
.touch-actions #touchKick{left:136px!important;top:76px!important}
.touch-actions #touchGrab{left:68px!important;top:152px!important}
.touch-actions button.pressed{opacity:1;transform:scale(.92);background:#ffe49c55}
.touch-controls #joystick,.expanded-play #joystick{bottom:max(64px,calc(env(safe-area-inset-bottom) + 38px));touch-action:none}
.touch-hint{display:none}.choices{flex-wrap:wrap}.choices button:disabled{opacity:.48;cursor:default}
@media(max-height:390px) and (orientation:landscape){.touch-controls .touch-actions,.expanded-play .touch-actions{transform:scale(.82);transform-origin:bottom right;bottom:max(28px,calc(env(safe-area-inset-bottom) + 16px))}.touch-controls #joystick,.expanded-play #joystick{width:116px;height:116px;bottom:max(44px,calc(env(safe-area-inset-bottom) + 26px))}.choices canvas{height:52px;width:40px}.choices b{font-size:12px}.choices small{font-size:8px}}

@media(max-height:330px) and (orientation:landscape){.touch-controls .touch-actions,.expanded-play .touch-actions{transform:scale(.7);bottom:22px}.touch-controls #joystick,.expanded-play #joystick{width:100px;height:100px;bottom:36px}}
.overlay[data-mode=ending]::after{content:'© Lantern Sisters, 2026';display:block;margin-top:16px;color:#ffe7a1;font:bold 16px monospace;text-shadow:1px 2px #080e24}

.game-guide{max-width:880px;margin:48px auto 24px;padding:28px;border-top:2px solid #65e2ef;color:#e8edf7;font-size:16px;line-height:1.7}.game-guide h2{font:800 24px/1.3 monospace;color:#ffdf92;margin:32px 0 12px}.game-guide>h2:first-child{margin-top:0}.game-guide p{margin:12px 0}.game-guide nav{display:flex;flex-wrap:wrap;gap:12px 24px;margin:24px 0}.game-guide a{color:#83ebf1;text-underline-offset:4px}.game-guide section{scroll-margin-top:20px}.game-guide details{border-bottom:1px solid #46516b;padding:14px 0}.game-guide summary{cursor:pointer;font-weight:700;min-height:28px}.game-guide summary:focus-visible{outline:2px solid #83ebf1;outline-offset:4px}.game-guide .guide-credit{margin-top:32px;color:#ffdf92;font-size:14px}.expanded-play .game-guide{display:none}@media(max-width:600px){.game-guide{padding:20px 4px;margin-top:32px}.game-guide h2{font-size:21px}}
