/* Kinder Español — warm, playful, parent-clean.
   Palette: sunny amber, coral, teal, cream. Rounded, friendly, readable. */

:root {
  --amber:   #f6b93b;
  --amber-d: #e58e26;
  --coral:   #e55039;
  --coral-d: #c0392b;
  --teal:    #38ada9;
  --teal-d:  #2c7873;
  --plum:    #6c5ce7;
  --cream:   #fff9f0;
  --ink:     #3a3335;
  --muted:   #8a7f82;
  --line:    #efe4d6;
  --card:    #ffffff;
  --ok:      #2ecc71;
  --shadow:  0 6px 20px rgba(120, 90, 40, 0.10);
  --radius:  18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-text { font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; font-weight: 700; }
a { color: var(--teal-d); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Nav ---------- */
.navbar {
  display: flex; align-items: center; gap: .5rem;
  background: linear-gradient(100deg, var(--amber), var(--coral));
  padding: .6rem 1rem; color: #fff; position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}
.navbar-brand { display: flex; align-items: center; gap: .4rem; color: #fff; font-size: 1.25rem; }
.navbar-brand:hover { text-decoration: none; }
.brand-leaf { font-size: 1.4rem; }
.nav-toggle { margin-left: auto; background: none; border: 0; cursor: pointer; display: none; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 26px; height: 3px; background: #fff; border-radius: 3px; }
.nav-links { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0 0 0 auto; padding: 0; flex-wrap: wrap; }
.nav-links a { color: #fff; padding: .35rem .6rem; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.nav-links a:hover { background: rgba(255,255,255,.18); text-decoration: none; }
.nav-links a.active { background: rgba(255,255,255,.28); }
.nav-emergency a, a.nav-emergency { background: #fff !important; color: var(--coral-d) !important; font-weight: 800; }
.nav-emergency a:hover { background: #ffe9e4 !important; }

/* ---------- Banners / flash ---------- */
.ai-banner {
  background: #fff3d6; color: #8a6d1b; padding: .5rem 1rem; font-size: .9rem;
  display: flex; gap: .5rem; justify-content: center; align-items: center; border-bottom: 1px solid var(--line);
}
.theme-banner {
  background: #eafaf7; color: var(--teal-d); padding: .5rem 1rem; font-size: .92rem;
  text-align: center; border-bottom: 1px solid var(--line);
}
.flash-container { max-width: 920px; margin: .8rem auto 0; padding: 0 1rem; }
.flash {
  padding: .7rem 1rem; border-radius: 12px; margin-bottom: .5rem; display: flex; justify-content: space-between;
  align-items: center; box-shadow: var(--shadow);
}
.flash-success { background: #e6f8ee; color: #1d8a4e; }
.flash-error   { background: #fdecea; color: var(--coral-d); }
.flash-info    { background: #eef0fd; color: #4a3fb0; }
.flash-close { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: inherit; }

/* ---------- Layout ---------- */
.main-content { max-width: 1040px; margin: 1.2rem auto; padding: 0 1rem 3rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.subtle { color: var(--muted); }
.muted { color: var(--muted); font-size: .9rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .4rem; border: 0; cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: .95rem; padding: .55rem 1rem; border-radius: 999px; background: var(--teal); color: #fff;
  box-shadow: var(--shadow); transition: transform .06s ease; text-decoration: none; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-amber { background: var(--amber-d); }
.btn-coral { background: var(--coral); }
.btn-plum  { background: var(--plum); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-sm { padding: .35rem .7rem; font-size: .85rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; border: 1px solid var(--line); }
.card h3 { margin: .1rem 0 .3rem; }

.stat-card { text-align: center; }
.stat-num { font-size: 2rem; font-family: 'Baloo 2', sans-serif; color: var(--coral); line-height: 1; }
.stat-label { color: var(--muted); font-size: .85rem; }

/* Activity card */
.act-card { display: flex; flex-direction: column; gap: .5rem; position: relative; }
.act-emoji { font-size: 1.6rem; }
.act-card .act-title-en { font-weight: 800; }
.act-card .act-title-es { color: var(--teal-d); font-style: italic; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px;
  background: #f3ece1; color: #7a6a52; margin-right: .25rem; }
.badge-domain { background: #eafaf7; color: var(--teal-d); }
.badge-mode { background: #fdeee9; color: var(--coral-d); }
.badge-std { background: #eef0fd; color: #4a3fb0; font-family: ui-monospace, monospace; }
.act-meta { font-size: .82rem; color: var(--muted); display: flex; gap: .8rem; flex-wrap: wrap; }
.fav-star { position: absolute; top: .8rem; right: 1rem; font-size: 1.2rem; }

/* Spanish script block */
.es-block { background: #fff7ec; border-left: 4px solid var(--amber); border-radius: 0 12px 12px 0; padding: .8rem 1rem; }
.es-block .lang-tag { font-size: .7rem; font-weight: 800; letter-spacing: .05em; color: var(--amber-d); text-transform: uppercase; }
.es-text { font-size: 1.12rem; color: #5a4a2e; }
.prompt-list li, .vocab-list li { margin-bottom: .3rem; }
.vocab-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem .8rem; }
.vocab-es { font-weight: 800; color: var(--teal-d); }
.vocab-en { color: var(--muted); }

/* Versions */
.version-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.version { background: #f7f3ec; border-radius: 12px; padding: .8rem; }
.version h4 { margin: 0 0 .3rem; font-size: .95rem; }

/* Emergency hero */
.emergency-hero { background: linear-gradient(120deg, var(--coral), var(--coral-d)); color: #fff; border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow); }
.emergency-hero h1, .emergency-hero .es-text { color: #fff; }
.emergency-hero .es-block { background: rgba(255,255,255,.14); border-left-color: #fff; }
.emergency-hero .lang-tag { color: #ffe1d9; }

/* Calendar */
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: .8rem; color: var(--muted); padding: .3rem; text-align: center; }
.cal td { border: 1px solid var(--line); vertical-align: top; height: 92px; padding: .25rem; background: #fff; border-radius: 8px; }
.cal td.out { background: #faf5ee; }
.cal .daynum { font-size: .8rem; color: var(--muted); }
.cal .today .daynum { background: var(--coral); color: #fff; border-radius: 999px; padding: 0 .4rem; }
.cal .chip { display: block; font-size: .72rem; background: #eafaf7; color: var(--teal-d); border-radius: 6px; padding: .1rem .3rem;
  margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .chip.done { background: #e6f8ee; color: #1d8a4e; }
.cal .chip.skip { background: #fdecea; color: var(--coral-d); text-decoration: line-through; }

/* Coverage bars */
.cov-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.cov-label { width: 150px; font-size: .88rem; }
.cov-bar { flex: 1; background: #f0e8dc; border-radius: 999px; height: 12px; overflow: hidden; }
.cov-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--amber)); }
.cov-num { width: 28px; text-align: right; font-weight: 700; }

/* Report */
.report-table { width: 100%; border-collapse: collapse; }
.report-table th, .report-table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.report-table th { font-size: .82rem; color: var(--muted); }
.i-can { font-style: italic; color: var(--teal-d); }
.pill { display:inline-block; background:#f3ece1; border-radius:999px; padding:.1rem .55rem; font-size:.78rem; }

/* Forms */
label { font-weight: 600; font-size: .9rem; display: block; margin: .6rem 0 .2rem; }
input[type=text], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 1rem; background: #fff; }
input[type=range] { width: 100%; }
.row-inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.toggle { display: flex; align-items: center; gap: .5rem; }

/* Footer */
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem; }

/* Floating emergency (mobile) */
.fab { position: fixed; bottom: 18px; right: 18px; z-index: 60; background: var(--coral); color: #fff; border-radius: 999px;
  padding: .8rem 1.1rem; font-weight: 800; box-shadow: var(--shadow); }
.fab:hover { text-decoration: none; }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .6rem; border-radius: 10px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .version-grid { grid-template-columns: 1fr; }
  .vocab-list { grid-template-columns: 1fr; }
  .cal td { height: 64px; }
}
@media print {
  .navbar, .ai-banner, .theme-banner, .fab, .no-print, .footer { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
