:root {
    --green: #0f4638;
    --green-dark: #0a342a;
    --gold: #b78b45;
    --paper: #f6f2ea;
    --line: #ded7ca;
    --text: #172620;
    --muted: #66756f;
    --danger: #b32020;
    --success: #0f7a4f;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #fbfaf6 0%, var(--paper) 100%);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

.page {
    width: min(980px, 100%);
    margin: 0 auto;
    padding: 18px;
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(15, 70, 56, .08);
    margin: 0 0 18px;
    padding: 24px;
}

.hero {
    text-align: center;
    padding: 34px 22px;
}

.logo-mark {
    font-size: 62px;
    line-height: 1;
    color: #000;
}

.brand {
    font-size: 38px;
    letter-spacing: 14px;
    line-height: 1.05;
    margin: 8px auto 28px;
    max-width: 380px;
    border-bottom: 2px solid #111;
}

.brand span {
    display: block;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 8px;
    padding-bottom: 8px;
}

.eyebrow,
.form h2 + .muted,
.field span,
.upload span {
    color: var(--gold);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0 0 14px;
    line-height: 1.14;
}

h1 {
    font-size: clamp(2.2rem, 7vw, 4.2rem);
}

h2 {
    font-size: clamp(1.45rem, 4vw, 2rem);
    margin-top: 18px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.field,
.upload {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 15px;
    color: var(--text);
    font-size: 1.08rem;
    padding: 13px 15px;
    background: #fff;
}

.field textarea {
    resize: vertical;
}

.notice {
    background: #eef6f2;
    border-radius: 16px;
    color: var(--green);
    margin: 12px 0 18px;
    padding: 14px 16px;
}

.upload {
    background: #fbfaf6;
    border: 1px dashed #c9bda8;
    border-radius: 16px;
    padding: 16px;
}

/* Ausweis-Uploads fingerfreundlich (Ahmad 30.07.2026): der native Datei-Knopf
   war nur 24 px hoch – zu klein, gerade fuer aeltere Angehoerige am Handy. */
.upload input[type="file"] {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 9px;
    font-size: 1rem;
    cursor: pointer;
}

.upload input[type="file"]::file-selector-button {
    min-height: 40px;
    margin-right: 12px;
    padding: 0 16px;
    border: 0;
    border-radius: 11px;
    background: var(--green);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.full {
    grid-column: 1 / -1;
}

/* Zustimmung: groesseres Haekchen + ganze Zeile antippbar (Ahmad 30.07.2026) */
.check {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    margin: 18px 0;
    min-height: 48px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfaf6;
    cursor: pointer;
}

.check input {
    height: 28px;
    width: 28px;
    flex: 0 0 auto;
    margin-top: 1px;
}

/* Sprachumschalter: mind. 44 px hoch, damit man ihn am Handy sicher trifft */
.lang-switch {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px -4px 8px 0;
}

.lang-switch a {
    align-items: center;
    background: #eaf1ef;
    border-radius: 999px;
    color: #123c32;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    min-width: 54px;
    padding: 0 14px;
    text-decoration: none;
}

.lang-switch a.aktiv {
    background: #123c32;
    color: #fff;
}

/* Fortschrittsanzeige oben (Ahmad 30.07.2026): das Formular ist lang –
   so sieht man am Handy jederzeit, an welcher Stelle man gerade ist. */
.fortschritt {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line);
    padding: 6px 12px 8px;
}

.fortschritt-text {
    display: block;
    color: var(--green);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: .04em;
    margin-bottom: 5px;
    text-align: center;
}

.fortschritt-spur {
    background: #e7e0d3;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.fortschritt-balken {
    background: var(--gold);
    border-radius: 999px;
    height: 100%;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .25s ease;
}

body {
    padding-top: 46px;
}

.signature-box {
    border: 1px solid var(--line);
    border-radius: 18px;
    height: 190px;
    overflow: hidden;
    background: #fff;
}

canvas {
    display: block;
    height: 100%;
    width: 100%;
    touch-action: none;
}

button,
.link-button {
    border: 0;
    border-radius: 15px;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    padding: 14px 18px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
}

.primary {
    background: var(--green);
    color: #fff;
    width: 100%;
}

.primary:hover {
    background: var(--green-dark);
}

.secondary {
    background: #f7f3ea;
    border: 1px solid var(--line);
    color: var(--green);
    margin-top: 10px;
}

.small {
    padding: 10px 13px;
    width: auto;
}

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

.success {
    border-color: #bfe4d1;
    color: var(--success);
}

.error {
    border-color: #f1b7b7;
    color: var(--danger);
    background: #fff5f5;
}

.error-text {
    color: var(--danger);
    font-weight: 800;
}

.leipzig-only {
    display: none;
}

.admin-page {
    max-width: 1160px;
}

.admin-head,
.submission-row {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.submission-row {
    border-top: 1px solid var(--line);
    padding: 14px 0;
}

.submission-row div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.submission-row span {
    color: var(--muted);
    font-size: .9rem;
}

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

    .primary {
        width: auto;
    }
}

@media (max-width: 520px) {
    .page {
        padding: 10px;
    }

    .card {
        border-radius: 18px;
        padding: 18px;
    }

    .brand {
        font-size: 30px;
        letter-spacing: 9px;
    }

    .brand span {
        font-size: 15px;
        letter-spacing: 5px;
    }

    .field span,
    .upload span {
        display: block;
        min-height: 1.2em;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .submission-row {
        align-items: stretch;
        flex-direction: column;
    }
}
