:root{font-family:ui-rounded,"Arial Rounded MT Bold","PingFang TC","Noto Sans TC",system-ui,sans-serif;color:#293735;background:#fff7e6;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 5% 3%,#fbd3a3 0,transparent 30%),radial-gradient(circle at 98% 90%,#f5d6df 0,transparent 30%),#fff7e6}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #317a70;outline-offset:4px}[hidden]{display:none!important}.shell{max-width:1120px;margin:auto;padding:25px 30px 18px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.brand{color:inherit;text-decoration:none;display:flex;align-items:center;gap:10px;font-weight:900;letter-spacing:.06em;font-size:15px}.brand small{display:block;font-size:9px;letter-spacing:.17em;margin-top:3px;font-weight:600;color:#6f7770}.brand-icon{display:grid;place-items:center;width:41px;height:41px;background:#ff794f;border-radius:13px;color:#fff7e6;font-size:29px;transform:rotate(-8deg)}.round-button{border:1.5px solid #bdc0aa;background:transparent;border-radius:50%;width:36px;height:36px;font-weight:800;font-size:18px;color:#39453f}.game-card{border:1.5px solid #d4cbb7;border-radius:25px;background:#fffdf4;overflow:hidden;box-shadow:0 14px 0 -5px #eadfc9}.topline{height:100px;padding:18px 30px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e2dac8}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.19em;margin:0 0 4px;color:#71806a}h1{font-size:33px;margin:0;letter-spacing:-.04em;line-height:1.12}h1 span{color:#ed734b}.scoreboard{display:flex;gap:26px;align-items:center}.scoreboard>div>span{font-size:11px;margin-right:10px;font-weight:700;color:#7c806c}.scoreboard strong{font-size:30px;line-height:1;font-variant-numeric:tabular-nums}.scoreboard small{font-size:12px;color:#7c806c;margin-left:5px}.scoreboard .best{border-left:1px solid #e2dac8;padding-left:24px}.best strong{font-size:18px}.stage{height:min(66vh,610px);min-height:420px;position:relative;background:#e8f1da;isolation:isolate;overflow:hidden}canvas{display:block;width:100%;height:100%;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:crosshair}.decoration{pointer-events:none}.live{position:absolute;left:20px;right:20px;top:15px;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;font-weight:700;color:#607052}.live button{pointer-events:auto;border:1px solid #a5b395;border-radius:20px;background:#ffffffb8;padding:7px 12px;color:#42543a;font-size:11px}.toast{position:absolute;bottom:20px;left:50%;transform:translateX(-50%);padding:8px 17px;background:#fffdf3e8;border:1px solid #d0d7bd;border-radius:30px;white-space:nowrap;font-size:12px;font-weight:700;color:#61704f;transition:transform .15s}.toast.pop{transform:translateX(-50%) scale(1.05)}.overlay{position:absolute;inset:0;display:grid;place-items:center;padding:22px;background:#e4eed6b8;backdrop-filter:blur(4px)}.ready{background:linear-gradient(90deg,#f3f5eae6 0,#f3f5eadb 44%,transparent 85%);backdrop-filter:none;justify-items:start;padding-left:7%}.intro{max-width:380px}.ticket{display:inline-block;background:#fbe7a0;border:1px solid #dac375;border-radius:5px;padding:6px 10px;font-size:11px;font-weight:800;letter-spacing:.06em;transform:rotate(-2deg)}h2{font-size:35px;line-height:1.25;letter-spacing:-.04em;margin:18px 0 13px}.intro p,.panel p{font-size:14px;line-height:1.9;color:#667158}.intro b{font-size:13px}.primary{border:0;border-bottom:4px solid #ba5035;color:#fffdf3;background:#ef784f;padding:14px 23px;border-radius:13px;font-weight:850;font-size:15px;display:flex;align-items:center;justify-content:space-between;gap:32px;width:100%;margin-top:22px;box-shadow:0 4px 12px #aa533119}.primary:hover{background:#f4835a;transform:translateY(-1px)}.primary:active{transform:translateY(2px);border-bottom-width:2px}.primary span{font-size:21px}.intro>small{display:block;text-align:center;font-size:11px;color:#6d765e;margin-top:14px}.panel{background:#fffdf2;border:1px solid #d4ceb8;border-radius:24px;max-width:450px;width:100%;padding:26px 30px;box-shadow:0 18px 40px #536a3b20;text-align:center}.panel h2{font-size:29px}.result-count{display:flex;justify-content:center;align-items:baseline;gap:10px}.result-count strong{font-size:80px;line-height:1.2;color:#ef784f;letter-spacing:-.08em}.result-count>span{font-size:17px;color:#7e816a}.panel #resultComment{font-size:12px;margin:7px 0 20px}.result-stats{display:grid;grid-template-columns:1fr 1fr 1fr;border-top:1px solid #e5e1d1;border-bottom:1px solid #e5e1d1;padding:16px 0;gap:5px}.result-stats>div>span{display:block;font-size:11px;color:#838872}.result-stats b{font-size:18px;display:block;margin-top:4px}.result-stats small{font-size:10px;font-weight:500}.score-note{display:block;font-size:10px;line-height:1.5;margin-top:12px;color:#969982}.bottomline{padding:15px 27px;display:flex;justify-content:space-between;align-items:center;gap:12px}.control b,.control small{display:block;font-size:11px}.control small{font-size:10px;margin-top:3px;color:#939680}.control.right{text-align:right}.progress{display:flex;gap:5px}.progress i{width:9px;height:20px;background:#e6e6d6;border:1px solid #d2d6c3;border-radius:4px;transform:rotate(9deg)}.progress i.caught{background:#80a880;border-color:#668c66}.progress i.missed{background:#f0b7a2;border-color:#d9977e}.progress i.active{background:#f5d675;border-color:#ccac4d}.shell footer{display:flex;justify-content:space-between;gap:12px;padding-top:21px;font-size:10px;color:#9a947f}.shell footer p{margin:0}.shell footer span{letter-spacing:.1em;font-size:9px}dialog{border:1px solid #d5ceb9;border-radius:22px;background:#fffdf1;color:#344339;padding:30px;max-width:460px;width:calc(100% - 36px)}dialog::backdrop{background:#2a362b66;backdrop-filter:blur(5px)}dialog h2{font-size:26px}dialog ol{padding-left:23px;font-size:14px;line-height:1.8}dialog li{margin-bottom:8px}.close{float:right}.help-note{font-size:12px;line-height:1.7;color:#7c856e}@media(max-width:650px){.shell{padding:14px 12px 14px}header{margin-bottom:13px}.brand{font-size:12px}.brand small{font-size:8px}.brand-icon{width:34px;height:34px;font-size:24px}.game-card{border-radius:19px}.topline{height:82px;padding:14px 17px}h1{font-size:29px}.eyebrow{font-size:9px}.scoreboard{gap:10px}.scoreboard>div>span{display:block;font-size:11px;margin:0 0 5px}.scoreboard strong{font-size:24px}.scoreboard small{font-size:11px}.scoreboard .best{padding-left:13px}.best strong{font-size:15px}.stage{height:min(65svh,600px);min-height:390px}.live{top:11px;left:12px;right:12px;font-size:11px}.live button{font-size:11px;padding:6px 9px}.toast{bottom:14px;max-width:95%;white-space:normal;text-align:center;width:max-content;padding:7px 12px;font-size:11px}.ready{justify-items:center;padding:18px;background:#edf1e3c9;backdrop-filter:blur(2px)}.intro{max-width:305px;width:100%;text-align:center}.intro h2{font-size:33px}.intro p{font-size:13px}.intro b{font-size:12px}.ticket{font-size:11px}.intro>small{font-size:11px}.primary{padding:13px 19px;font-size:15px}.bottomline{padding:13px 13px;gap:8px}.control b{font-size:11px}.control small{font-size:11px;max-width:90px;line-height:1.5}.control.right{display:none}.progress{gap:4px}.progress i{width:8px;height:20px}.panel{padding:22px 19px;border-radius:19px}.panel h2{font-size:25px}.result-count strong{font-size:67px}.result-stats b{font-size:16px}.result-stats small{font-size:11px}.result-stats>div>span{font-size:11px}.score-note{font-size:11px}.panel #resultComment{font-size:12px}.shell footer{font-size:11px;line-height:1.6;padding-top:18px}.shell footer span{display:none}}@media(max-height:650px) and (min-width:651px){.shell{padding-top:12px}.stage{height:460px}.topline{height:80px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}.primary:hover{transform:none}}

.balance{position:absolute;left:50%;bottom:58px;transform:translateX(-50%);display:flex;align-items:center;gap:10px;font-size:11px;color:#6c7c59;font-weight:700;white-space:nowrap;background:#fffdf3cf;padding:7px 12px;border-radius:20px}.balance i{display:block;width:64px;height:6px;background:#dfe5d0;border-radius:4px;overflow:hidden}.balance b{display:block;height:100%;background:#85a975;width:0}.balance[data-warning="yes"]{color:#bb5c31;background:#fff1ccee}.balance[data-warning="yes"] b{background:#ec8151}.fall-count{font-size:12px;color:#8a8c74;display:block;margin:-10px 0 14px}@media(max-width:650px){.balance{font-size:11px;bottom:57px;gap:7px;padding:6px 10px}.balance i{width:45px}.fall-count{font-size:12px}}
/* One viewport, not a cropped tall page. The stage receives all remaining space. */
html,body{height:100%;overflow:hidden}.shell{height:100vh;height:100dvh;max-width:1240px;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:grid;grid-template-rows:44px minmax(0,1fr);gap:9px}header{margin:0}.shell footer{display:none}.game-card{min-height:0;display:grid;grid-template-rows:76px minmax(0,1fr) 48px;box-shadow:none}.topline{height:auto;padding:10px 22px}.stage{height:auto;min-height:0}.bottomline{padding:8px 18px}.round-button{width:44px;height:44px}.live button{min-height:40px;font-size:12px}.ready .intro p{margin:10px 0}.intro h2{font-size:30px;margin:12px 0}.intro .primary{margin-top:16px}.overlay{padding:12px}.panel{padding:18px 22px}.result-panel{max-width:490px}.result-panel h2{font-size:24px;margin:9px 0 2px}.result-panel .ticket{font-size:11px;padding:4px 8px}.result-count strong{font-size:56px}.result-panel #resultComment{font-size:13px;line-height:1.5;margin:4px 0}.result-panel .fall-count{margin:3px 0 8px;font-size:12px}.result-stats{padding:8px 0}.result-stats>div>span{font-size:12px}.result-stats b{font-size:17px;margin-top:3px}.share-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:10px}.share-actions button,.share-actions a{display:flex;align-items:center;justify-content:center;min-height:42px;padding:7px 8px;font:inherit;font-size:13px;font-weight:700;color:#3b584c;background:#edf1df;border:1px solid #c6d1b6;border-radius:9px;text-decoration:none;text-align:center}.share-actions #shareBtn{background:#355b4a;color:#fffdf0}.share-actions button:disabled{opacity:.55;cursor:wait}.share-actions #shareBtn:not(:has(+button:not([hidden]))){grid-column:1/-1}.private-note{display:block;font-size:11px;line-height:1.4;color:#737a62;margin-top:6px}.result-panel .primary{margin-top:10px;min-height:44px;padding:9px 16px}.score-note{margin-top:6px;font-size:11px}#shareStatus{font-size:12px;line-height:1.4;margin:4px 0;min-height:0}#shareStatus:empty{display:none}#copyText{width:100%;height:150px;font:14px sans-serif;resize:vertical}dialog{max-height:calc(100dvh - 24px);overflow:auto}dialog ol{font-size:15px}.balance{bottom:53px}.toast{bottom:12px}
@media(max-width:650px){.shell{grid-template-rows:40px minmax(0,1fr);gap:6px}.brand-icon{width:32px;height:32px}.brand small{display:none}.game-card{grid-template-rows:66px minmax(0,1fr) 43px;border-radius:16px}.topline{padding:8px 13px}h1{font-size:27px}.bottomline{padding:7px 12px}.control small{display:none}.result-panel{padding:12px 14px}.result-panel h2{font-size:22px}.result-count strong{font-size:49px}.result-stats{padding:6px 0}.result-panel .primary{margin-top:7px}.share-actions{margin-top:7px}.score-note{display:none}.intro>small{font-size:12px}.intro h2{font-size:28px}.panel p{line-height:1.5}.balance{font-size:11px}.result-stats small{font-size:11px}}
@media(max-height:540px) and (min-width:550px){.shell{grid-template-rows:32px minmax(0,1fr);gap:5px;padding-top:max(5px,env(safe-area-inset-top));padding-bottom:max(5px,env(safe-area-inset-bottom))}.brand-icon{width:28px;height:28px;font-size:20px}.brand small{display:none}.round-button{width:32px;height:32px}.game-card{grid-template-rows:48px minmax(0,1fr) 32px}.topline{padding:4px 16px}.eyebrow{display:none}h1{font-size:25px}.scoreboard strong{font-size:25px}.scoreboard>div>span{display:inline;margin-right:6px}.bottomline{padding:3px 14px}.control small{display:none}.progress i{height:16px}.result-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:18px;align-items:center;max-width:760px;padding:10px 16px}.result-panel h2{font-size:22px}.result-count strong{font-size:51px}.result-panel .ticket{font-size:10px}.result-stats{padding:5px 0}.result-stats>div>span{font-size:11px}.share-actions{margin-top:6px;gap:5px}.share-actions button,.share-actions a{min-height:36px;font-size:12px}.private-note{font-size:10px}.result-panel .primary{margin-top:6px;min-height:37px;padding:6px 12px}.score-note{display:none}.result-panel #resultComment{font-size:12px}.intro{max-width:480px}.intro h2{font-size:25px;margin:7px 0}.intro h2 br{display:none}.intro .ticket{display:none}.intro p{font-size:13px}.intro .primary{margin-top:9px;padding:8px 18px}.intro>small{margin-top:7px}.overlay{padding:7px}.toast{font-size:11px;padding:4px 9px;bottom:8px}.balance{bottom:39px;padding:4px 8px}.live{top:7px}.live button{min-height:34px}}

/* End card uses the viewport so short phones retain readable share controls. */
.result{position:fixed;inset:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));z-index:20;border-radius:18px;background:#e4eed6ed}
/* Pausing and unsupported-GPU recovery must not be clipped by a short stage. */
#paused,#unsupported{position:fixed;inset:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));z-index:21;border-radius:18px}
@media(max-height:540px) and (min-width:550px){#paused .ticket{display:none}#paused .panel,#unsupported .panel{padding:14px 20px}#paused h2,#unsupported h2{font-size:22px;margin:8px 0;line-height:1.25}#paused p,#unsupported p{font-size:13px;line-height:1.4;margin:8px 0}#paused .primary,#unsupported .primary{min-height:44px;margin-top:10px;padding:8px 16px}}
/* v7: spend the viewport on the machine, not stacked title/footer bands. */
.shell{max-width:none;padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));display:block;position:relative}.shell header{position:absolute;top:max(20px,env(safe-area-inset-top));right:max(20px,env(safe-area-inset-right));width:44px;height:44px;z-index:8}.brand{display:none}.round-button{background:#fffdf2e8;width:44px;height:44px}.game-card{height:100%;display:block;position:relative;border-radius:20px}.stage{height:100%;min-height:0;width:100%}.topline{position:absolute;top:22px;left:22px;right:80px;z-index:4;height:auto;min-height:0;border:0;padding:0;align-items:flex-start;pointer-events:none}.topline h1{font-size:32px}.topline .eyebrow{font-size:9px}.scoreboard{gap:10px;background:#fffdf2e8;border:1px solid #d6ddc6;border-radius:14px;padding:10px 13px}.scoreboard strong{font-size:26px}.scoreboard>div>span{font-size:12px;display:inline;margin:0 7px 0 0}.scoreboard .best{padding-left:12px}.best strong{font-size:18px}.bottomline{position:absolute;left:22px;bottom:22px;z-index:3;padding:0;max-width:250px;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:12px;pointer-events:none}.control.right{display:none}.control b{font-size:13px}.control small{font-size:12px}.progress{gap:6px}.progress i{width:9px;height:20px}.live{top:99px;left:22px;right:22px;align-items:flex-start;font-size:13px}.live #roundText{max-width:250px;line-height:1.6}.live button{margin-top:-22px;min-height:42px;font-size:13px}.toast{bottom:104px;left:22px;max-width:245px;white-space:normal;text-align:left;transform:none;font-size:13px;padding:9px 12px;line-height:1.5}.toast.pop{transform:scale(1.02)}.balance{left:auto;right:22px;bottom:24px;transform:none;max-width:240px;white-space:normal;font-size:12px;line-height:1.5;gap:8px}.balance i{flex-shrink:0}.ready{justify-items:start;padding-left:5%;background:linear-gradient(90deg,#f3f5eaf2, #f3f5ead9 36%,transparent 70%)}.intro{max-width:330px}.intro h2{font-size:35px}.intro .primary{min-height:48px}
/* Portrait keeps only a compact score row; the machine uses all remaining space. */
@media(max-width:650px) and (orientation:portrait){.shell header{top:max(17px,env(safe-area-inset-top));right:max(17px,env(safe-area-inset-right))}.game-card{display:grid;grid-template-rows:62px minmax(0,1fr) 42px;border-radius:16px}.topline{position:static;padding:9px 58px 7px 12px;align-items:center;background:#fffdf2;border-bottom:1px solid #d8dfca}.topline h1{font-size:25px}.topline .eyebrow{display:none}.scoreboard{padding:0;border:0;background:none}.scoreboard .best{display:none}.scoreboard strong{font-size:25px}.scoreboard>div>span{display:none}.scoreboard small{font-size:12px}.stage{height:100%;min-height:0}.bottomline{position:static;max-width:none;padding:8px 12px;flex-wrap:nowrap;justify-content:space-between;gap:8px;background:#fffdf2}.control small{display:none}.control b{font-size:12px}.progress{gap:4px}.progress i{width:8px;height:18px}.live{top:8px;left:10px;right:10px;font-size:11px}.live #roundText{max-width:220px}.live button{margin:0;min-height:36px;font-size:12px;padding:5px 8px}.toast{left:50%;bottom:9px;transform:translateX(-50%);max-width:92%;text-align:center;font-size:11px;padding:5px 9px;white-space:nowrap}.toast.pop{transform:translateX(-50%) scale(1.02)}.balance{left:50%;right:auto;bottom:46px;transform:translateX(-50%);max-width:95%;white-space:nowrap;font-size:11px;padding:5px 8px}.ready{justify-items:center;padding:16px;background:#edf1e3d9}.intro{text-align:center;max-width:305px}.intro h2{font-size:29px}}
/* Side HUDs stay out of the central full-height machine on short landscape screens. */
@media(max-height:540px) and (orientation:landscape){.topline{top:12px;left:14px;right:66px}.topline h1{font-size:25px}.topline .eyebrow{display:none}.shell header{top:16px;right:16px}.scoreboard{padding:7px 10px}.scoreboard .best{display:none}.scoreboard strong{font-size:25px}.scoreboard>div>span{display:none}.live{top:68px;left:14px;right:14px;font-size:11px}.live #roundText{max-width:150px}.live button{margin:0;min-height:38px;font-size:12px;padding:6px 10px}.bottomline{left:14px;bottom:15px;max-width:150px;gap:7px}.control b{font-size:11px}.control small{display:none}.progress{gap:4px}.progress i{width:8px;height:16px}.toast{left:14px;bottom:85px;max-width:150px;font-size:11px;padding:6px 8px}.balance{right:14px;bottom:15px;max-width:150px;font-size:11px;display:block;padding:7px 9px}.balance i{margin-top:4px;width:100%}.ready{justify-items:start;padding-left:3%;background:linear-gradient(90deg,#f3f5eaf5,#f3f5eae0 40%,transparent 85%)}.intro{max-width:255px}.intro h2{font-size:25px}}
/* Keep viewport modals above all HUD siblings, not trapped inside the stage. */
.shell{isolation:isolate}.stage{isolation:auto}

/* One primary image action on phones; fallback is a separate native image dialog. */
.share-actions #shareBtn{grid-column:1/-1}#imageFallback{max-width:760px}#sharePreview{display:block;width:100%;height:auto;max-height:65dvh;object-fit:contain;touch-action:auto;-webkit-user-select:auto;-webkit-touch-callout:default}#imageFallback h2{font-size:22px;margin:8px 0}#imageFallback .primary{margin-top:12px}

/* Platform navigation only: keep the prototype camera, game surface and touch rules. */
.shell header{width:auto;display:flex;align-items:center;gap:8px}.platform-home{display:flex;align-items:center;justify-content:center;flex:none;text-decoration:none;font-size:24px;color:#355b4a}.topline{right:132px}.platform-return{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:4px 8px;color:#355b4a;font-weight:700;text-decoration:underline}.platform-home:focus-visible,.platform-return:focus-visible{outline:3px solid #e66e44;outline-offset:3px}
@media(max-width:650px) and (orientation:portrait){.topline{padding-right:110px}}
@media(max-height:540px) and (orientation:landscape){.topline{right:118px}}
