/* Kids Tutor — Daily Reading Session (additive; loaded only with the
   feature module). Bright kid theme matching css/kids.css tokens. */

.krs-entry { margin-top: 12px; width: 100%; text-align: left; cursor: pointer; }

.krs-overlay {
  position: fixed; inset: 0; z-index: 1200; overflow-y: auto;
  background: linear-gradient(180deg, #FFF7E0 0%, #EAF6FF 55%, #EAFBF0 100%);
  color: var(--kd-ink, #1D2A44);
  font-family: inherit;
}
.krs-wrap { max-width: 760px; margin: 0 auto; padding: 14px 14px 48px; }
.krs-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 0 12px;
}
.krs-title { font-weight: 800; font-size: 1.05rem; }
.krs-back {
  border: 2px solid rgba(29,42,68,.18); background: #fff; color: var(--kd-ink, #1D2A44);
  border-radius: 99px; padding: 8px 14px; font-weight: 700; cursor: pointer; min-height: 44px;
}
.krs-dots { display: flex; gap: 6px; }
.krs-dot {
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: .8rem; font-weight: 800;
  background: #fff; border: 2px solid rgba(29,42,68,.2); color: #5A6784;
}
.krs-dot.now { background: var(--kd-sun, #FFD166); border-color: #E8A90C; color: #1D2A44; }
.krs-dot.done { background: var(--kd-grass, #8BD17C); border-color: #57A047; color: #10350C; }

.krs-card {
  background: var(--kd-card, #fff); border-radius: 22px; padding: 20px;
  box-shadow: 0 8px 24px rgba(29,42,68,.10); margin-bottom: 14px;
}
.krs-card h2 { margin: 6px 0 10px; font-size: 1.45rem; line-height: 1.2; }
.krs-card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.krs-card h4 { margin: 16px 0 6px; }
.krs-card p { line-height: 1.55; }
.krs-center { text-align: center; }
.krs-hero { text-align: center; }
.krs-leo { font-size: 3rem; line-height: 1; }
.krs-bounce { animation: krsBounce 1.2s ease-in-out infinite alternate; display: inline-block; }
@keyframes krsBounce { from { transform: translateY(0) scale(1); } to { transform: translateY(-8px) scale(1.06); } }

.krs-btn {
  appearance: none; border: 2px solid rgba(29,42,68,.18); background: #fff;
  color: var(--kd-ink, #1D2A44); border-radius: 99px; padding: 12px 20px;
  font-weight: 800; font-size: 1rem; cursor: pointer; min-height: 52px;
}
.krs-btn:active { transform: translateY(1px); }
.krs-primary {
  background: var(--kd-sun, #FFD166); border-color: #E8A90C; color: #231a00;
  box-shadow: 0 4px 0 #E8A90C;
}
.krs-primary:active { box-shadow: 0 1px 0 #E8A90C; }
.krs-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.krs-hero .krs-row, .krs-center .krs-row { justify-content: center; }
.krs-note { color: #5A6784; font-size: .9rem; }
.krs-done-note { color: #2F7D24; font-weight: 700; }
.krs-fire { font-weight: 800; }

.krs-word-card { text-align: center; padding: 10px 0 2px; }
.krs-word { font-size: 2rem; font-weight: 900; letter-spacing: .01em; }
.krs-speaker {
  border: none; background: var(--kd-sky, #BDE0FE); border-radius: 50%;
  width: 48px; height: 48px; font-size: 1.3rem; cursor: pointer; vertical-align: middle;
}
.krs-word-def, .krs-word-sent { text-align: left; max-width: 520px; margin: 10px auto 0; }
.krs-word-card .krs-row { justify-content: center; }

.krs-read-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.krs-read-title { font-weight: 800; }
.krs-read-prog { flex: 1; height: 10px; background: rgba(29,42,68,.10); border-radius: 99px; overflow: hidden; }
.krs-read-bar { display: block; height: 100%; background: var(--kd-grass, #8BD17C); transition: width .25s ease; }
.krs-passage { font-size: 1.28rem; line-height: 2; letter-spacing: .01em; }
.krs-w { border-radius: 6px; padding: 1px 2px; transition: background .15s ease; }
.krs-w.read { background: #D9F5CE; }
.krs-w.soft { text-decoration: underline dotted #E8A90C 3px; text-underline-offset: 5px; }
.krs-read-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.krs-read-status { font-weight: 700; color: #2F7D24; }

.krs-q-type { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a6d00; }
.krs-q-text { font-size: 1.15rem; font-weight: 700; line-height: 1.5; }
.krs-choices { display: grid; gap: 10px; margin-top: 8px; }
.krs-choice {
  text-align: left; border: 2px solid rgba(29,42,68,.18); background: #fff;
  border-radius: 16px; padding: 14px 16px; font-size: 1.05rem; font-weight: 600;
  cursor: pointer; min-height: 52px; color: var(--kd-ink, #1D2A44);
}
.krs-choice.right { background: #D9F5CE; border-color: #57A047; }
.krs-choice.try { background: #FFF1D6; border-color: #E8A90C; opacity: .75; }
.krs-feedback { min-height: 1.4em; font-weight: 600; line-height: 1.5; }
.krs-input {
  width: 100%; box-sizing: border-box; border: 2px solid rgba(29,42,68,.2);
  border-radius: 14px; padding: 12px; font-size: 1.05rem; font-family: inherit;
  background: #FFFDF5; color: var(--kd-ink, #1D2A44);
}
.krs-example {
  background: #FFF7E0; border: 2px dashed #E8A90C; border-radius: 14px;
  padding: 12px 14px; margin: 10px 0; line-height: 1.55;
}

.krs-result { border: 3px solid var(--kd-grass, #8BD17C); }
.krs-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.krs-stat {
  background: #F5FAFF; border: 2px solid rgba(29,42,68,.08); border-radius: 16px;
  padding: 12px 6px; text-align: center;
}
.krs-stat b { display: block; font-size: 1.3rem; }
.krs-stat span { font-size: .78rem; color: #5A6784; font-weight: 600; }
@media (max-width: 560px) { .krs-stats { grid-template-columns: repeat(2, 1fr); } }
.krs-level-note { background: #FFF7E0; border-radius: 14px; padding: 12px; }
.krs-feedback-line { font-size: 1.08rem; }

.krs-wordlist { display: grid; gap: 8px; }
.krs-worditem {
  display: grid; gap: 2px; background: #F5FAFF; border-radius: 12px; padding: 10px 12px;
}
.krs-worditem span { color: #41506e; }
.krs-badges { line-height: 2; font-size: 1.05rem; padding-left: 20px; }

.krs-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin: 8px 0 4px; }
.krs-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.krs-bar span { display: block; width: 70%; background: var(--kd-sky, #BDE0FE); border-radius: 8px 8px 0 0; min-height: 6px; }
.krs-bar small { font-size: .68rem; color: #5A6784; }

.krs-cert { text-align: center; border: 4px double #E8A90C; padding: 34px 22px; }
.krs-cert-name { font-size: 2rem; font-weight: 900; margin: 6px 0; }
.krs-cert-date { color: #5A6784; }

.krs-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  background: #1D2A44; color: #fff; padding: 12px 18px; border-radius: 99px;
  font-weight: 700; z-index: 2000; box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

@media print {
  body.krs-printing * { visibility: hidden; }
  body.krs-printing #krsCert, body.krs-printing #krsCert * { visibility: visible; }
  body.krs-printing #krsCert { position: absolute; top: 0; left: 0; right: 0; box-shadow: none; }
}
