:root {
  --blue: #60a5fa;
  --blue-600: #2563eb;
  --purple: #a855f7;
  --purple-600: #7c3aed;
  --green: #22c55e;
  --orange: #fb923c;
  --yellow: #eab308;
  --red: #ef4444;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --page: #f8fafc;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Fredoka", "Trebuchet MS", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.kids-gradient { background: linear-gradient(135deg, #60a5fa 0%, #c084fc 100%); }
.app-header { position: sticky; top: 0; z-index: 50; color: #fff; box-shadow: 0 12px 28px rgba(37, 99, 235, .18); }
.app-header-inner { max-width: 1180px; margin: 0 auto; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 800; letter-spacing: 0; }
.brand-mark { width: 52px; height: 52px; border-radius: 999px; background: #fff; color: var(--blue); display: grid; place-items: center; box-shadow: inset 0 2px 6px rgba(0,0,0,.08); }
.nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button { border: 0; cursor: pointer; padding: 11px 18px; border-radius: 999px; color: #fff; background: rgba(255,255,255,.14); display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
.nav a.is-active, .nav button.is-active { background: #fff; color: var(--purple-600); }
.page { max-width: 1060px; margin: 0 auto; padding: 28px 20px 72px; }
.grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.card { background: var(--paper); border: 4px solid #eff6ff; border-radius: 32px; box-shadow: 0 16px 28px -14px rgba(15,23,42,.22); }
.card.pad { padding: 30px; }
.card h1, .card h2, .card h3 { margin-top: 0; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label, .label { color: #64748b; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; font-weight: 800; }
.field input, .field select, .field textarea {
  width: 100%; border: 2px solid #eef2f7; border-radius: 18px; padding: 14px 16px; background: #fff; color: var(--ink); outline: none; transition: border .15s, box-shadow .15s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 4px rgba(96,165,250,.14); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card { border: 2px solid #eef2f7; color: #94a3b8; background: #fff; border-radius: 18px; padding: 14px; font-weight: 800; cursor: pointer; text-align: center; }
.radio-card input { display: none; }
.radio-card:has(input:checked) { border-color: #60a5fa; color: var(--blue-600); background: #eff6ff; box-shadow: 0 8px 16px rgba(37,99,235,.08); }
.custom-box { grid-column: 1 / -1; background: #faf5ff; border: 2px solid #f3e8ff; border-radius: 26px; padding: 22px; }
.btn { border: 0; border-radius: 22px; padding: 14px 20px; cursor: pointer; display: inline-flex; gap: 10px; align-items: center; justify-content: center; font-weight: 900; transition: transform .12s, opacity .12s; }
.btn:active { transform: scale(.98); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #60a5fa, #c084fc); box-shadow: 0 14px 30px rgba(96,165,250,.25); }
.btn-blue { color: #fff; background: var(--blue-600); }
.btn-green { color: #fff; background: var(--green); }
.btn-light { color: #475569; background: #f8fafc; border: 1px solid #e2e8f0; }
.submit-wide { width: 100%; padding: 18px; font-size: 20px; border-radius: 30px; }
.feature-panel { background: #2563eb; color: #fff; border-radius: 32px; padding: 30px; box-shadow: 0 18px 34px rgba(37,99,235,.24); }
.feature-panel p { color: rgba(255,255,255,.9); font-weight: 600; }
.plan-list { background: #fff; border: 2px solid #dbeafe; border-radius: 32px; padding: 30px; }
.plan-list h3 { color: var(--blue-600); text-align: center; text-transform: uppercase; letter-spacing: .02em; }
.plan-list li { margin: 10px 0; color: #475569; font-weight: 700; }
.flash { padding: 14px 16px; border-radius: 20px; margin-bottom: 16px; font-weight: 800; }
.flash.error { background: #fef2f2; color: #dc2626; border: 2px solid #fee2e2; }
.flash.message { background: #ecfdf5; color: #047857; border: 2px solid #d1fae5; }
.status-wrap { display: grid; place-items: center; min-height: 520px; text-align: center; }
.spinner { width: 96px; height: 96px; border-radius: 999px; border: 10px solid #dbeafe; border-top-color: #60a5fa; animation: spin 1s linear infinite; margin: 0 auto 24px; }
@keyframes spin { to { transform: rotate(360deg); } }
.toolbar { position: sticky; top: 104px; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; margin-bottom: 18px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border: 1px solid #dbeafe; border-radius: 28px; box-shadow: 0 12px 24px rgba(15,23,42,.08); }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.package-card { background: #fff; border-radius: 42px; overflow: hidden; border: 2px solid #dbeafe; box-shadow: 0 16px 28px -14px rgba(15,23,42,.22); margin-bottom: 30px; }
.package-head { padding: 28px 34px; color: #fff; display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.package-head h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; margin: 0 0 6px; }
.package-head h2 { font-size: 32px; margin: 0; }
.package-body { padding: 34px; }
.story-text { font-size: 19px; line-height: 1.75; color: #334155; white-space: pre-line; }
.hero-quote { border-left: 8px solid #bfdbfe; background: #eff6ff; border-radius: 0 22px 22px 0; padding: 18px 22px; font-size: 24px; color: #2563eb; font-weight: 900; }
.exercise-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.exercise { border: 2px solid #f1f5f9; border-radius: 28px; padding: 18px; display: grid; grid-template-columns: 150px 1fr; gap: 16px; position: relative; }
.exercise img { width: 150px; height: 150px; object-fit: contain; border-radius: 24px; background: #f8fafc; }
.exercise h4 { margin: 0 0 6px; font-size: 20px; }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: #f3e8ff; color: var(--purple-600); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tip { text-align: center; border: 2px solid #ffedd5; border-radius: 28px; padding: 22px; color: #475569; font-weight: 700; }
.planner { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: #fff; border: 2px dashed #bfdbfe; border-radius: 22px; padding: 14px 10px; min-height: 160px; text-align: center; }
.day strong { display: block; color: #2563eb; margin-bottom: 10px; }
.reward-box { text-align: center; border: 6px solid #fff; border-radius: 42px; padding: 34px; color: #fff; background: linear-gradient(135deg, #ef4444, #fb923c, #eab308); box-shadow: 0 18px 36px rgba(239,68,68,.2); }
.reward-box img, .sticker img, .coloring img { max-width: 320px; width: 100%; object-fit: contain; border-radius: 30px; background: #fff; }
.sticker { text-align: center; border: 4px dashed #fde68a; border-radius: 42px; padding: 30px; }
.coloring { text-align: center; border: 4px dashed #e2e8f0; border-radius: 36px; padding: 24px; margin-top: 22px; }
.history-list { display: grid; gap: 18px; }
.history-item { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 24px; }
.muted { color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { border-bottom: 1px solid #e2e8f0; padding: 10px; text-align: left; vertical-align: top; }
.admin-table th { color: #64748b; text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.prompt-form textarea { min-height: 160px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.footer { padding: 28px; text-align: center; color: #94a3b8; border-top: 1px solid #e2e8f0; background: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 880px) {
  .grid-two, .admin-grid, .exercise-grid, .tips { grid-template-columns: 1fr; }
  .exercise { grid-template-columns: 1fr; }
  .exercise img { width: 100%; height: auto; aspect-ratio: 1; }
  .planner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-header-inner, .toolbar, .history-item { align-items: stretch; flex-direction: column; }
  .brand { font-size: 24px; }
}
@media print {
  .no-print, .app-header, .footer { display: none !important; }
  body { background: white; }
  .page { max-width: none; padding: 0; }
  .package-card { box-shadow: none; border-radius: 0; page-break-after: always; border: 2px solid #e2e8f0; }
  .package-card:last-child { page-break-after: auto; }
  .package-head, .kids-gradient, .reward-box { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
