:root{font-family:Nunito,Avenir Next,Quicksand,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;color:#1e293b;background:linear-gradient(160deg,#f5f3ff,#fdf2f8,#ecfeff);min-height:100vh;-webkit-tap-highlight-color:transparent}*{box-sizing:border-box}body{margin:0;min-height:100vh}button{font-family:inherit;cursor:pointer;border:none;touch-action:manipulation}.card{background:#fffffff0;border-radius:24px;box-shadow:0 12px 30px #1e293b14;border:2px solid rgba(255,255,255,.8)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 20px;border-radius:16px;font-size:1rem;font-weight:700;transition:transform .12s ease,box-shadow .12s ease,opacity .12s ease}.btn:active{transform:scale(.96)}.btn-primary{background:#8b5cf6;color:#fff;box-shadow:0 6px 16px #8b5cf647}.btn-primary:hover{filter:brightness(1.05)}.btn-vocab{background:#0d9488;color:#fff;box-shadow:0 6px 16px #0d948847}.btn-vocab:hover{filter:brightness(1.05)}.btn-secondary{background:#fff;color:#334155;border:2px solid #e2e8f0}.btn-secondary:hover{background:#f8fafc}.btn-theme{color:#fff;width:100%;box-shadow:0 6px 14px #0f172a26}.btn-sm{padding:8px 14px;font-size:.9rem;border-radius:12px}.btn-lg{padding:15px 30px;font-size:1.15rem}.home-container,.studio-container{max-width:1020px;margin:0 auto;padding:24px 18px 48px}.hero-banner{padding:24px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:24px}.hero-left{display:flex;align-items:center;gap:20px;flex:1 1 320px}.app-title{margin:0 0 6px;font-size:2rem;line-height:1.15;color:#312e81}.app-subtitle{margin:0 0 12px;color:#475569;font-size:1rem}.hero-stats{display:flex;flex-wrap:wrap;gap:10px}.star-pill,.stat-pill,.streak-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border-radius:999px;font-weight:800;font-size:.95rem}.star-pill{background:#fef3c7;color:#b45309;border:2px solid #fde68a}.stat-pill{background:#f1f5f9;color:#334155}.streak-pill{background:#ffedd5;color:#c2410c;border:2px solid #fed7aa}.hero-actions{display:flex;flex-direction:column;gap:10px}.hero-sub-actions{display:flex;gap:8px}.hero-sub-actions>button{flex:1}.manage-banner{background:#eff6ff;border:2px solid #bfdbfe;color:#1e40af;border-radius:16px;padding:12px 16px;margin-bottom:18px;font-weight:600}.theme-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px}.theme-card{border-radius:24px;padding:22px;border:3px solid transparent;box-shadow:0 10px 24px #0f172a14;display:flex;flex-direction:column;gap:10px;transition:transform .16s ease}.theme-card:hover{transform:translateY(-3px)}.theme-card.theme-hidden{opacity:.55;filter:grayscale(.4)}.theme-card-top{display:flex;align-items:center;justify-content:space-between}.theme-icon{font-size:2.4rem}.theme-badge{padding:5px 12px;border-radius:999px;font-size:.85rem;font-weight:800}.theme-name{margin:4px 0 0;font-size:1.35rem;color:#0f172a}.theme-subtitle{margin:0;font-size:.95rem;color:#475569;min-height:2.6em}.progress-track{height:10px;background:#ffffffbf;border-radius:999px;overflow:hidden;margin:4px 0 8px}.progress-fill{height:100%;border-radius:999px;transition:width .3s ease}.theme-card-actions{display:flex;gap:10px;margin-top:auto}.empty-state{padding:32px;text-align:center;font-size:1.1rem;color:#475569}.companion-sidekick{filter:drop-shadow(0 3px 4px rgba(15,23,42,.2));pointer-events:none;-webkit-user-select:none;user-select:none}.avatar-cheer{animation:bounce .55s ease infinite alternate}@keyframes bounce{0%{transform:translateY(0)}to{transform:translateY(-8px)}}.top-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;flex-wrap:wrap}.top-bar-right{display:flex;align-items:center;gap:10px}.studio-grid{display:grid;grid-template-columns:300px 1fr;gap:20px;align-items:start}@media(max-width:780px){.studio-grid{grid-template-columns:1fr}}.studio-preview{padding:24px;display:flex;flex-direction:column;align-items:center;gap:16px}.name-field{width:100%;display:flex;flex-direction:column;gap:6px;font-weight:700;color:#475569;font-size:.9rem}.name-field input{width:100%;padding:10px 14px;border-radius:14px;border:2px solid #cbd5e1;font-size:1.05rem;font-weight:700;font-family:inherit;color:#1e293b}.studio-notice{width:100%;text-align:center;background:#fef3c7;color:#92400e;padding:10px 12px;border-radius:14px;font-weight:700;font-size:.92rem}.studio-wardrobe{padding:24px}.studio-wardrobe h2{margin:0 0 14px;color:#312e81}.category-tabs{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}.tab-btn{padding:9px 14px;border-radius:14px;background:#f1f5f9;color:#334155;font-weight:700;font-size:.92rem}.tab-btn.active{background:#8b5cf6;color:#fff}.option-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:12px}.option-card{background:#f8fafc;border:2.5px solid #e2e8f0;border-radius:18px;padding:14px 10px;display:flex;flex-direction:column;align-items:center;gap:6px;transition:transform .12s ease,border-color .12s ease}.option-card:hover{transform:translateY(-2px)}.option-card.selected{border-color:#8b5cf6;background:#f5f3ff}.option-card.locked{background:#fffbeb;border-color:#fde68a}.color-swatch{width:36px;height:36px;border-radius:999px;border:3px solid #ffffff;box-shadow:0 2px 6px #00000026}.option-emoji{font-size:1.9rem}.option-figure-preview{height:70px;display:flex;align-items:flex-end;justify-content:center}.option-label{font-weight:700;font-size:.9rem;color:#1e293b;text-align:center}.option-price{font-size:.85rem;font-weight:800;color:#b45309}.option-equipped{font-size:.78rem;font-weight:800;color:#7c3aed}.option-owned{font-size:.78rem;font-weight:700;color:#64748b}.game-page{min-height:100vh;padding:20px 16px 40px}.game-inner{max-width:780px;margin:0 auto}.game-theme-title{font-size:1.25rem;font-weight:800;color:#1e293b}.word-dots{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-bottom:16px}.word-dot{width:36px;height:36px;border-radius:999px;background:#ffffffbf;color:#475569;font-weight:800;border:2px solid transparent}.word-dot.started{background:#fef3c7;color:#b45309}.word-dot.mastered{background:#10b981;color:#fff}.word-dot.current{border-color:#1e293b;transform:scale(1.12)}.game-card{padding:24px;display:flex;flex-direction:column;align-items:center;gap:18px}.game-header-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.game-prompt-info{flex:1 1 200px}.stage-badge{display:inline-block;padding:6px 14px;border-radius:999px;font-weight:800;font-size:.9rem;margin-bottom:6px}.stage-desc{margin:0;color:#475569;font-weight:600}.word-emoji-badge{font-size:3.1rem;background:#f8fafc;width:76px;height:76px;border-radius:22px;display:flex;align-items:center;justify-content:center;border:2px solid #e2e8f0}.audio-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}.speech-fallback{margin:0;font-size:.9rem;color:#64748b}.hint-box{width:100%;max-width:560px;background:#fffbeb;border:2px solid #fde68a;color:#92400e;border-radius:16px;padding:12px 16px;text-align:center;font-weight:700}.sentence-box{background:#f0f9ff;border-color:#bae6fd;color:#075985}.letter-slots{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:6px 0}.letter-slot{width:54px;height:62px;border-radius:16px;background:#f8fafc;border:3px dashed #cbd5e1;font-size:1.75rem;font-weight:900;color:#1e293b;display:flex;align-items:center;justify-content:center;transition:transform .12s ease}.letter-slot.filled{background:#fff;border-style:solid;box-shadow:0 4px 10px #0f172a14}.letter-slot.revealed{background:#f1f5f9;border:3px solid #cbd5e1;color:#475569;cursor:default}.letter-slot.slot-wrong{background:#fee2e2;border:3px solid #f87171!important;color:#b91c1c!important}.free-char-wrong{background:#fee2e2;color:#b91c1c;border-radius:8px;padding:0 3px}.game-avatar-stage{position:relative;display:inline-flex;align-items:flex-end;padding-top:22px}.idle-speech-bubble{position:absolute;top:-4px;left:50%;transform:translate(-50%);background:#fffbeb;color:#92400e;border:2px solid #fbbf24;border-radius:14px;padding:4px 10px;font-size:.82rem;font-weight:800;white-space:nowrap;box-shadow:0 4px 10px #0f172a1f;z-index:4;animation:floatBubble 1.3s ease-in-out infinite}.letter-slots.shake{animation:shake .4s ease}.letter-slots.celebrate .letter-slot{background:#ecfdf5;border-color:#10b981!important;color:#047857!important}@keyframes shake{0%,to{transform:translate(0)}25%{transform:translate(-8px)}50%{transform:translate(8px)}75%{transform:translate(-6px)}}.feedback-banner{padding:12px 20px;border-radius:16px;font-weight:800;font-size:1.05rem;display:flex;align-items:center;gap:10px}.feedback-banner.success{background:#dcfce7;color:#166534}.feedback-banner.wrong{background:#fef3c7;color:#92400e}.earned-chip{background:#fff;color:#b45309;padding:4px 10px;border-radius:999px;font-size:.95rem}.tile-bank-section{width:100%;display:flex;flex-direction:column;align-items:center;gap:14px}.tile-bank{display:flex;flex-wrap:wrap;justify-content:center;gap:10px}.letter-tile{width:56px;height:58px;border-radius:16px;background:#fff;border:2.5px solid #cbd5e1;box-shadow:0 5px #cbd5e1;font-size:1.55rem;font-weight:900;color:#1e293b;transition:transform .1s ease,opacity .15s ease}.letter-tile:active:not(:disabled){transform:translateY(3px);box-shadow:0 2px #cbd5e1}.letter-tile.used{opacity:.25;box-shadow:none;cursor:default}.input-utility-row{display:flex;gap:10px}.keyboard-section{width:100%;display:flex;flex-direction:column;align-items:center;gap:12px}.touch-keyboard{width:100%;max-width:640px;display:flex;flex-direction:column;gap:8px;margin-top:6px}.kb-row{display:flex;justify-content:center;gap:6px}.kb-key{position:relative;flex:1;max-width:56px;height:50px;border-radius:12px;background:#fff;border:2px solid #cbd5e1;box-shadow:0 3px #cbd5e1;font-size:1.15rem;font-weight:800;color:#1e293b;transition:transform .1s ease,opacity .15s ease,background-color .15s ease}.kb-key:active:not(:disabled){transform:translateY(2px);box-shadow:0 1px #cbd5e1}.kb-key.kb-lit{background:#fff;border-width:2.5px;box-shadow:0 4px #0f172a26}.kb-key.kb-greyed{background:#e2e8f0;border-color:#cbd5e1;color:#94a3b8;box-shadow:none;opacity:.48;cursor:default}.kb-count{position:absolute;top:-6px;right:-5px;min-width:19px;height:19px;padding:0 4px;border-radius:999px;color:#fff;font-size:.72rem;font-weight:900;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px #0f172a33}.kb-action{max-width:72px;background:#f1f5f9}.lesson-progress-bar{width:100%;height:12px;border-radius:999px;background:#ffffffb8;overflow:hidden;margin-bottom:16px;box-shadow:inset 0 2px 4px #0f172a14}.lesson-progress-fill{height:100%;border-radius:999px;transition:width .3s ease}.badge-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:6px}.badge-row .stage-badge{margin-bottom:0}.review-badge{display:inline-block;padding:5px 12px;border-radius:999px;background:#e0f2fe;color:#0369a1;font-weight:800;font-size:.85rem}.hint-timed{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left}.hint-timer{background:#fde68a;color:#92400e;padding:3px 10px;border-radius:999px;font-size:.85rem;font-weight:900;flex-shrink:0}.free-spell-area{width:100%;max-width:520px;display:flex;flex-direction:column;align-items:center;gap:14px;margin:6px 0}.free-spell-box{width:100%;min-height:68px;padding:12px 20px;border-radius:18px;background:#fff;border:3px solid #8b5cf6;box-shadow:0 6px 14px #0f172a14;display:flex;align-items:center;justify-content:center;gap:4px}.free-spell-box.shake{animation:shake .4s ease}.free-spell-box.celebrate{background:#ecfdf5;border-color:#10b981!important;color:#047857!important}.free-spell-letters{font-size:1.9rem;font-weight:900;letter-spacing:.14em}.free-spell-placeholder{font-size:1.15rem;font-weight:700;color:#94a3b8}.free-spell-cursor{width:3px;height:30px;background:currentColor;border-radius:2px;animation:blinkCursor 1s steps(2,start) infinite}@keyframes blinkCursor{0%,to{opacity:1}50%{opacity:0}}.free-spell-actions{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}.free-spell-actions button:disabled{opacity:.45;cursor:not-allowed}.success-actions{margin-top:4px}.level-map-page{min-height:100vh;padding:20px 16px 40px}.level-map-inner{max-width:1080px;margin:0 auto}.map-card{padding:20px 22px 24px;display:flex;flex-direction:column;gap:16px}.map-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.map-instruction{margin:0;color:#475569;font-size:.98rem}.map-toast{background:#fef3c7;color:#92400e;border:2px solid #fde68a;border-radius:14px;padding:6px 14px;font-weight:700;font-size:.9rem}.map-scroll-container{width:100%;overflow-x:auto;border-radius:20px;background:#ffffff8c;border:2px solid rgba(255,255,255,.9);padding:12px 0;-webkit-overflow-scrolling:touch}.map-canvas{position:relative;margin:0 auto}.map-svg{display:block}.map-decor{position:absolute;transform:translate(-50%,-50%);font-size:2rem;opacity:.78;pointer-events:none;-webkit-user-select:none;user-select:none}.map-circle{position:absolute;transform:translate(-50%,-50%);width:62px;height:62px;border-radius:999px;border:4px solid #8b5cf6;box-shadow:0 6px 14px #0f172a24;display:flex;flex-direction:column;align-items:center;justify-content:center;transition:transform .16s ease,box-shadow .16s ease;z-index:2}.map-circle:hover:not(.locked){transform:translate(-50%,-50%) scale(1.1)}.map-circle.active{transform:translate(-50%,-50%) scale(1.14);box-shadow:0 0 0 6px #ffffffd9,0 10px 20px #0f172a33}.map-circle.locked{cursor:not-allowed;opacity:.85}.map-circle-num{font-size:1.3rem;font-weight:900;line-height:1}.map-circle-stars{position:absolute;bottom:-22px;display:flex;gap:2px;font-size:.85rem;background:#ffffffeb;padding:1px 6px;border-radius:999px;box-shadow:0 2px 6px #0f172a1a}.star-on{color:#f59e0b}.star-off{color:#cbd5e1}.map-character-token{position:absolute;transform:translate(-50%,-95%);background:transparent;padding:0;display:flex;flex-direction:column;align-items:center;gap:4px;z-index:5;filter:drop-shadow(0 6px 10px rgba(15,23,42,.18));transition:left .45s cubic-bezier(.34,1.56,.64,1),top .45s cubic-bezier(.34,1.56,.64,1)}.map-play-bubble{color:#fff;font-size:.78rem;font-weight:800;padding:4px 10px;border-radius:999px;white-space:nowrap;box-shadow:0 4px 10px #0f172a2e;animation:floatBubble 1.6s ease-in-out infinite}@keyframes floatBubble{0%,to{transform:translateY(0)}50%{transform:translateY(-4px)}}.lesson-preview-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#f8fafc;border:2px solid #e2e8f0;border-radius:18px;padding:16px 20px}.lesson-preview-info h3{margin:0 0 4px;color:#1e293b;font-size:1.2rem}.lesson-preview-info p{margin:0;color:#475569;font-weight:600}.preview-emojis{font-size:1.25rem;margin-left:4px}.mastered-tag{color:#059669;font-size:.95rem}.lesson-complete-card{padding:36px 24px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px}.lesson-complete-card h1{margin:0;color:#312e81;font-size:2rem}.complete-subtitle{margin:0;color:#475569;font-size:1.05rem}.complete-stars{background:#fef3c7;color:#b45309;border:2px solid #fde68a;padding:8px 20px;border-radius:999px;font-weight:900;font-size:1.2rem}.complete-words-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:6px 0 10px}.complete-word-chip{background:#f8fafc;border:2px solid #e2e8f0;border-radius:14px;padding:8px 16px;font-weight:800;font-size:1.05rem;color:#1e293b}.complete-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:6px}.vocab-grid{display:grid;grid-template-columns:380px 1fr;gap:20px;align-items:start}@media(max-width:840px){.vocab-grid{grid-template-columns:1fr}}.vocab-sidebar,.vocab-list-card{padding:24px}.vocab-hero{display:flex;align-items:center;gap:16px;margin-bottom:18px}.vocab-hero h2,.vocab-list-card h2{margin:0 0 6px;color:#115e59}.vocab-subtitle{margin:0;color:#475569;font-size:.94rem}.vocab-practice-btn{width:100%;background:#0d9488;box-shadow:0 6px 16px #0d948847;margin-bottom:22px}.vocab-practice-btn:disabled{opacity:.45;cursor:not-allowed}.voice-add-box{display:flex;flex-direction:column;gap:12px;margin-bottom:18px}.voice-mic-btn{width:100%;background:#f5f3ff;color:#6d28d9;border:2.5px solid #c4b5fd;font-weight:800}.voice-mic-btn:hover{background:#ede9fe}.voice-mic-btn.listening{background:#fee2e2;color:#b91c1c;border-color:#f87171;animation:pulseMic 1.1s ease-in-out infinite}@keyframes pulseMic{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}.voice-confirm-card{background:#f0fdfa;border:2px solid #5eead4;border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:10px}.voice-confirm-top{font-size:1rem;font-weight:700;color:#134e4a;display:flex;align-items:center;flex-wrap:wrap;gap:5px}.voice-word-highlight{font-size:1.22rem;color:#0f766e}.voice-alternatives{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.voice-alt-label{font-size:.82rem;font-weight:700;color:#475569}.voice-alt-chip{padding:4px 10px;border-radius:999px;background:#fff;border:2px solid #cbd5e1;font-size:.86rem;font-weight:800;color:#334155}.voice-alt-chip.active{background:#0d9488;border-color:#0d9488;color:#fff}.voice-confirm-actions{display:flex;flex-wrap:wrap;gap:8px}.vocab-form{display:flex;flex-direction:column;gap:12px;padding-top:16px;border-top:2px solid #f1f5f9}.vocab-form h3{margin:0;font-size:1.05rem;color:#334155}.vocab-field{display:flex;flex-direction:column;gap:5px;font-weight:700;font-size:.88rem;color:#475569}.vocab-field input{width:100%;padding:10px 13px;border-radius:13px;border:2px solid #cbd5e1;font-size:1rem;font-weight:600;font-family:inherit;color:#1e293b}.vocab-field input:focus{outline:none;border-color:#0d9488}.vocab-error{background:#fee2e2;color:#b91c1c;border-radius:12px;padding:8px 12px;font-size:.9rem;font-weight:700}.vocab-list-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px}.vocab-shuffle-note{background:#ccfbf1;color:#115e59;padding:5px 12px;border-radius:999px;font-size:.84rem;font-weight:800}.vocab-empty{background:#f8fafc;border:2px dashed #cbd5e1;border-radius:18px;padding:30px 20px;text-align:center;color:#475569}.vocab-empty p{margin:0 0 8px}.vocab-word-list{display:flex;flex-direction:column;gap:10px}.vocab-word-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f8fafc;border:2px solid #e2e8f0;border-radius:16px;padding:12px 14px}.vocab-word-main{display:flex;align-items:center;gap:12px;min-width:0}.vocab-word-emoji{font-size:1.65rem;flex-shrink:0}.vocab-word-title{font-size:1.12rem;font-weight:800;color:#0f172a;display:flex;align-items:center;gap:8px;flex-wrap:wrap}.vocab-mastered-pill{background:#dcfce7;color:#166534;font-size:.75rem;font-weight:800;padding:2px 8px;border-radius:999px}.vocab-word-meta{font-size:.86rem;color:#64748b;margin-top:2px}.vocab-word-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}.vocab-delete-btn:hover{background:#fee2e2;border-color:#fca5a5;color:#b91c1c}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a7a;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:18px;z-index:100}.auth-modal{width:100%;max-width:440px;padding:24px;display:flex;flex-direction:column;gap:14px}.auth-modal-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.auth-modal-header h2{margin:0;font-size:1.35rem;color:#312e81}.auth-intro,.auth-sync-note,.auth-email{margin:0;color:#475569;font-size:.95rem;line-height:1.45}.auth-unconfigured{background:#f8fafc;border:2px solid #e2e8f0;border-radius:16px;padding:14px;color:#334155;font-size:.92rem;display:flex;flex-direction:column;gap:8px}.auth-unconfigured p{margin:0}.auth-unconfigured code{background:#e2e8f0;padding:2px 6px;border-radius:6px;font-size:.85rem}.auth-signed-in{display:flex;flex-direction:column;gap:14px}.btn-google{width:100%;background:#fff;color:#1e293b;border:2px solid #cbd5e1;font-weight:800}.btn-google:hover{background:#f8fafc}.auth-divider{display:flex;align-items:center;gap:10px;color:#94a3b8;font-size:.85rem;font-weight:700}.auth-divider:before,.auth-divider:after{content:"";flex:1;height:1px;background:#e2e8f0}.auth-mode-tabs{display:flex;gap:8px}.auth-mode-tabs .tab-btn{flex:1}.auth-info{background:#dcfce7;color:#166534;border-radius:12px;padding:9px 12px;font-size:.9rem;font-weight:700}@media(max-width:540px){.letter-slot{width:44px;height:52px;font-size:1.45rem}.letter-tile{width:48px;height:50px;font-size:1.35rem}.kb-key{height:44px;font-size:1rem}}
