/* ============================================================
   Pal Pad — playful vibrant theme (kids' domain, style-guide
   Step 0): cream paper, saturated chunky buttons, rounded
   friendly type (Quicksand), big radius, soft shadows.
   Child-facing controls >= 88x88 px; admin keeps large touches.
   EMOJI allowed for child-facing icons (Q1 ruling) — chrome is
   ASCII/SVG only.
   ============================================================ */

:root {
  --bg: #FFF6E5;
  --bg-evening: #2B2118;
  --panel: #FFFFFF;
  --panel-evening: #3A2D21;
  --text: #3E2723;
  --text-evening: #FFE9C9;
  --muted: #8D6E63;
  --sun: #FFB300;
  --sky: #4FC3F7;
  --grass: #66BB6A;
  --coral: #FF7043;
  --grape: #AB47BC;
  --peach: #FFAB91;
  --mint: #4DB6AC;
  --red: #E53935;
  --gold: #FFC107;
  --ink-on-color: #FFFFFF;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 6px 18px rgba(62, 39, 35, 0.16);
  --shadow-big: 0 12px 30px rgba(62, 39, 35, 0.22);
  --font: 'Quicksand', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

body.evening {
  background: var(--bg-evening);
  color: var(--text-evening);
}
body.evening .panel { background: var(--panel-evening); }
body.evening .muted { color: #C9A98B; }

/* ---------- screens ---------- */
.screen {
  display: none;
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  flex-direction: column;
  align-items: center;
}
.screen.active { display: flex; }
.screen::-webkit-scrollbar { width: 0; display: none; }
.screen { scrollbar-width: none; }

.screen-inner {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: auto;
  padding-bottom: 20px;
}

h1.screen-title {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-align: center;
}

/* ---------- buttons (child-facing: huge) ---------- */
button {
  font-family: var(--font);
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:active { transform: scale(0.96); }
button:focus-visible { outline: 4px solid var(--sun); outline-offset: 2px; border-radius: var(--radius); }

.big-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 88px;
  min-height: 88px;
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink-on-color);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.3px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.big-btn .ico { font-size: 44px; line-height: 1; }
.big-btn:active { transform: scale(0.95); box-shadow: var(--shadow-big); }

.bg-sun   { background: linear-gradient(180deg, #FFC94D, var(--sun)); }
.bg-sky   { background: linear-gradient(180deg, #7ED6F8, var(--sky)); }
.bg-grass { background: linear-gradient(180deg, #85D48A, var(--grass)); }
.bg-coral { background: linear-gradient(180deg, #FF8E6B, var(--coral)); }
.bg-grape { background: linear-gradient(180deg, #C05BD1, var(--grape)); }
.bg-peach { background: linear-gradient(180deg, #FFC4B0, var(--peach)); }
.bg-mint  { background: linear-gradient(180deg, #6EC8BC, var(--mint)); }
.bg-gold  { background: linear-gradient(180deg, #FFD54F, var(--gold)); }
.bg-red   { background: linear-gradient(180deg, #EF5350, var(--red)); }
.bg-white { background: var(--panel); color: var(--text); box-shadow: var(--shadow); border: 3px solid #FFE0B2; }

/* ---------- home ---------- */
.home-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.pal-box { flex: 1; display: flex; justify-content: center; }
.pal-box img {
  width: 150px;
  height: 150px;
  filter: drop-shadow(0 8px 14px rgba(62, 39, 35, 0.25));
}
.pal-box img.wave { animation: palwave 1.6s ease-in-out; }
.pal-box img.bounce { animation: palbounce 0.7s ease; }
@keyframes palwave {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(8deg); }
  60% { transform: rotate(-6deg); }
  80% { transform: rotate(4deg); }
}
@keyframes palbounce {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-18px) scale(1.12); }
  70% { transform: translateY(0) scale(0.96); }
  100% { transform: translateY(0) scale(1); }
}

.stars-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 3px solid #FFE0B2;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 26px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
body.evening .stars-chip { background: var(--panel-evening); }

.home-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.home-grid .big-btn { min-height: 132px; font-size: 24px; }
.home-grid .big-btn .ico { font-size: 52px; }

.prize-bar {
  width: 100%;
  background: var(--panel);
  border: 3px solid #FFE0B2;
  border-radius: 999px;
  padding: 14px 18px;
  box-shadow: var(--shadow);
}
body.evening .prize-bar { background: var(--panel-evening); }
.prize-bar .bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.prize-bar .track {
  height: 22px;
  border-radius: 999px;
  background: #FFE0B2;
  overflow: hidden;
}
.prize-bar .fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), #FF8F00);
  width: 0%;
  transition: width 0.5s ease;
}

/* corner gear (Build 3.3): kid-screen session menu with LOGOUT — sits where
   the old gate star did. Consoles keep their topbar gear (see account layer). */
#gear-btn.corner {
  position: fixed;
  bottom: 14px;
  right: 14px;
  font-size: 24px;
  opacity: 0.7;
  z-index: 60;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #FFE0B2;
  border: 3px solid #FFCC80;
  box-shadow: var(--shadow);
  cursor: pointer;
}
#gear-btn.corner:active { transform: scale(0.92); }
body.evening #gear-btn.corner { opacity: 0.5; }
#gear-menu.corner {
  position: fixed;
  bottom: 80px;
  right: 14px;
  z-index: 61;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 8px;
  gap: 4px;
  background: var(--panel);
  border: 3px solid #FFE0B2;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-big);
}
#gear-menu.corner button {
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 19px;
  font-weight: 700;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text);
}
#gear-menu.corner button:hover { background: #FFF1DC; }
body.evening #gear-menu.corner { background: var(--panel-evening); }
body.evening #gear-menu.corner button { color: var(--text-evening); }
body.evening #gear-menu.corner button:hover { background: #4A3A2B; }
/* the `hidden` attribute must win over any display rule (topbar + corner
   menus, the corner gear button) — author display:flex otherwise beats the
   UA's [hidden] { display:none } */
[hidden] { display: none !important; }

/* ---------- routine flow ---------- */
.routine-card {
  width: 100%;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 3px solid #FFE0B2;
}
body.evening .routine-card { background: var(--panel-evening); }

.task-btn {
  width: 100%;
  min-height: 110px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink-on-color);
  text-align: left;
}
.task-btn .ico { font-size: 52px; }
.task-btn .task-label { flex: 1; }
.task-btn .stars { font-size: 22px; letter-spacing: 2px; }

.task-btn.done {
  background: var(--grass);
  opacity: 0.85;
}
.task-btn.skipped {
  background: linear-gradient(180deg, #BCAAA4, #8D6E63);
  opacity: 0.8;
}
.task-btn.done .ico, .task-btn.skipped .ico { filter: grayscale(0.4); }

.flow-progress {
  font-size: 20px;
  font-weight: 600;
  color: var(--muted);
}
body.evening .flow-progress { color: #C9A98B; }

.big-label {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-top: 8px;
}

/* ---------- timer ---------- */
.timer-ring-wrap {
  position: relative;
  width: min(78vw, 420px);
  aspect-ratio: 1;
}
.timer-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring-bg { stroke: #FFE0B2; }
.timer-ring-fg {
  stroke: var(--coral);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s linear, stroke 0.4s;
}
.timer-time {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -1px;
}
.timer-label { font-size: 22px; color: var(--muted); margin-top: 12px; }
body.evening .timer-label { color: #C9A98B; }

.timer-presets { display: flex; gap: 14px; width: 100%; }
.timer-presets .big-btn { flex: 1; min-height: 108px; font-size: 26px; }

/* ---------- music / sound machine ---------- */
.sound-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; width: 100%; }
.sound-grid .big-btn { min-height: 120px; font-size: 22px; }
.sound-grid .big-btn .ico { font-size: 48px; }
.sound-grid .big-btn.playing { outline: 5px solid var(--text); outline-offset: 3px; }
body.evening .sound-grid .big-btn.playing { outline-color: var(--gold); }

.volume-row { display: flex; align-items: center; gap: 14px; width: 100%; font-size: 20px; font-weight: 600; }
.volume-row input[type='range'] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 18px;
  border-radius: 999px;
  background: #FFE0B2;
}
.volume-row input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--coral);
  border: 5px solid #fff;
  box-shadow: var(--shadow);
}
.volume-row input[type='range']::-moz-range-thumb {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--coral); border: 4px solid #fff;
}

/* ---------- weather ---------- */
.weather-now {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 3px solid #FFE0B2;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
body.evening .weather-now { background: var(--panel-evening); }
.weather-now .w-ico { font-size: 84px; }
.weather-now .w-temp { font-size: 72px; font-weight: 700; letter-spacing: -2px; }
.weather-now .w-label { font-size: 24px; font-weight: 600; color: var(--muted); }
body.evening .weather-now .w-label { color: #C9A98B; }
.weather-now .w-hint { font-size: 16px; color: var(--muted); }
body.evening .weather-now .w-hint { color: #C9A98B; }

.dress-btn { width: 100%; min-height: 120px; font-size: 30px; }

/* ---------- rewards ---------- */
.reward-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 3px solid #FFE0B2;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
body.evening .reward-card { background: var(--panel-evening); }
.reward-card .r-ico { font-size: 72px; }
.reward-card .r-label { font-size: 30px; font-weight: 700; }
.reward-card .r-cost { font-size: 22px; color: var(--muted); }
body.evening .reward-card .r-cost { color: #C9A98B; }
.reward-card .r-balance { font-size: 26px; font-weight: 700; color: var(--grape); }

.big-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 30px;
  font-weight: 700;
  background: var(--panel);
  border: 3px solid #FFE0B2;
  border-radius: var(--radius);
  padding: 18px 24px;
  width: 100%;
  box-shadow: var(--shadow);
}
body.evening .big-stat { background: var(--panel-evening); }

/* ---------- pal screen ---------- */
.pal-big {
  width: 220px;
  height: 220px;
  filter: drop-shadow(0 14px 20px rgba(62, 39, 35, 0.28));
}
.pal-name { font-size: 34px; font-weight: 700; }

/* ---------- admin ---------- */
.admin-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-title { font-size: 28px; font-weight: 700; }
.admin-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  justify-content: center;
}
.admin-tabs button {
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  background: var(--panel);
  color: var(--text);
  border: 3px solid #FFE0B2;
  box-shadow: var(--shadow);
}
.admin-tabs button.active { background: var(--grape); color: #fff; border-color: var(--grape); }
body.evening .admin-tabs button { background: var(--panel-evening); color: var(--text-evening); }
body.evening .admin-tabs button.active { background: var(--grape); color: #fff; }

.admin-panel {
  width: 100%;
  display: none;
  flex-direction: column;
  gap: 14px;
}
.admin-panel.active { display: flex; }

.row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 3px solid #FFE0B2;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow);
}
body.evening .row { background: var(--panel-evening); }
.row .row-main { flex: 1; min-width: 0; }
.row .row-title { font-size: 18px; font-weight: 700; }
.row .row-sub { font-size: 14px; color: var(--muted); }
body.evening .row .row-sub { color: #C9A98B; }
.row .ico { font-size: 30px; }

.field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.field label { font-size: 16px; font-weight: 700; }

input[type='text'], input[type='number'], input[type='time'], input[type='email'], input[type='password'], select, textarea {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  background: #FFFDF7;
  border: 3px solid #FFE0B2;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  min-height: 48px;
}
body.evening input[type='text'], body.evening input[type='number'], body.evening input[type='time'],
body.evening input[type='email'], body.evening input[type='password'], body.evening select, body.evening textarea {
  background: #4A3A2A; color: var(--text-evening); border-color: #6B5540;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(79, 195, 247, 0.3);
}
textarea { min-height: 90px; resize: vertical; }

.ctrl-btn {
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow);
}
.ctrl-btn.small { min-height: 42px; padding: 6px 14px; font-size: 14px; }
.ctrl-btn.ghost { background: var(--panel); color: var(--text); border: 3px solid #FFE0B2; }
body.evening .ctrl-btn.ghost { background: var(--panel-evening); color: var(--text-evening); }
.ctrl-btn.danger { background: var(--red); }
.ctrl-btn.ok { background: var(--grass); }
.ctrl-btn.warn { background: var(--sun); color: var(--text); }

/* ---------- modal system (no alert/confirm/prompt) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(62, 39, 35, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-box {
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: var(--radius);
  border: 4px solid #FFE0B2;
  box-shadow: var(--shadow-big);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
body.evening .modal-box { background: var(--panel-evening); border-color: #6B5540; }
.modal-title { font-size: 26px; font-weight: 700; text-align: center; }
.modal-msg { font-size: 18px; text-align: center; line-height: 1.45; }
.modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.modal-actions .ctrl-btn { min-height: 56px; font-size: 18px; padding: 12px 22px; }
.modal-overlay.shake .modal-box { animation: modalshake 0.4s; }
@keyframes modalshake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-12px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(6px); }
}

/* PIN pad */
.pin-display {
  text-align: center;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 14px;
  min-height: 52px;
  color: var(--grape);
}
.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}
.pin-key {
  min-height: 72px;
  border-radius: var(--radius-sm);
  font-size: 30px;
  font-weight: 700;
  background: var(--panel);
  border: 3px solid #FFE0B2;
  color: var(--text);
  box-shadow: var(--shadow);
}
body.evening .pin-key { background: var(--panel-evening); color: var(--text-evening); }

/* ---------- toasts ---------- */
#toast-root {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: var(--bg);
  font-size: 18px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 999px;
  box-shadow: var(--shadow-big);
  animation: toastin 0.25s ease;
  max-width: 90vw;
  text-align: center;
}
@keyframes toastin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- celebration ---------- */
#fx-root { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.fx-star {
  position: absolute;
  font-size: 30px;
  animation: fxfly 1.3s ease-out forwards;
}
@keyframes fxfly {
  0% { transform: translate(0, 0) scale(0.4) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.3) rotate(300deg); opacity: 0; }
}
.fx-confetti {
  position: absolute;
  width: 12px;
  height: 18px;
  border-radius: 3px;
  animation: confettifall 2.4s linear forwards;
}
@keyframes confettifall {
  0% { transform: translate(0, -10vh) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), 110vh) rotate(720deg); opacity: 0.4; }
}

/* ---------- nudge banner ---------- */
.nudge-banner {
  position: fixed;
  inset: 0;
  background: rgba(62, 39, 35, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 130;
  padding: 30px;
  text-align: center;
}
.nudge-banner .nudge-ico { font-size: 90px; animation: palbounce 1s ease infinite; }
.nudge-banner .nudge-text { font-size: 40px; font-weight: 700; color: #fff; text-shadow: 0 3px 8px rgba(0,0,0,0.3); }
.nudge-banner .big-btn { min-width: 200px; min-height: 100px; font-size: 30px; }

/* ---------- responsive (tablet portrait 720x1280 class + phone) ---------- */
@media (max-width: 520px) {
  .screen { padding: 14px; }
  h1.screen-title { font-size: 28px; }
  .home-grid .big-btn { min-height: 118px; }
  .home-grid .big-btn .ico { font-size: 44px; }
  .timer-time { font-size: 52px; }
  .weather-now .w-temp { font-size: 60px; }
  .nudge-banner .nudge-text { font-size: 32px; }
  .pal-box img { width: 120px; height: 120px; }
}

@media (max-height: 620px) {
  .home-grid .big-btn { min-height: 100px; }
  .home-grid .big-btn .ico { font-size: 38px; }
  .pal-box img { width: 100px; height: 100px; }
}

/* ============================================================
   Account layer (PIVOT + UAC): topbar/gear menu, password
   checklist (live), kid login picker, child switcher.
   ============================================================ */

/* ---------- account topbar (Welcome, <displayName> + gear) ---------- */
.topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--panel);
  border: 3px solid #FFE0B2;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  box-shadow: var(--shadow);
}
body.evening .topbar { background: var(--panel-evening); }
.topbar-welcome { font-size: 18px; font-weight: 700; }
.topbar-welcome b { color: var(--grape); }
.gear-wrap { position: relative; }
.gear-btn {
  min-width: 46px;
  min-height: 46px;
  border-radius: 50%;
  border: 3px solid #FFE0B2;
  background: var(--bg);
  font-size: 22px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.gear-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 90;
  background: var(--panel);
  border: 3px solid #FFE0B2;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-big);
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 6px;
  gap: 4px;
}
.gear-menu button {
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text);
}
.gear-menu button:hover { background: #FFF1DC; }
body.evening .gear-menu { background: var(--panel-evening); }
body.evening .gear-menu button { color: var(--text-evening); }
body.evening .gear-menu button:hover { background: #4A3A2B; }

/* ---------- password checklist (UAC §5: 28px green filled / hollow ring) ---------- */
.pw-check {
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 4px 0 10px;
}
.pw-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pw-dot {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  background: transparent;
  border: 2px solid #D1D5DB; /* hollow gray ring — unmet */
}
.pw-text { font-size: 15px; font-weight: 700; color: #8D6E63; } /* gray — unmet */
.pw-item.pw-ok .pw-dot {
  background: #1B9C5E;       /* filled green — met */
  border-color: #1B9C5E;
}
.pw-item.pw-ok .pw-text { color: #1B9C5E; }

/* ---------- kid login picker (big avatar/name buttons) ---------- */
.kid-picker {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.kid-card {
  min-width: 150px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--panel);
  border: 4px solid #FFE0B2;
  border-radius: 26px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: var(--font);
  padding: 14px;
}
.kid-card.active { border-color: var(--grape); }
.kid-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 -6px 12px rgba(0,0,0,0.18);
}
.kid-avatar img { width: 74px; height: 74px; }
.kid-name { font-size: 24px; font-weight: 800; color: var(--text); }
.kid-user { font-size: 13px; color: var(--muted); }

/* kid password entry — big, friendly */
.kid-pass-box { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.kid-pass-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 -8px 16px rgba(0,0,0,0.18);
}
.kid-pass-avatar img { width: 92px; height: 92px; }
.kid-pass-input {
  width: 100%;
  max-width: 300px;
  min-height: 72px;
  font-size: 34px;
  text-align: center;
  letter-spacing: 0.35em;
  border-radius: var(--radius-sm);
  border: 3px solid #FFE0B2;
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  padding: 10px;
}

/* ---------- parent child switcher (1:many) ---------- */
.child-switch {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.child-switch .chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 3px solid #FFE0B2;
  background: var(--panel);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
}
.child-switch .chip.active { background: var(--grape); color: #fff; border-color: var(--grape); }
.chip-dot {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2);
}

@media (max-width: 520px) {
  .kid-card { min-width: 130px; min-height: 150px; }
  .kid-avatar { width: 72px; height: 72px; }
  .kid-avatar img { width: 60px; height: 60px; }
}

/* ================= Build 4.0: standard login, launcher, admin read-only kids ================= */

/* login page (one form for all roles) */
.login-wrap { gap: 14px; }
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-big);
  border: 3px solid #FFE0B2;
}
.login-card input {
  font-size: 20px;
  min-height: 56px;
  padding: 10px 16px;
}
.login-hint { font-size: 14px; text-align: center; line-height: 1.5; }
.screen.shake { animation: screenshake 0.4s; }
@keyframes screenshake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* launcher (child landing screen) */
.launcher-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--muted);
  text-transform: uppercase;
}

/* admin User Management Panel: read-only children under each parent */
.admin-kids {
  width: 100%;
  margin: 0 0 12px 46px;
  padding: 10px 14px;
  background: #FFF3E0;
  border: 2px dashed #FFE0B2;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-kids-label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.admin-kid {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.admin-kid-dot {
  width: 12px;
  height: 12px;
  min-width: 12px;
  border-radius: 50%;
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.18);
}
.admin-kid-name { font-weight: 700; }
.admin-kid-sub { color: var(--muted); font-size: 13px; }

/* parent console: volume slider label (ASCII chrome) */
.vol-label { font-size: 14px; font-weight: 800; color: var(--muted); min-width: 30px; text-align: center; }
