:root{--primary: #f97316;--primary-hover: #ea580c;--secondary: #0284c7;--wood-dark: #78350f;--wood-light: #fef3c7;--surface-bg: #1e1b18;--text-main: #1f2937;--text-light: #ffffff;--safe-top: env(safe-area-inset-top, 0px);--safe-bottom: env(safe-area-inset-bottom, 0px)}*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}html,body{width:100%;height:100dvh;overflow:hidden;background-color:var(--surface-bg);font-family:Fredoka,Noto Sans TC,system-ui,-apple-system,sans-serif;color:var(--text-main);touch-action:manipulation;display:flex;justify-content:center;align-items:center}.mobile-frame{position:relative;width:100%;max-width:440px;height:100dvh;max-height:960px;display:flex;flex-direction:column;background:#fef3c7;box-shadow:0 20px 40px #00000080;overflow:hidden}@media(min-width:480px){.mobile-frame{border-radius:28px;height:94dvh;border:6px solid #292524}}.game-header{position:absolute;top:0;left:0;right:0;height:40px;padding:var(--safe-top) 8px 0 8px;display:flex;align-items:center;justify-content:space-between;z-index:20;background:linear-gradient(180deg,#fef3c7f5,#fef3c7bf 75%,#fef3c700);pointer-events:none}.header-left,.header-right{display:flex;align-items:center;gap:5px;pointer-events:auto}.icon-btn{background:#fff;border:1.5px solid #fed7aa;border-radius:10px;width:29px;height:29px;display:flex;align-items:center;justify-content:center;font-size:13px;cursor:pointer;box-shadow:0 1.5px 4px #00000014;transition:transform .1s ease,background .15s ease}.icon-btn:active{transform:scale(.92);background:#f1f5f9}#btn-level-select{width:auto;padding:0 6px;gap:3px}.badge{font-size:11px;font-weight:700;color:#c2410c}.score-pill{pointer-events:auto;background:#fff;border:1.5px solid #fed7aa;border-radius:10px;height:29px;padding:0 6px;display:flex;align-items:center;gap:3px;box-shadow:0 1.5px 4px #00000014}.score-icon{font-size:11px}.score-num{font-size:12px;font-weight:800;color:#9a3412}.goal-pill{pointer-events:auto;background:#946342;border:2px solid #78350f;border-radius:12px;height:31px;padding:2px 8px 2px 2px;display:flex;align-items:center;gap:5px;box-shadow:0 2.5px 6px #0003;font-weight:800;font-size:14px;color:#fff}.goal-check{background:#fff;color:#22c55e;font-size:13px;font-weight:900;width:25px;height:23px;border-radius:8px;display:flex;align-items:center;justify-content:center;box-shadow:0 1.5px 3px #00000026}.canvas-container{flex:1;width:100%;height:100%;position:relative;overflow:hidden}#game-canvas{width:100%;height:100%;display:block;touch-action:none}.game-modal{margin:auto;border:none;background:transparent;padding:0;max-width:92vw;width:360px}.game-modal::backdrop{background:#000000a6;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.modal-card{background:#fff;border-radius:24px;padding:24px 18px;text-align:center;box-shadow:0 20px 40px #00000059;animation:popIn .25s cubic-bezier(.175,.885,.32,1.275)}@keyframes popIn{0%{transform:scale(.85);opacity:0}to{transform:scale(1);opacity:1}}.modal-stars{font-size:38px;margin-bottom:8px;letter-spacing:4px}.modal-emoji{font-size:42px;margin-bottom:8px}.modal-title{font-size:21px;font-weight:700;color:#1e293b;margin-bottom:6px}.modal-desc{font-size:13.5px;color:#64748b;margin-bottom:16px;line-height:1.5}.modal-score-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px;padding:10px 14px;display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:15px;margin-bottom:18px}.modal-score-box strong{font-size:22px;color:#f59e0b}.modal-actions{display:flex;flex-direction:column;gap:10px}.primary-btn{background:#f97316;color:#fff;border:none;border-radius:16px;padding:12px 20px;font-size:16px;font-weight:700;cursor:pointer;box-shadow:0 4px 12px #f9731666;transition:transform .1s,background .15s}.primary-btn:active{transform:scale(.96);background:#ea580c}.secondary-btn{background:#f1f5f9;color:#475569;border:none;border-radius:16px;padding:11px 20px;font-size:15px;font-weight:600;cursor:pointer;transition:transform .1s}.secondary-btn:active{transform:scale(.96);background:#e2e8f0}.level-list{display:flex;flex-direction:column;gap:8px;margin-bottom:16px;max-height:380px;overflow-y:auto;padding-right:4px}.level-item-btn{background:#f8fafc;border:2px solid #e2e8f0;border-radius:14px;padding:10px 12px;display:flex;justify-content:space-between;align-items:center;cursor:pointer;transition:all .15s ease;text-align:left}.level-item-btn:hover,.level-item-btn:active{border-color:#f97316;background:#fff7ed}.level-item-text{display:flex;flex-direction:column;gap:2px}.level-name{font-size:14.5px;font-weight:700;color:#1e293b}.level-sub{font-size:11.5px;color:#64748b}.level-tag{font-size:11px;font-weight:700;background:#ffedd5;color:#c2410c;padding:3px 8px;border-radius:8px;flex-shrink:0}.tag-orange{background:#fed7aa;color:#9a3412}.tag-blue{background:#bae6fd;color:#0369a1}.tag-purple{background:#f3e8ff;color:#6b21a8}.tag-yellow{background:#fef08a;color:#854d0e}.tag-red{background:#fee2e2;color:#991b1b}.help-list{text-align:left;list-style:none;display:flex;flex-direction:column;gap:10px;font-size:13.5px;color:#334155;line-height:1.5;margin-bottom:18px}
