:root{font-family:Trebuchet MS,Verdana,sans-serif;color:#514363;background:#f8e9f2;font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden}[hidden]{display:none!important}#app,#game,#ui{position:fixed;inset:0}#game canvas{display:block}#ui{pointer-events:none}.menu{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:max(16px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));overflow-y:auto;pointer-events:auto;background:#fff7e7bb;text-align:center}h1{margin:0;font-size:clamp(26px,4vw,48px);line-height:1.1;max-width:780px}p{margin:0;font-size:clamp(18px,2.5vw,24px)}.button{min-height:52px;padding:12px 28px;border:2px solid #a68cc2;border-radius:22px;background:#f3c3dc;color:#514363;font-family:inherit;font-size:22px;font-weight:700;cursor:pointer;box-shadow:0 4px #ac8bb8;touch-action:manipulation}.button-small{font-size:17px;min-height:44px;padding:8px 18px}.button:disabled{opacity:.6;cursor:default}.button:active{transform:translateY(3px);box-shadow:0 1px #ac8bb8}button:focus-visible{outline:4px solid #655197;outline-offset:4px}.level-list{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;max-width:960px}.pause-menu{background:#514363a8;color:#fff7e7}.game-ui{position:absolute;inset:0;padding:max(10px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.hud{display:flex;align-items:center;gap:16px;font-size:22px;font-weight:700;text-shadow:0 2px #fff}.hud .button{pointer-events:auto;margin-left:auto}.star-count,.gems,.level-name{background:#fff7e7dd;padding:8px 14px;border-radius:20px}.gem{color:#afa5b9;margin:0 4px}.gem.lit{color:#8755bd}.power-status{margin-top:8px;font-size:18px;text-shadow:0 2px #fff}.touch-controls{position:absolute;bottom:max(18px,env(safe-area-inset-bottom));left:max(20px,env(safe-area-inset-left));right:max(20px,env(safe-area-inset-right));display:flex;gap:16px}.touch{width:76px;height:76px;border:3px solid #fff7e7;border-radius:26px;background:#f8e9f2d9;color:#514363;font-size:48px;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none}.touch-jump{margin-left:auto;background:#e4d9f7e6;display:flex;flex-direction:column;align-items:center;line-height:1}.touch small{font:700 13px Trebuchet MS,sans-serif}.touch.held{background:#ef9fc7}#rotation{position:fixed;inset:0;z-index:30;background:#f8e9f2;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;gap:20px}.rotate-icon{font-size:96px}#notice{position:fixed;bottom:max(8px,env(safe-area-inset-bottom));left:10%;right:10%;z-index:40;background:#fff7e7;border:2px solid #b4a0e4;border-radius:14px;padding:10px;text-align:center;font-size:16px}@media(max-height:450px){.menu{gap:10px}.button{min-height:46px;padding:8px 20px;font-size:19px}.level-name{display:none}.touch{width:64px;height:64px}}.start-menu{background:linear-gradient(90deg,transparent 25%,#fff7e76b 55%,#fff7e7b5);align-items:flex-end}.start-panel{width:52%;display:flex;flex-direction:column;align-items:center;gap:clamp(12px,3vh,24px);padding:20px}.start-panel h1{font-size:clamp(28px,4.5vw,66px);text-wrap:balance;text-shadow:0 3px #fff7e7}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:clamp(12px,1.5vw,16px);font-weight:700}.play-button{min-width:200px;min-height:64px;background:#ef9fc7;border-color:#a9719c;font-size:28px}.start-menu>.sound-button{position:absolute;left:max(22px,env(safe-area-inset-left));top:max(18px,env(safe-area-inset-top));background:#fff7e7eb}.control-hint{font-size:15px}@media(pointer:coarse){.control-hint{display:none}}@media(max-height:450px){.start-panel{gap:12px;padding:0}.start-panel .copy{font-size:18px}}.level-menu{background:linear-gradient(#fff7e7d9,#f8e9f280);gap:16px}.level-menu h1{font-size:clamp(26px,3.5vw,42px)}.level-list{position:relative;width:min(1100px,100%);max-width:none;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(12px,2vw,30px);padding:24px 0 36px}.rainbow-path{position:absolute;left:4%;right:4%;top:44%;height:72px;background:linear-gradient(#ef9fbc 25%,#ffd680 25% 50%,#8fd1c7 50% 75%,#b19adb 75%);border-radius:50%;transform:rotate(-4deg);opacity:.75}.level-card{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px 10px;background:#fffaf0;border-color:var(--level-color);border-radius:28px;box-shadow:0 6px 0 var(--level-color),0 10px 24px #51436315}.level-card:nth-of-type(2n){top:20px}.level-card strong{font-size:clamp(17px,2vw,23px)}.level-badge{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:var(--level-color);border:4px solid white;font-size:27px}.level-subtitle{font-size:clamp(13px,1.5vw,17px);font-weight:400;min-height:2.5em}.level-rating{font-size:17px;color:#765687}.level-card:disabled{opacity:.8;background:#f1edf2;box-shadow:0 4px #c1b8cc}.level-card.current .level-badge{animation:pulse 1.8s ease-in-out infinite}.menu-actions{display:flex;gap:14px;justify-content:center;flex-wrap:wrap}.secondary{background:#fff7e7;box-shadow:0 3px #c8b3d5}.story-panel{max-width:680px;padding:clamp(22px,4vw,44px);border:3px solid white;border-radius:32px;background:#fff7e7ed;box-shadow:0 12px 50px #51436320;display:flex;flex-direction:column;align-items:center;gap:24px}.story-panel .copy{white-space:pre-line;line-height:1.5}@keyframes pulse{50%{transform:scale(1.09) rotate(3deg)}}@media(max-height:450px){.level-menu{gap:8px}.level-list{padding:4px 0 20px;gap:12px}.level-card{gap:5px;padding:8px}.level-badge{width:40px;height:40px;font-size:21px}.level-card:nth-of-type(2n){top:10px}.level-subtitle{font-size:13px}.level-rating{font-size:14px}.level-menu>.copy{font-size:16px}}@media(max-width:600px)and (min-height:451px){.level-list{grid-template-columns:repeat(2,minmax(0,1fr))}.level-card:nth-of-type(2n){top:0}}.pause-menu{background:#51436385;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.pause-panel{width:min(440px,95%);background:#fff7e7f2;color:#514363;border:3px solid #fff;border-radius:36px;box-shadow:0 20px 80px #30214040;padding:24px 32px;display:flex;flex-direction:column;gap:14px}.pause-panel h1{font-size:34px}.pause-panel .copy{font-size:20px}.pause-flower{color:#bd6ca0;font-size:46px;line-height:1}@media(max-height:550px){.pause-panel{width:min(600px,95%);display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:22px}.pause-panel h1,.pause-panel .copy{grid-column:1 / -1}.pause-flower{display:none}.pause-panel .play-button{min-width:0;min-height:48px;font-size:21px}}.complete-menu{align-items:flex-end;background:linear-gradient(90deg,transparent,#fff7e780 45%,#fff7e7c9)}.complete-panel{width:56%;display:flex;flex-direction:column;align-items:center;gap:16px}.complete-panel h1{font-size:clamp(28px,4vw,48px);text-wrap:balance}.complete-panel .copy{font-size:clamp(17px,2vw,22px)}.result-rating{display:flex;gap:14px;font-size:clamp(44px,6vw,76px);line-height:1.1;color:#c9bed4;text-shadow:0 3px #fff}.result-rating .earned{color:#c07b13;animation:star-pop .45s ease-out}.result-gems{background:#fff7e7d9;border:2px solid #e5d3ee;border-radius:30px;padding:8px 20px;color:#76518e;font-weight:700}.result-actions{display:flex;flex-direction:column;gap:12px}@keyframes star-pop{50%{transform:scale(1.3) rotate(8deg)}}@media(max-height:450px){.complete-panel{gap:9px}.result-rating{font-size:44px}.result-actions{flex-direction:row;gap:10px}.result-actions .button{font-size:17px;padding:8px 14px}.result-gems{font-size:18px;padding:5px 16px}}.ending-menu{align-items:flex-end;background:linear-gradient(90deg,transparent 25%,#fff7e79c 60%,#fff7e7cd)}.ending-panel{width:52%;display:flex;flex-direction:column;align-items:center;gap:clamp(14px,3vh,26px)}.ending-panel h1{font-size:clamp(28px,4.5vw,58px);text-wrap:balance;text-shadow:0 3px #fff7e7}.ending-panel .copy{white-space:pre-line;line-height:1.5}.ending-thanks{color:#94567f;font-weight:700;font-size:28px}@media(max-height:450px){.ending-panel{gap:12px}.ending-panel .copy{font-size:18px}.ending-thanks{font-size:23px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
