/* =====================================================
   LMS Escalera de Retos - Estilos Principales
   Estética: Juego de mesa colorido para educación inicial
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&display=swap');

/* ── Variables ── */
:root {
  --pink:    #FF6B9D;
  --pink-l:  #FFB3C6;
  --yellow:  #FFD93D;
  --green:   #6BCB77;
  --teal:    #4ECDC4;
  --blue:    #4D96FF;
  --purple:  #C77DFF;
  --orange:  #FF9A3C;
  --mint:    #A8E6CF;
  --bg:      #F2F8FA;
  --card:    #FFFFFF;
  --text:    #3D2C2C;
  --muted:   #9E8080;
  --radius:  20px;
  --shadow:  0 6px 24px rgba(255,107,157,.15);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(145deg, #F2F8FA 0%, #FDF7FA 52%, #F2F7FB 100%);
  color: var(--text);
  min-height: 100vh;
}

/* ── Background Decoration ── */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(circle at 8% 18%, rgba(78,205,196,.13) 0%, transparent 38%),
    radial-gradient(circle at 92% 22%, rgba(113,50,82,.10) 0%, transparent 40%),
    radial-gradient(circle at 72% 88%, rgba(255,107,157,.11) 0%, transparent 42%);
  pointer-events: none; z-index: 0;
}

/* ── Navbar ── */
.navbar {
  background:
    radial-gradient(circle at 18% 0%, rgba(78,205,196,.24), transparent 34%),
    linear-gradient(105deg, #12384B 0%, #1C4C63 48%, #713252 100%);
  box-shadow: 0 6px 22px rgba(33,50,72,.28);
  border-bottom: 1px solid rgba(255,255,255,.14);
  padding: 0 24px;
  height: 70px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100; color: white;
}
.navbar-brand {
  font-family: 'Fredoka One', cursive;
  font-size: 1.6rem;
  color: var(--pink);
  text-decoration: none;
  display: flex; align-items: center;
}
.brand-lockup { display:flex; align-items:center; height:56px; }
.navbar-brand .brand-wordmark { display:block; width:auto; height:54px; max-width:230px; object-fit:contain; filter:drop-shadow(0 3px 5px rgba(0,0,0,.28)); }
.navbar-user {
  display: flex; align-items: center; gap: 12px;
}
.avatar-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: white;
  flex-shrink: 0;
}
.navbar-user a {
  font-size: .85rem; color: rgba(255,255,255,.94) !important;
  text-decoration: none; font-weight: 600;
  padding: 6px 14px; border-radius: 30px;
  border: 2px solid rgba(255,255,255,.28) !important;
  transition: all .2s;
}
.navbar-user a:hover { background: rgba(255,255,255,.16); border-color:rgba(255,255,255,.62) !important; color:white !important; }
.navbar-user > span { color:white; text-shadow:0 1px 2px rgba(0,0,0,.22); }
.nav-message-link { display:inline-flex; align-items:center; gap:6px; }
.message-icon { font-size:1rem; line-height:1; }

/* ── Layout ── */
.page-wrapper { position: relative; z-index: 1; padding: 24px; max-width: 1100px; margin: 0 auto; }
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ── Section Title ── */
.section-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.8rem; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px;
}
.section-title .badge {
  font-family: 'Nunito', sans-serif;
  font-size: .75rem; font-weight: 800;
  background: var(--pink); color: white;
  padding: 3px 10px; border-radius: 30px;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(255,107,157,.2); }
.card-flat { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.card-flat:hover { transform: none; box-shadow: 0 2px 8px rgba(0,0,0,.06); }

/* ── Project Cards Grid ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none; color: inherit;
  display: block;
  transition: transform .25s, box-shadow .25s;
  background: white;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.project-card-header {
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; position: relative;
  overflow: hidden;
}
.project-card-header::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,.15);
}
.project-card-body { padding: 18px; }
.project-card-body h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.project-card-body p { font-size: .85rem; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.project-meta { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.project-code {
  background: #f0f0f0; padding: 3px 10px;
  border-radius: 20px; font-weight: 700; font-size: .75rem; letter-spacing: 1px;
}

/* ── GAME BOARD ── */
.game-board-wrapper {
  background: white;
  border-radius: 30px;
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.game-board-wrapper::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,217,61,.12) 0%, transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(107,203,119,.12) 0%, transparent 35%);
  pointer-events: none;
}

.board-project-title {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5rem;
  text-align: center;
  color: var(--text);
  margin-bottom: 24px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #FFF9E6, #FFF0F5);
  border-radius: 16px;
  border: 3px dashed var(--yellow);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}

/* Board path */
.board-path {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.board-segment {
  margin-bottom: 12px;
  position: relative;
}

/* The colored squares row */
.squares-row {
  display: flex;
  gap: 6px;
  padding: 8px 0;
}
.squares-row.reverse { flex-direction: row-reverse; }

.board-square {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .85rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
  flex-shrink: 0;
  transition: transform .15s;
}
.board-square:hover { transform: scale(1.1); }

/* Challenge card overlaid on board */
.challenge-card {
  background: white;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
  position: relative;
  margin: 0 0 8px;
  border-left: 5px solid var(--pink);
  transition: box-shadow .2s;
}
.challenge-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.15); }
.challenge-card.completed { border-left-color: var(--green); background: #F0FFF4; }
.challenge-card.locked { opacity: .6; }

.challenge-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.challenge-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem; color: white;
  flex-shrink: 0;
}
.challenge-title {
  font-weight: 800; font-size: 1rem;
  flex: 1;
}
.challenge-icon { font-size: 1.4rem; }
.challenge-desc { font-size: .85rem; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }

.challenge-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Connector arrow between rows */
.board-connector {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  color: var(--muted);
  padding: 4px 0;
}

/* End marker */
.board-end {
  text-align: center;
  padding: 20px;
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  color: var(--text);
  background: linear-gradient(135deg, #FFF9E6, #E8F5E9);
  border-radius: 16px;
  margin-top: 8px;
}

/* ── Side Panel ── */
.side-panel { display: flex; flex-direction: column; gap: 16px; }

.panel-card {
  background: white;
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
}
.panel-card-title {
  font-weight: 800; font-size: .95rem;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; color: var(--text);
}
.panel-card-title .icon { font-size: 1.3rem; }

/* Trophy stars */
.trophy-stars {
  display: flex; gap: 6px; justify-content: center;
  margin: 8px 0;
}
.star { font-size: 2rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.star.empty { filter: grayscale(1) opacity(.4); }

/* Progress bar */
.progress-bar-wrap {
  background: #f0f0f0;
  border-radius: 30px;
  height: 12px;
  overflow: hidden;
  margin: 8px 0;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  transition: width .5s ease;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px;
  border-radius: 30px;
  border: none; cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: .9rem;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-pink   { background: var(--pink);   color: white; }
.btn-pink:hover   { background: #e5598c; }
.btn-green  { background: var(--green);  color: white; }
.btn-green:hover  { background: #58b868; }
.btn-blue   { background: var(--blue);   color: white; }
.btn-blue:hover   { background: #3a82eb; }
.btn-yellow { background: var(--yellow); color: var(--text); }
.btn-yellow:hover { background: #f0c932; }
.btn-teal   { background: var(--teal);   color: white; }
.btn-teal:hover   { background: #3bb5ac; }
.btn-orange { background: var(--orange); color: white; }
.btn-orange:hover { background: #e88a30; }
.btn-purple { background: var(--purple); color: white; }
.btn-purple:hover { background: #b368ef; }
.btn-outline { background: transparent; border: 2px solid var(--pink); color: var(--pink); }
.btn-outline:hover { background: var(--pink); color: white; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-danger { background: #e74c3c; color: white; }
.btn-danger:hover { background: #c0392b; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-weight: 700; font-size: .9rem;
  margin-bottom: 6px; color: var(--text);
}
.form-group label span { font-size: 1rem; }
.form-control {
  width: 100%; padding: 12px 16px;
  border: 2px solid #E8E8E8;
  border-radius: 14px;
  font-family: 'Nunito', sans-serif;
  font-size: .95rem; color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #FAFAFA;
}
.form-control:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255,107,157,.15);
  background: white;
}
textarea.form-control { resize: vertical; min-height: 100px; }
.form-control::placeholder { color: #BBAAAA; }
.password-control { position:relative; }
.password-control .form-control { padding-right:52px; }
.password-toggle {
  position:absolute; top:50%; right:8px; transform:translateY(-50%);
  width:36px; height:36px; border:0; border-radius:10px;
  background:transparent; color:var(--muted); font-size:1.12rem;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background .2s, color .2s, transform .2s;
}
.password-toggle:hover, .password-toggle:focus-visible { background:#FFEAF1; color:var(--pink); outline:none; }
.password-toggle[aria-pressed="true"] { background:#E7FBFA; color:#168F89; }

/* File upload zone */
.upload-zone {
  border: 3px dashed var(--pink-l);
  border-radius: 18px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #FFF5F8;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--pink);
  background: #FFE8F0;
}
.upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 10px; }
.upload-zone p { font-size: .9rem; color: var(--muted); font-weight: 600; }
.upload-zone input[type="file"] { display: none; }
.upload-zone label { cursor: pointer; }

/* ── Alert / Flash ── */
.alert {
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 600; font-size: .9rem;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.alert-success { background: #E8F5E9; color: #2E7D32; }
.alert-error   { background: #FFEBEE; color: #C62828; }
.alert-info    { background: #E3F2FD; color: #1565C0; }

/* ── Badges ── */
.badge-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: .75rem; font-weight: 700;
}
.badge-pending  { background: #FFF9C4; color: #F57F17; }
.badge-reviewed { background: #C8E6C9; color: #2E7D32; }
.badge-new      { background: #FCE4EC; color: #C2185B; }

/* ── Evidence Cards ── */
.evidence-list { display: flex; flex-direction: column; gap: 14px; }
.evidence-item {
  background: white;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
}
.evidence-thumb {
  width: 70px; height: 70px;
  border-radius: 12px;
  object-fit: cover;
  background: #f5f5f5;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; overflow: hidden; flex-shrink: 0;
}
.evidence-thumb img { width: 100%; height: 100%; object-fit: cover; }
.evidence-thumb video, .evidence-thumb audio { width: 100%; }
.evidence-meta h4 { font-weight: 800; font-size: .95rem; margin-bottom: 4px; }
.evidence-meta p  { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.evidence-comment { font-size: .85rem; color: var(--text); font-style: italic; }

/* Feedback form */
.feedback-box {
  background: #FFF5F8;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
}
.star-rating { display: flex; gap: 6px; margin-bottom: 10px; }
.star-rating input { display: none; }
.star-rating label { font-size: 1.6rem; cursor: pointer; filter: grayscale(1) opacity(.5); transition: filter .15s; }
.star-rating label:hover,
.star-rating label.active { filter: none; }

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 25% 30%, rgba(255,107,157,.2) 0%, transparent 45%),
    radial-gradient(circle at 75% 70%, rgba(78,205,196,.2) 0%, transparent 45%),
    var(--bg);
}
.login-box {
  background: white;
  border-radius: 28px;
  padding: 40px 36px;
  width: 100%; max-width: 440px;
  box-shadow: 0 16px 60px rgba(255,107,157,.2);
  text-align: center;
}
.login-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 2.2rem; color: var(--pink);
  margin-bottom: 6px;
}
.login-brand { display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:14px; }
.login-mascot { width:66px; height:66px; object-fit:contain; flex:0 0 66px; filter:drop-shadow(0 5px 8px rgba(61,44,44,.14)); }
.login-brand .login-logo { margin:0; font-size:2.05rem; line-height:1; white-space:nowrap; }
.site-footer { text-align:center; padding:32px 20px; font-size:.8rem; color:#BBAAAA; margin-top:40px; }
.footer-wordmark { display:block; width:min(190px,65vw); height:auto; margin:0 auto 10px; }
.login-subtitle { font-size: .9rem; color: var(--muted); margin-bottom: 28px; line-height: 1.5; }
.login-tabs {
  display: flex; border-radius: 14px;
  background: #f5f5f5; padding: 4px;
  margin-bottom: 24px; gap: 4px;
}
.login-tab {
  flex: 1; padding: 9px;
  border-radius: 10px;
  border: none; background: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: .9rem;
  cursor: pointer; color: var(--muted);
  transition: all .2s;
}
.login-tab.active { background: white; color: var(--pink); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.form-tab { display: none; }
.form-tab.active { display: block; }
.login-footer { font-size: .82rem; color: var(--muted); margin-top: 20px; }
.login-footer a { color: var(--pink); text-decoration: none; font-weight: 700; }

/* ── Dashboard Header ── */
.dash-header {
  background: linear-gradient(135deg, var(--pink), #C77DFF);
  border-radius: 24px;
  padding: 28px 32px;
  color: white;
  margin-bottom: 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  box-shadow: 0 8px 30px rgba(255,107,157,.3);
}
.dash-header-text h1 { font-family: 'Fredoka One', cursive; font-size: 1.8rem; margin-bottom: 4px; }
.dash-header-text p { font-size: .9rem; opacity: .9; }
.dash-header-emoji { font-size: 3.5rem; }
.dash-brand-mascot { width:60px; height:60px; object-fit:contain; flex:0 0 60px; filter:drop-shadow(0 7px 9px rgba(61,44,44,.18)); }

.teacher-join-card {
  display:flex; align-items:center; justify-content:space-between; gap:20px;
  margin:0 0 24px; padding:18px 22px; border-radius:18px;
  background:linear-gradient(115deg,#E7FBFA 0%,#F6F0FF 52%,#FFF1F6 100%);
  border:1px solid rgba(78,205,196,.28); box-shadow:0 6px 20px rgba(61,44,44,.08);
}
.teacher-join-eyebrow { color:#55707D; font-size:.78rem; font-weight:900; text-transform:uppercase; letter-spacing:.06em; }
.teacher-join-code { margin:3px 0 4px; color:#23485A; font-family:'Fredoka One',cursive; font-size:1.55rem; letter-spacing:.08em; }
.teacher-join-card p { color:var(--muted); font-size:.84rem; max-width:650px; }

/* ── Stats Row ── */
.stats-row { display: flex; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 120px;
  background: white;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,.07);
  text-align: center;
}
.stat-num { font-family: 'Fredoka One', cursive; font-size: 2rem; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ── Access Code Banner ── */
.code-banner {
  background: linear-gradient(135deg, #FFF9E6, #FFF0F5);
  border: 3px dashed var(--yellow);
  border-radius: 18px;
  padding: 16px 20px;
  text-align: center;
  margin-bottom: 20px;
}
.code-banner h3 { font-size: .85rem; color: var(--muted); font-weight: 700; margin-bottom: 6px; }
.code-value {
  font-family: 'Fredoka One', cursive;
  font-size: 2rem; letter-spacing: 4px;
  color: var(--text); cursor: pointer;
}
.code-hint { font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* ── Tabs ── */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; }
.tab-btn {
  padding: 9px 20px; border-radius: 30px;
  border: 2px solid #EEE;
  background: white; font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: .88rem;
  cursor: pointer; color: var(--muted);
  transition: all .2s;
}
.tab-btn.active { background: var(--pink); color: white; border-color: var(--pink); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Media Preview ── */
.media-preview {
  width: 100%; max-height: 300px;
  border-radius: 14px; overflow: hidden;
  background: #f5f5f5;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.media-preview img   { width: 100%; max-height: 300px; object-fit: contain; }
.media-preview video { width: 100%; max-height: 300px; }
.media-preview audio { width: 100%; margin: 20px; }

/* ── Material Item ── */
.material-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: #FAFAFA;
  border-radius: 12px;
  margin-bottom: 8px;
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.material-item:hover { background: #F0F0F0; }
.material-icon { font-size: 1.5rem; }
.material-title { font-weight: 600; font-size: .9rem; flex: 1; }
.material-type { font-size: .75rem; color: var(--muted); }

/* ── Student List ── */
.student-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F0F0F0;
}
.student-item:last-child { border-bottom: none; }
.student-avatar { font-size: 1.6rem; }
.student-info h4 { font-weight: 700; font-size: .9rem; }
.student-info p  { font-size: .78rem; color: var(--muted); }
.student-stars   { margin-left: auto; font-size: .85rem; }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.empty-state p  { font-size: .88rem; margin-bottom: 20px; }

/* ── Modal ── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white;
  border-radius: 24px;
  padding: 32px;
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title { font-family: 'Fredoka One', cursive; font-size: 1.3rem; }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .page-wrapper { padding: 16px; }
  .dash-header { flex-direction: column; text-align: center; }
  .navbar { padding: 10px 14px; }
  .nav-message-link {
    width:42px; height:42px; padding:0 !important; border-radius:50% !important;
    justify-content:center; background:rgba(255,255,255,.14);
    box-shadow:0 3px 10px rgba(0,0,0,.16);
  }
  .nav-message-link .message-label { display:none; }
  .nav-message-link .message-icon { font-size:1.18rem; }
  .brand-lockup { height:46px; }
  .navbar-brand .brand-wordmark { height:44px; max-width:185px; }
  .login-mascot { width:56px; height:56px; flex-basis:56px; }
  .login-brand .login-logo { font-size:1.7rem; }
  .dash-brand-mascot { width:54px; height:54px; flex-basis:54px; }
  .teacher-join-card { align-items:flex-start; flex-direction:column; gap:12px; }
  .teacher-join-card .btn { width:100%; }
  .stats-row { gap: 10px; }
  .board-square { width: 36px; height: 36px; font-size: .75rem; }
  .login-box { padding: 28px 20px; }
}

/* ── Animations ── */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.bounce { animation: bounce 2s infinite; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.pulse { animation: pulse 2s infinite; }

/* ── Color helpers ── */
.bg-pink   { background: var(--pink) !important; }
.bg-green  { background: var(--green) !important; }
.bg-teal   { background: var(--teal) !important; }
.bg-yellow { background: var(--yellow) !important; }
.bg-blue   { background: var(--blue) !important; }
.bg-purple { background: var(--purple) !important; }
.bg-orange { background: var(--orange) !important; }
.text-pink   { color: var(--pink) !important; }
.text-muted  { color: var(--muted) !important; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-8  { margin-bottom: 8px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-center { text-align: center; }
.fw-800 { font-weight: 800; }
.fs-sm { font-size: .85rem; }
.rounded { border-radius: 30px; }

/* ══════════════════════════════════════════════
   TEXT-TO-SPEECH — Botones de audio para niños
   ══════════════════════════════════════════════ */

/* Botón pequeño (para adultos, en la cabecera de instrucciones) */
.tts-btn-sm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 30px;
  border: 2px solid var(--orange); background: #FFF8F0;
  color: var(--orange); font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: .82rem;
  cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.tts-btn-sm:hover { background: var(--orange); color: white; }
.tts-btn-sm.tts-speaking {
  background: #e74c3c; border-color: #e74c3c; color: white;
  animation: tts-pulse 1.2s ease-in-out infinite;
}

/* Botón GRANDE (para el niño — protagonista de la pantalla) */
.tts-btn-big {
  width: 100%;
  padding: 20px 24px;
  border-radius: 24px;
  border: none;
  background: linear-gradient(135deg, #FF9A3C, #FFD93D);
  color: white;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(255,154,60,.35);
  transition: all .2s;
  display: flex; align-items: center; gap: 16px;
  text-align: left;
}
.tts-btn-big:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(255,154,60,.45);
}
.tts-btn-big:active { transform: scale(.98); }

.tts-big-icon {
  font-size: 2.8rem;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
  transition: transform .2s;
}
.tts-btn-big.tts-speaking .tts-big-icon {
  animation: tts-speaker 0.6s ease-in-out infinite alternate;
}
.tts-big-label {
  font-size: 1.2rem; font-weight: 900;
  display: block; line-height: 1.2;
}
.tts-big-sub {
  font-size: .78rem; opacity: .85;
  display: block; margin-top: 3px; font-weight: 600;
}

/* Estado "hablando" en el botón grande */
.tts-btn-big.tts-speaking {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 6px 24px rgba(231,76,60,.4);
  animation: tts-pulse 1.2s ease-in-out infinite;
}

/* Ondas de sonido animadas */
@keyframes tts-speaker {
  from { transform: scale(1); }
  to   { transform: scale(1.2); }
}
@keyframes tts-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(231,76,60,.4); }
  50%       { box-shadow: 0 6px 36px rgba(231,76,60,.7); }
}

/* ── Embed HTML container ── */
.embed-container {
  width: 100%;
  overflow: hidden;
}
.embed-container iframe {
  width: 100% !important;
  min-height: 380px;
  border: none;
  display: block;
}
.embed-container > * { max-width: 100%; }

/* ── Color swatches (shared) ── */
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.color-swatch {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: all .15s;
}
.color-swatch.selected, .color-swatch:hover {
  border-color: #333; transform: scale(1.2);
}
