/* ============================================================
   Homework booklet — print-optimized
   ============================================================ */

@page {
  size: A4 portrait;
  margin: 14mm;
}

:root {
  --ink: #1f2937;
  --ink-soft: #6b7280;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --border: #d1d5db;
  --c-consonant: #2563eb;
  --c-vowel: #dc2626;
  --c-digraph: #16a34a;
  --c-silent: #94a3b8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: "Comic Sans MS", "Marker Felt", -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f5f5f5;
  font-size: 15pt;
  line-height: 1.5;
}

/* ============== SCREEN HEADER ============== */
.screen-only {
  background: white;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  max-width: 900px;
  margin: 0 auto 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.screen-only h1 {
  font-size: 22pt;
  margin: 0;
  color: var(--ink);
}

.back {
  font-size: 14pt;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
}
.back:hover { background: var(--accent-soft); }

.print-btn {
  font-family: inherit;
  font-size: 14pt;
  padding: 10px 20px;
  background: var(--ink);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}
.print-btn:hover { background: #111; }

.instructions {
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 13pt;
}

/* ============== PAGE LAYOUT ============== */
.page {
  background: white;
  width: 210mm;
  min-height: 297mm;
  padding: 18mm 16mm;
  margin: 0 auto 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  page-break-after: always;
  display: flex;
  flex-direction: column;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--accent);
}

.day-badge {
  font-size: 14pt;
  font-weight: bold;
  background: var(--accent-soft);
  color: #92400e;
  padding: 6px 16px;
  border-radius: 999px;
}

.page-num {
  font-size: 12pt;
  color: var(--ink-soft);
}

.page h2 {
  font-size: 28pt;
  margin: 8px 0 16px;
  color: var(--ink);
}

.page h3 {
  font-size: 18pt;
  margin: 20px 0 12px;
  color: var(--ink);
}

.task {
  font-size: 15pt;
  margin-bottom: 24px;
  line-height: 1.6;
}

.task .rime,
.task .magic-e {
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 6px;
  color: #92400e;
}

/* ============== DAY 1: WORD GRID ============== */
.word-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.word-cell {
  font-size: 28pt;
  font-weight: bold;
  text-align: center;
  padding: 16px 8px;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: #fafafa;
}

.task-2 { margin-top: 24px; }

.writing-lines {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 12px;
}

.line {
  border-bottom: 2px solid var(--ink);
  height: 28px;
  flex: 1;
}

/* ============== DAY 2: MATCH GAME ============== */
.match-game {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin: 32px 0;
  justify-items: center;
}

.match-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.match-item {
  font-size: 28pt;
  font-weight: bold;
  padding: 12px 24px;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 16px;
  text-align: center;
}

.rule-line {
  font-size: 20pt;
  font-style: italic;
  text-align: center;
  padding: 20px;
  background: var(--accent-soft);
  border-radius: 16px;
  border: 2px dashed var(--accent);
}

/* ============== DAY 3: LETTER TILES ============== */
.tiles-source {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 8px;
  margin: 16px 0 24px;
  padding: 16px;
  background: #fafafa;
  border: 2px dashed var(--ink-soft);
  border-radius: 16px;
}

.tile {
  aspect-ratio: 1;
  font-size: 24pt;
  font-weight: bold;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 8px;
}

.build-zones {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.build-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.build-hint {
  font-size: 14pt;
  flex: 1;
}

.build-slots {
  display: flex;
  gap: 6px;
}

.slot {
  width: 36px;
  height: 36px;
  border: 2px dashed var(--ink-soft);
  border-radius: 6px;
  background: #fafafa;
}

/* ============== DAY 4: SPEECH BUBBLE ============== */
.speech-bubble {
  position: relative;
  background: white;
  border: 3px solid var(--ink);
  border-radius: 24px;
  padding: 28px 32px;
  margin: 24px 0;
}

.speech-bubble::before {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 40px;
  width: 0; height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 16px solid var(--ink);
}
.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 43px;
  width: 0; height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 13px solid white;
}

.speaker {
  font-size: 13pt;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.bubble-text {
  font-size: 22pt;
  line-height: 1.6;
  font-weight: bold;
}

.hi-blue { color: var(--c-consonant); }
.hi-red { color: var(--c-vowel); }
.hi-green { color: var(--c-digraph); }
.hi-silent { color: var(--c-silent); }

.star-tracker {
  margin-top: 24px;
}

.star-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  font-size: 16pt;
}

.star-label {
  width: 100px;
  font-weight: bold;
}

.star {
  font-size: 36pt;
  color: var(--accent);
  line-height: 1;
}

.signature {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sig-line {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13pt;
  color: var(--ink-soft);
}

/* ============== DAY 5: DRAW & LABEL ============== */
.drawing-box {
  border: 3px dashed var(--ink);
  border-radius: 24px;
  height: 100mm;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
  background: #fafafa;
  position: relative;
}

.drawing-hint {
  font-size: 18pt;
  color: var(--ink-soft);
}

.label-section .hint-text {
  font-size: 12pt;
  color: var(--ink-soft);
  font-style: italic;
}

.label-rows {
  margin-top: 12px;
}

.label-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 18pt;
  font-weight: bold;
}

.celebration-banner {
  margin-top: auto;
  padding: 20px;
  background: var(--accent-soft);
  border: 3px solid var(--accent);
  border-radius: 16px;
  text-align: center;
  font-size: 18pt;
  font-weight: bold;
  color: #92400e;
}

/* ============== PARENT NOTE ============== */
.parent-note {
  margin-top: auto;
  padding: 14px 18px;
  background: #f0f9ff;
  border-left: 4px solid #0284c7;
  border-radius: 8px;
  font-size: 11pt;
  color: #075985;
  line-height: 1.5;
}

/* ============== PRINT RULES ============== */
@media print {
  body { background: white; font-size: 12pt; }
  .screen-only { display: none; }
  .page {
    box-shadow: none;
    margin: 0;
    width: 100%;
    min-height: auto;
    padding: 0;
  }
}
