* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
html { background: #F4ECDC; }
body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink, #4A3B2F);
  overflow-x: hidden;
}
#root { min-height: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------------- Themes ---------------- */
.theme-everyone {
  --paper: #FBF4E4; --paper2: #F4E8CE; --ink: #4A3B2F; --muted: #93826C;
  --card: #FFFDF7; --brand: #D9734E; --buddy: #7FB85A; --ring: rgba(217,115,78,.25);
}
.theme-ryan {
  --paper: #EAF1FF; --paper2: #D9E6FF; --ink: #1E2A52; --muted: #6173A0;
  --card: #FFFFFF; --brand: #E6453F; --buddy: #2D6BE0; --ring: rgba(45,107,224,.22);
}
.theme-ashlynn {
  --paper: #FBEAF7; --paper2: #F0E0FF; --ink: #5A2D63; --muted: #A07AAB;
  --card: #FFFFFF; --brand: #EC5BA8; --buddy: #9B5DE0; --ring: rgba(155,93,224,.22);
}

.rp-root, .rp-screen { min-height: 100vh; min-height: 100dvh; }

.rp-screen {
  position: relative;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--paper) 0%, var(--paper2) 100%);
  overflow: hidden;
  padding: clamp(16px, 3vw, 40px);
}
.rp-screen::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,.035) 1.4px, transparent 1.6px);
  background-size: 26px 26px;
  opacity: .5;
}
.rp-screen > * { position: relative; z-index: 1; }

/* ---------------- Decor ---------------- */
.rp-decor { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.rp-decor-item { position: absolute; opacity: .8; }
@keyframes drift { 0%,100%{ transform: translateY(0) rotate(-6deg);} 50%{ transform: translateY(-16px) rotate(6deg);} }
@keyframes drift2 { 0%,100%{ transform: translateY(0) rotate(8deg);} 50%{ transform: translateY(18px) rotate(-6deg);} }
@keyframes twinkle { 0%,100%{ transform: scale(.7) rotate(0); opacity:.4;} 50%{ transform: scale(1.15) rotate(40deg); opacity:1;} }
.rp-drift { animation: drift 7s ease-in-out infinite; }
.rp-drift2 { animation: drift2 9s ease-in-out infinite; }
.rp-twinkle { animation: twinkle 3.4s ease-in-out infinite; }
.rp-twinkle2 { animation: twinkle 4.2s ease-in-out infinite .6s; }

/* ---------------- Shared motion ---------------- */
@keyframes bob { 0%,100%{ transform: translateY(0) rotate(-1.5deg);} 50%{ transform: translateY(-14px) rotate(1.5deg);} }
@keyframes wigglesoft { 0%,100%{ transform: rotate(-4deg);} 50%{ transform: rotate(4deg);} }
.bob { animation: bob 3.6s ease-in-out infinite; display: inline-block; }
.wiggle-soft { animation: wigglesoft 2.4s ease-in-out infinite; display: inline-block; transform-origin: bottom center; }

/* ---------------- Picker ---------------- */
.rp-picker-screen { display: flex; align-items: center; justify-content: center; }
.rp-picker-inner { width: 100%; max-width: 1000px; text-align: center; }
.rp-picker-title {
  font-family: "Baloo 2", sans-serif; font-weight: 800;
  font-size: clamp(30px, 6vw, 60px); color: var(--ink);
  margin: 0 0 clamp(20px, 4vw, 46px);
  text-shadow: 0 3px 0 rgba(255,255,255,.6);
}
.rp-picker-grid {
  display: grid; gap: clamp(16px, 3vw, 30px);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.rp-picker-card {
  background: var(--card);
  border-radius: 36px;
  padding: clamp(20px, 3vw, 36px) 18px clamp(18px, 3vw, 28px);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 16px 0 rgba(0,0,0,.06), 0 26px 44px rgba(0,0,0,.12);
  border: 5px solid #fff;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
  outline: none;
}
.rp-picker-card:hover { transform: translateY(-8px) scale(1.02); }
.rp-picker-card:active { transform: translateY(2px) scale(.98); }
.pick-ryan { background: linear-gradient(180deg,#EAF1FF,#fff); }
.pick-ashlynn { background: linear-gradient(180deg,#FBEAF7,#fff); }
.pick-everyone { background: linear-gradient(180deg,#FBF4E4,#fff); }
.rp-picker-char { height: 150px; display: flex; align-items: flex-end; justify-content: center; }
.rp-picker-name { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(24px,3vw,32px); color: var(--ink); }
.rp-picker-love { font-weight: 700; color: var(--muted); font-size: clamp(13px,1.6vw,16px); }
.rp-picker-hint { margin-top: clamp(20px,4vw,40px); font-weight: 800; color: var(--muted); font-size: clamp(15px,2vw,19px); }

/* ---------------- Home top bar ---------------- */
.rp-home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1100px; margin: 0 auto clamp(8px,2vw,16px); }
.rp-switch {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 999px; padding: 6px 16px 6px 6px;
  box-shadow: 0 8px 0 rgba(0,0,0,.05), 0 12px 22px rgba(0,0,0,.1);
  border: 3px solid #fff; transition: transform .15s;
}
.rp-switch:active { transform: scale(.96); }
.rp-switch-face { width: 44px; height: 44px; border-radius: 50%; background: var(--paper2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rp-switch-face svg { transform: translateY(2px); }
.rp-switch-name { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 18px; color: var(--ink); }
.rp-switch-swap { color: var(--brand); font-weight: 900; font-size: 18px; }
.rp-sound {
  width: 52px; height: 52px; border-radius: 50%; font-size: 24px;
  background: var(--card); box-shadow: 0 8px 0 rgba(0,0,0,.05), 0 12px 22px rgba(0,0,0,.1);
  border: 3px solid #fff; transition: transform .15s;
}
.rp-sound:active { transform: scale(.92); }
.rp-sound.off { opacity: .55; }

/* ---------------- Hero ---------------- */
.rp-hero {
  max-width: 1100px; margin: clamp(6px,2vw,20px) auto clamp(20px,4vw,40px);
  display: flex; align-items: center; justify-content: center; gap: clamp(10px,3vw,40px);
  flex-wrap: wrap;
}
.rp-hero-char { flex: 0 0 auto; }
.rp-hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 440px; }
.rp-hero-logo { display: flex; flex-direction: column; line-height: 1; }
.rp-logo-roly { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(34px,5.5vw,62px); color: var(--brand); text-shadow: 0 4px 0 rgba(255,255,255,.7); white-space: nowrap; }
.rp-logo-place { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(34px,5.5vw,62px); color: var(--ink); text-shadow: 0 4px 0 rgba(255,255,255,.7); }
.rp-bubble-greet {
  position: relative; background: var(--card); color: var(--ink);
  font-weight: 800; font-size: clamp(16px,2.2vw,22px);
  padding: 16px 22px; border-radius: 22px; border: 3px solid #fff;
  box-shadow: 0 10px 0 rgba(0,0,0,.05), 0 16px 28px rgba(0,0,0,.1);
}
.rp-bubble-greet::after {
  content: ""; position: absolute; left: 36px; bottom: -16px;
  border: 10px solid transparent; border-top-color: var(--card); border-bottom: 0;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.04));
}

/* ---------------- Activity grid ---------------- */
.rp-grid {
  max-width: 1100px; margin: 0 auto; display: grid; gap: clamp(16px,2.5vw,28px);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding-bottom: 40px;
}
.rp-card {
  position: relative; background: var(--card); border-radius: 32px;
  padding: clamp(22px,3vw,32px) 22px clamp(18px,2.5vw,26px);
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  border: 5px solid #fff;
  box-shadow: 0 14px 0 var(--ring), 0 22px 40px rgba(0,0,0,.12);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
  overflow: hidden;
}
.rp-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.rp-card > * { position: relative; }
.rp-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 18px 0 var(--ring), 0 30px 50px rgba(0,0,0,.16); }
.rp-card:active { transform: translateY(2px) scale(.99); }
.rp-card-medallion {
  width: 132px; height: 132px; border-radius: 50%;
  background: #fff; box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--accent) 22%, #fff);
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.rp-card-label { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(20px,2.4vw,26px); color: var(--ink); }
.rp-card-sub { font-weight: 700; color: var(--muted); font-size: clamp(13px,1.6vw,16px); }
.rp-card-go {
  margin-top: 12px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center; padding-left: 3px;
  box-shadow: 0 6px 0 color-mix(in srgb, var(--accent) 60%, #000 20%);
}
.rp-card-soon {
  position: absolute; top: 14px; right: 14px; background: var(--ink); color: #fff;
  font-weight: 800; font-size: 12px; padding: 4px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; opacity: .85;
}

/* ---------------- Activity ---------------- */
.rp-activity {
  position: relative; min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% -10%, var(--paper) 0%, var(--paper2) 100%);
  padding: clamp(14px,2.5vw,28px); display: flex; flex-direction: column; overflow: hidden;
}
.rp-activity::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(0,0,0,.035) 1.4px, transparent 1.6px);
  background-size: 26px 26px; opacity: .5;
}
.rp-activity > * { position: relative; z-index: 1; }
.rp-act-top { display: flex; align-items: center; gap: 16px; max-width: 1000px; margin: 0 auto; width: 100%; }
.rp-back {
  width: 56px; height: 56px; border-radius: 50%; background: var(--card);
  box-shadow: 0 8px 0 rgba(0,0,0,.06), 0 12px 22px rgba(0,0,0,.12); border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: transform .15s;
}
.rp-back:active { transform: scale(.92); }
.rp-back-arrow { font-size: 34px; font-weight: 900; color: var(--brand); line-height: 1; margin-top: -4px; }
.rp-act-title { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(20px,3vw,30px); color: var(--ink); flex: 1; }
.rp-progress-track { display: flex; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; max-width: 180px; justify-content: flex-end; }
.rp-pip { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px var(--ring); transition: all .3s; }
.rp-pip.on { background: var(--buddy); box-shadow: inset 0 0 0 0 transparent; transform: scale(1.1); }

.rp-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(10px,2vw,24px); max-width: 1000px; margin: 0 auto; width: 100%; padding: 10px 0; }
.rp-cat-wrap { display: flex; align-items: center; justify-content: center; transition: transform .35s cubic-bezier(.34,1.56,.64,1); min-height: 180px; }
.rp-cat-wrap.grow { transform: scale(1.07); }

.rp-prompt { display: flex; justify-content: center; }
.rp-thought {
  background: var(--card); border: 4px solid #fff; border-radius: 28px;
  padding: 10px 28px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 10px 0 rgba(0,0,0,.05), 0 16px 28px rgba(0,0,0,.12);
}
.rp-thought-label { font-family: "Baloo 2", sans-serif; font-weight: 700; color: var(--muted); font-size: clamp(16px,2.4vw,24px); }
.rp-thought-num { font-family: "Baloo 2", sans-serif; font-weight: 800; color: var(--brand); font-size: clamp(44px,8vw,72px); line-height: 1; }

/* ---------------- Number bubbles ---------------- */
.rp-bubbles {
  display: flex; flex-wrap: wrap; gap: clamp(10px,1.8vw,18px);
  justify-content: center; max-width: 760px; margin: 0 auto clamp(10px,3vw,30px); padding-top: 6px;
}
.rp-bubble {
  width: clamp(62px, 13vw, 92px); height: clamp(62px, 13vw, 92px); border-radius: 50%;
  background: var(--bub); color: #fff;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(28px,6vw,44px);
  border: 5px solid #fff;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--bub) 55%, #000 22%), 0 14px 22px rgba(0,0,0,.18);
  transition: transform .14s cubic-bezier(.34,1.56,.64,1), opacity .2s;
  display: flex; align-items: center; justify-content: center;
}
.rp-bubble:hover { transform: translateY(-5px) scale(1.05); }
.rp-bubble:active { transform: translateY(3px) scale(.95); }
.rp-bubble.hint { animation: hintpulse 1.3s ease-in-out infinite; }
@keyframes hintpulse { 0%,100%{ box-shadow: 0 8px 0 color-mix(in srgb, var(--bub) 55%, #000 22%), 0 14px 22px rgba(0,0,0,.18), 0 0 0 0 var(--ring);} 50%{ box-shadow: 0 8px 0 color-mix(in srgb, var(--bub) 55%, #000 22%), 0 14px 22px rgba(0,0,0,.18), 0 0 0 14px var(--ring);} }
.rp-bubble.done { background: #cdd3cf; box-shadow: 0 6px 0 #aab2ad, 0 10px 18px rgba(0,0,0,.12); opacity: .65; transform: scale(.9); color: #fff; }
.rp-bubble.wrong { animation: shake .42s; }
@keyframes shake { 0%,100%{ transform: translateX(0);} 20%{ transform: translateX(-9px) rotate(-5deg);} 40%{ transform: translateX(9px) rotate(5deg);} 60%{ transform: translateX(-7px) rotate(-4deg);} 80%{ transform: translateX(7px) rotate(4deg);} }

/* ---------------- Win / coming soon ---------------- */
.rp-win, .rp-soon { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.rp-soon { gap: 14px; }
.rp-soon-char { margin-bottom: 6px; }
.rp-win-title { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(28px,5vw,48px); color: var(--ink); }
.rp-win-sub { font-weight: 700; color: var(--muted); font-size: clamp(15px,2.2vw,20px); max-width: 360px; }
.rp-big-btn {
  margin-top: 10px; background: var(--brand); color: #fff;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(18px,2.6vw,24px);
  padding: 16px 36px; border-radius: 999px; border: 4px solid #fff;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--brand) 55%, #000 25%), 0 16px 26px rgba(0,0,0,.18);
  transition: transform .15s;
}
.rp-big-btn:active { transform: translateY(4px); box-shadow: 0 4px 0 color-mix(in srgb, var(--brand) 55%, #000 25%), 0 10px 18px rgba(0,0,0,.18); }

/* ---------------- Confetti burst ---------------- */
.rp-burst { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.rp-confetti { position: absolute; top: -40px; animation: fall linear forwards; }
@keyframes fall { 0%{ transform: translateY(-40px) rotate(0); opacity: 1;} 100%{ transform: translateY(104vh) rotate(540deg); opacity: .9;} }

/* ---------------- Ryan: comic superhero ---------------- */
.rp-comic-decor { z-index: 0; }
.rp-web { position: absolute; top: 0; pointer-events: none; opacity: .12; }
.rp-web-left { left: 0; }
.rp-web-right { right: 0; }
.rp-skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(90px, 15vh, 165px); opacity: .42; }
.rp-pow { position: absolute; filter: drop-shadow(0 6px 8px rgba(0,0,0,.16)); }
.rp-pow1 { top: 10%; left: 3%; }
.rp-pow2 { bottom: 7%; right: 4%; }
.rp-pow3 { bottom: 17%; left: 7%; }

.rp-comic .rp-logo-roly { color: #E6453F; -webkit-text-stroke: 2px #1E2A52; paint-order: stroke fill; text-shadow: 3px 3px 0 #2D6BE0; }
.rp-comic .rp-logo-place { color: #fff; -webkit-text-stroke: 2px #1E2A52; paint-order: stroke fill; text-shadow: 3px 3px 0 #2D6BE0; }

.rp-hero-team-wrap { flex: 0 0 auto; width: min(440px, 86vw); }
.rp-crew-row { display: flex; align-items: flex-end; justify-content: center; gap: clamp(2px, 1.5vw, 14px); width: 100%; }
.rp-crew-col { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1 1 0; min-width: 0; }
.rp-crew-col.col-center { flex: 1.32 1 0; }
.rp-crew-char { width: 100%; height: clamp(116px, 24vw, 185px); display: flex; align-items: flex-end; justify-content: center; }
.rp-crew-char .rp-member-pop, .rp-crew-char .bob { width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.rp-crew-char svg { max-width: 100%; height: auto; filter: drop-shadow(0 7px 8px rgba(0,0,0,.16)); }

.rp-greet-comic { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rp-greet-comic-sub { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(16px,2.2vw,22px); color: var(--ink); }

.rp-comic .rp-card { border: 4px solid #1E2A52; box-shadow: 6px 8px 0 #1E2A52, 0 22px 38px rgba(0,0,0,.14); }
.rp-comic .rp-card:hover { box-shadow: 8px 12px 0 #1E2A52, 0 30px 48px rgba(0,0,0,.18); }
.rp-comic .rp-card-go { box-shadow: 0 5px 0 #1E2A52; }
.rp-comic .rp-switch, .rp-comic .rp-sound, .rp-comic .rp-back { border-color: #1E2A52; }

/* ---------------- Crew (shared) ---------------- */
.rp-crew-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rp-member-pop { animation: heropop .55s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes heropop { 0% { transform: scale(.3) translateY(40px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }
.rp-crew-names { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.rp-name-chip { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 13px; padding: 4px 13px; border-radius: 999px; white-space: nowrap; }
.chip-comic { background: #fff; color: #1E2A52; border: 2.5px solid #1E2A52; box-shadow: 2px 3px 0 #1E2A52; }
.chip-sparkle { background: #fff; color: #8A3D86; border: 2.5px solid #EC5BA8; box-shadow: 0 4px 0 rgba(236,91,168,.3); }

/* ---------------- Section label ---------------- */
.rp-section-head { display: flex; align-items: center; gap: 14px; max-width: 1100px; margin: clamp(6px,2vw,14px) auto clamp(12px,2vw,20px); }
.rp-section-line { flex: 1; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 16%, transparent); }
.rp-section-label { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(15px,2.2vw,21px); color: var(--ink); text-transform: uppercase; letter-spacing: .05em; }

/* ---------------- Ashlynn: sparkle ---------------- */
.rp-sparkle-decor { z-index: 0; }
.rp-glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.rp-glow1 { width: 340px; height: 340px; background: #FFC6E8; top: -70px; left: -50px; }
.rp-glow2 { width: 300px; height: 300px; background: #D9C2FF; bottom: 30px; right: -40px; }
.rp-castle { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(96px,16vh,180px); opacity: .4; }
.rp-sparkle .rp-logo-roly { color: #EC5BA8; text-shadow: 0 4px 0 rgba(255,255,255,.8), 3px 5px 0 rgba(155,93,224,.22); }
.rp-sparkle .rp-logo-place { color: #9B5DE0; text-shadow: 0 4px 0 rgba(255,255,255,.8), 3px 5px 0 rgba(236,91,168,.2); }
.rp-greet-sparkle { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.rp-sparkle-badge {
  position: relative; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(120deg, #EC5BA8, #9B5DE0); color: #fff;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: clamp(22px,3.4vw,34px);
  padding: 12px 28px; border-radius: 999px; border: 4px solid #fff;
  box-shadow: 0 10px 0 rgba(155,93,224,.22), 0 18px 30px rgba(155,93,224,.3);
}
.rp-badge-spark { position: absolute; }
.rp-badge-spark.s1 { top: -12px; right: -4px; }
.rp-badge-spark.s2 { bottom: -10px; left: 16px; }
.rp-sparkle .rp-card { border-color: #fff; box-shadow: 0 14px 0 rgba(236,91,168,.16), 0 22px 40px rgba(155,93,224,.18); }
.rp-sparkle .rp-card:hover { box-shadow: 0 18px 0 rgba(236,91,168,.22), 0 30px 50px rgba(155,93,224,.22); }

@media (max-width: 560px) {
  .rp-hero { flex-direction: column; gap: 6px; }
  .rp-hero-text { align-items: center; text-align: center; }
  .rp-bubble-greet::after { left: 50%; margin-left: -10px; }
}
