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

:root {
    --color-bg: #f7f3ee;
    --color-text: #3a3330;
    --color-text-soft: #6b5f56;
    --color-primary: #b5432a;
    --color-primary-hover: #963722;
    --color-primary-light: #e8c9c2;
    --color-terracotta: #b8886a;
    --color-terracotta-bg: #c9a07c;
    --color-terracotta-dark: #3d2e24;
    --color-border: #e2dbd2;
    --color-muted: #9b918a;
    --color-success: #3d7a52;
    --color-error: #b5432a;
    --color-star-juergehus: #D9A0A8;
    --color-star-juergehus-hover: #c98a94;
    --color-star-tischrunde: #FAD5B5;
    --color-star-tischrunde-hover: #f0c49a;
    --color-star-dusse: #A8D5E8;
    --color-star-dusse-hover: #8fc4dc;
    --radius: 10px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 max(1.25rem, env(safe-area-inset-right)) max(2.5rem, env(safe-area-inset-bottom));
    padding-left: max(1.25rem, env(safe-area-inset-left));
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

a { color: var(--color-primary); transition: color 0.2s; }
a:hover { color: var(--color-primary-hover); }


/* =============================================
   HEADER (nur Unterseiten + Admin)
   ============================================= */

.site-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 0 1.75rem;
    margin-bottom: 1.75rem;
    position: relative;
}

.site-header h1 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.back-link {
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--color-text-soft);
    line-height: 1;
}

.back-link:hover { color: var(--color-primary); }

.logout-link {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    color: var(--color-muted);
    text-decoration: none;
}

.logout-link:hover { color: var(--color-primary); }


/* =============================================
   SEITENTITEL (Homepage)
   ============================================= */

.page-header {
    position: relative;
    margin-bottom: 1.75rem;
    padding-top: 0.5rem;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-header--compact {
    margin-bottom: 0;
    padding-top: 0.5rem;
    min-height: 2.75rem;
}

.home-icon-link {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-terracotta-dark);
    line-height: 1;
    transition: color 0.2s, opacity 0.2s;
}

.page-header--compact .home-icon-link {
    top: 50%;
}

.home-icon-link:hover {
    color: var(--color-primary);
    opacity: 1;
}

.page-header .page-title {
    margin-bottom: 0;
    padding-top: 0;
}

.stoerer {
    position: absolute;
    left: 73.5%;
    top: 0.95em;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 9rem;
    height: 9rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.stoerer-burst {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: #ffd400;
    filter: drop-shadow(0 3px 8px rgba(60, 40, 10, 0.18));
    transition: fill 0.2s;
}

.stoerer-text {
    position: relative;
    z-index: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    letter-spacing: 0.01em;
    color: var(--color-terracotta-dark);
    padding: 0 0.35rem;
}

.stoerer:hover,
.home-stoerer:hover {
    transform: none;
}

@media (hover: hover) and (pointer: fine) {
    .stoerer:hover,
    .home-stoerer:hover {
        transform: scale(1.04) rotate(-2deg);
    }
}

.stoerer:hover .stoerer-text,
.home-stoerer:hover .stoerer-text {
    color: var(--color-terracotta-dark);
}

.page-title {
    position: relative;
    display: block;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: var(--color-terracotta-dark);
    margin-bottom: 0;
    padding-top: 0;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-shadow: 0 2px 6px rgba(61, 46, 36, 0.15);
    overflow: visible;
    box-sizing: border-box;
}

.page-header .page-title {
    margin-bottom: 0;
    padding-top: 0;
}


/* =============================================
   HERO (Querformat-Bild, volle Breite)
   ============================================= */

.hero {
    margin-bottom: 2rem;
}

.hero-img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
}

.hero:not(.home-hero) .hero-img {
    aspect-ratio: 1536 / 676;
    object-fit: cover;
    object-position: center;
}


/* =============================================
   CONTENT-SECTION (Intro + Info zweispaltig)
   ============================================= */

.content-section {
    margin-bottom: 0;
}

.intro-text {
    margin-bottom: 2rem;
}

.intro-text p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--color-text);
    margin-bottom: 0.6rem;
}

.intro-text p:last-child {
    margin-bottom: 0;
}


/* =============================================
   INFOBLOCK
   ============================================= */

.info-block {
    padding: 1.25rem;
    margin-bottom: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.info-block dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
}

.info-icon {
    width: 18px;
    height: 18px;
    vertical-align: -3px;
    color: var(--color-terracotta);
    flex-shrink: 0;
}

.info-block dt {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-terracotta);
    padding-top: 0.12rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.info-block dd {
    margin: 0;
    color: var(--color-text);
    line-height: 1.5;
}


/* =============================================
   TERMIN-BLOCK
   ============================================= */

.termin-block {
    background: var(--color-star-juergehus);
    margin: 1.25rem -1.25rem 0;
    padding: 2rem 1.25rem;
    text-align: center;
}

.termin-inner {
    max-width: 500px;
    margin: 0 auto;
}

.termin-text {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-terracotta-dark);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

.termin-icon {
    width: 22px;
    height: 22px;
    vertical-align: -4px;
    color: var(--color-terracotta-dark);
}

.anmeldung-erfolg-banner {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c5e3a;
    background: #e8f3ec;
    border: 1px solid #b8d9c4;
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin: -0.5rem 0 1.75rem;
    line-height: 1.35;
}

.termin-status { font-weight: 600; font-size: 1.05rem; }
.termin-status.success { color: #2c5e3a; }
.termin-plaetze-hinweis {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--color-primary);
    margin-bottom: 1.1rem;
    letter-spacing: 0.01em;
}
.termin-status.ausgebucht {
    color: var(--color-terracotta-dark);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.55;
    max-width: 36rem;
    margin: 0 auto;
}

.btn-cta {
    display: inline-block;
    padding: 0.9rem 3rem;
    border: none;
    border-radius: var(--radius);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.2s, transform 0.15s;
    background: var(--color-terracotta-dark);
    color: #f7f3ee;
    box-shadow: 0 3px 12px rgba(61, 46, 36, 0.25);
}

.btn-cta:hover {
    background: #2e2019;
    box-shadow: 0 4px 16px rgba(61, 46, 36, 0.35);
}

.btn-cta:active { transform: scale(0.97); }


/* =============================================
   BUTTONS (allgemein)
   ============================================= */

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(181, 67, 42, 0.18);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

a.btn-primary:hover {
    color: #fff;
}


/* =============================================
   FORMULAR
   ============================================= */

.anmelde-form {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin: 2rem 0;
    box-shadow: 0 2px 12px rgba(60, 40, 20, 0.04);
}

.anmelde-form--wide {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
}

.anmelde-form h2 {
    margin-bottom: 1rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.anmelde-form label {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
    margin-top: 0.9rem;
    color: var(--color-text-soft);
}

.anmelde-form label:first-of-type { margin-top: 0; }

.anmelde-form input[type="text"],
.anmelde-form input[type="email"],
.anmelde-form input[type="tel"],
.anmelde-form input[type="number"],
.anmelde-form input[type="password"],
.anmelde-form select,
.anmelde-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: #fdfcfa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.anmelde-form input:focus,
.anmelde-form select:focus,
.anmelde-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400 !important;
    margin-top: 1.1rem !important;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.radio-group {
    border: none;
    margin: 1.25rem 0 0;
    padding: 0;
}

.radio-group legend {
    font-weight: 600;
    margin-bottom: 0.6rem;
    padding: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.anmelde-form .btn {
    margin-top: 1.25rem;
    width: 100%;
}

.error-msg {
    color: var(--color-error);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
}


/* =============================================
   ADMIN: ACCORDION
   ============================================= */

.accordion {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.accordion summary {
    padding: 0.9rem 1.25rem;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    user-select: none;
    font-size: 1rem;
}

.accordion summary::-webkit-details-marker { display: none; }

.accordion summary::before {
    content: '▸';
    transition: transform 0.2s;
    flex-shrink: 0;
    color: var(--color-muted);
}

.accordion[open] summary::before { transform: rotate(90deg); }

.badge {
    background: var(--color-primary);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.62rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-count {
    margin-left: auto;
    color: var(--color-muted);
    font-weight: 400;
    font-size: 0.88rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.accordion-body {
    padding: 0 1.25rem 1.25rem;
    overflow-x: auto;
}


/* =============================================
   TABELLE
   ============================================= */

table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.86rem;
}

th, td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--color-border);
}

th {
    background: #f5f0e8;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

tfoot td {
    border-bottom: none;
    border-top: 2px solid var(--color-border);
}

.muted { color: var(--color-muted); }

.delete-form { display: inline; }

.btn-delete {
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.1rem 0.4rem;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.btn-delete:hover {
    color: var(--color-error);
    background: var(--color-primary-light);
}

.print-bar {
    margin-bottom: 0.75rem;
    text-align: right;
}

.btn-print {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text-soft);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.btn-print:hover {
    border-color: var(--color-terracotta);
    color: var(--color-text);
}

.admin-event { margin-bottom: 2rem; }

.admin-hint {
    margin: -0.25rem 0 1rem;
    font-size: 0.88rem;
}

.admin-tischrunde {
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.admin-adresse {
    max-width: 14rem;
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.45;
}

.admin-bottom-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
}

.admin-total {
    font-size: 0.95rem;
    color: var(--color-text);
}

.btn-small {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

.btn-secondary {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-secondary:hover {
    border-color: var(--color-terracotta);
    color: var(--color-text);
}

#admin-add-panel {
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.admin-add-form .admin-add-fields {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-email-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.admin-email-field { flex: 1; }

.admin-email-check {
    padding-bottom: 0.35rem;
    white-space: nowrap;
}

.admin-email-check label {
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-email-check input[type="checkbox"] {
    width: auto;
    accent-color: var(--color-terracotta);
}

.admin-add-form label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
    margin-bottom: 0.3rem;
}

.admin-add-form input[type="text"],
.admin-add-form input[type="email"],
.admin-add-form input[type="number"] {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
    box-sizing: border-box;
}

.admin-add-form input:focus {
    outline: none;
    border-color: var(--color-terracotta);
}

.admin-add-actions {
    display: flex;
    gap: 0.75rem;
}

@media (max-width: 600px) {
    .admin-add-form .admin-add-fields {
        grid-template-columns: 1fr;
    }
    .admin-email-row {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-bottom-bar {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
        text-align: center;
    }
}


/* =============================================
   UNTERSEITEN
   ============================================= */

.content-page {
    padding: 0;
    margin: 0 auto 2rem;
    max-width: 600px;
}

.content-page--center {
    text-align: center;
}

.in-bearbeitung {
    font-size: 400% !important;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-terracotta-dark);
    margin: 3rem 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2em;
    flex-wrap: wrap;
}

.hourglass {
    display: inline-block;
    line-height: 1;
    transform-origin: center center;
    animation: hourglass-flip 20s ease-in-out infinite;
}

@keyframes hourglass-flip {
    0%, 48% {
        transform: rotate(0deg);
    }
    50%, 98% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

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

.content-page h2 {
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-size: 1.35rem;
}

.content-page p {
    margin-bottom: 0.75rem;
    color: var(--color-text-soft);
    line-height: 1.6;
}

.content-page a {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.tischrunde-heading {
    font-family: 'Palatino Linotype', 'Palatino', 'Book Antiqua', 'URW Palladio L', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-terracotta);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tischrunde-rules ul,
.tischrunde-ablauf ul {
    margin: 0;
    padding-left: 1.15rem;
    list-style: disc;
}

.tischrunde-rules li,
.tischrunde-ablauf li {
    margin-bottom: 0.55rem;
    line-height: 1.55;
    color: var(--color-text);
}

.tischrunde-rules li:last-child,
.tischrunde-ablauf li:last-child {
    margin-bottom: 0;
}

.tischrunde-ablauf {
    margin-top: 1.75rem;
}

.tischrunde-ablauf p {
    margin-bottom: 0.75rem;
    line-height: 1.55;
    color: var(--color-text);
}

.tischrunde-content .intro-text > p:first-of-type {
    margin-bottom: 0;
}

.tischrunde-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tischrunde-content .intro-text {
    margin-bottom: 2rem;
}

.tischrunde-content .tischrunde-rules {
    margin-bottom: 0;
}

.tischrunde-right {
    display: flex;
    flex-direction: column;
}

.tischrunde-actions .btn {
    text-align: center;
    width: 100%;
    max-width: 22rem;
    background: var(--color-star-tischrunde);
    color: var(--color-terracotta-dark);
    box-shadow: 0 2px 8px rgba(61, 46, 36, 0.14);
}

.tischrunde-actions .btn:hover,
.tischrunde-actions a.btn:hover {
    background: var(--color-star-tischrunde-hover);
    color: var(--color-terracotta-dark);
}


/* =============================================
   HOME (Auswahl)
   ============================================= */

.home-hero {
    margin-top: 1.25rem;
}

.home-intro {
    text-align: center;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--color-text);
    margin: 0 0 1.75rem;
}

.home-choices {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem 2.5rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

/* Tablet + Mobile: Sterne immer untereinander */
@media (max-width: 900px) {
    .home-choices {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 1.5rem;
        padding: 0;
    }

    .home-stoerer {
        width: 11.5rem;
        height: 11.5rem;
    }
}

.home-stoerer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12.5rem;
    height: 12.5rem;
    text-decoration: none;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.home-stoerer--juergehus .stoerer-burst {
    fill: var(--color-star-juergehus);
}

.home-stoerer--juergehus:hover .stoerer-burst {
    fill: var(--color-star-juergehus-hover);
}

.home-stoerer--tischrunde .stoerer-burst {
    fill: var(--color-star-tischrunde);
}

.home-stoerer--tischrunde:hover .stoerer-burst {
    fill: var(--color-star-tischrunde-hover);
}

.home-stoerer--dusse .stoerer-burst {
    fill: var(--color-star-dusse);
}

.home-stoerer--dusse:hover .stoerer-burst {
    fill: var(--color-star-dusse-hover);
}

.home-stoerer .stoerer-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.92rem;
    padding: 0 0.55rem;
}

.stoerer-title {
    display: block;
    font-size: 1.05em;
    font-weight: 800;
}

.stoerer-title em {
    font-style: italic;
    font-weight: inherit;
}

.stoerer-sub {
    display: block;
    font-weight: 700;
    line-height: 1.15;
}


.intern-page {
    max-width: none;
    width: 100%;
}

.container:has(.intern-page) {
    max-width: 1400px;
}

.intern-section {
    margin-bottom: 2.5rem;
}

.intern-section h2 {
    font-family: 'Palatino Linotype', 'Palatino', 'Book Antiqua', 'URW Palladio L', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-terracotta);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.85rem;
}

.site-header--intern {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: center;
}

.site-header--intern .back-link {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.site-header--intern h1 {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    margin: 0;
}

.site-header--intern .intern-logout {
    grid-column: 5;
    grid-row: 1;
    justify-self: center;
    z-index: 2;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-muted);
    text-decoration: none;
    padding: 0.25rem 0.4rem;
}

.site-header--intern .intern-logout:hover {
    color: var(--color-primary);
}

.intern-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
    .intern-actions {
        gap: 0.4rem;
    }

    .intern-actions .intern-accordion-btn {
        font-size: 0.78rem;
        padding: 0.65rem 0.3rem;
        min-height: 2.55rem;
    }
}

.intern-panel {
    margin-bottom: 1.5rem;
}

.intern-panel[hidden] {
    display: none !important;
}

.intern-panel .intern-group-title:first-child {
    margin-top: 0;
}

.intern-accordion-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.85rem;
    box-sizing: border-box;
    border: none;
    list-style: none;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: var(--color-terracotta-dark);
    color: #f7f3ee;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(61, 46, 36, 0.18);
    transition: background 0.2s;
}

.intern-accordion-btn:hover,
.intern-accordion-btn.is-active {
    background: #2e2019;
}

.intern-group-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-terracotta-dark);
    margin: 1.75rem 0 0.75rem;
}

.intern-address-table {
    width: 100%;
    margin-bottom: 0.5rem;
    table-layout: auto;
    font-size: 0.9rem;
}

.intern-address-table th,
.intern-address-table td {
    padding: 0.5rem 0.65rem;
    vertical-align: top;
}

.intern-address-table .col-vorname,
.intern-address-table .col-adresse,
.intern-address-table .col-telefon,
.intern-address-table .col-email {
    white-space: nowrap;
}

.intern-address-table .col-adresse {
    padding-right: 1rem;
}

.intern-address-table .col-telefon {
    padding-right: 1rem;
}

.intern-address-table .col-email {
    padding-right: 0.5rem;
}

.intern-section table,
.intern-panel table {
    width: 100%;
}

/* --- Zeitplan --- */

.zeitplan {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.15rem 1rem 1rem;
    box-shadow: 0 2px 14px rgba(61, 46, 36, 0.06);
    overflow-x: auto;
}

.zeitplan-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    table-layout: fixed;
}

.zeitplan-table th {
    background: #f3eee6;
    color: var(--color-terracotta-dark);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.65rem 0.55rem;
    border-bottom: 2px solid var(--color-border);
    vertical-align: middle;
}

.zeitplan-table td {
    padding: 0.5rem 0.45rem;
    border-bottom: 1px solid #ece6de;
    vertical-align: middle;
    line-height: 1.4;
}

.zeitplan-table tbody tr:last-child td {
    border-bottom: none;
}

.zeitplan-table .zp-zeit {
    width: 3.75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--color-terracotta-dark);
    white-space: nowrap;
}

.zeitplan-table .zp-eingang,
.zeitplan-table .zp-essraum,
.zeitplan-table .zp-kueche {
    width: 4.4rem;
    text-align: center;
}

.zeitplan-table th.zp-thema,
.zeitplan-table td.zp-thema {
    width: 68%;
    text-align: left;
    color: var(--color-text);
    font-size: 0.98rem;
    line-height: 1.45;
    padding-left: 0.85rem;
    white-space: normal;
    overflow-wrap: break-word;
    hyphens: auto;
}

.zeitplan-table .zp-cell {
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.zeitplan-table .zp-cell--eingang {
    background: #cfe8f4;
    color: #1f4f63;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(31, 79, 99, 0.08);
}

.zeitplan-table .zp-cell--essraum {
    background: var(--color-star-tischrunde);
    color: var(--color-terracotta-dark);
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(61, 46, 36, 0.06);
}

.zeitplan-table .zp-cell--kueche {
    background: var(--color-star-juergehus);
    color: #7a2e38;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(122, 46, 56, 0.1);
}

.zeitplan-table .zp-cell--alle {
    background: #e8e0d4;
    color: var(--color-terracotta-dark);
    border-radius: 8px;
    font-weight: 800;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(61, 46, 36, 0.08);
}

.zeitplan-footer {
    margin: 1.15rem 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.45;
}

@media (max-width: 700px) {
    .zeitplan {
        padding: 0.75rem 0.5rem;
    }

    .zeitplan-table {
        font-size: 0.88rem;
        min-width: 44rem;
    }

    .zeitplan-table .zp-zeit {
        width: 3.5rem;
    }

    .zeitplan-table .zp-eingang,
    .zeitplan-table .zp-essraum,
    .zeitplan-table .zp-kueche {
        width: 4.1rem;
    }

    .zeitplan-table th.zp-thema,
    .zeitplan-table td.zp-thema {
        width: 70%;
        font-size: 0.9rem;
    }
}

/* --- Overlay (Einrichtung) --- */

body.overlay-open {
    overflow: hidden;
}

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

.intern-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.intern-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 22, 16, 0.72);
    cursor: pointer;
}

.intern-overlay-dialog {
    position: relative;
    z-index: 1;
    max-width: min(960px, 100%);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    padding: 0.75rem;
}

.intern-overlay-close {
    position: sticky;
    top: 0.35rem;
    float: right;
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 0 0.35rem 0.5rem;
    border: none;
    border-radius: 999px;
    background: var(--color-terracotta-dark);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.intern-overlay-close:hover {
    background: #2e2019;
}

.intern-overlay-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* --- Materialliste --- */

.materialliste {
    margin-top: 0.25rem;
}

.material-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.15rem;
    font-size: 0.9rem;
    color: var(--color-text-soft);
}

.material-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
    max-width: none;
    width: 100%;
}

.material-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 1.35rem 1.5rem 1.45rem;
    box-shadow: 0 2px 12px rgba(61, 46, 36, 0.05);
    border-top: 4px solid #b0a89e;
}

.material-card--grau { border-top-color: #8a8580; }
.material-card--blau { border-top-color: #5a8ab8; }
.material-card--rot { border-top-color: #c45c5c; }
.material-card--weiss { border-top-color: #d8d2c8; }
.material-card--werbung { border-top-color: var(--color-terracotta); }

.material-card-header {
    margin-bottom: 0.85rem;
}

.material-card-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--color-terracotta-dark);
}

.material-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.material-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    background: #f3eee6;
    color: var(--color-text);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.25;
}

.material-chip--hp {
    background: #d7eaf5;
    color: #1a5a75;
}

.material-chip--mark {
    background: #f8e0e0;
    color: #a32020;
}

.material-chip-hp-part {
    color: #1a5a75;
    font-weight: 800;
}

.material-block {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #e2dbd2;
}

.material-block-title {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-muted);
}

.material-notes {
    margin: 0.7rem 0 0;
    padding-left: 1.1rem;
    color: var(--color-text-soft);
    font-size: 0.86rem;
    line-height: 1.45;
}

.material-notes li {
    margin-bottom: 0.35rem;
}

.material-notes li:last-child {
    margin-bottom: 0;
}


/* =============================================
   FOOTER
   ============================================= */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding-top: 1.25rem;
    margin-top: auto;
    text-align: center;
}

.site-footer nav {
    display: flex;
    justify-content: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.site-footer a {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-muted);
    text-decoration: none;
    font-size: 0.82rem;
}

.site-footer a:hover { color: var(--color-primary); }


/* =============================================
   MOBILE (bis 600px)
   ============================================= */

@media (max-width: 600px) {
    .site-header h1 { font-size: 1.2rem; }

    .page-header {
        padding-top: 0.35rem;
        margin-bottom: 1.25rem;
    }

    .stoerer {
        left: 65.5%;
        top: 2em;
        width: 7.5rem;
        height: 7.5rem;
    }

    .stoerer-text {
        font-size: 0.74rem;
    }

    .home-stoerer {
        width: 10.5rem;
        height: 10.5rem;
    }

    .home-stoerer .stoerer-text {
        font-size: 0.85rem;
    }

    .home-choices {
        gap: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .home-hero {
        margin-top: 0.75rem;
    }

    .info-block dl {
        grid-template-columns: 1fr;
        gap: 0.1rem 0;
    }

    .info-block dt { margin-top: 0.5rem; }
    .info-block dt:first-child { margin-top: 0; }

    .termin-text { font-size: 1.1rem; }

    .termin-block {
        padding: 1.5rem 1.25rem;
    }

    .btn-cta {
        width: 100%;
        max-width: 22rem;
        padding: 0.95rem 1.5rem;
    }

    .anmelde-form {
        padding: 1.35rem 1.15rem;
    }

    .anmelde-form input[type="text"],
    .anmelde-form input[type="email"],
    .anmelde-form input[type="tel"],
    .anmelde-form input[type="number"],
    .anmelde-form input[type="password"],
    .anmelde-form select,
    .anmelde-form textarea {
        font-size: 16px; /* verhindert iOS-Zoom beim Tippen */
    }

    .in-bearbeitung {
        font-size: 2.35rem !important;
        margin: 2rem 0;
        line-height: 1.25;
    }

    .tischrunde-actions {
        align-items: stretch;
        margin-top: 1.75rem;
    }

    .tischrunde-actions .btn {
        max-width: none;
        min-height: 2.75rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-footer nav {
        gap: 1.25rem 1.5rem;
    }

    .site-footer a {
        padding: 0.35rem 0.15rem;
    }

    table { font-size: 0.76rem; }
    th, td { padding: 0.3rem 0.35rem; }
}


/* =============================================
   DESKTOP (ab 901px)
   ============================================= */

@media (min-width: 901px) {

    body {
        font-size: 1.1rem;
        line-height: 1.55;
    }

    .container {
        max-width: 1100px;
        padding: 0 3.5rem 4rem;
    }

    .container:has(.intern-page) {
        max-width: 1680px;
        padding: 0 1.5rem 4rem;
    }

    /* --- Header (Unterseiten) --- */

    .site-header {
        padding: 2.5rem 0 2rem;
        margin-bottom: 2.5rem;
    }

    .site-header h1 {
        font-size: 2rem;
        letter-spacing: -0.02em;
    }

    .back-link { font-size: 1.75rem; }

    .page-header {
        padding-top: 0.5rem;
        margin-bottom: 2rem;
    }

    .stoerer {
        left: 75.5%;
        top: 1.05em;
        width: 10.8rem;
        height: 10.8rem;
    }

    .stoerer-text {
        font-size: 0.98rem;
    }

    .home-icon-link {
        font-size: 1.85rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .page-title {
        font-size: 2.25rem;
        margin-bottom: 0;
        padding-top: 0;
        letter-spacing: 0.03em;
        text-shadow: 0 3px 10px rgba(61, 46, 36, 0.18);
        white-space: nowrap;
    }

    .anmeldung-erfolg-banner {
        font-size: 1.85rem;
        padding: 1.25rem 1.5rem;
        margin: -1rem 0 2.25rem;
    }

    /* --- Hero: volle Breite, Querformat --- */

    .hero {
        margin-bottom: 3rem;
    }

    .hero-img {
        border-radius: 14px;
    }

    /* --- Content: zweispaltig --- */

    .content-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: start;
        margin-bottom: 0;
    }

    .intro-text {
        margin-bottom: 0;
        padding-top: 0.25rem;
    }

    .intro-text p {
        font-size: 1.12rem;
        line-height: 1.7;
        margin-bottom: 0.85rem;
    }

    .info-icon {
        width: 20px;
        height: 20px;
    }

    .info-block dl {
        gap: 0.55rem 1.5rem;
    }

    .info-block dt {
        font-size: 0.76rem;
        padding-top: 0.2rem;
    }

    .info-block dd {
        font-size: 1.08rem;
        line-height: 1.45;
    }

    /* --- Termin-Block --- */

    .termin-block {
        margin: 2.5rem -3.5rem 0;
        padding: 2.75rem 3.5rem;
    }

    .termin-inner { max-width: 600px; }

    .termin-text {
        font-size: 1.45rem;
        margin-bottom: 1.5rem;
    }

    .termin-icon {
        width: 26px;
        height: 26px;
        vertical-align: -5px;
    }

    .btn-cta {
        padding: 1.05rem 3.5rem;
        font-size: 1.2rem;
        border-radius: 12px;
    }

    /* --- Formular --- */

    .anmelde-form {
        max-width: 480px;
        margin: 2.5rem auto;
        padding: 2.25rem;
    }

    .anmelde-form--wide {
        max-width: 44rem;
    }

    .anmelde-form h2 { font-size: 1.3rem; }

    /* --- Unterseiten --- */

    .content-page {
        max-width: 660px;
    }

    .content-page h2 {
        font-size: 1.6rem;
        margin-bottom: 1.25rem;
    }

    .content-page p { font-size: 1.08rem; }

    .home-intro {
        font-size: 1.12rem;
        margin-bottom: 2.25rem;
    }

    .home-choices {
        gap: 2.5rem;
        margin: 0 auto 3.5rem;
        max-width: 52rem;
    }

    .home-stoerer {
        width: 15rem;
        height: 15rem;
    }

    .home-stoerer .stoerer-text {
        font-size: 1.05rem;
    }

    .tischrunde-heading {
        font-size: 1.5rem;
    }

    .tischrunde-rules li,
    .tischrunde-ablauf li {
        font-size: 1.08rem;
    }

    .tischrunde-actions {
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: stretch;
        margin-top: 1.25rem;
    }

    .tischrunde-content {
        align-items: stretch;
    }

    .tischrunde-content .intro-text {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 0;
    }

    .tischrunde-content .tischrunde-right {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-self: start;
    }

    .tischrunde-content .tischrunde-actions {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: stretch;
        width: 100%;
        margin-top: 1.5rem;
        padding-top: 0;
    }

    .tischrunde-actions .btn {
        width: 100%;
        flex: 0 0 auto;
        min-width: 0;
        max-width: none;
        white-space: normal;
    }

    /* --- Footer --- */

    .site-footer {
        margin-top: 4rem;
        padding-top: 1.75rem;
    }

    .site-footer nav { gap: 2.5rem; }
    .site-footer a { font-size: 0.88rem; }
}
