/* Shared navigation sits outside the world artwork. */
body{background:radial-gradient(ellipse at top,#493448,#211e2d 75%);color:#f5e5c9}
main{width:min(100%,510px);padding:18px 16px 16px}.welcome-heading{padding:0 36px;margin:2px 0 22px;position:relative}
.brand-moon{font-size:42px;line-height:1.1;color:#efd09a;transform:rotate(-15deg);margin:0 0 7px}.eyebrow{font-size:11px;letter-spacing:1.5px;color:#cfb4b2;font-weight:700;margin:6px 0 9px}.welcome-heading h1{font-size:clamp(27px,7vw,35px);margin:8px -20px}.welcome-subtitle{font-size:14px;color:#dfc9bb;margin:10px -20px 0;line-height:1.5}
.icon-button{display:inline-grid;place-items:center;min-width:48px;min-height:48px;width:48px;height:48px;border:1px solid #927066;border-radius:15px;background:#473344;color:#f9d59c;font-size:26px;font-weight:700;cursor:pointer;padding:10px;touch-action:manipulation}.icon-button svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2.1;stroke-linecap:round;stroke-linejoin:round}.icon-button:disabled{opacity:.4;cursor:default}.corner-help{position:absolute;right:0;top:4px;background:#332736c0;font-size:22px}
button:focus-visible{outline:3px solid #f6d496;outline-offset:4px}button:hover:not(:disabled){filter:brightness(1.1)}
.world-choices{display:grid;gap:13px}.world-card{position:relative;display:grid;grid-template-columns:105px 1fr;gap:6px;align-items:center;min-height:130px;border:1px solid #9e776574;border-radius:24px;padding:15px 17px;background:linear-gradient(110deg,#624351,#3e303e);box-shadow:0 6px 18px #110e192b;overflow:hidden;text-align:left}.world-card.kibble-card{background:linear-gradient(110deg,#516864,#343a49);border-color:#90a69570}.world-art{display:flex;align-items:center;justify-content:center;width:105px;height:94px;pointer-events:none}.world-art svg{width:67px;height:88px;flex-shrink:0;filter:drop-shadow(0 3px 2px #18142135)}.world-art svg+svg{margin-left:-22px;transform:translateY(8px)}.world-card h2{font:700 22px Georgia,serif;margin:0 0 5px;color:#ffe4b4}.world-card p{font-size:12px;line-height:1.5;color:#deccc2;margin:0 0 9px}.world-play{font-size:14px;font-weight:750;min-height:44px;padding:10px 15px;background:#f1c88c;color:#3c2d35;border:1px solid #dba46f;border-radius:12px;cursor:pointer}.kibble-card .world-play{background:#d2d8ad;border-color:#a8b792;color:#303e3d}.world-card.coming-soon{min-height:100px;background:#363442;border-color:#72667477;opacity:.65}.coming-soon h2{font-size:20px;color:#d9d1ce}.coming-soon .world-play{background:#514b56;color:#d9cfca;border-color:#736a78;cursor:default;font-size:12px;padding:6px 12px;min-height:34px}.snow-hint{font-size:46px;color:#c4cfd0;transform:rotate(-8deg)}.welcome-note{font-size:12px;letter-spacing:1.5px;color:#bda8ac;margin:21px 0 8px}
.game-heading{position:relative;padding:0 40px;margin:0 0 18px}.leave-button{position:absolute;right:0;top:50%;transform:translateY(-50%);width:44px;height:44px;border:0;border-radius:12px;background:transparent;color:#dfb99d;font-size:29px;cursor:pointer}.game-controls{display:flex;justify-content:center;gap:12px;margin:0 0 12px}.game-controls #replay{width:48px;height:48px}.game-paused *{animation-play-state:paused!important}.game-paused .character{pointer-events:none}
dialog{width:min(440px,calc(100% - 28px));max-height:calc(100svh - 36px);padding:0;color:#f3e5d0;background:#3c303f;border:1px solid #aa8272;border-radius:24px;box-shadow:0 20px 90px #09070bb3;overflow:auto;font-family:system-ui,sans-serif;text-align:left}dialog::backdrop{background:#181523bb;backdrop-filter:blur(5px)}.dialog-content{padding:25px 25px 22px}dialog h2{font:700 29px Georgia,serif;color:#ffdda5;margin:5px 0 18px}dialog p{font-size:14px;line-height:1.65;color:#e4d3c8;margin:12px 0}.help-lead{font-size:16px}.help-controls{margin:20px 0;display:grid;gap:13px}.help-controls div{display:grid;grid-template-columns:84px 1fr;gap:10px}.help-controls dt{font-weight:750;color:#f3cb94;font-size:14px}.help-controls dd{margin:0;font-size:13px;line-height:1.5;color:#dec9c4}.world-help{padding:0 14px;border-left:2px solid #9d8374;margin:18px 0}.world-help p{font-size:13px}.primary-button{display:block;min-height:48px;width:100%;margin:20px 0 0;padding:12px 22px;border:1px solid #d39f6b;border-radius:14px;background:#f2cb92;color:#3a2b36;font:750 16px system-ui;cursor:pointer}.pause-content{text-align:center;padding:28px}.pause-moon{font-size:54px;color:#ecd098;line-height:1.2}.pause-content h2{margin:12px 0}.text-button{background:transparent;border:0;color:#ddc9c4;min-height:44px;margin:12px 0 0;font:14px system-ui;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
@media(max-width:360px){main{padding:12px 9px}.world-card{grid-template-columns:85px 1fr;padding:13px 12px;gap:8px}.world-art{width:85px}.world-art svg{width:59px}.world-card h2{font-size:20px}.world-play{font-size:13px;padding:9px 12px}.dialog-content{padding:20px}.game-controls{gap:10px}}
@media(max-height:730px){.welcome-heading{margin-bottom:15px}.brand-moon{font-size:31px}.world-card{min-height:112px;padding-top:11px;padding-bottom:11px}.world-art{height:79px}.world-card.coming-soon{min-height:90px}.game-heading{margin-bottom:12px}main{padding-top:10px}}
@media all{:root[data-motion="reduce"] dialog::backdrop{backdrop-filter:none}:root[data-motion="reduce"] .game-paused *{animation-play-state:paused!important}}

/* A shared, softly lettered storybook identity. All motifs are drawn inline. */
[hidden]{display:none!important}
body{background:#292532;--shell-accent:#f1cd95;--shell-panel:#403441;--shell-line:#826979}
body[data-world=kibble]{--shell-accent:#d5dfb3;--shell-panel:#344747;--shell-line:#708b80;background:#263338}
#brand-title,#world-title,.world-card h2{font-family:'Arial Rounded MT Bold','Trebuchet MS',system-ui,sans-serif;font-weight:850;letter-spacing:-.045em;line-height:1.12}
.brand-words{display:inline}.brand-word{display:inline-block;white-space:nowrap}.brand-word>span{display:inline-block;transform:rotate(var(--tilt));text-shadow:0 2px 0 #17142155}.brand-mark{display:inline-flex;vertical-align:middle;margin-right:.25em;color:var(--shell-accent);transform:rotate(-10deg)}.brand-mark svg{width:.8em;height:.8em;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.welcome-heading{padding:12px 40px 0;margin-bottom:25px}.welcome-heading h1{font-size:clamp(30px,6vw,42px);color:#f5d5a6}.brand-moon{display:none}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:10px}.welcome-subtitle{color:#e0d2c7}
.world-card{background:#493b47;box-shadow:none;border:1px solid #806775;border-radius:23px 17px 23px 17px;padding:18px 16px;gap:12px}.world-card.kibble-card{background:#354a46}.world-card.coming-soon{background:#363c49;opacity:1;border-color:#66717c}.world-card h2{font-size:23px;letter-spacing:-.035em}.world-card h2 .brand-mark{display:none}.world-card p{font-size:13px;color:#e3d6cb}.world-play:disabled{background:#49434e;color:#e1d8cc;border-color:#8c7d85;cursor:default}.coming-soon .world-play{min-height:44px}.world-art{height:100px}.world-art svg{height:100px;width:75px}.welcome-note{color:#d0bdc6}
.game-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0;margin:0 0 10px;min-height:48px}.game-heading h1{font-size:clamp(24px,4.8vw,31px);text-align:left;margin:0;color:var(--shell-accent)}.utility-controls{display:flex;gap:6px;flex-shrink:0}.utility-controls .icon-button,.leave-button{position:static;transform:none;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border:1px solid transparent;border-radius:12px;background:transparent;color:#e2cdbd}.utility-controls button:hover{background:var(--shell-panel);border-color:var(--shell-line)}.leave-button{font-size:28px;line-height:1}
.game-controls{gap:10px;margin-bottom:8px}.game-controls .icon-button{background:var(--shell-panel);border-color:var(--shell-line);color:var(--shell-accent);border-radius:13px}.progress{margin:10px 0}.game-controls #skip svg{fill:none}
dialog{background:var(--shell-panel,#403441);border-color:var(--shell-line,#826979);box-shadow:0 12px 40px #100d1840;border-radius:25px 18px 25px 18px}dialog h2{font-family:'Trebuchet MS',system-ui,sans-serif;letter-spacing:-.035em;color:var(--shell-accent,#f1cd95)}.dialog-content{padding:24px}dialog::backdrop{background:#17151ee6;backdrop-filter:none}.help-controls{padding:16px 0;border-block:1px solid #97819055;gap:16px}.help-controls dd{color:#e5d9d0}.help-controls dt{color:var(--shell-accent,#f1cd95)}.primary-button{background:var(--shell-accent,#f1cd95);border-color:transparent}.pause-content{padding:30px}.pause-content .primary-button{margin-top:24px}.text-button{color:#f0dfcf}.rotate-content{text-align:center}.rotate-content>svg{width:84px;height:84px;fill:none;stroke:#f1cd95;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.rotate-content h2{font-size:25px}.rotate-content .rotate-note{font-size:13px;color:#cbbdc9}
#app:fullscreen{background:#292532}html:fullscreen{overflow:auto}
@media (orientation:landscape) and (max-height:600px){
 main{width:min(100%,850px);padding:6px max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left))}
 #game-screen{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 54px;grid-template-rows:46px auto;column-gap:10px}
 .game-heading{grid-column:1/-1;min-height:44px;margin:0 0 2px}.game-heading h1{font-size:25px}.utility-controls{gap:6px}
 #scene{grid-column:1;grid-row:2;min-width:0}.house{height:calc(100dvh - 62px);border-radius:50px 50px 18px 18px;border-width:3px}
 #board{height:calc(100dvh - 144px);margin:68px 15px 8px}
 .house:after{height:calc(100% - 68px)}.window{transform:scale(.7);transform-origin:top left}.web{width:85px;height:90px}.spider{transform:scale(.8);transform-origin:top right;right:16px;top:25px}
 #bonus-candies{top:8px}body[data-world=kibble] #moon-garden{width:68px;height:68px;top:5px}
 .game-controls{grid-column:2;grid-row:2;flex-direction:column;align-items:center;justify-content:center;gap:8px;margin:0;padding-bottom:20px}.game-controls .icon-button,.game-controls #replay{width:46px;height:46px;min-width:46px;min-height:46px;padding:10px}
 #progress{position:absolute;right:0;bottom:1px;width:54px;gap:4px;margin:0;min-height:8px}
 #night-end{position:absolute;inset:55px 70px 12px 12px;z-index:25;background:#302936f2;border:1px solid #998072;border-radius:20px;overflow:auto;padding:12px;display:flex;flex-direction:column;justify-content:center;align-items:center}#night-end h2{margin:5px}#night-end p{margin:7px}
 .welcome-heading{padding-top:0;margin-bottom:14px}.welcome-heading h1{font-size:34px}.welcome-subtitle{margin-top:5px}.world-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.world-card{grid-template-columns:1fr;gap:4px;text-align:center;padding:12px}.world-art{margin:auto;height:64px}.world-art svg{height:72px}.world-card h2{font-size:20px}.world-card p{font-size:12px}.world-play{padding:8px;font-size:13px}.welcome-note{margin:12px 0}.welcome-heading .eyebrow{margin-top:0}
}
@media all{:root[data-motion="reduce"] .brand-word>span{transform:none}}

#help-back{position:sticky;bottom:0;box-shadow:0 -8px 12px var(--shell-panel,#403441)}
@media(orientation:landscape) and (max-height:600px){.character{height:33%}}

.motion-setting{margin:20px 0;padding:14px 0;border-top:1px solid #8b707f}.motion-setting select{font:inherit;padding:10px;background:#403441;color:#f5dfb9;border:1px solid #8b707f;border-radius:8px;min-height:44px}.motion-setting p{font-size:14px}#welcome #motion-prompt{margin:0 0 28px;padding:14px;border:1px solid #8b707f;border-radius:14px;font-size:14px}#welcome #motion-prompt button{min-height:44px;font-size:14px;margin:4px;padding:8px 12px}select:focus-visible{outline:3px solid #f5dfb9;outline-offset:3px}
.character[data-move-tag]::after{content:attr(data-move-tag);position:absolute;top:10%;right:3%;background:#fff0d2;color:#382634;border:2px solid #705364;border-radius:50%;width:25px;height:25px;line-height:21px;font:700 17px/21px system-ui;pointer-events:none}.character[data-move-tag]{outline:2px dashed #ffdfad;outline-offset:-4px}
