:root{font-family:system-ui,-apple-system,"Noto Sans JP",sans-serif;color:#f4f6ef;background:#101b25;font-synthesis:none}*{box-sizing:border-box}html,body{margin:0;overflow:hidden;width:100%;height:100%;overscroll-behavior:none}button{font:inherit;cursor:pointer;border:0;touch-action:manipulation}button:focus-visible,#stage:focus-visible{outline:3px solid #ecff72;outline-offset:3px}[hidden]{display:none!important}#game{position:relative;width:100%;height:100dvh;min-height:440px;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,#25414a,#101b25)}#stage{position:absolute;inset:0;touch-action:none;outline:none}#stage canvas{width:100%;height:100%;display:block}header{position:absolute;top:max(20px,env(safe-area-inset-top));left:28px;right:28px;display:flex;justify-content:space-between;align-items:start;pointer-events:none}.brand{font-size:17px;font-weight:950;letter-spacing:2px}.brand span{background:#d8ff68;color:#142027;padding:3px 7px;border-radius:6px}.brand small{display:block;font-size:10px;letter-spacing:2px;margin-top:8px;color:#b2c3c5}#sound{pointer-events:auto;background:#20313e;color:#fff;border:1px solid #4b6167;border-radius:30px;padding:10px 15px;font-size:12px;font-weight:800}#hud{position:absolute;top:95px;left:28px;right:28px;display:flex;justify-content:space-between;pointer-events:none}.timer small,.score small{display:block;font-size:11px;letter-spacing:2px;color:#bad0cc}.timer strong{font-size:44px;line-height:1.2;font-variant-numeric:tabular-nums}.score{text-align:right}.score strong{font-size:44px;color:#d8ff68;font-variant-numeric:tabular-nums}.score span,.timer span{font-size:14px;margin-left:5px}#intro{position:absolute;left:7%;top:24%;width:340px;pointer-events:none;text-shadow:0 2px 20px #101b25}.eyebrow{color:#d8ff68;font-size:11px;letter-spacing:2px;font-weight:800}h1{font-size:clamp(42px,5.2vw,64px);white-space:nowrap;font-weight:950;line-height:1.12;letter-spacing:-3px;margin:16px 0}.lead{font-size:14px;line-height:1.9;color:#e0e9e4}#ready,#again{pointer-events:auto;width:100%;padding:17px 20px;background:#d8ff68;color:#132425;border-radius:13px;font-weight:950;box-shadow:0 5px 0 #819e37;font-size:16px}#ready span{float:right}.note{font-size:11px;color:#afc2c3;line-height:1.8}#controls{position:absolute;bottom:40px;left:50%;transform:translateX(-50%);width:min(560px,88%);pointer-events:none}.meter-label{display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:800;margin-bottom:12px}.meter-label b{font-size:11px;color:#d8ff68}.meter{height:13px;border-radius:9px;display:flex;position:relative;border:2px solid #172d34;box-shadow:0 0 0 1px #5a7476;flex-direction:row-reverse}.safe{width:82.142857%;background:#528789;border-radius:0 9px 9px 0}.sweet{width:7.142857%;background:#d8ff68}.danger{width:10.714286%;background:#ff7059;border-radius:9px 0 0 9px}#marker{position:absolute;top:-7px;left:100%;width:5px;height:24px;background:white;border-radius:3px;box-shadow:0 1px 8px #000;transform:translateX(-50%)}.meter-sub{display:flex;justify-content:space-between;font-size:10px;margin-top:9px;color:#b5c8c9}.meter-sub span:last-child{color:#ff9b82}.touch-zone{pointer-events:auto;touch-action:none;height:54px;border-radius:12px;border:1px dashed #69858a;margin-top:14px;display:grid;place-items:center;color:#c2d2d0;font-size:12px;background:#10232a66;user-select:none}#counts{text-align:center;font-size:10px;letter-spacing:2px;color:#a8bcbc;margin:9px 0}#toast{position:absolute;top:29%;left:50%;transform:translateX(-50%) rotate(-5deg);font-size:clamp(24px,4vw,52px);font-weight:1000;white-space:nowrap;color:#eaff7d;text-shadow:3px 4px #12272a;pointer-events:none;opacity:0}#toast.show{animation:pop .8s ease-out forwards}@keyframes pop{0%{opacity:1;scale:.6}15%{scale:1.12}35%{scale:1}75%{opacity:1}100%{opacity:0;translate:0 -20px}}#flash{position:absolute;inset:0;pointer-events:none;background:#eaff96;opacity:0}#burst{position:absolute;inset:0;pointer-events:none;overflow:hidden}.particle{position:absolute;width:6px;height:16px;border-radius:2px;animation:fly .7s ease-out forwards}@keyframes fly{from{opacity:1;transform:translate(0,0) rotate(0deg)}to{opacity:0;transform:translate(var(--dx),var(--dy)) rotate(360deg)}}#result{position:absolute;right:6%;top:26%;width:350px;padding:25px;background:#10222bea;border:1px solid #638080;border-radius:22px;box-shadow:0 20px 70px #0005}#result h2{font-size:27px;line-height:1.25;margin:12px 0;color:#e6ff96}#result p{font-size:13px}#final-score{font-size:46px;color:#fff;font-variant-numeric:tabular-nums}#result-detail{font-size:12px;color:#afc6c4;margin:14px 0 23px}#copy{width:100%;margin-top:13px;padding:10px;background:transparent;color:#c5d7d2;border:1px solid #58706f;border-radius:9px}#result small{display:block;font-size:9px;color:#90a8a8;line-height:1.7;margin-top:17px}footer{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:24px;right:24px;display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:9px;color:#88a0a5;pointer-events:none}footer button{background:none;color:#a8c0be;font-size:10px;pointer-events:auto}#render-note{font-size:8px}.critical{color:#ff8a69!important}body.reduced *{animation-duration:0s!important}
@media(max-width:650px){header{left:19px;right:19px;top:max(20px,env(safe-area-inset-top))}.brand{font-size:14px}#hud{top:87px;left:22px;right:22px}.timer strong,.score strong{font-size:35px}#intro{top:auto;bottom:7%;left:7%;width:86%;text-align:center;background:linear-gradient(transparent,#101b25d9 25%);padding-top:30px}h1{font-size:36px;line-height:1.05;letter-spacing:-2px;margin:8px 0}h1 br{display:block}.lead{font-size:12px;line-height:1.6;margin:12px 0}.eyebrow{font-size:10px}#ready{padding:15px}.note{font-size:10px;margin:10px 0 0}#controls{bottom:44px;width:88%}.touch-zone{height:66px}#toast{top:27%;font-size:27px}#result{top:auto;bottom:6%;right:5%;width:90%;padding:19px;text-align:center}#result h2{font-size:24px;margin:5px 0}#result p{margin:8px 0}#final-score{font-size:39px}#result-detail{margin:8px 0 14px}#again{padding:13px}#copy{margin-top:10px;padding:8px}#result small{margin-top:12px}footer{left:15px;right:15px}}
@media(max-height:550px) and (min-width:651px){#intro{top:22%;width:300px}h1{font-size:42px}.lead{font-size:12px}#hud{top:75px}.timer strong,.score strong{font-size:30px}#controls{width:420px;bottom:30px}.touch-zone{height:35px}#result{top:18%;padding:18px}#final-score{font-size:32px}}
/* Revised: play through motion and sound, without slogans or a danger gauge. */
#hud{top:85px;justify-content:flex-end}.score strong{font-size:30px}.score b{display:block;font-size:13px;color:#afc5bd;margin-top:3px;font-weight:500}#world-timer{position:absolute;transform:translate(-50%,-100%);font-size:clamp(40px,5vw,64px);font-weight:700;font-variant-numeric:tabular-nums;color:#e4ece7aa;text-shadow:0 2px 8px #14252b33;pointer-events:none}#world-timer .critical{color:#e4ece7aa!important}#intro{width:310px}#intro h1{font-size:48px;letter-spacing:-1px;margin-bottom:25px}#intro .note{text-align:center}#result-detail{margin:10px 0 14px}#achievement-result{font-size:12px;color:#eaff96;line-height:1.6;margin-bottom:12px}#toast,#controls{display:none!important}#result h2{font-size:25px}footer{font-size:8px}@media(max-width:650px){#hud{top:82px}.score strong{font-size:25px}#intro{width:86%}#intro h1{font-size:32px;line-height:1.15;margin:8px 0 18px}#intro h1 br{display:none}#world-timer{font-size:45px}}
#gesture-guide{position:absolute;left:50%;top:48%;width:210px;height:100px;transform:translate(-50%,-50%);pointer-events:none}.gesture-track{position:absolute;left:5px;right:5px;top:25px;height:3px;border-radius:4px;background:#e8ff9b66}.gesture-track:before,.gesture-track:after{content:"";position:absolute;top:-5px;width:10px;height:10px;border-top:2px solid #e8ff9b;border-left:2px solid #e8ff9b}.gesture-track:before{left:0;transform:rotate(-45deg)}.gesture-track:after{right:0;transform:rotate(135deg)}.gesture-finger{position:absolute;left:75px;top:7px;animation:gesture-swipe 1.6s ease-in-out infinite;filter:drop-shadow(0 2px 8px #0005)}@keyframes gesture-swipe{0%,100%{transform:translateX(65px) scale(.95)}50%{transform:translateX(-65px) scale(1)}}
body[data-tier="1"] #score,body[data-tier="1"] #final-score{color:#d8ff68;font-weight:950}
body[data-tier="2"] #score,body[data-tier="2"] #final-score,body[data-tier="2"] #title{color:#ffda5c;font-family:Impact,"Arial Black",system-ui,sans-serif;text-shadow:2px 2px #6d410d,-1px -1px #fff1b3;letter-spacing:.5px}
body[data-tier="3"] #score,body[data-tier="3"] #final-score,body[data-tier="3"] #title{color:#ff7cce;font-family:Impact,"Arial Black",system-ui,sans-serif;font-weight:1000;-webkit-text-stroke:.5px #fff3fc;text-shadow:3px 3px #682888,0 0 12px #ff4fb866}
body[data-tier="4"] #score,body[data-tier="4"] #final-score,body[data-tier="4"] #title{font-family:Impact,"Arial Black",system-ui,sans-serif;font-weight:1000;color:#ffef7d;-webkit-text-stroke:.7px #fff8df;text-shadow:3px 3px #d13c8d,5px 5px #602a8b,0 0 16px #ffb93688;letter-spacing:1px}body[data-tier="4"] .score{transform:rotate(-3deg)}body[data-tier="3"] #result,body[data-tier="4"] #result{border-color:#e9a0e6;box-shadow:0 0 30px #d34bb333,0 20px 70px #0005}
#intro h1{font-size:38px;letter-spacing:-1.5px}.share-buttons{display:flex;gap:8px;margin-top:12px}.share-buttons button{flex:1;min-width:0;padding:12px 6px;border-radius:8px;background:#233b45;color:#fff;font-size:12px;border:1px solid #637c81}.share-buttons button:disabled{opacity:.5}#share-status{font-size:10px!important;color:#b9cac8;line-height:1.5;min-height:0;margin:6px 0!important}@media(max-width:650px){#intro h1{font-size:30px;letter-spacing:-1px}.brand{font-size:14px;letter-spacing:0}}

header{justify-content:flex-end}
#hud,#world-timer{display:none!important}header{justify-content:space-between}#restart{pointer-events:auto;padding:9px 14px;border:1px solid #668086;border-radius:20px;background:#172d36a6;color:#dce6e4;font-size:12px}#result{right:4%;width:36%;max-width:470px;top:50%;transform:translateY(-50%);padding:24px}#result .result-score{display:flex;flex-direction:column;gap:2px;margin:15px 0}#final-score{font-size:clamp(60px,6.4vw,88px);line-height:1.05}#result .result-score span{font-size:14px}.share-buttons button{font-size:15px;padding:13px}@media(max-width:650px){#result{right:4%;width:92%;max-width:none;top:auto;bottom:max(12px,env(safe-area-inset-bottom));transform:none;max-height:43dvh;overflow:auto;padding:15px 18px}#result h2{font-size:20px;margin:0 0 4px}#final-score{font-size:58px}#result .result-score{margin:8px 0}#result-detail,#achievement-result{font-size:10px;margin:5px 0}#result small{font-size:8px;margin-top:6px}.share-buttons{margin-top:8px}.share-buttons button{padding:9px}#again{padding:10px}}
#intro{width:min(420px,40%)}#intro .note{font-size:18px;line-height:1.7;color:#e0e9e7;margin:16px 0}#intro h1{font-size:38px}#restart,#sound{font-size:15px}#license-button{font-size:14px;padding:8px 12px;background:#132a32b3;border:1px solid #71868b;border-radius:6px;color:#d9e6e4}#render-note{opacity:.65}#license-dialog{width:min(760px,92vw);max-height:85dvh;background:#172b34;color:#e8eeeb;border:1px solid #70898d;border-radius:14px;padding:22px}#license-dialog::backdrop{background:#000a}.license-top{display:flex;justify-content:space-between;align-items:center}.license-top h2{margin:0}.license-top button{padding:10px 15px;border-radius:8px;background:#d8ff68;color:#18272c}#license-dialog p{font-size:15px;line-height:1.7}#license-dialog pre{font:13px/1.7 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;color:#b7c9c8}#license-dialog h3{font-size:17px;margin-top:30px}@media(max-width:650px){#intro{width:86%}#intro .note{font-size:16px;margin:12px 0}#intro h1{font-size:28px}#license-dialog{padding:18px}}
@font-face{font-family:'Dela Game';src:url('./fonts/DelaGothicOne-game.woff') format('woff');font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:'Black Ops Game';src:url('./fonts/BlackOpsOne-game.woff') format('woff');font-weight:400;font-style:normal;font-display:swap}
:root,button{font-family:'Dela Game',system-ui,sans-serif;font-weight:400}#intro h1,#result h2{font-family:'Dela Game',system-ui,sans-serif;font-weight:400}#final-score{font-family:'Black Ops Game','Dela Game',sans-serif!important;font-weight:400}#intro .note{font-size:18px}#intro .note:last-child{font-size:16px}#intro h1{font-size:34px}#license-dialog p,#license-dialog pre{font-family:system-ui,sans-serif;font-weight:400}#result-detail,#achievement-result{font-size:13px}#share-status{font:13px/1.6 system-ui,sans-serif!important}#result small{font:11px/1.6 system-ui,sans-serif}@media(max-width:650px){#intro h1{font-size:26px}#intro .note{font-size:16px}#intro .note:last-child{font-size:15px}#result-detail,#achievement-result{font-size:11px}}

/* Higher result tiers keep the same readable layout; colour and depth escalate. */
body[data-tier="5"] #final-score,body[data-tier="5"] #title{color:#9effff;-webkit-text-stroke:.7px #fff;text-shadow:3px 3px #185ba8,6px 6px #9f168b,0 0 20px #24edff88}
body[data-tier="6"] #final-score,body[data-tier="6"] #title{color:#fff4ad;-webkit-text-stroke:.8px #fff;text-shadow:3px 3px #fb2587,6px 6px #7331b6,0 0 25px #ffc83aaa}
body[data-tier="5"] #result{border-color:#63f7ff;box-shadow:0 0 35px #27d6ee55,0 20px 70px #0005}
body[data-tier="6"] #result{border:2px solid #ffe37e;box-shadow:0 0 45px #fd5cbb55,0 20px 70px #0005}
/* Large, legible title and instruction copy on both orientations. */
#intro{width:min(530px,46%)}
#intro h1{font-size:clamp(38px,3.8vw,52px);letter-spacing:-1.2px}
#intro .note{font-size:22px;line-height:1.65}
#intro .note:last-child{font-size:19px}
#ready{font-size:21px}
@media(max-width:650px){#intro{width:92%;left:4%}#intro h1{font-size:clamp(27px,7.6vw,40px);letter-spacing:-1.2px}#intro .note{font-size:20px}#intro .note:last-child{font-size:18px}#ready{font-size:20px}}
@media(max-height:550px) and (min-width:651px){#intro{top:16%}#intro h1{font-size:36px;margin:8px 0 15px}#intro .note{font-size:18px;margin:9px 0}#intro .note:last-child{font-size:16px}#ready{padding:13px}}
/* Keep text crisp even at the highest celebration tier; decoration stays outside glyphs. */
body[data-tier] #result{background:#10222bf5}
body[data-tier] #title{color:#f6fafb;font-family:'Dela Game',system-ui,sans-serif;font-weight:400;-webkit-text-stroke:0;text-shadow:0 2px 2px #0009;letter-spacing:0;line-height:1.5;overflow-wrap:anywhere}
body[data-tier] #final-score{color:#fff4cd;-webkit-text-stroke:0;text-shadow:0 2px 2px #0009;letter-spacing:0}
#result-detail{color:#d8e3e7}
#achievement-result{color:#f1e4ab}
#result small{color:#d2dfe3;font-size:12px;line-height:1.65}
#result .result-score span{color:#f4f8f9}
@media(max-width:650px){#result h2{font-size:20px}#result-detail,#achievement-result{font-size:13px}#result small{font-size:12px}}
.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:stretch}
.result-actions #again,.result-actions #post-x{min-width:0;width:100%;font-size:17px;padding:14px 6px}
#post-x{display:block;border:1px solid #d4e1e7;border-radius:13px;background:#172d38;color:#f5f9fb;box-shadow:0 5px 0 #07151c}
#post-x:disabled{opacity:.55;cursor:default}
@media(max-width:650px){.result-actions #again,.result-actions #post-x{font-size:16px;padding:12px 5px}}
.result-number{display:flex;flex-flow:row nowrap;align-items:baseline;gap:9px;white-space:nowrap;min-width:0}
#result .result-number .result-unit{font-family:'Black Ops Game',sans-serif;font-size:clamp(22px,2.5vw,32px);color:#fff4cd;flex:none}
@media(max-width:650px){.result-number{justify-content:center;gap:7px}}
/* Keep manual attachment available even when native sharing/clipboard is denied. */
#result{max-height:calc(100dvh - 100px);overflow:auto;box-sizing:border-box;scrollbar-gutter:stable}
.result-actions #post-x{font-size:14px;line-height:1.45}
#share-options{margin-top:12px;font:13px/1.6 system-ui,sans-serif;text-align:left;color:#e3eeee}
#share-options summary{cursor:pointer;padding:8px 0;text-decoration:underline;text-underline-offset:3px}
#score-preview{display:block;max-width:100%;height:auto;border:1px solid #809a9a;border-radius:8px;margin:10px 0;touch-action:auto}
.share-tools-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.share-tools-actions a,.share-tools-actions button{display:grid;place-items:center;box-sizing:border-box;padding:10px 7px;min-height:44px;border:1px solid #779191;border-radius:8px;background:#203c47;color:#fff;text-align:center;font:13px/1.45 system-ui,sans-serif;text-decoration:none}
.share-tools-actions a:focus-visible,#share-options summary:focus-visible{outline:3px solid #ecff72;outline-offset:3px}
#share-text{display:block;box-sizing:border-box;width:100%;resize:vertical;padding:9px;border:1px solid #8fa9ae;border-radius:6px;background:#0b1e29;color:#fff;font:13px/1.6 system-ui,sans-serif;user-select:text}
#result .share-help{font:12px/1.65 system-ui,sans-serif;margin:8px 0}
@media(max-width:650px){#result{max-height:53dvh}.result-actions #post-x{font-size:13px}#share-options{margin-top:8px}}
/* Dela remains the logo accent; prose uses a readable medium system face.
   Black Ops One is unchanged for the big score, timer, gains and kg. */
:root,button{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-weight:500}
#intro h1{font-family:'Dela Game',system-ui,sans-serif;font-weight:400}
#result h2,body[data-tier] #title{font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif!important;font-weight:700;line-height:1.45;letter-spacing:.01em}
#intro .note,#result-detail,#result small,#share-status{font-weight:500}
#ready,#again,#post-x,#restart,#sound{font-weight:700}

/* Stop accidental play-surface selection/callouts, not result image saving or text copying. */
#stage,#game > header,#controls,#hud,#world-timer,#toast,#gesture-guide{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#score-preview{-webkit-touch-callout:default;-webkit-user-select:auto;user-select:auto}
#share-text{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default;touch-action:auto}

/* Original result-card layout: image tap copies; X is a separate direct button. */
#copy-preview{display:block;width:100%;padding:0;border:0;background:transparent;touch-action:manipulation;-webkit-touch-callout:default}
#copy-preview:disabled{cursor:default;opacity:1}
#copy-preview:focus-visible{outline:3px solid #ecff72;outline-offset:3px}
#copy-preview #score-preview{margin:8px 0}
#copy-image:disabled{opacity:.5;cursor:default}
#share-options .share-save-link{display:block;margin:10px 0;color:#f4f8f9;text-align:center;text-decoration:underline;text-underline-offset:3px}
/* The opened card replaces duplicate result controls; collapse it to return. */
#result:has(#share-options[open]) > :is(h2,.result-score,.result-actions){display:none}
#result:has(#share-options[open]) #share-options{margin-top:0}

/* Compact share card: both same-type actions stay visible in a small Safari viewport. */
#result:has(#share-options[open]){max-height:calc(100dvh - 100px);padding:12px;scrollbar-gutter:auto}
#result:has(#share-options[open]) > small{display:none}
#result:has(#share-options[open]) > #share-status:not([data-error]){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#result:has(#share-options[open]) #share-options summary{padding:4px 0}
#result:has(#share-options[open]) .share-help{margin:4px 0 8px;line-height:1.5}
#copy-preview #score-preview{width:100%;height:auto;max-height:calc(100dvh - 240px);object-fit:contain;margin:0}
.share-tools-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 0}
.share-tools-actions button{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:48px;white-space:nowrap;font-size:14px;line-height:1.25;padding:9px 4px}
#open-x{background:#d8ff68;border-color:#d8ff68;color:#132425;font-weight:700}
#open-x:disabled{opacity:.55;cursor:default}
@media(max-width:350px){.share-tools-actions button{font-size:13px}}

/* Explicit return control instead of a disclosure label. */
#share-back{display:inline-flex;align-items:center;justify-content:center;min-width:72px;min-height:44px;margin:0 0 8px;padding:8px 14px;border:1px solid #779191;border-radius:8px;background:#203c47;color:#fff;font:500 14px/1.3 system-ui,sans-serif;white-space:nowrap}

/* Only an actual X-opening exception gets visible feedback. Routine copy status stays quiet. */
#result:has(#share-options[open]) > #share-status[data-error]{margin:0 0 8px;color:#ffd1c9;font:500 13px/1.5 system-ui,sans-serif;white-space:normal}
#result:has(#share-status[data-error]) #score-preview{max-height:calc(100dvh - 280px)}
