*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#061419;color:#d3ded5;font-family:Arial,sans-serif;overscroll-behavior:none;touch-action:none}body{height:100dvh}button{font:inherit;color:inherit;cursor:pointer;background:none;border:0;touch-action:none;user-select:none;-webkit-user-select:none}button:focus-visible{outline:1px solid #edc991;outline-offset:7px}canvas{display:block;position:fixed;inset:0;width:100%;height:100%}.grain{position:fixed;inset:0;pointer-events:none;opacity:.035;z-index:2;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.6' d='M0 0h180v180H0z'/%3E%3C/svg%3E")}#hud{position:fixed;z-index:4;top:max(24px,env(safe-area-inset-top));left:max(32px,env(safe-area-inset-left));right:max(26px,env(safe-area-inset-right));display:flex;justify-content:space-between;align-items:center;opacity:0;transition:opacity 1.5s;pointer-events:none}#hud.visible{opacity:.65}#hud .wordmark{font:15px Georgia,serif;letter-spacing:6px}.tools{display:flex;gap:22px;align-items:center;pointer-events:auto}.tools button{font-size:10px;letter-spacing:2px;min-height:40px;min-width:40px}.tools span{font-size:17px}.tools #pause{font-size:17px}.veil{position:fixed;inset:0;z-index:6;display:flex;align-items:center;justify-content:center;text-align:center;background:linear-gradient(90deg,rgba(3,15,19,.79),rgba(3,15,19,.12) 75%);transition:opacity 1.2s,visibility 1.2s}.hidden{opacity:0!important;visibility:hidden;pointer-events:none!important}#intro{justify-content:flex-start;text-align:left}.intro-inner{margin-left:10%;margin-top:-3vh}.eyebrow{font-size:10px;letter-spacing:4px;color:#a4bcb7}h1{font-family:Georgia,'Times New Roman',serif;font-size:clamp(80px,10vw,150px);font-weight:400;letter-spacing:.14em;line-height:1;margin:24px 0 16px;color:#e7e7d5;text-shadow:0 0 50px #c7d5b81a}p{margin:0}.subtitle{letter-spacing:5px;font-size:11px;color:#baccc5}.hairline{height:1px;width:42px;background:#a4b3a67a;margin:30px 0 25px}.poem{font-family:Georgia,serif;font-size:19px;font-weight:400;line-height:1.8;color:#b5c6bf}.primary{border:1px solid #c0cfb75c;padding:19px 24px;min-width:190px;text-align:left;letter-spacing:3px;font-size:10px;margin-top:35px;transition:background .3s,border-color .3s;background:#b2c0a70a}.primary:hover{background:#bec8aa17;border-color:#d5d3aa}.primary span{float:right;margin-left:40px;font-size:15px;line-height:10px;color:#e4cb96}.sound-note{font-size:10px;letter-spacing:1.5px;color:#7e9992;margin-top:20px}.intro-footer{position:absolute;bottom:max(28px,env(safe-area-inset-bottom));left:5%;right:5%;display:flex;justify-content:space-between;font-size:8px;letter-spacing:2px;color:#718e88}.menu-inner{padding:30px;max-width:620px}.menu-inner h2{font:normal 44px Georgia,serif;margin:24px 0}.menu-inner .primary{display:block;margin:30px auto 20px}.text-button{display:block;font-size:11px;margin:18px auto;color:#aabfb4;border-bottom:1px solid #aabfb444;padding:7px;letter-spacing:.5px}.help{font-size:11px;color:#7c9a91;line-height:1.9;margin-top:26px}#pauseMenu{background:#041217df;backdrop-filter:blur(8px)}#ending{background:#061c20a8;backdrop-filter:blur(7px)}#ending h2{font-size:72px;letter-spacing:.2em}#chapter{position:fixed;left:7%;top:22%;font-size:9px;letter-spacing:4px;z-index:4;opacity:0;transition:opacity 2s;pointer-events:none}#chapter span{display:block;color:#8ca99b;font:italic 30px Georgia,serif;letter-spacing:0;margin-bottom:14px}#hint{position:fixed;bottom:12%;left:50%;transform:translateX(-50%);z-index:4;font-size:11px;letter-spacing:1.5px;color:#d1d8bf;text-align:center;white-space:nowrap;opacity:0;transition:opacity .5s;text-shadow:0 2px 10px #000;background:#06181c60;padding:10px 16px;pointer-events:none}#hint.visible{opacity:1}#touch{display:none;position:fixed;z-index:5;bottom:max(22px,env(safe-area-inset-bottom));left:max(26px,env(safe-area-inset-left));right:max(26px,env(safe-area-inset-right));justify-content:space-between;pointer-events:none;opacity:0;transition:opacity 1s}#touch.visible{opacity:.68}#touch>div{display:flex;gap:13px}#touch button{pointer-events:auto;width:58px;height:58px;border:1px solid #d7e4cf38;border-radius:50%;background:#0b222740;color:#c6d6c4;font-size:34px;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(2px)}#touch button:active,#touch button.active{background:#bcd4af2f;border-color:#c6d6c4a0}#touch svg{width:27px;height:27px}#touch #interact{width:62px;height:62px;margin-top:-4px;border-color:#d3c09566;color:#dfc58d}#touch #interact.available{box-shadow:0 0 22px #d6c38925;border-color:#dfc58d}.touch #touch{display:flex}@media(max-width:700px){.intro-inner{margin-left:8%;margin-top:-3vh}h1{font-size:77px}.eyebrow{font-size:8px;letter-spacing:3px}.subtitle{font-size:8px;letter-spacing:3.5px}.poem{font-size:17px}.desktop-only{display:none}.intro-footer{font-size:7px;letter-spacing:1.3px}#hud{left:22px;right:18px;top:max(12px,env(safe-area-inset-top))}#hint{font-size:9px;letter-spacing:.7px;bottom:115px;max-width:90vw;white-space:normal;width:max-content}#chapter{top:17%;left:8%;font-size:8px}.tools{gap:6px}}@media(max-height:500px){.intro-inner{margin-left:9%;margin-top:0}h1{font-size:70px;margin:10px 0}.eyebrow{font-size:8px}.subtitle{font-size:8px}.hairline{margin:16px 0}.poem{font-size:15px}.primary{margin-top:17px;padding:14px 20px}.sound-note{margin-top:12px;font-size:8px}.intro-footer{bottom:15px;font-size:7px}.menu-inner h2{font-size:30px;margin:10px}.menu-inner .primary{margin-top:15px}.help{margin-top:10px}.text-button{margin:8px auto}#touch button{width:49px;height:49px}#touch #interact{width:54px;height:54px}#touch{bottom:max(12px,env(safe-area-inset-bottom))}#hint{bottom:78px}}

.enter-arrow{width:15px;height:15px;float:right;margin-left:35px;margin-top:-2px;color:#dfca9b}

/* v0.2: full-screen gestures, no directional button overlay. */
#gestureSurface{position:fixed;inset:0;z-index:3;touch-action:none;pointer-events:none}.playing #gestureSurface{pointer-events:auto}#gestureTrace{position:fixed;z-index:4;width:42px;height:42px;transform:translate(-50%,-50%);border:1px solid #d6dfc635;border-radius:50%;opacity:0;pointer-events:none;transition:opacity .3s}#gestureTrace.visible{opacity:.7}#hint{bottom:7%;font-size:10px}.mix-controls{display:flex;gap:24px;justify-content:center;margin:20px 0}.mix-controls label{font-size:10px;letter-spacing:1px;display:flex;flex-direction:column;gap:10px;color:#aebeb3}.mix-controls input{width:130px;accent-color:#aabd9d;touch-action:auto}.touch-guide{display:none}.touch .touch-guide{display:block}.touch .desktop-guide{display:none}.sound-note{line-height:1.7}.menu-inner{max-height:100dvh;overflow:auto}#pauseMenu{background:#041217f2}.grain{opacity:.023}@media(max-height:500px){.mix-controls{margin:12px 0;gap:18px}.mix-controls label{gap:5px}.help{font-size:10px;line-height:1.5}.menu-inner{padding:12px}.menu-inner h2{font-size:25px}.menu-inner .primary{margin:12px auto;padding:12px 18px}#hint{bottom:7%;font-size:9px}#chapter{top:20%;font-size:7px}}

/* The canvas supplies optical shading; avoid a costly full-screen SVG filter on phones. */
.grain{display:none}

.music-credit{font-size:9px;color:#91a89c;line-height:1.6;margin:20px auto 0;max-width:380px}.music-credit a{color:inherit}.touch .desktop-only{display:none}#continue.hidden{display:none}.intro-inner #continue{margin:13px 0;text-align:left}#gestureTrace{width:32px;height:32px}#hint{max-width:85vw;white-space:normal;line-height:1.6;width:max-content}

/* v0.5: a non-scrolling, non-selectable game surface with a stable Safari viewport. */
html,body{position:fixed;inset:0;overflow:hidden;width:100%;height:100%;overscroll-behavior:none;-webkit-text-size-adjust:100%}
#gameShell{position:fixed;top:0;left:0;width:100%;height:100%;height:100svh;overflow:hidden;isolation:isolate;touch-action:none;overscroll-behavior:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#gameShell canvas,#gameShell .grain,#gameShell #hud,#gameShell .veil,#gameShell #chapter,#gameShell #hint,#gameShell #gestureSurface,#gameShell #gestureTrace{position:absolute}
#gameShell *{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
#gestureSurface{cursor:default;-webkit-user-drag:none;-webkit-user-modify:read-only;outline:none}
#pauseMenu .menu-inner{touch-action:pan-y;overscroll-behavior:contain;max-height:100%;-webkit-overflow-scrolling:touch}
#pauseMenu input[type=range]{touch-action:pan-x}
/* Keep menu scrolling available; only the playing surface owns game gestures. */
html,body,#gameShell{touch-action:manipulation}

.orientation-gate{position:absolute;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:radial-gradient(ellipse at 50% 32%,#193c3e,#04141a 70%);padding:32px;touch-action:none}
.orientation-gate h2{font:normal 35px Georgia,serif;color:#d9d7be;margin:26px 0 18px}.orientation-gate p{font:16px/1.8 Georgia,serif;color:#a9beb4}.orientation-gate small{font-size:10px;letter-spacing:1px;color:#78978e;margin-top:32px}
.rotate-phone{width:66px;height:34px;border:1px solid #a9b99b;border-radius:7px;position:relative;margin-bottom:42px;box-shadow:0 0 45px #8eb6a41b;animation:turn-phone 3.6s ease-in-out infinite}.rotate-phone:after{content:'';position:absolute;right:5px;top:13px;width:3px;height:7px;border-radius:3px;background:#a9b99b}@keyframes turn-phone{0%,15%{transform:rotate(-90deg);opacity:.5}45%,85%{transform:rotate(0);opacity:1}100%{transform:rotate(-90deg);opacity:.5}}@media(prefers-reduced-motion:reduce){.rotate-phone{animation:none}}
.orientation-blocked #gestureSurface{pointer-events:none!important}.orientation-blocked #hud,.orientation-blocked #intro,.orientation-blocked #pauseMenu{visibility:hidden}
