/* 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: "Bitter", "Rockwell", "Roboto Slab", Georgia, serif;
  --body: "DM Sans", "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; white-space: nowrap; flex: none; }
.brand img { width: 38px; height: 38px; }
.nav { display: flex; align-items: center; gap: .4rem 1.1rem; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: .5rem .2rem; }
.nav a:hover { color: var(--purple); }
.nav form { margin: 0; }
.nav .show-sm { display: none; }
@media (max-width: 720px) {
  .nav .hide-sm { display: none; }
  .nav .show-sm { display: inline; }
  .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; }
.flash.info { background: var(--blue-light); color: #1D4F8F; border: 2px solid #B9D6FF; }

/* ---------- 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 .5rem; flex-wrap: nowrap; }
  .nav a.btn { font-size: .9rem; padding: .45em .8em; min-height: 44px; }
  .site-header .wrap { gap: .5rem; }
  .brand { gap: .35rem; }
  .brand img { width: 30px; height: 30px; }
  .brand span { font-size: 1.1rem; }
}
@media (max-width: 350px) {
  .brand img { display: none; }
  .nav a { font-size: .9rem; }
}

/* ---------- school levels: class tabs, subject groups, profile form ---------- */
select { width: 100%; min-height: 50px; padding: .6rem .95rem; border: 2px solid #CFC8EE; border-radius: 14px; font: inherit; background: #fff; color: var(--ink); }
select:focus { border-color: var(--purple-mid); outline: none; box-shadow: 0 0 0 4px rgba(140, 108, 224, .2); }
.lang-pick { border: 0; padding: 0; margin: 0 0 1.2rem; }
.lang-pick legend { font-weight: 700; margin-bottom: .3rem; }
.lang-pick .check { margin-bottom: .4rem; }
.stufen { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; padding: .4rem 1rem 0; }
.stufen a { min-width: 58px; min-height: 48px; padding: .5rem .8rem; display: grid; place-items: center; border-radius: 16px; background: #fff;
  color: var(--ink); text-decoration: none; font: 700 1.15rem var(--head); box-shadow: 0 4px 0 #D3C7F5; }
.stufen a small { font-size: .75em; }
.stufen a.own { outline: 3px dashed var(--purple-mid); outline-offset: 2px; }
.stufen a.on { background: var(--purple); color: #fff; box-shadow: 0 4px 0 #3A2780; }
.fach { padding-top: .6rem; }
.fach-title { margin: 1rem clamp(.8rem, 3vw, 2rem) 0; font-size: clamp(1.15rem, 3vw, 1.45rem); display: flex; align-items: center; gap: .6rem; }
.fach-title::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--purple-mid); }
.fach-mathe .fach-title::before { background: var(--blue); }
.fach-deutsch .fach-title::before { background: var(--pink); }
.fach-nmg .fach-title::before { background: var(--green); }
.fach-englisch .fach-title::before { background: var(--orange); }
.fach-franzoesisch .fach-title::before { background: var(--teal); }
.fach .play-grid { padding-top: .6rem; padding-bottom: 1rem; }

/* ---------- number pad and school task layouts ---------- */
.task { font: 800 clamp(2.2rem, 8vw, 3.6rem) var(--head); display: flex; align-items: center; justify-content: center; gap: .35em; flex-wrap: wrap; }
.slot, .np-display { min-width: 2.2em; min-height: 1.3em; padding: 0 .3em; border-radius: 18px; border: 4px dashed var(--purple-mid); background: var(--purple-light);
  display: inline-grid; place-items: center; color: var(--purple); font: 800 clamp(2.2rem, 8vw, 3.6rem) var(--head); line-height: 1.2; }
.slot.empty, .np-display.empty { color: #B9ACE8; }
.slot.right, .np-display.right { border-style: solid; border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.slot.shown, .np-display.shown { border-style: solid; border-color: var(--orange); background: var(--orange-light); color: var(--orange-dark); }
.slot.wrong, .np-display.wrong { animation: shake .4s; }
.numpad { display: grid; grid-template-columns: repeat(3, minmax(64px, 84px)); gap: .6rem; justify-content: center; }
.np-key { min-height: 64px; border: 0; border-radius: 20px; background: #fff; box-shadow: 0 5px 0 #D3C7F5; font: 800 1.8rem var(--head); color: var(--ink); cursor: pointer; }
.np-key:active { transform: translateY(4px); box-shadow: 0 1px 0 #D3C7F5; }
.np-key.del { background: var(--orange-light); }
.np-key.ok { background: var(--green); color: #fff; box-shadow: 0 5px 0 var(--green-dark); }
.np-key:disabled { opacity: .45; cursor: default; }
.np-key:focus-visible { outline: 4px solid var(--purple-mid); outline-offset: 2px; }
.dotrow { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: center; max-width: 330px; }
.dotrow i { width: 26px; height: 26px; border-radius: 50%; background: var(--blue); border: 2px solid var(--ink); }
.dotrow i.b { background: var(--orange); }
.dotrow i.x { background: #fff; position: relative; }
.dotrow i.x::after { content: ""; position: absolute; left: -3px; right: -3px; top: 50%; height: 3px; background: var(--red); transform: rotate(-35deg); }
.dotrow .gap { width: 14px; }
.word-big { font: 800 clamp(2.4rem, 9vw, 4rem) var(--head); letter-spacing: .02em; text-align: center; overflow-wrap: anywhere; }
.word-sub { font: 700 1.3rem var(--head); color: var(--ink-soft); text-align: center; }
.opt.word { font: 700 clamp(1.3rem, 4vw, 1.8rem) var(--head); min-width: 140px; min-height: 84px; }
.opt.small-pic img { width: 84px; height: 84px; }
.tens { display: flex; gap: 1rem; align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.tens .bars { display: flex; gap: 6px; }
.tens .bar { width: 18px; height: 180px; border: 2px solid var(--ink); border-radius: 4px; background: repeating-linear-gradient(to bottom, #FFB547 0 16px, var(--ink) 16px 18px); }
.tens .ones { display: grid; grid-template-columns: repeat(3, 18px); gap: 4px; }
.tens .one { width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 3px; background: var(--green); }
.coins { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; align-items: center; max-width: 520px; }
.coin { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; border: 3px solid var(--ink);
  font: 800 1.45rem var(--head); color: #3B3363; box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .55); text-align: center; line-height: 1; }
.coin.silver { background: #D9DDE8; }
.coin.gold { background: #F4C542; }
.coin small { display: block; font-size: .55em; font-weight: 700; }
.coin.c5r { width: 62px; height: 62px; }
.coin.c10r { width: 64px; height: 64px; }
.coin.c20r { width: 70px; height: 70px; }
.coin.c50r { width: 60px; height: 60px; font-size: 1.25rem; }
.coin.c1f { width: 76px; height: 76px; }
.coin.c2f { width: 84px; height: 84px; }
.coin.c5f { width: 92px; height: 92px; }
.syllables { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; font: 800 clamp(1.8rem, 6vw, 2.6rem) var(--head); }
.syllables span { padding: .1em .45em; border-radius: 14px; background: var(--pink-light); }
.syllables span:nth-child(even) { background: var(--blue-light); }
.dotfield { display: grid; grid-template-columns: repeat(var(--cols, 5), 18px); gap: 5px; justify-content: center; margin-top: .8rem; }
.dotfield i { width: 18px; height: 18px; border-radius: 50%; background: var(--purple-mid); border: 2px solid var(--ink); }
.dotfield i.b { background: var(--pink); }
.opt.season { min-width: 128px; min-height: 128px; }
.opt-pic { display: grid; justify-items: center; gap: .25rem; font: 700 1.1rem var(--head); }
.opt-pic img { width: 64px; height: 64px; }
.voice-card { margin-top: 1.5rem; }
.voice-card h2 { font-size: 1.2rem; margin: 0 0 .3rem; }
.voice-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.voice-row select { flex: 1 1 260px; width: auto; }

/* ---------- more school task layouts ---------- */
.numline { width: min(100%, 520px); height: auto; }
.dotrow.ten { max-width: 360px; }
.dotrow i.empty { background: #fff; border-style: dashed; }
.domino { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border: 3px solid var(--ink); border-radius: 18px; background: #fff; margin-top: .6rem; }
.domino-line { width: 3px; align-self: stretch; background: var(--ink); border-radius: 2px; }
.dotfield.small { margin-top: 0; grid-template-columns: repeat(var(--cols, 5), 16px); }
.dotfield.small i { width: 16px; height: 16px; }
.story { max-width: 640px; }
.story-row { display: flex; gap: 1rem; align-items: center; text-align: left; }
.story-row img { width: 72px; height: 72px; flex: none; }
.story-text { margin: 0; font: 600 clamp(1.1rem, 3.2vw, 1.4rem)/1.45 var(--body); }
.task.small { font-size: clamp(1.8rem, 6vw, 2.6rem); margin-top: .6rem; }
.task.small .word-sub { margin-right: .2rem; }
.tiles { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
.tile { min-width: 2.2rem; padding: .25rem .5rem; border-radius: 12px; border: 3px solid var(--ink); background: #fff; font: 800 clamp(1.8rem, 6vw, 2.6rem) var(--head); text-align: center; }
.tile.gap { border-style: dashed; border-color: var(--purple-mid); background: var(--purple-light); color: #B9ACE8; }
.tile.filled { background: var(--green-light); border-color: var(--green); color: var(--green-dark); }
.sentence { font: 700 clamp(1.35rem, 4.2vw, 2rem)/1.4 var(--head); text-align: center; max-width: 30ch; margin: 0 auto; }
.slot.mark { min-width: 1.4em; font-size: 1em; margin-left: .15em; vertical-align: baseline; }
.mark-opt { display: grid; justify-items: center; }
.mark-opt b { font: 800 2.6rem/1 var(--head); }
.mark-opt small { font-size: .8rem; font-weight: 700; }
.task.seq { gap: .25em; font-size: clamp(1.7rem, 6vw, 2.6rem); }
.seq-sep { margin-left: -.2em; }

/* ---------- language menu & translations ---------- */
.lang-menu { position: relative; flex: none; }
.lang-menu summary { list-style: none; cursor: pointer; font-weight: 700; padding: .5rem .55rem; border-radius: 999px; min-height: 44px; display: flex; align-items: center; gap: .3rem; white-space: nowrap; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { background: var(--purple-light); color: var(--purple); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: .35rem; list-style: none; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); min-width: 11rem; z-index: 20; }
.lang-menu li a { display: block; padding: .55rem .8rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.lang-menu li a:hover { background: var(--purple-light); color: var(--purple); }
.lang-menu li a[aria-current] { color: var(--purple); font-weight: 800; }
.lang-menu li a[aria-current]::after { content: " ✓"; }
.tr-title { display: block; font: 600 .82em/1.25 var(--body); color: var(--ink-soft); margin-top: .2em; }
h1 .tr-title { font-size: .45em; margin-top: .35em; }
.tr-line { font: 600 1rem/1.35 var(--body); color: var(--ink-soft); margin: .35rem auto 0; max-width: 34rem; }
.tr-line::before { content: "↳ "; opacity: .55; }
/* translations inside the games: German first, the website language small underneath */
.q-text { display: grid; gap: .3rem; }
.q-prompt .tr-line, .start-intro .tr-line, .end-tr { display: flex; align-items: center; gap: .4rem; margin: 0; max-width: none;
  font: 600 clamp(.92rem, 2.4vw, 1.08rem)/1.35 var(--body); color: var(--ink-soft); }
.q-prompt .tr-line::before, .start-intro .tr-line::before, .end-tr::before, .demo-tr .tr-line::before { content: none; }
.tr-say { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: var(--purple-light); color: var(--purple); cursor: pointer; }
.tr-say svg { width: 20px; height: 20px; }
.tr-say:hover { background: #E2D8FF; }
.tr-say[hidden] { display: none; }
.opt-tr, .btn-tr, .fb-tr { display: block; font: 600 .62em/1.25 var(--body); opacity: .8; margin-top: .2em; }
.opt.text .opt-tr, .opt.word .opt-tr { font-size: .55em; }
.opt-pic .opt-tr { font-size: .8em; margin: 0; }
.opt.right .opt-tr { opacity: .95; }
.fb-tr { font-size: .78em; }
.start-btn { flex-direction: column; gap: 0; }
.start-screen .btn .btn-tr, .end-screen .btn .btn-tr { font-size: .72em; }
.end-screen .options .btn { flex-direction: column; gap: 0; }
.start-intro { margin: 0; max-width: 32rem; display: grid; justify-items: center; gap: .3rem; color: var(--ink-soft); font-weight: 600; }
.end-screen h2 { display: grid; justify-items: center; gap: .3rem; }
.end-tr { justify-content: center; font-size: 1rem; }
.start-screen h2 .tr-title { font-size: .55em; }
@media (max-width: 420px) { .lang-menu summary { padding: .4rem .35rem; font-size: .9rem; } }

/* long German words (Rechengeschichten) break with a hyphen instead of running out of the card */
.tile-title, .game-card h3, .q-prompt .q-text > span:first-child { hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 10 4 4; overflow-wrap: anywhere; }
.tile-title { display: block; min-width: 0; max-width: 100%; }

/* children choose their own figure */
.kid-bar a.who { color: inherit; text-decoration: none; position: relative; border-radius: 999px; padding: .2rem .9rem .2rem .2rem; }
.kid-bar a.who:hover, .kid-bar a.who:focus-visible { background: var(--purple-light); }
.who-edit { width: 20px; height: 20px; color: var(--purple); opacity: .75; }
.figur-page h1 { margin-bottom: .3rem; }
.figur-page .lead { color: var(--ink-soft); margin: 0 auto 1.4rem; max-width: 34rem; }
.figur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; max-width: 820px; margin: 0 auto; }
.figur-btn { display: grid; justify-items: center; gap: .3rem; padding: .9rem .6rem .8rem; border: 3px solid transparent; border-radius: 26px;
  background: #fff; box-shadow: 0 6px 0 #D3C7F5; cursor: pointer; font: 700 1.15rem var(--head); color: var(--ink);
  transition: transform .15s ease; }
.figur-btn img { width: 100%; max-width: 120px; height: auto; }
.figur-btn:hover { transform: translateY(-3px); }
.figur-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #D3C7F5; }
.figur-btn:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.figur-btn.on { border-color: var(--purple-mid); background: var(--purple-light); }
@media (prefers-reduced-motion: reduce) { .figur-btn { transition: none; } .figur-btn:hover { transform: none; } }
.figur-hallo { display: flex; align-items: center; gap: 1rem; max-width: 560px; margin: .4rem auto 1.2rem; padding: .7rem 1.2rem .7rem .7rem;
  background: #fff; border-radius: 26px; box-shadow: 0 6px 0 #D3C7F5; }
.figur-hallo img { width: 76px; height: 76px; flex: none; }
.figur-hallo p { margin: 0; font: 700 1.2rem/1.3 var(--head); }
.figur-note { display: flex; align-items: center; gap: .7rem; }
.figur-note img.mini { width: 48px; height: 48px; flex: none; }

/* Zauberhefte zum Ausdrucken */
.narrow-text { max-width: 62ch; margin: .4rem 0 0; }
.print-tips { margin-bottom: 2rem; }
.print-tips h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.print-tips ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.heft-group { margin: 0 0 2.4rem; }
.heft-group > h2 { margin: 0 0 .2rem; }
.heft-group > p { margin: 0 0 1rem; }
.heft-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(190px, 44%), 1fr)); }
.heft-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.heft-card img { display: block; width: 100%; height: auto; aspect-ratio: 360 / 510; background: var(--purple-light);
  border-bottom: 1px solid var(--line); }
.heft-card.locked img { filter: saturate(.55); opacity: .8; }
.heft-body { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem 1rem; flex: 1; }
.heft-body h3 { margin: 0; font-size: 1.05rem; line-height: 1.25; hyphens: auto; overflow-wrap: anywhere; }
.heft-body p { margin: 0; }
.heft-nr { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font: 700 .85rem var(--head); color: var(--purple); }
.heft-nr .status-pill { font-size: .75rem; padding: .15rem .55rem; }
.heft-body > .btn, .heft-actions { margin-top: auto; padding-top: .4rem; }
.heft-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.heft-actions .btn { flex: 1 1 auto; }
.hefte-card { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: center; margin-top: 1.4rem; }
.hefte-card img { width: 88px; height: auto; border-radius: 8px; box-shadow: var(--shadow); flex: none; }
.hefte-card div { flex: 1 1 260px; }
.hefte-card h2 { margin: 0 0 .3rem; font-size: 1.25rem; }
.hefte-card p { margin: 0; }
