:root {
    --ps-red: #ed1b24;
    --bg: #f7f7f8;
    --text: #101828;
    --muted: #667085;
    --soft: #f2f4f7;
    --line: rgba(16, 24, 40, 0.08);
    --card: rgba(255, 255, 255, 0.82);
    --shadow: 0 18px 55px rgba(16, 24, 40, 0.08);
    --shadow-hover: 0 26px 75px rgba(16, 24, 40, 0.13);
    --radius-xl: 30px;
    --radius-lg: 22px;
}

* {
    box-sizing: border-box;
}

body.public-body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(237, 27, 36, 0.075), transparent 420px),
        linear-gradient(180deg, #fff 0%, var(--bg) 100%);
    min-height: 100vh;
}

.public-page {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.public-header {
    display: grid;
    grid-template-columns: 190px 1fr;
    align-items: center;
    gap: 34px;
    padding: 54px 0 34px;
}

.public-logo-badge,
.footer-logo-badge {
    display: inline-flex;
    place-items: center;
    justify-content: center;
}

.public-logo-badge img {
    width: 130px;
    display: block;
}

.footer-logo-badge img {
    width: 135px;
    display: block;
}

.eyebrow,
.footer-col h3,
.card-kicker,
.event-label {
    color: var(--ps-red);
    text-transform: uppercase;
    letter-spacing: 0.055em;
    font-size: 12px;
    font-weight: 850;
}

.public-header h1 {
    margin: 6px 0 8px;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 0.95;
    letter-spacing: -0.065em;
}

.public-header p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.public-main {
    padding: 8px 0 56px;
}

.glass-card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.hero-card {
    padding: 34px 38px;
    margin-bottom: 24px;
}

.hero-card h2,
.page-intro h2 {
    max-width: 820px;
    margin: 8px 0 12px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.hero-card p,
.page-intro p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.choice-card,
.event-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 245px;
    padding: 32px;
    text-decoration: none;
    color: var(--text);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.choice-card:hover,
.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(237, 27, 36, 0.22);
}

.choice-card::after,
.event-card::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -70px;
    width: 180px;
    height: 180px;
    background: rgba(237, 27, 36, 0.075);
    border-radius: 999px;
}

.choice-card h2,
.event-card h2 {
    margin: 12px 0 10px;
    font-size: clamp(28px, 3vw, 38px);
    letter-spacing: -0.05em;
    line-height: 1;
}

.choice-card p,
.event-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.card-action {
    margin-top: 30px;
    color: var(--ps-red);
    font-weight: 850;
    position: relative;
    z-index: 1;
}

.back-link {
    display: inline-flex;
    margin-bottom: 24px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 750;
}

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

.compact-intro {
    margin-bottom: 24px;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.event-card {
    min-height: 230px;
}

.event-meta {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.event-meta span {
    color: var(--muted);
}

.empty-state {
    padding: 38px;
}

.empty-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #111;
    color: #fff;
    margin-bottom: 18px;
}

.empty-state h2 {
    margin: 0 0 8px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.public-footer {
    display: grid;
    grid-template-columns: 1.2fr 1.7fr 1fr 1fr;
    gap: 48px;
    padding: 42px 0 58px;
    border-top: 1px solid var(--line);
}

.footer-col h3 {
    margin: 0 0 14px;
}

.footer-col p {
    margin: 0 0 24px;
    color: #344054;
    line-height: 1.7;
}

.footer-col a {
    color: #344054;
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--ps-red);
}

@media (max-width: 860px) {
    .public-page {
        width: min(100% - 28px, 1120px);
    }


    .public-header {
        grid-template-columns: 1fr;
        gap: 22px;
        padding-top: 32px;
    }

    .public-header h1 {
        font-size: 42px;
    }

    .card-grid,
    .event-grid,
    .public-footer {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .choice-card,
    .event-card,
    .empty-state {
        padding: 26px;
    }

}

body.modal-open {
    overflow: hidden;
}

.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.legal-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.legal-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.legal-modal-panel {
    position: relative;
    z-index: 2;
    width: min(1100px, 100%);
    height: min(82vh, 860px);
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.35);
}

.legal-modal-panel iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

.legal-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.login-shell {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
    align-items: center;
    padding: 38px;
}

.login-copy h2 {
    margin: 8px 0 14px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.login-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}

.public-form {
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(16,24,40,0.06);
    border-radius: 24px;
    padding: 24px;
    display: grid;
    gap: 18px;
}

.public-form label {
    display: grid;
    gap: 8px;
}

.public-form label span {
    color: var(--text);
    font-weight: 750;
    font-size: 14px;
}

.public-form input {
    width: 100%;
    border: 1px solid rgba(16,24,40,0.12);
    border-radius: 16px;
    padding: 15px 16px;
    font-size: 16px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.public-form input:focus {
    border-color: rgba(237,27,36,0.45);
    box-shadow: 0 0 0 4px rgba(237,27,36,0.08);
}

.primary-button {
    border: 0;
    border-radius: 999px;
    padding: 15px 20px;
    background: var(--ps-red);
    color: #fff;
    font-weight: 850;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(237,27,36,0.22);
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(237,27,36,0.28);
}

.form-alert {
    padding: 13px 15px;
    border-radius: 16px;
    background: rgba(237,27,36,0.08);
    color: var(--ps-red);
    font-weight: 750;
}

@media (max-width: 860px) {
    .login-shell {
        grid-template-columns: 1fr;
        padding: 26px;
    }
}

.download-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 34px 38px;
    margin-bottom: 22px;
}

.download-overview h2 {
    margin: 8px 0 10px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.download-overview p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.button-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.secondary-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: 999px;
    padding: 10px 14px;
    background: #111;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card {
    padding: 22px;
}

.stat-card strong {
    display: block;
    font-size: 34px;
    letter-spacing: -0.05em;
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.media-card {
    overflow: hidden;
}

.media-preview {
    aspect-ratio: 4 / 3;
    background: #f2f4f7;
    overflow: hidden;
}

.media-preview img,
.media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 0;
}

.media-info {
    padding: 16px;
    display: grid;
    gap: 14px;
}

.media-info strong {
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
}

.file-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
}

@media (max-width: 980px) {
    .media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .download-overview {
        flex-direction: column;
        align-items: flex-start;
        padding: 26px;
    }

    .stats-grid,
    .media-grid {
        grid-template-columns: 1fr;
    }

    .button-link {
        width: 100%;
    }
}

.group-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 28px;
    position: relative;
    z-index: 2;
}

.group-actions .primary-button,
.group-actions .secondary-button {
    padding: 11px 15px;
    font-size: 13px;
}

.event-card.is-selected {
    border-color: rgba(237, 27, 36, 0.34);
    box-shadow: 0 26px 75px rgba(237, 27, 36, 0.12);
}

.selected-group-header {
    margin: 34px 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
}

.selected-group-header h2 {
    margin: 8px 0 0;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1;
    letter-spacing: -0.055em;
}

@media (max-width: 680px) {
    .selected-group-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .selected-group-header .button-link {
        width: 100%;
    }

    .group-actions {
        display: grid;
    }
}

.error-shell {
    max-width: 760px;
    margin: 0 auto;
    padding: 42px;
}

.error-shell h2 {
    margin: 10px 0 12px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1;
    letter-spacing: -0.055em;
}

.error-shell p {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}


.admin-login-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.admin-login-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-login-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.admin-login-panel {
    position: relative;
    z-index: 2;
    width: min(460px, 100%);
    background: rgba(255, 255, 255, 0.94);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.32);
}

.admin-login-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.admin-login-copy {
    margin-bottom: 22px;
    padding-right: 42px;
}

.admin-login-copy h2 {
    margin: 8px 0 10px;
    font-size: 38px;
    line-height: 1;
    letter-spacing: -0.05em;
}

.admin-login-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}
/* Responsive-Ausbau 2026-07-07 */
html {
    -webkit-text-size-adjust: 100%;
}

img,
video {
    max-width: 100%;
    height: auto;
}

.public-header-text,
.hero-card,
.choice-card,
.event-card,
.download-overview,
.media-info {
    min-width: 0;
}

.public-header h1,
.hero-card h2,
.page-intro h2,
.download-overview h2,
.selected-group-header h2,
.error-shell h2 {
    overflow-wrap: anywhere;
}

.primary-button,
.secondary-button,
.button-link {
    min-height: 44px;
}

@media (max-width: 680px) {
    .public-page {
        width: min(100% - 20px, 1120px);
    }

    .public-header {
        gap: 16px;
        padding: 26px 0 22px;
    }

    .public-logo-badge img {
        width: 104px;
    }

    .footer-logo-badge img {
        width: 110px;
    }

    .public-header h1 {
        font-size: clamp(34px, 12vw, 42px);
        line-height: 0.98;
    }

    .public-header p,
    .hero-card p,
    .page-intro p,
    .login-copy p,
    .download-overview p,
    .error-shell p {
        font-size: 16px;
    }

    .public-main {
        padding-bottom: 34px;
    }

    .hero-card,
    .choice-card,
    .event-card,
    .empty-state,
    .download-overview,
    .error-shell {
        padding: 22px;
        border-radius: 22px;
    }

    .choice-card,
    .event-card {
        min-height: 190px;
    }

    .card-grid,
    .event-grid,
    .media-grid,
    .stats-grid {
        gap: 16px;
    }

    .stat-card {
        padding: 18px;
    }

    .media-info .secondary-button,
    .group-actions .primary-button,
    .group-actions .secondary-button,
    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .login-shell {
        padding: 22px;
    }

    .public-form {
        padding: 18px;
        border-radius: 20px;
    }

    .public-footer {
        gap: 26px;
        padding: 32px 0 42px;
    }

    .legal-modal.is-open,
    .admin-login-modal.is-open {
        padding: 10px;
        align-items: stretch;
    }

    .legal-modal-panel {
        height: calc(100dvh - 20px);
        border-radius: 18px;
    }

    .admin-login-panel {
        width: 100%;
        align-self: center;
        padding: 24px 18px 18px;
        border-radius: 22px;
    }

    .admin-login-copy {
        padding-right: 44px;
    }

    .admin-login-copy h2 {
        font-size: 34px;
    }
}

@media (max-width: 420px) {
    .public-page {
        width: min(100% - 16px, 1120px);
    }

    .hero-card,
    .choice-card,
    .event-card,
    .empty-state,
    .download-overview,
    .login-shell,
    .error-shell {
        padding: 18px;
    }

    .media-info strong {
        font-size: 13px;
    }
}


/* =========================================================
   Entwicklerhinweis Public Footerbar
   Vollbreite Bar ausserhalb des normalen PS-Footers
   ========================================================= */

.public-developer-credit {
    width: 100%;
    margin: 0;
    padding: 0 0 34px;
    background: transparent;
}

.public-developer-credit-inner {
    width: min(1120px, calc(100% - 40px));
    margin: -24px auto 0;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(16, 24, 40, 0.08);
    box-shadow: 0 14px 38px rgba(16, 24, 40, 0.07);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.public-developer-credit-text {
    min-width: 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 13px;
    line-height: 1.45;
}

.public-developer-credit-label {
    color: var(--ps-red);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.public-developer-credit-name {
    color: var(--text);
    font-weight: 850;
}

.public-developer-credit-address {
    color: #344054;
}

.public-developer-credit-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: #344054;
    font-size: 13px;
    font-weight: 850;
}

.public-developer-credit-contact a {
    color: #344054;
    text-decoration: none;
}

.public-developer-credit-contact a:hover {
    color: var(--ps-red);
    text-decoration: underline;
}

@media (max-width: 860px) {
    .public-developer-credit-inner {
        width: min(100% - 28px, 1120px);
        margin-top: -18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .public-developer-credit-contact {
        white-space: normal;
        flex-wrap: wrap;
    }
}

@media (max-width: 420px) {
    .public-developer-credit-inner {
        width: min(100% - 16px, 1120px);
        padding: 13px 14px;
    }
}
