:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --text: #16181d;
    --muted: #626775;
    --line: #dcdfe6;
    --accent: #2f6df6;
    --danger: #b32d2d;
    --radius: 12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14161a;
        --surface: #1d2026;
        --text: #eceef2;
        --muted: #9aa1af;
        --line: #313640;
        --accent: #6c9bff;
        --danger: #ff8a8a;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 1.5rem 1rem;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a {
    color: var(--accent);
}

h1 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
}

/* Öffentliche Seite */

body.bare {
    padding: 0;
    background: #000;
}

/* Bild füllt die ganze Fläche randlos; was nicht ins Format passt, wird abgeschnitten */
.fullscreen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page {
    max-width: 32rem;
    margin: 0 auto;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
}

.page .body {
    margin: 0;
    color: var(--muted);
}

.avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.subtitle {
    margin: -0.25rem 0 1.5rem;
    color: var(--muted);
}

.links {
    display: grid;
    gap: 0.75rem;
}

.link {
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
}

.link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.link.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.page .address {
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

/* Adminbereich */

.shell {
    max-width: 46rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--text);
}

.brand .logo-mark {
    width: 1.75rem;
    height: 1.75rem;
}

.logo-mark,
.accent {
    color: var(--accent);
}

.login-logo .logo-mark {
    display: block;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 0.75rem;
}

.card {
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.card-head h1 {
    margin: 0;
}

.login {
    max-width: 22rem;
    margin: 4rem auto 0;
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.list li {
    display: flex;
    align-items: center;
    gap: 0.5rem 0.75rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.list .title {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

/* Seite: Titel und Knöpfe oben, Start-Umschalter darunter */
.list .template {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.template .apply,
.template .dead-note {
    grid-column: 1 / -1;
    grid-row: 2;
}

.template .dead-note {
    margin: 0;
}

.slug {
    margin-left: 0.35rem;
    font-weight: 600;
    text-decoration: none;
}

.tag {
    margin-left: 0.35rem;
    white-space: nowrap;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
    font-size: 0.8rem;
}

.preview {
    display: block;
    max-width: 100%;
    max-height: 10rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
}

.tag.once {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.apply {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr) auto;
    gap: 0.5rem;
}

@media (max-width: 30rem) {
    .apply {
        grid-template-columns: 5.5rem minmax(0, 1fr);
    }

    .apply .button {
        grid-column: 1 / -1;
    }
}

.apply select {
    flex: 1;
    min-width: 0;
    margin-top: 0;
}

.tag.active {
    background: var(--accent);
    color: #fff;
}

.button[disabled] {
    opacity: 0.5;
    cursor: default;
}

.hint,
.empty {
    margin: 0 0 0.75rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.hint:empty {
    display: none;
}

.notice,
.error {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.error {
    border-color: var(--danger);
    color: var(--danger);
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

label.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

.prefix {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="email"],
input[type="url"],
select,
textarea {
    width: 100%;
    max-width: 100%;
    margin-top: 0.25rem;
    padding: 0.5rem 0.65rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}

label.checkbox input {
    width: auto;
    margin: 0;
}

textarea {
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9rem;
}

fieldset {
    margin: 0 0 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.items {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.row label,
.row input {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

form.row {
    margin-bottom: 0.75rem;
}

fieldset > .row {
    margin-bottom: 0.75rem;
}

.row.buttons {
    margin-top: 0.75rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.button.ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--text);
}

.button.ghost.danger {
    color: var(--danger);
}

.button.icon {
    padding: 0.45rem;
    border-color: transparent;
}

.button.icon:hover {
    border-color: var(--danger);
}

/* Kreuz auf Zeilenhöhe der Textknöpfe */
.button.icon svg {
    display: block;
    margin: 0.3rem;
}

@media (max-width: 30rem) {
    body {
        padding: 0.75rem 0.5rem;
    }

    .card {
        padding: 1rem 0.75rem;
    }

    fieldset {
        padding: 0.5rem 0.65rem;
    }

    .button {
        padding-inline: 0.7rem;
    }
}

/* Visitenkarten */

.glyph {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: currentColor;
}

.glyph .stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

body.card-body {
    --card: #ffffff;
    --card-text: #15171c;
    --card-muted: #6a7080;
    --card-line: #eceef3;
    --card-soft: #f3f4f8;
    --card-accent: #5b4bff;
    --card-gradient: linear-gradient(135deg, #5b4bff 0%, #b04bff 55%, #ff5c8a 100%);
    background: #e9ebf2;
    color: var(--card-text);
    min-height: 100dvh;
}

@media (prefers-color-scheme: dark) {
    body.card-body {
        --card: #17181d;
        --card-text: #f1f2f6;
        --card-muted: #9aa0ad;
        --card-line: #262830;
        --card-soft: #20222a;
        --card-accent: #9b8cff;
        background: #0d0e12;
    }
}

/* Unscharfes Hintergrundbild hinter der Karte, nur auf breiten Bildschirmen sichtbar */
.card-backdrop {
    position: fixed;
    inset: -40px;
    background: center / cover no-repeat;
    filter: blur(40px) saturate(1.3) brightness(0.75);
    display: none;
}

.card-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    border-radius: 999px;
    background: var(--card-gradient);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 30px -10px rgb(91 75 255 / 0.7);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px -10px rgb(91 75 255 / 0.85);
}

.vc {
    position: relative;
    min-height: 100dvh;
}

.vc-card {
    position: relative;
    min-height: 100dvh;
    background: var(--card);
    padding-bottom: env(safe-area-inset-bottom);
}

.vc-cover {
    height: clamp(170px, 34vh, 260px);
    background: var(--card-gradient);
    overflow: hidden;
}

.vc-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vc-head {
    margin-top: -64px;
    padding: 0 1.5rem;
    text-align: center;
}

.vc-photo {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 5px solid var(--card);
    object-fit: cover;
    background: var(--card-soft);
    box-shadow: 0 12px 30px -12px rgb(0 0 0 / 0.45);
}

.vc-initials {
    background: var(--card-gradient);
    color: #fff;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.vc-head h1 {
    margin: 0.9rem 0 0;
    font-size: clamp(1.7rem, 6vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.vc-nick {
    margin: 0.2rem 0 0;
    color: var(--card-muted);
    font-style: italic;
}

.vc-role {
    margin: 0.45rem 0 0;
    color: var(--card-accent);
    font-weight: 600;
}

.vc-quick {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem 1.5rem 0;
}

.vc-quick a {
    flex: 1;
    max-width: 9rem;
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    padding: 0.85rem 0.5rem;
    border-radius: 18px;
    background: var(--card-soft);
    color: var(--card-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}

.vc-quick a .glyph {
    color: var(--card-accent);
    width: 1.4rem;
    height: 1.4rem;
}

.vc-quick a:hover {
    background: var(--card-accent);
    color: #fff;
}

.vc-quick a:hover .glyph {
    color: #fff;
}

.vc-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.25rem 1.5rem 0;
}

.vc-socials a {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--card-soft);
    color: var(--card-text);
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.vc-socials a:hover {
    transform: translateY(-2px);
    color: #fff;
}

.vc-socials .social-instagram:hover { background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5); }
.vc-socials .social-linkedin:hover { background: #0a66c2; }
.vc-socials .social-xing:hover { background: #026466; }
.vc-socials .social-tiktok:hover,
.vc-socials .social-x:hover,
.vc-socials .social-threads:hover,
.vc-socials .social-github:hover { background: #111; }
.vc-socials .social-youtube:hover { background: #ff0000; }
.vc-socials .social-facebook:hover { background: #0866ff; }
.vc-socials .social-whatsapp:hover { background: #25d366; }

.vc-list {
    list-style: none;
    margin: 1.75rem 1rem 0;
    padding: 0;
    border-radius: 20px;
    background: var(--card-soft);
    overflow: hidden;
}

.vc-list li + li {
    border-top: 1px solid var(--card-line);
}

.vc-list a,
.vc-list div {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    color: inherit;
    text-decoration: none;
}

.vc-list a:hover {
    background: color-mix(in srgb, var(--card-accent) 8%, transparent);
}

.vc-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 12px;
    background: var(--card);
    color: var(--card-accent);
}

.vc-text {
    display: grid;
    min-width: 0;
}

.vc-text small {
    color: var(--card-muted);
    font-size: 0.78rem;
}

.vc-text span {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.vc-note {
    margin: 1.25rem 1.5rem 0;
    color: var(--card-muted);
    text-align: center;
    line-height: 1.55;
}

.vc-save {
    position: sticky;
    bottom: 0;
    margin-top: 1.5rem;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, transparent, var(--card) 35%);
}

@media (min-width: 640px) {
    .card-backdrop {
        display: block;
    }

    body.card-body:not(:has(.card-backdrop)) {
        background: var(--card-gradient);
    }

    .vc {
        display: grid;
        place-items: center;
        padding: 3rem 1rem;
    }

    .vc-card {
        width: 100%;
        max-width: 440px;
        min-height: 0;
        border-radius: 28px;
        overflow: hidden;
        box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.55);
    }

    .vc-save {
        position: static;
        background: none;
        padding-bottom: 1.5rem;
    }
}

/* Visitenkarte Dating */

.dt {
    position: relative;
    min-height: 100dvh;
    background: #0b0b0f;
}

.dt-card {
    position: relative;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
}

.dt-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.dt-initial {
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #ff5c8a 0%, #b04bff 50%, #3a2bff 100%);
    font-size: 9rem;
    font-weight: 800;
    color: rgb(255 255 255 / 0.25);
}

/* Verlauf, damit der Text auf jedem Foto lesbar bleibt */
.dt-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, rgb(0 0 0 / 0) 35%, rgb(0 0 0 / 0.55) 62%, rgb(0 0 0 / 0.9) 100%);
}

.dt-content {
    padding: 1.5rem 1.5rem calc(1.75rem + env(safe-area-inset-bottom));
}

.dt-content h1 {
    margin: 0;
    font-size: clamp(2.6rem, 13vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
    text-shadow: 0 2px 20px rgb(0 0 0 / 0.35);
}

.dt-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dt-chips a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.16);
    border: 1px solid rgb(255 255 255 / 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.dt-chips a:hover {
    background: rgb(255 255 255 / 0.28);
}

.dt-chips .glyph {
    width: 1.05rem;
    height: 1.05rem;
}

.dt-line {
    margin: 1.4rem 0 0;
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgb(255 255 255 / 0.88);
}

.dt-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    margin-top: 1.1rem;
    padding: 1.05rem 1.25rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(100deg, #ff3d77 0%, #ff7a45 100%);
    color: #fff;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 34px -10px rgb(255 61 119 / 0.75);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dt-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px -10px rgb(255 61 119 / 0.9);
}

.dt-cta:disabled {
    opacity: 0.6;
    cursor: progress;
}

.dt-cta .glyph {
    fill: currentColor;
}

.dt-dialog {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    padding: 0;
    border: 0;
    border-radius: 28px 28px 0 0;
    background: #fff;
    color: #15171c;
    box-shadow: 0 -20px 60px rgb(0 0 0 / 0.35);
}

.dt-dialog[open] {
    animation: dt-sheet 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

@keyframes dt-sheet {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
}

.dt-dialog::backdrop {
    background: rgb(8 8 12 / 0.55);
    backdrop-filter: blur(6px);
}

.dt-form {
    position: relative;
    display: grid;
    padding: 1.75rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
}

.dt-fields {
    display: grid;
    gap: 0.9rem;
}

.dt-fields h2 {
    margin: 0;
    padding-right: 2.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dt-fields p {
    margin: -0.5rem 0 0.25rem;
    color: #6a7080;
}

.dt-fields label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a4f5c;
}

.dt-fields input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1.5px solid #e2e4ea;
    border-radius: 14px;
    background: #f6f7fa;
    color: inherit;
    font: inherit;
    font-size: 1.05rem;
}

.dt-fields input:focus {
    outline: none;
    border-color: #ff3d77;
    background: #fff;
}

.dt-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f1f2f5;
    color: #4a4f5c;
    cursor: pointer;
}

.dt-form .gw-status {
    margin: 0.9rem 0 0;
    text-align: center;
    font-weight: 600;
    color: #6a7080;
}

.dt-form .gw-status[data-state="error"] {
    color: #c62850;
}

/* Nach dem Abschicken nur noch die Bestätigung zeigen */
.dt-form:has(.gw-status[data-state="success"]) .dt-fields {
    display: none;
}

.dt-form .gw-status[data-state="success"] {
    margin: 1.5rem 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #15171c;
}

.dt-form .gw-status[data-state="success"]::before {
    content: "";
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: linear-gradient(100deg, #ff3d77, #ff7a45) center / 100% no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35 10.55 20C5.4 15.36 2 12.28 2 8.5A5.5 5.5 0 0 1 7.5 3c1.74 0 3.41.81 4.5 2.09A6 6 0 0 1 16.5 3 5.5 5.5 0 0 1 22 8.5c0 3.78-3.4 6.86-8.55 11.54z'/%3E%3C/svg%3E") center / 70% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35 10.55 20C5.4 15.36 2 12.28 2 8.5A5.5 5.5 0 0 1 7.5 3c1.74 0 3.41.81 4.5 2.09A6 6 0 0 1 16.5 3 5.5 5.5 0 0 1 22 8.5c0 3.78-3.4 6.86-8.55 11.54z'/%3E%3C/svg%3E") center / 70% no-repeat;
}

@media (min-width: 640px) {
    .dt {
        display: grid;
        place-items: center;
        padding: 3rem 1rem;
    }

    .dt-card {
        width: 100%;
        max-width: 420px;
        min-height: min(780px, calc(100dvh - 6rem));
        border-radius: 32px;
        box-shadow: 0 40px 90px -30px rgb(0 0 0 / 0.8);
    }

    .dt-dialog {
        max-width: 420px;
        margin: auto;
        border-radius: 28px;
    }
}

/* Seitenformular: Gruppen der Visitenkarte */

.group {
    margin: 1.25rem 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.row .narrow {
    flex: 0 0 6.5rem;
}

.button.small {
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
}

.socials {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 0 0.5rem;
}

.image-field + .image-field {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

/* Textseiten: sechs Gestaltungen, gewählt über die Klasse am body */

@font-face {
    font-family: "Caveat";
    src: url("fonts/caveat-600.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: "Orbitron";
    src: url("fonts/orbitron-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

body[class*="text-"] {
    min-height: 100dvh;
}

.tx-body > :first-child {
    margin-top: 0;
}

.tx-body > :last-child {
    margin-bottom: 0;
}

.tx-body img {
    max-width: 100%;
}

.tx-body pre {
    overflow-x: auto;
}

/* Modern: großer, klarer Satz auf einem ruhigen Verlauf */
body.text-modern {
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background:
        radial-gradient(60rem 40rem at 10% -10%, #dfe7ff 0%, transparent 60%),
        radial-gradient(50rem 40rem at 110% 110%, #ffe1ef 0%, transparent 55%),
        #f7f8fb;
    color: #14161b;
}

.text-modern .tx-sheet {
    width: 100%;
    max-width: 40rem;
    padding: clamp(1.75rem, 6vw, 3.5rem);
    border-radius: 28px;
    background: rgb(255 255 255 / 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 80px -40px rgb(40 50 90 / 0.45), inset 0 0 0 1px rgb(255 255 255 / 0.8);
}

.text-modern h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2rem, 7vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    background: linear-gradient(100deg, #2b3cff, #b33dff 60%, #ff4f8b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-modern .tx-body {
    font-size: 1.12rem;
    line-height: 1.7;
    color: #3b4050;
}

.text-modern .tx-body a {
    color: #3a3cff;
    text-underline-offset: 3px;
}

.text-modern blockquote {
    margin: 1.25rem 0;
    padding: 0.25rem 0 0.25rem 1rem;
    border-left: 3px solid #b33dff;
    color: #5a5f70;
}

.text-modern code {
    padding: 0.1em 0.35em;
    border-radius: 6px;
    background: #eef0f6;
    font-size: 0.92em;
}

.text-modern pre {
    padding: 1rem;
    border-radius: 14px;
    background: #14161b;
    color: #e8eaf2;
}

.text-modern pre code {
    padding: 0;
    background: none;
}

@media (prefers-color-scheme: dark) {
    body.text-modern {
        background:
            radial-gradient(60rem 40rem at 10% -10%, #1d2350 0%, transparent 60%),
            radial-gradient(50rem 40rem at 110% 110%, #3a1530 0%, transparent 55%),
            #0c0d12;
        color: #f1f2f6;
    }

    .text-modern .tx-sheet {
        background: rgb(22 24 32 / 0.7);
        box-shadow: 0 30px 80px -40px rgb(0 0 0 / 0.8), inset 0 0 0 1px rgb(255 255 255 / 0.06);
    }

    .text-modern h1 {
        background-image: linear-gradient(100deg, #8ea2ff, #d58bff 60%, #ff8db4);
    }

    .text-modern .tx-body {
        color: #c4c8d4;
    }

    .text-modern .tx-body a {
        color: #a9b5ff;
    }

    .text-modern code {
        background: #232633;
    }
}

/* Nackt: als hätte die Seite gar kein CSS — nur weiße Maschinenschrift auf Schwarz */
body.text-nackt {
    padding: 8px;
    background: #000;
    color: #fff;
    font-family: "Courier New", Courier, ui-monospace, monospace;
    font-size: 16px;
    line-height: 1.35;
}

.text-nackt h1 {
    margin: 0.67em 0;
    font-size: 2em;
    font-weight: bold;
}

.text-nackt h2,
.text-nackt h3,
.text-nackt h4 {
    font-weight: bold;
}

.text-nackt a {
    color: #fff;
}

.text-nackt a:visited {
    color: #ccc;
}

.text-nackt hr {
    border: 0;
    border-top: 1px dashed #fff;
}

.text-nackt blockquote {
    margin: 1em 40px;
}

.tx-cursor {
    display: inline-block;
    width: 0.6em;
    height: 1.1em;
    margin-top: 0.5em;
    background: #fff;
    vertical-align: text-bottom;
    animation: tx-blink 1.1s steps(1) infinite;
}

@keyframes tx-blink {
    50% {
        opacity: 0;
    }
}

/* Zettel: gelbe Notiz mit Reißzwecke auf einer Korkwand, in Handschrift */
body.text-zettel {
    display: grid;
    place-items: center;
    padding: 2.5rem 1.25rem;
    background-color: #b98a55;
    background-image:
        radial-gradient(rgb(90 55 20 / 0.35) 1px, transparent 1.4px),
        radial-gradient(rgb(255 230 190 / 0.25) 1px, transparent 1.6px),
        radial-gradient(70rem 50rem at 50% 40%, #cf9f68, #a5733f);
    background-size: 7px 7px, 11px 11px, 100% 100%;
    background-position: 0 0, 3px 5px, 0 0;
}

.tx-note {
    position: relative;
    width: 100%;
    max-width: 30rem;
    padding: 3rem 2rem 2.25rem;
    background: linear-gradient(160deg, #fff7a8 0%, #fdeb73 70%, #f7df57 100%);
    color: #2a2a3a;
    font-family: "Caveat", "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
    font-size: clamp(1.55rem, 5.5vw, 1.9rem);
    line-height: 1.3;
    transform: rotate(-2.2deg);
    box-shadow:
        0 1px 1px rgb(0 0 0 / 0.15),
        0 18px 30px -14px rgb(60 30 0 / 0.65),
        inset 0 -30px 40px -30px rgb(150 110 0 / 0.25);
    clip-path: polygon(0 0, 100% 0, 100% 96%, 96% 100%, 0 100%);
}

.tx-pin {
    position: absolute;
    top: 0.9rem;
    left: 50%;
    width: 22px;
    height: 22px;
    margin-left: -11px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff8a8a, #d0202a 55%, #7a0c12);
    box-shadow: 2px 5px 6px rgb(0 0 0 / 0.4);
}

.text-zettel h1 {
    margin: 0 0 0.6rem;
    font-size: 1.45em;
    font-weight: 600;
    line-height: 1.1;
    color: #1f3a8a;
}

.text-zettel .tx-body p,
.text-zettel .tx-body ul,
.text-zettel .tx-body ol {
    margin: 0 0 0.6rem;
}

.text-zettel blockquote {
    margin: 0.5rem 0 0.6rem 0.75rem;
}

.text-zettel .tx-body a {
    color: #1f3a8a;
}

.text-zettel strong {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.text-zettel code,
.text-zettel pre {
    font-family: inherit;
}

/* Zukunft: Neon-Raster am Horizont, Glasscheibe, leuchtende Schrift */
body.text-zukunft {
    display: grid;
    place-items: center;
    padding: 1.25rem;
    overflow-x: hidden;
    background: radial-gradient(80rem 50rem at 50% 0%, #2a0c4e 0%, #0a0414 55%, #030108 100%);
    color: #d9f6ff;
}

.tx-grid {
    position: fixed;
    left: -50%;
    right: -50%;
    bottom: -10%;
    height: 60%;
    background-image:
        linear-gradient(rgb(0 240 255 / 0.55) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 0 200 / 0.45) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(380px) rotateX(62deg);
    transform-origin: 50% 0;
    mask-image: linear-gradient(to bottom, transparent, #000 40%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%);
    animation: tx-grid 3s linear infinite;
    pointer-events: none;
}

@keyframes tx-grid {
    to {
        background-position: 0 60px, 0 0;
    }
}

.tx-panel {
    position: relative;
    width: 100%;
    max-width: 38rem;
    padding: clamp(1.75rem, 6vw, 3rem);
    border: 1px solid rgb(0 240 255 / 0.45);
    border-radius: 18px;
    background: linear-gradient(160deg, rgb(20 8 40 / 0.65), rgb(5 20 40 / 0.55));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 0 40px rgb(0 240 255 / 0.18), inset 0 0 30px rgb(255 0 200 / 0.08);
}

/* Abgeschrägte Ecken als Leuchtlinien */
.tx-panel::before,
.tx-panel::after {
    content: "";
    position: absolute;
    width: 46px;
    height: 46px;
    border: 2px solid #00f0ff;
    filter: drop-shadow(0 0 6px #00f0ff);
}

.tx-panel::before {
    top: -1px;
    left: -1px;
    border-right: 0;
    border-bottom: 0;
    border-radius: 18px 0 0 0;
}

.tx-panel::after {
    right: -1px;
    bottom: -1px;
    border-left: 0;
    border-top: 0;
    border-color: #ff2bd6;
    filter: drop-shadow(0 0 6px #ff2bd6);
    border-radius: 0 0 18px 0;
}

.text-zukunft h1 {
    margin: 0 0 1.25rem;
    font-family: "Orbitron", ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(1.6rem, 6vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 8px #00f0ff, 0 0 22px rgb(0 240 255 / 0.6), 0 0 40px rgb(255 0 200 / 0.45);
}

.text-zukunft .tx-body {
    font-size: 1.08rem;
    line-height: 1.7;
    color: #bfe9f5;
}

.text-zukunft .tx-body a {
    color: #ff7be6;
    text-shadow: 0 0 8px rgb(255 43 214 / 0.6);
}

.text-zukunft strong {
    color: #fff;
}

.text-zukunft code {
    color: #00f0ff;
}

.text-zukunft blockquote {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 2px solid #ff2bd6;
}

.text-zukunft hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00f0ff, #ff2bd6, transparent);
}

@media (prefers-reduced-motion: reduce) {
    .tx-grid,
    .tx-cursor {
        animation: none;
    }
}

/* Plakat: eine Botschaft, so groß es geht */
body.text-plakat {
    display: grid;
    align-content: center;
    padding: clamp(1.5rem, 6vw, 4rem);
    background: #ffe500;
    color: #0b0b0b;
}

.text-plakat .tx-sheet {
    max-width: 60rem;
}

.text-plakat h1 {
    margin: 0 0 1.5rem;
    font-size: clamp(3rem, 15vw, 9rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 0.88;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.text-plakat .tx-body {
    max-width: 38rem;
    font-size: clamp(1.15rem, 3.4vw, 1.6rem);
    font-weight: 600;
    line-height: 1.35;
}

.text-plakat .tx-body a {
    color: inherit;
    text-decoration-thickness: 3px;
}

.text-plakat blockquote {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 6px solid currentColor;
}

.text-plakat hr {
    border: 0;
    border-top: 6px solid currentColor;
}

/* Brief: Serifen auf warmem Papier */
body.text-brief {
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background: #e9e3d6;
    color: #2b2620;
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
}

.text-brief .tx-sheet {
    width: 100%;
    max-width: 36rem;
    padding: clamp(2rem, 7vw, 4rem);
    background:
        radial-gradient(30rem 20rem at 0 0, rgb(255 255 255 / 0.55), transparent 70%),
        #fbf8f1;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 24px 50px -30px rgb(60 40 10 / 0.5);
}

.text-brief h1 {
    margin: 0 0 1.5rem;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.15;
}

.text-brief h1::after {
    content: "";
    display: block;
    width: 3rem;
    height: 1px;
    margin-top: 1.25rem;
    background: #a8957a;
}

.text-brief .tx-body {
    font-size: 1.15rem;
    line-height: 1.75;
}

.text-brief .tx-body > p:first-child::first-letter {
    float: left;
    margin: 0.08em 0.1em 0 0;
    font-size: 3.4em;
    line-height: 0.8;
    color: #8a5a2b;
}

.text-brief .tx-body a {
    color: #8a5a2b;
}

.text-brief blockquote {
    margin: 1.25rem 0;
    padding-left: 1.25rem;
    border-left: 1px solid #a8957a;
    font-style: italic;
}

/* Textseite im Formular: Gestaltung wählen und Markdown schreiben */

.layouts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.layout-choice {
    position: relative;
    display: grid;
    gap: 0.15rem;
    margin: 0;
    padding: 0.5rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.layout-choice:has(input:checked) {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.layout-choice input {
    position: absolute;
    opacity: 0;
}

.layout-choice small {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.3;
}

.layout-sample {
    display: grid;
    place-items: center;
    height: 3.6rem;
    margin-bottom: 0.3rem;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 800;
}

.sample-modern { background: linear-gradient(135deg, #e3e9ff, #ffe3ef); color: #3a3cff; }
.sample-nackt { background: #000; color: #fff; font-family: "Courier New", monospace; font-weight: 400; }
.sample-zettel { position: relative; isolation: isolate; background: #b98a55; color: #2a2a3a; font-family: "Caveat", cursive; }
.sample-zettel::before { content: ""; position: absolute; z-index: -1; width: 4.5rem; height: 2.8rem; background: #fdeb73; transform: rotate(-4deg); box-shadow: 0 4px 8px rgb(0 0 0 / 0.3); }
.sample-zukunft { background: radial-gradient(circle at 50% 0, #2a0c4e, #050210); color: #fff; font-family: "Orbitron", sans-serif; text-shadow: 0 0 8px #00f0ff; }
.sample-plakat { background: #ffe500; color: #0b0b0b; font-weight: 900; font-size: 1.9rem; letter-spacing: -0.05em; }
.sample-brief { background: #fbf8f1; color: #2b2620; font-family: Georgia, serif; font-style: italic; font-weight: 400; box-shadow: inset 0 0 0 1px #e2dacb; }

.md {
    margin-bottom: 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.md-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.35rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.md-bar button {
    min-width: 2rem;
    padding: 0.3rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 6px;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.md-bar button:hover:not(:disabled) {
    border-color: var(--line);
    background: var(--surface);
}

.md-bar button:disabled {
    opacity: 0.35;
    cursor: default;
}

.md-bar .md-toggle {
    margin-left: auto;
    border-color: var(--line);
}

.md-bar .md-toggle[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.md textarea {
    margin: 0;
    border: 0;
    border-radius: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.md-preview {
    min-height: 12rem;
    padding: 0.75rem 1rem;
    line-height: 1.6;
}

.md-preview > :first-child {
    margin-top: 0;
}

.md-help summary {
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
}

.md-help pre {
    margin: 0.5rem 0 0;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg);
    font-size: 0.8rem;
    white-space: pre-wrap;
}

/* Dating-Karte wischen */

.dt-card {
    touch-action: pan-y;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
    --save: 0;
    --leave: 0;
}

.dt-card.dragging {
    transition: none;
    cursor: grabbing;
    user-select: none;
}

.dt-stamp {
    position: absolute;
    top: 2.5rem;
    z-index: 1;
    padding: 0.4rem 0.8rem;
    border: 4px solid currentColor;
    border-radius: 12px;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    pointer-events: none;
    background: rgb(0 0 0 / 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dt-stamp-save {
    left: 1.5rem;
    color: #3ee08f;
    opacity: var(--save);
    transform: rotate(-14deg) scale(calc(0.8 + var(--save) * 0.2));
}

.dt-stamp-leave {
    right: 1.5rem;
    color: #ff4f8b;
    text-align: right;
    opacity: var(--leave);
    transform: rotate(14deg) scale(calc(0.8 + var(--leave) * 0.2));
}

.dt-hint {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.9rem 0.25rem 0;
    font-size: 0.78rem;
    color: rgb(255 255 255 / 0.55);
}

.dt-hint span:only-child {
    margin-left: auto;
}

/* Seitentypen mit eigener Gestaltung */

body.kind {
    min-height: 100dvh;
    margin: 0;
}

/* Countdown: große, leuchtende Ziffern auf Nachtblau */
body.kind-countdown {
    display: grid;
    place-items: center;
    padding: 1rem;
    background: radial-gradient(70rem 45rem at 50% 0%, #1b2350 0%, #090b18 60%, #04050b 100%);
    color: #eef1ff;
}

.cd {
    text-align: center;
}

.cd-label {
    margin: 0 0 2rem;
    font-size: clamp(1.1rem, 4vw, 1.6rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #aeb8e8;
}

.cd-clock {
    display: flex;
    justify-content: center;
    gap: clamp(0.35rem, 2vw, 1.5rem);
}

.cd-part {
    display: grid;
    gap: 0.6rem;
    min-width: clamp(3.6rem, 19vw, 9rem);
    padding: clamp(0.8rem, 3vw, 1.5rem) 0.4rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0.03));
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08), 0 20px 50px -25px rgb(0 0 0 / 0.8);
}

/* Ohne verbleibende Tage fällt das Tagesfeld weg */
.cd-part.is-zero {
    display: none;
}

.cd-value {
    display: flex;
    justify-content: center;
    font-family: "Orbitron", ui-monospace, monospace;
    font-size: clamp(2.2rem, 11vw, 5.5rem);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    filter: drop-shadow(0 0 18px rgb(120 150 255 / 0.45));
}

/* Feste Breite je Ziffer: Eine 1 ist so breit wie eine 8, nichts springt beim Zählen. */
.cd-digit {
    display: inline-block;
    width: var(--digit-width, 0.82em);
    text-align: center;
    background: linear-gradient(180deg, #ffffff, #9fb2ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cd-digit.is-turning {
    animation: cd-turn 0.35s ease-out;
}

@keyframes cd-turn {
    from {
        opacity: 0.2;
        transform: translateY(-0.12em);
    }
}

.cd-name {
    font-size: clamp(0.65rem, 2.4vw, 0.85rem);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8790c0;
}

.cd-done {
    margin: 0;
    font-size: clamp(2.4rem, 10vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(100deg, #ffffff, #b8c4ff 50%, #ff9ad5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: cd-pop 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes cd-pop {
    from {
        transform: scale(0.6);
        opacity: 0;
    }
}

/* Geheime Nachricht: Schloss auf dunklem Samt */
body.kind-secret {
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: radial-gradient(50rem 40rem at 50% 30%, #23202e 0%, #0e0f14 70%);
    color: #ecebf3;
}

.sc-box {
    width: 100%;
    max-width: 30rem;
    text-align: center;
}

.sc-lock {
    width: 72px;
    margin: 0 auto 1.25rem;
    color: #e8c46a;
    filter: drop-shadow(0 8px 24px rgb(232 196 106 / 0.35));
}

.sc-shackle {
    transition: transform 0.5s cubic-bezier(0.3, 1.5, 0.5, 1);
    transform-origin: 44px 28px;
}

.sc-lock.is-open .sc-shackle {
    transform: translateY(-6px) rotate(25deg);
}

.sc-box h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sc-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.sc-form input {
    flex: 1;
    min-width: 0;
    padding: 0.95rem 1.1rem;
    border: 1.5px solid #3a3746;
    border-radius: 14px;
    background: #17161e;
    color: inherit;
    font: inherit;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
}

.sc-form input:focus {
    outline: none;
    border-color: #e8c46a;
}

.sc-form input[aria-invalid="true"] {
    animation: sc-shake 0.4s;
    border-color: #ff6b6b;
}

@keyframes sc-shake {
    25% { transform: translateX(-8px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-4px); }
}

.sc-form button {
    padding: 0 1.3rem;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #f3d27a, #d4a23a);
    color: #1b1608;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.sc-note {
    margin: 1rem 0 0;
    color: #9a98a8;
    font-size: 0.92rem;
}

.sc-wrong {
    margin: 0.75rem 0 0;
    color: #ff8b8b;
    font-weight: 600;
}

.sc-message {
    padding: 1.5rem;
    border-radius: 20px;
    background: #f8f3e6;
    color: #2b2620;
    font-size: 1.12rem;
    line-height: 1.65;
    text-align: left;
    box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.8);
    animation: sc-reveal 0.6s ease-out;
}

.sc-message > :first-child { margin-top: 0; }
.sc-message > :last-child { margin-bottom: 0; }

@keyframes sc-reveal {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
        filter: blur(6px);
    }
}

/* WLAN: helle Karte mit großem QR-Code */
body.kind-wifi {
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: linear-gradient(160deg, #e8f3ff 0%, #f4ecff 100%);
    color: #14161b;
}

.wf-card {
    width: 100%;
    max-width: 24rem;
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 28px;
    background: #fff;
    text-align: center;
    box-shadow: 0 30px 70px -35px rgb(40 60 120 / 0.5);
}

.wf-icon {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
}

.wf-icon svg {
    width: 30px;
}

.wf-kicker {
    margin: 1rem 0 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: #7a7f8f;
}

.wf-card h1 {
    margin: 0.2rem 0 0;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.wf-note {
    margin: 0.3rem 0 0;
    color: #6a7080;
}

.wf-qr {
    width: min(100%, 15rem);
    margin: 1.5rem auto 0.5rem;
    padding: 0.5rem;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px #e6e8ef;
}

.wf-qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.wf-help {
    margin: 0.25rem 0 0;
    color: #7a7f8f;
    font-size: 0.82rem;
}

.wf-password {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.15rem 0.75rem;
    margin-top: 1.5rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: #f3f5fa;
    text-align: left;
}

.wf-password span {
    grid-column: 1 / -1;
    font-size: 0.75rem;
    color: #7a7f8f;
}

.wf-password code {
    font-size: 1.05rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.wf-password button,
.wf-profile {
    padding: 0.55rem 0.9rem;
    border: 0;
    border-radius: 999px;
    background: #14161b;
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.wf-profile {
    display: block;
    margin-top: 1.25rem;
    padding: 0.85rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

/* Einladung: festliche Karte mit Kalenderblatt */
body.kind-invite {
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background:
        radial-gradient(40rem 30rem at 0% 0%, #ffd6a8 0%, transparent 60%),
        radial-gradient(40rem 30rem at 100% 100%, #ffb3c7 0%, transparent 60%),
        #fff4ea;
    color: #2a1d17;
}

.iv-card {
    width: 100%;
    max-width: 30rem;
    padding: clamp(1.5rem, 6vw, 2.25rem);
    border-radius: 28px;
    background: #fffdfb;
    box-shadow: 0 30px 70px -35px rgb(120 50 20 / 0.45);
}

.iv-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.iv-date {
    display: grid;
    flex: none;
    width: 4.5rem;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    text-align: center;
    box-shadow: 0 8px 20px -10px rgb(120 50 20 / 0.5), inset 0 0 0 1px #f1e2d6;
}

.iv-month {
    padding: 0.2rem 0;
    background: linear-gradient(100deg, #ff6a3d, #ff3d77);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.iv-day {
    padding: 0.2rem 0 0.35rem;
    font-size: 2rem;
    font-weight: 800;
}

.iv-kicker {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c2552f;
}

.iv-head h1 {
    margin: 0.1rem 0 0;
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.iv-facts {
    display: grid;
    gap: 0.6rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.iv-facts li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 600;
}

.iv-facts .glyph {
    color: #ff5a4f;
}

.iv-facts a {
    color: inherit;
}

.iv-details {
    margin-top: 1.25rem;
    color: #5b4a40;
    line-height: 1.6;
}

.iv-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1.25rem;
    padding: 0.95rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(100deg, #ff6a3d, #ff3d77);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 30px -12px rgb(255 61 119 / 0.7);
}

.iv-calendar {
    background: #2a1d17;
    box-shadow: none;
}

.iv-rsvp {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #ecd9cb;
}

.iv-rsvp h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.iv-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.iv-choice label {
    margin: 0;
}

.iv-choice input {
    position: absolute;
    opacity: 0;
}

.iv-choice span {
    display: block;
    padding: 0.8rem;
    border: 1.5px solid #ecd9cb;
    border-radius: 14px;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
}

.iv-choice input:checked + span {
    border-color: #ff5a4f;
    background: #fff0eb;
    color: #c2362f;
}

.iv-choice input:focus-visible + span {
    outline: 2px solid #ff5a4f;
}

.iv-fields {
    display: grid;
    grid-template-columns: 1fr 6.5rem;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.iv-rsvp input[type="text"],
.iv-rsvp input[type="number"],
.iv-rsvp textarea {
    width: 100%;
    margin: 0;
    padding: 0.8rem 0.9rem;
    border: 1.5px solid #ecd9cb;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    font: inherit;
}

.iv-rsvp textarea {
    margin-top: 0.5rem;
    resize: vertical;
}

.iv-rsvp .gw-status {
    margin: 0.75rem 0 0;
    text-align: center;
    font-weight: 700;
}

.iv-rsvp:has(.gw-status[data-state="success"]) > :not(h2, .gw-status) {
    display: none;
}

.iv-past {
    margin: 1.25rem 0 0;
    color: #8a766a;
    text-align: center;
}

/* Bezahlen: ruhige Karte in Grün */
body.kind-pay {
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: linear-gradient(160deg, #e6f7ef 0%, #eef3ff 100%);
    color: #10221a;
}

.py-card {
    width: 100%;
    max-width: 24rem;
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 28px;
    background: #fff;
    text-align: center;
    box-shadow: 0 30px 70px -35px rgb(20 80 50 / 0.45);
}

.py-kicker {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #3c8a63;
}

.py-card h1 {
    margin: 0.25rem 0 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.py-amount {
    margin: 0.5rem 0 0;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0e8a52;
    font-variant-numeric: tabular-nums;
}

.py-qr {
    width: min(100%, 14rem);
    margin: 1.25rem auto 0.5rem;
    padding: 0.5rem;
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px #e3ece7;
}

.py-qr svg {
    display: block;
    width: 100%;
    height: auto;
}

.py-help {
    margin: 0;
    color: #6b7d74;
    font-size: 0.82rem;
}

.py-facts {
    display: grid;
    gap: 0.5rem;
    margin: 1.25rem 0 0;
    text-align: left;
}

.py-facts div {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.1rem 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    background: #f2f7f4;
}

.py-facts dt {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    color: #6b7d74;
}

.py-facts dd {
    margin: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.py-facts button {
    padding: 0.45rem 0.8rem;
    border: 0;
    border-radius: 999px;
    background: #10221a;
    color: #fff;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.py-paypal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.95rem;
    border-radius: 999px;
    background: #0070e0;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

/* Treffpunkt: stilisierte Karte mit pulsierender Nadel */
body.kind-place {
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 1.25rem;
    background: #eef1f4;
    color: #14171c;
}

.pl-map {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: grid;
    place-items: center;
    background:
        linear-gradient(90deg, rgb(255 255 255 / 0.9) 2px, transparent 2px) 0 0 / 120px 100%,
        linear-gradient(rgb(255 255 255 / 0.9) 2px, transparent 2px) 0 0 / 100% 90px,
        linear-gradient(28deg, transparent 47%, #ffffff 47%, #ffffff 53%, transparent 53%),
        radial-gradient(30rem 20rem at 70% 20%, #cfe8d2, transparent 70%),
        radial-gradient(25rem 18rem at 15% 80%, #cfe0f5, transparent 70%),
        #e6e9ee;
}

.pl-pin {
    position: relative;
    top: -22vh;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50% 50% 50% 0;
    background: linear-gradient(135deg, #ff5a4f, #e0245e);
    color: #fff;
    transform: rotate(-45deg);
    box-shadow: 0 12px 25px -8px rgb(224 36 94 / 0.7);
}

.pl-pin .glyph {
    transform: rotate(45deg);
    width: 28px;
    height: 28px;
}

.pl-ring {
    position: absolute;
    top: calc(50% - 22vh + 26px);
    width: 26px;
    height: 10px;
    border-radius: 50%;
    background: rgb(224 36 94 / 0.35);
    animation: pl-pulse 1.8s ease-out infinite;
}

@keyframes pl-pulse {
    to {
        transform: scale(5);
        opacity: 0;
    }
}

.pl-card {
    width: 100%;
    max-width: 26rem;
    margin-top: 28vh;
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 30px 70px -30px rgb(20 30 50 / 0.5);
}

.pl-kicker {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #e0245e;
}

.pl-card h1 {
    margin: 0.2rem 0 0;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pl-address {
    margin: 0.35rem 0 0;
    font-weight: 600;
    color: #4a5260;
}

.pl-note {
    margin: 0.75rem 0 0;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    background: #fff4f6;
    color: #6b3343;
}

.pl-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5a4f, #e0245e);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 30px -12px rgb(224 36 94 / 0.7);
}

.pl-apps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.pl-apps a,
.pl-copy {
    padding: 0.65rem 0.3rem;
    border-radius: 12px;
    background: #f1f3f6;
    color: #14171c;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.pl-copy {
    width: 100%;
    margin-top: 0.4rem;
    border: 0;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

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

/* Abstimmung: große Antwortknöpfe, Ergebnis als Balken */
body.kind-poll {
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: linear-gradient(160deg, #2f2a7a 0%, #6b2fa3 55%, #c2357a 100%);
    color: #1b1830;
}

.po-card {
    width: 100%;
    max-width: 28rem;
    padding: clamp(1.5rem, 6vw, 2.25rem);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 40px 80px -30px rgb(20 0 40 / 0.6);
}

.po-kicker {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7b3fd0;
}

.po-card h1 {
    margin: 0.3rem 0 1.25rem;
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.po-options {
    display: grid;
    gap: 0.6rem;
}

.po-options button {
    padding: 1rem 1.1rem;
    border: 2px solid #ebe6f7;
    border-radius: 16px;
    background: #faf8ff;
    color: inherit;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    animation: po-in 0.4s backwards;
    animation-delay: calc(var(--i) * 60ms);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.po-options button:hover {
    border-color: #7b3fd0;
    transform: translateX(3px);
}

@keyframes po-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

.po-results {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.po-results li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: linear-gradient(90deg, #e6dcfa var(--share), #f6f4fb var(--share));
    font-weight: 700;
}

.po-results li.is-mine {
    background: linear-gradient(90deg, #c9b2f5 var(--share), #f1ebfd var(--share));
}

.po-results .glyph {
    width: 1rem;
    height: 1rem;
    vertical-align: -2px;
    color: #7b3fd0;
}

.po-note {
    margin: 1rem 0 0;
    color: #7a7690;
    font-size: 0.88rem;
    text-align: center;
}

.po-thanks {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 1rem;
    border-radius: 16px;
    background: #f1ebfd;
    font-weight: 700;
}

.po-thanks .glyph {
    color: #7b3fd0;
}

/* Ergebnis im Adminbereich */
.poll-results {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.poll-results li {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: var(--bg);
    overflow: hidden;
}

.poll-results li > * {
    position: relative;
}

.poll-results i {
    position: absolute;
    inset: 0 auto 0 0;
    background: color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Galerie: Bilder randlos zum Durchwischen */
body.kind-gallery {
    background: #0b0b0d;
    color: #fff;
    overflow: hidden;
}

.ga {
    position: relative;
    height: 100dvh;
}

.ga-heading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    margin: 0;
    padding: 1.25rem 1.25rem 2.5rem;
    background: linear-gradient(to bottom, rgb(0 0 0 / 0.6), transparent);
    font-size: 1.2rem;
    font-weight: 800;
    pointer-events: none;
}

.ga-track {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    outline: none;
}

.ga-track::-webkit-scrollbar {
    display: none;
}

.ga-slide {
    flex: 0 0 100%;
    display: grid;
    place-items: center;
    margin: 0;
    scroll-snap-align: start;
}

.ga-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ga-bar {
    position: absolute;
    left: 50%;
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgb(20 20 24 / 0.7);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translateX(-50%);
}

.ga-nav,
.ga-download {
    display: grid;
    place-items: center;
    height: 40px;
    min-width: 40px;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.1);
    color: #fff;
    cursor: pointer;
}

.ga-download {
    grid-auto-flow: column;
    gap: 0.35rem;
    padding: 0 0.9rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.ga-count {
    min-width: 3.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Galerie im Adminbereich */
.thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.thumb {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 400;
}

.thumb img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

/* Stile für die Seitentypen mit eigener Klasse. „Typisch“ (style-eigen) ist das jeweils eigene
   Aussehen oben; die übrigen Stile setzen Variablen, die die Regeln darunter auf alle Typen anwenden. */

body.style-klar {
    --s-bg: #f5f5f2;
    --s-card: #ffffff;
    --s-text: #111111;
    --s-muted: #6b6b6b;
    --s-accent: #111111;
    --s-accent-text: #ffffff;
    --s-soft: #f1f1ee;
    --s-line: #e4e4df;
    --s-radius: 22px;
    --s-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 20px 50px -30px rgb(0 0 0 / 0.25);
    --s-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.style-nacht {
    --s-bg: radial-gradient(60rem 40rem at 50% 0%, #1f2330 0%, #0d0f14 70%);
    --s-card: #161920;
    --s-text: #eeeae0;
    --s-muted: #9c9688;
    --s-accent: #e3c27b;
    --s-accent-text: #17140c;
    --s-soft: #1f232c;
    --s-line: #2c303a;
    --s-radius: 20px;
    --s-shadow: 0 0 0 1px rgb(227 194 123 / 0.18), 0 40px 80px -40px rgb(0 0 0 / 0.9);
    --s-font: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

body.style-nackt {
    --s-bg: #000000;
    --s-card: transparent;
    --s-text: #ffffff;
    --s-muted: #bdbdbd;
    --s-accent: #ffffff;
    --s-accent-text: #000000;
    --s-soft: transparent;
    --s-line: #ffffff;
    --s-radius: 0;
    --s-shadow: none;
    --s-font: "Courier New", Courier, ui-monospace, monospace;
}

body.style-plakat {
    --s-bg: #ffe500;
    --s-card: transparent;
    --s-text: #0b0b0b;
    --s-muted: #3a3a00;
    --s-accent: #0b0b0b;
    --s-accent-text: #ffe500;
    --s-soft: rgb(0 0 0 / 0.08);
    --s-line: #0b0b0b;
    --s-radius: 0;
    --s-shadow: none;
    --s-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.style-klappe {
    --s-bg: #111113;
    --s-text: #f4f2ea;
    --s-muted: #8c8a84;
    --s-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body.styled {
    background: var(--s-bg);
    color: var(--s-text);
    font-family: var(--s-font);
}

/* Dekorationen der typischen Gestaltung entfallen */
body.styled :is(.pl-map, .card-backdrop) {
    display: none;
}

body.styled .pl-card {
    margin-top: 0;
}

body.styled :is(.wf-card, .iv-card, .py-card, .pl-card, .po-card) {
    background: var(--s-card);
    color: var(--s-text);
    border-radius: var(--s-radius);
    box-shadow: var(--s-shadow);
}

body.styled :is(.wf-kicker, .iv-kicker, .py-kicker, .pl-kicker, .po-kicker, .py-amount, .sc-lock) {
    color: var(--s-accent);
}

body.styled :is(.wf-note, .wf-help, .py-help, .po-note, .sc-note, .iv-details, .iv-past, .pl-address, .py-facts dt, .wf-password span) {
    color: var(--s-muted);
}

body.styled :is(.wf-profile, .iv-button, .py-paypal, .pl-route, .sc-form button, .wf-password button, .py-facts button) {
    background: var(--s-accent);
    color: var(--s-accent-text);
    box-shadow: none;
}

body.styled :is(.wf-password, .py-facts div, .pl-note, .pl-apps a, .pl-copy, .po-options button, .po-results li, .po-thanks, .iv-choice span, .sc-form input) {
    background: var(--s-soft);
    color: var(--s-text);
    border-color: var(--s-line);
}

body.styled .po-results li {
    background: linear-gradient(90deg, color-mix(in srgb, var(--s-accent) 22%, transparent) var(--share), var(--s-soft) var(--share));
}

body.styled :is(.iv-choice input:checked + span, .po-options button:hover) {
    border-color: var(--s-accent);
    background: color-mix(in srgb, var(--s-accent) 12%, var(--s-soft));
    color: var(--s-text);
}

body.styled :is(.iv-rsvp input, .iv-rsvp textarea) {
    border-color: var(--s-line);
    background: var(--s-soft);
    color: var(--s-text);
}

body.styled :is(.wf-icon, .iv-month) {
    background: var(--s-accent);
    color: var(--s-accent-text);
}

body.styled .iv-date {
    background: var(--s-soft);
    box-shadow: none;
}

body.styled :is(.iv-facts .glyph, .po-results .glyph, .po-thanks .glyph) {
    color: var(--s-accent);
}

/* Nackt: keine Flächen, keine Rundungen — Rahmen aus Strichen */
body.style-nackt :is(.wf-card, .iv-card, .py-card, .pl-card, .po-card) {
    padding-inline: 0;
}

body.style-nackt :is(.wf-profile, .iv-button, .py-paypal, .pl-route, .sc-form button, .po-options button, .pl-apps a, .pl-copy, .iv-choice span, .wf-password button, .py-facts button) {
    border: 1px solid #fff;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font-weight: 400;
}

body.style-nackt :is(.wf-password, .py-facts div, .pl-note, .po-thanks, .po-results li, .sc-form input) {
    border: 1px dashed #fff;
    border-radius: 0;
}

body.style-nackt :is(h1, h2, .py-amount) {
    font-weight: 700;
    letter-spacing: 0;
}

body.style-nackt .sc-message {
    border-radius: 0;
    background: transparent;
    color: #fff;
    box-shadow: none;
    border: 1px dashed #fff;
}

/* Plakat: groß, fett, kantig */
body.style-plakat :is(.wf-card h1, .iv-head h1, .py-card h1, .pl-card h1, .po-card h1, .sc-box h1) {
    font-size: clamp(2.2rem, 10vw, 3.4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.95;
    text-transform: uppercase;
}

body.style-plakat :is(.wf-profile, .iv-button, .py-paypal, .pl-route, .sc-form button) {
    border-radius: 0;
    font-weight: 900;
    text-transform: uppercase;
}

body.style-plakat .sc-message {
    border-radius: 0;
    background: #0b0b0b;
    color: #ffe500;
}

/* Nacht: Gold auf Schwarz, Serifen */
body.style-nacht :is(h1, h2) {
    font-weight: 500;
    letter-spacing: 0;
}

body.style-nacht .sc-message {
    background: #f4ecd8;
}

/* Klar */
body.style-klar .sc-message {
    background: #fff;
    box-shadow: var(--s-shadow);
}

/* Countdown in den Stilen */
body.styled .cd-value {
    filter: none;
    font-family: var(--s-font);
    --digit-width: 0.62em;
}

body.styled .cd-digit {
    background: none;
    color: var(--s-text);
}

body.styled :is(.cd-label, .cd-name) {
    color: var(--s-muted);
}

body.styled .cd-part {
    background: none;
    box-shadow: none;
}

body.styled .cd-done {
    background: none;
    color: var(--s-text);
}

body.style-klar .cd-value {
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.style-nacht .cd-value {
    font-weight: 300;
}

body.style-nacht .cd-digit {
    color: var(--s-accent);
}

body.style-nacht .cd-part {
    border: 1px solid rgb(227 194 123 / 0.25);
    border-radius: 14px;
}

body.style-nackt .cd-value {
    font-weight: 400;
}

body.style-nackt .cd-clock {
    gap: 0;
}

/* Nackt: Doppelpunkte zwischen den Feldern, wie auf einem alten Terminal */
body.style-nackt .cd-part:not(:last-child) .cd-value::after {
    content: ":";
    width: 0.62em;
    text-align: center;
}

body.style-nackt .cd-part {
    min-width: 0;
    padding-inline: 0;
}

body.style-plakat .cd-value {
    font-size: clamp(3rem, 15vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    --digit-width: 0.6em;
}

body.style-plakat :is(.cd-name, .cd-label) {
    color: var(--s-text);
    font-weight: 800;
}

body.style-plakat .cd-done {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.04em;
}

/* Klappanzeige: jede Ziffer auf einem eigenen Fallblatt */
body.style-klappe .cd-clock {
    gap: clamp(0.3rem, 2vw, 1.5rem);
}

body.style-klappe .cd-part {
    min-width: 0;
}

body.style-klappe .cd-value {
    gap: 0.08em;
    font-size: clamp(1.9rem, 9vw, 5rem);
    font-weight: 700;
    --digit-width: 0.78em;
}

body.style-klappe .cd-digit {
    position: relative;
    padding: 0.12em 0;
    border-radius: 0.1em;
    background: linear-gradient(180deg, #2e2e32 0%, #26262a 49.5%, #1c1c1f 50.5%, #232326 100%);
    color: #f4f2ea;
    box-shadow: 0 0.06em 0.12em rgb(0 0 0 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.06);
    perspective: 400px;
}

/* Der Schlitz zwischen den beiden Blatthälften */
body.style-klappe .cd-digit::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    background: #0b0b0c;
}

body.style-klappe .cd-digit.is-turning {
    animation: cd-flap 0.4s cubic-bezier(0.3, 0.7, 0.4, 1);
}

@keyframes cd-flap {
    0% {
        transform: rotateX(-80deg);
        filter: brightness(0.6);
    }
}

body.style-klappe .cd-part {
    background: none;
    box-shadow: none;
}

body.style-klappe .cd-name {
    color: var(--s-muted);
}

body.style-klappe .cd-label {
    color: var(--s-text);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.style-klappe .cd-done {
    background: none;
    color: #f4f2ea;
}

body.style-klappe {
    background: radial-gradient(60rem 40rem at 50% 30%, #222226, #0c0c0e);
    color: var(--s-text);
}

@media (prefers-reduced-motion: reduce) {
    .cd-digit.is-turning {
        animation: none;
    }
}

/* Vorschaukacheln der Stile im Formular */
.style-sample-eigen { background: linear-gradient(135deg, #1b2350, #6b2fa3); color: #fff; }
.style-sample-klar { background: #fff; color: #111; box-shadow: inset 0 0 0 1px #e4e4df; }
.style-sample-nacht { background: #161920; color: #e3c27b; font-family: Georgia, serif; font-weight: 400; }
.style-sample-nackt { background: #000; color: #fff; font-family: "Courier New", monospace; font-weight: 400; }
.style-sample-plakat { background: #ffe500; color: #0b0b0b; font-weight: 900; }
.style-sample-klappe { background: #111113; color: #f4f2ea; font-family: "Helvetica Neue", Arial, sans-serif; letter-spacing: 0.15em; }

/* Lebenszeichen im Adminbereich */

.lifeline .button.alive {
    width: 100%;
    margin-top: 1rem;
    padding: 0.9rem;
    font-size: 1.05rem;
}

.life-facts {
    display: grid;
    gap: 0.35rem;
    margin: 0;
}

.life-facts div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.life-facts dt {
    color: var(--muted);
}

.life-facts dd {
    margin: 0;
    font-weight: 600;
}

.ha-setup {
    margin: 1rem 0 0.75rem;
}

.ha-setup summary {
    font-weight: 600;
    cursor: pointer;
}

.ha-setup ol {
    padding-left: 1.2rem;
}

.ha-setup li {
    margin-bottom: 0.9rem;
}

.ha-setup pre {
    margin: 0.4rem 0;
    padding: 0.65rem;
    border-radius: 8px;
    background: var(--bg);
    font-size: 0.78rem;
    overflow-x: auto;
}

.ha-setup pre.scroll {
    max-height: 14rem;
}

.webhook {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.4rem;
}

.webhook code {
    flex: 1;
    min-width: 0;
    padding: 0.5rem;
    border-radius: 8px;
    background: var(--bg);
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

/* Ab sechs Tagen ohne Lebenszeichen leuchtet alles rot */
body.admin.alarm {
    background: radial-gradient(60rem 40rem at 50% 0%, #ff2d2d 0%, #8a0000 55%, #3a0000 100%);
    animation: alarm-pulse 2.4s ease-in-out infinite;
}

@keyframes alarm-pulse {
    50% {
        filter: brightness(1.18) saturate(1.2);
    }
}

body.admin.alarm .lifeline {
    border-color: #ff4d4d;
    box-shadow: 0 0 0 4px rgb(255 77 77 / 0.35), 0 0 60px rgb(255 0 0 / 0.5);
}

body.admin.alarm .button.alive {
    background: #ff2d2d;
    border-color: #ff2d2d;
    animation: alarm-pulse 1.2s ease-in-out infinite;
}

.alarm-banner,
.mourning-banner {
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
}

.alarm-banner {
    background: rgb(0 0 0 / 0.35);
    color: #fff;
}

.alarm-mark {
    margin: 0;
    font-size: clamp(6rem, 30vw, 11rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 40px rgb(255 255 255 / 0.6);
}

.alarm-banner h1 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
}

.alarm-banner .button {
    margin-top: 0.5rem;
    background: #fff;
    border-color: #fff;
    color: #b00000;
}

.mourning-banner {
    background: #1b1b1f;
    color: #f1f1f4;
    box-shadow: inset 0 0 0 1px #3a3a42;
}

.mourning-banner .button {
    margin-top: 0.5rem;
}

/* Todesfall-Seite: still und würdevoll */
body.kind-dead {
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: radial-gradient(50rem 40rem at 50% 20%, #2b2d38 0%, #121318 70%);
    color: #e9e7e2;
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

.fw {
    width: 100%;
    max-width: 34rem;
}

.fw-preview {
    margin: 0 0 1rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.08);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 0.8rem;
    text-align: center;
}

.fw-card {
    text-align: center;
}

.fw-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(0.35);
    box-shadow: 0 0 0 1px rgb(255 255 255 / 0.15), 0 20px 50px -20px rgb(0 0 0 / 0.8);
}

.fw-card h1 {
    margin: 1.25rem 0 0;
    font-size: clamp(1.8rem, 7vw, 2.6rem);
    font-weight: 400;
    font-style: italic;
}

.fw-message {
    margin-top: 1.25rem;
    font-size: 1.15rem;
    line-height: 1.75;
    color: #cfccc4;
}

.fw-message a {
    color: #e9d9b0;
}

/* Adminbereich: Reiter, aktueller Start, Regeln */

.topbar {
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    gap: 0.25rem;
    margin-right: auto;
    margin-left: 0.75rem;
}

.tabs a {
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

.tabs a[aria-current="page"] {
    background: var(--surface);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line);
}

.now-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.now-target {
    margin: 0.2rem 0 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.now-target a {
    color: inherit;
}

.now-manual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.rules li.is-off .title {
    opacity: 0.55;
}

.rules .title .hint {
    display: block;
    margin-top: 0.2rem;
}

.rule-actions form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.days {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.5rem 0 0.75rem;
}

.day {
    margin: 0;
}

.day input {
    position: absolute;
    opacity: 0;
}

.day span {
    display: inline-grid;
    place-items: center;
    width: 2.6rem;
    height: 2.4rem;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.day input:checked + span {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.day input:focus-visible + span {
    outline: 2px solid var(--accent);
}

.rules li {
    flex-direction: column;
    align-items: stretch;
}

.rule-actions {
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 30rem) {
    /* Auf dem Handy nur das Monogramm, damit Reiter und Abmelden in eine Zeile passen */
    .brand > span {
        display: none;
    }

    .tabs {
        margin-left: 0.25rem;
    }
}

.fw-secret {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgb(255 255 255 / 0.12);
    font-family: ui-sans-serif, system-ui, sans-serif;
    color: #b9b6ae;
}

.fw-secret.is-open {
    font-family: inherit;
    animation: sc-reveal 0.6s ease-out;
}

.fw-secret p {
    margin: 0 0 1rem;
}

.fw-pin {
    display: flex;
    gap: 0.5rem;
    max-width: 20rem;
    margin: 0 auto;
}

.fw-pin input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1rem;
    border: 1px solid rgb(255 255 255 / 0.18);
    border-radius: 12px;
    background: rgb(255 255 255 / 0.05);
    color: #e9e7e2;
    font: inherit;
    letter-spacing: 0.2em;
    text-align: center;
}

.fw-pin input[aria-invalid="true"] {
    border-color: #ff8b8b;
    animation: sc-shake 0.4s;
}

.fw-pin button {
    padding: 0 1.2rem;
    border: 0;
    border-radius: 12px;
    background: #e9d9b0;
    color: #1b1608;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.fw-secret .fw-wrong {
    margin: 0.75rem 0 0;
    color: #ff9b9b;
}

.admin-footer {
    padding: 0.5rem 0 1rem;
    color: var(--muted);
    font-size: 0.75rem;
    text-align: center;
    opacity: 0.7;
}

/* Besucherzahlen */
.scans {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.6rem;
}

.spark {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 1.4rem;
    vertical-align: middle;
}

.spark i {
    width: 4px;
    border-radius: 1px;
    background: var(--accent);
}

.spark i.zero {
    opacity: 0.25;
}

.views {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.35rem;
    color: var(--muted);
    font-size: 0.8rem;
    vertical-align: middle;
}

.views .spark {
    height: 1rem;
}

.views .spark i {
    width: 3px;
}

/* QR-Code einer Seite */
.qr-admin {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.qr-admin summary {
    font-weight: 600;
    cursor: pointer;
}

.qr-preview {
    width: min(100%, 15rem);
    margin: 0.75rem auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--line);
}

.qr-preview svg {
    display: block;
    width: 100%;
    height: auto;
}

.qr-options {
    align-items: center;
}

.qr-options input[type="color"] {
    width: 3rem;
    height: 2.4rem;
    padding: 0.15rem;
}

/* Ja/Nein-Frage */
body.kind-question {
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: linear-gradient(160deg, #ffe4ec 0%, #fff1d6 100%);
    color: #2b1720;
}

.yn-card {
    position: relative;
    width: 100%;
    max-width: 28rem;
    min-height: 22rem;
    padding: 2.25rem 1.5rem;
    border-radius: 28px;
    background: #fff;
    text-align: center;
    box-shadow: 0 30px 70px -30px rgb(150 40 80 / 0.4);
    overflow: hidden;
}

.yn-card h1 {
    margin: 0.5rem 0 1.75rem;
    font-size: clamp(1.6rem, 6.5vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.yn-answers {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.yn-answers button,
.yn-form button {
    min-width: 7.5rem;
    padding: 0.95rem 1.4rem;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
}

.yn-yes,
.yn-form button {
    background: linear-gradient(100deg, #ff3d77, #ff7a45);
    color: #fff;
    box-shadow: 0 12px 30px -12px rgb(255 61 119 / 0.7);
}

.yn-no {
    background: #f3eef0;
    color: #6b5560;
    transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.yn-no.gave-up {
    font-size: 0.85rem;
    opacity: 0.8;
}

.yn-big {
    margin: 0;
    color: #ff3d77;
}

.yn-big .glyph {
    width: 3.5rem;
    height: 3.5rem;
}

.yn-sad {
    color: #c9b6be;
}

.yn-form {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.yn-form p {
    margin: 0 0 0.25rem;
    font-weight: 700;
}

.yn-form input {
    padding: 0.85rem 1rem;
    border: 1.5px solid #f1dce4;
    border-radius: 14px;
    font: inherit;
}

.yn-form .gw-status {
    font-weight: 700;
}

.yn-form:has(.gw-status[data-state="success"]) > :not(.gw-status) {
    display: none;
}

/* Konfetti nach einem Ja */
.yn-confetti i {
    position: absolute;
    top: -12px;
    left: var(--x);
    width: 8px;
    height: 14px;
    border-radius: 2px;
    background: hsl(var(--h) 90% 60%);
    animation: yn-fall 2.4s var(--d) ease-in forwards;
    pointer-events: none;
}

@keyframes yn-fall {
    to {
        transform: translateY(26rem) rotate(540deg);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yn-confetti {
        display: none;
    }
}

body.styled .yn-card {
    background: var(--s-card);
    color: var(--s-text);
    border-radius: var(--s-radius);
    box-shadow: var(--s-shadow);
}

body.styled :is(.yn-yes, .yn-form button) {
    background: var(--s-accent);
    color: var(--s-accent-text);
    box-shadow: none;
}

body.styled :is(.yn-no, .yn-form input) {
    background: var(--s-soft);
    color: var(--s-text);
    border-color: var(--s-line);
}

/* Sprachnachricht */
body.kind-voice {
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: radial-gradient(60rem 40rem at 50% 0%, #2c1d52 0%, #120c24 70%);
    color: #f2eefc;
}

.vo-card {
    width: 100%;
    max-width: 26rem;
    text-align: center;
}

.vo-card h1 {
    margin: 0 0 1.75rem;
    font-size: clamp(1.6rem, 6.5vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.vo-play {
    position: relative;
    display: grid;
    place-items: center;
    width: 11rem;
    height: 11rem;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 20px 60px -15px rgb(236 72 153 / 0.6);
    transition: transform 0.2s ease;
}

.vo-play:active {
    transform: scale(0.96);
}

.vo-play img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.vo-play.is-playing {
    animation: vo-pulse 1.6s ease-in-out infinite;
}

@keyframes vo-pulse {
    50% {
        box-shadow: 0 0 0 14px rgb(236 72 153 / 0.18), 0 20px 60px -15px rgb(236 72 153 / 0.6);
    }
}

.vo-icon {
    position: relative;
    width: 3.6rem;
    height: 3.6rem;
    fill: currentColor;
    filter: drop-shadow(0 2px 8px rgb(0 0 0 / 0.35));
}

.vo-icon-pause,
.is-playing .vo-icon-play {
    display: none;
}

.is-playing .vo-icon-pause {
    display: inline;
}

.vo-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 4rem;
    margin: 2rem 0 0.5rem;
    cursor: pointer;
}

.vo-wave i {
    flex: 1;
    height: calc(var(--v) * 100%);
    border-radius: 3px;
    background: rgb(255 255 255 / 0.25);
    transition: background 0.15s ease;
}

.vo-wave i.is-played {
    background: linear-gradient(180deg, #c4b5fd, #f9a8d4);
}

.vo-time {
    margin: 0;
    color: rgb(255 255 255 / 0.6);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.vo-text {
    margin: 1.75rem 0 0;
    color: rgb(255 255 255 / 0.85);
    line-height: 1.6;
}

/* Aufnehmen im Adminbereich */
.voice-recorder {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.voice-recorder audio,
.voice-current {
    width: 100%;
    margin-bottom: 0.5rem;
}

body.styled .vo-play {
    background: var(--s-accent);
    color: var(--s-accent-text);
    box-shadow: none;
}

body.styled .vo-wave i {
    background: color-mix(in srgb, var(--s-text) 22%, transparent);
}

body.styled .vo-wave i.is-played {
    background: var(--s-accent);
}

body.styled :is(.vo-time, .vo-text) {
    color: var(--s-muted);
}

.schedule {
    margin: 0.5rem 0 0.75rem;
}

.schedule summary {
    font-weight: 600;
    cursor: pointer;
}

/* Fitness: Grün, Aurora und Herzschlag-Linie */
body.kind-fitness {
    background: #03120a;
    color: #e9fff3;
    overflow-x: hidden;
}

.fit-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(70rem 50rem at 50% -10%, #0c3a22 0%, #051d11 55%, #020c07 100%);
}

.fit-bg .blob {
    position: absolute;
    width: 55vmax;
    height: 55vmax;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
    animation: fit-drift 18s ease-in-out infinite alternate;
}

.fit-bg .b1 { top: -15vmax; left: -10vmax; background: #10c46a; }
.fit-bg .b2 { bottom: -20vmax; right: -15vmax; background: #0a8f5c; animation-duration: 24s; animation-delay: -6s; }
.fit-bg .b3 { top: 30%; left: 35%; width: 35vmax; height: 35vmax; background: #7bff6b; opacity: 0.22; animation-duration: 30s; animation-delay: -12s; }

@keyframes fit-drift {
    to {
        transform: translate(14vmax, 8vmax) scale(1.2);
    }
}

/* Ein Lichtpunkt läuft als Herzschlag über die Linie */
.fit-ecg {
    position: absolute;
    left: 0;
    bottom: 12%;
    width: 100%;
    height: 22vh;
}

.fit-ecg path {
    fill: none;
    stroke: #7bff9d;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 22 78;
    filter: drop-shadow(0 0 8px #3dff8b);
    vector-effect: non-scaling-stroke;
    animation: fit-beat 4.5s linear infinite;
    opacity: 0.85;
}

@keyframes fit-beat {
    from {
        stroke-dashoffset: 100;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.fit {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.5rem;
    width: 100%;
    max-width: 30rem;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 2rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
    align-content: start;
}

.fit-name {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8be6ae;
    text-align: center;
}

.fit-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem 1.4rem;
    border-radius: 26px;
    background: rgb(255 255 255 / 0.06);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #9ab8a8;
}

.fit-status > div {
    flex: 1;
}

.fit-status > .glyph {
    width: 2.2rem;
    height: 2.2rem;
    opacity: 0.5;
}

.fit-dot {
    flex: none;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    background: #5d7a6b;
}

.fit-state {
    margin: 0;
    font-size: clamp(1.4rem, 6.5vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.fit-place {
    margin: 0.2rem 0 0;
    font-size: 0.95rem;
    min-height: 1.2em;
}

.fit-status.is-active {
    background: linear-gradient(135deg, rgb(35 255 125 / 0.28), rgb(35 255 125 / 0.08));
    box-shadow: inset 0 0 0 1px rgb(120 255 170 / 0.5), 0 0 60px -10px rgb(35 255 125 / 0.7);
    color: #eafff2;
}

.fit-status.is-active .fit-dot {
    background: #3dff8b;
    box-shadow: 0 0 0 0 rgb(61 255 139 / 0.7);
    animation: fit-pulse 1.6s ease-out infinite;
}

.fit-status.is-active > .glyph {
    opacity: 1;
    color: #7bff9d;
}

@keyframes fit-pulse {
    to {
        box-shadow: 0 0 0 16px rgb(61 255 139 / 0);
    }
}

.fit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.fit-tile {
    padding: 1.1rem 1.1rem 1rem;
    border-radius: 22px;
    background: rgb(255 255 255 / 0.05);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.fit-tile.wide {
    grid-column: 1 / -1;
}

.fit-tile > .glyph {
    width: 1.4rem;
    height: 1.4rem;
    color: #5bf59a;
}

.fit-label {
    margin: 0.55rem 0 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8fb5a1;
}

.fit-value {
    margin: 0.15rem 0 0;
    white-space: nowrap;
    font-size: clamp(1.45rem, 7vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.fit-value small {
    font-size: 0.8rem;
    font-weight: 600;
    color: #8fb5a1;
    letter-spacing: 0;
}

.fit-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.fit-links a {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.07);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
    color: #d6f5e3;
    transition: background 0.15s ease, transform 0.15s ease;
}

.fit-links a:hover {
    background: rgb(61 255 139 / 0.25);
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .fit-bg .blob,
    .fit-ecg path,
    .fit-status.is-active .fit-dot {
        animation: none;
    }
}
