/* Superkids V1 -- profile chip, naam/avatar onboarding, music button, parent corner, break screen */
:root {
  --pf-ink: #2D2A45;
  --pf-grape: #6C5CE7; --pf-grape-d: #5546c9;
  --pf-mint: #00B894; --pf-mint-d: #008f70;
  --pf-card: #ffffff;
  --pf-soft: #f3f0ff;
  --pf-night1: #1d1b4b; --pf-night2: #3b2f7a; --pf-night3: #6a4fb3;
}

/* ---------- top-left profile chip ---------- */
.pf-chip {
  display: flex; align-items: center; gap: 8px; margin-right: auto;
  height: 60px; min-width: 60px; padding: 4px 18px 4px 4px; border-radius: 999px;
  background: #fff; font-size: 24px; font-weight: 800; color: var(--pf-ink);
  box-shadow: 0 5px 0 #d8d4f0, 0 8px 18px rgba(0,0,0,.12);
  transition: transform .1s;
}
.pf-chip img { width: 52px; height: 52px; border-radius: 50%; background: var(--pf-soft); padding: 4px; object-fit: contain; }
.pf-chip b { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-chip.noname { padding-right: 4px; }
.pf-chip:active { transform: translateY(4px); box-shadow: 0 1px 0 #d8d4f0; }

/* ---------- 🎵 music button ---------- */
.pf-music { position: relative; }
.pf-music .pf-slash { display: none; }
.pf-music.off .sk-ico3d { opacity: .45; filter: grayscale(1); }
.pf-music.off .pf-slash {
  display: block; position: absolute; left: 50%; top: 50%; width: 64%; height: 5px; border-radius: 3px;
  background: #ff5d6c; transform: translate(-50%, -50%) rotate(-40deg); box-shadow: 0 0 0 2px #fff;
}

/* phone: topbar bhara hua hai -> chip logo ke neeche, 🎵 🔊 ke neeche */
@media (max-width: 600px) {
  .pf-chip {
    position: absolute; left: 12px; top: calc(max(12px, env(safe-area-inset-top)) + 52px);
    height: 56px; min-width: 56px; padding: 3px; margin: 0;
  }
  .pf-chip img { width: 50px; height: 50px; }
  .pf-chip b { display: none; }
  .sk-topbar .pf-music { position: absolute; right: 16px; top: calc(max(12px, env(safe-area-inset-top)) + 64px); }
}

/* ---------- 🔒 parent lock (home, bottom-left, chhota -- bade log ke liye) ---------- */
.pf-lock {
  position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); z-index: 23;
  width: 52px; height: 52px; border-radius: 50%; padding: 9px;
  background: rgba(255,255,255,.72); box-shadow: 0 4px 0 rgba(0,0,0,.08); opacity: .85;
}
.pf-lock img { width: 100%; height: 100%; object-fit: contain; }
body.in-game .pf-lock, body.skx-open .pf-lock { display: none; }
.skx-pet { left: calc(max(10px, env(safe-area-inset-left)) + 58px); }

/* ---------- overlays (shared) ---------- */
.pf-ov {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(45, 42, 69, .45); backdrop-filter: blur(3px);
  animation: pf-fade .25s ease-out; overflow-y: auto;
}
.pf-x {
  position: absolute; top: 12px; right: 12px; width: 64px; height: 64px; border-radius: 50%;
  background: #fff; padding: 12px; box-shadow: 0 5px 0 #d8d4f0;
}
.pf-x img { width: 100%; height: 100%; }
.pf-x:active { transform: translateY(4px); box-shadow: none; }

/* ---------- onboarding ---------- */
.pf-onb { background: linear-gradient(160deg, rgba(126,200,255,.92), rgba(177,151,252,.92)); }
.pf-onb-card {
  position: relative; width: min(640px, 100%); margin: auto;
  background: var(--pf-card); border-radius: 36px; padding: 26px 22px 28px;
  box-shadow: 0 10px 0 rgba(108,92,231,.25), 0 24px 50px rgba(0,0,0,.18);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  animation: pf-pop .45s cubic-bezier(.34,1.56,.64,1);
}
.pf-supi { position: relative; width: 120px; height: 120px; margin-top: -76px; }
.pf-supi-img { width: 100%; height: 100%; filter: drop-shadow(0 8px 6px rgba(0,0,0,.18)); animation: pf-bob 2.2s ease-in-out infinite; }
.pf-supi-wave { position: absolute; right: -30px; top: 10px; width: 54px; transform-origin: 70% 90%; animation: pf-wave 1.2s ease-in-out infinite; }
.pf-bubble {
  display: flex; align-items: center; gap: 10px; max-width: 100%;
  background: var(--pf-soft); border-radius: 26px; padding: 12px 14px 12px 22px;
  font-size: 28px; font-weight: 800; line-height: 1.15; text-align: left; color: var(--pf-ink);
}
.pf-bubble img { width: 46px; height: 46px; flex: none; }
.pf-step { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pf-name-row { display: flex; gap: 12px; width: 100%; justify-content: center; }
.pf-name {
  flex: 1; min-width: 0; max-width: 400px; height: 84px; padding: 0 22px; border-radius: 26px;
  border: 5px solid #d9d2ff; background: #fff; font: 800 40px/1 var(--font, sans-serif); color: var(--pf-ink); text-align: center;
  outline: none; user-select: text; -webkit-user-select: text;
}
.pf-name:focus { border-color: var(--pf-grape); }
.pf-name::placeholder { color: #c9c3e8; }
.pf-mic {
  flex: none; width: 84px; height: 84px; border-radius: 50%; padding: 14px;
  background: #ffe8f1; box-shadow: 0 6px 0 #f5b5cd;
}
.pf-mic img { width: 100%; height: 100%; }
.pf-mic.on { background: #ff6b9d; box-shadow: 0 0 0 0 rgba(255,107,157,.6); animation: pf-ring 1s ease-out infinite; }
.pf-btns { display: flex; align-items: center; justify-content: center; gap: 22px; }
.pf-skip { width: 76px; height: 76px; border-radius: 50%; padding: 14px; background: #eeeaff; box-shadow: 0 6px 0 #d4ccff; }
.pf-skip img, .pf-go img { width: 100%; height: 100%; object-fit: contain; }
.pf-go { width: 112px; height: 88px; padding: 12px 24px; }
.pf-skip:active { transform: translateY(5px); box-shadow: none; }
.pf-avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; width: 100%; }
.pf-av {
  aspect-ratio: 1; min-height: 76px; border-radius: 28px; padding: 10%;
  background: var(--pf-soft); box-shadow: 0 6px 0 #ddd6ff;
  animation: pf-pop .4s cubic-bezier(.34,1.56,.64,1) both;
}
.pf-av img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.pf-av.on { background: #fff7d6; box-shadow: 0 6px 0 #f0c94d, 0 0 0 5px #ffd43b; }
.pf-pulse { animation: pf-pulse 1.1s ease-in-out infinite; }

/* ---------- grown-up gate ---------- */
.pf-gate { z-index: 400; }
.pf-gate-card, .pf-confirm-card {
  position: relative; width: min(420px, 100%); background: #fff; border-radius: 30px; padding: 22px 20px 24px;
  box-shadow: 0 10px 0 rgba(108,92,231,.22), 0 24px 50px rgba(0,0,0,.2); animation: pf-pop .35s cubic-bezier(.34,1.56,.64,1);
}
.pf-gate-head { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; padding-right: 70px; min-height: 64px; }
.pf-gate-head img { width: 44px; height: 44px; }
.pf-q { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 8px 0 16px; font-size: 44px; font-weight: 800; }
.pf-a { min-width: 92px; text-align: center; border-radius: 18px; background: var(--pf-soft); padding: 0 12px; color: var(--pf-grape); }
.pf-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pf-key {
  height: 72px; border-radius: 20px; font-size: 34px; font-weight: 800; background: #f4f2ff; color: var(--pf-ink);
  box-shadow: 0 5px 0 #dcd5ff;
}
.pf-key:active { transform: translateY(4px); box-shadow: none; }
.pf-key.ok { background: var(--pf-mint); color: #fff; box-shadow: 0 5px 0 var(--pf-mint-d); }
.pf-key.del { background: #ffe9e4; box-shadow: 0 5px 0 #f7c3b6; }

/* ---------- parent corner ---------- */
.pf-pc { align-items: flex-start; }
.pf-pc-card {
  position: relative; width: min(760px, 100%); margin: auto; background: #fff; border-radius: 30px; padding: 20px 22px 26px;
  box-shadow: 0 24px 50px rgba(0,0,0,.2); font-family: system-ui, 'Segoe UI', sans-serif; color: var(--pf-ink);
}
.pf-pc-head { display: flex; align-items: center; gap: 12px; min-height: 64px; padding-right: 76px; }
.pf-pc-head img { width: 42px; height: 42px; }
.pf-pc-head h2 { margin: 0; font: 800 28px/1.1 var(--font, sans-serif); }
.pf-pc-kid { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.pf-pc-kid img { width: 54px; height: 54px; border-radius: 50%; background: var(--pf-soft); padding: 5px; }
.pf-pc-kid b { font: 800 24px var(--font, sans-serif); }
.pf-link { background: none; color: var(--pf-grape); font: 600 16px system-ui, sans-serif; text-decoration: underline; padding: 8px 4px; }
.pf-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pf-tile { border-radius: 20px; padding: 14px 12px; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.pf-tile b { font: 800 34px/1 var(--font, sans-serif); }
.pf-tile b small { font-size: 18px; }
.pf-tile span { font-size: 14px; font-weight: 600; opacity: .95; }
.pf-tile.sky { background: linear-gradient(135deg, #4fb4ff, #2f80ed); }
.pf-tile.mint { background: linear-gradient(135deg, #20c997, #0ca678); }
.pf-tile.sun { background: linear-gradient(135deg, #fcc419, #f08c00); }
.pf-tile.pink { background: linear-gradient(135deg, #ff6b9d, #e64980); }
.pf-sec { margin-top: 20px; }
.pf-sec h3 { margin: 0 0 10px; font-size: 18px; }
.pf-sec h3 small { font-weight: 500; color: #7a7696; font-size: 14px; }
.pf-chart {
  position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end;
  height: 190px; padding: 10px 10px 0; border-radius: 18px; background: #f7f5ff;
}
.pf-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; padding-bottom: 26px; position: relative; }
.pf-bar i { display: block; width: 100%; max-width: 46px; border-radius: 10px 10px 4px 4px; background: linear-gradient(#b197fc, #7c6cf0); min-height: 3px; }
.pf-bar.now i { background: linear-gradient(#63e6be, #12b886); }
.pf-bar.over i { background: linear-gradient(#ffa8a8, #fa5252); }
.pf-bar .v { font-size: 13px; font-weight: 700; color: #5c5878; margin-bottom: 3px; }
.pf-bar small { position: absolute; bottom: 4px; font-size: 13px; font-weight: 600; color: #7a7696; }
.pf-limline {
  position: absolute; left: 6px; right: 6px; bottom: calc(26px + (100% - 36px) * .85 * var(--lim, 0)); border-top: 2px dashed #fa5252; pointer-events: none;
}
.pf-limline span { position: absolute; right: 0; top: -20px; font-size: 12px; font-weight: 700; color: #e03131; background: #f7f5ff; padding: 0 4px; }
.pf-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-segb {
  min-width: 88px; height: 52px; padding: 0 16px; border-radius: 14px; font: 700 18px system-ui, sans-serif;
  background: #f1efff; color: var(--pf-ink); box-shadow: inset 0 0 0 2px #ddd6ff;
}
.pf-segb.on { background: var(--pf-grape); color: #fff; box-shadow: 0 4px 0 var(--pf-grape-d); }
.pf-note { font-size: 14px; color: #6b6787; margin: 10px 0 0; line-height: 1.45; }
.pf-sec.danger { border-top: 1px solid #eee; padding-top: 16px; }
.pf-reset { margin-top: 12px; height: 50px; padding: 0 20px; border-radius: 14px; background: #fff0f0; color: #c92a2a; font: 700 17px system-ui, sans-serif; box-shadow: inset 0 0 0 2px #ffc9c9; }
.pf-confirm { z-index: 450; }
.pf-confirm-card { font-family: system-ui, sans-serif; }
.pf-confirm-card h3 { margin: 0 0 8px; font-size: 22px; }
.pf-confirm-card p { margin: 0 0 18px; color: #5c5878; line-height: 1.45; }
.pf-confirm-btns { display: flex; gap: 12px; justify-content: flex-end; }
.pf-cbtn { height: 52px; padding: 0 20px; border-radius: 14px; font: 700 17px system-ui, sans-serif; background: #f1efff; }
.pf-cbtn.red { background: #fa5252; color: #fff; }

@media (max-width: 600px) {
  .pf-tiles { grid-template-columns: repeat(2, 1fr); }
  .pf-chart { gap: 5px; padding: 8px 6px 0; }
  .pf-bubble { font-size: 23px; }
  .pf-name { height: 76px; font-size: 32px; }
  .pf-mic { width: 76px; height: 76px; }
  .pf-avatars { gap: 10px; }
  .pf-onb-card { padding: 22px 14px 24px; }
}

/* ---------- 🌙 break screen ---------- */
.pf-break {
  z-index: 300; flex-direction: column;
  background: radial-gradient(ellipse at 50% 110%, var(--pf-night3), var(--pf-night2) 45%, var(--pf-night1));
  backdrop-filter: none; color: #fff; overflow: hidden;
}
.pf-stars { position: absolute; inset: 0; pointer-events: none; }
.pf-stars i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff6c2; box-shadow: 0 0 8px #fff3a0; animation: pf-twinkle 3s ease-in-out infinite; }
.pf-break-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pf-moon { width: 150px; height: 150px; animation: pf-float 5s ease-in-out infinite; }
.pf-moon img { width: 100%; height: 100%; filter: drop-shadow(0 0 30px rgba(255, 230, 120, .55)); }
.pf-sleepy { position: relative; width: 130px; height: 130px; cursor: pointer; }
.pf-sleepy img { width: 100%; height: 100%; animation: pf-breathe 4s ease-in-out infinite; filter: drop-shadow(0 10px 10px rgba(0,0,0,.3)) saturate(.8); }
.pf-z { position: absolute; right: -6px; top: 4px; font: 800 30px var(--font, sans-serif); color: #d0bfff; opacity: 0; animation: pf-zz 3.6s ease-out infinite; }
.pf-z.b { animation-delay: 1.2s; } .pf-z.c { animation-delay: 2.4s; }
.pf-break h2 { margin: 6px 0 0; font: 800 clamp(34px, 7vw, 56px)/1.1 var(--font, sans-serif); text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.pf-grown {
  position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; padding: 10px; background: rgba(255,255,255,.16);
}
.pf-grown img { width: 100%; height: 100%; opacity: .8; }

/* ---------- animations ---------- */
.pf-bounce { animation: pf-pop .4s cubic-bezier(.34,1.56,.64,1); }
.pf-hop { animation: pf-hopk .5s cubic-bezier(.34,1.56,.64,1); }
.pf-shake { animation: pf-shakek .4s; }
@keyframes pf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pf-pop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
@keyframes pf-hopk { 0% { transform: none; } 40% { transform: translateY(-14px) scale(1.08); } 100% { transform: none; } }
@keyframes pf-shakek { 0%,100% { transform: none; } 20%,60% { transform: translateX(-10px); } 40%,80% { transform: translateX(10px); } }
@keyframes pf-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pf-wave { 0%,100% { transform: rotate(-10deg); } 50% { transform: rotate(22deg); } }
@keyframes pf-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes pf-ring { 0% { box-shadow: 0 0 0 0 rgba(255,107,157,.6); } 100% { box-shadow: 0 0 0 22px rgba(255,107,157,0); } }
@keyframes pf-twinkle { 0%,100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes pf-float { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(4deg); } }
@keyframes pf-breathe { 0%,100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
@keyframes pf-zz { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(26px, -60px) scale(1.3); } }
@media (prefers-reduced-motion: reduce) {
  .pf-supi-img, .pf-supi-wave, .pf-moon, .pf-sleepy img, .pf-z, .pf-stars i, .pf-pulse { animation: none; }
}

/* '3D Me' camera tile + chip pe bachche ka chehra (js/avatar.js) */
.pf-av.pf-av-cam { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(160deg, #ff8fb8, #9775fa); color: #fff; }
.pf-av.pf-av-cam span { font-size: 40px; line-height: 1; }
.pf-av.pf-av-cam b { font-size: 16px; }
.pf-chip img.pf-chip-face { border-radius: 50%; object-fit: cover; background: #ffe9dc; }
