.theme-selector{position:fixed;top:20px;right:20px;display:inline-flex;flex-direction:column;gap:6px;background:transparent;padding:0;z-index:1000;transition:background .2s ease,transform .3s ease,opacity .3s ease}.theme-selector.hidden{transform:translateY(-60px);opacity:0;pointer-events:none}.theme-selector.expanded{background:transparent;padding:0}.theme-toggle-btn{background:transparent;border:none;border-radius:50%;width:40px;height:40px;cursor:pointer;font-size:1.2rem;transition:transform .2s ease;display:flex;align-items:center;justify-content:center;padding:0;line-height:1;will-change:transform;position:relative;flex-shrink:0}.theme-toggle-btn:hover{transform:scale(1.1)}.theme-toggle-btn:active{transform:scale(.95)}.theme-toggle-btn:focus-visible{outline:2px solid var(--primary-color);outline-offset:2px}.theme-selector.expanded .theme-toggle-btn{display:none}.theme-icon{display:inline-flex;align-items:center;justify-content:center}.theme-options{display:none;flex-direction:column;gap:6px;max-height:200px;transition:all .2s ease}.theme-selector.expanded .theme-options{display:flex}.theme-btn{background:transparent;border:none;border-radius:50%;width:40px;height:40px;cursor:pointer;font-size:1.2rem;transition:background .2s ease,transform .2s ease;display:flex;align-items:center;justify-content:center;padding:0;line-height:1;will-change:transform}.theme-btn:hover{background:var(--button-bg-hover);transform:scale(1.1)}.theme-btn.active{background:var(--primary-color);opacity:.8}.theme-btn:active{transform:scale(.95)}.theme-btn:focus-visible{outline:2px solid var(--primary-color);outline-offset:2px}@media(max-width:600px){.theme-selector{opacity:1;pointer-events:auto;flex-direction:column;background:transparent;padding:0}.theme-toggle-btn,.theme-selector:hover .theme-toggle-btn{opacity:1}.theme-options{display:none;flex-direction:column}.theme-selector.expanded .theme-options{display:flex;flex-direction:column}}.levels-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;width:100%;margin-bottom:32px}.level-btn{padding:20px 16px;background:var(--button-bg);border:2px solid var(--button-border);border-radius:12px;color:var(--text-primary);cursor:pointer;transition:background .2s ease,border-color .2s ease,transform .2s ease;text-align:center;will-change:transform}.level-btn:hover{background:var(--button-bg-hover);border-color:var(--button-border-hover);transform:translateY(-2px)}.level-btn:active{transform:translateY(0)}.level-btn:focus-visible{outline:2px solid var(--primary-color);outline-offset:2px}.level-num{font-size:1.2rem;font-weight:700;margin-bottom:8px}.level-name{font-size:.95rem;font-weight:600;margin-bottom:6px}.level-desc{font-size:.8rem;color:var(--text-tertiary)}@media(max-width:600px){.levels-grid{grid-template-columns:1fr}}.question-area{display:flex;flex-direction:column;align-items:center;width:100%}.question-area.touch-enabled{cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:manipulation}.question-area.tapped .question{animation:tapPulse .15s ease-out}@keyframes tapPulse{0%{transform:scale(1)}50%{transform:scale(.97)}to{transform:scale(1)}}.question-area.reviewing{opacity:.85}.difficulty{font-size:.9rem;color:var(--text-tertiary);margin-bottom:60px;text-align:center;font-weight:500}.difficulty.reviewing{color:var(--primary-color);font-weight:600}.question{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:60px;width:min(480px,100%);min-height:160px;text-align:center;flex-wrap:wrap}.display{font-size:3.5rem;font-weight:700;color:var(--text-primary);letter-spacing:2px;animation:fadeIn .2s ease-out}@keyframes fadeIn{0%{opacity:.6}to{opacity:1}}sup{font-size:.6em;vertical-align:super}.answer-slot{position:relative;display:inline-flex;align-items:center;justify-content:center}.answer{font-size:3.5rem;font-weight:700;color:var(--answer-color);animation:revealAnswer .35s ease-out}.answer-hidden{visibility:hidden;animation:none}@keyframes revealAnswer{0%{opacity:0;transform:translateY(-10px) scale(.95)}60%{opacity:1;transform:translateY(0) scale(1.02)}to{opacity:1;transform:translateY(0) scale(1)}}.hint-text{position:absolute;font-size:3.5rem;font-weight:700;color:var(--text-tertiary)}.action-placeholder{height:60px;display:flex;align-items:center;justify-content:center;margin-bottom:60px}.show-hint{font-size:.95rem;color:var(--text-secondary);font-style:italic;margin:0}.btn-next{padding:16px 48px;font-size:1.1rem;font-weight:600;color:var(--white);background:var(--primary-color);border:none;border-radius:50px;cursor:pointer;transition:transform .2s ease;text-transform:uppercase;letter-spacing:1px;will-change:transform}.btn-next:hover{transform:translateY(-2px)}.btn-next:active{transform:translateY(0)}.btn-next:focus-visible{outline:2px solid var(--primary-color);outline-offset:2px}.keyboard-hints{margin-top:40px;font-size:.85rem;color:var(--text-secondary);text-align:center;line-height:1.6}.keyboard-hints span{display:inline-block;background:var(--keyboard-hint-bg);padding:4px 8px;border-radius:4px;font-weight:600;margin:0 4px}@media(max-width:600px){.display,.answer{font-size:2.5rem}.hint-text{font-size:2rem}.action-placeholder{height:40px;margin-bottom:40px}.btn-next{padding:12px 36px;font-size:1rem}.question{margin-bottom:40px}}.milestone-toast{position:fixed;bottom:32px;left:50%;transform:translate(-50%);padding:12px 24px;background:var(--primary-color);color:var(--white);font-weight:600;border-radius:8px;animation:toastSlideUp .3s ease-out,toastFadeOut .3s ease-in 2.2s forwards;z-index:1000}@keyframes toastSlideUp{0%{opacity:0;transform:translate(-50%) translateY(20px)}to{opacity:1;transform:translate(-50%) translateY(0)}}@keyframes toastFadeOut{0%{opacity:1}to{opacity:0}}*{margin:0;padding:0;box-sizing:border-box}.skip-link{position:absolute;top:-100px;left:16px;padding:12px 20px;background:var(--primary-color);color:var(--white);font-weight:600;border-radius:8px;text-decoration:none;z-index:1000;transition:top .2s ease}.skip-link:focus{top:16px}:root[data-theme=light]{--bg-gradient-start: #f5f7fa;--bg-gradient-end: #e8ecf1;--text-primary: #1f2937;--text-secondary: rgba(31, 41, 55, .8);--text-tertiary: rgba(31, 41, 55, .6);--white: #ffffff;--button-bg: rgba(255, 255, 255, .1);--button-bg-hover: rgba(255, 255, 255, .15);--button-border: rgba(31, 41, 55, .2);--button-border-hover: rgba(31, 41, 55, .4);--primary-color: #667eea;--answer-color: #059669;--keyboard-hint-bg: rgba(102, 126, 234, .1)}:root[data-theme=dark]{--bg-gradient-start: #1a1a2e;--bg-gradient-end: #16213e;--text-primary: #f3f4f6;--text-secondary: rgba(243, 244, 246, .9);--text-tertiary: rgba(243, 244, 246, .6);--white: #ffffff;--button-bg: rgba(255, 255, 255, .1);--button-bg-hover: rgba(255, 255, 255, .15);--button-border: rgba(255, 255, 255, .2);--button-border-hover: rgba(255, 255, 255, .4);--primary-color: #667eea;--answer-color: #10b981;--keyboard-hint-bg: rgba(255, 255, 255, .1)}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;background:linear-gradient(135deg,var(--bg-gradient-start) 0%,var(--bg-gradient-end) 100%);min-height:100vh;display:flex;align-items:center;justify-content:center;color:var(--text-primary);transition:background-color .2s ease}.container{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;max-width:600px;padding:120px 20px 40px;min-height:100vh}#question-area{display:flex;flex-direction:column;width:100%}h1{font-size:2.5rem;color:var(--text-primary);margin-bottom:10px;text-align:center;font-weight:700}.header{width:100%;margin-bottom:40px}.header h1{margin-bottom:0;font-size:2rem;text-align:center}.subtitle{font-size:1rem;color:var(--text-secondary);margin-bottom:40px;text-align:center}.reset-history-btn{padding:12px 24px;font-size:.95rem;font-weight:600;color:var(--text-primary);background:var(--button-bg);border:2px solid var(--button-border);border-radius:8px;cursor:pointer;transition:background .2s ease,border-color .2s ease,opacity .2s ease;margin-bottom:24px}.back-button{align-self:flex-start;margin-bottom:24px;padding:10px 20px;border-radius:999px;border:2px solid var(--button-border);background:var(--button-bg);color:var(--text-primary);font-weight:600;cursor:pointer;transition:background .2s ease,border-color .2s ease,transform .2s ease}.back-button:hover{background:var(--button-bg-hover);border-color:var(--button-border-hover);transform:translate(-2px)}.back-button:focus-visible{outline:2px solid var(--primary-color);outline-offset:2px}.reset-history-btn:hover:not(:disabled){background:var(--button-bg-hover);border-color:var(--button-border-hover)}.reset-history-btn:disabled{opacity:.5;cursor:not-allowed}.reset-history-btn:focus-visible{outline:2px solid var(--primary-color);outline-offset:2px}.back-button-fixed{position:fixed;top:16px;left:16px;z-index:900}@media(max-width:600px){.container{padding-top:140px}h1{font-size:1.8rem}.header h1{font-size:1.5rem}.subtitle{font-size:.95rem;margin-bottom:40px}}@media(min-width:769px){.container{padding-top:160px}.back-button-fixed{top:32px;left:32px}}
