/* Rekenrugzak – vrolijke, rustige stijl voor kinderen (overgenomen uit Rekenrijk) */

/* Baloo 2, zelf gehost (SIL OFL, zie fonts/OFL.txt). Variabel lettertype: één bestand voor gewicht 400–800.
   Subset: Latijn + Latin-1/Extended-A, leestekens, €, pijlen, − en ≈. */
@font-face {
  font-family: 'Baloo 2';
  src: url('../fonts/baloo2-latin.woff') format('woff');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #2b2d42; --muted: #525669; --line: #e3e7f2; --paper: #ffffff;
  --sky1: #bfe6ff; --sky2: #fff6e0;
  --blue: #3aa0ff; --red: #ff6b6b; --green: #2fb57a; --yellow: #ffd23f; --violet: #8f6bff; --orange: #ff9f43;
  --good: #17784c; --bad: #e5484d; --gold: #f5b700;
  /* knoppen met witte tekst: minstens 4,5:1 contrast (groep 1: UX-review B4) */
  --blue-btn: #1769b8; --green-btn: #17784c; --warn-ink: #b34a00;
  --r: 22px; --shadow: 0 6px 0 rgba(43, 45, 66, .08), 0 10px 30px rgba(43, 45, 66, .06);
  /* Geen externe lettertypen (privacy): Baloo 2 komt uit fonts/ in het project, met ronde systeemlettertypen als reserve */
  --font: 'Baloo 2', ui-rounded, 'SF Pro Rounded', 'Nunito', 'Varela Round', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 18px/1.45 var(--font); color: var(--ink); min-height: 100vh;
  background: linear-gradient(180deg, var(--sky1) 0%, #e3f4ff 40%, var(--sky2) 100%) fixed;
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 4px solid var(--violet); outline-offset: 2px; }
h1, h2 { line-height: 1.15; margin: 0 0 10px; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.3rem; }
p { margin: 6px 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.center { text-align: center; }

/* wolkjes */
.sky { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.cloud { position: absolute; width: 160px; height: 50px; background: #fff; border-radius: 50px; opacity: .8; animation: drift 60s linear infinite; }
.cloud::before, .cloud::after { content: ''; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 70px; height: 70px; top: -35px; left: 25px; }
.cloud::after { width: 55px; height: 55px; top: -25px; left: 80px; }
.c1 { top: 8%; left: -200px; } .c2 { top: 30%; left: -200px; animation-delay: -25s; transform: scale(.7); } .c3 { top: 60%; left: -200px; animation-delay: -45s; transform: scale(1.2); opacity: .5; }
@keyframes drift { to { left: 110%; } }
/* Minder animaties (instelling voor ouders; volgt standaard de systeeminstelling) */
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.calm .sky { display: none; }
html.calm .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 255, 255, .96); }
html.calm .confetti { display: none; }

.wrap { max-width: 900px; margin: 0 auto; padding: 12px 16px 48px; }
.wrap.narrow { max-width: 620px; }
.card { background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin: 14px 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.center { justify-content: center; }
.wrap-gap { flex-wrap: wrap; margin: 14px 0; }
.grow { flex: 1; min-width: 0; }

/* knoppen */
.btn { border: 0; border-radius: 16px; padding: 10px 20px; min-height: 48px; font-weight: 700; font-size: 1.05rem; background: #eef1f8; box-shadow: 0 4px 0 #cfd5e6; transition: transform .08s, box-shadow .08s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #cfd5e6; }
.btn.primary { background: var(--blue-btn); color: #fff; box-shadow: 0 4px 0 #0f4f8c; }
.btn.primary:active { box-shadow: 0 1px 0 #0f4f8c; }
.btn.ghost { background: #fff; box-shadow: 0 4px 0 #dfe4f0; }
.btn.danger { background: #fff0f0; color: var(--bad); box-shadow: 0 4px 0 #f3c6c7; }
.btn.small { padding: 10px 18px; font-size: .95rem; }
.btn.big { padding: 14px 28px; font-size: 1.25rem; }
.btn-icon { border: 0; background: #fff; width: 44px; height: 44px; border-radius: 14px; font-size: 1.25rem; box-shadow: 0 3px 0 #dfe4f0; display: inline-grid; place-items: center; flex: none; }
.btn-icon.soft { background: #f3f5fb; }
.btn-icon:active { transform: translateY(2px); box-shadow: none; }

/* bovenbalk */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px); border-bottom: 2px solid rgba(255, 255, 255, .6); }
.me { display: flex; align-items: center; gap: 8px; font-weight: 800; min-width: 0; }
.me-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.pills { margin-left: auto; display: flex; gap: 6px; }
.pill { background: #fff; border-radius: 99px; padding: 2px 10px; font-size: .95rem; box-shadow: 0 2px 0 #e3e7f2; white-space: nowrap; }
.avatar { font-size: 2.6rem; line-height: 1; }
.avatar.sm { font-size: 1.6rem; }
@media (max-width: 520px) { .me-name { display: none; } .pill { padding: 2px 7px; font-size: .85rem; } }

/* Pim de uil */
.pim { display: flex; align-items: flex-end; gap: 10px; margin: 10px 0 6px; }
.pim-face { font-size: 3rem; line-height: 1; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .08)); animation: bob 3s ease-in-out infinite; }
.bubble { position: relative; background: #fff; border-radius: 20px 20px 20px 6px; padding: 10px 16px; box-shadow: var(--shadow); font-weight: 600; max-width: 560px; }
.pim.bounce .bubble { animation: pop .35s ease; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
@keyframes pop { 0% { transform: scale(.9); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }

/* welkom */
.logo { font-size: clamp(2.8rem, 10vw, 4.6rem); font-weight: 800; letter-spacing: .02em; margin: 26px 0 0; }
.logo span { display: inline-block; text-shadow: 0 5px 0 rgba(0, 0, 0, .12); animation: wave 2.4s ease-in-out infinite; }
.logo span:nth-child(6n+1) { color: var(--red); } .logo span:nth-child(6n+2) { color: var(--orange); } .logo span:nth-child(6n+3) { color: var(--gold); }
.logo span:nth-child(6n+4) { color: var(--green); } .logo span:nth-child(6n+5) { color: var(--blue); } .logo span:nth-child(6n) { color: var(--violet); }
.logo span:nth-child(2) { animation-delay: .1s; } .logo span:nth-child(3) { animation-delay: .2s; } .logo span:nth-child(4) { animation-delay: .3s; } .logo span:nth-child(5) { animation-delay: .4s; }
.logo span:nth-child(6) { animation-delay: .5s; } .logo span:nth-child(7) { animation-delay: .6s; } .logo span:nth-child(8) { animation-delay: .7s; } .logo span:nth-child(9) { animation-delay: .8s; }
@keyframes wave { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } }
.tagline { font-size: 1.15rem; color: var(--muted); margin-bottom: 18px; }
.wrap.center .pim { justify-content: center; }
.profiles { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 18px; }
.profile-btn { border: 0; background: #fff; border-radius: 24px; padding: 16px 18px; width: 140px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: var(--shadow); transition: transform .15s; }
.profile-btn:hover { transform: translateY(-4px) rotate(-1deg); }
.profile-btn small { color: var(--muted); }
.profile-btn.add { background: #fffbe9; border: 3px dashed #ffd23f; }

/* formulier */
.lbl { display: block; font-weight: 800; margin: 14px 0 6px; }
.text-in { font: inherit; font-size: 1.2rem; width: 100%; padding: 10px 14px; border-radius: 14px; border: 3px solid var(--line); background: #fbfcff; }
.text-in:focus { border-color: var(--blue); outline: none; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; }
.avatar-opt { border: 3px solid transparent; background: #f3f5fb; border-radius: 16px; font-size: 2rem; padding: 4px; }
.avatar-opt.on { border-color: var(--blue); background: #e5f3ff; transform: scale(1.08); }
.groep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.groep-opt { border: 3px solid transparent; background: #f3f5fb; border-radius: 16px; padding: 8px; display: flex; flex-direction: column; }
.groep-opt small { color: var(--muted); font-size: .8rem; }
.groep-opt.on { border-color: var(--green); background: #e6f8ef; }
.err { color: var(--bad); font-weight: 700; min-height: 1.2em; }

/* zelfinschatting */
.feel-list { display: grid; gap: 10px; margin-top: 10px; }
.feel-row { background: #fff; border-radius: 20px; padding: 12px 14px; box-shadow: var(--shadow); border-left: 8px solid var(--c); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.feel-skill { display: flex; gap: 10px; align-items: center; }
.feel-skill small { display: block; color: var(--muted); font-size: .85rem; }
.isl-icon { font-size: 2rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--c, var(--blue)) 18%, white); flex: none; }
.isl-icon.xl { font-size: 3rem; width: 84px; height: 84px; border-radius: 24px; background: rgba(255, 255, 255, .85); }
.feel-opts { display: flex; gap: 6px; }
.feel-opts.wide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.feel-opt { border: 3px solid transparent; background: #f3f5fb; border-radius: 16px; padding: 4px 8px; display: flex; flex-direction: column; align-items: center; min-width: 70px; }
.feel-opt span { font-size: 1.7rem; line-height: 1.2; }
.feel-opt small { font-size: .9rem; font-weight: 700; }
.feel-opt.on { border-color: var(--violet); background: #f0ebff; }
.feel-opts.wide .feel-opt span { font-size: 2.3rem; }
.feel-opts.wide .feel-opt small { font-size: .95rem; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--sky2) 40%); }

/* voortgang */
.progress { height: 16px; background: #fff; border-radius: 99px; overflow: hidden; box-shadow: inset 0 2px 0 rgba(0, 0, 0, .06); margin: 8px 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--green), #7be0a9); border-radius: 99px; transition: width .5s; }
.pdots { display: flex; gap: 6px; justify-content: center; margin: 12px 0 4px; flex-wrap: wrap; }
.pd { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px #d9deeb; display: grid; place-items: center; color: #fff; font-size: .75rem; font-weight: 800; line-height: 1; }
.pd.cur { box-shadow: inset 0 0 0 4px var(--blue); transform: scale(1.25); }
.pd.ok { background: var(--good); box-shadow: none; } .pd.no { background: #fff; box-shadow: inset 0 0 0 3px var(--warn-ink); color: var(--warn-ink); }
.pd.ok::after { content: '✓'; } .pd.no::after { content: '•'; font-size: 1.1rem; }

/* vraagkaart */
.qcard { background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 16px 18px 20px; border-top: 10px solid var(--c); margin: 12px 0; }
.qcard.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
/* rustig foutsignaal (jonge kinderen, minder animaties): geen schudden, alleen een zachte oranje rand */
.qcard.calm-no { animation: calmno 1.2s; }
@keyframes calmno { 0%, 60% { box-shadow: 0 0 0 4px #ffc078; } 100% { box-shadow: none; } }
.q-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.q-btns { display: flex; gap: 6px; }
.chip { background: color-mix(in srgb, var(--c) 15%, white); color: color-mix(in srgb, var(--c) 70%, black); border-radius: 99px; padding: 3px 12px; font-weight: 800; font-size: .9rem; }
.q-visual { display: flex; justify-content: center; margin: 12px 0 4px; overflow-x: auto; }
.vis { width: 100%; height: auto; display: block; }
.q-prompt { font-size: clamp(1.4rem, 4.5vw, 2.1rem); font-weight: 800; text-align: center; margin: 10px 0 14px; line-height: 1.3; }
.q-prompt.short { font-size: clamp(2.2rem, 8vw, 3rem); }
.q-prompt b { color: color-mix(in srgb, var(--c) 75%, black); }
.sub-sum { font-size: 1.1em; margin-top: 6px; }
.blank { display: inline-block; min-width: 1.6em; padding: 0 .25em; border-radius: 10px; background: #fff3c4; border: 3px dashed var(--gold); color: var(--ink) !important; line-height: 1.2; }
.cmp-row { display: inline-flex; gap: .5em; align-items: center; font-size: 1.15em; }
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.05; margin: 0 .12em; font-weight: 800; }
.frac .num { border-bottom: 3px solid currentColor; padding: 0 .2em; }
.frac .den { padding: 0 .2em; }
.frac .blank { min-width: 1.2em; }
.stack { display: grid; gap: 8px; width: 100%; max-width: 320px; }

/* antwoord: numpad */
.ans-display { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 66px; max-width: 320px; margin: 0 auto 12px; background: #f6f8fd; border: 4px solid var(--line); border-radius: 18px; font-size: 2.2rem; font-weight: 800; transition: border-color .2s, background .2s; }
.ans-display.ok { border-color: var(--good); background: #e8f8f0; }
.ans-display.no { border-color: var(--warn-ink); border-style: dashed; background: #fff4e8; }
.ans-display.ok::after, .ans-display.no::after { font-size: 1.6rem; margin-left: 4px; }
.ans-display.ok::after { content: '✓'; color: var(--good); }
.ans-display.no::after { content: '✗'; color: var(--warn-ink); }
/* B5: het foute antwoord blijft doorgestreept staan tot er een nieuwe toets komt */
.ans-val .was { color: var(--warn-ink); text-decoration-thickness: 3px; opacity: .85; }
.ans-val .ans-tip { font-size: 1.1rem; font-weight: 700; color: var(--muted); }
.affix { color: var(--muted); font-size: 1.5rem; }
.caret { width: 3px; height: 1.1em; background: var(--blue); animation: blink 1s steps(1) infinite; }
.ans-display.ok .caret, .ans-display.no .caret { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 320px; margin: 0 auto; }
.key { border: 0; height: 58px; border-radius: 16px; background: #eef2fb; font-size: 1.6rem; font-weight: 800; box-shadow: 0 4px 0 #d3d9ea; }
.key:active { transform: translateY(3px); box-shadow: 0 1px 0 #d3d9ea; }
.key-del { background: #fff0e3; box-shadow: 0 4px 0 #f5d2b0; }
.key-ok { grid-column: 1 / -1; background: var(--green-btn); color: #fff; box-shadow: 0 4px 0 #0f5636; font-size: 1.35rem; }
.key:disabled { opacity: .55; }

/* antwoord: keuzes */
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 560px; margin: 0 auto; }
.choices.n3 { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; border: 3px solid var(--line); background: #fff; border-radius: 18px; min-height: 64px; padding: 10px 12px; font-size: 1.25rem; font-weight: 800; box-shadow: 0 4px 0 #dfe4f0; }
.choices.big .choice { font-size: 2.2rem; min-height: 84px; }
.choice .ck { position: absolute; top: 4px; left: 8px; font-size: .8rem; color: var(--muted); font-weight: 700; }
.choice:hover:not(:disabled) { border-color: var(--blue); }
.choice.right { border-color: var(--good); background: #e8f8f0; }
.choice.wrong { border-color: var(--warn-ink); border-style: dashed; background: #fff4e8; color: #6b4a2f; }
.choice.right::after, .choice.wrong::after { position: absolute; top: 4px; right: 10px; font-size: 1.2rem; line-height: 1.2; }
.choice.right::after { content: '✓'; color: var(--good); }
.choice.wrong::after { content: '✗'; color: var(--warn-ink); }
.choice:disabled:not(.right):not(.wrong) { opacity: .6; }

/* feedback */
.q-feedback { text-align: center; min-height: 1.6em; margin-top: 12px; font-weight: 700; font-size: 1.15rem; }
.q-feedback.good { color: var(--good); font-size: 1.4rem; }
.q-feedback.try { color: var(--warn-ink); }
.q-feedback.soft { color: var(--muted); }
.q-feedback.hint, .hint-line { background: #fffbe6; border-radius: 14px; padding: 8px 12px; color: var(--ink); font-weight: 600; margin-top: 6px; }
.q-feedback.reveal { background: #f3f7ff; border-radius: 18px; padding: 12px; }
.answer-big { font-size: 1.6rem; color: var(--good); }
.explain { color: var(--muted); margin: 6px 0 10px; font-weight: 600; }
/* C3: na het onthullen staat het antwoord op de plek van het vraagteken, en het cijferblok verdwijnt */
.blank.filled { background: #e8f8f0; border: 3px solid var(--good); color: var(--good) !important; }
.emoji-row.num-tiles span.filled { background: #e8f8f0; box-shadow: 0 3px 0 #a8dcc0; color: var(--good); }
.qcard.revealed .numpad { display: none; }
.coin-pop { display: inline-block; animation: coin .8s ease; color: #8a5a00; }
.streak { color: var(--warn-ink); }
@keyframes coin { 0% { transform: translateY(10px) scale(.6); opacity: 0; } 50% { transform: translateY(-8px) scale(1.2); opacity: 1; } 100% { transform: none; } }

/* plaatjes */
.money-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.coin { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 800; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15), 0 3px 0 rgba(0, 0, 0, .12); }
.coin-euro { width: 64px; height: 64px; font-size: 1.1rem; }
.coin-1 { background: radial-gradient(circle, #e9c24a 0 45%, #c9ced8 46%); } .coin-2 { background: radial-gradient(circle, #c9ced8 0 45%, #e9c24a 46%); width: 72px; height: 72px; }
.coin-cent { background: #e9c24a; color: #6b4e00; width: 52px; height: 52px; font-size: 1rem; line-height: 1; }
.coin-cent small { font-size: .6rem; display: block; margin-top: -10px; }
.coin-c5, .coin-c1, .coin-c2 { background: #d68a52; color: #4a2300; width: 44px; height: 44px; }
.coin-c50 { width: 60px; height: 60px; }
.bill { display: inline-grid; place-items: center; width: 116px; height: 62px; border-radius: 8px; font-weight: 800; font-size: 1.3rem; color: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, .15); border: 3px solid rgba(255, 255, 255, .5); }
.bill-5 { background: #8d9aa8; } .bill-10 { background: #e0675a; } .bill-20 { background: #4f7fd1; } .bill-50 { background: #ef9a33; }
.mab { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.mab-ten { display: grid; grid-template-rows: repeat(10, 14px); gap: 1px; background: #1f78cf; padding: 2px; border-radius: 4px; }
.mab-ten i, .mab-ones i { display: block; width: 14px; height: 14px; background: var(--blue); border-radius: 2px; }
.mab-ones { display: grid; grid-template-columns: repeat(3, 16px); gap: 3px; margin-left: 10px; }
.mab-ones i { background: var(--yellow); outline: 1px solid #c9a000; }
.groups { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.grp { background: #f3f0ff; border: 3px dashed #c5b5ff; border-radius: 20px; padding: 8px 10px; font-size: 1.6rem; max-width: 150px; text-align: center; word-break: break-all; line-height: 1.3; }
.share { text-align: center; }
.share-items { font-size: 1.8rem; letter-spacing: 2px; }
.share-people { font-size: 2.6rem; margin-top: 6px; letter-spacing: 12px; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; font-size: 2.2rem; }
/* een groep emoji in één span (bijv. 🔵🔵❔❔❔) mag op een smal scherm naar een tweede regel */
.emoji-row > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.emoji-row.num-tiles span { min-width: 64px; padding: 6px 10px; background: #eef7e6; border-radius: 16px; font-weight: 800; font-size: 1.7rem; box-shadow: 0 3px 0 #cfe3bf; text-align: center; }
.emoji-row.num-tiles span:last-child { background: #fff3c4; box-shadow: 0 3px 0 #f0d77a; }

/* thuis */
.goal { padding: 12px 18px; }
.tip-card { background: #fffbe6; }
.play-btn { display: block; width: 100%; border: 0; border-radius: 28px; padding: 22px; font-size: 2rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #c2410c, #c8336b); box-shadow: 0 8px 0 #c93a6a, 0 16px 30px rgba(255, 79, 139, .3); margin: 16px 0; letter-spacing: .03em; transition: transform .1s; }
.play-btn:hover { transform: translateY(-2px); }
.play-btn:active { transform: translateY(5px); box-shadow: 0 3px 0 #c93a6a; }
.suggest { display: flex; gap: 12px; align-items: center; border-left: 8px solid var(--c); }
.suggest small { display: block; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 14px 0; }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { border: 0; border-radius: 24px; padding: 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 0; box-shadow: var(--shadow); transition: transform .15s; }
.tile:hover { transform: translateY(-3px); }
.tile span { font-size: 2.4rem; }
.tile small { color: var(--muted); font-size: .9rem; text-align: center; }
.t-blue { background: #e2f2ff; } .t-violet { background: #efe9ff; } .t-green { background: #e3f8ec; } .t-orange { background: #fff0e0; } .t-yellow { background: #fff8d6; } .t-gray { background: #f1f3f8; }

/* keuze modus */
.section-title { margin: 20px 0 8px; }
.mood-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mood { border: 3px solid transparent; background: #f3f5fb; border-radius: 18px; padding: 8px; font-weight: 700; display: flex; flex-direction: column; align-items: center; }
.mood span { font-size: 2.2rem; }
.mood.on { border-color: var(--orange); background: #fff2e3; }
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 560px) { .modes { grid-template-columns: 1fr; } }
.mode { border: 0; border-radius: 24px; padding: 18px; text-align: left; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; box-shadow: var(--shadow); transition: transform .15s; }
.mode:hover { transform: translateY(-3px); }
.mode span { grid-row: 1 / 3; font-size: 2.6rem; }
.mode b { font-size: 1.25rem; } .mode small { color: var(--muted); }
.m-mix { background: #e2f2ff; } .m-hard { background: #ffe9e9; } .m-pick { background: #e3f8ec; } .m-up { background: #f0ebff; }
.m-tafel { background: #fff2e3; grid-column: 1 / -1; }

/* eilanden */
.islands { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 10px; }
.island { position: relative; border: 0; border-radius: 26px 26px 40px 40px; padding: 14px 12px 12px; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 2px; border-bottom: 10px solid color-mix(in srgb, var(--c) 55%, #f4e2b0); transition: transform .15s; }
.island:hover { transform: translateY(-4px) rotate(.5deg); }
.island.later { opacity: .82; }
.island small { color: var(--muted); font-size: .85rem; }
.island .lvl { color: var(--ink); font-weight: 700; }
.lvl-bar { width: 85%; height: 10px; background: #eef1f8; border-radius: 9px; overflow: hidden; margin-top: 4px; }
.lvl-bar div { height: 100%; background: var(--c); border-radius: 9px; }
.tag { position: absolute; top: 8px; right: 8px; background: #ffe9e9; color: #c0392b; font-size: .7rem; font-weight: 800; padding: 1px 8px; border-radius: 99px; }
.tag.new { background: #e6f8ef; color: var(--good); }
.island-head { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 45%, white), color-mix(in srgb, var(--c) 20%, white)); color: var(--ink); border-radius: var(--r); padding: 18px; margin-top: 14px; box-shadow: var(--shadow); }
.island-head h1 { margin: 0; }
.island-head p { margin: 0; font-weight: 700; }
.path { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.path button { width: 100%; border: 0; background: #f6f8fd; border-radius: 16px; padding: 8px 12px; display: flex; gap: 12px; align-items: center; text-align: left; font-weight: 700; }
.path .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; flex: none; box-shadow: 0 2px 0 #dfe4f0; }
.path .done button { background: #e8f8f0; } .path .done .dot { background: var(--good); color: #fff; }
.path .now button { background: #fff3c4; box-shadow: 0 0 0 3px var(--gold); }
.path .locked button { opacity: .55; }
.example .ex-prompt { font-size: 1.5rem; font-weight: 800; text-align: center; }

/* resultaten */
.result { text-align: center; }
.stars { font-size: 3.4rem; letter-spacing: 8px; }
.stars span { display: inline-block; filter: grayscale(1); opacity: .3; }
.stars span.on { filter: none; opacity: 1; animation: starIn .6s both; }
@keyframes starIn { 0% { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3); } 100% { transform: none; } }
.per-skill { display: grid; gap: 6px; margin-top: 12px; }
.ps { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; background: #f6f8fd; border-left: 6px solid var(--c); border-radius: 12px; padding: 6px 12px; text-align: left; }
.lvlnow { color: var(--muted); font-size: .9rem; }
.verdict-msg { text-align: center; min-height: 1.4em; font-weight: 700; }

/* medailles */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.badge { background: #fff; border-radius: 22px; padding: 14px 10px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
.badge:not(.got) { background: #f6f8fd; }
.badge:not(.got) .b-icon { filter: grayscale(1); opacity: .45; }
.badge .b-prog { color: var(--ink); font-weight: 700; }
.badge.near { box-shadow: 0 0 0 3px var(--gold), var(--shadow); }
.badge-sub { margin: 18px 0 0; }
.badge.got { opacity: 1; background: linear-gradient(180deg, #fff9df, #fff); }
.b-icon { font-size: 2.6rem; }
.badge small { color: var(--muted); font-size: .9rem; }

/* meldingen */
#toasts { position: fixed; left: 50%; top: 68px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 16px; padding: 6px 14px; font-size: .92rem; line-height: 1.25; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font-weight: 600; animation: toastIn .35s ease; transition: opacity .4s, transform .4s; }
.toast.gold { background: linear-gradient(135deg, #fff6c9, #ffe58a); }
.toast.good { background: #e8f8f0; } .toast.soft { background: #f0ebff; }
.toast.out { opacity: 0; transform: translateY(-10px); }
.t-icon { font-size: 1.6rem; }
@keyframes toastIn { from { transform: translateY(-20px) scale(.9); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }

/* ouders */
.gate-q { font-size: 2rem; }
.inline { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; margin: 8px 0; }
.pct-input { width: 5.5em; text-align: right; font: inherit; padding: 4px 10px; border-radius: 10px; border: 2px solid var(--line); background: #fff; }
select { font: inherit; padding: 4px 10px; border-radius: 10px; border: 2px solid var(--line); background: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.kpis div { background: #f6f8fd; border-radius: 16px; padding: 10px; text-align: center; }
.kpis b { font-size: 1.7rem; display: block; line-height: 1.1; }
.kpis small { color: var(--muted); }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table.dash { width: 100%; border-collapse: collapse; font-size: .95rem; }
.dash th { text-align: left; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.dash td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dot-c { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.mini { border: 0; background: #eef1f8; border-radius: 10px; width: 40px; height: 40px; font-weight: 800; font-size: 1.1rem; }
.acc { font-weight: 800; } .acc.hi { color: var(--good); } .acc.lo { color: var(--bad); }
.nowrap { white-space: nowrap; }
.mistakes { list-style: none; padding: 0; margin: 0; }
.mistakes li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.switch { display: flex; gap: 10px; align-items: center; margin: 8px 0; font-weight: 600; }
.switch input { width: 28px; height: 28px; flex: none; }
.explain-list li { margin: 6px 0; }

/* --- Ronde 1: mobiele weergave (getallenrijen en grote vergelijkingen passen op één regel) --- */
.emoji-row.num-tiles { flex-wrap: nowrap; gap: 4px; }
.emoji-row.num-tiles span { min-width: 0; flex: 0 1 auto; }
@media (max-width: 520px) {
  .emoji-row.num-tiles span { padding: 5px 7px; font-size: clamp(1rem, 5.2vw, 1.5rem); border-radius: 12px; }
  .cmp-row { font-size: clamp(.85em, 5.4vw, 1.15em); gap: .3em; flex-wrap: nowrap; white-space: nowrap; }
  .cmp-row .blank { min-width: 1.2em; }
}
.diag { background: #eef6ff; border: 2px solid #b9dcff; border-radius: 14px; padding: 8px 12px; color: var(--ink); font-weight: 600; margin: 4px 0 6px; font-size: 1.05rem; }
.diag b { color: #1c6fd1; }
.diag-list { margin: 8px 0 0; padding-left: 1.1em; display: grid; gap: 8px; }
.diag-list li { line-height: 1.35; }
.tagchip { display: inline-block; background: #eef6ff; color: #1c6fd1; border-radius: 999px; padding: 0 8px; font-size: .8rem; font-weight: 700; margin-left: 4px; }

/* heel smalle schermen (320-360 px): bovenbalk met 3 tellers past zonder zijwaarts scrollen */
@media (max-width: 360px) {
  .top { gap: 6px; padding: 8px 10px; }
  .top .btn-icon { width: 44px; height: 44px; font-size: 1.1rem; }
  .pills { gap: 3px; }
  .pill { padding: 2px 4px; font-size: .8rem; }
}

/* Testschakelaar (index.html?anim=uit): alle animaties en overgangen direct naar hun eindstand */
.no-anim *, .no-anim *::before, .no-anim *::after { animation-duration: 0s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }

/* ---------------- Pauze ---------------- */
html.pauze-mode body { background: linear-gradient(180deg, #2f3e6b 0%, #45558a 55%, #6a6fa8 100%) fixed; }
html.pauze-mode .sky { display: none; }
.pz .pim .bubble { font-size: 1.05rem; }
.pz-clock { position: relative; display: grid; place-items: center; padding: 18px; }
.pz-ring { width: 190px; height: 190px; transform: rotate(-90deg); }
.pz-ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.pz-ring-fg { fill: none; stroke: var(--violet); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.pz-time { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.pz-time b { font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.pz-time small { color: var(--muted); }
.pz-tip-body { display: flex; gap: 14px; align-items: center; margin: 6px 0 10px; }
.pz-tip-body p { margin: 2px 0 0; }
.pz-tip-icon { font-size: 3.2rem; line-height: 1; flex: none; animation: pzBob 2.4s ease-in-out infinite; }
@keyframes pzBob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.pz-why-text { font-size: 1.02rem; }
.pz-done .pz-big { font-size: 4rem; margin: 0; line-height: 1.1; }
.pz-now { background: #f0ebff; border-radius: 14px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 24px; margin: 6px 0; max-width: 680px; }
.pz-grid .inline { display: flex; justify-content: space-between; margin: 5px 0; }
.pz-grid select { font: inherit; padding: 2px 6px; border-radius: 10px; border: 2px solid var(--line); background: #fff; }
@media (max-width: 520px) { .pz-ring { width: 150px; height: 150px; } .pz-time b { font-size: 2.1rem; } .pz-tip-icon { font-size: 2.6rem; } }

/* ronde 4: plaatjes en tabellen */
.emoji-row.gap { gap: 28px; }
.support { margin-top: 8px; display: flex; justify-content: center; }
.support .vis { width: 100%; height: auto; }
.tbl { border-collapse: collapse; margin: 0 auto; font-weight: 800; font-size: 1.1rem; background: #fff; border-radius: 12px; overflow: hidden; }
.tbl th, .tbl td { border: 2px solid var(--ink, #2b2d42); padding: 6px 10px; text-align: center; min-width: 2.2em; }
.tbl th { background: #eef3ff; text-align: left; }
.tbl .blank { display: inline-block; min-width: 1.6em; }
.tbl-wrap { max-width: 100%; overflow-x: auto; }
.digi { font-family: ui-monospace, Menlo, monospace; background: #2b2d42; color: #7CFC9A; padding: 2px 10px; border-radius: 8px; letter-spacing: 1px; }
@media (max-width: 420px) { .tbl th, .tbl td { padding: 4px 6px; font-size: .95rem; } }
.tally { display: inline-flex; gap: 10px; font-family: ui-monospace, Menlo, monospace; font-weight: 900; letter-spacing: 2px; }
.tally .tg.five { text-decoration: line-through; text-decoration-thickness: 3px; }

/* ---------------- Groep 2 (UX-review): Pim praat ---------------- */
.pim .bubble { flex: 0 1 auto; min-width: 0; }
.pim-say { align-self: center; flex: none; }
/* voorlezen + tweede tik: de knop die net is voorgelezen, krijgt een duidelijke rand */
.armed { outline: 4px solid var(--violet); outline-offset: 3px; transform: translateY(-2px); }
.armed::after { content: '👆'; position: absolute; top: -14px; right: -6px; font-size: 1.6rem; animation: bob 1.2s ease-in-out infinite; }
.tile.armed, .mode.armed, .feel-opt.armed { position: relative; }

/* ---------- zelf tafels kiezen ---------- */
.tafel-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.tafel-btn { border: 3px solid transparent; background: #f3f5fb; border-radius: 18px; padding: 6px 4px 8px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; transition: transform .12s; }
.tafel-btn small { font-size: .75rem; font-weight: 700; color: var(--muted); }
.tafel-btn b { font-size: 2rem; }
.tafel-btn:hover { transform: translateY(-2px); }
.tafel-btn.on { border-color: var(--violet); background: #f0ebff; color: #5a3fd1; }
.tafel-btn.on small { color: #7a62e0; }
.tafel-sets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tafel-ops, .tafel-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tafel-op, .tafel-n { border: 3px solid transparent; background: #f3f5fb; border-radius: 18px; padding: 8px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tafel-op span { font-size: 1.8rem; }
.tafel-op b { font-size: 1rem; } .tafel-n b { font-size: 1.6rem; }
.tafel-op small, .tafel-n small { color: var(--muted); font-size: .85rem; }
.tafel-op.on, .tafel-n.on { border-color: var(--orange); background: #fff2e3; }
.tafel-sum { min-height: 1.5em; font-weight: 700; margin: 4px 0 12px; }
.btn.dim { opacity: .55; }
@media (max-width: 520px) {
  .tafel-grid { gap: 8px; }
  .tafel-btn { padding: 10px 2px; } .tafel-btn small { display: none; } .tafel-btn b { font-size: 1.8rem; }
  .tafel-op small { display: none; } .tafel-op b { font-size: .95rem; line-height: 1.15; }
}


/* ---------------- Rekenrugzak: verbinding met de server ---------------- */
.net { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 95; background: #2b2d42; color: #fff;
  border-radius: 999px; padding: 8px 16px; font-weight: 700; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px); }
.net[hidden] { display: none; }
.net .btn { padding: 4px 12px; min-height: 0; }
.loading { text-align: center; padding: 40px 0; font-size: 2.4rem; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.calm .loading, .no-anim .loading { animation: none; }
.import-box { margin-top: 18px; }

/* ---------------- Spellen, Mijn wereld, Speeltuin en De Nevelkaart ---------------- */
.race-icon { font-size: 4rem; }
.countdown { font-size: 5rem; font-weight: 800; color: var(--red); min-height: 1.2em; }
.race-head { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.timebar { flex: 1; height: 22px; background: #fff; border-radius: 99px; overflow: hidden; box-shadow: inset 0 2px 0 rgba(0, 0, 0, .06); }
.timefill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--yellow)); transition: width .1s linear; }
.timefill.low { background: linear-gradient(90deg, var(--red), var(--orange)); }
.race-score { font-size: 1.6rem; background: #fff; border-radius: 16px; padding: 2px 14px; box-shadow: var(--shadow); }
.mem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; perspective: 800px; }
@media (max-width: 480px) {
  .mem-grid { grid-template-columns: repeat(3, 1fr); }
}
.mem-card { position: relative; border: 0; height: 96px; background: transparent; padding: 0; transform-style: preserve-3d; transition: transform .4s; }
.mem-card span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 18px; backface-visibility: hidden; font-weight: 800; box-shadow: var(--shadow); padding: 4px; }
.mem-card .back { background: repeating-linear-gradient(45deg, #8f6bff, #8f6bff 10px, #a487ff 10px, #a487ff 20px); color: #fff; font-size: 2rem; }
.mem-card .front { background: #fff; transform: rotateY(180deg); font-size: 1.25rem; }
.mem-card.a .front { background: #fff8d6; font-size: 1.7rem; }
.mem-card.open, .mem-card.done { transform: rotateY(180deg); }
.mem-card.done .front { background: #e3f8ec; box-shadow: 0 0 0 4px var(--good); }
.scene { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); touch-action: none; container-type: inline-size; user-select: none; -webkit-user-select: none; }
.bg-weide { background: linear-gradient(#9fd8ff 0 55%, #7ccf6b 55% 100%); }
.bg-strand { background: linear-gradient(#8fd3ff 0 45%, #2aa7e0 45% 62%, #f7dc9c 62%); }
.bg-zee { background: linear-gradient(#5ec2ef, #1d6fb8 70%, #e9d8a6 92%); }
.bg-sneeuw { background: linear-gradient(#cfe6f7 0 55%, #ffffff 55%); }
.bg-nacht { background: radial-gradient(circle at 80% 20%, #fff8c2 0 4%, transparent 5%), radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(2px 2px at 40% 15%, #fff, transparent), radial-gradient(1.5px 1.5px at 65% 35%, #fff, transparent), radial-gradient(2px 2px at 10% 10%, #fff, transparent), linear-gradient(#1b2a5a 0 62%, #2d5a3d 62%); }
.bg-ruimte { background: radial-gradient(circle at 75% 70%, #ff9f43 0 9%, transparent 10%), radial-gradient(2px 2px at 30% 40%, #fff, transparent), radial-gradient(2px 2px at 60% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 15% 75%, #fff, transparent), radial-gradient(2px 2px at 85% 30%, #fff, transparent), linear-gradient(135deg, #140c35, #3b1c6e); }
.item { position: absolute; transform: translate(-50%, -50%) scaleX(var(--f)); font-size: calc(9cqw * var(--s)); line-height: 1; cursor: grab; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, .2)); }
.item.sel { outline: 3px dashed #fff; outline-offset: 4px; border-radius: 12px; }
.scene-empty { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(43, 45, 66, .6); font-weight: 800; text-align: center; padding: 20px; font-size: 1.1rem; }
.world-tools { display: flex; gap: 8px; justify-content: center; margin: 10px 0; }
.world-tools[hidden] { display: none; }
.inv { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-item { border: 0; background: #f3f5fb; border-radius: 16px; font-size: 2rem; padding: 4px 10px; display: flex; align-items: center; gap: 4px; box-shadow: 0 3px 0 #dfe4f0; }
.inv-item small { font-size: .9rem; color: var(--muted); }
.tabs { display: flex; gap: 6px; background: #eef1f8; padding: 4px; border-radius: 16px; }
.tabs.big { margin-top: 14px; }
.tabs.big .tab { flex: 1; font-size: 1.1rem; padding: 10px; }
.tab { border: 0; background: transparent; border-radius: 12px; padding: 4px 14px; min-height: 44px; font-weight: 700; }
.tab.on { background: #fff; box-shadow: 0 2px 0 #dfe4f0; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 10px; }
.shop-item { border: 0; background: #f6f8fd; border-radius: 16px; padding: 6px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 3px 0 #dfe4f0; }
.shop-item span { font-size: 2rem; }
.shop-item small { font-weight: 700; font-size: .8rem; }
.shop-item.poor { opacity: .45; }
.shop-grid.bgs { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.bgprev { height: 84px; justify-content: flex-end; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.bgprev.on { box-shadow: 0 0 0 4px var(--blue); }
.rek-card { text-align: center; }
.rek { display: grid; gap: 18px; background: #f7ecd9; border-radius: 18px; padding: 18px 12px; border: 8px solid #c48a52; max-width: 680px; margin: 0 auto; }
.rek-row { position: relative; display: flex; align-items: center; gap: 2px; min-width: 0; }
.rod { position: absolute; left: 0; right: 0; top: 50%; height: 6px; background: #8d6e63; border-radius: 3px; transform: translateY(-50%); }
.rek-gap { flex: 1 0 clamp(40px, 12vw, 120px); }
.bead { position: relative; flex: 0 1 46px; min-width: 0; height: 46px; border-radius: 50%; border: 0; padding: 0; box-shadow: inset -4px -5px 0 rgba(0, 0, 0, .18), 0 2px 0 rgba(0, 0, 0, .15); transition: transform .1s; }
.bead.red { background: radial-gradient(circle at 35% 30%, #ff9a9a, #e5484d); }
.bead.white { background: radial-gradient(circle at 35% 30%, #fff, #dcdfe8); }
.bead:active { transform: scale(.9); }
.rek-total { margin: 14px 0 4px; }
.rek-sum b { font-size: 3.6rem; display: block; line-height: 1; }
.rek-sum small { color: var(--muted); font-weight: 700; }
.task-box { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; align-items: center; background: #fff3c4; border-radius: 16px; padding: 10px 16px; font-size: 1.2rem; font-weight: 700; }
.maker { text-align: center; }
.maker-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.stepper { display: flex; align-items: center; gap: 8px; background: #f3f5fb; border-radius: 18px; padding: 6px; }
.mv { font-size: 2.2rem; min-width: 52px; }
.ops { display: flex; gap: 6px; }
.op { border: 3px solid transparent; background: #f3f5fb; width: 54px; height: 54px; border-radius: 16px; font-size: 1.8rem; font-weight: 800; }
.op.on { border-color: var(--violet); background: #f0ebff; }
.maker-sum { font-size: 2.6rem; font-weight: 800; margin: 14px 0; }
.maker-sum small { font-size: 1.4rem; color: var(--muted); }
.maker-vis { display: flex; justify-content: center; }
.story { background: #fffbe6; border-radius: 16px; padding: 12px 16px; font-size: 1.2rem; font-weight: 600; max-width: 560px; margin: 12px auto 0; }
.m-map { grid-column: 1 / -1; position: relative; overflow: hidden; background: linear-gradient(120deg, #d6f3e3 0%, #e2f2ff 55%, #efe9ff 100%); border: 3px solid #fff; }
.m-map span { font-size: 3.2rem; }
.m-map b { font-size: 1.45rem; }
.m-map::after { content: '☁️'; position: absolute; right: 16px; top: 6px; font-size: 2.6rem; opacity: .75; animation: bob 4s ease-in-out infinite; }
.m-map::before { content: '🏴‍☠️'; position: absolute; right: 70px; bottom: 6px; font-size: 1.6rem; opacity: .5; }
.adv-wrap { max-width: 1040px; }
.adv-map { position: relative; overflow: auto; border-radius: var(--r); box-shadow: var(--shadow); background: #4fb0e3; max-height: 72vh; overscroll-behavior: contain; border: 4px solid #fff; }
.adv-svg { display: block; width: max(100%, 860px); height: auto; user-select: none; -webkit-user-select: none; }
.adv-deco { pointer-events: none; }
.adv-fog { pointer-events: none; }
.adv-hole.grow { animation: advHole 1.5s cubic-bezier(.2, .8, .3, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes advHole { from { transform: scale(.1); } to { transform: scale(1); } }
.adv-path { fill: none; stroke-linecap: round; pointer-events: none; }
.adv-path.walked { stroke: #a8743f; stroke-width: 7; stroke-dasharray: 1 13; }
.adv-path.open { stroke: #fff; stroke-width: 6; stroke-dasharray: 14 10; opacity: .95; animation: advMarch 1.2s linear infinite; }
.adv-path.locked { stroke: #e5484d; stroke-width: 6; stroke-dasharray: 10 10; opacity: .75; }
@keyframes advMarch { to { stroke-dashoffset: -24; } }
.adv-stone { fill: #e8dcc4; stroke: #9c8b70; stroke-width: 3; pointer-events: none; }
.adv-stone.done { fill: var(--yellow); stroke: #c99a00; }
.adv-lock { pointer-events: none; }
.adv-lock circle { fill: #fff; stroke: #e5484d; stroke-width: 3; }
.adv-lock text, .adv-bridge text { font-size: 22px; text-anchor: middle; dominant-baseline: central; }
.adv-bridge { pointer-events: none; }
.adv-node { cursor: pointer; }
.adv-node .nb { fill: #fff; stroke: var(--zc); stroke-width: 6; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .15)); transition: transform .15s; }
.adv-node:hover .nb { transform: scale(1.08); }
.adv-node.seen .nb { fill: rgba(255, 255, 255, .92); stroke-dasharray: 7 6; animation: advPulse 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes advPulse { 50% { transform: scale(1.1); } }
.adv-node.here .nb { stroke-width: 8; }
.adv-node text { text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.adv-node .ni { font-size: 31px; }
.adv-lbl { font-family: var(--font); font-weight: 800; font-size: 17px; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round; }
.adv-lure { font-size: 22px; animation: advTwinkle 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes advTwinkle { 50% { transform: scale(1.3) rotate(12deg); opacity: .7; } }
.adv-bang { animation: advBang 1s ease-in-out infinite; }
.adv-bang circle { fill: var(--red); stroke: #fff; stroke-width: 3; }
.adv-bang text { fill: #fff; font-weight: 900; font-size: 18px; font-family: var(--font); }
@keyframes advBang { 50% { translate: 0 -5px; } }
.adv-stone.just { animation: advStone .7s ease-out; }
@keyframes advStone { 0% { transform: scale(1); } 40% { transform: scale(1.9); } 100% { transform: scale(1); } }
.adv-stepbadge-in { animation: advBadge 1.9s ease-out forwards; }
.adv-stepbadge rect { fill: var(--yellow); stroke: #c99a00; stroke-width: 3; }
.adv-stepbadge text { font-size: 18px; font-weight: 800; text-anchor: middle; dominant-baseline: central; fill: #3a2d00; }
@keyframes advBadge { 0% { opacity: 0; translate: 0 10px; } 15% { opacity: 1; translate: 0 0; } 80% { opacity: 1; } 100% { opacity: 0; translate: 0 -6px; } }
.calm .adv-stone.just, .calm .adv-stepbadge-in { animation: none; }
.adv-me-inner { animation: advHop 1.6s ease-in-out infinite; }
@keyframes advHop { 50% { translate: 0 -5px; } }
.adv-me-b { fill: #fff; stroke: var(--violet); stroke-width: 5; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .18)); }
.adv-me-i { font-size: 30px; text-anchor: middle; dominant-baseline: central; }
.adv-panels { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
@media (max-width: 680px) {
  .adv-panels { grid-template-columns: 1fr; gap: 0; }
}
.adv-quests { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.adv-quests li { display: flex; gap: 10px; align-items: center; background: #f6f8fd; border-radius: 16px; padding: 8px 12px; }
.adv-quests li.done { opacity: .6; }
.adv-quests .qi { font-size: 1.6rem; }
.adv-quests small { display: block; color: var(--muted); font-size: .9rem; }
.adv-bag { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.bag-item { background: #fff8e1; border-radius: 14px; padding: 4px 12px; font-weight: 700; box-shadow: 0 2px 0 #f0e2b6; }
.bag-item.gold { background: #ffe9a8; }
.adv-backdrop { position: fixed; inset: 0; background: rgba(43, 45, 66, .28); z-index: 39; animation: fadeIn .2s; }
.adv-sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(620px, 100%); max-height: 90vh; overflow: auto; z-index: 40; background: #fffdf6; border-radius: 28px 28px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(43, 45, 66, .25); animation: advUp .3s cubic-bezier(.2, .9, .3, 1.2); }
.adv-sheet.talk { bottom: 16px; border-radius: 28px; width: min(620px, calc(100% - 20px)); }
@keyframes advUp { from { transform: translate(-50%, 40px); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }
.adv-talk { display: flex; gap: 14px; align-items: flex-start; }
.adv-talk b { font-size: 1.2rem; }
.adv-talk p { margin: 4px 0 6px; font-size: 1.08rem; }
.adv-face { font-size: 3.2rem; line-height: 1; background: #fff1c2; border-radius: 22px; width: 78px; height: 78px; display: grid; place-items: center; flex: none; animation: bob 3s ease-in-out infinite; }
.adv-face.sm { font-size: 2.2rem; width: 54px; height: 54px; border-radius: 16px; }
.adv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.adv-head small { display: block; color: var(--muted); }
.adv-chal { display: flex; gap: 10px; align-items: center; }
.adv-pips { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.adv-pips i { width: 18px; height: 18px; border-radius: 50%; background: #e3e7f2; border: 3px solid #cfd5e6; }
.adv-pips i.on { background: var(--yellow); border-color: #c99a00; }
.adv-pips small { margin-left: 4px; }
.adv-tough { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: #fff1d6; border: 2px solid #ffb020; color: #8a5a00; font-weight: 700; font-size: .85em; }
.adv-tokens { display: flex; gap: 6px; font-size: 1.6rem; margin-top: 2px; }
.adv-tokens .empty { opacity: .25; filter: grayscale(1); }
.adv-dial { font-size: 1.1rem; font-weight: 800; min-width: 52px; text-align: center; background: #2b2d42; color: #ffd23f; border-radius: 10px; padding: 2px 8px; }
.adv-dial.on { background: var(--green-btn); color: #fff; }
.adv-sheet .qcard { margin: 10px 0 0; box-shadow: none; border: 2px solid var(--line); border-top: 10px solid var(--c); }
.adv-sheet { max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); }
@media (max-width: 560px) {
  .rek-card { padding: 14px 6px; }
  .rek { border-width: 6px; padding: 16px 4px; gap: 16px; }
  .rek-row { gap: 1px; }
  .bead { height: 44px; box-shadow: inset -3px -5px 0 rgba(0, 0, 0, .18), 0 2px 0 rgba(0, 0, 0, .15); }
  .rek-gap { flex-basis: 36px; }
}
