@font-face{font-family:Zen;src:url('./assets/ZenKakuGothicNew-Bold.ttf') format('truetype');font-weight:700;font-display:swap}
*{box-sizing:border-box} :root{font-family:Zen,'Hiragino Kaku Gothic ProN',sans-serif;color:#253d36;background:#f5f1e8;font-weight:700;font-synthesis:none}html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit;color:inherit}button{cursor:pointer;border:0;touch-action:manipulation}button:disabled{opacity:.42;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #ce663a;outline-offset:2px}button:hover:not(:disabled){filter:brightness(.96)}button:active:not(:disabled){transform:translateY(1px)}[hidden]{display:none!important}.symbol-defs{width:0;height:0;position:absolute}button svg,.brand svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.app{height:100vh;height:100dvh;width:100%;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.topbar{flex:0 0 52px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 12px;border-bottom:1px solid #d6decd}.brand{display:flex;align-items:center;gap:8px;font-size:17px;margin:0;white-space:nowrap;line-height:1.1}.brand-mark{display:grid;place-items:center;width:29px;height:29px;background:#df744c;border-radius:9px;color:#fff9e9}.brand svg{width:20px;height:20px}.header-actions{display:flex;gap:2px}.icon-button{display:grid;place-items:center;min-width:44px;height:44px;background:transparent;font-size:18px;border-radius:10px}.icon-button[aria-pressed=true]{background:#e0e7d8;color:#294c3f}.game-shell{flex:1;min-height:0;display:flex;flex-direction:column}.stage{position:relative;flex:1;min-height:0;overflow:hidden;background:#dfe9d5;isolation:isolate}#world{width:100%;height:100%;display:block;touch-action:none}.stage-top{position:absolute;left:12px;right:12px;top:8px;display:flex;align-items:center;justify-content:space-between;gap:8px;pointer-events:none;z-index:2}.stage-label{pointer-events:auto;display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 10px;background:#fffdf0e8;border-radius:8px;font-size:11px}#stage-number{color:#9a5738;font-size:10px;white-space:nowrap}#stage-name{max-width:38vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.round-status{display:flex;align-items:center;gap:3px;background:#fffdf0e8;border-radius:8px}.round-status span{padding:0 8px;font-variant-numeric:tabular-nums;font-size:12px;white-space:nowrap}.round-status button{pointer-events:auto;width:44px;height:44px;background:transparent;font-size:16px}.frame-mark{position:absolute;width:18px;height:18px;border:solid #fffdf0b3;pointer-events:none}.tl{top:61px;left:13px;border-width:2px 0 0 2px}.tr{top:61px;right:13px;border-width:2px 2px 0 0}.bl{bottom:13px;left:13px;border-width:0 0 2px 2px}.br{bottom:13px;right:13px;border-width:0 2px 2px 0}.targets{position:absolute;inset:0;pointer-events:none}.face-target{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;display:grid;place-items:center;pointer-events:auto;border-radius:50%;background:transparent;touch-action:manipulation}.face-target span{display:grid;place-items:center;background:#fffaf0ed;color:#52604f;width:25px;height:25px;border-radius:50%;font-size:11px;box-shadow:0 2px 8px #2f4c3220;border:2px solid #fff7e8;transition:background .15s,scale .15s}.face-target.ready span{background:#355f4a;color:#fff;scale:1.08}.face-target:hover{transform:translate(-50%,-50%) scale(1.1)}.face-target:active{transform:translate(-50%,-50%) scale(.95)}.scene-message{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);background:#fffdf2ee;border-radius:8px;padding:7px 12px;font-size:12px;text-align:center;max-width:88%;width:max-content;pointer-events:none;opacity:0;transition:opacity .18s;z-index:3}.scene-message.visible{opacity:1}.perfect-cue{position:absolute;right:14px;top:66px;background:#2d6549;color:#fff8e6;border-radius:50%;width:45px;height:45px;display:grid;place-items:center;font-size:19px;box-shadow:0 0 0 5px #fff9e055;pointer-events:none}.loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#e5eadb;color:#486247;z-index:5;padding:20px;text-align:center}.loading-camera{width:45px}.loading-camera svg{width:100%;fill:none;stroke:currentColor;stroke-width:1.3}.loading p{font-size:13px;line-height:1.8}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border-radius:10px;padding:10px 17px;background:#294c3f;color:#fff9eb;font-size:13px}.secondary{background:#e5e9dc;color:#294c3f}.start-area{flex:none;padding:8px 12px 10px;background:#f5f1e8;border-top:1px solid #d3dcca}.start-area p{font-size:12px;line-height:1.4;margin:0 0 7px;text-align:center}.start-row{display:flex;align-items:center;justify-content:center;gap:12px}.start-button{min-width:135px}.mode-control{display:flex;border:1px solid #cad4bd;border-radius:9px;overflow:hidden}.mode-control button{min-height:44px;padding:8px 14px;background:transparent;color:#697265;font-size:12px}.mode-control button[aria-pressed=true]{background:#dce6d2;color:#294c3f}.play-area{flex:none;background:#f5f1e8;padding:4px 12px 8px;border-top:1px solid #d3dcca}.live-info{display:flex;align-items:center;justify-content:center;gap:16px;height:32px;font-size:11px;color:#64715b}.live-info strong{color:#2e5242;font-size:15px;margin-left:4px}.text-button{background:transparent;font-size:11px;min-height:32px;padding:0 5px;text-decoration:underline;text-underline-offset:3px}.control-row{display:flex;align-items:center;justify-content:center;gap:14px}.controls{display:flex;align-items:center;justify-content:center;gap:20px}.tool-button{background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;min-width:55px;min-height:56px;padding:3px}.tool-button svg{width:24px;height:24px;color:#556651}.jump-icon{height:24px;font-size:28px;line-height:24px}.shutter{background:#df744c;color:#fff8eb;border:4px solid #fffaf0;outline:1px solid #ddc9ae;border-radius:50%;width:68px;height:68px;box-shadow:0 2px 0 #b95531;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px;flex-shrink:0}.shutter svg{width:24px;height:24px}.shutter span{font-size:10px}.strip{display:flex;gap:4px;align-items:center}.strip:empty{display:none}.strip button{padding:3px;background:#fffcf2;border-radius:4px;border:1px solid #d8d6cb;min-height:44px}.strip img{display:block;width:45px;height:34px;object-fit:cover}.flash{position:absolute;inset:0;background:#fff;opacity:0;pointer-events:none;z-index:4}.flash.snap{animation:flash .32s ease-out}@keyframes flash{from{opacity:.65}to{opacity:0}}.pause-overlay{position:absolute;inset:0;background:#f5f1e8e8;display:flex;align-items:center;justify-content:center;flex-direction:column;z-index:6}.pause-overlay h2{font-size:24px}.eyebrow{font-size:11px;color:#637065}.small-note{font-size:10px;color:#68735d;line-height:1.5}.result-head{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:36px}.result-head h2{margin:0;font-size:20px}dialog{color:#253d36;background:#f9f6ed;border:1px solid #d7dbc9;border-radius:14px;padding:12px;width:calc(100% - 12px);max-width:760px;max-height:calc(100vh - 12px);max-height:calc(100dvh - 12px);overflow:auto;box-shadow:0 12px 80px #142d3040}dialog::backdrop{background:#173e32dc}.results-dialog[open]{height:calc(100vh - 12px);height:calc(100dvh - 12px);display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto auto auto;gap:5px;overflow:hidden}.results-dialog h2{font-size:24px;margin:0;text-align:center;line-height:1.4}.result-media{min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden}.result-media img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border:3px solid #fff}.result-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px}#result-stars{color:#b87329;letter-spacing:3px;font-size:23px}.result-thumbnails{display:flex;gap:6px}.result-thumbnails button{padding:3px;min-height:44px;background:#fff;border:2px solid transparent;border-radius:5px}.result-thumbnails button[aria-pressed=true]{border-color:#df744c}.result-thumbnails img{display:block;width:52px;height:35px;object-fit:cover}#result-description{font-size:12px;line-height:1.4;margin:0;text-align:center}.result-actions{display:flex;justify-content:center;gap:6px;flex-wrap:wrap}.result-actions button{padding:9px 13px}#save-status{font-size:11px;line-height:1.4;margin:0;text-align:center}#save-status:empty{display:none}.share-dialog[open]{max-width:520px;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto auto auto auto;gap:8px;height:min(650px,calc(100dvh - 12px));overflow:hidden}#share-preview{width:100%;height:100%;min-height:0;object-fit:contain}#share-status{font-size:12px;line-height:1.5;margin:0}#share-status:empty{display:none}#share-url{width:100%;min-width:0;padding:9px;border:1px solid #bbc6b0;border-radius:5px;font-size:12px}.stages-dialog{max-width:640px}.stage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.stage-choice{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:4px;min-height:63px;background:#e5ebdc;padding:7px;border-radius:8px;text-align:left}.stage-choice strong{font-size:18px;color:#38654c;grid-row:1/3}.stage-choice span{font-size:10px}.stage-choice small{font-size:10px;color:#9a612d}.stage-choice.current{outline:2px solid #cf744d}.stage-choice:disabled{background:#ebeae2;opacity:.6}.stages-dialog .small-note{margin:8px 0 0}.info-dialog{max-width:490px;padding:18px}.info-dialog h2{font-size:22px}.info-dialog p,.info-dialog li{font-size:13px;line-height:1.8}.info-dialog ol{padding-left:22px}.info-dialog li{margin:8px 0}.dialog-close{float:right}.info-dialog .primary{width:100%;margin-top:8px}#confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:4}#confetti i{position:absolute;top:-10px;width:7px;height:13px;animation:fall .95s ease-in both}@keyframes fall{to{transform:translate(var(--dx),75vh) rotate(450deg);opacity:0}}.noscript{position:fixed;inset:25%;background:#fff;padding:20px;z-index:10}
@media(max-width:600px){.topbar{padding:0 7px;flex-basis:48px}.brand{font-size:15px;gap:6px}.brand-mark{width:25px;height:25px}.header-actions{gap:0}.icon-button{min-width:40px}.controls{gap:12px}.control-row{gap:7px}.strip img{width:31px;height:31px}.strip button{padding:2px}.live-info{gap:9px;font-size:10px}.stage-top{left:8px;right:8px;top:5px}.stage-label{gap:6px;font-size:10px;padding:5px 8px}#stage-name{max-width:35vw}.round-status span{font-size:11px;padding:0 5px}.round-status button{width:38px}.play-area{padding:3px 6px 7px}.tool-button{min-width:47px}.shutter{width:64px;height:64px}.result-actions{gap:4px}.result-actions button{font-size:11px;padding:8px 10px}.results-dialog h2{font-size:21px}.scene-message{font-size:11px}.start-row{gap:10px}.mode-control button{padding:7px 11px}.stage-choice{min-height:58px}}
@media(max-width:380px){.brand-mark{display:none}.controls{gap:7px}.strip img{width:24px;height:30px}.strip{gap:2px}.tool-button{min-width:44px}.control-row{gap:4px}.stage-label{gap:4px}#stage-name{max-width:31vw}}
@media(orientation:landscape) and (max-height:540px){.topbar{flex-basis:44px}.game-shell{flex-direction:row}.stage{height:100%;min-width:0}.start-area,.play-area{width:190px;border-top:0;border-left:1px solid #d3dcca;display:flex;flex-direction:column;justify-content:center;padding:10px;gap:8px}.start-row{flex-direction:column}.start-area p{font-size:11px}.start-button{width:100%;min-width:0}.mode-control{width:100%}.mode-control button{flex:1;font-size:11px;padding:6px}.play-area{justify-content:space-between}.live-info{height:auto;flex-wrap:wrap;gap:3px}.control-row{flex-direction:column;gap:4px;flex:1;justify-content:center}.controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;width:100%;justify-items:center}.shutter{grid-column:2;grid-row:1/3;align-self:center}.strip img{width:40px;height:30px}.stage-top{left:6px;right:6px}.stage-label{font-size:9px}.round-status span{font-size:10px}.results-dialog[open]{max-width:100%;grid-template-columns:minmax(0,1.4fr) minmax(230px,1fr);grid-template-rows:auto auto auto auto 1fr auto;gap:5px 12px}.result-media{grid-column:1;grid-row:1/7}.results-dialog>.result-head,.results-dialog>h2,.results-dialog>.result-meta,.results-dialog>#result-description,.results-dialog>.result-actions,.results-dialog>#save-status{grid-column:2}.results-dialog h2{font-size:19px}.results-dialog .result-actions{align-content:end}.stage-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.stage-choice{min-height:55px}.stages-dialog .small-note{font-size:9px}.share-dialog[open]{grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto auto 1fr;max-width:750px}.share-dialog .result-head{grid-column:1/3}#share-preview{grid-column:1;grid-row:2/6}.share-dialog button,.share-dialog input,.share-dialog p{grid-column:2}.share-dialog .result-head button{grid-column:auto}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition:none!important}#confetti{display:none}}

@media(max-width:380px){.strip button:not(:last-child){display:none}}
@media(orientation:landscape) and (max-height:540px){.shutter{grid-column:auto;grid-row:auto}.controls{grid-template-columns:repeat(2,1fr)}.strip{flex:none}}
