/* ============================================================================
   FUN.CSS – Igriva preobleka za Matematiko 6. (Jaka) in 7. razred (Jon)
   + ZNANJEMETER (merilnik obvladane snovi) + VELIKI TEST z oceno
   Naloži se ZA style.css in prepiše videz, vse funkcije ostanejo enake.
   ============================================================================ */

:root {
    --font-heading: 'Fredoka', 'Lexend', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, sans-serif;
    --radius-md: 18px;
    --radius-lg: 26px;
    --fun-a: #6366f1;
    --fun-b: #a855f7;
    --fun-c: #ec4899;
    --fun-glow: rgba(99, 102, 241, 0.35);
    --zm-track: rgba(15, 23, 42, 0.08);
}

/* --- Jaka: vesoljska misija (vijolična / modra / roza) --- */
body.zm-jaka {
    --fun-a: #4f46e5;
    --fun-b: #9333ea;
    --fun-c: #ec4899;
    --fun-glow: rgba(147, 51, 234, 0.35);
    --primary: #4f46e5;
    --primary-light: #e0e7ff;
    --primary-border: #818cf8;
}

/* --- Jon: arena deljivosti (turkizna / modra / limeta) --- */
body.zm-jon {
    --fun-a: #0891b2;
    --fun-b: #2563eb;
    --fun-c: #84cc16;
    --fun-glow: rgba(8, 145, 178, 0.35);
    --primary: #0369a1;
    --primary-light: #e0f2fe;
    --primary-border: #38bdf8;
}

/* --- Oče Andrej: kraljevska arena matematike (zlata / vijolična / kraljevsko modra) --- */
body.zm-oce {
    --fun-a: #b45309;
    --fun-b: #6d28d9;
    --fun-c: #1d4ed8;
    --fun-glow: rgba(217, 119, 6, 0.4);
    --primary: #d97706;
    --primary-light: #fef3c7;
    --primary-border: #f59e0b;
}

:root {
    --card-bg: var(--bg-card, #ffffff);
}

html[data-theme="dark"] body.zm-jaka { --primary: #a5b4fc; --primary-light: rgba(99,102,241,.22); }
html[data-theme="dark"] body.zm-jon  { --primary: #67e8f9; --primary-light: rgba(8,145,178,.22); }
html[data-theme="dark"] body.zm-oce  { --primary: #fbbf24; --primary-light: rgba(245,158,11,.22); }
html[data-theme="dark"] { 
    --zm-track: rgba(255, 255, 255, 0.1); 
    --card-bg: var(--bg-card, #1e293b);
}

/* ==================== OZADJE ==================== */
body.zm-jaka {
    background:
        radial-gradient(circle at 8% 12%, rgba(236, 72, 153, 0.12) 0, transparent 28%),
        radial-gradient(circle at 92% 18%, rgba(99, 102, 241, 0.16) 0, transparent 32%),
        radial-gradient(circle at 70% 92%, rgba(168, 85, 247, 0.14) 0, transparent 30%),
        linear-gradient(180deg, #f5f3ff 0%, #eef2ff 45%, #fdf4ff 100%);
    background-attachment: fixed;
}
body.zm-jon {
    background:
        radial-gradient(circle at 10% 10%, rgba(132, 204, 22, 0.13) 0, transparent 28%),
        radial-gradient(circle at 90% 20%, rgba(8, 145, 178, 0.16) 0, transparent 32%),
        linear-gradient(rgba(14, 116, 144, 0.05) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(90deg, rgba(14, 116, 144, 0.05) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(180deg, #ecfeff 0%, #f0f9ff 50%, #f7fee7 100%);
    background-attachment: fixed;
}
body.zm-oce {
    background:
        radial-gradient(circle at 12% 12%, rgba(245, 158, 11, 0.16) 0, transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(124, 58, 237, 0.14) 0, transparent 32%),
        radial-gradient(circle at 60% 88%, rgba(37, 99, 235, 0.12) 0, transparent 30%),
        linear-gradient(rgba(217, 119, 6, 0.04) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(217, 119, 6, 0.04) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(180deg, #fffbeb 0%, #faf5ff 45%, #eff6ff 100%);
    background-attachment: fixed;
}
html[data-theme="dark"] body.zm-jaka {
    background:
        radial-gradient(1px 1px at 20% 30%, #fff 50%, transparent 51%) 0 0 / 180px 180px,
        radial-gradient(1.5px 1.5px at 70% 60%, #c4b5fd 50%, transparent 51%) 0 0 / 240px 240px,
        radial-gradient(1px 1px at 40% 80%, #f9a8d4 50%, transparent 51%) 0 0 / 300px 300px,
        radial-gradient(circle at 85% 10%, rgba(147, 51, 234, 0.35) 0, transparent 35%),
        radial-gradient(circle at 10% 90%, rgba(236, 72, 153, 0.22) 0, transparent 35%),
        linear-gradient(180deg, #0b0820 0%, #120a2e 50%, #0a0f24 100%);
    background-attachment: fixed;
}
html[data-theme="dark"] body.zm-jon {
    background:
        linear-gradient(rgba(103, 232, 249, 0.05) 1px, transparent 1px) 0 0 / 34px 34px,
        linear-gradient(90deg, rgba(103, 232, 249, 0.05) 1px, transparent 1px) 0 0 / 34px 34px,
        radial-gradient(circle at 85% 10%, rgba(8, 145, 178, 0.35) 0, transparent 35%),
        radial-gradient(circle at 10% 90%, rgba(132, 204, 22, 0.18) 0, transparent 35%),
        linear-gradient(180deg, #04121c 0%, #062033 60%, #071a12 100%);
    background-attachment: fixed;
}
html[data-theme="dark"] body.zm-oce {
    background:
        radial-gradient(1px 1px at 25% 25%, #fde68a 50%, transparent 51%) 0 0 / 200px 200px,
        radial-gradient(1.5px 1.5px at 75% 70%, #ddd6fe 50%, transparent 51%) 0 0 / 250px 250px,
        linear-gradient(rgba(245, 158, 11, 0.06) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(245, 158, 11, 0.06) 1px, transparent 1px) 0 0 / 32px 32px,
        radial-gradient(circle at 80% 12%, rgba(217, 119, 6, 0.32) 0, transparent 35%),
        radial-gradient(circle at 15% 85%, rgba(109, 40, 217, 0.28) 0, transparent 35%),
        linear-gradient(180deg, #181126 0%, #1c1538 55%, #0f172a 100%);
    background-attachment: fixed;
}
html[data-theme="dark"] body { --bg-card: rgba(22, 27, 52, 0.92); }
html[data-theme="dark"] body.zm-jon { --bg-card: rgba(10, 32, 46, 0.92); }
html[data-theme="dark"] body.zm-oce { --bg-card: rgba(28, 22, 48, 0.94); }

/* ==================== GLAVA ==================== */
body.zm-jaka .top-header,
body.zm-jon .top-header,
body.zm-oce .top-header {
    background: linear-gradient(120deg, var(--fun-a) 0%, var(--fun-b) 60%, var(--fun-c) 130%);
    border-bottom: none;
    box-shadow: 0 10px 30px var(--fun-glow);
    color: #fff;
    position: relative;
}
.top-header .brand-title { color: #fff; font-size: 1.35rem; letter-spacing: .2px; text-shadow: 0 2px 0 rgba(0,0,0,.12); }
.top-header .brand-icon {
    background: rgba(255,255,255,.22);
    border: 2px solid rgba(255,255,255,.45);
    border-radius: 18px;
    animation: zm-float 3.2s ease-in-out infinite;
}
.top-header .grade-badge,
.top-header .student-badge {
    background: rgba(255,255,255,.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
}
.top-header .hub-back-link,
.top-header .grade-switch-link {
    background: rgba(255,255,255,.16);
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
}
.top-header .hub-back-link:hover,
.top-header .grade-switch-link:hover { background: rgba(255,255,255,.3); }

/* --- Očetov preklopnik med 6. in 7. razredom --- */
.oce-grade-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    padding: 3px;
    gap: 4px;
}
.oce-grade-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
}
.oce-grade-pill:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.oce-grade-pill.active {
    background: #fff;
    color: #92400e;
    box-shadow: 0 3px 8px rgba(0,0,0,.25);
}
.top-header .oce-switch-link {
    background: rgba(245, 158, 11, 0.35);
    border-color: rgba(253, 224, 71, 0.6);
    font-weight: 800;
}
.top-header .oce-switch-link:hover {
    background: rgba(245, 158, 11, 0.55);
}
.top-header .stat-pill {
    background: rgba(255,255,255,.95);
    color: #1e1b4b;
    border: none;
    box-shadow: 0 4px 0 rgba(0,0,0,.12);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    border-radius: 999px;
}
.top-header .icon-action-btn {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.4);
    color: #fff;
    border-radius: 14px;
}
.top-header .mentor-header-btn {
    background: #fff;
    color: var(--fun-b);
    border: none;
    border-radius: 999px;
    box-shadow: 0 4px 0 rgba(0,0,0,.15);
    font-family: var(--font-heading);
}
.notation-strip {
    background: rgba(255,255,255,.12) !important;
    border-top: 1px solid rgba(255,255,255,.2) !important;
    border-bottom: none !important;
    color: #fff;
}
.notation-strip strong { color: #fff; }
.notation-strip code { background: rgba(0,0,0,.18); color: #fff; border-color: rgba(255,255,255,.25); }
.notation-sep { color: rgba(255,255,255,.6); }

/* ==================== MREŽA POGLAVIJ = "STOPNJE" V IGRI ==================== */
.module-nav-wrapper { background: transparent !important; border: none !important; }
.module-nav { gap: 10px !important; padding: 10px 14px 14px !important; }
.module-tab {
    position: relative;
    background: rgba(255,255,255,.95) !important;
    color: #1e1b4b !important;
    border: none !important;
    border-radius: 18px !important;
    box-shadow: 0 5px 0 rgba(0,0,0,.14), 0 8px 18px rgba(0,0,0,.08);
    font-family: var(--font-heading);
    font-weight: 600 !important;
    padding-bottom: 16px !important;
    transition: transform .15s ease, box-shadow .15s ease;
    overflow: hidden;
}
html[data-theme="dark"] .module-tab { background: rgba(30, 27, 75, .85) !important; color: #e0e7ff !important; }
html[data-theme="dark"] body.zm-jon .module-tab { background: rgba(8, 47, 73, .85) !important; color: #e0f2fe !important; }
.module-tab:hover { transform: translateY(-3px) rotate(-.5deg); }
.module-tab:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.14); }
.module-tab.active {
    background: linear-gradient(135deg, #fde047, #fb923c) !important;
    color: #422006 !important;
    box-shadow: 0 5px 0 #c2410c, 0 10px 24px rgba(251,146,60,.45);
    transform: translateY(-2px) scale(1.02);
}
.module-tab .tab-num {
    background: linear-gradient(135deg, var(--fun-a), var(--fun-b)) !important;
    color: #fff !important;
    border-radius: 12px !important;
    font-family: var(--font-heading);
    box-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.module-tab.active .tab-num { background: #fff !important; color: #c2410c !important; }
.module-tab-exam:not(.active) { background: linear-gradient(135deg, #fef9c3, #fde68a) !important; color: #713f12 !important; }

/* mini napredek v zavihku */
.zm-tab-bar {
    position: absolute;
    left: 10px; right: 10px; bottom: 6px;
    height: 6px;
    border-radius: 99px;
    background: var(--zm-track);
    overflow: hidden;
}
.zm-tab-bar > i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
    background-size: 300% 100%;
    transition: width .8s cubic-bezier(.2,.9,.3,1.2);
}
.zm-tab-crown {
    position: absolute; top: 2px; right: 6px; font-size: .85rem;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,.2));
    animation: zm-pop .5s ease;
}

/* ==================== ZNANJEMETER (glavni merilnik) ==================== */
.zm-bar {
    max-width: 1560px;
    margin: 14px auto 0;
    padding: 0 18px;
}
.zm-bar-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: 0 8px 0 rgba(0,0,0,.06), 0 14px 34px var(--fun-glow);
    border: 2px solid rgba(255,255,255,.6);
}
.zm-rank {
    display: flex; align-items: center; gap: 10px; min-width: 190px;
}
.zm-rank-icon {
    width: 54px; height: 54px; border-radius: 18px;
    display: grid; place-items: center; font-size: 1.9rem;
    background: linear-gradient(135deg, var(--fun-a), var(--fun-b));
    box-shadow: 0 4px 0 rgba(0,0,0,.18);
    animation: zm-float 3s ease-in-out infinite;
}
.zm-rank-label { font-size: .72rem; font-weight: 800; letter-spacing: .08em; color: var(--text-muted); text-transform: uppercase; }
.zm-rank-name { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; color: var(--text-main); }

.zm-meter-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.zm-meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.zm-meter-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--text-main); }
.zm-meter-title small { font-family: var(--font-body); font-weight: 700; color: var(--text-muted); font-size: .78rem; margin-left: 6px; }
.zm-meter-pct { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; color: var(--fun-b); }
.zm-meter {
    position: relative;
    height: 28px;
    border-radius: 999px;
    background: var(--zm-track);
    overflow: hidden;
    box-shadow: inset 0 3px 6px rgba(0,0,0,.12);
}
.zm-meter-fill {
    position: absolute; inset: 0 auto 0 0;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444 0%, #f97316 22%, #facc15 45%, #84cc16 70%, #22c55e 88%, #06b6d4 100%);
    background-size: 100vw 100%;
    transition: width 1.2s cubic-bezier(.2,.9,.3,1.15);
    box-shadow: 0 0 18px rgba(34,197,94,.35);
}
.zm-meter-fill::after {
    content: "";
    position: absolute; inset: 0;
    background: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 10px, transparent 10px 20px);
    animation: zm-stripes 1.2s linear infinite;
    border-radius: inherit;
}
.zm-meter-ticks { position: absolute; inset: 0; display: flex; pointer-events: none; }
.zm-meter-ticks span { flex: 1; border-right: 2px dashed rgba(255,255,255,.55); }
.zm-meter-ticks span:last-child { border-right: none; }
.zm-meter-steps {
    display: flex; justify-content: space-between;
    font-size: .7rem; font-weight: 800; color: var(--text-muted);
}
.zm-meter-steps span.reached { color: var(--fun-b); }

.zm-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.zm-btn {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: .98rem;
    border: none;
    cursor: pointer;
    padding: 11px 16px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--fun-a), var(--fun-b));
    box-shadow: 0 5px 0 rgba(0,0,0,.22);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s;
    white-space: nowrap;
}
.zm-btn:hover { filter: brightness(1.08); transform: translateY(-2px); }
.zm-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.22); }
.zm-btn-gold { background: linear-gradient(135deg, #facc15, #f97316); color: #431407; }
.zm-btn-ghost { background: var(--bg-subtle); color: var(--text-main); box-shadow: 0 5px 0 rgba(0,0,0,.1); border: 2px solid var(--border-soft); }
.zm-btn-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.zm-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

@media (max-width: 860px) {
    .zm-bar-inner { grid-template-columns: 1fr; }
    .zm-actions { justify-content: stretch; }
    .zm-actions .zm-btn { flex: 1; }
}

/* ==================== KARTICE, GUMBI, VNOSI ==================== */
.card, .subcard {
    border-radius: 24px !important;
    border: 2px solid rgba(255,255,255,.7) !important;
    box-shadow: 0 6px 0 rgba(0,0,0,.05), 0 14px 30px rgba(30, 27, 75, .08) !important;
    position: relative;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
html[data-theme="dark"] .card, html[data-theme="dark"] .subcard { border-color: rgba(255,255,255,.08) !important; }
.card::before {
    content: "";
    position: absolute; left: 0; right: 0; top: 0; height: 6px;
    background: linear-gradient(90deg, var(--fun-a), var(--fun-b), var(--fun-c));
}
.module-section .card:nth-of-type(3n+2)::before { background: linear-gradient(90deg, #f59e0b, #ef4444, #ec4899); }
.module-section .card:nth-of-type(3n)::before   { background: linear-gradient(90deg, #22c55e, #06b6d4, #3b82f6); }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(0,0,0,.05), 0 20px 40px rgba(30, 27, 75, .12) !important; }

.section-hero, .section-banner {
    border-radius: 28px !important;
    background: linear-gradient(120deg, var(--fun-a), var(--fun-b) 65%, var(--fun-c)) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 8px 0 rgba(0,0,0,.08), 0 18px 40px var(--fun-glow) !important;
    position: relative;
    overflow: hidden;
}
.section-hero h2, .section-banner h2 { color: #fff !important; font-size: 1.6rem; }
.section-hero p, .section-banner p { color: rgba(255,255,255,.93) !important; }
.section-hero strong, .section-banner strong { color: #fff !important; }
.section-hero code, .section-banner code { background: rgba(0,0,0,.2); color: #fff; border-color: rgba(255,255,255,.25); }
.section-hero::after, .section-banner::after {
    content: "";
    position: absolute; right: -40px; top: -40px;
    width: 180px; height: 180px; border-radius: 50%;
    background: rgba(255,255,255,.12);
    box-shadow: -120px 140px 0 -30px rgba(255,255,255,.08);
    pointer-events: none;
}
.module-badge, .chapter-tag {
    background: rgba(255,255,255,.22) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.35) !important;
    border-radius: 999px !important;
}

.btn {
    border-radius: 16px !important;
    font-family: var(--font-heading);
    font-weight: 600 !important;
    box-shadow: 0 4px 0 rgba(0,0,0,.18);
    transition: transform .1s ease, box-shadow .1s ease, filter .1s ease !important;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.18); }
.btn-primary { background: linear-gradient(135deg, var(--fun-a), var(--fun-b)) !important; border: none !important; color: #fff !important; }

.pill-btn, .tf-btn, .digit-chip-btn, .word-chip-btn, .check-cell-btn, .chip-prompt {
    border-radius: 999px !important;
    box-shadow: 0 3px 0 rgba(0,0,0,.12);
    transition: transform .1s ease;
}
.pill-btn:active, .tf-btn:active, .digit-chip-btn:active, .word-chip-btn:active { transform: translateY(2px); }

.form-input, .input-num, .math-input-sm, .math-input-wide, .num-input-lg, .select-input {
    border-radius: 14px !important;
    border-width: 2px !important;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.form-input:focus, .input-num:focus, .math-input-sm:focus, .math-input-wide:focus, .num-input-lg:focus {
    outline: none;
    border-color: var(--fun-b) !important;
    box-shadow: 0 0 0 4px var(--fun-glow) !important;
}

.feedback-banner, .feedback-slot { border-radius: 16px !important; }
.feedback-ok { animation: zm-pop .45s cubic-bezier(.2,.9,.3,1.4); }
.feedback-err { animation: zm-shake .45s ease; }

.chapter-stepper-bar {
    border-radius: 22px !important;
    background: var(--bg-card) !important;
    border: 2px solid rgba(255,255,255,.6) !important;
    box-shadow: 0 6px 0 rgba(0,0,0,.05), 0 12px 26px rgba(0,0,0,.06) !important;
}
.stepper-btn {
    border-radius: 14px !important;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, var(--fun-a), var(--fun-b)) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 0 rgba(0,0,0,.2);
}
.stepper-btn:disabled { opacity: .4; }

.mentor-sidebar { border-radius: 24px 0 0 24px; }
.mentor-avatar-circle { background: linear-gradient(135deg, var(--fun-a), var(--fun-b)) !important; color: #fff; }

/* ==================== MASKOTA ==================== */
.zm-mascot {
    position: fixed;
    left: 18px; bottom: 18px;
    z-index: 900;
    display: flex; align-items: flex-end; gap: 8px;
    pointer-events: none;
}
.zm-mascot-face {
    pointer-events: auto;
    cursor: pointer;
    width: 64px; height: 64px;
    border-radius: 22px;
    display: grid; place-items: center;
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--fun-a), var(--fun-b));
    box-shadow: 0 6px 0 rgba(0,0,0,.2), 0 12px 26px var(--fun-glow);
    animation: zm-float 2.8s ease-in-out infinite;
    border: 3px solid #fff;
}
.zm-mascot-face.jump { animation: zm-jump .6s ease; }
.zm-mascot-bubble {
    max-width: 260px;
    background: #fff;
    color: #1e1b4b;
    font-weight: 800;
    font-size: .92rem;
    padding: 10px 14px;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
    opacity: 0;
    transform: translateY(10px) scale(.9);
    transition: opacity .25s ease, transform .25s ease;
}
.zm-mascot-bubble.show { opacity: 1; transform: none; }
@media (max-width: 700px) { .zm-mascot { left: 10px; bottom: 10px; } .zm-mascot-face { width: 52px; height: 52px; font-size: 1.7rem; } }

/* ==================== TOAST (napredovanje) ==================== */
.zm-toast {
    position: fixed; left: 50%; top: 18px;
    transform: translate(-50%, -140%);
    z-index: 10001;
    background: linear-gradient(135deg, #facc15, #f97316);
    color: #431407;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 14px 22px;
    border-radius: 20px;
    box-shadow: 0 8px 0 #c2410c, 0 18px 40px rgba(0,0,0,.25);
    transition: transform .45s cubic-bezier(.2,.9,.3,1.3);
    text-align: center;
    max-width: 92vw;
}
.zm-toast.show { transform: translate(-50%, 0); }
.zm-float-plus {
    position: fixed; z-index: 10000; pointer-events: none;
    font-family: var(--font-heading); font-weight: 700; font-size: 1.3rem;
    color: #16a34a; text-shadow: 0 2px 0 #fff;
    animation: zm-rise 1.2s ease forwards;
}

/* ==================== MODALNA OKNA (Znanjemeter podrobno, Test) ==================== */
.zm-overlay {
    position: fixed; inset: 0; z-index: 9500;
    background: rgba(15, 10, 40, .72);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center; justify-content: center;
    padding: 16px;
}
.zm-overlay.open { display: flex; animation: zm-fade .25s ease; }
.zm-window {
    width: min(980px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0,0,0,.4);
    animation: zm-pop .35s cubic-bezier(.2,.9,.3,1.3);
}
html[data-theme="dark"] .zm-window { background: #161433; }
html[data-theme="dark"] body.zm-jon .zm-window { background: #0b2231; }
.zm-window-head {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 16px 22px;
    background: linear-gradient(120deg, var(--fun-a), var(--fun-b) 70%, var(--fun-c));
    color: #fff;
    border-radius: 30px 30px 0 0;
}
.zm-window-head h2 { font-size: 1.35rem; color: #fff; }
.zm-close {
    background: rgba(255,255,255,.2); color: #fff; border: 2px solid rgba(255,255,255,.4);
    width: 42px; height: 42px; border-radius: 14px; font-size: 1.2rem; cursor: pointer;
}
.zm-window-body { padding: 22px; }

.zm-mod-list { display: grid; gap: 12px; }
.zm-mod-row {
    display: grid; grid-template-columns: 1fr 120px; gap: 6px 14px; align-items: center;
    padding: 12px 14px; border-radius: 18px; background: var(--bg-subtle);
    border: 2px solid var(--border-soft);
}
.zm-mod-row .zm-mod-name { font-family: var(--font-heading); font-weight: 600; }
.zm-mod-row .zm-mod-pct { font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; text-align: right; color: var(--fun-b); }
.zm-mod-row .zm-mod-sub { grid-column: 1 / -1; font-size: .8rem; color: var(--text-muted); font-weight: 700; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.zm-mod-row .zm-mini { grid-column: 1 / -1; height: 14px; border-radius: 99px; background: var(--zm-track); overflow: hidden; display: flex; }
.zm-mini .p { background: linear-gradient(90deg, #60a5fa, #6366f1); height: 100%; transition: width .8s ease; }
.zm-mini .q { background: linear-gradient(90deg, #facc15, #22c55e); height: 100%; transition: width .8s ease; }
.zm-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; font-weight: 700; color: var(--text-muted); margin: 6px 0 16px; }
.zm-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; }
.zm-info-box {
    background: linear-gradient(135deg, rgba(250,204,21,.18), rgba(249,115,22,.12));
    border: 2px dashed #f59e0b; border-radius: 18px; padding: 12px 16px; font-weight: 700; margin-bottom: 16px;
}

/* --- TEST --- */
.zm-test-intro { text-align: center; padding: 10px 6px 4px; }
.zm-test-intro .big-emoji { font-size: 4.5rem; animation: zm-float 3s ease-in-out infinite; display: inline-block; }
.zm-test-intro h3 { font-size: 1.7rem; margin: 6px 0 8px; }
.zm-test-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 18px 0; text-align: left; }
.zm-rule {
    background: var(--bg-subtle); border: 2px solid var(--border-soft); border-radius: 18px; padding: 12px 14px; font-weight: 700;
}
.zm-rule b { display: block; font-family: var(--font-heading); font-size: 1.4rem; color: var(--fun-b); }
.zm-grade-scale { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 6px 0 18px; }
.zm-grade-scale span { padding: 6px 10px; border-radius: 12px; font-weight: 800; font-size: .82rem; background: var(--bg-subtle); border: 2px solid var(--border-soft); }

.zm-test-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.zm-timer { font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; padding: 6px 12px; border-radius: 12px; background: var(--bg-subtle); border: 2px solid var(--border-soft); }
.zm-timer.low { color: #dc2626; border-color: #fca5a5; animation: zm-pulse 1s infinite; }
.zm-dots { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.zm-dot {
    width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--border-color);
    background: var(--bg-subtle); font-weight: 800; font-size: .8rem; cursor: pointer; color: var(--text-main);
}
.zm-dot.answered { background: linear-gradient(135deg, var(--fun-a), var(--fun-b)); color: #fff; border-color: transparent; }
.zm-dot.current { outline: 3px solid #facc15; outline-offset: 2px; }
.zm-q-card {
    border-radius: 24px; padding: 22px; background: var(--bg-subtle); border: 2px solid var(--border-soft);
    animation: zm-slide .3s ease;
}
.zm-q-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.zm-q-chip { font-size: .75rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--primary-light); color: var(--primary); }
.zm-q-chip.pts { background: #fef3c7; color: #92400e; }
.zm-q-text { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 600; line-height: 1.4; margin-bottom: 14px; }
.zm-q-text code { font-size: 1em; }
.zm-q-hint { font-size: .85rem; color: var(--text-muted); font-weight: 700; margin-top: 8px; }
.zm-q-input {
    width: 100%; font-family: var(--font-mono); font-size: 1.35rem; font-weight: 700;
    padding: 14px 16px; border-radius: 16px; border: 3px solid var(--border-color);
    background: var(--bg-input); color: var(--text-main);
}
.zm-q-input:focus { outline: none; border-color: var(--fun-b); box-shadow: 0 0 0 5px var(--fun-glow); }
.zm-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.zm-opt {
    text-align: left; padding: 14px 16px; border-radius: 18px; cursor: pointer;
    border: 3px solid var(--border-color); background: var(--bg-input); color: var(--text-main);
    font-weight: 800; font-size: 1.05rem; font-family: var(--font-body);
    box-shadow: 0 4px 0 rgba(0,0,0,.08); transition: transform .1s ease;
}
.zm-opt:hover { transform: translateY(-2px); border-color: var(--fun-a); }
.zm-opt.sel { border-color: var(--fun-b); background: var(--primary-light); box-shadow: 0 4px 0 var(--fun-b); }
.zm-test-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.zm-result-hero { text-align: center; padding: 6px 0 14px; }
.zm-grade-big {
    width: 150px; height: 150px; margin: 0 auto 10px; border-radius: 40px;
    display: grid; place-items: center;
    font-family: var(--font-heading); font-size: 5.5rem; font-weight: 700; color: #fff;
    box-shadow: 0 10px 0 rgba(0,0,0,.2), 0 20px 50px rgba(0,0,0,.25);
    animation: zm-grade-in .9s cubic-bezier(.2,.9,.3,1.4);
}
.zm-g5 { background: linear-gradient(135deg, #22c55e, #059669); }
.zm-g4 { background: linear-gradient(135deg, #84cc16, #16a34a); }
.zm-g3 { background: linear-gradient(135deg, #facc15, #f59e0b); }
.zm-g2 { background: linear-gradient(135deg, #fb923c, #ea580c); }
.zm-g1 { background: linear-gradient(135deg, #f87171, #dc2626); }
.zm-result-title { font-family: var(--font-heading); font-size: 1.7rem; font-weight: 700; }
.zm-result-sub { color: var(--text-muted); font-weight: 800; margin-top: 4px; }
.zm-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 16px 0; }
.zm-res-mod { padding: 12px 14px; border-radius: 16px; background: var(--bg-subtle); border: 2px solid var(--border-soft); font-weight: 700; }
.zm-res-mod .bar { height: 10px; border-radius: 99px; background: var(--zm-track); overflow: hidden; margin-top: 6px; }
.zm-res-mod .bar i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #22c55e); }
.zm-review { display: grid; gap: 10px; margin-top: 10px; }
.zm-review-item { padding: 12px 14px; border-radius: 16px; border: 2px solid; font-weight: 600; }
.zm-review-item.ok { border-color: #86efac; background: rgba(34,197,94,.08); }
.zm-review-item.bad { border-color: #fca5a5; background: rgba(239,68,68,.08); }
.zm-review-item .ans { font-family: var(--font-mono); font-size: .92rem; margin-top: 4px; }
.zm-history { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.zm-history span { padding: 5px 10px; border-radius: 10px; font-weight: 800; font-size: .8rem; background: var(--bg-subtle); border: 2px solid var(--border-soft); }

.zm-chapter-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.zm-chapter-pick button {
    text-align: left; padding: 12px 14px; border-radius: 16px; cursor: pointer;
    background: var(--bg-subtle); border: 2px solid var(--border-soft); color: var(--text-main);
    font-family: var(--font-heading); font-weight: 600; font-size: .98rem;
    box-shadow: 0 4px 0 rgba(0,0,0,.06);
}
.zm-chapter-pick button:hover { border-color: var(--fun-b); transform: translateY(-2px); }
.zm-chapter-pick small { display: block; font-family: var(--font-body); color: var(--text-muted); font-weight: 800; margin-top: 2px; }

/* ==================== ANIMACIJE ==================== */
@keyframes zm-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes zm-pop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes zm-shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes zm-stripes { from { background-position: 0 0; } to { background-position: 28px 0; } }
@keyframes zm-jump { 0%,100% { transform: translateY(0) scale(1); } 35% { transform: translateY(-22px) scale(1.12) rotate(-8deg); } 70% { transform: translateY(0) scale(.95); } }
@keyframes zm-rise { 0% { opacity: 0; transform: translateY(0) scale(.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-70px) scale(1.2); } }
@keyframes zm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes zm-slide { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes zm-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes zm-grade-in { 0% { transform: scale(0) rotate(-200deg); } 100% { transform: scale(1) rotate(0); } }

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

/* ============================================================================
   TEMEN NAČIN (DARK MODE) – POPOLNA VIDLJIVOST VSEH NALOG IN BESEDIL
   Odpravlja nevidno ali slabo vidno besedilo v temnem načinu (6. in 7. razred):
   - .task-prompt-box (okvir z nalogo z jasnim kontrastom)
   - .card-desc, .ex-desc (opisi vaj)
   - vnosna polja (.input-num, .form-input, .math-input-sm, .math-input-wide, .num-input-lg, select)
   - koda (<code>), poudarki (<strong>, <b>), formule
   - vrstice nalog (.q-item-row, .q-item-row.correct, .q-item-row.wrong)
   - čipi in gumbi (.word-chip-btn, .digit-chip-btn, .pill-btn, .tf-btn, .btn-outline)
   - tabele (.carroll-table, .div-check-table, .sieve-cell, .pv-table)
   - diagrami (.venn-circle, .factor-tree-box, .tree-node)
   - pisno računanje (.written-calc-pre, .notebook-grid-box)
   - Znanjemeter test in pregled odgovorov (.zm-q-card, .zm-q-text, .zm-opt, .zm-review-item)
   ============================================================================ */

html[data-theme="dark"] {
    color-scheme: dark;
}

/* --- Task Prompt Box (okvir z vprašanjem in besedilom naloge) --- */
.task-prompt-box {
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 16px;
    padding: 14px 18px;
    margin: 10px 0 14px;
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.55;
    color: #0f172a !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-prompt-box * {
    color: inherit;
}

.task-prompt-box strong,
.task-prompt-box b {
    color: #0f172a !important;
    font-weight: 800;
}

.task-prompt-box strong[style*="color:var(--primary)"],
.task-prompt-box span[style*="color:var(--primary)"] {
    color: var(--primary, #1d4ed8) !important;
}

.task-prompt-box code {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 800;
}

html[data-theme="dark"] .task-prompt-box {
    background: rgba(15, 23, 42, 0.9) !important;
    border-color: rgba(165, 180, 252, 0.35) !important;
    color: #f8fafc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 16px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] body.zm-jon .task-prompt-box {
    background: rgba(6, 32, 51, 0.9) !important;
    border-color: rgba(103, 232, 249, 0.35) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] body.zm-oce .task-prompt-box {
    background: rgba(28, 18, 44, 0.92) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .task-prompt-box strong,
html[data-theme="dark"] .task-prompt-box b {
    color: #ffffff !important;
    font-weight: 800;
}

html[data-theme="dark"] body.zm-jaka .task-prompt-box strong[style*="color:var(--primary)"],
html[data-theme="dark"] body.zm-jaka .task-prompt-box span[style*="color:var(--primary)"] {
    color: #c4b5fd !important;
}

html[data-theme="dark"] body.zm-jon .task-prompt-box strong[style*="color:var(--primary)"],
html[data-theme="dark"] body.zm-jon .task-prompt-box span[style*="color:var(--primary)"] {
    color: #67e8f9 !important;
}

html[data-theme="dark"] body.zm-oce .task-prompt-box strong[style*="color:var(--primary)"],
html[data-theme="dark"] body.zm-oce .task-prompt-box span[style*="color:var(--primary)"] {
    color: #fde047 !important;
}

html[data-theme="dark"] .task-prompt-box code {
    background: rgba(0, 0, 0, 0.6) !important;
    color: #67e8f9 !important;
    border: 1.5px solid rgba(103, 232, 249, 0.4) !important;
    font-weight: 800;
}

/* --- Opisi pod naslovi vaj --- */
.card-desc, .ex-desc {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

html[data-theme="dark"] .card-desc,
html[data-theme="dark"] .ex-desc {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .card-desc strong,
html[data-theme="dark"] .card-desc b,
html[data-theme="dark"] .ex-desc strong,
html[data-theme="dark"] .ex-desc b {
    color: #ffffff !important;
}

/* --- CODE elementi v vseh načinih --- */
code {
    font-weight: 700;
}

html[data-theme="dark"] code {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #67e8f9 !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    font-weight: 700;
}

html[data-theme="dark"] body.zm-jaka code {
    color: #fbcfe8 !important;
}

html[data-theme="dark"] body.zm-oce code {
    color: #fde047 !important;
}

/* --- Vse vrstice nalog (.q-item-row) --- */
.q-item-row {
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 12px;
    color: #0f172a !important;
}

.q-item-row * {
    color: inherit;
}

.q-item-row strong,
.q-item-row b {
    color: #0f172a !important;
    font-weight: 800;
}

.q-item-row code {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
    font-weight: 800;
}

html[data-theme="dark"] .q-item-row {
    background: rgba(15, 23, 42, 0.85) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] body.zm-jon .q-item-row {
    background: rgba(6, 32, 51, 0.85) !important;
    border-color: rgba(56, 189, 248, 0.28) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] body.zm-oce .q-item-row {
    background: rgba(26, 18, 42, 0.88) !important;
    border-color: rgba(245, 158, 11, 0.28) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .q-item-row * {
    color: inherit;
}

html[data-theme="dark"] .q-item-row strong,
html[data-theme="dark"] .q-item-row b {
    color: #ffffff !important;
}

html[data-theme="dark"] .q-item-row code {
    background: rgba(0, 0, 0, 0.55) !important;
    color: #67e8f9 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    font-weight: 800;
}

html[data-theme="dark"] .q-item-row.correct {
    background: rgba(34, 197, 94, 0.22) !important;
    border-color: #22c55e !important;
    color: #dcfce7 !important;
}

html[data-theme="dark"] .q-item-row.wrong {
    background: rgba(239, 68, 68, 0.22) !important;
    border-color: #ef4444 !important;
    color: #fee2e2 !important;
}

/* --- Vnosna polja (input, select, textarea) – Visoki kontrast za oba načina --- */
input, select, textarea,
.form-input,
.input-num,
.math-input-sm,
.math-input-wide,
.num-input-lg,
.select-input,
.mentor-chat-input,
.zm-rescue-input,
.zm-scaffold-input {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #94a3b8 !important;
    font-weight: 700 !important;
    caret-color: #0f172a !important;
}

input::placeholder,
textarea::placeholder,
.form-input::placeholder,
.zm-rescue-input::placeholder {
    color: #64748b !important;
    opacity: 0.95 !important;
}

input:focus, select:focus, textarea:focus,
.form-input:focus,
.input-num:focus,
.math-input-sm:focus,
.math-input-wide:focus,
.num-input-lg:focus,
.select-input:focus,
.mentor-chat-input:focus,
.zm-rescue-input:focus,
.zm-scaffold-input:focus {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: var(--primary, #2563eb) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25) !important;
}

input:disabled,
select:disabled,
textarea:disabled,
.form-input:disabled,
.input-num:disabled,
.math-input-sm:disabled,
.math-input-wide:disabled,
.num-input-lg:disabled,
.zm-rescue-input:disabled,
.zm-scaffold-input:disabled {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed !important;
}

/* Temni način za vnosna polja */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .form-input,
html[data-theme="dark"] .input-num,
html[data-theme="dark"] .math-input-sm,
html[data-theme="dark"] .math-input-wide,
html[data-theme="dark"] .num-input-lg,
html[data-theme="dark"] .select-input,
html[data-theme="dark"] .mentor-chat-input,
html[data-theme="dark"] .zm-rescue-input,
html[data-theme="dark"] .zm-scaffold-input {
    background-color: #0b1329 !important;
    color: #ffffff !important;
    border-color: #475569 !important;
    font-weight: 700 !important;
    caret-color: #38bdf8 !important;
}

html[data-theme="dark"] body.zm-jon input,
html[data-theme="dark"] body.zm-jon select,
html[data-theme="dark"] body.zm-jon textarea,
html[data-theme="dark"] body.zm-jon .form-input,
html[data-theme="dark"] body.zm-jon .input-num,
html[data-theme="dark"] body.zm-jon .math-input-sm,
html[data-theme="dark"] body.zm-jon .math-input-wide,
html[data-theme="dark"] body.zm-jon .num-input-lg,
html[data-theme="dark"] body.zm-jon .select-input,
html[data-theme="dark"] body.zm-jon .mentor-chat-input,
html[data-theme="dark"] body.zm-jon .zm-rescue-input,
html[data-theme="dark"] body.zm-jon .zm-scaffold-input {
    background-color: #041926 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    caret-color: #38bdf8 !important;
}

html[data-theme="dark"] body.zm-jaka input,
html[data-theme="dark"] body.zm-jaka select,
html[data-theme="dark"] body.zm-jaka textarea,
html[data-theme="dark"] body.zm-jaka .form-input,
html[data-theme="dark"] body.zm-jaka .input-num,
html[data-theme="dark"] body.zm-jaka .math-input-sm,
html[data-theme="dark"] body.zm-jaka .math-input-wide,
html[data-theme="dark"] body.zm-jaka .num-input-lg,
html[data-theme="dark"] body.zm-jaka .select-input,
html[data-theme="dark"] body.zm-jaka .mentor-chat-input,
html[data-theme="dark"] body.zm-jaka .zm-rescue-input,
html[data-theme="dark"] body.zm-jaka .zm-scaffold-input {
    background-color: #0e0d26 !important;
    color: #ffffff !important;
    border-color: #6366f1 !important;
    caret-color: #a5b4fc !important;
}

html[data-theme="dark"] body.zm-oce input,
html[data-theme="dark"] body.zm-oce select,
html[data-theme="dark"] body.zm-oce textarea,
html[data-theme="dark"] body.zm-oce .form-input,
html[data-theme="dark"] body.zm-oce .input-num,
html[data-theme="dark"] body.zm-oce .math-input-sm,
html[data-theme="dark"] body.zm-oce .math-input-wide,
html[data-theme="dark"] body.zm-oce .num-input-lg,
html[data-theme="dark"] body.zm-oce .select-input,
html[data-theme="dark"] body.zm-oce .mentor-chat-input,
html[data-theme="dark"] body.zm-oce .zm-rescue-input,
html[data-theme="dark"] body.zm-oce .zm-scaffold-input {
    background-color: #1a1228 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    caret-color: #fbbf24 !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] .form-input::placeholder,
html[data-theme="dark"] .zm-rescue-input::placeholder {
    color: #94a3b8 !important;
    opacity: 0.95 !important;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] .form-input:focus,
html[data-theme="dark"] .input-num:focus,
html[data-theme="dark"] .math-input-sm:focus,
html[data-theme="dark"] .math-input-wide:focus,
html[data-theme="dark"] .num-input-lg:focus,
html[data-theme="dark"] .select-input:focus,
html[data-theme="dark"] .mentor-chat-input:focus,
html[data-theme="dark"] .zm-rescue-input:focus,
html[data-theme="dark"] .zm-scaffold-input:focus {
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px var(--fun-glow) !important;
}

html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled,
html[data-theme="dark"] .form-input:disabled,
html[data-theme="dark"] .input-num:disabled,
html[data-theme="dark"] .math-input-sm:disabled,
html[data-theme="dark"] .math-input-wide:disabled,
html[data-theme="dark"] .num-input-lg:disabled,
html[data-theme="dark"] .zm-rescue-input:disabled,
html[data-theme="dark"] .zm-scaffold-input:disabled {
    background-color: rgba(30, 41, 59, 0.6) !important;
    color: #94a3b8 !important;
    border-color: rgba(148, 163, 184, 0.3) !important;
    cursor: not-allowed !important;
}

/* --- Čipi, gumbi in interaktivni elementi --- */
html[data-theme="dark"] .word-chips-pool {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

html[data-theme="dark"] .word-chip-btn {
    background: rgba(30, 41, 59, 0.9) !important;
    color: #f8fafc !important;
    border-color: rgba(165, 180, 252, 0.35) !important;
}

html[data-theme="dark"] .digit-chip-btn {
    background: rgba(30, 41, 59, 0.9) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

html[data-theme="dark"] .pill-btn {
    background: rgba(30, 41, 59, 0.85) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

html[data-theme="dark"] .pill-btn.active {
    background: var(--fun-a) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

html[data-theme="dark"] .tf-btn {
    background: rgba(30, 41, 59, 0.85) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

html[data-theme="dark"] .btn-outline {
    background: rgba(30, 41, 59, 0.75) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] .btn-outline:hover {
    background: var(--fun-a) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

html[data-theme="dark"] .check-cell-btn {
    background: rgba(30, 41, 59, 0.9) !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

/* --- Tabele v temnem načinu --- */
html[data-theme="dark"] .carroll-table th,
html[data-theme="dark"] .div-check-table th {
    background: rgba(30, 41, 59, 0.95) !important;
    color: #93c5fd !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .carroll-table td,
html[data-theme="dark"] .div-check-table td {
    background: rgba(15, 23, 42, 0.65) !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .sieve-cell {
    background: rgba(15, 23, 42, 0.85) !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .sieve-cell.crossed-one {
    background: rgba(234, 88, 12, 0.28) !important;
    color: #fb923c !important;
}

html[data-theme="dark"] .sieve-cell.crossed-composite {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #fca5a5 !important;
}

/* --- Pisno računanje (mreža zvezka) --- */
html[data-theme="dark"] .notebook-grid-box {
    background-color: #0b1120 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .written-calc-pre {
    color: #f8fafc !important;
}

/* --- Callout opozorila in info škatle --- */
.callout {
    padding: 12px 16px;
    border-radius: 14px;
    margin: 10px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}
.callout-info {
    background: var(--primary-light);
    border: 1.5px solid var(--primary-border);
    color: var(--text-main);
}
.callout-warning {
    background: var(--orange-light);
    border: 1.5px solid var(--orange-border);
    color: var(--text-main);
}
html[data-theme="dark"] .callout-info {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: #60a5fa !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .callout-warning {
    background: rgba(234, 88, 12, 0.2) !important;
    border-color: #fb923c !important;
    color: #ffedd5 !important;
}
html[data-theme="dark"] .callout strong,
html[data-theme="dark"] .callout b {
    color: #ffffff !important;
}

/* --- Feedback obvestila ob rešitvi --- */
.feedback-banner {
    padding: 12px 16px;
    border-radius: 16px;
    margin-top: 10px;
    font-size: 0.95rem;
    font-weight: 700;
}
.feedback-banner.feedback-ok {
    background: var(--green-light);
    border: 2px solid var(--green);
    color: var(--green);
}
.feedback-banner.feedback-err {
    background: var(--red-light);
    border: 2px solid var(--red);
    color: var(--red);
}
html[data-theme="dark"] .feedback-banner.feedback-ok {
    background: rgba(34, 197, 94, 0.22) !important;
    border-color: #22c55e !important;
    color: #4ade80 !important;
}
html[data-theme="dark"] .feedback-banner.feedback-ok * {
    color: inherit;
}
html[data-theme="dark"] .feedback-banner.feedback-ok code {
    background: rgba(0, 0, 0, 0.35) !important;
    color: #bbf7d0 !important;
    border-color: rgba(34, 197, 94, 0.4) !important;
}
html[data-theme="dark"] .feedback-banner.feedback-err {
    background: rgba(239, 68, 68, 0.22) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
}
html[data-theme="dark"] .feedback-banner.feedback-err * {
    color: inherit;
}
html[data-theme="dark"] .feedback-banner.feedback-err code {
    background: rgba(0, 0, 0, 0.35) !important;
    color: #fecaca !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

/* --- Oznake in značke (ortho-badge, branch-badge) --- */
html[data-theme="dark"] .ortho-badge,
html[data-theme="dark"] .branch-badge {
    background: rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
}

html[data-theme="dark"] .ortho-card.together {
    background: rgba(34, 197, 94, 0.18) !important;
    border-color: rgba(74, 222, 128, 0.35) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .ortho-card.apart {
    background: rgba(59, 130, 246, 0.18) !important;
    border-color: rgba(96, 165, 250, 0.35) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .ortho-card * {
    color: inherit;
}
html[data-theme="dark"] .ortho-card h4 {
    color: #ffffff !important;
}

/* --- Trojice števk --- */
html[data-theme="dark"] .triplet-card {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}
html[data-theme="dark"] .triplet-digits {
    background: rgba(30, 41, 59, 0.85) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}
html[data-theme="dark"] .triplet-word {
    color: #cbd5e1 !important;
}

/* --- Eq master banner (Zlati ključ) --- */
html[data-theme="dark"] .eq-box-blue {
    background: rgba(37, 99, 235, 0.24) !important;
    border-color: #3b82f6 !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .eq-box-orange {
    background: rgba(234, 88, 12, 0.24) !important;
    border-color: #f97316 !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .eq-box-green {
    background: rgba(22, 163, 74, 0.24) !important;
    border-color: #22c55e !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .eq-box * {
    color: inherit;
}
html[data-theme="dark"] .eq-big,
html[data-theme="dark"] .eq-sign {
    color: #ffffff !important;
}

/* --- Vennov diagram --- */
html[data-theme="dark"] .venn-left {
    background: rgba(37, 99, 235, 0.22) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .venn-center {
    background: rgba(34, 197, 94, 0.24) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .venn-right {
    background: rgba(234, 88, 12, 0.22) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .venn-circle * {
    color: inherit;
}

/* --- Drevo prafaktorjev --- */
html[data-theme="dark"] .factor-tree-box {
    background: rgba(15, 23, 42, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}
html[data-theme="dark"] .tree-node {
    background: rgba(59, 130, 246, 0.28) !important;
    border-color: #3b82f6 !important;
    color: #93c5fd !important;
}
html[data-theme="dark"] .tree-node.prime-leaf {
    background: #16a34a !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .prime-col-left {
    border-right-color: #334155 !important;
    color: #60a5fa !important;
}
html[data-theme="dark"] .prime-col-right {
    color: #4ade80 !important;
}

/* --- Znanjemeter okno in preizkusi --- */
html[data-theme="dark"] .zm-q-card {
    background: rgba(15, 23, 42, 0.88) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .zm-q-text {
    color: #ffffff !important;
}
html[data-theme="dark"] .zm-q-text * {
    color: inherit;
}
html[data-theme="dark"] .zm-q-hint {
    color: #cbd5e1 !important;
}
html[data-theme="dark"] .zm-rule {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .zm-grade-scale span,
html[data-theme="dark"] .zm-history span {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .zm-res-mod {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .zm-mod-row {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .zm-dot {
    background: rgba(15, 23, 42, 0.88) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .zm-dot.answered {
    background: linear-gradient(135deg, var(--fun-a), var(--fun-b)) !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .zm-opt {
    background: rgba(15, 23, 42, 0.88) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .zm-opt.sel {
    border-color: var(--fun-b) !important;
    background: rgba(99, 102, 241, 0.28) !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .zm-review-item.ok {
    border-color: #22c55e !important;
    background: rgba(34, 197, 94, 0.18) !important;
    color: #dcfce7 !important;
}
html[data-theme="dark"] .zm-review-item.bad {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.18) !important;
    color: #fee2e2 !important;
}
html[data-theme="dark"] .zm-chapter-pick button {
    background: rgba(15, 23, 42, 0.88) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .zm-info-box {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
    color: #fde68a !important;
}

/* ==================== MISIJA ZA SUPERMOČ IN RECEPTI ZA REŠEVANJE ==================== */
.zm-mission-banner {
    margin-top: 10px;
    padding: 12px 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(236, 72, 153, 0.12));
    border: 2px solid #f59e0b;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    animation: zm-slide 0.35s ease;
}

html[data-theme="dark"] .zm-mission-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(168, 85, 247, 0.18)) !important;
    border-color: #f59e0b !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}

.zm-mission-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 260px;
}

.zm-mission-badge {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    animation: zm-pulse 1.8s infinite;
}

.zm-mission-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
}

.zm-mission-title b {
    color: var(--fun-b);
}

html[data-theme="dark"] .zm-mission-title b {
    color: #fde68a !important;
}

.zm-mission-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.zm-mission-btn {
    border: none;
    border-radius: 14px;
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.zm-mission-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.zm-mission-btn:active {
    transform: translateY(1px);
}

.zm-mission-go-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
}

.zm-mission-recipe-btn {
    background: var(--bg-card);
    color: var(--text-main);
    border: 2px solid var(--border-color);
}

html[data-theme="dark"] .zm-mission-recipe-btn {
    background: rgba(30, 41, 59, 0.9) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* --- Utripajoča značka na zavihkih poglavij --- */
.zm-tab-boost {
    position: absolute;
    top: 6px;
    right: 8px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    padding: 2px 7px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: zm-pulse 1.4s infinite;
    pointer-events: none;
    z-index: 2;
}

/* --- Gumb "Kako se lotim?" ob nalogi --- */
.zm-task-recipe-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.12));
    border: 1.5px solid var(--primary-border, #818cf8);
    color: var(--primary, #4f46e5);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 8px;
}

.zm-task-recipe-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

html[data-theme="dark"] .zm-task-recipe-btn {
    background: rgba(99, 102, 241, 0.22) !important;
    border-color: #818cf8 !important;
    color: #c4b5fd !important;
}

html[data-theme="dark"] body.zm-jon .zm-task-recipe-btn {
    background: rgba(8, 145, 178, 0.22) !important;
    border-color: #38bdf8 !important;
    color: #67e8f9 !important;
}

/* --- Rešilna bilka ob napaki --- */
.zm-error-recipe-help {
    margin-top: 10px;
    animation: zm-slide 0.3s ease;
}

.zm-help-recipe-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.2));
    border: 2px dashed #f59e0b;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.zm-help-recipe-btn:hover {
    background: #f59e0b;
    color: #fff;
    border-style: solid;
    transform: translateY(-1px);
}

html[data-theme="dark"] .zm-help-recipe-btn {
    background: rgba(245, 158, 11, 0.22) !important;
    color: #fde68a !important;
}

/* --- Modalno okno za Recept ("Kako se lotiti?") --- */
.zm-recipe-modal {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 6px 2px;
}

.zm-recipe-goal-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.12));
    border: 2px solid var(--primary-border, #818cf8);
    border-radius: 18px;
    padding: 14px 18px;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
}

html[data-theme="dark"] .zm-recipe-goal-box {
    background: rgba(30, 27, 75, 0.65) !important;
    color: #f8fafc !important;
}

.zm-recipe-steps-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zm-recipe-step-card {
    background: var(--bg-subtle);
    border: 2px solid var(--border-soft);
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--text-main);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .zm-recipe-step-card {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}

.zm-recipe-example-box {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(16, 185, 129, 0.08));
    border: 2px solid #22c55e;
    border-radius: 18px;
    padding: 14px 18px;
    font-size: 0.98rem;
    line-height: 1.55;
}

html[data-theme="dark"] .zm-recipe-example-box {
    background: rgba(20, 83, 45, 0.3) !important;
    border-color: #22c55e !important;
    color: #f0fdf4 !important;
}

.zm-example-calc-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1.5px dashed rgba(34, 197, 94, 0.55);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 1.02rem;
    line-height: 1.7;
    font-family: var(--font-heading), monospace;
}
html[data-theme="dark"] .zm-example-calc-card {
    background: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(34, 197, 94, 0.6) !important;
    color: #f0fdf4 !important;
}

.zm-recipe-trap-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(249, 115, 22, 0.08));
    border: 2px solid #ef4444;
    border-radius: 18px;
    padding: 14px 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-main);
}

html[data-theme="dark"] .zm-recipe-trap-box {
    background: rgba(127, 29, 29, 0.3) !important;
    border-color: #ef4444 !important;
    color: #fef2f2 !important;
}

.zm-recipe-nav-pill {
    padding: 8px 14px;
    border-radius: 14px;
    border: 2px solid var(--border-soft);
    background: var(--bg-subtle);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.zm-recipe-nav-pill:hover,
.zm-recipe-nav-pill.active {
    background: var(--fun-a);
    color: #fff;
    border-color: transparent;
    transform: translateY(-1px);
}

html[data-theme="dark"] .zm-recipe-nav-pill {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

/* --- Samodejno okno ob 2x zaporedni napaki (Rešilni čoln) --- */
.zm-help-hero {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(245, 158, 11, 0.12));
    border: 2px solid #f59e0b;
    border-radius: 20px;
    padding: 16px 20px;
    margin-bottom: 14px;
}
html[data-theme="dark"] .zm-help-hero {
    background: rgba(69, 26, 3, 0.45) !important;
    border-color: #f59e0b !important;
}
.zm-help-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 5px 14px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
    animation: zm-pulse 1.3s infinite;
}
.zm-help-gotit-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 18px;
    font-size: 1.15rem;
    font-weight: 800;
    font-family: var(--font-heading);
    cursor: pointer;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
    transition: transform 0.15s ease, filter 0.15s ease;
}
.zm-help-gotit-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}
.zm-help-gotit-btn:active {
    transform: translateY(1px);
}

/* --- Interaktivni trener korak-za-korakom v Rešilnem čolnu --- */
.zm-guided-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.06));
    border: 2px solid #3b82f6;
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 10px;
}
html[data-theme="dark"] .zm-guided-box {
    background: rgba(30, 58, 138, 0.25) !important;
    border-color: #60a5fa !important;
}
.zm-guided-progress {
    font-size: 0.78rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    background: #3b82f6;
    color: #ffffff;
}
.zm-guided-step {
    background: var(--bg-card, #ffffff);
    border: 1.5px solid var(--border-soft);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}
html[data-theme="dark"] .zm-guided-step {
    background: rgba(15, 23, 42, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}
.zm-guided-step.completed {
    border-color: #22c55e !important;
    background: rgba(34, 197, 94, 0.08) !important;
}
.zm-guided-input {
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
    border: 2px solid var(--border-soft);
    border-radius: 10px;
    padding: 6px 12px;
    background: var(--bg-main, #ffffff);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.15s ease;
}
.zm-guided-input:focus {
    border-color: #3b82f6;
}
html[data-theme="dark"] .zm-guided-input {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}
.zm-guided-btn {
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transition: transform 0.1s ease, filter 0.1s ease;
}
.zm-guided-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}
.zm-guided-choice-btn {
    padding: 8px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border-soft);
    background: var(--bg-subtle, #f1f5f9);
    color: var(--text-main);
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}
.zm-guided-choice-btn:hover {
    transform: translateY(-1px);
    border-color: #3b82f6;
}
html[data-theme="dark"] .zm-guided-choice-btn {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

/* --- AI Mentorica Luna: Dinamični osebni vodeni razrez --- */
.zm-luna-badge-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}
.zm-luna-note-box {
    background: rgba(139, 92, 246, 0.12);
    border-left: 3.5px solid #8b5cf6;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-main);
}
html[data-theme="dark"] .zm-luna-note-box {
    background: rgba(139, 92, 246, 0.2) !important;
    border-left-color: #a78bfa !important;
}
.zm-luna-loading-box {
    padding: 16px;
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.08));
    border: 2px dashed #8b5cf6;
    border-radius: 14px;
    margin-bottom: 8px;
    animation: pulseBorder 2s infinite ease-in-out;
}
html[data-theme="dark"] .zm-luna-loading-box {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: #a78bfa !important;
}
@keyframes pulseBorder {
    0%, 100% { border-color: #8b5cf6; }
    50% { border-color: #c084fc; }
}


/* ============================================================================
   3-STOPENJSKI SISTEM ZAHTEVNOSTI (LEVEL 1, LEVEL 2, LEVEL 3)
   ============================================================================ */
.zm-level-hud {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    border: 2px solid var(--border-soft);
    border-radius: 18px;
    padding: 14px 18px;
    margin-bottom: 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
html[data-theme="dark"] .zm-level-hud {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95)) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3) !important;
}

.zm-level-hud-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.zm-level-hud-title {
    font-size: 0.92rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.zm-level-mode-toggle {
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-soft);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
}
.zm-level-mode-toggle:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.zm-level-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.zm-level-tab {
    position: relative;
    background: var(--bg-subtle);
    border: 2px solid var(--border-soft);
    border-radius: 14px;
    padding: 10px 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.zm-level-tab:hover:not(.locked) {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}
.zm-level-tab.active {
    border-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.zm-level-tab.active.lvl-3 {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(234, 179, 8, 0.1));
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.zm-level-tab.locked {
    opacity: 0.65;
    cursor: not-allowed;
    background: rgba(148, 163, 184, 0.1);
    border-style: dashed;
}

.zm-level-tab-name {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.zm-level-tab-sub {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}
.zm-level-chip {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}
.zm-level-chip.unlocked { background: #dcfce7; color: #15803d; }
.zm-level-chip.in-progress { background: #e0e7ff; color: #4338ca; }
.zm-level-chip.locked { background: #f1f5f9; color: #64748b; }
.zm-level-chip.gold { background: #fef3c7; color: #b45309; }

html[data-theme="dark"] .zm-level-chip.unlocked { background: rgba(34, 197, 94, 0.2); color: #86efac; }
html[data-theme="dark"] .zm-level-chip.in-progress { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
html[data-theme="dark"] .zm-level-chip.locked { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
html[data-theme="dark"] .zm-level-chip.gold { background: rgba(245, 158, 11, 0.2); color: #fde047; }

.zm-level-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
}
.zm-level-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-subtle);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.zm-level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #22c55e);
    border-radius: 999px;
    transition: width 0.4s ease;
}
.zm-level-progress-fill.gold {
    background: linear-gradient(90deg, #f59e0b, #eab308);
}

@keyframes zmWiggle {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px) rotate(-1deg); }
    40%, 80% { transform: translateX(6px) rotate(1deg); }
}
.zm-wiggle {
    animation: zmWiggle 0.4s ease-in-out !important;
}

.zm-card-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    border-radius: 999px;
    margin-right: 6px;
    vertical-align: middle;
}
.zm-card-level-badge.lvl-1 {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.zm-card-level-badge.lvl-2 {
    background: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.zm-card-level-badge.lvl-3 {
    background: rgba(245, 158, 11, 0.18);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
html[data-theme="dark"] .zm-card-level-badge.lvl-1 { color: #4ade80; }
html[data-theme="dark"] .zm-card-level-badge.lvl-2 { color: #818cf8; }
html[data-theme="dark"] .zm-card-level-badge.lvl-3 { color: #fbbf24; }

.zm-level-gate {
    margin: 24px 0 16px;
    padding: 18px 22px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.zm-level-gate.zm-gate-locked {
    background: var(--bg-subtle);
    border: 2px dashed var(--border-soft);
    opacity: 0.92;
}
.zm-level-gate.zm-gate-unlocked {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(168, 85, 247, 0.14));
    border: 2.5px solid #8b5cf6;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.22);
    animation: zmGatePulse 2.2s infinite ease-in-out;
}
.zm-level-gate.zm-gate-gold {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(234, 179, 8, 0.16)) !important;
    border-color: #f59e0b !important;
    box-shadow: 0 8px 26px rgba(245, 158, 11, 0.28) !important;
    animation: zmGoldPulse 2.2s infinite ease-in-out !important;
}
.zm-level-gate.zm-gate-trophy {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.15));
    border: 2.5px solid #22c55e;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.2);
}

@keyframes zmGatePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.35), 0 8px 24px rgba(139, 92, 246, 0.2); }
    50% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0), 0 8px 30px rgba(139, 92, 246, 0.35); }
}
@keyframes zmGoldPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4), 0 8px 26px rgba(245, 158, 11, 0.25); }
    50% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0), 0 8px 32px rgba(245, 158, 11, 0.4); }
}

.zm-gate-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 250px;
}
.zm-gate-icon {
    font-size: 2.6rem;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}
.zm-gate-content h3 {
    margin: 0 0 4px 0;
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text-main);
}
.zm-gate-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.zm-gate-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
}
html[data-theme="dark"] .zm-gate-badge {
    background: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}
.zm-gate-gold .zm-gate-badge {
    background: rgba(245, 158, 11, 0.2);
    color: #b45309;
}
html[data-theme="dark"] .zm-gate-gold .zm-gate-badge {
    background: rgba(245, 158, 11, 0.35);
    color: #fde047;
}

.zm-gate-btn {
    border: none;
    border-radius: 16px;
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}
.zm-gate-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.zm-gate-btn:active {
    transform: translateY(1px) scale(0.98);
}

.zm-btn-magic {
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.zm-btn-gold-magic {
    background: linear-gradient(135deg, #f59e0b, #eab308, #f97316);
    color: #1e293b !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.magic-sparkle {
    display: inline-block;
    animation: sparkleSpin 2s infinite linear;
}
@keyframes sparkleSpin {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.3) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.zm-dual-progress {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}
html[data-theme="dark"] .zm-dual-progress {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   PEDAGOŠKA PRENOVA: KOGNITIVNA PSIHOLOGIJA (O'Grady, U-krivulja, Recast)
   ========================================================================== */

/* 1. Omilitev obvestil ob napaki (brez agresivne rdeče barve) */
.feedback-banner.feedback-err,
.feedback-slot.show-err {
    background: #fffbeb !important;
    border: 2px solid #f59e0b !important;
    color: #92400e !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.15) !important;
}
html[data-theme="dark"] .feedback-banner.feedback-err,
html[data-theme="dark"] .feedback-slot.show-err {
    background: rgba(245, 158, 11, 0.18) !important;
    border-color: #fbbf24 !important;
    color: #fef08a !important;
}

/* 2. Spotlight učinek (Spotlight Strategy / Roger Brown) */
.zm-spotlight {
    display: inline-block;
    position: relative;
    border-radius: 8px;
    padding: 1px 6px;
    font-weight: 800;
    animation: zm-spotlight-pulse 2.6s ease-out;
}
@keyframes zm-spotlight-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.8), 0 0 18px rgba(234, 179, 8, 0.7);
        background-color: rgba(254, 240, 138, 0.85);
        color: #854d0e;
        transform: scale(1.15);
    }
    40% {
        box-shadow: 0 0 0 8px rgba(234, 179, 8, 0), 0 0 20px rgba(234, 179, 8, 0.4);
        background-color: rgba(254, 240, 138, 0.5);
        color: #854d0e;
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(234, 179, 8, 0);
        background-color: transparent;
        transform: scale(1);
    }
}
html[data-theme="dark"] .zm-spotlight {
    color: #fef08a;
}

/* 3. Recast okno & Rešilna naloga (Bonus za popravo) */
.zm-recast-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: zm-fade-in 0.25s ease;
}
.zm-recast-card {
    background: #ffffff !important;
    color: #0f172a !important;
    border-radius: 24px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
    max-width: 660px;
    width: 100%;
    border: 3px solid #6366f1;
    overflow: hidden;
    animation: zm-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.zm-recast-card * {
    color: inherit;
}
html[data-theme="dark"] .zm-recast-card {
    background: #0f172a !important;
    color: #f8fafc !important;
    border-color: #818cf8 !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8) !important;
}
.zm-recast-head {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff !important;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.zm-recast-head * {
    color: #ffffff !important;
}
.zm-recast-head h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff !important;
}
.zm-recast-close {
    background: rgba(255, 255, 255, 0.2);
    border: 0;
    color: #fff !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.zm-recast-close:hover {
    background: rgba(255, 255, 255, 0.35);
}
.zm-recast-body {
    padding: 20px 24px;
    max-height: 80vh;
    overflow-y: auto;
}
.zm-recast-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}
@media (max-width: 600px) {
    .zm-recast-compare { grid-template-columns: 1fr; }
}
.zm-recast-box {
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 0.92rem;
}
.zm-recast-box.yours {
    background: #fef3c7 !important;
    border: 2px solid #f59e0b !important;
    color: #78350f !important;
}
.zm-recast-box.yours * {
    color: #78350f !important;
}
.zm-recast-box.yours b,
.zm-recast-box.yours strong {
    color: #451a03 !important;
}
.zm-recast-box.yours code {
    background: #fde68a !important;
    color: #78350f !important;
    border: 1px solid #d97706 !important;
    font-weight: 800;
}
html[data-theme="dark"] .zm-recast-box.yours {
    background: rgba(245, 158, 11, 0.18) !important;
    border-color: #fbbf24 !important;
    color: #fef3c7 !important;
}
html[data-theme="dark"] .zm-recast-box.yours * {
    color: #fef3c7 !important;
}
html[data-theme="dark"] .zm-recast-box.yours b,
html[data-theme="dark"] .zm-recast-box.yours strong {
    color: #ffffff !important;
}
html[data-theme="dark"] .zm-recast-box.yours code {
    background: rgba(0, 0, 0, 0.6) !important;
    color: #fde047 !important;
    border: 1px solid #fbbf24 !important;
    font-weight: 800;
}
.zm-recast-box.correct {
    background: #ecfdf5 !important;
    border: 2px solid #10b981 !important;
    color: #064e3b !important;
}
.zm-recast-box.correct * {
    color: #064e3b !important;
}
.zm-recast-box.correct b,
.zm-recast-box.correct strong {
    color: #022c22 !important;
}
.zm-recast-box.correct code {
    background: #d1fae5 !important;
    color: #064e3b !important;
    border: 1px solid #059669 !important;
    font-weight: 800;
}
html[data-theme="dark"] .zm-recast-box.correct {
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: #34d399 !important;
    color: #d1fae5 !important;
}
html[data-theme="dark"] .zm-recast-box.correct * {
    color: #d1fae5 !important;
}
html[data-theme="dark"] .zm-recast-box.correct b,
html[data-theme="dark"] .zm-recast-box.correct strong {
    color: #ffffff !important;
}
html[data-theme="dark"] .zm-recast-box.correct code {
    background: rgba(0, 0, 0, 0.6) !important;
    color: #6ee7b7 !important;
    border: 1px solid #34d399 !important;
    font-weight: 800;
}
.zm-recast-box-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.zm-recast-rescue-box {
    background: #f8fafc !important;
    border: 2px dashed #6366f1 !important;
    border-radius: 18px;
    padding: 18px;
    margin-top: 14px;
    color: #0f172a !important;
}
html[data-theme="dark"] .zm-recast-rescue-box {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: #818cf8 !important;
    color: #f8fafc !important;
}
.zm-rescue-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}
.zm-rescue-prompt {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a !important;
    margin-bottom: 12px;
}
html[data-theme="dark"] .zm-rescue-prompt {
    color: #ffffff !important;
}
.zm-rescue-mc-btn {
    background: #e0e7ff !important;
    color: #3730a3 !important;
    border: 2px solid #818cf8 !important;
    font-weight: 700;
}
.zm-rescue-mc-btn:hover {
    background: #6366f1 !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .zm-rescue-mc-btn {
    background: rgba(99, 102, 241, 0.28) !important;
    color: #e0e7ff !important;
    border-color: #818cf8 !important;
    font-weight: 700;
}
html[data-theme="dark"] .zm-rescue-mc-btn:hover {
    background: #6366f1 !important;
    color: #ffffff !important;
}
.zm-rescue-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.zm-rescue-input {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid #6366f1 !important;
    font-size: 1.05rem;
    font-weight: 700 !important;
    outline: none;
    background: #ffffff !important;
    color: #0f172a !important;
    caret-color: #4f46e5 !important;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.zm-rescue-input::placeholder {
    color: #64748b !important;
}
.zm-rescue-input:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}
html[data-theme="dark"] .zm-rescue-input,
body.dark-mode .zm-rescue-input {
    background: #090d16 !important;
    color: #ffffff !important;
    border-color: #818cf8 !important;
    caret-color: #38bdf8 !important;
}
html[data-theme="dark"] body.zm-jon .zm-rescue-input {
    border-color: #0284c7 !important;
    caret-color: #38bdf8 !important;
}
html[data-theme="dark"] body.zm-jaka .zm-rescue-input {
    border-color: #818cf8 !important;
    caret-color: #a5b4fc !important;
}
html[data-theme="dark"] .zm-rescue-input:focus,
body.dark-mode .zm-rescue-input:focus {
    background: #1e293b !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35) !important;
}
html[data-theme="dark"] body.zm-jaka .zm-rescue-input:focus {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.35) !important;
}
html[data-theme="dark"] .zm-rescue-input::placeholder,
body.dark-mode .zm-rescue-input::placeholder {
    color: #64748b !important;
}
.zm-btn-rescue {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: 0;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: transform 0.15s, opacity 0.15s;
    white-space: nowrap;
}
.zm-btn-rescue:hover:not(:disabled) {
    transform: translateY(-2px);
}
.zm-btn-rescue:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: #64748b !important;
    box-shadow: none !important;
    transform: none !important;
}
.zm-rescue-success-box {
    background: #ecfdf5;
    border: 2px solid #10b981;
    color: #065f46;
    border-radius: 16px;
    padding: 16px;
    margin-top: 14px;
    text-align: center;
    animation: zm-pop 0.3s ease;
}
html[data-theme="dark"] .zm-rescue-success-box {
    background: rgba(16, 185, 129, 0.2);
    border-color: #34d399;
    color: #6ee7b7;
}

/* 4. Ogrevalna faza: »Ujemi napako robota Robija« */
.zm-robot-card {
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.8), rgba(245, 243, 255, 0.8));
    border: 2px solid #a5b4fc;
    border-radius: 20px;
    padding: 18px 22px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
    position: relative;
    overflow: hidden;
    color: #1e293b;
    animation: zm-fade-in 0.4s ease;
}
.zm-robot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.zm-robot-avatar {
    font-size: 2.2rem;
    animation: zm-robot-wiggle 3s infinite ease-in-out;
}
@keyframes zm-robot-wiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-8deg); }
    40% { transform: rotate(8deg); }
    60% { transform: rotate(-4deg); }
    80% { transform: rotate(4deg); }
}
.zm-robot-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #4338ca;
}
.zm-robot-subtitle {
    font-size: 0.85rem;
    color: #64748b;
}
.zm-robot-task-box {
    background: #ffffff;
    color: #1e293b;
    border-radius: 14px;
    padding: 14px 18px;
    margin: 12px 0;
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.zm-robot-steps-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}
.zm-robot-step-btn {
    text-align: left;
    padding: 10px 14px;
    border-radius: 10px;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.zm-robot-step-btn:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(4px);
}
.zm-robot-step-btn.correct-pick {
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
    color: #065f46 !important;
}
.zm-robot-step-btn.wrong-pick {
    border-color: #f59e0b !important;
    background: #fffbeb !important;
    color: #92400e !important;
}
.zm-robot-all-ok-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid #10b981;
    background: #ecfdf5;
    color: #065f46;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s;
}
.zm-robot-all-ok-btn:hover {
    background: #d1fae5;
    transform: translateY(-2px);
}
.zm-robot-feedback {
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    animation: zm-pop 0.3s ease;
}

/* === DARK THEME ZA ROBOTA ROBIJA (JAKA & JON) === */
html[data-theme="dark"] .zm-robot-card {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.88), rgba(49, 46, 129, 0.78)) !important;
    border-color: #818cf8 !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
}
html[data-theme="dark"] body.zm-jon .zm-robot-card {
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.88), rgba(12, 74, 110, 0.78)) !important;
    border-color: #38bdf8 !important;
}
html[data-theme="dark"] body.zm-oce .zm-robot-card {
    background: linear-gradient(135deg, rgba(40, 24, 60, 0.92), rgba(60, 30, 80, 0.85)) !important;
    border-color: #fbbf24 !important;
}
html[data-theme="dark"] .zm-robot-title {
    color: #c7d2fe !important;
}
html[data-theme="dark"] body.zm-jon .zm-robot-title {
    color: #7dd3fc !important;
}
html[data-theme="dark"] body.zm-oce .zm-robot-title {
    color: #fde047 !important;
}
html[data-theme="dark"] .zm-robot-subtitle {
    color: #cbd5e1 !important;
}
html[data-theme="dark"] .zm-robot-task-box {
    background: rgba(15, 23, 42, 0.88) !important;
    border: 1px solid rgba(165, 180, 252, 0.3) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] body.zm-jon .zm-robot-task-box {
    background: rgba(6, 32, 51, 0.88) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] body.zm-oce .zm-robot-task-box {
    background: rgba(28, 18, 44, 0.92) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #f8fafc !important;
}
html[data-theme="dark"] .zm-robot-task-box div,
html[data-theme="dark"] .zm-robot-task-box span,
html[data-theme="dark"] .zm-robot-task-box p {
    color: #f8fafc !important;
}
html[data-theme="dark"] .zm-robot-task-box b,
html[data-theme="dark"] .zm-robot-task-box strong {
    color: #ffffff !important;
}
html[data-theme="dark"] .zm-robot-task-box code {
    background: rgba(99, 102, 241, 0.28) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(165, 180, 252, 0.35) !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
}
html[data-theme="dark"] body.zm-jon .zm-robot-task-box code {
    background: rgba(8, 145, 178, 0.28) !important;
    color: #67e8f9 !important;
    border-color: rgba(103, 232, 249, 0.35) !important;
}
html[data-theme="dark"] body.zm-oce .zm-robot-task-box code {
    background: rgba(217, 119, 6, 0.28) !important;
    color: #fde047 !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
}
html[data-theme="dark"] .zm-robot-step-btn {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #f1f5f9 !important;
}
html[data-theme="dark"] body.zm-jon .zm-robot-step-btn {
    background: rgba(12, 44, 69, 0.9) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    color: #f1f5f9 !important;
}
html[data-theme="dark"] body.zm-oce .zm-robot-step-btn {
    background: rgba(35, 20, 50, 0.9) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #f1f5f9 !important;
}
html[data-theme="dark"] .zm-robot-step-btn:hover {
    background: rgba(99, 102, 241, 0.25) !important;
    border-color: #a5b4fc !important;
    color: #ffffff !important;
}
html[data-theme="dark"] body.zm-jon .zm-robot-step-btn:hover {
    background: rgba(8, 145, 178, 0.25) !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
}
html[data-theme="dark"] body.zm-oce .zm-robot-step-btn:hover {
    background: rgba(217, 119, 6, 0.25) !important;
    border-color: #fbbf24 !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .zm-robot-step-btn span,
html[data-theme="dark"] .zm-robot-step-btn b {
    color: inherit !important;
}
html[data-theme="dark"] .zm-robot-step-btn code {
    background: rgba(0, 0, 0, 0.45) !important;
    color: #fde047 !important;
    border: 1px solid rgba(250, 204, 21, 0.3) !important;
    padding: 2px 6px !important;
    border-radius: 6px !important;
}
html[data-theme="dark"] .zm-robot-step-btn .zm-robot-pick-icon {
    color: #cbd5e1 !important;
}
html[data-theme="dark"] .zm-robot-all-ok-btn {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #6ee7b7 !important;
}
html[data-theme="dark"] .zm-robot-all-ok-btn:hover {
    background: rgba(16, 185, 129, 0.35) !important;
    color: #ffffff !important;
}
html[data-theme="dark"] .zm-robot-step-btn.correct-pick {
    background: rgba(16, 185, 129, 0.28) !important;
    border-color: #34d399 !important;
    color: #a7f3d0 !important;
}
html[data-theme="dark"] .zm-robot-step-btn.wrong-pick {
    background: rgba(245, 158, 11, 0.25) !important;
    border-color: #fbbf24 !important;
    color: #fde68a !important;
}
.zm-robot-feedback {
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    animation: zm-pop 0.3s ease;
}

.zm-robot-feedback.correct-feedback {
    background: #ecfdf5 !important;
    border: 2px solid #10b981 !important;
    color: #065f46 !important;
}

.zm-robot-feedback.wrong-feedback {
    background: #fffbeb !important;
    border: 2px solid #f59e0b !important;
    color: #92400e !important;
}

html[data-theme="dark"] .zm-robot-feedback {
    background: rgba(15, 23, 42, 0.95) !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .zm-robot-feedback.correct-feedback {
    background: rgba(16, 185, 129, 0.22) !important;
    border: 2px solid #34d399 !important;
    color: #a7f3d0 !important;
}

html[data-theme="dark"] .zm-robot-feedback.wrong-feedback {
    background: rgba(245, 158, 11, 0.22) !important;
    border: 2px solid #fbbf24 !important;
    color: #fde68a !important;
}

/* 5. Blickish dvojčka (Blickish minimal pair isolation) */
.zm-blickish-card {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 2px solid #6ee7b7;
    border-radius: 20px;
    padding: 18px 22px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.08);
    color: #064e3b;
}

.zm-blickish-card > div {
    color: #064e3b;
}

.zm-blickish-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #065f46;
    margin-bottom: 4px;
}

.zm-blickish-sub {
    font-size: 0.88rem;
    color: #166534;
    font-weight: 600;
    margin-bottom: 12px;
}

.zm-blickish-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff !important;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.zm-blickish-pair-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 14px 0;
}

@media (max-width: 600px) {
    .zm-blickish-pair-grid { grid-template-columns: 1fr; }
}

.zm-blickish-side {
    background: #ffffff !important;
    border-radius: 16px;
    padding: 16px;
    border: 2px solid #a7f3d0 !important;
    color: #0f172a !important;
    cursor: text;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.zm-blickish-side * {
    color: inherit;
}

.zm-blickish-side b,
.zm-blickish-side strong {
    color: #0f172a !important;
    font-weight: 800;
}

.zm-blickish-side:focus-within {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

.zm-blickish-side-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #059669 !important;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.zm-blickish-diff-highlight {
    background: #fef08a !important;
    color: #713f12 !important;
    padding: 2px 7px;
    border-radius: 6px;
    font-weight: 800;
    border: 1.5px dashed #ca8a04 !important;
}

.zm-blickish-conclusion {
    background: #eff6ff !important;
    border: 2px solid #3b82f6 !important;
    color: #1e3a8a !important;
    border-radius: 14px;
    padding: 12px 16px;
    margin-top: 14px;
    font-size: 0.92rem;
    font-weight: 700;
    animation: zm-pop 0.3s ease;
}

.zm-blickish-conclusion * {
    color: inherit;
}

/* Temni način za Blickish dvojčka */
html[data-theme="dark"] .zm-blickish-card {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.5), rgba(4, 120, 87, 0.4)) !important;
    border-color: #10b981 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] body.zm-jon .zm-blickish-card {
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.88), rgba(4, 120, 87, 0.4)) !important;
}

html[data-theme="dark"] body.zm-oce .zm-blickish-card {
    background: linear-gradient(135deg, rgba(38, 22, 60, 0.9), rgba(4, 120, 87, 0.4)) !important;
}

html[data-theme="dark"] .zm-blickish-card > div {
    color: #f8fafc !important;
}

html[data-theme="dark"] .zm-blickish-title {
    color: #ecfdf5 !important;
}

html[data-theme="dark"] .zm-blickish-sub {
    color: #d1fae5 !important;
}

html[data-theme="dark"] .zm-blickish-side {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: #059669 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .zm-blickish-side * {
    color: #f8fafc !important;
}

html[data-theme="dark"] .zm-blickish-side b,
html[data-theme="dark"] .zm-blickish-side strong {
    color: #ffffff !important;
}

html[data-theme="dark"] .zm-blickish-side-title {
    color: #34d399 !important;
}

html[data-theme="dark"] .zm-blickish-side code {
    background: rgba(0, 0, 0, 0.55) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(110, 231, 183, 0.3) !important;
}

html[data-theme="dark"] .zm-blickish-diff-highlight {
    background: rgba(234, 179, 8, 0.3) !important;
    color: #fef08a !important;
    border: 1.5px dashed #eab308 !important;
}

html[data-theme="dark"] .zm-blickish-conclusion {
    background: rgba(30, 58, 138, 0.45) !important;
    border-color: #60a5fa !important;
    color: #dbeafe !important;
}

html[data-theme="dark"] .zm-blickish-conclusion * {
    color: #dbeafe !important;
}

/* 6. Scaffolding (Informativeness Principle) */
.zm-scaffold-container {
    background: #ffffff !important;
    border: 2px solid #cbd5e1 !important;
    border-radius: 16px;
    padding: 16px 20px;
    margin: 12px 0;
    color: #0f172a !important;
}

.zm-scaffold-container * {
    color: inherit;
}

.zm-scaffold-title {
    color: #4338ca !important;
    font-weight: 800;
}

.zm-scaffold-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    font-size: 1.1rem;
    font-family: monospace;
    color: #0f172a !important;
}

.zm-scaffold-fixed {
    color: #1e293b !important;
    font-weight: 700;
}

.zm-scaffold-input {
    width: 80px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 2px solid #6366f1 !important;
    font-size: 1.1rem;
    font-weight: 800 !important;
    text-align: center;
    outline: none;
    background: #ffffff !important;
    color: #0f172a !important;
}

.zm-scaffold-step-pts {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #10b981 !important;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    animation: zm-pop 0.3s ease;
}

/* Temni način za Scaffolding */
html[data-theme="dark"] .zm-scaffold-container {
    background: rgba(15, 23, 42, 0.92) !important;
    border-color: #6366f1 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .zm-scaffold-title {
    color: #a5b4fc !important;
}

html[data-theme="dark"] .zm-scaffold-row {
    color: #f8fafc !important;
}

html[data-theme="dark"] .zm-scaffold-fixed {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .zm-scaffold-input {
    background: #090d16 !important;
    color: #ffffff !important;
    border-color: #818cf8 !important;
    caret-color: #38bdf8 !important;
}

html[data-theme="dark"] .zm-scaffold-step-pts {
    background: rgba(16, 185, 129, 0.25) !important;
    color: #6ee7b7 !important;
    border-color: #34d399 !important;
}

.zm-blickish-feedback-ok {
    color: #059669 !important;
    font-weight: 800;
}
.zm-scaffold-sub {
    color: #475569 !important;
}
.zm-rescue-help-text {
    color: #475569 !important;
}

html[data-theme="dark"] .zm-blickish-feedback-ok {
    color: #34d399 !important;
    font-weight: 800;
}
html[data-theme="dark"] .zm-scaffold-sub {
    color: #cbd5e1 !important;
}
html[data-theme="dark"] .zm-rescue-help-text {
    color: #cbd5e1 !important;
}

