/* ========================================================
   SECTION 1
   ======================================================== */
*,
*::before,
*::after {
    -webkit-tap-highlight-color: transparent !important;
}

/* --- Modern Mobile & Desktop Bottom Sheet Filter UI --- */
.modern-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.m-search-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.m-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.05rem;
    opacity: 0.55;
    pointer-events: none;
    z-index: 5;
    line-height: 1;
}

.m-search-input,
input.m-search-input {
    width: 100% !important;
    padding-left: 2.85rem !important;
    padding-right: 2.25rem !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
    font-size: 0.92rem !important;
    background: var(--surface) !important;
    background-image: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border: 1.5px solid var(--border) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    color: var(--text) !important;
    text-overflow: ellipsis;
}

.m-search-input::-webkit-search-decoration,
.m-search-input::-webkit-search-cancel-button,
.m-search-input::-webkit-search-results-button,
.m-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none !important;
    display: none !important;
}

.m-search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
    outline: none !important;
}

.m-search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface2, rgba(150, 150, 150, 0.15));
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    z-index: 5;
}

.m-search-clear:hover {
    background: var(--border);
    color: var(--text);
}

.m-active-chips {
    display: none !important;
}

.m-filter-trigger-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 44px;
    padding: 0 1.15rem;
    border-radius: 12px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    flex-shrink: 0;
    white-space: nowrap;
}

.m-filter-trigger-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.m-filter-trigger-btn.has-filter {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary);
}

.m-filter-badge {
    background: var(--primary);
    color: white;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: 99px;
    padding: 0.1rem 0.45rem;
    line-height: 1.2;
}

.m-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
    max-width: 860px;
    margin: 0 auto 0.75rem auto;
    padding: 0 0.2rem;
}

.m-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 99px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border: 1px solid rgba(79, 70, 229, 0.25);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.m-active-chip:hover {
    background: rgba(79, 70, 229, 0.2);
    transform: translateY(-1px);
}

.m-chip-x {
    font-weight: 800;
    font-size: 0.9rem;
    opacity: 0.7;
}

.m-bottom-sheet-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 250;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.m-bottom-sheet-backdrop.open {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.m-bottom-sheet-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 600px;
    height: 84vh;
    max-height: 86vh;
    min-height: 80vh;
    box-sizing: border-box;
    background: var(--surface, #ffffff);
    border-radius: 26px 26px 0 0;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 260;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    touch-action: pan-y;
    border: 1px solid var(--border);
    border-bottom: none;
    overflow: hidden;
}

.m-bottom-sheet-backdrop.open .m-bottom-sheet-panel {
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Desktop & iPad: Großzügiger, schwebender Dialog mit 3-Spalten Grid */
@media (min-width: 769px) {
    .m-bottom-sheet-panel {
        top: 50%;
        bottom: auto;
        transform: translateX(-50%) translateY(100vh) scale(0.96);
        pointer-events: none;
        width: min(92vw, 760px);
        max-width: 760px;
        height: 740px;
        max-height: 88vh;
        min-height: 620px;
        border-radius: 24px;
        border: 1px solid var(--border);
        box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.45);
        opacity: 0;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    }

    .m-bottom-sheet-backdrop.open .m-bottom-sheet-panel {
        transform: translateX(-50%) translateY(-50%) scale(1);
        opacity: 1;
        pointer-events: auto;
    }

    .m-sheet-drag-handle {
        display: none;
    }

    .m-sheet-header {
        padding: 1rem 2rem;
    }

    .m-sheet-body {
        padding: 1.6rem 2rem 2.25rem 2rem;
        gap: 1.8rem;
    }

    .m-sheet-footer {
        padding: 1.15rem 2rem !important;
        border-radius: 0 0 24px 24px;
    }

    .m-gemeinde-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.85rem;
    }
}

.m-sheet-drag-handle {
    width: 44px;
    height: 5px;
    background: rgba(150, 150, 150, 0.35);
    border-radius: 99px;
    margin: 10px auto 4px auto;
    cursor: pointer;
    flex-shrink: 0;
}

.m-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.m-sheet-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.m-sheet-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--surface2);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.m-sheet-close-btn:hover {
    background: var(--border);
}

.m-sheet-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem 1.25rem 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    flex: 1 1 auto;
    min-height: 0;
}

.m-section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.m-section-sub {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: none;
}

.m-gemeinde-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .m-gemeinde-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
}

.m-tile {
    background: var(--surface2);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 0.75rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    position: relative;
    min-width: 0;
    box-sizing: border-box;
}

.m-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.m-tile.selected {
    background: rgba(79, 70, 229, 0.08);
    border-color: var(--tile-color, var(--primary));
}

.m-tile-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.m-tile-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.m-tile-info {
    flex: 1;
    min-width: 0;
}

.m-tile-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.m-tile-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tile-color, var(--primary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.m-cat-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.m-cat-chip {
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 99px;
    padding: 0.45rem 0.95rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
}

.m-cat-chip:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.m-cat-chip.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.m-sheet-footer {
    position: relative;
    flex-shrink: 0;
    margin-top: auto;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 0.95rem 1.25rem calc(0.95rem + env(safe-area-inset-bottom, 12px)) 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

.m-reset-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.5rem 0.4rem;
    transition: color 0.2s;
}

.m-reset-btn:hover {
    color: #ef4444;
}

.m-apply-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light, #6366f1));
    color: white;
    border: none;
    padding: 0.8rem 1.4rem;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.m-apply-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

/* Pull-to-Refresh */
.ptr-container {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    z-index: 100;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.ptr-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: none;
    margin-right: 8px;
    transition: transform 0.2s;
}

.ptr-spinner.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
    background-size: 400% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 0.5rem;
    opacity: 0.7;
}

.skeleton-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-img {
    width: 100%;
    height: 160px;
    border-radius: 0.75rem;
}

.skeleton-title {
    width: 70%;
    height: 1.5rem;
}

.skeleton-text {
    width: 100%;
    height: 1rem;
}

.skeleton-text.short {
    width: 40%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Modern Empty States */
.empty-state-modern {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--surface2);
    border: 1px dashed var(--border);
    border-radius: 1.25rem;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.5;
    filter: grayscale(1);
    transition: all 0.3s;
}

.empty-state-modern:hover .empty-state-icon {
    transform: scale(1.1) rotate(-5deg);
    opacity: 1;
    filter: grayscale(0);
}

.empty-state-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.empty-state-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 250px;
}

.business-card,
.club-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-height: 220px;
}

.business-card:hover,
.club-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-light);
    cursor: pointer;
}

.business-card:active,
.club-card:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* OVERRIDE EVERYTHING FOR MOBILE & TABLET (IPAD) MODAL */
@media (max-width: 1024px) {

    #publicPortalModal.open,
    #publicRoomsModal.open,
    #publicRoomDetailModal.open,
    #legalModal.open,
    #portalInfoModal.open {
        padding: 0 !important;
        inset: 0 !important;
        align-items: stretch !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
    }

    #publicPortalModal::before,
    #publicPortalModal::after,
    #publicRoomsModal::before,
    #publicRoomsModal::after,
    #publicRoomDetailModal::before,
    #publicRoomDetailModal::after,
    #legalModal::before,
    #legalModal::after,
    #portalInfoModal::before,
    #portalInfoModal::after {
        display: none !important;
        content: none !important;
        margin: 0 !important;
    }

    #portalBox,
    #roomsBox,
    #roomDetailBox,
    .legal-modal-box {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important;
        border: none !important;
        box-shadow: none !important;
    }

    #portalBox .desc-box-content,
    #roomsBox .desc-box-content,
    #roomDetailBox .desc-box-content {
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* --- Compact Attachment / PDF Document Card Overrides --- */
.pdf-document-card {
    margin-top: 0.4rem !important;
    margin-bottom: 0.4rem !important;
    padding: 0.35rem 0.6rem !important;
    background: rgba(79, 70, 229, 0.05) !important;
    border: 1px solid rgba(79, 70, 229, 0.2) !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.pdf-document-card>div,
.pdf-document-card .doc-card-info {
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
}

.pdf-document-card>div>span:first-child,
.pdf-document-card .doc-card-icon {
    font-size: 1.15rem !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

.pdf-document-card>div>div,
.pdf-document-card .doc-card-text {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

.pdf-document-card strong,
.pdf-document-card .doc-card-title {
    display: block !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

.pdf-document-card span,
.pdf-document-card .doc-card-filename {
    font-size: 0.68rem !important;
    color: #64748b !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    word-break: normal !important;
    display: block !important;
    line-height: 1.2 !important;
}

.pdf-document-card a,
.pdf-document-card .doc-card-btn {
    padding: 0.3rem 0.6rem !important;
    background: #4f46e5 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.25) !important;
    transition: transform 0.15s, background 0.15s;
}

.pdf-document-card a:hover,
.pdf-document-card .doc-card-btn:hover {
    background: #4338ca !important;
    transform: translateY(-1px);
}

/* --- In-App PDF Canvas Viewer --- */
@keyframes pdfSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.pdf-page-container {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.45);
    border-radius: 4px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pdf-page-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.pdf-page-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    gap: 0.5rem;
    font-size: 0.85rem;
    background: #1e293b;
    width: 100%;
    height: 100%;
}

/* --- PDF Viewer Responsive Header & Overlap Prevention --- */
#pdfPageBadge {
    display: none !important;
}

@media (max-width: 640px) {
    .pdf-top-bar {
        padding: calc(env(safe-area-inset-top, 0px) + 0.45rem) 0.65rem 0.45rem 0.65rem !important;
        gap: 0.45rem !important;
    }

    .pdf-top-title-area {
        gap: 0.5rem !important;
        min-width: 0 !important;
    }

    .pdf-top-icon {
        font-size: 1.2rem !important;
    }

    #pdfViewerTitle {
        font-size: 0.85rem !important;
        line-height: 1.25 !important;
    }

    #pdfViewerSubtitle {
        font-size: 0.68rem !important;
        line-height: 1.2 !important;
    }

    .pdf-dl-text {
        display: none !important;
    }

    .pdf-download-btn {
        padding: 0.45rem 0.65rem !important;
        border-radius: 0.55rem !important;
        font-size: 0.95rem !important;
    }

    .pdf-zoom-group {
        padding: 2px 4px !important;
        gap: 0.15rem !important;
        border-radius: 0.5rem !important;
    }

    .pdf-zoom-btn {
        width: 25px !important;
        height: 25px !important;
        font-size: 1rem !important;
    }

    #pdfZoomValue {
        min-width: 34px !important;
        font-size: 0.7rem !important;
        padding: 0 2px !important;
    }

    .pdf-close-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.95rem !important;
    }

    .pdf-top-actions {
        gap: 0.4rem !important;
    }
}

@media (max-width: 380px) {
    .pdf-top-bar {
        padding: calc(env(safe-area-inset-top, 0px) + 0.4rem) 0.45rem 0.4rem 0.45rem !important;
        gap: 0.35rem !important;
    }

    .pdf-top-icon {
        font-size: 1.05rem !important;
    }

    #pdfViewerTitle {
        font-size: 0.78rem !important;
    }

    #pdfZoomValue {
        min-width: 28px !important;
        font-size: 0.65rem !important;
    }
}

/* --- Deep Link Shared Event Card Highlight Animation --- */
@keyframes eventGlowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.75), 0 10px 30px rgba(79, 70, 229, 0.3);
        transform: scale(1.02);
    }

    50% {
        box-shadow: 0 0 0 14px rgba(79, 70, 229, 0), 0 12px 35px rgba(79, 70, 229, 0.5);
        transform: scale(1.03);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0), 0 8px 25px rgba(79, 70, 229, 0.2);
        transform: scale(1);
    }
}

.event-card-highlighted {
    border: 2px solid #4f46e5 !important;
    border-left: 6px solid #4f46e5 !important;
    animation: eventGlowPulse 2s ease-in-out 3;
    box-shadow: 0 0 25px rgba(79, 70, 229, 0.4) !important;
    position: relative;
    z-index: 10;
}

.event-card-highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
    width: fit-content;
}

/* ========================================================
   SECTION 2
   ======================================================== */
/* --- Club Card Modern Ultra V4 --- */
.club-card-v4 {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.club-card-v4:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(79, 70, 229, 0.14);
    border-color: rgba(99, 102, 241, 0.35);
}

.club-card-v4:hover .club-logo-img-v4 {
    transform: scale(1.04);
}

.club-card-v4:hover .club-btn-v4 {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.35);
}

.club-card-v4:hover .club-btn-arrow {
    transform: translateX(4px);
}

.club-card-header-v4 {
    background: linear-gradient(135deg, var(--surface2) 0%, rgba(99, 102, 241, 0.04) 100%);
    padding: 1.25rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.club-logo-container-v4 {
    width: 100%;
    height: 165px;
    border-radius: 1.15rem;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.club-logo-img-v4 {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.club-card-body-v4 {
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
    align-items: center;
}

.club-title-v4 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 0.4rem 0;
    line-height: 1.3;
}

.club-location-v4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.2rem;
}

.club-btn-v4 {
    margin-top: auto;
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
    border: none;
    transition: all 0.25s ease;
}

.club-btn-arrow {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

/* --- Modern Club Detail View --- */
.verein-premium-container {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.v-detail-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.25rem;
}

.v-detail-cover-wrap {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--surface2) 0%, rgba(99, 102, 241, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.v-detail-cover-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    box-sizing: border-box;
    transition: transform 0.35s ease;
}

.v-detail-hero-content {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.v-detail-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.v-detail-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.v-detail-section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}

.v-detail-section-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-light, #4f46e5);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.v-detail-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.v-contact-action-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.15rem;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    min-height: 58px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.v-contact-action-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
}

.v-contact-action-tile:active {
    transform: scale(0.975);
    background: var(--surface2);
}

.v-contact-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-light, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.v-contact-info-col {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 1;
    min-width: 0;
}

.v-contact-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    line-height: 1.2;
}

.v-contact-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.v-contact-cta {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary-light, #4f46e5);
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* --- Strukturierte Personen-Kontaktkarten --- */
.v-persons-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
    width: 100%;
}

.v-person-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: all 0.25s ease;
}

.v-person-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
}

.v-person-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.v-person-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(79, 70, 229, 0.06) 100%);
    color: var(--primary-light, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.v-person-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex-grow: 1;
}

.v-person-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    word-break: break-word;
}

.v-person-role {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-light, #4f46e5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.v-person-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.v-person-btn {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 0.95rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.88rem;
    min-height: 52px;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.v-person-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.v-person-btn:active {
    transform: scale(0.975);
}

.v-person-btn.phone:hover {
    border-color: rgba(34, 197, 94, 0.4);
    color: #16a34a;
}

.v-person-btn.email:hover {
    border-color: rgba(99, 102, 241, 0.4);
    color: #4f46e5;
}

.v-person-btn.address:hover {
    border-color: rgba(239, 68, 68, 0.4);
    color: #dc2626;
}

.v-person-btn-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.v-person-btn-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    flex-grow: 1;
}

.v-person-btn-val {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.v-person-btn-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
}

@media (max-width: 640px) {
    #portalVereineView {
        padding: 0.5rem 0.75rem 3rem 0.75rem !important;
    }

    #vereinePortalContent {
        gap: 1.75rem !important;
        padding-bottom: 2.5rem !important;
    }

    .club-card-v4 {
        width: 100%;
        max-width: 100%;
        border: 1px solid rgba(0, 0, 0, 0.09);
        box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    }

    .club-logo-container-v4 {
        height: 145px;
    }

    .v-detail-contact-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .v-contact-action-tile {
        padding: 0.9rem 1rem;
        min-height: 56px;
    }

    .v-detail-cover-wrap {
        height: 180px;
    }

    .v-detail-title {
        font-size: 1.18rem;
    }
}

/* --- Modern Business Card (Branchenbuch Ultra Modern) --- */
.biz-grid-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: center;
    gap: 1.35rem;
    padding: 0.75rem 0.5rem 3rem 0.5rem;
    box-sizing: border-box;
}

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

    .biz-grid-container,
    #jobsPortalContent,
    #vereinePortalContent {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1.25rem !important;
    }
}

.biz-card-modern {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;
}

.biz-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -4px rgba(79, 70, 229, 0.14), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
    border-color: rgba(99, 102, 241, 0.35);
}

.biz-card-modern:hover .biz-logo-img {
    transform: scale(1.05);
}

.biz-card-modern:hover .biz-cover-img {
    transform: scale(1.04);
}

.biz-card-modern:hover .biz-btn-modern {
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3);
}

.biz-card-modern:hover .biz-btn-arrow {
    transform: translateX(4px);
}

.biz-card-header {
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.75) 0%, rgba(248, 250, 252, 0.35) 100%);
    padding: 0 !important;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    height: 145px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

[data-theme="dark"] .biz-card-header {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.45) 100%);
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
}

.biz-logo-container {
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
    box-sizing: border-box;
}

.biz-logo-img {
    max-width: 86%;
    max-height: 86%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.35s ease;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.05));
}

.biz-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

/* --- Universal Modern Photo Placeholder (Foto-Icon mit Landschaft & Sonne) --- */
.universal-modern-placeholder {
    width: 100%;
    height: 100%;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    padding: 8px;
    user-select: none;
}

[data-theme="dark"] .universal-modern-placeholder {
    background: transparent;
}

.universal-placeholder-canvas {
    width: 100%;
    max-width: 130px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.04));
    transition: transform 0.3s ease;
}

.universal-placeholder-detail .universal-placeholder-canvas {
    max-width: 170px;
    height: 110px;
}

.universal-placeholder-caption {
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 5px;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .universal-placeholder-caption {
    color: #64748b;
}

/* Support for room cards image placeholder */
.room-image-container-v3 .universal-modern-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    z-index: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

[data-theme="dark"] .room-image-container-v3 .universal-modern-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.room-image-container-v3 .universal-placeholder-canvas {
    max-width: 135px;
    height: 85px;
}

@media (max-width: 640px) {
    #branchenbuchContent {
        padding: 0.85rem 0.65rem 3.5rem 0.65rem !important;
        background: rgba(241, 245, 249, 0.45) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 1.25rem;
    }

    [data-theme="dark"] #branchenbuchContent {
        background: rgba(15, 23, 42, 0.55) !important;
    }

    .biz-grid-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 440px !important;
        margin: 0 auto !important;
        padding: 0.5rem 0 3rem 0 !important;
        gap: 1.6rem !important;
        box-sizing: border-box !important;
    }

    .biz-card-modern {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        background: var(--surface, #ffffff) !important;
        border: 1px solid var(--border) !important;
        border-radius: 1.25rem !important;
        box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.07), 0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
    }

    [data-theme="dark"] .biz-card-modern {
        border: 1px solid rgba(51, 65, 85, 0.95) !important;
        box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.45) !important;
    }

    .biz-card-header {
        background: linear-gradient(180deg, rgba(241, 245, 249, 0.8) 0%, rgba(248, 250, 252, 0.4) 100%) !important;
        border-bottom: 1px solid var(--border) !important;
        padding: 0 !important;
        height: 145px !important;
    }

    [data-theme="dark"] .biz-card-header {
        background: linear-gradient(180deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.45) 100%) !important;
        border-bottom: 1px solid rgba(51, 65, 85, 0.7) !important;
    }

    .biz-logo-container {
        height: 100% !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 12px !important;
    }

    .biz-card-body {
        padding: 1rem 1.15rem 1.25rem 1.15rem !important;
        text-align: center !important;
        align-items: center !important;
    }
}

/* --- Modern Dynamic Placeholders (Gewerbe, Vereine, Räume, Marktplatz) --- */
.modern-placeholder-badge {
    width: 100%;
    height: 100%;
    min-height: 100px;
    border-radius: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    user-select: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
    padding: 8px;
    box-sizing: border-box;
    text-align: center;
}

.modern-placeholder-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), transparent 70%);
    pointer-events: none;
}

.modern-placeholder-icon-wrap {
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    margin-bottom: 0.35rem;
    flex-shrink: 0;
}

.modern-placeholder-initials {
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.modern-placeholder-subtext {
    font-size: 0.68rem;
    font-weight: 600;
    opacity: 0.9;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.biz-card-body {
    padding: 0.95rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
    align-items: center;
}

.biz-category-badge {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-light, #4f46e5);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.22rem 0.65rem;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
    border: none;
}

.biz-title-modern {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 0.35rem 0;
    line-height: 1.28;
}

.biz-location-modern {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.65rem;
}

.biz-chips-row {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.biz-info-chip {
    font-size: 0.72rem;
    font-weight: 650;
    padding: 0.22rem 0.6rem;
    border-radius: 99px;
    background: rgba(15, 23, 42, 0.04);
    border: none;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

[data-theme="dark"] .biz-info-chip {
    background: rgba(255, 255, 255, 0.06);
}

.biz-btn-modern {
    margin-top: auto;
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.6rem 1rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.22);
    border: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.biz-btn-arrow {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

/* --- Modern Business Detail View --- */
.biz-premium-container {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.5rem 2.5rem 0.5rem;
}

.b-detail-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.25rem;
}

.b-detail-cover-wrap {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--surface2) 0%, rgba(99, 102, 241, 0.06) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.b-detail-cover-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    box-sizing: border-box;
    transition: transform 0.35s ease;
}

.b-detail-hero-content {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.b-detail-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text);
    margin: 0.35rem 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.b-detail-address-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    margin-top: 0.35rem;
    background: var(--surface2);
    padding: 0.4rem 0.85rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
}

.b-detail-address-pill:hover {
    color: var(--primary-light);
    border-color: var(--primary-light);
}

.b-detail-section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}

.b-detail-section-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-light, #4f46e5);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.b-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.b-detail-hours-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}

.b-detail-offers-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 1.25rem;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
}

.b-detail-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.b-contact-action-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.15rem;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    min-height: 58px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.b-contact-action-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
}

.b-contact-action-tile:active {
    transform: scale(0.975);
    background: var(--surface2);
}

.b-contact-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-light, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.b-contact-info-col {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 1;
    min-width: 0;
}

.b-contact-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    line-height: 1.2;
}

.b-contact-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.b-contact-cta {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary-light, #4f46e5);
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.help-card-modern {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.help-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-light);
}

.news-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-light);
}

.help-card-header {
    padding: 1rem 1.25rem;
    background: var(--surface2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.help-card-icon {
    font-size: 1.2rem;
}

.help-card-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.help-card-body {
    padding: 1.25rem;
}

.help-card-body p {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.help-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-bullet-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 1.5rem;
    position: relative;
}

.help-bullet-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-light);
    font-weight: 900;
}

/* OVERRIDE EVERYTHING FOR MOBILE MODAL */
@media (max-width: 768px) {

    #publicPortalModal.open,
    #legalModal.open,
    #portalInfoModal.open {
        padding: 0 !important;
        inset: 0 !important;
        align-items: stretch !important;
    }

    #publicPortalModal::before,
    #publicPortalModal::after,
    #legalModal::before,
    #legalModal::after,
    #portalInfoModal::before,
    #portalInfoModal::after {
        display: none !important;
    }

    #portalBox {
        width: 100% !important;
        max-width: 100% !important;
        height: 99vh !important;
        max-height: 99vh !important;
        margin: 0 !important;
        border-radius: 1.5rem 1.5rem 0 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    .legal-modal-box {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        transform: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    #portalBox .desc-box-content {
        padding-bottom: 2rem !important;
        /* give space at bottom */
    }
}

/* --- MODERN HORIZONTAL PILLS SCROLL & DESKTOP CONTROLS --- */
.modern-pills-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 0.65rem;
}

.modern-pills-scroll {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 0.25rem 0.65rem 0.25rem;
    width: 100%;
    /* Visible, elegant scrollbar on desktop */
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.45) rgba(120, 120, 120, 0.12);
}

/* WebKit/Blink Scrollbar Styling (Chrome, Edge, Safari) */
.modern-pills-scroll::-webkit-scrollbar {
    height: 6px;
}

.modern-pills-scroll::-webkit-scrollbar-track {
    background: rgba(120, 120, 120, 0.08);
    border-radius: 99px;
    margin: 0 4px;
}

.modern-pills-scroll::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.45);
    border-radius: 99px;
    transition: background 0.2s ease;
}

.modern-pills-scroll:hover::-webkit-scrollbar-thumb {
    background: var(--primary, #6366f1);
}

/* Left/Right Scroll Buttons (‹ and ›) */
.pills-scroll-btn {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface2, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    color: var(--text, #1e293b);
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 5;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    margin-bottom: 0.45rem;
    touch-action: manipulation;
}

.pills-scroll-btn:hover {
    background: var(--primary, #6366f1);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    transform: scale(1.1);
}

.pills-scroll-btn:active {
    transform: scale(0.92);
}

.pills-scroll-btn.prev {
    margin-right: 0.35rem;
}

.pills-scroll-btn.next {
    margin-left: 0.35rem;
}

@media (max-width: 480px) {
    .pills-scroll-btn {
        width: 28px;
        height: 28px;
        font-size: 1.1rem;
    }
}

/* --- MODERN MARKTPLATZ CSS --- */
.category-pill {
    padding: 0.5rem 1rem;
    border-radius: 99px;
    background: var(--surface2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.category-pill:hover {
    border-color: var(--primary-light);
    color: var(--text);
    transform: translateY(-1px);
}

.category-pill.active {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.price-tag-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 17, 26, 0.85);
    backdrop-filter: blur(12px);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.price-tag-badge.gratis {
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
}

.price-tag-badge.verleih {
    background: rgba(59, 130, 246, 0.9);
    color: #ffffff;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-badge.verfuegbar {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.reserviert {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.erledigt {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.markt-card-modern {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.markt-card-modern:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.markt-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.markt-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.markt-card-modern:hover .markt-card-img-wrapper img {
    transform: scale(1.05);
}

.markt-card-body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.5rem;
}

/* ── Modern Rental & Inventory UI ── */
.rental-stat-pill {
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 0.65rem 0.8rem;
    border-radius: 0.85rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: all 0.2s ease;
}

.rental-stat-pill:hover {
    border-color: var(--primary-light);
    background: var(--surface);
}

.rental-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 0.05em;
}

.rental-stat-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

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

@media (max-width: 480px) {
    .rental-stat-val {
        font-size: 0.85rem;
    }
}

/* ── Modern Schadensmelder UI ── */
.schaden-segmented-control {
    display: flex;
    background: var(--surface2);
    padding: 0.28rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    margin: 0 auto 1.35rem auto;
    max-width: 440px;
    width: 100%;
    gap: 0.25rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

.schaden-segment-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-weight: 650;
    font-size: 0.84rem;
    padding: 0.48rem 0.9rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    line-height: 1.25;
    white-space: nowrap;
}

.schaden-segment-btn:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .schaden-segment-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

.schaden-segment-btn.active {
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.schaden-segment-btn span {
    font-size: 0.95rem;
    line-height: 1;
}

.schaden-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
    margin-bottom: 0.95rem;
}

@media (max-width: 600px) {
    .schaden-cat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
}

@media (max-width: 400px) {
    .schaden-cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.35rem;
    }
}

.schaden-cat-tile {
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.45rem 0.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    user-select: none;
    position: relative;
    min-height: 52px;
}

.schaden-cat-tile:hover {
    border-color: var(--primary-light);
    transform: translateY(-1px);
    background: var(--surface);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.schaden-cat-tile.active {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    box-shadow: 0 3px 12px rgba(79, 70, 229, 0.2);
    transform: translateY(-1px);
}

.schaden-cat-tile.active::after {
    content: "✓";
    position: absolute;
    top: 3px;
    right: 4px;
    font-size: 0.6rem;
    font-weight: 900;
    color: #fff;
    background: var(--primary);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

.schaden-cat-icon {
    font-size: 1.25rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06));
}

.schaden-cat-text {
    font-size: 0.74rem;
    font-weight: 750;
    color: var(--text);
    line-height: 1.15;
}

.schaden-laterne-banner {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1.5px solid rgba(79, 70, 229, 0.22);
    border-radius: 1.15rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.04);
    margin-bottom: 1.25rem;
}

.schaden-laterne-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.laterne-badge {
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 850;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    letter-spacing: 0.02em;
    display: inline-block;
}

.laterne-info-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.schaden-modern-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 0.95rem;
    font-size: 0.92rem;
    color: var(--text);
    font-weight: 600;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.schaden-modern-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.schaden-loc-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.schaden-input-with-icon {
    position: relative;
    flex: 1;
}

.schaden-input-with-icon .input-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.05rem;
    pointer-events: none;
    opacity: 0.8;
}

.schaden-input-with-icon .schaden-modern-input {
    padding-left: 2.6rem;
}

.btn-gps-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.8rem 1.15rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.95rem;
    font-weight: 800;
    font-size: 0.84rem;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.28);
    transition: all 0.2s ease;
    user-select: none;
}

.btn-gps-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(16, 185, 129, 0.35);
}

.btn-gps-modern:active {
    transform: translateY(0);
}

.gps-pulse-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: gpsPulse 1.8s infinite;
}

@keyframes gpsPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(255, 255, 255, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.schaden-map-card {
    position: relative;
    border-radius: 1.15rem;
    overflow: hidden;
    border: 1.5px solid var(--border);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 0.5rem;
}

.schaden-map-floating-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    pointer-events: none;
    z-index: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.schaden-modern-textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 0.95rem;
    font-size: 0.92rem;
    color: var(--text);
    font-weight: 550;
    box-sizing: border-box;
    min-height: 90px;
    resize: vertical;
    line-height: 1.45;
    transition: all 0.2s ease;
}

.schaden-modern-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.schaden-photo-dropzone {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(79, 70, 229, 0.04);
    border: 1.8px dashed var(--primary);
    border-radius: 1.15rem;
    padding: 1rem 1.25rem;
    margin-top: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.schaden-photo-dropzone:hover {
    background: rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
}

.photo-dropzone-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.photo-dropzone-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.photo-dropzone-title {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--text);
}

.photo-dropzone-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 550;
}

.schaden-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.schaden-privacy-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--text);
    line-height: 1.45;
    cursor: pointer;
    user-select: none;
}

.schaden-privacy-label input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    flex-shrink: 0;
    cursor: pointer;
}

.schaden-emergency-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    margin-top: 0.85rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text);
}

.schaden-emergency-card strong {
    color: #ef4444;
}

.schaden-submit-cta {
    width: 100%;
    height: 52px;
    border-radius: 1rem;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: #ffffff;
    font-weight: 850;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1.25rem;
}

.schaden-submit-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.schaden-submit-cta:active {
    transform: translateY(0);
}

.schaden-submit-cta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.schaden-list-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.schaden-scope-pills {
    display: inline-flex;
    background: var(--surface2);
    padding: 0.3rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    gap: 0.3rem;
    align-self: flex-start;
}

.schaden-scope-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.4rem 0.95rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.schaden-scope-btn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.schaden-filter-scroll {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.2rem;
}

.schaden-report-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.15rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.schaden-report-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

/* ── Modern Stellenmarkt UI ── */
.job-card-modern {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.job-card-modern:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
    background: var(--surface);
}

.job-type-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary-light);
    border: 1px solid rgba(79, 70, 229, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

/* ── Modern Polls UI ── */
.poll-card-modern {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: all 0.25s ease;
}

.poll-card-modern:hover {
    border-color: var(--primary-light);
}

.poll-option-vote-btn {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 0.85rem;
    padding: 0.85rem 1.1rem;
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    width: 100%;
}

.poll-option-vote-btn:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    background: rgba(79, 70, 229, 0.08);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.poll-option-vote-btn .radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.poll-option-vote-btn:hover .radio-circle {
    border-color: var(--primary-light);
}

.poll-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
    margin-top: 0.35rem;
}

.poll-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, var(--primary) 0%, #6366f1 100%);
}

.poll-bar-fill.user-choice {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* ========================================================
   SECTION 3
   ======================================================== */
/* Project Selector Screen */
#projectSelectorOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 99999;
    display: flex;
    /* SICHTBAR */
    flex-direction: column;
    align-items: center;
    padding: calc(env(safe-area-inset-top, 0px) + 2rem) 1.5rem 4rem;
    overflow-y: auto;
    backdrop-filter: blur(20px);
}

#projectSelectorOverlay.hidden {
    display: none !important;
}

.selector-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    animation: fadeInDown 0.8s ease-out;
}

.selector-header h2 {
    font-size: clamp(2.2rem, 6vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    line-height: 1.15;
    color: var(--text);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: initial;
}

.selector-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.5;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.project-card-premium {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 2rem;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.project-card-premium:hover {
    transform: translateY(-10px);
    border-color: var(--primary-light);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: var(--surface);
}

.project-card-premium img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 1.5rem;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s;
}

.project-card-premium:hover img {
    transform: scale(1.1);
}

.project-card-premium h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
}

.project-card-premium .btn-select {
    margin-top: auto;
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: white;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    transition: all 0.3s;
}

.project-card-premium:hover .btn-select {
    background: var(--primary-light);
    transform: scale(1.05);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OVERRIDE EVERYTHING FOR MOBILE MODAL */
@media (max-width: 768px) {

    #publicPortalModal.open,
    #legalModal.open,
    #portalInfoModal.open {
        padding: 0 !important;
        inset: 0 !important;
        align-items: stretch !important;
    }

    #publicPortalModal::before,
    #publicPortalModal::after,
    #legalModal::before,
    #legalModal::after,
    #portalInfoModal::before,
    #portalInfoModal::after {
        display: none !important;
    }

    #portalBox {
        width: 100% !important;
        max-width: 100% !important;
        height: 99vh !important;
        max-height: 99vh !important;
        margin: 0 !important;
        border-radius: 1.5rem 1.5rem 0 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    .legal-modal-box {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        transform: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    #portalBox .desc-box-content {
        padding-bottom: 2rem !important;
        /* give space at bottom */
    }
}

/* ========================================================
   SECTION 4
   ======================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
}

:root {
    /* Default Light Mode */
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface2: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #6366f1;
    --radius: 1rem;
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #0f111a;
    --surface: #161925;
    --surface2: #1e2130;
    --text: #ffffff;
    --text-muted: #94a3b8;
    --border: #2dd4bf33;
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface2: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #6366f1;
    color-scheme: light;
}

[data-a11y-contrast="high"] {
    --bg: #000000 !important;
    --surface: #000000 !important;
    --surface2: #1a1a1a !important;
    --text: #ffffff !important;
    --text-muted: #ffffff !important;
    --border: #ffffff !important;
    --primary: #ffff00 !important;
    --primary-dark: #cccc00 !important;
    --primary-light: #ffff00 !important;
    color-scheme: dark !important;
}

[data-a11y-contrast="high"] * {
    backdrop-filter: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-width: 2px !important;
}

html[data-a11y-font="large"] {
    font-size: 115%;
}

html[data-a11y-font="large"] .portal-modal-box {
    max-width: 580px !important;
}

html[data-a11y-font="large"] .desc-box-content {
    max-height: calc(88vh - 1.5rem) !important;
    padding-bottom: 2.25rem !important;
}

html[data-a11y-font="large"] .event-date-block {
    width: 125px;
    padding: 0.75rem 0.5rem;
}

html[data-a11y-font="large"] .event-meta {
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
}

html[data-a11y-font="large"] .event-card {
    min-height: auto;
}

html[data-a11y-font="large"] .btn-cal,
html[data-a11y-font="large"] .btn-anmelden-card {
    min-height: 32px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Base */
}

body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 2rem;
}

:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 3px;
    border-radius: 4px;
}

.portal-card:focus {
    outline: 3px solid var(--primary-light);
    outline-offset: 4px;
    transform: translateY(-5px);
}

#publicRoomsModal .desc-box {
    max-width: 1100px;
    width: 95%;
}

.footer {
    max-width: 900px;
    margin: 4rem auto 0;
    padding: 2rem 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

/* GLOBALE KORREKTUR: Dropdown-Optionen immer Schwarz auf Weiß (für Darkmode-Kompatibilität) */
select option,
.filter-select option {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
}

@media (max-width: 520px) {
    .meine-kurs-termin {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        gap: 0.5rem !important;
        padding: 0.7rem !important;
        border: 1px solid var(--border) !important;
        border-radius: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Onboarding Optimierung */
    .onboarding-slide img {
        width: 100%;
        max-width: 450px;
        height: auto;
        object-fit: contain;
        filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
        transition: transform 0.3s ease;
    }

    @media (max-width: 600px) {
        .onboarding-slide {
            padding: 0.25rem 0.75rem 1.5rem 0.75rem !important;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            justify-content: flex-start !important;
            /* Force start at top */
            overflow-y: auto !important;
            overflow-x: hidden !important;
        }

        .onboarding-slide img {
            max-width: 120% !important;
            /* Etwas über den Rand gehen lassen für maximale Größe */
            width: 110% !important;
            transform: scale(1.1);
            margin-bottom: 0.5rem;
        }

        .onboarding-slide h3 {
            font-size: 1.25rem !important;
            margin-top: 0.5rem !important;
        }

        .onboarding-slide p {
            font-size: 0.85rem !important;
            margin-bottom: 1rem !important;
        }

        #onboardingBox {
            min-height: auto !important;
            height: 90vh !important;
        }
    }

    .portal-grid {
        gap: 0.75rem !important;
    }
}

/* Citizen Portal Dashboard Responsive Styles */
.portal-header-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .portal-header-group {
        gap: 0.75rem !important;
        margin-bottom: 1rem;
    }

    #portalGreeting {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    #homeGemeindeStatus {
        padding: 0.5rem 0.8rem !important;
        border-radius: 0.8rem !important;
        gap: 0.5rem !important;
    }

    #homeGemeindeStatus b {
        font-size: 0.85rem !important;
    }

    #onboardingTile {
        padding: 0.75rem 1rem !important;
    }

    #onboardingTile h3 {
        font-size: 1rem !important;
    }

    #portalUserCard {
        margin-bottom: 0 !important;
    }

    #portalLoggedOutCard,
    #portalLoggedInCard {
        padding: 0.6rem 0.8rem !important;
    }
}

/* Fix for Village Icon Images */
#homeVillageIcon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


[data-theme="light"] .meine-kurs-termin {
    background: rgba(0, 0, 0, 0.02) !important;
}

.meine-kurs-termin>span {
    width: 100% !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
}

.meine-kurs-termin .mkt-btns {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    display: flex !important;
    text-align: center !important;
}

.meine-kurs-termin .mkt-btns:empty {
    display: none !important;
}

.meine-kurs-termin .mkt-btns>button {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0.4rem !important;
    font-size: 0.75rem !important;
}

.footer a:hover {
    color: var(--primary-light);
}

body.is-embedded .footer {
    display: none;
}

body.is-embedded {
    padding-bottom: 0;
    min-height: auto;
    background: transparent;
}

body.is-embedded #btnRaumbuchung,
body.is-embedded #mobileFabCitizen,
body.is-embedded .view-toggle,
body.is-embedded .filters,
body.is-embedded #mobileTabs,
body.is-embedded #mobileFilterTrigger,
body.is-embedded .modern-filter-bar,
body.is-embedded #mActiveChipsBar,
body.is-embedded .btn-anmelden-card {
    display: none !important;
}

body.is-embedded .content {
    padding: 0 0.5rem;
}

/* &#9472;&#9472; Header &#9472;&#9472; */
header {
    background: #ffffff !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0 !important;
    position: sticky;
    top: 0;
    z-index: 50;
    color: #0f172a !important;
    padding-top: env(safe-area-inset-top, 0px);
}

body.is-embedded header {
    display: none !important;
}

.header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.brand-icon {
    width: 36px;
    height: 36px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    overflow: hidden;
    padding: 2px;
    box-sizing: border-box;
}

.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.4rem;
    flex-shrink: 0;
}

.brand-text h1 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text) !important;
}

.brand-text p {
    font-size: .75rem;
    color: var(--text-muted) !important;
}

@media (max-width: 520px) {
    .header-inner {
        gap: 0.4rem;
        padding: 0.45rem 0.65rem;
    }

    .brand-icon {
        width: 30px;
        height: 30px;
        aspect-ratio: 1 / 1;
        font-size: 0.9rem;
    }

    .header-brand {
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }

    .brand-text {
        min-width: 0;
        overflow: hidden;
    }

    .brand-text h1 {
        font-size: 0.88rem;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-text p {
        display: none;
        /* Hide subtitle on mobile to save vertical space */
    }

    .header-actions {
        gap: 0.35rem !important;
        flex-shrink: 0;
    }

    #citizenAuthBtn {
        padding: 0.35rem 0.55rem !important;
        font-size: 0.75rem !important;
        max-width: 95px !important;
    }

    .hero {
        padding: 1rem 1rem 0.75rem !important;
        /* Smaller hero bar on mobile */
    }

    .hero h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem !important;
    }

    .hero p {
        font-size: 0.85rem !important;
    }
}

.header-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.btn-install {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: .75rem;
    padding: .5rem 1rem;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    display: none;
    transition: all .2s;
}

.btn-install:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, .4);
}

.btn-install.visible {
    display: block;
}

/* &#9472;&#9472; Hero &#9472;&#9472; */
.hero {
    background: linear-gradient(180deg, rgba(79, 70, 229, .1) 0%, transparent 100%);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 1.25rem 1rem;
    text-align: center;
}

[data-theme="light"] .hero {
    background: #f8fafc;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
}

.hero h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .5rem;
}

[data-theme="light"] .hero h2 {
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* &#9472;&#9472; Filters &#9472;&#9472; */
.filters {
    max-width: 900px;
    margin: 0.35rem auto 0.5rem auto;
    padding: 0 1.25rem;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.filters .search-input {
    height: 40px;
    box-sizing: border-box;
}

.filters .filter-select {
    min-width: 170px;
    flex: 0 0 auto;
}

.filters .custom-cat-wrapper {
    min-width: 240px;
    flex: 1 1 240px;
    max-width: 320px;
}

.filters .filter-search {
    flex: 0 1 200px;
    min-width: 140px;
    max-width: 220px;
}

@media (max-width: 600px) {
    #mobileFiltersContainer {
        display: flex;
        flex-direction: column;
        margin: 0.2rem auto 0.35rem auto !important;
        padding: 0 1.25rem !important;
        box-sizing: border-box !important;
        background: transparent !important;
        border: none !important;
        gap: 0 !important;
        box-shadow: none !important;
        position: relative;
        z-index: 10;
        width: 100%;
    }

    #mobileFiltersContainer.is-hidden-view {
        display: none !important;
    }

    #mobileFiltersContainer.open:not(.is-hidden-view) {
        display: flex !important;
    }

    #mobileFiltersContainer .filter-select,
    #mobileFiltersContainer .custom-cat-wrapper,
    #mobileFiltersContainer .filter-search {
        width: 100% !important;
        max-width: 100% !important;
    }
}

#mobileFiltersContainer.is-hidden-view {
    display: none !important;
}

.desc-modal,
.desc-box,
#descModalBox {
    overflow-x: hidden !important;
}

#calendarView {
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.filter-group {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    flex: 1;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 999px;
    padding: .4rem 1rem;
    font-size: .8rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

[data-theme="light"] .filter-btn {
    background: rgba(255, 255, 255, 0.7);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: .75rem;
    padding: .5rem 1rem;
    color: var(--text);
    font-size: .875rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all .2s;
    width: 200px;
}

[data-theme="light"] .search-input {
    background: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.search-input:focus {
    border-color: var(--primary);
}

/* &#9472;&#9472; Events Grid &#9472;&#9472; */
.content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.month-group {
    margin-bottom: 2rem;
}

.month-label {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
    padding: .5rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.event-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-light);
}

@media (max-width: 600px) {
    .event-card {
        flex-direction: column;
    }
}

.event-feature-image {
    width: 120px;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    border-left: 1px solid var(--border);
    /* Move to right side */
    order: 2;
    /* Put image at the end of the flex container */
}

.event-date-block {
    width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    padding: 1rem;
    text-align: center;
}

@media (max-width: 600px) {
    .event-date-block {
        width: 100%;
        flex-direction: row;
        gap: 0.4rem;
        padding: 0.5rem 0.75rem;
        justify-content: center;
    }
}

.event-day {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

@media (max-width: 600px) {
    .event-day {
        font-size: 1.25rem;
    }
}

.event-weekday {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 2px;
}

.event-month {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: .85;
}

.event-body {
    padding: 1rem 1.25rem;
    flex: 1;
    min-width: 0;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .4rem;
}

.event-gemeinde {
    font-size: .7rem;
    font-weight: 600;
    border-radius: 999px;
    padding: .2rem .6rem;
    background: rgba(79, 70, 229, .2);
    color: var(--primary-light);
}

.event-category {
    font-size: .7rem;
    color: var(--text-muted);
}

.event-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: .3rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

.event-info {
    font-size: .8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.event-info span {
    display: flex;
    align-items: center;
    gap: .25rem;
}





/* &#9472;&#9472; Empty / Loading &#9472;&#9472; */
.state-box {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.state-box .state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.state-box h3 {
    color: var(--text);
    margin-bottom: .5rem;
}

/* &#9472;&#9472; Notification Bell &#9472;&#9472; */
.theme-btn {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: .75rem;
    padding: .45rem .7rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    border-color: var(--primary);
}

#pushBellBtn {
    display: none;
}

@media all and (display-mode: standalone) {
    #pushBellBtn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}




.btn-cal {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
    padding: 0;
}

.btn-cal:hover {
    transform: translateY(-2px);
    background: rgba(79, 70, 229, .1);
    border-color: var(--primary);
    color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(79, 70, 229, .2);
}

/* &#9472;&#9472; Navigation Arrows (Calendar) &#9472;&#9472; */
.nav-arrow-btn {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.4rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-arrow-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.nav-arrow-btn:active {
    transform: scale(0.95);
}

/* &#9472;&#9472; Description Modal &#9472;&#9472; */
.desc-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    z-index: 250;
    pointer-events: none;
    align-items: center;
    justify-content: center;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem 2rem;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.desc-modal:not(.open) {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.desc-modal.open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Ensure modal content starts at top if too long */
.desc-modal.open::before,
.desc-modal.open::after {
    content: "";
    margin: auto;
}

/* ── MOBILE / SMARTPHONE RULES (max-width: 640px) ── */
@media (max-width: 640px) {
    .modal-overlay {
        padding: 0 !important;
    }

    #publicPortalModal.open,
    #publicRoomsModal.open,
    #publicRoomDetailModal.open,
    #legalModal.open,
    #portalInfoModal.open {
        padding: 0 !important;
        margin: 0 !important;
        inset: 0 !important;
        align-items: stretch !important;
    }

    #publicPortalModal::before,
    #publicPortalModal::after,
    #publicRoomsModal::before,
    #publicRoomsModal::after,
    #publicRoomDetailModal::before,
    #publicRoomDetailModal::after,
    #legalModal::before,
    #legalModal::after,
    #portalInfoModal::before,
    #portalInfoModal::after {
        display: none !important;
        content: none !important;
        margin: 0 !important;
    }

    .portal-modal-box:not(#citizenAuthBox),
    .legal-modal-box {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .legal-modal-box .modal-header-modern {
        padding-top: calc(0.9rem + env(safe-area-inset-top, 0px)) !important;
        border-radius: 0 !important;
    }

    #citizenAuthBox {
        width: 95% !important;
        max-width: 440px !important;
        height: auto !important;
        max-height: 92vh !important;
        margin: auto !important;
        border-radius: 1.5rem !important;
        padding: 0 !important;
        background: var(--surface) !important;
        border: 1px solid var(--border) !important;
        box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    }

    .citizen-action-card {
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .citizen-action-card:hover {
        border-color: var(--primary) !important;
        background: var(--surface2) !important;
        transform: translateY(-2px);
        box-shadow: 0 8px 16px -4px rgba(79, 70, 229, 0.15) !important;
    }

    .citizen-action-card:hover .action-card-arrow {
        transform: translateX(4px);
        color: var(--primary) !important;
    }

    .citizen-logout-btn {
        transition: all 0.2s ease;
    }

    .citizen-logout-btn:hover {
        background: rgba(239, 68, 68, 0.08) !important;
        color: #ef4444 !important;
        border-color: rgba(239, 68, 68, 0.3) !important;
    }

    #portalScrollContainer,
    #publicRoomsContent,
    #vereinePortalContent,
    #branchenbuchContent,
    #publicRoomsList {
        padding: 0.75rem 0.75rem calc(3.5rem + env(safe-area-inset-bottom, 0px)) 0.75rem !important;
        overflow-x: hidden !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    .club-card,
    .business-card {
        width: 100% !important;
        padding: 1rem !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 1rem !important;
    }

    .portal-grid-responsive {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .club-card h3,
    .business-card h3 {
        font-size: 1.15rem !important;
        white-space: normal !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .go-btn {
        justify-content: center !important;
    }

    .club-card .category-badge,
    .business-card .category-badge {
        display: inline-block !important;
        white-space: normal !important;
        word-break: break-word !important;
        text-align: center !important;
        font-size: 0.6rem !important;
        line-height: 1.5 !important;
        border-radius: 0.75rem !important;
        max-width: 100% !important;
        padding: 0.4rem 0.8rem !important;
    }
}

/* ── IPAD & TABLET RULES (min-width: 641px) and (max-width: 1024px) ── */
@media (min-width: 641px) and (max-width: 1024px) {

    .modal-overlay.open,
    #publicPortalModal.open,
    #publicRoomsModal.open,
    #publicRoomDetailModal.open,
    #legalModal.open,
    #portalInfoModal.open {
        padding: 1.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        background: rgba(15, 23, 42, 0.75) !important;
        backdrop-filter: blur(12px) !important;
    }

    .portal-modal-box:not(#citizenAuthBox),
    .legal-modal-box {
        width: 94% !important;
        max-width: 960px !important;
        height: 90vh !important;
        max-height: 90vh !important;
        margin: auto !important;
        border-radius: 1.5rem !important;
        border: 1px solid var(--border) !important;
        box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
        overflow: hidden !important;
    }

    #portalScrollContainer,
    #publicRoomsContent,
    #vereinePortalContent,
    #branchenbuchContent,
    #publicRoomsList {
        padding: 1.5rem 1.85rem 3rem 1.85rem !important;
    }

    #citizenAuthBox {
        width: 90% !important;
        max-width: 520px !important;
        height: auto !important;
        max-height: 88vh !important;
        border-radius: 1.5rem !important;
    }

    .portal-grid-responsive {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }
}

@media (min-width: 1025px) {
    .portal-modal-box:not(#citizenAuthBox) {
        width: min(92vw, 1300px) !important;
        max-width: 1300px !important;
        height: min(90dvh, 900px) !important;
        max-height: 90dvh !important;
        border-radius: 1.25rem !important;
    }
}

.category-badge {
    background: rgba(79, 70, 229, 0.7);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
}

.desc-modal.open .desc-box {
    transform: translateY(0) scale(1);
}

/* &#9472;&#9472; Job Market Modern UI &#9472;&#9472; */
.job-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-light);
}

.job-card-thumb {
    width: 100%;
    height: 180px;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--surface2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.job-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.job-card:hover .job-card-thumb img {
    transform: scale(1.05);
}

.job-status-badge {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 2;
}

.job-info-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.job-detail-header {
    padding: 2rem;
    background: var(--surface2);
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.job-contact-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin-top: 2.5rem;
    box-shadow: var(--shadow-md);
}

.desc-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.desc-box-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desc-box-close {
    background: var(--surface2, rgba(255, 255, 255, 0.1));
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1rem;
}

.desc-box-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.desc-box-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem 0.25rem 1rem 0;
}

@media (max-width: 600px) {
    .desc-box-content {
        font-size: 1.05rem;
        line-height: 1.8;
        padding: 0.25rem 0 1.5rem 0;
    }
}





/* &#9472;&#9472; Upcoming Banner &#9472;&#9472; */
.upcoming-banner {
    display: none;
    align-items: flex-start;
    gap: .75rem;
    margin: 1rem auto;
    max-width: 900px;
    padding: 0 1.25rem;
}

.upcoming-banner.visible {
    display: flex;
}

.upcoming-inner {
    background: rgba(79, 70, 229, .12);
    border: 1px solid rgba(79, 70, 229, .3);
    border-radius: var(--radius);
    padding: .9rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    flex: 1;
}

.upcoming-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.upcoming-body {
    flex: 1;
}

.upcoming-body strong {
    font-size: .9rem;
    color: var(--primary-light);
    display: block;
    margin-bottom: .25rem;
}

.upcoming-body p {
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.upcoming-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: .1rem .3rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* &#9472;&#9472; View Switcher &#9472;&#9472; */
.view-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem auto 2rem;
    padding: 0 1.25rem;
    max-width: 900px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    border-radius: .75rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
}

.view-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.view-btn:hover:not(.active) {
    border-color: var(--primary-light);
    color: var(--text);
}

.filter-drawer-trigger {
    display: none;
}

.mobile-tabs {
    display: none;
}

.filter-tags-container {
    display: none;
}

.fab-citizen {
    display: none !important;
}

.citizen-header-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 99px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: var(--primary-light, #818cf8);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
    box-sizing: border-box;
}

.citizen-header-btn:hover {
    background: rgba(79, 70, 229, 0.18);
    border-color: rgba(79, 70, 229, 0.5);
    transform: translateY(-1px);
}

.citizen-header-btn:active {
    transform: scale(0.96);
}

.citizen-header-btn .citizen-btn-icon {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s;
}

.citizen-header-btn:hover .citizen-btn-icon {
    transform: scale(1.08);
}

.citizen-header-btn .citizen-btn-text-mobile {
    display: none;
}

.citizen-header-btn .citizen-btn-text-desktop {
    display: inline;
}

@media (max-width: 600px) {
    .view-toggle {
        display: none !important;
        /* Replaced by mobile-tabs */
    }

    /* On mobile: Hide header button to keep top bar roomy */
    #desktopCitizenBtn {
        display: none !important;
    }

    /* Hide mobile FAB when citizen portal modal or any modal is open */
    body.modal-open #mobileFabCitizen,
    .desc-modal.open~#mobileFabCitizen,
    #publicPortalModal.open~#mobileFabCitizen {
        display: none !important;
    }

    /* On mobile: Show round Menü button (Punkt) at exact original position & size */
    .fab-citizen {
        position: fixed !important;
        bottom: calc(3.25rem + env(safe-area-inset-bottom, 0px)) !important;
        right: 1.85rem !important;
        width: 3.5rem !important;
        height: 3.5rem !important;
        padding: 0 !important;
        border-radius: 50% !important;
        background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;
        z-index: 99 !important;
        cursor: pointer !important;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s !important;
        -webkit-tap-highlight-color: transparent !important;
        text-decoration: none !important;
    }

    .fab-citizen:active {
        transform: scale(0.92) !important;
        box-shadow: 0 2px 10px rgba(79, 70, 229, 0.35) !important;
    }

    .fab-citizen .fab-citizen-icon {
        flex-shrink: 0;
    }

    .fab-citizen .fab-citizen-label {
        font-size: 0.62rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px !important;
        text-transform: uppercase !important;
        line-height: 1 !important;
        color: #ffffff !important;
    }

    /* Extra bottom space on mobile so cards or bottom content are never covered */
    body {
        padding-bottom: 5.5rem !important;
    }

    .mobile-tabs {
        display: flex;
        justify-content: center;
        gap: 0.25rem;
        padding: 0.5rem;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(8px);
        border-radius: 1rem;
        margin: 1rem;
        border: 1px solid var(--border);
    }

    .mobile-tab-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.15rem;
        padding: 0.3rem 0.15rem;
        border: none;
        background: transparent;
        color: var(--text-muted);
        font-size: 0.7rem;
        font-weight: 600;
        border-radius: 0.7rem;
        transition: all 0.2s;
    }

    .mobile-tab-btn i {
        font-style: normal;
        font-size: 1rem;
    }

    .mobile-tab-btn.active {
        background: var(--primary);
        color: white;
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    }

    .filter-drawer-trigger {
        display: none !important;
    }

    .filters {
        display: flex !important;
        flex-direction: column;
        gap: 0 !important;
        padding: 0 1.25rem !important;
        box-sizing: border-box !important;
        margin: 0.2rem auto 0.35rem auto !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    select.filter-select {
        font-size: 16px !important;
        /* Prevent iOS zoom */
        padding: 0 1rem !important;
        height: 44px !important;
        line-height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        flex: none !important;
        /* Fix vertical stretching in column flex */
        width: 100% !important;
        background-color: var(--surface) !important;
        color: var(--text) !important;
        border: 1px solid var(--border) !important;
        border-radius: 1rem !important;
        appearance: none !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
        background-repeat: no-repeat !important;
        background-position: right 1rem center !important;
        background-size: 1.25rem !important;
    }

    .search-input {
        background-image: none !important;
    }

    /* Fix: Restore native <select> in Capacitor Android WebView */
    .is-native select.filter-select {
        appearance: auto !important;
        -webkit-appearance: menulist !important;
        background-image: none !important;
    }


}

/* &#9472;&#9472; News Widget Compact Layout (Carousel) &#9472;&#9472; */
.news-grid.compact {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 1rem 0.5rem 2rem 0.5rem;
    margin: 0;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.news-grid.compact::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.news-grid.compact .news-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    margin: 0;
    height: auto;
}

.is-embedded .news-grid.compact {
    padding-bottom: 3rem;
    /* Space for better scrolling */
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* &#9472;&#9472; Calendar &#9472;&#9472; */
#calendarView {
    display: none !important;
    max-width: 1000px;
    margin: 1.5rem auto 0;
    padding: 0 2.5rem 3rem;
}

#calendarView.visible {
    display: block !important;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.cal-nav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .6rem;
    padding: .45rem .9rem;
    color: var(--text);
    font-size: .95rem;
    cursor: pointer;
    transition: all .2s;
}

.cal-nav:hover {
    border-color: var(--primary);
    color: var(--primary-light);
}

.cal-month-label {
    font-size: 1.1rem;
    font-weight: 700;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .5rem;
}

.cal-dow {
    text-align: center;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-bottom: .5rem;
}

.cal-day {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .75rem;
    min-height: 72px;
    padding: .6rem .75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cal-day.has-events {
    cursor: pointer;
}

.cal-day.has-events:hover {
    border-color: var(--primary);
}

.cal-day.other-month {
    opacity: .3;
}

.cal-day.today {
    border-color: var(--primary);
    background: rgba(79, 70, 229, .08);
}

.cal-day.selected {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, .25);
}

.cal-day-num {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.cal-day.today .cal-day-num {
    color: var(--primary-light);
}

.cal-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: .3rem;
}

.cal-dot {
    width: 9.5px;
    height: 9.5px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cal-day-events {
    margin-top: 1.5rem;
}

.cal-day-events h4 {
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: .75rem;
    color: var(--text-muted);
}

.cal-event-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: .75rem;
    padding: .75rem 1rem;
    margin-bottom: .5rem;
    cursor: pointer;
    transition: border-color .2s;
    border-left: 3px solid transparent;
}

.cal-event-item:hover {
    border-right-color: var(--primary);
    opacity: .9;
}

.cal-event-item.no-details {
    cursor: default !important;
}

.cal-event-item.no-details:hover {
    opacity: 1 !important;
    border-right-color: transparent !important;
}

.cal-event-item .ev-title {
    font-weight: 600;
    font-size: .9rem;
}

.cal-event-item .ev-meta {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    background: #4f46e5;
    /* Strong indigo background */
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.1rem;
    font-family: 'Times New Roman', serif;
    font-style: italic;
    font-weight: bold;
    margin-left: 0.5rem;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.info-icon:hover {
    background: #3730a3;
    /* Darker indigo on hover */
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* ── Push Notifications Modal (Analog zu Bürger-Konto / Profil & Name bearbeiten) ── */
.push-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 100000 !important;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.push-modal.open {
    display: flex;
    opacity: 1;
}

.push-box {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    width: 95%;
    max-width: 540px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    position: relative;
    transform: translateY(16px) scale(0.97);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.push-box-back-btn {
    display: none;
}

@media (max-width: 768px) {
    .push-modal {
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        background: var(--surface, #ffffff) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .push-box {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100% !important;
        max-height: 100dvh !important;
        min-height: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
        transform: none !important;
        background: var(--surface) !important;
    }

    .push-box-header {
        padding: calc(0.85rem + env(safe-area-inset-top, 0px)) 1rem 0.85rem 1rem !important;
        border-bottom: 1px solid var(--border) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
    }

    .push-box-back-btn {
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
        background: var(--surface2) !important;
        border: 1px solid var(--border) !important;
        color: var(--text) !important;
        font-size: 0.82rem !important;
        font-weight: 700 !important;
        padding: 0.4rem 0.75rem !important;
        border-radius: 0.6rem !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
    }

    .push-box-header-title {
        text-align: center !important;
        flex: 1 !important;
    }

    .push-box-header-title h3 {
        font-size: 1.05rem !important;
        justify-content: center !important;
    }

    .push-box-subtitle {
        display: none !important;
    }

    .push-options {
        flex: 1 !important;
        padding: 1.15rem 1.15rem !important;
        gap: 1.25rem !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .push-box-footer {
        padding: 1rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom, 0px)) 1.15rem !important;
        border-top: 1px solid var(--border) !important;
        background: var(--surface) !important;
    }

    .push-emergency-banner {
        padding: 1rem 1.15rem !important;
    }
}

.push-modal.open .push-box {
    transform: translateY(0) scale(1);
}

.push-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border, rgba(226, 232, 240, 0.8));
    background: var(--surface, #ffffff);
    z-index: 10;
    flex-shrink: 0;
}

.push-box-header-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.push-box-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text, #0f172a);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    letter-spacing: -0.01em;
}

.push-box-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    margin: 0;
    font-weight: 400;
}

.push-box-close {
    background: var(--surface2, rgba(0, 0, 0, 0.05));
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text, #334155);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.push-box-close:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    transform: rotate(90deg);
}

.push-options {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    margin: 0;
    scrollbar-width: thin;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* 🚨 Emergency Alert Banner (Schlank, modern & ohne geschachtelte Boxen) */
.push-emergency-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 1rem 1.15rem;
    border-radius: 1rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 4px solid #ef4444;
    box-shadow: 0 2px 8px -2px rgba(239, 68, 68, 0.08);
}

.push-emergency-icon {
    font-size: 1.45rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.15rem;
    filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.25));
}

.push-emergency-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.push-emergency-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.push-emergency-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #b91c1c;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: -0.01em;
}

.push-emergency-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}

.push-emergency-badge::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffffff;
    animation: pushPulse 1.6s infinite ease-in-out;
}

@keyframes pushPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.push-emergency-desc {
    font-size: 0.79rem;
    line-height: 1.45;
    color: var(--text, #334155);
    margin: 0;
    opacity: 0.92;
}

/* Kein Kasten im Kasten! Ein sanfter, eleganter Subtext-Trenner mit kleinerer Schrift */
.push-emergency-note {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.68rem;
    line-height: 1.38;
    color: var(--text-muted, #64748b);
    margin: 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(239, 68, 68, 0.15);
    opacity: 0.88;
}

.push-note-dot {
    font-size: 0.78rem;
    line-height: 1.2;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.push-emergency-note strong {
    color: #b91c1c;
    font-weight: 600;
}

/* Header row with Quick-Select buttons */
.push-opt-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
}

.push-section-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text, #0f172a);
    margin: 0;
}

.push-quick-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface2, rgba(0, 0, 0, 0.04));
    padding: 3px 6px;
    border-radius: 9999px;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.push-quick-btn {
    background: transparent;
    border: none;
    color: var(--primary, #0284c7);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.push-quick-btn:hover {
    background: var(--primary, #0284c7);
    color: #ffffff;
}

.push-quick-sep {
    color: var(--text-muted, #94a3b8);
    font-size: 0.7rem;
    opacity: 0.6;
    user-select: none;
}

/* Grid for Gemeinden */
#pushGemeindenList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 0.45rem;
    max-height: 165px;
    overflow-y: auto;
    padding: 0.55rem;
    border-radius: 0.85rem;
    background: var(--surface2, rgba(0, 0, 0, 0.03));
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    scrollbar-width: thin;
}

.push-gemeinde-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: 0.6rem;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, rgba(0, 0, 0, 0.06));
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text, #1e293b);
    user-select: none;
}

.push-gemeinde-card:hover {
    border-color: var(--primary, #0284c7);
    background: rgba(2, 132, 199, 0.04);
    transform: translateY(-1px);
}

.push-gemeinde-card input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary, #0284c7);
}

.push-gemeinde-card span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Categories Grid */
#pushCategoriesGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.65rem;
}

.push-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.85rem;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.push-checkbox:hover {
    border-color: var(--primary, #0284c7);
    background: rgba(2, 132, 199, 0.03);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.push-checkbox input {
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary, #0284c7);
}

.push-cb-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.push-cb-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text, #0f172a);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.push-cb-hint {
    font-size: 0.72rem;
    color: var(--text-muted, #64748b);
    line-height: 1.35;
}

/* Footer */
.push-box-footer {
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
    background: var(--surface, #ffffff);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.btn-push-save {
    width: 100%;
    background: linear-gradient(135deg, var(--primary, #0284c7) 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 0.85rem;
    padding: 0.85rem;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-push-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

.btn-push-save:active {
    transform: translateY(0);
}

.btn-push-save:disabled {
    background: var(--text-muted, #94a3b8);
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-push-unsubscribe {
    width: 100%;
    background: transparent;
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 0.85rem;
    padding: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.82rem;
    display: none;
    transition: all 0.2s ease;
}

.btn-push-unsubscribe:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: #ef4444;
}

.push-status {
    font-size: 0.77rem;
    margin-top: 0.2rem;
    text-align: center;
    color: var(--text-muted, #64748b);
    font-weight: 500;
}

/* Event-Karte: rechte Spalte mit Bild + Kalender */
.event-right-col {
    display: none;
    /* Deaktiviert, da Icons nun oben rechts sind */
}

.markt-card-img-thumb {
    width: 100px;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Modern Course Cards (Bürger-Portal) */
.kurs-card-v2 {
    background: var(--surface) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 1.15rem !important;
    padding: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.65rem !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.kurs-card-v2 * {
    box-sizing: border-box !important;
}

.kurs-card-v2:hover {
    transform: translateY(-3px) !important;
    border-color: var(--primary-light) !important;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.14) !important;
}

.kurs-badge-slot {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0.1rem !important;
    height: auto !important;
}

.kurs-title-slot {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
    font-weight: 800 !important;
    font-size: 1.12rem !important;
    color: var(--text) !important;
    line-height: 1.35 !important;
    margin-bottom: 0.2rem !important;
    word-break: break-word !important;
    height: auto !important;
    min-height: auto !important;
}

.kurs-leader-slot {
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.45rem !important;
    font-size: 0.86rem !important;
    color: var(--primary-light) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
    height: auto !important;
}

.kurs-info-slot {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
    font-size: 0.86rem !important;
    color: var(--text-muted) !important;
    line-height: 1.45 !important;
    word-break: break-word !important;
    height: auto !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.kurs-info-slot>span:first-child,
.kurs-leader-slot>span:first-child {
    flex-shrink: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;
}

.kurs-badge-more {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    background: rgba(79, 70, 229, 0.12) !important;
    color: var(--primary-light) !important;
    padding: 0.15rem 0.5rem !important;
    border-radius: 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
    margin-left: 0.2rem !important;
}

.kurs-status-slot {
    margin-top: auto !important;
    padding-top: 0.65rem !important;
    border-top: 1px dashed var(--border) !important;
    height: auto !important;
}

/* Detail View Styles */
.markt-detail-container {
    padding: 0;
}

/* Optimized Job Flyer Viewer */
.job-flyer-viewer {
    width: 100%;
    height: 480px;
    max-height: 70vh;
    background: var(--surface2);
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    margin: 0 0 1.5rem 0;
    box-shadow: 0 8px 30px -8px rgba(0, 0, 0, 0.12);
    cursor: zoom-in;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .job-flyer-viewer {
        height: 340px;
        border-radius: 1.25rem;
    }
}

.job-flyer-viewer-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(25px) brightness(0.65);
    transform: scale(1.15);
    opacity: 0.55;
    z-index: 1;
}

.job-flyer-viewer img.job-flyer-img-fg {
    position: relative;
    z-index: 2;
    max-width: 96%;
    max-height: 96%;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.job-flyer-viewer:hover img.job-flyer-img-fg {
    transform: scale(1.02);
}

.job-flyer-zoom-hint {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 0.45rem 0.85rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 3;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.markt-detail-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 300px;
    background: #000;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    scrollbar-width: none;
    border: 1px solid var(--border);
}

.markt-detail-gallery::-webkit-scrollbar {
    display: none;
}

.markt-detail-gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    scroll-snap-align: center;
    flex-shrink: 0;
}

.markt-detail-info {
    padding: 0 0.5rem;
}

.markt-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.markt-detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.2;
}

.markt-detail-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-light);
    background: rgba(45, 212, 191, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 0.75rem;
}

.markt-detail-cat {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.markt-detail-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    white-space: pre-wrap;
}

.markt-detail-contact-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.markt-detail-contact-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.markt-detail-contact-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-flyer-thumb {
    width: 42px;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: opacity 0.15s ease;
    align-self: stretch;
}

.event-flyer-thumb:hover {
    opacity: 0.85;
}

/* &#9472;&#9472; Custom Modal Confirm &#9472;&#9472; */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-content-confirm {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    width: 96%;
    max-width: 450px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content-confirm {
    transform: scale(1);
}

.modal-title-confirm {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

.modal-message-confirm {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 2rem;
}

.modal-actions-confirm {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-btn-confirm-ui {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.modal-btn-abort-ui {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
}

.modal-btn-confirm-ui-primary {
    background: var(--primary);
    color: white;
}

.modal-btn-confirm-ui:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* &#9472;&#9472; Toast &#9472;&#9472; */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    font-size: .875rem;
    z-index: 9999;
    opacity: 0;
    transition: all .3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    border-color: rgba(52, 211, 153, .3);
}

.toast.error {
    border-color: rgba(248, 113, 113, .3);
}

.toast.info {
    border-color: rgba(59, 130, 246, .3);
}

.event-flyer-pdf {
    font-size: 1.6rem;
    text-decoration: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: transform 0.15s ease;
}

.event-flyer-pdf:hover {
    transform: scale(1.15);
}

/* Fixed centering and Mobile Overflow Prevention for News Detail View */
#portalNewsDetailView,
#portalNewsDetailView * {
    box-sizing: border-box !important;
}
#portalNewsDetailView {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}
#portalNewsDetailView .markt-detail-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
}
#portalNewsDetailView .markt-detail-info {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0.5rem !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
}
#newsDetailContent {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto !important;
}
#newsDetailContent p,
#newsDetailContent div,
#newsDetailContent section,
#newsDetailContent article,
#newsDetailContent span,
#newsDetailContent h1,
#newsDetailContent h2,
#newsDetailContent h3,
#newsDetailContent h4,
#newsDetailContent h5,
#newsDetailContent h6 {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}
#newsDetailContent img,
#newsDetailContent iframe,
#newsDetailContent video,
#newsDetailContent object,
#newsDetailContent embed,
#newsDetailContent svg {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
#newsDetailContent table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
}
#newsDetailImageContainer,
.news-slideshow-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Fullscreen Bild-Modal */
.img-modal {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.92) !important;
    z-index: 99999 !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: zoom-out;
}
.img-modal.open {
    display: flex !important;
}
.img-modal img {
    max-width: 92vw !important;
    max-height: 86vh !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7) !important;
    object-fit: contain !important;
}
.img-modal-close {
    position: absolute !important;
    top: 1rem !important;
    right: 1.25rem !important;
    font-size: 2.2rem !important;
    color: #ffffff !important;
    cursor: pointer !important;
    background: none !important;
    border: none !important;
    line-height: 1 !important;
    z-index: 100005 !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6) !important;
}

/* Flyer Slider Pfeile & Indikator */
.flyer-nav-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(15, 23, 42, 0.65) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    line-height: 1 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 100003 !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}
.flyer-nav-btn:hover {
    background: rgba(15, 23, 42, 0.95) !important;
    transform: translateY(-50%) scale(1.08) !important;
}
.flyer-nav-btn:active {
    transform: translateY(-50%) scale(0.92) !important;
}
.flyer-nav-prev {
    left: 8px !important;
    padding-right: 1px !important;
}
.flyer-nav-next {
    right: 8px !important;
    padding-left: 1px !important;
}
.flyer-indicator {
    position: absolute !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(15, 23, 42, 0.8) !important;
    color: #ffffff !important;
    padding: 6px 16px !important;
    border-radius: 20px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    z-index: 100003 !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    display: none;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}
@media (max-width: 480px) {
    .cal-day {
        min-height: 48px;
        padding: .3rem .3rem;
    }

    .cal-dow {
        font-size: .6rem;
    }

    .cal-day-num {
        font-size: .7rem;
    }

    .cal-dots {
        gap: 2.5px;
    }

    .cal-dot {
        width: 7.5px;
        height: 7.5px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    }

    /* Compact Filters for Mobile */
    .filters {
        gap: 0.25rem;
        padding: 0 1.25rem !important;
        box-sizing: border-box !important;
        margin: 0.5rem auto;
    }

    .filter-group {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
    }

    .filter-group::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .filter-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.75rem;
        border: 1px solid var(--border);
    }

    .view-toggle {
        margin: 0.5rem 0;
    }

    .view-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    select.filter-select {
        font-size: 16px !important;
        padding: 0 1rem !important;
        height: 44px !important;
        line-height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        flex: none !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .detail-info-grid {
        grid-template-columns: 1fr;
    }

    .search-input {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* &#9472;&#9472; Room Booking Redesign v3 &#9472;&#9472; */
.room-portal-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.room-portal-tab {
    flex: 1;
    padding: 0.6rem;
    border-radius: 0.6rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.room-portal-tab.active {
    background: #2a2d3e;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.room-portal-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0.2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #a855f7;
    border-radius: 4px;
}

.room-filter-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.room-search-box {
    flex: 1;
    position: relative;
}

.room-search-box input {
    width: 100%;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 1rem;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

[data-theme="light"] .room-search-box input {
    background: var(--bg);
}

.room-search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    background: var(--surface);
}

.room-search-box i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.btn-room-filter {
    background: var(--surface2);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 1rem;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-room-filter:hover {
    background: var(--surface);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

/* Modern Buttons & Modals */
.btn-modern-primary {
    background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%);
    color: white;
    border: none;
    border-radius: 1rem;
    padding: 0.85rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.4);
}

.btn-modern-secondary {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-modern-secondary:hover {
    background: var(--surface);
    transform: translateY(-1px);
}

.modal-header-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 3rem;
    /* Padding for absolute buttons */
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
    text-align: center;
}

.modal-back-btn {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
    z-index: 10;
}

.modal-back-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: #a855f7;
    color: #a855f7;
    transform: translateY(-50%) translateX(-2px);
}

.modal-close-btn {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface2, #f1f5f9) !important;
    border: 1px solid var(--border, #cbd5e1) !important;
    color: var(--text, #0f172a) !important;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
    transform: translateY(-50%) scale(1.08);
}

.modal-close-btn:active {
    transform: translateY(-50%) scale(0.95);
}

@media (max-width: 600px) {
    .modal-header-modern {
        padding: 0.75rem 3.2rem;
    }

    .modal-header-modern h2 {
        font-size: 1.15rem !important;
    }

    .modal-header-modern p {
        font-size: 0.72rem !important;
    }

    .modal-back-btn,
    .modal-close-btn {
        width: 36px;
        height: 36px;
        font-size: 1.15rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .modal-close-btn {
        right: 0.85rem;
    }

    .modal-back-btn {
        left: 0.85rem;
    }
}

.room-list-v3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
}

@media (max-width: 600px) {
    .room-list-v3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.room-card-v3 {
    background: var(--surface, #ffffff);
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    height: 100%;
    box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.07), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    position: relative;
}

.room-card-v3:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.14), 0 4px 12px -2px rgba(0, 0, 0, 0.06);
    border-color: var(--primary-light, #818cf8);
}

.room-card-v3:hover .room-image-v3 {
    transform: scale(1.05);
}

.room-image-container-v3 {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    background: var(--surface2, #f1f5f9);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

/* Subtle vignette gradient overlay to guarantee badge contrast on white/bright skies */
.room-image-container-v3::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0.08) 25%, transparent 45%, transparent 75%, rgba(0, 0, 0, 0.12) 100%);
    pointer-events: none;
    z-index: 1;
}

.room-image-v3 {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center 45% !important;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.room-image-v3-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--surface2) 0%, var(--bg) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(168, 85, 247, 0.2);
}

/* Modern floating glass badges on image */
.room-status-badge-v3 {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-size: 0.72rem;
    font-weight: 700;
    color: #059669;
    z-index: 3;
}

.room-status-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.room-info-pill-v3 {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    color: var(--text, #1e293b);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    z-index: 3;
}

.room-info-pill-v3:hover {
    transform: scale(1.12);
    background: #ffffff;
    color: var(--primary, #4f46e5);
}

.room-content-v3 {
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}

.room-header-v3 {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.room-title-v3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
    word-wrap: break-word;
}

.room-subtitle-v3 {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.room-amenities-v3 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.amenity-item-v3 {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    background: var(--surface2, rgba(0, 0, 0, 0.04));
    border: 1px solid var(--border);
    padding: 0.22rem 0.55rem;
    border-radius: 0.5rem;
    line-height: 1.3;
}

.amenity-icon-v3 {
    font-size: 0.85rem;
    color: var(--primary-light, #6366f1);
}

.room-card-footer-v3 {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.room-card-cta-btn {
    background: var(--primary, #4f46e5);
    color: white;
    padding: 0.55rem 1rem;
    border-radius: 0.65rem;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
}

.room-card-v3:hover .room-card-cta-btn {
    background: var(--primary-hover, #4338ca);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.38);
}

/* Unified Mobile and Desktop sizing for rooms */
@media (max-width: 600px) {
    .room-title-v3 {
        font-size: 1.05rem;
    }

    .room-content-v3 {
        padding: 0.9rem 1rem;
        gap: 0.65rem;
    }

    .room-image-container-v3 {
        aspect-ratio: 16 / 9;
        height: auto;
    }
}

/* Room Description Modal Popup */
@keyframes roomModalPop {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

#roomDescModal {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    z-index: 6000 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-sizing: border-box !important;
    overflow-y: auto !important;
}

#roomDescModal.open {
    display: flex !important;
    opacity: 1 !important;
}

#roomDescModal.open::before,
#roomDescModal.open::after {
    display: none !important;
    content: none !important;
}

#roomDescModal .desc-box,
#roomDescModal .room-desc-popup-box {
    background: var(--surface, #ffffff) !important;
    color: var(--text, #0f172a) !important;
    width: 100% !important;
    max-width: 460px !important;
    border-radius: 1.35rem !important;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.08)) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    padding: 1.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1.15rem !important;
    margin: auto !important;
    position: relative !important;
    transform: scale(1) !important;
    animation: roomModalPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

.room-desc-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.room-desc-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(79, 70, 229, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.room-desc-popup-title {
    color: var(--text, #0f172a);
    font-weight: 800;
    font-size: 1.15rem;
    margin: 0;
    line-height: 1.2;
}

.room-desc-popup-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.room-desc-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface2, #f1f5f9);
    border: 1px solid var(--border, #e2e8f0);
    color: var(--text-muted, #64748b);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.room-desc-close-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.room-desc-popup-body {
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.room-desc-text-content {
    color: var(--text-muted, #475569);
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.room-desc-popup-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.room-desc-popup-action-btn {
    background: var(--primary, #4f46e5);
    color: white;
    border: none;
    padding: 0.6rem 1.35rem;
    border-radius: 0.7rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transition: all 0.2s;
}

.room-desc-popup-action-btn:hover {
    background: var(--primary-hover, #4338ca);
    transform: translateY(-1px);
}

.room-desc-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s;
}

.room-desc-close:hover {
    color: white;
}

.room-desc-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
    padding-right: 2rem;
}

.room-desc-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.btn-check-availability-v3 {
    display: none;
}

.btn-check-availability-v3:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5);
    filter: brightness(1.1);
}

.btn-load-more-v3 {
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.7rem 1.25rem;
    font-weight: 700;
    font-size: 0.85rem;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-load-more-v3:hover {
    transform: scale(1.05);
}

.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 2.5rem;
    padding: 1rem 0;
}

.room-card-premium {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.room-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-light);
}

.room-card-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--surface2), var(--bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.room-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.05), transparent);
}

.room-card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.room-card-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-light);
    width: fit-content;
}

.room-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text);
    line-height: 1.2;
}

.room-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.room-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-top: 1px dashed var(--border);
}

.room-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.room-card-footer {
    padding: 1.25rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: stretch;
}

.room-card-footer .btn-install {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    padding: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Detail Modal & Calendar Polish */
.calendar-premium {
    background: var(--surface);
    border-radius: 1.25rem;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.calendar-header-p {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
    gap: 1rem;
}

/* New Wrapper for Scrolling */
.calendar-scroll-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    /* Erlaube vertikales Scrollen für lange Monate */
    position: relative;
    background: var(--bg);
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Header Layout für das Buchungs-Modal */
.room-booking-header {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.room-booking-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.room-booking-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Alles initial zentrieren */
    gap: 1rem;
    padding: 0.5rem 1rem 0.75rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    /* Basis für absolute Positionierung */
}

.calendar-grid-p {
    display: grid;
    grid-template-columns: 50px repeat(7, minmax(0, 1fr));
    background: #fff;
    /* Reines Weiß für Kalenderblatt-Optik */
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: opacity 0.3s ease;
}

/* Mobile Day Picker Styles - SLIM & COMPACT */
.mobile-day-picker {
    display: none;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 0.75rem 0.6rem;
    /* Mehr vertikaler Platz gegen Abschneiden */
    gap: 0.5rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    z-index: 20;
    touch-action: pan-x;
    overscroll-behavior: contain;
    align-items: center;
}

.mobile-day-picker.picker-hidden {
    display: none !important;
}

.booking-form-premium.booking-bar-hidden {
    display: none !important;
}

.mobile-day-picker::-webkit-scrollbar {
    display: none;
}

.day-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.85rem;
    min-width: 65px;
    height: 38px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    scroll-snap-align: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 700;
    gap: 5px;
}

.day-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.day-chip .day-name {
    font-size: 0.65rem;
    opacity: 0.8;
    text-transform: uppercase;
}

.day-chip .day-num {
    font-size: 0.85rem;
    font-weight: 800;
}

.calendar-scroll-wrapper {
    overflow-y: auto;
    position: relative;
    scrollbar-width: thin;
    background: var(--bg);
}

@media (max-width: 600px) {
    .room-booking-header {
        padding: 0.75rem 0.5rem 0.25rem 0.5rem !important;
    }

    .room-booking-header-top h3 {
        font-size: 1rem !important;
    }
}

[data-theme="dark"] .calendar-grid-p {
    background: var(--surface);
}

.calendar-cell {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    border-left: 0.5px solid var(--border);
    min-height: 28px;
    padding: 0;
    transition: all 0.15s ease;
    position: relative;
    box-sizing: border-box;
    user-select: none;
    touch-action: pan-y;
}

[data-theme="dark"] .calendar-cell {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.calendar-cell.selecting {
    background: rgba(99, 102, 241, 0.18) !important;
    border-left: 3px solid var(--primary) !important;
    z-index: 5;
}

/* ── Slot Draft: Deine Buchung (Entwurf) nach Mockup ── */
.calendar-cell.slot-draft {
    background: repeating-linear-gradient(-45deg,
            rgba(99, 102, 241, 0.18),
            rgba(99, 102, 241, 0.18) 10px,
            rgba(99, 102, 241, 0.06) 10px,
            rgba(99, 102, 241, 0.06) 20px) !important;
    border-left: 4px solid var(--primary, #4f46e5) !important;
    border-right: 1px solid rgba(99, 102, 241, 0.25) !important;
    position: relative;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 4;
}

.calendar-cell.slot-draft.draft-start {
    border-top: 1.5px solid rgba(99, 102, 241, 0.35) !important;
    border-top-right-radius: 8px;
    border-top-left-radius: 4px;
}

.calendar-cell.slot-draft.draft-end {
    border-bottom: 1.5px solid rgba(99, 102, 241, 0.35) !important;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 4px;
}

.draft-badge-content {
    padding: 0.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    pointer-events: none;
    line-height: 1.2;
}

.draft-badge-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary, #4f46e5);
    letter-spacing: -0.01em;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.draft-badge-time {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary-light, #6366f1);
    opacity: 0.9;
}

[data-theme="dark"] .draft-badge-title {
    color: #c7d2fe;
}

[data-theme="dark"] .draft-badge-time {
    color: #a5b4fc;
}

/* ── Event Cards: Wartend & Gebucht nach Mockup ── */
.calendar-cell.slot-pending {
    background: rgba(245, 158, 11, 0.09) !important;
    border-left: 4px solid #f59e0b !important;
    border-right: 1px solid rgba(245, 158, 11, 0.15) !important;
    position: relative;
    box-sizing: border-box;
    color: var(--text);
    min-width: 0;
    overflow: hidden;
}

.calendar-cell.slot-pending.event-start {
    border-top: 1px solid rgba(245, 158, 11, 0.25) !important;
    border-top-right-radius: 8px;
    border-top-left-radius: 4px;
}

.calendar-cell.slot-pending.event-end {
    border-bottom: 1px solid rgba(245, 158, 11, 0.25) !important;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 4px;
}

.calendar-cell.slot-booked {
    background: rgba(16, 185, 129, 0.09) !important;
    border-left: 4px solid #10b981 !important;
    border-right: 1px solid rgba(16, 185, 129, 0.15) !important;
    position: relative;
    box-sizing: border-box;
    color: var(--text);
    min-width: 0;
    overflow: hidden;
}

.calendar-cell.slot-booked.event-start {
    border-top: 1px solid rgba(16, 185, 129, 0.25) !important;
    border-top-right-radius: 8px;
    border-top-left-radius: 4px;
}

.calendar-cell.slot-booked.event-end {
    border-bottom: 1px solid rgba(16, 185, 129, 0.25) !important;
    border-bottom-right-radius: 8px;
    border-bottom-left-radius: 4px;
}

.event-card-content {
    padding: 0.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.2;
    pointer-events: none;
    min-width: 0;
    overflow: hidden;
}

.event-card-time {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
}

.event-card-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text);
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 99px;
    width: fit-content;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.event-card-status-tag.tag-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

[data-theme="dark"] .event-card-status-tag.tag-pending {
    background: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.45);
}

.event-card-status-tag.tag-confirmed {
    background: rgba(16, 185, 129, 0.18);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .event-card-status-tag.tag-confirmed {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.45);
}

.event-card-status-tag.tag-draft {
    background: rgba(99, 102, 241, 0.18);
    color: var(--primary, #4f46e5);
    border: 1px solid rgba(99, 102, 241, 0.35);
}

[data-theme="dark"] .event-card-status-tag.tag-draft {
    background: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.45);
}

.calendar-header-day {
    text-align: center;
    padding: 0.65rem 0.2rem;
    background: #f8fafc;
    font-weight: 800;
    font-size: 0.75rem;
    border-bottom: 2px solid var(--border);
    border-left: 1px solid var(--border);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    position: sticky;
    top: 0;
    z-index: 12;
}

[data-theme="dark"] .calendar-header-day {
    background: var(--surface2);
}

.calendar-header-day span {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text);
    letter-spacing: 0.06em;
}

.calendar-header-day .day-date-sub {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.calendar-header-day.is-today {
    background: rgba(99, 102, 241, 0.12);
    border-bottom: 2px solid var(--primary, #4f46e5);
}

.calendar-header-day.is-today span {
    color: var(--primary, #4f46e5);
    font-weight: 900;
}

.calendar-header-day.is-today .day-date-sub {
    color: var(--primary, #4f46e5);
    font-weight: 800;
}

.calendar-header-day.month-header-day {
    padding: 0.65rem 0.2rem;
    background: #f1f5f9;
}

[data-theme="dark"] .calendar-header-day.month-header-day {
    background: var(--surface2);
}

.calendar-header-day.month-header-day span {
    font-size: 0.82rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: 0.08em;
}

.calendar-header-day.month-header-day.is-weekend span {
    color: var(--text-muted);
}

.calendar-time-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    background: #f9fafb;
    font-weight: 700;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    position: sticky;
    left: 0;
    z-index: 10;
    border-right: 1px solid var(--border);
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

[data-theme="dark"] .calendar-time-label {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.calendar-time-label.row-hover {
    background: rgba(99, 102, 241, 0.16) !important;
    color: var(--primary, #4f46e5) !important;
    font-weight: 800 !important;
    box-shadow: inset 3px 0 0 var(--primary, #4f46e5);
}

[data-theme="dark"] .calendar-time-label {
    background: var(--surface);
}

[data-theme="dark"] .calendar-time-label.row-hover {
    background: rgba(99, 102, 241, 0.28) !important;
    color: #c7d2fe !important;
}

.calendar-time-label:first-child {
    z-index: 15;
    /* Top-left corner box */
}

.slot-free {
    cursor: pointer;
}

.slot-free:hover {
    background: rgba(99, 102, 241, 0.08);
    z-index: 1;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.col-today {
    background: rgba(79, 70, 229, 0.02);
}

/* &#9472;&#9472; Month & Year Specifics &#9472;&#9472; */
.calendar-grid-m {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: var(--bg);
    border-right: 1px solid var(--border);
}

.calendar-day-m {
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
    min-height: 100px;
    padding: 0.35rem 0.45rem;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

[data-theme="dark"] .calendar-day-m {
    background: var(--surface);
}

.calendar-day-m:hover {
    background: rgba(99, 102, 241, 0.04);
    z-index: 2;
    box-shadow: inset 0 0 0 1px var(--primary-light);
}

.calendar-day-m.other-month {
    opacity: 0.25;
    cursor: default;
    background: rgba(0, 0, 0, 0.015);
}

.calendar-day-m-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    flex-shrink: 0;
}

.calendar-day-m-num {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-muted);
    line-height: 1;
}

.calendar-day-m.is-today .calendar-day-m-num {
    color: white;
    background: var(--primary);
    padding: 2px 7px;
    border-radius: 99px;
    display: inline-block;
}

.calendar-month-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.month-event-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    min-width: 0;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.1s ease;
    text-align: left;
}

.month-event-pill:hover {
    filter: brightness(0.95);
    transform: translateY(-0.5px);
}

.month-event-pill.pill-confirmed {
    background: rgba(16, 185, 129, 0.13);
    color: #065f46;
    border-left: 3px solid #10b981;
}

[data-theme="dark"] .month-event-pill.pill-confirmed {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
}

.month-event-pill.pill-pending {
    background: rgba(245, 158, 11, 0.14);
    color: #92400e;
    border-left: 3px solid #f59e0b;
}

[data-theme="dark"] .month-event-pill.pill-pending {
    background: rgba(245, 158, 11, 0.22);
    color: #fcd34d;
}

.month-event-time {
    font-size: 0.62rem;
    font-weight: 800;
    opacity: 0.85;
    flex-shrink: 0;
}

.month-event-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.month-event-more {
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--primary);
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(79, 70, 229, 0.08);
    text-align: center;
    white-space: nowrap;
    margin-top: 1px;
    cursor: pointer;
}

[data-theme="dark"] .month-event-more {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.15);
}

.calendar-booking-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
}

.booking-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.calendar-grid-y {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg);
}

.year-month-box {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.year-month-box:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    background: var(--surface);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.year-month-name {
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    text-align: center;
    color: var(--primary-light);
}

.mini-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    font-size: 0.5rem;
    opacity: 0.6;
}

.mini-day {
    text-align: center;
    padding: 1px;
}

.mini-day.has-booking {
    color: white;
    background: var(--primary);
    font-weight: bold;
    border-radius: 2px;
}

.mini-day.weekend {
    color: var(--primary-light);
    opacity: 0.9;
}

/* &#9472;&#9472; View Switcher Segmented (Premium) &#9472;&#9472; */
.view-switcher-p {
    display: flex;
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 0.8rem;
    gap: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    position: absolute;
    /* Auf Desktop rechts fixieren */
    right: 1.25rem;
}

.view-switcher-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    text-align: center;
}

.view-switcher-btn.active {
    background: var(--surface);
    color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

.view-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    padding: 0.6rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn.active {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-light);
}

/* &#9472;&#9472; Marketplace Creation Polish &#9472;&#9472; */
.form-toggle-group {
    display: flex;
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 0.28rem;
    border-radius: 9999px;
    gap: 0.25rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
    user-select: none;
}

.form-toggle-btn {
    flex: 1;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    padding: 0.52rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    line-height: 1.25;
    white-space: nowrap;
}

.form-toggle-btn:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .form-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

.form-toggle-btn.active {
    background: var(--surface);
    color: var(--text);
    font-weight: 800;
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-toggle-btn span {
    font-size: 0.95rem;
    line-height: 1;
}

/* ── Marketplace Inserieren Button Polish ── */
.btn-markt-inserieren {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.52rem 1.25rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #8b5cf6 100%);
    color: #ffffff !important;
    font-weight: 800;
    font-size: 0.88rem;
    font-family: inherit;
    line-height: 1.25;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.32), 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    text-decoration: none;
}

.btn-markt-inserieren:hover {
    transform: translateY(-1.5px) scale(1.02);
    box-shadow: 0 7px 22px rgba(79, 70, 229, 0.48), 0 2px 5px rgba(0, 0, 0, 0.1);
    filter: brightness(1.05);
}

.btn-markt-inserieren:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.btn-markt-inserieren .btn-plus-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

.btn-markt-inserieren:hover .btn-plus-icon {
    transform: rotate(90deg);
}

/* ── Marketplace Header Bar (Angebote/Gesuche & Inserieren side-by-side) ── */
.markt-header-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.6rem !important;
    margin-bottom: 0.75rem !important;
    flex-wrap: nowrap !important;
}

.markt-toggle-group {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 320px !important;
    margin-top: 0 !important;
}

.btn-markt-inserieren-fab {
    display: none !important;
}

@media (max-width: 640px) {
    .markt-header-bar {
        gap: 0.45rem !important;
        margin-bottom: 0.5rem !important;
    }

    .markt-toggle-group {
        max-width: none !important;
        padding: 0.2rem !important;
    }

    .markt-toggle-group .form-toggle-btn {
        padding: 0.42rem 0.5rem !important;
        font-size: 0.8rem !important;
        gap: 0.3rem !important;
    }

    .btn-markt-inserieren {
        padding: 0.42rem 0.75rem !important;
        font-size: 0.8rem !important;
        gap: 0.35rem !important;
        flex-shrink: 0 !important;
    }

    .btn-markt-inserieren .btn-plus-icon {
        width: 18px !important;
        height: 18px !important;
        font-size: 0.9rem !important;
    }

    #marktSearchInput {
        padding: 0.58rem 0.85rem 0.58rem 2.25rem !important;
        font-size: 0.84rem !important;
        border-radius: 0.85rem !important;
    }

    .markt-search-pills-container {
        margin-bottom: 0.65rem !important;
    }

    #portalMarktplatzView .modern-pills-wrapper {
        margin-bottom: 0.35rem !important;
    }

    #portalMarktplatzView .modern-pills-wrapper .pills-scroll-btn {
        display: none !important;
    }

    #marktCategoryPills {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        padding: 0.15rem 0 0.35rem 0 !important;
    }

    #marktCategoryPills::-webkit-scrollbar {
        display: none !important;
        height: 0 !important;
    }

    #marktCategoryPills .category-pill {
        padding: 0.38rem 0.75rem !important;
        font-size: 0.78rem !important;
    }
}

.btn-add-photos {
    width: 100%;
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--surface2);
    border: 2px dashed var(--border);
    border-radius: 1.25rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.btn-add-photos:hover {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-add-photos span.upload-icon {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.btn-add-photos b {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.btn-add-photos small {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75rem;
}

.booking-form-premium {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--surface2);
    border-top: 1px solid var(--border);
    align-items: center;
}

/* Date and Time Picker Indicators: full invisible overlay so any touch triggers the native picker */
.booking-form-premium input[type="date"],
.booking-form-premium input[type="time"] {
    position: relative !important;
    cursor: pointer !important;
}

.booking-form-premium input[type="date"]::-webkit-calendar-picker-indicator,
.booking-form-premium input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    background: transparent !important;
    color: transparent !important;
}

.booking-form-premium input[type="date"]::-webkit-inner-spin-button,
.booking-form-premium input[type="date"]::-webkit-clear-button,
.booking-form-premium input[type="time"]::-webkit-inner-spin-button,
.booking-form-premium input[type="time"]::-webkit-clear-button {
    display: none !important;
    -webkit-appearance: none !important;
}

.booking-time-input {
    width: 48px !important;
    border: none !important;
    background: transparent !important;
    padding: 0.35rem 0.05rem !important;
    min-width: 0 !important;
    text-align: center !important;
    box-shadow: none !important;
    font-size: 0.85rem !important;
    font-variant-numeric: tabular-nums !important;
    color: var(--text) !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.calendar-selection-hint {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 52px;
    align-items: center;
    justify-content: space-between;
    background: var(--primary, #4f46e5);
    color: white;
    padding: 0.4rem 0.95rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 99px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    animation: fadeIn 0.15s ease;
    z-index: 50;
    pointer-events: auto;
    white-space: nowrap;
    max-width: calc(100% - 2rem);
}

@media (min-width: 768px) {
    .calendar-selection-hint {
        top: 14px;
    }
}

.booking-form-bottom-row {
    display: contents;
}

.booking-form-header-mobile {
    display: none;
}

.form-group-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group-compact label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.description-text {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Smartphone Only (<= 600px) Compact Styles */
@media (max-width: 600px) {
    .mobile-day-picker {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0.35rem 0.35rem !important;
        gap: 0.25rem !important;
        background: var(--surface2) !important;
        border-bottom: 1px solid var(--border) !important;
        overflow-x: hidden !important;
    }

    .mobile-day-picker.picker-hidden {
        display: none !important;
    }

    .booking-form-premium.booking-bar-hidden {
        display: none !important;
    }

    textarea {
        resize: vertical !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .day-chip {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: 48px !important;
        padding: 0.3rem 0.1rem !important;
        border-radius: 0.85rem !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .day-chip .day-name {
        font-size: 0.65rem !important;
    }

    .day-chip .day-num {
        font-size: 0.82rem !important;
    }

    .calendar-grid-p {
        grid-template-columns: 46px 1fr !important;
        width: 100% !important;
    }

    .room-booking-header {
        padding: 0.5rem 0.75rem 0.35rem 0.75rem !important;
    }

    .room-booking-header-top {
        margin-bottom: 0.2rem !important;
    }

    .room-booking-header-nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.3rem !important;
        width: 100% !important;
        padding: 0.1rem 0 !important;
    }

    .nav-arrow-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 1rem !important;
    }

    #roomWeekLabel {
        min-width: auto !important;
        font-size: 0.82rem !important;
        font-weight: 700 !important;
    }

    .view-switcher-p {
        position: static !important;
        width: auto !important;
        margin: 0 auto !important;
        flex-shrink: 0 !important;
        padding: 2px !important;
    }

    .view-switcher-btn {
        padding: 0.22rem 0.55rem !important;
        font-size: 0.72rem !important;
    }

    .calendar-cell {
        min-height: 48px !important;
    }

    .time-suffix-label {
        display: none !important;
    }

    .booking-form-premium {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.35rem !important;
        padding: 0.45rem 0.65rem calc(0.45rem + env(safe-area-inset-bottom, 0px)) 0.65rem !important;
        flex-wrap: nowrap !important;
        background: var(--surface) !important;
        border-top: 1px solid var(--border) !important;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08) !important;
    }

    .booking-form-header-mobile {
        display: none !important;
    }

    .form-group-title-box {
        width: 100% !important;
        margin: 0 !important;
    }

    .booking-form-bottom-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.35rem !important;
        width: 100% !important;
    }

    .form-group-date-box {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    .form-group-time-box {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: auto !important;
    }

    .form-group-btn-box {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    .booking-input-pill {
        padding: 0.22rem 0.5rem !important;
        border-radius: 99px !important;
        font-size: 0.8rem !important;
    }

    .booking-submit-btn {
        padding: 0.45rem 1rem !important;
        font-size: 0.82rem !important;
        font-weight: 700 !important;
    }

    .booking-time-input {
        width: 44px !important;
        min-width: 40px !important;
        font-size: 0.8rem !important;
        padding: 0.25rem 0 !important;
    }

    #bookingDate {
        font-size: 0.78rem !important;
        padding: 0.25rem 0 !important;
        width: 86px !important;
        min-width: 78px !important;
    }

    #bookingTitle {
        font-size: 0.85rem !important;
        padding: 0.25rem 0 !important;
    }

    .room-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Tablet (iPad) & Desktop (>= 601px) Spacious Room Booking Bar */
@media (min-width: 601px) {
    .mobile-day-picker {
        display: none !important;
    }

    .booking-form-premium {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom, 0px)) 1.25rem !important;
        gap: 0.85rem !important;
        background: var(--surface) !important;
        border-top: 1px solid var(--border) !important;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05) !important;
    }

    .booking-form-header-mobile {
        display: none !important;
    }

    .form-group-title-box {
        flex: 1 1 220px !important;
        min-width: 170px !important;
        margin: 0 !important;
    }

    .booking-form-bottom-row {
        display: flex !important;
        align-items: center !important;
        gap: 0.65rem !important;
        width: auto !important;
        flex-shrink: 0 !important;
    }

    .form-group-date-box,
    .form-group-time-box,
    .form-group-btn-box {
        flex-shrink: 0 !important;
        width: auto !important;
    }

    .booking-input-pill {
        padding: 0.48rem 0.95rem !important;
        border-radius: 99px !important;
        font-size: 0.92rem !important;
        background: var(--surface2) !important;
        border: 1px solid var(--border) !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
    }

    .booking-form-premium input[type="text"],
    .booking-form-premium input[type="date"],
    .booking-form-premium .booking-time-input {
        font-size: 0.92rem !important;
        color: var(--text) !important;
    }

    #bookingTitle {
        font-size: 0.92rem !important;
        padding: 0.2rem 0 !important;
    }

    #bookingDate {
        font-size: 0.9rem !important;
        padding: 0.2rem 0 !important;
        width: 120px !important;
        min-width: 110px !important;
    }

    .booking-time-input {
        width: 54px !important;
        min-width: 50px !important;
        font-size: 0.9rem !important;
        padding: 0.2rem 0 !important;
    }

    .time-suffix-label {
        display: inline-block !important;
        font-size: 0.8rem !important;
        color: var(--text-muted) !important;
        font-weight: 600 !important;
        margin-left: 0.15rem !important;
    }

    .booking-submit-btn {
        padding: 0.6rem 1.4rem !important;
        font-size: 0.92rem !important;
        font-weight: 700 !important;
        min-height: 44px !important;
    }

    .calendar-grid-p {
        display: grid !important;
        grid-template-columns: 50px repeat(7, minmax(0, 1fr)) !important;
        width: 100% !important;
    }

    .room-booking-header-nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .room-booking-header-nav .view-switcher-p {
        position: absolute !important;
        right: 1.25rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }

    .nav-arrow-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 1.1rem !important;
    }

    #roomWeekLabel {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
    }

    .calendar-cell {
        min-height: 52px !important;
    }
}

/* &#9472;&#9472; Citizen Portal Dashboard &#9472;&#9472; */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

/* &#9472;&#9472; NEWS SLIDESHOW &#9472;&#9472; */
.news-slideshow-container {
    position: relative;
    margin-top: 1.5rem;
    width: 100%;
}

.news-slideshow {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    padding: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 1.25rem;
    border: 1px solid var(--border);
    background: var(--surface2);
    position: relative;
}

.news-slideshow::-webkit-scrollbar {
    display: none;
}

.news-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--surface2);
    min-height: 250px;
}

.news-slide img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.news-slideshow-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.news-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-dot.active {
    background: var(--primary-light);
    width: 20px;
    border-radius: 10px;
}

.news-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
    opacity: 0.8;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.news-slideshow-container:hover .news-arrow {
    opacity: 1;
}

.news-arrow:hover {
    background: var(--primary-light);
    transform: translateY(-50%) scale(1.1);
}

.news-arrow-left {
    left: 1rem;
}

.news-arrow-right {
    right: 1rem;
}

/* &#9472;&#9472; NEWS GRID (BERICHT) &#9472;&#9472; */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.news-grid-item {
    aspect-ratio: 1;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.2s;
}

.news-grid-item:hover {
    transform: scale(1.02);
}

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

/* ── MODERN NEWS BLOG & LIST STRUCTURE ── */
#newsPortalContent {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
}

.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    position: relative;
    padding: 0.85rem;
    gap: 1.25rem;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-light);
}

.news-card-image-wrap {
    width: 200px;
    height: 130px;
    flex-shrink: 0;
    border-radius: 0.85rem;
    overflow: hidden;
    background: var(--surface2);
    position: relative;
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-img {
    transform: scale(1.06);
}

.news-card-image-wrap.no-img {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2f6 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    padding: 10px 8px;
    text-align: center;
    box-sizing: border-box;
    gap: 6px;
}

.no-img-icon {
    font-size: 1.75rem;
    line-height: 1;
    opacity: 0.65;
    filter: grayscale(0.2);
}

.no-img-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.news-card-body {
    padding: 0.25rem 0.5rem 0.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.5rem;
    min-width: 0;
}

.news-card-publisher {
    color: var(--primary-light);
    background: rgba(79, 70, 229, 0.1);
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 68%;
    display: inline-block;
    box-sizing: border-box;
    flex-shrink: 1;
    line-height: 1.25;
}

.news-card-date {
    color: var(--text-muted);
    font-size: 0.73rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-snippet {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-readmore {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.2rem;
}

.news-card-pinned {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    z-index: 2;
}

/* Responsive Tweaks */
@media (max-width: 640px) {
    .news-card {
        padding: 0.75rem;
        gap: 0.85rem;
    }

    .news-card-image-wrap {
        width: 110px;
        height: 100px;
        border-radius: 0.75rem;
    }

    .news-card-title {
        font-size: 0.95rem;
    }

    .news-card-snippet {
        display: none;
    }

    .news-card-readmore {
        font-size: 0.75rem;
    }
}

/* &#9472;&#9472; LIGHTBOX &#9472;&#9472; */
.news-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 12, 18, 0.94);
    z-index: 9999999 !important;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.news-lightbox.active {
    display: flex;
}

.lightbox-header {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top, 1rem));
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    z-index: 10;
    pointer-events: none;
}

.lightbox-header * {
    pointer-events: auto;
}

.lightbox-caption {
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.55);
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    max-width: 75vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.lightbox-caption:empty {
    display: none;
}

.news-lightbox-close {
    position: static;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    user-select: none;
}

.news-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.06);
}

.lightbox-content {
    position: relative;
    max-width: 96vw;
    max-height: 84vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-lightbox img {
    max-width: 92vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.85rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65);
    animation: lbZoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lbZoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(6px);
    z-index: 5;
    user-select: none;
}

.lightbox-nav-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-btn.prev {
    left: -14px;
}

.lightbox-nav-btn.next {
    right: -14px;
}

@media (max-width: 600px) {
    .lightbox-nav-btn.prev {
        left: 6px;
    }

    .lightbox-nav-btn.next {
        right: 6px;
    }
}

.lightbox-counter {
    position: absolute;
    bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.news-report-img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    display: block;
}

@media (min-width: 768px) {
    .portal-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

.portal-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    gap: 0.75rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.portal-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
    background: var(--surface);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.portal-card-icon {
    font-size: 2rem;
    width: 54px;
    height: 54px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    transition: transform 0.3s;
}

.portal-card:hover .portal-card-icon {
    transform: scale(1.1);
    background: var(--primary);
    color: white;
}

.portal-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.portal-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin: 0;
}

/* Modern Portal Card (Image Top) */
.portal-card-modern {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portal-card-modern:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.portal-card-modern .card-image {
    height: 160px;
    background: var(--surface2);
    /* Dunklerer Hintergrund statt Weiß */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
}

.portal-card-modern .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.portal-card-modern .card-image .placeholder-icon {
    font-size: 3rem;
    opacity: 0.2;
}

.portal-card-modern .category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
}

.portal-card-modern .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.portal-card-modern .card-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.portal-card-modern .card-owner {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.portal-card-modern .card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.portal-card-modern .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.3rem;
}

.portal-card-modern .status-indicator.available {
    background: #10b981;
    box-shadow: 0 0 8px #10b98166;
}

.portal-card-modern .view-link {
    color: var(--primary-light);
    font-weight: 700;
}

/* Detail View Styles */
.detail-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-hero {
    height: 300px;
    border-radius: 1.5rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .detail-container {
        flex-direction: row;
    }

    .detail-hero {
        flex: 1;
        height: 400px;
    }

    .detail-content {
        flex: 1;
    }
}

.badge {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge {
    background: #10b98122;
    color: #10b981;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.activity-log {
    margin-top: 2rem;
    text-align: left;
}

.activity-log h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-item {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text);
    /* Fix for contrast issues */
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--bg);
}

/* &#9472;&#9472; Portal Navigation &#9472;&#9472; */
.portal-nav {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.btn-back-portal {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s;
}

.btn-back-portal:hover {
    background: var(--surface);
    transform: translateX(-3px);
    border-color: var(--primary);
}

/* &#9472;&#9472; Portal Form Elements &#9472;&#9472; */
.portal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.portal-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.portal-input-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.portal-input,
.portal-textarea,
.portal-select {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.portal-input:focus,
.portal-textarea:focus,
.portal-select:focus {
    outline: none;
    border-color: var(--primary);
}

.portal-textarea {
    resize: vertical;
    min-height: 100px;
}

#reportMap {
    height: 380px;
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    margin-top: 0.5rem;
    z-index: 10;
}

@media (max-width: 600px) {
    #reportMap {
        height: 320px;
    }
}

.map-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.flohmarkt-custom-pin,
.flohmarkt-picker-pin,
.schaden-marker-pin {
    background: transparent !important;
    border: none !important;
}

.schaden-marker-pin {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.schaden-marker-pin:active {
    cursor: grabbing;
}

.schaden-marker-pin .schaden-pin-wrapper {
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: 20px 52px;
}

.schaden-marker-pin:hover .schaden-pin-wrapper {
    transform: scale(1.12);
}

.schaden-marker-pin:active .schaden-pin-wrapper {
    transform: scale(1.18) translateY(-4px);
}

.flohmarkt-custom-pin:hover svg,
.flohmarkt-picker-pin:hover svg {
    transform: scale(1.12);
    transition: transform 0.2s ease;
}

/* &#9472;&#9472; Portal Grid & Rental Cards &#9472;&#9472; */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

@media (max-width: 600px) {
    .portal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.5rem;
    }

    #rentalsPortalContent,
    #flohmarktStaendeList {
        grid-template-columns: 1fr !important;
    }
}

.rental-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.news-unread-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 99px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    border: 2px solid #ffffff;
    z-index: 10;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.rental-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-light);
}

.rental-card:active {
    transform: scale(0.98);
}

.rental-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    position: relative;
}

.rental-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rental-card:hover .rental-card-img img {
    transform: scale(1.05);
}

.rental-card-img span {
    font-size: 3rem;
    opacity: 0.15;
    filter: grayscale(1);
}

.rental-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    text-align: left;
}

/* &#9472;&#9472; Kurse / Workshops Styles &#9472;&#9472; */
.meine-kurs-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.75rem 0.9rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.meine-kurs-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-light);
}

.meine-kurs-termin-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px dashed var(--border);
    gap: 0.5rem;
}

.mkt-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.mkt-date {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
}

.mkt-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.mkt-actions {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

@media (max-width: 600px) {
    .meine-kurs-termin-row {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .mkt-actions {
        width: auto;
        justify-content: flex-end;
    }

    .mkt-actions>div,
    .mkt-actions>button {
        flex: none;
        width: auto;
    }

    .btn-cancel-countdown {
        padding: 0.25rem 0.55rem !important;
    }

    .countdown-timer {
        font-size: 0.55rem !important;
    }
}

.meine-kurs-termin-row:last-child {
    border-bottom: none;
}

.kurs-date-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.kurs-date-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    background: rgba(79, 70, 229, 0.05);
}

.kurs-date-card.selected {
    border-color: var(--primary-light);
    background: rgba(79, 70, 229, 0.1);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.kurs-progress-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.kurs-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.kurs-selection-guide {
    text-align: center;
    padding: 1.5rem;
    background: var(--surface2);
    border: 2px dashed var(--border);
    border-radius: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

/* &#9472;&#9472; Marktplatz Styles &#9472;&#9472; */
.markt-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 0.8rem;
    border-radius: 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.markt-tab-btn.active {
    background: var(--surface);
    color: var(--primary-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.markt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    padding: 0.25rem;
}

@media (max-width: 500px) {
    .markt-grid {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }
}

.markt-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.markt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-light);
}

/* Unified Kurs Cards V2 */
.kurs-card-v2 {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    height: 100%;
    box-sizing: border-box;
}

.kurs-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-light);
}

.waste-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.waste-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-light);
}

.kurs-badge-slot {
    min-height: 22px;
    display: flex;
    align-items: center;
}

.kurs-title-slot {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text);
    word-break: break-word;
    margin-bottom: 0.15rem;
}

.kurs-leader-slot {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kurs-leader-slot span:first-child {
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
    opacity: 0.8;
    font-size: 0.9rem;
}

.kurs-info-slot {
    font-size: 0.82rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text);
    line-height: 1.45;
}

.kurs-info-slot span:first-child {
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
    opacity: 0.8;
    font-size: 0.9rem;
}

.kurs-info-slot span:last-child {
    flex: 1;
}

.kurs-status-slot {
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

.markt-card-images {
    display: flex;
    justify-content: center;
    gap: 2px;
    height: 120px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}

.markt-card-images::-webkit-scrollbar {
    display: none;
}

.markt-card-img-thumb {
    height: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
}

.markt-card-img-thumb:last-child {
    border-right: none;
}

.markt-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.markt-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 2px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.markt-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.markt-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    backdrop-filter: blur(2px);
}

.markt-card-body {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.markt-card-cat {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-light);
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.markt-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.markt-card-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #10b981;
    margin-top: auto;
}

.markt-card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.markt-card-footer {
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.markt-card-contact {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.markt-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.6rem;
}

.markt-detail-gallery {
    height: 320px;
    background: #e5e7eb;
    /* Helles Grau */
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    position: relative;
    scroll-behavior: smooth;
}

.markt-detail-gallery::-webkit-scrollbar {
    display: none;
}

.markt-detail-gallery img {
    min-width: 100%;
    height: 100%;
    object-fit: contain;
    scroll-snap-align: start;
}

.markt-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
    font-size: 1.2rem;
}

.markt-gallery-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.markt-gallery-arrow.prev {
    left: 10px;
}

.markt-gallery-arrow.next {
    right: 10px;
}

.markt-gallery-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    position: absolute;
    bottom: 1rem;
    width: 100%;
    z-index: 10;
}

.markt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s;
}

.markt-dot.active {
    background: #fff;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Subtle Contact Styles (Compact) */
.markt-contact-subtle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.5rem;
    background: var(--surface2);
    color: var(--text);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.markt-contact-subtle:hover {
    background: var(--surface);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.markt-contact-icon {
    font-size: 0.9rem;
}

.markt-detail-contact-box {
    padding: 1rem;
    background: var(--surface2);
    border-radius: 1rem;
    margin-top: 1rem;
}

.markt-detail-contact-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.5;
    margin-bottom: 0.4rem;
}

/* &#9472;&#9472; Digital Black Board Styles &#9472;&#9472; */
.blackboard-view {
    display: none;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.25rem;
}

.blackboard-view.visible {
    display: block;
}

.blackboard-board {
    background: #a67c52;
    /* Cork color */
    background-image:
        radial-gradient(circle at 2px 2px, rgba(0, 0, 0, 0.05) 1px, transparent 0);
    background-size: 4px 4px;
    border: 12px solid #5d4037;
    /* Wood frame */
    border-radius: 1rem;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 3rem 2rem;
    min-height: 500px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    align-content: start;
    position: relative;
}

@media (max-width: 600px) {
    .blackboard-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 1.2rem 1rem;
        gap: 1rem;
        justify-items: center;
        overflow: hidden;
    }

    .blackboard-item {
        max-width: 90px;
        width: 100%;
        min-width: 0;
        padding: 0.25rem;
    }

    .blackboard-title {
        font-size: 0.5rem;
        margin-top: 0.2rem;
        width: 100%;
        min-width: 0;
    }

    .blackboard-pin {
        width: 10px;
        height: 10px;
        top: -5px;
    }

    .blackboard-item.is-stack::before {
        transform: translate(2px, 2px) rotate(1deg);
    }

    .blackboard-item.is-stack::after {
        transform: translate(4px, 4px) rotate(2deg);
    }
}

.blackboard-item {
    background: white;
    padding: 0.6rem;
    box-shadow: 2px 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1.414;
    /* A4 aspect ratio */
    max-width: 240px;
    transform-origin: center center;
    border: 1px solid #eee;
}

.blackboard-item:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 10;
}

.blackboard-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
    border: 1px solid #f8fafc;
}

.blackboard-item .pdf-preview {
    width: 100%;
    height: 100%;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    gap: 0.5rem;
    color: #475569;
    text-align: center;
}

.blackboard-pin {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: radial-gradient(circle at 30% 30%, #ec4899, #be185d);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.blackboard-item.is-stack::before,
.blackboard-item.is-stack::after {
    content: '';
    position: absolute;
    inset: 0;
    background: white;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    z-index: -1;
    transition: transform 0.3s;
    border: 1px solid #eee;
}

.blackboard-item.is-stack::before {
    transform: translate(4px, 4px) rotate(1deg);
}

.blackboard-item.is-stack::after {
    transform: translate(8px, 8px) rotate(2deg);
}

.blackboard-title {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: #334155;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Large Viewer Modal */
.bb-viewer-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    flex-direction: column;
    padding: 1rem;
}

.bb-viewer-modal.open {
    display: flex;
}

.bb-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    color: white;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.bb-viewer-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.bb-viewer-content img,
.bb-viewer-content iframe {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.bb-viewer-close {
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

/* &#9472;&#9472; Onboarding Animations &#9472;&#9472; */
#onboardingCarousel::-webkit-scrollbar {
    display: none;
}

@keyframes obWave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(15deg);
    }

    75% {
        transform: rotate(-15deg);
    }
}

.ob-icon-wave {
    animation: obWave 2s ease-in-out infinite;
    transform-origin: bottom center;
    display: inline-block;
}

@keyframes obBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.ob-icon-bounce {
    animation: obBounce 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes obPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.ob-icon-pulse {
    animation: obPulse 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes obChat {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

.ob-icon-chat {
    animation: obChat 3s ease-in-out infinite;
    transform-origin: bottom left;
    display: inline-block;
}

/* ========================================================
   SECTION 5
   ======================================================== */
.map-control-btn {
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.map-control-btn:hover {
    background: var(--surface2);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.map-control-btn:active {
    transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════════
           PERFEKTE RESPONSIVE ENGINE: HANDY (SMARTPHONE) & IPAD (TABLET)
           ════════════════════════════════════════════════════════════════ */

/* ── 1. HANDY & SMARTPHONE (max-width: 640px) ── */
@media (max-width: 640px) {

    /* Touch & iOS Zoom Fix */
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Fullscreen Native Mobile Modal */
    #publicPortalModal.open,
    #publicRoomsModal.open {
        padding: 0 !important;
        align-items: flex-end !important;
        justify-content: flex-end !important;
    }

    #publicPortalModal::before,
    #publicPortalModal::after,
    #publicRoomsModal::before,
    #publicRoomsModal::after {
        display: none !important;
    }

    #portalBox,
    #roomsBox {
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #portalBox .modal-header-modern {
        padding: calc(0.65rem + env(safe-area-inset-top, 0px)) 0.85rem 0.65rem 0.85rem !important;
        border-radius: 0 !important;
        flex-shrink: 0 !important;
    }

    #portalBox .modal-header-modern #portalTitle {
        font-size: 1.15rem !important;
    }

    #portalBox .desc-box-content,
    #roomsBox .desc-box-content,
    #portalScrollContainer {
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0.75rem 0.75rem calc(3.5rem + env(safe-area-inset-bottom, 0px)) 0.75rem !important;
    }

    /* ── Verleih & Inventar (Handy) ── */
    #rentalsPortalContent {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 !important;
    }

    .rental-hero-card {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0.85rem !important;
        gap: 0.75rem !important;
    }

    .rental-hero-img-wrap {
        width: 100% !important;
        height: 155px !important;
        min-height: 140px !important;
    }

    .rental-hero-title {
        font-size: 1.45rem !important;
        margin: 0.15rem 0 !important;
    }

    .rental-hero-stats {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 0.35rem 0.65rem !important;
        padding: 0.1rem 0 !important;
    }

    .rental-spec-item+.rental-spec-item::before {
        content: "•";
        color: var(--text-muted);
        opacity: 0.4;
        font-weight: 700;
        margin-right: 0.45rem;
    }

    .rental-hero-contact-card {
        width: 100% !important;
        border-left: none !important;
        border-top: 1px solid var(--border) !important;
        padding-left: 0 !important;
        padding-top: 0.75rem !important;
        margin-top: 0.35rem !important;
    }

    .rental-action-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .calendar-grid-7 {
        gap: 2px !important;
    }

    .rental-date-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    /* ── Stellenmarkt (Handy) ── */
    #jobsPortalContent {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-top: 0.5rem !important;
    }

    #jobTypeFilterPills {
        display: flex !important;
        gap: 0.4rem !important;
        overflow-x: auto !important;
        padding-bottom: 0.35rem !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #portalJobDetailView .markt-detail-container {
        width: 100% !important;
        padding: 0 !important;
    }

    /* ── Schadensmelder (Handy) ── */
    .schaden-segmented-control {
        width: 100% !important;
    }

    .schaden-segment-btn {
        min-height: 42px !important;
        font-size: 0.85rem !important;
    }

    .schaden-cat-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.4rem !important;
    }

    @media (max-width: 380px) {
        .schaden-cat-grid {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    }

    .schaden-cat-tile {
        min-height: 62px !important;
        padding: 0.6rem 0.25rem !important;
    }

    .schaden-cat-icon {
        font-size: 1.35rem !important;
    }

    .schaden-cat-text {
        font-size: 0.72rem !important;
    }

    .schaden-loc-row {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .schaden-loc-row .schaden-input-with-icon {
        width: 100% !important;
    }

    .schaden-loc-row .btn-gps-modern {
        width: 100% !important;
        min-height: 42px !important;
        justify-content: center !important;
    }

    #reportMap {
        height: 240px !important;
    }

    .schaden-photo-dropzone {
        min-height: 75px !important;
        padding: 0.85rem !important;
    }

    /* ── Umfragen (Handy) ── */
    #pollsPortalContent {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .poll-card-modern {
        padding: 1.15rem 1rem !important;
        border-radius: 1.15rem !important;
    }

    /* ── Marktplatz (Handy) ── */
    .markt-grid {
        grid-template-columns: 1fr !important;
        gap: 1.35rem !important;
    }

    @media (min-width: 481px) and (max-width: 640px) {
        .markt-grid {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: 1.15rem !important;
        }
    }
}

/* ── 2. IPAD & TABLET (min-width: 641px) and (max-width: 1024px) ── */
@media (min-width: 641px) and (max-width: 1024px) {

    #publicPortalModal.open,
    #publicRoomsModal.open {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 1.5rem !important;
        box-sizing: border-box !important;
        background: rgba(15, 23, 42, 0.75) !important;
        backdrop-filter: blur(12px) !important;
    }

    #portalBox,
    #roomsBox {
        width: 94% !important;
        max-width: 960px !important;
        height: 90vh !important;
        max-height: 90vh !important;
        margin: auto !important;
        border-radius: 1.5rem !important;
        border: 1px solid var(--border) !important;
        box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    #portalScrollContainer {
        padding: 1.5rem 1.85rem 3rem 1.85rem !important;
        -webkit-overflow-scrolling: touch !important;
        flex: 1 !important;
    }

    /* ── Verleih & Inventar (iPad) ── */
    #rentalsPortalContent {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }

    .rental-hero-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
    }

    .rental-hero-img-wrap {
        width: 170px !important;
        height: 160px !important;
        min-height: 140px !important;
        flex-shrink: 0 !important;
    }

    .rental-action-grid {
        display: grid !important;
        grid-template-columns: 1.05fr 0.95fr !important;
        gap: 1.25rem !important;
        align-items: stretch !important;
    }

    /* ── Stellenmarkt (iPad) ── */
    #jobsPortalContent {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }

    #portalJobDetailView .markt-detail-container {
        max-width: 820px !important;
        margin: 0 auto !important;
    }

    /* ── Schadensmelder (iPad) ── */
    #schadenFormTab {
        max-width: 760px !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    .schaden-cat-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem !important;
    }

    #reportMap {
        height: 320px !important;
    }

    /* ── Umfragen (iPad) ── */
    #pollsPortalContent {
        max-width: 780px !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    /* ── Marktplatz (iPad) ── */
    .markt-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
        gap: 1.25rem !important;
    }

    #portalMarktDetailView .markt-detail-container {
        max-width: 820px !important;
        margin: 0 auto !important;
    }

    .btn-markt-inserieren-fab {
        display: none !important;
    }
}

/* Offline Banner */
.offline-banner {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    padding: 0.4rem;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000000;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}

/* Eilmeldung Ticker */
@keyframes marquee {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-content {
    display: inline-block;
    padding-left: 0;
    white-space: nowrap;
    animation: marquee 35s linear infinite;
    will-change: transform;
}

.marquee-content:hover {
    animation-play-state: paused;
}

/* ========================================================
   SECTION 6
   ======================================================== */
.transport-village-chip {
    padding: 0.5rem 1.1rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.transport-village-chip:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.transport-village-chip.active {
    background: var(--primary, #4f46e5);
    color: #ffffff;
    border-color: var(--primary, #4f46e5);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.transport-stop-pill {
    padding: 0.45rem 0.95rem;
    border-radius: 0.85rem;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.transport-stop-pill:hover {
    border-color: var(--primary);
    background: var(--surface);
}

.transport-stop-pill.active {
    background: rgba(79, 70, 229, 0.12);
    border-color: var(--primary, #4f46e5);
    color: var(--primary-light, #4f46e5);
    font-weight: 700;
}

.transport-dir-chip {
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.transport-dir-chip:hover {
    color: var(--text);
}

.transport-dir-chip.active {
    background: var(--surface);
    color: var(--text);
    border-color: var(--text-muted);
    font-weight: 700;
}

.departure-row {
    display: flex;
    flex-direction: column;
    padding: 0.95rem 1.15rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 1.15rem;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    gap: 0.65rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.departure-row:hover {
    transform: translateY(-1.5px);
    border-color: rgba(79, 70, 229, 0.35);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.departure-row.cancelled {
    opacity: 0.65;
    background: rgba(239, 68, 68, 0.04);
    border-color: rgba(239, 68, 68, 0.25);
}

.departure-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.departure-main-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.departure-dest-wrap {
    min-width: 0;
    flex: 1;
}

.departure-dir-tag {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.2rem;
    white-space: nowrap;
}

.departure-destination {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.departure-line-badge {
    padding: 0.35rem 0.65rem;
    background: linear-gradient(135deg, #4f46e5, #3b82f6);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    border-radius: 0.6rem;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
    flex-shrink: 0;
}

.departure-time-box {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.departure-time-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
}

.departure-time-main {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1.15;
    white-space: nowrap;
}

.departure-sched-strike {
    text-decoration: line-through;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-right: 0.35rem;
    font-weight: 700;
}

.departure-real-time {
    color: #f59e0b;
}

.departure-countdown {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-top: 0.15rem;
    white-space: nowrap;
}

.departure-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding-top: 0.45rem;
    border-top: 1px dashed var(--border);
    flex-wrap: wrap;
    width: 100%;
}

.departure-meta-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 140px;
}

.departure-meta-sep {
    opacity: 0.45;
}

.departure-status-badge-wrap {
    flex-shrink: 0;
}

.delay-pill {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.delay-pill.on-time {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.delay-pill.delayed {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.delay-pill.cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.transport-mode-btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 0.6rem;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.transport-mode-btn:hover {
    color: var(--text);
}

.transport-mode-btn.active {
    background: var(--primary, #4f46e5);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

/* Touch & Mobile Optimizations (Smartphones & Tablets) */
#transportStopChipsContainer::-webkit-scrollbar {
    height: 4px;
}

#transportStopChipsContainer::-webkit-scrollbar-track {
    background: transparent;
}

#transportStopChipsContainer::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 9999px;
}

@media (max-width: 640px) {
    #portalTransportView .btn-back-portal {
        margin-bottom: 0.5rem !important;
    }

    .transport-header-card {
        padding: 0.75rem 0.85rem !important;
        border-radius: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    .transport-header-main-row {
        gap: 0.45rem !important;
        margin-bottom: 0.45rem !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .transport-header-title-box {
        gap: 0.5rem !important;
    }

    .transport-bus-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 1.1rem !important;
        border-radius: 0.55rem !important;
    }

    .transport-header-title-box h2 {
        font-size: 1.05rem !important;
    }

    #transportVillageBadge {
        font-size: 0.7rem !important;
        padding: 0.12rem 0.45rem !important;
    }

    #transportSubtitleText {
        display: none !important;
    }

    .transport-header-actions {
        width: 100% !important;
        margin-left: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
        flex-wrap: nowrap !important;
    }

    .transport-mode-pill-group {
        flex: 1 !important;
        display: flex !important;
        padding: 0.15rem !important;
        gap: 0.15rem !important;
    }

    .transport-mode-btn {
        flex: 1 !important;
        justify-content: center !important;
        padding: 0.35rem 0.45rem !important;
        font-size: 0.75rem !important;
        border-radius: 0.5rem !important;
    }

    .transport-refresh-btn {
        padding: 0.35rem 0.65rem !important;
        font-size: 0.78rem !important;
        border-radius: 0.55rem !important;
        flex-shrink: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 30px !important;
    }

    .transport-refresh-btn .refresh-btn-label {
        display: none !important;
    }

    .transport-stops-row {
        margin-top: 0.15rem !important;
    }

    .transport-stops-row label {
        font-size: 0.68rem !important;
        margin-bottom: 0.2rem !important;
    }

    #transportStopCount {
        font-size: 0.68rem !important;
    }

    .transport-stop-pill {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.78rem !important;
        border-radius: 0.6rem !important;
        gap: 0.3rem !important;
    }

    .transport-stop-pill span {
        width: 15px !important;
        height: 15px !important;
        font-size: 8.5px !important;
        border-width: 1.2px !important;
    }

    #portalWasteView>div,
    #portalRentalsView>div,
    #portalFlohmarktView>div,
    #transportDeparturesCard,
    #transportMapView,
    #portalTransportView>div:not(.transport-header-card) {
        padding: 0.85rem 0.95rem !important;
        border-radius: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    #transportLeafletMap {
        height: 290px !important;
        border-radius: 0.85rem !important;
    }

    .departure-row {
        padding: 0.8rem 0.9rem !important;
        gap: 0.5rem !important;
        border-radius: 1rem !important;
    }

    .departure-top-row {
        gap: 0.55rem !important;
    }

    .departure-main-info {
        gap: 0.55rem !important;
    }

    .departure-destination {
        font-size: 0.98rem !important;
    }

    .departure-time-main {
        font-size: 1.15rem !important;
    }

    .departure-line-badge {
        padding: 0.28rem 0.5rem !important;
        font-size: 0.78rem !important;
    }

    .departure-bottom-row {
        padding-top: 0.4rem !important;
    }

    .departure-meta-info {
        font-size: 0.72rem !important;
    }

    #transportDirFilterChips {
        width: 100%;
        margin-top: 0.4rem;
    }
}

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

    /* iPad / Tablets */
    #transportLeafletMap {
        height: 420px !important;
    }

    .departure-row {
        padding: 1rem 1.25rem !important;
    }
}

/* ========================================================
   SECTION 7
   ======================================================== */
.council-header-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.council-tab-btn {
    padding: 0.45rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 0.65rem;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.council-tab-btn:hover {
    color: var(--text);
}

.council-tab-btn.active {
    background: var(--primary, #4f46e5);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.council-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.council-card:hover {
    border-color: rgba(79, 70, 229, 0.35);
}

.council-date-box {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(59, 130, 246, 0.18));
    border: 1px solid rgba(79, 70, 229, 0.25);
    border-radius: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-align: center;
}

.council-date-box .day {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.council-date-box .month {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.council-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.council-badge.green {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.council-badge.purple {
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary);
}

.council-badge.slate {
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
}

.council-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.6rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.council-action-btn:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
}

.council-action-btn.primary {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.35);
    color: var(--primary);
}

.council-action-btn.primary:hover {
    background: rgba(79, 70, 229, 0.22);
    border-color: var(--primary);
    color: var(--primary) !important;
}

.council-btn-group {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(79, 70, 229, 0.35);
    border-radius: 0.6rem;
    overflow: hidden;
    background: rgba(79, 70, 229, 0.1);
    transition: all 0.15s ease;
}

.council-btn-group:hover {
    background: rgba(79, 70, 229, 0.2);
    border-color: var(--primary);
}

.council-btn-group button {
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--primary) !important;
    padding: 0.35rem 0.55rem !important;
    cursor: pointer;
}

.council-btn-group button:hover {
    background: rgba(79, 70, 229, 0.15) !important;
    color: var(--primary) !important;
}

.council-btn-group a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.45rem;
    border-left: 1px solid rgba(79, 70, 229, 0.25);
    color: var(--primary) !important;
    text-decoration: none;
    font-size: 0.8rem;
    background: rgba(79, 70, 229, 0.05);
    transition: all 0.15s ease;
}

.council-btn-group a:hover {
    background: rgba(79, 70, 229, 0.25);
    color: var(--primary) !important;
}

.council-header-link {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    border-radius: 0.6rem;
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.25);
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.council-header-link:hover {
    background: var(--primary);
    color: #ffffff;
}

.council-top-accordion {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border);
}

.council-year-btn {
    padding: 0.32rem 0.75rem;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.council-year-btn:hover {
    border-color: var(--primary);
}

.council-year-btn.active {
    background: var(--primary, #4f46e5);
    color: #ffffff;
    border-color: var(--primary, #4f46e5);
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.council-top-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.82rem;
}

.council-top-item:last-child {
    border-bottom: none;
}

.council-top-item .num {
    font-weight: 800;
    color: var(--primary);
    font-size: 0.76rem;
    min-width: 38px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .council-header-card {
        padding: 0.7rem 0.8rem !important;
        border-radius: 0.9rem !important;
        margin-bottom: 0.65rem !important;
    }

    .council-card {
        padding: 0.75rem 0.85rem !important;
        border-radius: 0.85rem !important;
        margin-bottom: 0.65rem !important;
    }

    .council-tab-btn {
        flex: 1;
        justify-content: center;
        padding: 0.32rem 0.35rem !important;
        font-size: 0.72rem !important;
    }

    .council-date-box {
        width: 44px !important;
        height: 44px !important;
        border-radius: 0.65rem !important;
    }

    .council-date-box .day {
        font-size: 1.05rem !important;
    }

    .council-action-btn {
        padding: 0.28rem 0.52rem !important;
        font-size: 0.74rem !important;
        gap: 0.22rem !important;
    }

    .council-header-link {
        padding: 0.24rem 0.48rem !important;
        font-size: 0.7rem !important;
    }
}

/* ========================================================
   SECTION 8
   ======================================================== */
.bs-hero-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 1.5rem;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.bs-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.bs-quick-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}

.bs-quick-item:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.12);
}

.bs-quick-icon {
    width: 38px;
    height: 38px;
    border-radius: 0.75rem;
    background: rgba(79, 70, 229, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.bs-search-wrap {
    position: relative;
    margin-bottom: 1rem;
}

.bs-search-input {
    width: 100%;
    padding: 0.85rem 2.8rem 0.85rem 2.8rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.92rem;
    box-sizing: border-box;
    transition: all 0.2s;
}

.bs-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.bs-cat-bar {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.65rem;
    margin-bottom: 1.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(79, 70, 229, 0.35) transparent;
}

.bs-cat-bar::-webkit-scrollbar {
    height: 6px;
    display: block;
}

.bs-cat-bar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 999px;
}

.bs-cat-bar::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.25);
    border-radius: 999px;
}

.bs-cat-bar::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 70, 229, 0.5);
}

/* Auf Desktop-Bildschirmen: Kategorien umbrechen, damit alle sichtbar & sofort klickbar sind */
@media (min-width: 860px) {
    .bs-cat-bar {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        padding-bottom: 0.25rem !important;
    }
}

.bs-cat-pill {
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.bs-cat-pill:hover {
    color: var(--text);
    border-color: var(--primary);
}

.bs-cat-pill.active {
    background: var(--primary, #4f46e5);
    color: #ffffff;
    border-color: var(--primary, #4f46e5);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.bs-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.bs-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.9rem;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bs-card:hover {
    transform: translateY(-3px);
    border-color: rgba(79, 70, 229, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.bs-card-top {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.bs-card-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 0.85rem;
    background: rgba(79, 70, 229, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex-shrink: 0;
}

.bs-badge-cat {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bs-badge-ozg {
    font-size: 0.68rem;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.bs-badge-form {
    font-size: 0.68rem;
    font-weight: 700;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.12);
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.bs-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0.25rem 0 0 0;
    color: var(--text);
    line-height: 1.35;
    min-height: 2.7rem;
    display: flex;
    align-items: center;
}

.bs-card-summary {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.48;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.6rem;
}

.bs-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    background: var(--surface2);
    border-radius: 0.85rem;
    border: 1px solid var(--border);
    min-height: 3.6rem;
    align-items: center;
}

.bs-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bs-meta-label {
    font-size: 0.66rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bs-meta-val {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}

.bs-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.bs-card-arrow {
    transition: transform 0.2s ease;
}

.bs-card:hover .bs-card-arrow {
    transform: translateX(4px);
}

/* Responsive Kachel-Spalten: Auf dem Computer genau 3 Kacheln nebeneinander! */
@media (min-width: 960px) {
    .bs-cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 1.25rem !important;
    }
}

@media (max-width: 959px) and (min-width: 620px) {
    .bs-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 619px) {
    .bs-hero-card {
        padding: 1rem;
        border-radius: 1.25rem;
    }

    .bs-quick-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .bs-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }
}

/* Desktop sizing & layout enhancements */
@media (min-width: 900px) {
    .bs-facts-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 899px) and (min-width: 520px) {
    .bs-facts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 519px) {
    .bs-facts-grid {
        grid-template-columns: 1fr !important;
    }
}

.bs-chk-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.bs-chk-label:hover {
    border-color: rgba(79, 70, 229, 0.35);
    background: var(--surface);
}

.bs-chk-label.checked-item {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}

.bs-chk-label.checked-item .bs-chk-text {
    text-decoration: line-through;
    color: var(--text-muted) !important;
}

/* ========================================================
   SECTION 9
   ======================================================== */
.rental-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    width: 100%;
}

@media (min-width: 860px) {
    .rental-hero-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
    }

    .rental-hero-img-wrap {
        width: 170px !important;
        height: 160px !important;
        min-height: 140px !important;
        flex-shrink: 0 !important;
    }

    .rental-hero-contact-card {
        width: 250px !important;
        flex-shrink: 0 !important;
        border-left: 1px solid var(--border) !important;
        border-top: none !important;
        padding-left: 1.35rem !important;
        padding-top: 0 !important;
    }

    .rental-action-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
        align-items: stretch;
    }
}

@media (max-width: 859px) {
    .rental-hero-card {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0.85rem !important;
        gap: 0.75rem !important;
    }

    .rental-hero-img-wrap {
        width: 100% !important;
        height: 155px !important;
        min-height: 140px !important;
    }

    .rental-hero-title {
        font-size: 1.45rem !important;
        margin: 0.15rem 0 !important;
    }

    .rental-hero-contact-card {
        width: 100% !important;
        border-left: none !important;
        border-top: 1px solid var(--border) !important;
        padding-left: 0 !important;
        padding-top: 0.75rem !important;
        margin-top: 0.35rem !important;
    }
}

/* Responsive adjustments for phones */
@media (max-width: 767px) {
    #publicPortalModal.open {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    #publicPortalModal::before,
    #publicPortalModal::after {
        display: none !important;
    }

    #portalBox {
        width: 100% !important;
        max-width: 100% !important;
        height: 98vh !important;
        max-height: 98vh !important;
        margin: 0 !important;
        border-radius: 1.5rem 1.5rem 0 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    #portalBox .desc-box-content {
        padding-bottom: 2.5rem !important;
    }
}

/* ========================================================
   SECTION 10
   ======================================================== */
.modern-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.modern-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    margin-left: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.modern-input-group {
    position: relative;
    padding-bottom: 0.5rem;
}

.modern-input {
    width: 100%;
    background: var(--surface2);
    border: 1.5px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.65rem 0.85rem;
    color: var(--text);
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: default;
    -webkit-user-select: text;
    user-select: text;
    caret-color: var(--primary);
    accent-color: var(--primary);
}

.modern-input::selection {
    background-color: rgba(79, 70, 229, 0.25) !important;
    color: var(--text) !important;
}

.modern-input::-moz-selection {
    background-color: rgba(79, 70, 229, 0.25) !important;
    color: var(--text) !important;
}

.modern-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    background: var(--surface);
}

/* OVERRIDE EVERYTHING FOR MOBILE MODAL */
@media (max-width: 768px) {
    #publicPortalModal.open {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    #publicPortalModal::before,
    #publicPortalModal::after {
        display: none !important;
    }

    #portalBox {
        width: 100% !important;
        max-width: 100% !important;
        height: 99vh !important;
        max-height: 99vh !important;
        margin: 0 !important;
        border-radius: 1.5rem 1.5rem 0 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    #portalBox .desc-box-content {
        padding-bottom: 2rem !important;
        /* give space at bottom */
    }

    /* Citizen Auth Modal: full-screen on mobile */
    #citizenAuthModal {
        padding: 0 !important;
        align-items: flex-end !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--surface) !important;
        transition: none !important;
    }

    #citizenAuthModal.open {
        background: var(--surface) !important;
    }

    #citizenAuthBox {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        min-height: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        background: var(--surface) !important;
    }

    #citizenAuthBox>.desc-box-content {
        flex: 1 !important;
        height: 100% !important;
        max-height: none !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        padding: 1.5rem 1.5rem calc(3.5rem + env(safe-area-inset-bottom, 0px)) 1.5rem !important;
    }
}

/* ── Mini Widget ("Nächste Termine") Styles ── */
.mini-widget-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.mini-widget-container::before,
.mini-widget-container::after,
.mini-widget-header::before,
.mini-widget-header::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

.mini-widget-header {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--mini-header-color, var(--primary, #901a1e));
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
    border: none !important;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mini-widget-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.2s ease;
}

.mini-widget-item {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--border-light, #f1f5f9);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.mini-widget-item:last-child {
    border-bottom: none;
}

.mini-widget-item:hover {
    background: var(--surface2, #f8fafc);
}

.mini-event-date {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--mini-accent-color, var(--primary, #901a1e));
    display: inline-block;
    margin-bottom: 0.1rem;
}

.mini-event-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text, #0f172a);
    line-height: 1.3;
    margin-bottom: 0.15rem;
}

.mini-event-meta {
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.mini-widget-footer {
    margin-top: 0.6rem;
    text-align: center;
}

.mini-calendar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--mini-btn-bg, var(--primary, #901a1e));
    color: var(--mini-btn-color, #ffffff);
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(144, 26, 30, 0.25);
}

.mini-calendar-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(144, 26, 30, 0.35);
}

[data-theme="dark"] .mini-widget-header {
    --mini-header-color: #f87171;
}

[data-theme="dark"] .mini-event-date {
    --mini-accent-color: #f87171;
}

[data-theme="dark"] .mini-calendar-btn {
    --mini-btn-bg: #dc2626;
    --mini-btn-color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

/* ========================================================
   SECTION 11
   ======================================================== */
#global-offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ef4444;
    color: white;
    text-align: center;
    padding: 10px;
    font-weight: 600;
    font-size: 14px;
    z-index: 99999;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

#global-offline-banner.offline {
    transform: translateY(0);
}

/* OVERRIDE EVERYTHING FOR MOBILE MODAL */
@media (max-width: 768px) {

    #publicPortalModal.open,
    #legalModal.open,
    #portalInfoModal.open {
        padding: 0 !important;
        inset: 0 !important;
        align-items: stretch !important;
    }

    #publicPortalModal::before,
    #publicPortalModal::after,
    #legalModal::before,
    #legalModal::after,
    #portalInfoModal::before,
    #portalInfoModal::after {
        display: none !important;
    }

    #portalBox {
        width: 100% !important;
        max-width: 100% !important;
        height: 99vh !important;
        max-height: 99vh !important;
        margin: 0 !important;
        border-radius: 1.5rem 1.5rem 0 0 !important;
        padding: 0 !important;
        transform: none !important;
    }

    .legal-modal-box {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
        transform: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    #portalBox .desc-box-content {
        padding-bottom: 2rem !important;
        /* give space at bottom */
    }
}

/* ========================================================
   SECTION: FUNDBÜRO (VERLOREN & GEFUNDEN)
   ======================================================== */
.fund-card {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.fund-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
    border-color: var(--primary-light, #818cf8) !important;
}

.fund-card:active {
    transform: scale(0.98);
}

.fund-contact-btn {
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease !important;
    text-align: center;
}

.fund-contact-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.fund-contact-btn:active {
    transform: scale(0.97);
}

.fund-contact-btn.btn-call:hover {
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35) !important;
}

.fund-contact-btn.btn-wa:hover {
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35) !important;
}

.fund-contact-btn.btn-email:hover {
    background: var(--surface) !important;
    border-color: var(--primary) !important;
}

/* ── Fundbüro Mobile & Responsive Optimization ── */
#portalFundbueroView,
#portalFundbueroCreateView,
#portalFundbueroDetailView {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#portalFundbueroCreateView {
    overflow-x: hidden;
}

.fund-create-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.fund-toggle-wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.fund-type-toggle-btn {
    min-width: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    line-height: 1.25 !important;
    text-align: center !important;
    flex: 1 1 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
}

.fund-toggle-short {
    display: none;
}

.fund-toggle-full {
    display: inline;
}

@media (max-width: 640px) {
    #portalScrollContainer {
        overflow-x: hidden !important;
    }

    #portalFundbueroView .modern-pills-wrapper .pills-scroll-btn {
        display: none !important;
    }

    #fundCategoryPills {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        padding: 0.15rem 0 0.35rem 0 !important;
    }

    #fundCategoryPills::-webkit-scrollbar {
        display: none !important;
        height: 0 !important;
    }

    #fundCategoryPills .category-pill {
        padding: 0.38rem 0.75rem !important;
        font-size: 0.78rem !important;
    }

    .fund-create-card {
        padding: 1rem 0.85rem !important;
        border-radius: 1rem !important;
        margin-bottom: 1.25rem !important;
    }

    .fund-create-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .fund-contact-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .fund-create-actions {
        flex-direction: column-reverse !important;
        width: 100% !important;
        gap: 0.65rem !important;
    }

    .fund-create-actions button {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .fund-toggle-short {
        display: inline !important;
        font-weight: 700 !important;
    }

    .fund-toggle-full {
        display: none !important;
    }

    .fund-type-toggle-btn {
        padding: 0.55rem 0.35rem !important;
        font-size: 0.84rem !important;
        gap: 0.3rem !important;
    }

    .fund-card h4 {
        font-size: 0.95rem !important;
    }
}