/* Peekaboo Party — project page. Builds on ../styles.css */
:root {
  --pk-pink: #ff3d7f;
  --pk-pink-deep: #c2185b;
  --pk-orange: #ff8a3d;
  --pk-yellow: #ffc93c;
  --pk-cyan: #22d3ee;
  --pk-violet: #7c5cff;
  --pk-ink: #16122b;
  /* The in-phone UI always uses the app's dark theme, whatever the page theme. */
  --app-bg: #0d0a1f;
  --app-surface: #17132e;
  --app-surface-high: #221c42;
  --app-outline: #2f2858;
  --app-text: #f7f5ff;
  --app-muted: #a9a3cc;
}

/* Hero */
.pk-hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; min-height: 640px; padding-top: 70px; padding-bottom: 80px; }
.pk-back { display: inline-block; margin-bottom: 28px; color: var(--muted); font: 11px "DM Mono", monospace; letter-spacing: .06em; }
.pk-back:hover { color: var(--accent); }
.pk-brand { display: flex; align-items: center; gap: 18px; }
.pk-brand img { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.pk-brand h1 { margin: 4px 0 0; font-family: "Unbounded", "Manrope", sans-serif; font-size: clamp(36px, 4.6vw, 58px); font-weight: 900; line-height: 1.05; letter-spacing: -.04em; }
.pk-lead { margin: 30px 0 18px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; line-height: 1.3; letter-spacing: -.035em; }
.pk-lead span { color: var(--subtle); }
.pk-intro { max-width: 520px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.pk-store { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 18px 0 14px; border-radius: 9px; background: #0b0a12; border: 1px solid rgba(255,255,255,.18); color: #fff; }
.pk-store svg { width: 22px; height: 22px; fill: var(--pk-yellow); }
.pk-store span { display: grid; font-size: 15px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.pk-store small { font: 8px "DM Mono", monospace; letter-spacing: .12em; color: #b8b6c8; }
.pk-hero-art { position: relative; display: grid; place-items: center; min-height: 560px; }
.pk-blob { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255,201,60,.32), rgba(255,61,127,.18) 45%, transparent 70%); filter: blur(10px); }

/* Phone frame */
.phone { position: relative; flex: 0 0 auto; width: 250px; aspect-ratio: 9 / 19; padding: 9px; border-radius: 38px; background: #07060f; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 70px rgba(0,0,0,.4); }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; z-index: 3; width: 13px; height: 13px; border-radius: 50%; background: #07060f; transform: translateX(-50%); }
.phone-hero { width: 280px; transform: rotate(-4deg); }
.phone > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 30px; }
.screen { position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 30px 16px 16px; border-radius: 30px; background: var(--app-bg); color: var(--app-text); font-family: "Manrope", sans-serif; font-size: 11px; line-height: 1.4; }
.s-status { position: absolute; top: 9px; left: 22px; right: 22px; display: flex; justify-content: space-between; color: var(--app-muted); font-size: 8px; font-weight: 700; }
.s-head { margin-top: 8px; font-family: "Unbounded", "Manrope", sans-serif; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.s-center { text-align: center; }
.s-sub { margin: 14px 0 6px; color: var(--app-muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.s-muted { margin: 4px 0 12px; color: var(--app-muted); font-size: 10px; }
.s-btn { display: grid; place-items: center; height: 38px; margin-top: 8px; border-radius: 13px; font-size: 11.5px; font-weight: 800; }
.s-btn-primary { background: var(--pk-pink); color: #fff; box-shadow: 0 4px 0 var(--pk-pink-deep); }
.s-btn-secondary { background: #241e47; color: var(--app-text); box-shadow: 0 4px 0 #0b0820; }
.s-bottom { margin-top: auto; }
.s-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; margin-top: auto; }
.av { display: inline-grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; color: var(--pk-ink); font-size: 10px; font-weight: 800; }
.av-pink { background: linear-gradient(135deg, var(--pk-pink), var(--pk-orange)); color: #fff; }
.av-cyan { background: linear-gradient(135deg, var(--pk-cyan), #34d399); }
.av-yellow { background: linear-gradient(135deg, var(--pk-yellow), var(--pk-orange)); }
.av-violet { background: linear-gradient(135deg, var(--pk-violet), var(--pk-pink)); color: #fff; }

/* Home */
.s-home { align-items: stretch; text-align: center; padding-bottom: 22px; }
.s-home-top { display: flex; justify-content: flex-end; color: var(--app-muted); font-size: 14px; }
.s-stack { position: relative; height: 150px; margin: 6px 0 4px; }
.s-pol { position: absolute; top: 18px; left: 50%; width: 84px; height: 100px; padding: 6px 6px 20px; border-radius: 8px; background: #fff; box-shadow: 0 12px 26px rgba(0,0,0,.4); }
.s-pol i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 4px; font-size: 30px; font-style: normal; }
.p1 { transform: translateX(-108%) rotate(-14deg); } .p1 i { background: linear-gradient(150deg, var(--pk-yellow), var(--pk-orange)); }
.p2 { z-index: 1; top: 6px; transform: translateX(-50%) rotate(2deg); } .p2 i { background: linear-gradient(160deg, var(--pk-cyan), var(--pk-violet)); }
.p3 { transform: translateX(8%) rotate(14deg); } .p3 i { background: linear-gradient(150deg, var(--pk-pink), var(--pk-pink-deep)); }
.s-peek { position: absolute; z-index: 2; bottom: -2px; left: 50%; width: 52px; height: 52px; border-radius: 14px; transform: translateX(-50%); box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.s-logo { margin-top: 16px; font-family: "Unbounded", "Manrope", sans-serif; font-size: 25px; font-weight: 900; line-height: 1.05; letter-spacing: -.03em; background: linear-gradient(100deg, var(--pk-yellow), var(--pk-pink)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.s-tag { margin: 10px 0 auto; color: var(--app-muted); font-size: 10.5px; line-height: 1.5; }
.s-home .s-btn { margin-top: 10px; }

/* Lobby */
.s-code-card { position: relative; margin-top: 12px; padding: 12px 12px 12px 14px; border: 1px solid var(--app-outline); border-radius: 16px; background: var(--app-surface); }
.s-code-card small { display: block; color: var(--app-muted); font: 7.5px "DM Mono", monospace; letter-spacing: .14em; }
.s-code-card b { display: block; margin-top: 2px; font-family: "Unbounded", "Manrope", sans-serif; font-size: 21px; letter-spacing: .06em; color: var(--pk-yellow); }
.s-qr { position: absolute; top: 12px; right: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 44px; height: 44px; padding: 5px; border-radius: 7px; background: #fff; }
.s-qr i { background: var(--pk-ink); border-radius: 1px; }
.s-qr i:nth-child(2), .s-qr i:nth-child(4), .s-qr i:nth-child(8) { background: transparent; }
.s-pill { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 20px; background: var(--app-surface-high); color: var(--app-text); font-size: 9px; font-weight: 800; }
.s-players { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.s-players li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 11px; background: var(--app-surface); font-size: 10.5px; font-weight: 700; }
.s-players em { margin-left: auto; color: var(--app-muted); font-size: 8.5px; font-style: normal; font-weight: 700; }
.s-players em.ok { color: #34d399; }

/* Your photo */
.s-round { align-self: flex-start; margin-top: 4px; padding: 3px 9px; border-radius: 20px; background: var(--app-surface-high); color: var(--pk-yellow); font-size: 8.5px; font-weight: 800; }
.s-bigphoto { position: relative; display: grid; place-items: center; flex: 1; max-height: 250px; border-radius: 18px; background: linear-gradient(160deg, #ffb36b, #ff6f61 55%, #b83280); font-size: 70px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.s-bigphoto i { font-style: normal; }
.s-cap { position: absolute; bottom: 10px; left: 10px; padding: 3px 8px; border-radius: 8px; background: rgba(13,10,31,.55); color: #fff; font: 8px "DM Mono", monospace; }
.s-pick .s-row { margin-top: 14px; }

/* Whose is it */
.s-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.s-tile { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.05; border-radius: 14px; font-size: 34px; }
.s-tile i { font-style: normal; }
.t1 { background: linear-gradient(160deg, #ffb36b, #ff6f61 55%, #b83280); }
.t2 { background: linear-gradient(160deg, #7c5cff, #3b2a8a); }
.t3 { background: linear-gradient(160deg, #22d3ee, #2563eb); }
.t4 { background: linear-gradient(160deg, #ffc93c, #ff8a3d); }
.s-tile.is-active { box-shadow: 0 0 0 3px var(--app-bg), 0 0 0 5px var(--pk-yellow); }
.s-chip { position: absolute; bottom: 6px; left: 6px; padding: 2px 7px; border-radius: 10px; background: rgba(13,10,31,.75); color: #fff; font-size: 8.5px; font-weight: 800; }
.s-chip-empty { background: var(--pk-yellow); color: var(--pk-ink); }
.s-heart { position: absolute; top: 6px; right: 6px; font-size: 13px; }
.s-picker { display: flex; justify-content: center; gap: 8px; margin: 12px 0 auto; padding: 8px; border-radius: 14px; background: var(--app-surface); }
.s-picker .av { width: 28px; height: 28px; font-size: 11px; }

/* Results */
.s-results { text-align: left; }
.s-confetti i { position: absolute; width: 6px; height: 9px; border-radius: 2px; }
.s-confetti i:nth-child(1) { top: 40px; left: 24px; background: var(--pk-pink); transform: rotate(25deg); }
.s-confetti i:nth-child(2) { top: 58px; right: 30px; background: var(--pk-cyan); transform: rotate(-20deg); }
.s-confetti i:nth-child(3) { top: 92px; left: 46px; background: var(--pk-yellow); transform: rotate(60deg); }
.s-confetti i:nth-child(4) { top: 34px; right: 70px; background: var(--pk-violet); }
.s-confetti i:nth-child(5) { top: 100px; right: 22px; background: var(--pk-orange); transform: rotate(40deg); }
.s-crown { margin-top: 10px; text-align: center; font-size: 26px; }
.s-results .s-head { margin-top: 0; }
.s-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 6px; margin: 14px 4px 10px; }
.pod { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding-top: 8px; border-radius: 10px 10px 4px 4px; background: var(--app-surface-high); }
.pod b { font-family: "Unbounded", "Manrope", sans-serif; font-size: 13px; }
.pod-1 { height: 86px; background: linear-gradient(180deg, rgba(255,201,60,.35), var(--app-surface-high)); }
.pod-2 { height: 66px; }
.pod-3 { height: 52px; }
.s-rank { display: grid; gap: 4px; margin: 0 0 auto; padding: 0; list-style: none; }
.s-rank li { display: flex; align-items: center; gap: 8px; padding: 5px 9px; border-radius: 9px; background: var(--app-surface); font-size: 10px; font-weight: 700; }
.s-rank span { width: 12px; color: var(--app-muted); font: 9px "DM Mono", monospace; }
.s-rank b { margin-left: auto; color: var(--pk-yellow); font-size: 9.5px; }

/* Steps */
.pk-steps { display: grid; gap: 22px; }
.pk-step { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 60px; padding: 34px 48px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); }
.pk-step:nth-child(even) { grid-template-columns: 1fr auto; }
.pk-step:nth-child(even) .phone { order: 2; }
.pk-step-text { max-width: 470px; }
.pk-step-num { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: color-mix(in srgb, var(--pk-yellow) 16%, transparent); color: #e9b42a; font: 500 13px "DM Mono", monospace; }
html[data-theme="light"] .pk-step-num { color: #a77700; }
.pk-step-text h3 { margin: 18px 0 10px; font-size: clamp(22px, 2.5vw, 30px); line-height: 1.2; letter-spacing: -.045em; }
.pk-step-text p { color: var(--muted); font-size: 13px; line-height: 1.9; }
.pk-step-text b { color: var(--text); }
.pk-step-note { display: flex; gap: 10px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11.5px !important; }
.pk-step-note::before { content: "✳"; color: var(--accent); }

/* Modes */
.pk-modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.pk-mode { padding: 26px 26px 22px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); transition: transform .25s, border-color .25s; }
.pk-mode:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c, var(--accent)) 45%, var(--line)); }
.pk-mode-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px; border-radius: 13px; background: color-mix(in srgb, var(--c) 18%, transparent); font-size: 20px; }
.pk-mode h3 { margin: 6px 0 8px; font-size: 20px; letter-spacing: -.035em; }
.pk-mode p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.85; }
.pk-mode i { color: var(--text); }

/* Scoring */
.pk-score { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); overflow: hidden; }
.pk-score-col { padding: 26px 28px; }
.pk-score-col + .pk-score-col { border-left: 1px solid var(--line); }
.pk-score ul { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.pk-score li { display: flex; align-items: baseline; gap: 14px; color: var(--muted); font-size: 13px; }
.pk-score li b { flex: 0 0 34px; color: var(--text); font-family: "Unbounded", "Manrope", sans-serif; font-size: 17px; }
.pk-privacy { display: flex; gap: 16px; margin-top: 14px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); }
.pk-privacy h3 { margin: 2px 0 6px; font-size: 14px; }
.pk-privacy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.pk-tech .skill-card p { min-height: 78px; }

@media (max-width: 1000px) {
  .pk-hero { grid-template-columns: 1fr .8fr; gap: 20px; }
  .pk-hero-art { transform: scale(.9); }
  .pk-step { gap: 36px; padding: 30px; }
  .pk-tech .skill-card p { min-height: auto; }
}
@media (max-width: 720px) {
  .pk-hero { display: flex; flex-direction: column; align-items: stretch; min-height: auto; padding-top: 44px; padding-bottom: 50px; }
  .pk-brand img { width: 54px; height: 54px; border-radius: 15px; }
  .pk-hero-art { min-height: 0; padding: 20px 0; transform: none; }
  .phone-hero { width: 250px; }
  .pk-blob { width: 320px; height: 320px; }
  .pk-step, .pk-step:nth-child(even) { grid-template-columns: 1fr; justify-items: center; gap: 26px; padding: 26px 18px; }
  .pk-step:nth-child(even) .phone { order: 0; }
  .pk-step-text { max-width: none; }
  .pk-modes, .pk-score { grid-template-columns: 1fr; }
  .pk-score-col + .pk-score-col { border-left: 0; border-top: 1px solid var(--line); }
  .pk-score-col { padding: 22px 20px; }
  .pk-privacy { padding: 18px; }
}
