*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --color-bg: #F0F4FF; --color-surface: #FFFFFF; --color-primary: #6C63FF; --color-primary-light: #8B85FF; --color-primary-dark: #5046E5; --color-secondary: #FF6B9D;
  --color-success: #4CAF50; --color-success-light: #E8F5E9; --color-warning: #FFB74D; --color-error: #EF5350; --color-error-light: #FFEBEE;
  --color-text: #2D3436; --color-text-light: #636E72; --color-text-muted: #B2BEC3; --color-border: #DFE6E9; --color-star: #FFD700; --color-xp: #6C63FF;
  --color-card-hover: #F8F9FF; --color-locked: #B2BEC3; --color-world1: #4CAF50; --color-world2: #FF9800; --color-world3: #2196F3; --color-world4: #9C27B0; --color-world5: #E91E63; --color-world6: #00BCD4;
  --radius-sm: 8px; --radius-md: 16px; --radius-lg: 24px; --radius-xl: 32px; --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06); --shadow-md: 0 4px 16px rgba(0,0,0,0.1); --shadow-lg: 0 8px 32px rgba(0,0,0,0.12); --shadow-xl: 0 12px 48px rgba(0,0,0,0.15);
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif; --transition-fast: 0.15s ease; --transition-normal: 0.3s ease;
}
html { font-size: 16px; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-main); background: var(--color-bg); color: var(--color-text); min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
#app { min-height: 100dvh; display: flex; flex-direction: column; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 32px; border-radius: var(--radius-lg); font-size: 1.25rem; font-weight: 700; transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast); min-height: 56px; min-width: 56px; user-select: none; touch-action: manipulation; }
.btn:active { transform: scale(0.95); }
.btn-primary { background: var(--color-primary); color: white; box-shadow: 0 4px 0 var(--color-primary-dark), var(--shadow-sm); }
.btn-primary:active { box-shadow: 0 2px 0 var(--color-primary-dark); transform: translateY(2px) scale(0.98); }
.btn-success { background: var(--color-success); color: white; box-shadow: 0 4px 0 #388E3C, var(--shadow-sm); }
.btn-success:active { box-shadow: 0 2px 0 #388E3C; transform: translateY(2px) scale(0.98); }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border: 2px solid var(--color-border); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; color: var(--color-text-light); padding: 12px; }
.welcome-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; padding: 32px; text-align: center; background: linear-gradient(180deg, #E8E4FF 0%, var(--color-bg) 100%); }
.welcome-mascot { font-size: 120px; line-height: 1; animation: mascot-bounce 2s ease-in-out infinite; margin-bottom: 16px; }
@keyframes mascot-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.welcome-title { font-size: 2.5rem; font-weight: 800; color: var(--color-primary); margin-bottom: 8px; letter-spacing: -0.5px; }
.welcome-subtitle { font-size: 1.25rem; color: var(--color-text-light); margin-bottom: 40px; }
.welcome-profiles { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 32px; max-width: 600px; }
.profile-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 28px; background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); cursor: pointer; transition: transform var(--transition-fast), box-shadow var(--transition-fast); min-width: 140px; border: 3px solid transparent; }
.profile-card:hover, .profile-card:focus { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-primary-light); }
.profile-card:active { transform: scale(0.96); }
.profile-avatar { font-size: 48px; line-height: 1; }
.profile-name { font-size: 1.1rem; font-weight: 700; }
.profile-level { font-size: 0.85rem; color: var(--color-text-light); }
.add-profile-card { border: 3px dashed var(--color-border); background: transparent; box-shadow: none; color: var(--color-text-muted); }
.add-profile-card:hover { border-color: var(--color-primary-light); color: var(--color-primary); background: var(--color-card-hover); }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; animation: fade-in 0.2s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-content { background: var(--color-surface); border-radius: var(--radius-xl); padding: 40px; max-width: 480px; width: 100%; text-align: center; box-shadow: var(--shadow-xl); animation: modal-pop 0.3s ease; max-height: 90vh; overflow-y: auto; }
@keyframes modal-pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.modal-subtitle { font-size: 1rem; color: var(--color-text-light); margin-bottom: 24px; }
.modal-input { width: 100%; padding: 16px 20px; border: 3px solid var(--color-border); border-radius: var(--radius-md); font-size: 1.25rem; font-family: inherit; text-align: center; transition: border-color var(--transition-fast); outline: none; }
.modal-input:focus { border-color: var(--color-primary); }
.avatar-picker { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 20px 0; }
.avatar-option { width: 64px; height: 64px; font-size: 36px; border-radius: var(--radius-full); background: var(--color-bg); border: 3px solid transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all var(--transition-fast); }
.avatar-option:hover { border-color: var(--color-primary-light); transform: scale(1.1); }
.avatar-option.selected { border-color: var(--color-primary); background: #EDE9FF; transform: scale(1.1); }
.modal-actions { display: flex; gap: 12px; margin-top: 24px; }
.modal-actions .btn { flex: 1; }
.grade-picker { display: flex; gap: 16px; justify-content: center; margin: 20px 0; }
.grade-option { padding: 20px 28px; border-radius: var(--radius-lg); border: 3px solid var(--color-border); background: var(--color-surface); cursor: pointer; transition: all var(--transition-fast); min-width: 120px; }
.grade-option:hover { border-color: var(--color-primary-light); transform: translateY(-2px); }
.grade-option.selected { border-color: var(--color-primary); background: #EDE9FF; }
.grade-option-icon { font-size: 36px; margin-bottom: 8px; }
.grade-option-label { font-size: 1.1rem; font-weight: 700; }
.grade-option-desc { font-size: 0.8rem; color: var(--color-text-light); margin-top: 4px; }
.header-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; }
.header-left { display: flex; align-items: center; gap: 12px; }
.header-avatar { font-size: 32px; }
.header-name { font-weight: 700; font-size: 1.1rem; }
.header-grade { font-size: 0.75rem; color: var(--color-text-light); background: var(--color-bg); padding: 2px 8px; border-radius: var(--radius-full); cursor: pointer; }
.header-grade:hover { background: #EDE9FF; color: var(--color-primary); }
.header-stats { display: flex; align-items: center; gap: 16px; }
.stat-badge { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--radius-full); font-weight: 700; font-size: 0.95rem; }
.stat-xp { background: #EDE9FF; color: var(--color-xp); }
.stat-stars { background: #FFF8E1; color: #F9A825; }
.home-screen { flex: 1; display: flex; flex-direction: column; }
.home-hero { padding: 24px 24px 8px; }
.continue-card { background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%); color: white; border-radius: var(--radius-xl); padding: 28px; display: flex; align-items: center; gap: 20px; cursor: pointer; transition: transform var(--transition-fast), box-shadow var(--transition-fast); box-shadow: var(--shadow-md); }
.continue-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.continue-card:active { transform: scale(0.98); }
.continue-mascot { font-size: 56px; flex-shrink: 0; }
.continue-info { flex: 1; }
.continue-label { font-size: 0.9rem; opacity: 0.9; margin-bottom: 4px; }
.continue-title { font-size: 1.4rem; font-weight: 800; }
.continue-arrow { font-size: 2rem; opacity: 0.8; }
.map-section { padding: 16px 24px 32px; flex: 1; }
.map-section-title { font-size: 1.1rem; font-weight: 700; color: var(--color-text-light); margin-bottom: 16px; padding-left: 4px; }
.world-group { margin-bottom: 28px; }
.world-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--color-surface); }
.world-icon { font-size: 28px; }
.world-title { font-weight: 700; font-size: 1.15rem; }
.world-progress { margin-left: auto; font-size: 0.85rem; color: var(--color-text-light); }
.levels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 0 4px; }
.level-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 12px; background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); cursor: pointer; transition: all var(--transition-fast); border: 3px solid transparent; position: relative; min-height: 120px; justify-content: center; }
.level-card:hover:not(.level-locked) { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--color-primary-light); }
.level-card:active:not(.level-locked) { transform: scale(0.96); }
.level-card.level-active { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15), var(--shadow-md); }
.level-card.level-completed { background: var(--color-success-light); border-color: var(--color-success); }
.level-card.level-locked { opacity: 0.5; cursor: not-allowed; }
.level-icon { font-size: 32px; }
.level-name { font-size: 0.9rem; font-weight: 700; text-align: center; line-height: 1.2; }
.level-stars { display: flex; gap: 2px; font-size: 16px; }
.level-stars .star-empty { opacity: 0.25; }
.level-lock { font-size: 24px; opacity: 0.5; }
.bottom-nav { display: flex; justify-content: space-around; padding: 8px 16px 12px; background: var(--color-surface); border-top: 1px solid var(--color-border); position: sticky; bottom: 0; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 16px; border-radius: var(--radius-md); background: none; color: var(--color-text-muted); font-size: 0.75rem; font-weight: 600; transition: color var(--transition-fast); min-width: 64px; }
.nav-item-icon { font-size: 24px; }
.nav-item.active { color: var(--color-primary); }
.game-screen { display: flex; flex-direction: column; min-height: 100dvh; background: var(--color-bg); }
.game-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.game-back-btn { width: 44px; height: 44px; border-radius: var(--radius-full); background: var(--color-bg); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--color-text); transition: background var(--transition-fast); }
.game-back-btn:hover { background: var(--color-border); }
.game-progress-area { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.game-progress-text { font-size: 0.85rem; font-weight: 600; color: var(--color-text-light); text-align: center; }
.game-progress-bar { height: 10px; background: var(--color-border); border-radius: var(--radius-full); overflow: hidden; }
.game-progress-fill { height: 100%; background: var(--color-primary); border-radius: var(--radius-full); transition: width var(--transition-normal); }
.game-hint-btn { width: 44px; height: 44px; border-radius: var(--radius-full); background: #FFF3E0; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; transition: transform var(--transition-fast), background var(--transition-fast); }
.game-hint-btn:hover { background: #FFE0B2; transform: scale(1.05); }
.game-hint-btn:active { transform: scale(0.95); }
.question-area { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; gap: 32px; max-width: 700px; margin: 0 auto; width: 100%; }
.mascot-speech { display: flex; align-items: flex-start; gap: 12px; width: 100%; max-width: 500px; }
.mascot-face { font-size: 48px; flex-shrink: 0; animation: mascot-bounce 3s ease-in-out infinite; }
.speech-bubble { background: var(--color-surface); border-radius: var(--radius-lg); padding: 16px 20px; font-size: 1.15rem; font-weight: 600; line-height: 1.4; box-shadow: var(--shadow-sm); position: relative; flex: 1; }
.speech-bubble::before { content: ''; position: absolute; left: -10px; top: 16px; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-right: 12px solid var(--color-surface); }
.visual-question { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; min-height: 80px; }
.visual-objects { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.visual-object { font-size: 48px; transition: all var(--transition-normal); line-height: 1; }
.visual-object.appearing { animation: object-appear 0.4s ease backwards; }
@keyframes object-appear { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.visual-operator { font-size: 2.5rem; font-weight: 800; color: var(--color-primary); padding: 0 4px; }
.visual-equals { font-size: 2.5rem; font-weight: 800; color: var(--color-text-light); }
.visual-number { font-size: 3rem; font-weight: 800; color: var(--color-text); }
.visual-unknown { width: 64px; height: 64px; border: 4px dashed var(--color-primary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: var(--color-primary); background: rgba(108, 99, 255, 0.05); }
.answer-grid { display: grid; gap: 12px; width: 100%; max-width: 500px; }
.answer-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.answer-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.answer-grid.cols-4 { grid-template-columns: 1fr 1fr; }
.answer-option { padding: 20px; background: var(--color-surface); border: 3px solid var(--color-border); border-radius: var(--radius-lg); font-size: 1.5rem; font-weight: 700; text-align: center; transition: all var(--transition-fast); min-height: 64px; display: flex; align-items: center; justify-content: center; user-select: none; touch-action: manipulation; }
.answer-option:hover { border-color: var(--color-primary-light); background: var(--color-card-hover); transform: translateY(-2px); }
.answer-option:active { transform: scale(0.96); }
.answer-option.correct { border-color: var(--color-success); background: var(--color-success-light); animation: correct-pulse 0.5s ease; }
@keyframes correct-pulse { 0% { transform: scale(1); } 30% { transform: scale(1.05); } 60% { transform: scale(0.98); } 100% { transform: scale(1); } }
.answer-option.wrong { border-color: var(--color-error); background: var(--color-error-light); animation: wrong-shake 0.4s ease; }
@keyframes wrong-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }
.tf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 400px; width: 100%; }
.tf-btn { padding: 24px; border-radius: var(--radius-lg); font-size: 1.3rem; font-weight: 700; border: 3px solid var(--color-border); background: var(--color-surface); transition: all var(--transition-fast); touch-action: manipulation; }
.tf-btn:hover { transform: translateY(-2px); }
.tf-btn:active { transform: scale(0.96); }
.drag-container { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; min-height: 80px; width: 100%; max-width: 500px; }
.drag-item { padding: 16px 24px; background: var(--color-surface); border: 3px solid var(--color-border); border-radius: var(--radius-lg); font-size: 1.5rem; font-weight: 700; cursor: grab; transition: all var(--transition-fast); user-select: none; touch-action: none; }
.drag-item:active { cursor: grabbing; transform: scale(1.05); box-shadow: var(--shadow-lg); z-index: 10; }
.drop-zone { display: flex; gap: 12px; justify-content: center; padding: 16px; background: rgba(108, 99, 255, 0.04); border: 3px dashed var(--color-border); border-radius: var(--radius-lg); min-height: 80px; width: 100%; max-width: 500px; flex-wrap: wrap; align-items: center; }
.drop-zone .drag-item { border-color: var(--color-primary-light); background: #EDE9FF; }
.drop-placeholder { width: 60px; height: 60px; border: 3px dashed var(--color-text-muted); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--color-text-muted); }
.comparison-display { display: flex; align-items: center; gap: 24px; justify-content: center; flex-wrap: wrap; }
.comparison-group { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.comparison-objects { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 200px; }
.comparison-count { font-size: 1.3rem; font-weight: 700; color: var(--color-text-light); }
.comparison-vs { font-size: 2rem; color: var(--color-text-muted); font-weight: 700; }
.hint-panel { position: fixed; bottom: 0; left: 0; right: 0; background: var(--color-surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-xl); padding: 28px 24px 36px; z-index: 500; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); max-height: 60vh; overflow-y: auto; }
.hint-panel.open { transform: translateY(0); }
.hint-panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hint-panel-title { font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.hint-close-btn { width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--color-bg); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.hint-content { font-size: 1.15rem; line-height: 1.6; color: var(--color-text); }
.hint-level-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.hint-dot { width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--color-border); }
.hint-dot.active { background: var(--color-primary); }
.hint-next-btn { margin-top: 16px; width: 100%; }
.feedback-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 800; pointer-events: none; }
.feedback-card { background: var(--color-surface); border-radius: var(--radius-xl); padding: 40px; text-align: center; box-shadow: var(--shadow-xl); animation: feedback-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: auto; }
@keyframes feedback-pop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.feedback-icon { font-size: 72px; margin-bottom: 12px; }
.feedback-text { font-size: 1.5rem; font-weight: 800; }
.feedback-text.success { color: var(--color-success); }
.feedback-text.retry { color: var(--color-warning); }
.level-complete-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; padding: 32px; text-align: center; background: linear-gradient(180deg, #E8FFE8 0%, var(--color-bg) 100%); }
.complete-mascot { font-size: 80px; animation: mascot-bounce 1.5s ease-in-out infinite; margin-bottom: 16px; }
.complete-title { font-size: 2rem; font-weight: 800; color: var(--color-success); margin-bottom: 8px; }
.complete-subtitle { font-size: 1.1rem; color: var(--color-text-light); margin-bottom: 32px; }
.complete-stars { display: flex; gap: 12px; margin-bottom: 24px; }
.complete-star { font-size: 56px; transition: transform 0.5s ease; }
.complete-star.earned { animation: star-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.complete-star.empty { opacity: 0.2; }
@keyframes star-pop { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.3) rotate(10deg); } 100% { transform: scale(1) rotate(0deg); } }
.complete-stats { display: flex; gap: 24px; margin-bottom: 32px; }
.complete-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.complete-stat-value { font-size: 1.8rem; font-weight: 800; color: var(--color-primary); }
.complete-stat-label { font-size: 0.85rem; color: var(--color-text-light); }
.complete-xp { display: flex; align-items: center; gap: 8px; padding: 12px 24px; background: #EDE9FF; border-radius: var(--radius-full); font-size: 1.2rem; font-weight: 700; color: var(--color-xp); margin-bottom: 32px; }
.complete-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.parent-screen { min-height: 100dvh; background: #F8F9FA; }
.parent-header { background: white; padding: 20px 24px; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; gap: 12px; }
.parent-title { font-size: 1.2rem; font-weight: 700; flex: 1; }
.parent-content { padding: 24px; max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.parent-card { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.parent-card-title { font-size: 0.85rem; font-weight: 600; color: var(--color-text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.parent-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.parent-stat-row:last-child { border-bottom: none; }
.parent-stat-label { color: var(--color-text-light); font-size: 0.95rem; }
.parent-stat-value { font-weight: 700; font-size: 1rem; }
.parent-progress-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.parent-progress-item:last-child { border-bottom: none; }
.parent-progress-icon { font-size: 24px; }
.parent-progress-info { flex: 1; }
.parent-progress-name { font-weight: 600; font-size: 0.95rem; }
.parent-progress-bar-bg { height: 6px; background: var(--color-border); border-radius: 3px; margin-top: 6px; }
.parent-progress-bar-fill { height: 100%; background: var(--color-success); border-radius: 3px; transition: width var(--transition-normal); }
.parent-progress-status { font-size: 0.85rem; color: var(--color-text-light); font-weight: 600; }
.confetti-container { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti-piece { position: absolute; width: 10px; height: 10px; top: -10px; animation: confetti-fall linear forwards; }
@keyframes confetti-fall { 0% { transform: translateY(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) rotate(720deg); opacity: 0; } }
.story-container { background: var(--color-surface); border-radius: var(--radius-lg); padding: 24px; max-width: 500px; width: 100%; box-shadow: var(--shadow-sm); }
.story-visual { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; font-size: 40px; flex-wrap: wrap; }
.story-text { font-size: 1.15rem; line-height: 1.6; text-align: center; color: var(--color-text); }
.counting-objects { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; padding: 20px; background: var(--color-surface); border-radius: var(--radius-lg); min-width: 200px; }
.counting-object { font-size: 52px; line-height: 1; transition: transform 0.2s ease; cursor: default; }
.counting-object:hover { transform: scale(1.15); }
.sequence-display { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.sequence-item { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; border-radius: var(--radius-md); background: var(--color-surface); border: 2px solid var(--color-border); }
.sequence-item.missing { border: 3px dashed var(--color-primary); color: var(--color-primary); font-size: 1.8rem; background: rgba(108, 99, 255, 0.05); }
.sequence-arrow { font-size: 1.2rem; color: var(--color-text-muted); }
.badges-grid { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.badge-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; background: var(--color-bg); border-radius: var(--radius-lg); min-width: 90px; }
.badge-icon { font-size: 36px; }
.badge-name { font-size: 0.8rem; font-weight: 600; color: var(--color-text-light); text-align: center; }
.badge-item.locked { opacity: 0.3; }
.place-value-display { display: flex; gap: 24px; align-items: center; justify-content: center; flex-wrap: wrap; }
.place-value-group { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 20px; background: var(--color-surface); border-radius: var(--radius-lg); border: 2px solid var(--color-border); min-width: 100px; }
.place-value-blocks { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.place-value-block { width: 20px; height: 40px; background: var(--color-primary); border-radius: 4px; }
.place-value-block.ones { width: 20px; height: 20px; background: var(--color-warning); }
.place-value-label { font-size: 0.85rem; color: var(--color-text-light); font-weight: 600; }
.coin { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 800; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.15); }
.coin-tl { width: 56px; height: 56px; font-size: 0.95rem; background: #FFD54F; color: #6D4C00; border: 3px solid #C9A227; }
.coin-kr { width: 44px; height: 44px; font-size: 0.75rem; background: #E0E0E0; color: #424242; border: 3px solid #9E9E9E; }
.place-value-number { font-size: 1.5rem; font-weight: 800; }
.clock-display { position: relative; width: 180px; height: 180px; border: 4px solid var(--color-text); border-radius: 50%; background: var(--color-surface); margin: 0 auto; }
.clock-center { position: absolute; width: 10px; height: 10px; background: var(--color-text); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 5; }
.clock-hand-hour { position: absolute; width: 6px; background: var(--color-text); border-radius: 3px; transform-origin: bottom center; left: calc(50% - 3px); z-index: 3; }
.clock-hand-minute { position: absolute; width: 4px; background: var(--color-primary); border-radius: 2px; transform-origin: bottom center; left: calc(50% - 2px); z-index: 4; }
.clock-number { position: absolute; font-size: 14px; font-weight: 700; color: var(--color-text); }
.fraction-display { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.fraction-circle { width: 140px; height: 140px; border-radius: 50%; position: relative; overflow: hidden; border: 3px solid var(--color-text); background: var(--color-border); }
.fraction-filled { background: var(--color-primary); position: absolute; }
.screen-enter { animation: screen-slide-in 0.3s ease; }
@keyframes screen-slide-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
.mt-auto { margin-top: auto; }
@media (max-width: 600px) {
  .welcome-title { font-size: 2rem; } .welcome-mascot { font-size: 80px; }
  .levels-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .visual-object { font-size: 40px; } .visual-operator, .visual-equals { font-size: 2rem; } .visual-number { font-size: 2.5rem; }
  .counting-object { font-size: 44px; } .answer-option { padding: 16px; font-size: 1.3rem; }
  .question-area { padding: 16px; gap: 24px; } .speech-bubble { font-size: 1rem; padding: 12px 16px; }
  .mascot-face { font-size: 40px; } .modal-content { padding: 28px 20px; } .complete-star { font-size: 44px; }
  .header-bar { padding: 10px 16px; } .grade-picker { flex-direction: column; align-items: center; }
}
@media (min-width: 1024px) {
  .question-area { max-width: 800px; } .levels-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .home-hero { max-width: 800px; margin: 0 auto; width: 100%; } .map-section { max-width: 900px; margin: 0 auto; }
}

/* ===== Genel soru görselleri ===== */
.question-area { gap: 20px; }
.q-visual { display: flex; justify-content: center; align-items: center; width: 100%; max-width: 520px; flex-wrap: wrap; }
.q-svg { display: block; }
.q-prompt { background: var(--color-surface); border-radius: var(--radius-md); padding: 14px 18px; font-size: 1.15rem; font-weight: 600; line-height: 1.6; box-shadow: var(--shadow-sm); max-width: 520px; width: 100%; text-align: center; }
.q-big { font-size: 2.2rem; font-weight: 800; text-align: center; color: var(--color-text); display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.answer-option:disabled { cursor: default; color: inherit; }
.answer-option.answer-long { font-size: 1.1rem; padding: 14px; }
.answer-option.answer-visual { padding: 10px; min-height: 72px; }
.answer-option.answer-visual svg { max-width: 100%; height: auto; }
.blocks-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: center; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; line-height: 1.2; }
.groups-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.group-box { display: grid; gap: 2px 4px; font-size: 26px; padding: 8px 10px; background: var(--color-surface); border: 2px solid var(--color-border); border-radius: var(--radius-md); text-align: center; line-height: 1.3; }
.emoji-array { display: grid; gap: 4px; font-size: 26px; background: var(--color-surface); padding: 10px; border-radius: var(--radius-md); }
.seq-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.seq-item, .seq-missing { min-width: 52px; padding: 10px 8px; border-radius: var(--radius-md); background: var(--color-surface); border: 3px solid var(--color-border); font-size: 1.3rem; font-weight: 800; text-align: center; }
.seq-missing { border-color: var(--color-primary); color: var(--color-primary); border-style: dashed; }
.seq-arrow { color: var(--color-text-muted); font-size: 1.4rem; font-weight: 800; }
.column-op { font-family: 'Courier New', monospace; font-size: 2rem; font-weight: 800; text-align: right; background: var(--color-surface); padding: 12px 20px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); letter-spacing: 4px; }
.column-op .op { margin-right: 10px; color: var(--color-primary); }
.column-line { border-top: 3px solid var(--color-text); margin: 4px 0; }
.column-op .q-mark { color: var(--color-primary); }
.bond { display: flex; flex-direction: column; align-items: center; gap: 0; }
.bond-whole, .bond-part { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; background: var(--color-surface); border: 3px solid var(--color-primary); }
.bond-lines { width: 110px; height: 28px; border-left: 3px solid var(--color-primary); border-right: 3px solid var(--color-primary); border-top: 3px solid var(--color-primary); margin-top: 6px; border-radius: 8px 8px 0 0; }
.bond-parts { display: flex; gap: 40px; }
.frac-wrap { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.frac-whole { font-size: 1.3em; font-weight: 800; }
.frac { display: inline-flex; flex-direction: column; align-items: center; font-weight: 800; line-height: 1.1; }
.frac span:first-child { border-bottom: 3px solid currentColor; padding: 0 4px; }
.frac span:last-child { padding: 0 4px; }
.pictograph { border-collapse: collapse; background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.pictograph td { padding: 6px 10px; border-bottom: 1px solid var(--color-border); }
.pg-label { font-weight: 700; text-align: right; border-right: 2px solid var(--color-border); }
.pg-icons { font-size: 22px; letter-spacing: 2px; }
.pg-half { display: inline-block; width: 0.55em; overflow: hidden; vertical-align: bottom; }
.pg-key { width: 100%; text-align: center; margin-top: 6px; font-weight: 600; color: var(--color-text-light); }
.bag { font-size: 28px; background: #F5E6CC; border: 3px solid #B08B57; border-radius: 20px 20px 40px 40px; padding: 14px 18px; max-width: 320px; text-align: center; letter-spacing: 1px; line-height: 1.4; overflow-wrap: anywhere; }
.money-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.banknote { display: inline-flex; align-items: center; justify-content: center; width: 78px; height: 40px; border-radius: 6px; border: 2px solid rgba(0,0,0,0.25); font-weight: 800; font-size: 0.9rem; color: #333; }
@media (max-width: 600px) {
  .q-big { font-size: 1.8rem; } .column-op { font-size: 1.6rem; }
  .answer-option.answer-long { font-size: 1rem; }
}

/* 4 sınıf seçeneği: telefonda da 2×2 ızgara, pencere kaydırılabilir */
.grade-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.grade-option { padding: 12px 10px; min-width: 0; }
.grade-option-icon { font-size: 28px; margin-bottom: 4px; }
.grade-option-desc { font-size: 0.72rem; line-height: 1.3; }
.modal-content { max-height: 92dvh; }
@media (max-width: 600px) {
  .grade-picker { flex-direction: unset; align-items: stretch; }
}

.game-sound-btn { width: 44px; height: 44px; border-radius: var(--radius-full); background: #EDE9FF; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }

/* Yanlış cevap açıklaması */
.feedback-overlay.feedback-explain { pointer-events: auto; background: rgba(45, 52, 54, 0.35); padding: 16px; }
.explain-card { max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.explain-text { font-size: 1.1rem; font-weight: 600; line-height: 1.5; color: var(--color-text); text-align: center; }

/* Sesli okuma ve ayarlar */
.read-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--radius-full); background: #E3F2FD; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; align-self: center; }
.explain-actions { display: flex; gap: 10px; align-items: center; justify-content: center; }
.toggle-btn { min-width: 76px; padding: 8px 14px; border-radius: var(--radius-full); font-weight: 700; background: var(--color-border); color: var(--color-text-light); }
.toggle-btn.on { background: var(--color-success); color: #fff; }
.parent-note { font-size: 0.85rem; color: var(--color-text-light); padding: 4px 0 8px; }

/* Tekrar kutusu */
.review-card { display: flex; align-items: center; gap: 14px; width: calc(100% - 48px); max-width: 652px; margin: 0 auto 8px; padding: 16px 20px; border-radius: var(--radius-lg); background: linear-gradient(135deg, #FFB74D, #FF8A65); color: #fff; box-shadow: var(--shadow-md); text-align: left; }
.review-icon { font-size: 34px; }
.review-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.review-title { font-size: 1.2rem; font-weight: 800; }
.review-sub { font-size: 0.9rem; font-weight: 600; opacity: 0.95; }
.review-note { max-width: 652px; margin: 0 auto 8px; padding: 10px 16px; font-size: 0.9rem; font-weight: 600; color: var(--color-text-light); text-align: center; }
