/* Projekt Hola – Stylesheet (kein Framework, alles lokal) */

/* Eigene Headline-Schrift, selbst gehostet (Bricolage Grotesque, OFL-Lizenz) */
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal; font-weight: 700; font-display: swap;
    src: url('../fonts/bricolage-grotesque-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal; font-weight: 800; font-display: swap;
    src: url('../fonts/bricolage-grotesque-latin-800-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal; font-weight: 700; font-display: swap;
    src: url('../fonts/bricolage-grotesque-latin-ext-700-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal; font-weight: 800; font-display: swap;
    src: url('../fonts/bricolage-grotesque-latin-ext-800-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Warme spanische Nacht statt generischem Lila: Terracotta, Sonne, Azulejo */
:root {
    --bg: #191c24;
    --bg-card: #20242f;
    --bg-input: #14171e;
    --border: #353b49;
    --text: #f3efe7;
    --muted: #9aa1b2;
    --accent: #d94f35;      /* Terracotta */
    --accent-2: #f2b134;    /* Sonnengelb */
    --azul: #4d9fe0;        /* Azulejo-Blau */
    --green: #3fae7c;
    --radius: 14px;
    --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(165deg, #191c24 0%, #1d212b 55%, #241f22 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.55;
}
a { color: var(--accent-2); }
h1, h2, h3 { line-height: 1.25; font-family: var(--font-display); letter-spacing: -.01em; }
h1 { font-size: 1.9rem; font-weight: 800; }
code { background: var(--bg-input); padding: .1rem .4rem; border-radius: 6px; font-size: .85em; }

/* ── Header / Footer ─────────────────────────────────────────── */
.site-header {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .8rem 1.2rem; flex-wrap: wrap;
    background: rgba(18, 20, 27, .78); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.logo { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-display);
    font-size: 1.45rem; font-weight: 800; text-decoration: none; color: var(--text); letter-spacing: -.02em; }
.logo .logo-mark { width: 30px; height: 30px; flex-shrink: 0; }
.logo .logo-word { display: inline; } .logo span span { color: var(--accent-2); }
.site-header nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.site-header nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.site-header nav a:hover, .nav-admin { color: var(--accent-2); }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem; }

.container { max-width: 960px; margin: 0 auto; padding: 1.2rem; }

/* ── Bausteine ───────────────────────────────────────────────── */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem;
}
.btn {
    display: inline-block; background: var(--accent); color: #fff; border: 0;
    border-radius: 10px; padding: .65rem 1.3rem; font-size: 1rem; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-big { padding: .9rem 1.9rem; font-size: 1.12rem; }
.btn-small { padding: .35rem .8rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: #7a2030; }
.linklike { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 0; }
.linklike:hover { color: var(--accent-2); }
.inline-form { display: inline; }
.center { text-align: center; }
.hint { color: var(--muted); font-size: .85rem; }
.lead { font-size: 1.1rem; color: var(--muted); }

.pill {
    display: inline-block; padding: .12rem .6rem; border-radius: 999px;
    font-size: .78rem; background: var(--bg-input); border: 1px solid var(--border);
}
.pill-green { color: var(--green); border-color: var(--green); }
.pill-yellow { color: var(--accent-2); border-color: var(--accent-2); }
.pill-red { color: var(--accent); border-color: var(--accent); }

.flash { max-width: 960px; margin: .8rem auto 0; padding: .7rem 1.2rem; border-radius: 10px; }
.flash-success { background: #173a2a; border: 1px solid var(--green); }
.flash-error { background: #4a1a2a; border: 1px solid var(--accent); }
.notice-bar { background: #4a3a10; border-bottom: 1px solid var(--accent-2); padding: .5rem 1.2rem; font-size: .9rem; }

.progress { height: 8px; background: var(--bg-input); border-radius: 999px; overflow: hidden; margin-top: .4rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transition: width .3s; }

/* ── Landing ─────────────────────────────────────────────────── */
.hero { text-align: center; padding: 3rem 1rem 2rem; }
.hero-emoji { font-size: 3.2rem; }
.hero h1 { font-size: 2.3rem; margin: .6rem 0; }
.hero em { color: var(--accent-2); font-style: normal; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.feature-emoji { font-size: 2rem; }

/* ── Lektionen ───────────────────────────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat { text-align: center; margin-bottom: 0; }
.stat-num { font-size: 1.7rem; font-weight: 800; color: var(--accent-2); }
.stat-label { color: var(--muted); font-size: .85rem; }

.review-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    text-decoration: none; color: var(--text); border-color: var(--accent-2);
}
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.lesson { display: flex; flex-direction: column; margin-bottom: 0; }
.lesson-emoji { font-size: 2rem; }
.lesson h2 { font-size: 1.15rem; margin: .4rem 0; }
.lesson p { color: var(--muted); font-size: .92rem; flex: 1; }
.lesson-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0; font-size: .85rem; color: var(--muted); align-items: center; }
.lesson-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ── Phrasen (Study-Modus) ───────────────────────────────────── */
.phrase-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.phrase-es { font-size: 1.2rem; font-weight: 700; color: var(--accent-2); }
.phrase-de { font-weight: 600; }
.phrase-literal { color: var(--muted); font-size: .88rem; margin: .3rem 0; }
.phrase-note { font-size: .92rem; margin: .4rem 0; }
.phrase-example { background: var(--bg-input); border-radius: 10px; padding: .6rem .9rem; margin-top: .5rem; display: flex; flex-direction: column; gap: .15rem; }
.ex-es { font-style: italic; }
.ex-de { color: var(--muted); font-size: .88rem; }

/* ── Quiz ────────────────────────────────────────────────────── */
.quiz-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.quiz-quit {
    color: var(--muted); text-decoration: none; font-size: 1.3rem;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px; margin: -.6rem;
}
.quiz-progress { flex: 1; height: 10px; background: var(--bg-input); border-radius: 999px; overflow: hidden; }
.quiz-count { color: var(--muted); font-size: .9rem; min-width: 3.5rem; text-align: right; }
.quiz-card { padding: 1.6rem; }
.quiz-prompt { font-size: 1.3rem; font-weight: 700; margin: 0 0 .3rem; }
.quiz-hint { color: var(--muted); margin: 0 0 1rem; }
.quiz-options { display: grid; gap: .7rem; }
.quiz-option {
    text-align: left; background: var(--bg-input); color: var(--text);
    border: 2px solid var(--border); border-radius: 12px; padding: .85rem 1rem;
    font-size: 1.02rem; cursor: pointer; transition: border-color .12s, background .12s;
}
.quiz-option:hover { border-color: var(--accent-2); }
.quiz-option.pending { border-color: var(--accent-2); opacity: .85; }   /* Antwort wird gerade geprüft */
.quiz-option.correct { border-color: var(--green); background: #173a2a; }
.quiz-option.wrong { border-color: var(--accent); background: #4a1a2a; }
.quiz-option:disabled { cursor: default; opacity: .85; }
.quiz-feedback { margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px; background: var(--bg-input); }
.quiz-feedback.good { border-left: 4px solid var(--green); }
.quiz-feedback.bad { border-left: 4px solid var(--accent); }
.quiz-next { margin-top: 1rem; }
.quiz-result { text-align: center; padding: 1rem 0; }
.quiz-result .big { font-size: 3rem; }
.quiz-reward { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin: 1rem 0; }

/* ── Auth / Formulare ────────────────────────────────────────── */
.auth-card { max-width: 420px; margin: 2rem auto; }
label { display: block; margin: .7rem 0; font-size: .92rem; }
input, textarea, select {
    width: 100%; margin-top: .25rem; padding: .6rem .8rem; border-radius: 9px;
    border: 1px solid var(--border); background: var(--bg-input); color: var(--text); font-size: 1rem;
    font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-2); border-color: transparent; }
.checkbox { display: flex; align-items: center; gap: .5rem; }
.checkbox input { width: auto; margin: 0; }
input[type="radio"], input[type="checkbox"] { width: auto; margin: 0; flex-shrink: 0; }

/* ── Profil ──────────────────────────────────────────────────── */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; }
.badge { text-align: center; margin-bottom: 0; }
.badge-emoji { font-size: 2rem; }
.badge-name { font-weight: 700; margin: .3rem 0 .1rem; }
.badge.locked { opacity: .45; }

/* ── Admin ───────────────────────────────────────────────────── */
.admin-nav { display: flex; gap: .4rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.admin-nav a {
    text-decoration: none; color: var(--text); padding: .45rem 1rem;
    border-radius: 999px; border: 1px solid var(--border); font-size: .92rem;
}
.admin-nav a.active, .admin-nav a:hover { border-color: var(--accent-2); color: var(--accent-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table td, .data-table th { padding: .45rem .5rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.data-table th { color: var(--muted); font-weight: 600; font-size: .82rem; }
.data-table .num { text-align: right; }
.data-table .actions { white-space: nowrap; }
.row-pending { background: rgba(255, 176, 59, .06); }

.chart-card { overflow-x: auto; }
.chart { width: 100%; min-width: 600px; height: auto; }
.bar-pv { fill: var(--accent); opacity: .55; }
.bar-uv { fill: var(--accent-2); }
.chart-label { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.chart-legend { display: flex; gap: 1.2rem; font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; }
.dot-pv { background: var(--accent); opacity: .55; }
.dot-uv { background: var(--accent-2); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; align-items: end; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid button { margin: .7rem 0; justify-self: start; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.phrase-edit summary { cursor: pointer; font-size: 1rem; }
.phrase-edit[open] summary { margin-bottom: .8rem; }

/* ── Sprachkennzeichnung ES/DE (v0.4) ────────────────────────── */
.lang-chip {
    display: inline-block; padding: .1rem .55rem; border-radius: 999px;
    font-size: .72rem; font-weight: 700; letter-spacing: .03em;
    vertical-align: middle; margin-bottom: .3rem;
}
.lang-chip-es { background: rgba(255, 176, 59, .15); color: var(--accent-2); border: 1px solid var(--accent-2); }
.lang-chip-de { background: rgba(156, 143, 196, .15); color: var(--muted); border: 1px solid var(--muted); }
.quiz-prompt.lang-es { color: var(--accent-2); }
.quiz-prompt.lang-de { color: var(--text); }
.quiz-task { color: var(--muted); font-size: .95rem; margin: 0 0 .5rem; }
.lang-opts-es .quiz-option { color: var(--accent-2); font-weight: 600; }
.lang-opts-de .quiz-option { color: var(--text); }

/* ── Lernkarten (Lerneinheit) ────────────────────────────────── */
.study-card { text-align: center; padding: .6rem 0; }
.study-es { font-size: 1.9rem; font-weight: 800; color: var(--accent-2); margin: .4rem 0 1.2rem; }
.study-back { margin-top: 1rem; text-align: left; }
.study-de { font-size: 1.3rem; font-weight: 700; margin: .3rem 0 .6rem; }
.study-back .quiz-next { margin-top: 1.2rem; }

/* ── Paare-Spiel ─────────────────────────────────────────────── */
.pairs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.pairs-col { display: flex; flex-direction: column; gap: .55rem; }
.pair-card {
    background: var(--bg-input); color: var(--text); border: 2px solid var(--border);
    border-radius: 11px; padding: .7rem .8rem; font-size: .95rem; cursor: pointer;
    text-align: left; transition: border-color .12s, opacity .25s;
}
.pair-card-es { color: var(--accent-2); font-weight: 600; }
.pair-card:hover { border-color: var(--accent-2); }
.pair-card.selected { border-color: var(--accent); background: #3a2050; }
.pair-card.done { border-color: var(--green); background: #173a2a; opacity: .5; cursor: default; }
@media (max-width: 560px) { .pair-card { font-size: .82rem; padding: .55rem .6rem; } }

/* ── Satzbau ─────────────────────────────────────────────────── */
.order-answer {
    min-height: 3.2rem; border: 2px dashed var(--border); border-radius: 12px;
    padding: .5rem; margin: .4rem 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem;
    align-items: center; transition: border-color .2s;
}
.order-answer.order-good { border-color: var(--green); }
.order-answer.order-ok { border-color: var(--accent-2); }
.order-answer.order-bad { border-color: var(--accent); border-style: solid; }
.order-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    background: var(--bg-input); color: var(--accent-2); font-weight: 600;
    border: 2px solid var(--border); border-radius: 999px; padding: .45rem .9rem;
    font-size: 1rem; cursor: pointer;
}
.chip:hover { border-color: var(--accent-2); }
.chip.done { opacity: .25; cursor: default; }
.chip-placed { border-color: var(--accent-2); cursor: pointer; }   /* antippen nimmt das Wort zurück */
.chip-placed:disabled { cursor: default; }

/* ── Feedback-Animationen ────────────────────────────────────── */
@keyframes hola-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
.shake { animation: hola-shake .3s ease 1; border-color: var(--accent) !important; }

/* ── Achievements ────────────────────────────────────────────── */
.badge-unlock { margin: 1rem auto; max-width: 420px; text-align: left; }
.badge-unlock-item {
    display: flex; gap: .8rem; align-items: center;
    background: linear-gradient(90deg, rgba(255,176,59,.12), transparent);
    border: 1px solid var(--accent-2); border-radius: 12px;
    padding: .7rem 1rem; margin-bottom: .5rem;
    animation: badge-pop .45s ease;
}
.badge-unlock-emoji { font-size: 1.8rem; }
@keyframes badge-pop {
    0% { transform: scale(.7); opacity: 0; }
    70% { transform: scale(1.06); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Lektionen: Spiele-Leiste ────────────────────────────────── */
.lesson-games { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; font-size: .85rem; }
.game-link {
    text-decoration: none; color: var(--text); border: 1px solid var(--border);
    border-radius: 999px; padding: .3rem .8rem;
}
.game-link:hover { border-color: var(--accent-2); color: var(--accent-2); }
.blitz-banner { border-color: var(--accent); }

/* ── Rechtsseiten ────────────────────────────────────────────── */
.legal { max-width: 760px; }
.legal h2 { color: var(--accent-2); font-size: 1.15rem; margin-top: 1.6rem; }
.legal-note {
    background: rgba(255, 176, 59, .08); border: 1px solid var(--accent-2);
    border-radius: 10px; padding: .7rem 1rem; font-size: .88rem;
}
.footer-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: .5rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .85rem; }
.footer-links a:hover { color: var(--accent-2); }

/* ── Consent-Banner (nur wenn Werbung aktiv) ─────────────────── */
.consent-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    background: #14171e; border-top: 1px solid var(--accent-2);
    padding: 1rem 1.2rem; display: flex; gap: 1rem; align-items: center;
    flex-wrap: wrap; justify-content: center;
}
.consent-banner p { margin: 0; font-size: .88rem; max-width: 640px; }
.consent-banner[hidden] { display: none; }   /* display:flex überstimmte das hidden-Attribut: Banner blieb nach „Nein“ sichtbar */
.consent-buttons { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.consent-buttons .btn { background: var(--accent-2); color: #14171e; }   /* beide gleich – kein Nudging */
.ad-label { margin: .2rem 0; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
.footer-linklike { font-size: inherit; }
.support-card { border-left: 4px solid var(--accent-2); }
.support-card-compact { margin-top: 1.5rem; }
.support-card .support-note { margin-top: .6rem; }
.share-btn { margin-top: .8rem; display: inline-block; }

/* ── Admin: Content-Prüfung ──────────────────────────────────── */
.check-warn { border-left: 4px solid var(--accent-2); }
.check-bad { border-left: 4px solid var(--accent); }
.review-progress { display: flex; align-items: center; gap: .8rem; }
.review-progress .progress { flex: 1; margin: 0; }
.phrase-review { display: grid; grid-template-columns: 1fr auto; gap: .8rem; align-items: start; }
.phrase-review-fields { font-size: .92rem; }
.phrase-review-fields dt { color: var(--muted); font-size: .78rem; margin-top: .4rem; }
.phrase-review-fields dd { margin: 0; }
tr.reviewed td { opacity: .55; }

/* ── Mobile-Feinschliff (v0.4.1): breite Tabellen scrollen im Kasten ── */
@media (max-width: 720px) {
    .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table th, .data-table td { white-space: nowrap; }
    .data-table td[style*="max-width"] { white-space: normal; min-width: 220px; }
    .admin-nav { font-size: .85rem; }
}
.legal a { overflow-wrap: anywhere; }
.legal p, .legal-note { overflow-wrap: break-word; }

/* ══ v0.5: Audio, Lernkarten, Tippen, Dialoge, Missionen, SEO ══ */

.mute-btn { font-size: 1.15rem; }
.speak-btn {
    background: none; border: 0; cursor: pointer; font-size: 1em;
    vertical-align: middle; opacity: .8; transition: transform .1s;
    /* Mindestens 40x40 px Trefferfläche (Daumen), ohne die Zeile auseinanderzuziehen */
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; min-height: 40px; margin: -10px -6px; padding: 0;
}
.speak-btn:hover { opacity: 1; transform: scale(1.15); }

/* Lernkarten: Selbsteinschätzung */
.study-assess { display: flex; gap: .7rem; justify-content: center; margin-top: 1.2rem; flex-wrap: wrap; }

/* Tipp-Modus */
.typing-input {
    font-size: 1.15rem; padding: .8rem 1rem; border-radius: 12px;
    border: 2px solid var(--border); background: var(--bg-input); color: var(--accent-2);
    font-weight: 600; width: 100%;
}
.typing-input:focus { outline: 2px solid var(--accent-2); border-color: transparent; }

/* Combo */
.combo-flame {
    display: inline-block; background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #fff; font-weight: 800; border-radius: 999px; padding: .25rem .9rem;
    margin-bottom: .6rem; animation: badge-pop .35s ease;
}

/* Tagesziel-Ring */
.daily-goal { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.goal-ring { width: 58px; height: 58px; }
.goal-ring-text { fill: var(--text); font-size: 14px; font-weight: 700; }

/* Missionen */
.missions-card { padding: .9rem 1.2rem; }
.missions-head { font-weight: 700; margin-bottom: .5rem; }
.missions-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .5rem; }
.mission {
    display: flex; justify-content: space-between; align-items: center; gap: .5rem;
    background: var(--bg-input); border-radius: 10px; padding: .5rem .8rem; font-size: .9rem;
}
.mission-done { outline: 1px solid var(--green); }

/* Lektionskarten mit Kopfgrafik */
.lesson-with-visual { padding: 0; overflow: hidden; }
.lesson-with-visual .lesson-body { padding: 1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.lesson-visual { line-height: 0; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.lesson-visual svg, .lesson-visual img { width: 100%; height: auto; display: block; }

/* Dialog-Abenteuer */
.dialog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.dialog-card { text-decoration: none; color: var(--text); display: block; margin-bottom: 0; transition: border-color .15s; }
.dialog-card:hover { border-color: var(--accent-2); }
.dialog-card-emoji { font-size: 1.5rem; margin-right: .3rem; }
.dialog-scene { border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; line-height: 0; border: 1px solid var(--border); }
.dialog-scene svg { width: 100%; height: auto; display: block; }
.dialog-npc { background: var(--bg-input); border-radius: 14px; padding: .9rem 1.1rem; margin-bottom: 1rem; }
.dialog-npc-es { font-size: 1.15rem; font-weight: 700; color: var(--accent-2); margin: 0 0 .25rem; }
.dialog-npc-de { color: var(--muted); font-size: .9rem; margin: 0; }
.dialog-opt-de { display: block; color: var(--muted); font-size: .82rem; font-weight: 400; margin-top: .15rem; }
.quiz-option.okish { border-color: var(--accent-2); background: #3a2f18; }

/* Landing / Öffentliche Seiten */
.hero-scene { max-width: 560px; margin: 0 auto 1.2rem; border-radius: var(--radius); overflow: hidden; line-height: 0; }
.hero-scene svg { width: 100%; height: auto; }
.sample-card { text-decoration: none; color: var(--text); }
.sample-card:hover { border-color: var(--accent-2); }
.library-list { list-style: none; padding: .4rem 0 0; margin: 0; columns: 2 260px; column-gap: 2rem; }
.library-list li { margin-bottom: .35rem; break-inside: avoid; }
.library-list a { text-decoration: none; }
.phrase-hero-es { color: var(--accent-2); margin: .2rem 0 .8rem; }

/* Fehlerprotokoll */
.errorlog {
    background: var(--bg-input); border-radius: 10px; padding: .8rem 1rem;
    font-size: .8rem; overflow-x: auto; max-height: 480px; white-space: pre-wrap; word-break: break-all;
}

/* ══ v0.6: aufgeräumte Übersicht, Hören, Vokabeltest ══ */

/* „Weiter lernen"-Empfehlung */
.next-card {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    text-decoration: none; color: var(--text);
    border-color: var(--accent-2);
    background: linear-gradient(120deg, rgba(255,176,59,.10), var(--bg-card) 55%);
}
.next-emoji { font-size: 2.2rem; }
.next-body { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: .15rem; }

/* Aktions-Kacheln */
.action-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.action-tile {
    display: flex; flex-direction: column; align-items: center; gap: .25rem;
    text-decoration: none; color: var(--text); text-align: center;
    padding: .85rem .6rem; margin-bottom: 0; font-weight: 600; font-size: .95rem;
    transition: border-color .15s, transform .1s;
}
.action-tile:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.action-emoji { font-size: 1.6rem; }

/* Nivel-Tabs */
.level-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.level-tab {
    display: inline-flex; align-items: center; gap: .5rem;
    text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem;
    padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--border);
    background: var(--bg-card);
}
.level-tab.active { border-color: var(--accent-2); color: var(--accent-2); background: rgba(255,176,59,.08); }
.level-tab:hover { border-color: var(--accent-2); }

/* Kompakte Lektions-Zeilen */
.lesson-list { display: flex; flex-direction: column; gap: .7rem; }
.lesson-row { display: flex; gap: 1rem; align-items: center; margin-bottom: 0; padding: 1rem 1.2rem; }
.lesson-row-emoji { font-size: 1.8rem; }
.lesson-row-main { flex: 1; min-width: 0; }
.lesson-row-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: 1.05rem; font-weight: 700; }
.lesson-row-title a { color: var(--text); text-decoration: none; }
.lesson-row-title a:hover { color: var(--accent-2); }
.lesson-row-meta { display: flex; align-items: center; gap: .8rem; margin-top: .25rem; }
.lesson-row-progress { flex: 1; max-width: 220px; margin-top: 0; }
.lesson-row .lesson-games { margin-top: .5rem; }
.lesson-row-action { flex-shrink: 0; }
@media (max-width: 640px) {
    .lesson-row { flex-wrap: wrap; }
    .lesson-row-action { width: 100%; }
    .lesson-row-action .btn { width: 100%; text-align: center; }
}

/* Hörverstehen */
.listen-play { display: flex; align-items: center; gap: 1rem; margin: .6rem 0 1.2rem; }
.listen-btn {
    font-size: 2.2rem; width: 84px; height: 84px; border-radius: 50%;
    border: 3px solid var(--accent-2); background: var(--bg-input); cursor: pointer;
    transition: transform .1s, box-shadow .15s;
}
.listen-btn:hover { transform: scale(1.06); box-shadow: 0 0 24px rgba(255,176,59,.35); }

/* Vokabeltest-Auswertung */
.test-wrong { text-align: left; margin: 1rem auto; max-width: 460px; }
.test-wrong ul { margin: .5rem 0 0; padding-left: 1.2rem; line-height: 1.9; }

/* ── 🎤 Sprechen-Modus ───────────────────────────────────────── */
.mic-btn { border-color: var(--accent); }
.mic-btn.mic-live { animation: mic-pulse 1s infinite; border-color: var(--accent); }
@keyframes mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 80, .5); }
    50% { box-shadow: 0 0 0 16px rgba(230, 57, 80, 0); }
}
.word-chips { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.word-chip { padding: .2rem .6rem; border-radius: 999px; font-weight: 600; font-size: .95rem; }
.word-ok { background: rgba(47, 191, 113, .18); color: var(--green); border: 1px solid var(--green); }
.word-bad { background: rgba(230, 57, 80, .15); color: var(--accent); border: 1px solid var(--accent); }

/* ══ v0.8: Camino, Badge-Kategorien, Admin, Landing-SEO ══ */
.camino-card { padding: .9rem 1.2rem; border-color: var(--accent-2); }
.camino-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.camino-progress { height: 12px; }

.badge-cat-head { margin: 1.4rem 0 .6rem; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.badge-progress { max-width: 120px; margin: .4rem auto 0; }

.landing-seo { max-width: 760px; margin: 2.5rem auto 0; }
.landing-seo h2 { color: var(--accent-2); }
.landing-seo details summary { cursor: pointer; font-weight: 600; }
.landing-seo details[open] summary { margin-bottom: .5rem; }

.json-editor { font-family: ui-monospace, monospace; font-size: .82rem; line-height: 1.5; }

/* ── Profil-Statistik (v0.8) ─────────────────────────────────── */
.mini-chart { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding-top: .5rem; overflow-x: auto; }
.mini-bar-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; min-width: 18px; }
.mini-bar { width: 100%; max-width: 22px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-radius: 4px 4px 0 0; }
.mini-label { font-size: .62rem; color: var(--muted); }
.box-row { display: flex; align-items: center; gap: .7rem; margin: .4rem 0; }
.box-lbl { flex: 0 0 auto; min-width: 150px; font-size: .88rem; }
.box-bar { flex: 1; margin: 0; }
.box-n { flex: 0 0 auto; min-width: 2rem; text-align: right; font-weight: 700; color: var(--accent-2); }
@media (max-width: 560px) { .box-lbl { min-width: 110px; font-size: .78rem; } }

/* ── Konto / Danger Zone (v0.8.1) ────────────────────────────── */
.danger-zone { border-color: var(--accent); }
.danger-zone summary { display: inline-block; list-style: none; cursor: pointer; }
.danger-zone summary::-webkit-details-marker { display: none; }
.delete-form { margin-top: 1rem; }
.errbox-inline { background: #4a1a2a; border: 1px solid var(--accent); border-radius: 8px; padding: .5rem .8rem; font-size: .9rem; }
.welcome-card { border-color: var(--accent-2); background: linear-gradient(120deg, rgba(255,176,59,.10), var(--bg-card) 60%); }

/* ── Niveau-Sperre (v0.8.1) ──────────────────────────────────── */
.level-tab.locked-tab { opacity: .7; }
.lock-panel { display: flex; gap: 1.2rem; align-items: flex-start; border-color: var(--accent-2); }
.lock-panel-emoji { font-size: 2.4rem; }

/* ── v0.8.3: Phrase des Tages, Streak-Warnung, Bibliothek-Suche ── */
.streak-warn { border-color: var(--accent); background: linear-gradient(120deg, rgba(230,57,80,.12), var(--bg-card) 60%); }
.potd-card { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; border-color: var(--accent-2); }
.potd-label { font-weight: 700; color: var(--accent-2); margin-right: .3rem; width: 100%; }
.potd-es { font-size: 1.15rem; font-weight: 700; color: var(--accent-2); text-decoration: none; }
.potd-es:hover { text-decoration: underline; }
.potd-de { color: var(--muted); }
.lib-search { margin-bottom: 1rem; }
.lib-search input { font-size: 1.05rem; padding: .7rem 1rem; }

/* ── v0.8.5: elaboriertes Quiz-Feedback (Merksatz + Beispiel) ──────────── */
.fb-more { margin: .5rem 0 .2rem; }
.fb-more-open { padding: .6rem .8rem; background: var(--bg-input); border-radius: 10px;
    border-left: 4px solid var(--accent-2); }
.fb-more > summary { cursor: pointer; color: var(--accent-2); font-weight: 600; padding: .3rem 0; }
.fb-more[open] > summary { margin-bottom: .4rem; }
.fb-note { margin: .2rem 0; line-height: 1.45; }
.fb-example { margin: .35rem 0 .1rem; }
.fb-example .lang-es { color: var(--accent-2); font-weight: 600; }

/* ── v0.8.5: Reifegrad-Anzeige (Leitner-Box sichtbar) ──────────────────── */
.reife-legend { margin: 0 0 1rem; background: var(--bg-card); border-radius: 10px; padding: .5rem .9rem; }
.reife-legend > summary { cursor: pointer; color: var(--accent-2); font-weight: 600; }
.reife-legend p { margin: .5rem 0 .2rem; }
.reife-chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem;
    background: var(--bg-input); border-radius: 999px; padding: .12rem .55rem; white-space: nowrap; }
.reife-chip .reife-label { color: var(--muted); }
.reife-chip-mini { padding: 0; background: none; font-size: 1rem; margin-left: .2rem; }
.phrase-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; }
.phrase-head .reife-chip { margin-left: auto; }

/* ── v0.8.5: Historias (Lese-Modul) ────────────────────────────────────── */
.story-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0 1.2rem; }
.story-body { margin: 1rem 0; }
.story-line { padding: .55rem .7rem; border-radius: 10px; margin-bottom: .35rem; transition: background .2s; }
.story-line-active { background: var(--bg-input); box-shadow: inset 3px 0 0 var(--accent-2); }
.story-es { margin: 0; font-size: 1.12rem; line-height: 1.5; }
.story-es .lang-es { color: var(--accent-2); }
.story-de { margin-top: .2rem; }
.story-de > summary { cursor: pointer; color: var(--muted); font-size: .9rem; list-style: none; }
.story-de > summary::-webkit-details-marker { display: none; }
.story-de[open] > summary { color: var(--accent-2); }
.story-de p { margin: .25rem 0 0; }
.story-vocab { margin: 1.2rem 0; }
.story-level-head { margin: 1.6rem 0 .6rem; font-size: 1.1rem; color: var(--muted); }
.story-locked { opacity: .6; }
.done-pill { margin-left: .4rem; font-size: .72rem; vertical-align: middle; }
.reset-lesson { margin: -.4rem 0 1rem; }
.reset-lesson summary { cursor: pointer; }
.story-ahead-tag {
    display: inline-block; margin-left: .45rem; padding: .05rem .45rem;
    border-radius: 999px; font-size: .72rem; font-weight: 600;
    background: var(--warm-soft, #fdf1dc); color: var(--warm-ink, #8a5a12);
    vertical-align: middle; white-space: nowrap;
}

/* ── v0.8.9: Analytics-Ausbau (Balken-Breakdowns, Funnel, Zeitraum-Tabs) ── */
.analytics-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; }
.range-tabs { display: inline-flex; gap: .2rem; background: var(--bg-card); border-radius: 10px; padding: .25rem; }
.range-tabs a { padding: .35rem .8rem; border-radius: 8px; color: var(--muted); font-size: .9rem; text-decoration: none; }
.range-tabs a.active { background: var(--accent-2); color: #1a1023; font-weight: 600; }
.bar-list { display: flex; flex-direction: column; gap: .5rem; margin: .4rem 0; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: .6rem; }
.bar-label { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--bg-input); border-radius: 999px; height: 12px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; min-width: 2px; transition: width .3s; }
.bar-val { font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-val .hint { font-size: .8rem; }
.funnel { display: flex; flex-direction: column; gap: .55rem; margin: .4rem 0; }
.funnel-step { display: grid; grid-template-columns: minmax(110px, 20%) 1fr auto auto; align-items: center; gap: .7rem; }
.funnel-label { font-size: .92rem; color: var(--muted); }
.funnel-track { background: var(--bg-input); border-radius: 8px; overflow: hidden; }
.funnel-fill { background: linear-gradient(90deg, var(--accent-2), var(--accent)); height: 26px;
    border-radius: 8px; min-width: 3px; }
.funnel-count { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.funnel-conv { font-size: .82rem; color: var(--green); text-align: right; font-variant-numeric: tabular-nums; min-width: 46px; }
@media (max-width: 560px) {
    .bar-row { grid-template-columns: minmax(70px, 40%) 1fr auto; }
    .funnel-step { grid-template-columns: minmax(74px, 26%) 1fr auto auto; gap: .45rem; }
}

/* ── v0.8.11: „schwer"-Badge am Tipp-Modus ─────────────────────────────── */
.game-hard { font-size: .7rem; background: var(--accent); color: #fff; border-radius: 6px;
    padding: .05rem .35rem; margin-left: .1rem; vertical-align: middle; }

/* ── v0.8.12: Vokabel-Piktogramme (Dual Coding) ────────────────────────── */
.study-icon { font-size: 4.5rem; line-height: 1; text-align: center; margin: .2rem 0 .6rem;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,.35)); animation: iconPop .35s ease; }
@keyframes iconPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.phrase-icon { font-size: 1.6rem; line-height: 1; margin-right: .1rem; }
.fb-icon { font-size: 1.2rem; }
.lesson-row-emoji { line-height: 1; }
@media (max-width: 560px) { .study-icon { font-size: 3.4rem; } }

/* ── Niveau-Kennzeichnung + Lernziel-Karte ─────────────────────────────── */
/* Bewusst KEINE A1/B1-Codes: die sagen Lernenden ohne Sprachschul-Erfahrung
   nichts. Angezeigt wird die Stufe, die Hola selbst benutzt. */
.level-badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .3px;
    padding: .1rem .45rem; border-radius: 6px; vertical-align: middle; color: #10131a;
    background: #4dc9a0; white-space: nowrap; }
.level-4, .level-5, .level-6 { background: #4d9fe0; }
.level-7, .level-8, .level-9 { background: #e0a94d; }
h1 .level-badge { font-size: .55em; position: relative; top: -.15em; }
.goal-card { display: flex; gap: .7rem; align-items: flex-start; background: var(--bg-card);
    border-left: 4px solid var(--green); margin: 0 0 1.2rem; }
.goal-flag { font-size: 1.5rem; line-height: 1; }
.goal-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
.goal-text { margin: .15rem 0 0; font-size: 1.05rem; }
.goal-text::before { content: "Du kannst "; color: var(--muted); }

/* ── v0.8.14: „Fehler melden" (Feedback-Kreislauf) ──────────────────────── */
.report-btn { background: none; border: none; color: var(--muted); cursor: pointer;
    font-size: .78rem; padding: .15rem .3rem; margin-top: .3rem; opacity: .55;
    transition: opacity .15s, color .15s; }
.report-btn:hover { opacity: 1; color: var(--red); }
.report-modal { position: fixed; inset: 0; z-index: 90; display: flex;
    align-items: center; justify-content: center; padding: 1rem;
    background: rgba(8,6,18,.72); backdrop-filter: blur(3px); animation: fadeIn .18s ease; }
.report-modal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.report-panel { position: relative; width: 100%; max-width: 440px; margin: 0;
    animation: iconPop .22s ease; }
.report-panel h3 { margin: 0 0 .3rem; }
.report-close { position: absolute; top: .6rem; right: .7rem; background: none; border: none;
    color: var(--muted); font-size: 1.2rem; cursor: pointer; line-height: 1; }
.report-close:hover { color: var(--text); }
.report-reason { display: flex; align-items: center; gap: .5rem; padding: .35rem .1rem;
    cursor: pointer; border-radius: 8px; }
.report-reason:hover { background: rgba(255,255,255,.04); }
.report-reason input { accent-color: var(--green); }
.report-panel textarea { width: 100%; margin: .5rem 0 .8rem; padding: .5rem .6rem;
    border-radius: 8px; border: 1px solid var(--border); background: var(--bg);
    color: var(--text); font: inherit; resize: vertical; }
.report-done { text-align: center; padding: 1.4rem .5rem; font-size: 1.05rem; }

/* Admin: Meldungs-Queue + Schwache-Lektionen-Report */
.report-row { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 0;
    border-bottom: 1px solid var(--border); }
.report-row:last-child { border-bottom: none; }
.report-meta { flex: 1; min-width: 0; }
.report-reason-tag { display: inline-block; font-size: .72rem; font-weight: 700;
    padding: .1rem .45rem; border-radius: 6px; background: rgba(224,169,77,.18);
    color: var(--amber, #e0a94d); margin-right: .4rem; }
.report-comment { color: var(--muted); font-size: .92rem; margin: .25rem 0 0; }
.report-actions { display: flex; gap: .4rem; flex-shrink: 0; }
.report-actions button { font-size: .8rem; padding: .3rem .6rem; }
.weak-table { width: 100%; border-collapse: collapse; }
.weak-table th, .weak-table td { text-align: left; padding: .5rem .6rem;
    border-bottom: 1px solid var(--border); }
.weak-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.weak-bar { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; min-width: 60px; }
.weak-bar > span { display: block; height: 100%; border-radius: 4px; }
.weak-flag { font-weight: 700; }

/* ── v0.8.15: La Chuleta (Grammatik-Nachschlagewerk) + Diktat ──────────── */
.gram-box { margin: 0 0 .8rem; padding: 0; overflow: hidden; }
.gram-box summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 700; font-size: 1.05rem;
    list-style: none; position: relative; }
.gram-box summary::-webkit-details-marker { display: none; }
.gram-box summary::after { content: "▾"; position: absolute; right: 1.1rem; color: var(--muted);
    transition: transform .2s; }
.gram-box[open] summary::after { transform: rotate(180deg); }
.gram-box[open] summary { border-bottom: 1px solid var(--border); }
.gram-box > *:not(summary) { margin-left: 1.1rem; margin-right: 1.1rem; }
.gram-box > p:first-of-type { margin-top: .8rem; }
.gram-box > *:last-child { margin-bottom: 1rem; }
.gram-rule { font-size: .98rem; }
.gram-ex { display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: baseline;
    padding: .35rem .6rem; margin: .3rem 0; background: rgba(255,255,255,.03); border-radius: 8px; }
.gram-es { font-weight: 600; color: var(--accent-2, #ffb84d); }
.gram-de { color: var(--muted); font-size: .92rem; }
.gram-warn { font-size: .92rem; background: rgba(224,169,77,.1); border-left: 3px solid #e0a94d;
    padding: .5rem .7rem; border-radius: 0 8px 8px 0; }
.gram-practice { margin-top: .6rem; }
.gram-scroll { overflow-x: auto; }
.gram-table { border-collapse: collapse; margin: .5rem 0; font-size: .95rem; }
.gram-table th, .gram-table td { padding: .3rem .7rem; text-align: left;
    border-bottom: 1px solid var(--border); }
.gram-table th { color: var(--muted); font-size: .8rem; text-transform: uppercase; }
.gram-table td:first-child { color: var(--muted); font-size: .88rem; }

/* ── v0.8.19: Interface-Icons (statt Emojis) ───────────────────────────── */
.ui-icon { width: 1.4rem; height: 1.4rem; display: inline-block; vertical-align: -0.3rem; }
.action-tile .ui-icon { width: 1.9rem; height: 1.9rem; color: var(--accent-2); }
.mute-btn .ui-icon { width: 1.25rem; height: 1.25rem; vertical-align: -0.25rem; }
.mute-btn.muted .ui-icon { opacity: .45; }
h1 .ui-icon, h2 .ui-icon { width: 1.15em; height: 1.15em; vertical-align: -0.18em; color: var(--accent-2); }
.feature-icon { width: 2.1rem; height: 2.1rem; color: var(--accent-2); }
.report-icon { width: 1rem; height: 1rem; vertical-align: -0.15rem; }
.news-item { margin-bottom: 1rem; }
.news-item h2 { margin: .1rem 0 .4rem; font-size: 1.2rem; }
.news-item p { margin: 0; color: var(--text); }
.news-date { font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
.about-page h2 { margin-top: 1.6rem; }

/* ── v0.8.20: McDevs Notiz (persönliche Anekdoten) ─────────────────────── */
.mcdev-note { position: relative; margin-top: .6rem; padding: .65rem .9rem .6rem;
    background: rgba(217, 79, 53, .08); border: 1px solid rgba(217, 79, 53, .35);
    border-radius: 10px; }
.mcdev-note-tag { display: inline-block; font-family: var(--font-display); font-weight: 700;
    font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--accent);
    margin-bottom: .15rem; }
.mcdev-note p { margin: 0; font-size: .93rem; }

/* ── v0.8.21: Wortschatz-Suche ─────────────────────────────────────────── */
.search-form { display: flex; gap: .6rem; margin: 0 0 1.2rem; }
.search-form input { flex: 1; margin-top: 0; }
.search-hit { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: .75rem 1rem; margin-bottom: .55rem; text-decoration: none; color: var(--text);
    transition: border-color .12s; flex-wrap: wrap; }
.search-hit:hover { border-color: var(--accent-2); }
.search-hit-main { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.search-es { font-weight: 700; color: var(--accent-2); }
.search-de { color: var(--muted); font-size: .92rem; }
.search-hit-meta { display: flex; align-items: center; gap: .6rem; }
.lessons-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lessons-toolbar h1 { margin-bottom: .4rem; }

/* ── v0.8.22: Akzent-Leiste + Tastatur-Hinweise ────────────────────────── */
.accent-bar { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .55rem; }
.accent-key { min-width: 2.3rem; padding: .35rem 0; font-size: 1.05rem; font-family: inherit;
    background: var(--bg-input); color: var(--text); border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer; transition: border-color .12s, transform .06s; }
.accent-key:hover { border-color: var(--accent-2); }
.accent-key:active { transform: translateY(1px); }
.key-hint { display: inline-block; min-width: 1.35rem; text-align: center; margin-right: .5rem;
    padding: .05rem .3rem; border: 1px solid var(--border); border-bottom-width: 2px;
    border-radius: 6px; font-size: .75rem; color: var(--muted); background: var(--bg-input); }
@media (hover: none) { .key-hint { display: none; } }

/* ── v0.8.25: Foto-Thumbnails in der Lektionsliste ─────────────────────── */
.lesson-row-thumb { flex-shrink: 0; width: 72px; height: 48px; border-radius: 8px;
    overflow: hidden; display: block; }
.lesson-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 560px) { .lesson-row-thumb { width: 56px; height: 40px; } }

/* ── Rangliste (opt-in) ─────────────────────────────── */
.head-icon { width: 1.4em; height: 1.4em; vertical-align: -0.25em; color: var(--accent-2); }
.lb-me { border-left: 4px solid var(--accent-2); margin-bottom: 1rem; }
.lb-list { padding: .4rem .9rem; }
.lb-row { display: flex; align-items: center; gap: .7rem; padding: .55rem .2rem; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.lb-row:last-child { border-bottom: 0; }
.lb-rank { flex: 0 0 2rem; text-align: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-top-1 .lb-rank { color: var(--accent-2); font-size: 1.15rem; }
.lb-top-2 .lb-rank { color: #c8ccd6; font-size: 1.08rem; }
.lb-top-3 .lb-rank { color: var(--accent); font-size: 1.04rem; }
.lb-top .lb-name { font-weight: 600; }
.lb-self { background: rgba(242, 177, 52, .08); border-radius: 8px; }
.lb-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-streak { color: var(--muted); font-size: .85rem; display: inline-flex; align-items: center; gap: .15rem; }
.lb-streak .ui-icon { width: .95em; height: .95em; }
.lb-xp { font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-leave { margin-top: .9rem; text-align: center; }
.lb-leave .linklike { font-size: .9rem; }

/* ── Admin: „Diese Woche"-Cockpit ───────────────────── */
.stat-attn .stat-num { color: var(--accent); }
.stat-label a { color: inherit; }

/* ── SEO-Themenseiten ───────────────────────────────── */
.topic-intro { max-width: 68ch; line-height: 1.65; }
.topic-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 1.2rem; }
.topic-chip { display: inline-block; padding: .4rem .8rem; border: 1px solid var(--line, rgba(255,255,255,.14));
  border-radius: 999px; font-size: .88rem; text-decoration: none; color: var(--text); }
.topic-chip:hover { border-color: var(--accent-2); color: var(--accent-2); }
.topic-list { columns: 1; }
.topic-list li { margin-bottom: .55rem; }

/* ── Tages-Mix-Kachel ───────────────────────────────── */
.action-tile-primary { border-color: var(--accent-2); }
.action-tile-primary .action-emoji { color: var(--accent-2); }

/* ── Profil: Halbjahres-Heatmap ─────────────────────── */
.heatmap { display: block; }
.hm-label { fill: var(--muted); font-size: 10px; font-family: inherit; }
.hm-legend { display: flex; align-items: center; gap: .3rem; margin-top: .5rem; }
.hm-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(255,255,255,.12); }

/* ── Übersicht: Kachel-Gruppen + schlanke Zeilen ────── */
.tiles-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: 1rem 0 .4rem; }
.action-tiles-secondary .action-tile { opacity: .92; }
.lesson-row-more { display: block; font-size: .8rem; color: var(--muted); margin-top: .35rem; text-align: center; }
.lesson-row-more:hover { color: var(--accent-2); }

/* ── Lektionsseite: Übungs-Hub ──────────────────────── */
.hub-card { margin: 1rem 0; }
.hub-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.hub-mode { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .7rem; border: 1px solid var(--line, rgba(255,255,255,.12));
  border-radius: 10px; text-decoration: none; color: var(--text); }
.hub-mode:hover { border-color: var(--accent-2); }
.hub-num { color: var(--muted); font-size: .72rem; }
.hub-name { font-weight: 600; }
.hub-locked { opacity: .45; cursor: not-allowed; }
.hub-locked:hover { border-color: var(--line, rgba(255,255,255,.12)); }

/* ── Meine Projekte ──────────────────────────────────────────── */
.projects-page { max-width: 940px; margin: 0 auto; }
.projects-page .lead { margin-bottom: 1.6rem; }
.project-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
/* Zwei Spalten statt drei: vier Projekte ergeben so einen ruhigen 2x2-Block
   statt einer einsamen vierten Karte in der zweiten Reihe. */
@media (min-width: 720px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
.project-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem 1.2rem;
    display: flex; flex-direction: column; gap: .55rem;
    overflow: hidden;
    transition: border-color .18s ease, transform .18s ease;
}
.project-card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: var(--project-accent, var(--accent-2));
}
.project-card:hover { border-color: var(--project-accent, var(--accent-2)); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .project-card, .project-card:hover { transition: none; transform: none; } }
.project-head { display: flex; align-items: flex-start; gap: .7rem; }
.project-emoji {
    font-size: 1.7rem; line-height: 1; flex: 0 0 auto;
    width: 2.6rem; height: 2.6rem; border-radius: 10px;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--project-accent, var(--accent-2)) 16%, transparent);
}
.project-head h2 { margin: .1rem 0 0; font-size: 1.15rem; }
.project-kicker {
    display: inline-block; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase;
    color: var(--project-accent, var(--accent-2)); font-weight: 700;
}
.project-tagline { margin: 0; font-weight: 600; }
.project-text { margin: 0; color: var(--muted); font-size: .93rem; }
.project-link {
    margin-top: auto; padding-top: .5rem;
    font-weight: 600; text-decoration: none; word-break: break-word;
    color: var(--project-accent, var(--accent-2));
}
.project-link:hover { text-decoration: underline; }
.project-note { margin-top: 1.6rem; }
.project-note h2 { margin-top: 0; font-size: 1.1rem; }

/* Kompakte Zeile für den Teaser auf „Über Hola" */
.project-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 0; }
.project-strip a {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 999px;
    background: var(--bg-card); color: var(--text); text-decoration: none; font-size: .9rem;
}
.project-strip a:hover { border-color: var(--accent-2); }

/* Nur für Screenreader (visuell versteckt, aber vorlesbar) */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── Bedienbarkeit: Tastatur, Bewegung, schmale Bildschirme ─────────────── */

/* Sprungmarke: erster Tab-Stopp auf jeder Seite, sonst unsichtbar */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--accent-2); color: #191c24; font-weight: 700;
    padding: .6rem 1rem; border-radius: 0 0 10px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }
main:focus { outline: none; }

/* Sichtbarer Tastatur-Fokus – vorher sah man beim Tabben nichts.
   :focus-visible trifft nur Tastatur/Assistenz, nicht den Mausklick. */
a:focus-visible, button:focus-visible, summary:focus-visible,
[tabindex]:focus-visible, .btn:focus-visible, .quiz-option:focus-visible {
    outline: 3px solid var(--accent-2);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Wer im System weniger Bewegung eingestellt hat, bekommt keine Animationen */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Am Handy klebte die Kopfzeile mit bis zu acht Links dauerhaft über dem Inhalt */
.nav-links { display: contents; }
.nav-toggle { display: none; }
@media (max-width: 640px) {
    .site-header { position: static; gap: .6rem; padding: .7rem .9rem; }
    .site-header nav { gap: .5rem .8rem; }
    /* Klappmenü nur mit JavaScript – ohne bleibt die volle Liste stehen */
    html.js .nav-toggle { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600;
        padding: .35rem .6rem; border: 1px solid var(--border); border-radius: 8px; }
    html.js .nav-links { display: none; }
    html.js .site-header.nav-open .nav-links {
        display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
        width: 100%; padding: .4rem 0 .2rem; border-top: 1px solid var(--border);
    }
    html.js .site-header.nav-open .nav-links a,
    html.js .site-header.nav-open .nav-links .linklike { padding: .55rem .2rem; font-size: 1.05rem; }
    html.js .site-header.nav-open .nav-links .inline-form { display: block; }
}

/* ── Fehlerliste am Rundenende ──────────────────────────────────────────── */
.result-wrong { text-align: left; margin: 1rem auto; max-width: 520px; }
.result-wrong .library-list { margin: .5rem 0 .8rem; }
.result-wrong li { padding: .25rem 0; }

/* ── Spickzettel: die Lektion zum Ausdrucken ────────────────────────────── */
@media print {
    .site-header, .site-footer, .skip-link, .lesson-hub, .action-tiles,
    .speak-btn, .report-btn, .lesson-visual, .goal-card, #report-modal,
    .consent-banner, #hola-ad-slot, .flash, .notice-bar { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .container { max-width: 100%; padding: 0; }
    .card { border: 1px solid #ccc !important; background: #fff !important;
            break-inside: avoid; page-break-inside: avoid; }
    a { color: #000 !important; text-decoration: none !important; }
    .phrase-es, .study-es { font-weight: 700; }
    .hint { color: #444 !important; }
    h1 { font-size: 18pt; }
    .print-note { display: block !important; }
}
.print-note { display: none; }
.print-link { float: right; font-size: .9rem; }
@media (max-width: 560px) { .print-link { display: none; } }
