*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{width:100%;height:100%;overflow:hidden;background:#050510;font-family:Courier New,monospace;color:#e2e8f0}#app{display:flex;flex-direction:column;align-items:center;height:100vh;gap:6px;padding:8px 12px;position:relative}#level-header{width:100%;max-width:700px;display:flex;align-items:center;gap:8px;font-size:.82rem}#btn-menu,#btn-mute{background:#1e293b;border:1px solid #334155;color:#94a3b8;padding:4px 8px;border-radius:4px;cursor:pointer;font-size:1rem}#btn-menu:hover,#btn-mute:hover{background:#334155}#level-num{color:#64748b;flex-shrink:0}#level-title{font-weight:700;color:#e2e8f0;flex:1}#timer-display{color:#e2e8f0;font-weight:700;flex-shrink:0}#prev-stars{color:#f59e0b;flex-shrink:0}#game-canvas{display:block;border:2px solid #1e293b;border-radius:8px;background:#050510;touch-action:none;max-width:100%}#ui-panel{width:100%;max-width:700px;display:flex;flex-direction:column;gap:7px}#equation-display{text-align:center;font-size:1.35rem;font-weight:700;color:#7dd3fc;letter-spacing:.04em;min-height:1.8rem}#shot-tabs{display:flex;gap:6px;justify-content:center}.shot-tab{background:#1e293b;border:1px solid #334155;color:#94a3b8;padding:4px 14px;border-radius:4px;cursor:pointer;font-family:inherit;font-size:.85rem}.shot-tab.active{background:#7c3aed;border-color:#7c3aed;color:#fff}#controls{display:flex;flex-direction:column;gap:6px}#controls label{display:flex;align-items:center;gap:8px}.coeff-label{width:18px;font-weight:700;font-size:1.05rem;flex-shrink:0}#controls input[type=range]{flex:1;height:34px;cursor:pointer;touch-action:none}.coeff-value{width:50px;text-align:right;font-size:.9rem;flex-shrink:0}.slider-locked{opacity:.5}.slider-locked input[type=range]{pointer-events:none;cursor:not-allowed}#actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}button{padding:10px 28px;font-size:.95rem;font-family:inherit;font-weight:700;border:none;border-radius:8px;cursor:pointer;min-width:110px;min-height:44px}#btn-launch{background:#22c55e;color:#000}#btn-launch:hover{background:#16a34a}#btn-launch:disabled{background:#334155;color:#64748b;cursor:not-allowed}#btn-retry{background:#f59e0b;color:#000}#btn-retry:hover{background:#d97706}#btn-next{background:#7c3aed;color:#fff}#btn-next:hover{background:#6d28d9}.hidden{display:none!important}#result{text-align:center;font-size:1.2rem;font-weight:700;padding:8px 12px;border-radius:6px}#result.hit{background:#14532d;color:#4ade80}#result.miss{background:#450a0a;color:#f87171}.stars{color:#f59e0b;letter-spacing:.1em;font-size:1.1em}#math-hint{padding:8px 12px;background:#ffffff0a;border-left:3px solid #fb923c;border-radius:4px;font-size:.82rem;line-height:1.55;color:#cbd5e1}.reveal-card{position:fixed;bottom:16px;left:50%;transform:translate(-50%) translateY(calc(100% + 40px));background:#0f172a;border:2px solid #7c3aed;border-radius:12px;padding:16px 20px;max-width:440px;width:calc(100% - 32px);z-index:300;transition:transform .35s cubic-bezier(.34,1.4,.64,1)}.reveal-card-enter{transform:translate(-50%) translateY(0)}.reveal-card-exit{transform:translate(-50%) translateY(calc(100% + 40px));transition:transform .28s ease-in}.reveal-card-title{font-size:1.2rem;font-weight:700;color:#a78bfa;margin-bottom:3px}.reveal-card-subtitle{font-size:.82rem;color:#64748b;margin-bottom:10px}.reveal-card-canvas{display:block;width:100%;max-width:200px;height:100px;border-radius:6px;margin:0 auto 12px;border:1px solid #1e293b;background:#050510}.reveal-card-body{font-size:.85rem;line-height:1.65;color:#e2e8f0;margin-bottom:12px;white-space:pre-line}.reveal-card-vocab{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}.vocab-chip{background:#1e293b;border:1px solid #334155;color:#94a3b8;padding:2px 10px;border-radius:99px;font-size:.78rem}.reveal-card-dismiss{background:#7c3aed;color:#fff;width:100%;padding:10px;font-size:.95rem;border-radius:8px;border:none;cursor:pointer;font-family:inherit;font-weight:700}.reveal-card-dismiss:hover{background:#6d28d9}.chapter-intro-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:400;opacity:0;transition:opacity .35s ease}.chapter-intro-enter{opacity:1}.chapter-intro-exit{opacity:0;transition:opacity .28s ease-in}.chapter-intro-card{background:#0f172a;border:2px solid #3b82f6;border-radius:16px;padding:24px 28px;max-width:480px;width:calc(100% - 32px);text-align:center}.chapter-intro-title{font-size:1.5rem;font-weight:700;color:#60a5fa;margin-bottom:4px}.chapter-intro-subtitle{font-size:1rem;color:#93c5fd;margin-bottom:16px;font-family:Courier New,monospace}.chapter-intro-canvas{display:block;width:100%;max-width:260px;height:120px;border-radius:8px;margin:0 auto 16px;border:1px solid #1e293b;background:#050510}.chapter-intro-body{font-size:.9rem;line-height:1.7;color:#e2e8f0;margin-bottom:14px;text-align:left;white-space:pre-line}.chapter-intro-vocab{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-bottom:18px}.chapter-intro-start{background:#3b82f6;color:#fff;width:100%;padding:12px;font-size:1rem;border-radius:10px;border:none;cursor:pointer;font-family:inherit;font-weight:700}.chapter-intro-start:hover{background:#2563eb}#paywall-screen{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000d9;display:flex;align-items:center;justify-content:center;z-index:200;padding:16px}.premium-modal{background:#0f172a;border:2px solid #f59e0b;border-radius:12px;padding:28px;max-width:400px;width:100%;text-align:center}.premium-modal-title{font-size:1.4rem;font-weight:700;color:#f59e0b;margin-bottom:12px}.premium-modal-body{color:#cbd5e1;font-size:.9rem;line-height:1.6;margin-bottom:20px}button.premium-buy{display:block;width:100%;background:#7c3aed;color:#fff;border:none;border-radius:8px;padding:12px 20px;font-size:1rem;font-weight:700;font-family:inherit;cursor:pointer;margin-bottom:10px}button.premium-buy:hover{background:#6d28d9}button.premium-dismiss{background:none;border:none;color:#64748b;font-size:.85rem;font-family:inherit;cursor:pointer;padding:4px}button.premium-dismiss:hover{color:#94a3b8}#level-select-screen{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000e6;z-index:100;overflow-y:auto;padding:16px}#ls-inner{max-width:700px;margin:0 auto}#ls-inner h2{font-size:1.4rem;margin-bottom:16px;color:#e2e8f0}#ls-close{float:right;background:none;border:none;color:#64748b;font-size:1.4rem;cursor:pointer;padding:0}.ls-chapter{margin-bottom:20px}.ls-chapter-title{font-size:.85rem;color:#64748b;font-weight:700;margin-bottom:8px;text-transform:uppercase;letter-spacing:.08em}.ls-levels{display:flex;flex-wrap:wrap;gap:6px}.ls-level-btn{background:#1e293b;border:1px solid #334155;color:#e2e8f0;padding:6px 10px;border-radius:6px;cursor:pointer;min-width:52px;font-family:inherit;font-size:.8rem;display:flex;flex-direction:column;align-items:center;gap:2px}.ls-level-btn:hover{background:#334155}.ls-lvl-num{font-weight:700;font-size:.9rem}.ls-stars{color:#f59e0b;font-size:.7rem;letter-spacing:.05em}.ls-chapter-locked{opacity:.45;cursor:pointer}.ls-chapter-locked .ls-chapter-title{color:#475569}.ls-chapter-premium-locked{cursor:pointer}.ls-chapter-premium-locked .ls-chapter-title{color:#f59e0b}.ls-lock-info{font-size:.8rem;color:#64748b;padding:4px 0}.premium-lock-info{color:#f59e0b;font-weight:700}#shot-counter{background:#1e293b;color:#38bdf8;padding:3px 10px;border-radius:4px;font-size:.85rem;font-weight:700;border:1px solid #334155}#toast{position:fixed;bottom:80px;left:50%;transform:translate(-50%);background:#1e293b;color:#e2e8f0;padding:10px 18px;border-radius:8px;font-size:.9rem;border:1px solid #334155;z-index:200;pointer-events:none}.tutorial-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#000000b3;z-index:400}.tutorial-bubble{position:absolute;background:#fff;color:#0f172a;border-radius:10px;padding:16px 18px;max-width:280px;width:max-content;font-family:Courier New,monospace;font-size:.9rem;line-height:1.5;box-shadow:0 4px 24px #0009}.tutorial-bubble p{margin-bottom:12px}.tutorial-bubble strong{color:#7c3aed}.tutorial-bubble-above:after{content:"";position:absolute;bottom:-9px;left:50%;transform:translate(-50%);border:9px solid transparent;border-top-color:#fff;border-bottom:none}.tutorial-bubble-below:before{content:"";position:absolute;top:-9px;left:50%;transform:translate(-50%);border:9px solid transparent;border-bottom-color:#fff;border-top:none}.tutorial-got-it{background:#7c3aed;color:#fff;border:none;border-radius:6px;padding:8px 20px;font-size:.9rem;font-family:Courier New,monospace;font-weight:700;cursor:pointer;width:100%;min-height:40px}.tutorial-got-it:hover{background:#6d28d9}@keyframes tutorial-pulse{0%,to{outline-color:#7c3aede6}50%{outline-color:#7c3aed33}}.tutorial-highlight{outline:3px solid rgba(124,58,237,.9);outline-offset:3px;border-radius:4px;animation:tutorial-pulse 1.2s ease-in-out infinite;position:relative;z-index:401}
