:root {
  --ink: #23224a;
  --muted: #6d6b8f;
  --card: #ffffff;
  --sun: #ffcb2f;
  --sec: #2d9cdb;
  --sec2: #56ccf2;
  --radius: 26px;
  --shadow: 0 8px 0 rgba(0, 0, 0, 0.12), 0 14px 30px rgba(0, 0, 0, 0.14);
  --soft: 0 6px 18px rgba(0, 0, 0, 0.14);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: "Nunito", system-ui, sans-serif;
  color: #fff;
  min-height: 100vh;
  background-color: var(--sec);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.16) 0 60px, transparent 61px),
    radial-gradient(circle at 88% 8%, rgba(255,255,255,.12) 0 90px, transparent 91px),
    radial-gradient(circle at 75% 60%, rgba(255,255,255,.08) 0 140px, transparent 141px),
    radial-gradient(circle at 5% 85%, rgba(255,255,255,.10) 0 110px, transparent 111px),
    linear-gradient(180deg, var(--sec2), var(--sec) 420px);
  background-attachment: fixed;
  transition: background-color .4s;
  padding-bottom: 150px;
}
body.sec-home { --sec: #2d9cdb; --sec2: #6fd0ff; }
body.sec-videos { --sec: #f2464b; --sec2: #ff8a80; }
body.sec-books { --sec: #7c4ddb; --sec2: #b18cff; }
body.sec-games { --sec: #16a765; --sec2: #5be0a0; }
h1, h2, h3, button, .brand-text, .cats b, .subcat b { font-family: "Fredoka", "Nunito", sans-serif; }
button { cursor: pointer; border: 0; font: inherit; color: inherit; background: none; padding: 0; }
img { -webkit-user-drag: none; user-select: none; }
.ico { width: 1.6em; height: 1.6em; object-fit: contain; vertical-align: middle; }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px 4px; max-width: 1280px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-faces { display: flex; }
.brand-faces img { width: 46px; height: 46px; object-fit: cover; object-position: top; border-radius: 50%; background: #fff; border: 3px solid #fff; box-shadow: var(--soft); }
.brand-faces img + img { margin-left: -14px; }
.brand-text { font-size: 30px; font-weight: 700; letter-spacing: .5px; text-shadow: 0 3px 0 rgba(0,0,0,.15); }
.brand-text .b1 { color: #fff; } .brand-text .b2 { color: var(--sun); margin: 0 4px; } .brand-text .b3 { color: #fff; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--soft); transition: transform .15s; }
.icon-btn:hover { transform: scale(1.08) rotate(-6deg); }
.icon-btn img { width: 34px; height: 34px; }
.stars { display: flex; align-items: center; gap: 4px; background: #fff; color: var(--ink); padding: 5px 16px 5px 6px; border-radius: 999px; box-shadow: var(--soft); font-family: "Fredoka"; font-size: 22px; }
.stars img { width: 40px; height: 40px; }
.stars.bump { animation: bump .5s; }
@keyframes bump { 40% { transform: scale(1.25) rotate(-6deg); } }

/* ---------- Category bubbles (YouTube Kids style) ---------- */
.bub { width: 78px; height: 78px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.3,1.6,.5,1), box-shadow .2s; position: relative; }
.bub img { width: 56px; height: 56px; object-fit: contain; transition: transform .25s; }
@keyframes wiggle { 0%,100% { transform: rotate(-6deg) scale(1.08); } 50% { transform: rotate(6deg) scale(1.12); } }

/* Bottom dock */
.cats { position: fixed; z-index: 40; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: clamp(6px, 3vw, 26px); padding: 10px 22px 8px; background: rgba(255,255,255,.96); border-radius: 36px; box-shadow: 0 10px 0 rgba(0,0,0,.10), 0 16px 40px rgba(0,0,0,.25); }
.cats a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--muted); min-width: 72px; }
.cats .bub { width: 66px; height: 66px; background: color-mix(in srgb, var(--c) 16%, #fff); box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 30%, #fff); }
.cats .bub img { width: 50px; height: 50px; }
.cats b { font-size: 16px; font-weight: 600; transition: color .2s; }
.cats a:hover .bub { transform: translateY(-4px) scale(1.05); }
.cats a.active .bub { transform: translateY(-22px) scale(1.12); background: #fff; box-shadow: 0 0 0 5px var(--sun), 0 10px 18px rgba(0,0,0,.22); }
.cats a.active b { color: var(--c); transform: translateY(-14px); }
.cats a.active .bub img { animation: wiggle 2.4s ease-in-out infinite; }
.cats a.active { margin-bottom: -14px; }
main { max-width: 1280px; margin: 0 auto; padding: 4px 22px 20px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--sun); color: var(--ink); font-family: "Fredoka"; font-weight: 600; font-size: 20px; padding: 10px 22px 10px 14px; border-radius: 999px; box-shadow: 0 5px 0 #d99b00; text-decoration: none; transition: transform .1s; }
.btn .ico { width: 34px; height: 34px; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #d99b00; }
.btn.alt { background: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.18); }

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; background: rgba(255,255,255,.18); border: 3px solid rgba(255,255,255,.35); border-radius: 36px; padding: 26px 30px 0; margin: 6px 0 22px; overflow: hidden; min-height: 230px; }
.hero-text { padding-bottom: 28px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); margin: 0 0 6px; text-shadow: 0 4px 0 rgba(0,0,0,.15); }
.hero p { margin: 0 0 18px; font-size: 19px; font-weight: 700; opacity: .95; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-chars { display: flex; align-items: flex-end; flex-shrink: 0; }
.hero-chars .char { height: clamp(170px, 22vw, 250px); filter: drop-shadow(0 10px 12px rgba(0,0,0,.2)); }
.hero-chars .hc2 { margin-left: -30px; animation: bob 3s ease-in-out infinite .4s; }
.hero-chars .hc1 { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ---------- Featured game ---------- */
.feature { position: relative; display: block; width: 100%; text-align: left; border-radius: 34px; overflow: hidden; min-height: 260px; box-shadow: var(--shadow); margin: 0 0 26px; transition: transform .2s; }
.feature:hover { transform: translateY(-4px); }
.feature-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(40,20,90,.82), rgba(40,20,90,.25) 55%, transparent); }
.feature-text { position: relative; z-index: 2; padding: 28px 32px; max-width: 470px; color: #fff; }
.feature h2 { font-size: clamp(30px, 4vw, 46px); margin: 8px 0 6px; line-height: 1; text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.feature p { margin: 0 0 18px; font-weight: 700; font-size: 17px; }
.pill { display: inline-block; background: var(--sun); color: var(--ink); font-family: "Fredoka"; font-weight: 700; font-size: 13px; letter-spacing: 1px; padding: 4px 12px; border-radius: 999px; }
.big-play { display: inline-block; background: #ff3d5a; color: #fff; font-family: "Fredoka"; font-size: 22px; font-weight: 600; padding: 10px 26px; border-radius: 999px; box-shadow: 0 5px 0 #b8203a; }
.feature-run { position: absolute; z-index: 2; filter: drop-shadow(0 10px 10px rgba(0,0,0,.25)); }
.feature-run.r1 { right: 26%; bottom: 40px; height: 150px; animation: hop 1.2s ease-in-out infinite; }
.feature-run.r2 { right: 4%; bottom: 0; height: 230px; }
@keyframes hop { 50% { transform: translateY(-26px) rotate(-4deg); } }
.feature-item { position: absolute; z-index: 2; width: 46px; animation: bob 2s ease-in-out infinite; }
.feature-item.i1 { right: 42%; top: 40px; } .feature-item.i2 { right: 34%; top: 18px; width: 54px; animation-delay: .3s; } .feature-item.i3 { right: 20%; top: 46px; animation-delay: .6s; }

/* ---------- Shelves & rows ---------- */
.shelf { margin: 0 0 22px; }
.shelf-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.shelf-head .ico { width: 44px; height: 44px; }
.shelf-head h2 { margin: 0; font-size: 26px; font-weight: 600; text-shadow: 0 3px 0 rgba(0,0,0,.15); flex: 1; }
.shelf-head a { color: #fff; font-family: "Fredoka"; font-weight: 600; font-size: 17px; text-decoration: none; background: rgba(255,255,255,.22); padding: 6px 14px; border-radius: 999px; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 290px); gap: 18px; overflow-x: auto; padding: 4px 4px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }

/* ---------- Video cards ---------- */
.vcard { text-align: left; display: block; color: #fff; transition: transform .2s cubic-bezier(.3,1.5,.5,1); }
.vcard:hover { transform: translateY(-5px) scale(1.02); }
.vthumb { position: relative; aspect-ratio: 16/9; border-radius: 22px; overflow: hidden; background: rgba(255,255,255,.2); box-shadow: var(--shadow); border: 4px solid #fff; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(20,20,40,.8); color: #fff; font-size: 13px; font-weight: 800; padding: 2px 9px; border-radius: 10px; }
.vthumb .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.15); }
.vthumb .play i { width: 64px; height: 64px; border-radius: 50%; background: #ff3d5a; box-shadow: 0 5px 0 #b8203a; position: relative; }
.vthumb .play i::after { content: ""; position: absolute; left: 25px; top: 19px; border-left: 20px solid #fff; border-top: 13px solid transparent; border-bottom: 13px solid transparent; }
.vcard:hover .play { opacity: 1; }
.vcard h3 { margin: 10px 4px 0; font-size: 17px; font-weight: 600; line-height: 1.2; text-shadow: 0 2px 0 rgba(0,0,0,.15); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vgrid { display: grid; gap: 22px 20px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ---------- Sub-categories ---------- */
.subcats { display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px 18px; scrollbar-width: none; justify-content: safe center; }
.subcat { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
.subcat .bub { width: 70px; height: 70px; background: #fff; }
.subcat .bub .ico { width: 50px; height: 50px; }
.subcat b { font-size: 15px; font-weight: 600; text-shadow: 0 2px 0 rgba(0,0,0,.18); }
.subcat.on .bub { background: var(--sun); transform: scale(1.1); box-shadow: 0 0 0 4px #fff, var(--shadow); }

/* ---------- Page hero ---------- */
.page-hero { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.page-hero .ph-ico { width: 84px; height: 84px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.2)); }
.page-hero h1 { margin: 0; font-size: 38px; text-shadow: 0 4px 0 rgba(0,0,0,.15); }
.page-hero p { margin: 2px 0 0; font-weight: 700; opacity: .95; }
.page-hero.small h1 { font-size: 30px; } .page-hero.small .ph-ico { width: 64px; height: 64px; }

/* ---------- Books ---------- */
.bgrid { display: grid; gap: 26px 20px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.book { text-align: left; color: #fff; display: block; transition: transform .2s cubic-bezier(.3,1.5,.5,1); }
.row .book { width: 210px; }
.book:hover { transform: translateY(-6px) rotate(-1.5deg); }
.book-cover { position: relative; aspect-ratio: 3/4; border-radius: 12px 26px 26px 12px; background: var(--bc); border: 4px solid #fff; box-shadow: inset 12px 0 0 rgba(0,0,0,.14), var(--shadow); overflow: hidden; }
.book-cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 20%, rgba(255,255,255,.35), transparent 55%); }
.book-emoji { position: absolute; top: 12px; right: 14px; font-size: 42px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.2)); }
.book-char { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); height: 82%; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.tag { position: absolute; left: 16px; top: 14px; background: rgba(255,255,255,.9); color: var(--ink); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.book h3 { margin: 10px 4px 0; font-size: 18px; font-weight: 600; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.book p { margin: 2px 4px 0; font-size: 14px; font-weight: 700; opacity: .85; }

/* ---------- Game cards ---------- */
.ggrid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gcard { position: relative; text-align: left; color: #fff; border-radius: 28px; padding: 18px 20px 20px; min-height: 210px; border: 4px solid rgba(255,255,255,.85); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; transition: transform .2s cubic-bezier(.3,1.5,.5,1); }
.row .gcard { width: 240px; }
.gcard:hover { transform: translateY(-6px) rotate(1deg); }
.gcard .gico { position: absolute; top: 10px; right: 10px; width: 118px; height: 118px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.2)); transition: transform .3s; }
.gcard:hover .gico { transform: rotate(-8deg) scale(1.08); }
.gcard h3 { margin: 0; font-size: 24px; font-weight: 600; text-shadow: 0 3px 0 rgba(0,0,0,.18); }
.gcard p { margin: 2px 0 0; font-weight: 800; opacity: .95; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(20, 16, 50, .6); backdrop-filter: blur(6px); z-index: 50; display: grid; place-items: center; padding: 14px; animation: fade .2s; color: var(--ink); }
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.modal-card { position: relative; width: min(940px, 100%); max-height: calc(100vh - 28px); overflow: auto; background: #fff8ec; border-radius: 32px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35); border: 5px solid #fff; animation: rise .3s cubic-bezier(.3,1.4,.5,1); }
@keyframes rise { from { transform: translateY(30px) scale(.96); opacity: 0; } }
.modal-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; background: #ff5a5f; color: #fff; font-size: 20px; font-weight: 800; box-shadow: 0 4px 0 #c43c40; z-index: 5; }
.m-video .modal-card { background: #1d1b3a; color: #fff; }
.m-video .vcard h3 { color: #fff; }
.m-dash .modal-card { width: min(1100px, 100%); padding: 0; background: #000; overflow: hidden; }
.player { aspect-ratio: 16/9; width: 100%; border: 0; border-radius: 20px; background: #000; display: block; }
.player-title { margin: 14px 0 2px; font-size: 26px; }
.player-sub { margin: 0 0 16px; opacity: .75; font-weight: 700; }

/* ---------- Reader ---------- */
.reader { display: flex; flex-direction: column; gap: 14px; }
.reader-title { margin: 0 50px 0 0; font-size: 26px; }
.page { border-radius: 26px; color: #fff; min-height: 360px; padding: 28px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; animation: pageIn .4s ease; box-shadow: inset 0 -8px 0 rgba(0,0,0,.12); }
@keyframes pageIn { from { opacity: 0; transform: translateX(30px) rotate(1deg); } }
.page .art { font-size: clamp(70px, 13vw, 116px); letter-spacing: 6px; margin-bottom: 16px; animation: bob 4s ease-in-out infinite; }
.page p { font-size: clamp(18px, 2.6vw, 24px); line-height: 1.45; max-width: 580px; margin: 0; font-weight: 800; }
.reader-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reader-mid { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.narrator { display: flex; align-items: flex-end; gap: 8px; }
.narrator .char { height: 86px; }
.narrator .char.talking { animation: talk .35s ease-in-out infinite; }
@keyframes talk { 50% { transform: translateY(-4px) rotate(-3deg); } }
.dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #e2dccd; }
.dots i.on { background: #7c4ddb; transform: scale(1.2); }
.round { width: 58px; height: 58px; border-radius: 50%; background: var(--sun); font-size: 22px; box-shadow: 0 5px 0 #d99b00; color: var(--ink); }
.round:disabled { opacity: .35; }
.read-aloud { background: #21b573; color: #fff; padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 17px; box-shadow: 0 4px 0 #13824f; }
.read-aloud.sm { padding: 4px 12px; font-size: 18px; }

/* ---------- Learning games ---------- */
.host { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin: -4px 0 8px; }
.host .char { height: 128px; filter: drop-shadow(0 6px 6px rgba(0,0,0,.15)); }
.char { transition: transform .2s; cursor: pointer; }
.char.p-cheer { animation: cheer .45s ease-out 3 alternate; }
.char.p-sad, .char.p-think { animation: droop .5s ease; }
.char.p-wave { animation: wavey .6s ease; }
@keyframes cheer { to { transform: translateY(-18px) scale(1.05); } }
@keyframes droop { 50% { transform: translateY(6px) rotate(4deg); } }
@keyframes wavey { 50% { transform: rotate(-4deg); } }
.bubble { position: relative; align-self: center; background: #fff; border-radius: 22px; padding: 12px 18px; font-family: "Fredoka"; font-weight: 600; font-size: 20px; max-width: 300px; box-shadow: var(--soft); border: 3px solid #ffe08a; }
.bubble.pop { animation: popb .3s ease; }
@keyframes popb { from { transform: scale(.8); } }

.game { text-align: center; }
.game h2 { margin: 0 0 4px; font-size: 32px; }
.game .hint { color: var(--muted); margin: 0 0 14px; font-weight: 700; }
.progress { height: 12px; background: #eee5d3; border-radius: 99px; overflow: hidden; margin: 0 auto 18px; max-width: 420px; }
.progress div { height: 100%; background: linear-gradient(90deg, #21b573, #5be0a0); transition: width .3s; }
.prompt-big { font-size: 80px; margin: 4px 0; }
.prompt-text { font-family: "Fredoka"; font-size: 26px; font-weight: 600; margin: 0 0 18px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; max-width: 540px; margin: 0 auto; }
.opt { background: #fff; border-radius: 20px; padding: 14px; font-size: 22px; font-weight: 600; box-shadow: 0 6px 0 #e3dccd; border: 3px solid #f1eadb; transition: transform .1s, background .2s; }
.opt.arabic { font-family: "Noto Naskh Arabic", serif; font-size: 56px; line-height: 1.3; }
.opt:active { transform: translateY(4px); box-shadow: 0 2px 0 #e3dccd; }
.opt.right { background: #5be0a0; border-color: #21b573; }
.opt.wrong, .wrong { background: #ff8fa3 !important; animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.letter-word { margin-top: 14px; font-size: 18px; min-height: 28px; color: var(--muted); font-weight: 700; }
.letter-word b { font-family: "Noto Naskh Arabic"; font-size: 26px; color: var(--ink); }

.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 460px; margin: 0 auto; perspective: 800px; }
.mcard { position: relative; aspect-ratio: 1; transform-style: preserve-3d; transition: transform .4s cubic-bezier(.3,1.3,.5,1); }
.mcard span { position: absolute; inset: 0; border-radius: 18px; display: grid; place-items: center; backface-visibility: hidden; }
.mcard .back { background: linear-gradient(135deg, #8e5cf7, #6c5ce7); box-shadow: 0 5px 0 #4b3bb5; }
.mcard .back .ico { width: 50%; height: 50%; opacity: .5; filter: grayscale(.3); }
.mcard .front { background: #fff; transform: rotateY(180deg); box-shadow: 0 5px 0 #e3dccd; }
.mcard .front .ico { width: 78%; height: 78%; }
.mcard.flip, .mcard.done { transform: rotateY(180deg); }
.mcard.done .front { background: #dcfbe9; box-shadow: 0 5px 0 #8fdcb1; }

.pray-pool, .pray-slots { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.pray-slots .slot { width: 98px; height: 112px; border-radius: 20px; border: 3px dashed #d8d0bf; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 600; font-family: "Fredoka"; color: var(--muted); font-size: 18px; }
.pray-slots .slot.filled { border-style: solid; border-color: #21b573; background: #dcfbe9; color: var(--ink); }
.pray-slots .slot .e, .pray-chip .e { font-size: 36px; }
.pray-chip { width: 98px; height: 112px; border-radius: 20px; background: #fff; box-shadow: 0 6px 0 #e3dccd; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pray-chip b { font-size: 18px; } .pray-chip small { color: var(--muted); font-weight: 700; }

.deed-card { background: #fff; border-radius: 28px; box-shadow: var(--soft); max-width: 380px; margin: 0 auto 18px; padding: 24px; animation: pageIn .3s; border: 4px solid #ffe08a; }
.deed-card .e { font-size: 80px; }
.deed-card p { font-family: "Fredoka"; font-weight: 600; font-size: 24px; margin: 6px 0 0; line-height: 1.2; }
.deed-btns { display: flex; gap: 14px; justify-content: center; }
.deed-btns button { font-size: 20px; font-weight: 600; padding: 14px 22px; border-radius: 22px; color: var(--ink); }
.yes { background: #5be0a0; box-shadow: 0 5px 0 #21b573; }
.no { background: #ff9fb0; box-shadow: 0 5px 0 #e0667f; }
.win { padding: 10px 0 20px; }
.win-ico { width: 130px; height: 130px; animation: bob 2s infinite; }
.win h2 { font-size: 34px; margin: 6px 0; }
.win .btn { margin-top: 6px; }

/* ---------- Date Dash ---------- */
.dash { position: relative; width: 100%; aspect-ratio: 16/9; background: #6fd0ff; user-select: none; touch-action: manipulation; }
.dash canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dash-hud[hidden], .dash-banner[hidden] { display: none !important; }
.dash-hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 70px 0 16px; pointer-events: none; }
.dash-hud > div { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.9); border-radius: 999px; padding: 4px 14px; box-shadow: var(--soft); font-family: "Fredoka"; font-weight: 700; font-size: 24px; color: var(--ink); }
.dash-hud .lives img { width: 30px; transition: .3s; } .dash-hud .lives img.lost { filter: grayscale(1); opacity: .35; transform: scale(.8); }
.hud-m img { width: 30px; }
.hud-btn { pointer-events: auto; font-size: 20px; width: 34px; height: 34px; border-radius: 50%; background: #f1ecff; }
.dash-banner { position: absolute; left: 50%; top: 26%; transform: translateX(-50%); font-family: "Fredoka"; font-weight: 700; font-size: clamp(26px, 5vw, 48px); color: #fff; text-shadow: 0 4px 0 #7c4ddb, 0 8px 20px rgba(0,0,0,.3); white-space: nowrap; pointer-events: none; }
.dash-banner.go { animation: banner 1.4s ease forwards; }
@keyframes banner { 0% { transform: translate(-50%, 20px) scale(.6); opacity: 0; } 15% { transform: translate(-50%, 0) scale(1.1); opacity: 1; } 25% { transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -20px); } }
.dash-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; background: radial-gradient(circle at center, rgba(60,30,120,.45), rgba(40,20,90,.78)); padding: 16px; gap: 8px; }
.dash-screen[hidden] { display: none; }
.dash-title { margin: 0; font-size: clamp(30px, 5vw, 56px); line-height: 1; text-shadow: 0 5px 0 rgba(0,0,0,.25); }
.dash-title span { color: var(--sun); }
.dash-sub { margin: 0; font-weight: 800; font-size: 18px; }
.pick { display: flex; gap: 18px; margin: 6px 0 4px; }
.pick-card { width: clamp(110px, 16vw, 170px); background: rgba(255,255,255,.18); border: 4px solid rgba(255,255,255,.5); border-radius: 26px; padding: 8px 8px 10px; transition: transform .2s; display: flex; flex-direction: column; align-items: center; color: #fff; }
.pick-card img { height: clamp(110px, 17vw, 190px); filter: drop-shadow(0 6px 6px rgba(0,0,0,.3)); }
.pick-card b { font-size: 22px; }
.pick-card.on { background: rgba(255,255,255,.95); color: var(--ink); border-color: var(--sun); transform: scale(1.06); box-shadow: 0 0 0 4px var(--sun); }
.dash-play { background: #ff3d5a; color: #fff; font-family: "Fredoka"; font-size: 26px; font-weight: 600; padding: 10px 40px; border-radius: 999px; box-shadow: 0 6px 0 #b8203a; margin-top: 4px; }
.dash-play:active { transform: translateY(4px); box-shadow: 0 2px 0 #b8203a; }
.dash-alt { background: #fff; color: var(--ink); font-family: "Fredoka"; font-size: 20px; font-weight: 600; padding: 10px 22px; border-radius: 999px; box-shadow: 0 6px 0 rgba(0,0,0,.2); }
.dash-help { margin: 6px 0 0; font-weight: 700; font-size: 15px; opacity: .95; line-height: 1.6; }
.dash-help img { width: 24px; vertical-align: middle; }
.dash-help kbd { background: #fff; color: var(--ink); border-radius: 6px; padding: 1px 7px; font-family: inherit; font-weight: 800; }
.dash-best { margin: 2px 0 0; font-family: "Fredoka"; font-size: 20px; font-weight: 600; }
.dash-screen[data-screen="over"] { flex-direction: row; gap: 10px; }
.dash-pose { height: clamp(160px, 30vw, 300px); filter: drop-shadow(0 10px 10px rgba(0,0,0,.3)); animation: bob 2s infinite; }
.over-box { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.over-stats { display: flex; gap: 12px; }
.over-stats div { background: rgba(255,255,255,.95); color: var(--ink); border-radius: 20px; padding: 8px 14px; min-width: 92px; display: flex; flex-direction: column; align-items: center; }
.over-stats img { width: 30px; height: 30px; }
.over-stats b { font-family: "Fredoka"; font-size: 28px; line-height: 1.1; }
.over-stats span { font-size: 13px; font-weight: 800; color: var(--muted); }
.over-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- Search ---------- */
.search { position: fixed; inset: 0; z-index: 60; background: var(--sec); overflow: auto; padding: 18px 22px 40px; animation: fade .2s; }
.search[hidden] { display: none; }
.search-bar { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 999px; padding: 6px 8px 6px 14px; max-width: 760px; margin: 0 auto 20px; box-shadow: var(--shadow); }
.search-bar img { width: 40px; }
.search-bar input { flex: 1; border: 0; outline: 0; font: 700 22px "Nunito"; color: var(--ink); min-width: 0; background: none; }
.search-close { width: 44px; height: 44px; border-radius: 50%; background: #ff5a5f; color: #fff; font-weight: 800; font-size: 18px; }
.search-results { max-width: 1280px; margin: 0 auto; }
.search-results h3 { font-size: 24px; margin: 16px 0 10px; }
.s-hint { text-align: center; font-weight: 800; font-size: 18px; }
.s-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.s-tags button { background: #fff; color: var(--ink); font-weight: 600; font-size: 18px; padding: 8px 18px; border-radius: 999px; box-shadow: var(--soft); }
.s-empty { text-align: center; } .s-empty .char { height: 200px; } .s-empty p { font-weight: 800; font-size: 20px; }

.toast { position: fixed; top: 90px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--ink); padding: 12px 24px; border-radius: 999px; font-family: "Fredoka"; font-weight: 600; font-size: 20px; z-index: 70; box-shadow: var(--shadow); border: 3px solid var(--sun); animation: popt .3s; }
@keyframes popt { from { transform: translate(-50%, -10px) scale(.8); opacity: 0; } }
.footer-note { text-align: center; font-weight: 700; font-size: 14px; margin: 30px 0 0; opacity: .9; }
.footer-note a { color: #fff; }

/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  .topbar { padding: 10px 16px 2px; }
  .brand-text { font-size: 22px; } .brand-faces img { width: 38px; height: 38px; }
  .icon-btn { width: 44px; height: 44px; } .icon-btn img { width: 28px; height: 28px; }
  .stars { font-size: 18px; padding-right: 12px; } .stars img { width: 32px; height: 32px; }
  .cats { gap: 4px; padding: 8px 12px 6px; bottom: calc(10px + env(safe-area-inset-bottom)); width: calc(100% - 24px); justify-content: space-around; }
  .cats a { min-width: 0; } .cats .bub { width: 54px; height: 54px; } .cats .bub img { width: 40px; height: 40px; } .cats b { font-size: 14px; }
  .cats a.active .bub { transform: translateY(-18px) scale(1.1); }
  body { padding-bottom: 130px; }
  main { padding: 4px 16px 20px; }
  .hero { flex-direction: column; align-items: stretch; padding: 20px 20px 0; }
  .hero-text { padding-bottom: 0; }
  .hero-chars { justify-content: center; } .hero-chars .char { height: 170px; }
  .feature { min-height: 330px; } .feature::after { background: linear-gradient(180deg, rgba(40,20,90,.85), rgba(40,20,90,.2) 70%); }
  .feature-text { padding: 22px; } .feature-run.r2 { height: 150px; } .feature-run.r1 { height: 100px; right: 40%; bottom: 20px; }
  .feature-item { display: none; }
  .row { grid-auto-columns: 78%; }
  .host .char { height: 92px; } .bubble { font-size: 16px; padding: 8px 12px; }
  .pray-slots .slot, .pray-chip { width: 58px; height: 86px; font-size: 13px; }
  .pray-slots .slot .e, .pray-chip .e { font-size: 24px; } .pray-chip b { font-size: 13px; } .pray-chip small { display: none; }
  .page { min-height: 300px; padding: 20px; }
  .dash-hud { padding: 6px 54px 0 6px; } .dash-hud > div { font-size: 16px; padding: 2px 8px; } .dash-hud .lives img, .hud-m img { width: 20px; } .hud-btn { width: 26px; height: 26px; font-size: 14px; }
  .dash-help, .dash-best { display: none; } .dash-sub { font-size: 14px; } .dash-play { font-size: 20px; padding: 6px 26px; }
  .over-stats div { min-width: 64px; padding: 4px 8px; } .over-stats b { font-size: 20px; }
  .m-dash { padding: 0; } .m-dash .modal-card { border-radius: 18px; border-width: 3px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Penalty Cup ---------- */
.feature.cup::after { background: linear-gradient(90deg, rgba(8,70,40,.85), rgba(8,70,40,.3) 55%, transparent); }
.feature.cup .feature-bg { object-position: center 35%; }
.cup-goal { position: absolute; z-index: 1; right: 6%; top: 18px; width: 290px; }
.cup-keeper { position: absolute; z-index: 2; right: calc(6% + 100px); top: 78px; height: 120px; animation: sway 2.4s ease-in-out infinite; }
.cup-ball { position: absolute; z-index: 3; right: calc(6% + 210px); top: 60px; width: 40px; animation: bob 1.6s ease-in-out infinite; }
.cup-kid { position: absolute; z-index: 3; right: 30%; bottom: -10px; height: 190px; filter: drop-shadow(0 10px 10px rgba(0,0,0,.3)); }
@keyframes sway { 0%,100% { transform: translateX(-14px); } 50% { transform: translateX(14px); } }
.soccer canvas { cursor: crosshair; }
.kick-hint { position: absolute; right: 18px; bottom: 18px; background: rgba(255,255,255,.92); color: var(--ink); font-family: "Fredoka"; font-weight: 700; font-size: 20px; padding: 6px 18px; border-radius: 999px; box-shadow: var(--soft); pointer-events: none; animation: bob 1.4s ease-in-out infinite; }
.kick-hint[hidden] { display: none; }
.kicks { gap: 6px !important; }
.kdot { width: 26px; height: 26px; border-radius: 50%; background: #e7e2f5; display: grid; place-items: center; font-size: 15px; color: #fff; transition: .25s; }
.kdot.g { background: #21b573; } .kdot.x { background: #ff5a5f; }
.kdot.now { box-shadow: 0 0 0 3px #ffcb2f; transform: scale(1.15); }
.dash-banner.goal { text-shadow: 0 4px 0 #16a765, 0 8px 20px rgba(0,0,0,.3); font-size: clamp(34px, 7vw, 68px); }
.dash-banner.save { text-shadow: 0 4px 0 #e07b00, 0 8px 20px rgba(0,0,0,.3); }
.dash-banner.miss { text-shadow: 0 4px 0 #ff5a5f, 0 8px 20px rgba(0,0,0,.3); }
@media (max-width: 680px) {
  .cup-goal { width: 180px; right: 4%; top: auto; bottom: 110px; } .cup-keeper { height: 74px; right: calc(4% + 62px); top: auto; bottom: 120px; }
  .cup-ball { display: none; } .cup-kid { height: 120px; right: 50%; }
  .kdot { width: 18px; height: 18px; font-size: 11px; } .kick-hint { font-size: 15px; bottom: 10px; }
}

/* ---------- Bento (home hero + featured games) ---------- */
.bento { display: grid; grid-template-columns: 1.05fr 1fr; grid-template-rows: 205px 205px; gap: 18px; margin: 6px 0 26px; }
.bento.two { grid-template-columns: 1fr 1fr; grid-template-rows: 230px; }
.bento > * { margin: 0 !important; min-height: 0 !important; height: 100%; }
.bento .hero { grid-row: span 2; flex-direction: column; align-items: stretch; justify-content: space-between; padding: 26px 28px 0; }
.bento .hero-text { padding-bottom: 0; }
.bento .hero h1 { font-size: clamp(28px, 3.4vw, 44px); }
.bento .hero-chars { justify-content: flex-end; }
.bento .hero-chars .char { height: clamp(150px, 16vw, 215px); }
.bento .feature { border-radius: 28px; }
.bento .feature-text { padding: 18px 22px; max-width: 62%; }
.bento .feature .pill { font-size: 11px; padding: 3px 10px; }
.bento .feature h2 { font-size: clamp(22px, 2.3vw, 32px); margin: 6px 0 4px; }
.bento .feature p { font-size: 13.5px; line-height: 1.3; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bento .big-play { font-size: 16px; padding: 8px 16px; }
.bento .cup-goal { width: 210px; top: 14px; right: 4%; }
.bento .cup-keeper { height: 88px; top: 58px; right: calc(4% + 70px); }
.bento .cup-ball { width: 30px; top: 46px; right: calc(4% + 150px); }
.bento .cup-kid { height: 150px; right: 22%; bottom: -8px; }
.bento .feature-run.r1 { height: 105px; right: 24%; bottom: 26px; }
.bento .feature-run.r2 { height: 170px; right: 3%; }
.bento .feature-item { width: 32px; } .bento .feature-item.i2 { width: 38px; }
.bento .feature-item.i1 { right: 40%; top: 24px; } .bento .feature-item.i2 { right: 32%; top: 10px; } .bento .feature-item.i3 { right: 18%; top: 30px; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; grid-template-rows: auto; }
  .bento .hero { grid-row: auto; flex-direction: row; align-items: flex-end; }
  .bento .hero-text { padding-bottom: 22px; }
  .bento > .feature { height: 200px; }
  .bento.two { grid-template-columns: 1fr; grid-template-rows: auto; }
}
@media (max-width: 680px) {
  .bento { gap: 12px; }
  .bento .hero { flex-direction: column; align-items: stretch; }
  .bento .hero-text { padding-bottom: 0; }
  .bento .hero-chars { justify-content: center; } .bento .hero-chars .char { height: 140px; }
  .bento > .feature { height: 190px; }
  .bento .feature-text { max-width: 70%; padding: 16px; }
  .bento .feature::after { background: linear-gradient(90deg, rgba(40,20,90,.85), rgba(40,20,90,.2) 75%, transparent); }
  .bento .feature.cup::after { background: linear-gradient(90deg, rgba(8,70,40,.88), rgba(8,70,40,.2) 75%, transparent); }
  .bento .feature p { display: none; }
  .bento .cup-goal { width: 140px; top: 18px; bottom: auto; } .bento .cup-keeper { height: 58px; top: 50px; bottom: auto; right: calc(4% + 46px); }
  .bento .cup-kid { height: 110px; right: 6%; } .bento .feature-run.r1 { display: none; } .bento .feature-run.r2 { height: 140px; }
}
@media (max-width: 680px) {
  .bento .hero { flex-direction: row; align-items: flex-end; padding: 16px 12px 0 18px; gap: 4px; }
  .bento .hero-text { padding-bottom: 16px; min-width: 0; }
  .bento .hero h1 { font-size: 23px; line-height: 1.1; }
  .bento .hero p { font-size: 14px; margin-bottom: 12px; }
  .bento .hero-btns { gap: 8px; }
  .bento .hero-btns .btn { padding: 7px 14px 7px 8px; font-size: 15px; }
  .bento .hero-btns .btn .ico { width: 26px; height: 26px; }
  .bento .hero-chars { justify-content: flex-end; } .bento .hero-chars .char { height: 132px; } .bento .hero-chars .hc2 { margin-left: -24px; }
  .bento > .feature { height: 170px; }
}

/* kids-friendly: no description text on game tiles */
.bento .feature p { display: none !important; }
.bento .feature h2 { margin-bottom: 12px; }

/* ---------- 3D storybook reader ---------- */
.book-cover.has-art .book-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.book-cover.has-art .book-art ~ .book-char { display: none; }
/* the reader takes the whole screen */
.modal.m-book3d { padding: 0; backdrop-filter: none; }
.m-book3d .modal-card { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; box-shadow: none; overflow: hidden;
  display: flex; flex-direction: column; animation: fade .25s;
  background: radial-gradient(ellipse at 50% 35%, #fff8ec, #f1dcbc 75%, #e8cda6);
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.m-book3d #modalBody, .m-book3d #brRoot { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.m-book3d .modal-close { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.br { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: "Nunito", sans-serif; color: var(--ink); }
.br-stage { position: relative; width: 100%; flex: 1; min-height: 0; }
.br-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.br-canvas:active { cursor: grabbing; }
.br-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; font-family: "Fredoka"; font-weight: 600; font-size: 20px; }
.br-loading[hidden] { display: none; }
.br-loading img { height: 110px; animation: talk .5s ease-in-out infinite alternate; }
/* level picker beside the closed book (below it on phones) */
.br-tools { position: absolute; top: 2px; left: 2px; z-index: 3; display: flex; gap: 8px; align-items: center; }
.br-view { display: none; gap: 4px; background: rgba(255,255,255,.7); padding: 4px; border-radius: 999px; box-shadow: 0 3px 0 rgba(0,0,0,.06); }
.br3d.is-open .br-view { display: flex; }
.br-view button { display: flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; font-size: 17px; }
.br-view button b { font-family: "Fredoka"; font-weight: 600; font-size: 14px; }
.br-view button.on { background: #8e5cf7; color: #fff; }
.br-full { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0,0,0,.1); }
.br-full[hidden] { display: none; }
.br3d.narrow .br-view button b { display: none; }
.cover-pick { position: absolute; right: 2%; top: 50%; transform: translateY(-50%); width: 46%; text-align: center; transition: opacity .35s; }
.br3d.narrow .cover-pick { left: 0; right: 0; top: auto; bottom: 6px; transform: none; width: auto; }
.cover-pick.gone { opacity: 0; pointer-events: none; }
.cover-pick > p { font-family: "Fredoka"; font-weight: 600; font-size: 22px; margin: 0 0 12px; }
.pick-lv { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.pick-lv button { width: 118px; padding: 12px 8px; border-radius: 18px; background: #fff; border: 3px solid transparent; box-shadow: 0 4px 0 rgba(0,0,0,.08); display: grid; gap: 2px; transition: .15s; }
.pick-lv button span { font-size: 34px; } .pick-lv button b { font-family: "Fredoka"; font-size: 16px; color: var(--lc); } .pick-lv button small { font-size: 12px; opacity: .7; font-weight: 700; }
.pick-lv button.on { border-color: var(--lc); transform: translateY(-4px); box-shadow: 0 8px 0 color-mix(in srgb, var(--lc) 30%, transparent); }
.br3d.narrow .pick-lv { gap: 8px; margin-bottom: 12px; }
.br3d.narrow .pick-lv button { width: 96px; padding: 8px 4px; } .br3d.narrow .pick-lv button span { font-size: 26px; } .br3d.narrow .pick-lv button b { font-size: 14px; }
.br3d.narrow .cover-pick > p { font-size: 18px; margin-bottom: 8px; }
.cv-open { font-family: "Fredoka"; font-weight: 600; font-size: 22px; color: #fff; background: #f2464b; padding: 12px 28px; border-radius: 999px; box-shadow: 0 5px 0 #b8262b; }
.cv-open:active { transform: translateY(4px); box-shadow: 0 1px 0 #b8262b; }
/* the end: buttons placed over the last page */
.br-end { position: absolute; transform: translate(-50%, -50%); width: max-content; max-width: 90%; animation: fade .3s; }
.br-end[hidden] { display: none; }
.end-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.end-btns button { font-family: "Fredoka"; font-weight: 600; font-size: 17px; padding: 10px 18px; border-radius: 999px; background: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.12); }
.end-btns .br-again { background: #ffcb2f; }
/* toolbar */
.br-bar { width: min(1040px, 94vw); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.br-bar[hidden] { display: none; }
.br-round { width: 58px; height: 58px; border-radius: 50%; background: #fff; font-size: 22px; color: var(--ink); box-shadow: 0 5px 0 rgba(0,0,0,.12); flex-shrink: 0; }
.br-round:disabled { opacity: .35; }
/* auto-turn countdown: a ring fills around ▶ for 3 seconds */
.br-next { position: relative; }
.br-ring { position: absolute; left: -6px; top: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; opacity: 0; transition: opacity .2s; }
.br-ring circle { fill: none; stroke: var(--lc, #8e5cf7); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 170; stroke-dashoffset: 170; }
.br-next.counting .br-ring { opacity: 1; }
.br-next.counting .br-ring circle { animation: brCount 3s linear forwards; }
@keyframes brCount { to { stroke-dashoffset: 0; } }
.br-round:not(:disabled):active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.br-mid { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.br-play { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 4px 18px 4px 4px; font-family: "Fredoka"; font-weight: 600; font-size: 17px; box-shadow: 0 4px 0 rgba(0,0,0,.1); }
.br-play img { width: 44px; height: 44px; object-fit: cover; object-position: top; border-radius: 50%; background: #efe6ff; }
.br-play.on { background: #ffd84d; } .br-play.on img { animation: talk .35s ease-in-out infinite alternate; }
@keyframes talk { to { transform: translateY(-3px) rotate(-4deg); } }
.br-auto { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.br-auto input { width: 18px; height: 18px; accent-color: #8e5cf7; }
.br-levels { display: flex; gap: 6px; background: rgba(255,255,255,.6); padding: 4px; border-radius: 999px; }
.br-levels button { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; font-size: 16px; }
.br-levels button b { font-family: "Fredoka"; font-weight: 600; font-size: 14px; }
.br-levels button { background: color-mix(in srgb, var(--lc) 14%, transparent); } .br-levels button b { color: var(--lc); }
.br-levels button.on { background: var(--lc); color: #fff; } .br-levels button.on b { color: #fff; }
@media (max-width: 760px) {
  .br-levels button b, .br-auto { display: none; }
  .br-round { width: 48px; height: 48px; font-size: 18px; }
  .br-play span { display: none; } .br-play { padding: 4px; }
}

/* ---------- Hoop Stars ---------- */
.dash.hoops { background: #ffc98a; }
.kdot.sm { width: 22px; height: 22px; }
.kdot.gold { background: #ffd23f; box-shadow: inset 0 0 0 3px #fff3b0; }
.hud-l.balls { gap: 5px; }
.hud-fire { font-size: 26px; animation: bob .8s ease-in-out infinite; }
.hud-fire[hidden] { display: none; }
.hud-best { font-size: 20px; margin-right: 4px; }
.dash-banner.fire { text-shadow: 0 4px 0 #e8430f, 0 8px 22px rgba(255,120,0,.6); font-size: clamp(34px, 7vw, 68px); }
.dash-banner.gold { text-shadow: 0 4px 0 #c99400, 0 8px 20px rgba(0,0,0,.3); }
.feature.hoops::after { background: linear-gradient(90deg, rgba(120,40,10,.86), rgba(120,40,10,.3) 55%, transparent); }
.feature.hoops .feature-bg { object-position: center 45%; }
.hp-hoop { position: absolute; z-index: 1; right: 12%; top: 12px; width: 150px; filter: drop-shadow(0 8px 8px rgba(0,0,0,.25)); }
.hp-ball { position: absolute; z-index: 3; right: calc(12% + 52px); top: 40px; width: 44px; animation: hpshot 2.2s ease-in-out infinite; }
.hp-kid { position: absolute; z-index: 2; right: calc(12% + 120px); bottom: -14px; height: 180px; filter: drop-shadow(0 10px 10px rgba(0,0,0,.3)); }
@keyframes hpshot {
  0%, 12% { transform: translate(-84px, 96px) scale(1.2); opacity: 0; }
  20% { opacity: 1; }
  55% { transform: translate(-20px, -26px) scale(.85); }
  78%, 86% { transform: translate(0, 34px) scale(.7); opacity: 1; }
  100% { transform: translate(0, 60px) scale(.7); opacity: 0; }
}
.bento.three { grid-template-columns: 1.05fr .5fr .5fr; }
.bento.three > .feature.hoops { grid-column: span 2; }
.bento.games3 { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 210px; }
.bento.games3 > .feature.hoops { grid-column: span 2; }
.bento .hp-hoop { width: 130px; top: 10px; right: 10%; }
.bento .hp-ball { width: 38px; top: 34px; right: calc(10% + 46px); }
.bento .hp-kid { height: 140px; right: calc(10% + 112px); bottom: -10px; }
.bento.games3 .hp-hoop { width: 150px; } .bento.games3 .hp-ball { right: calc(10% + 54px); top: 40px; } .bento.games3 .hp-kid { height: 160px; right: calc(10% + 124px); }
/* the two small tiles beside the hero on wide screens */
@media (min-width: 901px) {
  .bento.three > .feature:not(.hoops) .feature-text { max-width: 100%; padding: 14px 16px; }
  .bento.three > .feature:not(.hoops) h2 { font-size: clamp(19px, 1.75vw, 25px); }
  .bento.three > .feature:not(.hoops) .big-play { font-size: 14px; padding: 6px 13px; }
  .bento.three > .feature:not(.hoops)::after { background: linear-gradient(180deg, rgba(40,20,90,.8), rgba(40,20,90,.15) 62%, transparent); }
  .bento.three > .feature.cup::after { background: linear-gradient(180deg, rgba(8,70,40,.82), rgba(8,70,40,.15) 62%, transparent); }
  .bento.three .cup-goal { width: 118px; top: auto; bottom: 12px; right: 8px; }
  .bento.three .cup-keeper { height: 52px; top: auto; bottom: 18px; right: 48px; }
  .bento.three .cup-ball, .bento.three .cup-kid { display: none; }
  .bento.three .feature-run.r1, .bento.three .feature-item { display: none; }
  .bento.three .feature-run.r2 { height: 118px; right: 6px; }
}
@media (max-width: 900px) {
  .bento.three, .bento.games3 { grid-template-columns: 1fr; grid-template-rows: auto; }
  .bento.three > .feature.hoops, .bento.games3 > .feature.hoops { grid-column: auto; }
}
@media (max-width: 680px) {
  .bento .hp-hoop { width: 104px; right: 5%; top: 14px; } .bento .hp-ball { width: 30px; right: calc(5% + 37px); top: 34px; }
  .bento .hp-kid { height: 104px; right: calc(5% + 88px); }
  .bento .feature.hoops::after { background: linear-gradient(90deg, rgba(120,40,10,.88), rgba(120,40,10,.2) 75%, transparent); }
  .kdot.sm { width: 11px; height: 11px; } .hud-l.balls { gap: 3px; } .hud-best { display: none; } .hud-fire { font-size: 16px; }
}
@media (max-width: 680px) {
  .dash-screen[data-screen="over"] { gap: 6px; padding: 8px; }
  .dash-screen[data-screen="over"] .dash-title { font-size: 20px; }
  .dash-screen[data-screen="over"] .over-box { gap: 5px; }
  .dash-screen[data-screen="over"] .dash-pose { height: 120px; }
  .over-stats { gap: 6px; } .over-stats div { min-width: 56px; padding: 3px 6px; border-radius: 14px; }
  .over-stats img { width: 20px; height: 20px; } .over-stats span { font-size: 11px; } .over-stats div > span:first-child { font-size: 18px !important; }
  .over-btns { gap: 6px; } .over-btns .dash-play, .over-btns .dash-alt { font-size: 14px; padding: 5px 12px; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
}

/* ---------- iPad app (touch + installed to Home Screen) ---------- */
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; min-height: 100dvh; }
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, a, button { -webkit-touch-callout: none; }
.modal-card { max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.modal { padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
/* Status bar sits over the page when installed */
.standalone .topbar { padding-top: calc(14px + env(safe-area-inset-top)); }
.standalone .search { padding-top: calc(18px + env(safe-area-inset-top)); }
/* Touch screens: a tap shouldn't leave cards stuck in their hover pose; squish on press instead */
@media (hover: none) {
  .icon-btn:hover, .feature:hover, .vcard:hover, .book:hover, .gcard:hover, .cover:hover { transform: none; }
  .cats a:hover .bub { transform: none; }
  .cats a.active:hover .bub { transform: translateY(-22px) scale(1.12); }
  .gcard:hover .gico { transform: none; }
  .vcard:hover .play { opacity: 0; }
  .icon-btn:active, .feature:active, .vcard:active, .book:active, .gcard:active { transform: scale(.96); transition-duration: .08s; }
  .cats a:not(.active):active .bub { transform: scale(.92); }
}
/* Offline message in place of a video */
.offline-note { text-align: center; padding: 18px 10px 26px; color: #fff; }
.offline-note .char { height: 170px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.3)); }
.offline-note h2 { font-size: 30px; margin: 10px 0 6px; }
.offline-note p { font-size: 19px; margin: 0 auto 18px; max-width: 460px; opacity: .9; }
.offline-btn { display: inline-block; background: #21b573; color: #fff; font-family: "Fredoka"; font-size: 22px; padding: 10px 26px; border-radius: 999px; text-decoration: none; box-shadow: 0 5px 0 #13824f; }

/* ---------- Grown-ups gate (parental gate before videos & outside links) ---------- */
.m-gate .modal-card { width: min(520px, 100%); background: linear-gradient(180deg, #fff8ec, #ffeccf); }
.gate { text-align: center; color: var(--ink); padding: 4px 6px 8px; }
.gate.nope { animation: shake .35s ease 2; }
.gate-char { height: 120px; filter: drop-shadow(0 8px 8px rgba(0,0,0,.18)); animation: bob 2s ease-in-out infinite; }
.gate h2 { font-size: clamp(26px, 4vw, 34px); margin: 6px 0 4px; }
.gate-why { margin: 0 0 14px; font-weight: 700; color: var(--muted); font-size: 16px; }
.gate-q { margin: 0 0 12px; font-weight: 800; font-size: 17px; }
.gate-words { display: block; margin-top: 4px; font-family: "Fredoka"; font-size: 26px; color: #8e5cf7; letter-spacing: .5px; }
.gate-dots { display: flex; justify-content: center; gap: 12px; margin: 0 0 16px; }
.gate-dots i { width: 18px; height: 18px; border-radius: 50%; background: #e7e2f5; transition: .15s; }
.gate-dots i.on { background: #8e5cf7; transform: scale(1.15); }
.gate-pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 380px; margin: 0 auto; }
.gate-pad button { font-family: "Fredoka"; font-size: 28px; font-weight: 600; color: var(--ink); background: #fff; border-radius: 18px; padding: 10px 0; box-shadow: 0 4px 0 #d9d1ef; transition: transform .08s; }
.gate-pad button:active { transform: translateY(3px); box-shadow: 0 1px 0 #d9d1ef; }
@media (max-width: 680px) { .gate-char { height: 90px; } .gate-pad button { font-size: 24px; padding: 8px 0; } .gate-words { font-size: 22px; } }

/* text the website pages carry for search engines; the app replaces it as soon as it starts */
.seo-page { max-width: 760px; margin: 0 auto; padding: 10px 6px 40px; font-family: "Nunito", sans-serif; color: var(--ink); line-height: 1.55; }
.seo-page h1 { font-family: "Fredoka"; font-size: 34px; margin: 8px 0; }
.seo-page h2 { font-family: "Fredoka"; font-size: 22px; margin: 22px 0 6px; }
.seo-page img { width: 220px; height: auto; border-radius: 18px; float: right; margin: 0 0 12px 16px; }
.seo-page a { color: inherit; }
.seo-crumbs { font-size: 14px; opacity: .7; }

/* Learn & explore topic cards */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tcard { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; background: #fff; border-radius: 22px; color: var(--ink); text-decoration: none; box-shadow: var(--soft, 0 4px 0 rgba(0,0,0,.08)); min-width: 200px; transition: transform .15s; }
.tcard:active { transform: scale(.97); }
.tcard .tc-ico { width: 52px; height: 52px; border-radius: 16px; background: #f1eaff; display: grid; place-items: center; flex-shrink: 0; }
.tcard .tc-ico img { width: 38px; height: 38px; object-fit: contain; }
.tcard b { font-family: "Fredoka"; font-weight: 600; font-size: 17px; line-height: 1.2; }
.seo-foot { margin-top: 30px; font-size: 14px; opacity: .8; }
.seo-foot nav { margin-top: 6px; }
.footer-note.small { margin-top: 10px; font-size: 13px; opacity: .8; }
