*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#e7c5a8;font-family:Arial,"Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",sans-serif;color:#243c42}body{touch-action:none;user-select:none;-webkit-user-select:none}canvas{display:block;width:100%;height:100%;outline:0}button,a{font:inherit;color:inherit}button{cursor:pointer;border:0}button:focus-visible,a:focus-visible{outline:3px solid #e74879;outline-offset:5px}#top{position:fixed;top:max(16px,env(safe-area-inset-top));left:20px;right:20px;display:flex;align-items:center;gap:7px;z-index:8}#top button{height:33px;min-width:33px;background:#fffbebc9;border-radius:50%;font-size:17px}#languages{margin-left:auto;display:flex;gap:4px}#languages button{border-radius:2px;font-size:11px;padding:0 9px;background:transparent}#languages button.active{background:#243c42;color:#fff9e9}#top #pause{display:none}.playing #top #pause{display:block}.overlay{position:fixed;inset:0;pointer-events:none}.hidden{display:none!important}.overlay button,.overlay a{pointer-events:auto}.wordmark{position:absolute;top:14%;left:8%;font-weight:900;letter-spacing:-.065em;line-height:.78;transform:rotate(-5deg);color:#263e44;text-shadow:0 2px 0 #fff2d4}.wordmark>span{font-size:clamp(22px,4.5vw,75px);letter-spacing:.04em}.wordmark strong{display:block;font-size:clamp(92px,20vw,300px);font-style:italic}.period{color:#e54a76}.title-bottom{position:absolute;bottom:max(7%,env(safe-area-inset-bottom));left:8%;right:8%;display:flex;align-items:end;justify-content:space-between;gap:20px}.edition{font-size:10px;letter-spacing:.2em;font-weight:700}.primary{background:#243e44!important;color:#fff9e9!important;padding:16px 36px!important;font-weight:800!important;letter-spacing:.04em;box-shadow:5px 5px 0 #f3bd7b!important;transform:skew(-5deg)}.title-bottom .primary{font-size:21px;min-width:170px}.result-copy{position:absolute;top:17%;left:9%;max-width:82%;text-shadow:0 1px #ffe9c2}.eyebrow{font-size:12px;font-weight:700;letter-spacing:.16em}#finalScore{font-weight:900;font-style:italic;font-size:clamp(70px,12vw,180px);letter-spacing:-.07em;line-height:1.05}#rank{font-size:clamp(17px,2.3vw,30px);font-weight:800}#stats{font-size:12px;letter-spacing:.06em;margin-top:15px}.result-actions{position:absolute;bottom:max(6%,env(safe-area-inset-bottom));left:9%;right:9%;display:flex;align-items:center;gap:22px;flex-wrap:wrap}.result-actions button:not(.primary),.result-actions a{background:none;text-decoration:none;border-bottom:1px solid #355457;padding:10px 0;font-size:12px;font-weight:700}.result-actions .primary{font-size:17px}.result-actions a{margin-left:auto}#paused{background:#213b4459;display:grid;place-items:center;backdrop-filter:blur(5px)}#paused button{font-size:22px}dialog{border:none;padding:25px;width:min(780px,94vw);background:#fff6e5;color:#263e44;max-height:92dvh;overflow:auto;box-shadow:0 18px 90px #21313b55}dialog::backdrop{background:#203b46b8;backdrop-filter:blur(8px)}dialog img{width:100%;height:auto;display:block;user-select:auto;-webkit-user-select:auto;touch-action:auto}dialog p{font-size:13px;line-height:1.6;margin:15px 0}.close{float:right;background:none;font-size:28px;margin:-17px -14px 6px 0}.share-actions{display:flex;gap:10px;flex-wrap:wrap}.share-actions button{padding:12px 17px;background:#243e44;color:#fff9e9;font-size:12px}.share-actions button:disabled{opacity:.4;cursor:default}@media(max-width:600px){#top{left:12px;right:12px}.wordmark{top:17%;left:7%}.wordmark>span{font-size:7.5vw}.wordmark strong{font-size:29vw}.title-bottom{bottom:10%;align-items:start;flex-direction:column;gap:15px}.edition{font-size:9px}.result-copy{top:18%;left:7%}#finalScore{font-size:24vw}.result-actions{bottom:7%;left:7%;right:7%;gap:14px 20px;display:grid;grid-template-columns:1fr 1fr}.result-actions .primary{grid-column:span 2}.result-actions a{margin-left:0}#stats{max-width:80%;line-height:1.7}.share-actions button{flex:1}dialog{padding:18px}}@media(max-height:460px){.wordmark{top:18%}.wordmark strong{font-size:30vh}.wordmark>span{font-size:6vh}.title-bottom{bottom:8%}.result-copy{top:20%}#finalScore{font-size:22vh}.result-actions{bottom:7%;gap:18px}.result-actions .primary{padding:12px 25px!important}#stats{margin-top:5px}}
@media(max-width:600px){.wordmark strong{font-size:26vw}.wordmark{max-width:86vw}}
/* Third-person session: scenery and action occupy the whole screen. */
#hud{position:fixed;right:24px;top:83px;z-index:5;text-align:right;pointer-events:none;color:#fff2d3;text-shadow:0 2px 8px #29464b99}#hudScore{font-size:39px;font-style:italic;font-weight:900;letter-spacing:-.055em}#hudMult{font-size:15px;font-weight:800;margin-right:14px}#hudSpeed{font-size:11px;font-weight:700;opacity:.8}#progress{position:fixed;left:0;top:0;width:100vw;height:3px;background:#f090a7;transform-origin:left}#action-pop{position:fixed;top:70%;left:0;right:0;text-align:center;font-size:24px;font-weight:900;font-style:italic;color:#fff4ce;letter-spacing:.03em;text-shadow:0 2px 8px #29484b88;pointer-events:none;transition:opacity .08s}#crash-prompt{position:fixed;left:0;right:0;top:41%;text-align:center;font-weight:800;color:#fff7de;font-size:19px;pointer-events:none;text-shadow:0 2px 8px #29484b}#loading-status{position:fixed;bottom:4%;left:8%;font-size:12px;color:#243e44}#loading-status:empty{display:none}button:disabled{opacity:.5;cursor:wait}#qa-panel{position:fixed;bottom:6px;right:6px;z-index:20;max-width:350px;background:#fff9e8ed;color:#25444a;font:10px monospace;padding:6px;max-height:43vh;overflow:auto;touch-action:auto;user-select:text}#qa-buttons{display:flex;gap:5px;flex-wrap:wrap;margin:7px 0}#qa-buttons button{padding:5px;background:#d8e5d7;font-size:10px}#qa-panel pre{white-space:pre-wrap;margin:5px 0}.result-copy{color:#fff1d3;text-shadow:0 2px 8px #244750b8}.result-actions button:not(.primary),.result-actions a{color:#fff2d3;border-color:#fff2d3;text-shadow:0 1px 4px #244750}.wordmark{top:13%;font-size:80%;text-shadow:0 2px 0 #ffe6bf99}.wordmark strong{font-size:clamp(90px,17vw,250px)}@media(max-width:600px){#hud{right:15px;top:75px}#hudScore{font-size:31px}#hudSpeed{display:block;margin-top:5px}.wordmark{top:17%}.wordmark strong{font-size:25vw}.result-copy{top:16%}.result-actions{bottom:5%}#action-pop{font-size:21px}}
#qa-poses{display:flex;gap:4px;flex-wrap:wrap;border-top:1px solid #b5c6b3;padding-top:6px}#qa-poses button{padding:4px;background:#ecd8b7;font-size:10px}
/* Keep the ridge, the open canal and the start affordance in the first frame. */
.wordmark {top:13%;left:6%;color:#21343c}
.wordmark strong {font-size:clamp(82px,13.5vw,190px)}
.wordmark>span {font-size:clamp(22px,3.1vw,48px)}
@media(max-width:600px){.wordmark{top:13%;left:7%}.wordmark strong{font-size:23vw}.wordmark>span{font-size:6.2vw}}
.story-slip {max-width:29rem;padding:.65rem 1.1rem .75rem;border-left:3px solid #fa9c92;background:linear-gradient(95deg,#142f3fe8,#173c49b8 70%,transparent);color:#fff1db;text-shadow:0 1px 3px #183440}
.story-slip .edition {display:block;margin:0 0 .35rem;color:#ffd5af;letter-spacing:.11em}
.story-slip p {margin:0;font-size:clamp(14px,1.3vw,19px);font-weight:700;line-height:1.55}
.story-slip small {display:block;margin-top:.36rem;font-size:11px;color:#ffe4c7}
#artLabel {font-size:12px;font-weight:800;letter-spacing:.1em}
.score-line {display:flex;align-items:baseline;justify-content:flex-end;gap:5px}
#nextCall {font-size:13px;font-weight:800}
#calls {display:flex;justify-content:flex-end;gap:4px;margin:1px 0 4px}
#calls svg {width:25px;height:16px;fill:#29435288;stroke:#fff0d6;stroke-width:1.8px;filter:drop-shadow(0 1px 2px #25424d)}
#calls svg.home {fill:#ff77a2;stroke:#fff0ce}
#action-pop {top:auto;bottom:14%;font-weight:900;font-size:clamp(18px,2.3vw,30px);color:#fff0d1;text-shadow:0 2px 5px #54313f,0 0 12px #35373773}
@media(max-width:600px){.title-bottom{bottom:5.5%;gap:12px}.story-slip{max-width:87vw}.story-slip p{font-size:14px}#artLabel{font-size:10px}#calls svg{width:21px}}
@media(max-height:500px){.story-slip{max-width:48vw}.story-slip p{font-size:13px}.title-bottom{flex-direction:row;align-items:end}}
#homeLabel{font-weight:800;font-size:12px;letter-spacing:.09em}
#hud .score-line small{font-weight:800;font-size:14px}
#artLabel{font-size:12px;margin:2px 0}
#finalScore{font-size:clamp(42px,7.8vw,106px);line-height:1.04;margin:.16em 0}
.failed .result-copy{color:#fff5df;text-shadow:0 2px 7px #382c30}
.failed #result{background:linear-gradient(90deg,#34293699,transparent 75%)}
.failed #resultLabel{color:#ffcd9c}
.failed #rank{font-size:clamp(18px,2.4vw,32px)}
#finalScore{overflow-wrap:anywhere}
@media(max-width:600px){#finalScore{font-size:clamp(36px,10vw,58px)}}
#action-pop.gate-success{bottom:18%;font-size:clamp(24px,3.2vw,44px);color:#fff4b7;animation:gate-stamp .43s cubic-bezier(.2,.75,.3,1)}
@keyframes gate-stamp{0%{transform:translateY(16px) scale(.74);filter:brightness(1.65)}45%{transform:translateY(-3px) scale(1.12)}100%{transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){#action-pop.gate-success{animation:none}}

#gesture{display:flex;gap:22px;margin-top:14px;align-items:center}
.gesture-item{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:800;white-space:nowrap}
.gesture-item svg{width:58px;height:38px;overflow:visible;fill:none;stroke:#ffe5b4;stroke-width:2.2;stroke-linecap:round}
.hop-path{stroke-dasharray:3 5;opacity:.6}
.tap-dot,.swipe-dot{fill:#ff89a5;stroke:#fff1d9}
.tap-dot{animation:tap-hop 1.7s ease-in-out infinite}
.swipe-dot{animation:side-hop 1.9s ease-in-out infinite}
@keyframes tap-hop{0%,100%{transform:translate(0,0)}50%{transform:translate(22px,-19px)}}
@keyframes side-hop{0%,100%{transform:translate(-21px,9px)}50%{transform:translate(21px,9px)}}
@media(max-width:600px){#gesture{gap:12px}.gesture-item{font-size:11px;gap:3px}.gesture-item svg{width:42px}}
@media(prefers-reduced-motion:reduce){.tap-dot,.swipe-dot{animation:none}}

#action-pop{bottom:auto;top:192px;right:24px;left:auto;font-size:17px;pointer-events:none}

#stats{white-space:pre-line;line-height:1.65}
