/*! © 2026 SlimmeKids – slimmekids.be. Alle rechten voorbehouden. Kopiëren, verspreiden of hergebruiken zonder schriftelijke toestemming is niet toegestaan. */
/* Bouwbaas – © 2026 SlimmeKids School. Alleen systeemlettertypen. */
:root {
    --ink: #1c3348; --muted: #5b7084; --text: #3e556b; --line: #d5dee7; --paper: #f4f7fb; --card: #fff;
    --blue: #2196f3; --accent: #ff9a3c;
    --ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
    --side: 288px; --tap: 56px;
}
* { box-sizing: border-box; }
html, body {
    margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: manipulation;
    font-family: var(--ui); color: var(--ink); background: var(--paper);
    -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none; user-select: none;
}
button { font: inherit; touch-action: manipulation; cursor: pointer; color: inherit; }
[hidden] { display: none !important; }
.app { display: flex; flex-direction: column; height: 100%; }

/* bovenbalk (zoals Klokleren) */
.top { flex: 0 0 auto; display: flex; align-items: center; gap: .85rem; padding: calc(.45rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .45rem max(1rem, env(safe-area-inset-left)); background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 36px; width: auto; display: block; }
.title { min-width: 0; padding-left: .85rem; border-left: 1px solid #e6edf3; }
.kicker { margin: 0; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0; font-family: var(--display); font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 700; line-height: 1.15; }
.tools { display: flex; align-items: center; gap: .45rem; flex-shrink: 0; }
.mini { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 36px; min-width: 36px; padding: 0 .75rem; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 8px; font-size: .84rem; font-weight: 500; white-space: nowrap; }
.mini:hover, .mini:active { background: linear-gradient(165deg, #fff8f1 0%, #ffd7a3 55%, #ff9a3c 100%); }
.sound-mark { width: 12px; height: 12px; border-radius: 50%; background: #1f9d45; box-shadow: 0 0 0 3px rgba(31,157,69,.2), 0 0 8px rgba(31,157,69,.75); }
.sound-btn.off .sound-mark { background: #e11d2e; box-shadow: 0 0 0 3px rgba(225,29,46,.18), 0 0 8px rgba(225,29,46,.7); }
@media (max-width: 720px) { .sound-label { display: none; } }

/* hoofdvlak */
.bb-main { flex: 1 1 auto; min-height: 0; display: flex; gap: 0; }
.bb-side {
    flex: 0 0 var(--side); display: flex; flex-direction: column; gap: .7rem; padding: .75rem;
    background: #fff; border-right: 1px solid var(--line); min-height: 0; overflow: hidden;
}
.bb-modes { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; background: #eef3f8; padding: .3rem; border-radius: 14px; }
.bb-mode { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; font-size: .95rem; color: var(--text); }
.bb-mode.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(28,51,72,.18); }
.bb-mode-ic { font-size: 1.2rem; }
.bb-colors { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45rem; }
.bb-color { aspect-ratio: 1; min-height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(28,51,72,.18), inset 0 -4px 0 rgba(0,0,0,.14), inset 0 3px 0 rgba(255,255,255,.35); padding: 0; }
.bb-color[aria-checked="true"] { box-shadow: 0 0 0 3px var(--ink), inset 0 -4px 0 rgba(0,0,0,.14), inset 0 3px 0 rgba(255,255,255,.35); transform: scale(1.06); }
.bb-colors.is-disabled { opacity: .35; pointer-events: none; }
.bb-palette {
    overscroll-behavior: contain;
    flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; touch-action: pan-y;
    display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 78px; gap: .45rem; align-content: start; padding: 2px 2px 1rem;
    scrollbar-width: thin;
}
.bb-piece {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: var(--tap); border: 2px solid #e3eaf1; border-radius: 14px; background: #f8fbfe; padding: 2px;
    touch-action: pan-y; -webkit-touch-callout: none;
}
.bb-piece img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.bb-piece .bb-hand { font-size: 2rem; line-height: 1; }
.bb-piece:hover { border-color: #bcd3e8; background: #fff; }
.bb-piece[aria-selected="true"] { border-color: var(--blue); background: #e8f4fe; box-shadow: 0 0 0 2px var(--blue) inset; }
.bb-sep { grid-column: 1 / -1; height: 1px; background: var(--line); margin: .2rem 0; }

.bb-stage { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; background: linear-gradient(#cfeafd, #eef7ff 60%, #f6fbff); }
#bbCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.bb-stage.is-dragging #bbCanvas { cursor: grabbing; }

.bb-btn {
    display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap);
    border-radius: 16px; border: 1px solid rgba(28,51,72,.12); background: rgba(255,255,255,.94); color: var(--ink);
    box-shadow: 0 3px 10px rgba(28,51,72,.14); font-size: 1.6rem; font-weight: 700; line-height: 1; padding: 0;
}
.bb-btn svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bb-btn:hover { background: #fff; }
.bb-btn:active { transform: scale(.95); }
.bb-btn:disabled { opacity: .4; cursor: default; transform: none; }
.bb-btn-big { width: 68px; height: 68px; font-size: 2.1rem; border-radius: 20px; }
.bb-btn.is-on { background: #e8f4fe; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue) inset; color: #0b5ea8; }
#btnRotate { background: linear-gradient(165deg, #fff8f1 0%, #ffd7a3 55%, #ff9a3c 100%); border-color: #f0a050; }

.bb-topleft { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: .6rem; z-index: 5; }
.bb-count { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .75rem; font-weight: 700; font-size: .85rem; color: var(--text); }
.bb-menu { position: absolute; top: 76px; left: 12px; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 30px rgba(28,51,72,.2); padding: .4rem; display: flex; flex-direction: column; min-width: 240px; }
.bb-menu-item { display: flex; align-items: center; gap: .75rem; min-height: 52px; padding: 0 1rem; border: 0; border-radius: 12px; background: transparent; font-weight: 650; font-size: 1rem; text-align: left; }
.bb-menu-item span:first-child { font-size: 1.35rem; width: 1.6rem; text-align: center; }
.bb-menu-item:hover, .bb-menu-item:focus-visible { background: #eef6fe; }

.bb-view { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: grid; grid-template-columns: var(--tap) var(--tap); gap: .45rem; z-index: 5; }

.bb-actions { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: .6rem; z-index: 5; }
.bb-bin {
    position: absolute; left: 12px; bottom: 12px; width: 84px; height: 84px; border-radius: 22px; z-index: 5;
    display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.94);
    border: 2px dashed #b9c7d4; color: #5b7084; transition: transform .15s, background .15s, color .15s, border-color .15s;
}
.bb-bin svg { width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.bb-bin .lid { transition: transform .15s; transform-origin: 38px 13px; }
.bb-stage.is-dragging .bb-bin { border-color: #e11d2e; color: #e11d2e; }
.bb-bin.is-hot { transform: scale(1.14); background: #fde8ea; }
.bb-bin.is-hot .lid { transform: rotate(-22deg); }

.bb-try { position: absolute; top: 14px; right: 14px; left: auto; z-index: 6; width: min(310px, 40%); max-height: calc(100% - 200px); overflow-y: auto; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 16px; padding: .7rem .85rem; box-shadow: 0 6px 18px rgba(28,51,72,.14); }
.bb-try h2 { margin: 0 0 .4rem; font-family: var(--display); font-size: 1.1rem; }
.bb-try-toggle { display: flex; align-items: center; gap: .4rem; width: 100%; min-height: 40px; border: 0; background: none; padding: 0; font: inherit; text-align: left; }
.bb-try-toggle::after { content: '▾'; margin-left: auto; color: var(--muted); }
.bb-try.is-closed .bb-try-toggle::after { content: '▸'; }
.bb-try.is-closed ul, .bb-try.is-closed .bb-tip { display: none; }
.bb-try.is-closed h2 { margin: 0; }
.bb-try ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.bb-try li { display: flex; gap: .5rem; align-items: flex-start; font-size: .88rem; line-height: 1.3; color: var(--text); }
.bb-try li::before { content: ""; flex: 0 0 20px; height: 20px; border-radius: 6px; border: 2px solid #b9c7d4; background: #fff; }
.bb-try li.done { color: var(--ink); font-weight: 650; }
.bb-try li.done::before { border-color: #1a7f45; background: #1a7f45 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 6.5' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.bb-tip { margin: .5rem 0 0; font-size: .78rem; color: var(--muted); line-height: 1.35; }

.bb-toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 15; background: var(--ink); color: #fff; border-radius: 999px; padding: .55rem 1.1rem; font-weight: 650; box-shadow: 0 6px 18px rgba(28,51,72,.3); max-width: 80%; text-align: center; }

.bb-nowebgl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1.5rem; z-index: 30; background: var(--paper); }
.bb-nowebgl-box { max-width: 480px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem; text-align: center; }
.bb-nowebgl-ic { font-size: 3rem; }
.bb-nowebgl h2 { font-family: var(--display); margin: .4rem 0; }
.bb-nowebgl p { color: var(--text); line-height: 1.5; margin: 0; }

.bb-dialog { position: fixed; inset: 0; z-index: 60; background: rgba(28,51,72,.45); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.bb-dialog-box { width: min(760px, 100%); max-height: 86vh; display: flex; flex-direction: column; background: #fff; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.25); overflow: hidden; }
.bb-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.bb-dialog-head h2 { margin: 0; font-family: var(--display); font-size: 1.35rem; }
.bb-dialog-head .bb-btn { width: 48px; height: 48px; font-size: 1.2rem; box-shadow: none; }
.bb-dialog-body { padding: 1rem; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .8rem; }
.bb-card { display: flex; flex-direction: column; border: 2px solid #e3eaf1; border-radius: 14px; overflow: hidden; background: #f8fbfe; }
.bb-card-open { border: 0; padding: 0; background: transparent; text-align: left; display: flex; flex-direction: column; }
.bb-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #dff0fd; display: block; }
.bb-card-label { padding: .5rem .65rem .2rem; font-weight: 700; font-size: .95rem; }
.bb-card-sub { padding: 0 .65rem .55rem; font-size: .8rem; color: var(--muted); }
.bb-card-del { margin: 0 .5rem .5rem; min-height: 40px; border-radius: 10px; border: 1px solid #f2c4c8; background: #fff; color: #b91c1c; font-weight: 650; font-size: .85rem; }
.bb-card-open:hover img { filter: brightness(1.05); }
.bb-empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 2rem 0; font-size: 1.05rem; }

.bb-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.bb-confetti i { position: absolute; top: -20px; width: 12px; height: 16px; border-radius: 3px; animation: bbfall 1.6s ease-in forwards; }
@keyframes bbfall { to { transform: translateY(110vh) rotate(540deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .bb-confetti { display: none; } }

.bb-version { position: fixed; left: 12px; bottom: 12px; margin: 0; font-size: 11.52px; color: var(--muted); opacity: .85; z-index: 2; pointer-events: none; }
body > .sk-school-copy { color: var(--muted); }

/* digibord / groot scherm */
@media (min-width: 1700px) and (min-height: 900px) {
    :root { --side: 360px; --tap: 66px; }
    .bb-btn-big { width: 80px; height: 80px; font-size: 2.4rem; }
    .bb-bin { width: 100px; height: 100px; }
    .bb-try { width: 340px; }
    .bb-palette { grid-auto-rows: 100px; }
    .bb-menu-item { min-height: 64px; font-size: 1.15rem; }
    .bb-try-toggle { min-height: 56px; font-size: 1.2rem; }
    .bb-count { font-size: 1rem; padding: .45rem .9rem; }
    .bb-toast { font-size: 1.25rem; padding: .7rem 1.4rem; }
    .bb-dialog-head .bb-btn, .bb-card-del { min-height: 56px; width: auto; min-width: 56px; }
    .top .mini { min-height: 56px; min-width: 56px; font-size: 1rem; }
    .bb-mode { min-height: 60px; font-size: 1.1rem; }
    .bb-color { min-height: 56px; }
    .bb-try li { font-size: 1rem; }
}
/* tablet staand */
@media (max-width: 900px) { :root { --side: 240px; } .bb-palette { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 92px; } .bb-colors { grid-template-columns: repeat(4, 1fr); gap: .35rem; } }
/* telefoon / smal: palet onderaan */
@media (max-width: 640px), (max-height: 520px) and (max-width: 1000px) {
    :root { --tap: 48px; }
    .bb-main { flex-direction: column-reverse; }
    .bb-side { flex: 0 0 auto; border-right: 0; border-top: 1px solid var(--line); padding: .45rem 60px .5rem .5rem; gap: .4rem; }
    .bb-modes { grid-template-columns: 1fr 1fr; padding: .2rem; } .bb-mode { min-height: 40px; }
    .bb-colors { grid-template-columns: repeat(10, 1fr); gap: .25rem; } .bb-color { min-height: 0; border-width: 2px; }
    .bb-palette { display: flex; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; padding-bottom: 2px; flex: 0 0 auto; }
    .bb-piece { flex: 0 0 64px; width: 64px; height: 64px; touch-action: pan-x; }
    .bb-sep { flex: 0 0 1px; height: auto; margin: 0 .2rem; }
    .bb-btn-big { width: 54px; height: 54px; font-size: 1.7rem; }
    .bb-bin { width: 62px; height: 62px; bottom: 10px; } .bb-bin svg { width: 36px; height: 36px; }
    .bb-view { grid-template-columns: var(--tap); top: 64px; transform: none; right: 8px; }
    .bb-view #vUp, .bb-view #vDown { display: none; }
    .bb-actions { bottom: 10px; }
    .bb-try { width: calc(100% - 150px); right: 8px; left: auto; top: 8px; padding: .4rem .65rem; max-height: calc(100% - 150px); } .bb-try .bb-tip { display: none; } .bb-try li { font-size: .8rem; }
    .bb-version { display: none; }
}

/* geselecteerd blokje + draaien met label */
.bb-actions { align-items: flex-end; background: rgba(255,255,255,.82); border: 1px solid rgba(28,51,72,.1); border-radius: 22px; padding: .45rem .6rem .35rem; box-shadow: 0 4px 16px rgba(28,51,72,.12); }
.bb-act { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.bb-act-lbl { font-size: .8rem; font-weight: 750; color: var(--ink); line-height: 1; }
.bb-sel { width: 68px; height: 68px; border-radius: 18px; background: #f2f8fe; border: 2px solid #cfe3f4; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.bb-sel img { width: 58px; height: 58px; transition: transform .25s ease; }
.bb-sel.is-empty { visibility: hidden; width: 0; margin: 0; border: 0; }
#btnRotate .bb-rot { display: inline-block; }
.bb-hint { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); background: #1c3348; color: #fff; padding: .6rem 1rem; border-radius: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 8px 20px rgba(28,51,72,.3); animation: bbpop .3s ease; }
.bb-hint::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 9px solid transparent; border-top-color: #1c3348; }
.bb-pulse { animation: bbpulse 1s ease-in-out 3; }
@keyframes bbpulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(255,154,60,.35); } }
@keyframes bbpop { from { opacity: 0; transform: translate(-50%, 8px); } }
#btnTilt svg { width: 34px; height: 34px; }
/* plaatknop */
.bb-btn-plate { width: auto; padding: 0 .8rem; gap: .45rem; font-size: 1rem; }
.bb-btn-plate svg { width: 34px; height: 34px; fill: none; stroke: none; }
.bb-btn-plate .pl { fill: #35a046; } .bb-btn-plate .st circle { fill: #5cc46b; stroke: #2a8a3a; stroke-width: 1; }
.bb-btn-lbl { font-size: .95rem; font-weight: 750; }
/* tekst onder technische onderdelen */
.bb-piece.has-cap { justify-content: flex-start; padding-top: 4px; }
.bb-piece.has-cap img { height: calc(100% - 22px); }
.bb-cap { font-size: .68rem; font-weight: 700; color: var(--text); line-height: 1.05; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
/* plaat-dialoog */
.bb-dialog-body.is-plate { display: block; }
.bb-plates { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.bb-plate { display: flex; flex-direction: column; align-items: center; gap: .4rem; min-height: 180px; padding: .9rem .5rem; border: 3px solid #e3eaf1; border-radius: 20px; background: #f8fbfe; font-weight: 800; font-size: 1.2rem; }
.bb-plate svg { width: 100%; max-width: 150px; height: 110px; }
.bb-plate small { font-weight: 650; color: var(--muted); font-size: .95rem; }
.bb-plate.is-on { border-color: #1a7f45; background: #eaf7ef; box-shadow: 0 0 0 2px #1a7f45 inset; }
.bb-plate:hover { border-color: #9fd3b1; }
.bb-custom { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.6rem; }
.bb-custom h3 { flex: 1 0 100%; margin: 0; font-size: 1rem; }
.bb-step { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; }
.bb-step-row { display: flex; align-items: center; gap: .35rem; }
.bb-step-row .bb-btn { width: 56px; height: 56px; font-size: 1.8rem; box-shadow: none; }
.bb-step input { width: 84px; height: 56px; border: 2px solid var(--line); border-radius: 14px; font: inherit; font-size: 1.4rem; font-weight: 800; text-align: center; color: var(--ink); -moz-appearance: textfield; }
.bb-step input::-webkit-inner-spin-button, .bb-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bb-step input[aria-invalid="true"] { border-color: #e11d2e; background: #fff1f2; }
.bb-apply { min-height: 56px; padding: 0 1.4rem; border: 0; border-radius: 16px; background: #1a7f45; color: #fff; font-weight: 800; font-size: 1.1rem; }
.bb-apply:disabled { opacity: .45; }
.bb-err { flex: 1 0 100%; margin: 0; min-height: 1.2em; color: #b91c1c; font-weight: 650; }
.bb-warn { grid-column: 1 / -1; text-align: center; padding: .5rem 0 0; }
.bb-warn p { font-size: 1.15rem; line-height: 1.45; margin: .3rem 0 1.2rem; }
.bb-warn-ic { font-size: 3rem; }
.bb-warn-btns { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.bb-warn-btns button { min-height: 60px; padding: 0 1.4rem; border-radius: 16px; font-weight: 800; font-size: 1.05rem; border: 2px solid var(--ink); background: #fff; }
.bb-warn-btns .bb-keep { background: #1a7f45; border-color: #1a7f45; color: #fff; }
@media (min-width: 1700px) and (min-height: 900px) { .bb-sel { width: 80px; height: 80px; } .bb-act-lbl { font-size: 1rem; } .bb-plate { min-height: 230px; font-size: 1.5rem; } .bb-hint { font-size: 1.3rem; } }
@media (max-width: 640px), (max-height: 520px) and (max-width: 1000px) {
  .bb-sel { width: 50px; height: 50px; margin-bottom: .9rem; } .bb-sel img { width: 42px; height: 42px; }
  .bb-act-lbl { font-size: .68rem; } .bb-actions { gap: .35rem; padding: .3rem .4rem .25rem; left: calc(50% + 20px); }
  .bb-btn-plate .bb-btn-lbl { display: none; } .bb-btn-plate { padding: 0 .4rem; }
  .bb-plates { grid-template-columns: 1fr 1fr 1fr; gap: .4rem; } .bb-plate { min-height: 130px; font-size: 1rem; } .bb-plate svg { height: 70px; }
  .bb-hint { white-space: normal; width: 230px; }
}
.bb-hint { pointer-events: none; }

.bb-btn-photo { background: linear-gradient(165deg, #f3f9ff 0%, #bfe3ff 60%, #7cc4f7 100%); border-color: #6bb6ec; }
.bb-act-photo { margin-left: .5rem; padding-left: .7rem; border-left: 1px solid var(--line); }
.bb-flash { position: absolute; inset: 0; background: #fff; z-index: 40; pointer-events: none; animation: bbflash .45s ease-out forwards; }
@keyframes bbflash { from { opacity: .9; } to { opacity: 0; } }
.bb-dialog-body.is-photo { display: block; text-align: center; }
.bb-photo-img { display: block; max-width: 100%; max-height: 58vh; margin: 0 auto 1rem; border-radius: 14px; border: 6px solid #fff; box-shadow: 0 6px 22px rgba(28,51,72,.25); transform: rotate(-1.2deg); }
@media (max-width: 640px) { .bb-act-photo { margin-left: .1rem; padding-left: .3rem; } }
@media (max-width: 640px) { .bb-sel { display: none; } .bb-actions .bb-btn-big { width: 48px; height: 48px; font-size: 1.5rem; } .bb-actions { left: calc(50% + 28px); } }

.bb-bin { cursor: pointer; touch-action: manipulation; }
.bb-bin.is-on { background: #e11d2e; border: 3px solid #fff; color: #fff; box-shadow: 0 0 0 4px rgba(225,29,46,.35); animation: bbpulse 1.2s ease-in-out infinite; }
@keyframes bbpulse { 50% { transform: scale(1.08); } }
.bb-stage.is-erasing canvas { cursor: crosshair; }

/* Probeer dit: nette tab rechtsboven */
.bb-try.is-closed { width: auto; padding: .3rem .9rem; border-radius: 999px; }
.bb-try.is-closed .bb-try-toggle { width: auto; gap: .5rem; }
.bb-try:not(.is-closed) h2 { margin-bottom: .55rem; }
@media (max-width: 640px) { .bb-try { right: 8px; left: auto; top: 8px; width: calc(100% - 140px); } }
.bb-try:not(.is-closed) { right: calc(2 * var(--tap) + 40px); }

/* vijf bouwdozen: 2 boven, 3 onder */
.bb-modes { grid-template-columns: repeat(6, 1fr) !important; }
.bb-mode { grid-column: span 2; min-width: 0; padding: 0 .2rem; }
.bb-mode[data-mode="simple"], .bb-mode[data-mode="tech"] { grid-column: span 3; }
.bb-mode[data-mode="house"], .bb-mode[data-mode="castle"], .bb-mode[data-mode="garden"] { font-size: .85rem; gap: .25rem; }
.bb-colors { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 900px) { .bb-colors { grid-template-columns: repeat(4, 1fr); } }

/* zes bouwdozen: 3 x 2 */
.bb-mode, .bb-mode[data-mode="simple"], .bb-mode[data-mode="tech"] { grid-column: span 2; font-size: .85rem; gap: .25rem; }
.bb-btn-walk { width: auto; padding: 0 .8rem; gap: .4rem; display: inline-flex; align-items: center; font-weight: 700; }
.bb-btn-walk[aria-pressed="false"] { opacity: .75; background: #eef3f8; }
.bb-btn-walk[aria-pressed="false"] span[aria-hidden]::after { content: ' ⏸'; }
.bb-btn-walk[hidden] { display: none; }
/* zes bouwdozen: rustig 3 x 2, icoon boven de naam */
.bb-modes { gap: .3rem; padding: .3rem; }
.bb-mode, .bb-mode[data-mode="simple"], .bb-mode[data-mode="tech"] { grid-column: span 2; flex-direction: column; gap: .1rem; min-height: 54px; padding: .3rem .15rem; font-size: .8rem; line-height: 1.1; text-align: center; }
.bb-mode .bb-mode-ic { font-size: 1.25rem; line-height: 1; }
.bb-mode > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (min-width: 1400px) and (min-height: 900px) { .bb-mode, .bb-mode[data-mode="simple"], .bb-mode[data-mode="tech"] { min-height: 66px; font-size: .95rem; } .bb-mode .bb-mode-ic { font-size: 1.5rem; } }
