h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.status-bar-safe-area {
    display: flex;
    position: sticky;
    top: 0;
    height: env(safe-area-inset-top, 0px);
    background-color: var(--maui-status-bar-safe-area-background, transparent);
    width: 100%;
    z-index: 1;
}

.flex-column, .navbar-brand {
    padding-left: env(safe-area-inset-left, 0px);
}

/* Vokabelblitz Layout */
body { font-family: system-ui, "Segoe UI", sans-serif; margin: 0; }
.wr-header { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; background: var(--header-bg); color: #fff; }
.wr-header a, .wr-link { color: #fff; }
.wr-brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.wr-nav { display: flex; gap: 1rem; align-items: center; }
.wr-nav a { text-decoration: none; }
.wr-link { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; font: inherit; }
.wr-main { max-width: 64rem; margin: 0 auto; padding: 1rem; }
.wr-main .wr-link { color: var(--brand-text); }
.wr-form { display: flex; flex-direction: column; gap: .75rem; }
.wr-form label { display: flex; flex-direction: column; gap: .25rem; }
.wr-form input { padding: .5rem; font-size: 1rem; }
.wr-form button[type=submit] { padding: .6rem; font-size: 1rem; background: var(--brand); color: var(--on-brand); border: 0; border-radius: .3rem; }
.wr-form button[disabled] { opacity: .6; }

/* Verwaltung */
.wr-crumbs { font-size: .9rem; color: var(--muted); margin: 0 0 .5rem; }
.wr-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.wr-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.wr-row-main { display: flex; flex-direction: column; flex: 1; }
.wr-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.wr-row h2 { margin: .25rem 0; font-size: 1.15rem; }
.wr-row-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.wr-inline { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.wr-inline > label { flex: 1; }
.wr-inline > input { flex: 1; padding: .4rem; }
.wr-card { border: 1px solid var(--line); border-radius: .4rem; padding: .5rem .75rem; margin-bottom: 1rem; }
.wr-check { flex-direction: row !important; align-items: center; }
.wr-danger { color: var(--bad-ink); }
.wr-table { width: 100%; border-collapse: collapse; }
.wr-table th { text-align: left; border-bottom: 2px solid var(--line-strong); padding: .3rem; }
.wr-table td { border-bottom: 1px solid var(--track); padding: .3rem; vertical-align: top; }
.wr-table input { width: 100%; box-sizing: border-box; padding: .35rem; }
.wr-add-row td { background: var(--surface-2); }


/* Nutzerbereich */
.wr-button, .wr-primary { display: inline-block; padding: .5rem .9rem; background: var(--brand); color: var(--on-brand) !important; border: 0; border-radius: .3rem; text-decoration: none; font-size: 1rem; cursor: pointer; }
.wr-primary[disabled] { opacity: .5; cursor: default; }
.wr-pick, .wr-pick-sub { list-style: none; padding: 0; margin: 0; }
.wr-pick > li { border-bottom: 1px solid var(--line); padding: .5rem 0; }
.wr-pick-sub { margin: .4rem 0 .2rem 1.6rem; max-height: 14rem; overflow-y: auto; }
.wr-muted { color: var(--muted); }
.wr-radio-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.wr-question { font-size: 1.8rem; font-weight: 600; margin: .5rem 0 1rem; }
.wr-ok { color: var(--ok-ink); font-weight: 600; }

/* Spiele & Serie */
.wr-streak { font-size: .75rem; background: var(--brand-soft); color: var(--brand-text); border-radius: .6rem; padding: .05rem .45rem; margin-left: .3rem; white-space: nowrap; }
.wr-proposal { font-size: 1.6rem; padding: .6rem .9rem; margin: 0 0 .5rem; background: var(--surface-2); border-radius: .4rem; }
.wr-secondary { background: #8a8a99; }
.wr-match { display: flex; gap: 1rem; }
.wr-match-col { flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.wr-tile { padding: .8rem .5rem; font-size: 1.05rem; border: 2px solid var(--line-strong); background: var(--surface); border-radius: .4rem; cursor: pointer; min-height: 3rem; }
.wr-tile-selected { border-color: var(--brand); background: var(--brand-soft); }
.wr-tile-done { border-color: var(--ok-ink); background: var(--ok-soft); color: var(--ok-ink); opacity: .7; }
.wr-tile-wrong { border-color: var(--bad-ink); background: var(--bad-soft); }

.wr-tile-gone { visibility: hidden; }

/* Statistik & Sterne */
.wr-stars { letter-spacing: .1rem; white-space: nowrap; }
.wr-stars-large { font-size: 2.6rem; display: block; text-align: center; }
.wr-star-on { color: #f5b301; }
.wr-star-off { color: #d9d9e0; }
.wr-stats { text-align: center; }
.wr-percent { font-size: 3rem; font-weight: 700; color: var(--brand-text); }
.wr-headline { font-size: 1.15rem; margin: .25rem 0 1rem; }
.wr-bar { height: .8rem; background: var(--track); border-radius: .4rem; overflow: hidden; margin: 0 auto 1rem; max-width: 28rem; }
.wr-bar-fill { height: 100%; background: var(--brand); }
.wr-stats-table { max-width: 28rem; margin: 0 auto 1rem; text-align: left; }
.wr-stats > .wr-list, .wr-stats h3 { text-align: left; }


/* ===== Richtig/Falsch-Spiel ===== */
.wr-tf { max-width: 36rem; margin: 0 auto; outline: none; --tf-ok: #12a150; --tf-ok-soft: var(--ok-soft); --tf-bad: #e5484d; --tf-bad-soft: var(--bad-soft); --tf-brand: var(--brand); }
.wr-tf-top { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.wr-tf-progress { height: .55rem; background: var(--track); border-radius: 999px; overflow: hidden; margin-bottom: 1.25rem; }
.wr-tf-progress > div { height: 100%; background: linear-gradient(90deg, var(--brand-light), var(--tf-brand)); border-radius: 999px; transition: width .35s ease; }

.wr-tf-card { background: var(--surface); border: 2px solid var(--card-border); border-radius: 1.4rem; padding: 1.4rem 1.25rem; box-shadow: 0 10px 30px rgba(108, 92, 231, .10); display: flex; flex-direction: column; align-items: stretch; gap: .6rem; transition: border-color .2s, background-color .2s; animation: wr-tf-in .25s ease; }
.wr-tf-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .25rem; padding: .4rem; }
.wr-tf-label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.wr-tf-text { font-size: clamp(1.6rem, 6vw, 2.3rem); font-weight: 700; line-height: 1.2; word-break: break-word; color: var(--ink); }
.wr-tf-side-proposal { background: var(--surface-2); border-radius: 1rem; padding: .9rem .6rem; }
.wr-tf-side-proposal .wr-tf-text { color: var(--brand-text); }
.wr-tf-eq { align-self: center; width: 2.2rem; height: 2.2rem; line-height: 2.1rem; text-align: center; border-radius: 50%; background: var(--card-border); color: var(--brand-text); font-weight: 700; font-size: 1.2rem; margin: -.3rem 0; z-index: 1; }
.wr-tf-card.is-ok { border-color: var(--tf-ok); background: var(--tf-ok-soft); animation: wr-tf-pop .3s ease; }
.wr-tf-card.is-bad { border-color: var(--tf-bad); background: var(--tf-bad-soft); animation: wr-tf-shake .4s ease; }
.wr-tf-card.is-ok .wr-tf-side-proposal, .wr-tf-card.is-bad .wr-tf-side-proposal { background: rgba(255, 255, 255, .7); }

.wr-tf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-top: 1.25rem; }
.wr-tf-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 7rem; border: 0; border-radius: 1.3rem; color: #fff; font-size: 1.25rem; font-weight: 700; cursor: pointer; box-shadow: 0 8px 18px rgba(0, 0, 0, .16), inset 0 -4px 0 rgba(0, 0, 0, .14); transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; -webkit-tap-highlight-color: transparent; }
.wr-tf-yes { background: linear-gradient(160deg, #2ecb7a, var(--tf-ok)); }
.wr-tf-no { background: linear-gradient(160deg, #ff7a7e, var(--tf-bad)); }
.wr-tf-btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 12px 22px rgba(0, 0, 0, .2), inset 0 -4px 0 rgba(0, 0, 0, .14); }
.wr-tf-btn:active { transform: translateY(2px) scale(.98); box-shadow: 0 3px 8px rgba(0, 0, 0, .18), inset 0 -2px 0 rgba(0, 0, 0, .14); }
.wr-tf-btn:focus-visible, .wr-tf-next:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wr-tf-icon { display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: rgba(255, 255, 255, .25); font-size: 1.7rem; line-height: 1; }
.wr-tf-btn kbd, .wr-tf-next kbd { position: absolute; top: .5rem; right: .6rem; font: inherit; font-size: .72rem; font-weight: 600; background: rgba(255, 255, 255, .25); border-radius: .4rem; padding: .05rem .4rem; }
@media (hover: none) { .wr-tf-btn kbd, .wr-tf-next kbd { display: none; } }

.wr-tf-feedback { display: flex; align-items: center; gap: .85rem; margin-top: 1.25rem; padding: .9rem 1rem; border-radius: 1rem; animation: wr-tf-in .2s ease; }
.wr-tf-feedback.is-ok { background: var(--tf-ok-soft); color: var(--ok-ink); }
.wr-tf-feedback.is-bad { background: var(--tf-bad-soft); color: var(--bad-ink); }
.wr-tf-feedback-icon { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; color: #fff; font-size: 1.5rem; font-weight: 700; }
.wr-tf-feedback.is-ok .wr-tf-feedback-icon { background: var(--tf-ok); }
.wr-tf-feedback.is-bad .wr-tf-feedback-icon { background: var(--tf-bad); }
.wr-tf-feedback-body { display: flex; flex-direction: column; gap: .15rem; font-size: .95rem; }
.wr-tf-feedback-body strong { font-size: 1.1rem; }
.wr-tf-chip { align-self: flex-start; font-size: .78rem; font-weight: 600; background: var(--surface); color: var(--tf-ok); border-radius: 999px; padding: .1rem .6rem; }

.wr-tf-next { position: relative; display: block; width: 100%; margin-top: .9rem; padding: 1.05rem; border: 0; border-radius: 1.1rem; background: linear-gradient(160deg, var(--brand-light), var(--tf-brand)); color: var(--on-brand); font-size: 1.15rem; font-weight: 700; cursor: pointer; box-shadow: 0 8px 18px rgba(108, 92, 231, .3), inset 0 -4px 0 rgba(0, 0, 0, .14); transition: transform .12s ease, filter .12s ease; }
.wr-tf-next:hover { filter: brightness(1.06); transform: translateY(-1px); }
.wr-tf-next:active { transform: translateY(2px) scale(.99); }

@keyframes wr-tf-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes wr-tf-pop { 0% { transform: scale(.97); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes wr-tf-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .wr-tf *, .wr-tf { animation: none !important; transition: none !important; } }

/* ===== Marke / Logo ===== */
.wr-header { box-shadow: 0 2px 10px rgba(45, 42, 110, .35); }
.wr-brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; text-decoration: none; }
.wr-brand-icon { width: 2.4rem; height: 2.4rem; display: block; }
.wr-brand-text { font-weight: 800; font-size: 1.35rem; letter-spacing: -.01em; }
.wr-brand-text > span { color: #ffd43b; }
.wr-logo { display: block; width: min(100%, 26rem); height: auto; margin: 0 auto 1rem; }
.wr-hero { text-align: center; padding: 1rem 0 2rem; }
.wr-hero p { font-size: 1.1rem; color: var(--muted); }
.wr-hero-actions { justify-content: center; margin-top: 1.25rem; }
.wr-button-light { background: var(--surface); color: var(--brand-dark) !important; border: 2px solid var(--brand-dark); }
.wr-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }

/* ===== Design-Update: Buttons ===== */
/* Farbpalette = Theme "Blitzviolett" (Standard); weitere Themes überschreiben diese Variablen am Ende der Datei */
:root {
    --on-brand: #fff; --brand-text: var(--brand);
    --brand: #6c5ce7; --brand-light: #7b5cf0; --brand-deep: #5a49d6; --brand-soft: #eee7ff; --brand-dark: #2d2a6e; --header-bg: #2d2a6e;
    --bg: #f7f5ff; --surface: #fff; --surface-2: #f6f3ff; --ink: #1f1b3a; --muted: #6b6b85;
    --line: #e4def7; --line-strong: #c9c3e6; --card-border: #ece8fa; --track: #ece9f6;
    --danger: #e5484d; --ok: #12a150;
    --ok-soft: #e7f7ee; --ok-ink: #0b6b36; --bad-soft: #fdecec; --bad-ink: #a3262b;
    color-scheme: light;
}
body { background: var(--bg); color: var(--ink); }
.wr-main h1 { margin: .4rem 0 1rem; font-size: 1.7rem; }
.wr-main h2 { font-size: 1.2rem; }

.wr-btn, .wr-button, .wr-primary, .wr-main button:not([class]), .wr-form button[type=submit] {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1.1rem; font: inherit; font-size: .95rem; font-weight: 600;
    border: 2px solid transparent; border-radius: .8rem; text-decoration: none; cursor: pointer; line-height: 1.2;
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, background-color .12s ease; -webkit-tap-highlight-color: transparent;
}
.wr-btn-primary, .wr-button, .wr-primary, .wr-form button[type=submit] { background: linear-gradient(160deg, var(--brand-light), var(--brand)); color: var(--on-brand) !important; box-shadow: 0 4px 12px rgba(108, 92, 231, .3), inset 0 -3px 0 rgba(0, 0, 0, .14); }
.wr-btn-primary:hover, .wr-button:hover, .wr-primary:hover, .wr-form button[type=submit]:hover { filter: brightness(1.07); transform: translateY(-1px); }
.wr-btn-primary:active, .wr-button:active, .wr-primary:active { transform: translateY(1px); box-shadow: 0 1px 4px rgba(108, 92, 231, .3), inset 0 -1px 0 rgba(0, 0, 0, .14); }
.wr-btn-ghost, .wr-main button:not([class]), .wr-button-light { background: var(--surface); color: var(--brand-dark) !important; border-color: var(--line); }
.wr-btn-ghost:hover, .wr-main button:not([class]):hover { border-color: var(--brand); background: var(--brand-soft); }
.wr-btn-danger, .wr-main button.wr-danger { background: linear-gradient(160deg, #ff7a7e, var(--danger)); color: #fff !important; box-shadow: 0 4px 12px rgba(229, 72, 77, .3), inset 0 -3px 0 rgba(0, 0, 0, .14); }
.wr-main button.wr-danger { background: var(--surface); color: var(--danger) !important; border-color: #f6c9cb; box-shadow: none; }
.wr-btn-sm { padding: .35rem .8rem; font-size: .85rem; border-radius: .65rem; }
.wr-btn-block { display: flex; width: 100%; padding: .9rem; font-size: 1.05rem; }
.wr-btn[disabled], .wr-main button[disabled] { opacity: .5; cursor: default; filter: none; transform: none; }
.wr-btn:focus-visible, .wr-icon-btn:focus-visible, .wr-menu-item:focus-visible, .wr-option:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.wr-icon-btn { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.wr-icon-btn:hover { background: var(--brand-soft); color: var(--brand-dark); }
.wr-back { display: inline-block; margin: .2rem 0 .4rem; color: var(--brand-text); font-weight: 600; text-decoration: none; }
.wr-back:hover { text-decoration: underline; }
.wr-back-button { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; color: var(--danger); }
.wr-main button.wr-back-button { border: 0; padding: 0; background: none; color: var(--danger) !important; border-radius: 0; }
.wr-center { justify-content: center; margin-top: 1rem; }
.wr-spacer { flex: 1; }
.wr-pagehead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 .6rem; }
.wr-pagehead h1, .wr-pagehead h2 { margin: 0; }
.wr-pagehead-start { justify-content: flex-start; flex-wrap: nowrap; }

/* ===== Header: Profil ===== */
.wr-profile { display: inline-flex; align-items: center; gap: .5rem; }
.wr-avatar { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; font-size: .85rem; font-weight: 800; color: #fff; background: linear-gradient(145deg, hsl(var(--hue) 75% 62%), hsl(calc(var(--hue) + 40) 70% 45%)); border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.wr-user { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 40rem) { .wr-user { display: none; } }

/* ===== Cards ===== */
.wr-cards { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .9rem; }
.wr-cards > li { display: block; padding: 0; border: 0; }
.wr-bookcard, .wr-testcard { position: relative; display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; background: var(--surface); border: 2px solid var(--card-border); border-radius: 1.2rem; box-shadow: 0 6px 20px rgba(108, 92, 231, .08); color: inherit; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
a.wr-bookcard:hover, .wr-bookcard:has(.wr-bookcard-link):hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 10px 26px rgba(108, 92, 231, .16); }
.wr-bookcard-link { position: absolute; inset: 0; border-radius: 1.2rem; z-index: 1; }
.wr-bookcard .wr-kebab, .wr-bookcard .wr-card-actions { position: relative; z-index: 2; }
.wr-bookcard-body { flex: 1; min-width: 0; }
.wr-bookcard-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .8rem; }
.wr-bookcard-head h2 { margin: 0; font-size: 1.15rem; }
.wr-bookcard-body p { margin: .35rem 0 0; color: var(--muted); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wr-card-actions { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }
.wr-empty { text-align: center; padding: 2rem 1rem; background: var(--surface); border: 2px dashed var(--line); border-radius: 1.2rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.wr-badge { font-size: .72rem; font-weight: 700; padding: .12rem .6rem; border-radius: 999px; background: var(--track); color: var(--muted); white-space: nowrap; }
.wr-badge.is-ok { background: var(--ok-soft); color: var(--ok-ink); }
.wr-badge.is-warn { background: #fff3d6; color: #8a5a00; }

/* Buchbild */
.wr-cover { flex: none; display: grid; place-items: center; overflow: hidden; color: var(--on-brand); background: linear-gradient(145deg, var(--brand-light), var(--brand-deep)); border-radius: .9rem; box-shadow: 0 4px 12px rgba(108, 92, 231, .25); }
.wr-cover-sm { width: 4.2rem; height: 4.2rem; }
.wr-cover-lg { width: 6rem; height: 6rem; border-radius: 1.2rem; }
.wr-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wr-cover svg { width: 55%; height: 55%; }
.wr-bookhead { display: flex; align-items: center; gap: 1.1rem; margin: .4rem 0 .8rem; }
.wr-bookhead h1 { margin: 0 0 .3rem; }
.wr-bookhead p { margin: .4rem 0 0; }

/* Flaggen */
.wr-langpair { display: inline-flex; align-items: center; gap: .35rem; }
.wr-arrow { font-weight: 700; color: var(--brand-text); font-size: 1.05rem; }
.wr-flag { display: inline-block; width: 1.7rem; height: 1.15rem; border-radius: .25rem; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 1px 3px rgba(0, 0, 0, .15); flex: none; }
.wr-flag svg { display: block; width: 100%; height: 100%; }

/* Testsymbole */
.wr-modeicon { flex: none; display: inline-grid; place-items: center; border-radius: .9rem; color: var(--on-brand); background: linear-gradient(145deg, var(--brand-light), var(--brand-deep)); }
.wr-modeicon-sm { width: 2.8rem; height: 2.8rem; padding: .55rem; box-sizing: border-box; }
.wr-modeicon-lg { width: 4.2rem; height: 4.2rem; padding: .9rem; box-sizing: border-box; border-radius: 1.2rem; box-shadow: 0 6px 16px rgba(108, 92, 231, .3); }
.wr-modeicon.mode-matchpairs { background: linear-gradient(145deg, #34c9a0, #12a182); }
.wr-modeicon.mode-truefalse { background: linear-gradient(145deg, #ffb347, #f28a1b); }
.wr-modeicon svg { width: 100%; height: 100%; }
.wr-testcard-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.wr-testcard-meta { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }

/* Kontextmenü */
.wr-kebab { position: relative; flex: none; }
.wr-kebab-backdrop { position: fixed; inset: 0; z-index: 40; }
.wr-kebab-menu { position: absolute; right: 0; top: 100%; z-index: 41; min-width: 11rem; padding: .35rem; background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; box-shadow: 0 12px 30px rgba(31, 27, 58, .2); display: flex; flex-direction: column; animation: wr-tf-in .12s ease; }
.wr-menu-item, .wr-main button.wr-menu-item { display: block; text-align: left; width: 100%; padding: .55rem .8rem; border: 0; border-radius: .6rem; background: none; color: var(--ink) !important; font: inherit; font-size: .93rem; text-decoration: none; cursor: pointer; box-sizing: border-box; box-shadow: none; }
.wr-menu-item:hover, .wr-main button.wr-menu-item:hover { background: var(--brand-soft); }
.wr-menu-item.is-danger, .wr-main button.wr-menu-item.is-danger { color: var(--danger) !important; }
.wr-menu-item.is-danger:hover { background: var(--danger-soft, var(--bad-soft)); }

/* ===== Popups / Overlay ===== */
.wr-modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgba(31, 27, 58, .55); backdrop-filter: blur(2px); outline: none; animation: wr-fade .15s ease; }
.wr-modal { color: var(--ink); width: min(100%, 34rem); max-height: calc(100vh - 2rem); overflow-y: auto; background: var(--surface); border-radius: 1.4rem; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); animation: wr-tf-in .18s ease; }
.wr-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem .4rem; }
.wr-modal-head h2 { margin: 0; }
.wr-modal-body { padding: .4rem 1.2rem 1.2rem; }
.wr-modal-small { width: min(100%, 24rem); padding: 1.6rem 1.4rem 1.3rem; text-align: center; }
.wr-modal-small h2 { margin: .6rem 0 .3rem; }
.wr-modal-small p { margin: 0 0 1.2rem; color: var(--muted); }
.wr-modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .6rem; }
.wr-modal-small .wr-modal-actions { justify-content: center; }
.wr-dialog-icon { margin: 0 auto; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); font-size: 1.8rem; font-weight: 800; }
.wr-dialog-icon.is-danger { background: var(--bad-soft); color: var(--danger); }
.wr-select { display: flex; align-items: center; gap: .5rem; }
.wr-select select { flex: 1; padding: .5rem; font-size: 1rem; border-radius: .5rem; border: 1px solid var(--line-strong); background: var(--surface); }
.wr-form input:not([type=checkbox]):not([type=radio]), .wr-form textarea { border: 1px solid var(--line-strong); border-radius: .5rem; font: inherit; padding: .5rem; }
.wr-form textarea { resize: vertical; }
.wr-label { display: block; font-size: .95rem; margin-bottom: .25rem; }
.wr-imagefield { display: flex; align-items: center; gap: 1rem; }
.wr-imagefield > div { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
@keyframes wr-fade { from { opacity: 0; } to { opacity: 1; } }

/* ===== Wizard ===== */
.wr-steps { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0 0 1.2rem; }
.wr-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; position: relative; font-size: .8rem; color: var(--muted); }
.wr-steps li:not(:last-child)::after { content: ""; position: absolute; top: 1rem; left: calc(50% + 1.3rem); right: calc(-50% + 1.3rem); height: 3px; background: var(--line); border-radius: 2px; }
.wr-steps li.is-done:not(:last-child)::after { background: var(--brand); }
.wr-step-dot { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); font-weight: 700; }
.wr-steps li.is-current { color: var(--brand-dark); font-weight: 700; }
.wr-steps li.is-current .wr-step-dot { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.wr-steps li.is-done .wr-step-dot { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); }
.wr-wizard { background: var(--surface); border: 2px solid var(--card-border); border-radius: 1.2rem; padding: 1rem 1.2rem; box-shadow: 0 6px 20px rgba(108, 92, 231, .08); }
.wr-wizard h2 { margin-top: .2rem; }
.wr-wizard-actions { display: flex; gap: .6rem; align-items: center; margin-top: 1rem; }
.wr-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; }
.wr-main button.wr-option, .wr-option { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem .8rem; text-align: center; background: var(--surface); border: 2px solid var(--line); border-radius: 1.1rem; font: inherit; color: var(--ink) !important; cursor: pointer; transition: border-color .12s, background-color .12s, transform .12s; }
.wr-main button.wr-option:hover, .wr-option:hover { border-color: var(--brand); background: var(--surface-2); transform: translateY(-2px); }
.wr-main button.wr-option.is-selected, .wr-option.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(108, 92, 231, .2); }
.wr-option small { color: var(--muted); }
.wr-option .wr-langpair { font-size: 1.2rem; }
.wr-option .wr-flag { width: 2.2rem; height: 1.5rem; }

/* ===== Testseite ===== */
.wr-runhead { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; margin-bottom: 1rem; }
.wr-runhead h1 { margin: .5rem 0 0; }
.wr-runhead p { margin: 0 0 .4rem; }
.wr-timer { display: inline-flex; align-items: center; gap: .4rem; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.1rem; color: var(--brand-dark); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: .2rem .9rem; }
.wr-typing { max-width: 36rem; margin: 0 auto; }
.wr-typing .wr-tf-card { align-items: center; }
.wr-typing-form { margin-top: 1rem; }
.wr-typing-form input { font-size: 1.3rem; padding: .8rem 1rem !important; border-radius: .9rem !important; border: 2px solid var(--line) !important; text-align: center; }
.wr-typing-form input:focus { outline: none; border-color: var(--brand) !important; box-shadow: 0 0 0 4px var(--brand-soft); }
.wr-matchgame { max-width: 44rem; margin: 0 auto; }
.wr-hint { text-align: center; color: var(--muted); font-size: .9rem; margin: 0 0 .8rem; }
.wr-match { gap: 1.2rem; }
.wr-match-col { gap: .7rem; }
.wr-main button.wr-tile, .wr-tile { padding: .9rem .6rem; font-size: 1.1rem; font-weight: 600; color: var(--ink); border: 2px solid var(--line); border-radius: 1rem; min-height: 3.6rem; box-shadow: 0 4px 10px rgba(108, 92, 231, .08), inset 0 -3px 0 rgba(108, 92, 231, .08); transition: transform .12s, border-color .12s, background-color .12s; word-break: break-word; }
.wr-tile:hover:not([disabled]) { transform: translateY(-2px); border-color: var(--brand); }
.wr-tile-selected { border-color: var(--brand); background: var(--brand-soft) !important; box-shadow: 0 0 0 3px rgba(108, 92, 231, .25); }
.wr-tile-done { animation: wr-tf-pop .3s ease; }
.wr-tile-wrong { animation: wr-tf-shake .4s ease; }

/* ===== Statistik ===== */
.wr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .8rem; margin: .6rem 0 1.2rem; }
.wr-tile-stat { background: var(--surface); border: 2px solid var(--card-border); border-radius: 1rem; padding: .8rem; text-align: center; font-size: .82rem; color: var(--muted); }
.wr-tile-stat span { display: block; font-size: 1.5rem; font-weight: 800; color: var(--brand-text); }
.wr-history { display: flex; align-items: flex-end; gap: .5rem; height: 9rem; padding: 1.2rem .8rem .5rem; background: var(--surface); border: 2px solid var(--card-border); border-radius: 1rem; margin-bottom: 1.2rem; }
.wr-history-col { flex: 1; max-width: 3.5rem; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .15rem; }
.wr-history-pct { font-size: .72rem; color: var(--muted); }
.wr-history-bar { width: 100%; border-radius: .4rem .4rem 0 0; background: linear-gradient(180deg, var(--brand-light), var(--brand)); min-height: 3px; }
.wr-history-bar.is-aborted { background: repeating-linear-gradient(45deg, var(--line-strong), var(--line-strong) 4px, var(--track) 4px, var(--track) 8px); }
.wr-tablewrap { overflow-x: auto; background: var(--surface); border: 2px solid var(--card-border); border-radius: 1rem; padding: .3rem .6rem; margin-bottom: 1rem; }.wr-flag { position: relative; }
.wr-flag-code { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .62rem; font-weight: 800; }

/* ===== Sterne-Konto ===== */
.wr-starcounter { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .8rem .2rem .5rem; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; background: linear-gradient(180deg, #4a45a8, #3a3590); border: 2px solid #ffc933; box-shadow: 0 0 0 2px rgba(255, 201, 51, .25), inset 0 2px 4px rgba(0, 0, 0, .3); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.wr-starcounter svg { filter: drop-shadow(0 0 4px rgba(255, 201, 51, .8)); }
.wr-starcounter.is-bump { animation: wr-bump .9s ease; }
@keyframes wr-bump { 0% { transform: scale(1); } 25% { transform: scale(1.25); box-shadow: 0 0 0 6px rgba(255, 201, 51, .45); } 100% { transform: scale(1); } }
.wr-award { max-width: 28rem; margin: 0 auto 1rem; padding: .8rem 1rem; border-radius: 1rem; background: linear-gradient(145deg, #fff8dd, #ffeaa0); border: 2px solid #ffc933; }
.wr-award-main { font-size: 1.5rem; font-weight: 800; color: #8a5a00; animation: wr-tf-pop .5s ease; }
@media (max-width: 40rem) { .wr-starcounter { padding-right: .6rem; } }

.wr-forgot { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }

/* ===== Avatar ===== */
.wr-avatar-img { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); background: var(--surface); object-fit: cover; padding: 0; }
.wr-profile-btn { display: inline-flex; align-items: center; gap: .5rem; padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; border-radius: 999px; }
.wr-profile-btn:hover .wr-avatar, .wr-profile-btn:hover .wr-avatar-img { transform: scale(1.08); }
.wr-avatar, .wr-avatar-img { transition: transform .12s ease; }
.wr-profile-btn:focus-visible { outline: 3px solid #ffd43b; outline-offset: 3px; }
.wr-avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .8rem; }
.wr-avatar-option { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .7rem .4rem; background: var(--surface); border: 2px solid var(--line); border-radius: 1rem; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; transition: transform .12s, border-color .12s, background-color .12s; }
.wr-avatar-option img, .wr-avatar-option .wr-avatar { width: 4.6rem; height: 4.6rem; border-radius: 50%; font-size: 1.4rem; }
.wr-avatar-option:hover { transform: translateY(-2px); border-color: var(--brand); }
.wr-avatar-option.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(108, 92, 231, .25); }
.wr-avatar-option[disabled] { opacity: .6; cursor: default; }
.wr-avatar-option small { color: var(--muted); font-weight: 400; margin-top: -.3rem; }

/* ===== Profil-Dialog, Serie ===== */
.wr-tabs { display: flex; gap: .3rem; border-bottom: 2px solid var(--line); margin-bottom: 1rem; }
.wr-tab { flex: 1; padding: .6rem 1rem; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; border-radius: .6rem .6rem 0 0; }
.wr-tab:hover { background: var(--brand-soft); }
.wr-tab.is-active { color: var(--brand-text); border-bottom-color: var(--brand); }
.wr-profile-hero { display: flex; flex-direction: column; align-items: center; gap: .4rem; margin-bottom: 1rem; font-size: 1.2rem; }
.wr-profile-hero .wr-avatar, .wr-profile-hero .wr-avatar-img { width: 5.5rem; height: 5.5rem; font-size: 1.8rem; border-color: var(--line); }
.wr-tiles-2 { grid-template-columns: repeat(2, 1fr); }
.wr-tiles-2 .wr-tile-stat span { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; width: 100%; }
.wr-tile-stat.is-stars, .wr-tile-stat.is-streak { grid-column: span 1; }
.wr-tile-stat.is-stars span { color: #b8830a; }
.wr-tile-stat.is-streak span { color: #e8590c; }
.wr-soon { padding: 1rem; text-align: center; border: 2px dashed var(--line); border-radius: 1rem; }
.wr-modal-body h3 { margin: 1.2rem 0 .5rem; font-size: 1.05rem; }
.wr-flame { display: block; flex: none; }
.wr-flame-outer { fill: #c9c6d6; }
.wr-flame-inner { fill: #e4e2ee; }
.wr-flame.is-active .wr-flame-outer { fill: #ff8a1f; }
.wr-flame.is-active .wr-flame-inner { fill: #ffd43b; }
.wr-flame.is-active { filter: drop-shadow(0 0 5px rgba(255, 138, 31, .55)); }
.wr-streak-counter { display: inline-flex; align-items: center; gap: .15rem; padding: .2rem .7rem .2rem .4rem; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums; color: #cfcce8; background: rgba(255, 255, 255, .1); }
.wr-streak-counter.is-today { color: #ffb15c; background: rgba(255, 138, 31, .2); }
.wr-streakbanner { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.2rem; padding: .9rem 1.2rem; border-radius: 1.2rem; background: var(--surface); border: 2px solid var(--card-border); box-shadow: 0 6px 20px rgba(108, 92, 231, .08); }
.wr-streakbanner.is-running { background: linear-gradient(135deg, #fff4e0, #ffe3bd); border-color: #ffb15c; }
.wr-streakbanner-body { flex: 1; }
.wr-streakbanner-num { font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.wr-streakbanner-num span { font-size: 1.05rem; font-weight: 700; color: var(--muted); }
.wr-streakbanner.is-running .wr-streakbanner-num { color: #c2480a; }
.wr-streakbanner-body small { color: var(--muted); }
.wr-streakbanner-best { text-align: center; font-size: .72rem; color: var(--muted); }
.wr-streakbanner-best strong { display: block; font-size: 1.3rem; color: #c2480a; }
.wr-award-streak { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: #c2480a; margin-bottom: .2rem; }

/* Sternebox: jede Angabe in eigener Zeile */
.wr-award { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.wr-award-streak { margin: 0; }
.wr-award-hint { font-size: .85rem; color: var(--muted); }
.wr-award-calc { font-size: .82rem; color: var(--muted); line-height: 1.4; padding-top: .35rem; border-top: 1px solid rgba(138, 90, 0, .2); width: 100%; }

/* Feste Höhe, damit der Dialog beim Tabwechsel nicht springt */
.wr-tabpanel { height: min(31rem, calc(100vh - 14rem)); min-height: 16rem; overflow-y: auto; }
.wr-focus-icon { font-size: 2.2rem; line-height: 1; }

/* Zeitraum-Umschalter und Wochenchart im Profil */
.wr-segmented { display: flex; gap: .25rem; padding: .25rem; margin: 0 0 .9rem; background: var(--brand-soft); border-radius: 999px; }
.wr-segmented button { flex: 1; padding: .4rem .6rem; border: 0; border-radius: 999px; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.wr-segmented button.is-active { background: var(--surface); color: var(--brand-text); box-shadow: 0 2px 6px rgba(108, 92, 231, .2); }
.wr-history-week { height: 10rem; }
.wr-history-day { font-size: .75rem; color: var(--muted); margin-top: .15rem; }
.wr-history-day.is-today { color: var(--brand-text); font-weight: 800; }

/* Paar-Timer im Wortpaare-Spiel: Farbe von Grün (voller Zeitbonus) über Gelb nach Rot */
.wr-pairtimer { --c: hsl(var(--h) 75% 42%); margin: 0 auto 1rem; padding: .6rem .9rem; max-width: 22rem; background: var(--surface); border: 2px solid var(--c); border-radius: 1rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .06); transition: border-color .2s; }
.wr-pairtimer-top { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.wr-pairtimer-time { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--c); }
.wr-pairtimer-bonus { font-size: .85rem; font-weight: 700; color: var(--c); }
.wr-pairtimer-bar { height: .5rem; margin-top: .35rem; background: var(--track); border-radius: 999px; overflow: hidden; }
.wr-pairtimer-bar > div { height: 100%; background: var(--c); border-radius: 999px; }
.wr-tile-stat.is-wide { grid-column: 1 / -1; }

/* ===== Abmelden-Icon, Seite auf volle Höhe, Benutzerliste ===== */
.wr-logout { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.wr-logout:hover { background: rgba(255, 255, 255, .18); }
.wr-logout:focus-visible { outline: 3px solid #ffd43b; outline-offset: 2px; }

/* Neuer Test: Karte nutzt die komplette Bildschirmhöhe (Kopfzeile ca. 4 rem, Seitenrand 2 rem), die Liste scrollt in der Karte */
.wr-fill { display: flex; flex-direction: column; min-height: 28rem; height: calc(100vh - 6.5rem); height: calc(100dvh - 6.5rem); }
.wr-fill > .wr-wizard { flex: 1; min-height: 0; overflow-y: auto; }
.wr-fill .wr-pick-sub { max-height: none; overflow: visible; }

.wr-tabs > a.wr-tab { text-align: center; text-decoration: none; }
.wr-tablewrap-open { overflow: visible; }
.wr-row-blocked td { color: var(--muted); }
.wr-table .wr-kebab-menu { text-align: left; }

/* ===== Streak Freeze ===== */
.wr-freeze-counter { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .65rem .2rem .45rem; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums; color: #9aa3c7; background: rgba(255, 255, 255, .1); }
.wr-freeze-counter.has-freeze { color: #8fe3ff; background: rgba(79, 195, 247, .2); }
.wr-freeze-icon { display: block; flex: none; color: #b9bdd6; }
.wr-freeze-icon.is-active { color: #29b6f6; filter: drop-shadow(0 0 4px rgba(79, 195, 247, .6)); }
.wr-freeze-counter.has-freeze .wr-freeze-icon { color: #8fe3ff; }
.wr-freeze-note { display: flex; align-items: center; gap: .3rem; }
.wr-freeze-note .wr-freeze-icon { color: #0b86c4; }
.wr-award-freeze { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: #0b86c4; }
.wr-repair { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; }
.wr-repair p { margin: 0; }
.wr-repair-calc { list-style: none; padding: .6rem .9rem; margin: .2rem 0; width: 100%; box-sizing: border-box; background: var(--brand-soft); border-radius: .9rem; display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.wr-repair-calc li { display: flex; align-items: center; gap: .4rem; }
.wr-repair-cost { font-size: 1.15rem; }


/* ===== Themes ===== */
/* Hell: Blitzviolett (Standard, siehe :root), Meeresbrise, Sonnenaufgang · Dunkel: Mitternacht, Nordlicht, Glutkern */
[data-theme="meeresbrise"] {
    --brand: #0b7d98; --brand-light: #1b9bb8; --brand-deep: #086379; --brand-soft: #dff3f7; --brand-dark: #0b4a5c; --header-bg: #0b4a5c;
    --bg: #f0f8fa; --surface: #fff; --surface-2: #eaf6f8; --ink: #12333d; --muted: #52717b;
    --line: #cfe6eb; --line-strong: #a9ccd4; --card-border: #d9edf1; --track: #dcecef;
}
[data-theme="sonnenaufgang"] {
    --brand: #d9480f; --brand-light: #f76707; --brand-deep: #bf3d08; --brand-soft: #ffe8d6; --brand-dark: #7a2e0c; --header-bg: #8c3510;
    --bg: #fff7f0; --surface: #fff; --surface-2: #fff1e6; --ink: #3a2318; --muted: #7d6354;
    --line: #f3dccb; --line-strong: #e3c3ab; --card-border: #f6e4d6; --track: #f3e5da;
}
[data-theme="mitternacht"] {
    --brand: #7c6af2; --brand-light: #8d7df7; --brand-deep: #5f4fd6; --brand-soft: #2b2860; --brand-dark: #d4ceff; --header-bg: #0c0c22;
    --bg: #12122b; --surface: #1c1c3d; --surface-2: #232350; --ink: #ecebff; --muted: #a3a3c9;
    --line: #35356a; --line-strong: #4a4a85; --card-border: #2c2c5a; --track: #2a2a55;
}
[data-theme="nordlicht"] {
    --brand: #0f9a73; --brand-light: #1fbf8f; --brand-deep: #0b7d5c; --brand-soft: #123b36; --brand-dark: #9ff0d3; --header-bg: #07121a;
    --bg: #0b1a1f; --surface: #11262d; --surface-2: #16313a; --ink: #e6f6f1; --muted: #8fb3ae;
    --line: #21434b; --line-strong: #2f5963; --card-border: #1b3840; --track: #1d3a42;
}
[data-theme="glutkern"] {
    --brand: #e8590c; --brand-light: #ff7a2e; --brand-deep: #c2410c; --brand-soft: #3f241a; --brand-dark: #ffc4a3; --header-bg: #120d0c;
    --bg: #1a1412; --surface: #261c19; --surface-2: #30231f; --ink: #f8ece6; --muted: #c0a79b;
    --line: #4a352e; --line-strong: #61463c; --card-border: #3a2a25; --track: #3a2b26;
}

/* Weitere helle Themes: Zitronenlimo (Gelb), Limettenblitz (Neongrün), Zuckerwatte (Pink).
   --on-brand = Schrift auf Markenflächen, --brand-text = Markenfarbe als Text (bei hellen Akzenten dunkler) */
[data-theme="zitronenlimo"] {
    --brand: #f5c000; --brand-light: #ffd43b; --brand-deep: #d99a00; --brand-soft: #fff2a8; --brand-dark: #5c4300; --header-bg: #5c4300;
    --on-brand: #332800; --brand-text: #8a6400;
    --bg: #fffbea; --surface: #fff; --surface-2: #fff7cc; --ink: #332800; --muted: #7a6a2e;
    --line: #f1e2a1; --line-strong: #dcc66b; --card-border: #f6ebb8; --track: #f4e9b8;
}
[data-theme="limettenblitz"] {
    --brand: #14c43f; --brand-light: #39f56a; --brand-deep: #0da632; --brand-soft: #d4ffd9; --brand-dark: #0a4d1a; --header-bg: #0b3d1a;
    --on-brand: #03260c; --brand-text: #0a8a26;
    --bg: #f3fff2; --surface: #fff; --surface-2: #e6ffe6; --ink: #0d2a14; --muted: #4f7a58;
    --line: #c5efc9; --line-strong: #8fd89a; --card-border: #d3f3d6; --track: #d5f1d9;
}
[data-theme="zuckerwatte"] {
    --brand: #d6247f; --brand-light: #f0529c; --brand-deep: #b0145f; --brand-soft: #ffe0ef; --brand-dark: #7a0f43; --header-bg: #8a1550;
    --on-brand: #fff; --brand-text: #c01d70;
    --bg: #fff0f7; --surface: #fff; --surface-2: #ffe8f3; --ink: #3d1028; --muted: #8a5a73;
    --line: #f8d3e5; --line-strong: #ecb0cc; --card-border: #fadcea; --track: #f6dce8;
}

/* Gemeinsam für alle dunklen Themes */
[data-mode="dark"] {
    color-scheme: dark;
    --ok-soft: #12362a; --ok-ink: #6ee7a8; --bad-soft: #3d1d2a; --bad-ink: #ff9aa0; --danger-soft: #3d1d2a;
}
[data-mode="dark"] .wr-tf-card.is-ok .wr-tf-side-proposal, [data-mode="dark"] .wr-tf-card.is-bad .wr-tf-side-proposal { background: rgba(0, 0, 0, .25); }
[data-mode="dark"] .wr-streakbanner.is-running { background: linear-gradient(135deg, #3a2616, #4b2f17); border-color: #b8691f; }
[data-mode="dark"] .wr-streakbanner.is-running .wr-streakbanner-num { color: #ffb15c; }
[data-mode="dark"] .wr-award { background: linear-gradient(145deg, #3a3010, #4a3d12); }
[data-mode="dark"] .wr-award-main { color: #ffd666; }
[data-mode="dark"] .wr-award-streak, [data-mode="dark"] .wr-streakbanner-best strong { color: #ffb15c; }
[data-mode="dark"] .wr-tile-stat.is-stars span { color: #ffd666; }
[data-mode="dark"] .wr-tile-stat.is-streak span { color: #ff9a4d; }
[data-mode="dark"] .wr-badge.is-warn { background: #4a3a12; color: #ffd666; }
[data-mode="dark"] .wr-flame:not(.is-active) .wr-flame-outer { fill: #4b4b6a; }
[data-mode="dark"] .wr-flame:not(.is-active) .wr-flame-inner { fill: #62628a; }
[data-mode="dark"] .wr-modal-small p, [data-mode="dark"] .wr-hint { color: var(--muted); }

/* Eingabefelder folgen dem Theme */
.wr-form input:not([type=checkbox]):not([type=radio]), .wr-form textarea, .wr-select select { background: var(--surface); color: var(--ink); }

/* Theme-Auswahl im Profil */
.wr-theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .8rem; }
.wr-theme-option { display: flex; flex-direction: column; gap: .35rem; padding: .6rem; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 1rem; font: inherit; color: var(--ink); cursor: pointer; transition: transform .12s, border-color .12s; }
.wr-theme-option:hover { transform: translateY(-2px); border-color: var(--brand); }
.wr-theme-option.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.wr-theme-option strong { font-size: .95rem; }
.wr-theme-option small { color: var(--muted); }
.wr-theme-preview { display: flex; flex-direction: column; height: 3.6rem; border-radius: .6rem; overflow: hidden; border: 1px solid rgba(128, 128, 128, .35); }
.wr-theme-preview > i { display: block; height: .8rem; }
.wr-theme-preview > div { flex: 1; display: flex; align-items: center; gap: .3rem; padding: 0 .5rem; }
.wr-theme-preview > div > b { display: block; width: 1.3rem; height: 1.3rem; border-radius: .35rem; }
.wr-theme-preview > div > span { display: block; flex: 1; height: .45rem; border-radius: 999px; opacity: .5; }
/* ===== Header auf schmalen Bildschirmen (Handy): Hamburgermenü, Sterne und Avatar bleiben sichtbar ===== */
.wr-header-left { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.wr-hamburger { position: relative; display: none; }
.wr-hamburger-menu { left: 0; right: auto; }
.wr-nav { min-width: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: .3rem; }
.wr-header { gap: .5rem; }
@media (max-width: 48rem) {
    .wr-hamburger { display: block; }
    .wr-nav-admin, .wr-nav > .wr-logout { display: none; }
    .wr-header { padding: .5rem .6rem; }
    .wr-nav { gap: .4rem; }
    .wr-starcounter { padding: .15rem .6rem .15rem .4rem; }
    .wr-streak-counter, .wr-freeze-counter { padding-right: .5rem; }
}
@media (max-width: 40rem) {
    .wr-brand-text { display: none; }
}

/* Profil-Reiter: Symbol + Text; auf schmalen Bildschirmen nur Symbole, der aktive Reiter behält seinen Text */
.wr-tabs-icons .wr-tab { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; color: var(--muted); }
.wr-tabs-icons .wr-tab.is-active { color: var(--brand-text); }
@media (max-width: 40rem) {
    .wr-tabs-icons { gap: .1rem; }
    .wr-tabs-icons .wr-tab { padding: .6rem .4rem; }
    .wr-tabs-icons .wr-tab:not(.is-active) { flex: 0 0 auto; }
    .wr-tabs-icons .wr-tab:not(.is-active) .wr-tab-label { display: none; }
    .wr-tabs-icons .wr-tab.is-active { flex: 1 1 auto; }
}

/* ===== Hinweis-Rotation im Serien-Banner, Info/Impressum, Fußzeile ===== */
.wr-streakbanner-tips { min-height: 3.1em; }
.wr-streakbanner-tip { display: inline-flex; align-items: flex-start; gap: .3rem; color: var(--muted); animation: wr-tf-in .35s ease; }
.wr-streakbanner-tip .wr-freeze-icon { flex: none; margin-top: .1em; color: #0b86c4; }
.wr-streakbanner-tip.is-praise { color: var(--ok-ink); font-weight: 700; }
.wr-menu-sep { border: 0; border-top: 1px solid var(--line); margin: .3rem .2rem; }
.wr-info { max-width: 44rem; line-height: 1.55; }
.wr-info h2 { margin: 1.4rem 0 .3rem; }
.wr-info p { margin: 0 0 .6rem; }
.wr-footer { display: flex; justify-content: center; gap: 1.2rem; padding: 1rem; font-size: .85rem; }
.wr-footer a { color: var(--muted); text-decoration: none; }
.wr-footer a:hover { text-decoration: underline; }

/* ===== Profil kompakt: kein Scrollen im Dialog ===== */
.wr-tabpanel { height: min(32rem, calc(100vh - 11rem)); min-height: 18rem; overflow-y: auto; }
.wr-profile-hero { gap: .2rem; margin-bottom: .6rem; font-size: 1.1rem; }
.wr-profile-hero .wr-avatar, .wr-profile-hero .wr-avatar-img { width: 4rem; height: 4rem; font-size: 1.4rem; }
.wr-tiles { gap: .6rem; margin: .4rem 0 .8rem; }
.wr-tile-stat { padding: .55rem; }
.wr-history-week { height: 8rem; margin-bottom: .6rem; }
.wr-modal-body h3 { margin: .6rem 0 .4rem; }

/* Beispielsatz mit Übersetzung unter der Antwort */
.wr-example { display: flex; flex-direction: column; gap: .1rem; margin: .4rem 0; }

/* Bereichsauswahl im Test-Assistenten */
.wr-range { margin: 0 0 .6rem; }
.wr-range-panel { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; margin-top: .5rem; padding: .6rem .8rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: .9rem; }
.wr-range-panel label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; color: var(--muted); flex: 1 1 12rem; min-width: 0; }
.wr-range-panel select { padding: .45rem; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: .5rem; min-width: 0; }
.wr-range-panel .wr-check { flex-direction: row; align-items: center; flex: 1 1 100%; color: var(--ink); }

/* Ergebnis "Richtig!" im Tipp-Spiel: groß, zweizeilig */
.wr-result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .1rem; margin: .6rem 0; }
.wr-result-main { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.wr-result-sub { font-size: .95rem; font-weight: 600; color: var(--muted); }

/* Übungs-Kopf kompakt: zentriert, ohne Symbol, enge Abstände */
.wr-runhead { gap: .3rem; margin: 0 0 .8rem; }
.wr-runhead h1 { margin: .45rem 0 0; font-size: 1.3rem; line-height: 1.35; overflow-wrap: anywhere; }
.wr-runhead p { margin: 0; font-size: .85rem; line-height: 1.5; }
.wr-runhead .wr-modeicon-sm { width: 2.2rem; height: 2.2rem; padding: .45rem; }
.wr-runhead .wr-timer { margin-top: .3rem; font-size: 1rem; padding: .1rem .7rem; }

/* Breiter Dialog (Profil): kein horizontales Scrollen, Reiter in einer Zeile */
.wr-modal.wr-modal-wide { width: min(100%, 48rem); overflow-x: hidden; }
.wr-modal-wide .wr-tabs-icons .wr-tab { white-space: nowrap; }
