/* Best for Babies — colorful, mobile-first kids UI */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap');

/* Width follows Bootstrap .container (same as tool-content-wrap below). */
.babies-page {
    font-family: 'Nunito', system-ui, sans-serif;
}
.babies-hero {
    position: relative;
    overflow: hidden;
    border: 0 !important;
    border-radius: 24px !important;
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 214, 102, 0.55), transparent 42%),
        radial-gradient(circle at 88% 10%, rgba(255, 143, 178, 0.45), transparent 40%),
        radial-gradient(circle at 70% 90%, rgba(129, 212, 250, 0.5), transparent 45%),
        linear-gradient(145deg, #fff7ed 0%, #eff6ff 50%, #fdf2f8 100%) !important;
    box-shadow: 0 12px 32px rgba(249, 115, 22, 0.12);
}
.babies-hero::before,
.babies-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.babies-hero::before {
    width: 90px; height: 90px; top: -20px; right: 18%;
    background: rgba(250, 204, 21, 0.35);
}
.babies-hero::after {
    width: 60px; height: 60px; bottom: -10px; left: 12%;
    background: rgba(56, 189, 248, 0.35);
}
.babies-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: #9a3412;
    background: linear-gradient(90deg, #ffedd5, #fce7f3);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(249, 115, 22, 0.25);
}
.babies-hero h1 {
    font-weight: 900 !important;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.babies-stars {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.65rem;
}
.babies-stars span {
    font-size: 1.1rem;
    filter: grayscale(1);
    opacity: 0.35;
    transition: 0.25s;
}
.babies-stars span.on {
    filter: none;
    opacity: 1;
    transform: scale(1.15);
    animation: babies-pop 0.35s ease;
}
.babies-app-card {
    border: 0 !important;
    border-radius: 24px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}
.babies-app { min-height: 260px; }
.babies-shell { animation: babies-fade 0.28s ease; }

@keyframes babies-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
@keyframes babies-pop {
    0% { transform: scale(0.6); }
    70% { transform: scale(1.25); }
    100% { transform: scale(1.15); }
}
@keyframes babies-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes babies-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
@keyframes babies-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes babies-fall {
    to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

.babies-hud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.babies-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
}
.babies-pill.score { background: #fef3c7; color: #b45309; }
.babies-pill.lives { background: #fce7f3; color: #be185d; }
.babies-score {
    font-size: clamp(1.35rem, 5vw, 1.85rem);
    font-weight: 900;
    color: #0369a1;
}
.babies-big-btn {
    min-height: 54px;
    min-width: 120px;
    font-weight: 800;
    font-size: 1.05rem;
    border-radius: 18px !important;
    border: 0 !important;
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.babies-big-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.14);
}
.babies-big-btn:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
    filter: none;
}
.btn-babies-primary {
    background: linear-gradient(135deg, #38bdf8, #6366f1) !important;
    color: #fff !important;
}
.btn-babies-success {
    background: linear-gradient(135deg, #4ade80, #16a34a) !important;
    color: #fff !important;
}
.btn-babies-warn {
    background: linear-gradient(135deg, #fbbf24, #f97316) !important;
    color: #fff !important;
}
.btn-babies-pink {
    background: linear-gradient(135deg, #f472b6, #ec4899) !important;
    color: #fff !important;
}
.babies-choice {
    min-height: 64px;
    font-size: clamp(1.05rem, 3.5vw, 1.3rem);
    font-weight: 800;
    border-radius: 18px !important;
    border: 3px solid #e2e8f0 !important;
    background: #fff !important;
    box-shadow: 0 4px 0 rgba(14, 165, 233, 0.25);
    color: #0f172a !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}
.babies-choice:hover:not(:disabled):not(.ok):not(.bad) {
    transform: translateY(-3px) scale(1.03);
    border-color: #38bdf8 !important;
    background: #f0f9ff !important;
    box-shadow: 0 8px 0 rgba(14, 165, 233, 0.35);
    color: #0369a1 !important;
}
.babies-choice:active:not(:disabled):not(.ok):not(.bad) {
    transform: translateY(1px) scale(0.98);
}
.babies-choice.ok {
    background: linear-gradient(135deg, #86efac, #22c55e) !important;
    color: #fff !important;
    border-color: #16a34a !important;
    animation: babies-pop 0.35s ease;
    box-shadow: 0 4px 0 rgba(22, 163, 74, 0.35);
    pointer-events: none;
}
.babies-choice.bad {
    background: linear-gradient(135deg, #fda4af, #f43f5e) !important;
    color: #fff !important;
    border-color: #e11d48 !important;
    animation: babies-shake 0.35s ease;
    box-shadow: 0 4px 0 rgba(225, 29, 72, 0.3);
    pointer-events: none;
}
.babies-choice:disabled {
    opacity: 0.7;
    cursor: default;
}

.babies-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 0.7rem;
}
.babies-card {
    aspect-ratio: 1;
    border-radius: 18px;
    border: 3px solid #bae6fd;
    background: linear-gradient(160deg, #fff, #e0f2fe);
    font-size: clamp(1.25rem, 4vw, 1.6rem);
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    touch-action: manipulation;
    box-shadow: 0 5px 0 rgba(14, 165, 233, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.babies-card:hover:not(.matched) {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 0 rgba(14, 165, 233, 0.28);
    filter: brightness(1.05);
}
.babies-card:active { transform: scale(0.96); }
.babies-card.flipped,
.babies-card.matched {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    color: #fff;
    border-color: transparent;
}
.babies-card.ok {
    background: linear-gradient(135deg, #86efac, #22c55e) !important;
    color: #fff;
    animation: babies-pop 0.35s ease;
}
.babies-card.bad {
    background: linear-gradient(135deg, #fda4af, #f43f5e) !important;
    color: #fff;
    animation: babies-shake 0.35s ease;
}
.babies-card.matched { opacity: 0.65; pointer-events: none; }

.babies-trace-wrap {
    border-radius: 20px;
    border: 3px dashed rgba(249, 115, 22, 0.45);
    background:
        radial-gradient(circle at 20% 30%, rgba(254, 243, 199, 0.9), transparent 40%),
        #fff7ed;
    overflow: hidden;
    touch-action: none;
}
.babies-trace-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
    max-height: 55vh;
}
.babies-prompt {
    font-size: clamp(2.2rem, 14vw, 4.2rem);
    font-weight: 900;
    line-height: 1.05;
    color: #0f172a;
    letter-spacing: 0.03em;
    text-align: center;
}
.babies-subprompt {
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    font-weight: 700;
    color: #64748b;
    text-align: center;
    margin-bottom: 1rem;
}
.babies-feedback-ok { color: #15803d; font-weight: 800; font-size: 1.15rem; }
.babies-feedback-bad { color: #be123c; font-weight: 800; font-size: 1.15rem; }
.babies-paint-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 0.85rem;
}
.babies-swatch {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12), 0 4px 0 rgba(0, 0, 0, 0.08);
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.babies-swatch:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 3px #38bdf8, 0 4px 0 rgba(0, 0, 0, 0.08);
}
.babies-swatch.active { transform: scale(1.12); box-shadow: 0 0 0 3px #0ea5e9; }

.babies-tile-bank,
.babies-tile-slot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    min-height: 64px;
    padding: 0.75rem;
    border-radius: 18px;
    margin-bottom: 0.85rem;
}
.babies-tile-slot {
    background: linear-gradient(180deg, #fef3c7, #ffedd5);
    border: 3px dashed #f59e0b;
    min-height: 78px;
}
.babies-tile-bank {
    background: linear-gradient(180deg, #e0f2fe, #dbeafe);
    border: 3px solid #93c5fd;
}
.babies-tile {
    min-width: 52px;
    min-height: 52px;
    padding: 0.35rem 0.7rem;
    border-radius: 14px;
    border: 0;
    font-weight: 900;
    font-size: clamp(1.1rem, 4vw, 1.45rem);
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.15);
    animation: babies-float 2.8s ease-in-out infinite;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, outline 0.15s ease;
}
.babies-tile:nth-child(odd) { animation-delay: 0.2s; }
.babies-tile.c0 { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.babies-tile.c1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.babies-tile.c2 { background: linear-gradient(135deg, #22c55e, #4ade80); }
.babies-tile.c3 { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.babies-tile.c4 { background: linear-gradient(135deg, #6366f1, #818cf8); }
.babies-tile.c5 { background: linear-gradient(135deg, #ec4899, #f472b6); }
.babies-tile:hover:not(.used):not(.ok):not(.bad) {
    transform: translateY(-4px) scale(1.06);
    filter: brightness(1.08);
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.18);
    animation: none;
}
.babies-tile:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.babies-tile.used { opacity: 0.35; pointer-events: none; }
.babies-tile.ok {
    outline: 3px solid #16a34a;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.35), 0 5px 0 rgba(0, 0, 0, 0.15);
    animation: babies-pop 0.35s ease;
}
.babies-tile.bad {
    outline: 3px solid #e11d48;
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.35), 0 5px 0 rgba(0, 0, 0, 0.15);
    animation: babies-shake 0.35s ease;
}
.babies-tile.selected {
    outline: 3px solid #0f172a;
    transform: scale(1.08);
    animation: none;
}

.babies-letter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 0.5rem;
}
.babies-letter-btn {
    aspect-ratio: 1;
    border-radius: 16px;
    border: 0;
    font-weight: 900;
    font-size: 1.35rem;
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.babies-letter-btn:hover {
    transform: translateY(-3px) scale(1.06);
    filter: brightness(1.1);
    box-shadow: 0 7px 0 rgba(0, 0, 0, 0.16);
}
.babies-letter-btn:active { transform: scale(0.95); }
.babies-letter-btn.ok {
    outline: 3px solid #fff;
    box-shadow: 0 0 0 4px #22c55e, 0 4px 0 rgba(0, 0, 0, 0.12);
    animation: babies-pop 0.35s ease;
}
.babies-match-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.babies-game-canvas {
    width: 100%;
    max-width: 420px;
    display: block;
    margin: 0 auto;
    background: #0f172a;
    border-radius: 18px;
    touch-action: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}
.babies-dpad {
    display: grid;
    grid-template-columns: repeat(3, 64px);
    gap: 0.4rem;
    justify-content: center;
    margin-top: 0.75rem;
}
.babies-dpad button {
    min-height: 52px;
    border-radius: 14px;
    font-weight: 900;
    border: 0;
    background: #e2e8f0;
    transition: transform 0.12s ease, background 0.12s ease;
}
.babies-dpad button:hover {
    background: #cbd5e1;
    transform: translateY(-2px);
}
.babies-dpad button:active { transform: scale(0.96); }
.babies-mole-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    max-width: 360px;
    margin: 0 auto;
}
.babies-hole {
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, #78716c, #44403c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.babies-hole:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.45);
}
.babies-hole.ok {
    box-shadow: 0 0 0 4px #22c55e;
    animation: babies-pop 0.3s ease;
}
.babies-bubble-stage {
    position: relative;
    height: min(52vh, 420px);
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, #7dd3fc, #bae6fd 40%, #fef9c3);
}
.babies-bubble {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: inset -6px -8px 16px rgba(255, 255, 255, 0.35);
    animation: babies-float 2.2s ease-in-out infinite;
    transition: transform 0.12s ease, filter 0.12s ease;
}
.babies-bubble:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}
.babies-wheel {
    width: min(280px, 78vw);
    height: min(280px, 78vw);
    border-radius: 50%;
    margin: 0 auto;
    border: 10px solid #fbbf24;
    background: conic-gradient(#fb7185 0 60deg, #fbbf24 60deg 120deg, #34d399 120deg 180deg, #60a5fa 180deg 240deg, #a78bfa 240deg 300deg, #f472b6 300deg 360deg);
    transition: transform 3s cubic-bezier(.15, .85, .25, 1);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}
.babies-wheel-pointer {
    width: 0; height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 22px solid #ef4444;
    margin: 0 auto 0.35rem;
}
.babies-piano {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 0.5rem;
    background: #1e293b;
    border-radius: 16px;
}
.babies-key {
    width: clamp(28px, 8vw, 44px);
    height: clamp(96px, 28vw, 130px);
    border-radius: 0 0 10px 10px;
    background: #fff;
    border: 1px solid #94a3b8;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.1s ease, background 0.1s ease;
}
.babies-key:hover { background: #e0f2fe; transform: translateY(2px); }
.babies-key:active { background: #fef08a; }
.babies-celeb {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}
.babies-celeb i {
    position: absolute;
    top: -20px;
    font-style: normal;
    font-size: 1.4rem;
    animation: babies-fall 1.6s linear forwards;
}
.babies-input {
    border-radius: 16px !important;
    border: 3px solid #93c5fd !important;
    font-weight: 700;
    font-size: 1.15rem !important;
    min-height: 52px;
    text-align: center;
}
.babies-emoji-big {
    font-size: clamp(3rem, 16vw, 5rem);
    text-align: center;
    line-height: 1;
    margin-bottom: 0.5rem;
    animation: babies-bounce 1.4s ease-in-out infinite;
}
.babies-tracker-list .list-group-item {
    border-radius: 14px !important;
    margin-bottom: 0.45rem;
    border: 2px solid #e2e8f0 !important;
    font-weight: 700;
}
.babies-mood-log { display: flex; flex-direction: column; gap: 0.45rem; }
.babies-mood-row {
    display: flex; align-items: center; gap: 0.75rem;
    background: #fff; border: 2px solid #e2e8f0; border-radius: 14px; padding: 0.55rem 0.85rem; font-weight: 700;
}
.babies-water-tank {
    position: relative; width: min(160px, 42vw); height: 200px;
    border: 4px solid #38bdf8; border-radius: 16px 16px 28px 28px;
    background: #e0f2fe; overflow: hidden;
}
.babies-water-fill {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, #7dd3fc, #0284c7);
    transition: height 0.35s ease;
}
.babies-water-label {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-weight: 900; font-size: 1.4rem; color: #0c4a6e; z-index: 1;
}
.babies-cup {
    width: 48px; height: 48px; border: 0; border-radius: 12px; font-size: 1.4rem;
    background: #f1f5f9; box-shadow: 0 4px 0 rgba(0,0,0,.08);
}
.babies-cup.full { background: #bae6fd; }
.babies-att-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.6rem; }
.babies-att-day {
    border: 2px solid #cbd5e1; border-radius: 16px; padding: 0.75rem; background: #fff;
    font-weight: 800; display: flex; flex-direction: column; gap: 0.25rem; min-height: 72px;
}
.babies-att-day.ok { background: #dcfce7; border-color: #22c55e; }
.babies-att-day.bad { background: #fee2e2; border-color: #ef4444; }
.babies-att-day.leave { background: #e0f2fe; border-color: #38bdf8; }
.babies-habit-table { background: #fff; border-radius: 16px; overflow: hidden; font-weight: 700; }
.babies-habit-table th { font-size: 0.8rem; }
.babies-habit-cell {
    width: 36px; height: 36px; border-radius: 10px; border: 2px solid #cbd5e1;
    background: #f8fafc; font-size: 1rem; line-height: 1;
}
.babies-habit-cell.on { background: #fef08a; border-color: #eab308; }
.babies-cal-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem;
}
.babies-cal-cell {
    aspect-ratio: 1; border: 2px solid #e2e8f0; border-radius: 12px; background: #fff;
    font-weight: 800; font-size: 0.85rem; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.babies-cal-cell.empty { border: 0; background: transparent; }
.babies-cal-cell.has { background: #fef3c7; border-color: #f59e0b; }
.babies-progress {
    height: 14px; border-radius: 999px; background: #e2e8f0; overflow: hidden;
}
.babies-progress > div {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #22c55e);
    transition: width 0.25s ease;
}
.babies-goal-card, .babies-note-card, .babies-plan-slot {
    background: #fff; border: 2px solid #e2e8f0; border-radius: 16px; padding: 0.85rem;
}
.babies-sticky-board {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.85rem;
}
.babies-sticky {
    position: relative; border-radius: 4px; padding: 0.75rem; min-height: 140px;
    box-shadow: 0 8px 0 rgba(0,0,0,.08); transform: rotate(-1deg);
}
.babies-sticky textarea {
    width: 100%; height: 100%; min-height: 100px; border: 0; background: transparent;
    resize: none; font-weight: 700; outline: none;
}
.babies-sticky-x {
    position: absolute; top: 4px; right: 6px; border: 0; background: transparent;
    font-weight: 900; color: #64748b; cursor: pointer;
}
.babies-chess {
    display: grid; grid-template-columns: repeat(8, 1fr); max-width: 360px; margin: 0 auto;
    border: 3px solid #334155; border-radius: 8px; overflow: hidden;
}
.babies-chess-sq {
    aspect-ratio: 1; border: 0; background: #fef3c7; font-size: 0.65rem; color: #92400e;
}
.babies-chess-sq.dark { background: #92400e; color: #fef3c7; }
.babies-chess-sq.on { outline: 3px solid #38bdf8; outline-offset: -3px; }
.babies-ishihara {
    width: min(220px, 70vw); height: min(220px, 70vw); border-radius: 50%;
    display: grid; place-items: center; font-size: 4rem; font-weight: 900;
    box-shadow: 0 10px 0 rgba(0,0,0,.08);
}

body.dark-theme .babies-hero {
    background:
        radial-gradient(circle at 12% 20%, rgba(251, 191, 36, 0.2), transparent 42%),
        linear-gradient(145deg, #1e293b, #0f172a) !important;
}
body.dark-theme .babies-hero h1,
body.dark-theme .babies-prompt { color: #f8fafc; }
body.dark-theme .babies-app-card { background: #1e293b !important; }
body.dark-theme .babies-card { background: #334155; color: #e2e8f0; border-color: #475569; }
body.dark-theme .babies-choice { background: #334155 !important; color: #f1f5f9 !important; }
body.dark-theme .babies-tile-slot { background: #422006; border-color: #f59e0b; }
body.dark-theme .babies-tile-bank { background: #0c4a6e; border-color: #38bdf8; }
body.dark-theme .babies-trace-wrap { background: #1e293b; }

.babies-quiz-q {
    line-height: 1.35;
    color: #0f172a;
    padding: 0.35rem 0.25rem;
}

/* Named board games */
.bg-sudoku {
    display: grid;
    grid-template-columns: repeat(4, minmax(52px, 1fr));
    gap: 6px;
    max-width: 320px;
    margin: 0 auto 0.75rem;
}
.bg-cell {
    aspect-ratio: 1;
    border-radius: 12px;
    border: 3px solid #93c5fd;
    background: #fff;
    font-weight: 900;
    font-size: 1.35rem;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.bg-cell:hover:not(.fixed) { transform: scale(1.06); border-color: #2563eb; background: #eff6ff; }
.bg-cell.fixed { background: #e2e8f0; cursor: default; color: #334155; }
.bg-cell.selected { outline: 3px solid #f59e0b; background: #fef3c7; }
.bg-numpad, .bg-pad-btn { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; }
.bg-c4 {
    display: grid;
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    gap: 4px;
    max-width: 360px;
    margin: 0 auto;
    background: #1d4ed8;
    padding: 8px;
    border-radius: 16px;
}
.bg-c4-cell {
    aspect-ratio: 1;
    border-radius: 50%;
    border: 0;
    background: #1e3a8a;
    font-size: 1.25rem;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.bg-c4-cell:hover { transform: scale(1.08); filter: brightness(1.15); }
.bg-mine {
    display: grid;
    grid-template-columns: repeat(6, minmax(40px, 1fr));
    gap: 4px;
    max-width: 300px;
    margin: 0 auto;
}
.bg-mine-cell {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 2px solid #94a3b8;
    background: #cbd5e1;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
}
.bg-mine-cell:hover { transform: scale(1.05); background: #e2e8f0; }
.bg-mine-cell.open { background: #f8fafc; border-color: #cbd5e1; }
.bg-check {
    display: grid;
    grid-template-columns: repeat(6, minmax(40px, 1fr));
    gap: 3px;
    max-width: 320px;
    margin: 0 auto;
}
.bg-check-cell {
    aspect-ratio: 1;
    border: 0;
    background: #fef3c7;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.12s ease, outline 0.12s ease;
}
.bg-check-cell.dark { background: #78350f; }
.bg-check-cell:hover { transform: scale(1.05); }
.bg-check-cell.selected { outline: 3px solid #fbbf24; }
.bg-jigsaw, .bg-wordsearch {
    display: grid;
    grid-template-columns: repeat(3, minmax(64px, 1fr));
    gap: 0.5rem;
    max-width: 300px;
    margin: 0 auto;
}
.bg-wordsearch { grid-template-columns: repeat(6, minmax(36px, 1fr)); max-width: 340px; }
.bg-ws-cell {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 2px solid #93c5fd;
    background: #fff;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
}
.bg-ws-cell:hover { transform: scale(1.06); background: #e0f2fe; }
.bg-ws-cell.selected { background: #86efac; border-color: #16a34a; }

@media (max-width: 576px) {
    .babies-choice { font-size: 1rem; min-height: 54px; }
    .babies-tile { min-width: 46px; min-height: 46px; font-size: 1.15rem; }
    .babies-big-btn { width: 100%; }
    .babies-hud { justify-content: center; }
    .babies-card-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
    .babies-letter-grid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
    .babies-match-board { grid-template-columns: 1fr; }
    .babies-quiz-q { font-size: 1.15rem !important; }
    .bg-sudoku { max-width: 100%; }
    .bg-c4 { max-width: 100%; }
    .bg-mine { max-width: 100%; }
}
