/* grade 1-5 reading curriculum styles (curriculum-read.js) */

/* ---------- passage card (stories, context clues, main idea, inference) */
.rd-passage {
  background: #fff;
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
  max-width: min(560px, 94%);
  max-height: 44vh;
  overflow-y: auto;
  font-size: 1.35rem;
  line-height: 1.6;
  font-weight: 700;
  color: #1e293b;
  text-align: left;
}
.rd-sent { border-radius: 10px; padding: 1px 2px; }
.rd-sent.hl-sent { background: #fef9c3; box-shadow: 0 0 0 3px #f59e0b; }
.rd-word { border-radius: 8px; padding: 0 2px; }
.rd-word.hl-word { background: #fef9c3; box-shadow: 0 0 0 3px #f59e0b; }
.rd-word.rd-bold { color: #db2777; font-weight: 900; background: #fce7f3; padding: 0 5px; }

/* ---------- big word / pattern card ---------- */
.rd-bigword {
  background: #fff;
  border-radius: 20px;
  padding: 14px 28px;
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #1e293b;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15);
  line-height: 1.1;
  max-width: 94%;
  overflow-wrap: anywhere;
}
.rd-bigword.rd-contr { letter-spacing: 1px; }
.rd-affixword { letter-spacing: 1px; }
.rd-affix { color: #db2777; }
.rd-affix.rd-affix-hl {
  background: #fce7f3;
  border-radius: 10px;
  padding: 0 4px;
  box-shadow: 0 0 0 3px #db2777;
}

/* synonym / antonym mode tag */
.rd-tag {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  border-radius: 999px;
  padding: 5px 16px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
}
.rd-tag-syn { background: #16a34a; }
.rd-tag-ant { background: #db2777; }

/* ---------- homophone blank + editing sentence ---------- */
.rd-homobox { max-width: 94%; }
.sent-word.rd-blank {
  background: #fce7f3;
  color: #db2777;
  border: 3px dashed #db2777;
  border-radius: 12px;
  min-width: 64px;
  text-align: center;
}
.rd-editbox { max-width: 94%; }
.rd-edit-word {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1e293b;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 4px 8px;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px #e2e8f0;
  transition: transform 0.1s;
}
.rd-edit-word:active { transform: scale(0.94); }
.rd-edit-word.hl-word { background: #fef9c3; box-shadow: 0 0 0 3px #f59e0b; }
.rd-edit-word.rd-edit-hit { background: #4ade80; color: #fff; animation: pop 0.4s; }
.rd-edit-word.rd-edit-miss { background: #fda4af; color: #fff; animation: shake 0.4s; }

/* ---------- root example chips ---------- */
.rd-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 94%;
}
.rd-chip {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  padding: 7px 15px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #334155;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
}
.rd-chip .rd-affix { color: #db2777; }
.rd-chip.rd-chip-hl { background: #fef9c3; box-shadow: 0 0 0 3px #f59e0b; }

/* ---------- idiom quote card ---------- */
.rd-quote {
  background: #fff;
  border-radius: 20px;
  padding: 20px 26px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
  font-size: 1.7rem;
  font-weight: 900;
  font-style: italic;
  color: #1e293b;
  text-align: center;
  max-width: min(520px, 94%);
}
.rd-quote.hl-word { background: #fef9c3; box-shadow: 0 0 0 4px #f59e0b; }

/* ---------- sequencing cards ---------- */
.rd-seq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: center;
  max-height: 52vh;
  overflow-y: auto;
  padding: 4px 2px;
}
.rd-seq-card {
  display: block;
  width: 100%;
  max-width: 560px;
  text-align: left;
  background: #fff;
  border: none;
  border-radius: 16px;
  padding: 12px 14px 12px 48px;
  position: relative;
  font-size: 1.12rem;
  line-height: 1.4;
  font-weight: 700;
  color: #1e293b;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.1s;
}
.rd-seq-card:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12); }
.rd-seq-num {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rd-seq-card.done { background: #dcfce7; }
.rd-seq-card.done .rd-seq-num { background: #16a34a; color: #fff; }
.rd-seq-card.wrong-pick { background: #fee2e2; animation: shake 0.4s; }

/* ---------- analogy pairs ---------- */
.rd-analogy {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.rd-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 18px;
  padding: 12px 18px;
  font-size: 1.6rem;
  font-weight: 900;
  color: #1e293b;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.14);
}
.rd-pair-arrow { color: #94a3b8; font-size: 1.2rem; }
.rd-pair-q {
  color: #db2777;
  background: #fce7f3;
  border: 3px dashed #db2777;
  border-radius: 12px;
  padding: 0 12px;
}

/* ---------- shades of meaning ladder ---------- */
.rd-shade-slots {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: center;
}
.rd-shade-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rd-shade-tile { font-size: 1.6rem; min-width: 96px; text-align: center; }
.rd-shade-wrap:nth-child(2) .rd-shade-tile { transform: translateY(-10px); }
.rd-shade-wrap:nth-child(3) .rd-shade-tile { transform: translateY(-20px); }
.rd-shade-label {
  font-size: 0.9rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  letter-spacing: 1px;
}

/* ---------- phrase-length choice buttons (meanings, titles) ---------- */
.choice-btn.rd-phrase {
  font-size: 1.05rem;
  letter-spacing: 0;
  line-height: 1.3;
  min-width: 130px;
  max-width: 240px;
  padding: 14px 12px;
}

/* syllable slots */
.rd-syl-tiles .word-tile { min-width: 84px; text-align: center; }

/* ---------- big screens ---------- */
@media (min-width: 700px) {
  .rd-passage { font-size: 1.6rem; }
  .rd-bigword { font-size: 3.6rem; }
  .rd-seq-card { font-size: 1.3rem; }
  .choice-btn.rd-phrase { font-size: 1.2rem; max-width: 280px; }
}

/* ---------- small phones (<=420px, incl. 375px) ---------- */
@media (max-width: 420px) {
  .rd-passage { font-size: 1.18rem; padding: 14px 14px; max-height: 40vh; }
  .rd-bigword { font-size: 2.1rem; padding: 10px 18px; }
  .rd-quote { font-size: 1.35rem; padding: 14px 16px; }
  .rd-pair { font-size: 1.25rem; padding: 9px 12px; }
  .rd-seq-card { font-size: 1rem; padding: 10px 10px 10px 42px; }
  .rd-seq-list { max-height: 48vh; }
  .rd-edit-word { font-size: 1.2rem; padding: 3px 6px; }
  .rd-chip { font-size: 0.95rem; padding: 6px 11px; }
  .rd-shade-tile { font-size: 1.25rem; min-width: 78px; }
  .choice-btn.rd-phrase { font-size: 0.95rem; min-width: 110px; max-width: 200px; padding: 12px 8px; }
}
