:root{--paper:#f5f1e6;--ink:#293f37;--muted:#7d8774;--orange:#e47749;--green:#66845b;--line:#d8dccc;font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--orange);outline-offset:4px}button:disabled{opacity:.28;cursor:default}[hidden]{display:none!important}button{border:0;background:none}a{color:inherit;text-decoration:none}h1,h2,p{margin:0}body.playing{overflow:hidden;overscroll-behavior:none}.studio{max-width:1160px;margin:0 auto;padding:0 40px 25px}.start-bar{position:sticky;top:0;z-index:5;padding:18px 0 14px;display:flex;align-items:center;justify-content:space-between;background:#f5f1e6f5;border-bottom:1px solid var(--line)}.wordmark{font-size:13px;letter-spacing:.12em;font-weight:800}.wordmark span{display:inline-grid;place-items:center;border:1px solid var(--ink);width:24px;height:24px;border-radius:50%;font-size:10px;margin-left:10px}.primary{background:var(--ink);color:#fffdf5;padding:17px 26px;border-radius:7px;font-weight:800;font-size:15px;transition:background .15s,transform .15s}.primary:hover{background:#48614f}.primary:active{transform:translateY(2px)}.primary span{margin-left:32px;font-size:23px;line-height:0}.intro{padding:35px 0 28px;position:relative}.eyebrow{font-size:10px;font-weight:800;letter-spacing:.2em;color:var(--muted)}.intro .eyebrow{display:flex;align-items:center;gap:8px}.eyebrow span{width:6px;height:6px;background:var(--orange);border-radius:100%}h1{font-size:42px;letter-spacing:.025em;line-height:1.27;margin-top:16px;font-weight:900}h1 br{display:none}.jump-title{display:inline-block;font-size:25px;color:var(--orange);transform:rotate(-9deg);margin-left:18px;letter-spacing:-.06em;border-bottom:2px solid var(--orange);padding-bottom:3px}.intro p{font-size:13px;color:var(--muted);margin-top:15px;letter-spacing:.08em}.workbench{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(280px,1fr);gap:35px;align-items:start}.paint-card{border:1px solid #dbdece;background:#fdfcf6;border-radius:12px;padding:15px;box-shadow:0 8px 30px #45523406}.paper-label{display:flex;justify-content:space-between;padding:3px 6px 14px;font-size:9px;font-weight:700;letter-spacing:.14em;color:var(--muted)}.paper-label span:last-child{font-size:10px;letter-spacing:.02em}.canvas-wrap{position:relative;aspect-ratio:1;width:100%;background-color:#fffef9;background-image:linear-gradient(#869f7c1c 1px,transparent 1px),linear-gradient(90deg,#869f7c1c 1px,transparent 1px);background-size:10% 10%;border:1px solid #e4e7db}.canvas-wrap canvas{width:100%;height:100%;display:block;touch-action:none;cursor:crosshair}.canvas-wrap>span{position:absolute;bottom:17px;width:100%;left:0;text-align:center;font-size:12px;color:#98a58c;pointer-events:none;transition:opacity .2s}.corner{position:absolute;width:12px;height:12px;border:solid #9dac8d;pointer-events:none}.tl{top:-1px;left:-1px;border-width:2px 0 0 2px}.tr{top:-1px;right:-1px;border-width:2px 2px 0 0}.bl{bottom:-1px;left:-1px;border-width:0 0 2px 2px}.br{bottom:-1px;right:-1px;border-width:0 2px 2px 0}.canvas-footer{display:flex;justify-content:space-between;align-items:center;padding:10px 2px 0}.canvas-footer>span{font-size:8px;color:#8e9a84;letter-spacing:.16em;font-weight:800}.canvas-footer>span i{display:inline-block;width:5px;height:5px;background:#85a976;border-radius:50%;margin-right:5px}.history{display:flex;gap:4px;align-items:center}.history button{height:34px;min-width:36px;font-size:22px;border-radius:5px}.history button:hover{background:#e8ebdf}.history .clear{font-size:11px;margin-left:8px}.tool-section{padding:8px 0 21px;border-bottom:1px solid var(--line);margin-bottom:19px}.section-label{font-size:10px;color:#a8af9e;letter-spacing:.12em;margin-bottom:17px}.section-label span{color:var(--ink);font-size:12px;font-weight:800;letter-spacing:.06em;margin-left:10px}.palette{display:flex;gap:10px;flex-wrap:wrap}.color-swatch{width:28px;height:28px;background:var(--swatch);border-radius:50%;border:1px solid #263c351c;position:relative;min-width:28px}.color-swatch.selected:after{content:"";position:absolute;inset:-5px;border:1.5px solid var(--ink);border-radius:50%}.custom-label{margin-top:17px;display:flex;align-items:center;gap:10px;font-size:11px;color:var(--muted)}input[type=color]{width:26px;height:24px;border:0;padding:0;background:none;cursor:pointer}.tool-row{display:flex;gap:6px;margin-top:20px}.tool-row button{flex:1;padding:11px 5px;background:#eaece2;border-radius:6px;font-size:12px;white-space:nowrap}.tool-row .active{background:var(--ink);color:#fdfbf3}.size-row{display:flex;align-items:center;gap:7px;margin-top:12px;font-size:11px}.size-row>span{color:var(--muted);margin-right:5px}.size-row button{height:32px;width:34px;display:grid;place-items:center;border-radius:5px}.size-row button.active{background:#e1e5d8}.size-row i{width:var(--size);height:var(--size);border-radius:50%;background:var(--ink)}.size-row #symmetry{width:auto;display:flex;gap:6px;margin-left:auto;font-size:10px}.size-row b{font-size:9px;color:#778973}.templates{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.templates button{padding:13px 2px;border:1px solid #cdd3c2;border-radius:6px;font-size:12px;background:#faf8f0}.templates button:hover{border-color:var(--orange);background:#f2e5d7}.play-guide{position:relative;padding:21px 23px 18px;background:#e8eddc;border-radius:9px;overflow:hidden}.guide-icon{position:absolute;top:9px;right:18px;color:#9ab28c;font-size:72px;line-height:1}.play-guide h2{font-size:21px;line-height:1.5;letter-spacing:.03em}.key-guide{display:flex;gap:15px;margin-top:19px;font-size:10px;flex-wrap:wrap}.key-guide>span{display:flex;align-items:center;gap:4px}kbd{font:800 9px inherit;display:inline-block;background:#fbfcf2;border:1px solid #c4cdb6;border-bottom-width:3px;border-radius:4px;padding:3px 6px}.play-guide p{font-size:11px;color:#77846b;line-height:1.9;margin-top:13px}.guide-route{display:flex;gap:9px;align-items:center;border-top:1px solid #ccd6bf;margin-top:17px;padding-top:14px;font-size:9px;color:#748168}.guide-route i{flex:1;border-top:1px dashed #a8b69b}.guide-route b{font-size:23px;color:var(--orange)}.studio-footer{display:flex;justify-content:space-between;gap:20px;padding:25px 0 0;color:#929984;font-size:10px;letter-spacing:.06em}.studio-footer details{max-width:340px;text-align:right}.studio-footer summary{cursor:pointer}.studio-footer p{margin:10px 0;line-height:1.7}.studio-footer button{font-size:10px;text-decoration:underline}
.game-screen{position:fixed;inset:0;background:#e7eee0}.game-screen canvas{width:100%;height:100%;display:block;touch-action:none;outline:none}.game-hud{position:absolute;top:max(18px,env(safe-area-inset-top));left:max(22px,env(safe-area-inset-left));right:max(22px,env(safe-area-inset-right));display:flex;gap:10px;align-items:center;pointer-events:none}.game-hud button{pointer-events:auto}.run-progress{width:200px;margin-right:auto;padding:12px 15px;background:#fcfcf0e8;border:1px solid #d4ddc9;border-radius:9px;backdrop-filter:blur(8px)}.hud-label{font-size:9px;font-weight:800;letter-spacing:.18em;display:flex;justify-content:space-between}.hud-label b{font-size:11px;letter-spacing:0;color:#6b855b}.progress-track{height:4px;background:#dce3d0;border-radius:5px;margin-top:7px;overflow:hidden}.progress-track i{display:block;width:0;height:100%;background:#6d8a5c;border-radius:5px}.hud-pill{height:42px;background:#fcfcf0e8;border:1px solid #d4ddc9;border-radius:25px;padding:0 14px;display:flex;align-items:center;gap:6px;font-size:13px}.growth-pill{font-size:10px}.growth-pill b{font-size:14px;color:#d17646}.round-btn{width:42px;height:42px;background:#fcfcf0e8;border:1px solid #d4ddc9;border-radius:50%;font-size:19px;flex-shrink:0}.start-hint{position:absolute;left:50%;top:25%;transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;gap:8px;background:#fcfcf0ed;padding:20px 30px;border-radius:13px;pointer-events:none;transition:opacity .5s;white-space:nowrap;border:1px solid #dce3d0}.start-hint span{font-size:12px;color:#7a8871}.start-hint strong{font-size:18px}.start-hint small{font-size:10px;color:#93a083}.checkpoint-notice{position:absolute;top:100px;left:50%;transform:translateX(-50%);background:#294235ee;color:#fdfbf1;border-radius:30px;font-size:12px;font-weight:700;padding:12px 24px;opacity:0;pointer-events:none;transition:opacity .15s;white-space:nowrap}.checkpoint-notice.visible{opacity:1}.touch-controls{position:absolute;bottom:max(28px,env(safe-area-inset-bottom));left:max(25px,env(safe-area-inset-left));right:max(25px,env(safe-area-inset-right));display:flex;justify-content:space-between;align-items:center;pointer-events:none;user-select:none;-webkit-user-select:none}.touch-controls button{pointer-events:auto;touch-action:none;border-radius:50%;background:#fdfef0b8;border:1px solid #a8b79a9c;backdrop-filter:blur(6px);width:66px;height:66px;font-size:30px;box-shadow:0 4px 0 #2e493b16;user-select:none;-webkit-user-select:none}.move-controls{display:flex;gap:13px}.touch-controls button.held{background:#294c39d9;color:#fff8dc;transform:translateY(3px);box-shadow:none}.touch-controls .jump-control{width:83px;height:83px;background:#e68148e6;color:#fff9e9;border:1px solid #ce6c34;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}.jump-control span{line-height:1;font-size:34px}.jump-control small{font-size:10px;font-weight:900;letter-spacing:.1em}.bottom-hint{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);color:#49604491;font-size:10px;white-space:nowrap;pointer-events:none}.bottom-hint span{margin-left:20px}.modal-shade{position:absolute;inset:0;display:grid;place-items:center;background:#273e3959;backdrop-filter:blur(8px);z-index:8;padding:22px}.pause-card{background:var(--paper);border-radius:15px;max-width:390px;width:100%;padding:38px;display:flex;flex-direction:column;gap:13px;box-shadow:0 20px 60px #213c3530}.pause-card h2{font-size:24px;margin:7px 0 20px}.secondary{padding:16px 24px;border:1px solid #c3ccb8;border-radius:7px;font-size:13px;font-weight:700;background:#fffdf6}.secondary:hover{background:#e8ecdf}.text-btn{font-size:12px;color:#7d8a72;padding:12px}.result-screen{min-height:100dvh;padding:28px;background:var(--paper)}.result-inner{max-width:1080px;margin:auto}.result-header{display:flex;align-items:center;justify-content:space-between;padding-bottom:23px;border-bottom:1px solid var(--line);gap:10px}.result-header>span:first-child{font-size:15px;font-weight:900}.result-header em{font-size:12px;color:var(--orange);margin-left:8px;font-style:normal}.result-heading{text-align:center;padding:30px 0 28px}.clear-stamp{display:inline-block;color:var(--orange);font-size:14px;letter-spacing:.12em;font-weight:900;transform:rotate(-6deg);margin-bottom:9px}.result-heading h2{font-size:30px;letter-spacing:.04em}.result-heading p{font-size:12px;color:var(--muted);margin-top:10px}.comparison{display:grid;grid-template-columns:1fr 40px 1fr;align-items:center;gap:12px}.comparison article{position:relative;border:1px solid #d7decc;border-radius:12px;background:#e9edde;padding:20px 18px 0;overflow:hidden}.comparison .after-card{background:#eee4d4;border-color:#dfd5c2}.compare-label{display:flex;align-items:center;gap:12px;font-size:12px;font-weight:700}.compare-label span{font-size:10px;font-weight:400;color:#839077}.comparison canvas{display:block;width:100%;height:auto}.comparison-arrow{text-align:center;font-size:30px;color:#9aa88a}.result-stats{display:flex;justify-content:center;gap:40px;padding:27px 0;font-size:11px;color:var(--muted)}.result-stats b{font-size:18px;color:var(--ink);margin-left:12px;font-variant-numeric:tabular-nums}.result-buttons{display:flex;justify-content:center;gap:12px;padding-bottom:20px}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(15px);background:#263c35f2;color:#fffdf2;border-radius:30px;padding:13px 22px;font-size:12px;opacity:0;pointer-events:none;z-index:20;max-width:90vw;text-align:center;transition:all .2s}.toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}
@media(min-width:1150px){.intro{padding-top:40px}.workbench{gap:44px}.tools{padding-top:4px}.play-guide{padding-top:25px;padding-bottom:23px}.tool-section{padding-bottom:25px;margin-bottom:22px}}
@media(max-width:760px){.studio{padding:0 20px 22px}.intro{padding:25px 0 22px}h1{font-size:32px}.jump-title{font-size:20px;margin-left:12px}.workbench{grid-template-columns:minmax(0,1fr);gap:18px}.tools{display:grid;grid-template-columns:1fr 1fr;gap:18px}.tool-section{border:0;margin:0;padding:5px 0}.tool-section:first-child{grid-column:1/-1}.palette{gap:13px}.color-swatch{width:31px;height:31px}.custom-label{position:absolute;right:24px;margin-top:12px}.tool-row{margin-top:19px;padding-right:97px}.size-row{max-width:360px}.templates{grid-template-columns:1fr 1fr}.play-guide{padding:17px;grid-column:2;grid-row:2}.play-guide h2{font-size:18px}.key-guide{gap:8px}.play-guide p{font-size:10px}.guide-icon{font-size:55px;right:7px}.guide-route{display:none}.studio-footer{padding-top:22px}.paint-card{padding:11px}.paper-label{font-size:8px}.canvas-footer{padding-top:7px}.intro p{font-size:12px}.start-bar{padding:12px 0}.wordmark{font-size:10px;letter-spacing:.04em}.wordmark span{display:none}.start-bar .primary{padding:13px 18px;font-size:12px}.primary span{margin-left:15px}.game-hud{top:max(13px,env(safe-area-inset-top));left:13px;right:13px;gap:6px}.run-progress{padding:11px 10px;width:112px;min-width:78px}.hud-pill{padding:0 10px;height:38px;gap:4px}.growth-pill{padding:0 9px;gap:4px;font-size:9px}.growth-pill b{font-size:12px}.round-btn{width:36px;height:36px;font-size:16px}.bottom-hint{display:none}.checkpoint-notice{top:83px}.result-screen{padding:22px 18px}.result-header{flex-wrap:wrap;justify-content:center;text-align:center}.result-header .eyebrow{font-size:8px;width:100%}.result-header>span:first-child{font-size:14px}.result-heading{padding:23px 0}.result-heading h2{font-size:22px}.result-heading p{font-size:10px}.comparison{grid-template-columns:1fr 18px 1fr;gap:4px}.comparison article{padding:13px 8px 0;border-radius:8px}.compare-label{font-size:9px;gap:5px}.compare-label span{display:none}.comparison-arrow{font-size:20px}.comparison canvas{min-height:180px;object-fit:contain}.result-stats{gap:17px;font-size:10px;padding:24px 0}.result-stats>span{display:flex;flex-direction:column;align-items:center;gap:5px}.result-stats b{font-size:19px;margin:0}.result-buttons{gap:8px}.result-buttons .primary{font-size:12px;padding:16px}.result-buttons .secondary{font-size:12px;padding:16px}.touch-controls{left:20px;right:20px;bottom:max(25px,env(safe-area-inset-bottom))}}
@media(max-width:390px){h1{font-size:29px}.jump-title{font-size:18px;margin-left:7px}.wordmark{font-size:9px}.palette{gap:11px}.color-swatch{width:28px;height:28px}.growth-pill>span{display:none}.play-guide h2{font-size:16px}.key-guide{font-size:8px}.studio-footer{font-size:9px}.result-heading h2{font-size:20px}}
@media(max-height:510px) and (orientation:landscape){.game-hud{top:10px}.run-progress{width:160px}.touch-controls{bottom:15px}.touch-controls button{width:53px;height:53px}.touch-controls .jump-control{width:66px;height:66px}.bottom-hint{display:none}.start-hint{top:22%;padding:12px 25px}.start-hint small{display:none}.pause-card{padding:22px;gap:8px}.pause-card h2{margin:0 0 7px}.checkpoint-notice{top:68px}}
.auto-run-label{display:flex;align-items:center;gap:7px;flex-wrap:wrap;max-width:160px;color:#53674b;font-size:11px;letter-spacing:.15em;font-weight:800;pointer-events:none}.auto-run-label i{width:6px;height:6px;background:#e47749;border-radius:50%}.auto-run-label small{width:100%;font-size:10px;letter-spacing:.03em;font-weight:500;color:#68775d;margin-top:4px}.touch-controls .jump-control{width:92px;height:92px}.jump-control small{font-size:11px}
@media(max-height:510px) and (orientation:landscape){.touch-controls .jump-control{width:68px;height:68px}.auto-run-label{font-size:9px}}
@media(max-width:560px){.comparison{grid-template-columns:1fr;gap:10px}.comparison article{padding:18px 18px 0}.compare-label{font-size:12px}.compare-label span{display:inline}.comparison-arrow{transform:rotate(90deg);height:24px;font-size:24px;line-height:24px}.comparison canvas{min-height:0;max-height:290px}.result-heading{padding:20px 0}.result-header{padding-bottom:17px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Keep the drawing and the before/after images ahead of explanatory copy. */
.intro{padding:22px 0}.intro h1{margin-top:0}.canvas-footer{justify-content:flex-end}.studio-footer{justify-content:flex-end}.touch-controls{justify-content:flex-end}.growth-pill>span{display:inline}.result-heading{padding:18px 0}.result-heading h2{font-size:22px}

/* Fit the complete before/after keepsake within the visible phone screen. */
.result-screen{padding:16px 18px}.result-header{padding-bottom:10px}.result-heading{display:flex;justify-content:center;align-items:center;gap:12px;padding:12px 0}.result-heading .clear-stamp{margin:0;font-size:12px}.result-heading h2{font-size:20px}.result-stats{padding:12px 0;gap:28px}.result-buttons{padding-bottom:0}.result-buttons button{padding:12px 18px}.comparison canvas{object-fit:contain;max-height:min(58svh,460px)}
@media(max-width:560px){.result-screen{padding:12px 14px max(12px,env(safe-area-inset-bottom))}.result-header>span:first-child{font-size:13px}.result-header em{font-size:10px}.comparison{grid-template-columns:minmax(0,1fr);gap:8px}.comparison article{padding:8px 10px 0}.comparison-arrow{display:none}.comparison canvas{height:clamp(100px,calc((100svh - 230px)/2),280px);min-height:0;max-height:none}.compare-label{font-size:11px}.compare-label span{display:none}.result-stats>span{display:block}.result-stats b{font-size:17px;margin-left:8px}.result-buttons .primary,.result-buttons .secondary{padding:11px 16px}}

.canvas-footer{justify-content:space-between;gap:8px}.import-image{border:1px solid #c3ccb8;border-radius:6px;padding:9px 12px;font-size:12px;background:#fffdf6;white-space:nowrap}.import-image:disabled{opacity:.5}
