/* ═══════════════════════════════════════════════════════════════════════════
   kids.css — the playful layer of the maths site (young pupils).
   Loaded AFTER style.css / student-modern.css. Fonts are self-hosted
   (static/fonts, SIL Open Font License) so nothing depends on Google Fonts.
   Everything pupil-facing is scoped to body.student-ui or .kids-page; the
   admin keeps its own look (only the fonts are shared).
   ═══════════════════════════════════════════════════════════════════════════ */
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/baloo-2-latin-ext-500-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/baloo-2-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/baloo-2-latin-ext-600-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/baloo-2-latin-600-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/baloo-2-latin-ext-700-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/baloo-2-latin-700-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:800;font-display:swap;src:url('../fonts/baloo-2-latin-ext-800-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Baloo 2';font-style:normal;font-weight:800;font-display:swap;src:url('../fonts/baloo-2-latin-800-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Nunito';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/nunito-latin-ext-400-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Nunito';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/nunito-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Nunito';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/nunito-latin-ext-600-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Nunito';font-style:normal;font-weight:600;font-display:swap;src:url('../fonts/nunito-latin-600-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Nunito';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/nunito-latin-ext-700-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Nunito';font-style:normal;font-weight:700;font-display:swap;src:url('../fonts/nunito-latin-700-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800;font-display:swap;src:url('../fonts/nunito-latin-ext-800-normal.woff2') format('woff2');unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800;font-display:swap;src:url('../fonts/nunito-latin-800-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;}

:root{
  --k-ink:#22304F; --k-muted:#5B6B8C;
  --k-sun:#FFD93D; --k-orange:#FF9F43; --k-coral:#FF6B6B; --k-pink:#FF7EB6;
  --k-purple:#9B7BFF; --k-blue:#4F8CFF; --k-sky:#38BDF8; --k-teal:#2DD4BF; --k-green:#34D399;
  --k-bg:#FFF9EC; --k-card:#FFFFFF;
  --k-radius:24px; --k-radius-sm:16px;
  --k-shadow:0 6px 0 rgba(34,48,79,.10), 0 14px 28px rgba(34,48,79,.08);
  --k-font-head:'Baloo 2','Nunito','Trebuchet MS',system-ui,sans-serif;
  --k-font-body:'Nunito','Trebuchet MS',system-ui,sans-serif;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
body.student-ui, body.kids-page{
  font-family:var(--k-font-body); color:var(--k-ink); font-size:1.06rem;
  background-color:var(--k-bg);
  background-image:
    radial-gradient(circle at 12px 12px, rgba(255,159,67,.13) 2.5px, transparent 3px),
    radial-gradient(circle at 42px 42px, rgba(79,140,255,.11) 2.5px, transparent 3px);
  background-size:60px 60px;
}
body.admin-ui{ font-family:var(--k-font-body); }
body.student-ui h1,body.student-ui h2,body.student-ui h3,body.student-ui h4,body.student-ui h5,body.student-ui h6,
body.kids-page h1,body.kids-page h2,body.kids-page h3,body.kids-page h4,body.kids-page h5,
body.student-ui .fw-bold, body.student-ui .btn, body.kids-page .btn, .k-head{
  font-family:var(--k-font-head); letter-spacing:.1px;
}
body.student-ui h4{ font-size:1.7rem; }
body.student-ui main > .container, body.student-ui main > .container-fluid, body.student-ui main.container, body.student-ui main.container-fluid{ max-width:1180px; margin-inline:auto; }

/* ── Navbar: sunny, rounded, big targets ─────────────────────────────────── */
body.student-ui .navbar{
  background:linear-gradient(90deg,#6C63FF 0%,#4F8CFF 55%,#38BDF8 100%) !important;
  border-bottom:0 !important; box-shadow:0 6px 0 rgba(34,48,79,.12);
  border-radius:0 0 26px 26px; padding-top:.55rem; padding-bottom:.55rem;
}
body.student-ui .navbar .navbar-brand{ font-family:var(--k-font-head); font-weight:800; font-size:1.25rem; }
body.student-ui .navbar .nav-link{
  font-family:var(--k-font-head); font-weight:700; font-size:1.05rem; color:#fff !important;
  border-radius:999px; padding:.45rem .95rem !important; opacity:.95;
}
body.student-ui .navbar .nav-link:hover{ background:rgba(255,255,255,.18); }
body.student-ui .navbar .nav-link.active{ background:#fff !important; color:#4F46E5 !important; box-shadow:0 3px 0 rgba(34,48,79,.18); }
body.student-ui .dropdown-menu{ border:0; border-radius:20px; box-shadow:var(--k-shadow); padding:.6rem; }
body.student-ui .dropdown-item{ border-radius:12px; padding:.55rem .8rem; font-weight:700; }

/* ── Kid banner (replaces the big picture banner) ─────────────────────────── */
.k-banner{
  position:relative; overflow:hidden; margin:14px auto 0; width:calc(100% - 24px); max-width:1156px;
  border-radius:28px; padding:18px 22px; color:#fff;
  background:linear-gradient(120deg,#FF8A5B 0%,#FF5E7E 45%,#9B7BFF 100%);
  box-shadow:var(--k-shadow); display:flex; align-items:center; gap:16px;
}
.k-banner__mascot{ font-size:3rem; line-height:1; filter:drop-shadow(0 4px 0 rgba(0,0,0,.12)); animation:k-bob 3s ease-in-out infinite; }
.k-banner__title{ font-family:var(--k-font-head); font-weight:800; font-size:clamp(1.25rem,3.2vw,2rem); line-height:1.1; margin:0; }
.k-banner__sub{ font-weight:700; opacity:.95; margin:2px 0 0; font-size:clamp(.9rem,2vw,1.05rem); }
.k-banner__grade{ margin-inline-start:auto; background:rgba(255,255,255,.22); border:2px solid rgba(255,255,255,.55);
  border-radius:999px; padding:.35rem .95rem; font-family:var(--k-font-head); font-weight:700; white-space:nowrap; }
.k-banner__deco{ position:absolute; font-family:var(--k-font-head); font-weight:800; color:rgba(255,255,255,.22); user-select:none; pointer-events:none; }
.k-banner img.k-banner__img{ width:100%; border-radius:20px; display:block; }
@keyframes k-bob{ 0%,100%{transform:translateY(0) rotate(-4deg);} 50%{transform:translateY(-6px) rotate(4deg);} }
@media (max-width:575px){ .k-banner{ margin:10px 10px 0; padding:14px 16px; border-radius:22px; } .k-banner__grade{ display:none; } .k-banner__mascot{ font-size:2.4rem; } }
@media (prefers-reduced-motion:reduce){ .k-banner__mascot{ animation:none; } }

/* ── Cards & buttons ──────────────────────────────────────────────────────── */
body.student-ui .card{ border:0 !important; border-radius:var(--k-radius) !important; box-shadow:var(--k-shadow) !important; }
body.student-ui .card-header{ border-radius:var(--k-radius) var(--k-radius) 0 0 !important; border-bottom:0; font-family:var(--k-font-head); }
body.student-ui .btn, body.kids-page .btn{ border-radius:999px; font-weight:700; padding:.55rem 1.15rem; border-width:2px; }
body.student-ui .btn-sm{ padding:.4rem .9rem; font-size:.95rem; }
body.student-ui .btn-primary, body.kids-page .btn-primary{ background:var(--k-blue); border-color:var(--k-blue); box-shadow:0 4px 0 #2F6BE0; }
body.student-ui .btn-success, body.kids-page .btn-success{ background:#22C58B; border-color:#22C58B; box-shadow:0 4px 0 #159A6B; }
body.student-ui .btn-warning{ background:var(--k-orange); border-color:var(--k-orange); color:#fff; box-shadow:0 4px 0 #E07F22; }
body.student-ui .btn-danger{ box-shadow:0 4px 0 #B42335; }
body.student-ui .btn:active, body.kids-page .btn:active{ transform:translateY(3px); box-shadow:none; }
body.student-ui .form-control, body.student-ui .form-select, body.kids-page .form-control{
  border-radius:16px; border:2px solid #E3E8F5; padding:.65rem 1rem; font-size:1.05rem; }
body.student-ui .form-control:focus, body.kids-page .form-control:focus{ border-color:var(--k-blue); box-shadow:0 0 0 4px rgba(79,140,255,.18); }
body.student-ui .input-group .form-control{ border-radius:0; }
body.student-ui .input-group > :first-child{ border-radius:16px 0 0 16px; border:2px solid #E3E8F5; border-right:0; }
body.student-ui .input-group > :last-child{ border-radius:0 16px 16px 0; }
body.student-ui .badge{ border-radius:999px; font-weight:700; }
body.student-ui .progress{ border-radius:999px; height:12px !important; background:rgba(34,48,79,.10) !important; }
body.student-ui .progress-bar{ border-radius:999px; }

/* ── Page title strip ─────────────────────────────────────────────────────── */
.k-title{ display:flex; align-items:center; gap:.7rem; margin:0 0 1rem; }
.k-title__emoji{ width:54px; height:54px; border-radius:18px; display:grid; place-items:center; font-size:1.8rem;
  background:#fff; box-shadow:var(--k-shadow); flex:0 0 auto; }
.k-title h4{ margin:0; font-weight:800; }
.k-title small{ display:block; color:var(--k-muted); font-family:var(--k-font-body); font-weight:700; font-size:.95rem; }

/* ── Dashboard tiles ──────────────────────────────────────────────────────── */
.k-hello{ display:flex; align-items:center; gap:14px; background:#fff; border-radius:var(--k-radius); padding:16px 20px; box-shadow:var(--k-shadow); margin-bottom:18px; }
.k-hello__avatar{ width:64px; height:64px; border-radius:50%; display:grid; place-items:center; font-size:2rem;
  background:linear-gradient(135deg,var(--k-sun),var(--k-orange)); box-shadow:0 4px 0 rgba(34,48,79,.12); flex:0 0 auto; }
.k-hello h2{ font-size:clamp(1.3rem,3.4vw,1.9rem); font-weight:800; margin:0; }
.k-hello p{ margin:0; color:var(--k-muted); font-weight:700; }
.k-tiles{ display:grid; gap:16px; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); margin-bottom:26px; }
.k-tile{ position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px;
  min-height:150px; padding:16px 10px; border:0; width:100%; text-decoration:none !important; color:#fff !important;
  border-radius:28px; background:var(--tile-bg,var(--k-blue)); box-shadow:0 7px 0 var(--tile-sh,rgba(34,48,79,.22)), 0 16px 26px rgba(34,48,79,.12);
  transition:transform .15s ease, box-shadow .15s ease; font-family:var(--k-font-head); }
.k-tile:hover, .k-tile:focus-visible{ transform:translateY(-5px) rotate(-1.2deg); }
.k-tile:active{ transform:translateY(4px); box-shadow:0 2px 0 var(--tile-sh,rgba(34,48,79,.22)); }
.k-tile__emoji{ font-size:3.2rem; line-height:1; filter:drop-shadow(0 4px 0 rgba(0,0,0,.14)); }
.k-tile__label{ font-weight:800; font-size:1.2rem; text-align:center; line-height:1.1; text-shadow:0 2px 0 rgba(0,0,0,.12); }
.k-tile--off{ filter:grayscale(1); opacity:.5; cursor:pointer; }
.k-tile .tile-badge{ position:absolute; top:-8px; inset-inline-end:-6px; min-width:34px; height:34px; padding:0 8px; display:grid; place-items:center;
  background:#FF3B5C; color:#fff; font-weight:800; font-size:1.05rem; border-radius:999px; border:3px solid #fff; box-shadow:0 3px 8px rgba(0,0,0,.25); }
.k-tile.tile-nudge{ animation:k-hop 1.6s ease-in-out infinite; }
@keyframes k-hop{ 0%,58%,100%{transform:translateY(0);} 64%{transform:translateY(-10px);} 72%{transform:translateY(0);} 78%{transform:translateY(-5px);} 85%{transform:translateY(0);} }
#dashTileGrid.hide-off .tile-off-col{ display:none; }
@media (max-width:575px){ .k-tiles{ grid-template-columns:repeat(2,1fr); gap:12px; } .k-tile{ min-height:128px; border-radius:24px; } .k-tile__emoji{ font-size:2.7rem; } .k-tile__label{ font-size:1.05rem; } }
@media (prefers-reduced-motion:reduce){ .k-tile, .k-tile.tile-nudge{ transition:none; animation:none; } }

/* ── Chapter cards (exercices, devoirs, évaluation) ───────────────────────── */
.k-chapters{ display:grid; gap:18px; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); }
.k-chapter{ position:relative; display:flex; flex-direction:column; text-decoration:none !important; color:#fff !important;
  border-radius:28px; padding:18px 18px 16px; min-height:215px; background:var(--ch-bg,var(--k-blue));
  box-shadow:0 7px 0 rgba(34,48,79,.18), 0 16px 26px rgba(34,48,79,.12); transition:transform .15s ease; overflow:hidden; }
a.k-chapter:hover{ transform:translateY(-5px) rotate(-.8deg); }
.k-chapter__top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.k-chapter__num{ background:rgba(255,255,255,.28); border-radius:999px; padding:.2rem .8rem; font-family:var(--k-font-head); font-weight:800; font-size:.95rem; }
.k-chapter__icon{ width:86px; height:86px; flex:0 0 auto; filter:drop-shadow(0 5px 0 rgba(0,0,0,.14)); }
.k-chapter__title{ font-family:var(--k-font-head); font-weight:800; font-size:1.35rem; line-height:1.15; margin:10px 0 8px; text-shadow:0 2px 0 rgba(0,0,0,.10); }
.k-chapter__meta{ display:flex; flex-wrap:wrap; gap:6px; margin-top:auto; }
.k-pill{ background:rgba(255,255,255,.26); border-radius:999px; padding:.18rem .7rem; font-weight:800; font-size:.88rem; white-space:nowrap; }
.k-chapter__bar{ height:12px; border-radius:999px; background:rgba(255,255,255,.30); overflow:hidden; margin-top:10px; }
.k-chapter__bar > span{ display:block; height:100%; border-radius:999px; background:#fff; }
.k-chapter__stars{ margin-top:6px; font-size:.9rem; font-weight:800; }
.k-chapter--soon{ filter:grayscale(.85); opacity:.6; cursor:not-allowed; }
.k-chapter--locked::after{ content:'🔒'; position:absolute; bottom:12px; inset-inline-end:14px; font-size:1.5rem; }

/* ── Lessons list inside a chapter ────────────────────────────────────────── */
body.student-ui .lesson-code, body.student-ui code.lesson-code, body.student-ui .k-hide-code{ display:none !important; }

/* ── Quiz: big friendly answer buttons (A blue · B orange · C green · D pink) ─ */
body.student-ui .btn-check + label.btn,
body.student-ui .consulter-ans-btn{
  min-width:74px !important; min-height:58px; font-family:var(--k-font-head); font-weight:800; font-size:1.45rem;
  border-radius:20px !important; border:3px solid var(--ans,#4F8CFF) !important; color:var(--ans,#4F8CFF) !important;
  background:#fff !important; box-shadow:0 5px 0 var(--ans,#4F8CFF); margin:4px 5px 9px; text-transform:uppercase;
  display:inline-flex; align-items:center; justify-content:center; transition:transform .1s ease;
}
body.student-ui .btn-check + label.btn:nth-of-type(4n+1), body.student-ui .consulter-ans-btn:nth-of-type(4n+1){ --ans:#4F8CFF; }
body.student-ui .btn-check + label.btn:nth-of-type(4n+2), body.student-ui .consulter-ans-btn:nth-of-type(4n+2){ --ans:#FF9F43; }
body.student-ui .btn-check + label.btn:nth-of-type(4n+3), body.student-ui .consulter-ans-btn:nth-of-type(4n+3){ --ans:#22C58B; }
body.student-ui .btn-check + label.btn:nth-of-type(4n+4), body.student-ui .consulter-ans-btn:nth-of-type(4n+4){ --ans:#FF6B9A; }
body.student-ui .btn-check:checked + label.btn{ background:var(--ans) !important; color:#fff !important; transform:translateY(3px); box-shadow:0 2px 0 rgba(34,48,79,.25); }
body.student-ui .consulter-ans-btn.is-correct, body.student-ui .consulter-ans-btn.is-correct-reveal{ --ans:#22C58B; background:#22C58B !important; color:#fff !important; }
body.student-ui .consulter-ans-btn.is-wrong{ --ans:#FF5C5C; background:#FF5C5C !important; color:#fff !important; }
body.student-ui .consulter-ans-btn:disabled{ opacity:.75; }

/* French-only site: the in-page FR / AR switches of the quiz pages are useless */
body.fr-only button[onclick*="Lang('ar')"], body.fr-only button[onclick*="Lang('fr')"],
body.fr-only .lang-toggle-btn, body.fr-only #rBtnAr, body.fr-only #rBtnFr,
body.fr-only #hwBtnAr, body.fr-only #hwBtnFr, body.fr-only #hwRBtnAr, body.fr-only #hwRBtnFr{ display:none !important; }

/* Lesson codes (P4-CH2-L3) mean nothing to a child */
body.student-ui .cd-lesson-code{ display:none !important; }

/* ── Mobile bottom nav ────────────────────────────────────────────────────── */
body.student-ui .mobile-nav, body.student-ui .mobile-bottom-nav{ border-radius:22px 22px 0 0; }
body.student-ui .mobile-nav-item{ font-family:var(--k-font-head); font-weight:700; }

/* ── Dark theme keeps working: soften the paper background ───────────────── */
body.student-ui.dark-theme{ background-color:#151B2E; background-image:none; }
body.student-ui.dark-theme .k-hello, body.student-ui.dark-theme .k-title__emoji{ background:#1F2740; color:#fff; }

/* ═══ Standalone pages: login + landing ════════════════════════════════════ */
body.kids-page{ margin:0; min-height:100vh; }
body.kids-page .btn-light{ background:#fff; border-color:#fff; color:var(--k-ink); box-shadow:0 4px 0 rgba(34,48,79,.18); }
body.kids-page .btn-lg{ font-size:1.2rem; padding:.75rem 1.5rem; }

/* login */
body.k-auth{ display:flex; align-items:center; justify-content:center; padding:72px 14px 24px;
  background:linear-gradient(140deg,#6C63FF 0%,#4F8CFF 45%,#38BDF8 100%); position:relative; overflow-x:hidden; }
.k-auth__sky span{ position:fixed; font-family:var(--k-font-head); font-weight:800; font-size:clamp(3rem,9vw,6rem);
  color:rgba(255,255,255,.16); user-select:none; pointer-events:none; animation:k-bob 5s ease-in-out infinite; }
.k-auth__parent{ position:fixed; top:14px; right:14px; z-index:5; }
.k-auth__card{ width:100%; max-width:440px; background:#fff; border-radius:32px; padding:28px 26px 24px; position:relative; z-index:2;
  box-shadow:0 10px 0 rgba(34,48,79,.18), 0 26px 50px rgba(34,48,79,.25); }
.k-auth__logo{ width:96px; height:96px; margin-top:-76px; border-radius:50%; background:#fff; padding:6px; box-shadow:0 6px 0 rgba(34,48,79,.14); }
.k-auth__title{ font-weight:800; font-size:2rem; margin:8px 0 0; color:var(--k-ink); }
.k-auth__sub{ color:var(--k-muted); font-weight:700; margin:0; }
.k-auth__label{ font-family:var(--k-font-head); font-weight:700; margin-bottom:4px; display:block; }
.k-auth__link{ color:var(--k-blue); font-weight:700; text-decoration:none; font-size:.95rem; }
.k-auth__go{ font-size:1.3rem !important; padding:.7rem 1rem !important; }
.k-auth__new{ margin-top:18px; padding-top:16px; border-top:3px dashed #E3E8F5; text-align:center; display:flex; flex-direction:column; gap:8px; align-items:center; font-weight:700; color:var(--k-muted); }

/* landing */
.k-land__nav{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 20px;
  background:linear-gradient(90deg,#6C63FF,#4F8CFF 55%,#38BDF8); border-radius:0 0 26px 26px; box-shadow:0 6px 0 rgba(34,48,79,.12); position:sticky; top:0; z-index:20; }
.k-land__brand{ display:flex; align-items:center; gap:10px; color:#fff !important; text-decoration:none; font-family:var(--k-font-head); font-weight:800; font-size:1.3rem; line-height:1; }
.k-land__brand img{ width:46px; height:46px; }
.k-land__brand small{ display:block; font-family:var(--k-font-body); font-weight:700; font-size:.8rem; opacity:.9; margin-top:3px; }
.k-land__hero{ position:relative; overflow:hidden; text-align:center; color:#fff; padding:56px 18px 64px; margin:18px auto 0; width:calc(100% - 24px); max-width:1156px;
  border-radius:36px; background:linear-gradient(135deg,#FF8A5B 0%,#FF5E7E 48%,#9B7BFF 100%); box-shadow:var(--k-shadow); }
.k-land__hero-in{ position:relative; z-index:2; max-width:720px; margin:0 auto; }
.k-land__mascot{ font-size:5rem; line-height:1; animation:k-bob 3s ease-in-out infinite; filter:drop-shadow(0 6px 0 rgba(0,0,0,.14)); }
.k-land__hero h1{ font-weight:800; font-size:clamp(2.1rem,6vw,3.6rem); line-height:1.05; margin:10px 0 12px; text-shadow:0 3px 0 rgba(0,0,0,.12); }
.k-land__hero h1 span{ color:var(--k-sun); }
.k-land__hero p{ font-size:clamp(1.05rem,2.4vw,1.3rem); font-weight:700; margin-bottom:22px; }
.k-land__hero small{ display:block; margin-top:14px; font-weight:700; opacity:.95; }
.k-land__cta{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.k-land__float{ position:absolute; font-family:var(--k-font-head); font-weight:800; font-size:clamp(3rem,8vw,6rem); color:rgba(255,255,255,.2); animation:k-bob 5s ease-in-out infinite; user-select:none; }
.k-land__section{ max-width:1156px; margin:0 auto; padding:46px 16px 8px; }
.k-land__section--alt{ padding-bottom:20px; }
.k-land__section h2, .k-land__final h2{ text-align:center; font-weight:800; font-size:clamp(1.6rem,4vw,2.3rem); margin-bottom:24px; }
.k-land__grid{ display:grid; gap:18px; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); }
.k-land__card{ background:#fff; border-radius:28px; padding:22px; text-align:center; box-shadow:0 7px 0 var(--c), 0 16px 26px rgba(34,48,79,.10); border:3px solid var(--c); }
.k-land__emoji{ font-size:3.2rem; line-height:1; }
.k-land__card h3, .k-land__step h3, .k-land__parents h3{ font-weight:800; font-size:1.35rem; margin:10px 0 6px; }
.k-land__card p, .k-land__step p, .k-land__parents p{ margin:0; color:var(--k-muted); font-weight:600; }
.k-land__steps{ display:grid; gap:18px; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); }
.k-land__step{ background:#fff; border-radius:28px; padding:22px; text-align:center; box-shadow:var(--k-shadow); }
.k-land__stepnum{ width:58px; height:58px; border-radius:50%; display:inline-grid; place-items:center; color:#fff; font-family:var(--k-font-head); font-weight:800; font-size:1.7rem; box-shadow:0 5px 0 rgba(34,48,79,.18); }
.k-land__parents{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; background:#fff; border-radius:28px; padding:22px 26px; box-shadow:var(--k-shadow); }
.k-land__final{ text-align:center; color:#fff; margin:46px auto 0; padding:42px 18px; width:calc(100% - 24px); max-width:1156px; border-radius:36px;
  background:linear-gradient(135deg,#22C58B,#38BDF8); box-shadow:var(--k-shadow); }
.k-land__footer{ text-align:center; padding:26px 12px 30px; color:var(--k-muted); font-weight:700; }
@media (prefers-reduced-motion:reduce){ .k-land__float, .k-land__mascot, .k-auth__sky span{ animation:none; } }

/* No "video coming soon" placeholders for young pupils: a video shows up
   when there is one, nothing otherwise. */
body.student-ui .video-thumb-soon{ display:none !important; }

/* ── Phone: the scrolling shortcut strip under the navbar ─────────────────── */
body.student-ui .mobile-nav-row{ background:#fff !important; border-bottom:0 !important; padding:8px 8px !important;
  box-shadow:0 5px 0 rgba(34,48,79,.08); border-radius:0 0 22px 22px; gap:6px; }
body.student-ui .mobile-nav-item{ color:var(--k-ink) !important; border-radius:16px !important; font-family:var(--k-font-head); font-weight:700; opacity:1 !important; }
body.student-ui .mobile-nav-item i{ color:var(--k-blue); }
body.student-ui .mobile-nav-item.active{ background:var(--k-blue) !important; color:#fff !important; }
body.student-ui .mobile-nav-item.active i{ color:#fff; }

/* Forgot / reset password + parent portal keep their own layout but get the
   sunny background and the friendly fonts. */
body.kids-auth-legacy{ background:linear-gradient(140deg,#6C63FF 0%,#4F8CFF 45%,#38BDF8 100%) !important; font-family:var(--k-font-body); }
body.kids-auth-legacy h1, body.kids-auth-legacy h2, body.kids-auth-legacy h3, body.kids-auth-legacy h4, body.kids-auth-legacy .btn{ font-family:var(--k-font-head); }
body.kids-auth-legacy .card{ border-radius:28px !important; border:0 !important; }
body.kids-auth-legacy .btn{ border-radius:999px; font-weight:700; }

/* ── Teacher's HTML blocks (admin → Blocs HTML) ───────────────────────────── */
.k-htmlblock{ background:#fff; border-radius:var(--k-radius); box-shadow:var(--k-shadow); padding:10px; margin:0 0 22px; overflow:hidden; }
.k-htmlblock__title{ font-family:var(--k-font-head); font-weight:800; font-size:1.25rem; margin:6px 10px 10px; color:var(--k-ink); }
.k-htmlblock__frame{ display:block; width:100%; border:0; border-radius:18px; background:#fff; transition:height .2s ease; }
body.dark-theme .k-htmlblock{ background:#1F2740; }
body.dark-theme .k-htmlblock__title{ color:#fff; }

/* Sign-up page (student/register.html) */
.k-auth__card--wide{ max-width:520px; }
.k-reg__code{ background:#FFF6D6; border:3px dashed #FFC83D; border-radius:20px; padding:12px 14px; }
.k-reg__req{ font-family:var(--k-font-body,inherit); font-size:.72rem; font-weight:800; text-transform:uppercase;
  letter-spacing:.04em; background:#FF6B6B; color:#fff; border-radius:999px; padding:2px 8px; vertical-align:middle; }
