:root {
  --ink: #2b2350;
  --muted: #6b6790;
  --card: #ffffff;
  --radius: 28px;
  --shadow: 0 8px 0 rgba(43, 35, 80, .10), 0 18px 40px rgba(43, 35, 80, .12);
  font-family: 'Baloo 2', ui-rounded, 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: #fff1c9; }
body {
  background: linear-gradient(180deg, #bde7ff 0%, #e8f6ff 45%, #fff1c9 100%);
  background-attachment: fixed;
  color: var(--ink);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
button { font: inherit; cursor: pointer; border: 0; color: inherit; background: none; touch-action: manipulation; }
button:focus-visible { outline: 4px solid #5b3fa8; outline-offset: 3px; }
input { font: inherit; user-select: text; }

.screen { display: none; min-height: 100vh; min-height: 100dvh; }
.screen.active { display: flex; flex-direction: column; }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; }
.logo { font-weight: 800; font-size: clamp(24px, 4vw, 34px); color: #5b3fa8; letter-spacing: .5px; }
.spacer { width: 64px; }
.icon-btn { background: #fff; border-radius: 999px; padding: 10px 18px; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); font-weight: 700; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .12); }
.icon-btn.big { width: 64px; height: 64px; font-size: 30px; padding: 0; display: grid; place-items: center; }
.parent-btn { font-size: 16px; color: var(--muted); }
.list-title { margin: 0; font-size: clamp(26px, 4.5vw, 40px); text-align: center; }

/* ---------- home ---------- */
.hero { text-align: center; padding: 4px 16px 0; }
.hello { font-size: clamp(38px, 7vw, 68px); margin: 0; line-height: 1.05; }
.sub { font-size: clamp(20px, 3vw, 28px); color: var(--muted); margin: 4px 0 0; }
.doors {
  flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px); padding: clamp(16px, 4vw, 48px);
  max-width: 1100px; width: 100%; margin: 0 auto; align-content: center; position: relative; z-index: 1;
}
.door {
  border-radius: 44px; padding: clamp(20px, 4vw, 40px) 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: #fff; box-shadow: 0 14px 0 rgba(0, 0, 0, .16), 0 24px 50px rgba(0, 0, 0, .12);
  min-height: clamp(230px, 42vh, 400px); transition: transform .15s;
}
.door:hover { transform: translateY(-4px) rotate(-1deg); }
.door:active { transform: translateY(8px) scale(.98); box-shadow: 0 6px 0 rgba(0, 0, 0, .16); }
.door-fun { background: linear-gradient(160deg, #ff9a5b, #ff4f8b); }
.door-learn { background: linear-gradient(160deg, #4f8cff, #8a5bff); }
.door-emoji { font-size: clamp(76px, 14vw, 150px); line-height: 1; animation: bob 2.4s ease-in-out infinite; }
.door-learn .door-emoji { animation-delay: -1.2s; }
.door-title { font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; text-shadow: 0 3px 0 rgba(0, 0, 0, .15); }
.door-hint { opacity: .92; font-size: clamp(15px, 2vw, 21px); font-weight: 700; }
.clouds { position: fixed; inset: auto 0 0 0; height: 120px; pointer-events: none; z-index: 0; }
.clouds span { position: absolute; font-size: 90px; opacity: .55; animation: drift 40s linear infinite; }
.clouds span:nth-child(1) { left: -10%; bottom: 10px; }
.clouds span:nth-child(2) { left: -30%; bottom: 50px; font-size: 60px; animation-duration: 55s; }
.clouds span:nth-child(3) { left: -50%; bottom: 0; font-size: 120px; animation-duration: 70s; }
@keyframes drift { to { transform: translateX(160vw); } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }

/* ---------- game list ---------- */
.game-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(16px, 3vw, 32px); padding: clamp(16px, 3vw, 40px);
  max-width: 1100px; width: 100%; margin: 0 auto;
}
.game-card {
  background: var(--card); border-radius: 36px; padding: 26px 16px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 10px 0 var(--c), 0 20px 40px rgba(0, 0, 0, .1);
  border: 6px solid var(--c); transition: transform .15s;
}
.game-card:hover { transform: translateY(-4px) scale(1.02); }
.game-card:active { transform: translateY(6px); }
.gc-emoji { font-size: clamp(80px, 12vw, 120px); line-height: 1.1; }
.gc-title { font-size: 30px; font-weight: 800; }
.gc-needs { font-size: 24px; }
.gc-best { font-size: 22px; color: #f59e0b; font-weight: 800; letter-spacing: 2px; }

/* ---------- play stage ---------- */
#screen-play.active { position: fixed; inset: 0; background: #111; }
.stage { position: absolute; inset: 0; overflow: hidden; background: #1a1530; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.stage.nocam video { display: none; }
.stage.bg-soft { background: linear-gradient(180deg, #ffe3f1 0%, #e3f2ff 60%, #fff4d6 100%); }
.stage.bg-night { background: linear-gradient(180deg, #172463 0%, #3d2a8f 55%, #7a49c9 100%); }

.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 14px; z-index: 6; }
.timebar { flex: 1; height: 18px; background: rgba(255, 255, 255, .55); border-radius: 99px; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .15); }
#timefill { height: 100%; width: 100%; background: linear-gradient(90deg, #22c55e, #a3e635, #ffd23f); border-radius: 99px; transition: width .25s linear; }
.scorepill { background: #fff; border-radius: 99px; padding: 6px 20px; font-weight: 800; font-size: 30px; box-shadow: 0 4px 0 rgba(0, 0, 0, .15); min-width: 100px; text-align: center; }
.scorepill.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.3); } }

.prompt {
  position: absolute; top: 92px; left: 50%; transform: translateX(-50%); z-index: 3;
  background: #fff; border-radius: 99px; padding: 6px 30px 6px 14px;
  font-size: clamp(30px, 5.5vw, 54px); font-weight: 800; text-transform: uppercase;
  display: none; align-items: center; gap: 16px; box-shadow: var(--shadow); animation: zoom .4s;
}
.prompt.show { display: flex; }
.swatch { width: 1.2em; height: 1.2em; border-radius: 50%; display: inline-block; border: 5px solid rgba(0, 0, 0, .08); }

.helper {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 4;
  display: none; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .92); border-radius: 24px; padding: 12px 16px; box-shadow: var(--shadow);
  width: max-content; max-width: calc(100vw - 32px);
}
.helper.show { display: flex; }
.helper-note { font-size: 15px; color: var(--muted); text-align: center; }
.helper-row { display: flex; gap: 12px; }

.overlay { position: absolute; inset: 0; display: none; place-items: center; z-index: 5; background: rgba(30, 20, 70, .45); backdrop-filter: blur(4px); padding: 16px; }
.overlay.show { display: grid; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.intro-card { text-align: center; width: min(560px, 100%); }
.intro-emoji { font-size: clamp(80px, 16vw, 120px); line-height: 1.1; animation: bob 2.4s ease-in-out infinite; }
.intro-card h2 { font-size: clamp(32px, 6vw, 44px); margin: 0; }
.intro-card p { font-size: clamp(18px, 3vw, 24px); color: var(--muted); margin: 6px 0 12px; }
.needs { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.need { background: #f1edff; color: #5b3fa8; border-radius: 99px; padding: 4px 14px; font-weight: 700; font-size: 16px; }
.go-btn {
  width: 128px; height: 128px; border-radius: 50%;
  background: linear-gradient(160deg, #3ee07a, #16a34a); color: #fff; font-size: 58px; padding-left: 10px;
  box-shadow: 0 10px 0 #0f7a37, 0 20px 40px rgba(22, 163, 74, .35); animation: pulse 1.4s ease-in-out infinite;
}
.go-btn:active { transform: translateY(8px); box-shadow: 0 2px 0 #0f7a37; }
.go-btn:disabled { opacity: .6; animation: none; }
@keyframes pulse { 50% { transform: scale(1.07); } }
.err { color: #dc2626; font-weight: 700; font-size: 17px !important; min-height: 1em; }
.count { background: rgba(30, 20, 70, .25); }
.count span { font-size: min(36vw, 260px); font-weight: 800; color: #fff; text-shadow: 0 10px 0 rgba(0, 0, 0, .25); animation: zoom .8s ease-out; }
@keyframes zoom { from { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.1); opacity: 1; } }

/* ---------- result ---------- */
#screen-result.active { justify-content: center; }
.result-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 16px 40px; gap: 6px; }
.result-emoji { font-size: clamp(90px, 18vw, 140px); line-height: 1; animation: bob 2s ease-in-out infinite; }
.stars { display: flex; gap: 10px; font-size: clamp(64px, 13vw, 100px); line-height: 1; }
.stars span { color: rgba(43, 35, 80, .15); transition: color .2s; }
.stars span.on { color: #ffc93c; text-shadow: 0 5px 0 #e09b00; animation: zoom .5s ease-out; }
#res-title { font-size: clamp(36px, 7vw, 56px); margin: 0; }
.res-summary { font-size: clamp(20px, 3.4vw, 28px); color: var(--muted); margin: 0 0 10px; }
.feedback { padding: 16px 22px; width: min(640px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fb-q { margin: 0; font-size: 22px; font-weight: 700; }
.faces { display: flex; gap: clamp(10px, 3vw, 24px); justify-content: center; }
.face { font-size: clamp(56px, 11vw, 80px); line-height: 1; padding: 6px; border-radius: 50%; transition: transform .15s, opacity .2s; }
.face:hover { transform: scale(1.12); }
.face.picked { transform: scale(1.25); background: #fff3c4; }
.face.dim { opacity: .35; }
.res-actions { display: flex; gap: 24px; margin-top: 18px; }
.act { width: 104px; height: 104px; border-radius: 32px; font-size: 52px; color: #fff; }
.act.again { background: linear-gradient(160deg, #3ee07a, #16a34a); box-shadow: 0 9px 0 #0f7a37; }
.act.more { background: linear-gradient(160deg, #4f8cff, #8a5bff); box-shadow: 0 9px 0 #4a2fb0; }
.act:active { transform: translateY(6px); box-shadow: none; }

/* ---------- grown-ups ---------- */
#screen-parents { user-select: text; }
.parents-wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; display: flex; flex-direction: column; gap: 18px; }
.parents-wrap h3 { margin: 0 0 10px; font-size: 22px; }
.gate { max-width: 440px; margin: 20px auto; text-align: center; }
.gate p { font-size: 18px; }
.gate-row { display: flex; gap: 10px; justify-content: center; }
.gate-row input, .field input {
  border: 3px solid #e3defa; border-radius: 14px; padding: 8px 14px; font-size: 20px; min-width: 0; width: 160px; color: var(--ink);
}
.btn { background: #5b3fa8; color: #fff; border-radius: 14px; padding: 10px 20px; font-weight: 700; font-size: 18px; box-shadow: 0 4px 0 #3c2878; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #3c2878; }
.btn.danger { background: #dc2626; box-shadow: 0 4px 0 #991b1b; }
.helper .btn { font-size: 20px; }
.profile-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.field { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.field input { width: 220px; }
.age-row { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.chip-age { width: 52px; height: 52px; border-radius: 50%; background: #f1edff; font-weight: 800; font-size: 22px; color: #5b3fa8; }
.chip-age.on { background: #5b3fa8; color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 15px; line-height: 1.5; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat { padding: 16px; text-align: center; }
.stat-v { font-size: 30px; font-weight: 800; color: #5b3fa8; line-height: 1.2; }
.stat-k { color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 2px solid #f1edff; white-space: nowrap; }
td.muted { white-space: normal; min-width: 180px; }
th { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.face-cell { font-size: 22px; }
.stars-cell { color: #f59e0b; letter-spacing: 2px; }
.practice-row { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { background: #fff3c4; border-radius: 99px; padding: 2px 12px; font-weight: 700; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .doors { grid-template-columns: 1fr; }
  .door { min-height: 200px; }
  .parent-btn span { display: none; }
  .icon-btn.big { width: 54px; height: 54px; font-size: 26px; }
  .scorepill { font-size: 24px; min-width: 80px; }
  .prompt { top: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- shared ---------- */
[hidden] { display: none !important; }
.btn.ghost { background: #f1edff; color: #5b3fa8; box-shadow: 0 4px 0 #d9d0fb; }
.btn.small-btn { padding: 8px 14px; font-size: 16px; }
.btn.big-btn { width: 100%; padding: 14px; font-size: 20px; }
.btn:disabled { opacity: .55; }
.link-btn { color: #dc2626; font-weight: 700; font-size: 14px; text-decoration: underline; padding: 0 4px; }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.top-actions .icon-btn { font-size: 16px; color: var(--muted); }
.user-chip { color: var(--ink) !important; }
.gc-reviews { font-size: 15px; color: var(--muted); font-weight: 700; }

/* ---------- login ---------- */
#screen-login.active { justify-content: center; align-items: center; padding: 24px 16px; }
.login-wrap { width: min(980px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.login-brand { text-align: center; }
.peek { display: flex; justify-content: center; gap: 6px; font-size: clamp(48px, 8vw, 80px); }
.peek span { display: inline-block; animation: peek 2.8s ease-in-out infinite; }
.peek span:nth-child(2) { animation-delay: .35s; } .peek span:nth-child(3) { animation-delay: .7s; } .peek span:nth-child(4) { animation-delay: 1.05s; }
@keyframes peek { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-18px) rotate(-6deg); } 60% { transform: translateY(-18px) rotate(6deg); } }
.brand { font-size: clamp(52px, 9vw, 92px); margin: 0; line-height: 1; color: #5b3fa8; text-shadow: 0 5px 0 #ffd166; }
.tagline { font-size: clamp(18px, 2.4vw, 24px); color: var(--muted); margin: 10px 0 0; }
.login-card { padding: 24px 26px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f1edff; border-radius: 16px; padding: 5px; margin-bottom: 16px; }
.tab { padding: 10px; border-radius: 12px; font-weight: 800; font-size: 18px; color: var(--muted); }
.tab.on { background: #fff; color: #5b3fa8; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form label { display: flex; flex-direction: column; font-weight: 700; font-size: 17px; gap: 4px; }
.auth-form input { border: 3px solid #e3defa; border-radius: 14px; padding: 10px 14px; font-size: 19px; color: var(--ink); }
.auth-form input:focus, textarea:focus, select:focus { outline: none; border-color: #8a5bff; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-label { grid-column: 1 / -1; font-weight: 700; font-size: 17px; }
.role { border: 3px solid #e3defa; border-radius: 18px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fff; }
.role span { font-size: 34px; } .role b { font-size: 17px; } .role small { color: var(--muted); font-size: 14px; }
.role.on { border-color: #5b3fa8; background: #f6f3ff; }
.login-note { text-align: center; margin: 14px 0 0; }

/* ---------- feedback ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { background: #f1edff; color: #3c2878; border-radius: 99px; padding: 6px 14px; font-weight: 700; font-size: 16px; border: 2px solid transparent; }
.chip:hover { border-color: #b9a6ff; }
.chip.used { background: #dcfce7; color: #166534; }
.fb-text-row { display: flex; gap: 10px; width: 100%; align-items: stretch; }
textarea { width: 100%; border: 3px solid #e3defa; border-radius: 16px; padding: 10px 14px; font: inherit; font-size: 18px; color: var(--ink); resize: vertical; user-select: text; }
.mic-btn { flex: 0 0 64px; border-radius: 18px; background: #06d6a0; font-size: 30px; box-shadow: 0 4px 0 #04a57b; }
.mic-btn.listening { background: #ef476f; box-shadow: 0 4px 0 #b3264a; animation: pulse 1s ease-in-out infinite; }
.fb-done { margin: 0; font-weight: 800; color: #16a34a; font-size: 18px; }
.stars5 { display: flex; gap: 4px; }
.s5 { font-size: 44px; line-height: 1; color: #d9d4ec; transition: transform .1s; }
.s5.on { color: #ffc93c; text-shadow: 0 3px 0 #e09b00; }
.s5:hover { transform: scale(1.15); }
.result-wrap { width: 100%; }

/* ---------- reviews ---------- */
#screen-reviews { user-select: text; }
.reviews-wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px 40px; display: flex; flex-direction: column; gap: 16px; font-size: 18px; }
.rv-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.rv-bar label, .rv-form label { display: flex; flex-direction: column; font-weight: 700; gap: 4px; }
select { font: inherit; font-size: 17px; border: 3px solid #e3defa; border-radius: 12px; padding: 8px 10px; background: #fff; color: var(--ink); }
.rv-bar .btn { margin-left: auto; }
.rv-form { display: flex; flex-direction: column; gap: 12px; }
.rv-form h3 { margin: 0; }
.rv-rate-row { display: flex; align-items: center; gap: 14px; font-weight: 700; flex-wrap: wrap; }
.rv-form .chips { justify-content: flex-start; }
.rv-form-actions { display: flex; gap: 10px; }
.rv-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.rv-sum { padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 3px solid transparent; }
.rv-sum.on { border-color: #8a5bff; }
.rv-sum-emoji { font-size: 34px; } .rv-sum-title { font-weight: 800; } .rv-sum-stars { color: #e09b00; font-weight: 800; }
.rv-card { display: flex; flex-direction: column; gap: 8px; }
.rv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rv-game { font-weight: 800; font-size: 20px; }
.rv-stars { color: #f59e0b; font-size: 22px; letter-spacing: 2px; }
.rv-face { font-size: 28px; }
.rv-meta, .rv-c-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge { background: #f1edff; color: #5b3fa8; border-radius: 99px; padding: 1px 10px; font-size: 14px; font-weight: 700; }
.rv-text { margin: 0; font-size: 19px; line-height: 1.5; white-space: pre-wrap; }
.rv-comments { display: flex; flex-direction: column; gap: 8px; margin-left: 14px; border-left: 4px solid #f1edff; padding-left: 14px; }
.rv-comments:empty { display: none; }
.rv-comment p { margin: 2px 0 0; line-height: 1.45; white-space: pre-wrap; }
.rv-c-add { display: flex; gap: 8px; align-items: flex-start; }
.rv-c-input { font-size: 17px; padding: 8px 12px; }
td.wrap { white-space: normal; min-width: 180px; }
td.fb-cell { min-width: 220px; max-width: 360px; }

@media (max-width: 760px) {
  .login-wrap { grid-template-columns: 1fr; gap: 16px; }
  .top-actions .icon-btn span:not(#user-chip) { display: none; }
  .rv-bar .btn { margin-left: 0; }
}
.mode-btn { font-size: 15px; font-weight: 700; color: #5b3fa8; background: #f1edff; border-radius: 99px; padding: 4px 14px; }
.rv-bar input { border: 3px solid #e3defa; border-radius: 12px; padding: 8px 10px; font-size: 17px; color: var(--ink); width: 180px; }

/* ---------- original Peekazoo games ---------- */
#screen-godot.active { position: fixed; inset: 0; background: #1b0630; z-index: 20; }
#godot-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =========================================================
   Peekazoo brand: felt-stitched look, logo colours, Pebi & Nimu
   ========================================================= */
:root {
  --pz-red: #e8505b; --pz-orange: #f39b1f; --pz-yellow: #f6c62c; --pz-green: #6aad2e;
  --pz-blue: #2a9fe0; --pz-purple: #8b55d6; --pz-felt: #fff7ec; --pz-brown: #8a4b2a;
  --ink: #3b2a4a;
}
body { background: radial-gradient(circle at 20% 0%, #fff4d9 0, transparent 45%), linear-gradient(180deg, #fde9ef 0%, #fff7ec 50%, #fff1d6 100%); background-attachment: fixed; }
html { background: #fff1d6; }
.stitch { outline: 3px dashed rgba(255,255,255,.75); outline-offset: -11px; }

/* home */
#screen-home .topbar { padding-bottom: 0; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 16px; }
.brand-logo { width: min(560px, 86vw); height: auto; filter: drop-shadow(0 6px 10px rgba(138,75,42,.18)); animation: logo-in .7s ease-out both; }
@keyframes logo-in { from { transform: translateY(-14px) scale(.96); opacity: 0; } }
.greet { display: flex; align-items: flex-end; gap: 6px; margin-top: -4px; }
.greet-pebi { height: clamp(96px, 15vw, 140px); width: auto; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 6px 6px rgba(0,0,0,.12)); }
.bubble { position: relative; background: #fff; border-radius: 28px; padding: 10px 22px 12px; box-shadow: 0 6px 0 rgba(232,80,91,.18); border: 3px solid #ffd3d8; margin-bottom: 24px; }
.bubble::before { content: ""; position: absolute; left: -14px; bottom: 18px; border: 10px solid transparent; border-right: 14px solid #fff; }
.bubble .hello { font-size: clamp(30px, 5vw, 46px); color: var(--pz-red); }
.bubble .sub { font-size: clamp(16px, 2.4vw, 22px); margin: 0; }
.doors { padding-top: 8px; }
.door { position: relative; overflow: visible; min-height: clamp(220px, 36vh, 340px); outline: 4px dashed rgba(255,255,255,.7); outline-offset: -14px; }
.door-fun { background: radial-gradient(circle at 30% 20%, #ff8f8f, transparent 55%), linear-gradient(160deg, #f46a74, #e2405e); box-shadow: 0 14px 0 #b8344a, 0 24px 50px rgba(226,64,94,.25); }
.door-learn { background: radial-gradient(circle at 30% 20%, #ffd76a, transparent 55%), linear-gradient(160deg, #f6b92b, #ee8a17); box-shadow: 0 14px 0 #b86812, 0 24px 50px rgba(238,138,23,.25); }
.door-char { height: clamp(120px, 21vh, 200px); width: auto; animation: bob 2.6s ease-in-out infinite; filter: drop-shadow(0 8px 8px rgba(0,0,0,.2)); }
.door-learn .door-char { animation-delay: -1.3s; }
.door-title { text-shadow: 0 3px 0 rgba(0,0,0,.18); }
.friends { position: fixed; inset: auto 0 0 0; height: 0; pointer-events: none; z-index: 0; }
.friend { position: fixed; bottom: -26px; height: clamp(90px, 14vh, 150px); width: auto; opacity: .95; animation: peekup 4s ease-in-out infinite; }
.f-orange { left: 2vw; transform: rotate(-8deg); }
.f-purple { right: 2vw; transform: rotate(8deg); animation-delay: -2s; }
@keyframes peekup { 0%, 100% { translate: 0 18px; } 50% { translate: 0 0; } }
@media (max-width: 640px) { .friend { display: none; } .bubble .sub { font-size: 15px; } }

/* lists & titles */
.list-title { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--ink); }
.title-char { height: 64px; width: auto; filter: drop-shadow(0 4px 4px rgba(0,0,0,.12)); }
.title-char.small { height: 52px; }
.mini-logo { height: 44px; width: auto; }
@media (max-width: 640px) { .mini-logo { display: none; } .title-char { height: 48px; } }
.game-card { position: relative; background: var(--pz-felt); outline: 3px dashed color-mix(in srgb, var(--c) 55%, white); outline-offset: -12px; }
.gc-char { height: clamp(130px, 18vw, 170px); width: auto; filter: drop-shadow(0 6px 6px rgba(0,0,0,.15)); }
.game-card:hover .gc-char { animation: bob 1.2s ease-in-out infinite; }
.gc-badge { position: absolute; top: 14px; right: 16px; font-size: 34px; background: #fff; border-radius: 50%; width: 56px; height: 56px; display: grid; place-items: center; box-shadow: 0 3px 0 rgba(0,0,0,.08); }
.gc-title { color: var(--ink); }

/* result */
.result-char { height: clamp(130px, 22vh, 200px); width: auto; animation: bob 2s ease-in-out infinite; filter: drop-shadow(0 8px 8px rgba(0,0,0,.15)); }
#res-title { color: var(--pz-red); }
.act.again { background: linear-gradient(160deg, #7cc843, #5a9e26); box-shadow: 0 9px 0 #3f7517; }
.act.more { background: linear-gradient(160deg, #3fb2ee, #2a8fd0); box-shadow: 0 9px 0 #1d6aa0; }
.btn { background: var(--pz-purple); box-shadow: 0 4px 0 #6239a6; }
.feedback, .card { border: 3px solid #fde3c6; }

/* =========================================================
   Home v2: contrasting doors, Pebi's face, meadow friends, moving props
   ========================================================= */
#app { position: relative; z-index: 1; }
.sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
body:not(.on-home) .sky { display: none; }
.deco { position: absolute; }
.deco svg { width: 100%; height: auto; display: block; }
.cloud { left: -200px; animation: cloud-drift linear infinite; }
@keyframes cloud-drift { to { transform: translateX(calc(100vw + 400px)); } }
.balloon { bottom: -160px; animation: balloon-up linear infinite; }
@keyframes balloon-up { 0% { transform: translate(0, 0) rotate(-4deg); } 25% { transform: translate(18px, -30vh) rotate(4deg); } 50% { transform: translate(-14px, -60vh) rotate(-3deg); } 75% { transform: translate(16px, -90vh) rotate(4deg); } 100% { transform: translate(0, -125vh) rotate(-2deg); } }
.butterfly { left: -60px; animation: flutter-across linear infinite; }
.butterfly .wing { transform-box: fill-box; animation: flap .28s ease-in-out infinite alternate; }
.butterfly .wl { transform-origin: right center; } .butterfly .wr { transform-origin: left center; }
@keyframes flap { to { transform: scaleX(.25); } }
@keyframes flutter-across { 0% { transform: translate(0, 0); } 20% { transform: translate(22vw, -6vh); } 40% { transform: translate(44vw, 5vh); } 60% { transform: translate(66vw, -8vh); } 80% { transform: translate(88vw, 3vh); } 100% { transform: translate(calc(100vw + 120px), -4vh); } }
.twinkle { animation: twinkle ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(.6) rotate(0); opacity: .35; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }
.soap { bottom: -50px; animation: bubble-up linear infinite; }
@keyframes bubble-up { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 50% { transform: translate(20px, -50vh); } 90% { opacity: .9; } 100% { transform: translate(-10px, -100vh); opacity: 0; } }

/* Pebi's face beside the greeting */
.greet-pebi { height: clamp(84px, 12vw, 120px); animation: peek-tilt 3s ease-in-out infinite; transform-origin: bottom center; }
@keyframes peek-tilt { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-4px); } }
.bubble { margin-bottom: 14px; }

/* Doors in colours that make Pebi and Nimu stand out */
.door-fun { background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.35), transparent 42%), linear-gradient(160deg, #4cc3f5, #1f7fd4); box-shadow: 0 14px 0 #155ea1, 0 24px 50px rgba(31,127,212,.28); }
.door-learn { background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.35), transparent 42%), linear-gradient(160deg, #a77be8, #6b3cc4); box-shadow: 0 14px 0 #4e2a96, 0 24px 50px rgba(107,60,196,.28); }
.door::after { content: ""; position: absolute; top: 18px; left: 50%; width: clamp(150px, 22vh, 220px); aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.55), rgba(255,255,255,0) 68%); z-index: 0; }
.door > * { position: relative; z-index: 1; }
.door:hover .door-char { animation: wiggle .6s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-6px); } }

/* The meadow where the friends stand (always fully on screen, below the doors) */
.meadow { position: relative; height: clamp(150px, 20vh, 200px); margin-top: auto; flex-shrink: 0; overflow: hidden; }
.grass { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 60%; }
.flowers { position: absolute; inset: 0; }
.flower { position: absolute; bottom: 18%; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #ffd84d 0 28%, transparent 30%), radial-gradient(circle at 50% 0, var(--c) 0 34%, transparent 36%), radial-gradient(circle at 100% 50%, var(--c) 0 34%, transparent 36%), radial-gradient(circle at 50% 100%, var(--c) 0 34%, transparent 36%), radial-gradient(circle at 0 50%, var(--c) 0 34%, transparent 36%); animation: sway 3s ease-in-out infinite; animation-delay: var(--d, 0s); transform-origin: bottom center; }
.flower::after { content: ""; position: absolute; left: 12px; top: 24px; width: 3px; height: 20px; background: #4f9a26; border-radius: 2px; }
@keyframes sway { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.mushroom { position: absolute; bottom: 14%; width: 40px; height: 36px; }
.mushroom::before { content: ""; position: absolute; top: 0; left: 0; width: 40px; height: 22px; border-radius: 22px 22px 6px 6px; background: radial-gradient(circle at 30% 45%, #fff 0 4px, transparent 5px), radial-gradient(circle at 68% 35%, #fff 0 3px, transparent 4px), #e8505b; }
.mushroom::after { content: ""; position: absolute; top: 18px; left: 13px; width: 14px; height: 18px; border-radius: 4px 4px 6px 6px; background: #fff3dc; }
.friend-btn { position: absolute; bottom: 10px; padding: 0; background: none; border: 0; cursor: pointer; z-index: 2; }
.friend-btn img { height: clamp(110px, 16vh, 160px); width: auto; display: block; filter: drop-shadow(0 6px 5px rgba(0,0,0,.18)); animation: friend-bob 2.8s ease-in-out infinite; }
.f-orange { left: clamp(8px, 6vw, 120px); }
.f-mimi { left: 50%; transform: translateX(-50%); }
.f-mimi img { animation-delay: -.9s; }
.f-purple { right: clamp(8px, 6vw, 120px); }
.f-purple img { animation-delay: -1.8s; }
@keyframes friend-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.friend-btn.hop img { animation: friend-hop .6s ease-out; }
@keyframes friend-hop { 30% { transform: translateY(-34px) scale(1.05, .95); } 60% { transform: translateY(0) scale(.95, 1.05); } }
.ball { position: absolute; bottom: 22px; left: 22%; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(#e8505b 0 25%, #f6c62c 0 50%, #2a9fe0 0 75%, #6aad2e 0); box-shadow: inset -4px -4px 0 rgba(0,0,0,.12); animation: ball-roll 9s ease-in-out infinite; }
@keyframes ball-roll { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(22vw) rotate(720deg); } }
#screen-home.active { min-height: 100dvh; }
#screen-home .doors { flex: 0 1 auto; padding-bottom: 8px; }
@media (max-width: 640px) {
  .friend-btn img { height: 96px; }
  .f-mimi { display: none; }
  .ball { display: none; }
}
@media (prefers-reduced-motion: reduce) { .sky { display: none; } }

/* fit the whole home (logo, doors, meadow friends) on one screen */
#screen-home .topbar { position: absolute; top: 0; right: 0; left: auto; z-index: 3; }
#screen-home .hero { padding-top: clamp(8px, 2vh, 24px); }
.brand-logo { width: min(560px, 80vw, 52vh); }
.greet-pebi { height: clamp(64px, 11vh, 120px); }
.bubble .hello { font-size: clamp(24px, 4.2vh, 46px); }
.bubble .sub { font-size: clamp(14px, 2.2vh, 22px); }
#screen-home .doors { padding-top: clamp(4px, 1.5vh, 16px); padding-bottom: 4px; gap: clamp(16px, 3vw, 40px); }
.door { min-height: clamp(170px, 31vh, 340px); padding-top: clamp(14px, 3vh, 40px); padding-bottom: clamp(14px, 3vh, 40px); }
.door-char { height: clamp(90px, 17vh, 200px); }
.door-title { font-size: clamp(26px, 4.6vh, 48px); }
.door::after { width: clamp(110px, 19vh, 220px); }
.meadow { height: clamp(120px, 19vh, 200px); }
.friend-btn img { height: clamp(90px, 15vh, 160px); }
@media (max-width: 640px) {
  #screen-home .topbar { position: static; }
  .brand-logo { width: 86vw; }
  .door { min-height: 190px; }
  .door-char { height: 110px; }
  .friend-btn img { height: 96px; }
}
