/* ============================================================
   English Quest — site styles (landing · auth · parent dashboard)
   Mobile-first · WCAG AA contrast · ≥44px touch targets
   ============================================================ */
:root {
  --sky: #EAF4FF;
  --ink: #1E2A46;
  --blue: #3D6FE0;        /* primary — 4.6:1 on white */
  --blue-dark: #2C55B8;
  --sun: #FFB703;
  --coral: #E85D4A;
  --leaf: #2E9E6B;
  --card: #FFFFFF;
  --radius: 20px;
  --shadow: 0 6px 20px rgba(30, 42, 70, .10);
  --display: 'Baloo 2', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--body); color: var(--ink);
  background: var(--sky); line-height: 1.6; font-size: 17px;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.15; }
a { color: var(--blue); }
img { max-width: 100%; }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; gap: 8px; flex-wrap: wrap;
  background: #fff; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 10;
}
.site-header nav { display: flex; gap: 8px; align-items: center; }
.brand {
  font-family: var(--display); font-weight: 800; font-size: 1.3rem;
  color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.brand.center { justify-content: center; width: 100%; margin-bottom: 8px; }
.brand-mark { font-size: 1.5rem; }
.inline-form { display: inline; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  padding: 12px 20px; border-radius: 999px; min-height: 44px;
  transition: transform .1s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-danger { background: #fff; color: var(--coral); border: 2px solid var(--coral); }
.btn-big { font-size: 1.15rem; padding: 16px 28px; }
.btn-full { width: 100%; }

/* ---------- landing ---------- */
.hero {
  display: grid; gap: 28px; padding: 40px 20px; max-width: 1080px; margin: 0 auto;
  align-items: center;
}
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr .9fr; padding: 72px 24px; } }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 12px; }
.lede { font-size: 1.15rem; }
.hero-cta { margin-top: 20px; }
.cta-note { color: #51608a; font-size: .95rem; margin-top: 10px; }

.hero-map { position: relative; min-height: 340px; }
.island {
  position: absolute; background: #fff; border-radius: 18px; box-shadow: var(--shadow);
  padding: 10px 14px; font-size: 1.6rem; display: flex; flex-direction: column; align-items: center;
  animation: float 5s ease-in-out infinite;
}
.island span { font-family: var(--display); font-weight: 700; font-size: .75rem; color: var(--ink); }
.i1 { top: 2%;  left: 6%; }  .i2 { top: 4%;  right: 8%; animation-delay: .6s; }
.i3 { top: 30%; left: 0; animation-delay: 1.2s; } .i4 { top: 32%; right: 0; animation-delay: 1.8s; }
.i5 { top: 58%; left: 12%; animation-delay: .9s; } .i6 { top: 62%; right: 14%; animation-delay: 1.5s; }
.i7 { bottom: 0; left: 38%; animation-delay: .3s; font-size: 2rem; }
@keyframes float { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-10px);} }

.section { max-width: 860px; margin: 0 auto; padding: 48px 20px; }
.section.alt { background: #fff; max-width: none; }
.section.alt > * { max-width: 860px; margin-left: auto; margin-right: auto; }
.section h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.worlds-list li { margin: 10px 0; }
.feature-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.feature { background: var(--sky); border-radius: var(--radius); padding: 18px; }
.f-emoji { font-size: 2rem; }
.feature h3 { margin: 8px 0 4px; }
.checks { list-style: none; padding: 0; }
.checks li { margin: 10px 0; }
.site-footer { text-align: center; padding: 28px 16px; color: #51608a; }

/* ---------- auth pages ---------- */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 24px; width: 100%; max-width: 420px;
}
.auth-card h1 { text-align: center; font-size: 1.6rem; margin: 6px 0 4px; }
label { display: block; font-weight: 700; margin: 14px 0 6px; }
.hint { font-weight: 400; color: #51608a; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  width: 100%; padding: 12px 14px; font-size: 1rem; font-family: var(--body);
  border: 2px solid #C9D8F0; border-radius: 12px; min-height: 48px; background: #fff;
}
input:focus, select:focus, .btn:focus-visible, button:focus-visible {
  outline: 3px solid var(--sun); outline-offset: 2px;
}
form .btn { margin-top: 20px; }
.muted { color: #51608a; }
.center { text-align: center; }
.alert {
  background: #FDE8E4; color: #9C2B1B; border-radius: 12px; padding: 12px 14px; font-weight: 700;
}
.notice {
  background: #E1F5EA; color: #17603E; border-radius: 12px; padding: 12px 14px; font-weight: 700;
}

/* ---------- dashboard ---------- */
.dash-main { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.child-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin: 16px 0;
}
.child-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.child-head h2 { margin: 0; }
.child-avatar { font-size: 2.2rem; }
.pill { background: var(--sky); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .9rem; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.stat {
  background: var(--sky); border-radius: 14px; padding: 10px 14px; min-width: 86px;
  display: flex; flex-direction: column; align-items: center;
}
.stat-n { font-family: var(--display); font-weight: 800; }
.stat-l { font-size: .8rem; color: #51608a; }
.controls { margin-top: 16px; }
.controls summary { cursor: pointer; font-weight: 800; font-family: var(--display); min-height: 44px; display: flex; align-items: center; }
.controls-form { display: grid; gap: 12px; margin-top: 10px; }
@media (min-width: 560px) { .controls-form { grid-template-columns: 1fr 1fr auto; align-items: end; } }
.danger-form { margin-top: 14px; }
.add-card h2 { margin-top: 0; }
.avatar-picker { border: 0; padding: 0; margin: 14px 0 0; }
.avatar-picker legend { font-weight: 700; margin-bottom: 6px; }
.avatar-opt { display: inline-block; margin: 4px; }
.avatar-opt input { position: absolute; opacity: 0; }
.avatar-opt span {
  display: inline-grid; place-items: center; width: 52px; height: 52px; font-size: 1.7rem;
  background: var(--sky); border-radius: 14px; border: 3px solid transparent; cursor: pointer;
}
.avatar-opt input:checked + span { border-color: var(--blue); background: #fff; }
.avatar-opt input:focus-visible + span { outline: 3px solid var(--sun); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
