/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F5F5F0;
  --text: #333333;
  --text-light: #636E72;
  --white: #FAFAF5;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --green: #00B894;
  --red: #E17055;
  --orange: #FDCB6E;
  --transition: 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 20px;
  letter-spacing: 0.2px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* === Header === */
.main-header {
  background: var(--white);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon { font-size: 24px; }
.logo-text { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }

.lesson-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}

.progress-bar {
  width: 120px;
  height: 10px;
  background: #EEE;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* === Adventure Map === */
.adventure-map {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.adventure-title {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.adventure-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 17px;
  margin-bottom: 36px;
}

.path-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.path-node {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.path-connector {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

.node-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 5px solid var(--node-color);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.node-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.node-card.locked {
  opacity: 0.5;
  pointer-events: none;
}

.node-card.locked .node-btn { display: none; }
.node-card.locked .node-lock { display: block; }
.node-card.locked .node-icon { display: none; }

.node-card.completed .node-check { display: block; }
.node-card.completed .node-icon { display: none; }
.node-card.completed .node-btn {
  background: #F5F6FA;
  color: var(--text);
  font-size: 15px;
}

.node-card.completed .connector-line { stroke: var(--green); }

.node-status {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--node-color) 15%, white);
  border-radius: 50%;
  position: relative;
}

.node-icon { font-size: 24px; }
.node-lock { display: none; font-size: 20px; }
.node-check { display: none; font-size: 20px; }

.node-info { flex: 1; min-width: 0; }

.node-unit {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.5px;
}

.node-title {
  font-size: 18px;
  font-weight: 700;
  margin: 2px 0 4px;
}

.node-desc {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.5;
}

.node-btn {
  flex-shrink: 0;
  background: var(--node-color);
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 700;
  transition: transform var(--transition), opacity var(--transition);
}

.node-btn:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* === Lesson Page === */
.lesson-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Concept */
.concept-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.concept-header {
  margin-bottom: 20px;
}

.concept-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.concept-header h1 {
  font-size: 26px;
  font-weight: 800;
}

.concept-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.concept-body {
  background: color-mix(in srgb, var(--lesson-color) 10%, white);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 20px 0 24px;
  text-align: left;
  font-size: 18px;
  line-height: 1.7;
  border-left: 4px solid var(--lesson-color);
}

/* Exercise */
.exercise-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.exercise-header {
  text-align: center;
  margin-bottom: 24px;
}

.exercise-header h2 {
  font-size: 17px;
  color: var(--text-light);
  font-weight: 600;
}

.exercise-area {
  min-height: 200px;
}

.exercise-instruction {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.5;
}

/* Quiz options */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quiz-option {
  display: block;
  width: 100%;
  padding: 18px 22px;
  background: #F5F6FA;
  border: 2.5px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  font-family: inherit;
  min-height: 56px;
}

.quiz-option:hover { background: #ECEEF5; border-color: #D0D3E0; }
.quiz-option:focus-visible { outline: 3px solid var(--lesson-color, #4ECDC4); outline-offset: 2px; }
.quiz-option.selected { border-color: var(--lesson-color, #4ECDC4); background: color-mix(in srgb, var(--lesson-color, #4ECDC4) 10%, white); }
.quiz-option.correct { border-color: var(--green); background: #E6F9F1; }
.quiz-option.wrong { border-color: var(--red); background: #FDEAE6; }
.quiz-option.disabled { pointer-events: none; }

/* Sequence fill */
.sequence-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.seq-item {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--lesson-color, #4ECDC4) 15%, white);
}

.seq-arrow {
  font-size: 18px;
  color: var(--text-light);
}

.seq-input {
  width: 64px;
  height: 64px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  border: 2px dashed #CCC;
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit;
  transition: border-color var(--transition);
}

.seq-input:focus { outline: none; border-color: var(--lesson-color, #4ECDC4); border-style: solid; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lesson-color, #4ECDC4) 25%, transparent); }
.seq-input.correct { border-color: var(--green); background: #E6F9F1; }
.seq-input.wrong { border-color: var(--red); background: #FDEAE6; }

/* Classify exercise */
.classify-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.classify-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #F5F6FA;
  border-radius: var(--radius-sm);
  gap: 14px;
}

.classify-item-text {
  font-size: 17px;
  font-weight: 500;
  flex: 1;
}

.classify-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.classify-btn {
  padding: 8px 14px;
  border: 2.5px solid #DDD;
  border-radius: 20px;
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.classify-btn:hover { border-color: #BBB; }
.classify-btn:focus-visible { outline: 3px solid var(--lesson-color, #4ECDC4); outline-offset: 2px; }
.classify-btn.selected { border-color: var(--lesson-color, #4ECDC4); background: color-mix(in srgb, var(--lesson-color, #4ECDC4) 15%, white); color: var(--text); }
.classify-btn.correct { border-color: var(--green); background: #E6F9F1; }
.classify-btn.wrong { border-color: var(--red); background: #FDEAE6; }

/* Angle identify */
.angle-items {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.angle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.angle-svg-container {
  width: 120px;
  height: 120px;
}

.angle-buttons {
  display: flex;
  gap: 6px;
}

.angle-btn {
  padding: 10px 16px;
  border: 2.5px solid #DDD;
  border-radius: 18px;
  background: var(--white);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.angle-btn:hover { border-color: #BBB; }
.angle-btn:focus-visible { outline: 3px solid var(--lesson-color, #4ECDC4); outline-offset: 2px; }
.angle-btn.selected { border-color: var(--lesson-color); background: color-mix(in srgb, var(--lesson-color) 15%, white); }
.angle-btn.correct { border-color: var(--green); background: #E6F9F1; }
.angle-btn.wrong { border-color: var(--red); background: #FDEAE6; }

/* Lines identify */
.lines-items {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.lines-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lines-svg-container {
  width: 120px;
  height: 120px;
}

.lines-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.lines-btn {
  padding: 9px 14px;
  border: 2.5px solid #DDD;
  border-radius: 18px;
  background: var(--white);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.lines-btn:hover { border-color: #BBB; }
.lines-btn:focus-visible { outline: 3px solid var(--lesson-color, #4ECDC4); outline-offset: 2px; }
.lines-btn.selected { border-color: var(--lesson-color); background: color-mix(in srgb, var(--lesson-color) 15%, white); }
.lines-btn.correct { border-color: var(--green); background: #E6F9F1; }
.lines-btn.wrong { border-color: var(--red); background: #FDEAE6; }

/* Match exercise */
.match-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.match-left {
  min-width: 64px;
  padding: 12px;
  background: color-mix(in srgb, var(--lesson-color, #4ECDC4) 15%, white);
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
}

.match-select {
  flex: 1;
  padding: 14px 16px;
  border: 2.5px solid #DDD;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-family: inherit;
  font-weight: 500;
  background: var(--white);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23636E72'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.match-select:focus-visible { outline: 3px solid var(--lesson-color, #4ECDC4); outline-offset: 2px; }

.match-select.correct { border-color: var(--green); background-color: #E6F9F1; }
.match-select.wrong { border-color: var(--red); background-color: #FDEAE6; }

/* Ordinal sequence - drag reorder */
.ordinal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  margin: 0 auto;
}

.ordinal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #F5F6FA;
  border-radius: var(--radius-sm);
  cursor: grab;
  transition: all var(--transition);
  border: 2.5px solid transparent;
  user-select: none;
}

.ordinal-item:active { cursor: grabbing; }
.ordinal-item.dragging { opacity: 0.5; }
.ordinal-item.drag-over { border-color: var(--lesson-color, #4ECDC4); background: color-mix(in srgb, var(--lesson-color, #4ECDC4) 10%, white); }
.ordinal-item.correct { border-color: var(--green); background: #E6F9F1; }
.ordinal-item.wrong { border-color: var(--red); background: #FDEAE6; }

.ordinal-num {
  width: 32px;
  height: 32px;
  background: var(--lesson-color, #4ECDC4);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.ordinal-text {
  font-weight: 600;
  font-size: 17px;
}

/* Compound sequence */
.compound-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.compound-item {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  border-radius: var(--radius-sm);
}

.compound-item.rule-a { background: color-mix(in srgb, var(--lesson-color, #FF8A5C) 20%, white); }
.compound-item.rule-b { background: color-mix(in srgb, #45B7D1 20%, white); }

.compound-input {
  width: 60px;
  height: 60px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  border: 2px dashed #CCC;
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: inherit;
}

.compound-input:focus { outline: none; border-color: var(--lesson-color, #FF8A5C); border-style: solid; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lesson-color, #FF8A5C) 25%, transparent); }
.compound-input.correct { border-color: var(--green); background: #E6F9F1; }
.compound-input.wrong { border-color: var(--red); background: #FDEAE6; }

/* Pattern count */
.pattern-steps {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 16px 0 20px;
}

.pattern-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  background: #F5F6FA;
  border-radius: var(--radius-sm);
  min-width: 80px;
}

.pattern-step-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
}

.pattern-shapes {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Symmetry identify */
.symmetry-items {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.symmetry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.symmetry-svg-container {
  width: 120px;
  height: 120px;
}

.symmetry-buttons {
  display: flex;
  gap: 8px;
}

.symmetry-btn {
  padding: 10px 18px;
  border: 2.5px solid #DDD;
  border-radius: 18px;
  background: var(--white);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.symmetry-btn:hover { border-color: #BBB; }
.symmetry-btn:focus-visible { outline: 3px solid var(--lesson-color, #4ECDC4); outline-offset: 2px; }
.symmetry-btn.selected { border-color: var(--lesson-color); background: color-mix(in srgb, var(--lesson-color) 15%, white); }
.symmetry-btn.correct { border-color: var(--green); background: #E6F9F1; }
.symmetry-btn.wrong { border-color: var(--red); background: #FDEAE6; }

/* Feedback */
.exercise-feedback {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 600;
  font-size: 18px;
  animation: fadeIn 0.3s ease;
}

.exercise-feedback.correct { background: #E6F9F1; color: #00866A; }
.exercise-feedback.wrong { background: #FDEAE6; color: #C0392B; }

/* Buttons */
.btn-primary, .btn-secondary, .btn-check, .btn-next {
  display: inline-block;
  padding: 16px 36px;
  border-radius: 28px;
  font-size: 18px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  font-family: inherit;
  min-height: 52px;
}

.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-check:focus-visible, .btn-next:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--lesson-color, var(--green));
  color: white;
}

.btn-primary:hover { transform: scale(1.03); opacity: 0.9; }

.btn-secondary {
  background: #F5F6FA;
  color: var(--text);
}

.btn-secondary:hover { background: #ECEEF5; }

.btn-check {
  background: var(--lesson-color, var(--green));
  color: white;
}

.btn-next {
  background: var(--green);
  color: white;
}

.exercise-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

/* Completion */
.completion-section {
  text-align: center;
}

.completion-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 24px;
  box-shadow: var(--shadow-lg);
}

.completion-stars {
  font-size: 40px;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.completion-stars .star {
  opacity: 0.2;
  transition: opacity 0.5s ease;
}

.completion-stars .star.earned { opacity: 1; animation: starPop 0.5s ease; }

.completion-card h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.completion-score {
  font-size: 18px;
  color: var(--text-light);
  margin-bottom: 24px;
}

.completion-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Error page */
.error-page {
  max-width: 400px;
  margin: 80px auto;
  text-align: center;
  padding: 20px;
}

.error-page h1 { font-size: 28px; margin-bottom: 12px; }
.error-page p { color: var(--text-light); margin-bottom: 24px; }

/* Utility */
.hidden { display: none !important; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes starPop { 0% { transform: scale(0); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

@keyframes correctPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 184, 148, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(0, 184, 148, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 184, 148, 0); }
}

@keyframes confettiBurst {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-60px) scale(0); opacity: 0; }
}

@keyframes pointsBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.shake { animation: shake 0.4s ease; }

/* Celebration feedback */
.feedback-celebrate {
  animation: correctPulse 0.8s ease;
  position: relative;
  overflow: visible;
}

.feedback-celebrate::before,
.feedback-celebrate::after {
  display: none;
}

.feedback-celebrate::before {
  left: 20%;
  color: #FDCB6E;
}

.feedback-celebrate::after {
  right: 20%;
  color: #00B894;
}

/* Points display */
.points-display {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--lesson-color, var(--green));
  margin-top: 6px;
}

.points-display.bump {
  animation: pointsBump 0.35s ease;
}

/* Sound toggle */
.sound-toggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  box-shadow: var(--shadow);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: transform var(--transition);
}

.sound-toggle:hover { transform: scale(1.1); }

/* Responsive */
@media (max-width: 480px) {
  .adventure-title { font-size: 22px; }
  .node-card { padding: 14px; gap: 12px; }
  .node-desc { display: none; }
  .concept-icon { font-size: 36px; }
  .concept-header h1 { font-size: 22px; }
  .seq-item, .seq-input { width: 54px; height: 54px; font-size: 17px; }
  .compound-item, .compound-input { width: 50px; height: 50px; font-size: 16px; }
  .user-btn { min-width: 140px; padding: 28px 20px; }
  .user-btn-icon { font-size: 40px; }
  .user-btn-name { font-size: 18px; }
}

/* === User Select === */
.user-select-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 24px;
}

.user-select-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 40px;
  color: var(--text);
}

.user-select-buttons {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.user-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  padding: 36px 28px;
  border: 3px solid transparent;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  font-family: inherit;
}

.user-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.user-btn--santiago:hover { border-color: #6C5CE7; }
.user-btn--jacobo:hover { border-color: #00B894; }

.user-btn-icon { font-size: 56px; }
.user-btn-name { font-size: 22px; font-weight: 700; color: var(--text); }

/* === Header User === */
.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.header-user-switch {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  transition: background var(--transition);
}

.header-user-switch:hover {
  background: #f0f0f0;
}

.header-back {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background var(--transition);
  margin-left: 12px;
}

.header-back:hover { background: #f0f0f0; }

/* === Subject Picker === */
.subject-picker {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px 60px;
  text-align: center;
}

.subject-picker-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 36px;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.subject-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 36px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  border-top: 5px solid var(--subject-color);
  transition: transform var(--transition), box-shadow var(--transition);
}

.subject-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.subject-icon { font-size: 64px; }
.subject-name { font-size: 22px; font-weight: 700; }
.subject-desc { font-size: 16px; color: var(--text-light); line-height: 1.5; }

/* === Node Progress Bar === */
.node-progress-bar {
  width: 100%;
  height: 8px;
  background: #EEE;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.node-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.node-progress-fill.stars-0 { background: var(--red); width: 5% !important; }
.node-progress-fill.stars-1 { background: var(--red); }
.node-progress-fill.stars-2 { background: var(--orange); }
.node-progress-fill.stars-3 { background: var(--green); }

.node-progress-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light);
  margin-top: 3px;
  display: inline-block;
}
