@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url('/fonts/nunito-latin-ext-400.woff2') format('woff2'); unicode-range: U+0100-02BA, U+1E00-1EFF; }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-ext-700.woff2') format('woff2'); unicode-range: U+0100-02BA, U+1E00-1EFF; }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('/fonts/nunito-latin-800.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url('/fonts/nunito-latin-ext-800.woff2') format('woff2'); unicode-range: U+0100-02BA, U+1E00-1EFF; }
@font-face { font-family: 'Baloo 2'; font-weight: 600; font-display: swap; src: url('/fonts/baloo2-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 600; font-display: swap; src: url('/fonts/baloo2-latin-ext-600.woff2') format('woff2'); unicode-range: U+0100-02BA, U+1E00-1EFF; }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('/fonts/baloo2-latin-800.woff2') format('woff2'); }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('/fonts/baloo2-latin-ext-800.woff2') format('woff2'); unicode-range: U+0100-02BA, U+1E00-1EFF; }

.edulo {
    --bg: #FFF9F0;
    --surface: #FFFFFF;
    --ink: #23233A;
    --ink-soft: #55556E;
    --e-blue: #5B8CFF;
    --e-blue-deep: #2F5FD6;
    --e-amber: #FFB020;
    --e-amber-deep: #D98C00;
    --e-amber-ink: #8A5A00;
    --e-green: #3DCB8B;
    --e-green-deep: #1F9A65;
    --e-green-ink: #0F6B44;
    --e-pink: #FF6B8B;
    --e-pink-deep: #D93C60;
    --e-pink-ink: #A11E40;
    --mat: #FFEFD6;
    --edge: #F1E2C8;
    --line: #DCE3EE;
    --line-deep: #C2CCDC;
    --r-l: 28px;
    --r-m: 20px;
    --tile-depth: 6px;
    --soft: 0 10px 24px rgba(35, 35, 58, .08);
    --ease: cubic-bezier(.3, 1.4, .5, 1);
    color: var(--ink);
    font: 400 20px/1.4 'Nunito', system-ui, sans-serif;
}

.edulo *, .edulo *::before, .edulo *::after { box-sizing: border-box; }
.edulo button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.edulo button:focus-visible, .edulo .e-prompt:focus-visible { outline: 4px solid var(--e-blue-deep); outline-offset: 3px; }
.e-prompt:focus { outline: none; }
.e-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }

.e-stage, .e-ex { display: flex; flex-direction: column; gap: 20px; }
.e-head { display: flex; align-items: flex-start; gap: 12px; }
.e-prompt { font: 800 26px/1.2 'Baloo 2', 'Nunito', sans-serif; margin: 6px 0 0; }
.e-listen { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border: 3px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--e-blue-deep); box-shadow: 0 4px 0 var(--line-deep); }
.e-listens { flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.e-listen--slow { width: 48px; height: 48px; box-shadow: 0 3px 0 var(--line-deep); }
.e-listen--slow .e-icon { width: 24px; height: 24px; }
.e-icon { width: 26px; height: 26px; }
.e-body { display: flex; flex-direction: column; gap: 20px; }
.e-ex.is-waiting .e-tile, .e-ex.is-waiting .e-key { pointer-events: none; }

.e-ob { width: 100%; height: 100%; display: block; }

.e-mat { --cell: 52px; display: grid; grid-template-columns: repeat(auto-fit, var(--cell)); grid-auto-rows: var(--cell); gap: 6px; justify-content: center; align-content: center; width: 100%; max-width: calc(var(--cell) * 5 + 54px); min-height: 84px; margin-inline: auto; padding: 14px; background: var(--mat); border-radius: var(--r-m); }
.e-mat-s { --cell: 44px; }
.e-mat-xs { --cell: 36px; gap: 4px; }
.e-mat-solo { --cell: 96px; max-width: 150px; }
.e-mat-empty { min-height: 84px; background: repeating-linear-gradient(135deg, var(--mat) 0 10px, #FFF6E6 10px 20px); }
.e-stim { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.e-stim-row { flex-direction: row; justify-content: center; align-items: center; }
.e-stim-row .e-mat { --cell: 40px; flex: 1 1 0; min-width: 0; }
.e-sign { font: 800 38px/1 'Baloo 2', sans-serif; color: var(--e-blue-deep); }
.e-kept, .e-crossed { position: relative; display: block; }
.e-crossed .e-ob { opacity: .35; }
.e-crossed::after { content: ''; position: absolute; left: 4%; right: 4%; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--e-pink-ink); transform: rotate(-38deg); }
.e-equation { font: 800 52px/1 'Baloo 2', sans-serif; margin: 8px 0; }
.e-num { font: 800 42px/1 'Baloo 2', sans-serif; font-variant-numeric: tabular-nums; }

.e-pattern { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 14px; background: var(--mat); border-radius: var(--r-m); }
.e-pattern-item, .e-unknown { width: 46px; height: 46px; }
.e-unknown { display: grid; place-items: center; background: var(--surface); border-radius: 14px; font: 800 30px/1 'Baloo 2', sans-serif; color: var(--e-blue-deep); box-shadow: inset 0 0 0 3px var(--e-blue); }

.e-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(96px, 100%), 1fr)); gap: 12px; }
.e-tile {
    --tc: var(--e-blue); --tc-deep: var(--e-blue-deep); --tc-ink: var(--e-blue-deep);
    position: relative; min-height: 76px; padding: 12px; background: var(--surface); color: var(--tc-ink);
    border: 3px solid var(--tc); border-radius: 24px;
    box-shadow: 0 var(--tile-depth) 0 var(--tc-deep);
    transition: transform .12s ease, box-shadow .12s ease, background-color .2s ease, border-color .2s ease;
}
.e-options > .e-tile:nth-child(4n+2), .e-scene > .e-tile:nth-child(4n+2) { --tc: var(--e-amber); --tc-deep: var(--e-amber-deep); --tc-ink: var(--e-amber-ink); }
.e-options > .e-tile:nth-child(4n+3), .e-scene > .e-tile:nth-child(4n+3) { --tc: var(--e-pink); --tc-deep: var(--e-pink-deep); --tc-ink: var(--e-pink-ink); }
.e-options > .e-tile:nth-child(4n+4), .e-scene > .e-tile:nth-child(4n+4) { --tc: var(--e-green); --tc-deep: var(--e-green-deep); --tc-ink: var(--e-green-ink); }
@media (hover: hover) {
    .e-tile:hover { transform: translateY(-3px); box-shadow: 0 calc(var(--tile-depth) + 3px) 0 var(--tc-deep); }
}
.e-tile:active { transform: translateY(var(--tile-depth)); box-shadow: 0 0 0 var(--tc-deep); }
/* Hint after a mistake ("o încercare în plus"): the tile already tried steps back. */
.e-tile.is-out { opacity: .35; filter: grayscale(1); transform: scale(.94); box-shadow: none; pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.edulo .e-tile { color: var(--tc-ink); }
.edulo .e-key { color: var(--e-blue-deep); }
.edulo .e-key-ok { color: var(--ink); }
.edulo .e-key-ok:disabled { color: #6F7891; }
.edulo .e-key-back { color: var(--ink-soft); }
.edulo .e-pair { color: var(--e-blue-deep); }
.edulo .e-pair-col + .e-pair-col .e-pair { color: var(--e-pink-ink); }
.edulo .e-order-tile { color: var(--e-amber-ink); }
.edulo .e-order-tile.is-correct { color: var(--e-green-ink); }
.edulo .e-order-tile.is-wrong { color: var(--e-pink-ink); }
.e-tile-num { min-height: 96px; }
.e-tile-num .e-num { font-size: 48px; }
.e-word { font: 800 30px/1.1 'Baloo 2', 'Nunito', sans-serif; overflow-wrap: break-word; hyphens: none; }
.e-word-l { font-size: 48px; }
.e-word-m { font-size: 24px; }
.e-word-s { font-size: 20px; }
.e-options:has(.e-tile-text) { grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr)); }
.edulo .e-key { font-family: 'Baloo 2', 'Nunito', sans-serif; font-weight: 800; }
.e-tile-text { display: grid; place-items: center; min-height: 88px; padding: 10px 8px; }
.e-card-word { display: grid; place-items: center; min-height: 96px; padding: 14px 24px; background: var(--surface); border: 3px solid var(--line); border-radius: 24px; box-shadow: 0 5px 0 var(--line-deep); font: 800 40px/1.15 'Baloo 2', 'Nunito', sans-serif; letter-spacing: .02em; text-align: center; overflow-wrap: anywhere; }
.e-card-word .e-gap { display: inline-block; width: .8em; height: .9em; margin: 0 3px; border-bottom: 5px solid var(--e-blue); vertical-align: baseline; }
.e-tile-group { padding: 8px; }
.e-tile-group .e-mat { --cell: 34px; min-height: 76px; padding: 8px; background: transparent; gap: 4px; }
.e-tile-solo, .e-tile-shape { display: grid; place-items: center; }
.e-solo { display: block; width: 64px; height: 64px; }
.e-solo-l { width: min(88px, 100%); height: auto; aspect-ratio: 1; }
.e-tile-rel { min-height: 96px; }
.e-rel { display: grid; justify-items: center; gap: 2px; font-weight: 800; font-size: 19px; line-height: 1.1; }
.e-rel b { font: 800 34px/1 'Baloo 2', sans-serif; color: var(--e-blue-deep); }

.e-mark { position: absolute; top: -8px; right: -8px; display: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; }
.e-mark .e-icon { width: 20px; height: 20px; }
.e-tile.is-correct { --tc: var(--e-green); --tc-deep: var(--e-green-deep); --tc-ink: var(--e-green-ink); background: var(--right-bg, #E9FBF2); animation: e-hop .4s var(--ease); }
.e-tile.is-correct .e-mark { display: grid; background: var(--e-green-ink); }
.e-tile.is-wrong { --tc: var(--e-pink); --tc-deep: var(--e-pink-deep); --tc-ink: var(--e-pink-ink); background: var(--wrong-bg, #FFEFF3); animation: e-shake .32s ease; }
.e-tile.is-wrong .e-mark { display: grid; background: var(--e-pink-ink); }

.e-scene { display: flex; gap: 10px; justify-content: center; flex-wrap: nowrap; padding: 16px; background: var(--mat); border-radius: var(--r-l); }
.e-scene-column { flex-direction: column; align-items: center; }
.e-scene .e-tile { flex: 0 1 92px; min-width: 56px; min-height: 76px; padding: 8px; display: grid; place-items: center; }
.e-scene .e-solo { width: min(64px, 100%); height: auto; aspect-ratio: 1; }

.e-versus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.e-side { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; justify-items: center; min-height: 110px; padding: 10px; background: var(--mat); border-radius: var(--r-m); }
.e-side .e-mat { --cell: 28px; background: transparent; padding: 2px; gap: 4px; }
.e-side .e-num { font-size: 56px; }

.e-kp-layout { display: flex; flex-direction: column; gap: 16px; }
.e-display, .e-slot { display: inline-grid; place-items: center; font: 800 42px/1 'Baloo 2', sans-serif; background: var(--surface); border-radius: var(--r-m); box-shadow: inset 0 0 0 3px var(--e-blue); }
.e-display { min-width: 96px; min-height: 64px; padding: 4px 14px; }
.e-slot { min-width: 72px; min-height: 66px; padding: 2px 10px; color: var(--e-blue-deep); }
.e-display.is-correct, .e-slot.is-correct { background: var(--right-bg, #DAF6E9); color: var(--e-green-ink); box-shadow: inset 0 0 0 3px var(--e-green-deep); }
.e-display.is-wrong, .e-slot.is-wrong { background: var(--wrong-bg, #FFE3EA); color: var(--e-pink-ink); box-shadow: inset 0 0 0 3px var(--e-pink-deep); animation: e-shake .32s ease; }
.e-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; padding: 14px; background: var(--mat); border-radius: var(--r-m); }
.e-line-sequence { gap: 4px 6px; }
.e-comma { font: 800 28px/1 'Baloo 2', sans-serif; color: var(--ink-soft); }

.e-keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 340px; width: 100%; margin-inline: auto; }
.e-key { min-height: 60px; display: grid; place-items: center; border: 3px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--e-blue-deep); font: 800 30px/1 'Baloo 2', sans-serif; box-shadow: 0 5px 0 var(--line-deep); transition: transform .1s ease, box-shadow .1s ease; }
@media (hover: hover) {
    .e-key:not(:disabled):hover { border-color: var(--e-blue); }
}
.e-key:active { transform: translateY(5px); box-shadow: 0 0 0 var(--line-deep); }
.e-key-ok { background: var(--e-green); border-color: var(--e-green-deep); color: var(--ink); box-shadow: 0 5px 0 var(--e-green-deep); }
.e-key-ok:disabled { background: #EEF1F6; border-color: var(--line); box-shadow: 0 5px 0 var(--line-deep); color: #6F7891; cursor: default; }
.e-key-back { color: var(--ink-soft); }

.e-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.e-pair-col { display: flex; flex-direction: column; gap: 10px; }
.e-pair { position: relative; min-height: 76px; padding: 6px; display: grid; place-items: center; border: 3px solid var(--pb, var(--line)); border-radius: 22px; background: var(--surface); color: var(--e-blue-deep); box-shadow: 0 5px 0 var(--line-deep); touch-action: none; user-select: none; transition: box-shadow .15s ease, background-color .15s ease, border-color .15s ease; }
.e-pair-col:first-child { --pb: #BFD0FF; }
.e-pair-col + .e-pair-col { --pb: #FFD08A; }
.e-pair .e-mat { --cell: 28px; min-height: 60px; background: transparent; padding: 2px; gap: 3px; pointer-events: none; }
.e-pair .e-num { font-size: 34px; }
.e-pair.is-active { border-color: var(--e-blue-deep); box-shadow: 0 5px 0 var(--e-blue-deep); }
.e-pair.is-paired { border-color: var(--e-blue); background: #EEF3FF; }
.e-pair-tag { position: absolute; top: 4px; left: 6px; min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font: 800 15px/1 'Nunito', sans-serif; color: #fff; }
.e-pair.is-paired .e-pair-tag { background: var(--e-blue-deep); }
.e-pair.is-correct { border-color: var(--e-green); background: var(--right-bg, #E9FBF2); box-shadow: 0 5px 0 var(--e-green-deep); }
.e-pair.is-correct .e-pair-tag { background: var(--e-green-ink); }
.e-pair.is-wrong { border-color: var(--e-pink); background: var(--wrong-bg, #FFEFF3); box-shadow: 0 5px 0 var(--e-pink-deep); animation: e-shake .32s ease; }
.e-pair.is-wrong .e-pair-tag { background: var(--e-pink-ink); }
.e-pair.is-dragging, .e-order-tile.is-dragging { z-index: 5; box-shadow: 0 16px 28px rgba(35, 35, 58, .22); transition: none; }

.e-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; min-height: 84px; padding: 4px; }
.e-order-track { display: flex; align-items: center; gap: 6px; }
.e-end { font-weight: 800; font-size: 16px; color: var(--ink-soft); }
.e-order-slots { flex: 1; display: flex; justify-content: center; gap: 6px; padding: 10px; background: var(--mat); border-radius: var(--r-m); }
.e-order-slot { flex: 1 1 0; max-width: 92px; min-height: 76px; display: grid; place-items: center; border: 3px dashed var(--line-deep); border-radius: 18px; background: rgba(255, 255, 255, .7); }
.e-order-tile { position: relative; min-width: 64px; min-height: 68px; padding: 4px 8px; display: grid; place-items: center; border: 3px solid var(--e-amber); border-radius: 18px; background: var(--surface); color: var(--e-amber-ink); box-shadow: 0 5px 0 var(--e-amber-deep); touch-action: none; user-select: none; }
.e-order-slot:has(.e-order-tile) { border-color: transparent; }
.e-order-slot .e-order-tile { width: 100%; min-width: 0; padding: 2px; }
.e-order-tile .e-num { font-size: 32px; }
.e-order-tile .e-mat { --cell: 20px; min-height: 52px; max-width: 124px; padding: 2px; gap: 2px; background: transparent; pointer-events: none; }
.e-order-tile.is-correct { border-color: var(--e-green); background: var(--right-bg, #E9FBF2); color: var(--e-green-ink); box-shadow: 0 5px 0 var(--e-green-deep); }
.e-order-tile.is-wrong { border-color: var(--e-pink); background: var(--wrong-bg, #FFEFF3); color: var(--e-pink-ink); box-shadow: 0 5px 0 var(--e-pink-deep); animation: e-shake .32s ease; }

.e-bar { display: flex; justify-content: flex-end; padding-top: 4px; }
.e-bar[hidden] { display: none; }
.e-continue { min-height: 60px; min-width: 200px; padding: 10px 28px; border: 0; border-radius: var(--r-m); background: var(--e-blue-deep); color: #fff !important; font: 800 22px/1 'Baloo 2', sans-serif; box-shadow: 0 6px 0 #1E4099; transition: transform .1s ease, box-shadow .1s ease; }
.e-continue:active { transform: translateY(6px); box-shadow: 0 0 0 #1E4099; }
.e-bar.is-good .e-continue { background: var(--e-green-ink); box-shadow: 0 6px 0 #0A4A2F; }

.e-lulu { display: flex; align-items: flex-end; gap: 10px; margin-top: 8px; }
.e-lulu-art { flex: none; width: 92px; height: 92px; transform-origin: 50% 100%; }
.e-lulu-svg { width: 100%; height: 100%; display: block; }
.e-lulu-img { width: 100%; height: 100%; display: block; object-fit: contain; }
.e-lulu-art.is-reacting[data-state='happy'] { animation: e-jump .55s var(--ease); }
.e-lulu-art.is-reacting[data-state='encouraging'] { animation: e-nod .5s ease; }
.e-lulu-art.is-reacting[data-state='thinking'] { animation: e-tilt .5s ease; }
.e-bubble { margin: 0 0 10px; padding: 10px 16px; max-width: 280px; background: var(--surface); border-radius: var(--r-m) var(--r-m) var(--r-m) 6px; font-weight: 700; font-size: 18px; line-height: 1.25; box-shadow: var(--soft); animation: e-pop .22s var(--ease); }
.e-bubble[hidden] { display: none; }

.e-preview { display: flex; flex-direction: column; gap: 16px; background: var(--bg); }
.e-preview .e-prompt { font-size: 22px; }

@keyframes e-hop { 40% { transform: translateY(-8px) scale(1.03); } }
@keyframes e-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes e-jump { 40% { transform: translateY(-20px) scale(1.04, .97); } 70% { transform: translateY(0) scale(1.06, .92); } }
@keyframes e-nod { 40% { transform: rotate(-5deg); } 70% { transform: rotate(4deg); } }
@keyframes e-tilt { 50% { transform: rotate(6deg); } }
@keyframes e-pop { from { opacity: 0; transform: translateY(6px) scale(.96); } }

/* ---- sort_bins: baskets ---- */
.e-sort-tray { min-height: 92px; padding: 10px; background: var(--mat); border-radius: var(--r-m); }
.e-sort-tray.is-empty { min-height: 0; padding: 0; background: none; }
.e-sort-tile { position: relative; min-width: 72px; min-height: 72px; padding: 6px 12px; display: grid; place-items: center; border: 3px solid var(--e-blue); border-radius: 18px; background: var(--surface); color: var(--e-blue-deep); box-shadow: 0 5px 0 var(--e-blue-deep); touch-action: none; user-select: none; transition: transform .12s ease, box-shadow .12s ease; }
.e-sort-tile .e-num { font-size: 32px; }
.e-sort-tile .e-solo .e-ob { width: 52px; height: 52px; }
.e-sort-tile .e-mat { --cell: 18px; min-height: 48px; max-width: 120px; padding: 2px; gap: 2px; background: transparent; pointer-events: none; }
.e-sort-word { font: 800 26px/1.1 'Baloo 2', 'Nunito', sans-serif; }
.e-sort-tile.is-selected { transform: translateY(-6px) scale(1.06); box-shadow: 0 0 0 4px var(--e-amber), 0 9px 0 var(--e-blue-deep); }
.e-sort-tile.is-dragging { z-index: 5; box-shadow: 0 16px 28px rgba(35, 35, 58, .22); transition: none; }
.e-sort-tile.is-correct { border-color: var(--e-green); background: var(--right-bg, #E9FBF2); color: var(--e-green-ink); box-shadow: 0 5px 0 var(--e-green-deep); }
.e-sort-tile.is-wrong { border-color: var(--e-pink); background: var(--wrong-bg, #FFEFF3); color: var(--e-pink-ink); box-shadow: 0 5px 0 var(--e-pink-deep); animation: e-shake .32s ease; }
.e-bins { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 10px; }
.e-bins[data-bins="3"] { --cols: 3; }
.e-bin { --bc: var(--e-blue); --bd: var(--e-blue-deep); --bp: #EEF3FF; display: flex; flex-direction: column; min-height: 150px; border: 3px solid var(--bc); border-radius: 22px; background: var(--bp); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.e-bin[data-tone="1"] { --bc: var(--e-amber); --bd: var(--e-amber-ink); --bp: #FFF6E0; }
.e-bin[data-tone="2"] { --bc: var(--e-pink); --bd: var(--e-pink-ink); --bp: #FFF0F4; }
.e-bin[data-tone="3"] { --bc: var(--e-green); --bd: var(--e-green-ink); --bp: #EAFBF2; }
.e-bin.is-ready { box-shadow: 0 0 0 4px var(--bc); animation: e-bin-call 1s ease-in-out infinite; }
@keyframes e-bin-call { 50% { transform: translateY(-3px); } }
.e-bin-label { padding: 8px 6px; border-radius: 18px 18px 0 0; background: var(--bc); color: #fff; font: 800 18px/1.15 'Baloo 2', 'Nunito', sans-serif; text-align: center; overflow-wrap: anywhere; }
.e-bin[data-tone="1"] .e-bin-label { color: var(--e-amber-ink); }
.e-bin-drop { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 6px; padding: 8px; }
.e-bin-drop .e-sort-tile { min-width: 56px; min-height: 56px; padding: 4px 8px; }
.e-bin-drop .e-sort-word { font-size: 20px; }
.e-bin-drop .e-num { font-size: 26px; }

/* ---- build_word: letters into slots ---- */
.e-build-picture { display: grid; place-items: center; }
.e-build-picture .e-ob { width: 96px; height: 96px; }
.e-build-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 14px 10px; background: var(--mat); border-radius: var(--r-m); }
.e-build-slot { min-width: 54px; min-height: 64px; display: grid; place-items: center; border: 3px dashed var(--line-deep); border-radius: 16px; background: rgba(255, 255, 255, .75); }
.e-build-slots[data-kind="syllables"] .e-build-slot { min-width: 76px; }
.e-build-slots[data-kind="words"] .e-build-slot { min-width: 84px; }
.e-build-slot:has(.e-build-tile) { border-color: transparent; background: none; }
.e-build-tray { gap: 10px; }
.e-build-tile { position: relative; min-width: 54px; min-height: 60px; padding: 4px 12px; border: 3px solid var(--e-amber); border-radius: 16px; background: var(--surface); color: var(--e-amber-ink); box-shadow: 0 5px 0 var(--e-amber-deep); font: 800 30px/1 'Baloo 2', 'Nunito', sans-serif; touch-action: none; user-select: none; }
.e-build-tray .e-build-tile:nth-child(4n+2) { border-color: var(--e-blue); color: var(--e-blue-deep); box-shadow: 0 5px 0 var(--e-blue-deep); }
.e-build-tray .e-build-tile:nth-child(4n+3) { border-color: var(--e-pink); color: var(--e-pink-ink); box-shadow: 0 5px 0 var(--e-pink-deep); }
.e-build-tray .e-build-tile:nth-child(4n) { border-color: var(--e-green); color: var(--e-green-ink); box-shadow: 0 5px 0 var(--e-green-deep); }
.e-build-slot .e-build-tile { border-color: var(--e-blue); color: var(--e-blue-deep); box-shadow: 0 5px 0 var(--e-blue-deep); }
.edulo .e-build-tile { font: 800 30px/1 'Baloo 2', 'Nunito', sans-serif; }
.edulo .e-build-words .e-build-tile { font-size: 22px; }
.edulo .e-sort-tile { font-family: 'Baloo 2', 'Nunito', sans-serif; }
.e-build-tile.is-dragging { z-index: 5; box-shadow: 0 16px 28px rgba(35, 35, 58, .22); transition: none; }
.e-build-tile.is-correct { border-color: var(--e-green); background: var(--right-bg, #E9FBF2); color: var(--e-green-ink); box-shadow: 0 5px 0 var(--e-green-deep); animation: e-hop .4s var(--ease); }
.e-build-tile.is-wrong { border-color: var(--e-pink); background: var(--wrong-bg, #FFEFF3); color: var(--e-pink-ink); box-shadow: 0 5px 0 var(--e-pink-deep); animation: e-shake .32s ease; }

/* ---- number_line: the frog hops ---- */
.e-line { --cell: calc(100% / var(--n)); position: relative; padding: 70px 0 6px; margin: 0 -4px; }
.e-line-bar { position: absolute; left: calc(var(--cell) / 2); right: calc(var(--cell) / 2); top: 96px; height: 6px; border-radius: 3px; background: var(--e-blue-deep); }
.e-ticks { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.e-tick { display: grid; justify-items: center; gap: 6px; min-height: 76px; padding: 14px 0 6px; border: 0; border-radius: 14px; background: none; color: var(--e-blue-deep); }
.e-tick-mark { width: 6px; height: 22px; border-radius: 3px; background: var(--e-blue-deep); }
.e-tick-label { display: grid; place-items: center; min-width: 28px; height: 30px; padding: 0 3px; border-radius: 10px; font: 800 18px/1 'Baloo 2', 'Nunito', sans-serif; }
@media (hover: hover) { .e-tick:hover .e-tick-label { background: #EEF3FF; } }
.e-tick.is-picked .e-tick-label { background: var(--e-amber); color: var(--e-amber-ink); }
.e-tick.is-correct .e-tick-label { background: var(--e-green); color: #fff; }
.e-tick.is-wrong .e-tick-label { background: var(--e-pink); color: #fff; animation: e-shake .32s ease; }
.e-frog { position: absolute; top: 20px; left: calc(var(--cell) * var(--at, 0) + var(--cell) / 2); width: 52px; height: 46px; margin-left: -26px; transition: left .24s cubic-bezier(.34, 1.3, .64, 1); z-index: 2; pointer-events: none; }
.e-frog .e-frog-art { width: 100%; height: 100%; }
.e-frog.is-hopping { animation: e-frog-hop .26s ease-out; }
.e-frog.is-sad .e-frog-art { filter: saturate(.4); }
@keyframes e-frog-hop { 45% { transform: translateY(-22px) rotate(-8deg); } }
.e-arcs { position: absolute; inset: 0; pointer-events: none; }
.e-arc { position: absolute; top: 58px; left: calc(var(--cell) * var(--from) + var(--cell) / 2); width: var(--cell); height: 30px; border: 3px dashed var(--e-amber); border-bottom: 0; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
@media (max-width: 420px) { .e-tick-label { font-size: 15px; min-width: 22px; } .e-frog { width: 42px; height: 38px; margin-left: -21px; top: 26px; } }

@media (min-width: 768px) {
    .edulo { font-size: 20px; }
    .e-prompt { font-size: 32px; }
    .e-lulu-art { width: 124px; height: 124px; }
    .e-mat { --cell: 60px; }
    .e-mat-s { --cell: 52px; }
    .e-mat-xs { --cell: 42px; }
    .e-tile-group .e-mat { --cell: 40px; }
    .e-side .e-mat { --cell: 44px; gap: 6px; }
    .e-preview .e-mat { --cell: 44px; }
    .e-preview .e-side .e-mat { --cell: 28px; gap: 4px; }
    .e-preview .e-mat-s { --cell: 36px; }
    .e-preview .e-mat-xs { --cell: 28px; }
    .e-preview .e-tile-group .e-mat { --cell: 30px; }
    .e-preview .e-lulu-art { width: 92px; height: 92px; }
}

@media (min-width: 1024px) {
    .e-kp-layout:has(.e-keypad) { flex-direction: row; align-items: center; }
    .e-kp-layout > :first-child { flex: 1 1 0; min-width: 0; }
    .e-kp-layout > .e-keypad { flex: 0 1 300px; min-width: 240px; }
    .e-kp-layout:has(.e-keypad) .e-mat:not(.e-mat-s, .e-mat-xs, .e-mat-solo) { --cell: 46px; }
    .e-kp-layout:has(.e-keypad) > :first-child { min-width: 160px; } /* one object: the column would shrink to its 36px */
    .e-preview .e-kp-layout { flex-direction: column; align-items: stretch; }
    .e-preview .e-kp-layout > .e-keypad { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
    .edulo *, .edulo *::before, .edulo *::after { animation: none !important; transition: none !important; }
}

.e-groups { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.e-groups .e-mat { --cell: 28px; width: auto; min-height: 0; padding: 8px; max-width: 170px; gap: 3px; }
.e-clock { width: 190px; height: 190px; }
.e-clock-face { fill: var(--surface); stroke: var(--ink); stroke-width: 4; }
.e-clock-num { font: 700 11px 'Nunito', sans-serif; fill: var(--ink); }
.e-clock-hour { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.e-clock-minute { stroke: var(--e-pink-ink); stroke-width: 4; stroke-linecap: round; }
.e-clock-pin { fill: var(--ink); }
.e-money { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 14px; background: var(--mat); border-radius: var(--r-m); }
.e-coin { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: var(--e-amber); font: 800 13px/1.1 'Nunito', sans-serif; text-align: center; }
.e-note { display: grid; place-items: center; min-width: 96px; height: 58px; padding: 0 10px; border-radius: 10px; background: var(--e-green); font: 800 15px/1.1 'Nunito', sans-serif; }

/* ---- shared: the Check button of the types the child finishes by hand ---- */
.e-check { align-self: center; display: inline-flex; align-items: center; gap: 10px; min-height: 60px; min-width: 200px; justify-content: center; padding: 10px 28px; border: 3px solid var(--e-green-deep); border-radius: var(--r-m); background: var(--e-green); color: var(--ink); font: 800 22px/1 'Baloo 2', 'Nunito', sans-serif; box-shadow: 0 6px 0 var(--e-green-deep); transition: transform .1s ease, box-shadow .1s ease; }
.e-check .e-icon { width: 24px; height: 24px; }
.e-check:active { transform: translateY(6px); box-shadow: 0 0 0 var(--e-green-deep); }
.e-ex.is-waiting .e-check { opacity: .5; pointer-events: none; }
.e-step { min-width: 56px; min-height: 56px; display: grid; place-items: center; border: 3px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--e-blue-deep); font: 800 30px/1 'Baloo 2', sans-serif; box-shadow: 0 5px 0 var(--line-deep); }
.e-step:active { transform: translateY(5px); box-shadow: none; }

/* ---- clock_set ---- */
.e-clock-set { align-self: center; touch-action: none; cursor: grab; border-radius: 50%; }
.e-clock-set .e-clock { width: 230px; height: 230px; }
.e-clock-set.is-correct .e-clock-face { stroke: var(--e-green-deep); fill: var(--right-bg, #E9FBF2); }
.e-clock-set.is-wrong .e-clock-face { stroke: var(--e-pink-deep); fill: var(--wrong-bg, #FFEFF3); }
.e-clock-set.is-wrong { animation: e-shake .32s ease; }
.e-steppers { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; }
.e-stepper { display: flex; align-items: center; gap: 10px; }
.e-step-label { min-width: 90px; text-align: center; font-weight: 800; color: var(--ink-soft); }

/* ---- money_pay ---- */
.e-pay-token { border: 3px solid transparent; color: var(--ink); box-shadow: 0 4px 0 rgba(35, 35, 58, .18); cursor: pointer; }
.e-pay-label { font-weight: 800; color: var(--ink-soft); text-align: center; margin-bottom: -12px; }
.e-pay-counter { min-height: 92px; background: #EEF3FF; border: 3px dashed var(--e-blue); }
.e-pay-counter.is-empty::after { content: ''; min-height: 58px; }
.e-pay-counter.is-correct { border: 3px solid var(--e-green-deep); background: var(--right-bg, #E9FBF2); }
.e-pay-counter.is-wrong { border: 3px solid var(--e-pink-deep); background: var(--wrong-bg, #FFEFF3); animation: e-shake .32s ease; }
.e-pay-sum { margin: 0; text-align: center; font-weight: 800; font-size: 20px; }

/* ---- bar_chart ---- */
.e-chart-box { padding: 12px; background: var(--surface); border: 3px solid var(--line); border-radius: var(--r-m); }
.e-chart { width: 100%; max-width: 440px; height: auto; }
.e-chart-grid { stroke: var(--line); stroke-width: 1.5; }
.e-chart-axis { font: 700 12px 'Nunito', sans-serif; fill: var(--ink-soft); }
.e-chart-label { font: 800 13px 'Nunito', sans-serif; fill: var(--ink); }
.e-chart-bar { fill: var(--e-blue); }
.e-chart-bar[data-tone="1"] { fill: var(--e-amber); }
.e-chart-bar[data-tone="2"] { fill: var(--e-pink); }
.e-chart-bar[data-tone="3"] { fill: var(--e-green); }

/* ---- memory ---- */
.e-memory { display: grid; grid-template-columns: repeat(var(--mcols, 4), minmax(0, 1fr)); gap: 10px; max-width: 520px; width: 100%; margin-inline: auto; }
.e-memory[data-cards="4"], .e-memory[data-cards="6"] { --mcols: 3; }
.e-memory[data-cards="4"] { --mcols: 2; max-width: 320px; }
.e-card { --cc: var(--e-blue); --cd: var(--e-blue-deep); position: relative; aspect-ratio: 1; min-height: 72px; padding: 4px; border: 3px solid var(--cc); border-radius: 18px; background: var(--cc); color: #fff; box-shadow: 0 5px 0 var(--cd); transition: transform .2s ease, background-color .2s ease; }
.e-card[data-tone="1"] { --cc: var(--e-amber); --cd: var(--e-amber-deep); }
.e-card[data-tone="2"] { --cc: var(--e-pink-deep); --cd: var(--e-pink-ink); }
.e-card[data-tone="3"] { --cc: var(--e-green-ink); --cd: #0A4A2F; }
.edulo .e-card-back { font: 800 34px/1 'Baloo 2', sans-serif; color: #fff; }
.edulo .e-card[data-tone="1"] .e-card-back { color: var(--e-amber-ink); }
.e-card-face { display: none; font: 800 22px/1.1 'Baloo 2', 'Nunito', sans-serif; color: var(--ink); overflow-wrap: anywhere; }
.e-card.is-up { background: var(--surface); transform: rotateY(0); animation: e-pop .2s var(--ease); }
.e-card.is-up .e-card-back { display: none; }
.e-card.is-up .e-card-face { display: block; }
.e-card.is-found { --cc: var(--e-green); --cd: var(--e-green-deep); background: var(--right-bg, #E9FBF2); }

/* ---- trace ---- */
.e-trace-box { position: relative; align-self: center; }
.e-trace { display: block; width: min(280px, 78vw); height: auto; aspect-ratio: 1; background: var(--surface); border: 3px solid var(--line); border-radius: var(--r-l); touch-action: none; cursor: crosshair; }
.e-trace.is-correct { border-color: var(--e-green-deep); }
.e-trace.is-wrong { border-color: var(--e-pink-deep); animation: e-shake .32s ease; }
.e-trace-clear { position: absolute; top: 8px; right: 8px; min-width: 48px; min-height: 48px; font-size: 24px; }

/* ---- grid_pick ---- */
.e-grid-box { display: flex; justify-content: center; }
.e-grid { display: grid; grid-template-columns: 22px repeat(var(--cols), minmax(48px, 64px)); gap: 5px; padding: 8px; background: var(--mat); border-radius: var(--r-m); }
.e-grid-head, .e-grid-corner { display: grid; place-items: center; font: 800 18px/1 'Baloo 2', sans-serif; color: var(--ink-soft); min-height: 28px; }
.e-cell { aspect-ratio: 1; min-width: 48px; min-height: 48px; display: grid; place-items: center; padding: 4px; border: 3px solid var(--line-deep); border-radius: 12px; background: var(--surface); }
.e-cell .e-solo { width: 100%; height: auto; max-width: 44px; aspect-ratio: 1; }
.e-cell.is-picked { background: var(--e-amber); border-color: var(--e-amber-deep); }
.e-cell.is-correct { background: var(--e-green); border-color: var(--e-green-deep); }
.e-cell.is-wrong { background: var(--e-pink); border-color: var(--e-pink-deep); animation: e-shake .32s ease; }
.e-grid-mirror .e-cell.is-fixed { cursor: default; background: #F5F7FB; }
.e-grid-mirror .e-cell.is-shown { background: var(--e-blue); border-color: var(--e-blue-deep); }
.e-grid-mirror .e-cell.is-axis { box-shadow: 9px 0 0 -3px var(--e-pink-deep); }
.e-grid.is-wrong { animation: e-shake .32s ease; }

/* ---- venn ---- */
.e-bins.e-venn { --cols: 3; position: relative; padding-top: 44px; }
.e-bins.e-venn[data-bins="4"] .e-bin[data-bin="none"] { grid-column: 1 / -1; min-height: 96px; }
.e-venn .e-bin[data-bin="a"] { border-radius: 90px 22px 22px 90px; }
.e-venn .e-bin[data-bin="b"] { border-radius: 22px 90px 90px 22px; }
.e-venn .e-bin[data-bin="ab"] { --bc: var(--e-green-ink); --bd: #0A4A2F; --bp: #EAFBF2; }
.e-venn .e-bin[data-bin="ab"] .e-bin-label { color: #fff; }
.e-venn .e-bin-label { overflow-wrap: normal; font-size: 16px; }
.e-venn .e-bin[data-bin="b"] { --bc: var(--e-pink); --bd: var(--e-pink-ink); --bp: #FFF0F4; }
.e-venn .e-bin[data-bin="none"] { --bc: var(--line-deep); --bd: var(--ink-soft); --bp: #F5F7FB; }
.e-venn .e-bin[data-bin="none"] .e-bin-label { color: var(--ink); }
.e-venn-sets { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: 10px; }
.e-venn-set { padding: 6px 14px; border-radius: 999px; background: var(--e-blue-deep); color: #fff; font: 800 18px/1.1 'Baloo 2', sans-serif; }
.e-venn-set + .e-venn-set { background: var(--e-pink-deep); }

/* ---- fraction_color ---- */
.e-fraction { width: min(240px, 70vw); height: auto; }
.e-part { fill: var(--surface); stroke: var(--ink); stroke-width: 3; cursor: pointer; transition: fill .15s ease; }
.e-part.is-on { fill: var(--e-amber); }
.e-part:focus-visible { outline: none; stroke: var(--e-blue-deep); stroke-width: 5; }
.e-fraction.is-correct .e-part.is-on { fill: var(--e-green); }
.e-fraction.is-wrong { animation: e-shake .32s ease; }
.e-fraction.is-wrong .e-part.is-on { fill: var(--e-pink); }

/* ---- tangram ---- */
.e-tg-board { padding: 12px; background: var(--mat); border-radius: var(--r-m); }
.e-tangram { width: min(340px, 86vw); height: auto; max-height: 340px; overflow: visible; }
.e-tg-slot { fill: var(--surface); stroke: var(--ink-soft); stroke-width: 2px; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; stroke-linejoin: round; cursor: pointer; }
.e-tg-slot:focus-visible { outline: none; stroke: var(--e-blue-deep); stroke-width: 4px; }
.e-tangram-hard .e-tg-slot { fill: #55556E; stroke: #55556E; stroke-dasharray: none; }
.e-tg-slot.is-filled { fill: var(--e-blue); stroke: #fff; stroke-dasharray: none; stroke-width: 2px; }
.e-tg-slot.is-filled[data-tone="1"] { fill: var(--e-amber); }
.e-tg-slot.is-filled[data-tone="2"] { fill: var(--e-pink); }
.e-tg-slot.is-filled[data-tone="3"] { fill: var(--e-green); }
.e-tg-tools { display: flex; justify-content: center; }
.e-tg-rotate { display: inline-flex; gap: 8px; align-items: center; padding: 0 18px; font-size: 26px; }
.e-tg-rotate:disabled { opacity: .45; cursor: default; }
.e-tg-rotate-label { font: 800 18px/1 'Baloo 2', 'Nunito', sans-serif; }
.e-tg-tray { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; padding: 10px; background: var(--mat); border-radius: var(--r-m); min-height: 84px; }
.e-tg-tile { --tc: var(--e-blue); --tc-deep: var(--e-blue-deep); display: grid; place-items: center; min-width: 56px; min-height: 56px; padding: 6px; border: 3px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 4px 0 var(--line-deep); touch-action: none; user-select: none; }
.e-tg-tile[hidden] { display: none; }
.e-tg-tile[data-tone="1"] { --tc: var(--e-amber); --tc-deep: var(--e-amber-deep); }
.e-tg-tile[data-tone="2"] { --tc: var(--e-pink); --tc-deep: var(--e-pink-deep); }
.e-tg-tile[data-tone="3"] { --tc: var(--e-green); --tc-deep: var(--e-green-deep); }
.e-tg-art { display: block; height: auto; max-width: 130px; }
.e-tg-piece { fill: var(--tc); stroke: var(--tc-deep); stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.e-tg-tile.is-selected { border-color: var(--e-amber-deep); box-shadow: 0 0 0 4px var(--e-amber), 0 4px 0 var(--line-deep); transform: translateY(-3px); }
.e-tg-tile.is-dragging { z-index: 5; box-shadow: 0 16px 28px rgba(35, 35, 58, .22); transition: none; }
.e-tg-tile.is-shaking { animation: e-shake .32s ease; }

/* ---- write_card: a note, a card, a letter or a composition with blanks ---- */
.e-card-paper { --pc: var(--e-amber); padding: 18px 20px; border: 3px solid var(--pc); border-radius: var(--r-m); background: #FFFDF6; box-shadow: var(--soft); font: 600 21px/1.5 'Baloo 2', 'Nunito', sans-serif; }
.e-card-paper--felicitare { --pc: var(--e-pink); background: #FFF6F9; }
.e-card-paper--scrisoare { --pc: var(--e-blue); background: #F7F9FF; }
.e-card-paper--compunere { --pc: var(--e-green); background: #F6FCF9; }
.e-paper-title { margin: 0 0 10px; text-align: center; font: 800 26px/1.2 'Baloo 2', 'Nunito', sans-serif; color: var(--e-pink-ink); }
.e-card-paper--bilet .e-paper-title { color: var(--e-amber-ink); }
.e-card-paper--scrisoare .e-paper-title { color: var(--e-blue-deep); }
.e-paper-line { margin: 0 0 8px; overflow-wrap: anywhere; }
.e-card-paper--compunere .e-paper-line:first-of-type { text-align: center; }
.e-blank { display: inline-block; min-width: 64px; min-height: 48px; margin: 2px 3px; padding: 2px 12px; border: 3px dashed var(--e-blue); border-radius: 12px; background: #EEF3FF; color: var(--e-blue-deep); font: 800 20px/1.6 'Baloo 2', 'Nunito', sans-serif; vertical-align: middle; }
.e-blank.is-active { border-style: solid; border-color: var(--e-amber-deep); box-shadow: 0 0 0 3px var(--e-amber); }
.e-blank.is-filled { border-style: solid; background: var(--surface); }
.e-blank.is-correct { border-color: var(--e-green-deep); background: var(--right-bg, #E9FBF2); color: var(--e-green-ink); }
.e-blank.is-wrong { border-color: var(--e-pink-deep); background: var(--wrong-bg, #FFEFF3); color: var(--e-pink-ink); animation: e-shake .32s ease; }
.e-paper-options:empty { display: none; }
.e-check:disabled { opacity: .5; cursor: default; }
