*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FAF8F5;
  --text: #1A1A1A;
  --text-soft: #6B6B6B;
  --accent: #2C5F2E;
  --border: #E8E4DC;
  --kids-accent: #E8773A;
  --max-w: 680px;
  --font-body: Georgia, 'Times New Roman', serif;
  --font-ui: system-ui, -apple-system, sans-serif;
}

body.kids-mode { --accent: var(--kids-accent); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
}

.hidden { display: none !important; }

.loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.loading-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
}


/* ============================================================
   KIDS MODE — SCREEN
   ============================================================ */

/* Playful header strip */
body.kids-mode header {
  border-bottom: 3px solid var(--kids-accent);
}

/* Show big category icon on screen in kids mode */
body.kids-mode .print-icon {
  display: block;
  font-size: 64px;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1;
}

/* Did you know: fun callout box */
body.kids-mode .did-you-know {
  background: #FFF4ED;
  border-left: 6px solid var(--kids-accent);
  border-radius: 16px;
  padding: 20px 24px;
  font-size: clamp(18px, 3.5vw, 24px);
  font-style: normal;
  font-weight: 600;
}
body.kids-mode .did-you-know::before { content: "💡  "; font-style: normal; font-size: 1em; }
body.kids-mode .did-you-know::after  { content: ""; }

/* Bigger category badge */
body.kids-mode .category-badge {
  font-size: 14px;
  padding: 5px 14px;
}

/* Centered, larger title */
body.kids-mode .article-title {
  text-align: center;
  font-size: clamp(26px, 5vw, 40px);
}


/* ============================================================
   PRINT
   ============================================================ */
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Hide screen-only elements */
  header, .archive-nav, .sources, .meta-row { display: none !important; }

  body { background: #fff; font-family: Georgia, serif; }
  main { max-width: 100%; padding: 0; }

  /* --- Print page header --- */
  .print-page-header {
    display: flex !important;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 3px solid #2C5F2E;
    padding-bottom: 10px;
    margin-bottom: 28px;
  }
  .print-logo {
    font-family: Arial, sans-serif;
    font-size: 18px; font-weight: 900;
    letter-spacing: 0.2em; color: #2C5F2E;
  }
  .print-date {
    font-family: Arial, sans-serif;
    font-size: 13px; color: #666;
    text-transform: uppercase; letter-spacing: 0.06em;
  }

  /* --- Big category icon --- */
  .print-icon {
    display: block !important;
    text-align: center;
    font-size: 72px;
    line-height: 1;
    margin-bottom: 16px;
  }

  /* --- Did you know: fun box --- */
  .did-you-know {
    font-size: 17px;
    font-style: italic;
    border: none;
    padding: 16px 20px;
    margin-bottom: 28px;
    background: #FFF8F0;
    border-radius: 12px;
    border-left: 6px solid #E8773A;
  }
  .did-you-know::before { content: '💡 '; font-style: normal; font-size: 1em; }
  .did-you-know::after  { content: ''; }

  /* --- Title & content --- */
  .article-title {
    font-size: 26px; font-weight: 900;
    margin-bottom: 20px; color: #1A1A1A;
    text-align: center;
  }
  .article-content {
    font-size: 16px; line-height: 1.75;
    columns: 1;
  }
  .article-content p { margin-bottom: 1em; }

  /* --- Draw page: new page --- */
  .draw-page {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    page-break-before: always;
    height: 100vh;
    padding: 32px 40px;
    text-align: center;
  }
  .draw-pencil { font-size: 64px; margin-bottom: 12px; }
  .draw-title {
    font-family: Arial, sans-serif;
    font-size: 28px; font-weight: 900;
    color: #E8773A; margin-bottom: 8px;
  }
  .draw-subtitle {
    font-family: Arial, sans-serif;
    font-size: 15px; color: #888;
    margin-bottom: 24px;
  }
  .draw-area {
    width: 100%; flex: 1;
    border: 3px dashed #E8773A;
    border-radius: 20px;
    margin-bottom: 20px;
    background-image: radial-gradient(circle, #E8E4DC 1px, transparent 1px);
    background-size: 24px 24px;
  }
  .draw-footer {
    font-family: Arial, sans-serif;
    font-size: 11px; color: #ccc;
    letter-spacing: 0.1em; text-transform: uppercase;
  }
}
