/* Mentomath – Haupt-Stylesheet
   W3C-konform, kein !important-Missbrauch, BEM-ähnliche Namensgebung
   ─────────────────────────────────────────────────────────────────── */

/* ── Variablen ───────────────────────────────────────────────────── */
:root {
    /* Hintergrund & Karten */
    --bg:       #F5F0E8;
    --card:     #FFFFFF;
    --border:   #E0D8CC;
    --shadow:   rgba(0, 0, 0, 0.08);

    /* Typografie */
    --text:     #2A2520;
    --muted:    #7A6E65;

    /* Operationsfarben – IMMER konsistent */
    --col-plus:  #1A73E8;   /* Blau   = Addition */
    --col-minus: #D32F2F;   /* Rot    = Subtraktion */
    --col-times: #7B1FA2;   /* Lila   = Multiplikation */
    --col-misc:  #E65100;   /* Orange = Sonstiges */
    --col-eq:    #2E7D32;   /* Grün   = Ergebnis */

    /* Feedback */
    --ok:    #2E7D32;
    --err:   #C62828;
    --ok-bg: #E8F5E9;
    --err-bg:#FFEBEE;

    /* Layout */
    --r: 18px;
    --r-sm: 12px;
    --gap: 16px;
    --max-w: 560px;
}

/* ── Reset & Basis ───────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Screen-reader-only helper */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lexend', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Fokus-Ringe für Tastatur-Navigation */
:focus-visible {
    outline: 3px solid var(--col-plus);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Screens ─────────────────────────────────────────────────────── */
.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 24px 16px 40px;
    gap: var(--gap);
}

.screen.hidden {
    display: none;
}

/* ── Home Screen ─────────────────────────────────────────────────── */
.home-star {
    font-size: 72px;
    line-height: 1;
    margin-top: 12px;
    animation: wobble 3s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-6deg) scale(1); }
    25%       { transform: rotate( 6deg) scale(1.07); }
    75%       { transform: rotate( 4deg) scale(1.04); }
}

.home-title {
    font-size: clamp(36px, 9vw, 60px);
    font-weight: 800;
    color: var(--text);
    text-align: center;
    line-height: 1.1;
}

.home-sub {
    font-size: 18px;
    color: var(--muted);
    font-weight: 600;
    text-align: center;
}

.stars-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border-radius: 40px;
    padding: 10px 22px;
    box-shadow: 0 2px 12px var(--shadow);
    font-size: 20px;
    font-weight: 700;
    color: #F59E0B;
}

.picker-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
    margin-bottom: 8px;
}

/* Schuljahr-Auswahl */
.year-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: var(--max-w);
}

.year-btn {
    background: var(--card);
    border: 3px solid var(--border);
    border-radius: var(--r);
    padding: 20px 28px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    color: var(--text);
    transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
    min-width: 140px;
    text-align: center;
}

.year-btn:hover {
    border-color: var(--col-plus);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px var(--shadow);
}

.year-btn:active { transform: scale(0.97); }
.year-btn.active { border-color: var(--col-plus); background: #E8F0FE; }

/* Themen-Raster */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: var(--max-w);
}

.topic-btn {
    background: var(--card);
    border: 3px solid var(--border);
    border-radius: var(--r);
    padding: 16px 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
    transition: transform 0.12s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.topic-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--shadow);
}

.topic-btn:active { transform: scale(0.96); }

.topic-btn .t-icon { font-size: 28px; }
.topic-btn .t-mastery {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

/* Operationsfarben auf Borders */
.op-plus  { border-color: var(--col-plus);  }
.op-minus { border-color: var(--col-minus); }
.op-times { border-color: var(--col-times); }
.op-misc  { border-color: var(--col-misc);  }

.back-link {
    background: none;
    border: none;
    color: var(--muted);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 8px;
}

/* ── Exercise Screen ─────────────────────────────────────────────── */
#ex-screen {
    justify-content: flex-start;
    padding-top: 16px;
}

.progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: var(--max-w);
}

.progress-track {
    flex: 1;
    height: 14px;
    background: var(--border);
    border-radius: 7px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 7px;
    background: linear-gradient(90deg, var(--col-plus), #64B5F6);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
    min-width: 40px;
}

.exit-btn-sm {
    background: none;
    border: 2px solid var(--border);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.exit-btn-sm:hover {
    background: var(--err-bg);
    border-color: var(--err);
    color: var(--err);
}

.ex-stars {
    font-size: 14px;
    font-weight: 700;
    color: #F59E0B;
    align-self: flex-end;
    width: 100%;
    max-width: var(--max-w);
}

/* Aufgabenkarte */
.q-card {
    background: var(--card);
    border-radius: var(--r);
    padding: 20px 18px;
    width: 100%;
    max-width: var(--max-w);
    box-shadow: 0 3px 16px var(--shadow);
    animation: card-appear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes card-appear {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

.q-banner {
    border-radius: var(--r-sm);
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.4;
}

.q-banner.op-plus-banner  { background: var(--col-plus);  }
.q-banner.op-minus-banner { background: var(--col-minus); }
.q-banner.op-times-banner { background: var(--col-times); }
.q-banner.op-misc-banner  { background: var(--col-misc);  }

/* CRA-Visualisierungsbereich */
.repr-area {
    min-height: 80px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Abstrakte Aufgabe */
.problem-display {
    font-size: clamp(32px, 9vw, 52px);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
    line-height: 1.2;
}

.num-a   { color: var(--text); }
.op-sym  { /* base */ }
.op-sym-plus  { color: var(--col-plus);  }
.op-sym-minus { color: var(--col-minus); }
.op-sym-times { color: var(--col-times); }
.eq-sym  { color: var(--col-eq); }

/* Antwort-Slot */
.answer-slot-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.answer-slot {
    min-width: 90px;
    height: 72px;
    background: var(--bg);
    border: 3px dashed var(--border);
    border-radius: var(--r);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s;
    padding: 0 16px;
}

.answer-slot.drag-over {
    border-color: var(--col-plus);
    background: #E8F0FE;
}

/* Auswahlkacheln */
.choices-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.choice-num {
    width: 70px;
    height: 70px;
    background: var(--card);
    border: 3px solid var(--border);
    border-radius: var(--r);
    font-size: 30px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    touch-action: none;
    transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s, opacity 0.15s;
    box-shadow: 0 2px 8px var(--shadow);
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
}

.choice-num:hover  { border-color: var(--col-plus); transform: scale(1.05); }
.choice-num:active { transform: scale(0.94); }

.choice-num.dragging {
    transform: scale(1.12) rotate(3deg);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
    border-color: var(--col-plus);
    z-index: 1000;
}

.choice-num.used {
    opacity: 0.25;
    pointer-events: none;
}

/* Hinweis-Box */
.hint-box {
    background: #FFF8E1;
    border-left: 4px solid #F59E0B;
    border-radius: var(--r-sm);
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #5D4037;
    margin-top: 14px;
    line-height: 1.5;
}

.hint-box.hidden { display: none; }

.hint-lbl {
    font-weight: 800;
    display: block;
    margin-bottom: 3px;
}

/* ── Ten-Frame ───────────────────────────────────────────────────── */
.ten-frame-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
}

.ten-frame-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
    margin-bottom: 2px;
}

.ten-frame {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    background: var(--border);
    border-radius: 8px;
    padding: 4px;
}

.ten-cell {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s;
}

.ten-cell.filled   { background: var(--col-plus);  }
.ten-cell.filled2  { background: #90CAF9; }
.ten-cell.filled-b { background: var(--col-minus); }

/* ── Zahlenstrahl ────────────────────────────────────────────────── */
.number-line-wrap {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.number-line {
    display: flex;
    align-items: flex-end;
    gap: 0;
    width: max-content;
    padding: 8px 4px 0;
}

.nl-tick {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 34px;
}

.nl-mark {
    width: 2px;
    height: 12px;
    background: var(--border);
}

.nl-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    margin-top: 2px;
}

.nl-tick.highlighted .nl-mark { background: var(--col-plus); height: 18px; }
.nl-tick.highlighted .nl-num  { color: var(--col-plus); font-size: 13px; }
.nl-tick.start-mark .nl-mark  { background: var(--col-eq); height: 22px; }
.nl-tick.start-mark .nl-num   { color: var(--col-eq); font-weight: 800; font-size: 14px; }

/* ── Punkt-Arrays ────────────────────────────────────────────────── */
.array-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.array-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
}

.array-cell {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--col-times);
    opacity: 0.75;
    flex-shrink: 0;
}

.dot-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.dot-row {
    display: flex;
    gap: 5px;
}

.dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Feedback Overlay ────────────────────────────────────────────── */
.feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: opacity 0.2s;
    pointer-events: none;
}

.feedback-overlay.hidden {
    display: none;
}

.feedback-overlay.show {
    display: flex;
    pointer-events: all;
}

.feedback-overlay.ok-fb  { background: radial-gradient(circle, #C8E6C9, #A5D6A7); }
.feedback-overlay.err-fb { background: radial-gradient(circle, #FFCDD2, #EF9A9A); }

.fb-emoji {
    font-size: 88px;
    animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pop {
    from { transform: scale(0) rotate(-15deg); }
    to   { transform: scale(1) rotate(0deg); }
}

.fb-msg {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    max-width: 280px;
    line-height: 1.3;
}

/* ── Result Screen ───────────────────────────────────────────────── */
#result-screen { padding-top: 28px; }

.res-trophy { font-size: 68px; margin-bottom: 4px; }

.res-title {
    font-size: clamp(24px, 7vw, 42px);
    font-weight: 800;
    text-align: center;
}

.res-stars {
    font-size: 34px;
    letter-spacing: 4px;
    text-align: center;
}

.mastery-grid {
    width: 100%;
    max-width: var(--max-w);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mastery-section-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 2px;
}

.mastery-row {
    background: var(--card);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px var(--shadow);
}

.mastery-icon { font-size: 24px; flex-shrink: 0; }

.mastery-text { flex: 1; text-align: left; }

.mastery-name   { font-size: 14px; font-weight: 800; }
.mastery-detail { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.mastery-bar-track {
    width: 56px;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.mastery-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--col-eq);
    transition: width 0.6s ease;
}

.res-item {
    background: var(--card);
    border-radius: var(--r-sm);
    padding: 12px 14px;
    width: 100%;
    max-width: var(--max-w);
    box-shadow: 0 2px 8px var(--shadow);
    border-left: 5px solid var(--ok);
    text-align: left;
}

.res-item.wrong { border-left-color: var(--err); }

.res-item .rq { font-size: 14px; font-weight: 700; }
.res-item .rh {
    font-size: 13px;
    color: #5D4037;
    background: #FFF8E1;
    border-radius: 8px;
    padding: 7px 10px;
    margin-top: 8px;
    font-weight: 600;
    line-height: 1.5;
}

.res-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: var(--max-w);
    padding-top: 4px;
}

.action-btn {
    width: 100%;
    height: 60px;
    border: none;
    border-radius: 32px;
    font-family: inherit;
    font-size: 19px;
    font-weight: 800;
    cursor: pointer;
    color: white;
    transition: opacity 0.15s, transform 0.1s;
}

.action-btn:hover  { opacity: 0.88; }
.action-btn:active { transform: scale(0.97); }

.btn-again { background: var(--col-plus);  }
.btn-home  { background: var(--muted);     }

/* ── Modal ───────────────────────────────────────────────────────── */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.2s;
}

.modal-bg.hidden { display: none; }

.modal-box {
    background: var(--card);
    border-radius: var(--r);
    padding: 26px 22px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.2);
}

.modal-icon  { font-size: 48px; margin-bottom: 8px; }
.modal-title { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.modal-sub   { font-size: 14px; color: var(--muted); font-weight: 600;
               margin-bottom: 18px; line-height: 1.5; }

.modal-btns { display: flex; flex-direction: column; gap: 9px; }

.mbtn {
    border: none;
    border-radius: var(--r-sm);
    padding: 14px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    color: white;
    transition: opacity 0.15s;
}

.mbtn:hover   { opacity: 0.88; }
.mbtn.primary { background: var(--col-plus);  }
.mbtn.danger  { background: var(--err);       }
.mbtn.ghost   { background: var(--border); color: var(--text); }

/* ── Confetti ────────────────────────────────────────────────────── */
.cp {
    position: fixed;
    pointer-events: none;
    z-index: 600;
    animation: cfall linear forwards;
}

@keyframes cfall {
    0%   { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
    100% { transform: translateY(110vh) rotate(540deg); opacity: 0.2; }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 400px) {
    .choice-num { width: 60px; height: 60px; font-size: 26px; }
    .problem-display { font-size: 28px; gap: 8px; }
    .answer-slot { min-width: 72px; height: 62px; font-size: 34px; }
    .topic-grid  { grid-template-columns: 1fr 1fr; }
}

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

/* ═══════════════════════════════════════════════════════
   BREADCRUMB NAVIGATION
   ─────────────────────────────────────────────────────── */
.breadcrumb-bar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #fff;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 52px;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.breadcrumb-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.bc-home-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    color: var(--col-plus);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background .15s;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.bc-home-btn:hover { background: #e8f0fe; }

.bc-sep {
    color: var(--muted);
    font-size: 16px;
    flex-shrink: 0;
}

.bc-item {
    font-size: 14px;
    font-weight: 700;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.bc-item.bc-current {
    color: var(--text);
    font-weight: 800;
}

/* Stars in breadcrumb (replaces scattered star displays) */
.bc-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
    font-weight: 800;
    color: #F59E0B;
    background: #FFF8E1;
    border-radius: 20px;
    padding: 5px 12px;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1.5px solid #F59E0B;
}

/* Remove old standalone star displays - override them */
.stars-badge { display: none; }
.ex-stars    { display: none; }

/* Adjust screen top padding since breadcrumb is sticky */
.screen {
    padding-top: 20px;
}

/* ── Back button (clearer than text link) ─────────────── */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 2.5px solid var(--border);
    border-radius: 12px;
    padding: 10px 18px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text);
    transition: border-color .15s, background .15s;
    margin-top: 4px;
    align-self: flex-start;
}
.back-btn:hover { border-color: var(--col-plus); background: #e8f0fe; color: var(--col-plus); }

/* ═══════════════════════════════════════════════════════
   CONFETTI FIX
   overflow-x:hidden on body clips fixed-position confetti.
   Fix: use overflow:clip only on x-axis via clip-path trick.
   ─────────────────────────────────────────────────────── */
body {
    overflow-x: clip;   /* clip instead of hidden — doesn't create stacking context */
}

/* Confetti pieces: use fixed positioning (should always work with clip) */
.cp {
    position: fixed;
    top: 0;
    pointer-events: none;
    z-index: 9999;    /* above everything */
    animation: cfall linear forwards;
    will-change: transform;
}

/* ═══════════════════════════════════════════════════════
   REWARDS / STARS — DESKTOP LAYOUT FIX
   Stars counter in top nav bar is always visible.
   ─────────────────────────────────────────────────────── */
@media (min-width: 768px) {
    /* On desktop, constrain app width and centre it */
    .screen {
        max-width: 640px;
        margin: 0 auto;
        width: 100%;
    }

    /* Make question card slightly bigger on desktop */
    .q-card {
        padding: 28px 26px;
    }

    /* Larger choice buttons on desktop */
    .choice-num {
        width: 80px;
        height: 80px;
        font-size: 34px;
    }

    .problem-display {
        font-size: 56px;
    }

    .answer-slot {
        min-width: 110px;
        height: 84px;
        font-size: 48px;
    }
}

/* ═══════════════════════════════════════════════════════
   HOME FOOTER
   ─────────────────────────────────────────────────────── */
.home-footer {
    margin-top: auto;
    padding: 16px 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.footer-link {
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}
.footer-link:hover { color: var(--col-plus); text-decoration: underline; }

.footer-sep {
    color: var(--border);
}

/* ═══════════════════════════════════════════════════════
   COOKIE BANNER
   ─────────────────────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: #fff;
    border-top: 2px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0,0,0,.10);
    padding: 14px 16px;
}

.cookie-banner.hidden { display: none; }

.cookie-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 200px;
}

.cookie-text strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text);
}

.cookie-text p {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.cookie-link {
    color: var(--col-plus);
    text-decoration: underline;
}

.cookie-btns {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    padding-top: 2px;
}

.cookie-btn {
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: opacity .15s;
    white-space: nowrap;
}
.cookie-btn:hover { opacity: .85; }

.cookie-accept {
    background: var(--col-plus);
    color: white;
}

/* Ensure banner is above everything except modals */
@media (max-width: 480px) {
    .cookie-inner { flex-direction: column; }
    .cookie-btns  { width: 100%; }
    .cookie-btn   { flex: 1; text-align: center; }
}
