:root{--accent: #ff7a59;--soft-accent: #ffe6ba;--ink: #24312f;--panel: rgba(255, 252, 240, .86);--scene-start: #d9f7ff;--scene-middle: #fff3b0;--scene-end: #ffc6a8;--glass: rgba(35, 36, 47, .9);--glass-strong: rgba(35, 36, 47, .96);--hud-bg: rgba(28, 29, 38, .92);--hud-bg-strong: rgba(25, 26, 35, .98);--line: rgba(255, 255, 255, .16);--shadow: 0 14px 28px rgba(31, 39, 48, .22);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:16px;line-height:1.25;text-rendering:geometricPrecision}*{box-sizing:border-box}html,body,#game-canvas,.app-shell{width:100%;height:100%}html,body{overscroll-behavior:none}body{margin:0;min-width:320px;min-height:100vh;min-height:100dvh;overflow:hidden;background:linear-gradient(150deg,var(--scene-start) 0%,var(--scene-middle) 48%,var(--scene-end) 100%);color:var(--ink);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}button{border:0;color:inherit;cursor:pointer;font:inherit}.app-shell{position:relative;isolation:isolate;overflow:hidden}#game-canvas{position:fixed;top:0;right:0;bottom:0;left:0;display:block;touch-action:none;outline:none}.safe-layer{pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2}.top-hud{pointer-events:auto;position:absolute;top:max(8px,env(safe-area-inset-top));left:50%;display:grid;grid-template-columns:50px minmax(0,1fr) 112px;align-items:center;gap:8px;width:min(760px,calc(100dvw - 22px - env(safe-area-inset-left) - env(safe-area-inset-right)));transform:translate(-50%)}.icon-button,.action-button,.close-button{display:inline-grid;place-items:center;border-radius:999px;background:url(/assets/ui/button-circle.png) center / 100% 100% no-repeat;box-shadow:var(--shadow)}.icon-button{width:50px;height:50px;min-height:0}.icon-button img,.action-button img,.score-chip img,.close-button img{width:20px;height:20px;object-fit:contain}.icon-button img,.action-button img,.score-chip img,.close-button img{filter:brightness(0) invert(1)}.mission-card{min-width:0;display:grid;grid-template-rows:auto auto 5px;gap:3px;height:60px;min-height:0;border:1px solid rgba(255,255,255,.14);border-radius:18px;overflow:hidden;padding:8px 15px 9px;background:linear-gradient(180deg,#ffffff21,#ffffff08),radial-gradient(circle at 12% 12%,rgba(255,255,255,.13),transparent 36%),var(--hud-bg-strong);box-shadow:var(--shadow);color:#f7f3e8}.mission-topline,.mission-title-row{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}#level-counter,#theme-label,.mission-status{color:#f7f3e8b8;font-size:.64rem;font-weight:900;letter-spacing:0;text-transform:uppercase}#level-title{min-width:0;overflow:hidden;color:#fff;font-size:.94rem;font-weight:950;line-height:1;text-overflow:ellipsis;white-space:nowrap}.mission-status{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#theme-label{max-width:130px;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap}.mission-progress{position:relative;overflow:hidden;height:5px;border-radius:999px;background:#ffffff24}#level-progress-fill{position:absolute;inset:0 auto 0 0;width:0;border-radius:inherit;background:linear-gradient(90deg,#ffcf4d,#35c7a0);transition:width .24s ease}.score-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;justify-content:center;gap:5px;width:112px;height:60px;min-height:0;border:1px solid rgba(255,255,255,.13);border-radius:18px;padding:6px;background:linear-gradient(180deg,#ffffff1f,#ffffff05),var(--hud-bg);box-shadow:var(--shadow)}.score-chip{display:grid;place-items:center;gap:2px;min-width:0;min-height:0;height:48px;border-radius:14px;background:#ffffff1a;color:#fff;font-size:.76rem;font-weight:950}.score-chip img{width:16px;height:16px}.star-score-chip{gap:1px;padding:4px 3px}.star-meter{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));justify-items:center;gap:1px;width:44px;max-width:100%}.star-meter img{width:13px;height:13px;opacity:.28;object-fit:contain;transform:scale(.78);filter:brightness(0) invert(1);transition:filter .18s ease,opacity .18s ease,transform .18s ease}.star-meter img.is-filled{opacity:1;transform:scale(1);filter:brightness(0) saturate(100%) invert(86%) sepia(57%) saturate(1098%) hue-rotate(331deg) brightness(102%) contrast(98%) drop-shadow(0 2px 4px rgba(255,202,75,.35))}.star-meter img.is-popping{animation:star-pop .42s cubic-bezier(.2,1.5,.45,1)}.star-score-text{font-size:.58rem;line-height:1}.star-score-chip.is-celebrating{animation:star-chip-glow .88s ease}@keyframes star-pop{0%{transform:scale(.72) rotate(-10deg)}58%{transform:scale(1.32) rotate(8deg)}to{transform:scale(1) rotate(0)}}@keyframes star-chip-glow{0%,to{background:#ffffff1a}42%{background:#ffce4d47}}.play-overlay{pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:start center;padding-top:calc(max(8px,env(safe-area-inset-top)) + 70px)}.toast{max-width:min(78vw,390px);transform:translateY(-8px) scale(.98);border:1px solid var(--line);border-radius:999px;opacity:0;background:var(--glass-strong);box-shadow:var(--shadow);color:#fff;padding:8px 13px;text-align:center;font-size:.84rem;font-weight:900;overflow-wrap:anywhere;transition:opacity .16s ease,transform .16s ease}.toast.is-visible{transform:translateY(0) scale(1);opacity:1}.control-dock{pointer-events:auto;position:absolute;left:50%;bottom:max(10px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;width:min(430px,calc(100dvw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));padding:7px;border-radius:999px;background:url(/assets/ui/button-wide.png) center / 100% 100% no-repeat;box-shadow:var(--shadow);transform:translate(-50%)}.action-button{width:100%;max-width:52px;aspect-ratio:1;justify-self:center;min-width:0;box-shadow:inset 0 -2px #00000014}.action-button:active,.icon-button:active,.level-cell:active{transform:translateY(1px) scale(.98)}.next-button:active{transform:translate(-50%) translateY(1px) scale(.98)}.action-button.is-muted{opacity:.58}.next-button{pointer-events:auto;position:absolute;left:50%;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 72px);display:grid;grid-template-columns:minmax(0,1fr) 38px;align-items:center;gap:9px;width:min(236px,calc(100dvw - 56px - env(safe-area-inset-left) - env(safe-area-inset-right)));height:52px;min-width:0;padding:6px 7px 6px 18px;transform:translate(-50%);border:1px solid rgba(255,255,255,.16);border-radius:18px;background:linear-gradient(180deg,#ffffff2e,#ffffff08),linear-gradient(135deg,#ffb84d 0%,var(--accent) 62%,#df4d7a 100%);box-shadow:0 16px 34px #1f273040,inset 0 -3px #5f202633;color:#fff;overflow:hidden;text-align:left;transition:filter .18s ease,opacity .18s ease,transform .18s ease;visibility:visible}.next-button:before{content:"";position:absolute;top:1px;right:1px;bottom:1px;left:1px;border-radius:17px;background:linear-gradient(90deg,rgba(255,255,255,.24),transparent 46%);pointer-events:none}.next-button-label{position:relative;z-index:1;min-width:0;overflow:hidden;font-size:.88rem;font-weight:950;line-height:1;text-overflow:ellipsis;text-shadow:0 1px 0 rgba(67,36,30,.26);white-space:nowrap}.next-button-mark{position:relative;z-index:1;display:grid;place-items:center;width:38px;height:38px;border-radius:999px;background:url(/assets/ui/button-circle-highlight.png) center / 100% 100% no-repeat;box-shadow:0 6px 14px #3b171a38}.next-button-mark img{width:16px;height:16px;object-fit:contain;filter:brightness(0) invert(1) drop-shadow(0 1px 0 rgba(0,0,0,.18))}.next-button:not(:disabled):focus-visible{outline:3px solid rgba(255,255,255,.72);outline-offset:3px}.next-button:disabled{pointer-events:none;transform:translate(-50%) translateY(8px) scale(.96);visibility:hidden;opacity:0}.sheet-dialog{width:min(420px,calc(100dvw - 24px));max-height:min(72dvh,680px);overflow:hidden;border:0;border-radius:22px;background:linear-gradient(180deg,#ffffff14,#fff0),#242630;box-shadow:var(--shadow);color:#f7f3e8;padding:14px}.sheet-dialog::backdrop{background:#1c212a42;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.dialog-head strong{min-width:0;overflow:hidden;font-size:1.04rem;text-overflow:ellipsis;white-space:nowrap}.close-button{flex:0 0 auto;width:42px;height:42px;box-shadow:none}.goal-copy{display:grid;gap:8px;overflow:auto;max-height:calc(min(72dvh,680px) - 82px)}.goal-copy p{margin:0;border-radius:12px;background:#ffffff14;padding:11px 12px;font-weight:800;line-height:1.35;overflow-wrap:anywhere}.level-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:8px;overflow:auto;max-height:calc(min(72dvh,680px) - 82px);padding:2px 1px 4px}.level-cell{display:grid;align-content:center;min-height:52px;border-radius:999px;background:url(/assets/ui/button-circle.png) center / 100% 100% no-repeat;box-shadow:inset 0 -2px #00000014;color:#fff;font-weight:950}.level-cell span{color:#ffffff9e;font-size:.66rem;font-weight:800}.level-cell.is-current{outline:3px solid color-mix(in srgb,var(--accent),white 20%)}.level-cell.is-locked{cursor:default;opacity:.48}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@media(max-width:390px){.top-hud{grid-template-columns:42px minmax(0,1fr) 86px;gap:5px;width:min(390px,calc(100dvw - 14px - env(safe-area-inset-left) - env(safe-area-inset-right)))}.icon-button{width:42px;height:42px}.mission-card{height:52px;border-radius:15px;padding:6px 10px 7px}#level-counter,#theme-label,.mission-status{font-size:.58rem}#level-title{font-size:.86rem}#theme-label{max-width:68px}.mission-progress{height:4px}.score-strip{width:86px;height:52px;gap:3px;padding:5px;border-radius:15px}.score-chip{height:42px;border-radius:12px;font-size:.66rem}.score-chip img{width:14px;height:14px}.star-meter{width:36px}.star-meter img{width:11px;height:11px}.star-score-text{font-size:.52rem}.control-dock{gap:5px;width:min(390px,calc(100dvw - 18px - env(safe-area-inset-left) - env(safe-area-inset-right)));padding:6px}.next-button{grid-template-columns:minmax(0,1fr) 34px;gap:7px;width:min(214px,calc(100dvw - 46px - env(safe-area-inset-left) - env(safe-area-inset-right)));height:48px;padding:6px 7px 6px 15px;border-radius:16px}.next-button:before{border-radius:15px}.next-button-label{font-size:.8rem}.next-button-mark{width:34px;height:34px}.next-button-mark img{width:15px;height:15px}}@media(max-height:660px){.top-hud{top:max(6px,env(safe-area-inset-top))}.play-overlay{padding-top:calc(max(6px,env(safe-area-inset-top)) + 62px)}.control-dock{bottom:max(7px,env(safe-area-inset-bottom));width:min(390px,calc(100dvw - 22px - env(safe-area-inset-left) - env(safe-area-inset-right)))}.next-button{bottom:calc(max(7px,env(safe-area-inset-bottom)) + 60px);height:46px}.toast{padding-block:7px}}@media(orientation:landscape)and (max-height:540px){.top-hud{left:50%;width:min(720px,calc(100dvw - 18px - env(safe-area-inset-left) - env(safe-area-inset-right)));grid-template-columns:44px minmax(0,1fr) 96px;transform:translate(-50%)}.icon-button{width:44px;height:44px}.mission-card{height:52px;border-radius:15px;padding:6px 13px 7px}#level-title{font-size:.88rem}.score-strip{width:96px;height:52px;border-radius:15px;padding:5px}.score-chip{height:42px;border-radius:12px;font-size:.68rem}.star-meter{width:38px}.star-meter img{width:12px;height:12px}.control-dock{bottom:max(7px,env(safe-area-inset-bottom));width:min(390px,calc(100dvw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)));gap:6px;padding:6px}.action-button{max-width:44px}.next-button{left:50%;bottom:calc(max(7px,env(safe-area-inset-bottom)) + 56px);width:min(190px,calc(100dvw - 42px - env(safe-area-inset-left) - env(safe-area-inset-right)));height:44px;transform:translate(-50%)}.next-button:active{transform:translate(-50%) translateY(1px) scale(.98)}.next-button:disabled{transform:translate(-50%) translateY(8px) scale(.96)}.next-button-label{font-size:.78rem}}
