:root {
  color-scheme: light;
  --ink: #17352f;
  --muted: #64766f;
  --paper: #fffdf7;
  --surface: #ffffff;
  --green: #356859;
  --green-dark: #214b40;
  --mint: #dff1e8;
  --yellow: #ffd369;
  --orange: #ef8f62;
  --line: #dce6df;
  font-family: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.child-shell, .admin-shell { width: min(1180px, 100%); margin: 0 auto; padding: 28px; }
.topbar, .admin-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.eyebrow { margin: 0 0 6px; color: var(--green); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 800; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(28px, 4vw, 48px); line-height: 1.08; }
.step-pill { flex: none; background: var(--mint); color: var(--green-dark); border-radius: 999px; padding: 12px 18px; font-weight: 800; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: 0 14px 38px rgba(25, 60, 50, .08); }
.reading-card { min-height: 320px; padding: clamp(24px, 4vw, 48px); display: grid; align-content: center; }
.instruction { color: var(--muted); font-size: clamp(18px, 2.2vw, 25px); font-weight: 700; }
.lesson-text { white-space: pre-wrap; font-size: clamp(31px, 5.2vw, 61px); line-height: 1.55; font-weight: 700; letter-spacing: .01em; overflow-wrap: anywhere; }
.lesson-text.compact { font-size: clamp(25px, 3vw, 38px); }
.question-text { font-size: clamp(34px, 5vw, 56px); line-height: 1.25; font-weight: 800; }
.coach-card { margin: 18px 0; padding: 18px 22px; display: flex; gap: 17px; align-items: center; background: var(--mint); border-radius: 22px; }
.coach-face { width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: var(--yellow); display: grid; place-items: center; font-size: 29px; }
.coach-label { margin: 0 0 3px; color: var(--green); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.coach-message { margin: 0; font-size: clamp(18px, 2.2vw, 24px); font-weight: 700; }
.controls { min-height: 86px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.primary-button, .secondary-button, .secondary-link { border-radius: 18px; padding: 16px 24px; border: 0; font-weight: 800; cursor: pointer; text-decoration: none; text-align: center; }
.primary-button { background: var(--green); color: white; box-shadow: 0 8px 0 var(--green-dark); font-size: 21px; }
.primary-button:active { transform: translateY(4px); box-shadow: 0 4px 0 var(--green-dark); }
.primary-button:disabled { opacity: .5; cursor: wait; }
.secondary-button, .secondary-link { background: var(--mint); color: var(--green-dark); }
.button-link { display: inline-block; }
.mic-status { display: flex; align-items: center; gap: 12px; color: #a64132; font-size: 22px; font-weight: 800; }
.pulse { width: 20px; height: 20px; border-radius: 50%; background: #e95848; animation: pulse 1.1s infinite; }
@keyframes pulse { 50% { transform: scale(.72); opacity: .5; } }
.hidden { display: none !important; }
footer { display: flex; justify-content: center; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
footer a { color: var(--muted); font-weight: 700; }

.admin-body { background: #f3f7f4; }
.admin-shell { padding-top: 42px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 22px; }
.editor-card, .preview-card, .download-card { padding: 28px; }
label { display: grid; gap: 8px; margin-bottom: 18px; font-weight: 800; }
input, textarea { width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; color: var(--ink); }
textarea { resize: vertical; min-height: 250px; line-height: 1.5; }
input:focus, textarea:focus { outline: 3px solid rgba(53, 104, 89, .2); border-color: var(--green); }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.form-status { min-height: 24px; margin: 18px 0 0; font-weight: 800; color: var(--green); }
.download-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 22px; }

@media (max-width: 760px) {
  .child-shell, .admin-shell { padding: 16px; }
  .topbar, .admin-header, .download-card { align-items: flex-start; flex-direction: column; }
  .admin-grid { grid-template-columns: 1fr; }
  .reading-card { min-height: 280px; }
  .primary-button, .secondary-button { width: 100%; }
}

