 /* =========================================================
           SCHRIFTEN
           Hier die eigenen @font-face-Regeln (vom eigenen Server) einfügen.
           Benötigte Schnitte:
             - Cinzel Decorative: 700
             - Source Sans 3: 300, 400, 500, 600, 700, 400 italic, 600 italic
           (Great Vibes wurde im Original geladen, aber nirgends verwendet.)

           Beispiel:
           @font-face {
               font-family: 'Cinzel Decorative';
               src: url('/fonts/cinzel-decorative-700.woff2') format('woff2');
               font-weight: 700;
               font-style: normal;
               font-display: swap;
           }
           @font-face {
               font-family: 'Source Sans 3';
               src: url('/fonts/source-sans-3-400.woff2') format('woff2');
               font-weight: 400;
               font-style: normal;
               font-display: swap;
           }
           ========================================================= */

        /* ---------- Variablen ---------- */
        :root {
            --accent-100: #f6fae1;
            --accent-200: #e7f09c;
            --accent-300: #d7e657;
            --accent-400: #c6d92e;
            --accent-500: #afc30f;
            --accent-600: #94a60b;
            --accent-700: #758407;

            --night-800: #0B192C;
            --night-900: #070F1E;
            --night-950: #030712;

            --festive-red: #8B0000;
            --festive-crimson: #B22222;
            --festive-green: #173b22;
            --festive-darkgreen: #0b2112;

            --slate-100: #f1f5f9;
            --slate-200: #e2e8f0;
            --slate-300: #cbd5e1;
            --slate-400: #94a3b8;
            --slate-500: #64748b;
            --slate-700: #334155;
            --slate-800: #1e293b;
            --slate-900: #0f172a;

            --font-title: 'Playfair', Georgia, serif;
            --font-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
            --font-serif: 'Playfair', 'Times New Roman', serif;

            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
        }

        /* ---------- Basis ---------- */
        *, *::before, *::after { box-sizing: border-box; }

        [hidden] { display: none !important; }

        body {
            margin: 0;
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
            font-family: var(--font-sans);
            line-height: 1.5;
            color: var(--slate-100);
            background: linear-gradient(to bottom, var(--night-950), var(--night-900), var(--night-800));
        }

        h1, h2, h3, p, ul { margin: 0; }

        button {
            font: inherit;
            cursor: pointer;
        }

        .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;
        }

        /* ---------- Schnee ---------- */
        #snow-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 2;
        }

        /* ---------- Layout ---------- */
        .page {
            position: relative;
            z-index: 10;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            z-index:1;
            &::after {
                content:'';
                display:block;
                width:100vw;
                height:100vh;
                position:fixed;
                background-image:url('assets/img/Adventskalender-Hintergrund.jpg');
                background-repeat:no-repeat;
                background-size:cover;
                background-position:center center;
                z-index:-1;
            }
        }

        /* ---------- Header ---------- */
        .header {
            padding: 2rem 1rem 1rem;
            text-align: center;
        }

        .header-inner {
            max-width: 56rem;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .logo {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            max-width: 280px;
            margin-bottom: 1rem;
            padding: 0.5rem;
        }

        .logo img {
            width: 100%;
            height: auto;
            object-fit: contain;
            filter: drop-shadow(0 0 15px rgba(175, 195, 15, 0.3));
        }

        .logo-fallback {
            font-family: var(--font-title);
            font-weight: 700;
            font-size: 2rem;
            letter-spacing: 0.1em;
            color: var(--accent-500);
        }
        .kissmas-merri {
            width:650px;
            max-width:100%;
        }
        .title {
            margin-bottom: 1rem;
            font-family: var(--font-title);
            font-weight: 700;
            font-size: 1.875rem;
            line-height: 1.2;
            letter-spacing: 0.05em;
            background: linear-gradient(135deg, var(--accent-100) 0%, var(--accent-400) 50%, var(--accent-500) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1));
        }

        .intro {
            max-width: 36rem;
            margin: 0 auto;
            color: var(--slate-300);
            font-size: 0.875rem;
            font-weight: 300;
            font-style: italic;
        }

        /* ---------- Test-Modus-Schalter ---------- */
        .controls {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 1rem;
            max-width: 28rem;
            margin: 1.5rem auto 0;
            padding: 0.75rem 1.25rem;
            font-size: 0.75rem;
            background: rgba(11, 25, 44, 0.6);
            -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(175, 195, 15, 0.2);
            border-radius: 9999px;
            box-shadow: var(--shadow-lg);
        }

        .toggle {
            display: flex;
            align-items: center;
            cursor: pointer;
            user-select: none;
        }

        .toggle-label {
            margin-right: 0.5rem;
            color: var(--slate-300);
            font-weight: 500;
        }

        .toggle-track {
            position: relative;
            display: block;
            width: 2.5rem;
            height: 1.5rem;
            border-radius: 9999px;
            background: var(--slate-700);
            transition: background-color 0.15s ease;
        }

        .toggle-dot {
            position: absolute;
            left: 0.25rem;
            top: 0.25rem;
            width: 1rem;
            height: 1rem;
            border-radius: 50%;
            background: #fff;
            transition: transform 0.15s ease;
        }

        .toggle input:checked + .toggle-track { background: var(--accent-500); }
        .toggle input:checked + .toggle-track .toggle-dot { transform: translateX(1rem); }
        .toggle input:focus-visible + .toggle-track {
            outline: 2px solid var(--accent-400);
            outline-offset: 2px;
        }

        /* ---------- Kalender-Raster ---------- */
        .main {
            flex-grow: 1;
            width: 100%;
            max-width: 72rem;
            margin: 0 auto;
            padding: 2rem 1rem;
        }

        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 1rem;
        }

        /* ---------- Türchen ---------- */
        .card {
            height: 9rem;
            perspective: 1000px;
            cursor: pointer;
            user-select: none;
        }

        .door {
            position: relative;
            width: 100%;
            height: 100%;
            border-radius: 0.75rem;
            border: 1px solid transparent;
            box-shadow: var(--shadow-lg);
            transform-style: preserve-3d;
            transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .door.is-available {
            animation: pulse-glow 3s infinite ease-in-out;
        }

        .door.is-available:hover { border-color: var(--accent-400); }

        .door.is-open {
            transform: rotateY(-180deg);
        }

        .door-face {
            position: absolute;
            inset: 0;
            border-radius: 0.75rem;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
        }

        /* Vorderseite (geschlossen) */
        .door-front {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem;
            border: 1px solid rgb(237 250 138 / 0.69);
        }

        .door-front.available {
            background: #afc30f;
            color: var(--accent-300);
            .door-number {
                opacity:.5;
            }
        }

        .door-front.locked {
            background: #afc30f;
            .door-number {
                opacity:.5;
            }
        }
        .door-lock {
            color:#fff;
            opacity:.5;
        }
        .door-front-top {
            width: 100%;
            display: flex;
            justify-content: flex-end;
            align-items: center;
            font-size: 0.75rem;
            font-weight: 600;
            opacity: 0.75;
        }


        .door-number {
            font-family: var(--font-title);
            font-weight: 700;
            font-size: 1.875rem;
            line-height: 1;
            color: #fff;
            filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.06));
        }

        .door-month {
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: rgba(215, 230, 87, 0.7);
        }

        /* Rückseite (geöffnet) */
        .door-back {
            transform: rotateY(180deg);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 0.75rem;
            text-align: center;
            background-color:#afc30f;
            border: 1px solid #fff;
        }

        .door-back-icon {
            margin-bottom: 0.5rem;
            font-size: 1.5rem;
            color: var(--accent-400);
        }

        .door-back-title {
            font-family:'Playfair';
            font-size: 3.75rem;
            font-weight: 600;
            color: #fff;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .door-back-link {
            margin-top: 0.5rem;
            font-size: 10px;
            font-weight: 700;
            color: var(--accent-400);
            text-decoration: underline;
        }
        @keyframes number-pulse {
            0%, 100% {
                transform: scale(1);
                opacity: 0.5;
                text-shadow: 0 0 0 rgba(198, 217, 46, 0);
            }
            50% {
                transform: scale(1.1);
                opacity: 0.95;
                text-shadow: 0 0 12px rgba(198, 217, 46, 0.6);
            }
        }
        
        .door-front.available .door-number {
            animation: number-pulse 2.5s ease-in-out infinite;
        }

        /* ---------- Footer ---------- */
        .footer {
            padding: 1.5rem 0;
            text-align: center;
            color: var(--slate-400);
        }

        .footer-inner {
            max-width: 56rem;
            margin: 0 auto;
            padding: 0 1rem;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            align-items: center;
            gap: 1rem;
            a {
                display:inline-block;
            }
            p {
                display:flex;
                align-items:center;
                gap:15px;
                color:#656565;
            }
        }

        .brand {
            color: var(--accent-400);
            font-weight: 600;
        }

        .heart {
            font-size:1.5rem;
            color: #afc30f;
        }

        .reset-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            color: #fca5a5;
            background: rgba(69, 10, 10, 0.4);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 0.5rem;
            transition: all 0.3s ease;
        }

        .reset-btn:hover { background: rgba(127, 29, 29, 0.6); }

        /* ---------- Modal ---------- */
        .modal {
            position: fixed;
            inset: 0;
            z-index: 50;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            background: rgba(0, 0, 0, 0.8);
            -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }

        .modal.is-visible {
            opacity: 1;
            pointer-events: auto;
        }

        .modal-card {
            position: relative;
            width: 80dvw;
            max-width:72rem;
            max-height: 90vh;
            overflow-y: auto;
            padding: 1.5rem;
            background: var(--accent-400);
            border: 1px solid #fff;
            border-radius: 1rem;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            transform: scale(0.95);
            transition: transform 0.3s ease;
        }

        .modal.is-visible .modal-card { transform: scale(1); }

        /* Scrollbar */
        .modal-card::-webkit-scrollbar { width: 6px; }
        .modal-card::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
        }
        .modal-card::-webkit-scrollbar-thumb {
            background: rgba(175, 195, 15, 0.3);
            border-radius: 10px;
        }
        .modal-card::-webkit-scrollbar-thumb:hover { background: rgba(175, 195, 15, 0.6); }

        .modal-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            width: 3rem;
            height: 3rem;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            color: #fff;
            background: transparent;
            border: 0;
            border-radius: 50%;
            transition: color 0.15s ease;
            span {
                font-size: 2rem;
            }
        }

        .modal-close:hover { color: rgb(255 255 255 / .75); }

        .modal-header {
            margin-bottom: 1.5rem;
            text-align: center;
        }

        .modal-category {
            display: inline-block;
            margin-bottom: 0.5rem;
            padding: 0.25rem 0.75rem;
            font-size: 0.75rem;
            font-weight: 400;
            vertical-align:middle;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #fff;
            background: #6c7711;
            border: 1px solid rgba(175, 195, 15, 0.3);
            border-radius: 9999px;
        }

        .modal-title {
            font-family: var(--font-title);
            font-weight: 700;
            font-size: 1.5rem;
            line-height: 1.3;
            color: var(--accent-300);
        }

        .divider {
            width: 4rem;
            height: 2px;
            margin: 0.75rem auto 0;
            background: linear-gradient(to right, transparent, var(--accent-500), transparent);
        }

        .modal-body { color: var(--slate-200); }
        .modal-body > * + * { margin-top: 1rem; }

        .modal-footer {
            margin-top: 2rem;
            text-align: center;
        }

        .btn-primary {
            padding: 0.625rem 1.5rem;
            font-weight: 700;
            color: var(--night-950);
            background: linear-gradient(to right, var(--accent-600), var(--accent-500));
            border: 0;
            border-radius: 9999px;
            box-shadow: var(--shadow-lg);
            transition: all 0.3s ease;
        }

        .btn-primary:hover {
            background: linear-gradient(to right, var(--accent-500), var(--accent-400));
            box-shadow: 0 10px 15px -3px rgba(175, 195, 15, 0.2), 0 4px 6px -4px rgba(175, 195, 15, 0.2);
            transform: translateY(-2px);
        }

        /* ---------- Inhalte der Türchen ---------- */
        .c-center { text-align: center; }
        .c-text { color: #464e07; }
        .c-small { font-size: 0.875rem; }
        .c-xsmall { font-size: 0.75rem; line-height: 1.625; }

        .c-quote {
            font-family: var(--font-serif);
            font-size: 1.125rem;
            font-style: italic;
            text-align: center;
            color: #464e07;
        }

        .modal-body > .c-author {
            margin-top: 0.25rem;
            text-align: right;
            font-size: 0.75rem;
            color: #464e07;
        }

        .c-heading {
            font-weight: 600;
            color: #fff;
        }

        .c-subheading {
            font-size: 0.875rem;
            font-weight: 600;
            color: var(--slate-300);
        }

        .modal-body > .c-tight { margin-top: 0.5rem; }

        .c-list {
            margin: 0;
            padding: 0;
            list-style: disc inside;
            font-size: 0.875rem;
            color: var(--slate-300);
        }

        .c-list li + li { margin-top: 0.25rem; }

        .c-joke-q {
            font-style: italic;
            text-align: center;
            color: var(--slate-200);
        }

        .c-joke-a {
            font-style: italic;
            text-align: center;
            color: var(--accent-300);
        }

        .modal-body > .c-joke-a { margin-top: 0.5rem; }

        .c-highlight {
            font-style: italic;
            text-align: center;
            color: var(--accent-200);
        }

        .c-question {
            font-weight: 500;
            text-align: center;
        }

        .c-question.large { font-size: 1.125rem; }

        .c-answer-btn {
            padding: 0.375rem 0.75rem;
            font-size: 0.75rem;
            color: var(--accent-300);
            background: var(--slate-800);
            border: 1px solid rgba(175, 195, 15, 0.3);
            border-radius: 0.5rem;
            transition: background-color 0.15s ease;
        }

        .c-answer-btn:hover { background: var(--slate-700); }

        .c-answer {
            margin-top: 1rem;
            font-size: 1rem;
            font-weight: 600;
            font-style: italic;
            color: var(--accent-400);
        }

        .c-big-icon {
            display: inline-block;
            font-size: 2.25rem;
            line-height: 1;
            margin-bottom: 0.75rem;
            color:#464e07;
        }

        .c-big-icon.xl { font-size: 3rem; margin-bottom: 0; }

        .c-lead {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--accent-200);
        }

        .c-festive-title {
            font-family: var(--font-title);
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--accent-300);
        }

        .c-stack > * + * { margin-top: 1rem; }
        .c-mt-2 { margin-top: 0.5rem; }
        .c-relaxed { line-height: 1.625; }

        /* ---------- Animationen ---------- */
        @keyframes pulse-glow {
            0%, 100% { box-shadow: 0 0 15px rgba(175, 195, 15, 0.35), inset 0 0 10px rgba(175, 195, 15, 0.2); }
            50%      { box-shadow: 0 0 25px rgba(175, 195, 15, 0.65), inset 0 0 15px rgba(175, 195, 15, 0.4); }
        }

        @keyframes bounce {
            0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
            50%      { transform: none; animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
        }

        @keyframes pulse {
            50% { opacity: 0.5; }
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .anim-bounce { animation: bounce 1s infinite; }
        .anim-pulse  { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
        .anim-spin   { animation: spin 1s linear infinite; }

        @media (prefers-reduced-motion: reduce) {
            .anim-bounce, .anim-pulse, .anim-spin, .door.is-available { animation: none; }
        }

        /* ---------- Breakpoints ---------- */
        @media (min-width: 640px) {
            .calendar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
            .footer-inner { flex-direction: row; }
        }

        @media (min-width: 768px) {
            .logo { max-width: 340px; }
            .title { font-size: 3rem; }
            .intro { font-size: 1rem; }
            .controls { font-size: 0.875rem; }
            .calendar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
            .card { height: 11rem; }
            .door-number { font-size: 3.75rem; }
            .modal-card { padding: 2rem; }
            .modal-title { font-size: 1.875rem; }
        }

        @media (min-width: 1024px) {
            .title { font-size: 3.75rem; }
            .calendar-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
        }