/* Cute Kids Games: night-sky arcade. Chunky stickers on deep purple. */
@font-face { font-family: Fredoka; src: url(/fonts/fredoka.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: Nunito; src: url(/fonts/nunito.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #1b1446; --bg2: #2a1f6b; --card: #fffdf7; --ink: #1d1740; --soft: #5c5684;
  --on: #fff; --on-soft: #cfc9f5; --line: #1d1740;
  --sun: #ffd23f; --pink: #ff5d8f; --sky: #3ddcff; --lime: #a6f04f; --grape: #8b5cf6;
  --r: 22px; --pop: 5px 5px 0 var(--line);
  --head: Fredoka, ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: Nunito, ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 600 17px/1.55 var(--body); color: var(--on); background: var(--bg);
  background-image: radial-gradient(900px 500px at 85% -10%, #5b2bd6 0, transparent 60%), radial-gradient(700px 500px at -10% 20%, #b3246f55 0, transparent 60%),
    radial-gradient(2px 2px at 20% 30%, #fff8 50%, transparent 51%), radial-gradient(2px 2px at 70% 60%, #fff6 50%, transparent 51%), radial-gradient(1.5px 1.5px at 45% 85%, #fff7 50%, transparent 51%);
  background-attachment: fixed; min-height: 100vh; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); }
h1, h2, h3 { font-family: var(--head); line-height: 1.1; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6.5vw, 4.2rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 600; }
.tiny { font-size: .82rem; color: var(--on-soft); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--sun); color: var(--ink); padding: 8px 14px; border-radius: 10px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; font: 700 1rem/1 var(--head); color: var(--ink); background: var(--sun);
  border: 3px solid var(--line); border-radius: 999px; padding: .7em 1.2em; text-decoration: none; cursor: pointer; box-shadow: 3px 3px 0 var(--line);
  transition: transform .12s, box-shadow .12s; white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--line); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--line); }
.btn.small { font-size: .9rem; padding: .55em .95em; border-width: 2px; box-shadow: 2px 2px 0 var(--line); }
.btn.big { font-size: 1.2rem; padding: .8em 1.5em; }
.btn.huge { font-size: clamp(1.1rem, 3.5vw, 1.6rem); padding: .85em 1.6em; box-shadow: var(--pop); }
.btn.ghost { background: #fff; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--sky); text-decoration: underline; cursor: pointer; }
.link.danger { color: #ff9aa8; }

/* header */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(14px, 4vw, 40px);
  background: #1b1446e6; backdrop-filter: blur(10px); border-bottom: 2px solid #ffffff1a; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 1.35rem var(--head); }
.logo b { color: var(--sun); font-weight: 700; }
.top nav { display: flex; align-items: center; gap: clamp(8px, 2vw, 22px); }
.top nav > a:not(.me-chip) { color: #fff; text-decoration: none; font-family: var(--head); font-weight: 500; }
.top nav > a:not(.me-chip):hover { color: var(--sun); }
.me-chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 4px;
  text-decoration: none; font: 600 .9rem var(--head); box-shadow: 2px 2px 0 var(--line); max-width: 46vw; }
.me-chip .nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); font-size: 18px; flex: none; }
.av.big { width: 84px; height: 84px; font-size: 48px; border: 3px solid var(--line); }
@media (max-width: 560px) { .logo span { font-size: 1.05rem; } .top nav > a[href="/about/"] { display: none; } }

/* layout */
main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(14px, 4vw, 40px) 40px; }
.block { margin-top: clamp(36px, 7vw, 72px); }

/* hero */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 20px; padding-top: clamp(28px, 6vw, 70px); }
.kicker { display: inline-block; margin: 0 0 14px; background: var(--lime); color: var(--ink); font: 600 .9rem var(--head); padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); transform: rotate(-2deg); }
.hero h1 { text-shadow: 4px 4px 0 var(--grape); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--on-soft); max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.hero-art { position: relative; aspect-ratio: 1; max-height: 420px; }
.float { position: absolute; display: grid; place-items: center; width: 34%; aspect-ratio: 1; font-size: clamp(2.4rem, 7vw, 4.6rem); border-radius: 30%; border: 4px solid var(--line);
  box-shadow: 6px 6px 0 var(--line); animation: bob 5s ease-in-out infinite; }
.f1 { left: 4%; top: 6%; background: var(--grape); rotate: -8deg; } .f2 { right: 6%; top: 0; background: var(--pink); rotate: 6deg; animation-delay: -1.2s; }
.f3 { left: 30%; top: 34%; background: var(--sun); rotate: 3deg; animation-delay: -2.3s; z-index: 2; } .f4 { left: 0; bottom: 2%; background: var(--sky); rotate: 9deg; animation-delay: -3.1s; }
.f5 { right: 2%; bottom: 8%; background: var(--lime); rotate: -10deg; animation-delay: -.6s; width: 26%; } .f6 { right: 34%; bottom: -4%; background: #fff; rotate: -4deg; animation-delay: -4s; width: 22%; font-size: clamp(1.6rem, 4vw, 2.6rem); }
@keyframes bob { 50% { transform: translateY(-14px); } }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero-art { max-height: 240px; aspect-ratio: 2; order: -1; } .float { width: 22%; } .f3 { left: 40%; top: 30%; } .f6 { right: 26%; } }

/* game cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(16px, 3vw, 28px); grid-template-columns: repeat(2, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { position: relative; }
.card > a { display: flex; flex-direction: column; height: 100%; background: var(--card); color: var(--ink); text-decoration: none; border: 4px solid var(--line); border-radius: var(--r);
  box-shadow: 7px 7px 0 var(--c, var(--sun)); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.card > a:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 11px 11px 0 var(--c, var(--sun)); }
.shot { display: block; aspect-ratio: 16 / 10; background: var(--c); overflow: hidden; border-bottom: 4px solid var(--line); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card > a:hover .shot img { transform: scale(1.05); }
.tag { position: absolute; top: 14px; left: 14px; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 3px 12px; font: 600 .8rem var(--head); box-shadow: 2px 2px 0 var(--line); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.card-name { font: 700 clamp(1.25rem, 2.6vw, 1.6rem)/1.1 var(--head); }
.card-text { color: var(--soft); font-size: .95rem; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.best { font: 600 .85rem var(--head); color: var(--soft); }
.cards.three .card-text { display: none; }
@media (max-width: 860px) { .cards.three { grid-template-columns: repeat(2, 1fr); } .cards.three li:nth-child(3) { display: none; } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } .cards.three { grid-template-columns: 1fr 1fr; gap: 12px; } .cards.three .card-foot { display: none; } .cards.three .tag { display: none; } }

/* perks */
.perks ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.perks li { background: #ffffff12; border: 2px solid #ffffff2b; border-radius: var(--r); padding: 16px 14px; text-align: center; }
.perks span { font-size: 2rem; display: block; } .perks strong { font: 600 1.05rem var(--head); display: block; } .perks em { font-style: normal; font-size: .85rem; color: var(--on-soft); }
@media (max-width: 860px) { .perks ul { grid-template-columns: repeat(2, 1fr); } .perks li:last-child { grid-column: 1 / -1; } }

/* moods */
.mood-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mood-list a { display: block; height: 100%; background: var(--bg2); border: 2px solid #ffffff2b; border-radius: var(--r); padding: 16px 20px; color: #fff; text-decoration: none; transition: border-color .15s, transform .15s; }
.mood-list a:hover { border-color: var(--sun); transform: translateY(-2px); }
.mood-list b { font: 600 1.15rem var(--head); display: block; } .mood-list span { color: var(--on-soft); font-size: .93rem; }
@media (max-width: 600px) { .mood-list { grid-template-columns: 1fr; } }

/* text */
.prose { max-width: 46em; } .prose p, .prose li { color: #e6e2ff; } .prose h2 { margin-top: 1.4em; } .prose li { margin: .3em 0; }
.page { padding-top: 10px; } .page h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
.faq details { background: var(--bg2); border: 2px solid #ffffff2b; border-radius: 16px; margin: 10px 0; max-width: 46em; }
.faq summary { cursor: pointer; padding: 14px 18px; font: 600 1.08rem var(--head); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; } .faq summary::after { content: "+"; color: var(--sun); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; } .faq details p { margin: 0; padding: 0 18px 16px; color: var(--on-soft); }

/* footer */
.foot { margin-top: 60px; padding: 30px 20px 40px; text-align: center; border-top: 2px solid #ffffff1a; background: #140e38; }
.foot a { color: #fff; } .foot-games { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-family: var(--head); margin-bottom: 10px; } .foot-games a { text-decoration: none; }

/* game page */
.crumbs { margin: 18px 0 6px; font-size: .9rem; color: var(--on-soft); } .crumbs a { color: var(--on-soft); }
.game-head h1 { font-size: clamp(1.9rem, 5.5vw, 3.2rem); margin-bottom: .2em; text-shadow: 3px 3px 0 var(--c); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; } .chips span { background: #ffffff1a; border: 1.5px solid #ffffff38; border-radius: 999px; padding: 2px 12px; font: 500 .82rem var(--head); }
.stage-wrap { border: 4px solid var(--line); outline: 3px solid var(--c); border-radius: var(--r); overflow: hidden; background: #000; box-shadow: 0 20px 60px #0008; }
.stage { position: relative; height: min(76vh, 720px); min-height: 440px; display: grid; place-items: center; background: #0b0820; }
.stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55) saturate(1.1); }
.stage .btn.huge { position: relative; animation: pulse 1.8s ease-in-out infinite; max-width: 90%; white-space: normal; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: var(--bg2); border-top: 3px solid var(--line); }
.grow { flex: 1; }
.score-chip { background: #ffffff1a; border-radius: 999px; padding: 4px 12px; font: 600 .92rem var(--head); white-space: nowrap; }
.best-chip b { color: var(--sun); }
.stage-wrap:fullscreen { border: 0; outline: 0; border-radius: 0; display: flex; flex-direction: column; } .stage-wrap:fullscreen .stage { flex: 1; height: auto; }
.stage-wrap.fake-full { position: fixed; inset: 0; z-index: 60; border: 0; outline: 0; border-radius: 0; display: flex; flex-direction: column; } .stage-wrap.fake-full .stage { flex: 1; height: auto; }
@media (max-width: 600px) { .stage { height: 78vh; min-height: 380px; } .best-chip { font-size: .8rem; } }
.game-cols { display: grid; grid-template-columns: 1fr 340px; gap: clamp(20px, 4vw, 48px); margin-top: 34px; align-items: start; }
@media (max-width: 900px) { .game-cols { grid-template-columns: 1fr; } .game-side { order: -1; } }
.game-side { display: grid; gap: 18px; }
.panel { background: var(--bg2); border: 2px solid #ffffff2b; border-radius: var(--r); padding: 18px 20px; } .panel h2 { font-size: 1.25rem; }
.board { list-style: none; margin: 0; padding: 0; counter-reset: place; }
.board li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #ffffff26; counter-increment: place; font-family: var(--head); }
.board li::before { content: counter(place); width: 1.4em; color: var(--on-soft); text-align: right; }
.board li:nth-child(1)::before { content: "🥇"; } .board li:nth-child(2)::before { content: "🥈"; } .board li:nth-child(3)::before { content: "🥉"; }
.board li.empty { color: var(--on-soft); font-family: var(--body); } .board li.empty::before { content: "✨"; }
.board .who { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .board .pts { color: var(--sun); font-weight: 600; font-variant-numeric: tabular-nums; }
.save-hint { margin: 10px 0 0; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.facts { font-size: .92rem; background: #ffffff12; border-radius: 14px; padding: 12px 16px; }

/* profile */
.profile .panel { margin: 16px 0; max-width: 640px; } .who { display: flex; gap: 18px; align-items: center; } .who strong { font: 700 1.6rem var(--head); }
.avatars { display: flex; flex-wrap: wrap; gap: 8px; } .avatars button { width: 46px; height: 46px; font-size: 24px; border-radius: 50%; border: 2px solid transparent; background: #ffffff1a; cursor: pointer; }
.avatars button[aria-pressed="true"] { border-color: var(--sun); background: var(--sun); }
.bests, .history { list-style: none; margin: 0; padding: 0; } .bests li, .history li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed #ffffff26; }
.bests a, .history a { color: #fff; font-family: var(--head); text-decoration: none; flex: 1; } .bests b { color: var(--sun); font: 600 1.15rem var(--head); } .history span, .bests span { color: var(--on-soft); font-size: .85rem; }
.row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.lost { text-align: center; } .lost-emoji { font-size: 5rem; margin: 20px 0 0; } .lost .cards { text-align: left; margin-top: 24px; }

/* sign-in sheet + toast */
.sheet { border: 4px solid var(--line); border-radius: 28px; background: var(--card); color: var(--ink); padding: 28px 26px 22px; width: min(420px, 92vw); text-align: center; box-shadow: 8px 8px 0 var(--grape); }
.sheet::backdrop { background: #0d0828cc; backdrop-filter: blur(3px); }
.sheet h2 { font-size: 1.6rem; } .sheet p { margin: .5em 0; } .sheet .tiny { color: var(--soft); } .sheet a { color: #4b32c3; }
.sheet-emoji { font-size: 3rem; line-height: 1; }
.sheet .x { position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--soft); }
.gbtn { display: grid; place-items: center; min-height: 48px; margin: 16px 0 10px; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--sun); color: var(--ink); border: 3px solid var(--line); border-radius: 999px; padding: 10px 20px;
  font: 600 1rem var(--head); box-shadow: 4px 4px 0 var(--line); opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: 92vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }
