*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --ink: #2a1b3d;
  --pink: #e0245e;
  --blue: #2b59c3;
  --yellow: #ffd43b;
  --green: #1f9d55;
  --purple: #8a3ffc;
  --bg: #fff7fb;
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { margin: 0; background: var(--bg); font-family: 'Nunito', sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent; }
a { color: var(--pink); }
a:hover { color: var(--blue); }
button { -webkit-appearance: none; appearance: none; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, .pc-tool:focus-within { outline: 3px solid var(--blue); outline-offset: 3px; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes swing { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.page { max-width: 1200px; margin: 0 auto; padding: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Shared grid: columns collapse to one on narrow phones instead of overflowing */
.grid { display: grid; }
.grid-facts { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.grid-girls { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 18px; }
.grid-games { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.grid-crafts { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 18px; }
.grid-gallery { grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 14px; }

/* NAV */
.nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 14px; background: #fff; border-radius: 999px; box-shadow: 0 4px 0 #f3c6da; position: sticky; top: 10px; z-index: 10; }
.brand { font-family: Rubik, sans-serif; font-weight: 900; font-size: 20px; color: var(--pink); text-decoration: none; }
.brand:hover { color: var(--pink); }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 800; }
.pill-pink { background: #ffe3ef; }
.pill-blue { background: #e3ecff; }
.pill-yellow { background: #fff3c4; }
.pill-green { background: #e2f7e9; }
.pill-purple { background: #f0e4ff; }
.nav-tools { display: flex; gap: 8px; align-items: center; }
.lang-btn { width: 56px; height: 44px; padding: 0; border: 3px solid #fff; border-radius: 12px; overflow: hidden; cursor: pointer; box-shadow: 0 0 0 2px #f3c6da; background: #fff; display: flex; }
.lang-btn svg { width: 100%; height: 100%; display: block; }
html[lang="uk"] .flag-ua, html[lang="en"] .flag-gb { display: none; }
.sound-btn { min-height: 44px; padding: 0 16px; border: none; border-radius: 999px; background: var(--blue); color: #fff; font-family: Rubik, sans-serif; font-weight: 700; font-size: 15px; cursor: pointer; }
@media (max-width: 760px) {
  .nav { border-radius: 28px; position: static; }
  .nav-links { order: 3; width: 100%; }
  html { scroll-padding-top: 16px; }
}

/* HERO */
.hero { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; align-items: center; padding: 36px 28px; border-radius: 40px; background: var(--pink); color: #fff; position: relative; overflow: hidden; }
.hero-copy, .hero-art { position: relative; z-index: 1; }
.badge { display: inline-flex; gap: 8px; align-items: center; background: #fff; color: var(--blue); padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 15px; }
.badge-flag { width: 14px; height: 10px; flex: none; background: linear-gradient(var(--blue) 50%, var(--yellow) 50%); border-radius: 2px; }
.hero h1 { font-family: Rubik, sans-serif; font-weight: 900; font-size: clamp(40px, 7vw, 76px); line-height: 1; margin: 16px 0 12px; text-wrap: pretty; }
.hero p { font-size: 21px; line-height: 1.45; margin: 0 0 22px; max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-play { min-height: 56px; display: inline-flex; align-items: center; gap: 8px; padding: 0 28px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-family: Rubik, sans-serif; font-weight: 900; font-size: 20px; text-decoration: none; box-shadow: 0 6px 0 #c99a00; }
.btn-play:hover { color: var(--ink); }
.btn-web { min-height: 56px; padding: 0 24px; border-radius: 999px; border: 3px solid #fff; background: transparent; color: #fff; font-family: Rubik, sans-serif; font-weight: 700; font-size: 18px; cursor: pointer; }
.hero-art { aspect-ratio: 1; max-width: 420px; width: 100%; justify-self: center; animation: bob 3s ease-in-out infinite; }
.hero-slot { width: 100%; height: 100%; border: 8px solid #fff; }
.hero-web { position: absolute; right: -80px; top: -80px; width: 460px; opacity: .18; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .hero-art, .spider svg { animation: none; } }

/* Image slots */
.slot { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: 22px; }
.slot-circle { border-radius: 50%; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.slot-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; text-align: center; font-size: 13px; line-height: 1.3; background: rgba(42, 27, 61, .04); border: 1.5px dashed rgba(42, 27, 61, .22); border-radius: inherit; color: rgba(42, 27, 61, .55); }
.slot-empty svg { width: 22px; height: 22px; opacity: .7; }
.hero .slot-empty, .mail .slot-empty { color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .35); }
.hero .slot-empty { border: none; }

/* Sections */
.section { padding: 48px 0 8px; }
.section-last { padding-bottom: 40px; }
.section h2 { font-family: Rubik, sans-serif; font-weight: 900; font-size: clamp(32px, 5vw, 48px); margin: 0 0 6px; }
.section h2.spaced { margin-bottom: 20px; }
.lead { font-size: 19px; margin: 0 0 20px; }
.ink-blue { color: var(--blue); }
.ink-pink { color: var(--pink); }
.ink-green { color: var(--green); }
.ink-purple { color: var(--purple); }

/* Facts */
.fact { min-height: 190px; border: none; border-radius: 28px; padding: 22px; text-align: left; cursor: pointer; color: var(--ink); font-family: Nunito, sans-serif; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 6px 0 rgba(42, 27, 61, .12); transition: transform .15s; }
.fact:active { transform: translateY(3px); }
.fact-num { font-family: Rubik, sans-serif; font-weight: 900; font-size: 44px; line-height: 1; }
.fact-text { font-weight: 800; font-size: 20px; line-height: 1.35; }
.fact-text.flipped { animation: pop-in .25s ease-out; }

/* Girls */
.girl { background: #fff; border-radius: 30px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.girl-photo { aspect-ratio: 4 / 3; width: 100%; }
.girl-body { padding: 0 6px 6px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.girl-name { font-family: Rubik, sans-serif; font-weight: 900; font-size: 24px; }
.girl-about { font-size: 17px; line-height: 1.45; flex: 1; }
.btn-vote { margin-top: 6px; min-height: 48px; border: none; border-radius: 999px; color: #fff; font-family: Rubik, sans-serif; font-weight: 700; font-size: 17px; cursor: pointer; }

/* Games: shared */
.game-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.game-title { font-family: Rubik, sans-serif; font-weight: 900; font-size: 26px; }
.chips { display: flex; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; font-weight: 800; }
.chip-yellow { background: var(--yellow); color: var(--ink); }
.chip-white { background: #fff; color: var(--blue); }
.chip-pink { background: #ffe3ef; }
.chip-green { background: #e2f7e9; color: var(--ink); }
.btn-start { min-height: 56px; padding: 0 30px; border: none; border-radius: 999px; background: var(--yellow); color: var(--ink); font-family: Rubik, sans-serif; font-weight: 900; font-size: 20px; cursor: pointer; box-shadow: 0 6px 0 #c99a00; }

/* Catch */
.card-catch { background: var(--blue); color: #fff; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.catch-field { position: relative; height: 300px; border-radius: 24px; background: #1d3f93; overflow: hidden; }
.catch-web { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .25; }
.spider { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border: none; background: none; padding: 0; cursor: pointer; transition: left .25s, top .25s; }
.spider svg { width: 64px; height: 64px; animation: swing .6s ease-in-out infinite; }
.catch-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; }
.catch-msg { font-family: Rubik, sans-serif; font-weight: 700; font-size: 22px; }

/* Quiz */
.card-quiz { background: #fff; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 6px 0 #f3c6da; }
.quiz-q { display: flex; flex-direction: column; gap: 12px; }
.quiz-text { font-family: Rubik, sans-serif; font-weight: 700; font-size: 23px; line-height: 1.3; min-height: 60px; }
.quiz-opt { min-height: 58px; border: 3px solid #f3c6da; border-radius: 20px; background: #fff8fb; font-family: Nunito, sans-serif; font-weight: 800; font-size: 19px; color: var(--ink); cursor: pointer; text-align: left; padding: 0 18px; }
.quiz-opt.right { background: #d6f5e1; border-color: var(--green); }
.quiz-opt.wrong { background: #ffe3ef; border-color: var(--pink); }
.quiz-feedback { font-weight: 800; font-size: 18px; min-height: 26px; color: var(--blue); }
.quiz-done { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px 0; }
.quiz-score { font-family: Rubik, sans-serif; font-weight: 900; font-size: 56px; color: var(--pink); }
.quiz-msg { font-size: 21px; font-weight: 800; }
.btn-again { min-height: 52px; padding: 0 26px; border: none; border-radius: 999px; background: var(--pink); color: #fff; font-family: Rubik, sans-serif; font-weight: 700; font-size: 18px; cursor: pointer; }

/* Coloring */
.card-color { background: #fff3c4; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.color-hint { font-size: 17px; }
.palette { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 48px; height: 48px; border-radius: 50%; border: 3px solid rgba(42, 27, 61, .2); cursor: pointer; }
.swatch.active { border: 5px solid var(--ink); }
.color-sheet { width: 100%; max-height: 300px; background: #fff; border-radius: 24px; }
.color-sheet [data-action] { cursor: pointer; transition: fill .15s, stroke .15s; }
.btn-reset { align-self: flex-start; min-height: 46px; padding: 0 20px; border: none; border-radius: 999px; background: var(--ink); color: #fff; font-family: Rubik, sans-serif; font-weight: 700; font-size: 16px; cursor: pointer; }

/* Crafts */
.craft { background: #fff; border-radius: 30px; padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 6px 0 #c8ecd5; }
.craft-title { font-family: Rubik, sans-serif; font-weight: 900; font-size: 23px; }
.craft-need { font-weight: 800; font-size: 15px; color: var(--green); }
.craft ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 17px; line-height: 1.4; }

/* Gallery */
.gal { aspect-ratio: 1; background: #fff; padding: 8px; border-radius: 22px; box-shadow: 0 6px 0 #e2d2ff; }
.gal .slot { border-radius: 16px; }

/* Fan mail */
.mail { background: var(--purple); color: #fff; border-radius: 40px; padding: 30px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .mail { grid-template-columns: minmax(0, 1fr); padding: 20px; } }
.mail h2 { margin: 0; }
.pc-draw { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pc-draw p { font-size: 19px; line-height: 1.45; margin: 0; }
.mail-card { display: flex; flex-direction: column; gap: 12px; background: #fff; color: var(--ink); border-radius: 28px; padding: 22px; }
.field { font-weight: 800; font-size: 17px; display: flex; flex-direction: column; gap: 6px; }
.field input, .field textarea { border: 3px solid #e2d2ff; border-radius: 16px; font-family: Nunito, sans-serif; font-size: 18px; color: var(--ink); background: #fff; }
.field input { min-height: 50px; padding: 0 14px; }
.field textarea { padding: 12px 14px; resize: vertical; }
.btn-send { min-height: 56px; border: none; border-radius: 999px; background: var(--pink); color: #fff; font-family: Rubik, sans-serif; font-weight: 900; font-size: 20px; cursor: pointer; box-shadow: 0 6px 0 #a3123f; }

.footer { text-align: center; padding: 10px 0 30px; font-size: 15px; opacity: .75; }

/* Memory pairs */
.card-memory { background: #f0e4ff; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chip-white-purple { background: #fff; color: var(--purple); }
.mem-msg { font-size: 17px; min-height: 24px; }
.mem-msg.won { font-family: Rubik, sans-serif; font-weight: 700; font-size: 20px; color: var(--purple); }
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mem-card { aspect-ratio: 1; border: none; border-radius: 18px; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(28px, 7vw, 40px); line-height: 1; box-shadow: 0 5px 0 #c9b0f5;
  background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.35' stroke-width='1.5'%3E%3Ccircle cx='20' cy='20' r='7'/%3E%3Ccircle cx='20' cy='20' r='14'/%3E%3Cpath d='M20 0v40M0 20h40M6 6l28 28M34 6 6 34'/%3E%3C/g%3E%3C/svg%3E") center / 80% no-repeat; }
.mem-card.up { background: #fff; cursor: default; }
.mem-card.matched { background: #d6f5e1; box-shadow: 0 5px 0 #9fdcb6; }
.mem-card.just span { display: inline-block; animation: pop-in .2s ease-out; }
.btn-purple { background: var(--purple); align-self: center; }

/* Counting */
.card-count { background: #e2f7e9; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chip-white-green { background: #fff; color: var(--green); }
.count-body { display: flex; flex-direction: column; gap: 12px; }
.count-q { font-family: Rubik, sans-serif; font-weight: 700; font-size: 21px; }
.count-field { position: relative; height: 210px; border-radius: 24px; overflow: hidden;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%231f9d55' stroke-opacity='.15' stroke-width='1.5'%3E%3Ccircle cx='150' cy='150' r='50'/%3E%3Ccircle cx='150' cy='150' r='100'/%3E%3Cpath d='M150 0v300M0 150h300M0 0l300 300M300 0 0 300'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.count-spider { position: absolute; width: 52px; height: 52px; animation: pop-in .3s ease-out backwards; }
.count-spider svg { width: 100%; height: 100%; display: block; }
.count-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.count-opt { min-height: 64px; border: 3px solid #b9e6c9; border-radius: 20px; background: #fff; font-family: Rubik, sans-serif; font-weight: 900; font-size: 30px; color: var(--ink); cursor: pointer; }
.count-opt.right { background: #d6f5e1; border-color: var(--green); }
.count-opt.wrong { background: #ffe3ef; border-color: var(--pink); }
.count-feedback { color: var(--green); }
.btn-green { background: var(--green); }

/* Playground page */
.games-hero { margin-top: 22px; padding: 30px 28px; border-radius: 40px; background: var(--blue); color: #fff; display: flex; flex-direction: column; gap: 12px; }
.games-hero-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.games-hero h1 { font-family: Rubik, sans-serif; font-weight: 900; font-size: clamp(36px, 6vw, 64px); line-height: 1; margin: 0; }
.games-hero p { font-size: 20px; margin: 0; }
.btn-home { min-height: 48px; display: inline-flex; align-items: center; gap: 6px; padding: 0 20px; border-radius: 999px; border: 3px solid #fff; color: #fff; font-family: Rubik, sans-serif; font-weight: 700; font-size: 17px; text-decoration: none; }
.btn-home:hover { color: var(--yellow); border-color: var(--yellow); }
.game-menu { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.menu-chip { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 800; text-decoration: none; }
.menu-chip:hover { background: var(--yellow); color: var(--ink); }
.game-card { scroll-margin-top: 90px; }
.chip-blue { background: #e3ecff; color: var(--blue); }
.ink-orange { color: #e0612a; }
.btn-orange { background: #e0612a; align-self: center; }

/* Home: playground teaser */
.teaser { background: var(--yellow); border-radius: 40px; padding: 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; align-items: center; box-shadow: 0 6px 0 #c99a00; }
.teaser-copy { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.teaser h2 { color: var(--ink); margin: 0; }
.teaser p { font-size: 19px; line-height: 1.45; margin: 0; }
.teaser .btn-play { background: var(--pink); color: #fff; box-shadow: 0 6px 0 #a3123f; }
.teaser .btn-play:hover { color: #fff; }
.teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.teaser-tile:last-child:nth-child(3n + 1) { grid-column: 2; } /* a lone last tile sits in the middle */
.teaser-tile { min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; border-radius: 20px; background: #fff; color: var(--ink); text-align: center; font-weight: 800; font-size: 14px; line-height: 1.2; text-decoration: none; box-shadow: 0 4px 0 rgba(42, 27, 61, .12); transition: transform .15s; }
.teaser-tile:hover { color: var(--ink); transform: translateY(-3px); }
.teaser-emoji { font-size: 30px; line-height: 1; }

/* Copy the spider (Simon) */
.card-simon { background: #2a1b3d; color: #fff; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.simon-msg { font-family: Rubik, sans-serif; font-weight: 700; font-size: 19px; min-height: 48px; }
.simon-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 300px; width: 100%; align-self: center; }
.simon-pad { aspect-ratio: 1; border: none; border-radius: 26px; cursor: pointer; opacity: .55; transition: opacity .12s, transform .12s, box-shadow .12s;
  background-size: 70%; background-position: center; background-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.45' stroke-width='1.5'%3E%3Ccircle cx='20' cy='20' r='7'/%3E%3Ccircle cx='20' cy='20' r='14'/%3E%3Cpath d='M20 0v40M0 20h40M6 6l28 28M34 6 6 34'/%3E%3C/g%3E%3C/svg%3E"); }
.pad-0 { background-color: var(--pink); border-top-left-radius: 70px; }
.pad-1 { background-color: var(--blue); border-top-right-radius: 70px; }
.pad-2 { background-color: var(--yellow); border-bottom-left-radius: 70px; }
.pad-3 { background-color: var(--green); border-bottom-right-radius: 70px; }
.simon-pad.lit { opacity: 1; transform: scale(1.05); box-shadow: 0 0 0 6px rgba(255, 255, 255, .5), 0 0 30px rgba(255, 255, 255, .6); }
.simon-pads.waiting .simon-pad { cursor: default; }
#simon-start { align-self: center; }

/* Spider-sense */
.card-odd { background: #ffe9dc; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chip-white-orange { background: #fff; color: #e0612a; }
.odd-grid { display: grid; gap: 4px; background: #fff; border-radius: 24px; padding: 10px; }
.odd-spider { aspect-ratio: 1; border: none; background: none; padding: 0; cursor: pointer; border-radius: 12px; }
.odd-spider svg { width: 100%; height: 100%; display: block; }
.odd-spider.flip svg { transform: rotate(180deg); }
.odd-spider.found { background: #d6f5e1; box-shadow: 0 0 0 3px var(--green); }
.odd-spider.shake { animation: shake .35s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
#odd-msg.won { color: #e0612a; }

/* Picture puzzle */
.card-puzzle { background: #e3ecff; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.puzzle-preview { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; border: 3px solid #fff; }
.chips:has(.puzzle-preview) { align-items: center; }
.puzzle-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 100%; max-width: 330px; aspect-ratio: 1; align-self: center; padding: 4px; background: #fff; border-radius: 22px; transition: gap .3s; }
.puzzle-tile { border: none; padding: 0; cursor: pointer; border-radius: 10px; background-size: 300% 300%; background-color: #f0f0f5; }
.puzzle-tile.sel { box-shadow: 0 0 0 4px var(--pink); position: relative; z-index: 1; transform: scale(.94); }
.puzzle-board.solved { gap: 0; }
.puzzle-board.solved .puzzle-tile { border-radius: 0; cursor: default; }
#puzzle-msg.won { color: var(--blue); }
#puzzle-next { align-self: center; background: var(--blue); }

/* Make a heroine */
.card-heroine { background: #fff; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 6px 0 #f3c6da; }
.heroine-stage { background: linear-gradient(#ffe3ef, #f0e4ff); border-radius: 24px; padding: 10px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.heroine-figure svg { width: 180px; height: 234px; display: block; }
.heroine-name { font-family: Rubik, sans-serif; font-weight: 900; font-size: 22px; color: var(--pink); text-align: center; }
.h-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.h-tab { min-height: 38px; padding: 0 12px; border: none; border-radius: 999px; background: #ffe3ef; color: var(--ink); font-family: Nunito, sans-serif; font-weight: 800; font-size: 15px; cursor: pointer; }
.h-tab.active { background: var(--pink); color: #fff; }
.h-options { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; align-items: center; }
.h-options .swatch { width: 42px; height: 42px; }
.h-opt { min-height: 46px; min-width: 46px; padding: 0 14px; border: 3px solid #f3c6da; border-radius: 16px; background: #fff8fb; font-family: Nunito, sans-serif; font-weight: 800; font-size: 16px; color: var(--ink); cursor: pointer; }
.h-opt span { font-size: 24px; }
.h-opt.active { border-color: var(--pink); background: #ffe3ef; }
.swatch-none { background: #fff linear-gradient(135deg, transparent 45%, var(--pink) 45%, var(--pink) 55%, transparent 55%) !important; }
.h-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.h-actions .btn-again { min-height: 46px; font-size: 16px; padding: 0 18px; }

/* Postcard studio */
.pc-canvas-wrap { position: relative; width: 100%; }
#pc-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1748 / 1240; background: #fff; border-radius: 20px; touch-action: none; cursor: crosshair; box-shadow: 0 6px 0 #6a24d6; }
.pc-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #b9a8d6; font-family: Rubik, sans-serif; font-weight: 700; font-size: clamp(20px, 4vw, 34px); pointer-events: none; }
.pc-tools { display: flex; flex-direction: column; gap: 10px; }
.pc-palette { gap: 8px; }
.pc-palette .swatch { width: 40px; height: 40px; border-color: rgba(255, 255, 255, .5); }
.pc-palette .swatch.active { border: 4px solid #fff; box-shadow: 0 0 0 3px var(--ink); }
.pc-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pc-sizes { display: flex; gap: 6px; }
.pc-size { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .15); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pc-size span { border-radius: 50%; display: block; box-shadow: 0 0 0 2px rgba(42, 27, 61, .25); }
.pc-size.active { border-color: #fff; background: rgba(255, 255, 255, .3); }
.pc-tool { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; border: 3px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .12); color: #fff; font-family: Nunito, sans-serif; font-weight: 800; font-size: 15px; cursor: pointer; }
.pc-tool.active { background: #fff; color: var(--purple); border-color: #fff; }
.pc-back-title { font-family: Rubik, sans-serif; font-weight: 900; font-size: 22px; color: var(--purple); }
.btn-send { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; }
.btn-send:disabled { opacity: .6; cursor: progress; }
.pc-done { font-weight: 800; font-size: 17px; color: var(--green); min-height: 24px; }
.pc-note { font-size: 14px; line-height: 1.45; color: #6b5d7b; }

/* Radio: nav + home banner */
.pill-orange { background: #ffe9dc; }
.radio-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; padding: 22px 26px; border-radius: 40px; background: var(--ink); color: #fff; text-decoration: none; box-shadow: 0 6px 0 #120a1c; }
.radio-banner:hover { color: #fff; }
.radio-banner-disc { width: 84px; height: 84px; flex: none; border-radius: 50%; background: radial-gradient(circle, var(--pink) 0 22%, #111 23% 100%); box-shadow: inset 0 0 0 6px #333; animation: spin 4s linear infinite; position: relative; }
.radio-banner-disc::after { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.22' stroke-width='.8'%3E%3Ccircle cx='50' cy='50' r='20'/%3E%3Ccircle cx='50' cy='50' r='32'/%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Cpath d='M50 0v100M0 50h100M15 15l70 70M85 15 15 85'/%3E%3C/g%3E%3C/svg%3E") center / 100% no-repeat; }
.radio-banner-copy { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
.radio-banner-title { font-family: Rubik, sans-serif; font-weight: 900; font-size: clamp(26px, 4vw, 36px); }
.radio-banner-text { font-size: 18px; opacity: .9; }
.radio-banner-btn { min-height: 52px; display: inline-flex; align-items: center; gap: 8px; padding: 0 24px; border-radius: 999px; background: #ff7a3d; color: #fff; font-family: Rubik, sans-serif; font-weight: 900; font-size: 18px; box-shadow: 0 5px 0 #b64a17; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Radio page */
.radio-player { margin-top: 22px; padding: 28px; border-radius: 40px; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.22' stroke-width='.8'%3E%3Ccircle cx='50' cy='50' r='20'/%3E%3Ccircle cx='50' cy='50' r='32'/%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Cpath d='M50 0v100M0 50h100M15 15l70 70M85 15 15 85'/%3E%3C/g%3E%3C/svg%3E") right -120px top -120px / 520px no-repeat; color: #fff; display: flex; flex-direction: column; gap: 22px; }
.radio-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between; }
.radio-top h1 { font-family: Rubik, sans-serif; font-weight: 900; font-size: clamp(36px, 6vw, 64px); line-height: 1; margin: 0 0 8px; color: #ff9a6b; }
.radio-top p { font-size: 19px; margin: 0; max-width: 46ch; opacity: .9; }
.radio-deck { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; align-items: center; }
@media (max-width: 720px) { .radio-deck { grid-template-columns: minmax(0, 1fr); justify-items: center; } .radio-info { width: 100%; } .radio-player { padding: 20px; } }
.record { width: min(300px, 70vw); aspect-ratio: 1; border-radius: 50%; position: relative;
  background: repeating-radial-gradient(circle, #1b1b1f 0 3px, #26262c 3px 5px); box-shadow: 0 0 0 8px #3a2c4f, 0 14px 30px rgba(0, 0, 0, .45);
  animation: spin 3.5s linear infinite; animation-play-state: paused; }
.record::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.22' stroke-width='.8'%3E%3Ccircle cx='50' cy='50' r='20'/%3E%3Ccircle cx='50' cy='50' r='32'/%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Cpath d='M50 0v100M0 50h100M15 15l70 70M85 15 15 85'/%3E%3C/g%3E%3C/svg%3E") center / 100% no-repeat; }
.record-label { position: absolute; inset: 31%; border-radius: 50%; background: var(--pink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg stroke='%232a1b3d' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M10 18 24 28M54 18 40 28M6 34h16M58 34H42M10 52l14-12M54 52 40 40'/%3E%3C/g%3E%3Ccircle cx='32' cy='36' r='14' fill='%23e0245e'/%3E%3Ccircle cx='32' cy='20' r='9' fill='%23e0245e'/%3E%3Ccircle cx='28' cy='19' r='3' fill='%23fff'/%3E%3Ccircle cx='36' cy='19' r='3' fill='%23fff'/%3E%3C/svg%3E") center / 62% no-repeat; box-shadow: 0 0 0 6px #ffd43b; }
body.is-playing .record { animation-play-state: running; }
.radio-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.radio-now { font-weight: 800; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--yellow); }
.radio-title { font-family: Rubik, sans-serif; font-weight: 900; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; overflow-wrap: anywhere; }
.radio-sub { font-size: 16px; opacity: .75; min-height: 22px; }
.radio-seek { --p: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 12px; margin: 10px 0 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right, #ff7a3d var(--p), rgba(255, 255, 255, .2) var(--p)); }
.radio-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 5px solid #ff7a3d; }
.radio-seek::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 5px solid #ff7a3d; }
.radio-times { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; opacity: .8; }
.radio-controls { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.rc { width: 60px; height: 60px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #fff; font-size: 22px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.rc-small { width: 50px; height: 50px; font-size: 20px; }
.rc-small.active { background: #fff; border-color: #fff; }
.rc-play { width: 84px; height: 84px; border: none; background: #ff7a3d; font-size: 30px; box-shadow: 0 6px 0 #b64a17; }
.dancer { width: 56px; height: 56px; margin-left: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg stroke='%232a1b3d' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M10 18 24 28M54 18 40 28M6 34h16M58 34H42M10 52l14-12M54 52 40 40'/%3E%3C/g%3E%3Ccircle cx='32' cy='36' r='14' fill='%23e0245e'/%3E%3Ccircle cx='32' cy='20' r='9' fill='%23e0245e'/%3E%3Ccircle cx='28' cy='19' r='3' fill='%23fff'/%3E%3Ccircle cx='36' cy='19' r='3' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat; opacity: 0; transition: opacity .3s; }
body.is-playing .dancer { opacity: 1; animation: dance .5s ease-in-out infinite alternate; }
@keyframes dance { from { transform: translateY(0) rotate(-12deg); } to { transform: translateY(-10px) rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .record, .radio-banner-disc, body.is-playing .dancer { animation: none; } }
.radio-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 10px; }
.track { min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 8px; border: none; border-radius: 20px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; box-shadow: 0 4px 0 #f0dfd3; font-family: Nunito, sans-serif; }
.track:hover { background: #fff3ec; }
.track.current { background: #ffe9dc; box-shadow: 0 4px 0 #ff9a6b; }
.track-num { width: 44px; height: 44px; flex: none; border-radius: 50%; background: #ffe9dc; color: #e0612a; display: flex; align-items: center; justify-content: center; font-family: Rubik, sans-serif; font-weight: 900; font-size: 16px; }
.track.current .track-num { background: #ff7a3d; color: #fff; }
.track-title { flex: 1; min-width: 0; font-weight: 800; font-size: 17px; line-height: 1.25; }
.track-title small { display: block; font-weight: 600; font-size: 13px; opacity: .6; }
.track-dur { font-weight: 800; font-size: 14px; opacity: .6; }
.eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.eq i { width: 4px; background: #fff; border-radius: 2px; height: 40%; }
body.is-playing .eq i { animation: eq .8s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s; height: 80%; }
.eq i:nth-child(3) { animation-delay: -.6s; height: 60%; }
@keyframes eq { from { height: 20%; } to { height: 100%; } }
.radio-credit { margin: 22px 0 0; font-size: 14px; opacity: .7; text-align: center; }

/* Web swing */
.card-swing { background: var(--pink); color: #fff; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.chip-white-pink { background: #fff; color: var(--pink); }
.swing-field { position: relative; aspect-ratio: 6 / 5; border-radius: 24px; overflow: hidden; background: #2b59c3; }
.swing-canvas { display: block; width: 100%; height: 100%; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.swing-canvas:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.swing-lives { position: absolute; top: 8px; left: 10px; font-size: 18px; letter-spacing: 2px; pointer-events: none; }
.swing-overlay { background: rgba(42, 27, 61, .45); }
.swing-overlay .catch-msg { font-size: 19px; }

/* Join the dots */
.card-dots { background: #fff; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 6px 0 #d9c4fb; }
.chip-purple { background: #f0e4ff; color: var(--purple); }
.dots-board { position: relative; width: 100%; max-width: 340px; aspect-ratio: 1; align-self: center; border-radius: 24px; background: #faf6ff; }
.dots-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dots-done { animation: pop-in .4s ease-out; transform-box: fill-box; transform-origin: center; }
.dot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 0; border: 3px solid var(--purple); border-radius: 50%; background: #fff; color: var(--ink); font-family: Rubik, sans-serif; font-weight: 900; font-size: 15px; line-height: 1; cursor: pointer; }
.dot::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.dot.hit { background: var(--purple); color: #fff; cursor: default; }
.dot.hint { background: var(--yellow); animation: dot-pulse 1s ease-in-out infinite; }
.dot.shake { border-color: var(--pink); animation: shake .35s; }
@keyframes dot-pulse { 50% { transform: scale(1.25); } }

/* Letter spiders */
.card-letters { background: var(--yellow); border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 6px 0 #c99a00; }
.letters-body { display: flex; flex-direction: column; gap: 12px; }
.letters-target { display: flex; align-items: center; gap: 14px; }
.letters-big { flex: none; width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; border-radius: 22px; background: #fff; color: var(--pink); font-family: Rubik, sans-serif; font-weight: 900; font-size: 50px; box-shadow: 0 4px 0 #c99a00; }
.letters-hint { display: flex; flex-direction: column; gap: 2px; }
.letters-q { font-weight: 800; font-size: 17px; }
.letters-word { font-family: Rubik, sans-serif; font-weight: 700; font-size: 22px; }
.letters-word b { color: var(--pink); font-weight: 900; }
.letters-field { position: relative; height: 240px; border-radius: 24px; overflow: hidden;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23c99a00' stroke-opacity='.18' stroke-width='1.5'%3E%3Ccircle cx='150' cy='150' r='50'/%3E%3Ccircle cx='150' cy='150' r='100'/%3E%3Cpath d='M150 0v300M0 150h300M0 0l300 300M300 0 0 300'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.letter-spider { position: absolute; width: 84px; height: 84px; margin: -42px 0 0 -42px; padding: 0; border: none; border-radius: 50%; background: none; cursor: pointer; animation: crawl 2.2s ease-in-out infinite alternate; }
.letter-spider svg { width: 100%; height: 100%; display: block; }
.letter-badge { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); color: #fff; font-family: Rubik, sans-serif; font-weight: 900; font-size: 24px; line-height: 1; pointer-events: none; }
.letter-spider.shake { animation: shake .35s; }
.letter-spider.found { animation: none; transform: scale(1.15); background: #d6f5e1; box-shadow: 0 0 0 4px var(--green); }
@keyframes crawl { from { transform: translate(-6px, -4px) rotate(-6deg); } to { transform: translate(6px, 4px) rotate(6deg); } }
.btn-blue { background: var(--blue); }

/* Web maze */
.card-maze { background: #ffe3ef; border-radius: 32px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.maze-sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.maze-size { min-height: 38px; padding: 0 12px; border: none; border-radius: 999px; background: #fff; color: var(--ink); font-family: Nunito, sans-serif; font-weight: 800; font-size: 15px; cursor: pointer; }
.maze-size.active { background: var(--pink); color: #fff; }
#maze-msg.won { color: var(--pink); }
.maze-svg { display: block; width: 100%; max-width: 360px; aspect-ratio: 1; align-self: center; touch-action: none; cursor: pointer; border-radius: 50%; }
.maze-svg:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.maze-bg { fill: #fff; }
.maze-walls { fill: none; stroke: var(--purple); stroke-width: .12; stroke-linecap: round; }
.maze-trail { fill: none; stroke: #ff8fc6; stroke-width: .18; stroke-linecap: round; stroke-linejoin: round; }
.maze-me { transition: transform .12s ease-out; }
.maze-svg .cheer { animation: maze-hop .5s ease-in-out infinite; }
@keyframes maze-hop { 50% { transform: translateY(-.25px); } }
#maze-next { align-self: center; }

@media (prefers-reduced-motion: reduce) { .letter-spider, .dot.hint, .maze-svg .cheer { animation: none; } .maze-me { transition: none; } }
