/* ============================================================
   KID-SIDEBAR — fixed left-rail purple navigation for CHILD-tier
   accounts. Scoped under body.pm-kid-shell.
   Pattern: right-side flyout panels (no vertical dropdowns).
   ============================================================ */

body.pm-kid-shell {
  --pmkid-purple-deep: #4f3eb8;
  --pmkid-purple-bright: #6c5ce7;
  --pmkid-purple-soft: #8b75ff;
  --pmkid-nav-grad: linear-gradient(180deg, #6c5ce7 0%, #8b75ff 100%);
  --pmkid-accent-yellow: #ffd166;
  --pmkid-rail-width: 138px;
  --pmkid-rail-width-mobile: 76px;
  --pmkid-fly-width: 280px;
}

body.pm-kid-shell {
  padding-left: var(--pmkid-rail-width);
}
@media (max-width: 780px) {
  body.pm-kid-shell {
    padding-left: var(--pmkid-rail-width-mobile);
  }
}

/* ---- Rail container ---- */
.pmkid-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--pmkid-rail-width);
  z-index: 90;
  background: var(--pmkid-nav-grad);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible; /* allow flyout to escape the rail */
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.pmkid-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.18), transparent 50%),
    radial-gradient(circle at 80% 95%, rgba(255,255,255,.10), transparent 50%);
  pointer-events: none;
}
@media (max-width: 780px) {
  .pmkid-nav { width: var(--pmkid-rail-width-mobile); padding: 16px 8px; }
}

/* ---- Logo ---- */
.pmkid-nav__logo {
  width: 60px; height: 60px;
  border-radius: 18px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.30);
  display: grid; place-items: center;
  color: #fff;
  margin-bottom: 26px;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 2;
  transition: transform .2s ease;
  cursor: pointer;
  text-decoration: none;
}
.pmkid-nav__logo:hover { transform: scale(1.06) rotate(-3deg); }
.pmkid-nav__logo svg { width: 26px; height: 26px; }
@media (max-width: 780px) {
  .pmkid-nav__logo { width: 48px; height: 48px; margin-bottom: 18px; }
  .pmkid-nav__logo svg { width: 22px; height: 22px; }
}

/* ---- Item list ---- */
.pmkid-nav__items {
  display: flex; flex-direction: column; gap: 4px;
  flex: 1; width: 100%;
  position: relative; z-index: 2;
  list-style: none;
  padding: 0; margin: 0;
  overflow: visible;
}
.pmkid-nav__row {
  position: relative;
  width: 100%;
}

/* ---- Sign-out (EDU8az) ----------------------------------------------------
   Pinned to the bottom of the purple rail. The .pmkid-nav__items flex:1 above
   already pushes this down; margin-top:auto is belt-and-suspenders in case a
   future refactor changes the items' flex behaviour. White-on-translucent so
   it sits gently against the purple gradient without screaming for attention,
   but lifts on hover so an admin piloting the kid account can find it.
   ------------------------------------------------------------------------ */
.pmkid-nav__logout {
  appearance: none;
  margin-top: auto;
  margin-bottom: 4px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font: 700 12px 'Inter', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease,
              color 0.16s ease, transform 0.16s ease;
  position: relative;
  z-index: 2;
}
.pmkid-nav__logout:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}
.pmkid-nav__logout:active {
  transform: scale(0.97);
}
.pmkid-nav__logout:disabled {
  opacity: 0.6;
  cursor: progress;
}
.pmkid-nav__logout svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pmkid-nav__logout__label {
  line-height: 1;
}
/* Mobile rail (≤780px) collapses to icon-only to match the rest of the
   compact rail. Hide the text, show only the icon. */
@media (max-width: 780px) {
  .pmkid-nav__logout {
    padding: 10px 6px;
    border-radius: 12px;
  }
  .pmkid-nav__logout__label {
    display: none;
  }
}

/* ---- Single nav row ---- */
.pmkid-nav__item {
  width: 100%;
  border-radius: 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: rgba(255,255,255,.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  position: relative;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  text-decoration: none;
  font: inherit;
  text-align: center;
}
.pmkid-nav__item:hover { background: rgba(255,255,255,.14); color: #fff; }
.pmkid-nav__item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.pmkid-nav__item.is-active {
  background: #fff;
  color: var(--pmkid-purple-deep);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.pmkid-nav__item.is-active::before {
  content: '';
  position: absolute;
  left: -14px; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 28px;
  border-radius: 0 4px 4px 0;
  background: #fff;
}
.pmkid-nav__item svg { width: 22px; height: 22px; }
.pmkid-nav__item__label {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.005em;
  line-height: 1.25;
  text-align: center;
  max-width: 100%;
}
@media (max-width: 780px) {
  .pmkid-nav__item { padding: 10px 4px 8px; }
  .pmkid-nav__item__label { font-size: 11.5px; }
}

/* ---- Parent row arrow (right edge) ---- */
.pmkid-nav__item__arrow {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: rgba(255,255,255,.55);
  line-height: 1;
  pointer-events: none;
  transition: transform .15s ease, color .15s ease;
}
.pmkid-nav__row--has-fly:hover .pmkid-nav__item__arrow,
.pmkid-nav__row.is-open .pmkid-nav__item__arrow {
  color: #fff;
  transform: translateY(-50%) translateX(2px);
}
.pmkid-nav__item.is-active .pmkid-nav__item__arrow {
  color: var(--pmkid-purple-deep);
}

/* ---- "New work" count badge (Assignments row) -----------------------------
   A small filled pill anchored top-right of the row. Bright rose so it reads
   on BOTH the purple rail AND the white .is-active pill (a white badge would
   vanish when Assignments is the active row). Hidden via the [hidden] attribute
   until kid-sidebar.js paints a >0 count. */
.pmkid-nav__badge {
  position: absolute;
  top: 6px;
  right: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #ff4d6d;
  color: #fff;
  font: 800 11px 'Inter', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.01em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .22), 0 0 0 2px rgba(255, 255, 255, .9);
  z-index: 3;
  pointer-events: none;
}
.pmkid-nav__badge[hidden] { display: none; }
@media (max-width: 780px) {
  .pmkid-nav__badge { top: 4px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; }
}

/* ---- Flyout panel (right side) ---- */
.pmkid-fly {
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  width: var(--pmkid-fly-width);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(76, 52, 156, 0.22), 0 4px 12px rgba(76, 52, 156, 0.10);
  padding: 12px 10px 14px;
  z-index: 110;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  /* NX29 2026-07-05 — pointer-events:none REMOVED from the closed state.
     It flipped off instantly on close while the panel was still visibly
     fading for 150ms — clicks during the fade hit nothing ("I clicked it
     and nothing happened"). visibility transitions with the fade, so
     hit-testing now dies exactly when the panel finishes disappearing. */
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.pmkid-nav__row.is-open .pmkid-fly {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
/* NX29 2026-07-05 — invisible hover bridge across the 8px rail→panel gap.
   Crossing that gap used to fire mouseleave (arming the close timer) with
   nothing under the cursor; slow/diagonal travel killed the panel before
   the click landed. The bridge keeps the cursor "inside" the flyout for
   the whole crossing. (The arrow uses ::before; this uses ::after.) */
.pmkid-fly::after {
  content: '';
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  width: 12px;
}
/* Connector triangle pointing back to the rail. JS sets --pmkid-fly-arrow
   when it shifts a bottom-clamped flyout up, so the arrow keeps pointing at
   the hovered row. */
.pmkid-fly::before {
  content: '';
  position: absolute;
  top: var(--pmkid-fly-arrow, 18px);
  left: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 3px;
  box-shadow: -2px 2px 6px rgba(76,52,156,.08);
}
.pmkid-fly__head {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: var(--pmkid-purple-deep);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 12px 8px;
  border-bottom: 1px solid #ECE9F8;
  margin-bottom: 6px;
}
.pmkid-fly__items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pmkid-fly__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #1D1D1F;
  transition: background .12s ease, color .12s ease, transform .12s ease;
}
.pmkid-fly__item:hover {
  background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
  color: var(--pmkid-purple-deep);
  transform: translateX(2px);
}
.pmkid-fly__item.is-active {
  background: linear-gradient(135deg, #6c5ce7 0%, #8b75ff 100%);
  color: #fff;
}
.pmkid-fly__item.is-active .pmkid-fly__item__icon { color: #fff; }
.pmkid-fly__item.is-active .pmkid-fly__item__desc { color: rgba(255,255,255,0.85); }

/* Locked child item (Family Studio / Editor / Session Recordings) */
.pmkid-fly__item--locked {
  cursor: not-allowed;
  opacity: 0.55;
  position: relative;
}
.pmkid-fly__item--locked:hover {
  background: transparent;
  color: inherit;
  transform: none;
}
.pmkid-fly__item__lock {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  color: #94A3B8;
  flex-shrink: 0;
}
.pmkid-fly__item__lock svg { width: 14px; height: 14px; }

/* Disabled top-level row (Reports) — no lock icon per Caleb */
.pmkid-nav__item--disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.pmkid-nav__item--disabled:hover {
  background: transparent;
  color: rgba(255,255,255,.78);
  transform: none;
}

.pmkid-fly__item__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
  display: grid; place-items: center;
  color: var(--pmkid-purple-deep);
  flex-shrink: 0;
}
.pmkid-fly__item.is-active .pmkid-fly__item__icon {
  background: rgba(255,255,255,0.18);
}
.pmkid-fly__item__icon svg { width: 18px; height: 18px; }

.pmkid-fly__item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pmkid-fly__item__label {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.pmkid-fly__item__desc {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: #64748B;
  line-height: 1.3;
}

/* ---- Mobile flyout: drop below row instead of beside it ---- */
@media (max-width: 780px) {
  .pmkid-fly {
    left: calc(100% + 6px);
    width: 240px;
    padding: 10px 8px 12px;
  }
  .pmkid-fly__item { padding: 8px 10px; gap: 10px; }
  .pmkid-fly__item__icon { width: 32px; height: 32px; }
  .pmkid-fly__item__label { font-size: 12.5px; }
  .pmkid-fly__item__desc { font-size: 10.5px; }
}

/* ---- Hide leftover legacy white sidebar ---- */
body.pm-kid-shell #pmSidebar,
body.pm-kid-shell .pm-sidebar {
  display: none !important;
}

/* KID-SHELL SKELETON — synchronous purple strip painted via ::before so
   the rail's footprint shows the instant CSS is parsed, before
   kid-sidebar.js has finished its async role check. The real
   .pmkid-nav (z-index 90) covers this when it mounts. */
body.pm-kid-shell::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--pmkid-rail-width);
  background: var(--pmkid-nav-grad);
  z-index: 89;
  pointer-events: none;
}
@media (max-width: 780px) {
  body.pm-kid-shell::before {
    width: var(--pmkid-rail-width-mobile);
  }
}
/* Phase 40t — child DESKTOP boot skeleton must be BLUE (not the purple
   default var) so the cold-load strip matches the parent rail exactly,
   killing the brief purple->blue flash on first paint / incognito. */
@media (min-width: 761px) {
  body.pm-kid-shell::before {
    /* Phase 40v — follow the theme token (blue fallback). */
    background: var(--kt-chrome-grad, linear-gradient(0deg, #0b3d6b 0%, #007aff 52%, #0a84ff 100%));
  }
}
body.pm-kid-shell.pm-has-sidebar {
  padding-left: var(--pmkid-rail-width) !important;
}
@media (max-width: 780px) {
  body.pm-kid-shell.pm-has-sidebar {
    padding-left: var(--pmkid-rail-width-mobile) !important;
  }
}

/* 2026-07-03 — While the rail is being USED (hover / open flyout / keyboard
   focus), lift it above page content that stacks high (Leaflet maps sit at
   z~1000 and were swallowing the right-flyouts). Only during interaction, so
   normal stacking (search panel, modals) is untouched the rest of the time. */
/* NX29 2026-07-05 — :has() split into its own rule. In one selector list,
   a browser without :has() support drops the ENTIRE rule (spec behavior),
   killing the :hover/:focus-within lift too — the exact map-swallows-
   flyout-clicks bug this lift was added to fix. */
body.pm-kid-shell .pmkid-nav:hover,
body.pm-kid-shell .pmkid-nav:focus-within {
  z-index: 1200;
}
body.pm-kid-shell .pmkid-nav:has(.pmkid-nav__row.is-open) {
  z-index: 1200;
}

/* ═══ Phase 40h — CHILD desktop chrome = the SAME BLUE as the parent ══════════
   Caleb's call: the child sidebar + header should be the EXACT same blue (with the
   same sparkles) as the parent — only the menu items differ. The kid rail
   (.pmkid-nav) is driven by the same --pmkid-* vars the parent rail uses; the
   parent turns blue purely by overriding those vars (client-desktop.css:25-30).
   We apply the identical override to the child, scoped to the rail so the sparkle
   layer (a .pmkid-nav ::before) rides on top unchanged and the rest of the kid UI
   is untouched — plus the matching blue header. Desktop-only (min-width:761px) →
   child mobile theme untouched. Reversible: delete this block. */
@media (min-width: 761px) {
  body.pm-kid-shell .pmkid-nav {
    /* Phase 40k — flipped (0deg): brighter blue at TOP, deep navy at BOTTOM.
       Phase 40v — read the switchable --kt-* theme tokens; the blue literal is
       the fallback, so the chrome is byte-identical until a theme is chosen and
       on any page that doesn't load kid-theme.css. */
    --pmkid-nav-grad: var(--kt-chrome-grad, linear-gradient(0deg, #0b3d6b 0%, #007aff 52%, #0a84ff 100%));
    --pmkid-purple-deep:   var(--kt-chrome-deep,   #0b3d6b);
    --pmkid-purple-bright: var(--kt-chrome-bright, #007aff);
    --pmkid-purple-soft:   var(--kt-chrome-soft,   #0a84ff);
    box-shadow: 6px 0 34px -14px color-mix(in srgb, var(--kt-chrome-bright, #007aff) 55%, transparent), inset -1px 0 0 rgba(255, 255, 255, .10);
  }
  body.pm-kid-shell .nx-topbar {
    background: var(--kt-topbar-grad, linear-gradient(120deg, #0b3d6b 0%, #007aff 55%, #0a84ff 100%)) !important;
    border-bottom: 1px solid color-mix(in srgb, var(--kt-chrome-deep, #0b3d6b) 55%, transparent) !important;
    box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--kt-chrome-deep, #0b3d6b) 60%, transparent), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
  }
  body.pm-kid-shell .nx-topbar .nx-userpod__avatar {
    background: var(--kt-primary-grad, linear-gradient(135deg, #007aff 0%, #0a84ff 100%)) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px -1px rgba(0, 64, 150, .5) !important;
  }
  body.pm-kid-shell .nx-topbar .nx-search input {
    box-shadow: inset 0 1px 2px rgba(0, 64, 150, .25) !important;
  }
}

/* ═══ Phase 40u — CHILD desktop chrome = the parent's SPARKLE + SHEEN + STARS ═══
   Diagnosis (child-rail-diverge-diagnose workflow, 2026-07-31): the child blue
   GRADIENT already matched the parent (Phase 40h 0deg #0b3d6b/#007aff/#0a84ff ==
   client-desktop.css o4 line 28) — what the child was MISSING, and why Caleb saw a
   flat, motionless, "wrong-colour" rail, is the whole animated overlay the parent
   gets from parent-rail.css but which is scoped to body.pm-parent-rail (a real
   child is body.pm-kid-shell ONLY — kid-sidebar.js:902 removes pm-parent-rail and
   never adds pm-app-o4). This block re-creates that overlay for the child: the
   brighter diagonal SHEEN (rail ::before), the twinkling STAR field on the rail
   (::after), the header STAR field (.nx-topbar::before) + SHIMMER sweep (::after),
   plus the parent's fly-item hover/active blues. Self-contained pmKid* keyframes so
   it animates on all 21 rail pages even where parent-rail.css isn't loaded, and
   can't collide with the parent's keyframes. Desktop-only (min-width:761px) → the
   child MOBILE app-shell is untouched. Reversible: delete this block. */
@keyframes pmKidRailTwinkle { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes pmKidRailDrift   { 0% { background-position: 0 0; } 100% { background-position: 0 -60%; } }
@keyframes pmKidTopTwinkle  { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes pmKidTopDrift    { from { background-position: 0 0; } to { background-position: -120% 0; } }
@keyframes pmKidTopShimmer  { 0%, 16% { background-position: 190% 0; } 64%, 100% { background-position: -90% 0; } }
@media (min-width: 761px) {
  /* rail: keep flyouts escaping; stars are clipped by the ::after box itself */
  body.pm-kid-shell .pmkid-nav { overflow: visible; }
  /* brighter diagonal sheen (overrides the faint base ::before) */
  body.pm-kid-shell .pmkid-nav::before {
    background:
      linear-gradient(150deg, rgba(255,255,255,.22) 0%, transparent 38%),
      radial-gradient(circle at 22% 8%,  rgba(255,255,255,.20), transparent 46%),
      radial-gradient(circle at 82% 96%, rgba(190,255,235,.14), transparent 50%);
  }
  /* twinkling + drifting star field on the rail */
  body.pm-kid-shell .pmkid-nav::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    filter: drop-shadow(0 0 2px rgba(255,255,255,.55));
    background-image:
      radial-gradient(2.6px 2.6px at 18% 12%, rgba(255,255,255,1),   transparent 62%),
      radial-gradient(1.6px 1.6px at 62% 22%, rgba(255,255,255,.92), transparent 62%),
      radial-gradient(3px 3px   at 38% 33%, rgba(214,255,242,1),   transparent 62%),
      radial-gradient(1.6px 1.6px at 80% 44%, rgba(255,255,255,.9),  transparent 62%),
      radial-gradient(2.4px 2.4px at 26% 55%, rgba(255,255,255,1),   transparent 62%),
      radial-gradient(1.7px 1.7px at 70% 65%, rgba(214,255,242,.92), transparent 62%),
      radial-gradient(2.8px 2.8px at 46% 77%, rgba(255,255,255,1),   transparent 62%),
      radial-gradient(1.6px 1.6px at 84% 86%, rgba(255,255,255,.9),  transparent 62%),
      radial-gradient(2.2px 2.2px at 30% 92%, rgba(214,255,242,1),   transparent 62%),
      radial-gradient(1.7px 1.7px at 58% 6%,  rgba(255,255,255,.92), transparent 62%),
      radial-gradient(2px 2px   at 74% 15%, rgba(255,255,255,.95), transparent 62%),
      radial-gradient(1.6px 1.6px at 14% 40%, rgba(214,255,242,.9),  transparent 62%);
    background-repeat: repeat;
    background-size: 100% 60%;
    animation: pmKidRailTwinkle 4.2s ease-in-out infinite,
               pmKidRailDrift 26s linear infinite;
  }
  /* fly-item hover/active blues (exact match to the parent o4 rail) */
  body.pm-kid-shell .pmkid-fly__item__icon,
  body.pm-kid-shell .pmkid-fly__item:hover { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); }
  body.pm-kid-shell .pmkid-fly__item:hover { color: #0b3d6b; }
  body.pm-kid-shell .pmkid-fly__item.is-active { background: linear-gradient(135deg, #007aff 0%, #0a84ff 100%); }
  /* header content rides above the star + shimmer layers */
  body.pm-kid-shell .nx-topbar > * { position: relative; z-index: 1; }
  /* header twinkling stars */
  body.pm-kid-shell .nx-topbar::before {
    content: '';
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image:
      radial-gradient(1.6px 1.6px at 6% 34%,  rgba(255,255,255,1),   transparent 60%),
      radial-gradient(1.2px 1.2px at 14% 70%, rgba(214,255,242,.95), transparent 60%),
      radial-gradient(1.7px 1.7px at 24% 26%, rgba(255,255,255,1),   transparent 60%),
      radial-gradient(1.2px 1.2px at 35% 76%, rgba(255,255,255,.9),  transparent 60%),
      radial-gradient(1.5px 1.5px at 47% 30%, rgba(214,255,242,1),   transparent 60%),
      radial-gradient(1.2px 1.2px at 58% 68%, rgba(255,255,255,.9),  transparent 60%),
      radial-gradient(1.7px 1.7px at 69% 24%, rgba(255,255,255,1),   transparent 60%),
      radial-gradient(1.2px 1.2px at 79% 72%, rgba(214,255,242,.9),  transparent 60%),
      radial-gradient(1.6px 1.6px at 90% 36%, rgba(255,255,255,1),   transparent 60%),
      radial-gradient(1.2px 1.2px at 97% 62%, rgba(255,255,255,.85), transparent 60%);
    background-repeat: repeat;
    background-size: 60% 100%;
    filter: drop-shadow(0 0 1.5px rgba(255,255,255,.5));
    animation: pmKidTopTwinkle 4.2s ease-in-out infinite,
               pmKidTopDrift 26s linear infinite;
  }
  /* header shimmer sweep */
  body.pm-kid-shell .nx-topbar::after {
    content: '';
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 44%, rgba(255,255,255,.22) 50%, transparent 56%);
    background-size: 260% 100%;
    background-position: 200% 0;
    animation: pmKidTopShimmer 7s ease-in-out infinite;
  }
}
@media (min-width: 761px) and (prefers-reduced-motion: reduce) {
  body.pm-kid-shell .pmkid-nav::after,
  body.pm-kid-shell .nx-topbar::before,
  body.pm-kid-shell .nx-topbar::after { animation: none; }
  body.pm-kid-shell .pmkid-nav::after { opacity: .7; }
}
