@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;600&family=Patrick+Hand&display=swap');
:root{font-family:'DM Sans',Arial,sans-serif;color:#24352f;font-synthesis:none}*{box-sizing:border-box}body{margin:0;background:#83c9f4}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:focus-visible,a:focus-visible,#scene:focus-visible,#ball-editor-canvas:focus-visible{outline:2px solid #974367;outline-offset:5px}button{border:0}#world{height:100svh;min-height:620px;position:relative;overflow:hidden;background:#83c9f4}#scene{position:absolute;inset:0;outline:none;touch-action:pan-y}#scene canvas{display:block;width:100%;height:100%}#scene.grabbing{cursor:grabbing;touch-action:none}#scene.can-grab{cursor:grab}#paper{position:absolute;inset:0;pointer-events:none;opacity:.016;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='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.9' filter='url(%23n)'/%3E%3C/svg%3E");mix-blend-mode:multiply;z-index:2}header{position:absolute;left:3.5vw;top:30px;pointer-events:none}.menu-button{display:block;width:32px;height:30px;padding:5px 3px;background:none;pointer-events:auto;margin-bottom:12px}.menu-button span{display:block;height:2px;background:#22372f;margin:5px 0;width:23px;border-radius:4px}.wordmark{display:block;font-family:'Patrick Hand','Comic Sans MS',cursive;font-size:64px;letter-spacing:7px;line-height:1.08;color:#172e28;text-decoration:none;pointer-events:auto}.brand-note{font-size:10px;font-weight:500;letter-spacing:5px;line-height:2.1;margin:20px 0;color:#446c74}.prompt{position:absolute;left:3.5vw;top:36%;width:210px;min-height:210px;background:#fff0ce;border:1.2px solid #685c45;border-radius:6px;padding:24px 22px 28px;box-shadow:0 3px 0 #716b4430;transform:rotate(-.35deg)}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:500}.prompt h1{font-size:27px;line-height:1.2;margin:8px 0 12px;font-weight:450;letter-spacing:-.5px}.rule{height:1px;width:100%;background:#8b8d6a80;margin:15px 0}.prompt p{font-size:18px;line-height:1.55;margin:0;letter-spacing:.15px}.little-seed{position:absolute;right:12px;bottom:7px;color:#99446c;font-size:32px;transform:rotate(-27deg)}#lab-label{font-size:9px;letter-spacing:2px;display:block;margin-top:14px;color:#766745}#lab-label[hidden]{display:none}.chapters{position:absolute;right:3.3vw;top:20%;width:166px;border-left:1px solid #3456535c;padding:1px 0}.chapters button{position:relative;display:flex;align-items:center;gap:15px;width:100%;padding:12px 0 12px 18px;text-align:left;font-size:13px;background:none;letter-spacing:.3px;color:#47788b;transition:color .3s}.chapters button span{font-size:12px}.chapters i{margin-left:auto;height:6px;width:6px;flex:0 0 6px;border-radius:50%;background:#ffffffa8}.chapters button.active{color:#143b3e}.chapters button.active:before{content:'';position:absolute;left:-1.5px;top:3px;bottom:3px;width:2px;background:#ffe8a7}.chapters button.active i{background:#ffedae}.chapters button:hover{color:#193e3b}.world-hint{position:absolute;left:50%;bottom:99px;transform:translateX(-50%);font-size:12px;letter-spacing:1.2px;color:#284e56;pointer-events:none;transition:opacity .6s;white-space:nowrap}footer{position:absolute;bottom:30px;left:3.5vw;right:3.5vw;display:flex;align-items:center;justify-content:space-between;gap:20px}.text-button{background:transparent;padding:10px 0;letter-spacing:2px;font-size:10px;font-weight:500;white-space:nowrap}.text-button span{font-size:18px;margin-left:8px}.center-controls{display:flex;gap:9px}.center-controls button{background:#fcf4dcde;border:1px solid #65786c73;border-radius:30px;font-size:22px;padding:9px 15px;display:flex;gap:10px;align-items:center;box-shadow:0 2px 0 #40554f13}.center-controls span{font-size:11px;letter-spacing:.25px}.center-controls button:hover{background:#fff8e5}#your-walk{position:absolute;right:3.5vw;bottom:110px;background:#fff0ce;border:1px solid #6f745c;padding:10px 20px;border-radius:30px;font-size:13px}#loading{position:absolute;inset:0;background:#84c9f4;display:grid;place-content:center;font-family:'Patrick Hand',cursive;font-size:28px;letter-spacing:1px;transition:opacity .6s;z-index:10}#loading.loaded{opacity:0;pointer-events:none}#error{position:absolute;inset:25%;padding:30px;background:#fff0ce;border:1px solid #534e38;border-radius:8px}dialog{max-height:90svh;max-width:760px;width:calc(100% - 48px);border:1px solid #685c45;border-radius:10px;background:#fff1d3;color:#2f4138;box-shadow:0 16px 80px #244c5066;padding:0}dialog::backdrop{background:#79aac080;backdrop-filter:blur(8px)}.close{position:absolute;top:18px;right:20px;background:none;font-size:32px;width:36px;height:36px;line-height:30px;z-index:2}.about-content{padding:60px 72px}.about-content h2,#menu-dialog h2{font-family:'Patrick Hand',cursive;font-weight:400;font-size:66px;line-height:1.05;letter-spacing:-1px;margin:22px 0 28px}.about-content p{font-size:17px;line-height:1.7}.about-content p.eyebrow{font-size:11px}.about-divider{width:60px;height:1px;background:#817b56;margin:34px 0}.about-content h3{font-weight:500;font-size:23px}.sample-note{border-top:1px solid #7d7b5944;border-bottom:1px solid #7d7b5944;padding:22px 0;margin:32px 0}.sample-note strong{font-size:13px;letter-spacing:1px}.sample-note p{font-size:14px;margin:8px 0 0}.return{background:#2f5146;border-radius:30px;padding:14px 24px;color:#fff4d8;font-size:14px}#menu-dialog{max-width:450px;padding:50px}#menu-dialog>button:not(.close){display:block;background:none;padding:15px 0;border-bottom:1px solid #8278584d;width:100%;text-align:left;font-size:20px}.menu-foot{font-size:12px;letter-spacing:2px;margin-top:40px}body[data-mode=emotions] .prompt,body[data-mode=resilience] .prompt{transition:background 1.5s}body[data-mode=walk] .world-hint{bottom:110px}body[data-mode=walk] .center-controls{display:none}@media(min-width:1600px){.prompt{left:4vw;width:235px;padding:28px}.prompt p{font-size:20px}.chapters{right:4vw;width:180px}.chapters button{font-size:14px}header{left:4vw;top:35px}.wordmark{font-size:74px}.brand-note{font-size:11px}footer{bottom:40px}}@media(max-width:1050px){.wordmark{font-size:50px;letter-spacing:5px}.brand-note{font-size:9px;letter-spacing:3px}.prompt{width:174px;padding:18px;min-height:190px}.prompt h1{font-size:24px}.prompt p{font-size:16px}.chapters{right:2.8vw;width:145px}.chapters button{font-size:12px;gap:10px;padding-left:13px}.center-controls span{display:none}.center-controls button{width:44px;justify-content:center;padding:8px}footer{bottom:22px}}@media(max-width:700px){#world{min-height:720px;height:100svh}header{top:18px;left:23px;display:flex;align-items:center;gap:14px}.menu-button{margin:0;width:23px;padding:0}.wordmark{font-size:41px;letter-spacing:4px}.brand-note{display:none}.prompt{left:23px;top:91px;width:calc(100% - 46px);min-height:unset;padding:15px 18px 16px;transform:none;display:grid;grid-template-columns:1fr 1.42fr;column-gap:14px}.prompt .eyebrow{grid-column:1;font-size:9px;letter-spacing:1.4px}.prompt h1{grid-column:1;font-size:25px;margin:5px 0 0;letter-spacing:-.7px}.prompt .rule{display:none}.prompt p{grid-column:2;grid-row:1 / span 3;font-size:15px;line-height:1.5;padding-right:12px;align-self:center}.prompt p br{display:none}.little-seed{right:8px;bottom:2px;font-size:27px}#lab-label{margin-top:5px;font-size:8px;letter-spacing:1px}.chapters{left:23px;right:23px;top:auto;bottom:96px;width:auto;border-left:none;border-top:1px solid #34565350;display:flex;gap:0}.chapters button{padding:15px 2px 8px;font-size:10px;display:flex;flex-direction:column;gap:4px;justify-content:flex-start;text-align:center;min-width:0;letter-spacing:0}.chapters button span{font-size:11px}.chapters i{display:none}.chapters button.active:before{left:8px;right:8px;top:-1px;bottom:auto;height:2px;width:auto}.world-hint{bottom:167px;font-size:10px;letter-spacing:.7px;max-width:90vw;white-space:normal;text-align:center;width:100%}footer{left:23px;right:23px;bottom:23px;gap:7px}.text-button{font-size:8px;letter-spacing:1px}.text-button span{font-size:15px;margin-left:3px}.center-controls{gap:6px}.center-controls button{width:36px;height:36px;padding:4px;font-size:21px}.about-content{padding:55px 28px 35px}.about-content h2,#menu-dialog h2{font-size:53px}.about-content p{font-size:16px}dialog{width:calc(100% - 30px)}#menu-dialog{padding:45px 30px}#your-walk{bottom:228px;right:23px;padding:8px 13px;font-size:11px}body[data-mode=walk] .world-hint{bottom:170px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}} 

#ball-hit{position:absolute;width:72px;height:72px;border-radius:50%;transform:translate(-50%,-50%);touch-action:none;cursor:grab;z-index:1}#scene.grabbing #ball-hit{cursor:grabbing}@media(max-width:700px){#ball-hit{width:96px;height:96px}}

[hidden]{display:none!important}

#render-mode{position:absolute;right:3.5vw;top:24px;font-size:10px;letter-spacing:1px;opacity:.65}@media(max-width:700px){#render-mode{top:auto;bottom:68px;left:23px;right:23px;text-align:center;font-size:9px;margin:0}}

@media(max-width:700px){body[data-mode=relationships] .prompt h1{font-size:20px}}

#tilt-controls{position:absolute;right:3.3vw;top:49%;width:170px;text-align:center;background:#fff0d4e8;border:1px solid #4b4b37;border-radius:8px;padding:14px 12px 12px;z-index:3;box-shadow:0 3px 0 #504c2920}#tilt-controls .eyebrow{font-size:9px;letter-spacing:1.3px;margin:0 0 12px}#tilt-pad{width:104px;height:104px;position:relative;margin:0 auto;border:1px solid #686850;border-radius:50%;background:#e6dfbd;touch-action:none;cursor:grab;display:grid;place-items:center;outline-offset:4px}#tilt-pad:active{cursor:grabbing}.pad-axis{position:absolute;background:#7c7c5540}.pad-axis.horizontal{height:1px;width:88px;left:7px;top:51px}.pad-axis.vertical{width:1px;height:88px;left:51px;top:7px}#tilt-knob{width:22px;height:22px;display:block;border-radius:50%;background:#fffaf0;border:1.3px solid #282c24;box-shadow:1px 2px 0 #66533435;pointer-events:none}#tilt-readout{font-size:10px;letter-spacing:.2px;margin:10px 0}#level-island{font-size:12px;border:1px solid #65705a;background:#fff7df;border-radius:20px;padding:7px 12px}#tilt-controls small{display:block;font-size:9px;margin-top:9px;color:#65705a}body[data-mode=discomfort] .center-controls #tilt{display:none}@media(max-width:700px){#tilt-controls{right:22px;top:auto;bottom:165px;width:124px;padding:10px 8px}#tilt-controls .eyebrow{font-size:8px;letter-spacing:.7px;margin-bottom:7px}#tilt-pad{width:80px;height:80px}.pad-axis.horizontal{width:66px;left:6px;top:39px}.pad-axis.vertical{height:66px;left:39px;top:6px}#tilt-knob{width:18px;height:18px}#tilt-readout{font-size:8px;margin:7px 0}#level-island{font-size:10px;padding:6px 8px}#tilt-controls small{font-size:8px;margin-top:6px}body[data-mode=discomfort] .world-hint{bottom:151px}}

@media(max-width:700px){#tilt-controls{width:254px;left:50%;right:auto;transform:translateX(-50%);bottom:165px;display:grid;grid-template-columns:80px 1fr;column-gap:12px;padding:10px 12px}#tilt-controls .eyebrow{grid-column:2;grid-row:1}#tilt-pad{grid-column:1;grid-row:1 / span 4}#tilt-readout{grid-column:2;margin:2px 0 5px}#level-island{grid-column:2}#tilt-controls small{grid-column:2;margin:4px 0 0}}

/* Clearer chapter labels and generous touch controls, without changing the layout. */
.chapters button{font-size:14px;color:#315d6c;min-height:44px}.text-button{min-height:44px}.close{width:44px;height:44px}.menu-button{min-height:44px}.center-controls span{font-size:12px}#tilt-readout{font-size:12px}#level-island{min-height:36px}#tilt-controls small{font-size:10px}
@media(max-width:700px){.chapters button{font-size:12px;line-height:1.3}.text-button{font-size:10px;letter-spacing:.7px}.center-controls button{width:44px;height:44px}.menu-button{width:30px;min-height:44px}.prompt .eyebrow{font-size:10px}#lab-label{font-size:9px}#tilt-readout{font-size:10px}#level-island{font-size:11px;min-height:32px}#tilt-controls small{font-size:9px}}
@media(max-width:430px){.chapters button{font-size:11px}.text-button{font-size:9px;letter-spacing:.5px}footer{left:18px;right:18px}}

/* Keep reading contrast reliable as the sky changes; scenery never dictates ink color. */
.chapters button,.world-hint{color:#173842}.chapters button.active{color:#102d30}.brand-note{color:#173842}#render-mode{opacity:1;color:#173842}
body.dark-sky .chapters,body.dark-sky header{background:#243d52f2;border-radius:7px}body.dark-sky header{padding:10px;margin:-10px}body.dark-sky .wordmark,body.dark-sky .brand-note,body.dark-sky .chapters button,body.dark-sky .world-hint,body.dark-sky #render-mode{color:#fff2d6}body.dark-sky .chapters button.active{color:#ffdf91}body.dark-sky .menu-button span{background:#fff2d6}body.dark-sky .chapters{border-color:#e6dfbc80}body.dark-sky .text-button{background:#243d52f2;color:#fff2d6;border-radius:20px;padding-left:10px;padding-right:10px}body.dark-sky #render-mode{background:#243d52f2;padding:3px 8px;border-radius:10px}body.dark-sky .world-hint{background:#243d52ec;padding:4px 9px;border-radius:10px}

.world-hint{background:#fff3dfe8;padding:4px 9px;border-radius:10px}

/* Continuous story: one scene, one saved sand field, native swipe outside grabs. */
html{scroll-behavior:smooth;overscroll-behavior-y:none}
#story-shell{position:relative;height:600svh;--story-progress:0}
#story-shell #world{position:sticky;top:0;height:100svh;min-height:0}
#story-next{position:absolute;left:50%;transform:translateX(-50%);bottom:83px;min-height:32px;padding:6px 12px;display:flex;gap:12px;align-items:center;background:#fff3dfed;border:1px solid #42677744;border-radius:24px;font-size:11px;letter-spacing:.2px;color:#254653;z-index:3}
#story-page{font-size:10px;letter-spacing:1px;border-right:1px solid #61797766;padding-right:12px;font-variant-numeric:tabular-nums}
#story-next>span:last-child{font-size:17px;line-height:1}
#story-progress{position:absolute;left:0;right:0;bottom:0;height:3px;background:#344f4c18;pointer-events:none}
#story-progress:before{content:"";display:block;height:100%;background:#5b7c6c;transform-origin:left;transform:scaleX(var(--story-progress));transition:transform .15s linear}
.world-hint{bottom:128px;max-width:80%;text-align:center}
#felt-state{display:flex;align-items:center;gap:9px;margin-top:19px;padding-top:12px;border-top:1px solid #8b8d6a66;min-height:34px;font-size:11px;line-height:1.5;color:#4a615a}
.felt-dot{flex:none;display:block;width:12px;height:12px;border-radius:50%;background:#fffaf0;border:1px solid #536457;transform:scale(var(--felt-x,1),var(--felt-y,1));box-shadow:1px 2px 1px #6c5b432b;transition:transform .2s}
#felt-state~#lab-label{font-size:8px;letter-spacing:1.1px;margin-top:13px}
#level-island{width:100%}
#tilt-controls{top:49%;padding-bottom:13px}
body[data-mode=discomfort] #tilt-readout{font-variant-numeric:tabular-nums}
@media(max-width:700px){
 #story-shell #world{min-height:0;height:100svh}
 header{top:12px;left:20px}.wordmark{font-size:37px;letter-spacing:3px}
 .prompt{top:78px;left:20px;width:calc(100% - 40px);padding:13px 15px;column-gap:10px}
 .prompt p{font-size:14px;padding-right:4px}.prompt .eyebrow{font-size:8px;letter-spacing:1px}
 .prompt h1{font-size:24px}.little-seed{display:none}
 #felt-state{grid-column:1 / -1;grid-row:4;margin-top:9px;padding-top:6px;min-height:20px;font-size:10px;gap:7px}
 #felt-state .felt-dot{width:10px;height:10px}
 #felt-state~#lab-label{grid-column:1;grid-row:3;font-size:7px;letter-spacing:.6px;margin-top:3px}
 .chapters{left:18px;right:18px;bottom:115px}.chapters button{font-size:10px;padding:9px 0 7px;min-height:47px}
 .chapters button span{font-size:10px}footer{left:18px;right:18px;bottom:20px}
 #story-next{bottom:76px;font-size:10px;white-space:nowrap;padding:4px 11px;min-height:29px;gap:9px}
 #story-page{font-size:9px;padding-right:9px}
 .world-hint{bottom:172px;font-size:10px;line-height:1.4;max-width:90%;letter-spacing:.1px;padding:4px 8px}
 #render-mode{top:29px;bottom:auto;right:18px;left:auto;max-width:90px;font-size:8px;letter-spacing:.2px;text-align:right}
 #tilt-controls{left:50%;right:auto;top:auto;bottom:176px;width:264px;padding:8px 10px;grid-template-columns:65px 1fr 1fr;column-gap:8px;row-gap:3px}
 #tilt-controls .eyebrow{grid-column:2 / 4;grid-row:1;font-size:8px;margin:0}
 #tilt-pad{width:64px;height:64px;grid-column:1;grid-row:1 / 5}.pad-axis.horizontal{left:6px;top:31px;width:50px}.pad-axis.vertical{left:31px;top:6px;height:50px}
 #tilt-readout{grid-column:2 / 4;grid-row:2;font-size:8px;margin:0}
 #level-island{grid-column:2;grid-row:3;font-size:9px;padding:4px;min-height:30px}
 #tilt-controls small{grid-column:2 / 4;grid-row:4;font-size:8px;margin:0}
 body[data-mode=discomfort] .world-hint{bottom:265px;font-size:9px}
 #your-walk{bottom:210px;right:18px;font-size:10px}
 body[data-mode=walk] .world-hint{bottom:172px}
}
@media(max-height:670px) and (max-width:700px){
 .prompt{top:68px;padding:9px 12px}.prompt h1{font-size:21px}.prompt p{font-size:12px}
 #felt-state{margin-top:5px;padding-top:4px;font-size:9px}.prompt .eyebrow{font-size:7px}
 .world-hint{bottom:160px}body[data-mode=discomfort] .world-hint{bottom:252px}
 #tilt-controls{bottom:165px}
 footer{bottom:13px}.chapters{bottom:105px}#story-next{bottom:67px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}#story-progress:before,.felt-dot{transition:none}}

/* The sticky stage and its scroll pages share exactly the same viewport size. */
#story-shell #world{height:var(--story-viewport,100svh)}

/* R3: scoped controls only. Existing page art and Paths layout are preserved. */
#relationship-action{position:absolute;z-index:5;width:168px;min-height:44px;padding:10px 12px;border:1px solid #65735c;border-radius:22px;background:#fff4d8;color:#304b41;box-shadow:0 3px 0 #58614424;font-size:12px;letter-spacing:.1px;touch-action:manipulation;white-space:nowrap}
#relationship-action:hover{background:#fff9e9}#relationship-action[aria-pressed=true]{background:#e9f0db}#relationship-action[hidden]{display:none}
#scene.following,#scene.following #ball-hit{cursor:default}
@media(max-width:700px){#relationship-action{width:152px;font-size:11px}body[data-mode=relationships] .world-hint{font-size:9px;letter-spacing:.3px}}

/* R4: restrained controls, much bolder physical response. */
#restart{position:absolute;z-index:6;right:3.5vw;top:30px;min-height:44px;padding:8px 18px;display:flex;align-items:center;gap:8px;border:1px solid #61766388;border-radius:24px;background:#fff3ddf5;color:#28493e;box-shadow:0 2px 0 #485b4820;font-size:12px;touch-action:manipulation}
#restart span{font-size:22px;line-height:1}#restart:hover{background:#fffaf0}
#render-mode{top:83px;bottom:auto;right:3.5vw}
#balance-indicator{position:absolute;left:50%;top:50%;width:10px;height:10px;margin:-5px;border-radius:50%;background:#b76a28;border:1px solid #724620;pointer-events:none;box-shadow:0 0 0 3px #fff4d866;z-index:2}
#tilt-knob{opacity:.85}#tilt-pad[data-balanced=true] #balance-indicator{background:#617c51;border-color:#3f5b33}
#level-island{min-height:40px}#tilt-controls small{line-height:1.4}
#restart-dialog{max-width:440px;width:calc(100% - 36px);padding:34px 30px 28px;border:1px solid #6b705b;border-radius:9px;background:#fff1d2;color:#29443c;box-shadow:0 14px 70px #233e3544}
#restart-dialog::backdrop{background:#1b342a70}#restart-dialog h2{font-size:31px;line-height:1.12;margin:16px 0}
#restart-dialog #restart-description{font-size:15px;line-height:1.65;margin:0 0 24px;max-width:340px}
#restart-dialog .close{position:absolute;right:8px;top:8px;background:none;font-size:26px}
.restart-actions{display:flex;gap:10px}.restart-actions button{flex:1;min-height:44px;border-radius:24px;border:1px solid #697862;background:#fff9e9;font-size:13px;padding:10px}
.restart-actions #restart-confirm{background:#415f4c;color:#fff7e6;border-color:#415f4c}
@media(max-width:700px){
 #restart{top:15px;right:18px;padding:7px 12px;font-size:11px;gap:6px;min-height:44px}#restart span{font-size:20px}
 #render-mode{top:61px;right:18px;font-size:7px;line-height:1;max-width:105px}
 #tilt-controls{grid-template-columns:72px 1fr;width:280px;row-gap:2px;column-gap:12px}
 #tilt-pad{width:72px;height:72px;grid-column:1;grid-row:1 / 5}
 .pad-axis.horizontal{left:7px;top:35px;width:56px}.pad-axis.vertical{left:35px;top:7px;height:56px}
 #tilt-controls .eyebrow,#tilt-readout,#level-island,#tilt-controls small{grid-column:2}
 #tilt-readout{font-size:9px}#level-island{min-height:34px;font-size:10px}
 #tilt-controls small{font-size:8px}#tilt-controls .eyebrow{font-size:8px}
 #restart-dialog{padding:28px 24px 24px}#restart-dialog h2{font-size:28px}
}

/* R6: flat text-built AllWalks wordmark inspired by the supplied serif reference.
   Live HTML text only: white face + black outline, with no extrusion or drop shadow. */
.wordmark{
 position:relative;display:inline-block;
 font-family:Georgia,'Times New Roman',serif;font-weight:900;font-style:normal;
 font-size:60px;line-height:.88;letter-spacing:-5px;
 color:#fffdf8!important;-webkit-text-stroke:2.2px #171714;paint-order:stroke fill;
 text-shadow:none;text-decoration:none;
 transform:scaleX(.92);transform-origin:left center;
}
.wordmark::before,.wordmark::after{content:none!important}
body.dark-sky .wordmark{color:#fffdf8!important}
@media(min-width:1600px){.wordmark{font-size:69px;letter-spacing:-5.8px}}
@media(max-width:1050px){.wordmark{font-size:48px;letter-spacing:-4px}}
@media(max-width:700px){.wordmark{font-size:38px;letter-spacing:-3.3px;-webkit-text-stroke:1.6px #171714}}

/* R8: a little expressive feeling card, with a measured history below it. */
#mood-status{--mood-paper:#f3e9c8;--mood-ink:#466351;position:absolute;z-index:5;right:3.5vw;top:87px;width:220px;padding:12px 14px 10px;border:1.4px solid #4e5d4e;border-radius:18px 18px 20px 15px;background:#fff6e5f5;color:#35483b;box-shadow:0 4px 0 #43503a24;pointer-events:none}
.mood-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:8px;letter-spacing:1.5px;line-height:1.3;color:#62705c}.mood-weather{font-size:10px;letter-spacing:.1px;color:#425c4e}
.mood-present{display:flex;align-items:center;gap:10px;margin:6px 0 2px}.mood-face{display:block;width:72px;height:72px;flex:0 0 72px;color:#364639}.mood-face svg{display:block;width:100%;height:100%;overflow:visible}.face-disc{fill:var(--mood-paper);stroke-width:2;transition:fill .6s}.face-character{transform-origin:32px 40px}.mood-copy{display:flex;flex-direction:column;gap:5px;min-width:0}.mood-label{font-size:18px;font-weight:600;letter-spacing:-.5px;line-height:1.1}.mood-detail{font-size:10px;line-height:1.4;color:#65715f;min-height:28px}
.mood-chart{border-top:1px solid #64715828;margin-top:4px;padding-top:6px}.mood-chart svg{display:block;width:100%;height:54px;overflow:visible}.mood-baseline{stroke:#63765966;stroke-width:1;stroke-dasharray:3 4;fill:none}.mood-line{stroke:var(--mood-ink);stroke-width:2.2;stroke-linejoin:round;stroke-linecap:round;fill:none;vector-effect:non-scaling-stroke}.mood-area{fill:var(--mood-ink);opacity:.09;stroke:none}.mood-tip{fill:var(--mood-ink);stroke:#fff6e5;stroke-width:1.2}.mood-tip-halo{fill:var(--mood-ink);opacity:.13;animation:chart-breathe 2.4s ease-in-out infinite}.mood-chart-caption{display:flex;justify-content:space-between;gap:6px;font-size:8px;letter-spacing:.3px;color:#6b7562;margin-top:1px}
#mood-status[data-mood=very-low]{--mood-paper:#cfcadb;--mood-ink:#776087}#mood-status[data-mood=low]{--mood-paper:#dbdfd7;--mood-ink:#758473}#mood-status[data-mood=happy]{--mood-paper:#f1d58c;--mood-ink:#947328}#mood-status[data-mood=overexcited]{--mood-paper:#efbe94;--mood-ink:#b2754e}
#mood-status[data-mood=very-low] .face-character{animation:mood-tremble .34s ease-in-out infinite}#mood-status[data-mood=very-low] .tear{animation:mood-tear 2.8s ease-in infinite}#mood-status[data-mood=low] .face-character{animation:mood-sigh 4.5s ease-in-out infinite}#mood-status[data-mood=balanced] .eyes{transform-origin:32px 29px;animation:mood-blink 5.4s linear infinite}#mood-status[data-mood=happy] .face-character{animation:mood-lift 2.5s ease-in-out infinite}#mood-status[data-mood=overexcited] .face-character{animation:mood-buzz .75s ease-in-out infinite}#mood-status[data-mood=happy] .face-sparks,#mood-status[data-mood=overexcited] .face-sparks{animation:mood-spark 1.5s ease-in-out infinite}
@keyframes mood-tremble{0%,100%{transform:translateX(-1px) rotate(-2deg)}50%{transform:translateX(1px) rotate(2deg)}}@keyframes mood-tear{0%,20%{transform:translateY(0);opacity:0}40%{opacity:1}95%,100%{transform:translateY(5px);opacity:0}}@keyframes mood-sigh{0%,100%{transform:translateY(0) rotate(0)}55%{transform:translateY(3px) rotate(-5deg)}}@keyframes mood-blink{0%,44%,48%,100%{transform:scaleY(1)}46%{transform:scaleY(.12)}}@keyframes mood-lift{0%,100%{transform:translateY(1px) rotate(-2deg)}50%{transform:translateY(-3px) rotate(4deg)}}@keyframes mood-buzz{0%,100%{transform:rotate(-6deg) translateY(1px)}50%{transform:rotate(5deg) translateY(-2px)}}@keyframes mood-spark{0%,100%{opacity:.35}50%{opacity:1}}@keyframes chart-breathe{0%,100%{opacity:.12}50%{opacity:.3}}
#mood-status[data-sheltered=true]{border-color:#6c886a;background:#f0f3ddf5}#mood-status[data-recovering=true] .mood-chart-title{color:#4c795a}
#shelter-hint{position:absolute;z-index:3;pointer-events:none;transform:translate(-50%,-100%);padding:5px 9px;border-radius:12px;background:#f6f3deec;border:1px solid #78907380;color:#344f41;font-size:10px;white-space:nowrap;box-shadow:0 2px 0 #33462d16}#shelter-hint[data-active=true]{background:#e0e9cf}
#scene .world-fx{position:absolute;inset:0;pointer-events:none;z-index:0}#render-mode{top:285px;right:3.5vw;font-size:8px;margin:0}.chapters{top:316px}.chapters button{padding-top:10px;padding-bottom:10px}#tilt-controls{top:557px}
@media(min-width:701px) and (max-height:790px){#mood-status{top:80px;padding-top:8px;padding-bottom:8px}.mood-face{width:58px;height:58px;flex-basis:58px}.mood-chart svg{height:36px}#render-mode{top:251px}.chapters{top:274px}.chapters button{padding-top:7px;padding-bottom:7px}#tilt-controls{top:446px;padding-top:8px;padding-bottom:8px}#tilt-pad{width:82px;height:82px}.pad-axis.horizontal{left:7px;top:40px;width:68px}.pad-axis.vertical{left:40px;top:7px;height:68px}}
@media(max-width:1050px) and (min-width:701px){#mood-status{width:185px;right:2.8vw}.mood-face{width:58px;height:58px;flex-basis:58px}.mood-label{font-size:16px}.mood-heading{font-size:7px;letter-spacing:1px}.mood-detail{font-size:9px}.mood-weather{font-size:9px}.mood-chart svg{height:44px}#render-mode{top:268px}.chapters{top:295px}}
@media(max-width:700px){
 #mood-status{top:66px;right:18px;left:23px;width:auto;padding:7px 10px 6px;border-radius:14px;box-shadow:0 3px 0 #43503a24}
 .mood-heading{font-size:7px;letter-spacing:1.2px}.mood-weather{font-size:9px}.mood-present{gap:11px;margin:0}.mood-face{width:49px;height:49px;flex-basis:49px}.mood-copy{flex:1;gap:3px}.mood-label{font-size:17px}.mood-detail{font-size:9px;min-height:12px;line-height:1.2}.mood-chart{margin-top:0;padding-top:3px}.mood-chart svg{height:28px}.mood-chart-caption{font-size:7px;margin-top:0;line-height:1}
 .prompt{top:191px}#render-mode{top:auto;bottom:67px;right:18px;left:auto;max-width:120px;font-size:7px}#shelter-hint{font-size:9px;padding:4px 8px}
 .chapters{top:auto}.chapters button{padding-top:15px;padding-bottom:8px}#tilt-controls{top:auto}
}
@media(max-height:740px) and (max-width:700px){#mood-status{top:60px;padding:5px 10px}.mood-heading{font-size:6px}.mood-face{width:44px;height:44px;flex-basis:44px}.mood-chart svg{height:21px}.mood-label{font-size:16px}.prompt{top:168px;padding:8px 12px}.prompt h1{font-size:20px}.prompt p{font-size:12px}.prompt .eyebrow{font-size:7px}}
@media(prefers-reduced-motion:reduce){#mood-status *{animation:none!important;transition:none!important}#scene{transform:none!important}}

/* Small phones: two compact cards leave room for the complete playable island. */
@media(max-height:740px) and (max-width:700px){
 #mood-status{top:60px;left:170px;right:18px;width:auto;min-height:106px;padding:6px 8px}.mood-heading>span:first-child{display:none}.mood-heading{justify-content:flex-end}.mood-weather{font-size:8px}.mood-present{gap:5px}.mood-face{width:42px;height:42px;flex-basis:42px}.mood-label{font-size:14px;letter-spacing:-.45px}.mood-detail{font-size:8px;line-height:1.2;min-height:19px}.mood-chart-caption{font-size:6px;letter-spacing:0}.mood-chart svg{height:21px}
 .prompt{top:60px;left:18px;width:142px;min-height:106px;padding:9px 10px;display:block}.prompt .eyebrow{font-size:7px;letter-spacing:.7px}.prompt h1{font-size:19px;margin:5px 0}.prompt p{font-size:11px;line-height:1.25;padding:0}.prompt p br{display:none}body[data-mode=relationships] .prompt h1{font-size:15px;letter-spacing:-.6px}.prompt #lab-label,.prompt .little-seed{display:none}
}

/* R9: a small ground-anchored invitation, not another HUD panel. */
#warm-light-hint{position:absolute;z-index:4;pointer-events:none;transform:translate(-50%,-50%);padding:5px 10px;border:1px solid #ba9a5466;border-radius:20px;background:#fff7dcdf;color:#70603e;font-size:10px;line-height:1.25;letter-spacing:.15px;white-space:nowrap;box-shadow:0 2px 8px #aa854218}
#warm-light-hint[data-inside=true]{background:#fff4cce8;border-color:#aa864770}
#warm-light-hint[hidden]{display:none}
@media(max-width:700px){#warm-light-hint{font-size:9px;padding:4px 8px}}

/* R10 · pre-walk ball customizer */
#ball-customizer{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:22px;background:linear-gradient(180deg,#8bcaf0 0%,#b7d6c2 100%);overflow:auto}
#ball-customizer[hidden]{display:none}
.ball-customizer-card{width:min(1040px,100%);min-height:min(680px,calc(100svh - 44px));display:grid;grid-template-columns:minmax(230px,.72fr) minmax(360px,1.2fr);grid-template-rows:auto 1fr auto;gap:18px 28px;padding:32px 34px 24px;border:1.4px solid #52644d;border-radius:24px;background:#fff3d9f4;box-shadow:0 18px 80px #24413238;position:relative;overflow:hidden}
.ball-customizer-card:before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.055;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.ball-customizer-copy{grid-column:1;grid-row:1;position:relative;z-index:1;align-self:end}.ball-customizer-copy h1{font-family:'Patrick Hand','Comic Sans MS',cursive;font-size:58px;line-height:.95;margin:12px 0 16px;font-weight:500;letter-spacing:-1.8px}.ball-customizer-copy p:last-child{font-size:15px;line-height:1.65;max-width:300px;margin:0;color:#4e5d52}
.ball-editor-wrap{grid-column:2;grid-row:1 / span 2;min-height:480px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:1}.ball-editor-wrap:after{content:"";position:absolute;left:12%;right:12%;bottom:54px;height:18px;border-radius:50%;background:#6c66522b;filter:blur(8px);z-index:-1}#ball-editor-canvas{width:100%;height:min(56vw,540px);max-height:540px;min-height:390px;display:block;touch-action:none;cursor:crosshair}#ball-editor-canvas[data-fallback=true]{cursor:crosshair}#ball-keyboard-cursor{position:absolute;width:18px;height:18px;border:2px solid #974367;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:3;box-shadow:0 0 0 2px #fff7e7,1px 2px 0 #4e403533}#ball-keyboard-cursor:after{content:"";position:absolute;left:50%;top:50%;width:4px;height:4px;border-radius:50%;background:#974367;transform:translate(-50%,-50%)}#ball-editor-hint{font-size:11px;letter-spacing:.4px;margin:4px 0 0;color:#657065;text-align:center;min-height:18px}
.ball-tools{grid-column:1;grid-row:2;align-self:start;display:grid;gap:17px;position:relative;z-index:1}.ball-tool-row{display:grid;gap:8px}.ball-tool-label{font-size:9px;letter-spacing:1.8px;text-transform:uppercase;color:#617062}.ball-swatches{display:flex;gap:7px;flex-wrap:wrap}.ball-swatch{width:31px;height:31px;border-radius:50%;background:var(--swatch);border:1px solid #5a5b4e;box-shadow:inset 0 0 0 2px #fff8e5;position:relative}.ball-swatch.active:after{content:"";position:absolute;inset:-5px;border:1.5px solid #304a3f;border-radius:50%}.ball-action-row{grid-template-columns:auto 1fr auto auto;align-items:center;gap:7px}.ball-segmented{display:flex;border:1px solid #65735c;border-radius:18px;overflow:hidden}.ball-segmented button{min-height:34px;padding:6px 11px;background:#fff9e8;font-size:11px}.ball-segmented button.active{background:#415f4c;color:#fff8e9}.ball-brushes{display:flex;align-items:center;justify-content:center;gap:4px}.ball-brush{width:32px;height:32px;border:1px solid transparent;border-radius:50%;background:transparent;display:grid;place-items:center}.ball-brush span{display:block;width:var(--brush);height:var(--brush);max-width:17px;max-height:17px;border-radius:50%;background:#30453d}.ball-brush.active{border-color:#677460;background:#fff8e7}.ball-small-action{min-height:34px;padding:5px 9px;border:1px solid #65735c;border-radius:17px;background:#fff9e8;font-size:10px}.ball-small-action:disabled{opacity:.35;cursor:default}
.ball-customizer-actions{grid-column:1 / -1;grid-row:3;display:flex;justify-content:flex-end;align-items:center;gap:9px;position:relative;z-index:1;padding-top:4px;border-top:1px solid #7d80624d}.ball-customizer-actions button{min-height:44px;padding:9px 18px;border-radius:24px;border:1px solid #61725e;background:#fff9e9;font-size:12px}.ball-customizer-actions #ball-start{background:#405e4c;color:#fff7e7;border-color:#405e4c;min-width:170px}.ball-customizer-actions #ball-skip{margin-right:auto;background:transparent;border-color:transparent;text-decoration:underline;text-underline-offset:3px}
#menu-dialog .menu-redesign{display:block;width:100%;text-align:left;background:none;padding:8px 0;color:inherit;font-size:inherit}
@media(max-width:760px){#ball-customizer{padding:0}.ball-customizer-card{border-radius:0;border:0;width:100%;min-height:100svh;padding:20px 20px 16px;grid-template-columns:1fr;grid-template-rows:auto minmax(300px,42svh) auto auto;gap:8px}.ball-customizer-copy{grid-column:1;grid-row:1}.ball-customizer-copy h1{font-size:39px;margin:4px 0 6px}.ball-customizer-copy p:last-child{font-size:12px;line-height:1.4;max-width:none}.ball-editor-wrap{grid-column:1;grid-row:2;min-height:0}.ball-editor-wrap:after{bottom:32px}#ball-editor-canvas{height:100%;min-height:280px;max-height:43svh}#ball-editor-hint{font-size:9px;margin-top:-2px}.ball-tools{grid-column:1;grid-row:3;gap:9px}.ball-tool-row{gap:5px}.ball-swatch{width:26px;height:26px}.ball-action-row{grid-template-columns:auto 1fr auto auto}.ball-segmented button{min-height:32px;padding:5px 9px}.ball-small-action{min-height:32px;padding:4px 8px}.ball-customizer-actions{grid-column:1;grid-row:4;padding-top:8px}.ball-customizer-actions button{min-height:42px;padding:7px 13px;font-size:11px}.ball-customizer-actions #ball-start{min-width:145px}}
@media(max-width:420px){.ball-customizer-card{padding:15px 14px 12px}.ball-customizer-copy p:last-child{display:none}.ball-customizer-copy h1{font-size:35px}.ball-action-row{grid-template-columns:auto 1fr auto}.ball-action-row #ball-clear{display:none}.ball-swatches{gap:5px}.ball-swatch{width:24px;height:24px}.ball-customizer-actions{gap:5px}.ball-customizer-actions #ball-start{min-width:130px;padding-left:10px;padding-right:10px}}
@media(prefers-reduced-motion:reduce){#ball-customizer *{animation:none!important;transition:none!important}}

/* R13 · final hand-drawn toon UI pass. Hard offset shadows and warm ink echo the 3D world without turning the site into a game HUD. */
:root{--aw-ink:#40352f;--aw-ink-soft:#6a5e56;--aw-paper:#fff2d5;--aw-paper-2:#f4e4bd;--aw-shadow:#4b3d3326;--aw-accent:#d5a452}
.prompt,#mood-status,#tilt-controls,#restart-dialog,#menu-dialog,dialog{border-color:var(--aw-ink)!important;box-shadow:3px 4px 0 var(--aw-shadow),0 12px 42px #31463d1a;background-color:#fff2d8f5}
.prompt{border-width:1.7px;border-radius:11px 14px 12px 10px;background:#fff0cef4;box-shadow:3px 4px 0 #5e4a3a21}
.prompt .rule{background:#6d5d4f66}.prompt .eyebrow,#lab-label{color:#675847}.prompt h1{color:#342f2a}.prompt p{color:#4c463d}
#mood-status{border-width:1.7px;background:#fff5e3f5;box-shadow:3px 4px 0 #51433824}.mood-chart{border-color:#62554845}.mood-chart-grid{stroke:#725f4f33}.mood-chart-zero{stroke:#554a3f66}
#restart,#relationship-action,.center-controls button,#your-walk,#warm-light-hint,.restart-actions button,.ball-customizer-actions button,.ball-small-action,.ball-segmented{border-color:#51463d!important;box-shadow:2px 3px 0 #4e403520;background:#fff4d9;color:#3d443a}
#restart:hover,#relationship-action:hover,.center-controls button:hover,#your-walk:hover{transform:translateY(-1px);box-shadow:2px 4px 0 #4e40351f;background:#fff8e8}
#relationship-action[aria-pressed=true]{background:#e7edcf}#warm-light-hint{background:#fff0bfe8;border-color:#8f744c!important;color:#685439}
.center-controls button{background:#fff1d4e8}.chapters{border-color:#4b403638}.chapters button{color:#5d6c69}.chapters button.active{color:#2f403d;font-weight:600}.chapters button.active:before{background:#d7a354;height:3px}.chapters button.active i{background:#e8bd68;border:1px solid #6e5a3b}
.text-button{color:#3e4942}.world-hint{color:#425956}.wordmark{color:#2d302b}.menu-button span{background:#36352f}
.ball-customizer-card{border-color:var(--aw-ink);background:#fff0d7f4;box-shadow:5px 7px 0 #4d403329,0 18px 70px #24413225}.ball-customizer-copy h1{color:#332f2b}.ball-tool-label{color:#62564b}.ball-swatch,.ball-segmented,.ball-small-action{border-color:#51463d}.ball-segmented button.active,.ball-customizer-actions #ball-start{background:#455c48;color:#fff4dc;border-color:#34483a}.ball-editor-wrap:after{background:#5c4d3c25}
body[data-weather=rain] #mood-status,body[data-weather=rain] .prompt{background:#e7ece7f3}body[data-weather=rain] .center-controls button{background:#edf1e8e8}body[data-weather=breeze] #mood-status{background:#f2f0dff2}body[data-weather=sunshine] #mood-status{background:#fff5dff5}
@media(max-width:700px){.prompt,#mood-status{box-shadow:2px 3px 0 #51433820}.ball-customizer-card{box-shadow:none}.chapters button.active:before{height:3px}}
@media(prefers-reduced-motion:reduce){#restart:hover,#relationship-action:hover,.center-controls button:hover,#your-walk:hover{transform:none}}

/* R14: bottom manual weather/ground shortcuts removed; footer keeps only About + Sound. */
.center-controls{display:none!important}
footer{justify-content:space-between}

/* Save feedback temporarily replaces the passive hint without moving controls. */
#save-status{z-index:4;font-size:11px;line-height:1.4;letter-spacing:0}
#save-status:empty{visibility:hidden}
#world:has(#save-status:not(:empty)) .world-hint:not(#save-status){visibility:hidden}

/* Full-width mobile copy rows free the tree canopy and sun from the story card. */
@media(max-width:700px) and (min-height:741px){
 .prompt{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 12px;padding:11px 14px;min-height:0}
 .prompt .eyebrow{grid-column:1;grid-row:1;align-self:center;font-size:8px;letter-spacing:.8px}
 .prompt h1{grid-column:2;grid-row:1;font-size:22px;line-height:1.15;margin:0;letter-spacing:-.5px}
 .prompt h1 br,.prompt p br{display:none}
 .prompt p{grid-column:1 / -1;grid-row:2;padding:0;font-size:clamp(11px,3.15vw,13px);line-height:1.4;letter-spacing:0}
 .prompt #lab-label,.prompt .little-seed{display:none}
}
.analytics-settings{border-top:1px solid #8278584d;margin-top:24px;padding-top:16px}
.analytics-settings button{min-height:44px;background:#fff4d9;border:1px solid #65786c;border-radius:20px;padding:8px 14px;margin:4px}
.analytics-settings button:disabled{opacity:.5;cursor:default}

/* An accessible hit area follows the wooden sign's real projected board. */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.island-sign-target{position:absolute;z-index:5;transform:translate(-50%,-50%);display:block;border-radius:9px;cursor:pointer;touch-action:manipulation;background:transparent}
.island-sign-target[hidden]{display:none}
.island-sign-target:hover,.island-sign-target:focus-visible{outline:2px solid #fff2b5;outline-offset:3px;background:#fff2b514}
#chapter-description-open{position:absolute;inset:0;background:transparent;border-radius:inherit;cursor:help}
#chapter-description-open span{position:absolute;right:10px;top:10px;width:20px;height:20px;border:1px solid #6a5e48;border-radius:50%;background:#fff4d9;font:italic bold 14px/18px Georgia,serif;color:#514a3b}
#chapter-description-open:hover{box-shadow:inset 0 0 0 1px #a27c37}
#description-title{font-size:clamp(32px,7vw,56px)}

/* Nearby role choice becomes one stable Leave action while paired. */
#relationship-controls{position:absolute;z-index:5;display:flex;gap:8px;width:184px}
#relationship-controls[hidden],#relationship-controls button[hidden]{display:none}
#relationship-controls button{position:static;flex:1;width:auto;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #51463d;border-radius:22px;background:#fff4d9;color:#3d443a;box-shadow:2px 3px 0 #4e403520;font-size:12px;touch-action:manipulation;cursor:pointer}
#relationship-controls button:hover{background:#fff9e9;transform:none}
@media(max-width:700px){#relationship-controls{width:176px}#relationship-controls button{font-size:12px}}

#island-dialog a{color:#415e4b;text-underline-offset:3px;overflow-wrap:anywhere}
/* Keep the sole close control reachable while informational content scrolls. */
.dialog-close-bar{position:sticky;top:0;z-index:4;height:44px;display:flex;align-items:center;justify-content:flex-end;background:#fff2d8;border-bottom:1px solid #817b5620}
.dialog-close-bar .close{position:static;margin:0 12px;width:36px;height:36px}
.dialog-close-bar+.about-content{padding-top:16px}

/* Reach the back of the ball without changing painting tools. */
.ball-side-rotate{position:absolute;z-index:4;transform:translateY(-50%);width:44px;height:44px;display:grid;place-items:center;border:1px solid #51463d;border-radius:50%;background:#fff4d9;color:#3d443a;box-shadow:2px 3px 0 #4e403520;font-size:27px;line-height:1;touch-action:manipulation}
#ball-rotate-left{left:0}#ball-rotate-right{right:0}
.ball-side-rotate:hover{background:#e9e7cf}.ball-side-rotate:active{background:#dce3cc;box-shadow:none}.ball-side-rotate:focus-visible{outline:3px solid #456c5a;outline-offset:3px}
#shelter-hint:before{content:"☂ ";color:#486044}

/* Put the short instruction above the scene and keep chapter reading by navigation. */
#world .prompt{min-height:0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 12px;padding:12px 16px;z-index:4}
#world .prompt .eyebrow{grid-column:1;grid-row:1;align-self:center;font-size:9px;letter-spacing:.9px}
#world .prompt h1{grid-column:2;grid-row:1;margin:0;padding-right:26px;font-size:24px;line-height:1.15}
#world .prompt p{grid-column:1 / -1;grid-row:2;font-size:14px;line-height:1.4;padding:0}
#world .prompt .rule,#world .prompt .little-seed,#world .prompt #lab-label{display:none}
#world .prompt h1 br,#world .prompt p br{display:none}
#world .world-hint{top:36%;bottom:auto;left:3.5vw;transform:none;width:210px;max-width:90%;white-space:normal;z-index:4;line-height:1.4;letter-spacing:.15px;text-align:center}
/* Weather belongs beside the current mood, without a separate heading row. */
#world #mood-status{width:260px;min-height:0}
.mood-title-line{display:flex;align-items:center;justify-content:space-between;gap:8px;white-space:nowrap}
#world .mood-copy{flex:1;min-width:0;gap:4px}
#world .mood-present{margin:0;gap:9px}
#world .mood-face{width:56px;height:56px;flex-basis:56px}
#world .mood-label{font-size:17px}
#world .mood-weather{font-size:10px;line-height:1.2;flex:none}
#world .mood-detail{min-height:0}
@media(max-width:700px){
 #world #mood-status{width:auto;left:20px;right:20px;padding:7px 10px 6px}
 #world .mood-face{width:42px;height:42px;flex-basis:42px}
 #world .mood-label{font-size:17px}
 #world .mood-weather{font-size:10px}
 #world .mood-chart{margin-top:1px;padding-top:3px}
 #world .mood-chart svg{height:21px}

}


/* Shared layout rows reserve space before the world is framed. */
#status-ui,#bottom-ui{display:contents}
#world #journey-ui{position:absolute;left:50%;bottom:90px;transform:translateX(-50%);width:min(520px,90%);display:flex;flex-direction:column;gap:10px;z-index:4}
#world #journey-ui .prompt,#world #journey-ui #tilt-controls,#world #journey-ui #your-walk{position:relative;inset:auto;transform:none;width:100%;margin:0}
#world #journey-ui #your-walk{align-self:center;width:auto;min-height:44px}
#world #tilt-controls{display:grid;grid-template-columns:56px minmax(0,1fr) 104px;grid-template-rows:20px 36px;gap:0 9px;padding:8px 10px}
#world #tilt-pad{width:56px;height:56px;grid-column:1;grid-row:1 / 3}
#world #tilt-controls .eyebrow{grid-column:2;grid-row:1;font-size:8px;letter-spacing:.7px;align-self:end;margin:0}
#world #tilt-readout{grid-column:2;grid-row:2;font-size:10px;align-self:start;margin:4px 0 0}
#world #level-island{grid-column:3;grid-row:1 / 3;min-height:44px;align-self:center;font-size:10px}
#world #tilt-controls small{display:none}
#world #tilt-controls .pad-axis.horizontal{left:5px;top:27px;width:44px}
#world #tilt-controls .pad-axis.vertical{left:27px;top:5px;height:44px}
#world #story-next{position:static;transform:none;min-height:44px;white-space:nowrap}
#world footer{bottom:14px;min-height:44px}
#world #save-status:empty{display:none}
#world:has(#save-status:not(:empty)) #world-hint{display:none}
#world #journey-ui #relationship-controls{position:relative;inset:auto;align-self:center;transform:none;min-height:44px}
@media(max-width:700px){
 #world #status-ui{display:flex;position:absolute;top:66px;left:20px;right:20px;flex-direction:column;gap:8px;z-index:5;pointer-events:none}
 #world #status-ui #mood-status{position:relative;inset:auto;width:100%;min-height:0}
 #world #status-ui .world-hint{position:relative;inset:auto;transform:none;width:100%;max-width:none;margin:0}
 #world #bottom-ui{display:flex;position:absolute;left:20px;right:20px;bottom:max(10px,env(safe-area-inset-bottom));flex-direction:column;gap:8px;z-index:4;pointer-events:none}
 #world #bottom-ui button,#world #tilt-pad{pointer-events:auto}
 #world #journey-ui{position:relative;inset:auto;transform:none;width:100%;gap:8px}
 #world #journey-ui .prompt{padding:9px 12px}
 #world #journey-ui .prompt h1{font-size:clamp(20px,5.65vw,22px)}
 #world #journey-ui .prompt p{font-size:clamp(11px,3.15vw,13px)}
 #world #journey-ui .prompt .eyebrow{font-size:8px;letter-spacing:.8px}
 #world #bottom-ui .chapters{position:relative;inset:auto;width:100%;margin:0;min-height:44px}
 #world #bottom-ui .chapters button{font-size:clamp(8px,2.7vw,11px);min-width:0;min-height:44px;padding:6px 0;justify-content:center}
 #world #bottom-ui .chapters button span{display:none}
 #world #bottom-ui footer{position:relative;inset:auto;gap:6px;min-height:44px}
 #world #story-next{gap:6px;padding:5px 9px;font-size:9px}
 #world #story-next .cue-label{display:inline}
 #world #story-next #story-page{border:0;padding:0;letter-spacing:0}
 #world #story-next>span:last-child{display:none}
 #world .text-button{font-size:8px;letter-spacing:.5px}
}
@media(max-width:700px) and (max-height:740px){#world #status-ui{top:60px}#world #bottom-ui{gap:5px}#world #journey-ui{gap:6px}}
