/* ===== ALLGEMEINE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Farb-Tokens (Text-Kontrast >= 4,5:1 auf Weiß) */
:root {
    --punkte: #a04f00;
    --hinweis: #6b6b6b;
    --fehler: #c0392b;
    --link: #4c51bf;
    --ok-text: #1d6f42;
}

body {
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

body.kinder-page {
    cursor: grab;
}

body.kinder-page:active {
    cursor: grabbing;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== LOGIN-SEITE ===== */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 20px;
    padding-top: 60px;
}

.login-container {
    background: white;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
    margin-bottom: auto;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFA07A 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.login-header h1 {
    font-size: 2em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.login-header h1 .marke-logo {
    width: 1.4em;
    height: 1.4em;
    vertical-align: middle;
    margin-right: 0.15em;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.login-tabs {
    display: flex;
    background: #f8f9fa;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    background: white;
    border-bottom: 3px solid #FF6B6B;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-container > .login-box {
    padding: 30px;
}

.login-box h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

/* ===== FORMULARE ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size: 1.1em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 15px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"],
.form-group input[aria-invalid="true"]:focus,
.form-group select[aria-invalid="true"]:focus,
.form-group textarea[aria-invalid="true"]:focus {
    border-color: var(--fehler);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.form-group input:disabled,
.bonus-input:disabled {
    background: #f0f0f0;
    color: #888;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--hinweis);
    font-size: 0.9em;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-success {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    color: white;
    width: 100%;
}

.btn-warning {
    background: linear-gradient(135deg, #F7DC6F 0%, #F39C12 100%);
    color: white;
    width: 100%;
}

.btn-secondary {
    background: white;
    color: var(--link);
    box-shadow: inset 0 0 0 2px #667eea, 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    box-shadow: inset 0 0 0 2px #667eea, 0 6px 20px rgba(0, 0, 0, 0.3);
}

a.btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.btn-danger {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
    color: white;
    width: 100%;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9em;
}

.btn-icon-inline {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85em;
    opacity: 0.5;
    padding: 2px 4px;
    vertical-align: middle;
    transition: opacity 0.2s;
}

.btn-icon-inline:hover {
    opacity: 1;
}

/* ===== NACHRICHTEN ===== */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    display: block;
}

.message a {
    color: inherit;
    text-decoration: underline;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
    display: block;
}

/* ===== HEADER ===== */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.app-header h1 {
    font-size: 1.8em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.kinder-header {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFA07A 100%);
}

/* Bilder links und rechts vom Titel der Kinderansicht */
.kinder-header h1 .kopf-bild {
    height: 1.15em;
    width: auto;
    vertical-align: -0.2em;
    margin: 0 0.25em;
    filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.15));
}

.header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ===== AUFGABEN-LISTE (ELTERN) ===== */
.action-bar {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.print-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.print-mode-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    user-select: none;
}

.print-mode-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.aufgaben-liste {
    display: grid;
    gap: 15px;
}

.aufgabe-item {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    border-left: 5px solid;
}

.aufgabe-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.aufgabe-icon {
    font-size: 3em;
    min-width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: #222; /* nur für eigene Buchstaben-Icons relevant, Emojis behalten ihre Farben */
}

.aufgabe-content {
    flex: 1;
}

.aufgabe-content h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
    color: #333;
}

.aufgabe-content p {
    color: #666;
    font-size: 0.9em;
}

.aufgabe-tag {
    display: inline-block;
    background: #e0e0e0;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    margin-top: 8px;
}

.aufgabe-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: #f0f0f0;
}

/* ===== AUFGABEN-GRID (KINDER) ===== */
.progress-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
}

.progress-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ECDC4 0%, #44A08D 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
    width: 0%;
}

.aufgaben-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.aufgabe-card {
    background: white;
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.aufgabe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
}

.aufgabe-card:hover {
    /* Anheben statt Vergrößern: scale ragte über scrollbare Container hinaus und erzeugte einen Scrollbalken */
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.aufgabe-card:active {
    transform: scale(0.95);
}

.aufgabe-card.erledigt {
    opacity: 0.6;
    background: #f5f5f5;
}

.aufgabe-card-icon {
    font-size: 5em;
    margin-bottom: 15px;
}

.aufgabe-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.aufgabe-card p {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 15px;
}

.check-mark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 25px;
    animation: pop 0.3s ease-out;
}

.aufgabe-card.erledigt .check-mark {
    display: flex;
}

@keyframes pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===== CELEBRATION ===== */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.celebration-content {
    background: white;
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    animation: bounceIn 0.5s;
}

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

.celebration-emoji {
    font-size: 5em;
    margin-bottom: 20px;
}

.celebration-content h2 {
    font-size: 3em;
    color: #4CAF50;
    margin-bottom: 15px;
}

.celebration-content p {
    font-size: 1.5em;
    color: #666;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 2em;
    color: white;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.8);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    border-radius: 25px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

/* Fokus aufs Modal selbst (Touchgeräte, kein Feld) ohne Rahmen */
.modal-content:focus { outline: none; }

/* Rückfrage „Änderungen verwerfen?“ oben im Modal (statt Browser-Dialog) */
.verwerfen-leiste {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #FFF3C4;
    border-bottom: 2px solid #F7DC6F;
    font-weight: bold;
    color: #5a4500;
}

.verwerfen-leiste span {
    flex: 1 1 auto;
}

.verwerfen-leiste span {
    flex-basis: 100%;
}

.verwerfen-leiste .btn {
    width: auto;
    flex: 1 1 0;
    margin: 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 2;
    background: white;
    border-radius: 25px 25px 0 0;
}

.modal-header h2 {
    color: #667eea;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-content form {
    padding: 30px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: white;
}

.modal-content form .modal-footer {
    padding-bottom: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* ===== COLOR PICKER ===== */
.color-picker,
.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.color-picker label,
.icon-picker label {
    cursor: pointer;
}

.color-picker label,
.icon-picker label {
    position: relative;
}

/* Nur visuell versteckt, damit die Auswahl per Tastatur erreichbar bleibt */
.color-picker input,
.icon-picker input,
.wochentag-cb-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.color-picker input:focus-visible + .color-box,
.icon-picker input:focus-visible + .icon-display {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.wochentag-cb-label:has(input:focus-visible) {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.color-box {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.color-picker input:checked + .color-box {
    border-color: #333;
    transform: scale(1.1);
}

.icon-display {
    display: block;
    font-size: 2em;
    padding: 5px;
    border: 3px solid transparent;
    border-radius: 10px;
    transition: all 0.3s;
}

.icon-picker input:checked + .icon-display {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

.icon-einklapp-kopf {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.icon-aktuell {
    font-size: 2em;
    min-width: 56px;
    text-align: center;
    border: 3px solid #667eea;
    border-radius: 10px;
    padding: 2px 5px;
    background: rgba(102, 126, 234, 0.1);
}

.icon-aktuell:empty {
    visibility: hidden;
}

.icon-toggle {
    width: auto;
    padding: 8px 16px;
    font-size: 0.95em;
}

.icon-picker[hidden] {
    display: none;
}

/* Gruppenüberschriften im Icon-Raster */
.icon-gruppe-titel {
    flex-basis: 100%;
    font-size: 0.85em;
    font-weight: bold;
    color: #667eea;
    margin-top: 8px;
}

.icon-gruppe-titel:first-child {
    margin-top: 0;
}

/* ===== AUFGABEN-VORLAGEN ===== */
.vorlagen-kacheln {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    max-width: 640px;
    margin: 24px auto 0;
}

.vorlagen-kachel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 10px;
    background: white;
    border: 3px solid transparent;
    border-radius: 18px;
    cursor: pointer;
    font: inherit;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, border-color 0.2s;
}

.vorlagen-kachel:hover,
.vorlagen-kachel:focus-visible {
    transform: translateY(-2px);
    border-color: #667eea;
}

.vorlagen-kachel-icon {
    font-size: 2.6em;
    line-height: 1.1;
}

.vorlagen-kachel small {
    color: #666;
}

.vorlage-liste-kopf {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

.vorlage-liste {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vorlage-liste .vorlage-zeile {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 8px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    font-weight: normal;
    color: #333;
}

.vorlage-liste .vorlage-zeile:has(input:checked) {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.vorlage-liste .vorlage-zeile:has(input:focus-visible) {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.vorlage-liste .vorlage-zeile.vorhanden {
    opacity: 0.6;
    cursor: default;
}

.vorlage-liste .vorlage-zeile input[type="checkbox"] {
    width: 22px;
    height: 22px;
    padding: 0;
    flex-shrink: 0;
}

.vorlage-liste .vorlage-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
}

.vorlage-liste .vorlage-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vorlage-liste .vorlage-text small {
    margin: 0;
    color: #666;
}

.custom-icon-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.custom-icon-label {
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
}

.custom-icon-input {
    width: 60px;
    font-size: 1.4em;
    text-align: center;
    padding: 4px 6px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.custom-icon-input:focus {
    outline: none;
    border-color: #667eea;
}

.custom-icon-preview {
    font-size: 2em;
    min-width: 44px;
    text-align: center;
    border: 3px solid #667eea;
    border-radius: 10px;
    padding: 2px 5px;
    background: rgba(102, 126, 234, 0.1);
    display: inline-block;
    visibility: hidden;
}

.custom-icon-preview:not(:empty) {
    visibility: visible;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .aufgaben-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .login-header h1 {
        font-size: 1.5em;
    }
}

/* ===== TOUCHSCREEN OPTIMIERUNGEN ===== */
@media (hover: none) {
    .aufgabe-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* ===== EINSTELLUNGEN ===== */
.einstellungen-bereich {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.einstellungen-sektion {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.einstellungen-sektion h2 {
    margin-bottom: 8px;
    font-size: 1.1em;
    color: #333;
}

.einstellungen-sektion.danger-zone {
    border: 2px solid var(--fehler);
}

.einstellungen-sektion.danger-zone h2 {
    color: var(--fehler);
}

.einstellungen-info {
    color: var(--hinweis);
    font-size: 0.9em;
    margin-bottom: 16px;
}

.plus-hinweis {
    margin: 0 0 12px;
}

#drucken-plus-hinweis {
    color: #fff;
    text-align: right;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tarif-status {
    font-weight: 600;
    margin-bottom: 8px;
}

.tarif-zeile {
    font-size: 0.95em;
    margin-bottom: 4px;
}

.tarif-warnung {
    color: var(--punkte);
    font-size: 0.9em;
    margin: 8px 0;
}

.bestell-wahl {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.bestell-wahl label {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
}

.bestell-wahl label:has(input:checked) {
    border-color: #667eea;
    background: #f3f4ff;
}

.bestell-block {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}

.bestell-zeile {
    margin-bottom: 8px;
}

.bestell-zeile:last-child {
    margin-bottom: 0;
}

.bestell-abbruch {
    color: var(--punkte);
    font-weight: 600;
    margin-bottom: 12px;
}

.link-subtle {
    color: var(--hinweis);
    font-size: 0.9em;
    text-decoration: none;
}

.link-subtle:hover {
    color: var(--link);
    text-decoration: underline;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-top: auto;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer p {
    margin: 0;
    font-size: 0.95em;
}

.version {
    font-size: 0.65em;
    opacity: 1;
    color: #b8c0c8;
    margin-top: 6px !important;
    letter-spacing: 0.05em;
}

.site-footer a {
    color: #4ECDC4;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.site-footer a:hover {
    color: #85C1E9;
    text-decoration: underline;
}

/* Vertragslinks (Kündigen, Widerrufen) in eigener Zeile, fest im HTML; fuss.js entfernt sie, wenn Familie Plus aus ist */
.site-footer p.fuss-vertrag {
    margin-top: 10px;
    font-size: 0.9em;
    color: #b8c0c8;
}

.site-footer a.fuss-knopf {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: #4ECDC4;
    text-underline-offset: 3px;
}

.site-footer a.fuss-knopf:hover {
    color: #4ECDC4;
}

/* Footer unten halten (nur Eltern- und Kinderansicht) */
body.eltern-page,
body.kinder-page {
    display: flex;
    flex-direction: column;
}

body.eltern-page > .container,
body.kinder-page > .container {
    width: 100%;
}

/* Login-Seiten: Footer über die volle Breite, ohne Rand der Seitenpolsterung */
.login-page {
    padding-bottom: 0;
}

.login-page .site-footer {
    width: calc(100% + 40px);
    margin: 30px -20px 0;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 20px 10px;
    }
    
    .site-footer a {
        display: inline-block;
        margin: 5px;
    }
}

/* ===== PWA UPDATE BANNER ===== */
#pwa-update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 1em;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

.pwa-reload-btn {
    background: white;
    color: #667eea;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.95em;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-reload-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.pwa-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    font-family: inherit;
}

.pwa-close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

/* ===== PWA INSTALL BANNER ===== */
#pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    background: linear-gradient(135deg, #FF6B6B 0%, #ee5a24 100%);
    color: white;
    padding: 14px 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

#pwa-install-banner .install-banner-title {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 4px;
}

#pwa-install-banner .install-banner-text {
    font-size: 0.85em;
    opacity: 0.9;
    margin-bottom: 10px;
    line-height: 1.4;
}

#pwa-install-banner .install-banner-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pwa-install-btn {
    background: white;
    color: #FF6B6B;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 0.9em;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pwa-install-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}

.pwa-install-dismiss {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85em;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.pwa-install-dismiss:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

/* ===== BUY ME A COFFEE BUTTON ===== */
/* Standard: weg; fuss.js blendet ihn nur ein, wenn Familie Plus nicht angeboten wird */
.bmc-button {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    align-items: center;
    gap: 8px;
    background: #FFDD00;
    color: #000000;
    font-family: inherit;
    font-size: 0.95em;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.bmc-button.bmc-sichtbar {
    display: flex;
}

.bmc-button:hover {
    background: #FFE840;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    color: #000000;
    text-decoration: none;
}

.bmc-button:active {
    transform: translateY(-1px) scale(1.01);
}

.bmc-icon {
    font-size: 1.3em;
    line-height: 1;
    animation: bmc-wobble 3s ease-in-out infinite;
}

.bmc-text {
    font-size: 0.92em;
}

@keyframes bmc-wobble {
    0%, 100% { transform: rotate(0deg); }
    15%       { transform: rotate(-12deg); }
    30%       { transform: rotate(10deg); }
    45%       { transform: rotate(-8deg); }
    60%       { transform: rotate(6deg); }
    75%       { transform: rotate(-3deg); }
}

@media (max-width: 480px) {
    .bmc-button {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
    }
    .bmc-text {
        display: none;
    }
    .bmc-icon {
        font-size: 1.6em;
    }
}

/* ===== TABS ===== */
.tabs-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.tab-button:hover {
    background: #f0f0f0;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* ===== KINDER-GRID (ELTERN) ===== */
.kinder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.kind-card {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.kind-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.kind-avatar {
    margin-bottom: 15px;
}

.kind-card h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #333;
}

.kind-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ===== KINDER-BEREICH (KINDER-DASHBOARD) ===== */
.kind-bereich {
    background: white;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.kind-header {
    padding: 20px;
}

.kind-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.kind-avatar-large {
    font-size: 3em;
    position: relative;
    display: inline-block;
    line-height: 1;
}

/* Anfangsbuchstabe unten rechts am Avatar (nur bei mehreren Kindern) */
.kind-initiale {
    position: absolute;
    right: -0.3em;
    bottom: -0.2em;
    min-width: 1.5em;
    height: 1.5em;
    padding: 0 0.25em;
    border-radius: 0.75em;
    border: 2px solid white;
    color: white;
    font-size: 0.32em;
    font-weight: bold;
    line-height: 1.35em;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.kinder-doppelt-hinweis {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #FFF3C4;
    border: 2px solid #F7DC6F;
    border-radius: 14px;
    font-weight: bold;
    color: #5a4500;
}

.kinder-doppelt-hinweis[hidden] {
    display: none;
}

.kinder-doppelt-hinweis span {
    flex: 1 1 260px;
}

.kind-info h2 {
    font-size: 2em;
    color: #333;
}

.kind-header-toggle {
    cursor: pointer;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.kind-toggle-icon {
    font-size: 1.5em;
    color: #999;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.kind-toggle-icon.expanded {
    transform: rotate(90deg);
}

.aufgaben-grid-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.aufgaben-grid-wrapper.expanded {
    max-height: 5000px;
}

.kind-fortschritt {
    margin-top: 15px;
    width: 100%;
    flex-shrink: 0;
}

.fortschritt-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
}

/* ===== CHECKBOX-GROUP ===== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-label:hover {
    background: #f5f5f5;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"] {
    align-self: center;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: bold;
    color: #667eea;
}

/* ===== WOCHENTAG-CHECKBOXEN ===== */
.wochentag-cb-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.wochentag-cb-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    user-select: none;
}

.wochentag-cb-label:hover {
    background: #f0f0f0;
    border-color: #667eea;
}

.wochentag-cb-label:has(input:checked) {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

/* ===== UPDATES FÜR AUFGABEN-TAG ===== */
.aufgabe-content > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aufgabe-tag {
    display: inline-block;
    background: #e0e0e0;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
}

.aufgabe-tag--negativ {
    background: #fde8e6;
    color: #c0392b;
}

.tab-icon,
.tab-text {
    pointer-events: none;
}

@media (max-width: 480px) {
    .tabs-container {
        gap: 4px;
        padding: 6px;
    }

    .tab-button {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        min-width: 0;
        padding: 10px 4px;
        font-size: 0.8em;
    }

    .tab-icon {
        font-size: 1.4em;
        line-height: 1;
    }

    .login-tabs .tab-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        min-width: 0;
        padding: 10px 4px;
        font-size: 0.8em;
    }
}

/* ===== ANPASSUNGEN FÜR MOBILE ===== */
@media (max-width: 768px) {
    .tabs-container {
        flex-direction: row;
    }

    .kinder-grid {
        grid-template-columns: 1fr;
    }

    .kind-info {
        flex-direction: column;
        text-align: center;
    }

    .kind-info h2 {
        font-size: 1.5em;
    }

    /* Aufgaben-Liste auf der Eltern-Seite */
    .aufgabe-item {
        flex-wrap: wrap;
        padding: 15px;
        gap: 10px;
    }

    .aufgabe-icon {
        font-size: 2em;
        min-width: 55px;
        height: 55px;
    }

    .aufgabe-content {
        min-width: 0;
        flex: 1 1 0;
    }

    .aufgabe-content h3 {
        font-size: 1.1em;
    }

    .aufgabe-actions {
        width: 100%;
        justify-content: flex-end;
        border-top: 1px solid #f0f0f0;
        padding-top: 8px;
        margin-top: 2px;
    }
}

/* ===== KINDER NEBENEINANDER (SIDE-BY-SIDE) ===== */
body.kinder-page .container {
    max-width: 100%;
    padding: 20px;
}

#kinder-container {
    display: flex;
    width: 100%;
    gap: 20px;
    align-items: flex-start;
}

#kinder-container .kind-bereich {
    flex: 1;
    margin-bottom: 0;
}

@media (min-width: 769px) {
    #kinder-container {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    #kinder-container .kind-bereich {
        flex: 1 0 260px;
        min-width: 260px;
    }
}

@media (max-width: 768px) {
    #kinder-container {
        flex-direction: column;
    }
    #kinder-container .kind-bereich {
        min-width: 0;
        width: 100%;
    }
}

/* ===== KINDER-HEADER ZEILE ===== */
.kind-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kind-collapse-btn {
    display: none;
    font-size: 1.3em;
    color: #999;
    transition: transform 0.3s;
    flex-shrink: 0;
    padding: 4px;
}

.kind-collapse-btn.expanded {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .kind-header {
        cursor: pointer;
        user-select: none;
    }
    .kind-collapse-btn {
        display: block;
    }
    .aufgaben-content.mobile-collapsed {
        display: none;
    }
    .kind-info h2 {
        font-size: 1.4em;
    }
    .kind-avatar-large {
        font-size: 2em;
    }
}

/* ===== KATEGORIE-BEREICHE ===== */
.aufgaben-content {
    padding: 10px;
}

.kind-bereich .aufgaben-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.kind-bereich .aufgabe-card,
.kind-kat-col .aufgabe-card {
    padding: 16px 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.kind-bereich .aufgabe-card-icon,
.kind-kat-col .aufgabe-card-icon {
    font-size: 1.8em;
    flex-shrink: 0;
}

.kind-bereich .aufgabe-card h3,
.kind-kat-col .aufgabe-card h3 {
    font-size: 1em;
    margin: 0;
}

.kind-bereich .aufgabe-card p,
.kind-kat-col .aufgabe-card p {
    font-size: 0.8em;
    color: var(--hinweis);
    margin: 2px 0 0;
}

.kind-bereich .check-mark,
.kind-kat-col .check-mark {
    position: static;
    background: none;
    font-size: 1.6em;
    margin-left: auto;
    flex-shrink: 0;
    animation: none;
}

.kind-bereich .aufgabe-card.erledigt,
.kind-kat-col .aufgabe-card.erledigt {
    opacity: 1;
    background: #e8f6ee;
}

.kind-bereich .aufgabe-card.erledigt h3,
.kind-kat-col .aufgabe-card.erledigt h3 {
    text-decoration: line-through;
    color: #555;
}

/* ===== ALIGNED LAYOUT (Desktop, ≥2 Kinder) ===== */
.kinder-headers-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.kind-header-aligned {
    flex: 1 0 260px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.kind-header-aligned > .kind-header {
    flex: 1;
}

.kinder-kat-section {
    margin-bottom: 16px;
}

.kinder-kat-label {
    font-size: 1em;
    font-weight: bold;
    color: #666;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 8px;
}

.kinder-kat-label--togglable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.kinder-kat-label--togglable:hover {
    background: #ebebeb;
}

.kat-toggle-icon {
    font-size: 0.75em;
    transition: transform 0.2s ease;
    color: #999;
}

.kinder-kat-label--togglable.expanded .kat-toggle-icon {
    transform: rotate(90deg);
}

.kinder-kat-cols {
    display: flex;
    gap: 20px;
}

.kinder-kat-cols.kat-collapsed,
.aufgaben-grid.kat-collapsed {
    display: none;
}

.kind-kat-col {
    flex: 1 0 260px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}


.kategorie-section {
    margin-bottom: 16px;
}

.kategorie-header {
    font-size: 1em;
    font-weight: bold;
    color: #666;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 8px;
}

.keine-aufgaben-heute {
    text-align: center;
    color: var(--hinweis);
    padding: 30px 20px;
    font-size: 1.1em;
}

/* ===== FORTSCHRITT PRO KATEGORIE ===== */
.kat-progress-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
    width: 100%;
    overflow: hidden;
}

.kat-progress-item {
    display: flex;
    gap: 5px;
    align-items: center;
    background: rgba(255,255,255,0.6);
    border-radius: 12px;
    padding: 3px 8px;
    font-size: 0.8em;
    font-weight: bold;
    color: #555;
    border: 1px solid rgba(0,0,0,0.08);
    white-space: nowrap;
}

.kat-progress-item.kat-done {
    background: rgba(39, 174, 96, 0.15);
    color: var(--ok-text);
}

/* ===== PUNKTE ===== */
.kind-punkte-gesamt {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--punkte);
    margin: 4px 0;
}

.aufgabe-punkte-badge {
    font-size: 0.8em;
    font-weight: bold;
    color: var(--punkte);
    margin-top: 4px;
}

.aufgabe-punkte-badge--negativ {
    color: var(--fehler);
}

.kind-punkte-badge {
    font-size: 0.85em;
    color: var(--punkte);
    font-weight: bold;
    margin: 4px 0;
}

.punkte-feedback {
    font-size: 0.85em;
    min-height: 1em;
}

.punkte-feedback.success { color: var(--ok-text); }
.punkte-feedback.error   { color: var(--fehler); }

/* ===== AUTOCOMPLETE ===== */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 10px 10px;
    z-index: 200;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.autocomplete-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.95em;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.autocomplete-item:last-child { border-bottom: none; }

.autocomplete-item:hover { background: #f0f4ff; }

.autocomplete-item.no-result {
    color: #999;
    cursor: default;
    font-style: italic;
}

.autocomplete-item.no-result:hover { background: white; }

/* ===== ELTERN: FORMULAR-ELEMENTE ===== */
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
}

.form-input-small {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-input-small:focus {
    outline: none;
    border-color: #667eea;
}

/* ===== ABSCHLUSS-BONUS ===== */
.bonus-kind-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bonus-kind-row:last-child {
    border-bottom: none;
}

.bonus-kind-label {
    font-weight: 600;
    font-size: 1em;
    flex: 1;
}

.bonus-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bonus-input {
    width: 70px !important;
    text-align: center;
    padding: 8px 10px !important;
}

.bonus-punkte-label {
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85em;
}

/* ===== WETTER-WIDGET ===== */
.wetter-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 8px 16px;
    margin: 6px 0;
    backdrop-filter: blur(4px);
}

.wetter-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    color: white;
}

.wetter-icon {
    font-size: 1.8em;
}

.wetter-temp {
    font-size: 1.3em;
}

.wetter-ort {
    font-size: 0.9em;
    opacity: 0.85;
}

.wetter-kleidung {
    font-size: 0.85em;
    color: rgba(255,255,255,0.9);
    text-align: center;
}

/* ===== WOCHENVORSCHAU ===== */
.wochen-vorschau {
    width: 100%;
    padding: 2px 0 10px;
}

.wv-label {
    font-size: 0.75em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 5px;
}

.wv-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.wv-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 2px 5px;
    border-radius: 8px;
}

.wv-tag--heute {
    background: rgba(255,255,255,0.25);
}

.wv-tagname {
    font-size: 0.75em;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

.wv-tagnr {
    font-size: 0.9em;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
    font-weight: bold;
    line-height: 1.1;
}

.wv-tag--heute .wv-tagname {
    color: #fff;
}

.wv-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-height: 14px;
}

.wv-icon {
    font-size: 0.72em;
    line-height: 1.6;
}

/* ===== WETTER-DETAIL-MODAL ===== */
.wetter-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wetter-modal-content {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
}

@media (min-width: 769px) {
    .wetter-modal-content {
        max-width: 720px;
    }
}

.wetter-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.wetter-modal-header h2 {
    font-size: 1.2em;
    margin: 0;
}

.modal-close-btn {
    background: rgba(255,255,255,0.25);
    border: none;
    color: white;
    font-size: 1.1em;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: rgba(255,255,255,0.4);
}

.wetter-stunden-scroll {
    overflow-x: auto;
    padding: 16px 16px 4px;
    -webkit-overflow-scrolling: touch;
}

.wetter-stunden-grid {
    display: flex;
    gap: 10px;
    min-width: max-content;
}

.wetter-stunde-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: #f5f5ff;
    border-radius: 14px;
    padding: 10px 12px;
    min-width: 64px;
    text-align: center;
}

.wetter-stunde-zeit {
    font-size: 0.78em;
    color: #666;
    font-weight: bold;
}

/* Stunden des nächsten Tages leicht abgesetzt, die erste mit Tagesbeschriftung */
.wetter-stunde-morgen {
    background: #fff4e6;
}

.wetter-stunde-tag {
    font-size: 0.7em;
    font-weight: bold;
    color: #c53043;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wetter-stunde-icon {
    font-size: 1.5em;
}

.wetter-stunde-temp {
    font-size: 0.95em;
    font-weight: bold;
    color: #333;
}

.wetter-stunde-regen {
    font-size: 0.75em;
    color: #4a90d9;
}

.wetter-modal-kleidung {
    margin: 8px 16px 16px;
    padding: 10px 14px;
    background: #f0f4ff;
    border-radius: 12px;
    font-size: 0.9em;
    color: #444;
    text-align: center;
}

.wetter-modal-kein-detail {
    padding: 20px;
    text-align: center;
    color: #888;
}

/* Quellenangabe der Wetterdaten (reiner Text; die Kinderansicht enthält keine externen Links) */
.wetter-quelle {
    margin-top: 10px;
    text-align: center;
    font-size: 0.75em;
    color: var(--hinweis);
}

/* ===== DATUM-NAVIGATION ===== */
.datum-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    position: relative;
}

.datum-prev,
.datum-next {
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.1em;
    font-family: Arial, sans-serif;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
    line-height: 1;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.datum-prev:hover,
.datum-next:hover {
    background: white;
    transform: scale(1.1);
}

.datum-display {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 20px;
    padding: 7px 18px;
    font-family: inherit;
    font-size: 0.95em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.datum-display:hover {
    background: white;
}

.datum-heute {
    background: #FF6B6B;
    color: white;
    border: none;
    border-radius: 14px;
    padding: 5px 12px;
    font-family: inherit;
    font-size: 0.82em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.datum-heute:hover {
    background: #ee5a24;
    transform: scale(1.05);
}

/* Andere Tage als heute sind in der Kinderansicht nur zum Ansehen */
.datum-hinweis {
    text-align: center;
    margin: 0 auto 10px;
    padding: 6px 14px;
    width: fit-content;
    max-width: calc(100% - 32px);
    background: rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    font-weight: bold;
    color: #555;
}

.datum-hinweis[hidden] {
    display: none;
}

.datum-hinweis--blinken {
    animation: datum-hinweis-blinken 0.6s ease-in-out 2;
}

@keyframes datum-hinweis-blinken {
    50% { background: #FFB300; transform: scale(1.06); }
}

.aufgabe-card.nur-ansehen {
    cursor: default;
}

.aufgabe-card.nur-ansehen:hover,
.aufgabe-card.nur-ansehen:active {
    transform: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Datum-Nav im Eltern-Tab (weißer Hintergrund) */
.datum-nav--eltern {
    background: #f8f9fa;
    border-radius: 14px;
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
}

.datum-nav--eltern .datum-prev,
.datum-nav--eltern .datum-next {
    background: white;
    border: 1px solid #e9ecef;
}

.datum-nav--eltern .datum-prev:hover,
.datum-nav--eltern .datum-next:hover {
    background: #f0f0f0;
}

.datum-nav--eltern .datum-display {
    background: white;
    border: 1px solid #e9ecef;
    color: #444;
}

.datum-nav--eltern .datum-display:hover {
    background: #f0f0f0;
}

/* ===== TERMIN-KARTEN (KINDER-ANSICHT) ===== */
.termine-info-bereich {
    padding: 8px 10px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.termin-info-karte {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbf0;
    border-radius: 12px;
    padding: 10px 14px;
    border-left-width: 4px;
    border-left-style: solid;
}

.termin-info-icon {
    font-size: 1.4em;
    flex-shrink: 0;
    line-height: 1.2;
}

.termin-info-body {
    flex: 1;
    min-width: 0;
}

.termin-info-titel {
    font-weight: bold;
    font-size: 0.95em;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.termin-info-uhrzeit {
    font-size: 0.8em;
    font-weight: normal;
    color: #555;
}

.termin-info-beschreibung {
    font-size: 0.82em;
    color: #666;
    margin-top: 2px;
}

/* Termine in Aligned-View (im Kind-Header) */
.termine-aligned-bereich {
    padding: 6px 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.termin-info-karte--small {
    padding: 7px 10px;
    font-size: 0.9em;
}

.termin-info-karte--small .termin-info-icon {
    font-size: 1.1em;
}

/* ===== TERMINE-SEKTION (ELTERN-ANSICHT) ===== */
.termine-sektion {
    margin-bottom: 20px;
}

.termine-sektion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 0 2px;
}

.termine-sektion-header h2 {
    font-size: 1em;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.termine-sektion-header .btn {
    width: auto;
    flex-shrink: 0;
}

.termine-liste {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.termin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 12px;
    padding: 12px 14px;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.termin-item-icon {
    font-size: 1.5em;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #222;
}

.termin-item-body {
    flex: 1;
    min-width: 0;
}

.termin-item-titel {
    font-weight: bold;
    font-size: 0.95em;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.termin-item-uhrzeit {
    font-size: 0.8em;
    font-weight: normal;
    color: #555;
}

.termin-item-beschreibung {
    font-size: 0.82em;
    color: #666;
    margin-top: 2px;
}

.termin-item-kind {
    font-size: 0.8em;
    color: #333;
    background: #e8e8e8;
    border: 1px solid #888;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
    display: inline-block;
}

.termin-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.termine-leer {
    text-align: center;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    font-size: 0.88em;
    padding: 8px 0;
}
/* ===== LADEANZEIGE ===== */
.lade-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 16px;
    border: 4px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: drehen 0.9s linear infinite;
}

@keyframes drehen {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .lade-spinner { animation-duration: 3s; }
}

/* Nur für Screenreader sichtbar */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== BILDMODUS (Kinder, die noch nicht lesen) ===== */
.aufgabe-card.bildmodus {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    min-height: 130px;
    padding: 18px 12px;
}

.kind-bereich .aufgabe-card.bildmodus .aufgabe-card-icon,
.kind-kat-col .aufgabe-card.bildmodus .aufgabe-card-icon,
.aufgabe-card.bildmodus .aufgabe-card-icon {
    font-size: 3.5em;
    line-height: 1.1;
    margin: 0;
}

/* Der Haken sitzt oben links, damit er das große Bild nicht verdeckt */
.kind-bereich .aufgabe-card.bildmodus .check-mark,
.kind-kat-col .aufgabe-card.bildmodus .check-mark {
    position: absolute;
    top: 8px;
    left: 10px;
    right: auto;
    bottom: auto;
    margin: 0;
    font-size: 2em;
}

/* Mit Bildmodus mehrere Karten nebeneinander */
.kind-bereich .aufgaben-grid.bildmodus-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.kind-kat-col.bildmodus-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-content: start;
}

/* Platz über dem Bild für Haken und Vorlesen-Knopf, damit sie das Bild nicht verdecken */
.aufgabe-card.bildmodus.mit-vorlesen {
    padding-top: 64px;
}

/* Tablet: größere Bilder */
@media (min-width: 769px) {
    .aufgabe-card.bildmodus .aufgabe-card-icon,
    .kind-bereich .aufgabe-card.bildmodus .aufgabe-card-icon,
    .kind-kat-col .aufgabe-card.bildmodus .aufgabe-card-icon {
        font-size: 5.5em;
    }
}

/* ===== VORLESEN-KNOPF ===== */
.vorlesen-btn {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid #1a3a6b;
    background: #fff;
    color: #1a3a6b;
    font-size: 1.6em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.vorlesen-btn:active {
    transform: scale(0.9);
    background: #dbe7ff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.vorlesen-btn.spricht {
    background: #dbe7ff;
    animation: vorlesen-puls 0.9s ease-in-out infinite;
}

@keyframes vorlesen-puls {
    50% { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(26, 58, 107, 0.2); }
}

/* Erledigte Karten im Kinderbereich sind nicht abgedunkelt (opacity 1), der Knopf bleibt daher voll deckend */

.aufgabe-card.bildmodus .vorlesen-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    margin: 0;
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .vorlesen-btn.spricht { animation: none; }
}

@media (max-width: 480px) {
    .vorlesen-btn {
        width: 48px;
        height: 48px;
        font-size: 1.4em;
    }

    .aufgabe-card.bildmodus.mit-vorlesen {
        padding-top: 58px;
    }
}

/* ===== ANDERE TAGE: NUR ANSCHAUEN ===== */
.aufgabe-card.nur-ansehen {
    opacity: 0.6;
    filter: grayscale(0.5);
}

/* Erledigte Karten sind schon abgesetzt; nicht doppelt abdunkeln */
.aufgabe-card.nur-ansehen.erledigt {
    opacity: 0.8;
}

.datum-hinweis:not([hidden]) {
    background: #FFE066;
    color: #5a4500;
}

/* ===== TIPPFLÄCHEN ===== */
.datum-nav:not(.datum-nav--eltern) .datum-prev,
.datum-nav:not(.datum-nav--eltern) .datum-next {
    width: 52px;
    height: 52px;
    font-size: 1.3em;
}

.btn-small {
    min-height: 44px;
}

/* ===== ICON-AUSWAHL AM HANDY ===== */
.icon-picker#aufgabe-icon-raster {
    max-height: 55vh;
    overflow-y: auto;
}

.icon-picker#aufgabe-icon-raster .icon-gruppe-titel {
    position: sticky;
    top: 0;
    z-index: 1;
    background: white;
    padding: 4px 0;
}

@media (max-width: 480px) {
    .icon-picker#aufgabe-icon-raster {
        gap: 4px;
    }

    .icon-picker#aufgabe-icon-raster label {
        flex: 0 0 calc((100% - 16px) / 5);
    }

    .icon-picker#aufgabe-icon-raster .icon-display {
        text-align: center;
        padding: 4px 0;
    }
}

/* Vorlagen-Dialog: Kacheln und Knöpfe */
.vorlagen-kacheln--modal {
    margin: 0 0 16px;
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
}

#vorlage-abbrechen,
#vorlage-speichern {
    white-space: nowrap;
}

#vorlage-modal .modal-footer {
    flex-wrap: wrap;
}

#vorlage-modal .modal-footer .btn {
    flex: 1 1 auto;
    padding-left: 14px;
    padding-right: 14px;
}

/* ===== STICKER-ALBUM ===== */
.album-knopf {
    background: white;
    border: 2px solid #d9d9e8;
    border-radius: 20px;
    padding: 6px 14px;
    font: inherit;
    font-size: 1.1em;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.album-knopf:hover {
    background: #f0f0f8;
}

.icon-btn-album {
    font-size: 1em;
}

.album-modal-content {
    max-width: 460px;
}

.album-raster {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 20px 20px 8px;
}

.album-platz {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    border-radius: 14px;
    background: #fff8e1;
    border: 2px solid #f0d98a;
}

.album-platz.leer {
    background: transparent;
    border: 2px dashed #cfcfdc;
}

.album-blaettern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 20px 20px;
}

.album-blaettern-knopf {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #667eea;
    color: white;
    font-size: 1em;
    cursor: pointer;
}

.album-blaettern-knopf:disabled {
    background: #cfcfdc;
    cursor: default;
}

.album-seite {
    color: #555;
    min-width: 8em;
    text-align: center;
}

.album-eltern .album-raster,
.album-eltern .album-blaettern {
    padding-left: 0;
    padding-right: 0;
}

.album-hinweis {
    color: var(--hinweis);
    text-align: center;
    padding: 8px 0;
}

.celebration-sticker {
    font-size: 6em;
    line-height: 1.2;
    margin-top: 10px;
    animation: sticker-klebt 0.7s ease-out;
}

.celebration-content p.celebration-sticker-text {
    font-size: 1.3em;
    color: #444;
}

@keyframes sticker-klebt {
    0% { transform: scale(2.2) rotate(-25deg); opacity: 0; }
    70% { transform: scale(0.9) rotate(4deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); }
}

@media (max-width: 480px) {
    .album-raster {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 16px 14px 8px;
    }

    .album-platz {
        font-size: 1.6em;
    }

    .celebration-sticker {
        font-size: 4.5em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .celebration-sticker { animation: none; }
}

/* ===== BELOHNUNGEN ===== */
/* Wunschziel im Kind-Kopf */
.wunsch-knopf {
    display: block;
    width: 100%;
    margin: 6px 0;
    padding: 8px 14px;
    background: white;
    border: 2px solid #d9d9e8;
    border-radius: 18px;
    font: inherit;
    font-size: 1.05em;
    font-weight: bold;
    color: #333;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.wunsch-knopf:hover {
    background: #f0f0f8;
}

/* Ohne Wunsch und ohne offene Einlösung: nur das Geschenk, so groß wie der Album-Knopf */
.wunsch-knopf.wunsch-nur-symbol {
    width: auto;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 1.1em;
}

.wunsch-knopf.wunsch-geschafft {
    border-color: #4ECDC4;
    background: #e8f8f6;
}

.wunsch-knopf.wunsch-offen {
    color: #555;
}

.wunsch-zeile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.wunsch-icon {
    font-size: 1.6em;
    line-height: 1;
}

.wunsch-balken {
    display: block;
    height: 14px;
    border-radius: 7px;
}

.wunsch-balken .progress-fill {
    display: block;
    border-radius: 7px;
}

/* Fenster mit den Belohnungen (Kinderansicht) */
.shop-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

#shop-modal-body {
    overflow-y: auto;
    padding: 0 16px;
}

.shop-stand {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--punkte);
    text-align: center;
    padding: 14px 0 0;
}

.shop-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 16px 0;
}

.shop-karte {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    text-align: center;
    background: #fff8e1;
    border: 2px solid #f0d98a;
    border-radius: 18px;
}

.shop-karte.ist-wunsch {
    border-color: #667eea;
    background: #eef0fd;
}

/* Lautsprecher im Bildmodus: oben rechts in der Karte, neben dem Bild */
.shop-karte {
    position: relative;
}

.shop-karte .vorlesen-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 48px;
    height: 48px;
    font-size: 1.4em;
}

.shop-icon {
    font-size: 2.8em;
    line-height: 1.1;
}

.shop-karte h3 {
    font-size: 1.05em;
    color: #333;
}

.shop-kosten {
    font-weight: bold;
    color: var(--punkte);
}

.shop-aktion {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-fehlt,
.shop-offen {
    font-weight: bold;
    color: #555;
}

.shop-wunsch {
    background: white;
    border: 2px solid #d9d9e8;
    border-radius: 20px;
    padding: 6px 14px;
    min-height: 44px;
    font: inherit;
    color: #333;
    cursor: pointer;
}

.shop-wunsch.aktiv {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.shop-wunsch:disabled,
.shop-karte .btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.shop-frage p {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.shop-frage-knoepfe {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.shop-meldung {
    min-height: 1.4em;
    padding: 0 16px 16px;
    text-align: center;
    font-weight: bold;
    color: var(--ok-text);
}

/* Elternansicht, Tab Belohnungen */
.belohnungen-titel {
    font-size: 1.3em;
    color: white;
    margin: 24px 0 10px;
}

.belohnungen-untertitel {
    font-size: 1.05em;
    color: white;
    margin: 16px 0 8px;
}

#belohnungen-tab .einstellungen-info {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 0 0 12px;
}

.einloesung-zeile,
.belohnung-zeile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.einloesung-zeile {
    border-left: 6px solid #F7DC6F;
}

.einloesung-text {
    flex: 1 1 260px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.einloesung-icon,
.belohnung-icon {
    font-size: 1.8em;
    line-height: 1;
}

.einloesung-knoepfe {
    display: flex;
    gap: 8px;
}

.einloesung-knoepfe .btn {
    width: auto;
}

#belohnungen-tab .einloesung-hinweis {
    flex-basis: 100%;
    background: transparent;
    padding: 0;
    margin: 0;
}

.wunsch-liste,
.entschieden-liste {
    list-style: none;
    background: white;
    border-radius: 14px;
    padding: 6px 16px;
    margin-bottom: 12px;
}

.wunsch-liste li,
.entschieden-liste li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.wunsch-liste li:last-child,
.entschieden-liste li:last-child {
    border-bottom: none;
}

.belohnung-name {
    flex: 1 1 140px;
    font-weight: bold;
}

.belohnung-kosten {
    font-weight: bold;
    color: var(--punkte);
}

.vorschlag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vorschlag-chip {
    background: white;
    border: 2px solid #d9d9e8;
    border-radius: 20px;
    padding: 8px 14px;
    min-height: 44px;
    font: inherit;
    color: #333;
    cursor: pointer;
}

.vorschlag-chip:hover {
    background: #f0f0f8;
}

.testende-hinweis p + p {
    margin-top: 6px;
}

/* Vier Tabs auf schmalen Geräten */
@media (max-width: 480px) {
    .tab-button {
        font-size: 0.72em;
    }

    .tab-text {
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    .shop-raster {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== KIOSKMODUS UND BILDSCHIRMSPERRE ===== */
/* Im Kioskmodus führt nichts aus der Kinderansicht heraus */
.kiosk-ende-knopf {
    display: none;
    opacity: 0.45;
}

body.kiosk .kiosk-ende-knopf {
    display: inline-block;
}

body.kiosk #eltern-wechsel-btn,
body.kiosk #abmelden-btn,
body.kiosk .site-footer,
body.kiosk #pwa-install-banner {
    display: none !important;
}

.kiosk-form {
    padding: 20px;
}

.kiosk-form .message {
    margin-top: 12px;
}

.sperre-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 20px;
    overflow: auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.sperre-overlay[hidden] {
    display: none;
}

.sperre-overlay [hidden] {
    display: none !important;
}

.sperre-overlay:focus {
    outline: none;
}

body.sperre-aktiv {
    overflow: hidden;
}

.sperre-symbol {
    font-size: 5em;
    line-height: 1;
}

.sperre-punkte {
    display: flex;
    gap: 16px;
}

.sperre-punkte span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid white;
}

.sperre-punkte span.gefuellt {
    background: white;
}

.sperre-punkte.sperre-falsch span {
    border-color: #ffb3b3;
    background: #ff6b6b;
}

.sperre-punkte.sperre-wackeln {
    animation: sperre-wackeln 0.4s;
}

@keyframes sperre-wackeln {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-12px); }
    40%, 80% { transform: translateX(12px); }
}

.sperre-tasten {
    display: grid;
    grid-template-columns: repeat(3, 84px);
    gap: 14px;
}

.sperre-tasten button {
    height: 84px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #4c51bf;
    font: inherit;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
}

.sperre-tasten button:active {
    background: white;
    transform: scale(0.94);
}

.sperre-vergessen {
    background: none;
    border: none;
    color: white;
    font: inherit;
    font-size: 0.9em;
    text-decoration: underline;
    min-height: 44px;
    padding: 0 16px;
    cursor: pointer;
    opacity: 0.85;
}

.sperre-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 360px;
}

.sperre-form[hidden] {
    display: none;
}

.sperre-form input {
    flex: 1 1 100%;
    padding: 14px;
    border: 2px solid white;
    border-radius: 15px;
    font: inherit;
    font-size: 1.1em;
    user-select: text;
    -webkit-user-select: text;
}

.sperre-form button {
    min-height: 48px;
    min-width: 48px;
    padding: 0 20px;
    border: none;
    border-radius: 24px;
    background: white;
    color: #4c51bf;
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.sperre-meldung {
    flex: 1 1 100%;
    margin: 0;
    text-align: center;
    color: white;
    font-weight: bold;
    min-height: 1.2em;
}

@media (max-height: 640px) {
    .sperre-overlay {
        gap: 10px;
    }

    .sperre-symbol {
        font-size: 3em;
    }

    .sperre-tasten {
        grid-template-columns: repeat(3, 64px);
        gap: 10px;
    }

    .sperre-tasten button {
        height: 64px;
        font-size: 1.6em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sperre-punkte.sperre-wackeln { animation: none; }
    .sperre-tasten button:active { transform: none; }
}
