/* Zauberwelt – one stylesheet for the website, parent area and children's area */


:root {
  --ink: #2D2A4A;
  --ink-soft: #5B5680;
  --purple: #5B3FB5;
  --purple-mid: #8C6CE0;
  --purple-light: #F1ECFF;
  --orange: #FF9A3C;
  --orange-dark: #A14A06;
  --orange-light: #FFF2E3;
  --pink: #FF6FA0;
  --pink-light: #FFEFF5;
  --blue: #4D9DFF;
  --blue-light: #EAF3FF;
  --green: #2FB57A;
  --green-dark: #13703A;
  --green-light: #E6F7EE;
  --teal: #26BBA9;
  --teal-light: #E3F8F5;
  --yellow: #FFD23F;
  --yellow-light: #FFF9DB;
  --red: #D93A4A;
  --bg: #FBFAFF;
  --card: #FFFFFF;
  --line: #E6E1F7;
  --radius: 22px;
  --shadow: 0 6px 20px rgba(45, 42, 74, .08);
  --head: "Fredoka", "Nunito", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Andika", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 17px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.12; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--purple); text-underline-offset: 3px; }
a:hover { color: #3E2A85; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(560px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .7em 1.3em;
  border-radius: 999px; border: 0; font: 700 1.05rem/1.1 var(--head); text-decoration: none; cursor: pointer;
  background: var(--purple); color: #fff; box-shadow: 0 4px 0 #3E2A85; transition: transform .08s, box-shadow .08s; }
.btn:hover { color: #fff; filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #3E2A85; }
.btn.orange { background: var(--orange); box-shadow: 0 4px 0 #C76A1A; color: #3A1D00; }
.btn.orange:hover { color: #3A1D00; }
.btn.ghost { background: #fff; color: var(--purple); box-shadow: inset 0 0 0 2px var(--purple-mid); }
.btn.ghost:hover { color: var(--purple); background: var(--purple-light); }
.btn.danger { background: var(--red); box-shadow: 0 4px 0 #8E1E2B; }
.btn.small { min-height: 44px; padding: .5em 1em; font-size: .95rem; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--purple); text-decoration: underline; cursor: pointer; min-height: 44px; }

/* ---------- header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(251, 250, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .5rem; font: 700 1.45rem var(--head); color: var(--purple); text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.nav { display: flex; align-items: center; gap: .4rem 1.1rem; flex-wrap: wrap; justify-content: flex-end; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: .5rem .2rem; }
.nav a:hover { color: var(--purple); }
.nav form { margin: 0; }
@media (max-width: 720px) {
  .nav .hide-sm { display: none; }
  .brand span { font-size: 1.2rem; }
}
.site-footer { margin-top: 5rem; padding: 2.5rem 0 3rem; background: #fff; border-top: 1px solid var(--line); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ---------- flash messages ---------- */
.flashes { list-style: none; padding: 0; margin: 1rem auto 0; width: min(760px, 100% - 40px); }
.flash { padding: .85rem 1.1rem; border-radius: 14px; margin-bottom: .6rem; font-weight: 700; }
.flash.ok { background: var(--green-light); color: var(--green-dark); border: 2px solid #A8E3C4; }
.flash.error { background: #FFECEE; color: #8E1E2B; border: 2px solid #F5B5BD; }

/* ---------- landing ---------- */
.hero { padding: 3.5rem 0 2.5rem; overflow: hidden; }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; } }
.hero .lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34em; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.kicker { display: inline-block; font: 700 .95rem var(--head); color: var(--purple); background: var(--purple-light); padding: .35rem .9rem; border-radius: 999px; margin-bottom: 1rem; }
.hero-art { position: relative; aspect-ratio: 1 / .82; background: var(--purple-light); border-radius: 40px; }
.hero-art .rainbow { position: absolute; inset: 8% 6% auto; }
.hero-art .chars { position: absolute; inset: auto 3% 6%; display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; }
.hero-art .chars img:nth-child(2), .hero-art .chars img:nth-child(3) { transform: translateY(-8%); }
.bubbles span { position: absolute; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; color: #fff;
  font: 700 1.8rem var(--head); border: 4px solid #fff; box-shadow: var(--shadow); }
.section { padding: 3.5rem 0; }
.section.tinted { background: #fff; border-block: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 2rem; }
.grid { display: grid; gap: 1.2rem; }
.grid.games { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); border: 1px solid var(--line); }
.game-card { position: relative; display: flex; flex-direction: column; gap: .4rem; }
.game-card .pic { width: 74px; height: 74px; border-radius: 20px; display: grid; place-items: center; margin-bottom: .4rem; }
.game-card .pic img { width: 56px; height: 56px; }
.badge { position: absolute; top: 1rem; right: 1rem; font: 700 .8rem var(--head); padding: .25rem .65rem; border-radius: 999px; }
.badge.free { background: var(--green-light); color: var(--green-dark); }
.badge.premium { background: var(--yellow-light); color: #7A5A00; border: 1px solid #F2D877; }
.step .num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--orange); color: #3A1D00; font: 700 1.3rem var(--head); margin-bottom: .8rem; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 2rem; margin-bottom: .7rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: .2rem; width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.2rem; margin-bottom: .7rem; }
.faq summary { cursor: pointer; font: 700 1.1rem var(--head); min-height: 32px; }
.faq details p { margin: .8rem 0 0; }
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }

/* colour helpers for tiles */
.c-blue { background: var(--blue-light); } .c-purple { background: var(--purple-light); } .c-pink { background: var(--pink-light); }
.c-orange { background: var(--orange-light); } .c-teal { background: var(--teal-light); } .c-green { background: var(--green-light); }
.c-yellow { background: var(--yellow-light); }

/* ---------- pricing ---------- */
.plans { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 3px solid var(--purple-mid); }
.plan .price { font: 700 2.2rem var(--head); margin: .3rem 0 0; }
.plan .per { color: var(--ink-soft); margin-bottom: 1rem; }
.plan form, .plan .btn { margin-top: auto; }
.plan-buttons { display: grid; gap: .8rem; margin-top: auto; }
.plan-buttons form { margin: 0; }
.plan-option { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .8rem 1rem; border-radius: 14px; background: var(--purple-light); margin-bottom: .6rem; }
.plan-option strong { font: 700 1.3rem var(--head); }

/* ---------- forms ---------- */
.form-card { background: #fff; border-radius: 28px; padding: clamp(1.4rem, 4vw, 2.4rem); box-shadow: var(--shadow); border: 1px solid var(--line); margin-top: 2rem; }
label { display: block; font-weight: 700; margin-bottom: .35rem; }
.field { margin-bottom: 1.1rem; }
.hint { font-size: .9rem; color: var(--ink-soft); margin-top: .3rem; }
input[type=email], input[type=password], input[type=text], input[type=number] {
  width: 100%; min-height: 50px; padding: .7rem .95rem; border: 2px solid #CFC8EE; border-radius: 14px; font: inherit; background: #fff; color: var(--ink); }
input:focus { border-color: var(--purple-mid); outline: none; box-shadow: 0 0 0 4px rgba(140, 108, 224, .2); }
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; margin-bottom: .8rem; }
.check input { width: 24px; height: 24px; margin-top: .1rem; flex-shrink: 0; accent-color: var(--purple); }
.avatar-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; border: 0; padding: 0; margin: 0 0 1.2rem; }
.avatar-pick legend { font-weight: 700; margin-bottom: .5rem; }
.avatar-pick label { position: relative; margin: 0; cursor: pointer; text-align: center; font: 700 .95rem var(--head); }
.avatar-pick input { position: absolute; opacity: 0; inset: 0; }
.avatar-pick span.tile { display: block; padding: .5rem; border-radius: 18px; border: 3px solid var(--line); background: #fff; }
.avatar-pick input:checked + span.tile { border-color: var(--purple-mid); background: var(--purple-light); }
.avatar-pick input:focus-visible + span.tile { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- parent area ---------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin: 2.2rem 0 1.4rem; }
.notice { background: var(--yellow-light); border: 2px solid #F2D877; border-radius: 16px; padding: 1rem 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.notice form { margin: 0; }
.kid-card { display: grid; gap: 1rem; }
.kid-top { display: flex; gap: 1rem; align-items: center; }
.kid-top img { width: 72px; height: 72px; }
.kid-top h3 { margin: 0; }
.kid-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.kid-actions form { margin: 0; }
.progress-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.progress-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .7rem; border-radius: 10px; background: var(--bg); font-size: .95rem; }
.stars { letter-spacing: .1em; color: #E0A800; font-weight: 700; white-space: nowrap; }
.stars .off { color: #D6D2E8; }
.status-pill { display: inline-block; font: 700 .9rem var(--head); padding: .3rem .8rem; border-radius: 999px; }
.status-pill.on { background: var(--green-light); color: var(--green-dark); }
.status-pill.off { background: var(--purple-light); color: var(--purple); }
.install-box { display: none; }
.install-box.show { display: flex; }
.danger-zone { border: 2px solid #F5B5BD; background: #FFF7F8; }

/* ---------- children's area ---------- */
body.kids { background: #F3EEFF; }
.kid-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(.8rem, 3vw, 2rem); }
.kid-bar .who { display: flex; align-items: center; gap: .7rem; font: 700 1.4rem var(--head); }
.kid-bar .who img { width: 56px; height: 56px; }
.round-btn { display: inline-grid; place-items: center; min-width: 56px; height: 56px; padding: 0 1rem; border-radius: 999px; border: 0; background: #fff;
  color: var(--purple); box-shadow: 0 4px 0 #D3C7F5; font: 700 1rem var(--head); text-decoration: none; cursor: pointer; gap: .4rem; grid-auto-flow: column; }
.round-btn svg { width: 26px; height: 26px; }
.round-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #D3C7F5; }
.who-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 2rem; }
.who-grid form { margin: 0; }
.who-btn { width: 100%; border: 0; border-radius: 30px; padding: 1.4rem 1rem; background: #fff; box-shadow: 0 6px 0 #D3C7F5; cursor: pointer;
  font: 700 1.6rem var(--head); color: var(--ink); display: grid; justify-items: center; gap: .6rem; }
.who-btn img { width: 130px; height: 130px; }
.who-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #D3C7F5; }
.play-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); padding: 1rem clamp(.8rem, 3vw, 2rem) 3rem; }
.play-tile { position: relative; display: grid; justify-items: center; gap: .3rem; padding: 1.2rem .8rem 1rem; border-radius: 28px; text-decoration: none;
  color: var(--ink); background: #fff; box-shadow: 0 6px 0 #D3C7F5; font: 700 1.35rem var(--head); text-align: center; min-height: 190px; }
.play-tile:active { transform: translateY(4px); box-shadow: 0 2px 0 #D3C7F5; }
.play-tile .pic { width: 104px; height: 104px; border-radius: 26px; display: grid; place-items: center; }
.play-tile .pic img { width: 80px; height: 80px; }
.play-tile .lock { position: absolute; top: .7rem; right: .7rem; width: 40px; height: 40px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; }
.play-tile .lock svg { width: 22px; height: 22px; }
.play-tile.locked .pic { filter: grayscale(.5); opacity: .75; }
.mini-stars { font-size: 1.1rem; color: #E0A800; letter-spacing: .08em; }
.mini-stars .off { color: #DDD7F0; }

/* ---------- game screen ---------- */
.game { min-height: 100dvh; display: flex; flex-direction: column; }
.game-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem clamp(.8rem, 3vw, 2rem); }
.game-top h1 { font-size: clamp(1.3rem, 4vw, 2rem); margin: 0; text-align: center; flex: 1; }
.dots { display: flex; justify-content: center; gap: .45rem; padding: 0 1rem .6rem; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: #DCD3F7; }
.dots i.done { background: var(--green); }
.dots i.miss { background: var(--orange); }
.dots i.now { background: var(--purple-mid); transform: scale(1.25); }
.stage { flex: 1; display: grid; place-items: center; padding: 1rem clamp(.8rem, 3vw, 2rem) 2rem; }
.q { width: min(860px, 100%); display: grid; gap: 1.4rem; justify-items: center; }
.q-prompt { display: flex; align-items: center; gap: .9rem; background: #fff; border-radius: 24px; padding: .7rem 1.1rem .7rem .7rem; box-shadow: var(--shadow); font: 700 clamp(1.15rem, 3.4vw, 1.6rem) var(--head); }
.q-prompt img { width: 64px; height: 64px; }
.q-show { background: #fff; border-radius: 30px; padding: 1.2rem; box-shadow: var(--shadow); display: grid; place-items: center; min-height: 170px; width: min(560px, 100%); }
.objects { display: grid; grid-template-columns: repeat(5, minmax(0, 64px)); gap: .5rem; justify-content: center; }
.objects img { width: 100%; aspect-ratio: 1; }
.options { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.opt { min-width: 112px; min-height: 112px; padding: .6rem 1rem; border-radius: 28px; border: 0; background: #fff; box-shadow: 0 6px 0 #D3C7F5;
  font: 700 3rem var(--head); color: var(--ink); cursor: pointer; display: grid; place-items: center; touch-action: manipulation; }
.opt.text { font-size: 1.6rem; min-width: 150px; }
.opt svg { width: 96px; height: 96px; }
.opt:active { transform: translateY(4px); box-shadow: 0 2px 0 #D3C7F5; }
.opt.right { background: var(--green); color: #fff; box-shadow: 0 6px 0 #13703A; }
.opt.wrong { animation: shake .4s; background: #FFE3D1; }
.opt:disabled { cursor: default; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.big-letter { font: 700 clamp(6rem, 22vw, 10rem)/1 var(--head); color: var(--purple); }
.word-pic { width: 150px; height: 150px; }
.slots { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.slot { width: 64px; height: 76px; border-radius: 16px; border: 3px dashed #BEB3E8; display: grid; place-items: center; font: 700 2.6rem var(--head); background: #fff; }
.slot.filled { border-style: solid; border-color: var(--green); color: var(--green-dark); }
.tiles { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.tile-btn { width: 78px; height: 78px; border-radius: 20px; border: 0; background: var(--yellow); box-shadow: 0 5px 0 #D9A800; font: 700 2.6rem var(--head); color: var(--ink); cursor: pointer; }
.tile-btn:disabled { visibility: hidden; }
.tile-btn.wrong { animation: shake .4s; }
.trace-wrap { display: grid; gap: 1rem; justify-items: center; }
.trace-canvas { width: min(420px, 90vw); aspect-ratio: 1; background: #fff; border-radius: 30px; box-shadow: var(--shadow); touch-action: none; cursor: crosshair; }
.trace-tools { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; }
.start-screen, .end-screen { display: grid; justify-items: center; gap: 1.2rem; text-align: center; }
.start-screen img, .end-screen img.char { width: 180px; height: 180px; }
.end-stars { display: flex; gap: .6rem; }
.end-stars svg { width: 76px; height: 76px; }
.end-stars svg.pop { animation: pop .5s both; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
.feedback { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); display: flex; align-items: center; gap: .6rem; background: #fff;
  border-radius: 24px; padding: .6rem 1.1rem .6rem .6rem; box-shadow: 0 10px 30px rgba(45, 42, 74, .18); font: 700 1.3rem var(--head);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 5; }
.feedback.show { opacity: 1; }
.feedback img { width: 58px; height: 58px; }
.levels { display: grid; gap: 1rem; width: min(520px, 100%); }
.clock { width: min(260px, 70vw); height: auto; }
.shape-svg { width: 96px; height: 96px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- misc ---------- */
.legal { max-width: 46em; }
.legal h2 { font-size: 1.4rem; margin-top: 2rem; }
.placeholder-note { background: var(--yellow-light); border: 2px dashed #E8C969; padding: .8rem 1rem; border-radius: 12px; }
.error-page { text-align: center; padding: 4rem 0; }
.error-page img { width: 160px; margin: 0 auto 1rem; }
.bubbles .b1 { left: 8%; top: 10%; background: var(--pink); }
.bubbles .b2 { right: 9%; top: 6%; background: var(--orange); }
.bubbles .b3 { left: 20%; top: 34%; background: var(--blue); }
.bubbles .b4 { right: 18%; top: 30%; background: var(--green); }
.card > img.center { width: 150px; margin: 0 auto 1rem; }

.nav a.btn, .nav a.btn:hover { color: #fff; padding: .5em 1em; }
.big-glyph { height: clamp(140px, 30vw, 200px); width: auto; }
.objects { grid-template-columns: repeat(5, minmax(0, 76px)); }
.play-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 480px) {
  .play-tile { min-height: 160px; font-size: 1.15rem; padding: 1rem .5rem .8rem; }
  .play-tile .pic { width: 84px; height: 84px; }
  .play-tile .pic img { width: 64px; height: 64px; }
  .nav { gap: .3rem .7rem; }
  .nav a.btn { font-size: .9rem; padding: .45em .8em; min-height: 44px; }
}
