*{box-sizing:border-box}html{color-scheme:light}body{margin:0;background:#f5f7f1;color:#24483d;font-family:"Yu Gothic",Meiryo,system-ui,sans-serif;line-height:1.8}button,input{font:inherit}button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid #c3d0be;border-radius:8px;background:#f8faf2;color:#24483d;padding:10px 16px;transition:background .15s,transform .15s}button:hover{background:#e5eddb}button:active{transform:translateY(1px)}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #ba7d2a;outline-offset:4px}a{color:#36734f;text-underline-offset:4px}h1,h2,p{margin-top:0}[hidden]{display:none!important}.primary{background:#2b6048;color:white;border-color:#2b6048}.primary:hover{background:#397557}#outline{max-width:780px;margin:auto;padding:22px 24px 0}.home-link{font-size:14px;margin-bottom:34px}.page-heading{text-align:center;padding:4px 0 18px}.eyebrow{font-size:13px;letter-spacing:.28em;font-weight:700;margin:0 0 8px;color:#69866a}.page-heading h1{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(30px,5vw,42px);font-weight:600;letter-spacing:.13em;line-height:1.65;margin:0}.page-tagline{font-size:14px;letter-spacing:.15em;margin:14px 0 0;color:#78917d}.game-screen-hint{text-align:center;font-size:14px;margin:8px 0 12px;color:#6d806c}#game-frame{position:relative;background:#80b4ad;border-radius:12px;overflow:hidden;box-shadow:0 16px 38px #274f3a15}#game{position:relative;width:100%;height:760px;max-height:85svh;min-height:460px;overflow:hidden;container-type:size}#scene{display:block;width:100%;height:100%;touch-action:none;outline:none;cursor:grab}#scene[data-hover=true]{cursor:crosshair}#scene[data-dragging=true]{cursor:grabbing}#game-frame.is-maximized{position:fixed;inset:0;z-index:1000;border-radius:0;background:#80b4ad}#game-frame.is-maximized #game{height:100dvh;max-height:none;min-height:0}body.is-game-maximized{position:fixed;width:100%;overflow:hidden;overscroll-behavior:none}.game-bar{position:absolute;left:max(24px,env(safe-area-inset-left));right:max(20px,env(safe-area-inset-right));top:max(18px,env(safe-area-inset-top));display:flex;align-items:center;justify-content:space-between;z-index:10;pointer-events:none}.game-bar>span{font-family:Georgia,serif;font-size:19px;letter-spacing:.24em;color:#234c43}.game-bar-caption{display:block;font-family:"Yu Gothic",Meiryo,sans-serif;font-size:11px;letter-spacing:.1em;margin-top:0;color:#426b5e}.game-bar>div{display:flex;gap:8px;pointer-events:auto}.icon-button{padding:0;width:42px;height:42px;display:grid;place-items:center;background:#f7faf283;border-color:#eff7e679;border-radius:50%;backdrop-filter:blur(12px)}.icon-button svg{width:21px;height:21px;pointer-events:none}#game-frame:not(.is-active) .game-bar>div{visibility:hidden}#counter{position:absolute;top:80px;left:50%;transform:translateX(-50%);z-index:3;text-align:center;pointer-events:none;min-width:158px;color:#183e33}.counter-label{font-size:13px;letter-spacing:.2em}.counter-number{line-height:1.1;margin:5px 0 9px;white-space:nowrap}.counter-number output{font-family:Georgia,"Times New Roman",serif;font-size:66px;font-variant-numeric:lining-nums tabular-nums;font-weight:400;letter-spacing:.02em}.counter-number>span{font-size:17px;margin-left:7px}.progress-track{height:3px;background:#214a3322;width:140px;margin:0 auto;border-radius:3px;overflow:hidden}#pluck-progress{height:100%;background:#38684c;width:0;transition:width .2s}#counter p{font-size:12px;margin:7px 0 0;color:#436752;font-variant-numeric:tabular-nums}#bottom-ui{position:absolute;bottom:max(18px,env(safe-area-inset-bottom));left:12px;right:12px;text-align:center;z-index:5;pointer-events:none}#gesture-hint{font-size:14px;margin:0 0 11px;color:#f8faee;text-shadow:0 1px 5px #15312780;letter-spacing:.05em}.turn-controls{display:flex;justify-content:center;gap:7px;pointer-events:auto}.turn-controls button{padding:9px 15px;font-size:14px;background:#f6f7e7e6;border-color:#d7dfc4;box-shadow:0 3px 14px #19342c16}.turn-controls #auto-rotate{min-width:146px}.turn-controls #auto-rotate[aria-pressed=true]{background:#2f624be8;color:#fff;border-color:#376c50}.fine-hint{font-size:11px;margin:8px 0 0;color:#eef3ddbf;text-shadow:0 1px 4px #1c3e28}#expand-game{position:absolute;inset:0;z-index:20;border:0;border-radius:0;background:linear-gradient(0deg,#183f366b,transparent 40%);display:flex;align-items:flex-end;justify-content:center;padding:0 12px 48px;color:white;cursor:zoom-in}#expand-game>span{padding:13px 25px;background:#244f3de6;border:1px solid #eaf3d04a;border-radius:9px;font-size:16px;letter-spacing:.09em;box-shadow:0 4px 20px #19332633}#expand-game small{display:block;font-size:11px;letter-spacing:.12em;color:#dfebce;margin-top:2px}#expand-game svg{position:absolute;width:25px;height:25px;right:16px;bottom:16px}.is-maximized #expand-game{display:none}#game-frame:not(.is-maximized) #bottom-ui{visibility:hidden}#pluck-label{position:absolute;z-index:4;font-size:18px;color:#fff8cd;pointer-events:none;opacity:0;text-shadow:0 2px 7px #284533;font-weight:700;transform:translate(-50%,-50%)}#pluck-label.pop{animation:pluck-pop .55s ease-out forwards}@keyframes pluck-pop{0%{opacity:1;translate:0 0;scale:.85}25%{scale:1.1}100%{opacity:0;translate:0 -38px;scale:1}}#hover-tip{position:absolute;padding:3px 8px;background:#1a473ed9;color:#fffbe6;border-radius:4px;z-index:4;font-size:11px;pointer-events:none}#clear-card{position:absolute;bottom:126px;left:50%;transform:translateX(-50%);width:min(90%,390px);z-index:8;background:#f8faefef;border:1px solid #fff9;border-radius:12px;padding:23px 24px;text-align:center;box-shadow:0 12px 35px #163d3e26;backdrop-filter:blur(12px)}#clear-card h2{font-family:"Yu Mincho",serif;font-size:23px;font-weight:600;margin:0 0 6px}#clear-card p:not(.eyebrow){font-size:14px;margin-bottom:16px}#clear-card>div{display:flex;justify-content:center;gap:10px}#clear-badge{position:absolute;bottom:155px;width:100%;text-align:center;pointer-events:none;color:#fffbe5;letter-spacing:.16em;text-shadow:0 2px 6px #274532}#render-error{position:absolute;inset:30% 20px auto;background:#fff8e5;padding:24px;z-index:25}.page-section{border-bottom:1px solid #dce3d6;padding:30px 5px}.page-section h2{font-size:20px;letter-spacing:.1em;margin-bottom:16px}.page-section p,.page-section li{font-size:15px;line-height:2}.page-section ol{padding-left:22px;margin:0}.page-section li{margin-bottom:8px}.page-section p:last-child{margin-bottom:0}.page-section .note{color:#71836c;font-size:13px}.site-ad{text-align:center;border-bottom:1px solid #dce3d6;min-height:130px;padding:24px 0}.site-ad-label{font-size:11px;letter-spacing:.18em;color:#8e9c86}.is-local .site-ad{display:none}.comments form{display:flex;gap:8px;flex-wrap:wrap}.comments label{width:100%;font-size:14px}.comments input[type=text]{flex:1;min-width:0;padding:9px;border:1px solid #b9cbb4;background:#fff;border-radius:5px}.comments input[type=submit]{padding:8px 17px;background:#315c42;color:white;border:0;border-radius:5px;cursor:pointer}.comments input:disabled{opacity:.45}.comments #comment-notice{font-size:13px;color:#71836c}.comments #com{display:none}#outline>footer{padding:28px 0;text-align:center;font-size:14px}footer small{display:block;color:#71836c;font-size:12px;margin:12px 0}dialog{width:min(92vw,410px);padding:26px;background:#f7f9ef;border:1px solid #d6e2cb;border-radius:12px;color:#24483d;box-shadow:0 20px 65px #163b3440;max-height:88dvh;overflow:auto}dialog::backdrop{background:#163c3466;backdrop-filter:blur(7px)}dialog h2{font-size:21px;margin-bottom:20px}.dialog-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.dialog-heading h2{margin:0}.dialog-heading button{padding:5px 10px;font-size:14px;background:transparent}.dialog-actions{display:flex;gap:10px;justify-content:flex-end}#game-settings>label:first-of-type{display:flex;justify-content:space-between;font-size:15px}#se-volume{width:100%;accent-color:#376948;margin:18px 0 23px}.check{display:flex;gap:10px;align-items:center;min-height:44px;font-size:15px}.check input{width:18px;height:18px;accent-color:#376948}.settings-note{font-size:13px;color:#708067;margin:22px 0}#reset-request,#return-page{display:block;width:100%;margin-top:9px}#reset-request{color:#985b3c}.visually-hidden{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
@media(max-width:480px){#outline{padding:15px 14px 0}.home-link{font-size:12px;margin-bottom:25px}#game{height:680px;min-height:450px}.game-bar{left:15px;right:12px;top:14px}.game-bar>span{font-size:16px}.game-bar-caption{font-size:10px}.icon-button{width:38px;height:38px}#counter{top:74px}.counter-number output{font-size:57px}#gesture-hint{font-size:12px}.turn-controls button{padding:9px 12px;font-size:13px}}
@media(max-height:650px){#counter{top:57px}.counter-number output{font-size:46px}.counter-label{font-size:11px}.counter-number{margin:2px 0 5px}#counter p{font-size:10px;margin-top:3px}.game-bar-caption{display:none}#bottom-ui{bottom:10px}.fine-hint{display:none}#gesture-hint{margin-bottom:6px;font-size:12px}.turn-controls button{padding:7px 12px}#clear-card{bottom:100px;padding:15px 20px}}
@media(orientation:landscape) and (max-height:600px){#counter{left:18px;top:86px;transform:none;min-width:130px}#bottom-ui{left:auto;right:20px;bottom:22px}#gesture-hint{max-width:240px;margin-inline:auto}.turn-controls{gap:5px}.turn-controls button{font-size:12px;padding:8px 10px}.turn-controls #auto-rotate{min-width:124px}#clear-card{left:auto;right:20px;transform:none;bottom:140px;width:300px}#clear-card h2{font-size:20px}}
@media(prefers-reduced-motion:reduce){button,#pluck-progress{transition:none}#pluck-label.pop{animation:none}}

/* The game bar contains only the settings and return controls. */
.game-bar{justify-content:flex-end}
#scene[data-gripping=true]{cursor:grabbing}
#scene{cursor:default}#scene[data-hover=true]{cursor:pointer}
#game-frame,#game-frame *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}#scene{-webkit-user-drag:none}
.result-secondary{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.result-secondary button,.share-button{font-size:14px;padding:9px 6px}.share-button{display:block;text-align:center;text-decoration:none;border:1px solid #c3d0be;border-radius:8px;background:#f8faf2;color:#24483d}.share-button:hover{background:#e5eddb}#upgrade-dialog{width:min(94vw,480px)}.upgrade-wallet{display:flex;justify-content:space-between;align-items:center;margin:0 0 12px;font-size:16px}.upgrade-wallet output{font:26px Georgia,serif;font-variant-numeric:tabular-nums}.upgrade-item{display:flex;gap:10px;justify-content:space-between;align-items:center;border-top:1px solid #dce3d6;padding:16px 0}.upgrade-item h3{font-size:16px;margin:0 0 5px;letter-spacing:.03em}.upgrade-item p{font-size:13px;line-height:1.5;color:#71836c;margin:0}.upgrade-level{display:flex;gap:8px;align-items:center;flex-shrink:0}.upgrade-level button{width:36px;height:38px;padding:0;font-size:20px}.upgrade-level output{min-width:45px;text-align:center;font-size:15px;font-variant-numeric:tabular-nums}.upgrade-level button:disabled{opacity:.32;cursor:default}.upgrade-price{font-size:12px;color:#71836c;margin:15px 0 0;text-align:center}#upgrade-dialog,#upgrade-dialog *{-webkit-user-select:none;user-select:none}@media(max-width:390px){#upgrade-dialog{padding:20px 16px}.upgrade-level{gap:5px}.upgrade-level button{width:32px}.upgrade-item{gap:6px}.upgrade-item h3{font-size:15px}}

#round-timer{position:absolute;top:max(19px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:4;color:#24483d;pointer-events:none;font:32px/1.3 Georgia,serif;font-variant-numeric:tabular-nums}#round-timer small{font:14px system-ui,sans-serif}#round-timer.urgent{color:#9c4a30}#round-result{position:absolute;bottom:max(25px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:9;width:min(340px,90%);border:1px solid #e5ecd9;border-radius:12px;background:#f8faeff5;padding:20px 25px;text-align:center;box-shadow:0 10px 32px #24483d22;backdrop-filter:blur(9px)}#round-result h2{font-size:14px;letter-spacing:.13em;margin:0;color:#5b765d;font-weight:500}.round-score{margin:0 0 10px;font:58px/1.3 Georgia,serif;font-variant-numeric:tabular-nums}.round-score span{font:18px system-ui,sans-serif;margin-left:8px}.round-money{margin:0 0 16px;font-size:14px}.round-money>div{display:flex;justify-content:space-between;gap:20px;line-height:1.9}.round-money dt{color:#6c8065}.round-money dd{margin:0;font-variant-numeric:tabular-nums}#play-again{width:100%;font-size:16px;padding:9px 18px}@media(max-height:600px){#round-timer{top:15px;font-size:27px}#round-result{left:auto;right:20px;transform:none;bottom:20px;width:270px;padding:15px 20px}.round-score{font-size:44px}.round-money{margin-bottom:10px}}

#upgrade-dialog{max-height:94dvh;padding:22px}.dialog-heading{margin-bottom:16px}#upgrade-dialog h2{line-height:1.4}.upgrade-wallet{margin-bottom:10px}.upgrade-wallet output{line-height:1.3}.upgrade-item{padding:10px 0}.upgrade-item h3{line-height:1.4;margin-bottom:3px}.upgrade-price{line-height:1.5;margin-top:12px}

.upgrade-level button:last-child{width:58px;height:44px;line-height:1.1;font-size:19px}.upgrade-level button small{display:block;font-size:10px;margin-top:3px}.upgrade-level{gap:6px}@media(max-width:390px){.upgrade-level{gap:4px}.upgrade-level button:last-child{width:50px}}

#round-restart{position:absolute;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:21;padding:8px 14px;font-size:14px;background:#f7faf2e8;border-color:#c3d0be;box-shadow:0 3px 14px #19342c16}#round-result{bottom:max(82px,calc(env(safe-area-inset-bottom) + 64px))}#reset-error{font-size:13px;color:#985b3c}

.new-game-promo{margin:18px 0 24px;padding-bottom:18px;border-bottom:1px solid #dce3d6;text-align:center}.new-game-promo>a{display:block}.new-game-promo img{display:block;width:95%;height:auto;margin:0 auto;border-radius:8px;box-shadow:0 3px 10px #24483d22}.new-game-promo p{margin:9px 0 0;font-size:14px;line-height:1.6}
.recommended-games{display:grid;gap:10px}
.recommended-game{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:16px;padding:10px;background:#eef3e8;border:1px solid #c3d0be;color:#24483d;text-decoration:none}
.recommended-game:hover{background:#e5eddb;border-color:#78917d}
.recommended-game img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover}
.recommended-copy{min-width:0}
.recommended-copy h3{margin:0 0 5px;font-size:18px;font-weight:600;line-height:1.55;letter-spacing:.02em}
.page-section .recommended-copy p{margin:0;font-size:14px;line-height:1.75;color:#71836c}
@media(max-width:480px){.recommended-game{grid-template-columns:80px minmax(0,1fr);gap:12px;padding:9px}.recommended-copy h3{font-size:15px;letter-spacing:0}.page-section .recommended-copy p{font-size:13px;line-height:1.65}}
@media(max-width:350px){.recommended-game{grid-template-columns:68px minmax(0,1fr);gap:9px}.recommended-copy h3{font-size:14px}}

/* Live 3D title, followed by a result composition with a clear view of the cactus. */
#title-screen{position:absolute;inset:0;z-index:22;pointer-events:none}
.title-copy{position:absolute;left:7%;top:50%;width:39%;transform:translateY(-50%);pointer-events:none}
#title-name{margin:0 0 30px;font-family:"Yu Gothic",Meiryo,sans-serif;font-weight:900;line-height:1.2;letter-spacing:.035em;transform:rotate(-3deg);color:#fff5cd;text-shadow:0 5px 0 #1c493a,0 10px 22px #193d3320;paint-order:stroke fill;-webkit-text-stroke:2px #245941}
#title-name span{display:block;font-size:clamp(20px,2.8cqw,35px);margin-bottom:7px;letter-spacing:.02em}
#title-name strong{display:block;font-size:clamp(48px,7cqw,86px);font-weight:900;white-space:nowrap}
#title-screen #expand-game{position:static;inset:auto;display:inline-flex;align-items:center;justify-content:center;gap:21px;pointer-events:auto;width:210px;height:56px;margin-top:9px;padding:0 24px;border:2px solid #f8e7ae;border-radius:999px;background:#275c47;color:#fff5cd;font-size:19px;font-weight:700;letter-spacing:.12em;box-shadow:0 5px 0 #193f32,0 10px 20px #193f3225;cursor:pointer}
#title-screen #expand-game:hover{background:#36755a;translate:0 -2px}#title-screen #expand-game:active{translate:0 3px;box-shadow:0 2px 0 #193f32}
#title-screen #expand-game svg{position:static;width:20px;height:20px;flex-shrink:0}
#game-frame[data-title="true"] :is(#counter,#round-timer,#round-restart){visibility:hidden}
#game-frame[data-presentation-layout="stack"] .title-copy{inset:32px 16px 24px;width:auto;transform:none;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:space-between}
#game-frame[data-presentation-layout="stack"] #title-name{margin:0;-webkit-text-stroke:1.5px #245941}
#game-frame[data-presentation-layout="stack"] #title-name span{font-size:clamp(19px,4.7cqw,27px);margin-bottom:3px}
#game-frame[data-presentation-layout="stack"] #title-name strong{font-size:clamp(48px,10cqw,66px)}
#game-frame[data-presentation-layout="stack"] #title-screen #expand-game{height:52px;width:200px;margin:0}
#round-result{top:50%;bottom:auto;left:auto;right:24px;transform:translateY(-50%);width:min(340px,calc(100% - 32px));padding:20px;border-radius:16px}
.result-summary{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:16px}.result-count{text-align:left;flex-shrink:0}#round-result h2{font-size:12px;letter-spacing:.06em}.round-score{font-size:50px;line-height:1.15;margin:2px 0 0}.round-score span{font-size:15px;margin-left:5px}.round-money{margin:0;font-size:12px;flex:1}.round-money>div{gap:10px;line-height:2}.round-money dt{white-space:nowrap}.round-money dd{white-space:nowrap}
#play-again{font-size:15px;padding:7px 14px}.result-secondary button,.share-button{font-size:12px;padding:7px 6px}
#game-frame[data-presentation-layout="stack"] #round-result{top:auto;bottom:max(80px,calc(env(safe-area-inset-bottom) + 62px));left:50%;right:auto;transform:translateX(-50%)}
@media(max-height:600px){#round-result{width:min(300px,calc(100% - 32px));padding:16px}.round-score{font-size:42px}.result-summary{gap:10px;margin-bottom:12px}.title-copy{left:6%}#title-name{margin-bottom:16px}#title-name strong{font-size:clamp(46px,6.5cqw,72px)}}

/* Match Marukunare's Mincho title typography, laid out horizontally. */
#title-screen{background:linear-gradient(90deg,#11130f32,transparent 62%)}
#title-name,#title-screen #expand-game,.page-heading h1{font-family:"Yu Mincho","YuMincho","Hiragino Mincho ProN","Noto Serif CJK JP","MS PMincho",serif}
#title-name{font-weight:600;writing-mode:horizontal-tb;transform:none;letter-spacing:.08em;color:#f6edda;-webkit-text-stroke:.012em #21180e;text-shadow:.025em .035em .035em #130c07cc;paint-order:stroke fill}
#title-name strong{font-weight:600;font-size:clamp(48px,6.5cqw,80px)}
#game-frame[data-presentation-layout="stack"] #title-name{-webkit-text-stroke:.012em #21180e}
#title-screen #expand-game{border-radius:3px;border:1px solid #492c20;background:linear-gradient(#754832,#5b3425);color:#f1e9da;box-shadow:inset 0 0 0 1px #b5996950,0 3px 4px #0005;font-weight:600;letter-spacing:.10em}
#title-screen #expand-game:hover{background:linear-gradient(#88583b,#6c402b);translate:none}
#game-frame[data-transition="true"] :is(#counter,#round-timer,#round-restart,.game-bar){visibility:hidden}

/* Match Marukunare: a portrait page preview and a centered game in the full-window shell. */
body{background:#292a27}#outline{width:min(100%,620px);max-width:620px;padding:0 20px;background:#e5e0d4;border-inline:1px solid #716d60}.home-link{padding:17px 0;border-bottom:1px solid #a8a191;margin-bottom:0}.page-heading{padding:20px 0}.page-heading h1{font-size:clamp(22px,5.2vw,32px);letter-spacing:.04em;line-height:1.5}
#game-frame{width:100%;height:auto;aspect-ratio:9/14;margin-inline:auto;border:1px solid #79796d;border-radius:0;box-shadow:none;isolation:isolate}
#game{height:100%;max-height:none;min-height:0;max-width:620px;margin:auto}
@media(max-width:480px){#outline{padding:0 14px}}
#game-frame.is-maximized{position:fixed;inset:0;width:100%;height:100dvh;aspect-ratio:auto;z-index:1000;border:0;background:#292a27}
#game-frame.is-maximized #game{height:100%;max-width:620px}
@media(orientation:landscape) and (max-height:520px){#game-frame.is-maximized #game{max-width:100%}}

/* A screen-space ring follows the pot; the cactus itself is the start target. */
#title-start{position:absolute;transform:translate(-50%,-50%);pointer-events:none;color:#fff}
.start-circle{position:absolute;inset:0;border:2px solid #fff;border-radius:50%;box-shadow:0 1px 5px #0003}
.start-caption{position:absolute;top:calc(100% + 10px);left:50%;transform:translateX(-50%);white-space:nowrap;font:600 clamp(14px,2.6cqw,18px)/1.5 "Yu Mincho","YuMincho","Hiragino Mincho ProN","Noto Serif CJK JP","MS PMincho",serif;letter-spacing:.08em;text-shadow:0 1px 4px #000c}
#scene[data-start-hover="true"]{cursor:pointer}

#round-finish{position:absolute;left:max(18px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));z-index:21;padding:8px 14px;font-size:14px;background:#f7faf2e8;border-color:#c3d0be;box-shadow:0 3px 14px #19342c16}

@container(max-width:480px){#game-frame[data-presentation-layout="stack"] .title-copy{top:76px}}

/* Keep the remaining count above the clock, independent of the 3D pot. */
#counter{top:max(12px,env(safe-area-inset-top));min-width:0;font-family:Georgia,"Times New Roman",serif;color:#24483d;line-height:1.3}
#counter .counter-label{display:block;font-size:13px;letter-spacing:.12em}
#counter .counter-number{margin:1px 0 0;line-height:1.1}
#counter .counter-number output{font:400 30px/1.1 Georgia,"Times New Roman",serif;letter-spacing:.02em;font-variant-numeric:lining-nums tabular-nums}
#counter .counter-number>span{font:14px Georgia,"Times New Roman",serif;margin-left:4px}
#round-timer{top:calc(max(12px,env(safe-area-inset-top)) + 57px)}

/* Marukunare ranking dialogs, with scores measured in plucked needles. */


#ranking-dialog{width:min(94vw,460px);padding:20px;max-height:90dvh}
#ranking-dialog h2,.ranking-heading h2{margin:0;font-size:22px}
.ranking-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ranking-heading>div{display:flex;gap:6px}
.ranking-heading button:not(.icon-button){font-size:13px;padding:7px 9px}
.ranking-status{font-size:14px;line-height:1.6;min-height:1.6em;margin:10px 0}
.ranking-status:empty{display:none}
.ranking-scroll{max-height:350px;overflow:auto;overscroll-behavior:contain}
.ranking-table{width:100%;border-collapse:collapse;font-size:15px;font-variant-numeric:tabular-nums;text-align:left}
.ranking-table th{font-size:13px;color:#77664b;border-bottom:1px solid #a99c80;font-weight:500;padding:7px 5px}
.ranking-table td{padding:9px 5px;border-bottom:1px solid #b8ac932e;overflow-wrap:anywhere}
.ranking-table th:first-child,.ranking-table td:first-child{width:48px;text-align:center}
.ranking-table th:last-child,.ranking-table td:last-child{text-align:right;white-space:nowrap}
.ranking-table .is-own{background:#8d54391a;color:#713a26;font-weight:600}
.ranking-table .own-tail{border-top:2px dashed #9c8d70}
.ranking-submit-row{display:flex;gap:8px;margin-top:5px}
.ranking-submit-row input{min-width:0;flex:1;width:100%;padding:8px;border:1px solid #91856d;border-radius:0;background:#f4eedf;font-size:16px;color:var(--ink)}
.ranking-submit-row button{flex:none;font-size:15px;padding-inline:12px}
#ranking-form{padding-bottom:15px;border-bottom:1px solid #b8ad93}
#ranking-form>label{font-size:14px}
.ranking-current{margin:10px 0}
.ranking-current strong{font-size:25px;font-weight:500;margin-left:8px}
.ranking-tools{display:flex;justify-content:flex-end;margin-top:12px}
.ranking-tools button{font-size:13px;padding:6px 10px}


#title-ranking{position:absolute;left:32px;bottom:max(32px,calc(env(safe-area-inset-bottom) + 25px));z-index:31;min-width:148px;padding:9px 24px;background:#28231dcc;border-color:#c8bda080;color:#eee4d1;letter-spacing:.10em;text-indent:.10em;box-shadow:0 2px 6px #0005}

.ranking-period{margin:8px 0 12px;font-size:13px;line-height:1.6;color:#77664b;letter-spacing:.04em}


/* Registration opens above the software keyboard, separately from the standings. */
#ranking-dialog{overflow:hidden;display:flex;flex-direction:column;max-height:calc(100dvh - 16px)}

#ranking-dialog:not([open]){display:none}
.ranking-scroll{min-height:0;flex:1;max-height:350px}

#ranking-register-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding-bottom:12px}

#ranking-register-row .ranking-current{margin:6px 0}
#ranking-register{font-size:15px;padding-inline:12px}

#ranking-entry-dialog{position:fixed;inset:var(--entry-top,8px) 0 auto;margin:0 auto;width:min(calc(100vw - 16px),420px);max-height:var(--entry-height,calc(100dvh - 16px));padding:16px 18px;overflow:auto;overscroll-behavior:contain}

#ranking-entry-dialog #ranking-form{padding:0;border:0;margin-top:12px;display:grid;gap:10px}

#ranking-name{width:100%;min-width:0;min-height:44px;padding:8px 10px;font-size:16px;line-height:1.5;color:var(--ink);background:#f4eedf;border:1px solid #91856d;border-radius:0;user-select:text;-webkit-user-select:text}

#ranking-entry-status{margin:0}
#ranking-entry-dialog #ranking-submit{width:100%}
#ranking-entry-dialog{padding:8px 14px}
#ranking-entry-dialog #ranking-form{gap:6px;margin-top:6px}
#ranking-entry-dialog h2{font-size:20px}
#ranking-open{grid-column:1/-1}#game-frame[data-title="false"] #title-ranking,#game-frame[data-transition="true"] #title-ranking{display:none}#ranking-dialog{--line:#c3d0be;--ink:#24483d}#ranking-entry-dialog{--ink:#24483d}

/* Result hierarchy, earnings, and numeric feedback follow Marukunare. */
#round-result{background:#e7e0cef5;border:1px solid #b9ac8a;border-radius:0;padding:12px 16px 10px;box-shadow:0 8px 30px #0006;color:#3d352b}
#round-result #new-best{font-size:13px;line-height:1.4;margin:0 0 3px;letter-spacing:.06em;color:#7c442e}
#round-result h2{font-size:18px;line-height:1.35;margin:0;color:inherit;font-weight:500;letter-spacing:0}
#round-result .round-score{font:400 clamp(36px,9cqw,50px)/1.15 Georgia,serif;margin:0}
#round-result .round-score span{font:18px Georgia,serif;margin-left:8px}
.result-specs{font-size:13px;line-height:1.4;margin:5px 0 8px;padding:5px 0;border-block:1px solid #b8ad93}.result-specs b{margin-left:10px;font-weight:500}
.result-main-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
#round-result .result-main-actions>button,#round-result .result-main-actions>a{display:flex;align-items:center;justify-content:center;min-height:44px;padding:7px 8px;font-size:15px;line-height:1.5;border-radius:2px;border:1px solid #91856d;background:#f4eedf;color:#3d352b;text-decoration:none}
#round-result .result-main-actions>a{background:linear-gradient(#754832,#5b3425);border-color:#492c20;color:#f1e9da;font-weight:600}
#round-result .result-secondary{display:block;margin-top:6px}#round-result .result-secondary:has(button[hidden]){display:none}#round-result #ranking-open{width:100%;min-height:36px;border-radius:2px;border-color:#91856d;background:#f4eedf;color:#3d352b}
#upgrade-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:6px;margin-top:6px}#upgrade-row p{margin:0;text-align:left;font-size:12px;line-height:1.4;overflow-wrap:anywhere}#total-earnings{display:block;font-size:17px;font-variant-numeric:tabular-nums}#result-reward{font-size:11px;white-space:nowrap;margin-left:3px;color:#386340}#upgrade-row button{min-height:44px;padding:6px 4px;font-size:13px;white-space:nowrap;border-radius:2px;border-color:#91856d;background:#f4eedf;color:#3d352b}
.number-effect{position:relative;display:inline-block;transition:color .15s;font-variant-numeric:tabular-nums}.money-increase{color:#285f36!important;animation:money-pop .35s ease-out}.money-decrease{color:#a52d22!important;animation:money-pop .35s ease-out}.number-effect[data-change]::after{content:attr(data-change);position:absolute;right:0;bottom:100%;font-size:12px;line-height:1.2;white-space:nowrap;font-weight:600;pointer-events:none;text-shadow:0 1px #e5e0d4}#total-earnings.number-effect{display:block}
@keyframes money-pop{0%{scale:1}40%{scale:1.14}100%{scale:1}}
@media(prefers-reduced-motion:reduce){.money-increase,.money-decrease{animation:none}}

#round-result,#upgrade-dialog{font-family:"Yu Mincho","YuMincho","Hiragino Mincho ProN","Noto Serif CJK JP","MS PMincho",serif}
#upgrade-dialog{background:#e7e0ce;border:1px solid #b9ac8a;border-radius:0;color:#302d26}
#upgrade-dialog .upgrade-item{border-color:#b8ad93}#upgrade-dialog .upgrade-item p,#upgrade-dialog .upgrade-price{color:#77664b}
#upgrade-dialog button{border:1px solid #7c786a;border-radius:2px;background:#ddd8ca;color:#302d26;font-weight:600;line-height:1.5;box-shadow:inset 0 1px #fff6,0 2px 2px #0002}
#upgrade-dialog button:hover{filter:brightness(1.08)}

/* Purchase prices are primary button text, large enough to read beside the plus. */
#upgrade-dialog{width:min(94vw,560px)}
#upgrade-dialog .upgrade-wallet{align-items:center}
#upgrade-dialog #upgrade-wallet{font-size:32px;line-height:1.3}
#upgrade-dialog .upgrade-item{gap:16px;padding-block:14px}
#upgrade-dialog .upgrade-item>div:first-child{min-width:0}
#upgrade-dialog .upgrade-level{gap:8px}
#upgrade-dialog .upgrade-level button:last-child{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:auto;min-width:104px;min-height:48px;height:auto;padding:9px 12px;font-size:21px;line-height:1.2;white-space:nowrap}
#upgrade-dialog .upgrade-level button small{display:inline;margin:0;font-size:18px;line-height:1.2;font-weight:600}
@media(max-width:520px){#upgrade-dialog .upgrade-item{display:grid;grid-template-columns:minmax(0,1fr);gap:9px}#upgrade-dialog .upgrade-level{justify-content:flex-end}#upgrade-dialog .upgrade-item h3{font-size:16px}#upgrade-dialog .upgrade-level button:last-child{min-width:112px}}

#upgrade-dialog .upgrade-wallet{justify-content:flex-start;align-items:baseline;gap:6px;font-size:18px;white-space:nowrap}
#upgrade-dialog .upgrade-dialog-actions{display:flex;justify-content:flex-end;margin-top:12px}
#upgrade-dialog #upgrade-reset{min-width:112px;min-height:44px;font-size:16px;padding:8px 20px}

#upgrade-dialog .upgrade-dialog-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;margin-top:14px}
#upgrade-dialog .upgrade-refund{margin:0;font-size:13px;line-height:1.6;color:#77664b}

/* Keep dialog actions visible; only the upgrade list scrolls. */
#upgrade-dialog[open]{display:flex;flex-direction:column;max-height:calc(100dvh - 24px);overflow:hidden}
#upgrade-dialog:not([open]){display:none}
#upgrade-dialog .dialog-heading,#upgrade-dialog .upgrade-wallet,#upgrade-dialog .upgrade-dialog-actions{flex-shrink:0}
#upgrade-dialog #upgrade-items{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;padding-right:4px}
@media(max-width:520px){
 #upgrade-dialog{width:calc(100vw - 24px);padding:16px 12px}
 #upgrade-dialog .dialog-heading{margin-bottom:10px}#upgrade-dialog h2{font-size:20px}
 #upgrade-dialog .upgrade-wallet{margin-bottom:10px;font-size:16px}#upgrade-dialog #upgrade-wallet{font-size:28px}
 #upgrade-dialog .upgrade-item{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding-block:10px}
 #upgrade-dialog .upgrade-item h3{font-size:14px;line-height:1.4;letter-spacing:0;margin-bottom:4px}
 #upgrade-dialog .upgrade-item p{font-size:12px;line-height:1.45}
 #upgrade-dialog .upgrade-level{gap:4px}
 #upgrade-dialog .upgrade-level button:first-child{width:44px;min-width:44px;height:44px}
 #upgrade-dialog .upgrade-level output{min-width:32px;font-size:14px}
 #upgrade-dialog .upgrade-level button:last-child{min-width:96px;min-height:48px;gap:4px;padding:8px;font-size:20px}
 #upgrade-dialog .upgrade-level button small{font-size:18px}
 #upgrade-dialog .upgrade-dialog-actions{gap:12px;margin-top:12px}
}

#upgrade-dialog{max-width:calc(100vw - 24px)}

/* Extraction counts originate at the middle of each pair of tweezers. */
#pluck-numbers{position:absolute;inset:0;z-index:8;pointer-events:none;overflow:hidden}
.pluck-number{position:absolute;transform:translate(-50%,-50%);font:600 28px/1 Georgia,"Times New Roman",serif;color:#fff;-webkit-text-stroke:1.2px #000;paint-order:stroke fill;text-shadow:0 2px 3px #0006;white-space:nowrap;animation:pluck-number-rise .95s ease-out forwards}
.pluck-number.assisted{font-size:23px}
@keyframes pluck-number-rise{0%{opacity:1;translate:0 0}20%{opacity:1}100%{opacity:0;translate:0 var(--pluck-rise,-55px)}}
#title-name,#game-frame[data-presentation-layout="stack"] #title-name{color:#fff;-webkit-text-stroke:1px #000;paint-order:stroke fill;text-shadow:0 2px 3px #0008}
#title-name strong{-webkit-text-stroke:2px #000}

/* Readable HUD over the sunlit room. */
#counter{color:#fff}
#counter .counter-label,#counter .counter-number output,#counter .counter-number>span,#round-timer{paint-order:stroke fill;-webkit-text-stroke:1.5px #000;text-shadow:0 1px 2px #0007}
#counter .counter-label,#counter .counter-number>span,#round-timer small{-webkit-text-stroke:1px #000;paint-order:stroke fill}
#round-timer:not(.urgent){color:#fff}

#cactus-reflections{position:absolute;z-index:9;left:50%;top:calc(100% - 110px);transform:translate(-50%,-50%);width:calc(100% - 32px);max-width:550px;text-align:center;pointer-events:none;color:#f0e7d3;font-family:"Yu Mincho","YuMincho","Hiragino Mincho ProN","Noto Serif CJK JP","MS PMincho",serif;font-weight:600;-webkit-text-stroke:2px #000;paint-order:stroke fill;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000,0 2px 3px #0009}
#cactus-reflection-line{font-size:clamp(16px,3.5cqw,19px);line-height:1.7;min-height:1.7em;margin:0;overflow-wrap:anywhere}
.cactus-reflection-glyph{position:relative;animation:cactus-reflection-rise .18s ease-out both}
@keyframes cactus-reflection-rise{from{opacity:0;top:.5em}to{opacity:1;top:0}}
@media(prefers-reduced-motion:reduce){.cactus-reflection-glyph{animation:cactus-reflection-rise .08s linear both}}
#cactus-reflections.reduced-motion .cactus-reflection-glyph{animation:cactus-reflection-rise .08s linear both}

#title-name .title-prefix{display:block;margin:0 0 8px;font-size:clamp(12px,2.8cqw,17px);line-height:1.6;font-weight:500;letter-spacing:.05em;color:#ffffff8c;-webkit-text-stroke:0;text-shadow:none}
#title-name>span,#game-frame[data-presentation-layout="stack"] #title-name>span{font-size:clamp(23px,6cqw,36px)}
#title-name strong{font-size:clamp(60px,10cqw,88px)}
#game-frame[data-presentation-layout="stack"] #title-name strong{font-size:clamp(60px,14cqw,88px)}

/* Shared with Marukunare: page controls and the same controls in settings. */
.language-picker{--line:#a8a191;border:0;border-block:1px solid var(--line);margin:0;padding:12px 0 14px;min-width:0}
.language-picker legend{padding:0 8px 0 0;font-family:system-ui,sans-serif;font-size:13px;font-weight:600;letter-spacing:.1em;color:#655b49}
.language-options{display:flex;flex-wrap:wrap;gap:6px}.language-options label{position:relative;display:block;cursor:pointer}
.language-options input{position:absolute;opacity:0;width:1px;height:1px}.language-options span{display:block;border:1px solid #a29983;border-radius:2px;padding:8px 10px;min-height:44px;font-size:14px;line-height:26px;background:#f0eadd;font-family:system-ui,sans-serif}
.language-options input:checked+span{background:#65402e;color:#fff6e8;border-color:#65402e}.language-options input:focus-visible+span{outline:2px solid #be8c49;outline-offset:2px}
.settings-language{margin-bottom:14px}.settings-language .language-options span{font-size:13px;padding-inline:8px}
@media(max-height:620px){.settings-language .language-options span{padding:3px 7px;min-height:38px;font-size:12px;line-height:30px}.settings-language{margin-bottom:7px;padding-bottom:8px}.language-picker legend{font-size:12px}}
@media(max-width:370px){.language-options span{font-size:13px;padding-inline:7px}}
html:not(:lang(ja)) .page-heading h1{font-size:clamp(23px,5vw,34px);line-height:1.4;letter-spacing:0;text-indent:0}
html:lang(en) #title-name,html:lang(ko) #title-name{letter-spacing:.02em}
html:lang(en) #title-name strong,html:lang(en) #game-frame[data-presentation-layout="stack"] #title-name strong{font-size:clamp(34px,9cqw,60px);line-height:1.2;white-space:normal}
html:lang(ko) #title-name strong,html:lang(ko) #game-frame[data-presentation-layout="stack"] #title-name strong{font-size:clamp(38px,11cqw,72px);white-space:normal;word-break:keep-all}
html:not(:lang(ja)) #title-name .title-prefix{letter-spacing:.02em}
html:lang(ko) #title-name,html:lang(ko) #round-result,html:lang(ko) #upgrade-dialog,html:lang(ko) #cactus-reflections{font-family:"Batang","Noto Serif KR",serif}
html:lang(zh-Hant) #title-name,html:lang(zh-Hant) #round-result,html:lang(zh-Hant) #upgrade-dialog,html:lang(zh-Hant) #cactus-reflections{font-family:"Songti TC","PMingLiU",serif}
html:lang(zh-Hans) #title-name,html:lang(zh-Hans) #round-result,html:lang(zh-Hans) #upgrade-dialog,html:lang(zh-Hans) #cactus-reflections{font-family:"Songti SC","SimSun",serif}
html:not(:lang(ja)) #cactus-reflection-line{font-size:clamp(14px,3.8cqw,19px);line-height:1.5;word-break:normal}
.cactus-reflection-word{display:inline-block;white-space:nowrap}
html:not(:lang(ja)) .result-specs{letter-spacing:0}html:not(:lang(ja)) .upgrade-refund{line-height:1.45}
html:lang(en) #upgrade-dialog .upgrade-dialog-actions{grid-template-columns:minmax(0,1fr)}
html:lang(en) #upgrade-reset{justify-self:end}
html:lang(ko) .upgrade-item h3,html:lang(ko) .upgrade-item p,html:lang(ko) .upgrade-refund{word-break:keep-all;overflow-wrap:anywhere}

/* Only the new flight scene overrides the retained site shell. */
body{background:#f1f3ec;color:#31463b}
#game-frame{border-radius:0;background:#cbdde2;aspect-ratio:9/14;box-shadow:none;border:1px solid #879080}
#outline{width:min(100%,620px);padding-inline:20px}
#game{height:100%;min-height:0;max-height:none;max-width:620px;margin:auto;overflow:clip}
#game-frame.is-maximized{background:#292a27;position:fixed;inset:0;height:100dvh;aspect-ratio:auto;border:0;z-index:1000;display:flex;justify-content:center}
#game-frame.is-maximized #game{height:100%;width:min(100%,64.285714dvh,620px);max-width:620px}
#game-frame .game-bar>div{visibility:visible}
#game-frame:not(.is-maximized) .game-bar{visibility:hidden}
#scene{display:block;position:absolute;inset:0;width:100%;height:100%;outline:0;touch-action:none}
#game-frame,#game-frame *{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#game-frame [hidden]{display:none!important}
#title-screen{position:absolute;inset:9% auto auto 8px;width:44%;max-width:620px;pointer-events:none;display:block;text-align:center;background:none;transform:none}
#title-screen .title-logo{display:block;position:static;margin:0;color:#fff;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(26px,5cqw,58px);font-weight:700;line-height:1.45;letter-spacing:.06em;text-shadow:1px 1px 1px #1b3028,-1px -1px 1px #1b3028,1px -1px 1px #1b3028,-1px 1px 1px #1b3028;writing-mode:horizontal-tb}
#title-screen strong{font-size:1.65em;line-height:1.35;font-weight:700}
#title-screen [data-localized-logo]{font-size:1em;max-width:620px;margin:auto}
.baseline{color:#fffce8;font-size:15px;letter-spacing:.12em;margin:16px 0 0;text-shadow:0 1px 3px #263c2b;filter:none!important;opacity:1!important}
#closeup-inset{position:absolute;right:16px;bottom:20px;width:38cqw;max-width:220px;aspect-ratio:4/3;z-index:4;border:1px solid #fff5dc;box-shadow:0 3px 16px #0007;pointer-events:none;overflow:hidden;border-radius:4px}#closeup-inset>span{position:absolute;inset:auto 0 0;padding:3px 6px;text-align:center;background:#1f2525a8;color:#fff8e5;font-size:10px}
#ideal-debug-panel{position:absolute;left:16px;right:16px;bottom:16px;z-index:7;padding:12px;background:#182d27ed;border:1px solid #fff7d777;border-radius:5px;color:#fff9e8;font-size:13px;line-height:1.5}
.debug-actions{display:flex;gap:8px;align-items:stretch}.debug-actions #ideal-debug-replay{flex:1;width:auto}.debug-actions>button{margin-top:8px}.debug-actions>button[aria-pressed=true]{background:#3a7756;color:white}
#ideal-debug-panel>strong{font-size:15px}#ideal-debug-panel p{margin:4px 0}#ideal-debug-panel dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:8px 0}#ideal-debug-panel dt{font-size:11px;opacity:.8}#ideal-debug-panel dd{margin:0;font:20px Georgia;white-space:nowrap}#ideal-debug-panel .debug-note{font-size:10px;opacity:.75}#ideal-debug-replay{display:block;width:100%;margin-top:8px;padding:6px;min-height:40px}.ideal-debug #flight-controls{top:108px;bottom:auto;left:18px;right:auto;transform:none;width:auto}.ideal-debug #flight-caption{display:none}.ideal-debug #title-version{display:none}
#title-version{left:16px;right:auto;bottom:12px;color:#ffffffae;font:12px Georgia;z-index:3}
.game-bar{left:16px;right:max(16px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top));justify-content:flex-end}
.game-bar #phase-label{display:none}
.icon-button{background:#fff8ddbb;border-color:#fff6d9;color:#32493f;backdrop-filter:blur(8px)}
#flight-hud{position:absolute;top:max(24px,env(safe-area-inset-top));left:max(24px,env(safe-area-inset-left));display:flex;gap:30px;pointer-events:none;color:white;text-shadow:0 1px 3px #1a322a,1px 0 #263c2b,-1px 0 #263c2b}
#flight-hud>div{display:grid;grid-template-columns:auto auto;gap:0 4px;align-items:baseline;font-family:Georgia,serif}
#flight-hud span{grid-column:1/3;font:14px "Yu Gothic",sans-serif;letter-spacing:.06em}
#flight-hud output{font-size:38px;line-height:1.4;font-variant-numeric:tabular-nums}
#flight-hud small{font-size:16px}
#flight-controls{position:absolute;bottom:max(38px,calc(env(safe-area-inset-bottom) + 20px));left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:10px;width:min(88%,340px);z-index:5}
#flight-caption{font-size:16px;margin:0 0 8px;color:#fefced;text-shadow:0 1px 3px #162e22,1px 0 #27392b,-1px 0 #27392b;text-align:center}
#throw-button{width:100%;min-height:55px;border-radius:5px;border:1px solid #faf6dc;background:#faf7e8ed;color:#324b3d;font:20px "Yu Mincho",serif;box-shadow:0 4px 18px #23352720;letter-spacing:.12em}
#throw-button:hover{background:#fffdf3}
#throw-again{flex-basis:100%;min-height:48px;border-radius:5px;border:1px solid #faf6dc;background:#faf7e8ed;color:#324b3d;font:clamp(15px,4.2cqw,20px) "Yu Mincho",serif;letter-spacing:.04em}
#game-frame[data-short=true][data-phase=result] #flight-result{font-size:10px;padding:6px 10px}
#game-frame[data-short=true][data-phase=result] .score-total strong{font-size:30px}
#game-frame[data-short=true][data-phase=result] #flight-result .result-extras{display:none}
#game-frame[data-short=true][data-phase=result] .score-breakdown{margin:4px 0}
#game-frame[data-short=true][data-phase=result] #flight-result .result-income{margin-top:4px;padding-top:3px}
#game-frame[data-short=true][data-phase=result] #flight-controls{gap:6px}
#game-frame[data-short=true][data-phase=result] #flight-controls>button{min-height:36px;padding:5px 8px;font-size:13px}
#camera-view{min-height:40px;padding:5px 20px;background:#fff8e5c9;border-color:#fff5da;color:#304b3c;border-radius:4px;font-size:14px}
#flight-result{position:absolute;left:50%;bottom:100px;transform:translateX(-50%);width:min(90%,410px);padding:16px 20px;text-align:center;pointer-events:none;color:#fffdf0;text-shadow:0 1px 2px #213a2b;background:#26382cdb;border:1px solid #fff5d477;border-radius:5px;z-index:5}
#flight-result h2{font:700 clamp(26px,5cqw,42px) "Yu Mincho",serif;margin:0 0 12px;letter-spacing:.08em}
#flight-result p{margin:0;font-size:12px;display:flex;align-items:baseline;justify-content:center;gap:15px}
#flight-result h2{font-size:20px;margin-bottom:0}.score-total{font-family:Georgia,serif;line-height:1.2}.score-total strong{font-size:56px;font-weight:400}.score-total small{font-size:16px;margin-left:6px}.score-breakdown{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}.score-breakdown dt{font-size:11px}.score-breakdown dd{margin:0;font:21px Georgia}.result-extras b{font-weight:400}#landing-error{font:21px Georgia;letter-spacing:0;font-variant-numeric:tabular-nums}
#map-panel{position:absolute;right:max(18px,env(safe-area-inset-right));top:110px;width:144px;border:1px solid #f5f3dc99;background:#283e33a6;backdrop-filter:blur(5px);color:#fff8e8;border-radius:3px;pointer-events:none}
#flight-map{display:block;width:100%;height:auto}
#map-panel span{display:block;font-size:12px;text-align:center;padding:0 0 5px;letter-spacing:.08em}
#game-settings{max-height:90dvh;overflow:auto}
@media(max-width:480px){#title-screen{top:11%}#title-screen .title-logo{font-size:30px}.baseline{font-size:14px;margin-top:14px}#flight-hud{left:18px;gap:20px;top:24px}#flight-hud output{font-size:32px}#map-panel{width:112px;right:14px}#flight-controls{bottom:max(35px,calc(env(safe-area-inset-bottom) + 20px))}#flight-result{bottom:192px}#flight-result h2{font-size:30px}.game-bar .icon-button{width:38px;height:38px}}
@media(orientation:landscape) and (max-height:600px){#title-screen{top:12%}#title-screen .title-logo{font-size:26px}#title-screen strong{font-size:1.5em}#flight-controls{left:auto;right:24px;bottom:24px;transform:none;width:240px}#flight-result{left:auto;right:24px;bottom:168px;transform:none;width:240px}#map-panel{left:18px;right:auto;top:auto;bottom:20px;width:115px}#flight-hud output{font-size:30px}#flight-caption{font-size:14px}.baseline{font-size:14px}}

#sanding-hud{position:absolute;top:max(28px,env(safe-area-inset-top));left:28px;color:#fff;text-shadow:0 1px 3px #111;pointer-events:none;z-index:4;font-family:Georgia,"Yu Mincho",serif}#sanding-hud>span{font-size:18px}#sanding-hud output{font-size:42px;font-variant-numeric:tabular-nums}#sanding-hud small{margin-left:5px;font-size:18px}#scene{touch-action:none}








#machine-switch{position:absolute;transform:translate(-50%,-50%);width:54px;height:64px;border:0;border-radius:4px;background:transparent;box-shadow:none;cursor:pointer;z-index:6;touch-action:manipulation}#machine-switch>span{display:none}#machine-switch:hover{background:#fff9d91a}#machine-switch:focus-visible{outline:2px solid white;outline-offset:3px}#flight-controls:has(#throw-button[hidden]):has(#camera-view[hidden]):has(#upgrade-open[hidden]){pointer-events:none}#flight-caption:empty{display:none}
#sanding-annotations{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;overflow:hidden}
#sanding-annotations text{fill:#fff;stroke:#111;stroke-width:3.5px;paint-order:stroke fill;stroke-linejoin:round;font:600 15px "Yu Mincho","Hiragino Mincho ProN",serif}


@media(max-width:480px){#sanding-annotations text{font-size:13px}}

#sanding-hud{left:50%;transform:translateX(-50%);text-align:center}#sanding-hud>span{display:none}#sanding-finish{position:absolute;left:max(22px,env(safe-area-inset-left));top:max(16px,env(safe-area-inset-top));bottom:auto;z-index:6;min-width:104px;min-height:46px;padding:8px 24px;border:1px solid #fff6d9;border-radius:5px;background:#faf7e8ed;color:#324b3d;font:18px "Yu Mincho",serif;cursor:pointer}#sanding-finish:hover{background:#fffdf3}

#ideal-profile{position:absolute;right:max(20px,env(safe-area-inset-right));top:82px;z-index:4;width:112px;padding:10px 8px 2px;border:1px solid #fff8e055;border-radius:5px;background:#17231fb0;backdrop-filter:blur(4px);pointer-events:none;text-align:center;color:white}#ideal-profile>span{font:600 14px "Yu Mincho",serif;text-shadow:1px 1px 1px black,-1px -1px 1px black,1px -1px 1px black,-1px 1px 1px black}#ideal-profile svg{display:block;width:100%;height:auto}#ideal-section{fill:#f4dba9;stroke:#fff9e7;stroke-width:1.3;stroke-linejoin:round}@media(max-width:480px){#ideal-profile{right:14px;top:76px;width:90px;padding:8px 5px 0}#ideal-profile>span{font-size:12px}}
#flight-controls{bottom:20px}#flight-result{bottom:100px}#flight-result h2{font-size:20px}#flight-result .result-extras{font-size:11px}

.score-total>span{display:block;font:11px "Yu Gothic",sans-serif;letter-spacing:.1em;margin-top:6px}

#game-frame{--inset-bottom:20px;--inset-width:min(28cqw,160px)}
#game-frame[data-phase=result]{--inset-bottom:360px}
#game-frame.ideal-debug,#game-frame.ideal-debug[data-phase=result]{--inset-bottom:300px}
#game-frame #closeup-inset{right:16px;bottom:var(--inset-bottom);width:var(--inset-width);max-width:none}
#game-frame #map-panel{right:16px;left:auto;top:auto;bottom:calc(var(--inset-bottom) + min(21cqw,120px) + 10px);width:var(--inset-width)}
#map-panel>span{display:none}.score-breakdown{grid-template-columns:repeat(2,1fr)}
#flight-hud{display:grid;grid-template-columns:auto auto;gap:6px 24px}
#flight-hud .live-score{grid-column:1/-1;justify-self:start;grid-template-columns:max-content max-content}#flight-hud .live-score output{font-size:30px}
#machine-switch::before{content:"";position:absolute;left:50%;top:50%;width:var(--switch-circle-size,56px);height:var(--switch-circle-size,56px);transform:translate(-50%,-50%);border:3px solid #fff;border-radius:50%;box-shadow:0 1px 4px #000b;pointer-events:none}
#machine-switch:active{transform:translate(-50%,-50%)}
#machine-start-hint{position:absolute;z-index:6;transform:translateX(-50%);margin:0;color:white;font-size:14px;font-weight:600;line-height:1.6;white-space:nowrap;pointer-events:none;-webkit-text-stroke:2px #111;paint-order:stroke fill;text-shadow:0 2px 3px #000}
#ideal-profile .ideal-label{fill:white;stroke:#111;stroke-width:2.5px;paint-order:stroke fill;stroke-linejoin:round;font:600 13px "Yu Mincho",serif}

#flight-controls{flex-direction:row;flex-wrap:wrap;justify-content:center;width:min(90%,430px)}
#flight-caption{flex-basis:100%}#throw-button{flex:1;min-width:140px;width:auto}
#upgrade-open{min-height:55px;padding:10px 18px;border-radius:5px;background:#faf7e8ed;color:#324b3d;font:17px "Yu Mincho",serif;white-space:nowrap}
#flight-result .result-income{margin-top:12px;padding-top:9px;border-top:1px solid #fff4d744;font-size:13px;text-align:left;text-shadow:none}
.result-income>div{display:flex;justify-content:space-between;align-items:baseline;gap:10px;line-height:1.8}.result-income output{font-size:19px;white-space:nowrap}
#flight-result #result-reward{color:#ffdf9b}#flight-result .money-increase{color:#ffdf9b!important}#flight-result .money-decrease{color:#ffc6ad!important}
#game-frame[data-phase=result]{--inset-bottom:440px}
#upgrade-dialog{z-index:2000;overflow:hidden;text-shadow:none}#upgrade-dialog .upgrade-item h3{margin-top:0}
@media(max-width:390px){#upgrade-open{font-size:14px;padding:8px 10px}#throw-button{font-size:16px}#upgrade-dialog .upgrade-item{grid-template-columns:1fr;gap:4px}#upgrade-dialog .upgrade-level{justify-content:flex-end}}

/* Size the game HUD from the portrait game area, including on wide PC windows. */
#flight-controls{left:50%;right:auto;transform:translateX(-50%);bottom:max(20px,env(safe-area-inset-bottom));gap:10px}
#throw-button{min-width:0;font-size:clamp(14px,4.2cqw,20px);letter-spacing:.04em}
#upgrade-open{font-size:clamp(13px,3.8cqw,17px);padding:8px 12px}
#flight-result{left:50%;right:auto;transform:translateX(-50%);width:min(90%,410px);bottom:var(--result-bottom,100px)}
#game-frame #map-panel{bottom:calc(var(--inset-bottom) + var(--inset-close-height,min(21cqw,120px)) + 10px)}
#game-frame[data-compact=true] #flight-result{padding:10px 12px}
#game-frame[data-compact=true] #flight-result h2{font-size:17px;line-height:1.3;margin:0 0 4px}
#game-frame[data-compact=true] .score-total{display:flex;align-items:baseline;justify-content:center;gap:5px;line-height:1.1}
#game-frame[data-compact=true] .score-total>span{display:inline;font-size:10px;letter-spacing:0;margin:0}
#game-frame[data-compact=true] .score-total strong{font-size:40px}
#game-frame[data-compact=true] .score-breakdown{margin:7px 0;gap:8px}
#game-frame[data-compact=true] .score-breakdown dt{font-size:10px;line-height:1.3}
#game-frame[data-compact=true] .score-breakdown dd{font-size:18px;line-height:1.3}
#game-frame[data-compact=true] #flight-result .result-extras{font-size:10px;line-height:1.3;gap:10px}
#game-frame[data-compact=true] #flight-result .result-income{margin-top:7px;padding-top:6px;font-size:11px}
#game-frame[data-compact=true] .result-income>div{line-height:1.6}
#game-frame[data-compact=true] .result-income output{font-size:17px}
#game-frame[data-short=true][data-phase=result] :is(#flight-hud,#map-panel,#closeup-inset){display:none}
@container (max-width:440px){
 #title-screen .title-logo{font-size:clamp(17px,5cqw,22px)}
 #ideal-profile{right:12px;top:76px;width:clamp(62px,20cqw,90px);padding:8px 5px 0}
 #ideal-profile>span{font-size:12px}
 #flight-hud{left:16px;gap:4px 14px}
 #flight-hud span{font-size:11px;letter-spacing:0}
 #flight-hud output{font-size:28px}
 #flight-hud .live-score output{font-size:25px}
 .game-bar{right:12px}.game-bar .icon-button{width:38px;height:38px}
}
@container (max-width:280px){
 #sanding-hud{top:64px;line-height:1.2}
 #sanding-hud output{font-size:32px}
 #sanding-hud small{font-size:14px}
}

#throw-review-panel{position:absolute;left:12px;right:12px;bottom:16px;z-index:8;padding:12px;background:#152623ee;color:#fff;border:1px solid #fff8;border-radius:6px;font:13px/1.5 sans-serif}
#throw-review-panel p{margin:4px 0;font-size:12px}#throw-review-panel output{display:block;font-variant-numeric:tabular-nums}
#throw-review-panel>div{display:flex;gap:8px;margin-top:8px}#throw-review-panel button{flex:1;min-width:0;min-height:40px;padding:6px;font:13px sans-serif}
#game-frame.throw-review #closeup-inset{top:80px;right:12px;bottom:auto;width:50cqw;height:auto;aspect-ratio:4/3}

@container (max-width:360px){#sanding-finish{left:max(12px,env(safe-area-inset-left));min-width:80px;padding:8px 14px}}

.story p{line-height:2}
#work-reflection{position:absolute;left:18px;right:152px;top:84px;z-index:4;margin:0;pointer-events:none;color:#f0e7d3;font:600 clamp(13px,3.5cqw,16px)/1.6 "Yu Mincho","Hiragino Mincho ProN",serif;overflow-wrap:anywhere;-webkit-text-stroke:2px #111;paint-order:stroke fill;text-shadow:0 2px 3px #0009;transition:opacity .35s;opacity:1}
#work-reflection.is-fading{opacity:0}
#board-grab-hint{position:absolute;z-index:3;border:2px dashed #fff;border-radius:3px;pointer-events:none;filter:drop-shadow(0 1px 2px #111);box-sizing:border-box}
#board-grab-hint>span{position:absolute;left:50%;top:-28px;transform:translateX(-50%);white-space:nowrap;color:#fff;font:600 16px/1.4 "Yu Mincho",serif;-webkit-text-stroke:2px #111;paint-order:stroke fill}
#board-grab-hint[data-label-inside=true]>span{top:4px}
#flight-result #new-best{display:block;font-size:13px;line-height:1.4;margin:0 0 3px;letter-spacing:.06em;color:#ffdf9b}
.work-glyph{position:relative;animation:work-glyph-rise .18s ease-out both}
.work-word{display:inline-block;white-space:nowrap}
@keyframes work-glyph-rise{from{opacity:0;top:.5em}to{opacity:1;top:0}}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@container(max-width:440px){#work-reflection{right:calc(clamp(62px,20cqw,90px) + 28px)}}
@container(max-height:520px){#work-reflection{top:auto;bottom:14px;left:18px;right:18px;text-align:center;font-size:12px}}
@media(prefers-reduced-motion:reduce){.work-glyph{animation:work-glyph-rise .08s linear both}}

#final-profile{position:absolute;left:18px;top:24px;width:100px;aspect-ratio:120/148;z-index:4;display:flex;flex-direction:column;align-items:stretch;pointer-events:none;color:#fff8e8;background:#283e33a6;border:1px solid #f5f3dc99;border-radius:4px;backdrop-filter:blur(4px);overflow:hidden}
#final-profile svg{display:block;flex:1;width:100%;min-height:0}
#final-stock-outline{fill:none;stroke:#fff8e866;stroke-width:1;stroke-dasharray:3 3}
#final-section{fill:#f4dba9;stroke:#fff9e7;stroke-width:1.3;stroke-linejoin:round}
#final-profile text{fill:white;stroke:#111;stroke-width:2px;paint-order:stroke fill;font:600 10px "Yu Mincho",serif}
#game-frame[data-compact=true][data-phase=result] #flight-hud{display:none}

#flight-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
#flight-caption{grid-column:1/-1}
#post-x{display:grid;place-items:center;min-height:55px;padding:8px 12px;border:1px solid #fff8;border-radius:5px;background:#101214;color:#fff;text-decoration:none;text-align:center;font:600 clamp(14px,4.2cqw,20px) "Yu Mincho",serif;letter-spacing:.03em;pointer-events:auto}
#post-x:hover{background:#2a2d30}
#flight-controls :is(#throw-again,#throw-button,#upgrade-open){width:100%;min-width:0;padding:8px 10px;white-space:normal}
#game-frame[data-short=true][data-phase=result] #post-x{min-height:36px;padding:5px 8px;font-size:13px}

/* Compact results: actions stay at the bottom; all measurements fit above. */
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] #flight-controls{left:50%;right:auto;top:auto;bottom:max(12px,env(safe-area-inset-bottom));transform:translateX(-50%);box-sizing:border-box;width:calc(100% - 24px);max-width:410px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;z-index:8}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] #flight-controls :is(button,a){box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:8px 6px;font-size:clamp(13px,4cqw,17px);line-height:1.25;letter-spacing:0;white-space:normal}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] #flight-result{box-sizing:border-box;top:auto;left:50%;right:auto;bottom:var(--result-bottom,116px);transform:translateX(-50%);width:calc(100% - 24px);max-width:410px;padding:8px 12px;font-size:12px}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .result-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);align-items:center;gap:12px}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .score-total{display:block;line-height:1.05;text-align:center}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .score-total>span{display:block;font-size:11px;line-height:1.3;margin:0;letter-spacing:.03em}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .score-total strong{font-size:clamp(30px,9.5cqw,42px);line-height:1.1;font-weight:400}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .score-total small{font-size:13px;margin-left:4px}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .result-best-line{display:flex;align-items:baseline;justify-content:center;gap:5px;margin:9px 0 0;font-size:11px;line-height:1.3}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] #result-best{font-size:13px;white-space:nowrap}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .score-breakdown{display:flex;flex-direction:column;justify-content:center;gap:8px;margin:0}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .score-breakdown>div{display:block;text-align:left}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .score-breakdown dt{font-size:11px;line-height:1.3;max-width:none;white-space:nowrap}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .score-breakdown dd{font-size:19px;line-height:1.2;margin:1px 0 0;white-space:nowrap}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] #flight-result .result-extras{display:flex;justify-content:center;flex-wrap:wrap;gap:4px 12px;margin:5px 0 0;font-size:10px;line-height:1.3}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] #flight-result .result-income{margin-top:5px;padding-top:5px;font-size:11px}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .result-income>div{line-height:1.3;gap:8px}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] .result-income output{font-size:17px}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] #new-best{font-size:12px;line-height:1.3;margin:0 0 3px}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result][data-result-media=true] :is(#final-profile,#map-panel,#closeup-inset){display:block;box-sizing:border-box;max-width:none;aspect-ratio:auto}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result][data-result-media=false] :is(#final-profile,#map-panel,#closeup-inset){display:none!important}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] #flight-map{height:100%;width:100%}

#work-reflection,#sanding-intro{font-size:clamp(16px,4.6cqw,20px);line-height:1.6}
#sanding-intro{position:absolute;left:18px;right:152px;top:84px;z-index:4;margin:0;pointer-events:none;color:#f0e7d3;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-weight:600;overflow-wrap:anywhere;-webkit-text-stroke:2px #111;paint-order:stroke fill;text-shadow:0 2px 3px #0009}
#sanding-intro>span{display:block}
@container(max-width:440px){#sanding-intro{right:calc(clamp(62px,20cqw,90px) + 28px)}}
@container(max-height:520px){#sanding-intro{top:auto;bottom:14px;left:18px;right:18px;text-align:center}}
#game-frame:not(.ideal-debug):not(.throw-review)[data-phase=result] #closeup-inset{display:none!important}
