/* Practice Time — kid-friendly, clean, simple */

:root {
  --bg: #f0f7ff;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --good: #16a34a;
  --bad: #dc2626;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Comic Sans MS", "Chalkboard SE", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.hidden { display: none !important; }

.muted { color: var(--muted); }

/* ---------- header ---------- */

#app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--card);
  border-bottom: 3px solid #e0e7ff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { font-size: 1.4rem; font-weight: bold; }

nav { display: flex; gap: 8px; }

.child-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eef2ff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: bold;
}

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}

#launch-links { flex-wrap: nowrap; }

/* Fixed-width slot for the emoji/icon in a link button so differing emoji
   glyph metrics can't shift the text baseline. */
.link-btn .em {
  display: inline-block;
  width: 1.3em;
  text-align: center;
}

/* ---------- layout ---------- */

main {
  max-width: 1024px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* On wide screens, long reading text stays at a comfortable measure while
   the surrounding UI (cards, lists, charts) uses the full width. */
#practice-question, #mock-question, .review-qtext,
#practice-explain, .review-explain {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.screen {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.08);
  text-align: center;
}

h1 { font-size: 1.8rem; margin-top: 0; }
h2 { font-size: 1.4rem; }
h3 { margin: 24px 0 8px; text-align: left; }

/* ---------- launch ---------- */

.profile-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.profile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  font-weight: bold;
  padding: 28px 48px;
  border: 3px solid #c7d2fe;
  border-radius: var(--radius);
  background: #eef2ff;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}

.profile-btn:hover { background: #e0e7ff; transform: scale(1.04); }

.profile-btn .emoji { font-size: 3rem; }

/* ---------- add child ---------- */

.form-row input {
  font-size: 1.1rem;
  padding: 8px 12px;
  border: 2px solid #c7d2fe;
  border-radius: var(--radius);
  width: 220px;
}

.emoji-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 320px;
  justify-content: flex-end;
}

.emoji-opt {
  font-size: 1.6rem;
  padding: 4px 6px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: none;
  cursor: pointer;
}

.emoji-opt.selected { border-color: #6366f1; background: #eef2ff; }

/* ---------- auth / family ---------- */

.auth-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}

.auth-tab {
  font-size: 1rem;
  padding: 8px 20px;
  border: 2px solid #c7d2fe;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.auth-tab.selected {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
  font-weight: bold;
}

.family-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 420px;
  margin: 8px auto;
  padding: 10px 16px;
  border: 2px solid #e0e7ff;
  border-radius: var(--radius);
  background: #f8faff;
  font-size: 1.1rem;
}

.invite-code {
  font-family: monospace;
  font-size: 1.3rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: #4f46e5;
}

/* ---------- setup ---------- */

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px auto;
  max-width: 420px;
  text-align: left;
}

.form-row label { font-weight: bold; }

.form-row select {
  flex: 1;
  max-width: 260px;
  font-size: 1rem;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #c7d2fe;
  background: #fff;
}

/* ---------- buttons ---------- */

.big-btn {
  font-size: 1.25rem;
  font-weight: bold;
  padding: 16px 36px;
  margin-top: 20px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.big-btn:hover:not(:disabled) { background: var(--primary-dark); transform: scale(1.03); }
.big-btn:disabled { background: #a5b4fc; cursor: not-allowed; }

.nav-btn {
  font-size: 1rem;
  font-weight: bold;
  padding: 10px 20px;
  border: 2px solid var(--primary);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
}

.nav-btn:hover { background: #eef2ff; }

.tab-btn {
  font-size: 1.05rem;
  font-weight: bold;
  padding: 10px 28px;
  border: 2px solid #c7d2fe;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  margin: 0 4px;
}

.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.btn-row { margin-top: 16px; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ---------- practice ---------- */

#practice-progress { font-weight: bold; margin-bottom: 4px; }

#practice-question { margin: 12px 0 20px; }

#practice-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}

.opt-btn {
  font-size: 1.1rem;
  padding: 14px 18px;
  border: 3px solid #c7d2fe;
  border-radius: 14px;
  background: #f8faff;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, transform 0.1s;
}

.opt-btn:hover:not(:disabled) { background: #e0e7ff; transform: scale(1.01); }
.opt-btn:disabled { cursor: default; }

.opt-btn.correct { background: #bbf7d0; border-color: var(--good); }
.opt-btn.wrong { background: #fecaca; border-color: var(--bad); }

.feedback {
  font-size: 1.15rem;
  font-weight: bold;
  margin: 20px auto 0;
  padding: 12px 18px;
  border-radius: 12px;
  max-width: 460px;
}

.feedback.good { background: #dcfce7; color: var(--good); }
.feedback.bad { background: #fee2e2; color: var(--bad); }

.explain {
  background: #fef9c3;
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 460px;
  margin: 12px auto 0;
  text-align: left;
}

/* ---------- finish ---------- */

.score-big { font-size: 3.2rem; font-weight: bold; margin: 8px 0; color: var(--primary); }

/* ---------- review ---------- */

#review-cards { text-align: left; }

.review-card {
  background: #f8faff;
  border: 2px solid #e0e7ff;
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
}

.review-qhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: bold;
  margin-bottom: 8px;
}

.badge-good {
  background: #dcfce7;
  color: var(--good);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.9rem;
}

.badge-bad {
  background: #fee2e2;
  color: var(--bad);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.9rem;
}

.badge-skip {
  background: #e0e7ff;
  color: #4338ca;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.9rem;
}

.review-qtext { font-size: 1.1rem; font-weight: bold; margin: 8px 0 12px; }

.review-diagram { max-width: 460px; margin: 0 auto 12px; text-align: center; }
.review-diagram svg { max-width: 100%; height: auto; }

.review-opt {
  border: 2px solid #c7d2fe;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 8px 0;
  background: #fff;
}

.review-opt svg { width: 72px; height: 72px; display: block; margin: 0 auto; }

.review-opt.correct { background: #bbf7d0; border-color: var(--good); }
.review-opt.wrong { background: #fecaca; border-color: var(--bad); } /* defined for reuse */

.review-explain {
  background: #fef9c3;
  border-radius: 12px;
  padding: 10px 14px;
  margin-top: 12px;
}

/* ---------- scorebook ---------- */

.tabs { margin: 8px 0 16px; }

#sb-summary { font-weight: bold; font-size: 1.1rem; text-align: left; }

.subject-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  text-align: left;
}

.subject-row span:first-child { width: 110px; font-weight: bold; }
.subject-row span:last-child { width: 48px; text-align: right; font-weight: bold; }

.bar {
  flex: 1;
  height: 16px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.bar .fill { height: 100%; background: var(--primary); border-radius: 999px; }

#sb-chart, .sb-chart-canvas {
  width: 100%;
  height: 220px;
  background: #f8faff;
  border: 2px solid #e0e7ff;
  border-radius: 12px;
}

.sb-chart-canvas { height: 160px; }

/* summary tiles */
#sb-summary { text-align: left; font-weight: bold; font-size: 1.05rem; }

.sb-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 4px;
}

.sb-tile {
  flex: 1 1 110px;
  max-width: 180px;
  background: #eef2ff;
  border: 2px solid #e0e7ff;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
}

.sb-tile-value { font-size: 1.5rem; font-weight: bold; color: var(--primary); line-height: 1.1; }

.sb-tile-label { color: var(--muted); font-size: 0.85rem; font-weight: bold; margin-top: 2px; }

/* tidy topic list: one row per topic, sparkline, expandable full chart */
#sb-charts { display: block; }

.sb-topic-row {
  background: #fff;
  border: 2px solid #e0e7ff;
  border-radius: 12px;
  margin: 8px 0;
  text-align: left;
  overflow: hidden;
}

.sb-topic-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.sb-topic-head:hover { background: #f8faff; }

.sb-topic-title { font-weight: bold; font-size: 1rem; flex: 1; min-width: 140px; }

.sb-topic-meta { color: var(--muted); font-size: 0.9rem; font-weight: bold; white-space: nowrap; }

.sb-spark { width: 96px; height: 28px; flex-shrink: 0; }

.sb-topic-chev { color: var(--primary); font-weight: bold; flex-shrink: 0; }

.sb-topic-detail { padding: 0 14px 14px; }

@media (max-width: 560px) {
  .sb-topic-head { flex-wrap: wrap; }
  .sb-spark { width: 72px; }
}

.history { list-style: none; padding: 0; text-align: left; }

.history li {
  background: #f8faff;
  border: 1px solid #e0e7ff;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 8px 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compare {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.compare-card {
  flex: 1;
  min-width: 180px;
  background: #eef2ff;
  border: 2px solid #c7d2fe;
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
}

.compare-card h4 { margin: 0 0 8px; font-size: 1.2rem; }
.compare-card p { margin: 4px 0; }

.mini-btn {
  font-size: 0.85rem;
  font-weight: bold;
  padding: 6px 14px;
  border: 2px solid var(--primary);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.mini-btn:hover { background: #eef2ff; }

/* Diagram / SVG questions (NVR): keep the diagram above the question text
   bounded, and size inline SVGs inside option buttons. */
#practice-diagram { max-width: 460px; margin: 0 auto 16px; text-align: center; }
#practice-diagram svg { max-width: 100%; height: auto; }
.opt-btn svg { width: 72px; height: 72px; display: block; margin: 0 auto; }

/* Parent PIN gate */
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #9ca3af; display: inline-block; }
.pin-dots span.on { background: var(--primary); border-color: var(--primary); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 84px); gap: 10px; justify-content: center; margin-bottom: 18px; }
.pin-key { font-size: 1.5rem; padding: 12px 0; border-radius: 12px; border: 2px solid #e5e7eb; background: #fff; cursor: pointer; }
.pin-key:active { background: #eef2ff; }
.pin-blank { visibility: hidden; }
.small { font-size: 0.8rem; }
@keyframes pinshake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
.shake { animation: pinshake 0.3s; }

/* ---------- mock tests ---------- */

.format-card {
  display: block;
  width: 100%;
  max-width: 460px;
  margin: 12px auto;
  padding: 20px;
  border: 3px solid #c7d2fe;
  border-radius: var(--radius);
  background: #eef2ff;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  color: var(--ink);
}

.format-card:hover { background: #e0e7ff; transform: scale(1.01); }

.format-title { font-size: 1.3rem; font-weight: bold; margin-bottom: 4px; }

.paper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 460px;
  margin: 8px auto;
  padding: 12px 16px;
  border: 2px solid #e0e7ff;
  border-radius: var(--radius);
  background: #f8faff;
  text-align: left;
}

#mock-timer-wrap { max-width: 460px; margin: 0 auto 8px; }

#mock-timer-text { font-size: 1.3rem; font-weight: bold; }

#mock-timer {
  height: 14px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

#mock-timer-fill {
  height: 100%;
  width: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 1s linear;
}

#mock-timer.danger #mock-timer-fill { background: var(--bad); }
#mock-timer.danger #mock-timer-text { color: var(--bad); }

/* practice timer (timed assignments) mirrors the mock timer */
#practice-timer-wrap { max-width: 460px; margin: 0 auto 8px; }

#practice-timer-text { font-size: 1.3rem; font-weight: bold; }

#practice-timer {
  height: 14px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

#practice-timer-fill {
  height: 100%;
  width: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 1s linear;
}

#practice-timer.danger #practice-timer-fill { background: var(--bad); }
#practice-timer.danger #practice-timer-text { color: var(--bad); }

#update-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  text-align: center;
}
#update-banner .mini-btn { background: #fff; color: var(--primary); border: none; }

/* ---------- badges page ---------- */

#badges-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto 16px;
  text-align: left;
}

.badge-card {
  display: flex;
  gap: 14px;
  align-items: center;
  background: #f8faff;
  border: 2px solid #e0e7ff;
  border-radius: 14px;
  padding: 12px 16px;
}

.badge-card .b-emoji { font-size: 2.2rem; line-height: 1; }

.badge-card .b-name { font-weight: bold; font-size: 1.05rem; }

.badge-card .b-desc { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }

.badge-card .b-when { color: var(--good); font-size: 0.8rem; font-weight: bold; margin-top: 4px; }

.badge-card.locked { opacity: 0.55; border-style: dashed; }

.badge-card.locked .b-emoji { filter: grayscale(1); }

#finish-badges, #mock-badges {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary-dark);
  margin: 8px 0;
}

/* ---------- password reset ---------- */

.reset-banner {
  background: #fef9c3;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.reset-banner code {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 3px;
  margin: 8px 0;
  padding: 4px 12px;
  background: #fff;
  border-radius: 8px;
}

/* ---------- stars / XP ---------- */

#setup-stars-wrap { margin: 2px 0 12px; }

#setup-stars {
  font-weight: bold;
  margin: 0 0 6px;
}

.xp-bar {
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  max-width: 420px;
  margin: 0 auto;
}

.xp-bar > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border-radius: 999px;
  transition: width 0.6s ease;
}

#finish-stars, #mock-stars {
  font-size: 1.15rem;
  font-weight: bold;
  color: #b45309;
  margin: 8px 0;
}

/* ---------- style unlocks ---------- */

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  max-width: 420px;
  margin: 0 auto 18px;
}

.emoji-grid button {
  font-size: 1.8rem;
  padding: 8px 4px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.emoji-grid button.picked {
  border-color: var(--primary);
  background: #eef2ff;
  transform: scale(1.08);
}

.frame-row, .theme-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.frame-opt, .theme-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
}

.frame-opt.picked, .theme-opt.picked {
  border-color: var(--primary);
  background: #eef2ff;
}

.frame-opt .emoji {
  font-size: 2.2rem;
  display: inline-block;
  padding: 4px;
  border-radius: 50%;
}

.theme-swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.style-locked {
  opacity: 0.45;
  pointer-events: none;
}

/* profile frames (also used on the launch-screen avatars) */
.frame-gold { border: 3px solid #f59e0b !important; box-shadow: 0 0 0 3px #fde68a; }
.frame-rainbow {
  border: 3px solid transparent !important;
  background: linear-gradient(#fff, #fff) padding-box,
    conic-gradient(#ef4444, #f59e0b, #84cc16, #06b6d4, #8b5cf6, #ef4444) border-box;
}
.frame-fire { border: 3px solid #ef4444 !important; box-shadow: 0 0 14px #f97316; }

/* app themes */
body.theme-ocean { --primary: #0284c7; --primary-dark: #0369a1; --bg: #ecfeff; }
body.theme-sunset { --primary: #ea580c; --primary-dark: #c2410c; --bg: #fff7ed; }
body.theme-forest { --primary: #15803d; --primary-dark: #166534; --bg: #f0fdf4; }

.nav-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 12px auto;
  max-width: 460px;
}

.dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #c7d2fe;
  background: #fff;
  font-size: 0.72rem;
  font-weight: bold;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.dot.answered { background: #c7d2fe; color: var(--ink); }
.dot.current { border-color: var(--primary); border-width: 3px; color: var(--primary); }

.opt-btn.picked { border-color: var(--primary); background: #e0e7ff; }

#mock-diagram { max-width: 460px; margin: 0 auto 16px; text-align: center; }
#mock-diagram svg { max-width: 100%; height: auto; }

#mock-question { margin: 12px 0 20px; }

#mock-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}

.mock-miss-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 460px;
  margin: 6px auto;
  padding: 8px 14px;
  background: #f8faff;
  border: 1px solid #e0e7ff;
  border-radius: 10px;
  text-align: left;
}

/* ---------- concept help sheets ---------- */

details.concept {
  margin-top: 12px;
  border: 2px solid #c7d2fe;
  border-radius: 12px;
  background: #eef2ff;
  padding: 10px 14px;
  text-align: left;
}

details.concept summary {
  cursor: pointer;
  font-weight: bold;
  color: #4338ca;
  font-size: 0.95rem;
}

details.concept p {
  margin: 8px 0 4px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1e1b4b;
}

#practice-concept { margin: 0 auto; max-width: 640px; }

/* ---------- kids' feedback ---------- */

.feedback-text {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 12px;
  font-size: 1rem;
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid #c7d2fe;
  background: #fff;
  resize: vertical;
}

#screen-feedback .form-row { justify-content: flex-start; }

.feedback-row {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 14px;
  margin: 10px 0;
  background: #fff;
  text-align: left;
}

.feedback-row p { margin: 6px 0 2px; white-space: pre-wrap; }

.feedback-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback-head .mini-btn { margin-left: auto; }

.mini-btn.danger { color: #b91c1c; border-color: #fca5a5; }


/* ---------- admin users table ---------- */

.admin-tabs { margin-bottom: 4px; }

.nav-btn:disabled { opacity: 0.45; cursor: default; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e3e6ee;
  word-break: break-word;
}

.admin-table thead th {
  color: #6b7280;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-table tbody tr:last-child td { border-bottom: none; }

/* ---------- weekly report ---------- */

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }

.week-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.topic-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.2fr) 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #e3e6ee;
}

.topic-row:last-child { border-bottom: none; }

.topic-bar {
  display: block;
  height: 10px;
  background: #e3e6ee;
  border-radius: 999px;
  overflow: hidden;
}

.topic-fill { display: block; height: 100%; border-radius: 999px; }
.topic-fill.good { background: #34a853; }
.topic-fill.mid { background: #f2b234; }
.topic-fill.weak { background: #e0533f; }

.topic-meta { font-size: 0.9rem; color: #4b5563; white-space: nowrap; }

@media (max-width: 560px) {
  .topic-row { grid-template-columns: 1fr; gap: 4px; }
  .topic-meta { white-space: normal; }
}

/* ---------- child profile level ---------- */

.family-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
}

.mini-select {
  font-size: 0.9rem;
  padding: 6px 8px;
  border: 1px solid #d5dae5;
  border-radius: 8px;
  background: #fff;
}

/* ---------- assigned practice ---------- */

.assign-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 420px;
  margin: 8px auto;
  padding: 10px 16px;
  border: 2px solid #fde68a;
  border-radius: var(--radius);
  background: #fffbeb;
  font-size: 1.05rem;
}

.assign-form {
  max-width: 420px;
  margin: 10px auto;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  background: #f9fafb;
}

.assign-title {
  margin: 4px 0 8px;
  font-weight: 600;
  text-align: left;
}

.assign-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.assign-status {
  font-size: 0.95rem;
  color: #374151;
}
