Toca Boca Candy Stickers
Joyful Scandinavian toybox sticker collage with chunky bouncy pill cards, confetti shapes, and candy-bright color blocks.
Inspired by Toca Boca ↗
WHY THIS AESTHETIC IS UNIQUE
Celebrates pure tactile play with oversized rounded cards, thick ink-bordered sticker badges, bouncy hover physics, and an interactive playmat where visitors stamp stickers directly onto the page.
BEST FOR
TAGS
COLOR PALETTE (CLICK TO COPY HEX)
TYPOGRAPHY
- Display
- Bricolage Grotesque, sans-serif
- Body
- Nunito, -apple-system, sans-serif
- Mono
- Space Mono, ui-monospace, monospace
- Scale
- Bouncy high-personality Bricolage Grotesque headings (36–58px) with thick 16px Nunito labels and chunky uppercase sticker badges.
ARCHITECTURE & MOBILE NOTES
LAYOUT
Chunky 24px-radius cards framed with 3px plum ink outlines and crisp offset shadows, surrounding a live interactive sticker-stamp playmat and character customizer.
INTERACTION
Pick from 5 candy SVG stickers (star, rainbow, cat, crown, pizza) and tap/click anywhere on the playmat to stamp rotated stickers; live toybox character accessory toggles.
MOBILE
Oversized >=48px tactile sticker buttons and bouncy cards fit comfortably at 390px with zero overflow and immediate tap feedback.
AI AGENT GUARDRAILS
DO
- Use thick 2.5–3px plum-ink outlines with crisp solid offset shadows (0 6px 0 #1E1633) for tactile toybox depth.
- Give interactive buttons a satisfying press-down translateY transition on active state.
- Keep color blocks joyful and high-contrast while anchoring text in dark plum ink.
DON'T
- Do not use thin corporate 1px gray borders or muted monochrome minimalism.
- Do not create tiny fiddly hit targets—every toy control should feel chunky and pressable.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>KandiBox — Playful Sticker Playmat & Toybox World</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@700;800&family=Nunito:wght@600;800&family=Space+Mono:wght@700&display=swap" rel="stylesheet">
<style>
:root {
--bg: #FFFDF5;
--surface: #FFE9F3;
--ink: #1E1633;
--accent: #FF3B8B;
--muted: #6B5E85;
--lemon: #FFE14D;
--mint: #4BE3B0;
--sky: #59C8FF;
--tangerine: #FF8C42;
--border: 3.5px solid #1E1633;
--shadow-chunky: 0 6px 0 #1E1633;
}
*, *::before, *::after {
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
background-color: var(--bg);
color: var(--ink);
font-family: 'Nunito', system-ui, -apple-system, sans-serif;
line-height: 1.5;
overflow-x: hidden;
}
body {
background-image:
radial-gradient(circle at 12% 14%, rgba(255, 225, 77, 0.32) 0 42px, transparent 43px),
radial-gradient(circle at 90% 20%, rgba(89, 200, 255, 0.25) 0 58px, transparent 59px),
radial-gradient(circle at 84% 78%, rgba(75, 227, 176, 0.24) 0 48px, transparent 49px);
background-repeat: no-repeat;
}
h1, h2, h3, .toy-head {
font-family: 'Bricolage Grotesque', system-ui, sans-serif;
margin: 0;
line-height: 1.06;
}
.mono {
font-family: 'Space Mono', ui-monospace, monospace;
}
a {
color: inherit;
text-decoration: none;
}
button {
font-family: inherit;
cursor: pointer;
color: inherit;
border: none;
background: transparent;
}
.container {
width: 100%;
max-width: 1120px;
margin: 0 auto;
padding: 0 20px;
}
/* Chunky Bouncy Buttons */
.toy-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
min-height: 46px;
min-width: 46px;
padding: 10px 20px;
border: var(--border);
border-radius: 999px;
background: var(--lemon);
font-weight: 800;
font-size: 0.96rem;
box-shadow: 0 5px 0 var(--ink);
transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.toy-btn:hover {
transform: translateY(-2px);
box-shadow: 0 7px 0 var(--ink);
}
.toy-btn:active {
transform: translateY(3px);
box-shadow: 0 2px 0 var(--ink);
}
.toy-btn.pink {
background: var(--accent);
color: #FFF;
}
.toy-btn.mint {
background: var(--mint);
}
.toy-btn.white {
background: #FFF;
}
/* Header */
header {
position: sticky;
top: 0;
z-index: 60;
background: rgba(255, 253, 245, 0.94);
backdrop-filter: blur(8px);
border-bottom: 3px solid var(--ink);
}
.nav-bar {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 74px;
gap: 16px;
}
.brand {
display: inline-flex;
align-items: center;
gap: 10px;
font-family: 'Bricolage Grotesque', sans-serif;
font-size: 1.6rem;
font-weight: 800;
}
.brand-pill {
width: 40px;
height: 40px;
border-radius: 14px;
background: var(--accent);
border: 3px solid var(--ink);
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow: 0 3px 0 var(--ink);
transform: rotate(-6deg);
}
.nav-links {
display: flex;
align-items: center;
gap: 18px;
}
.nav-links a {
font-weight: 800;
min-height: 44px;
display: inline-flex;
align-items: center;
padding: 6px 12px;
border-radius: 999px;
transition: background 0.15s;
}
.nav-links a:hover {
background: var(--surface);
}
.menu-toggle {
display: none;
width: 46px;
height: 46px;
border: var(--border);
border-radius: 14px;
background: var(--lemon);
box-shadow: 0 3px 0 var(--ink);
align-items: center;
justify-content: center;
}
.mobile-nav {
display: none;
flex-direction: column;
gap: 10px;
padding: 14px 20px 20px;
background: var(--surface);
border-top: 3px solid var(--ink);
}
.mobile-nav.open {
display: flex;
}
.mobile-nav a {
min-height: 44px;
display: flex;
align-items: center;
padding: 10px 14px;
border: 3px solid var(--ink);
border-radius: 16px;
background: #FFF;
font-weight: 800;
}
/* Hero */
.hero {
padding: 40px 0 34px;
text-align: center;
}
.sticker-kicker {
display: inline-flex;
align-items: center;
gap: 8px;
background: var(--mint);
border: 3px solid var(--ink);
border-radius: 999px;
padding: 6px 16px;
font-weight: 800;
font-size: 0.88rem;
box-shadow: 0 4px 0 var(--ink);
transform: rotate(-2deg);
margin-bottom: 18px;
}
.hero h1 {
font-size: clamp(2.5rem, 6vw, 4.4rem);
max-width: 15ch;
margin: 0 auto 14px;
}
.pink-pop {
color: var(--accent);
}
.hero p {
color: var(--muted);
font-size: 1.12rem;
max-width: 50ch;
margin: 0 auto 24px;
}
/* Interactive Sticker Stamp Playmat */
.section {
padding: 36px 0;
}
.toybox-card {
background: var(--surface);
border: var(--border);
border-radius: 34px;
padding: 24px;
box-shadow: 0 10px 0 var(--ink);
}
.card-top {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 14px;
margin-bottom: 18px;
}
.sticker-tray {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-bottom: 16px;
}
.sticker-pick {
min-height: 52px;
min-width: 52px;
padding: 8px 14px;
border: 3px solid var(--ink);
border-radius: 20px;
background: #FFF;
display: inline-flex;
align-items: center;
gap: 8px;
font-weight: 800;
box-shadow: 0 4px 0 var(--ink);
transition: transform 0.12s, background 0.12s;
}
.sticker-pick.active {
background: var(--lemon);
transform: translateY(-2px) rotate(-2deg);
}
.playmat {
position: relative;
height: 340px;
border-radius: 26px;
border: var(--border);
background-color: #FFFDF5;
background-image:
radial-gradient(rgba(255, 59, 139, 0.16) 2px, transparent 2px);
background-size: 26px 26px;
overflow: hidden;
cursor: copy;
user-select: none;
}
.playmat-hint {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
font-family: 'Bricolage Grotesque', sans-serif;
font-size: 1.4rem;
color: rgba(107, 94, 133, 0.45);
text-align: center;
padding: 20px;
}
.stamped-item {
position: absolute;
transform: translate(-50%, -50%) scale(0.4);
pointer-events: none;
animation: popIn 0.24s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
filter: drop-shadow(0 4px 0 rgba(30, 22, 51, 0.25));
}
@keyframes popIn {
to {
transform: translate(-50%, -50%) scale(1) rotate(var(--rot, 0deg));
}
}
.mat-actions {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: 12px;
margin-top: 16px;
}
/* World-Builder Character Customizer */
.builder-grid {
display: grid;
grid-template-columns: 0.95fr 1.05fr;
gap: 28px;
align-items: center;
}
.doll-stage {
background: var(--sky);
border: var(--border);
border-radius: 30px;
padding: 28px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-shadow: 0 8px 0 var(--ink);
min-height: 310px;
}
.customizer-controls {
background: #FFF;
border: var(--border);
border-radius: 30px;
padding: 26px;
box-shadow: 0 8px 0 var(--ink);
display: flex;
flex-direction: column;
gap: 18px;
}
.control-group label {
display: block;
font-family: 'Space Mono', monospace;
font-size: 0.78rem;
color: var(--muted);
margin-bottom: 8px;
}
.choice-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.choice-chip {
min-height: 44px;
padding: 8px 14px;
border: 3px solid var(--ink);
border-radius: 16px;
background: var(--bg);
font-weight: 800;
font-size: 0.9rem;
}
.choice-chip.active {
background: var(--accent);
color: #FFF;
}
footer {
margin-top: 48px;
background: var(--ink);
color: var(--bg);
padding: 36px 0 44px;
border-top: 5px solid var(--accent);
}
.footer-flex {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 16px;
}
@media (max-width: 820px) {
.builder-grid {
grid-template-columns: 1fr;
}
.nav-links, .nav-cta {
display: none;
}
.menu-toggle {
display: inline-flex;
}
.playmat {
height: 280px;
}
}
</style>
</head>
<body>
<header>
<div class="container nav-bar">
<a href="#top" class="brand">
<span class="brand-pill" aria-hidden="true">
<svg width="22" height="22" viewBox="0 0 24 24" fill="#FFE14D" stroke="#1E1633" stroke-width="2.2">
<polygon points="12,2 15,9 22,9.5 16.5,14 18.2,21 12,17.2 5.8,21 7.5,14 2,9.5 9,9"/>
</svg>
</span>
<span>KandiBox</span>
</a>
<nav class="nav-links" aria-label="Main">
<a href="#playmat-zone">Sticker Playmat</a>
<a href="#builder-zone">Character Toybox</a>
</nav>
<div class="nav-cta">
<a href="#playmat-zone" class="toy-btn pink">Stamp Stickers!</a>
</div>
<button class="menu-toggle" id="menuToggle" aria-expanded="false" aria-controls="mobileNav" aria-label="Open menu">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="#1E1633" stroke-width="3" stroke-linecap="round">
<path d="M4 7h16M4 12h16M4 17h16"/>
</svg>
</button>
</div>
<div class="mobile-nav" id="mobileNav">
<a href="#playmat-zone">Sticker Playmat</a>
<a href="#builder-zone">Character Toybox</a>
</div>
</header>
<main id="top">
<section class="hero">
<div class="container">
<span class="sticker-kicker">★ No rules, no high scores — just joyful play!</span>
<h1>Build a <span class="pink-pop">candy-colored</span> sticker world.</h1>
<p>
Pick chunky vinyl stickers to stamp all over the playmat, then mix and match silly outfits for your own Scandinavian toybox character.
</p>
</div>
</section>
<section class="section" id="playmat-zone">
<div class="container">
<div class="toybox-card">
<div class="card-top">
<div>
<span class="mono" style="font-size:0.78rem; color:var(--accent);">INTERACTIVE PLAYMAT</span>
<h2 style="font-size:clamp(1.7rem, 4vw, 2.4rem);">Tap anywhere to stamp a sticker!</h2>
</div>
<span class="mono" id="stickerCount" style="background:#FFF; border:3px solid var(--ink); border-radius:999px; padding:6px 14px; font-size:0.82rem;">3 STAMPED</span>
</div>
<div class="sticker-tray" role="radiogroup" aria-label="Choose a sticker">
<button class="sticker-pick active" data-sticker="star" aria-checked="true">★ Star</button>
<button class="sticker-pick" data-sticker="rainbow" aria-checked="false">🌈 Rainbow</button>
<button class="sticker-pick" data-sticker="cat" aria-checked="false">🐱 Cat</button>
<button class="sticker-pick" data-sticker="crown" aria-checked="false">👑 Crown</button>
<button class="sticker-pick" data-sticker="pizza" aria-checked="false">🍕 Pizza</button>
</div>
<div class="playmat" id="playmat" tabindex="0" role="application" aria-label="Sticker stamp board. Click or tap to stamp the chosen sticker.">
<div class="playmat-hint" id="matHint">Click or tap anywhere on the mat to stamp!</div>
</div>
<div class="mat-actions">
<div style="display:flex; flex-wrap:wrap; gap:10px;">
<button class="toy-btn mint" id="scatterBtn">Surprise Scatter</button>
<button class="toy-btn white" id="undoStickerBtn">Undo</button>
</div>
<button class="toy-btn pink" id="clearMatBtn">Clear Playmat</button>
</div>
</div>
</div>
</section>
<section class="section" id="builder-zone">
<div class="container">
<div style="margin-bottom:22px;">
<span class="mono" style="font-size:0.78rem; color:var(--accent);">WORLD-BUILDER TOYBOX</span>
<h2 style="font-size:clamp(1.8rem, 4vw, 2.6rem);">Mix & Match Your Buddy</h2>
</div>
<div class="builder-grid">
<div class="doll-stage">
<svg id="buddySvg" width="220" height="230" viewBox="0 0 220 230" fill="none" role="img" aria-label="Customizable toybox character">
<!-- Shadow -->
<ellipse cx="110" cy="214" rx="54" ry="10" fill="rgba(30,22,51,0.18)"/>
<!-- Shirt / Body -->
<rect id="buddyShirt" x="62" y="132" width="96" height="72" rx="34" fill="#FF3B8B" stroke="#1E1633" stroke-width="5"/>
<!-- Shirt Stripe -->
<rect x="65" y="162" width="90" height="14" fill="#FFE14D" stroke="#1E1633" stroke-width="3"/>
<!-- Arms -->
<circle cx="52" cy="166" r="14" fill="#FFD6BA" stroke="#1E1633" stroke-width="4.5"/>
<circle cx="168" cy="166" r="14" fill="#FFD6BA" stroke="#1E1633" stroke-width="4.5"/>
<!-- Head -->
<circle cx="110" cy="96" r="46" fill="#FFD6BA" stroke="#1E1633" stroke-width="5"/>
<!-- Rosy Cheeks -->
<circle cx="80" cy="106" r="7" fill="#FF85B3" opacity="0.7"/>
<circle cx="140" cy="106" r="7" fill="#FF85B3" opacity="0.7"/>
<!-- Eyes -->
<circle cx="93" cy="94" r="5" fill="#1E1633"/>
<circle cx="127" cy="94" r="5" fill="#1E1633"/>
<!-- Smile -->
<path d="M97 110c6 8 20 8 26 0" stroke="#1E1633" stroke-width="4.5" stroke-linecap="round"/>
<!-- Dynamic Hat / Hair Layer -->
<g id="buddyHat"></g>
<!-- Dynamic Glasses Layer -->
<g id="buddyGlasses"></g>
</svg>
<strong id="buddyName" class="toy-head" style="font-size:1.35rem; margin-top:8px; background:#FFF; border:3px solid var(--ink); border-radius:999px; padding:4px 16px;">Momo the Star Baker</strong>
</div>
<div class="customizer-controls">
<div class="control-group">
<label>1. PICK A HAT OR HAIR</label>
<div class="choice-row" data-part="hat">
<button class="choice-chip active" data-val="beanie">Mint Beanie</button>
<button class="choice-chip" data-val="crown">Gold Crown</button>
<button class="choice-chip" data-val="puffs">Space Puffs</button>
</div>
</div>
<div class="control-group">
<label>2. SWEATER COLOR</label>
<div class="choice-row" data-part="shirt">
<button class="choice-chip active" data-val="#FF3B8B">Candy Pink</button>
<button class="choice-chip" data-val="#4BE3B0">Mint Fizz</button>
<button class="choice-chip" data-val="#FF8C42">Tangerine</button>
<button class="choice-chip" data-val="#9B72FF">Grape Pop</button>
</div>
</div>
<div class="control-group">
<label>3. FUNNY GLASSES</label>
<div class="choice-row" data-part="glasses">
<button class="choice-chip active" data-val="none">No Glasses</button>
<button class="choice-chip" data-val="round">Round Specs</button>
<button class="choice-chip" data-val="shades">Star Shades</button>
</div>
</div>
<button class="toy-btn" id="randomBuddyBtn">🎲 Randomize Buddy</button>
</div>
</div>
</div>
</section>
</main>
<footer>
<div class="container footer-flex">
<div>
<strong class="toy-head" style="font-size:1.5rem;">KandiBox Studio</strong>
<div style="color:#C9BFE0; font-size:0.92rem;">Stockholm-inspired digital toybox • Made for playful curiosity</div>
</div>
<div class="mono" style="font-size:0.78rem; color:var(--lemon);">ZERO ADS • INFINITE STICKERS</div>
</div>
</footer>
<script>
// Mobile Nav
const menuToggle = document.getElementById('menuToggle');
const mobileNav = document.getElementById('mobileNav');
menuToggle.addEventListener('click', () => {
const open = mobileNav.classList.toggle('open');
menuToggle.setAttribute('aria-expanded', String(open));
});
mobileNav.querySelectorAll('a').forEach(a => {
a.addEventListener('click', () => {
mobileNav.classList.remove('open');
menuToggle.setAttribute('aria-expanded', 'false');
});
});
// Sticker SVG Catalog
const stickerSVGs = {
star: `<svg width="68" height="68" viewBox="0 0 72 72" fill="none"><polygon points="36,6 45,25 66,27 50,41 54,62 36,52 18,62 22,41 6,27 27,25" fill="#FFE14D" stroke="#1E1633" stroke-width="4" stroke-linejoin="round"/><circle cx="30" cy="34" r="3" fill="#1E1633"/><circle cx="42" cy="34" r="3" fill="#1E1633"/><path d="M32 41c2 3 6 3 8 0" stroke="#1E1633" stroke-width="2.6" stroke-linecap="round"/></svg>`,
rainbow: `<svg width="78" height="58" viewBox="0 0 84 62" fill="none"><path d="M12 48a30 30 0 0160 0" stroke="#FF3B8B" stroke-width="9" stroke-linecap="round"/><path d="M20 48a22 22 0 0144 0" stroke="#FFE14D" stroke-width="8" stroke-linecap="round"/><path d="M28 48a14 14 0 0128 0" stroke="#59C8FF" stroke-width="8" stroke-linecap="round"/><circle cx="14" cy="48" r="9" fill="#FFF" stroke="#1E1633" stroke-width="3.5"/><circle cx="70" cy="48" r="9" fill="#FFF" stroke="#1E1633" stroke-width="3.5"/></svg>`,
cat: `<svg width="68" height="68" viewBox="0 0 72 72" fill="none"><polygon points="16,32 18,12 32,24" fill="#FF8C42" stroke="#1E1633" stroke-width="3.8" stroke-linejoin="round"/><polygon points="56,32 54,12 40,24" fill="#FF8C42" stroke="#1E1633" stroke-width="3.8" stroke-linejoin="round"/><circle cx="36" cy="40" r="22" fill="#FF8C42" stroke="#1E1633" stroke-width="4"/><circle cx="28" cy="38" r="3.2" fill="#1E1633"/><circle cx="44" cy="38" r="3.2" fill="#1E1633"/><polygon points="36,43 32,47 40,47" fill="#FF3B8B"/></svg>`,
crown: `<svg width="72" height="58" viewBox="0 0 76 62" fill="none"><path d="M10 48L16 18L30 32L38 12L46 32L60 18L66 48Z" fill="#FFE14D" stroke="#1E1633" stroke-width="4" stroke-linejoin="round"/><circle cx="38" cy="36" r="4.5" fill="#FF3B8B"/><circle cx="23" cy="38" r="3.5" fill="#59C8FF"/><circle cx="53" cy="38" r="3.5" fill="#4BE3B0"/></svg>`,
pizza: `<svg width="68" height="68" viewBox="0 0 72 72" fill="none"><path d="M14 20Q36 8 58 20L36 62Z" fill="#FFE14D" stroke="#1E1633" stroke-width="4" stroke-linejoin="round"/><path d="M12 20Q36 6 60 20" stroke="#FF8C42" stroke-width="9" stroke-linecap="round"/><circle cx="32" cy="32" r="5" fill="#FF3B8B" stroke="#1E1633" stroke-width="2.5"/><circle cx="44" cy="35" r="4.5" fill="#FF3B8B" stroke="#1E1633" stroke-width="2.5"/><circle cx="36" cy="47" r="4.5" fill="#FF3B8B" stroke="#1E1633" stroke-width="2.5"/></svg>`
};
let activeSticker = 'star';
const playmat = document.getElementById('playmat');
const matHint = document.getElementById('matHint');
const stickerCount = document.getElementById('stickerCount');
const stampedNodes = [];
function updateCount() {
stickerCount.textContent = `${stampedNodes.length} STAMPED`;
matHint.style.opacity = stampedNodes.length > 0 ? '0' : '1';
}
function stampAt(xPct, yPct, type) {
const el = document.createElement('div');
el.className = 'stamped-item';
const rot = (Math.random() * 28 - 14).toFixed(1);
el.style.left = `${xPct}%`;
el.style.top = `${yPct}%`;
el.style.setProperty('--rot', `${rot}deg`);
el.innerHTML = stickerSVGs[type];
playmat.appendChild(el);
stampedNodes.push(el);
updateCount();
}
playmat.addEventListener('click', (e) => {
const rect = playmat.getBoundingClientRect();
const xPct = ((e.clientX - rect.left) / rect.width) * 100;
const yPct = ((e.clientY - rect.top) / rect.height) * 100;
stampAt(xPct, yPct, activeSticker);
});
document.querySelectorAll('.sticker-pick').forEach(btn => {
btn.addEventListener('click', () => {
activeSticker = btn.dataset.sticker;
document.querySelectorAll('.sticker-pick').forEach(b => {
const active = b === btn;
b.classList.toggle('active', active);
b.setAttribute('aria-checked', String(active));
});
});
});
document.getElementById('undoStickerBtn').addEventListener('click', () => {
const last = stampedNodes.pop();
if (last) last.remove();
updateCount();
});
document.getElementById('clearMatBtn').addEventListener('click', () => {
while (stampedNodes.length) stampedNodes.pop().remove();
updateCount();
});
document.getElementById('scatterBtn').addEventListener('click', () => {
const keys = Object.keys(stickerSVGs);
for (let i = 0; i < 4; i++) {
const key = keys[Math.floor(Math.random() * keys.length)];
stampAt(14 + Math.random() * 72, 18 + Math.random() * 64, key);
}
});
// Seed 3 starter stickers
stampAt(24, 48, 'rainbow');
stampAt(52, 42, 'cat');
stampAt(78, 56, 'star');
// Character Toybox Customizer
const hatSVGs = {
beanie: '<path d="M64 82c0-28 20-44 46-44s46 16 46 44Z" fill="#4BE3B0" stroke="#1E1633" stroke-width="5"/><rect x="58" y="72" width="104" height="16" rx="8" fill="#FFE14D" stroke="#1E1633" stroke-width="4.5"/><circle cx="110" cy="32" r="10" fill="#FF3B8B" stroke="#1E1633" stroke-width="4"/>',
crown: '<path d="M74 62L80 28L98 44L110 22L122 44L140 28L146 62Z" fill="#FFE14D" stroke="#1E1633" stroke-width="4.5" stroke-linejoin="round"/>',
puffs: '<circle cx="66" cy="54" r="22" fill="#1E1633"/><circle cx="154" cy="54" r="22" fill="#1E1633"/><path d="M68 78c8-24 76-24 84 0" fill="#1E1633"/>'
};
const glassesSVGs = {
none: '',
round: '<circle cx="93" cy="94" r="14" fill="rgba(255,255,255,0.45)" stroke="#1E1633" stroke-width="4"/><circle cx="127" cy="94" r="14" fill="rgba(255,255,255,0.45)" stroke="#1E1633" stroke-width="4"/><line x1="107" y1="94" x2="113" y2="94" stroke="#1E1633" stroke-width="4"/>',
shades: '<rect x="75" y="83" width="32" height="22" rx="8" fill="#1E1633"/><rect x="113" y="83" width="32" height="22" rx="8" fill="#1E1633"/><line x1="107" y1="92" x2="113" y2="92" stroke="#1E1633" stroke-width="4"/><circle cx="91" cy="94" r="4" fill="#FFE14D"/><circle cx="129" cy="94" r="4" fill="#FFE14D"/>'
};
const buddyNames = ['Momo the Star Baker', 'Pippa the Cloud Skater', 'Bobo the Pizza Captain', 'Lulu the Sticker Mayor'];
const buddyState = { hat: 'beanie', shirt: '#FF3B8B', glasses: 'none' };
const buddyHat = document.getElementById('buddyHat');
const buddyShirt = document.getElementById('buddyShirt');
const buddyGlasses = document.getElementById('buddyGlasses');
const buddyName = document.getElementById('buddyName');
function renderBuddy() {
buddyHat.innerHTML = hatSVGs[buddyState.hat];
buddyShirt.setAttribute('fill', buddyState.shirt);
buddyGlasses.innerHTML = glassesSVGs[buddyState.glasses];
}
document.querySelectorAll('.choice-row').forEach(row => {
const part = row.dataset.part;
row.querySelectorAll('.choice-chip').forEach(chip => {
chip.addEventListener('click', () => {
buddyState[part] = chip.dataset.val;
row.querySelectorAll('.choice-chip').forEach(c => c.classList.toggle('active', c === chip));
renderBuddy();
});
});
});
document.getElementById('randomBuddyBtn').addEventListener('click', () => {
document.querySelectorAll('.choice-row').forEach(row => {
const chips = Array.from(row.querySelectorAll('.choice-chip'));
const pick = chips[Math.floor(Math.random() * chips.length)];
pick.click();
});
buddyName.textContent = buddyNames[Math.floor(Math.random() * buddyNames.length)];
});
renderBuddy();
</script>
</body>
</html>