
@font-face {
    font-family: 'Lora';
    src: url('../fonts/lora-v35-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lora';
    src: url('../fonts/lora-v35-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('../fonts/source-sans-3-v15-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Source Sans 3';
    src: url('../fonts/source-sans-3-v15-latin-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v44-latin-var.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/open-sans-v44-latin-var.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --rt-primary:         #f97c5f;
    --rt-primary-hover:   #ef6244;
    --rt-primary-light:   #fdeee7;
    --rt-primary-soft:    #fbb4a3;

    --rt-secondary:       #9b51e0;
    --rt-secondary-light: #b98aec;
    --rt-secondary-pale:  #f3ebfd;

    --rt-accent:          #9b51e0;
    --rt-accent-soft:     #f3ebfd;

    --rt-success:         #2f9e6b;
    --rt-success-bg:      #e6f5ee;
    --rt-success-text:    #1b6b47;

    --rt-error:           #e0524f;
    --rt-error-bg:        #fbe7e6;
    --rt-error-text:      #8a2b28;

    --rt-warning:         #d9922c;
    --rt-warning-bg:      #faefdc;
    --rt-warning-text:    #7a4f0a;

    --rt-neutral-bg:      #faf6f1;
    --rt-surface:         #ffffff;
    --rt-border:          #ece1d6;
    --rt-border-dark:     #c7d0d4;
    --rt-text:            #2c373f;
    --rt-text-muted:      #5c6a71;
    --rt-white:           #ffffff;

    --rt-radius:          10px;
    --rt-radius-sm:       8px;
    --rt-radius-lg:       16px;
    --rt-radius-xl:       24px;
    --rt-radius-2xl:      32px;  /* nur Showcase-Elemente (Score-Card) */
    --rt-radius-full:     9999px;

    --rt-shadow:          0 2px 12px rgba(44,55,63,0.07);
    --rt-shadow-hover:    0 6px 24px rgba(44,55,63,0.12);
    --rt-shadow-lg:       0 8px 32px rgba(44,55,63,0.14);
    --rt-shadow-2xl:      0 24px 64px rgba(44,55,63,0.20);
    --rt-shadow-glow:     0 0 0 4px rgba(249,124,95,0.24);
    --rt-shadow-glow-secondary: 0 0 0 4px rgba(155,81,224,0.24);
    --rt-shadow-orange:   0 4px 16px rgba(249,124,95,0.32);

    --rt-ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
    --rt-ease-in-out:     cubic-bezier(0.65, 0, 0.35, 1);

    --rt-glass-blur:          16px;
    --rt-glass-bg-light:      rgba(255,255,255,0.72);
    --rt-glass-bg-dark:       rgba(33,40,46,0.55);
    --rt-glass-border-soft:   rgba(255,255,255,0.35);

    --rt-font:            'Lora', 'Iowan Old Style', Georgia, serif;
    --rt-font-heading:    'Open Sans', 'Helvetica Neue', sans-serif;

    --level-a1:   #4fa89f;
    --level-a2:   #4a90d9;
    --level-b1:   #9b51e0;
    --level-b2:   #6b46c1;
    --level-c1:   #f97c5f;
    --level-c2:   #b8622e;
}


@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%       { transform: translateX(-8px); }
    30%       { transform: translateX(8px); }
    45%       { transform: translateX(-6px); }
    60%       { transform: translateX(6px); }
    75%       { transform: translateX(-3px); }
    90%       { transform: translateX(3px); }
}

@keyframes pulse-orange {
    0%   { box-shadow: 0 0 0 0 rgba(249, 124, 95, 0.35); }
    70%  { box-shadow: 0 0 0 12px rgba(249, 124, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(249, 124, 95, 0); }
}

@keyframes pulse-green {
    0%   { box-shadow: 0 0 0 0 rgba(47, 158, 107, 0.35); }
    70%  { box-shadow: 0 0 0 12px rgba(47, 158, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(47, 158, 107, 0); }
}

.ex-hint-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    vertical-align: middle;
}

.ex-hint-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--rt-accent-soft);
    border: 1px solid var(--rt-accent);
    border-radius: 50%;
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    padding: 0;
    flex-shrink: 0;
}
.ex-hint-btn:hover,
.ex-hint-btn:focus-visible {
    background: var(--rt-accent);
    transform: scale(1.15);
    outline: 2px solid var(--rt-accent);
    outline-offset: 2px;
}

.ex-hint-text {
    font-size: 0.85rem;
    color: var(--rt-text-muted);
    background: var(--rt-accent-soft);
    border-left: 2px solid;
    border-image: linear-gradient(180deg, var(--rt-accent), transparent) 1;
    padding: 0.15rem 0.5rem;
    border-radius: 0 4px 4px 0;
    font-style: italic;
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes trophy-pop {
    0%   { transform: scale(0.5) rotate(-12deg); opacity: 0; }
    60%  { transform: scale(1.18) rotate(4deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes progress-fill {
    from { width: 0%; }
}

@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.daz-exercise {
    font-family: var(--rt-font);
    color: var(--rt-text);
    line-height: 1.65;
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 0;
}
.daz-exercise + .daz-exercise { margin-block-start: 2.5rem; }

.daz-exercise * {
    box-sizing: border-box;
}

.ex-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--rt-primary);
    position: relative;
}

.ex-branding-logo {
    position: absolute;
    top: 0;
    right: 0;
    max-height: 48px;
    max-width: 140px;
    object-fit: contain;
}
@media (max-width: 600px) {
    .ex-branding-logo { max-height: 32px; max-width: 100px; }
}

.ex-branding-copyright {
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--rt-border);
    font-size: 0.78rem;
    color: var(--rt-text-muted);
    text-align: center;
    font-style: italic;
}

.ex-title {
    font-family: var(--rt-font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--rt-text);
    margin: 0 0 0.3rem 0;
    line-height: 1.25;
    text-wrap: balance;
}

.ex-instruction {
    font-size: 1rem;
    color: var(--rt-text-muted);
    margin: 0;
    font-weight: 500;
    line-height: 1.55;
}

.ex-goal {
    font-size: 0.9rem;
    color: var(--rt-text-muted);
    margin: 0.35rem 0 0 0;
    font-weight: 400;
    line-height: 1.5;
    opacity: 0.85;
}

.ex-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.ex-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--rt-radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--rt-font);
    background: var(--rt-surface);
    color: var(--rt-text-muted);
    border: 1px solid var(--rt-border);
}

.ex-badge--level[data-level="A1"] { background: var(--level-a1); color: #fff; border-color: transparent; }
.ex-badge--level[data-level="A2"] { background: var(--level-a2); color: #fff; border-color: transparent; }
.ex-badge--level[data-level="B1"] { background: var(--level-b1); color: #fff; border-color: transparent; }
.ex-badge--level[data-level="B2"] { background: var(--level-b2); color: #fff; border-color: transparent; }
.ex-badge--level[data-level="C1"] { background: var(--level-c1); color: #fff; border-color: transparent; }
.ex-badge--level[data-level="C2"] { background: var(--level-c2); color: #fff; border-color: transparent; }

.ex-badge--level {
    background: var(--rt-primary);
    color: #fff;
    border-color: transparent;
}

.ex-progress-wrap {
    margin-bottom: 1.5rem;
}

.ex-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rt-text-muted);
    margin-bottom: 0.4rem;
    font-family: var(--rt-font);
}

.ex-progress-text {
    font-weight: 700;
    color: var(--rt-primary);
}

.ex-progress-track {
    height: 8px;
    background: var(--rt-surface);
    border-radius: var(--rt-radius-full);
    overflow: hidden;
    border: 1px solid var(--rt-border);
}

.ex-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--rt-primary), var(--rt-primary-soft));
    border-radius: var(--rt-radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0%;
}

.ex-progress-bar--complete {
    background: linear-gradient(90deg, var(--rt-success), #5cb85c);
    animation: pulse-green 1s ease-out;
}

.ex-question {
    margin: 0 0 1rem 0;
    font-weight: 700;
    line-height: 1.4;
}

.ex-area { counter-reset: ex-item; }
.ex-item { counter-increment: ex-item; }
.ex-question-image {
    margin: 0 0 0.75rem;
}
.ex-question-image img {
    display: block;
    max-width: min(100%, 16rem);
    height: auto;
    border-radius: var(--rt-radius, 8px);
}
.ex-question-image figcaption {
    font-size: 0.85em;
    color: var(--rt-text-muted, #5a6570);
    margin-top: 0.35rem;
}
.ex-prerender .ex-pre-image img { max-width: min(100%, 16rem); height: auto; }

.ex-item > .ex-question::before {
    content: counter(ex-item) ". ";
    color: var(--rt-primary);
    font-weight: 700;
}

.ex-item__feedback {
    margin: 1rem 0 0;
    padding: .6rem .9rem;
    border-radius: 8px;
    font-size: .95rem;
    line-height: 1.5;
}
.ex-item__feedback[data-stand="richtig"] { background: #e6f5ee; color: #14563b; }
.ex-item__feedback[data-stand="falsch"]  { background: #fdeee7; color: #8c3413; }
.ex-item__feedback-warum { display: block; margin-block-start: .35rem; }
.ex-item--collapsed .ex-item__feedback { display: none; }

.ex-item {
    background: var(--rt-white);
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-shadow: var(--rt-shadow);
}

.ex-item--correct {
    border-color: var(--rt-success) !important;
    background: var(--rt-success-bg) !important;
    animation: pulse-green 0.8s ease-out;
}

.ex-item--wrong {
    border-color: var(--rt-error) !important;
    background: var(--rt-error-bg) !important;
}

.ex-area--shake {
    animation: shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}


.ex-step-counter {
    position: relative;
    font-family: var(--rt-font);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--rt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    padding: 0.5rem 0.85rem;
    background: var(--rt-primary-light);
    border-radius: var(--rt-radius-sm);
    display: inline-block;
}
.ex-step-counter::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--rt-primary), transparent 65%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.ex-step-counter__current { color: var(--rt-primary); font-size: 1.1em; }
.ex-step-counter--done {
    background: var(--rt-success-bg);
    border-left-color: var(--rt-success);
    color: var(--rt-success-text);
}

[data-display-mode="sequential-stacked"] .ex-item--pending {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.4);
    transition: opacity 0.3s, filter 0.3s;
}
[data-display-mode="sequential-stacked"] .ex-item--active {
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 3px rgba(249, 124, 95, 0.15), var(--rt-shadow);
}
[data-display-mode="sequential-stacked"] .ex-item--answered {
    opacity: 0.85;
}

[data-display-mode="one-at-a-time"] .ex-item--pending,
[data-display-mode="one-at-a-time"] .ex-item--answered {
    display: none;
}
[data-display-mode="one-at-a-time"] .ex-item--active {
    border-color: var(--rt-primary);
    animation: slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.ex-item--collapsed {
    padding: 0.6rem 1rem !important;
    cursor: pointer;
    transition: padding 0.25s, background 0.25s;
}
.ex-item--collapsed > * { display: none; }
.ex-item--collapsed::before {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rt-text-muted);
    content: '▶ Aufgabe — klicken zum Aufklappen';
}
.ex-item--correct-summary.ex-item--collapsed::before {
    content: '✅ Richtig — klicken zum Aufklappen';
    color: var(--rt-success-text);
}
.ex-item--wrong-summary.ex-item--collapsed::before {
    content: '❌ Falsch — klicken zum Aufklappen';
    color: var(--rt-error-text);
}

.ex-input {
    padding: 0.45rem 0.85rem;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius-sm);
    font-family: var(--rt-font);
    font-size: 1rem;
    font-weight: 600;
    color: var(--rt-text);
    background: var(--rt-white);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 120px;
    text-align: center;
}

.ex-input:focus {
    border-color: var(--rt-primary);
    box-shadow: var(--rt-shadow-glow);
}

.ex-input.correct {
    border-color: var(--rt-success);
    background: var(--rt-success-bg);
    color: var(--rt-success-text);
    animation: pulse-green 0.8s ease-out;
}

.ex-input.wrong {
    border-color: var(--rt-error);
    background: var(--rt-error-bg);
    color: var(--rt-error-text);
}

.ex-input:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.ex-select {
    padding: 0.45rem 0.85rem;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius-sm);
    font-family: var(--rt-font);
    font-size: 1rem;
    font-weight: 600;
    color: var(--rt-text);
    background: var(--rt-white);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ex-select:focus {
    border-color: var(--rt-primary);
    box-shadow: var(--rt-shadow-glow);
}
.ex-select.correct { border-color: var(--rt-success); background: var(--rt-success-bg); }
.ex-select.wrong   { border-color: var(--rt-error);   background: var(--rt-error-bg);   }

.ex-tf-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}
.ex-tf-row .ex-chip {
    flex: 1 1 7rem;
    width: auto;
    min-width: 0;
    justify-content: center;
    text-align: center;
    margin-bottom: 0;
    padding-inline: 0.75rem;
}

.ex-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.9rem 1.25rem;
    margin-bottom: 0.6rem;
    background: var(--rt-white);
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    font-family: var(--rt-font);
    font-size: 1rem;
    font-weight: 600;
    color: var(--rt-text);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: var(--rt-shadow);
}

@media (hover: hover) {
    .ex-chip:hover:not(:disabled):not(.selected) {
        border-color: var(--rt-primary);
        background: var(--rt-primary-light);
        transform: translateX(3px);
        box-shadow: var(--rt-shadow-hover);
    }
}

.ex-chip.selected {
    border-color: var(--rt-primary);
    border-width: 3px;
    padding: calc(0.9rem - 1.5px) calc(1.25rem - 1.5px);
    background: var(--rt-primary-light);
    color: var(--rt-primary);
    font-weight: 800;
}

.ex-chip.correct {
    border-color: var(--rt-success);
    background: var(--rt-success-bg);
    color: var(--rt-success-text);
    cursor: default;
    animation: pulse-green 0.8s ease-out;
}

.ex-chip.wrong {
    border-color: var(--rt-error);
    background: var(--rt-error-bg);
    color: var(--rt-error-text);
    cursor: default;
}

.ex-chip.solution {
    background: var(--rt-success-bg);
    color: var(--rt-success-text);
    border-color: transparent;
    cursor: default;
}
.ex-chip.solution::before {
    content: "L\00F6sung: ";
    font-weight: 800;
}

.ex-chip.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.ex-chip:disabled {
    cursor: default;
    pointer-events: none;
}

.ex-zuord__liste {
    display: grid;
    gap: 0.6rem;
    margin: 0.5rem 0 0.75rem;
}
.ex-zuord__zeile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 0.6rem;
    align-items: stretch;
}
@media (max-width: 560px) {
    .ex-zuord__zeile { grid-template-columns: 1fr; gap: 0.3rem; }
}
.ex-zuord__links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--rt-radius);
    background: var(--rt-neutral-bg);
    font-weight: 700;
    color: var(--rt-text);
}
.ex-zuord__links .ex-chip-image { max-height: 56px; width: auto; }

.ex-reihe__plaetze {
    list-style: none;
    margin: 0.5rem 0 0.75rem;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}
.ex-reihe__zeile {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.6rem;
    align-items: center;
}
.ex-reihe__nr {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--rt-primary);
    color: var(--rt-white);
    font-weight: 800;
}

.ex-ablage {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 3.1rem;
    padding: 0.25rem;
    border-radius: var(--rt-radius);
    background: var(--rt-surface);
    box-shadow: inset 0 0 0 2px var(--rt-border);
    transition: background 0.15s, box-shadow 0.15s;
    cursor: pointer;
}
.ex-ablage:not(.is-belegt)::before {
    content: "Karte hierher";
    margin: auto;
    font-size: 0.85rem;
    color: var(--rt-text-muted);
}
.ex-ablage-aktiv .ex-ablage:not(.is-belegt) { background: var(--rt-primary-light); }
.ex-ablage.is-ueber { background: var(--rt-primary-soft); box-shadow: inset 0 0 0 2px var(--rt-primary); }
.ex-ablage:focus-visible { outline: 3px solid var(--rt-primary); outline-offset: 2px; }
.ex-ablage.is-richtig { background: var(--rt-success-bg); box-shadow: none; }
.ex-ablage.is-falsch  { background: var(--rt-error-bg);   box-shadow: none; }
.ex-ablage.is-fehlt::before { content: "fehlt noch"; color: var(--rt-error-text); font-weight: 700; }

.ex-ablage-hinweis {
    margin: 0.25rem 0 0.4rem;
    font-size: 0.85rem;
    color: var(--rt-text-muted);
}
.ex-ablage-stapel {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 3.4rem;
    padding: 0.75rem;
    border-radius: var(--rt-radius);
    background: var(--rt-neutral-bg);
}
.ex-ablage-stapel.is-ueber { background: var(--rt-primary-light); }
.ex-ablage-stapel.is-leer::before {
    content: "Alle Karten liegen in den Feldern.";
    margin: auto 0;
    font-size: 0.85rem;
    color: var(--rt-text-muted);
}

.ex-karte {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    border-radius: var(--rt-radius);
    background: var(--rt-white);
    color: var(--rt-text);
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10), 0 3px 8px rgba(0, 0, 0, 0.06);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.ex-karte .ex-chip-image { max-height: 64px; width: auto; }
.ex-ablage > .ex-karte { flex: 1 1 auto; }
.ex-karte:focus-visible { outline: 3px solid var(--rt-primary); outline-offset: 2px; }
.ex-karte.selected {
    background: var(--rt-primary-light);
    color: var(--rt-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}
.ex-karte.is-zieht { opacity: 0.45; }
.ex-karte.correct { background: var(--rt-success-bg); color: var(--rt-success-text); box-shadow: none; cursor: default; }
.ex-karte.wrong   { background: var(--rt-error-bg);   color: var(--rt-error-text);   box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
    .ex-karte.selected { transform: none; }
}

.ex-matching-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: column;
    grid-template-rows: repeat(var(--ex-zeilen, 1), auto);
    column-gap: 1.5rem;
    row-gap: 0.6rem;
    margin-bottom: 1rem;
}
.ex-matching-grid > .ex-match-item { margin-bottom: 0; }

.ex-match-item {
    padding: 0.9rem 1.25rem;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-white);
    cursor: pointer;
    font-weight: 700;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    margin-bottom: 0.6rem;
    position: relative;
    box-shadow: var(--rt-shadow);
    font-family: var(--rt-font);
}

@media (hover: hover) {
    .ex-match-item:hover:not(.matched):not(.disabled):not(.active) {
        border-color: var(--rt-primary);
        background: var(--rt-primary-light);
        box-shadow: var(--rt-shadow-hover);
    }
}

.ex-match-item.active {
    border-color: var(--rt-primary);
    background: var(--rt-primary-light);
    color: var(--rt-primary);
}

.ex-match-item.matched {
    border-color: var(--rt-primary);
    background: var(--rt-primary-light);
    color: var(--rt-primary);
    cursor: default;
    animation: pulse-orange 0.8s ease-out;
}

.ex-match-item.correct .match-badge { display: inline-flex; }

.ex-match-item--reich {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.ex-match-item--reich .ex-btn-audio { margin: 0; }

.ex-match-item.correct { border-color: var(--rt-success); background: var(--rt-success-bg); }
.ex-match-item.wrong   { border-color: var(--rt-error);   background: var(--rt-error-bg);   }

.match-badge {
    display: none;
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: var(--rt-success);
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.ex-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: var(--rt-radius);
    font-family: var(--rt-font);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.ex-btn:active { transform: scale(0.97); }

.ex-btn--check {
    background: var(--rt-primary);
    color: white;
    box-shadow: var(--rt-shadow-orange);
}

.ex-btn--check:hover:not(:disabled) {
    background: var(--rt-primary-hover);
    box-shadow: 0 6px 20px rgba(249, 124, 95, 0.45);
    transform: translateY(-1px);
}

.ex-btn--reset {
    background: var(--rt-surface);
    color: var(--rt-text-muted);
    border: 1.5px solid var(--rt-border);
}

.ex-btn--reset:hover:not(:disabled) {
    background: var(--rt-border);
    color: var(--rt-text);
    border-color: var(--rt-border-dark);
}

.ex-btn--retry-wrong {
    background: var(--rt-warning-bg);
    color: var(--rt-warning-text);
    border: 1.5px solid var(--rt-accent);
}

.ex-btn--retry-wrong:hover:not(:disabled) {
    background: #fde8b0;
}

.ex-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.ex-attempts {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rt-text-muted);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    min-height: 1.2em;
    font-family: var(--rt-font);
}

.ex-attempts--exhausted {
    color: var(--rt-error-text);
    font-weight: 700;
}

.ex-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.ex-feedback {
    padding: 1rem 1.25rem;
    border-radius: var(--rt-radius);
    font-weight: 600;
    font-size: 1rem;
    margin-top: 1.25rem;
    display: none;
    line-height: 1.6;
    font-family: var(--rt-font);
}

.ex-feedback.visible { display: block; }

.ex-feedback--correct {
    background: var(--rt-success-bg);
    color: var(--rt-success-text);
    border: 1.5px solid var(--rt-success);
}

.ex-feedback--wrong {
    background: var(--rt-error-bg);
    color: var(--rt-error-text);
    border: 1.5px solid var(--rt-error);
}

.ex-feedback--info {
    background: var(--rt-warning-bg);
    color: var(--rt-warning-text);
    border: 1.5px solid var(--rt-accent);
}

.ex-feedback__score {
    opacity: 0.8;
    font-weight: 500;
}

.ex-feedback__list {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
    font-weight: 500;
}

.ex-feedback__list li { margin-bottom: 0.2rem; }

.ex-feedback__explain {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    font-size: 0.9rem;
}

.ex-feedback__explain ul {
    margin: 0.25rem 0 0 0;
    padding-left: 1.25rem;
}

.ex-score-card {
    display: none;
    margin-top: 2rem;
}

.ex-score-card--visible {
    display: block;
    animation: slide-up 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.ex-hidden { display: none !important; }

.daz-exercise--kind .ex-header {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 1.5rem;
}
.daz-exercise--kind .ex-score-card--visible {
    animation: kind-einblenden 0.4s ease-out both;
}
@keyframes kind-einblenden {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}
.daz-exercise--kind .ex-score-card__inner--kind {
    background: var(--rt-secondary-pale, #f3ebfd);
    color: var(--rt-text, #2c373f);
    box-shadow: none;
    padding: 1.5rem 1.75rem;
    border-radius: var(--rt-radius-lg);
    text-align: center;
}
.daz-exercise--kind .ex-score-card--alle .ex-score-card__inner--kind {
    background: var(--rt-primary-light, #fdeee7);
}
.daz-exercise--kind .ex-score-card__inner--kind::before { display: none; }
.daz-exercise--kind .ex-score-card__satz {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
}
.daz-exercise--kind .ex-feedback__score { display: none; }
@media (prefers-reduced-motion: reduce) {
    .daz-exercise--kind .ex-score-card--visible { animation: none; }
}

.ex-score-card__inner {
    background: linear-gradient(135deg, #ef6244 0%, #f97c5f 55%, #fbb4a3 100%);
    border-radius: var(--rt-radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
    box-shadow: 0 8px 32px rgba(249, 124, 95, 0.4), 0 0 0 1px rgba(255,255,255,0.15) inset;
    position: relative;
    overflow: hidden;
}

.ex-score-card__inner::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.ex-score-card__trophy {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
    animation: trophy-pop 0.6s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.ex-score-card__percent {
    font-family: var(--rt-font-heading);
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    margin-bottom: 0.25rem;
}

.ex-score-card__label {
    font-family: var(--rt-font);
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.ex-score-card__stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.ex-score-card__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.ex-score-card__stat-value {
    font-family: var(--rt-font);
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.ex-score-card__stat-label {
    font-family: var(--rt-font);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
}

.ex-stub {
    padding: 2rem;
    background: var(--rt-warning-bg);
    border: 2px dashed var(--rt-accent);
    border-radius: var(--rt-radius);
    color: var(--rt-warning-text);
    font-weight: 700;
    text-align: center;
    font-family: var(--rt-font);
}

.ex-score {
    text-align: center;
    padding: 2rem;
    margin-top: 1rem;
}

.ex-score__number {
    font-family: var(--rt-font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--rt-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.ex-score__label {
    font-size: 1rem;
    color: var(--rt-text-muted);
    font-weight: 600;
    font-family: var(--rt-font);
}

.ex-drag-pool-wrap {
    background: var(--rt-surface);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.ex-drag-pool-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--rt-text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--rt-font);
}

.ex-drag-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 40px;
}

.ex-drag-word {
    display: inline-flex;
    padding: 0.4rem 0.85rem;
    background: white;
    border: 1.5px solid var(--rt-primary);
    border-radius: var(--rt-radius-full);
    color: var(--rt-primary);
    font-weight: 700;
    cursor: grab;
    user-select: none;
    transition: all 0.2s;
    font-family: var(--rt-font);
    font-size: 0.9rem;
}

.ex-drag-word:active { cursor: grabbing; }
.ex-drag-word.dragging { opacity: 0.5; }
.ex-drag-word.placed { border-color: var(--rt-text); color: var(--rt-text); background: var(--rt-surface); }
.ex-drag-word.disabled { pointer-events: none; opacity: 0.8; }
.ex-drag-word.selected {
    background: var(--rt-primary);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--rt-shadow-orange);
}

.ex-drag-texts { line-height: 2.2; }
.ex-drag-sentence { margin-bottom: 1rem; }

.ex-drop-zone {
    display: inline-flex;
    min-height: 36px;
    background: var(--rt-surface);
    border: 2px dashed var(--rt-border);
    border-radius: var(--rt-radius-sm);
    vertical-align: middle;
    margin: 0 0.4rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.ex-drop-zone.drag-over { background: var(--rt-primary-light); border-color: var(--rt-primary); }
.ex-drop-zone .ex-drag-word { margin: -2px; width: calc(100% + 4px); height: calc(100% + 4px); justify-content: center; border-style: solid; box-sizing: border-box; border-radius: var(--rt-radius-sm); }
.ex-drop-zone.correct { border-color: var(--rt-success); background: var(--rt-success-bg); }
.ex-drop-zone.wrong   { border-color: var(--rt-error);   background: var(--rt-error-bg);   }
.ex-drop-zone.correct .ex-drag-word { border-color: var(--rt-success); color: var(--rt-success); }
.ex-drop-zone.wrong   .ex-drag-word { border-color: var(--rt-error);   color: var(--rt-error);   }

.ex-gap-fill-text { line-height: 2; }
.ex-gap-fill-block { margin-bottom: 1.5rem; }

.ex-gap-input {
    font-family: var(--rt-font);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rt-text);
    padding: 0.3rem 0.6rem;
    margin: 0 0.3rem;
    border: 1.5px solid var(--rt-border);
    border-radius: 6px;
    outline: none;
    transition: all 0.2s;
    background: var(--rt-surface);
    text-align: center;
}

.ex-gap-input:focus { border-color: var(--rt-primary); box-shadow: var(--rt-shadow-glow); }
.ex-gap-input.correct { border-color: var(--rt-success); background: var(--rt-success-bg); color: var(--rt-success-text); }
.ex-gap-input.wrong   { border-color: var(--rt-error);   background: var(--rt-error-bg);   color: var(--rt-error-text); animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }
.ex-gap-input:disabled { opacity: 1; }

.ex-dialog-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ex-dialog-card {
    background: transparent;
    perspective: 1000px;
    height: 200px;
    cursor: pointer;
}

.ex-dialog-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.ex-dialog-card.flipped .ex-dialog-card-inner { transform: rotateY(180deg); }

.ex-dialog-card-front,
.ex-dialog-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    border-radius: var(--rt-radius-lg);
    box-shadow: var(--rt-shadow);
}

.ex-dialog-card-front {
    background: var(--rt-white);
    border: 1.5px solid var(--rt-border);
}

.ex-dialog-card-back {
    background: linear-gradient(135deg, var(--rt-primary-light), var(--rt-accent-soft));
    border: 1.5px solid var(--rt-primary);
    color: var(--rt-text);
    transform: rotateY(180deg);
}

.ex-dialog-text {
    font-family: var(--rt-font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--rt-text);
}

.ex-dialog-hint {
    font-size: 0.85rem;
    color: var(--rt-text-muted);
    font-weight: 500;
    font-family: var(--rt-font);
}

.ex-dialog-turn-btn {
    position: absolute;
    bottom: 1rem;
    background: transparent;
    border: none;
    color: var(--rt-text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: color 0.2s;
    font-family: var(--rt-font);
}

.ex-dialog-turn-btn:hover { color: var(--rt-primary); }
.ex-dialog-card-back .ex-dialog-turn-btn { color: var(--rt-primary-hover); }

.ex-sb-block { margin-bottom: 2rem; }

.ex-sb-hint {
    font-size: 0.85rem;
    color: var(--rt-text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-family: var(--rt-font);
}

.ex-sb-pool {
    min-height: 44px;
    padding: 1rem;
    background: var(--rt-surface);
    border: 1px dashed var(--rt-border);
    border-radius: var(--rt-radius);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ex-sb-dropzone {
    min-height: 48px;
    padding: 0.75rem;
    background: var(--rt-white);
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    transition: all 0.2s;
}

.ex-sb-dropzone.correct { border-color: var(--rt-success); background: var(--rt-success-bg); }
.ex-sb-dropzone.wrong   { border-color: var(--rt-error);   background: var(--rt-error-bg);   }

.ex-sb-word {
    padding: 0.4rem 0.85rem;
    background: white;
    border: 1.5px solid var(--rt-primary);
    border-radius: var(--rt-radius-full);
    color: var(--rt-primary);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9rem;
    font-family: var(--rt-font);
}

.ex-sb-word:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--rt-shadow-orange); }
.ex-sb-dropzone .ex-sb-word { background: var(--rt-surface); border-color: var(--rt-border-dark); color: var(--rt-text); border-radius: var(--rt-radius-full); }
.ex-sb-dropzone.correct .ex-sb-word { border-color: var(--rt-success); color: var(--rt-success-text); }
.ex-sb-dropzone.wrong   .ex-sb-word { border-color: var(--rt-error);   color: var(--rt-error-text);   }
.ex-sb-word:disabled { opacity: 0.8; cursor: not-allowed; }

.ex-sb-punctuation {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rt-text);
    margin-left: 0.2rem;
}

.ex-sb-dropzone.correct .ex-sb-punctuation { color: var(--rt-success-text); }
.ex-sb-dropzone.wrong   .ex-sb-punctuation { color: var(--rt-error-text);   }

.ex-il-image-wrap { margin-bottom: 1.5rem; text-align: center; }
.ex-il-image { max-width: 100%; border-radius: var(--rt-radius); border: 1px solid var(--rt-border); }

.ex-il-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 500px;
    margin: 0 auto;
}

.ex-il-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--rt-surface);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
}

.ex-il-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--rt-primary);
    color: white;
    font-weight: 800;
    border-radius: 50%;
    flex-shrink: 0;
    font-family: var(--rt-font);
}

.ex-il-input {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.95rem;
    font-family: var(--rt-font);
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius-sm);
    background: white;
    transition: all 0.2s;
}

.ex-il-input:focus { outline: none; border-color: var(--rt-primary); box-shadow: var(--rt-shadow-glow); }
.ex-il-input.correct { border-color: var(--rt-success); background: var(--rt-success-bg); color: var(--rt-success-text); }
.ex-il-input.wrong   { border-color: var(--rt-error);   background: var(--rt-error-bg);   color: var(--rt-error-text);   }
.ex-il-input:disabled { opacity: 1; }

.ex-reading-comp { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }

.ex-rc-text {
    padding: 1.5rem;
    background: var(--rt-surface);
    border-radius: var(--rt-radius);
    font-size: 1.05rem;
    line-height: 1.7;
    border: 1px solid var(--rt-border);
    font-family: var(--rt-font);
}

.ex-rc-questions { display: flex; flex-direction: column; gap: 1.5rem; }

.ex-rc-question-block {
    padding: 1rem;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-white);
    box-shadow: var(--rt-shadow);
}

.ex-rc-qtext {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--rt-text);
    font-family: var(--rt-font);
}

.ex-rc-options { display: flex; flex-direction: column; gap: 0.5rem; }

.ex-rc-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.1s;
    font-family: var(--rt-font);
}

.ex-rc-option:hover { background: var(--rt-surface); }
.ex-rc-option input[type="radio"] { cursor: pointer; accent-color: var(--rt-primary); }
.ex-rc-option.correct-opt { background: var(--rt-success-bg); color: var(--rt-success-text); font-weight: bold; border: 1px solid var(--rt-success); border-radius: 6px; }
.ex-rc-option.wrong-opt   { background: var(--rt-error-bg);   color: var(--rt-error-text);   text-decoration: line-through; }

@media (max-width: 800px) { .ex-reading-comp { grid-template-columns: 1fr; } }

.ex-timeline { display: flex; flex-direction: column; gap: 2rem; }

.ex-tl-pool-wrap {
    padding: 1rem;
    background: var(--rt-surface);
    border-radius: var(--rt-radius);
    border: 1px dashed var(--rt-border);
}

.ex-tl-instr { font-weight: bold; margin-bottom: 1rem; color: var(--rt-text-muted); font-family: var(--rt-font); }

.ex-tl-pool { display: flex; flex-wrap: wrap; gap: 0.75rem; min-height: 50px; }

.ex-tl-event {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 1rem;
    background: white;
    border: 1.5px solid var(--rt-primary);
    border-radius: var(--rt-radius-full);
    color: var(--rt-primary);
    font-weight: 600;
    cursor: grab;
    user-select: none;
    font-size: 0.9rem;
    transition: transform 0.1s, box-shadow 0.1s;
    font-family: var(--rt-font);
}

.ex-tl-event:active { cursor: grabbing; }
.ex-tl-event.dragging { opacity: 0.5; }
.ex-tl-event.disabled { cursor: not-allowed; opacity: 0.8; }
.ex-tl-event.selected {
    background: var(--rt-primary);
    color: #fff;
    box-shadow: 0 0 0 3px var(--rt-primary-light);
}

.ex-tl-track {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding-left: 20px;
    border-left: 4px solid;
    border-image: linear-gradient(180deg, var(--rt-primary-soft), transparent) 1;
    margin-left: 10px;
}

.ex-tl-point {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ex-tl-point::before {
    content: '';
    position: absolute;
    left: -28px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--rt-primary);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--rt-primary-soft);
}

.ex-tl-date { font-weight: 800; width: 100px; color: var(--rt-text); font-family: var(--rt-font); }

.ex-tl-dropzone {
    flex: 1;
    min-height: 46px;
    border: 2px dashed var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-surface);
    display: flex;
    align-items: center;
    padding: 0.4rem;
    transition: all 0.2s;
}

.ex-tl-dropzone.drag-over { background: var(--rt-primary-light); border-color: var(--rt-primary); }
.ex-tl-dropzone .ex-tl-event { margin: 0; width: 100%; text-align: center; background: var(--rt-primary); color: white; cursor: pointer; border-radius: var(--rt-radius-sm); }
.ex-tl-dropzone.correct { border-color: var(--rt-success); background: var(--rt-success-bg); }
.ex-tl-dropzone.wrong   { border-color: var(--rt-error);   background: var(--rt-error-bg);   }

.ex-word-search { display: flex; flex-direction: column; align-items: center; gap: 2rem; user-select: none; }

.ex-ws-grid {
    display: grid;
    gap: 2px;
    padding: 10px;
    background: var(--rt-border);
    border-radius: var(--rt-radius);
}

.ex-ws-cell {
    width: 36px;
    height: 36px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.05rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.1s;
    font-family: var(--rt-font);
}

.ex-ws-cell:hover { background: var(--rt-primary-light); }
.ex-ws-cell.selecting { background: var(--rt-primary); color: white; }
.ex-ws-cell.found { background: var(--rt-success); color: white; }

.ex-ws-hints { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; max-width: 500px; }

.ex-ws-hint-word {
    font-weight: bold;
    padding: 0.4rem 1rem;
    background: var(--rt-surface);
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius-full);
    transition: all 0.3s;
    font-family: var(--rt-font);
    font-size: 0.9rem;
}

.ex-ws-hint-word.found-hint {
    text-decoration: line-through;
    opacity: 0.5;
    background: var(--rt-neutral-bg);
}

.ex-crossword { display: flex; flex-direction: column; align-items: center; gap: 2rem; }

.ex-cw-grid {
    display: grid;
    gap: 0;
    background: var(--rt-text);
    border: 2px solid var(--rt-text);
}

.ex-cw-cell {
    width: 40px;
    height: 40px;
    background: white;
    position: relative;
    border: 1px solid var(--rt-text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ex-cw-empty { background: transparent; border-color: transparent; }

.ex-cw-cell input {
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    border: none;
    outline: none;
    background: transparent;
    padding: 0;
    font-family: var(--rt-font);
}

.ex-cw-cell input:focus { background: var(--rt-primary-light); }
.ex-cw-cell input.correct { background: var(--rt-success); color: white; }
.ex-cw-cell input.wrong   { background: var(--rt-error);   color: white; }

.ex-cw-num {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.6rem;
    font-weight: bold;
    color: var(--rt-text-muted);
    pointer-events: none;
}

.ex-cw-hints { display: flex; flex-wrap: wrap; gap: 2rem; width: 100%; justify-content: center; }
.ex-cw-hint-block { display: flex; flex-direction: column; gap: 0.5rem; max-width: 400px; }

.ex-cw-hint-block h4 {
    margin: 0 0 0.5rem 0;
    border-bottom: 2px solid var(--rt-primary-soft);
    padding-bottom: 0.2rem;
    font-family: var(--rt-font-heading);
    color: var(--rt-text);
}

.ex-cw-hint-row { font-size: 0.95rem; line-height: 1.4; font-family: var(--rt-font); }

.ex-picture-vocab { display: flex; flex-direction: column; gap: 1.5rem; }
.ex-pv-image-wrap { text-align: center; }
.ex-pv-image { max-width: 100%; border-radius: var(--rt-radius); border: 1px solid var(--rt-border); }

.ex-pv-track { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

.ex-pv-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--rt-surface);
    padding: 0.5rem;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
}

.ex-pv-number {
    width: 28px;
    height: 28px;
    background: var(--rt-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-family: var(--rt-font);
    font-size: 0.85rem;
}

.ex-pv-dropzone {
    width: 150px;
    min-height: 40px;
    border: 2px dashed var(--rt-border);
    border-radius: var(--rt-radius-sm);
    display: flex;
    align-items: center;
    padding: 2px;
    transition: all 0.2s;
}

.ex-pv-dropzone.drag-over { background: var(--rt-primary-light); border-color: var(--rt-primary); }
.ex-pv-dropzone.correct { border-color: var(--rt-success); background: var(--rt-success-bg); }
.ex-pv-dropzone.wrong   { border-color: var(--rt-error);   background: var(--rt-error-bg);   }

.ex-pv-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--rt-surface);
    border-radius: var(--rt-radius);
    min-height: 50px;
    justify-content: center;
}

.ex-pv-word {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    background: white;
    border: 1.5px solid var(--rt-primary);
    border-radius: var(--rt-radius-full);
    color: var(--rt-primary);
    font-weight: bold;
    cursor: grab;
    user-select: none;
    transition: transform 0.1s;
    font-family: var(--rt-font);
    font-size: 0.9rem;
}
.ex-pv-word .ex-btn-audio { margin: 0; width: 26px; height: 26px; font-size: 0.8rem; }

.ex-pv-word:active { cursor: grabbing; }
.ex-pv-word.dragging { opacity: 0.5; }
.ex-pv-word.disabled { cursor: not-allowed; opacity: 0.8; }
.ex-pv-dropzone .ex-pv-word { margin: 0; width: 100%; text-align: center; border-color: transparent; background: var(--rt-primary); color: white; cursor: pointer; border-radius: var(--rt-radius-sm); }
.ex-pv-dropzone.correct .ex-pv-word { background: transparent; color: var(--rt-success-text); }
.ex-pv-dropzone.wrong   .ex-pv-word { background: transparent; color: var(--rt-error-text);   }

@media (max-width: 600px) {
    .daz-exercise { padding: 0; }
    .ex-matching-grid {
        grid-template-columns: 1fr;
        grid-auto-flow: row;
        grid-template-rows: none;
    }
    .ex-title { font-size: 1.3rem; }
    .ex-btn { width: 100%; justify-content: center; }
    .ex-controls { flex-direction: column; }
    .ex-score-card__stats { gap: 2rem; }
    .ex-score-card__percent { font-size: 3rem; }
}

.ex-btn-audio {
    background: var(--rt-primary-light);
    border: 1px solid var(--rt-primary-soft);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    vertical-align: middle;
    margin: 0 5px;
}

.ex-btn-audio:hover {
    background: var(--rt-primary-soft);
    transform: scale(1.1);
}

.ex-btn-audio.playing {
    background: var(--rt-accent-soft);
    border-color: var(--rt-accent);
    animation: pulse 1.5s infinite;
}

.ex-btn-audio--vorlaeufig {
    background: var(--rt-warning-bg);
    border-color: var(--rt-warning);
    border-style: dashed;
}
.ex-btn-audio--vorlaeufig:hover {
    background: var(--rt-warning-bg);
    filter: brightness(0.97);
}
.ex-btn-audio--vorlaeufig.playing {
    background: var(--rt-warning-bg);
    animation: pulse 1.5s infinite;
}

.ex-silbe {
    display: inline-block;
    padding-bottom: 0.15em;
    border-bottom: 3px solid currentColor;
    border-radius: 0 0 40% 40%;
}
.ex-silbe--a { color: var(--rt-primary); }
.ex-silbe--b { color: var(--rt-secondary); }
.ex-vokal {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.ex-chip-image {
    width: var(--ex-chip-bild-b, 44px);
    height: var(--ex-chip-bild-h, 44px);
    max-width: 100%;
    object-fit: cover;
    border-radius: var(--rt-radius-sm);
    flex-shrink: 0;
}
.ex-chip .ex-btn-audio { margin: 0; flex-shrink: 0; }

.ex-area--bild-contain {
    --ex-chip-bild-b: 80px;
    --ex-chip-bild-h: 64px;
}
.ex-area--bild-contain .ex-chip-image {
    object-fit: contain;
    border-radius: 0;
    background: transparent;
}
.ex-area--bild-contain .ex-match-item--nur-bild {
    --ex-chip-bild-b: 120px;
    --ex-chip-bild-h: 96px;
}

.ex-schwing-item { text-align: center; }
.ex-schwing-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.ex-schwing-wort {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rt-text);
}
.ex-schwing-zaehler {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 2rem;
    margin-bottom: 1rem;
}
.ex-schwing-kugel {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--rt-primary);
    display: inline-block;
}
.ex-schwing-hinweis {
    color: var(--rt-text-muted);
    font-size: 0.85rem;
    font-style: italic;
}
.ex-schwing-knopfreihe {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.ex-schwing-tipp,
.ex-schwing-zuruecksetzen {
    min-height: 56px;
    padding: 0.75rem 1.5rem;
    border-radius: var(--rt-radius);
    font-family: var(--rt-font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.1s, background 0.15s;
}
.ex-schwing-tipp { background: var(--rt-primary); color: white; }
.ex-schwing-tipp:hover:not(:disabled) { background: var(--rt-primary-hover); }
.ex-schwing-tipp:active:not(:disabled) { transform: scale(0.97); }
.ex-schwing-zuruecksetzen {
    background: var(--rt-white);
    border: 1.5px solid var(--rt-border);
    color: var(--rt-text-muted);
}
.ex-schwing-zuruecksetzen:hover:not(:disabled) { border-color: var(--rt-border-dark); }
.ex-schwing-item.correct .ex-schwing-kugel { background: var(--rt-success); }
.ex-schwing-item.wrong .ex-schwing-kugel { background: var(--rt-error); }
.ex-schwing-item.disabled .ex-schwing-tipp,
.ex-schwing-item.disabled .ex-schwing-zuruecksetzen { opacity: 0.5; cursor: not-allowed; }

.ex-spuren-item { text-align: center; }
.ex-spuren-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.ex-spuren-zeichen {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--rt-text);
}
.ex-spuren-wort {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rt-text-muted);
}
.ex-spuren-flaeche {
    display: block;
    width: min(100%, 300px);
    aspect-ratio: 100 / 120;
    margin: 0 auto 0.75rem;
    background: var(--rt-surface);
    border-radius: var(--rt-radius);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair;
}
.ex-spuren-linie { stroke: var(--rt-border); stroke-width: 0.8; }
.ex-spuren-leit {
    fill: none;
    stroke: var(--rt-border);
    stroke-width: 14;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.2s;
}
.ex-spuren-leit--aktiv { stroke: var(--rt-border-dark); }
.ex-spuren-leit--fertig { stroke: var(--rt-success-bg); }
.ex-spuren-spur {
    fill: none;
    stroke: var(--rt-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
.ex-spuren-item.correct .ex-spuren-spur { stroke: var(--rt-success); }
.ex-spuren-start { pointer-events: none; opacity: 0.35; }
.ex-spuren-start--aktiv { opacity: 1; }
.ex-spuren-start--fertig { opacity: 0; }
.ex-spuren-start circle { fill: var(--rt-primary); }
.ex-spuren-start text {
    font-family: var(--rt-font);
    font-size: 7px;
    font-weight: 800;
    fill: var(--rt-white);
}
.ex-spuren-knopfreihe {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.ex-spuren-nochmal {
    min-height: 56px;
    padding: 0.75rem 1.5rem;
    border-radius: var(--rt-radius);
    font-family: var(--rt-font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: var(--rt-neutral-bg);
    color: var(--rt-text-muted);
}
.ex-spuren-nochmal:hover:not(:disabled) { color: var(--rt-text); }
.ex-spuren-item.disabled .ex-spuren-nochmal { opacity: 0.5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) {
    .ex-spuren-leit { transition: none; }
}

.ex-vocab-table { width: 100%; }

.vocab-table-element {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--rt-radius);
    overflow: hidden;
    box-shadow: var(--rt-shadow);
}

.vocab-table-element th,
.vocab-table-element td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--rt-border);
    vertical-align: middle;
    font-family: var(--rt-font);
}

.vocab-table-element th {
    background: var(--rt-surface);
    font-weight: 700;
    color: var(--rt-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.vocab-row:last-child td { border-bottom: none; }

.eye-btn {
    display: none;
    cursor: pointer;
    font-size: 1.2rem;
    width: 100%;
    text-align: center;
    color: var(--rt-primary);
}

.vocab-table-element.hide-a .col-a .cell-text { display: none; }
.vocab-table-element.hide-a .col-a .eye-btn { display: block; }
.vocab-table-element.hide-b .col-b .cell-text { display: none; }
.vocab-table-element.hide-b .col-b .eye-btn { display: block; }
.vocab-row.reveal-a .col-a .cell-text { display: block !important; }
.vocab-row.reveal-a .col-a .eye-btn { display: none !important; }
.vocab-row.reveal-b .col-b .cell-text { display: block !important; }
.vocab-row.reveal-b .col-b .eye-btn { display: none !important; }

.ex-mark-words { font-size: 1.1rem; line-height: 2; font-family: var(--rt-font); }

.mark-words-block {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.mark-words-text { flex: 1; }

.mark-word-clickable {
    display: inline-block;
    padding: 0 4px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    transition: all 0.2s;
}

.mark-word-clickable:hover { background: var(--rt-surface); }
.mark-word-clickable.selected { background: var(--rt-primary); color: white; }
.mark-word-clickable.is-correct { background: var(--rt-success); color: white; }
.mark-word-clickable.is-wrong   { background: var(--rt-error);   color: white; }
.mark-word-clickable.missed { border-bottom: 2px dashed var(--rt-error); }

.ex-dictation { display: flex; flex-direction: column; gap: 15px; }

.dictation-row { display: flex; gap: 10px; align-items: center; }

.dictation-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 1.05rem;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    font-family: var(--rt-font);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dictation-input:focus { outline: none; border-color: var(--rt-primary); box-shadow: var(--rt-shadow-glow); }
.dictation-input.is-correct { background: var(--rt-success-bg); border-color: var(--rt-success); }
.dictation-input.is-wrong   { background: var(--rt-error-bg);   border-color: var(--rt-error);   }

.dictation-correction {
    font-size: 0.85rem;
    color: var(--rt-error-text);
    font-weight: bold;
    margin-top: 4px;
    font-family: var(--rt-font);
}

.ex-meinung-karten {
    display: grid; gap: .75rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}
.ex-meinung-karte {
    display: flex; flex-direction: column; gap: .6rem;
    padding: 1rem; border-radius: 12px;
    background: var(--rt-surface, #fff);
    border: 1px solid var(--rt-border, #dde3e6);
}
.ex-meinung-karte__wort {
    display: flex; align-items: center; gap: .5rem;
    margin: 0; font-weight: 700; line-height: 1.3;
}
.ex-meinung-karte__icon { font-size: 1.4em; }
.ex-meinung-karte__wahl { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; }
.ex-meinung-chip { min-height: 44px; flex: 1 1 auto; }
.ex-meinung-stand {
    margin: 1rem 0 0; font-size: .9rem; color: var(--rt-muted, #5b6770);
}

.essay-abschicken { display: none; }
[data-lr-sammelt] .essay-abschicken {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    margin-top: .75rem;
}
.essay-stand {
    margin: 0; font-size: .9rem; line-height: 1.4;
    color: var(--rt-muted, #5b6770); flex: 1 1 14rem;
}
.essay-stand[data-art="fertig"]   { color: #2f9e6b; font-weight: 600; }
.essay-stand[data-art="geaendert"]{ color: #b8431f; font-weight: 600; }
.essay-stand[data-art="entfernt"] { color: #b8431f; font-weight: 600; }
.essay-stand[data-art="korrigiert"] {
  color: #14563b;
}
.essay-stand[data-art="fehler"]   { color: #b8431f; font-weight: 600; }
.essay-send:disabled { opacity: .5; cursor: default; }

.essay-block { margin-bottom: 20px; }

.essay-prompt {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.05rem;
    font-family: var(--rt-font);
    color: var(--rt-text);
}

.essay-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    font-size: 1rem;
    resize: vertical;
    font-family: var(--rt-font);
    color: var(--rt-text);
    line-height: 1.65;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.essay-input:focus { outline: none; border-color: var(--rt-primary); box-shadow: var(--rt-shadow-glow); }

.flashcard-wrap {
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
    background: #fff;
    box-shadow: var(--rt-shadow);
}

.flashcard-qbox {
    font-family: var(--rt-font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--rt-text);
}

.flashcard-input {
    padding: 10px 16px;
    font-size: 1.15rem;
    text-align: center;
    width: 100%;
    max-width: 320px;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    font-family: var(--rt-font);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.flashcard-input:focus { outline: none; border-color: var(--rt-primary); box-shadow: var(--rt-shadow-glow); }
.flashcard-input.is-correct { background: var(--rt-success-bg); border-color: var(--rt-success); }
.flashcard-input.is-wrong   { background: var(--rt-error-bg);   border-color: var(--rt-error);   }

.ex-single-choice-set {
    border: 1.5px solid var(--rt-primary-soft);
    border-radius: var(--rt-radius-lg);
    padding: 20px;
    background: #fff;
    box-shadow: var(--rt-shadow);
}

.scs-header {
    font-size: 0.8rem;
    color: var(--rt-text-muted);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    font-family: var(--rt-font);
}

.scs-qbox {
    font-family: var(--rt-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--rt-text);
}

.scs-opts { display: flex; flex-direction: column; gap: 10px; }
.scs-btn  { text-align: left; padding: 14px 18px; }

.scs-finish {
    text-align: center;
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--rt-success);
    padding: 20px 0;
    font-family: var(--rt-font);
}

.summary-intro {
    font-weight: 700;
    margin-bottom: 15px;
    font-family: var(--rt-font);
    color: var(--rt-text);
}

.summary-result-box {
    min-height: 50px;
    background: var(--rt-surface);
    border: 1.5px dashed var(--rt-border);
    border-radius: var(--rt-radius);
    padding: 15px;
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.65;
    font-family: var(--rt-font);
}

.summary-opts { display: flex; flex-direction: column; gap: 10px; }
.summary-btn  { text-align: left; padding: 14px 18px; }

.guess-block {
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    background: #fff;
    box-shadow: var(--rt-shadow);
}

.guess-qbox {
    font-family: var(--rt-font-heading);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--rt-text);
}

.guess-abox {
    position: relative;
    background: var(--rt-primary-light);
    padding: 20px;
    border-radius: var(--rt-radius);
    font-size: 1.15rem;
    font-style: italic;
    margin-top: 15px;
    color: var(--rt-text);
    font-family: var(--rt-font-heading);
}
.guess-abox::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--rt-primary), transparent 65%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.memory-card {
    aspect-ratio: 1;
    background: #fff;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    box-shadow: var(--rt-shadow);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    font-family: var(--rt-font);
}

.memory-card:hover:not(.hidden):not(.matched) { box-shadow: var(--rt-shadow-hover); transform: translateY(-2px); }
.memory-card.hidden { background: var(--rt-primary); border-color: var(--rt-primary); color: transparent; }
.memory-card.matched { visibility: hidden; }

.ddi-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.ddi-bg { display: block; max-width: 100%; height: auto; }
.ddi-dropzones { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }

.ddi-zone {
    position: absolute;
    width: 100px;
    height: 40px;
    transform: translate(-50%, -50%);
    border: 2px dashed rgba(249,124,95,0.6);
    background: rgba(255,255,255,0.75);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--rt-radius-sm);
}

.ddi-zone.drag-over { background: rgba(249, 124, 95, 0.2); border-color: var(--rt-primary); }

.ddi-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 50px;
    padding: 10px;
    background: var(--rt-surface);
    border: 1.5px dashed var(--rt-border);
    border-radius: var(--rt-radius);
    margin-bottom: 20px;
}

.ddi-draggable {
    padding: 5px 16px;
    background: var(--rt-primary);
    color: white;
    border-radius: var(--rt-radius-full);
    cursor: grab;
    font-weight: 600;
    font-family: var(--rt-font);
    font-size: 0.9rem;
}

.ddi-draggable.is-correct { background: var(--rt-success); }
.ddi-draggable.is-wrong   { background: var(--rt-error);   }

.mh-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    overflow: hidden;
    cursor: crosshair;
}

.mh-bg { display: block; max-width: 100%; height: auto; }

.mh-spot {
    position: absolute;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.mh-spot:not(.clicked) { cursor: crosshair; }
.mh-spot.clicked.correct { background: rgba(47, 158, 107, 0.8); box-shadow: 0 0 10px rgba(47,158,107,0.5); }
.mh-spot.clicked.wrong   { background: rgba(220, 53, 69, 0.8); box-shadow: 0 0 10px rgba(220,53,69,0.5); }

.mh-miss {
    position: absolute;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    pointer-events: none;
}

.mh-task {
    font-family: var(--rt-font-heading);
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--rt-text);
}

.ih-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    overflow: hidden;
}

.ih-bg { display: block; max-width: 100%; height: auto; }

.ih-spot {
    position: absolute;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--rt-primary);
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s, background 0.2s;
    font-family: var(--rt-font);
}

.ih-spot:hover,
.ih-spot.active {
    transform: translate(-50%, -50%) scale(1.18);
    background: var(--rt-success);
}

.ih-spot--gesehen { background: var(--rt-success); opacity: .78; }
.ih-spot--gesehen.active { opacity: 1; }

.ih-stand {
    margin: 1rem 0 0; font-size: .9rem; color: var(--rt-muted, #5b6770);
}

.ih-modal {
    background: white;
    border-radius: var(--rt-radius);
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--rt-shadow-hover);
    position: relative;
}
.ih-modal::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--rt-primary), transparent 65%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.ih-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--rt-text-muted);
}

.ih-modal-title {
    font-family: var(--rt-font-heading);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--rt-text);
}

.ih-modal-text {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--rt-text);
    margin-bottom: 10px;
    font-family: var(--rt-font);
}

.iseq-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    border: 1.5px dashed var(--rt-border);
    border-radius: var(--rt-radius);
    background: var(--rt-surface);
}

.iseq-card {
    padding: 10px;
    background: white;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    cursor: grab;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--rt-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.iseq-card:hover { box-shadow: var(--rt-shadow-hover); transform: translateY(-1px); }
.iseq-card.dragging { opacity: 0.5; }
.iseq-card img { max-width: 200px; max-height: 150px; border-radius: 6px; pointer-events: none; }
.iseq-card.is-correct { border-color: var(--rt-success); box-shadow: 0 0 10px rgba(47,158,107,0.25); }
.iseq-card.is-wrong   { border-color: var(--rt-error);   box-shadow: 0 0 10px rgba(220,53,69,0.25);  }

.iv-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: var(--rt-radius);
    overflow: hidden;
    background: #000;
}

.iv-video { display: block; max-width: 100%; height: auto; }

.iv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(33,40,46,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10;
}

.iv-overlay-text {
    color: white;
    font-family: var(--rt-font-heading);
    font-size: 1.45rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    max-width: 80%;
    line-height: 1.4;
}

.iv-continue { padding: 10px 30px; font-size: 1.15rem; }

.ex-arithmetic {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.arithmetic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--rt-font-heading);
    font-size: 1.45rem;
    font-weight: bold;
    background: #fff;
    padding: 15px 20px;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    box-shadow: var(--rt-shadow);
}

.arithmetic-input {
    width: 100px;
    font-size: 1.45rem;
    text-align: center;
    padding: 5px;
    font-family: var(--rt-font);
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.arithmetic-input:focus { outline: none; border-color: var(--rt-primary); box-shadow: var(--rt-shadow-glow); }
.arithmetic-input.is-correct { background: var(--rt-success-bg); border-color: var(--rt-success); }
.arithmetic-input.is-wrong   { background: var(--rt-error-bg);   border-color: var(--rt-error);   }

.ex-accordion { display: flex; flex-direction: column; gap: 10px; }

.acc-panel {
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    overflow: hidden;
    box-shadow: var(--rt-shadow);
    transition: box-shadow 0.2s;
}

.acc-panel:hover { box-shadow: var(--rt-shadow-hover); }

.acc-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--rt-surface);
    border: none;
    font-family: var(--rt-font);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--rt-text);
    transition: background 0.15s;
}

.acc-header:hover { background: var(--rt-primary-light); }
.acc-header:hover .acc-icon { color: var(--rt-primary); }

.acc-content {
    padding: 20px;
    background: #fff;
    font-size: 1.05rem;
    line-height: 1.7;
    border-top: 1px solid var(--rt-border);
    font-family: var(--rt-font);
    color: var(--rt-text);
}

.ex-score-card {
    display: none;
    margin-top: 1.5rem;
    border-radius: var(--rt-radius);
    overflow: hidden;
}
.ex-score-card--visible { animation: slide-up 0.4s var(--rt-ease-out) forwards; }

.ex-score-card__inner {
    background: linear-gradient(135deg, var(--rt-primary) 0%, var(--rt-secondary) 100%);
    color: #fff;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    border-radius: var(--rt-radius);
}
.ex-score-card__trophy {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: trophy-pop 0.6s var(--rt-ease-out) forwards;
    display: block;
}
.ex-score-card__percent {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}
.ex-score-card__label {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 1.25rem;
}
.ex-score-card__stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}
.ex-score-card__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}
.ex-score-card__stat-value {
    font-size: 1.25rem;
    font-weight: 800;
}
.ex-score-card__stat-label {
    font-size: 0.75rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ex-sc-mode-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.ex-score-card__history {
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    text-align: left;
}
.ex-score-card__history-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.5rem;
}
.ex-sc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.ex-sc-table th {
    opacity: 0.65;
    font-weight: 600;
    text-align: left;
    padding: 0.15rem 0.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.ex-sc-table td {
    padding: 0.2rem 0.3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ex-sc-table tr.ex-sc-row--latest td {
    font-weight: 700;
    color: #fff;
}
.ex-sc-reset {
    margin-top: 0.75rem;
    background: rgba(255,255,255,0.12) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.75rem !important;
    padding: 0.3rem 0.75rem !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: background 0.15s;
}
.ex-sc-reset:hover {
    background: rgba(255,255,255,0.22) !important;
    color: #fff !important;
}

.ex-btn--ghost {
    background: transparent;
    border: 1px solid var(--rt-border);
    color: var(--rt-text-muted);
    font-size: 0.82rem;
}
.ex-btn--ghost:hover { background: var(--rt-surface); color: var(--rt-text); }

@media print {
    body { background: #fff !important; color: #000 !important; }

    .daz-exercise {
        max-width: 100%;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .ex-controls,
    .ex-attempts,
    .ex-feedback,
    .ex-score-card,
    .ex-hint-btn { display: none !important; }

    .ex-input {
        border: none;
        border-bottom: 1px solid #000;
        background: transparent;
        min-width: 80px;
    }

    .ex-chip, .ex-btn { display: none !important; }

    .ex-progress-wrap { display: none !important; }

    @page {
        margin: 1.5cm;
    }
}

.ex-image-labeling {}

.ex-il-image-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    border-radius: var(--rt-radius);
    overflow: hidden;
    box-shadow: var(--rt-shadow);
    margin-bottom: 1.25rem;
    user-select: none;
}

.ex-il-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--rt-radius);
}

.ex-il-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    background: var(--rt-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    border: 2px solid rgba(255,255,255,0.8);
    cursor: default;
    transition: transform 0.15s, box-shadow 0.15s;
    z-index: 2;
}
.ex-il-pin:hover {
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}
.ex-il-pin.pin-correct {
    background: var(--rt-success);
    border-color: rgba(255,255,255,0.9);
    animation: pin-pop 0.3s var(--rt-ease-out);
}
.ex-il-pin.pin-wrong {
    background: var(--rt-error);
    border-color: rgba(255,255,255,0.9);
}

@keyframes pin-pop {
    0%   { transform: translate(-50%, -50%) scale(1); }
    50%  { transform: translate(-50%, -50%) scale(1.4); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.ex-il-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ex-il-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ex-il-number {
    width: 32px;
    height: 32px;
    background: var(--rt-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    flex-shrink: 0;
}

.ex-il-input {
    flex: 1;
    padding: 0.45rem 0.75rem;
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius-sm);
    font-family: var(--rt-font);
    font-size: 0.95rem;
    background: var(--rt-surface);
    color: var(--rt-text);
    transition: border-color 0.15s;
}
.ex-il-input:focus { outline: none; border-color: var(--rt-primary); }
.ex-il-input.is-correct { background: var(--rt-success-bg); border-color: var(--rt-success); color: var(--rt-success); }
.ex-il-input.is-wrong   { background: var(--rt-error-bg);   border-color: var(--rt-error);   color: var(--rt-error); }
.ex-il-input:disabled   { opacity: 0.75; cursor: not-allowed; }

.ex-category-sort {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ex-cs-chip-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0.75rem;
    background: var(--rt-surface);
    border: 2px dashed var(--rt-border);
    border-radius: var(--rt-radius);
    transition: border-color 0.2s;
}

.ex-cs-zones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.ex-cs-zone {
    background: var(--rt-surface);
    border: 2px solid var(--rt-border);
    border-radius: var(--rt-radius);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}
.ex-cs-zone.drag-over {
    border-color: var(--rt-primary);
    box-shadow: 0 0 0 3px var(--rt-primary-light);
}

.ex-cs-zone-label {
    background: var(--rt-primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
    text-align: center;
    letter-spacing: 0.03em;
}

.ex-cs-drop-area {
    flex: 1;
    padding: 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-content: flex-start;
    min-height: 80px;
}

.ex-cs-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 44px;
    background: var(--rt-primary-light);
    color: var(--rt-primary);
    border: 1.5px solid var(--rt-primary);
    border-radius: 20px;
    padding: 0.5rem 0.9rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: grab;
    transition: all 0.15s;
    user-select: none;
}
.ex-cs-chip:hover { background: var(--rt-primary); color: #fff; transform: translateY(-1px); }

.ex-cs-chip--bild {
    flex-direction: column;
    gap: 0.35rem;
    border-radius: var(--rt-radius-md, 12px);
    padding: 0.6rem 0.7rem;
    max-width: 9rem;
    text-align: center;
    line-height: 1.25;
}
.ex-cs-chip--bild .ex-chip-image {
    width: 64px;
    height: 52px;
    object-fit: contain;
    border-radius: 0;
}
.ex-cs-chip__text { display: block; }
.ex-cs-chip.dragging { opacity: 0.4; cursor: grabbing; }
.ex-cs-chip.selected {
    background: var(--rt-primary);
    color: #fff;
    box-shadow: 0 0 0 3px var(--rt-primary-light);
}
.ex-cs-chip.is-correct { background: var(--rt-success-bg); border-color: var(--rt-success); color: var(--rt-success); cursor: default; }
.ex-cs-chip.is-wrong   { background: var(--rt-error-bg);   border-color: var(--rt-error);   color: var(--rt-error);   cursor: default; }
.ex-cs-chip.is-missing::after { content: " \2013  fehlt noch"; font-weight: 400; font-size: .85em; }
.ex-cs-chip.is-locked { cursor: default; }

.ex-cs-return {
    position: relative;
    background: none;
    border: none;
    color: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0 0.1rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.ex-cs-return::after {
    content: '';
    position: absolute;
    inset: 50% auto auto 50%;
    inline-size: 44px;
    block-size: 44px;
    transform: translate(-50%, -50%);
}
.ex-cs-return:hover { opacity: 1; }
.ex-cs-return:disabled { display: none; }

@media (max-width: 600px) {
    .ex-cs-chip { cursor: pointer; }
    .ex-cs-zones { grid-template-columns: 1fr 1fr; }
}

.ex-table-fill { overflow-x: auto; }
.ex-tf-table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.5rem 0;
}
.ex-tf-table th,
.ex-tf-table td {
    border: 1px solid var(--rt-border, #d7dde5);
    padding: 0.5rem 0.7rem;
    text-align: left;
    vertical-align: middle;
}
.ex-tf-table th {
    background: var(--rt-surface, #f1f5f9);
    font-weight: 700;
}
.ex-tf-table td.ex-tf-given { color: var(--rt-text, #1f2937); }
.ex-tf-input {
    min-width: 5rem;
    padding: 0.4rem 0.5rem;
    border: 2px solid var(--rt-border, #cbd5e1);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}
.ex-tf-input:focus {
    outline: none;
    border-color: var(--rt-primary, #2563eb);
}
.ex-tf-input.correct {
    background: var(--rt-success-bg, #dcfce7);
    border-color: var(--rt-success, #16a34a);
    color: var(--rt-success, #16a34a);
}
.ex-tf-input.wrong {
    background: var(--rt-error-bg, #fee2e2);
    border-color: var(--rt-error, #dc2626);
    color: var(--rt-error, #dc2626);
}
@media (max-width: 600px) {
    .ex-tf-table th, .ex-tf-table td { padding: 0.4rem 0.45rem; }
    .ex-tf-input { min-width: 4rem; font-size: 0.95rem; }
}

@media print {
    .daz-exercise,
    .daz-exercise * {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .ex-controls,
    .ex-btn,
    .ex-feedback,
    .ex-score-card,
    .ex-progress,
    .ex-sc-reset,
    .ex-btn-audio,
    .ex-cs-return {
        display: none !important;
    }

    .daz-exercise input[type="text"],
    .daz-exercise .ex-input,
    .daz-exercise .ex-fb-input {
        border: none !important;
        border-bottom: 1px solid #000 !important;
        min-width: 4em !important;
        background: transparent !important;
    }

    .daz-exercise select {
        border: none !important;
        border-bottom: 1px dotted #000 !important;
        background: transparent !important;
        appearance: none !important;
    }

    .ex-chip,
    .ex-cs-chip,
    .ex-drag-item {
        border: 1px solid #000 !important;
        background: #fff !important;
        page-break-inside: avoid !important;
    }

    .ex-header {
        border-bottom: 2px solid #000 !important;
        margin-bottom: 1rem !important;
    }

    .ex-tag, .ex-level-pill {
        border: 1px solid #888 !important;
        color: #444 !important;
    }

    .daz-exercise { page-break-inside: avoid; }

    .daz-exercise a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        color: #555 !important;
    }
}

.ex-prerender {
    padding: 1rem 1.25rem;
    border: 1px dashed var(--rt-border, #cbd5e1);
    border-radius: 8px;
    background: var(--rt-surface, #f8fafc);
    color: var(--rt-text, #1e293b);
    margin: 1rem 0;
}
.ex-prerender .ex-title {
    margin: 0 0 0.4rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}
.ex-prerender .ex-instruction {
    margin: 0 0 0.6rem 0;
    color: var(--rt-text-muted, #475569);
    font-size: 0.95rem;
}
.ex-prerender .ex-goal {
    margin: -0.3rem 0 0.6rem 0;
    color: var(--rt-text-muted, #475569);
    font-size: 0.88rem;
    opacity: 0.85;
}
.ex-prerender .ex-meta-pre {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
}
.ex-prerender .ex-level-pill,
.ex-prerender .ex-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
}
.ex-prerender .ex-level-pill {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.ex-prerender .ex-pre-instruction {
    margin: 0.6rem 0 0.4rem 0;
    color: var(--rt-text-muted, #475569);
    font-size: 0.95rem;
}
.ex-prerender .ex-pre-body { margin-top: 0.75rem; }
.ex-prerender .ex-pre-item { margin: 0 0 0.85rem 0; }
.ex-prerender .ex-pre-question {
    margin: 0 0 0.3rem 0;
    font-weight: 600;
}
.ex-prerender .ex-pre-options,
.ex-prerender .ex-pre-items,
.ex-prerender .ex-pre-match-left,
.ex-prerender .ex-pre-match-right {
    margin: 0.25rem 0 0.5rem 0;
    padding-left: 1.4rem;
}
.ex-prerender .ex-pre-hint,
.ex-prerender .ex-pre-options-inline,
.ex-prerender .ex-pre-cats {
    color: var(--rt-text-muted, #64748b);
    font-size: 0.9rem;
}
.ex-prerender .ex-pre-cats { margin: 0.25rem 0; }
.ex-prerender .ex-pre-chips { margin: 0.25rem 0; }
.ex-prerender .ex-pre-chip {
    display: inline-block;
    padding: 2px 10px;
    margin: 2px 4px 2px 0;
    border: 1px solid var(--rt-border, #cbd5e1);
    border-radius: 12px;
    font-size: 0.9rem;
    background: #fff;
}
.ex-prerender .ex-pre-acc-title { margin: 0 0 0.3rem 0; font-size: 1rem; }
.ex-prerender .ex-pre-table {
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.92rem;
}
.ex-prerender .ex-pre-table th,
.ex-prerender .ex-pre-table td {
    border: 1px solid var(--rt-border, #cbd5e1);
    padding: 4px 10px;
    text-align: left;
}

.daz-exercise [draggable="true"]:focus-visible {
    outline: 3px solid #6366f1;
    outline-offset: 3px;
    box-shadow: 0 0 0 1px white, 0 0 0 5px #6366f1;
}

.iv-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}
.iv-wrapper[data-max-width] { max-width: attr(data-max-width px, 100%); }
.iv-wrapper[data-aspect-ratio="16/9"]  { aspect-ratio: 16 / 9; }
.iv-wrapper[data-aspect-ratio="4/3"]   { aspect-ratio: 4 / 3; }
.iv-wrapper[data-aspect-ratio="1/1"]   { aspect-ratio: 1 / 1; }
.iv-wrapper[data-aspect-ratio="9/16"]  { aspect-ratio: 9 / 16; max-width: 360px; }
.iv-wrapper[data-aspect-ratio="auto"]  { aspect-ratio: auto; }
.iv-wrapper .iv-video { width: 100%; height: 100%; display: block; background: #000; }

.iv-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    z-index: 5;
}
.iv-overlay-text {
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    max-width: 90%;
}

.daz-exercise-set {
    border: 1px solid var(--rt-primary-light, #c7d2fe);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: var(--rt-surface, #fafbff);
}
.daz-exercise-set .daz-set-header {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--rt-primary, #4f46e5);
    border-bottom: 2px dashed var(--rt-primary-light, #c7d2fe);
    padding-bottom: 0.4rem;
}

.daz-set-progress {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.daz-set-progress-text {
    font-size: 0.85rem;
    color: var(--rt-text-muted, #475569);
    font-weight: 600;
    flex-shrink: 0;
}
.daz-set-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--rt-neutral-bg, #e2e8f0);
    border-radius: 4px;
    overflow: hidden;
}
.daz-set-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.daz-set-total {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 12px;
    color: #fff;
    text-align: center;
    animation: slide-up 0.5s var(--rt-ease-out) forwards;
}
.daz-set-total-grade { font-size: 3rem; line-height: 1; margin-bottom: 0.4rem; }
.daz-set-total-pct   { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.daz-set-total-label { font-size: 1.1rem; font-weight: 600; margin-top: 0.4rem; opacity: 0.95; }
.daz-set-total-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.95;
}


.daz-exercise-set[data-layout="tabs"]   > [data-exercise]:not(.daz-set-child--active),
.daz-exercise-set[data-layout="wizard"] > [data-exercise]:not(.daz-set-child--active) {
    display: none;
}

.daz-set-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--rt-border);
    padding-bottom: 0.6rem;
}
.daz-set-tab {
    background: var(--rt-surface);
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius-sm) var(--rt-radius-sm) 0 0;
    padding: 0.55rem 1rem;
    font-family: var(--rt-font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rt-text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.daz-set-tab:hover {
    background: var(--rt-primary-light);
    color: var(--rt-primary);
    border-color: var(--rt-primary-soft);
}
.daz-set-tab--active {
    background: var(--rt-primary);
    color: #fff;
    border-color: var(--rt-primary);
}

.daz-set-wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--rt-border);
}
.daz-set-wizard-pos {
    font-family: var(--rt-font);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--rt-text-muted);
    letter-spacing: 0.04em;
}

.daz-set-acc-panel {
    border: 1.5px solid var(--rt-border);
    border-radius: var(--rt-radius);
    margin-bottom: 0.6rem;
    overflow: hidden;
    background: var(--rt-white);
    box-shadow: var(--rt-shadow);
}
.daz-set-acc-head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: var(--rt-surface);
    border: none;
    font-family: var(--rt-font);
    font-size: 1rem;
    font-weight: 700;
    color: var(--rt-text);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}
.daz-set-acc-head:hover { background: var(--rt-primary-light); }
.daz-set-acc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--rt-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
    flex-shrink: 0;
}
.daz-set-acc-chevron {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--rt-text-muted);
    transition: transform 0.2s;
}
.daz-set-acc-panel--open .daz-set-acc-chevron { transform: rotate(180deg); color: var(--rt-primary); }
.daz-set-acc-body {
    display: none;
    padding: 1rem 1.25rem 1.25rem;
}
.daz-set-acc-panel--open .daz-set-acc-body { display: block; }
