body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f6f8fa;
    color: #1f2328;
}
.wrap {
    max-width: 768px;
    margin: 2rem auto;
    padding: 0 1rem;
}
h1 {
    margin: 0.5rem 0 1.25rem 0;
    text-align: center;
}
.hint {
    margin: 0 auto 1rem;
    color: #57606a;
    text-align: justify;
    hyphens: auto;
    line-height: 1.55;
}
.toolbar {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    background: #ffffff;
}
.toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.98rem;
    user-select: none;
}
.toolbar input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #0969da;
}
.is-booked {
    opacity: 0.5;
}
body.hide-booked-slots .slot-row.is-booked {
    display: none;
}
body.hide-booked-slots .week-block:not(:has(.slot-row:not(.is-booked))) {
    display: none;
}
.week-block {
    margin-bottom: 1.75rem;
}
.week-block:last-child {
    margin-bottom: 0;
}
.week-heading {
    margin: 0 0 0.65rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #24292f;
    padding-bottom: 0.35rem;
}
.slot-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(31, 35, 40, 0.04);
}
.slot-row {
    display: grid;
    grid-template-columns:
        minmax(1rem, 0.8fr)
        minmax(1rem, 1fr)
        minmax(1rem, 0.5fr)
        minmax(10rem, 0.5fr);
    gap: 0.75rem 1rem;
    align-items: center;
    justify-items: start;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #eaeef2;
    font-size: 0.9rem;
}
.slot-row:last-child {
    border-bottom: none;
}
.slot-day {
    font-weight: 600;
}
.slot-time {
    color: #57606a;
    font-variant-numeric: tabular-nums;
}
.status {
    display: inline-block;
    box-sizing: border-box;
    width: 6rem;
    text-align: center;
    font-size: 0.82rem;
    border-radius: 999px;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
}
.free {
    color: #116329;
    background: #dafbe1;
}
.booked {
    color: #9a6700;
    background: #fff8c5;
}
.pending {
    color: #6f4500;
    background: #ffe7c2;
}
.slot-action {
    justify-self: stretch;
    align-self: center;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0 0.2rem;
}
a.cta {
    display: block;
    box-sizing: border-box;
    width: 100%;
    text-decoration: none;
    text-align: center;
    border: 1px solid #0969da;
    color: white;
    background: #0969da;
    padding: 0.2rem 0.2rem;
    border-radius: 8px;
    font-size: 1em;
    white-space: nowrap;
}
.disabled {
    color: #57606a;
    font-size: 1em;
}
.error {
    background: #ffebe9;
    border: 1px solid #ff818266;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    color: #cf222e;
}
.notice,
.filter-empty-hint {
    background: #ddf4ff;
    border: 1px solid #54aeff66;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    color: #0969da;
}
@media (max-width: 640px) {
    .slot-row {
        grid-template-columns: minmax(1rem, 0.5fr) minmax(1rem, 0.5fr) auto;
        grid-template-rows: auto auto;
        gap: 0.65rem 0.5rem;
        align-items: start;
        justify-items: start;
        padding: 0.75rem 0.85rem;
    }
    .slot-row .slot-day {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        overflow-wrap: anywhere;
        word-wrap: break-word;
        hyphens: auto;
    }
    .slot-row .slot-time {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        overflow-wrap: anywhere;
        word-wrap: break-word;
    }
    .slot-row .status {
        grid-column: 3;
        grid-row: 1;
        align-self: start;
    }
    .slot-row .slot-action {
        grid-column: 1 / -1;
        grid-row: 2;
        padding: 0;
        justify-self: stretch;
    }
}
.footer-section {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #d0d7de;
    color: #57606a;
    font-size: 0.92rem;
    line-height: 1.5;
    text-align: center;
}
.footer-section .heart {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin: 0 0.15em;
    vertical-align: -0.125em;
    fill: #cf222e;
}

/* === Modal + Anfrageformular === */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(31, 35, 40, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1rem;
}
.modal[hidden] { display: none; }
body.modal-open { overflow: hidden; }
.modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.25rem;
    max-width: 32rem;
    width: 100%;
    box-shadow: 0 10px 25px rgba(31, 35, 40, 0.18);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-content h2 {
    margin: 0 0 0.5rem;
    color: #24292f;
    font-size: 1.2rem;
}
.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #57606a;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
.modal-close:hover { color: #1f2328; }
.modal-slot {
    margin: 0 0 1rem;
    color: #1f2328;
    font-size: 0.98rem;
}
.request-slot {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: #1f2328;
}
.request-form .field {
    display: block;
    margin-bottom: 0.85rem;
}
.request-form .field > span {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #1f2328;
}
.request-form .field > span small {
    font-weight: 400;
    color: #57606a;
}
.request-form input[type="text"],
.request-form input[type="email"],
.request-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.7rem;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font: inherit;
    color: #1f2328;
}
.request-form input:focus,
.request-form textarea:focus {
    outline: 2px solid #0969da;
    outline-offset: -1px;
    border-color: #0969da;
}
.request-form input[aria-invalid="true"] {
    border-color: #cf222e;
}
.request-form .field-error {
    margin-top: 0.3rem;
    font-size: 0.85rem;
    color: #cf222e;
}
.request-form textarea {
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.45;
    resize: vertical;
}
.request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #d0d7de;
    background: #ffffff;
    color: #1f2328;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}
.btn:hover { background: #f6f8fa; }
.btn.primary {
    border-color: #0969da;
    background: #0969da;
    color: #ffffff;
}
.btn.primary:hover { background: #0860c4; }
.btn.primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.btn.link {
    border: none;
    background: transparent;
    color: #0969da;
    padding: 0.5rem 0.4rem;
}
.btn.link:hover { background: transparent; text-decoration: underline; }
.confirm-card {
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(31, 35, 40, 0.04);
}
.confirm-card h2 {
    margin: 0 0 0.5rem;
    color: #24292f;
}
.confirm-card p {
    margin: 0.5rem 0;
    color: #1f2328;
    line-height: 1.5;
}
.confirm-card .confirm-warn {
    background: #fff8c5;
    border: 1px solid #d4a72c66;
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: #6f4500;
}
/* Altcha-Bot-Schutz: an Formular-Look angleichen (GitHub-Palette). */
.altcha-field {
    margin: 0.25rem 0 0.85rem;
}
.altcha-field altcha-widget {
    --altcha-max-width: 100%;
    --altcha-border-width: 1px;
    --altcha-border-radius: 8px;
    --altcha-color-border: #d0d7de;
    --altcha-color-border-focus: #0969da;
    --altcha-color-base: #ffffff;
    --altcha-color-text: #1f2328;
    --altcha-color-footer-bg: #f6f8fa;
    font-size: 0.9rem;
}
