/* _content/Frontend/Features/Matematik/Components/MatematikComponent.razor.rz.scp.css */
/* ═══════════════════════════════════════════════════════════
   MATEMATIK – ADHD/NPF-anpassad design
   Alla ::deep-regler når SpelstatusPanel + UppgiftPanel
   ═══════════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────────── */
.math-page[b-dbwf3mv3as] {
    --m-purple:    #7c3aed;
    --m-purple-lt: #ede9fe;
    --m-teal:      #0d9488;
    --m-teal-lt:   #ccfbf1;
    --m-green:     #16a34a;
    --m-green-lt:  #dcfce7;
    --m-amber:     #d97706;
    --m-amber-lt:  #fef3c7;
    --m-red:       #dc2626;
    --m-red-lt:    #fee2e2;
    --m-blue:      #2563eb;
    --m-blue-lt:   #dbeafe;
    --m-ink:       #1e1b4b;
    --m-muted:     #6b7280;
    --m-bg:        #f0f4ff;
    --m-white:     #ffffff;
    --m-card:      #ffffff;
    --m-border:    #e2e8f0;
    --m-radius:    14px;
    --m-radius-lg: 22px;
    --m-shadow:    0 2px 8px rgba(0,0,0,.08);
    --m-shadow-lg: 0 6px 24px rgba(0,0,0,.12);
    min-height: 100vh;
    background: var(--m-bg);
    padding: 1.5rem 1rem 3rem;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: var(--m-ink);
}

/* ── Keyframe animations ───────────────────────────────── */
@keyframes m-bounce-b-dbwf3mv3as {
    0%,100% { transform: translateY(0); }
    40%      { transform: translateY(-10px); }
    70%      { transform: translateY(-5px); }
}
@keyframes m-pop-b-dbwf3mv3as {
    0%   { transform: scale(.6); opacity: 0; }
    70%  { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes m-fade-b-dbwf3mv3as {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes m-slide-up-b-dbwf3mv3as {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes m-shake-b-dbwf3mv3as {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-8px); }
    40%     { transform: translateX(8px); }
    60%     { transform: translateX(-6px); }
    80%     { transform: translateX(6px); }
}
@keyframes m-pulse-green-b-dbwf3mv3as {
    0%,100% { box-shadow: 0 0 0 0 rgba(22,163,74,.5); }
    50%     { box-shadow: 0 0 0 10px rgba(22,163,74,0); }
}
@keyframes m-spin-in-b-dbwf3mv3as {
    from { transform: rotate(-180deg) scale(0); opacity: 0; }
    to   { transform: rotate(0) scale(1); opacity: 1; }
}
@keyframes m-xp-flash-b-dbwf3mv3as {
    0%   { opacity: 1; transform: translateY(0) scale(1); }
    80%  { opacity: 1; transform: translateY(-24px) scale(1.1); }
    100% { opacity: 0; transform: translateY(-32px) scale(.9); }
}

/* ── Reward overlay ────────────────────────────────────── */
.math-overlay[b-dbwf3mv3as] {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: m-fade-b-dbwf3mv3as .2s ease;
}

.math-reward-popup[b-dbwf3mv3as] {
    background: var(--m-white);
    border-radius: var(--m-radius-lg);
    padding: 2.5rem 2rem;
    max-width: 340px;
    width: 90%;
    text-align: center;
    animation: m-pop-b-dbwf3mv3as .35s cubic-bezier(.34,1.56,.64,1);
    box-shadow: var(--m-shadow-lg);
}

.math-reward-emoji[b-dbwf3mv3as] {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: .75rem;
    animation: m-spin-in-b-dbwf3mv3as .5s ease;
}

.math-reward-title[b-dbwf3mv3as] {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--m-purple);
    margin-bottom: .5rem;
}

.math-reward-desc[b-dbwf3mv3as] {
    color: var(--m-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.math-reward-btn[b-dbwf3mv3as] {
    background: var(--m-purple);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: .75rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, background .15s;
    min-height: 48px;
}

.math-reward-btn:hover[b-dbwf3mv3as]  { background: #6d28d9; transform: scale(1.04); }
.math-reward-btn:active[b-dbwf3mv3as] { transform: scale(.97); }

/* ── Start screen ──────────────────────────────────────── */
.math-start-screen[b-dbwf3mv3as] {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: m-fade-b-dbwf3mv3as .3s ease;
    /* Förhindra hopp vid dynamiskt innehåll */
    align-items: stretch;
}

.math-hero[b-dbwf3mv3as] {
    text-align: center;
    padding: 1rem 0 .5rem;
}

.math-mascot[b-dbwf3mv3as] {
    font-size: 4rem;
    line-height: 1;
    animation: m-bounce-b-dbwf3mv3as 2s ease-in-out infinite;
    margin-bottom: .5rem;
}

.math-hero-title[b-dbwf3mv3as] {
    font-size: 2rem;
    font-weight: 900;
    color: var(--m-purple);
    margin: 0 0 .25rem;
}

.math-hero-sub[b-dbwf3mv3as] {
    color: var(--m-muted);
    font-size: 1.05rem;
    margin: 0;
}

/* Section cards */
.math-section-card[b-dbwf3mv3as] {
    background: var(--m-card);
    border-radius: var(--m-radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--m-shadow);
    border: 2px solid var(--m-border);
}

.math-section-card--slide[b-dbwf3mv3as] {
    animation: m-slide-up-b-dbwf3mv3as .25s ease;
    /* Förhindra hopp: sektionen växer mjukt */
    will-change: transform, opacity;
}

.math-section-label[b-dbwf3mv3as] {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: var(--m-ink);
}

.math-optional[b-dbwf3mv3as] {
    font-weight: 400;
    font-size: .85rem;
    color: var(--m-muted);
}

/* Grade grid */
.math-grade-grid[b-dbwf3mv3as] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: .6rem;
}

.math-grade-tile[b-dbwf3mv3as] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    border-radius: var(--m-radius);
    border: 3px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
    padding: .4rem .2rem;
    font-size: .9rem;
    font-weight: 700;
    color: var(--m-ink);
    -webkit-tap-highlight-color: transparent;
}

.math-grade-tile:hover[b-dbwf3mv3as] {
    border-color: var(--gc, var(--m-purple));
    transform: scale(1.05);
}

.math-grade-tile--on[b-dbwf3mv3as] {
    background: var(--gc, var(--m-purple));
    border-color: var(--gc, var(--m-purple));
    color: #fff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--gc, var(--m-purple)) 40%, transparent);
    transform: scale(1.08);
}

.math-grade-num[b-dbwf3mv3as] {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
}

.math-grade-lbl[b-dbwf3mv3as] {
    font-size: .7rem;
    font-weight: 600;
    opacity: .8;
}

/* Topic pills */
.math-topic-wrap[b-dbwf3mv3as] {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.math-topic-pill[b-dbwf3mv3as] {
    padding: .45rem 1rem;
    border-radius: 50px;
    border: 2px solid var(--m-border);
    background: #f8fafc;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    color: var(--m-ink);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.math-topic-pill:hover[b-dbwf3mv3as]      { border-color: var(--m-purple); background: var(--m-purple-lt); }
.math-topic-pill--on[b-dbwf3mv3as]        { background: var(--m-purple); color: #fff; border-color: var(--m-purple); }

.math-topic-hint[b-dbwf3mv3as] {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0 0 0.5rem;
    text-align: center;
}

/* Start button */
.math-start-row[b-dbwf3mv3as] {
    display: flex;
    justify-content: center;
    width: 100%;
}

.math-start-btn[b-dbwf3mv3as] {
    background: linear-gradient(135deg, var(--m-green) 0%, #15803d 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 1rem 3rem;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    min-height: 56px;
    box-shadow: 0 4px 16px rgba(22,163,74,.35);
    transition: transform .15s, box-shadow .15s;
    animation: m-pulse-green-b-dbwf3mv3as 2s infinite;
    -webkit-tap-highlight-color: transparent;
}

.math-start-btn:hover[b-dbwf3mv3as]  { transform: scale(1.04); box-shadow: 0 6px 20px rgba(22,163,74,.45); }
.math-start-btn:active[b-dbwf3mv3as] { transform: scale(.97); }

/* Arrow hint */
.math-arrow-hint[b-dbwf3mv3as] {
    text-align: center;
    font-size: 1.2rem;
    color: var(--m-muted);
    animation: m-bounce-b-dbwf3mv3as 1.5s ease-in-out infinite;
}

/* Trophy shelf */
.math-trophy-shelf[b-dbwf3mv3as] { }

.math-shelf-row[b-dbwf3mv3as] {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.math-shelf-badge[b-dbwf3mv3as] {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.15));
    cursor: default;
    transition: transform .15s;
}

.math-shelf-badge:hover[b-dbwf3mv3as] { transform: scale(1.2); }

/* ── Progress summary ──────────────────────────────────── */
.math-progress-summary[b-dbwf3mv3as] {
    text-align: center;
    padding: .5rem 0;
}

.math-progress-stars-total[b-dbwf3mv3as] {
    font-size: 1.4rem;
    letter-spacing: .15em;
    margin-bottom: .25rem;
}

.math-star-filled[b-dbwf3mv3as] { filter: none; }
.math-star-empty[b-dbwf3mv3as]  { opacity: .35; }

.math-progress-count[b-dbwf3mv3as] {
    font-size: .85rem;
    color: var(--m-muted);
    font-weight: 600;
}

/* Topic surprise button */
.math-topic-surprise[b-dbwf3mv3as] {
    width: 100%;
    margin-bottom: .5rem;
}

/* ── Progress grid (topic cards) ──────────────────────── */
.math-progress-grid[b-dbwf3mv3as] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .6rem;
    margin-top: .75rem;
}

.math-progress-card[b-dbwf3mv3as] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: .75rem .5rem;
    border-radius: var(--m-radius);
    border: 2px solid var(--m-border);
    background: #f8fafc;
    cursor: pointer;
    transition: all .15s;
    min-height: 80px;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.math-progress-card:hover[b-dbwf3mv3as] {
    border-color: var(--m-purple);
    background: var(--m-purple-lt);
    transform: scale(1.03);
}

.math-progress-card--on[b-dbwf3mv3as] {
    background: var(--m-purple);
    border-color: var(--m-purple);
    color: #fff;
    box-shadow: 0 4px 12px rgba(124,58,237,.3);
}

.math-progress-card--on .math-progress-card-detail[b-dbwf3mv3as] {
    color: rgba(255,255,255,.8);
}

.math-progress-card--mastered[b-dbwf3mv3as] {
    border-color: var(--m-green);
    background: var(--m-green-lt);
}

.math-progress-card--mastered.math-progress-card--on[b-dbwf3mv3as] {
    background: var(--m-green);
    border-color: var(--m-green);
    color: #fff;
}

.math-progress-card-name[b-dbwf3mv3as] {
    font-size: .85rem;
    font-weight: 700;
}

.math-progress-card-stars[b-dbwf3mv3as] {
    font-size: .9rem;
    letter-spacing: .1em;
}

.math-progress-card-detail[b-dbwf3mv3as] {
    font-size: .7rem;
    color: var(--m-muted);
    font-weight: 600;
}

/* ── Difficulty badge (UppgiftPanel header) ───────────── */
[b-dbwf3mv3as] .math-difficulty-badge {
    border-radius: 50px;
    padding: .3rem .85rem;
    font-size: .8rem;
    font-weight: 700;
    border: none;
}

[b-dbwf3mv3as] .math-difficulty-badge--1 {
    background: var(--m-green-lt);
    color: var(--m-green);
}

[b-dbwf3mv3as] .math-difficulty-badge--2 {
    background: var(--m-amber-lt);
    color: var(--m-amber);
}

[b-dbwf3mv3as] .math-difficulty-badge--3 {
    background: var(--m-red-lt);
    color: var(--m-red);
}

/* ── Mastery section (SpelstatusPanel) ────────────────── */
[b-dbwf3mv3as] .math-mastery-section {
    border-top: 1px solid var(--m-border);
    padding-top: .75rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

[b-dbwf3mv3as] .math-mastery-header {
    font-size: .85rem;
    font-weight: 700;
    color: var(--m-ink);
}

[b-dbwf3mv3as] .math-mastery-difficulty {
    font-size: .8rem;
    font-weight: 600;
    color: var(--m-purple);
}

[b-dbwf3mv3as] .math-mastery-bar-row {
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    color: var(--m-muted);
}

[b-dbwf3mv3as] .math-xp-fill--mastery {
    background: linear-gradient(90deg, var(--m-amber) 0%, #fbbf24 100%);
}

[b-dbwf3mv3as] .math-mastery-complete {
    font-size: .9rem;
    font-weight: 800;
    color: var(--m-green);
    text-align: center;
    animation: m-pop-b-dbwf3mv3as .3s ease;
}

[b-dbwf3mv3as] .math-advance-flash {
    background: var(--m-purple);
    color: #fff;
    border-radius: var(--m-radius);
    padding: .5rem .75rem;
    font-weight: 800;
    font-size: .95rem;
    text-align: center;
    animation: m-pop-b-dbwf3mv3as .35s ease;
}

/* ── Playing layout ────────────────────────────────────── */
.math-play-layout[b-dbwf3mv3as] {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    gap: 1.25rem;
    align-items: stretch;
    animation: m-fade-b-dbwf3mv3as .3s ease;
}

.math-sidebar[b-dbwf3mv3as] {
    flex: 0 0 220px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.math-exercise-col[b-dbwf3mv3as] {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════
   ::deep – SpelstatusPanel (math-status-panel)
   ═══════════════════════════════════════════════════════════ */

[b-dbwf3mv3as] .math-status-panel {
    background: var(--m-white);
    border-radius: var(--m-radius-lg);
    padding: 1.25rem 1rem;
    box-shadow: var(--m-shadow);
    border: 2px solid var(--m-border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

[b-dbwf3mv3as] .math-status-avatar {
    display: flex;
    align-items: center;
    gap: .75rem;
}

[b-dbwf3mv3as] .math-avatar-emoji {
    font-size: 2.6rem;
    line-height: 1;
    animation: m-bounce-b-dbwf3mv3as 3s ease-in-out infinite;
}

[b-dbwf3mv3as] .math-status-level {
    font-weight: 800;
    font-size: 1rem;
    color: var(--m-purple);
}

[b-dbwf3mv3as] .math-status-xp-total {
    font-size: .8rem;
    color: var(--m-muted);
}

/* XP bar */
[b-dbwf3mv3as] .math-xp-section {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

[b-dbwf3mv3as] .math-xp-label-row {
    display: flex;
    justify-content: space-between;
    font-size: .8rem;
    color: var(--m-muted);
}

[b-dbwf3mv3as] .math-xp-bar {
    height: 12px;
    background: #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
}

[b-dbwf3mv3as] .math-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--m-purple) 0%, #a855f7 100%);
    border-radius: 50px;
    transition: width .4s ease;
}

[b-dbwf3mv3as] .math-xp-fill--green {
    background: linear-gradient(90deg, var(--m-green) 0%, #4ade80 100%);
}

/* Streak boxes */
[b-dbwf3mv3as] .math-streak-row {
    display: flex;
    gap: .5rem;
}

[b-dbwf3mv3as] .math-streak-box {
    flex: 1;
    border-radius: var(--m-radius);
    padding: .6rem .4rem;
    text-align: center;
    background: #f8fafc;
    border: 2px solid var(--m-border);
}

[b-dbwf3mv3as] .math-streak-box--fire {
    border-color: var(--m-amber);
    background: var(--m-amber-lt);
}

[b-dbwf3mv3as] .math-streak-box--trophy {
    border-color: var(--m-purple);
    background: var(--m-purple-lt);
}

[b-dbwf3mv3as] .math-streak-icon { font-size: 1.3rem; line-height: 1; }
[b-dbwf3mv3as] .math-streak-val  { font-size: 1.4rem; font-weight: 900; color: var(--m-ink); }
[b-dbwf3mv3as] .math-streak-lbl  { font-size: .7rem; color: var(--m-muted); font-weight: 600; }

/* Accuracy */
[b-dbwf3mv3as] .math-accuracy {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

[b-dbwf3mv3as] .math-accuracy-row {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    font-weight: 600;
}

/* Perks */
[b-dbwf3mv3as] .math-perk-section {
    border-top: 1px solid var(--m-border);
    padding-top: .75rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

[b-dbwf3mv3as] .math-perk-title {
    font-size: .75rem;
    font-weight: 700;
    color: var(--m-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

[b-dbwf3mv3as] .math-perk-row {
    font-size: .85rem;
    font-weight: 600;
    color: var(--m-ink);
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* XP flash */
[b-dbwf3mv3as] .math-xp-flash {
    background: var(--m-green);
    color: #fff;
    border-radius: var(--m-radius);
    padding: .5rem .75rem;
    font-weight: 800;
    font-size: 1rem;
    text-align: center;
    animation: m-xp-flash-b-dbwf3mv3as 1.2s ease forwards;
}

/* Back button */
[b-dbwf3mv3as] .math-back-btn {
    width: 100%;
    border: 2px solid var(--m-border);
    background: #f8fafc;
    border-radius: var(--m-radius);
    padding: .6rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--m-muted);
    transition: all .15s;
    min-height: 44px;
}

[b-dbwf3mv3as] .math-back-btn:hover { border-color: var(--m-red); color: var(--m-red); background: var(--m-red-lt); }

/* ═══════════════════════════════════════════════════════════
   ::deep – UppgiftPanel (math-exercise-card)
   ═══════════════════════════════════════════════════════════ */

[b-dbwf3mv3as] .math-exercise-card {
    background: var(--m-white);
    border-radius: var(--m-radius-lg);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--m-shadow-lg);
    border: 2px solid var(--m-border);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: m-fade-b-dbwf3mv3as .25s ease;
    flex: 1;
    width: 100%;
}

/* Header */
[b-dbwf3mv3as] .math-exercise-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

[b-dbwf3mv3as] .math-exercise-header > :last-child {
    margin-left: auto;
}

[b-dbwf3mv3as] .math-topic-badge {
    background: var(--m-purple-lt);
    color: var(--m-purple);
    border-radius: 50px;
    padding: .3rem .85rem;
    font-size: .8rem;
    font-weight: 700;
    border: none;
}

[b-dbwf3mv3as] .math-xp-label {
    background: var(--m-amber-lt);
    color: var(--m-amber);
    border-radius: 50px;
    padding: .3rem .85rem;
    font-size: .8rem;
    font-weight: 700;
}

/* Perk bar */
[b-dbwf3mv3as] .math-perk-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

[b-dbwf3mv3as] .math-perk-chip {
    border-radius: 50px;
    padding: .25rem .7rem;
    font-size: .8rem;
    font-weight: 700;
    background: var(--m-purple-lt);
    color: var(--m-purple);
}

[b-dbwf3mv3as] .math-perk-chip--turbo { background: var(--m-amber-lt);  color: var(--m-amber); }
[b-dbwf3mv3as] .math-perk-chip--hint  { background: var(--m-teal-lt);   color: var(--m-teal);  }

/* Question */
[b-dbwf3mv3as] .math-question-box {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--m-purple-lt);
    border-radius: var(--m-radius);
}

[b-dbwf3mv3as] .math-question-text {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--m-ink);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -.01em;
}

[b-dbwf3mv3as] .math-unit-hint {
    font-size: .9rem;
    color: var(--m-muted);
    margin: .5rem 0 0;
}

/* Answer area */
[b-dbwf3mv3as] .math-answer-row {
    display: flex;
    gap: .75rem;
}

[b-dbwf3mv3as] .math-answer-input {
    flex: 1;
    border: 3px solid var(--m-border);
    border-radius: var(--m-radius);
    padding: .85rem 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--m-ink);
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    min-height: 54px;
}

[b-dbwf3mv3as] .math-answer-input:focus {
    border-color: var(--m-purple);
    box-shadow: 0 0 0 3px rgba(124,58,237,.2);
}

[b-dbwf3mv3as] .math-answer-btn {
    background: var(--m-blue);
    color: #fff;
    border: none;
    border-radius: var(--m-radius);
    padding: .85rem 1.4rem;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    min-height: 54px;
    min-width: 100px;
    transition: transform .15s, background .15s;
    white-space: nowrap;
}

[b-dbwf3mv3as] .math-answer-btn:hover  { background: #1d4ed8; transform: scale(1.03); }
[b-dbwf3mv3as] .math-answer-btn:active { transform: scale(.97); }

/* Feedback */
[b-dbwf3mv3as] .math-feedback {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--m-radius);
    font-size: .95rem;
}

[b-dbwf3mv3as] .math-feedback--wrong {
    background: var(--m-red-lt);
    border: 2px solid var(--m-red);
    color: var(--m-red);
    animation: m-shake-b-dbwf3mv3as .35s ease;
}

[b-dbwf3mv3as] .math-feedback--correct {
    background: var(--m-green-lt);
    border: 2px solid var(--m-green);
    color: var(--m-green);
    animation: m-pop-b-dbwf3mv3as .3s ease;
}

[b-dbwf3mv3as] .math-feedback-icon { font-size: 1.5rem; flex-shrink: 0; }
[b-dbwf3mv3as] .math-feedback-sub  { font-size: .85rem; opacity: .8; margin-top: .1rem; }

/* Hint / Solution / Skip buttons */
[b-dbwf3mv3as] .math-hint-btn,
[b-dbwf3mv3as] .math-solution-btn,
[b-dbwf3mv3as] .math-skip-btn {
    border: 2px solid transparent;
    border-radius: 50px;
    padding: .5rem 1.1rem;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: all .15s;
}

[b-dbwf3mv3as] .math-hint-btn {
    background: var(--m-teal-lt);
    border-color: var(--m-teal);
    color: var(--m-teal);
}
[b-dbwf3mv3as] .math-hint-btn:hover { background: var(--m-teal); color: #fff; }

[b-dbwf3mv3as] .math-solution-btn {
    background: var(--m-amber-lt);
    border-color: var(--m-amber);
    color: var(--m-amber);
}
[b-dbwf3mv3as] .math-solution-btn:hover { background: var(--m-amber); color: #fff; }

[b-dbwf3mv3as] .math-skip-btn {
    background: #f1f5f9;
    border-color: var(--m-border);
    color: var(--m-muted);
}
[b-dbwf3mv3as] .math-skip-btn:hover { border-color: var(--m-red); color: var(--m-red); background: var(--m-red-lt); }

/* XP cost / free badges on hint button */
[b-dbwf3mv3as] .math-cost-badge {
    background: var(--m-red-lt);
    color: var(--m-red);
    border-radius: 50px;
    padding: .1rem .45rem;
    font-size: .7rem;
    font-weight: 800;
}

[b-dbwf3mv3as] .math-free-badge {
    background: var(--m-green-lt);
    color: var(--m-green);
    border-radius: 50px;
    padding: .1rem .45rem;
    font-size: .7rem;
    font-weight: 800;
}

/* Hints list */
[b-dbwf3mv3as] .math-hints-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-left: 0;
    margin: 0;
    list-style: none;
}

[b-dbwf3mv3as] .math-hint-item {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    background: var(--m-teal-lt);
    border-left: 4px solid var(--m-teal);
    border-radius: 0 var(--m-radius) var(--m-radius) 0;
    padding: .65rem .9rem;
    font-size: .95rem;
    font-weight: 600;
    animation: m-slide-up-b-dbwf3mv3as .2s ease;
}

/* Solution box */
[b-dbwf3mv3as] .math-solution-box {
    background: var(--m-amber-lt);
    border: 2px solid var(--m-amber);
    border-radius: var(--m-radius);
    padding: 1rem 1.25rem;
    font-size: .95rem;
    animation: m-fade-b-dbwf3mv3as .25s ease;
}

[b-dbwf3mv3as] .math-solution-title {
    font-weight: 800;
    color: var(--m-amber);
    margin-bottom: .4rem;
}

[b-dbwf3mv3as] .math-solution-header {
    font-weight: 800;
    color: var(--m-amber);
    margin-bottom: .6rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

[b-dbwf3mv3as] .math-solution-steps {
    padding-left: 1.25rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    font-size: .95rem;
    color: var(--m-ink);
}

[b-dbwf3mv3as] .math-solution-steps li::marker {
    color: var(--m-amber);
    font-weight: 700;
}

[b-dbwf3mv3as] .math-correct-title {
    font-size: 1.05rem;
}

[b-dbwf3mv3as] .math-correct-xp {
    font-size: .9rem;
    font-weight: 800;
    color: var(--m-green);
    margin-top: .15rem;
}

[b-dbwf3mv3as] .math-turbo-label {
    color: var(--m-amber);
    margin-left: .3rem;
}

[b-dbwf3mv3as] .math-hint-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1;
}

/* Next button */
[b-dbwf3mv3as] .math-next-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--m-green) 0%, #15803d 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    min-height: 56px;
    box-shadow: 0 4px 16px rgba(22,163,74,.3);
    transition: transform .15s, box-shadow .15s;
    animation: m-pulse-green-b-dbwf3mv3as 2s infinite;
}

[b-dbwf3mv3as] .math-next-btn:hover  { transform: scale(1.02); box-shadow: 0 6px 20px rgba(22,163,74,.4); }
[b-dbwf3mv3as] .math-next-btn:active { transform: scale(.98); }

/* Focus ring for keyboard nav */
[b-dbwf3mv3as] :focus-visible {
    outline: 3px solid var(--m-purple);
    outline-offset: 2px;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .math-page[b-dbwf3mv3as] {
        padding: 1rem .75rem 2rem;
    }

    .math-play-layout[b-dbwf3mv3as] {
        flex-direction: column;
    }

    /* Uppgiften visas FÖRST på mobil – barnet ser frågan direkt */
    .math-exercise-col[b-dbwf3mv3as] {
        order: -1;
    }

    .math-sidebar[b-dbwf3mv3as] {
        flex: none;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    /* Kompakt statuspanel på mobil */
    [b-dbwf3mv3as] .math-status-panel {
        padding: .75rem;
        gap: .6rem;
    }

    [b-dbwf3mv3as] .math-streak-row {
        flex-direction: row;
    }

    [b-dbwf3mv3as] .math-accuracy,
    [b-dbwf3mv3as] .math-perk-section {
        font-size: .8rem;
    }

    [b-dbwf3mv3as] .math-question-text {
        font-size: 1.6rem;
        word-break: break-word;
    }

    [b-dbwf3mv3as] .math-question-box {
        padding: 1rem .75rem;
    }

    [b-dbwf3mv3as] .math-answer-row {
        flex-direction: column;
    }

    [b-dbwf3mv3as] .math-answer-input {
        font-size: 1.4rem;
        text-align: center;
        min-height: 56px;
    }

    [b-dbwf3mv3as] .math-answer-btn {
        width: 100%;
        justify-content: center;
        font-size: 1.2rem;
        min-height: 56px;
    }

    [b-dbwf3mv3as] .math-next-btn {
        font-size: 1.1rem;
        min-height: 52px;
    }

    [b-dbwf3mv3as] .math-hint-btn,
    [b-dbwf3mv3as] .math-solution-btn,
    [b-dbwf3mv3as] .math-skip-btn {
        flex: 1 1 auto;
        justify-content: center;
        min-height: 48px;
        font-size: .85rem;
    }

    [b-dbwf3mv3as] .math-exercise-card {
        padding: 1.25rem 1rem;
        gap: 1rem;
        border-radius: var(--m-radius);
    }

    /* Kompakt statuspanel – avatar horisontell, dölj detaljerade sektioner */
    [b-dbwf3mv3as] .math-status-avatar {
        flex-direction: row;
        align-items: center;
        gap: .5rem;
    }

    [b-dbwf3mv3as] .math-avatar-emoji {
        font-size: 2rem;
    }

    [b-dbwf3mv3as] .math-status-level {
        font-size: .9rem;
    }

    [b-dbwf3mv3as] .math-status-xp-total {
        font-size: .75rem;
    }

    [b-dbwf3mv3as] .math-streak-val {
        font-size: 1.2rem;
    }

    [b-dbwf3mv3as] .math-back-btn {
        width: 100%;
    }

    /* Dölj perks-sektionen på mobil – tar för mycket plats */
    [b-dbwf3mv3as] .math-perk-section {
        display: none;
    }

    .math-hero-title[b-dbwf3mv3as] {
        font-size: 1.5rem;
    }

    .math-hero-sub[b-dbwf3mv3as] {
        font-size: .95rem;
    }

    .math-section-card[b-dbwf3mv3as] {
        padding: 1rem;
    }

    .math-grade-grid[b-dbwf3mv3as] {
        grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
        gap: .5rem;
    }

    .math-start-btn[b-dbwf3mv3as] {
        width: 100%;
        font-size: 1.15rem;
        padding: .9rem 2rem;
    }

    .math-topic-wrap[b-dbwf3mv3as] {
        gap: .4rem;
    }

    .math-topic-pill[b-dbwf3mv3as] {
        font-size: .85rem;
        padding: .5rem .9rem;
        min-height: 44px;
    }

    .math-progress-grid[b-dbwf3mv3as] {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: .5rem;
    }

    .math-next-reward-row[b-dbwf3mv3as] {
        gap: .5rem;
    }

    .math-next-reward-emoji[b-dbwf3mv3as] {
        font-size: 2rem;
    }
}

/* Mycket liten skärm – extra kompakt */
@media (max-width: 400px) {
    [b-dbwf3mv3as] .math-question-text {
        font-size: 1.3rem;
    }

    [b-dbwf3mv3as] .math-answer-input {
        font-size: 1.2rem;
    }

    [b-dbwf3mv3as] .math-answer-btn {
        font-size: 1rem;
    }

    [b-dbwf3mv3as] .math-exercise-card {
        padding: 1rem .75rem;
    }

    [b-dbwf3mv3as] .math-question-box {
        padding: .85rem .6rem;
    }

    .math-grade-grid[b-dbwf3mv3as] {
        grid-template-columns: repeat(5, 1fr);
    }

    .math-hero-title[b-dbwf3mv3as] {
        font-size: 1.3rem;
    }

    .math-mascot[b-dbwf3mv3as] {
        font-size: 3rem;
    }

    .math-section-card[b-dbwf3mv3as] {
        padding: .75rem;
    }

    .math-topic-pill[b-dbwf3mv3as] {
        font-size: .8rem;
        padding: .45rem .75rem;
    }

    .math-progress-grid[b-dbwf3mv3as] {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* ── Mobiltangentbord: säkerställ att svarsfältet alltid syns ── */
@media (max-width: 768px) {
    /* Extra luft nedtill så tangentbordet inte döljer svarsknappen */
    [b-dbwf3mv3as] .math-exercise-card {
        padding-bottom: 2rem;
    }

    /* Förhindra iOS-zoom: font-size >= 16px krävs */
    [b-dbwf3mv3as] .math-answer-input {
        font-size: max(1.4rem, 16px);
    }

    /* Svarsfältet fästs längst ned ovanför tangentbordet */
    [b-dbwf3mv3as] .math-answer-row {
        position: sticky;
        bottom: 0;
        z-index: 10;
        background: var(--m-card);
        padding: .75rem 0;
        margin: 0 -.5rem;
        padding-left: .5rem;
        padding-right: .5rem;
        border-top: 1px solid var(--m-border);
    }

    /* Ge plats för sticky-svarsraden */
    .math-exercise-col[b-dbwf3mv3as] {
        padding-bottom: 5rem;
    }
}

/* ── ADHD-anpassning: reducera animationer ─────────────── */
@media (prefers-reduced-motion: reduce) {
    .math-mascot[b-dbwf3mv3as],
    .math-arrow-hint[b-dbwf3mv3as] {
        animation: none;
    }

    .math-start-btn[b-dbwf3mv3as],
    [b-dbwf3mv3as] .math-next-btn {
        animation: none;
    }

    [b-dbwf3mv3as] .math-xp-flash {
        animation: none;
        opacity: 1;
    }

    [b-dbwf3mv3as] .math-avatar-emoji {
        animation: none;
    }

    .math-section-card--slide[b-dbwf3mv3as],
    [b-dbwf3mv3as] .math-exercise-card,
    [b-dbwf3mv3as] .math-hint-item,
    [b-dbwf3mv3as] .math-feedback--wrong,
    [b-dbwf3mv3as] .math-feedback--correct,
    [b-dbwf3mv3as] .math-solution-box,
    .math-start-screen[b-dbwf3mv3as] {
        animation: none;
    }
}

/* ── Dagligt mål ──────────────────────────────────────── */

.math-daily-goal[b-dbwf3mv3as] {
    border-left: 4px solid var(--m-green);
}

.math-daily-msg[b-dbwf3mv3as] {
    font-size: 1rem;
    margin: 0;
}

.math-daily-streak[b-dbwf3mv3as] {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: .5rem;
    color: var(--m-amber);
}

/* ── Nästa belöning (FOMO-teaser) ─────────────────────── */

.math-next-reward[b-dbwf3mv3as] {
    border-left: 4px solid var(--m-purple);
    background: linear-gradient(135deg, var(--m-purple-lt), var(--m-white));
}

.math-next-reward-row[b-dbwf3mv3as] {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.math-next-reward-emoji[b-dbwf3mv3as] {
    font-size: 2.5rem;
}
/* _content/Frontend/Features/Matematik/Components/MatteKrossPanel.razor.rz.scp.css */
.crush-game[b-3qzvxgbvc0] {
    max-width: 500px;
    margin: 0 auto;
}

.crush-board-wrapper[b-3qzvxgbvc0] {
    position: relative;
}

.crush-board[b-3qzvxgbvc0] {
    display: grid;
    grid-template-columns: repeat(var(--crush-cols, 7), 1fr);
    gap: 4px;
    padding: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.crush-tile[b-3qzvxgbvc0] {
    aspect-ratio: 1;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.3s;
    user-select: none;
}

.crush-tile:hover:not(:disabled)[b-3qzvxgbvc0] {
    transform: scale(1.1);
    z-index: 1;
}

.crush-tile--num[b-3qzvxgbvc0] {
    background: #fff;
    color: #333;
    border-color: #ddd;
}

.crush-tile--v1[b-3qzvxgbvc0], .crush-tile--v2[b-3qzvxgbvc0] { background: #e8f5e9; border-color: #a5d6a7; }
.crush-tile--v3[b-3qzvxgbvc0], .crush-tile--v4[b-3qzvxgbvc0] { background: #e3f2fd; border-color: #90caf9; }
.crush-tile--v5[b-3qzvxgbvc0], .crush-tile--v6[b-3qzvxgbvc0] { background: #fff3e0; border-color: #ffcc80; }
.crush-tile--v7[b-3qzvxgbvc0], .crush-tile--v8[b-3qzvxgbvc0] { background: #fce4ec; border-color: #f48fb1; }
.crush-tile--v9[b-3qzvxgbvc0], .crush-tile--v0[b-3qzvxgbvc0] { background: #f3e5f5; border-color: #ce93d8; }

.crush-tile--op[b-3qzvxgbvc0] {
    background: #ffeb3b;
    color: #333;
    border-color: #fbc02d;
    font-size: 1.3rem;
}

.crush-tile--selected[b-3qzvxgbvc0] {
    transform: scale(1.12);
    box-shadow: 0 0 0 3px #2196f3, 0 4px 12px rgba(33, 150, 243, 0.4);
    border-color: #2196f3;
    z-index: 2;
}

.crush-tile--matched[b-3qzvxgbvc0] {
    opacity: 0;
    transform: scale(0.3) rotate(15deg);
    pointer-events: none;
}

.crush-tile--fall[b-3qzvxgbvc0] {
    animation: crushFall 0.35s ease-out;
}

@@keyframes crushFall {
    from[b-3qzvxgbvc0] { transform: translateY(-40px); opacity: 0.5; }
    to[b-3qzvxgbvc0]   { transform: translateY(0); opacity: 1; }
}

.crush-selection[b-3qzvxgbvc0] {
    text-align: center;
}

.crush-selection-tile[b-3qzvxgbvc0] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
}

.crush-selection-eq[b-3qzvxgbvc0] {
    font-size: 1.3rem;
    font-weight: 700;
    color: #4caf50;
}

.crush-selection-answer[b-3qzvxgbvc0] {
    color: #2196f3;
}

.crush-level-complete[b-3qzvxgbvc0] {
    background: linear-gradient(135deg, #fff9c4 0%, #c8e6c9 100%);
    border-radius: 16px;
    border: 3px solid #81c784;
    animation: levelPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@@keyframes levelPop {
    from[b-3qzvxgbvc0] { transform: scale(0.7); opacity: 0; }
    to[b-3qzvxgbvc0]   { transform: scale(1);   opacity: 1; }
}

.crush-eval-overlay[b-3qzvxgbvc0] {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    backdrop-filter: blur(2px);
    z-index: 10;
    animation: evalFadeIn 0.15s ease-out;
}

.crush-eval-bubble[b-3qzvxgbvc0] {
    font-size: 4rem;
    line-height: 1;
    animation: evalBounce 0.6s ease-in-out infinite alternate;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
}

@@keyframes evalFadeIn {
    from[b-3qzvxgbvc0] { opacity: 0; transform: scale(0.85); }
    to[b-3qzvxgbvc0]   { opacity: 1; transform: scale(1); }
}

@@keyframes evalBounce {
    from[b-3qzvxgbvc0] { transform: translateY(0) rotate(-8deg) scale(1); }
    to[b-3qzvxgbvc0]   { transform: translateY(-12px) rotate(8deg) scale(1.1); }
}
/* _content/Frontend/Features/Matematik/Components/VisueltStodPanel.razor.rz.scp.css */
/* ═══════════════════════════════════════════════════════════════
   Visuellt stöd – VisueltStodPanel
   Aldrig horisontell scroll. Enkelt och tydligt för barn med ADHD.
   ═══════════════════════════════════════════════════════════════ */

/* ── Yttre wrapper: stäng ute all overflow ── */
.vstod-wrapper[b-7f3we8udtf] {
    margin-top: 0.75rem;
    max-width: 100%;
    overflow: hidden;
}

/* ── Växlingsknapp ── */
.vstod-toggle[b-7f3we8udtf] {
    background: none;
    border: 2px dashed #a78bfa;
    border-radius: 999px;
    color: #7c3aed;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    width: 100%;
    text-align: center;
}

.vstod-toggle:hover[b-7f3we8udtf] {
    background: #ede9fe;
    color: #5b21b6;
}

/* ── Panelen ── */
.vstod-panel[b-7f3we8udtf] {
    margin-top: 0.75rem;
    padding: 1rem;
    background: #faf5ff;
    border-radius: 1rem;
    border: 2px solid #ddd6fe;
    max-width: 100%;
    box-sizing: border-box;
    animation: vstod-fade-in-b-7f3we8udtf 0.25s ease;
}

@keyframes vstod-fade-in-b-7f3we8udtf {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Sektion: alltid centrerad kolumn ── */
.vstod-section[b-7f3we8udtf] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

/* ── Etikett ── */
.vstod-label[b-7f3we8udtf] {
    font-size: 0.82rem;
    font-weight: 700;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
}

/* ════════════════════════════════════════════════
   PROCENT – 10x10 rutnät
   ════════════════════════════════════════════════ */
.vstod-pct-grid[b-7f3we8udtf] {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
    width: min(260px, 100%);
}

.vstod-pct-cell[b-7f3we8udtf] {
    aspect-ratio: 1;
    border-radius: 3px;
    background: #e9d5ff;
}

.vstod-pct-cell--on[b-7f3we8udtf] {
    background: #7c3aed;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.35);
}

.vstod-pct-hint[b-7f3we8udtf] {
    font-size: 0.82rem;
    color: #7c3aed;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

/* ════════════════════════════════════════════════
   EKVATIONSRAD – flex-wrap så den aldrig spricker
   ════════════════════════════════════════════════ */
.vstod-equation[b-7f3we8udtf] {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.vstod-eq-part[b-7f3we8udtf] {
    font-size: 1.25rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 0.5rem;
}

.vstod-eq-pct[b-7f3we8udtf]  { background: #ddd6fe; color: #5b21b6; }
.vstod-eq-base[b-7f3we8udtf] { background: #bfdbfe; color: #1e40af; }
.vstod-eq-ans[b-7f3we8udtf]  { background: #bbf7d0; color: #15803d; font-size: 1.5rem; }
.vstod-eq-unknown[b-7f3we8udtf] { background: #f3f4f6; color: #6b7280; font-size: 1.5rem; border: 2px dashed #d1d5db; }

.vstod-eq-op[b-7f3we8udtf] {
    font-size: 1.1rem;
    font-weight: 700;
    color: #6b7280;
}

/* ════════════════════════════════════════════════
   FÖRKLARINGSTEXT
   ════════════════════════════════════════════════ */
.vstod-caption[b-7f3we8udtf] {
    font-size: 0.9rem;
    color: #374151;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

/* ════════════════════════════════════════════════
   PRICKAR – ADDITION och SUBTRAKTION
   Vertikal stapel: inga horisontella overflow-risker
   ════════════════════════════════════════════════ */
.vstod-dot-col[b-7f3we8udtf] {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
}

.vstod-dot-block[b-7f3we8udtf] {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.vstod-dot-block--result[b-7f3we8udtf] {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 0.6rem;
    padding: 0.3rem 0.5rem;
}

.vstod-dots[b-7f3we8udtf] {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    max-width: calc(100% - 4rem);
}

.vstod-dot[b-7f3we8udtf] {
    font-size: 1.2rem;
    line-height: 1;
}

.vstod-dot--a[b-7f3we8udtf]       { color: #7c3aed; }
.vstod-dot--b[b-7f3we8udtf]       { color: #2563eb; }
.vstod-dot--removed[b-7f3we8udtf] { color: #d1d5db; text-decoration: line-through; }

.vstod-block-label[b-7f3we8udtf] {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.vstod-block-label--a[b-7f3we8udtf]   { color: #5b21b6; }
.vstod-block-label--b[b-7f3we8udtf]   { color: #1e40af; }
.vstod-block-label--ans[b-7f3we8udtf] { color: #15803d; font-size: 1.05rem; }

.vstod-step-op[b-7f3we8udtf] {
    font-size: 1.5rem;
    font-weight: 900;
    color: #9ca3af;
    padding-left: 0.25rem;
    line-height: 1;
}

/* ════════════════════════════════════════════════
   MULTIPLIKATION – begränsad gitter-bredd
   ════════════════════════════════════════════════ */
.vstod-grid-wrap[b-7f3we8udtf] {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.vstod-grid[b-7f3we8udtf] {
    display: grid;
    grid-template-columns: repeat(var(--cols), auto);
    gap: 3px;
    max-width: 100%;
}

.vstod-grid-dot[b-7f3we8udtf] {
    font-size: clamp(0.55rem, 3.5vw, 1.05rem);
    line-height: 1;
}

.vstod-grid-dot--row0[b-7f3we8udtf] { color: #7c3aed; }
.vstod-grid-dot--row1[b-7f3we8udtf] { color: #2563eb; }

/* ════════════════════════════════════════════════
   DIVISION – omslutande flex med radbrytning
   ════════════════════════════════════════════════ */
.vstod-groups-row[b-7f3we8udtf] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
}

.vstod-group-circle[b-7f3we8udtf] {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    align-items: center;
    border: 2px solid #a78bfa;
    border-radius: 0.75rem;
    padding: 0.4rem 0.5rem 1.5rem;
    background: #f5f3ff;
    max-width: min(90px, 45%);
    position: relative;
}

.vstod-group-num[b-7f3we8udtf] {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.78rem;
    font-weight: 700;
    color: #7c3aed;
    white-space: nowrap;
}

/* ════════════════════════════════════════════════
   BRÅK – stapel som alltid ryms i bredden
   ════════════════════════════════════════════════ */
.vstod-frac-bar[b-7f3we8udtf] {
    display: flex;
    width: 100%;
    max-width: 360px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid #a78bfa;
    height: 44px;
    flex-shrink: 0;
}

/* Rad: stapel + chip bredvid varandra */
.vstod-frac-row[b-7f3we8udtf] {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    max-width: 360px;
}

.vstod-frac-cell[b-7f3we8udtf] {
    flex: 1;
    border-right: 1px solid rgba(167, 139, 250, 0.35);
    transition: background 0.2s;
    min-width: 0;
}

.vstod-frac-cell:last-child[b-7f3we8udtf] { border-right: none; }

.vstod-frac-cell--a[b-7f3we8udtf]     { background: #7c3aed; }
.vstod-frac-cell--b[b-7f3we8udtf]     { background: #2563eb; }
.vstod-frac-cell--empty[b-7f3we8udtf] { background: #ede9fe; }

.vstod-frac-legend[b-7f3we8udtf] {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.vstod-frac-legend-chip[b-7f3we8udtf] {
    font-size: 1.1rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 0.4rem;
}

.vstod-frac-legend-chip--a[b-7f3we8udtf]   { background: #ddd6fe; color: #5b21b6; }
.vstod-frac-legend-chip--b[b-7f3we8udtf]   { background: #bfdbfe; color: #1e40af; }
.vstod-frac-legend-chip--ans[b-7f3we8udtf] { background: #bbf7d0; color: #15803d; font-size: 1.25rem; }

.vstod-frac-legend-op[b-7f3we8udtf] {
    font-size: 1.1rem;
    font-weight: 700;
    color: #6b7280;
}

/* ════════════════════════════════════════════════
   TALLINJE – aldrig horisontell scroll
   Streckmarkeringarna fyller bredden jämnt
   ════════════════════════════════════════════════ */
.vstod-numline[b-7f3we8udtf] {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vstod-numline-track[b-7f3we8udtf] {
    display: flex;
    width: 100%;
    align-items: flex-end;
    border-bottom: 3px solid #c4b5fd;
    min-height: 50px;
    overflow: hidden;
}

.vstod-numline-tick[b-7f3we8udtf] {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.vstod-numline-mark[b-7f3we8udtf] {
    display: block;
    width: 2px;
    height: 12px;
    background: #a78bfa;
    border-radius: 2px;
}

.vstod-numline-tick--a .vstod-numline-mark[b-7f3we8udtf] {
    height: 22px;
    background: #7c3aed;
    width: 3px;
}

.vstod-numline-tick--ans .vstod-numline-mark[b-7f3we8udtf] {
    height: 30px;
    background: #15803d;
    width: 4px;
}

.vstod-numline-lbl[b-7f3we8udtf] {
    font-size: clamp(0.6rem, 2.5vw, 0.8rem);
    font-weight: 600;
    color: #9ca3af;
    margin-top: 3px;
    white-space: nowrap;
}

.vstod-numline-tick--a   .vstod-numline-lbl[b-7f3we8udtf] { color: #7c3aed; font-weight: 800; }
.vstod-numline-tick--ans .vstod-numline-lbl[b-7f3we8udtf] { color: #15803d; font-weight: 900; font-size: clamp(0.75rem, 3vw, 0.95rem); }

/* ════════════════════════════════════════════════
   GEOMETRI – Rektangel
   ════════════════════════════════════════════════ */
.vstod-geo-grid .vstod-geo-cell[b-7f3we8udtf] {
    aspect-ratio: 1;
    background: #a78bfa;
    border: 1px solid #ede9fe;
    border-radius: 2px;
}

.vstod-geo-dims[b-7f3we8udtf] {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.vstod-geo-dim[b-7f3we8udtf] {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.vstod-geo-dim--w[b-7f3we8udtf] { background: #bfdbfe; color: #1e40af; }
.vstod-geo-dim--h[b-7f3we8udtf] { background: #ddd6fe; color: #5b21b6; }

/* ════════════════════════════════════════════════
   GEOMETRI – Triangel SVG
   ════════════════════════════════════════════════ */
.vstod-triangle-svg[b-7f3we8udtf] {
    width: 100%;
    max-width: 260px;
    height: auto;
}

/* ════════════════════════════════════════════════
   ALGEBRA – Balansvåg
   ════════════════════════════════════════════════ */
.vstod-scale[b-7f3we8udtf] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.vstod-scale-side[b-7f3we8udtf] {
    flex: 1;
    min-width: 0;
    max-width: 44%;
    background: #f5f3ff;
    border: 2px solid #a78bfa;
    border-radius: 0.75rem;
    padding: 0.5rem;
}

.vstod-scale-side--right[b-7f3we8udtf] {
    background: #eff6ff;
    border-color: #93c5fd;
}

.vstod-scale-content[b-7f3we8udtf] {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

.vstod-scale-beam[b-7f3we8udtf] {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.vstod-algebra-xbox[b-7f3we8udtf] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #7c3aed;
    color: #fff;
    font-weight: 900;
    font-size: 0.9rem;
    border-radius: 5px;
    flex-shrink: 0;
}

.vstod-algebra-xbox--inline[b-7f3we8udtf] {
    width: 22px;
    height: 22px;
    font-size: 0.8rem;
    vertical-align: middle;
    display: inline-flex;
}

.vstod-algebra-plus[b-7f3we8udtf] {
    font-size: 1.1rem;
    font-weight: 900;
    color: #6b7280;
}

.vstod-algebra-block[b-7f3we8udtf] {
    width: 18px;
    height: 18px;
    background: #a78bfa;
    border-radius: 3px;
    flex-shrink: 0;
}

.vstod-algebra-block--rhs[b-7f3we8udtf] {
    background: #60a5fa;
}

/* ════════════════════════════════════════════════
   STATISTIK – Stapeldiagram
   ════════════════════════════════════════════════ */
.vstod-bars[b-7f3we8udtf] {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 100px;
    width: 100%;
    justify-content: center;
}

.vstod-bar-col[b-7f3we8udtf] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    max-width: 40px;
    height: 100%;
    justify-content: flex-end;
}

.vstod-bar-val[b-7f3we8udtf] {
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
}

.vstod-bar[b-7f3we8udtf] {
    width: 100%;
    border-radius: 4px 4px 0 0;
    min-height: 8px;
}

.vstod-bar--0[b-7f3we8udtf] { background: #7c3aed; }
.vstod-bar--1[b-7f3we8udtf] { background: #2563eb; }
.vstod-bar--2[b-7f3we8udtf] { background: #059669; }
.vstod-bar--3[b-7f3we8udtf] { background: #d97706; }

/* ════════════════════════════════════════════════
   DECIMALTAL – Hela och tiondelar
   ════════════════════════════════════════════════ */
.vstod-dec-grid[b-7f3we8udtf] {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.vstod-dec-row[b-7f3we8udtf] {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    max-width: 100%;
}

.vstod-dec-label[b-7f3we8udtf] {
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
    min-width: 2.5rem;
    flex-shrink: 0;
}

.vstod-dec-block[b-7f3we8udtf] {
    border-radius: 3px;
    flex-shrink: 0;
}

/* Helt tal: stor kvadrat */
.vstod-dec-block--whole[b-7f3we8udtf]      { width: 22px; height: 22px; background: #7c3aed; }
.vstod-dec-block--b[b-7f3we8udtf]          { background: #2563eb; }

/* Tiondel: smal rektangel */
.vstod-dec-block--tenth[b-7f3we8udtf]      { width: 8px; height: 22px; background: #a78bfa; }
.vstod-dec-block--b-tenth[b-7f3we8udtf]    { background: #93c5fd; }

.vstod-dec-legend[b-7f3we8udtf] {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.vstod-dec-legend-chip[b-7f3we8udtf] {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}


.vstod-dec-legend-chip--whole[b-7f3we8udtf] { background: #ddd6fe; color: #5b21b6; }
.vstod-dec-legend-chip--tenth[b-7f3we8udtf] { background: #ede9fe; color: #7c3aed; border: 1px dashed #a78bfa; }

/* ════════════════════════════════════════════════
   MOBIL – kompakta justeringar
   ════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .vstod-panel[b-7f3we8udtf] {
        padding: .75rem;
    }

    .vstod-eq-part[b-7f3we8udtf] {
        font-size: 1.1rem;
        padding: .15rem .4rem;
    }

    .vstod-eq-ans[b-7f3we8udtf],
    .vstod-eq-unknown[b-7f3we8udtf] {
        font-size: 1.25rem;
    }

    .vstod-scale-side[b-7f3we8udtf] {
        max-width: 46%;
        padding: .4rem;
    }

    .vstod-scale-beam[b-7f3we8udtf] {
        font-size: 1.4rem;
    }

    .vstod-algebra-xbox[b-7f3we8udtf] {
        width: 24px;
        height: 24px;
        font-size: .8rem;
    }

    .vstod-frac-bar[b-7f3we8udtf] {
        height: 38px;
    }

    .vstod-frac-row[b-7f3we8udtf] {
        max-width: 100%;
    }

    .vstod-bars[b-7f3we8udtf] {
        height: 80px;
        gap: 4px;
    }

    .vstod-bar-col[b-7f3we8udtf] {
        max-width: 32px;
    }

    .vstod-bar-val[b-7f3we8udtf] {
        font-size: .65rem;
    }
}
/* _content/Frontend/Layout/NavMenu.razor.rz.scp.css */
.nav-divider[b-nj04crnsoa] {
    border-color: rgba(255, 255, 255, 0.15);
    margin: 0.5rem 0;
}

.nav-category-label[b-nj04crnsoa] {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.nav-category-label:hover[b-nj04crnsoa] {
    color: rgba(255, 255, 255, 0.75);
}
