/*
 * ep-3 Bookingsystem - Mobile & Touch Layer
 * ------------------------------------------
 * Wird NACH default.min.css und css-client/default.css geladen.
 * Desktop (> 1024px, Maus) bleibt optisch weitgehend unverändert,
 * Tablet und Smartphone bekommen ein eigenes, touchfreundliches Layout.
 *
 * Breakpoints:
 *   <= 1024px  Tablet / kleines Notebook (Burger-Menü im Header)
 *   <=  768px  Smartphone quer / kleines Tablet
 *   <=  480px  Smartphone hoch
 *   (pointer: coarse)  Touch-Geräte unabhängig von der Breite
 */

/* ============================================================
   1. Basis (alle Geräte)
   ============================================================ */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(84, 123, 151, 0.25);
}

body {
    min-width: 0;                       /* war 380px: zwang Querscrollen auf kleinen Handys */
}

a, button, input, select, textarea, label, .calendar-cell {
    touch-action: manipulation;         /* kein Doppeltipp-Zoom, keine Klickverzögerung */
}

/* Sichtbarer Fokus für Tastatur, kein Ring bei Maus/Touch */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.default-button:focus-visible {
    outline: 2px solid #547B97;
    outline-offset: 2px;
}

/* Formularelemente nie breiter als ihr Container */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    max-width: 100%;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Klick-"Hüpfer" (top: 1px) verursacht Layout-Shift, durch Transform ersetzt */
a:active,
a#logo:active,
.default-button:active,
a.default-button:active {
    top: 0;
    -webkit-transform: translateY(1px);
    transform: translateY(1px);
}

/* Burger-Button: standardmäßig versteckt */
#nav-toggle { display: none; }

/* ============================================================
   2. Kalender: Scroll-Container (alle Geräte)
   ============================================================ */

.calendar-scroller {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.calendar-scroller-inner {
    position: relative;                 /* Bezugspunkt für Event-Overlays, scrollt mit */
    min-width: 100%;
}

/* Legende (Zeiten bzw. Plätze) bleibt beim horizontalen Scrollen stehen */
.calendar-table > tbody > tr > td.calendar-time-col,
.calendar-table > tbody > tr > td.calendar-square-col,
.calendar-table > tr > td.calendar-time-col,
.calendar-table > tr > td.calendar-square-col {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 300;
    background: #FFF;
}

.calendar-scroller.is-scrollable .calendar-time-col,
.calendar-scroller.is-scrollable .calendar-square-col {
    -webkit-box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.35);
    box-shadow: 6px 0 8px -6px rgba(0, 0, 0, 0.35);
}

/* Tagesüberschrift bleibt beim Wischen sichtbar */
.calendar-scroller.is-scrollable .calendar-date-row td { text-align: left; }

.calendar-scroller.is-scrollable .calendar-date-row td > div {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    display: inline-block;
    padding: 0 8px;
}

.calendar-scroller.is-scrollable .calendar-date-row td > .day-label { display: block; width: -webkit-max-content; width: max-content; }

.calendar-scroller.is-scrollable .calendar-date-col .calendar-date-row td > div { left: 96px; left: var(--legend-w, 96px); }

/* Hinweis "wischen" nur wenn wirklich scrollbar */
.calendar-swipe-hint {
    display: none;
    margin: 0 0 8px 0;
    color: #666;
    font-size: 12px;
    text-align: center;
}

.calendar-scroller.is-scrollable + .calendar-swipe-hint,
.calendar-swipe-hint.is-visible { display: block; }

/* ============================================================
   3. Buchungs-Popup (Squarebox) und Admin-Menü
   ============================================================ */

#squarebox-overlay {
    position: fixed !important;
    left: 0 !important; top: 0 !important;
    right: 0; bottom: 0;
    width: auto !important;
    height: auto !important;
}

#squarebox-wrap {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    z-index: 1536;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 16px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    overflow: hidden;
}

#squarebox-wrap > .squarebox {
    position: relative;
    margin: 0;
    max-width: min(100%, 720px);
    max-height: 100%;
    min-width: 280px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.squarebox a.squarebox-primary-close-link,
.squarebox a.squarebox-primary-close-link:hover {
    right: 6px;
    top: 6px;
    z-index: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    line-height: 36px;
    text-align: center;
}

#squarebox-wrap #sb-button { margin-top: 4px; }

html.squarebox-open,
html.squarebox-open body {
    overflow: hidden;                   /* Hintergrund scrollt nicht mit */
}

/* jQuery-UI Datepicker immer über Popup und Sticky-Spalten */
.ui-datepicker { z-index: 2000 !important; }

/* ============================================================
   4. Touch-Geräte (unabhängig von Breite)
   ============================================================ */

@media (pointer: coarse) {

    .default-button,
    a.default-button:link,
    a.default-button:visited,
    input[type="submit"].default-button {
        min-height: 44px;
        padding: 10px 16px;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        line-height: 22px;
        vertical-align: middle;
    }

    .mini-button,
    a.mini-button:link,
    a.mini-button:visited {
        min-height: 36px;
        padding: 7px 12px;
        line-height: 20px;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    select {
        min-height: 44px;
        font-size: 16px;                /* < 16px löst iOS-Autozoom aus */
    }

    .inline-label { top: 13px; font-size: 14px; }

    /* Hover-Effekte, die auf Touch "kleben" bleiben, neutralisieren */
    a:hover { opacity: 0.75; }
    .tab-active:hover { opacity: 1; }

    /* Kalenderzellen fingertauglich */
    .calendar-core-row td { height: 44px; }
    .calendar-cell { padding: 17px 0; font-size: 11px; }
    .cc-height-2 { padding: 10px 0 9px 0; }

    /* Datepicker größer */
    .ui-datepicker { font-size: 15px; }
    .ui-datepicker td a,
    .ui-datepicker td span { padding: 10px 4px !important; text-align: center !important; }
    .ui-datepicker .ui-datepicker-prev,
    .ui-datepicker .ui-datepicker-next { width: 40px !important; height: 40px !important; top: 2px !important; }
}

/* ============================================================
   5. Tablet / kleines Notebook  (<= 1024px)
   ============================================================ */

@media screen and (max-width: 1024px) {

    body {
        padding: 12px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    /* ---------- Header mit Burger-Menü ---------- */

    #header {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        height: auto;
        min-height: 0;
        margin-bottom: 12px;
        padding-bottom: 12px;
        overflow: visible;
    }

    #label {
        position: relative;
        left: auto; top: auto;
        -webkit-box-flex: 1;
        -ms-flex: 1 1 0%;
        flex: 1 1 0%;
        min-width: 0;
        height: auto;
        min-height: 56px;
        padding: 0 8px 0 68px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        background: transparent !important;
    }

    #logo {
        width: 56px; height: 56px;
        top: 50%;
        margin-top: -28px;
        background-size: contain;
    }

    a#logo:active { top: 50%; }

    #label-client,
    #label-service,
    #branding {
        margin: 0 !important;
        text-indent: 0 !important;
        text-align: left !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #label-client  { font-size: 13px !important; }
    #label-service { font-size: 18px !important; line-height: 1.25; }
    #branding      { font-size: 11px; margin-top: 2px !important; }

    #nav-toggle {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -ms-flex-negative: 0;
        flex-shrink: 0;
        width: 48px; height: 48px;
        margin: 0; padding: 0;
        border: solid 1px #666;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.06);
        color: #FFF;
        cursor: pointer;
    }

    #nav-toggle span {
        display: block;
        width: 22px; height: 2px;
        margin: 2.5px 0;
        border-radius: 2px;
        background: #FFF;
        -webkit-transition: -webkit-transform 0.2s ease, opacity 0.2s ease;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    #nav-toggle[aria-expanded="true"] span:nth-child(1) { -webkit-transform: translateY(7px) rotate(45deg); transform: translateY(7px) rotate(45deg); }
    #nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    #nav-toggle[aria-expanded="true"] span:nth-child(3) { -webkit-transform: translateY(-7px) rotate(-45deg); transform: translateY(-7px) rotate(-45deg); }

    #nav-toggle .nav-toggle-label {
        position: absolute;
        width: 1px; height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    /* Topbar wird zum aufklappbaren Menü */
    #topbar {
        display: none;
        position: static;
        -webkit-box-ordinal-group: 4;
        -ms-flex-order: 3;
        order: 3;
        -ms-flex-preferred-size: 100%;
        flex-basis: 100%;
        width: 100%;
        height: auto;
        margin: 12px 0 0 0;
        padding: 4px 0 0 0;
        overflow: visible;
        text-align: left;
        white-space: normal;
        border-top: solid 1px #555;
    }

    #topbar.is-open {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -ms-flex-direction: column;
        flex-direction: column;
    }

    /* Alle Einträge zeigen (vorher per responsive-pass versteckt) */
    #topbar > div,
    #topbar > div:not(#topbar-contact):not(#topbar-separator) {
        display: block !important;
        float: none !important;
        margin: 0 !important;
        padding: 12px 0 12px 48px !important;
        min-height: 32px;
        background-position: 4px center !important;
        background-size: 28px auto !important;
        border-bottom: solid 1px #444;
    }

    #topbar > div:last-of-type { border-bottom: none; }

    #topbar #topbar-separator { display: none !important; }

    #topbar p { margin: 0; line-height: 1.35; }
    #topbar .large-text { font-size: 16px; }

    #topbar a.unlined { display: inline-block; padding: 2px 0; }

    /* Sprachwahl als Reihe */
    #topbar #topbar-i18n {
        position: static !important;
        -webkit-box-ordinal-group: 10;
        -ms-flex-order: 9;
        order: 9;
        padding: 12px 0 !important;
        background: none !important;
    }

    #topbar-i18n > div { display: inline-block; margin-right: 12px; }
    #topbar-i18n img { width: 32px; height: auto; vertical-align: middle; }

    /* ---------- Inhalt ---------- */

    #content { padding: 0; }

    .panel,
    .centered-panel {
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        max-width: 100%;
    }

    /* ---------- Kalender-Toolbar ---------- */

    #calendar-toolbar {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 12px;
        text-align: left;
    }

    #calendar-toolbar > .panel {
        display: block !important;
        float: none !important;
        margin: 0 !important;
        -webkit-box-flex: 1;
        -ms-flex: 1 1 320px;
        flex: 1 1 320px;
    }

    /* Toolbar-Tabellen in flexible Reihen umwandeln */
    #calendar-toolbar table,
    #calendar-toolbar tbody,
    #calendar-toolbar tr {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        gap: 8px;
        width: 100%;
        height: auto !important;
        margin: 0;
    }

    #calendar-toolbar td {
        display: block;
        padding: 0 !important;
        border: none !important;
    }

    /* Datumsnavigation:  [<] [Heute] [ Datum ......... ] [>] */
    #calendar-toolbar-datepicker tr { -ms-flex-wrap: nowrap; flex-wrap: nowrap; }
    #calendar-toolbar-datepicker td:nth-child(3) { -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; }
    #calendar-toolbar-datepicker form,
    #calendar-toolbar-datepicker .inline-element { display: block; width: 100%; }
    #calendar-toolbar-datepicker #c-date { width: 100% !important; text-align: center; }

    #calendar-toolbar a.symbolic-button {
        width: 44px;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
    }

    /* Nutzer-Panel (offline): Text, E-Mail, Passwort, Login, Hilfe */
    #calendar-toolbar-userpanel td.responsive-pass-3,
    #calendar-toolbar-userpanel td.responsive-pass-4,
    #calendar-toolbar-userpanel td.responsive-pass-5 { display: block !important; }

    #calendar-toolbar-userpanel td:empty { display: none !important; }

    #calendar-toolbar-userpanel form { display: block; width: 100%; }

    #calendar-toolbar-userpanel td:first-child { -ms-flex-preferred-size: 100%; flex-basis: 100%; line-height: 1.5; }

    #calendar-toolbar-userpanel td.responsive-pass-5 { display: none !important; }   /* "oder einfach hier anmelden" */

    #calendar-toolbar-userpanel td.responsive-pass-3 { -webkit-box-flex: 1; -ms-flex: 1 1 180px; flex: 1 1 180px; min-width: 0; }
    #calendar-toolbar-userpanel > form td:first-child { padding-bottom: 4px !important; }
    #calendar-toolbar-userpanel td.responsive-pass-3 .inline-element { display: block; }
    #calendar-toolbar-userpanel #lf-email,
    #calendar-toolbar-userpanel #lf-pw { width: 100% !important; }

    /* Nutzer-Panel (online) */
    #userpanel-status { white-space: normal; color: #666; }

    /* ---------- Tabs scrollen horizontal ---------- */

    .tabs-panel {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs-panel::-webkit-scrollbar { display: none; }
    .tab-align-right { float: none; }

    /* ---------- Zurück- und Weiter-Links unter dem Inhalt ---------- */

    .links { margin-top: 16px; }
    .links-back,
    .links-forth { margin: 8px 16px; }
    .links-forth li { margin-bottom: 8px; }
    .links-forth a { display: inline-block; padding: 4px 0; }

    /* ---------- Footer ---------- */

    #footer { line-height: 1.8; padding-bottom: env(safe-area-inset-bottom); }
}

/* ============================================================
   6. Smartphone  (<= 768px)
   ============================================================ */

@media screen and (max-width: 768px) {

    body {
        padding: 8px;
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
        font-size: 14px;
        line-height: 1.45;
    }

    h1 { font-size: 22px; line-height: 1.25; }
    h2 { font-size: 18px; }

    .large-text { font-size: 17px; }
    .small-text { font-size: 12px; }
    .tiny-text  { font-size: 11px; }

    .panel,
    .centered-panel {
        margin-bottom: 12px;
        padding: 14px;
        border-radius: 8px;
    }

    .padded { padding: 8px 0; }

    .default-button,
    a.default-button:link,
    a.default-button:visited { font-size: 14px; }

    input[type="text"],
    input[type="password"],
    textarea,
    select { font-size: 16px; }

    /* ---------- Inhaltsseiten: Overflow abfangen ---------- */

    .content-panel {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-panel img { height: auto; }

    /* Lange Texte / URLs umbrechen */
    .content-panel p,
    .content-panel li,
    .content-panel td { overflow-wrap: anywhere; word-wrap: break-word; }

    /* ---------- Formular- und Listentabellen stapeln ---------- */

    .default-table,
    .default-table > tbody { display: block; width: 100%; }

    .default-table tr {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        gap: 6px 12px;
        padding: 6px 0;
    }

    .default-table td {
        display: block;
        padding: 0 !important;
        height: auto !important;
        max-width: 100%;
    }

    .default-table td:not(.default-form-label-row) { -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto; }

    .default-form-label-row {
        -ms-flex-preferred-size: 100%;
        flex-basis: 100%;
        padding: 4px 0 0 0 !important;
        text-align: left !important;
        font-weight: bold;
        color: #555;
    }

    .default-table input[type="text"],
    .default-table input[type="password"],
    .default-table input[type="email"],
    .default-table textarea,
    .default-table select { width: 100% !important; min-width: 0 !important; }

    .default-table input[type="submit"] { width: 100%; }

    .default-form-notes { margin-left: 0; font-size: 12px; }
    .default-form-errors { padding-left: 0; font-size: 12px; }

    /* Liste "Meine Buchungen": jede Buchung als Karte */
    .middle-table tr { border-bottom: solid 1px #E2E2E2; padding: 10px 0; }
    .middle-table tr:last-child { border-bottom: none; }

    /* Zweispaltige Tabellen untereinander */
    .half-table { display: block; width: 100% !important; }

    .bordered-table tr td { padding: 6px; }

    /* ---------- Meldungen ---------- */

    .default-message,
    .success-message,
    .info-message,
    .error-message { padding: 10px 10px 10px 44px; background-position: 10px 12px; }

    .dismiss-message-link { display: inline-block; padding: 0 6px; font-size: 20px; line-height: 1; }

    /* ---------- Kalender ---------- */

    #calendar.panel { padding: 8px; }

    .calendar-time-col,
    .calendar-time-table { width: 64px !important; }

    .calendar-square-col,
    .calendar-square-table { width: 96px !important; }

    .calendar-time-table td,
    .calendar-square-table td { padding: 3px 4px; }

    .cts-label { font-size: 12px; }
    .cte-label { font-size: 10px; }

    .square-label {
        font-size: 12px;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .day-label { font-size: 13px; }
    .date-label { font-size: 12px; }

    .calendar-date-row td { height: 46px; }

    /* ---------- Buchungs-Popup als Bottom-Sheet ---------- */

    #squarebox-wrap {
        -webkit-box-align: end;
        -ms-flex-align: end;
        align-items: flex-end;
        padding: 0;
        padding-top: max(24px, env(safe-area-inset-top));
    }

    #squarebox-wrap > .squarebox {
        width: 100%;
        min-width: 0;
        max-height: 92%;
        margin: 0;
        padding: 20px 14px;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
        border-radius: 16px 16px 0 0;
        -webkit-animation: squarebox-sheet-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
        animation: squarebox-sheet-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    /* Griff-Strich oben */
    #squarebox-wrap > .squarebox::before {
        content: "";
        display: block;
        width: 40px; height: 4px;
        margin: -10px auto 12px auto;
        border-radius: 4px;
        background: #CCC;
    }

    .squarebox a.squarebox-primary-close-link,
    .squarebox a.squarebox-primary-close-link:hover {
        position: -webkit-sticky;
        position: sticky;
        float: right;
        top: 0;
        right: 0;
        margin: -12px -4px 0 8px;
    }

    .squarebox .padded { padding: 4px 0; }

    .squarebox .default-button,
    .squarebox a.default-button:link,
    .squarebox a.default-button:visited { display: block; width: 100%; white-space: normal; }

    .squarebox select { width: 100%; margin-bottom: 10px; }

    .squarebox .sb-player-name input { display: block; width: 100%; margin-bottom: 6px; }

    /* Admin-Menü als Vollbreite-Panel */
    .adminbox {
        position: fixed !important;
        left: 8px !important; right: 8px !important;
        top: 72px !important;
        max-height: calc(100% - 88px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Datepicker passt immer auf den Bildschirm */
    .ui-datepicker {
        width: auto !important;
        min-width: 280px;
        max-width: calc(100vw - 16px);
    }

    /* Nicht-benötigte Desktop-Abstände */
    .separator { margin: 12px 0; }
}

@-webkit-keyframes squarebox-sheet-in {
    from { -webkit-transform: translateY(40px); opacity: 0.4; }
    to   { -webkit-transform: translateY(0); opacity: 1; }
}

@keyframes squarebox-sheet-in {
    from { transform: translateY(40px); opacity: 0.4; }
    to   { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   7. Kleine Smartphones  (<= 480px)
   ============================================================ */

@media screen and (max-width: 480px) {

    #label { padding-left: 60px; min-height: 48px; }
    #logo { width: 48px; height: 48px; margin-top: -24px; }
    #label-service { font-size: 16px !important; }
    #branding { display: none; }

    #nav-toggle { width: 44px; height: 44px; }

    /* Offline-Panel: Felder untereinander, Login + Hilfe in einer Reihe */
    #calendar-toolbar-userpanel > form td.responsive-pass-3 { -ms-flex-preferred-size: 100%; flex-basis: 100%; }
    #calendar-toolbar-userpanel > form td:nth-last-child(2) { -webkit-box-flex: 1; -ms-flex: 1 1 auto; flex: 1 1 auto; }
    #calendar-toolbar-userpanel > form td:nth-last-child(2) .default-button { width: 100%; }

    /* Online-Panel: Buttons als 2er-Raster */
    #calendar-toolbar-userpanel > table td:not(.responsive-pass-4) { -webkit-box-flex: 1; -ms-flex: 1 1 40%; flex: 1 1 40%; }
    #calendar-toolbar-userpanel > table td:last-child { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; }
    #calendar-toolbar-userpanel > table td .default-button { display: block; width: 100%; -webkit-box-sizing: border-box; box-sizing: border-box; }
    #calendar-toolbar-userpanel > table td.responsive-pass-4 { -ms-flex-preferred-size: 100%; flex-basis: 100%; }

    .links-back,
    .links-forth { display: block; margin: 12px 8px; }

    .badge { padding: 10px 14px; font-size: 22px; }
}

/* ============================================================
   8. Bewegung reduzieren (Barrierefreiheit + Akku)
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        -webkit-animation-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        -webkit-transition-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   9. Druck: Mobil-Elemente ausblenden
   ============================================================ */

@media print {
    #nav-toggle,
    .calendar-swipe-hint { display: none !important; }

    .calendar-scroller { overflow: visible !important; }

    .calendar-time-col,
    .calendar-square-col { position: static !important; box-shadow: none !important; }
}
